fix(products): fix breadcrumbs and product filtering (backport from main)
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled

This commit is contained in:
2026-02-24 16:04:21 +01:00
parent 915eb61613
commit 5397309103
43805 changed files with 4324295 additions and 3 deletions

View File

@@ -0,0 +1,42 @@
var baseIndexOf = require('./_baseIndexOf'),
toInteger = require('./toInteger');
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeMax = Math.max;
/**
* Gets the index at which the first occurrence of `value` is found in `array`
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
* for equality comparisons. If `fromIndex` is negative, it's used as the
* offset from the end of `array`.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Array
* @param {Array} array The array to inspect.
* @param {*} value The value to search for.
* @param {number} [fromIndex=0] The index to search from.
* @returns {number} Returns the index of the matched value, else `-1`.
* @example
*
* _.indexOf([1, 2, 1, 2], 2);
* // => 1
*
* // Search from the `fromIndex`.
* _.indexOf([1, 2, 1, 2], 2, 2);
* // => 3
*/
function indexOf(array, value, fromIndex) {
var length = array == null ? 0 : array.length;
if (!length) {
return -1;
}
var index = fromIndex == null ? 0 : toInteger(fromIndex);
if (index < 0) {
index = nativeMax(length + index, 0);
}
return baseIndexOf(array, value, index);
}
module.exports = indexOf;

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"1":"F A B","2":"K D E zC"},B:{"1":"0 1 2 3 4 5 6 7 8 C L M G N O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I"},C:{"1":"0 1 2 3 4 5 6 7 8 9 J bB K D E F A B C L M G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B WC 6B XC 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R YC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I ZC aC OC 1C 2C 3C","2":"0C VC 4C","36":"5C"},D:{"1":"0 1 2 3 4 5 6 7 8 9 G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B WC 6B XC 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I ZC aC OC","516":"J bB K D E F A B C L M"},E:{"1":"D E F A B C L M G 9C AD cC PC QC BD CD DD dC eC RC ED SC fC gC hC iC jC FD TC kC lC mC nC oC GD UC pC qC rC sC HD tC uC vC wC ID","772":"J bB K 6C bC 7C 8C"},F:{"1":"0 1 2 3 4 5 6 7 8 9 B C G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R YC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z LD MD PC xC ND QC","2":"F JD","36":"KD"},G:{"1":"E RD SD TD UD VD WD XD YD ZD aD bD cD dD eD fD gD hD dC eC RC iD SC fC gC hC iC jC jD TC kC lC mC nC oC kD UC pC qC rC sC lD tC uC vC wC","4":"bC OD yC QD","516":"PD"},H:{"132":"mD"},I:{"1":"I rD sD","36":"nD","516":"VC J qD yC","548":"oD pD"},J:{"1":"D A"},K:{"1":"A B C H PC xC QC"},L:{"1":"I"},M:{"1":"OC"},N:{"1":"A B"},O:{"1":"RC"},P:{"1":"9 J AB BB CB DB EB FB GB HB IB tD uD vD wD xD cC yD zD 0D 1D 2D SC TC UC 3D"},Q:{"1":"4D"},R:{"1":"5D"},S:{"1":"6D 7D"}},B:4,C:"CSS3 Background-image options",D:true};

View File

@@ -0,0 +1,6 @@
export { launchDarklyIntegrationShim as launchDarklyIntegration, buildLaunchDarklyFlagUsedHandlerShim as buildLaunchDarklyFlagUsedHandler, } from './launchDarkly';
export { openFeatureIntegrationShim as openFeatureIntegration, OpenFeatureIntegrationHookShim as OpenFeatureIntegrationHook, } from './openFeature';
export { statsigIntegrationShim as statsigIntegration } from './statsig';
export { unleashIntegrationShim as unleashIntegration } from './unleash';
export { growthbookIntegrationShim as growthbookIntegration } from './growthbook';
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,23 @@
(The MIT License)
Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
Copyright (c) 2015-2022 Douglas Christopher Wilson <doug@somethingdoug.com>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@@ -0,0 +1 @@
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/elements/WhereBuilder/Condition/Date/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE9C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAErD,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAA;IAC/B,QAAQ,CAAC,KAAK,EAAE,IAAI,GAAG,MAAM,CAAA;CAC9B,GAAG,kBAAkB,CAAA"}

View File

@@ -0,0 +1,20 @@
interface Options {
/**
* Whether to include child process arguments in breadcrumbs data.
*
* @default false
*/
includeChildProcessArgs?: boolean;
/**
* Whether to capture errors from worker threads.
*
* @default true
*/
captureWorkerErrors?: boolean;
}
/**
* Capture breadcrumbs and events for child processes and worker threads.
*/
export declare const childProcessIntegration: (options?: Options | undefined) => import("@sentry/core").Integration;
export {};
//# sourceMappingURL=childProcess.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"pilcrow.js","sources":["../../../src/icons/pilcrow.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Pilcrow\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTMgNHYxNiIgLz4KICA8cGF0aCBkPSJNMTcgNHYxNiIgLz4KICA8cGF0aCBkPSJNMTkgNEg5LjVhNC41IDQuNSAwIDAgMCAwIDlIMTMiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/pilcrow\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Pilcrow = createLucideIcon('Pilcrow', [\n ['path', { d: 'M13 4v16', key: '8vvj80' }],\n ['path', { d: 'M17 4v16', key: '7dpous' }],\n ['path', { d: 'M19 4H9.5a4.5 4.5 0 0 0 0 9H13', key: 'sh4n9v' }],\n]);\n\nexport default Pilcrow;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,iBAAiB,SAAW,CAAA,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAkC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACjE,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,22 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const FoldVertical = createLucideIcon("FoldVertical", [
["path", { d: "M12 22v-6", key: "6o8u61" }],
["path", { d: "M12 8V2", key: "1wkif3" }],
["path", { d: "M4 12H2", key: "rhcxmi" }],
["path", { d: "M10 12H8", key: "s88cx1" }],
["path", { d: "M16 12h-2", key: "10asgb" }],
["path", { d: "M22 12h-2", key: "14jgyd" }],
["path", { d: "m15 19-3-3-3 3", key: "e37ymu" }],
["path", { d: "m15 5-3 3-3-3", key: "19d6lf" }]
]);
export { FoldVertical as default };
//# sourceMappingURL=fold-vertical.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utilities/buildClientFieldSchemaMap/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAA;AACpD,OAAO,KAAK,EACV,YAAY,EAEZ,oBAAoB,EACpB,cAAc,EACd,OAAO,EAER,MAAM,SAAS,CAAA;AAiBhB;;GAEG;AACH,eAAO,MAAM,yBAAyB,SAAU;IAC9C,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,MAAM,EAAE,YAAY,CAAA;IACpB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,IAAI,CAAA;IACV,OAAO,EAAE,OAAO,CAAA;IAChB,SAAS,EAAE,cAAc,CAAA;CAC1B,KAAG;IAAE,oBAAoB,EAAE,oBAAoB,CAAA;CAyD/C,CAAA"}

View File

@@ -0,0 +1,28 @@
type MinimalCloudflareContext = {
waitUntil(promise: Promise<any>): void;
};
/**
* Flushes the event queue with a timeout in serverless environments to ensure that events are sent to Sentry before the
* serverless function execution ends.
*
* The function is async, but in environments that support a `waitUntil` mechanism, it will run synchronously.
*
* This function is aware of the following serverless platforms:
* - Cloudflare: If a Cloudflare context is provided, it will use `ctx.waitUntil()` to flush events (keeps the `this` context of `ctx`).
* If a `cloudflareWaitUntil` function is provided, it will use that to flush events (looses the `this` context of `ctx`).
* - Vercel: It detects the Vercel environment and uses Vercel's `waitUntil` function.
* - Other Serverless (AWS Lambda, Google Cloud, etc.): It detects the environment via environment variables
* and uses a regular `await flush()`.
*
* @internal This function is supposed for internal Sentry SDK usage only.
* @hidden
*/
export declare function flushIfServerless(params?: {
timeout?: number;
cloudflareWaitUntil?: (task: Promise<any>) => void;
} | {
timeout?: number;
cloudflareCtx?: MinimalCloudflareContext;
}): Promise<void>;
export {};
//# sourceMappingURL=flushIfServerless.d.ts.map

View File

@@ -0,0 +1,16 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const ChevronsRight = createLucideIcon("ChevronsRight", [
["path", { d: "m6 17 5-5-5-5", key: "xnjwq" }],
["path", { d: "m13 17 5-5-5-5", key: "17xmmf" }]
]);
export { ChevronsRight as default };
//# sourceMappingURL=chevrons-right.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"users.cjs","names":[],"sources":["../../../../src/rest/commands/read/users.ts"],"sourcesContent":["import type { DirectusUser } from '../../../schema/user.js';\nimport type { ApplyQueryFields, Query } from '../../../types/index.js';\nimport type { RestCommand } from '../../types.js';\nimport { throwIfEmpty } from '../../utils/index.js';\n\nexport type ReadUserOutput<\n\tSchema,\n\tTQuery extends Query<Schema, Item>,\n\tItem extends object = DirectusUser<Schema>,\n> = ApplyQueryFields<Schema, Item, TQuery['fields']>;\n\n/**\n * List all users that exist in Directus.\n *\n * @param query The query parameters\n *\n * @returns An array of up to limit user objects. If no items are available, data will be an empty array.\n */\nexport const readUsers =\n\t<Schema, const TQuery extends Query<Schema, DirectusUser<Schema>>>(\n\t\tquery?: TQuery,\n\t): RestCommand<ReadUserOutput<Schema, TQuery>[], Schema> =>\n\t() => ({\n\t\tpath: `/users`,\n\t\tparams: query ?? {},\n\t\tmethod: 'GET',\n\t});\n\n/**\n * List an existing user by primary key.\n *\n * @param key The primary key of the user\n * @param query The query parameters\n *\n * @returns Returns the requested user object.\n * @throws Will throw if key is empty\n */\nexport const readUser =\n\t<Schema, const TQuery extends Query<Schema, DirectusUser<Schema>>>(\n\t\tkey: DirectusUser<Schema>['id'],\n\t\tquery?: TQuery,\n\t): RestCommand<ReadUserOutput<Schema, TQuery>, Schema> =>\n\t() => {\n\t\tthrowIfEmpty(String(key), 'Key cannot be empty');\n\n\t\treturn {\n\t\t\tpath: `/users/${key}`,\n\t\t\tparams: query ?? {},\n\t\t\tmethod: 'GET',\n\t\t};\n\t};\n\n/**\n * Retrieve the currently authenticated user.\n *\n * @param query The query parameters\n *\n * @returns Returns the user object for the currently authenticated user.\n */\nexport const readMe =\n\t<Schema, const TQuery extends Query<Schema, DirectusUser<Schema>>>(\n\t\tquery?: TQuery,\n\t): RestCommand<ReadUserOutput<Schema, TQuery>, Schema> =>\n\t() => ({\n\t\tpath: `/users/me`,\n\t\tparams: query ?? {},\n\t\tmethod: 'GET',\n\t});\n"],"mappings":"kDAkBa,EAEX,QAEM,CACN,KAAM,SACN,OAAQ,GAAS,EAAE,CACnB,OAAQ,MACR,EAWW,GAEX,EACA,SAGA,EAAA,aAAa,OAAO,EAAI,CAAE,sBAAsB,CAEzC,CACN,KAAM,UAAU,IAChB,OAAQ,GAAS,EAAE,CACnB,OAAQ,MACR,EAUU,EAEX,QAEM,CACN,KAAM,YACN,OAAQ,GAAS,EAAE,CACnB,OAAQ,MACR"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"users.js","names":[],"sources":["../../../../src/rest/commands/create/users.ts"],"sourcesContent":["import type { DirectusUser } from '../../../schema/user.js';\nimport type { ApplyQueryFields, NestedPartial, Query } from '../../../types/index.js';\nimport type { RestCommand } from '../../types.js';\n\nexport type CreateUserOutput<\n\tSchema,\n\tTQuery extends Query<Schema, Item>,\n\tItem extends object = DirectusUser<Schema>,\n> = ApplyQueryFields<Schema, Item, TQuery['fields']>;\n\n/**\n * Create multiple new users.\n *\n * @param items The items to create\n * @param query Optional return data query\n *\n * @returns Returns the user objects for the created users.\n */\nexport const createUsers =\n\t<Schema, const TQuery extends Query<Schema, DirectusUser<Schema>>>(\n\t\titems: NestedPartial<DirectusUser<Schema>>[],\n\t\tquery?: TQuery,\n\t): RestCommand<CreateUserOutput<Schema, TQuery>[], Schema> =>\n\t() => ({\n\t\tpath: `/users`,\n\t\tparams: query ?? {},\n\t\tbody: JSON.stringify(items),\n\t\tmethod: 'POST',\n\t});\n\n/**\n * Create a new user.\n *\n * @param item The user to create\n * @param query Optional return data query\n *\n * @returns Returns the user object for the created user.\n */\nexport const createUser =\n\t<Schema, const TQuery extends Query<Schema, DirectusUser<Schema>>>(\n\t\titem: NestedPartial<DirectusUser<Schema>>,\n\t\tquery?: TQuery,\n\t): RestCommand<CreateUserOutput<Schema, TQuery>, Schema> =>\n\t() => ({\n\t\tpath: `/users`,\n\t\tparams: query ?? {},\n\t\tbody: JSON.stringify(item),\n\t\tmethod: 'POST',\n\t});\n"],"mappings":"AAkBA,MAAa,GAEX,EACA,SAEM,CACN,KAAM,SACN,OAAQ,GAAS,EAAE,CACnB,KAAM,KAAK,UAAU,EAAM,CAC3B,OAAQ,OACR,EAUW,GAEX,EACA,SAEM,CACN,KAAM,SACN,OAAQ,GAAS,EAAE,CACnB,KAAM,KAAK,UAAU,EAAK,CAC1B,OAAQ,OACR"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/elements/Logout/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AASzB,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC;IAC5B;;;;OAIG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,CA0BA,CAAA"}

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B zC"},B:{"1":"0 1 2 3 4 5 6 7 8 L M G N O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I","16":"C"},C:{"1":"0 1 2 3 4 5 6 7 8 hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B WC 6B XC 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R YC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I ZC aC OC 1C 2C 3C","2":"9 0C VC J bB K D E F A B C L M G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB 4C 5C"},D:{"1":"0 1 2 3 4 5 6 7 8 oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B WC 6B XC 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I ZC aC OC","2":"9 J bB K D E F A B C L M G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB"},E:{"1":"A B L M G AD cC PC QC BD CD DD dC eC RC ED SC fC gC hC iC jC FD TC kC lC mC nC oC GD UC pC qC rC sC HD tC uC vC wC ID","2":"J bB K D E F 6C bC 7C 8C 9C","129":"C"},F:{"1":"0 1 2 3 4 5 6 7 8 IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R YC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","2":"9 F B C G N O P cB AB BB CB DB EB FB GB HB JD KD LD MD PC xC ND QC"},G:{"1":"TD UD VD WD XD YD aD bD cD dD eD fD gD hD dC eC RC iD SC fC gC hC iC jC jD TC kC lC mC nC oC kD UC pC qC rC sC lD tC uC vC wC","2":"E bC OD yC PD QD RD SD","129":"ZD"},H:{"2":"mD"},I:{"1":"I","2":"VC J nD oD pD qD yC rD sD"},J:{"2":"D A"},K:{"1":"H","2":"A B C PC xC QC"},L:{"1":"I"},M:{"1":"OC"},N:{"2":"A B"},O:{"1":"RC"},P:{"1":"9 J AB BB CB DB EB FB GB HB IB tD uD vD wD xD cC yD zD 0D 1D 2D SC TC UC 3D"},Q:{"1":"4D"},R:{"1":"5D"},S:{"1":"6D 7D"}},B:6,C:"ES6 Template Literals (Template Strings)",D:true};

View File

@@ -0,0 +1 @@
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { InstrumentationConfig } from '@opentelemetry/instrumentation';\n\nexport interface DataloaderInstrumentationConfig extends InstrumentationConfig {\n /**\n * Whether the instrumentation requires a parent span, if set to true\n * and there is no parent span, no additional spans are created\n * (default: true)\n */\n requireParentSpan?: boolean;\n}\n"]}

View File

@@ -0,0 +1,8 @@
@layer payload-default {
.select-row {
&__checkbox {
display: block;
width: min-content;
}
}
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/elements/FolderView/ColoredFolderIcon/index.tsx"],"names":[],"mappings":"AACA,OAAO,cAAc,CAAA;AACrB,wBAAgB,iBAAiB,gCAEhC"}

View File

@@ -0,0 +1,49 @@
import { Client } from '../client';
import { Scope } from '../scope';
import { AsyncContextStrategy } from './types';
interface Layer {
client?: Client;
scope: Scope;
}
/**
* This is an object that holds a stack of scopes.
*/
export declare class AsyncContextStack {
private readonly _stack;
private _isolationScope;
constructor(scope?: Scope, isolationScope?: Scope);
/**
* Fork a scope for the stack.
*/
withScope<T>(callback: (scope: Scope) => T): T;
/**
* Get the client of the stack.
*/
getClient<C extends Client>(): C | undefined;
/**
* Returns the scope of the top stack.
*/
getScope(): Scope;
/**
* Get the isolation scope for the stack.
*/
getIsolationScope(): Scope;
/**
* Returns the topmost scope layer in the order domain > local > process.
*/
getStackTop(): Layer;
/**
* Push a scope to the stack.
*/
private _pushScope;
/**
* Pop a scope from the stack.
*/
private _popScope;
}
/**
* Get the stack-based async context strategy.
*/
export declare function getStackAsyncContextStrategy(): AsyncContextStrategy;
export {};
//# sourceMappingURL=stackStrategy.d.ts.map

View File

@@ -0,0 +1,8 @@
/**
* Returns the best matching date time pattern if a date time skeleton
* pattern is provided with a locale. Follows the Unicode specification:
* https://www.unicode.org/reports/tr35/tr35-dates.html#table-mapping-requested-time-skeletons-to-patterns
* @param skeleton date time skeleton pattern that possibly includes j, J or C
* @param locale
*/
export declare function getBestPattern(skeleton: string, locale: Intl.Locale): string;

View File

@@ -0,0 +1,23 @@
import type { Duration } from 'gel';
import type { ColumnBuilderBaseConfig } from "../../column-builder.cjs";
import type { ColumnBaseConfig } from "../../column.cjs";
import { entityKind } from "../../entity.cjs";
import { GelColumn, GelColumnBuilder } from "./common.cjs";
export type GelDurationBuilderInitial<TName extends string> = GelDurationBuilder<{
name: TName;
dataType: 'duration';
columnType: 'GelDuration';
data: Duration;
driverParam: Duration;
enumValues: undefined;
}>;
export declare class GelDurationBuilder<T extends ColumnBuilderBaseConfig<'duration', 'GelDuration'>> extends GelColumnBuilder<T> {
static readonly [entityKind]: string;
constructor(name: T['name']);
}
export declare class GelDuration<T extends ColumnBaseConfig<'duration', 'GelDuration'>> extends GelColumn<T> {
static readonly [entityKind]: string;
getSQLType(): string;
}
export declare function duration(): GelDurationBuilderInitial<''>;
export declare function duration<TName extends string>(name: TName): GelDurationBuilderInitial<TName>;

View File

@@ -0,0 +1,65 @@
'use strict';
var jsTokens = require('js-tokens').default;
var processEnvRe = /\bprocess\.env\.[_$a-zA-Z][$\w]+\b/;
var spaceOrCommentRe = /^(?:\s|\/[/*])/;
function replace(src, envs) {
if (!processEnvRe.test(src)) {
return src;
}
var out = [];
var purge = envs.some(function(env) {
return env._ && env._.indexOf('purge') !== -1;
});
jsTokens.lastIndex = 0
var parts = src.match(jsTokens);
for (var i = 0; i < parts.length; i++) {
if (parts[i ] === 'process' &&
parts[i + 1] === '.' &&
parts[i + 2] === 'env' &&
parts[i + 3] === '.') {
var prevCodeToken = getAdjacentCodeToken(-1, parts, i);
var nextCodeToken = getAdjacentCodeToken(1, parts, i + 4);
var replacement = getReplacementString(envs, parts[i + 4], purge);
if (prevCodeToken !== '.' &&
nextCodeToken !== '.' &&
nextCodeToken !== '=' &&
typeof replacement === 'string') {
out.push(replacement);
i += 4;
continue;
}
}
out.push(parts[i]);
}
return out.join('');
}
function getAdjacentCodeToken(dir, parts, i) {
while (true) {
var part = parts[i += dir];
if (!spaceOrCommentRe.test(part)) {
return part;
}
}
}
function getReplacementString(envs, name, purge) {
for (var j = 0; j < envs.length; j++) {
var env = envs[j];
if (typeof env[name] !== 'undefined') {
return JSON.stringify(env[name]);
}
}
if (purge) {
return 'undefined';
}
}
module.exports = replace;

View File

@@ -0,0 +1,5 @@
import { APIError } from './APIError.js';
export declare class DuplicateCollection extends APIError {
constructor(propertyName: string, duplicate: string);
}
//# sourceMappingURL=DuplicateCollection.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/preferences/operations/delete.ts"],"sourcesContent":["import type { Document, Where } from '../../types/index.js'\nimport type { PreferenceRequest } from '../types.js'\n\nimport { NotFound } from '../../errors/NotFound.js'\nimport { UnauthorizedError } from '../../errors/UnauthorizedError.js'\nimport { preferencesCollectionSlug } from '../config.js'\n\nexport async function deleteOperation(args: PreferenceRequest): Promise<Document> {\n const {\n key,\n req: { payload },\n req,\n user,\n } = args\n\n if (!user) {\n throw new UnauthorizedError(req.t)\n }\n\n const where: Where = {\n and: [\n { key: { equals: key } },\n { 'user.value': { equals: user.id } },\n { 'user.relationTo': { equals: user.collection } },\n ],\n }\n\n const result = await payload.db.deleteOne({\n collection: preferencesCollectionSlug,\n req,\n where,\n })\n\n if (result) {\n return result\n }\n throw new NotFound(req.t)\n}\n"],"names":["NotFound","UnauthorizedError","preferencesCollectionSlug","deleteOperation","args","key","req","payload","user","t","where","and","equals","id","collection","result","db","deleteOne"],"mappings":"AAGA,SAASA,QAAQ,QAAQ,2BAA0B;AACnD,SAASC,iBAAiB,QAAQ,oCAAmC;AACrE,SAASC,yBAAyB,QAAQ,eAAc;AAExD,OAAO,eAAeC,gBAAgBC,IAAuB;IAC3D,MAAM,EACJC,GAAG,EACHC,KAAK,EAAEC,OAAO,EAAE,EAChBD,GAAG,EACHE,IAAI,EACL,GAAGJ;IAEJ,IAAI,CAACI,MAAM;QACT,MAAM,IAAIP,kBAAkBK,IAAIG,CAAC;IACnC;IAEA,MAAMC,QAAe;QACnBC,KAAK;YACH;gBAAEN,KAAK;oBAAEO,QAAQP;gBAAI;YAAE;YACvB;gBAAE,cAAc;oBAAEO,QAAQJ,KAAKK,EAAE;gBAAC;YAAE;YACpC;gBAAE,mBAAmB;oBAAED,QAAQJ,KAAKM,UAAU;gBAAC;YAAE;SAClD;IACH;IAEA,MAAMC,SAAS,MAAMR,QAAQS,EAAE,CAACC,SAAS,CAAC;QACxCH,YAAYZ;QACZI;QACAI;IACF;IAEA,IAAIK,QAAQ;QACV,OAAOA;IACT;IACA,MAAM,IAAIf,SAASM,IAAIG,CAAC;AAC1B"}

View File

@@ -0,0 +1,17 @@
@import '../../../scss/styles.scss';
@layer payload-default {
.group-by-header {
display: flex;
gap: var(--base);
&__heading {
margin: 0;
flex-grow: 1;
}
.list-selection__actions button {
margin: 0;
}
}
}

View File

@@ -0,0 +1,52 @@
"use strict";
exports.transpose = transpose;
var _index = require("./constructFrom.cjs");
/**
* @name transpose
* @category Generic Helpers
* @summary Transpose the date to the given constructor.
*
* @description
* The function transposes the date to the given constructor. It helps you
* to transpose the date in the system time zone to say `UTCDate` or any other
* date extension.
*
* @typeParam InputDate - The input `Date` type derived from the passed argument.
* @typeParam ResultDate - The result `Date` type derived from the passed constructor.
*
* @param date - The date to use values from
* @param constructor - The date constructor to use
*
* @returns Date transposed to the given constructor
*
* @example
* // Create July 10, 2022 00:00 in locale time zone
* const date = new Date(2022, 6, 10)
* //=> 'Sun Jul 10 2022 00:00:00 GMT+0800 (Singapore Standard Time)'
*
* @example
* // Transpose the date to July 10, 2022 00:00 in UTC
* transpose(date, UTCDate)
* //=> 'Sun Jul 10 2022 00:00:00 GMT+0000 (Coordinated Universal Time)'
*/
function transpose(date, constructor) {
const date_ = isConstructor(constructor)
? new constructor(0)
: (0, _index.constructFrom)(constructor, 0);
date_.setFullYear(date.getFullYear(), date.getMonth(), date.getDate());
date_.setHours(
date.getHours(),
date.getMinutes(),
date.getSeconds(),
date.getMilliseconds(),
);
return date_;
}
function isConstructor(constructor) {
return (
typeof constructor === "function" &&
constructor.prototype?.constructor === constructor
);
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/elements/ViewDescription/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAA;AAGjG,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,MAAM,MAAM,wBAAwB,GAAG,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,CAAA;AAE/D,KAAK,WAAW,GAAG,mBAAmB,GAAG,iBAAiB,GAAG,MAAM,GAAG,wBAAwB,CAAA;AAE9F,wBAAgB,WAAW,CAAC,WAAW,EAAE,WAAW,GAAG,WAAW,IAAI,wBAAwB,CAE7F;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,0BAA0B,qBAShE"}

View File

@@ -0,0 +1,70 @@
(function () {
if (typeof Prism === 'undefined') {
return;
}
Prism.languages.treeview = {
'treeview-part': {
pattern: /^.+/m,
inside: {
'entry-line': [
{
pattern: /\|-- |├── /,
alias: 'line-h'
},
{
pattern: /\| {3}|│ {3}/,
alias: 'line-v'
},
{
pattern: /`-- |└── /,
alias: 'line-v-last'
},
{
pattern: / {4}/,
alias: 'line-v-gap'
}
],
'entry-name': {
pattern: /.*\S.*/,
inside: {
// symlink
'operator': / -> /,
}
}
}
}
};
Prism.hooks.add('wrap', function (env) {
if (env.language === 'treeview' && env.type === 'entry-name') {
var classes = env.classes;
var folderPattern = /(^|[^\\])\/\s*$/;
if (folderPattern.test(env.content)) {
// folder
// remove trailing /
env.content = env.content.replace(folderPattern, '$1');
classes.push('dir');
} else {
// file
// remove trailing file marker
env.content = env.content.replace(/(^|[^\\])[=*|]\s*$/, '$1');
var parts = env.content.toLowerCase().replace(/\s+/g, '').split('.');
while (parts.length > 1) {
parts.shift();
// Ex. 'foo.min.js' would become '<span class="token keyword ext-min-js ext-js">foo.min.js</span>'
classes.push('ext-' + parts.join('-'));
}
}
if (env.content[0] === '.') {
classes.push('dotfile');
}
}
});
}());

View File

@@ -0,0 +1,47 @@
import type { Breadcrumb } from '@sentry/core';
import type { RecordingEvent, ReplayClickDetector, ReplayContainer, SlowClickConfig } from '../types';
import { addBreadcrumbEvent } from './util/addBreadcrumbEvent';
/** Handle a click. */
export declare function handleClick(clickDetector: ReplayClickDetector, clickBreadcrumb: Breadcrumb, node: HTMLElement): void;
/** A click detector class that can be used to detect slow or rage clicks on elements. */
export declare class ClickDetector implements ReplayClickDetector {
protected _lastMutation: number;
protected _lastScroll: number;
private _clicks;
private _teardown;
private _threshold;
private _scrollTimeout;
private _timeout;
private _ignoreSelector;
private _replay;
private _checkClickTimeout?;
private _addBreadcrumbEvent;
constructor(replay: ReplayContainer, slowClickConfig: SlowClickConfig, _addBreadcrumbEvent?: typeof addBreadcrumbEvent);
/** Register click detection handlers on mutation or scroll. */
addListeners(): void;
/** Clean up listeners. */
removeListeners(): void;
/** @inheritDoc */
handleClick(breadcrumb: Breadcrumb, node: HTMLElement): void;
/** @inheritDoc */
registerMutation(timestamp?: number): void;
/** @inheritDoc */
registerScroll(timestamp?: number): void;
/** @inheritDoc */
registerClick(element: HTMLElement): void;
/** Count multiple clicks on elements. */
private _handleMultiClick;
/** Get all pending clicks for a given node. */
private _getClicks;
/** Check the clicks that happened. */
private _checkClicks;
/** Generate matching breadcrumb(s) for the click. */
private _generateBreadcrumbs;
/** Schedule to check current clicks. */
private _scheduleCheckClicks;
}
/** exported for tests only */
export declare function ignoreElement(node: HTMLElement, ignoreSelector: string): boolean;
/** Update the click detector based on a recording event of rrweb. */
export declare function updateClickDetectorForRecordingEvent(clickDetector: ReplayClickDetector, event: RecordingEvent): void;
//# sourceMappingURL=handleClick.d.ts.map

View File

@@ -0,0 +1,9 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
import{$isLinkNode as e,LinkNode as t,AutoLinkNode as n}from"@lexical/link";import{useLexicalComposerContext as o}from"@lexical/react/LexicalComposerContext";import{MenuOption as r,LexicalNodeMenuPlugin as i}from"@lexical/react/LexicalNodeMenuPlugin";import{mergeRegister as l}from"@lexical/utils";import{createCommand as s,$getNodeByKey as a,COMMAND_PRIORITY_EDITOR as c,$getSelection as u,COMMAND_PRIORITY_LOW as m,PASTE_TAG as d}from"lexical";import{useState as p,useCallback as f,useEffect as x,useMemo as g}from"react";import{jsx as w}from"react/jsx-runtime";const C=/((https?:\/\/(www\.)?)|(www\.))[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/,y=s("INSERT_EMBED_COMMAND");class E extends r{constructor(e,t){super(e),this.title=e,this.onSelect=t.onSelect.bind(this)}}function M({embedConfigs:r,onOpenEmbedModalForConfig:s,getMenuOptions:C,menuRenderFn:E,menuCommandPriority:M=m}){const[S]=o(),[h,_]=p(null),[v,z]=p(null),A=f((()=>{_(null),z(null)}),[]),L=f((async t=>{const n=S.getEditorState().read((function(){const n=a(t);if(e(n))return n.getURL()}));if(void 0!==n)for(const e of r){null!=await Promise.resolve(e.parseUrl(n))&&(z(e),_(t))}}),[S,r]);x((()=>l(...[t,n].map((e=>S.registerMutationListener(e,((...e)=>((e,{updateTags:t,dirtyLeaves:n})=>{for(const[o,r]of e)"created"===r&&t.has(d)&&n.size<=3?L(o):o===h&&A()})(...e)),{skipInitialization:!0}))))),[L,S,r,h,A]),x((()=>S.registerCommand(y,(e=>{const t=r.find((({type:t})=>t===e));return!!t&&(s(t),!0)}),c)),[S,r,s]);const P=f((async function(){if(null!=v&&null!=h){const t=S.getEditorState().read((()=>{const t=a(h);return e(t)?t:null}));if(e(t)){const e=await Promise.resolve(v.parseUrl(t.__url));null!=e&&S.update((()=>{u()||t.selectEnd(),v.insertNode(S,e),t.isAttached()&&t.remove()}))}}}),[v,S,h]),b=g((()=>null!=v&&null!=h?C(v,P,A):[]),[v,P,C,h,A]),N=f(((e,t,n)=>{S.update((()=>{e.onSelect(t),n()}))}),[S]);return null!=h?w(i,{nodeKey:h,onClose:A,onSelectOption:N,options:b,menuRenderFn:E,commandPriority:M}):null}export{E as AutoEmbedOption,y as INSERT_EMBED_COMMAND,M as LexicalAutoEmbedPlugin,C as URL_MATCHER};

View File

@@ -0,0 +1,30 @@
import { DirectusFile } from "../../../schema/file.js";
import { NestedPartial } from "../../../types/utils.js";
import { ApplyQueryFields } from "../../../types/output.js";
import { Query } from "../../../types/query.js";
import { RestCommand } from "../../types.js";
//#region src/rest/commands/create/files.d.ts
type CreateFileOutput<Schema, TQuery extends Query<Schema, Item>, Item extends object = DirectusFile<Schema>> = ApplyQueryFields<Schema, Item, TQuery['fields']>;
/**
* Upload/create a new file.
*
* @param data Formdata object
* @param query The query parameters
*
* @returns Returns the file object for the uploaded file, or an array of file objects if multiple files were uploaded at once.
*/
declare const uploadFiles: <Schema, const TQuery extends Query<Schema, DirectusFile<Schema>>>(data: FormData, query?: TQuery) => RestCommand<CreateFileOutput<Schema, TQuery>, Schema>;
/**
* Import a file from the web
*
* @param url The url to import the file from
* @param data Formdata object
* @param query The query parameters
*
* @returns Returns the file object for the imported file.
*/
declare const importFile: <Schema, TQuery extends Query<Schema, DirectusFile<Schema>>>(url: string, data?: NestedPartial<DirectusFile<Schema>>, query?: TQuery) => RestCommand<CreateFileOutput<Schema, TQuery>, Schema>;
//#endregion
export { CreateFileOutput, importFile, uploadFiles };
//# sourceMappingURL=files.d.ts.map

View File

@@ -0,0 +1,27 @@
import { entityKind } from "../../entity.js";
import { GelColumn, GelColumnBuilder } from "./common.js";
class GelDurationBuilder extends GelColumnBuilder {
static [entityKind] = "GelDurationBuilder";
constructor(name) {
super(name, "duration", "GelDuration");
}
/** @internal */
build(table) {
return new GelDuration(table, this.config);
}
}
class GelDuration extends GelColumn {
static [entityKind] = "GelDuration";
getSQLType() {
return `duration`;
}
}
function duration(name) {
return new GelDurationBuilder(name ?? "");
}
export {
GelDuration,
GelDurationBuilder,
duration
};
//# sourceMappingURL=duration.js.map

View File

@@ -0,0 +1,59 @@
import { observe } from '../observe.js';
/*
* Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
let interactionCountEstimate = 0;
let minKnownInteractionId = Infinity;
let maxKnownInteractionId = 0;
const updateEstimate = (entries) => {
entries.forEach(e => {
if (e.interactionId) {
minKnownInteractionId = Math.min(minKnownInteractionId, e.interactionId);
maxKnownInteractionId = Math.max(maxKnownInteractionId, e.interactionId);
interactionCountEstimate = maxKnownInteractionId ? (maxKnownInteractionId - minKnownInteractionId) / 7 + 1 : 0;
}
});
};
let po;
/**
* Returns the `interactionCount` value using the native API (if available)
* or the polyfill estimate in this module.
*/
const getInteractionCount = () => {
return po ? interactionCountEstimate : performance.interactionCount || 0;
};
/**
* Feature detects native support or initializes the polyfill if needed.
*/
const initInteractionCountPolyfill = () => {
if ('interactionCount' in performance || po) return;
po = observe('event', updateEstimate, {
type: 'event',
buffered: true,
durationThreshold: 0,
} );
};
export { getInteractionCount, initInteractionCountPolyfill };
//# sourceMappingURL=interactionCountPolyfill.js.map

View File

@@ -0,0 +1,94 @@
import { expect, expectTypeOf, test } from "vitest";
import * as z from "zod/v4";
test("function parsing", () => {
const schema = z.union([z.string().refine(() => false), z.number().refine(() => false)]);
const result = schema.safeParse("asdf");
expect(result.success).toEqual(false);
});
test("union 2", () => {
const result = z.union([z.number(), z.string().refine(() => false)]).safeParse("a");
expect(result.success).toEqual(false);
});
test("return valid over invalid", () => {
const schema = z.union([
z.object({
email: z.string().email(),
}),
z.string(),
]);
expect(schema.parse("asdf")).toEqual("asdf");
expect(schema.parse({ email: "asdlkjf@lkajsdf.com" })).toEqual({
email: "asdlkjf@lkajsdf.com",
});
});
test("return errors from both union arms", () => {
const result = z.union([z.number(), z.string().refine(() => false)]).safeParse("a");
expect(result.success).toEqual(false);
if (!result.success) {
expect(result.error.issues).toMatchInlineSnapshot(`
[
{
"code": "invalid_union",
"errors": [
[
{
"code": "invalid_type",
"expected": "number",
"message": "Invalid input: expected number, received string",
"path": [],
},
],
[
{
"code": "custom",
"message": "Invalid input",
"path": [],
},
],
],
"message": "Invalid input",
"path": [],
},
]
`);
}
});
test("options getter", async () => {
const union = z.union([z.string(), z.number()]);
union.options[0].parse("asdf");
union.options[1].parse(1234);
await union.options[0].parseAsync("asdf");
await union.options[1].parseAsync(1234);
});
test("readonly union", async () => {
const options = [z.string(), z.number()] as const;
const union = z.union(options);
union.parse("asdf");
union.parse(12);
});
test("union inferred types", () => {
const test = z.object({}).or(z.array(z.object({})));
type Test = z.output<typeof test>; // <— any
expectTypeOf<Test>().toEqualTypeOf<Record<string, never> | Array<Record<string, never>>>();
});
test("union values", () => {
const schema = z.union([z.literal("a"), z.literal("b"), z.literal("c")]);
expect(schema._zod.values).toMatchInlineSnapshot(`
Set {
"a",
"b",
"c",
}
`);
});

View File

@@ -0,0 +1,80 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var useStateManager = require('./useStateManager-7748b351.cjs.dev.js');
var _extends = require('@babel/runtime/helpers/extends');
var React = require('react');
var Select = require('./Select-7eb2ef56.cjs.dev.js');
var react = require('@emotion/react');
var createCache = require('@emotion/cache');
var index = require('./index-42b266b1.cjs.dev.js');
require('@babel/runtime/helpers/objectSpread2');
require('@babel/runtime/helpers/slicedToArray');
require('@babel/runtime/helpers/objectWithoutProperties');
require('@babel/runtime/helpers/classCallCheck');
require('@babel/runtime/helpers/createClass');
require('@babel/runtime/helpers/inherits');
require('@babel/runtime/helpers/createSuper');
require('@babel/runtime/helpers/toConsumableArray');
require('memoize-one');
require('@babel/runtime/helpers/typeof');
require('@babel/runtime/helpers/taggedTemplateLiteral');
require('@babel/runtime/helpers/defineProperty');
require('react-dom');
require('@floating-ui/dom');
require('use-isomorphic-layout-effect');
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
function _interopNamespace(e) {
if (e && e.__esModule) return e;
var n = Object.create(null);
if (e) {
Object.keys(e).forEach(function (k) {
if (k !== 'default') {
var d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: function () { return e[k]; }
});
}
});
}
n["default"] = e;
return Object.freeze(n);
}
var React__namespace = /*#__PURE__*/_interopNamespace(React);
var createCache__default = /*#__PURE__*/_interopDefault(createCache);
var StateManagedSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
var baseSelectProps = useStateManager.useStateManager(props);
return /*#__PURE__*/React__namespace.createElement(Select.Select, _extends({
ref: ref
}, baseSelectProps));
});
var StateManagedSelect$1 = StateManagedSelect;
var NonceProvider = (function (_ref) {
var nonce = _ref.nonce,
children = _ref.children,
cacheKey = _ref.cacheKey;
var emotionCache = React.useMemo(function () {
return createCache__default["default"]({
key: cacheKey,
nonce: nonce
});
}, [cacheKey, nonce]);
return /*#__PURE__*/React__namespace.createElement(react.CacheProvider, {
value: emotionCache
}, children);
});
exports.useStateManager = useStateManager.useStateManager;
exports.createFilter = Select.createFilter;
exports.defaultTheme = Select.defaultTheme;
exports.mergeStyles = Select.mergeStyles;
exports.components = index.components;
exports.NonceProvider = NonceProvider;
exports["default"] = StateManagedSelect$1;

View File

@@ -0,0 +1,61 @@
'use client';
import { c as _c } from "react/compiler-runtime";
import { jsx as _jsx } from "react/jsx-runtime";
import { useNav } from '@payloadcms/ui';
import React from 'react';
/**
* @internal
*/
export const NavWrapper = props => {
const $ = _c(11);
const {
baseClass,
children
} = props;
const {
hydrated,
navOpen,
navRef,
shouldAnimate
} = useNav();
const t0 = navOpen && `${baseClass}--nav-open`;
const t1 = shouldAnimate && `${baseClass}--nav-animate`;
const t2 = hydrated && `${baseClass}--nav-hydrated`;
let t3;
if ($[0] !== baseClass || $[1] !== t0 || $[2] !== t1 || $[3] !== t2) {
t3 = [baseClass, t0, t1, t2].filter(Boolean);
$[0] = baseClass;
$[1] = t0;
$[2] = t1;
$[3] = t2;
$[4] = t3;
} else {
t3 = $[4];
}
const t4 = t3.join(" ");
const t5 = !navOpen ? true : undefined;
const t6 = `${baseClass}__scroll`;
let t7;
if ($[5] !== children || $[6] !== navRef || $[7] !== t4 || $[8] !== t5 || $[9] !== t6) {
t7 = _jsx("aside", {
className: t4,
inert: t5,
children: _jsx("div", {
className: t6,
ref: navRef,
children
})
});
$[5] = children;
$[6] = navRef;
$[7] = t4;
$[8] = t5;
$[9] = t6;
$[10] = t7;
} else {
t7 = $[10];
}
return t7;
};
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,140 @@
import { Worker } from 'node:worker_threads';
import { defineIntegration, debug } from '@sentry/core';
import { isDebuggerEnabled } from '../../utils/debug.js';
import { LOCAL_VARIABLES_KEY, functionNamesMatch } from './common.js';
// This string is a placeholder that gets overwritten with the worker code.
const base64WorkerScript = 'LyohIEBzZW50cnkvbm9kZS1jb3JlIDEwLjM5LjAgKGFiNTRjNWMpIHwgaHR0cHM6Ly9naXRodWIuY29tL2dldHNlbnRyeS9zZW50cnktamF2YXNjcmlwdCAqLwppbXBvcnR7U2Vzc2lvbiBhcyBlfWZyb20ibm9kZTppbnNwZWN0b3IvcHJvbWlzZXMiO2ltcG9ydHt3b3JrZXJEYXRhIGFzIHR9ZnJvbSJub2RlOndvcmtlcl90aHJlYWRzIjtjb25zdCBuPWdsb2JhbFRoaXMsaT17fTtjb25zdCBvPSJfX1NFTlRSWV9FUlJPUl9MT0NBTF9WQVJJQUJMRVNfXyI7Y29uc3QgYT10O2Z1bmN0aW9uIHMoLi4uZSl7YS5kZWJ1ZyYmZnVuY3Rpb24oZSl7aWYoISgiY29uc29sZSJpbiBuKSlyZXR1cm4gZSgpO2NvbnN0IHQ9bi5jb25zb2xlLG89e30sYT1PYmplY3Qua2V5cyhpKTthLmZvckVhY2goZT0+e2NvbnN0IG49aVtlXTtvW2VdPXRbZV0sdFtlXT1ufSk7dHJ5e3JldHVybiBlKCl9ZmluYWxseXthLmZvckVhY2goZT0+e3RbZV09b1tlXX0pfX0oKCk9PmNvbnNvbGUubG9nKCJbTG9jYWxWYXJpYWJsZXMgV29ya2VyXSIsLi4uZSkpfWFzeW5jIGZ1bmN0aW9uIGMoZSx0LG4saSl7Y29uc3Qgbz1hd2FpdCBlLnBvc3QoIlJ1bnRpbWUuZ2V0UHJvcGVydGllcyIse29iamVjdElkOnQsb3duUHJvcGVydGllczohMH0pO2lbbl09by5yZXN1bHQuZmlsdGVyKGU9PiJsZW5ndGgiIT09ZS5uYW1lJiYhaXNOYU4ocGFyc2VJbnQoZS5uYW1lLDEwKSkpLnNvcnQoKGUsdCk9PnBhcnNlSW50KGUubmFtZSwxMCktcGFyc2VJbnQodC5uYW1lLDEwKSkubWFwKGU9PmUudmFsdWU/LnZhbHVlKX1hc3luYyBmdW5jdGlvbiByKGUsdCxuLGkpe2NvbnN0IG89YXdhaXQgZS5wb3N0KCJSdW50aW1lLmdldFByb3BlcnRpZXMiLHtvYmplY3RJZDp0LG93blByb3BlcnRpZXM6ITB9KTtpW25dPW8ucmVzdWx0Lm1hcChlPT5bZS5uYW1lLGUudmFsdWU/LnZhbHVlXSkucmVkdWNlKChlLFt0LG5dKT0+KGVbdF09bixlKSx7fSl9ZnVuY3Rpb24gdShlLHQpe2UudmFsdWUmJigidmFsdWUiaW4gZS52YWx1ZT92b2lkIDA9PT1lLnZhbHVlLnZhbHVlfHxudWxsPT09ZS52YWx1ZS52YWx1ZT90W2UubmFtZV09YDwke2UudmFsdWUudmFsdWV9PmA6dFtlLm5hbWVdPWUudmFsdWUudmFsdWU6ImRlc2NyaXB0aW9uImluIGUudmFsdWUmJiJmdW5jdGlvbiIhPT1lLnZhbHVlLnR5cGU/dFtlLm5hbWVdPWA8JHtlLnZhbHVlLmRlc2NyaXB0aW9ufT5gOiJ1bmRlZmluZWQiPT09ZS52YWx1ZS50eXBlJiYodFtlLm5hbWVdPSI8dW5kZWZpbmVkPiIpKX1hc3luYyBmdW5jdGlvbiBsKGUsdCl7Y29uc3Qgbj1hd2FpdCBlLnBvc3QoIlJ1bnRpbWUuZ2V0UHJvcGVydGllcyIse29iamVjdElkOnQsb3duUHJvcGVydGllczohMH0pLGk9e307Zm9yKGNvbnN0IHQgb2Ygbi5yZXN1bHQpaWYodC52YWx1ZT8ub2JqZWN0SWQmJiJBcnJheSI9PT10LnZhbHVlLmNsYXNzTmFtZSl7Y29uc3Qgbj10LnZhbHVlLm9iamVjdElkO2F3YWl0IGMoZSxuLHQubmFtZSxpKX1lbHNlIGlmKHQudmFsdWU/Lm9iamVjdElkJiYiT2JqZWN0Ij09PXQudmFsdWUuY2xhc3NOYW1lKXtjb25zdCBuPXQudmFsdWUub2JqZWN0SWQ7YXdhaXQgcihlLG4sdC5uYW1lLGkpfWVsc2UgdC52YWx1ZSYmdSh0LGkpO3JldHVybiBpfWxldCBmOyhhc3luYyBmdW5jdGlvbigpe2NvbnN0IHQ9bmV3IGU7dC5jb25uZWN0VG9NYWluVGhyZWFkKCkscygiQ29ubmVjdGVkIHRvIG1haW4gdGhyZWFkIik7bGV0IG49ITE7dC5vbigiRGVidWdnZXIucmVzdW1lZCIsKCk9PntuPSExfSksdC5vbigiRGVidWdnZXIucGF1c2VkIixlPT57bj0hMCxhc3luYyBmdW5jdGlvbihlLHtyZWFzb246dCxkYXRhOntvYmplY3RJZDpufSxjYWxsRnJhbWVzOml9KXtpZigiZXhjZXB0aW9uIiE9PXQmJiJwcm9taXNlUmVqZWN0aW9uIiE9PXQpcmV0dXJuO2lmKGY/LigpLG51bGw9PW4pcmV0dXJuO2NvbnN0IGE9W107Zm9yKGxldCB0PTA7dDxpLmxlbmd0aDt0Kyspe2NvbnN0e3Njb3BlQ2hhaW46bixmdW5jdGlvbk5hbWU6byx0aGlzOnN9PWlbdF0sYz1uLmZpbmQoZT0+ImxvY2FsIj09PWUudHlwZSkscj0iZ2xvYmFsIiE9PXMuY2xhc3NOYW1lJiZzLmNsYXNzTmFtZT9gJHtzLmNsYXNzTmFtZX0uJHtvfWA6bztpZih2b2lkIDA9PT1jPy5vYmplY3Qub2JqZWN0SWQpYVt0XT17ZnVuY3Rpb246cn07ZWxzZXtjb25zdCBuPWF3YWl0IGwoZSxjLm9iamVjdC5vYmplY3RJZCk7YVt0XT17ZnVuY3Rpb246cix2YXJzOm59fX1hd2FpdCBlLnBvc3QoIlJ1bnRpbWUuY2FsbEZ1bmN0aW9uT24iLHtmdW5jdGlvbkRlY2xhcmF0aW9uOmBmdW5jdGlvbigpIHsgdGhpcy4ke299ID0gdGhpcy4ke299IHx8ICR7SlNPTi5zdHJpbmdpZnkoYSl9OyB9YCxzaWxlbnQ6ITAsb2JqZWN0SWQ6bn0pLGF3YWl0IGUucG9zdCgiUnVudGltZS5yZWxlYXNlT2JqZWN0Iix7b2JqZWN0SWQ6bn0pfSh0LGUucGFyYW1zKS50aGVuKGFzeW5jKCk9PntuJiZhd2FpdCB0LnBvc3QoIkRlYnVnZ2VyLnJlc3VtZSIpfSxhc3luYyBlPT57biYmYXdhaXQgdC5wb3N0KCJEZWJ1Z2dlci5yZXN1bWUiKX0pfSksYXdhaXQgdC5wb3N0KCJEZWJ1Z2dlci5lbmFibGUiKTtjb25zdCBpPSExIT09YS5jYXB0dXJlQWxsRXhjZXB0aW9ucztpZihhd2FpdCB0LnBvc3QoIkRlYnVnZ2VyLnNldFBhdXNlT25FeGNlcHRpb25zIix7c3RhdGU6aT8iYWxsIjoidW5jYXVnaHQifSksaSl7Y29uc3QgZT1hLm1heEV4Y2VwdGlvbnNQZXJTZWNvbmR8fDUwO2Y9ZnVuY3Rpb24oZSx0LG4pe2xldCBpPTAsbz01LGE9MDtyZXR1cm4gc2V0SW50ZXJ2YWwoKCk9PnswPT09YT9pPmUmJihvKj0yLG4obyksbz44NjQwMCYmKG89ODY0MDApLGE9byk6KGEtPTEsMD09PWEmJnQoKSksaT0wfSwxZTMpLnVucmVmKCksKCk9PntpKz0xfX0oZSxhc3luYygpPT57cygiUmF0ZS1saW1pdCBsaWZ0ZWQuIiksYXdhaXQgdC5wb3N0KCJEZWJ1Z2dlci5zZXRQYXVzZU9uRXhjZXB0aW9ucyIse3N0YXRlOiJhbGwifSl9LGFzeW5jIGU9PntzKGBSYXRlLWxpbWl0IGV4Y2VlZGVkLiBEaXNhYmxpbmcgY2FwdHVyaW5nIG9mIGNhdWdodCBleGNlcHRpb25zIGZvciAke2V9IHNlY29uZHMuYCksYXdhaXQgdC5wb3N0KCJEZWJ1Z2dlci5zZXRQYXVzZU9uRXhjZXB0aW9ucyIse3N0YXRlOiJ1bmNhdWdodCJ9KX0pfX0pKCkuY2F0Y2goZT0+e3MoIkZhaWxlZCB0byBzdGFydCBkZWJ1Z2dlciIsZSl9KSxzZXRJbnRlcnZhbCgoKT0+e30sMWU0KTs=';
function log(...args) {
debug.log('[LocalVariables]', ...args);
}
/**
* Adds local variables to exception frames
*/
const localVariablesAsyncIntegration = defineIntegration(((
integrationOptions = {},
) => {
function addLocalVariablesToException(exception, localVariables) {
// Filter out frames where the function name is `new Promise` since these are in the error.stack frames
// but do not appear in the debugger call frames
const frames = (exception.stacktrace?.frames || []).filter(frame => frame.function !== 'new Promise');
for (let i = 0; i < frames.length; i++) {
// Sentry frames are in reverse order
const frameIndex = frames.length - i - 1;
const frameLocalVariables = localVariables[i];
const frame = frames[frameIndex];
if (!frame || !frameLocalVariables) {
// Drop out if we run out of frames to match up
break;
}
if (
// We need to have vars to add
frameLocalVariables.vars === undefined ||
// Only skip out-of-app frames if includeOutOfAppFrames is not true
(frame.in_app === false && integrationOptions.includeOutOfAppFrames !== true) ||
// The function names need to match
!functionNamesMatch(frame.function, frameLocalVariables.function)
) {
continue;
}
frame.vars = frameLocalVariables.vars;
}
}
function addLocalVariablesToEvent(event, hint) {
if (
hint.originalException &&
typeof hint.originalException === 'object' &&
LOCAL_VARIABLES_KEY in hint.originalException &&
Array.isArray(hint.originalException[LOCAL_VARIABLES_KEY])
) {
for (const exception of event.exception?.values || []) {
addLocalVariablesToException(exception, hint.originalException[LOCAL_VARIABLES_KEY]);
}
hint.originalException[LOCAL_VARIABLES_KEY] = undefined;
}
return event;
}
async function startInspector() {
// We load inspector dynamically because on some platforms Node is built without inspector support
const inspector = await import('node:inspector');
if (!inspector.url()) {
inspector.open(0);
}
}
function startWorker(options) {
const worker = new Worker(new URL(`data:application/javascript;base64,${base64WorkerScript}`), {
workerData: options,
// We don't want any Node args to be passed to the worker
execArgv: [],
env: { ...process.env, NODE_OPTIONS: undefined },
});
process.on('exit', () => {
// eslint-disable-next-line @typescript-eslint/no-floating-promises
worker.terminate();
});
worker.once('error', (err) => {
log('Worker error', err);
});
worker.once('exit', (code) => {
log('Worker exit', code);
});
// Ensure this thread can't block app exit
worker.unref();
}
return {
name: 'LocalVariablesAsync',
async setup(client) {
const clientOptions = client.getOptions();
if (!clientOptions.includeLocalVariables) {
return;
}
if (await isDebuggerEnabled()) {
debug.warn('Local variables capture has been disabled because the debugger was already enabled');
return;
}
const options = {
...integrationOptions,
debug: debug.isEnabled(),
};
startInspector().then(
() => {
try {
startWorker(options);
} catch (e) {
debug.error('Failed to start worker', e);
}
},
e => {
debug.error('Failed to start inspector', e);
},
);
},
processEvent(event, hint) {
return addLocalVariablesToEvent(event, hint);
},
};
}) );
export { base64WorkerScript, localVariablesAsyncIntegration };
//# sourceMappingURL=local-variables-async.js.map

View File

@@ -0,0 +1,8 @@
// This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
import { isWithinInterval as fn } from "../isWithinInterval.mjs";
import { convertToFP } from "./_lib/convertToFP.mjs";
export const isWithinInterval = convertToFP(fn, 2);
// Fallback for modularized imports:
export default isWithinInterval;

View File

@@ -0,0 +1,42 @@
import canUseDOM from './canUseDOM';
/* https://github.com/component/raf */
var prev = new Date().getTime();
function fallback(fn) {
var curr = new Date().getTime();
var ms = Math.max(0, 16 - (curr - prev));
var handle = setTimeout(fn, ms);
prev = curr;
return handle;
}
var vendors = ['', 'webkit', 'moz', 'o', 'ms'];
var cancelMethod = 'clearTimeout';
var rafImpl = fallback; // eslint-disable-next-line import/no-mutable-exports
var getKey = function getKey(vendor, k) {
return vendor + (!vendor ? k : k[0].toUpperCase() + k.substr(1)) + "AnimationFrame";
};
if (canUseDOM) {
vendors.some(function (vendor) {
var rafMethod = getKey(vendor, 'request');
if (rafMethod in window) {
cancelMethod = getKey(vendor, 'cancel'); // @ts-ignore
rafImpl = function rafImpl(cb) {
return window[rafMethod](cb);
};
}
return !!rafImpl;
});
}
export var cancel = function cancel(id) {
// @ts-ignore
if (typeof window[cancelMethod] === 'function') window[cancelMethod](id);
};
export var request = rafImpl;

View File

@@ -0,0 +1,21 @@
import { CosmiconfigResult, ExplorerOptions, ExplorerOptionsSync, Cache, LoadedFileContent } from './types';
import { Loader } from './index';
declare class ExplorerBase<T extends ExplorerOptions | ExplorerOptionsSync> {
protected readonly loadCache?: Cache;
protected readonly searchCache?: Cache;
protected readonly config: T;
constructor(options: T);
clearLoadCache(): void;
clearSearchCache(): void;
clearCaches(): void;
private validateConfig;
protected shouldSearchStopWithResult(result: CosmiconfigResult): boolean;
protected nextDirectoryToSearch(currentDir: string, currentResult: CosmiconfigResult): string | null;
private loadPackageProp;
protected getLoaderEntryForFile(filepath: string): Loader;
protected loadedContentToCosmiconfigResult(filepath: string, loadedContent: LoadedFileContent): CosmiconfigResult;
protected validateFilePath(filepath: string): void;
}
declare function getExtensionDescription(filepath: string): string;
export { ExplorerBase, getExtensionDescription };
//# sourceMappingURL=ExplorerBase.d.ts.map

View File

@@ -0,0 +1,2 @@
import { extendWith } from "./index";
export = extendWith;

View File

@@ -0,0 +1,21 @@
import type { KeyLike } from '../types';
export interface GenerateSecretOptions {
/**
* (Only effective in Web Crypto API runtimes) The value to use as
* {@link !SubtleCrypto.generateKey} `extractable` argument. Default is false.
*/
extractable?: boolean;
}
/**
* Generates a symmetric secret key for a given JWA algorithm identifier.
*
* Note: Under Web Crypto API runtime the secret key is generated with `extractable` set to `false`
* by default.
*
* This function is exported (as a named export) from the main `'jose'` module entry point as well
* as from its subpath export `'jose/generate/secret'`.
*
* @param alg JWA Algorithm Identifier to be used with the generated secret.
* @param options Additional options passed down to the secret generation.
*/
export declare function generateSecret<KeyLikeType extends KeyLike = KeyLike>(alg: string, options?: GenerateSecretOptions): Promise<KeyLikeType | Uint8Array>;

View File

@@ -0,0 +1,7 @@
var classApplyDescriptorGet = require("./classApplyDescriptorGet.js");
var assertClassBrand = require("./assertClassBrand.js");
var classCheckPrivateStaticFieldDescriptor = require("./classCheckPrivateStaticFieldDescriptor.js");
function _classStaticPrivateFieldSpecGet(t, s, r) {
return assertClassBrand(s, t), classCheckPrivateStaticFieldDescriptor(r, "get"), classApplyDescriptorGet(t, r);
}
module.exports = _classStaticPrivateFieldSpecGet, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -0,0 +1,78 @@
import { type Cache } from "../cache/core/cache.js";
import type { WithCacheConfig } from "../cache/core/types.js";
import { entityKind } from "../entity.js";
import type { RelationalSchemaConfig, TablesRelationalConfig } from "../relations.js";
import { type Query, type SQL } from "../sql/sql.js";
import type { Assume, Equal } from "../utils.js";
import { SingleStoreDatabase } from "./db.js";
import type { SingleStoreDialect } from "./dialect.js";
import type { SelectedFieldsOrdered } from "./query-builders/select.types.js";
export interface SingleStoreQueryResultHKT {
readonly $brand: 'SingleStoreQueryResultHKT';
readonly row: unknown;
readonly type: unknown;
}
export interface AnySingleStoreQueryResultHKT extends SingleStoreQueryResultHKT {
readonly type: any;
}
export type SingleStoreQueryResultKind<TKind extends SingleStoreQueryResultHKT, TRow> = (TKind & {
readonly row: TRow;
})['type'];
export interface SingleStorePreparedQueryConfig {
execute: unknown;
iterator: unknown;
}
export interface SingleStorePreparedQueryHKT {
readonly $brand: 'SingleStorePreparedQueryHKT';
readonly config: unknown;
readonly type: unknown;
}
export type PreparedQueryKind<TKind extends SingleStorePreparedQueryHKT, TConfig extends SingleStorePreparedQueryConfig, TAssume extends boolean = false> = Equal<TAssume, true> extends true ? Assume<(TKind & {
readonly config: TConfig;
})['type'], SingleStorePreparedQuery<TConfig>> : (TKind & {
readonly config: TConfig;
})['type'];
export declare abstract class SingleStorePreparedQuery<T extends SingleStorePreparedQueryConfig> {
private cache?;
private queryMetadata?;
private cacheConfig?;
static readonly [entityKind]: string;
constructor(cache?: Cache | undefined, queryMetadata?: {
type: 'select' | 'update' | 'delete' | 'insert';
tables: string[];
} | undefined, cacheConfig?: WithCacheConfig | undefined);
abstract execute(placeholderValues?: Record<string, unknown>): Promise<T['execute']>;
abstract iterator(placeholderValues?: Record<string, unknown>): AsyncGenerator<T['iterator']>;
}
export interface SingleStoreTransactionConfig {
withConsistentSnapshot?: boolean;
accessMode?: 'read only' | 'read write';
isolationLevel: 'read committed';
}
export declare abstract class SingleStoreSession<TQueryResult extends SingleStoreQueryResultHKT = SingleStoreQueryResultHKT, TPreparedQueryHKT extends PreparedQueryHKTBase = PreparedQueryHKTBase, TFullSchema extends Record<string, unknown> = Record<string, never>, TSchema extends TablesRelationalConfig = Record<string, never>> {
protected dialect: SingleStoreDialect;
static readonly [entityKind]: string;
constructor(dialect: SingleStoreDialect);
abstract prepareQuery<T extends SingleStorePreparedQueryConfig, TPreparedQueryHKT extends SingleStorePreparedQueryHKT>(query: Query, fields: SelectedFieldsOrdered | undefined, customResultMapper?: (rows: unknown[][]) => T['execute'], generatedIds?: Record<string, unknown>[], returningIds?: SelectedFieldsOrdered, queryMetadata?: {
type: 'select' | 'update' | 'delete' | 'insert';
tables: string[];
}, cacheConfig?: WithCacheConfig): PreparedQueryKind<TPreparedQueryHKT, T>;
execute<T>(query: SQL): Promise<T>;
abstract all<T = unknown>(query: SQL): Promise<T[]>;
count(sql: SQL): Promise<number>;
abstract transaction<T>(transaction: (tx: SingleStoreTransaction<TQueryResult, TPreparedQueryHKT, TFullSchema, TSchema>) => Promise<T>, config?: SingleStoreTransactionConfig): Promise<T>;
protected getSetTransactionSQL(config: SingleStoreTransactionConfig): SQL | undefined;
protected getStartTransactionSQL(config: SingleStoreTransactionConfig): SQL | undefined;
}
export declare abstract class SingleStoreTransaction<TQueryResult extends SingleStoreQueryResultHKT, TPreparedQueryHKT extends PreparedQueryHKTBase, TFullSchema extends Record<string, unknown> = Record<string, never>, TSchema extends TablesRelationalConfig = Record<string, never>> extends SingleStoreDatabase<TQueryResult, TPreparedQueryHKT, TFullSchema, TSchema> {
protected schema: RelationalSchemaConfig<TSchema> | undefined;
protected readonly nestedIndex: number;
static readonly [entityKind]: string;
constructor(dialect: SingleStoreDialect, session: SingleStoreSession, schema: RelationalSchemaConfig<TSchema> | undefined, nestedIndex: number);
rollback(): never;
/** Nested transactions (aka savepoints) only work with InnoDB engine. */
abstract transaction<T>(transaction: (tx: SingleStoreTransaction<TQueryResult, TPreparedQueryHKT, TFullSchema, TSchema>) => Promise<T>): Promise<T>;
}
export interface PreparedQueryHKTBase extends SingleStorePreparedQueryHKT {
type: SingleStorePreparedQuery<Assume<this['config'], SingleStorePreparedQueryConfig>>;
}

View File

@@ -0,0 +1,5 @@
export declare const differenceInSeconds: import("./types.js").FPFn2<
number,
string | number | Date,
string | number | Date
>;

View File

@@ -0,0 +1,670 @@
"use strict";
var definitions = {};
function defineType(typeName, metadata) {
definitions[typeName] = metadata;
}
defineType("Module", {
spec: {
wasm: "https://webassembly.github.io/spec/core/binary/modules.html#binary-module",
wat: "https://webassembly.github.io/spec/core/text/modules.html#text-module"
},
doc: "A module consists of a sequence of sections (termed fields in the text format).",
unionType: ["Node"],
fields: {
id: {
maybe: true,
type: "string"
},
fields: {
array: true,
type: "Node"
},
metadata: {
optional: true,
type: "ModuleMetadata"
}
}
});
defineType("ModuleMetadata", {
unionType: ["Node"],
fields: {
sections: {
array: true,
type: "SectionMetadata"
},
functionNames: {
optional: true,
array: true,
type: "FunctionNameMetadata"
},
localNames: {
optional: true,
array: true,
type: "ModuleMetadata"
},
producers: {
optional: true,
array: true,
type: "ProducersSectionMetadata"
}
}
});
defineType("ModuleNameMetadata", {
unionType: ["Node"],
fields: {
value: {
type: "string"
}
}
});
defineType("FunctionNameMetadata", {
unionType: ["Node"],
fields: {
value: {
type: "string"
},
index: {
type: "number"
}
}
});
defineType("LocalNameMetadata", {
unionType: ["Node"],
fields: {
value: {
type: "string"
},
localIndex: {
type: "number"
},
functionIndex: {
type: "number"
}
}
});
defineType("BinaryModule", {
unionType: ["Node"],
fields: {
id: {
maybe: true,
type: "string"
},
blob: {
array: true,
type: "string"
}
}
});
defineType("QuoteModule", {
unionType: ["Node"],
fields: {
id: {
maybe: true,
type: "string"
},
string: {
array: true,
type: "string"
}
}
});
defineType("SectionMetadata", {
unionType: ["Node"],
fields: {
section: {
type: "SectionName"
},
startOffset: {
type: "number"
},
size: {
type: "NumberLiteral"
},
vectorOfSize: {
comment: "Size of the vector in the section (if any)",
type: "NumberLiteral"
}
}
});
defineType("ProducersSectionMetadata", {
unionType: ["Node"],
fields: {
producers: {
array: true,
type: "ProducerMetadata"
}
}
});
defineType("ProducerMetadata", {
unionType: ["Node"],
fields: {
language: {
type: "ProducerMetadataVersionedName",
array: true
},
processedBy: {
type: "ProducerMetadataVersionedName",
array: true
},
sdk: {
type: "ProducerMetadataVersionedName",
array: true
}
}
});
defineType("ProducerMetadataVersionedName", {
unionType: ["Node"],
fields: {
name: {
type: "string"
},
version: {
type: "string"
}
}
});
/*
Instructions
*/
defineType("LoopInstruction", {
unionType: ["Node", "Block", "Instruction"],
fields: {
id: {
constant: true,
type: "string",
value: "loop"
},
label: {
maybe: true,
type: "Identifier"
},
resulttype: {
maybe: true,
type: "Valtype"
},
instr: {
array: true,
type: "Instruction"
}
}
});
defineType("Instr", {
unionType: ["Node", "Expression", "Instruction"],
fields: {
id: {
type: "string"
},
object: {
optional: true,
type: "Valtype"
},
args: {
array: true,
type: "Expression"
},
namedArgs: {
optional: true,
type: "Object"
}
}
});
defineType("IfInstruction", {
unionType: ["Node", "Instruction"],
fields: {
id: {
constant: true,
type: "string",
value: "if"
},
testLabel: {
comment: "only for WAST",
type: "Identifier"
},
test: {
array: true,
type: "Instruction"
},
result: {
maybe: true,
type: "Valtype"
},
consequent: {
array: true,
type: "Instruction"
},
alternate: {
array: true,
type: "Instruction"
}
}
});
/*
Concrete value types
*/
defineType("StringLiteral", {
unionType: ["Node", "Expression"],
fields: {
value: {
type: "string"
}
}
});
defineType("NumberLiteral", {
unionType: ["Node", "NumericLiteral", "Expression"],
fields: {
value: {
type: "number"
},
raw: {
type: "string"
}
}
});
defineType("LongNumberLiteral", {
unionType: ["Node", "NumericLiteral", "Expression"],
fields: {
value: {
type: "LongNumber"
},
raw: {
type: "string"
}
}
});
defineType("FloatLiteral", {
unionType: ["Node", "NumericLiteral", "Expression"],
fields: {
value: {
type: "number"
},
nan: {
optional: true,
type: "boolean"
},
inf: {
optional: true,
type: "boolean"
},
raw: {
type: "string"
}
}
});
defineType("Elem", {
unionType: ["Node"],
fields: {
table: {
type: "Index"
},
offset: {
array: true,
type: "Instruction"
},
funcs: {
array: true,
type: "Index"
}
}
});
defineType("IndexInFuncSection", {
unionType: ["Node"],
fields: {
index: {
type: "Index"
}
}
});
defineType("ValtypeLiteral", {
unionType: ["Node", "Expression"],
fields: {
name: {
type: "Valtype"
}
}
});
defineType("TypeInstruction", {
unionType: ["Node", "Instruction"],
fields: {
id: {
maybe: true,
type: "Index"
},
functype: {
type: "Signature"
}
}
});
defineType("Start", {
unionType: ["Node"],
fields: {
index: {
type: "Index"
}
}
});
defineType("GlobalType", {
unionType: ["Node", "ImportDescr"],
fields: {
valtype: {
type: "Valtype"
},
mutability: {
type: "Mutability"
}
}
});
defineType("LeadingComment", {
unionType: ["Node"],
fields: {
value: {
type: "string"
}
}
});
defineType("BlockComment", {
unionType: ["Node"],
fields: {
value: {
type: "string"
}
}
});
defineType("Data", {
unionType: ["Node"],
fields: {
memoryIndex: {
type: "Memidx"
},
offset: {
type: "Instruction"
},
init: {
type: "ByteArray"
}
}
});
defineType("Global", {
unionType: ["Node"],
fields: {
globalType: {
type: "GlobalType"
},
init: {
array: true,
type: "Instruction"
},
name: {
maybe: true,
type: "Identifier"
}
}
});
defineType("Table", {
unionType: ["Node", "ImportDescr"],
fields: {
elementType: {
type: "TableElementType"
},
limits: {
assertNodeType: true,
type: "Limit"
},
name: {
maybe: true,
type: "Identifier"
},
elements: {
array: true,
optional: true,
type: "Index"
}
}
});
defineType("Memory", {
unionType: ["Node", "ImportDescr"],
fields: {
limits: {
type: "Limit"
},
id: {
maybe: true,
type: "Index"
}
}
});
defineType("FuncImportDescr", {
unionType: ["Node", "ImportDescr"],
fields: {
id: {
type: "Identifier"
},
signature: {
type: "Signature"
}
}
});
defineType("ModuleImport", {
unionType: ["Node"],
fields: {
module: {
type: "string"
},
name: {
type: "string"
},
descr: {
type: "ImportDescr"
}
}
});
defineType("ModuleExportDescr", {
unionType: ["Node"],
fields: {
exportType: {
type: "ExportDescrType"
},
id: {
type: "Index"
}
}
});
defineType("ModuleExport", {
unionType: ["Node"],
fields: {
name: {
type: "string"
},
descr: {
type: "ModuleExportDescr"
}
}
});
defineType("Limit", {
unionType: ["Node"],
fields: {
min: {
type: "number"
},
max: {
optional: true,
type: "number"
},
// Threads proposal, shared memory
shared: {
optional: true,
type: "boolean"
}
}
});
defineType("Signature", {
unionType: ["Node"],
fields: {
params: {
array: true,
type: "FuncParam"
},
results: {
array: true,
type: "Valtype"
}
}
});
defineType("Program", {
unionType: ["Node"],
fields: {
body: {
array: true,
type: "Node"
}
}
});
defineType("Identifier", {
unionType: ["Node", "Expression"],
fields: {
value: {
type: "string"
},
raw: {
optional: true,
type: "string"
}
}
});
defineType("BlockInstruction", {
unionType: ["Node", "Block", "Instruction"],
fields: {
id: {
constant: true,
type: "string",
value: "block"
},
label: {
maybe: true,
type: "Identifier"
},
instr: {
array: true,
type: "Instruction"
},
result: {
maybe: true,
type: "Valtype"
}
}
});
defineType("CallInstruction", {
unionType: ["Node", "Instruction"],
fields: {
id: {
constant: true,
type: "string",
value: "call"
},
index: {
type: "Index"
},
instrArgs: {
array: true,
optional: true,
type: "Expression"
},
numeric: {
type: "Index",
optional: true
}
}
});
defineType("CallIndirectInstruction", {
unionType: ["Node", "Instruction"],
fields: {
id: {
constant: true,
type: "string",
value: "call_indirect"
},
signature: {
type: "SignatureOrTypeRef"
},
intrs: {
array: true,
optional: true,
type: "Expression"
}
}
});
defineType("ByteArray", {
unionType: ["Node"],
fields: {
values: {
array: true,
type: "Byte"
}
}
});
defineType("Func", {
unionType: ["Node", "Block"],
fields: {
name: {
maybe: true,
type: "Index"
},
signature: {
type: "SignatureOrTypeRef"
},
body: {
array: true,
type: "Instruction"
},
isExternal: {
comment: "means that it has been imported from the outside js",
optional: true,
type: "boolean"
},
metadata: {
optional: true,
type: "FuncMetadata"
}
}
});
/**
* Intrinsics
*/
defineType("InternalBrUnless", {
unionType: ["Node", "Intrinsic"],
fields: {
target: {
type: "number"
}
}
});
defineType("InternalGoto", {
unionType: ["Node", "Intrinsic"],
fields: {
target: {
type: "number"
}
}
});
defineType("InternalCallExtern", {
unionType: ["Node", "Intrinsic"],
fields: {
target: {
type: "number"
}
}
}); // function bodies are terminated by an `end` instruction but are missing a
// return instruction
//
// Since we can't inject a new instruction we are injecting a new instruction.
defineType("InternalEndAndReturn", {
unionType: ["Node", "Intrinsic"],
fields: {}
});
module.exports = definitions;

View File

@@ -0,0 +1,17 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const MessageSquareText = createLucideIcon("MessageSquareText", [
["path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z", key: "1lielz" }],
["path", { d: "M13 8H7", key: "14i4kc" }],
["path", { d: "M17 12H7", key: "16if0g" }]
]);
export { MessageSquareText as default };
//# sourceMappingURL=message-square-text.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"useDebounce.d.ts","sourceRoot":"","sources":["../../src/hooks/useDebounce.ts"],"names":[],"mappings":"AAGA,wBAAgB,WAAW,CAAC,CAAC,GAAG,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,CAAC,CAenE"}

View File

@@ -0,0 +1,46 @@
import { entityKind } from "../../entity.cjs";
import { QueryPromise } from "../../query-promise.cjs";
import { type BuildQueryResult, type DBQueryConfig, type TableRelationalConfig, type TablesRelationalConfig } from "../../relations.cjs";
import type { RunnableQuery } from "../../runnable-query.cjs";
import type { Query, SQLWrapper } from "../../sql/sql.cjs";
import type { KnownKeysOnly } from "../../utils.cjs";
import type { GelDialect } from "../dialect.cjs";
import type { GelPreparedQuery, GelSession, PreparedQueryConfig } from "../session.cjs";
import type { GelTable } from "../table.cjs";
export declare class RelationalQueryBuilder<TSchema extends TablesRelationalConfig, TFields extends TableRelationalConfig> {
private fullSchema;
private schema;
private tableNamesMap;
private table;
private tableConfig;
private dialect;
private session;
static readonly [entityKind]: string;
constructor(fullSchema: Record<string, unknown>, schema: TSchema, tableNamesMap: Record<string, string>, table: GelTable, tableConfig: TableRelationalConfig, dialect: GelDialect, session: GelSession);
findMany<TConfig extends DBQueryConfig<'many', true, TSchema, TFields>>(config?: KnownKeysOnly<TConfig, DBQueryConfig<'many', true, TSchema, TFields>>): GelRelationalQuery<BuildQueryResult<TSchema, TFields, TConfig>[]>;
findFirst<TSelection extends Omit<DBQueryConfig<'many', true, TSchema, TFields>, 'limit'>>(config?: KnownKeysOnly<TSelection, Omit<DBQueryConfig<'many', true, TSchema, TFields>, 'limit'>>): GelRelationalQuery<BuildQueryResult<TSchema, TFields, TSelection> | undefined>;
}
export declare class GelRelationalQuery<TResult> extends QueryPromise<TResult> implements RunnableQuery<TResult, 'gel'>, SQLWrapper {
private fullSchema;
private schema;
private tableNamesMap;
private table;
private tableConfig;
private dialect;
private session;
private config;
private mode;
static readonly [entityKind]: string;
readonly _: {
readonly dialect: 'gel';
readonly result: TResult;
};
constructor(fullSchema: Record<string, unknown>, schema: TablesRelationalConfig, tableNamesMap: Record<string, string>, table: GelTable, tableConfig: TableRelationalConfig, dialect: GelDialect, session: GelSession, config: DBQueryConfig<'many', true> | true, mode: 'many' | 'first');
prepare(name: string): GelPreparedQuery<PreparedQueryConfig & {
execute: TResult;
}>;
private _getQuery;
private _toSQL;
toSQL(): Query;
execute(): Promise<TResult>;
}

View File

@@ -0,0 +1,4 @@
# @swc/types
Typings for `@swc/core` APIs. This is a separate package because SWC is used by various tools but not all of them want to depend on `@swc/core`.
This package is very cheap, so feel free to depend on this.

View File

@@ -0,0 +1,25 @@
import { entityKind, is } from "../entity.js";
class PgSequence {
constructor(seqName, seqOptions, schema) {
this.seqName = seqName;
this.seqOptions = seqOptions;
this.schema = schema;
}
static [entityKind] = "PgSequence";
}
function pgSequence(name, options) {
return pgSequenceWithSchema(name, options, void 0);
}
function pgSequenceWithSchema(name, options, schema) {
return new PgSequence(name, options, schema);
}
function isPgSequence(obj) {
return is(obj, PgSequence);
}
export {
PgSequence,
isPgSequence,
pgSequence,
pgSequenceWithSchema
};
//# sourceMappingURL=sequence.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/database/migrations/migrate.ts"],"sourcesContent":["import type { BaseDatabaseAdapter } from '../types.js'\n\nimport { commitTransaction } from '../../utilities/commitTransaction.js'\nimport { createLocalReq } from '../../utilities/createLocalReq.js'\nimport { initTransaction } from '../../utilities/initTransaction.js'\nimport { killTransaction } from '../../utilities/killTransaction.js'\nimport { getMigrations } from './getMigrations.js'\nimport { readMigrationFiles } from './readMigrationFiles.js'\n\nexport const migrate: BaseDatabaseAdapter['migrate'] = async function migrate(\n this: BaseDatabaseAdapter,\n args,\n): Promise<void> {\n const { payload } = this\n const migrationFiles = args?.migrations || (await readMigrationFiles({ payload }))\n const { existingMigrations, latestBatch } = await getMigrations({ payload })\n\n const newBatch = latestBatch + 1\n\n // Execute 'up' function for each migration sequentially\n for (const migration of migrationFiles) {\n const existingMigration = existingMigrations.find(\n (existing) => existing.name === migration.name,\n )\n\n // Run migration if not found in database\n if (existingMigration) {\n continue\n }\n\n const start = Date.now()\n const req = await createLocalReq({}, payload)\n\n payload.logger.info({ msg: `Migrating: ${migration.name}` })\n\n try {\n await initTransaction(req)\n const session = payload.db.sessions?.[await req.transactionID!]\n await migration.up({ payload, req, session })\n payload.logger.info({ msg: `Migrated: ${migration.name} (${Date.now() - start}ms)` })\n await payload.create({\n collection: 'payload-migrations',\n data: {\n name: migration.name,\n batch: newBatch,\n },\n req,\n })\n await commitTransaction(req)\n } catch (err: unknown) {\n await killTransaction(req)\n payload.logger.error({ err, msg: `Error running migration ${migration.name}` })\n throw err\n }\n }\n}\n"],"names":["commitTransaction","createLocalReq","initTransaction","killTransaction","getMigrations","readMigrationFiles","migrate","args","payload","migrationFiles","migrations","existingMigrations","latestBatch","newBatch","migration","existingMigration","find","existing","name","start","Date","now","req","logger","info","msg","session","db","sessions","transactionID","up","create","collection","data","batch","err","error"],"mappings":"AAEA,SAASA,iBAAiB,QAAQ,uCAAsC;AACxE,SAASC,cAAc,QAAQ,oCAAmC;AAClE,SAASC,eAAe,QAAQ,qCAAoC;AACpE,SAASC,eAAe,QAAQ,qCAAoC;AACpE,SAASC,aAAa,QAAQ,qBAAoB;AAClD,SAASC,kBAAkB,QAAQ,0BAAyB;AAE5D,OAAO,MAAMC,UAA0C,eAAeA,QAEpEC,IAAI;IAEJ,MAAM,EAAEC,OAAO,EAAE,GAAG,IAAI;IACxB,MAAMC,iBAAiBF,MAAMG,cAAe,MAAML,mBAAmB;QAAEG;IAAQ;IAC/E,MAAM,EAAEG,kBAAkB,EAAEC,WAAW,EAAE,GAAG,MAAMR,cAAc;QAAEI;IAAQ;IAE1E,MAAMK,WAAWD,cAAc;IAE/B,wDAAwD;IACxD,KAAK,MAAME,aAAaL,eAAgB;QACtC,MAAMM,oBAAoBJ,mBAAmBK,IAAI,CAC/C,CAACC,WAAaA,SAASC,IAAI,KAAKJ,UAAUI,IAAI;QAGhD,yCAAyC;QACzC,IAAIH,mBAAmB;YACrB;QACF;QAEA,MAAMI,QAAQC,KAAKC,GAAG;QACtB,MAAMC,MAAM,MAAMrB,eAAe,CAAC,GAAGO;QAErCA,QAAQe,MAAM,CAACC,IAAI,CAAC;YAAEC,KAAK,CAAC,WAAW,EAAEX,UAAUI,IAAI,EAAE;QAAC;QAE1D,IAAI;YACF,MAAMhB,gBAAgBoB;YACtB,MAAMI,UAAUlB,QAAQmB,EAAE,CAACC,QAAQ,EAAE,CAAC,MAAMN,IAAIO,aAAa,CAAE;YAC/D,MAAMf,UAAUgB,EAAE,CAAC;gBAAEtB;gBAASc;gBAAKI;YAAQ;YAC3ClB,QAAQe,MAAM,CAACC,IAAI,CAAC;gBAAEC,KAAK,CAAC,WAAW,EAAEX,UAAUI,IAAI,CAAC,EAAE,EAAEE,KAAKC,GAAG,KAAKF,MAAM,GAAG,CAAC;YAAC;YACpF,MAAMX,QAAQuB,MAAM,CAAC;gBACnBC,YAAY;gBACZC,MAAM;oBACJf,MAAMJ,UAAUI,IAAI;oBACpBgB,OAAOrB;gBACT;gBACAS;YACF;YACA,MAAMtB,kBAAkBsB;QAC1B,EAAE,OAAOa,KAAc;YACrB,MAAMhC,gBAAgBmB;YACtBd,QAAQe,MAAM,CAACa,KAAK,CAAC;gBAAED;gBAAKV,KAAK,CAAC,wBAAwB,EAAEX,UAAUI,IAAI,EAAE;YAAC;YAC7E,MAAMiB;QACR;IACF;AACF,EAAC"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"oneOf.js","sourceRoot":"","sources":["../../../lib/vocabularies/applicator/oneOf.ts"],"names":[],"mappings":";;AAOA,mDAA6C;AAC7C,6CAAoD;AASpD,MAAM,KAAK,GAA2B;IACpC,OAAO,EAAE,wCAAwC;IACjD,MAAM,EAAE,CAAC,EAAC,MAAM,EAAC,EAAE,EAAE,CAAC,IAAA,WAAC,EAAA,oBAAoB,MAAM,CAAC,OAAO,GAAG;CAC7D,CAAA;AAED,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,OAAO;IAChB,UAAU,EAAE,OAAO;IACnB,WAAW,EAAE,IAAI;IACjB,KAAK;IACL,IAAI,CAAC,GAAe;QAClB,MAAM,EAAC,GAAG,EAAE,MAAM,EAAE,YAAY,EAAE,EAAE,EAAC,GAAG,GAAG,CAAA;QAC3C,wBAAwB;QACxB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAA;QACvE,IAAI,EAAE,CAAC,IAAI,CAAC,aAAa,IAAI,YAAY,CAAC,aAAa;YAAE,OAAM;QAC/D,MAAM,MAAM,GAAgB,MAAM,CAAA;QAClC,MAAM,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,CAAA;QACrC,MAAM,OAAO,GAAG,GAAG,CAAC,GAAG,CAAC,SAAS,EAAE,IAAI,CAAC,CAAA;QACxC,MAAM,QAAQ,GAAG,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;QACnC,GAAG,CAAC,SAAS,CAAC,EAAC,OAAO,EAAC,CAAC,CAAA;QACxB,2GAA2G;QAE3G,GAAG,CAAC,KAAK,CAAC,aAAa,CAAC,CAAA;QAExB,GAAG,CAAC,MAAM,CACR,KAAK,EACL,GAAG,EAAE,CAAC,GAAG,CAAC,KAAK,EAAE,EACjB,GAAG,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CACtB,CAAA;QAED,SAAS,aAAa;YACpB,MAAM,CAAC,OAAO,CAAC,CAAC,GAAc,EAAE,CAAS,EAAE,EAAE;gBAC3C,IAAI,MAA6B,CAAA;gBACjC,IAAI,IAAA,wBAAiB,EAAC,EAAE,EAAE,GAAG,CAAC,EAAE,CAAC;oBAC/B,GAAG,CAAC,GAAG,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAA;gBACzB,CAAC;qBAAM,CAAC;oBACN,MAAM,GAAG,GAAG,CAAC,SAAS,CACpB;wBACE,OAAO,EAAE,OAAO;wBAChB,UAAU,EAAE,CAAC;wBACb,aAAa,EAAE,IAAI;qBACpB,EACD,QAAQ,CACT,CAAA;gBACH,CAAC;gBAED,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;oBACV,GAAG;yBACA,EAAE,CAAC,IAAA,WAAC,EAAA,GAAG,QAAQ,OAAO,KAAK,EAAE,CAAC;yBAC9B,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC;yBACpB,MAAM,CAAC,OAAO,EAAE,IAAA,WAAC,EAAA,IAAI,OAAO,KAAK,CAAC,GAAG,CAAC;yBACtC,IAAI,EAAE,CAAA;gBACX,CAAC;gBAED,GAAG,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE;oBACpB,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,CAAA;oBACvB,GAAG,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,CAAA;oBACtB,IAAI,MAAM;wBAAE,GAAG,CAAC,cAAc,CAAC,MAAM,EAAE,cAAI,CAAC,CAAA;gBAC9C,CAAC,CAAC,CAAA;YACJ,CAAC,CAAC,CAAA;QACJ,CAAC;IACH,CAAC;CACF,CAAA;AAED,kBAAe,GAAG,CAAA"}

View File

@@ -0,0 +1,48 @@
export { compactDecrypt } from './jwe/compact/decrypt';
export type { CompactDecryptGetKey } from './jwe/compact/decrypt';
export { flattenedDecrypt } from './jwe/flattened/decrypt';
export type { FlattenedDecryptGetKey } from './jwe/flattened/decrypt';
export { generalDecrypt } from './jwe/general/decrypt';
export type { GeneralDecryptGetKey } from './jwe/general/decrypt';
export { GeneralEncrypt } from './jwe/general/encrypt';
export type { Recipient } from './jwe/general/encrypt';
export { compactVerify } from './jws/compact/verify';
export type { CompactVerifyGetKey } from './jws/compact/verify';
export { flattenedVerify } from './jws/flattened/verify';
export type { FlattenedVerifyGetKey } from './jws/flattened/verify';
export { generalVerify } from './jws/general/verify';
export type { GeneralVerifyGetKey } from './jws/general/verify';
export { jwtVerify } from './jwt/verify';
export type { JWTVerifyOptions, JWTVerifyGetKey } from './jwt/verify';
export { jwtDecrypt } from './jwt/decrypt';
export type { JWTDecryptOptions, JWTDecryptGetKey } from './jwt/decrypt';
export type { ProduceJWT } from './jwt/produce';
export { CompactEncrypt } from './jwe/compact/encrypt';
export { FlattenedEncrypt } from './jwe/flattened/encrypt';
export { CompactSign } from './jws/compact/sign';
export { FlattenedSign } from './jws/flattened/sign';
export { GeneralSign } from './jws/general/sign';
export type { Signature } from './jws/general/sign';
export { SignJWT } from './jwt/sign';
export { EncryptJWT } from './jwt/encrypt';
export { calculateJwkThumbprint, calculateJwkThumbprintUri } from './jwk/thumbprint';
export { EmbeddedJWK } from './jwk/embedded';
export { createLocalJWKSet } from './jwks/local';
export { createRemoteJWKSet, jwksCache, experimental_jwksCache } from './jwks/remote';
export type { RemoteJWKSetOptions, JWKSCacheInput, ExportedJWKSCache } from './jwks/remote';
export { UnsecuredJWT } from './jwt/unsecured';
export type { UnsecuredResult } from './jwt/unsecured';
export { exportPKCS8, exportSPKI, exportJWK } from './key/export';
export { importSPKI, importPKCS8, importX509, importJWK } from './key/import';
export type { PEMImportOptions } from './key/import';
export { decodeProtectedHeader } from './util/decode_protected_header';
export { decodeJwt } from './util/decode_jwt';
export type { ProtectedHeaderParameters } from './util/decode_protected_header';
export * as errors from './util/errors';
export { generateKeyPair } from './key/generate_key_pair';
export type { GenerateKeyPairResult, GenerateKeyPairOptions } from './key/generate_key_pair';
export { generateSecret } from './key/generate_secret';
export type { GenerateSecretOptions } from './key/generate_secret';
export * as base64url from './util/base64url';
export type { KeyLike, JWK, JWKParameters, JWK_OKP_Public, JWK_OKP_Private, JWK_EC_Public, JWK_EC_Private, JWK_RSA_Public, JWK_RSA_Private, JWK_oct, FlattenedJWSInput, GeneralJWSInput, FlattenedJWS, GeneralJWS, JoseHeaderParameters, JWSHeaderParameters, JWEKeyManagementHeaderParameters, FlattenedJWE, GeneralJWE, JWEHeaderParameters, CritOption, DecryptOptions, EncryptOptions, JWTClaimVerificationOptions, VerifyOptions, SignOptions, JWTPayload, FlattenedDecryptResult, GeneralDecryptResult, CompactDecryptResult, FlattenedVerifyResult, GeneralVerifyResult, CompactVerifyResult, JWTVerifyResult, JWTDecryptResult, ResolvedKey, CompactJWEHeaderParameters, CompactJWSHeaderParameters, JWTHeaderParameters, JSONWebKeySet, CryptoRuntime, GetKeyFunction, } from './types';
export { default as cryptoRuntime } from './util/runtime';

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/neon-http/index.ts"],"sourcesContent":["export * from './driver.ts';\nexport * from './session.ts';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;","names":[]}

View File

@@ -0,0 +1,143 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/// <reference types="node" />
import type { ForkOptions } from 'child_process';
import type { EventEmitter } from 'events';
export interface ResourceLimits {
maxYoungGenerationSizeMb?: number;
maxOldGenerationSizeMb?: number;
codeRangeSizeMb?: number;
stackSizeMb?: number;
}
export declare const CHILD_MESSAGE_INITIALIZE: 0;
export declare const CHILD_MESSAGE_CALL: 1;
export declare const CHILD_MESSAGE_END: 2;
export declare const PARENT_MESSAGE_OK: 0;
export declare const PARENT_MESSAGE_CLIENT_ERROR: 1;
export declare const PARENT_MESSAGE_SETUP_ERROR: 2;
export declare const PARENT_MESSAGE_CUSTOM: 3;
export declare type PARENT_MESSAGE_ERROR = typeof PARENT_MESSAGE_CLIENT_ERROR | typeof PARENT_MESSAGE_SETUP_ERROR;
export interface WorkerPoolInterface {
getStderr(): NodeJS.ReadableStream;
getStdout(): NodeJS.ReadableStream;
getWorkers(): Array<WorkerInterface>;
createWorker(options: WorkerOptions): WorkerInterface;
send(workerId: number, request: ChildMessage, onStart: OnStart, onEnd: OnEnd, onCustomMessage: OnCustomMessage): void;
end(): Promise<PoolExitResult>;
}
export interface WorkerInterface {
send(request: ChildMessage, onProcessStart: OnStart, onProcessEnd: OnEnd, onCustomMessage: OnCustomMessage): void;
waitForExit(): Promise<void>;
forceExit(): void;
getWorkerId(): number;
getStderr(): NodeJS.ReadableStream | null;
getStdout(): NodeJS.ReadableStream | null;
}
export declare type PoolExitResult = {
forceExited: boolean;
};
export interface PromiseWithCustomMessage<T> extends Promise<T> {
UNSTABLE_onCustomMessage?: (listener: OnCustomMessage) => () => void;
}
export type { ForkOptions };
export interface TaskQueue {
/**
* Enqueues the task in the queue for the specified worker or adds it to the
* queue shared by all workers
* @param task the task to queue
* @param workerId the id of the worker that should process this task or undefined
* if there's no preference.
*/
enqueue(task: QueueChildMessage, workerId?: number): void;
/**
* Dequeues the next item from the queue for the speified worker
* @param workerId the id of the worker for which the next task should be retrieved
*/
dequeue(workerId: number): QueueChildMessage | null;
}
export declare type FarmOptions = {
computeWorkerKey?: (method: string, ...args: Array<unknown>) => string | null;
exposedMethods?: ReadonlyArray<string>;
forkOptions?: ForkOptions;
workerSchedulingPolicy?: 'round-robin' | 'in-order';
resourceLimits?: ResourceLimits;
setupArgs?: Array<unknown>;
maxRetries?: number;
numWorkers?: number;
taskQueue?: TaskQueue;
WorkerPool?: (workerPath: string, options?: WorkerPoolOptions) => WorkerPoolInterface;
enableWorkerThreads?: boolean;
};
export declare type WorkerPoolOptions = {
setupArgs: Array<unknown>;
forkOptions: ForkOptions;
resourceLimits: ResourceLimits;
maxRetries: number;
numWorkers: number;
enableWorkerThreads: boolean;
};
export declare type WorkerOptions = {
forkOptions: ForkOptions;
resourceLimits: ResourceLimits;
setupArgs: Array<unknown>;
maxRetries: number;
workerId: number;
workerData?: unknown;
workerPath: string;
};
export declare type MessagePort = typeof EventEmitter & {
postMessage(message: unknown): void;
};
export declare type MessageChannel = {
port1: MessagePort;
port2: MessagePort;
};
export declare type ChildMessageInitialize = [
typeof CHILD_MESSAGE_INITIALIZE,
boolean,
string,
// file
Array<unknown> | undefined,
// setupArgs
MessagePort | undefined
];
export declare type ChildMessageCall = [
typeof CHILD_MESSAGE_CALL,
boolean,
string,
Array<unknown>
];
export declare type ChildMessageEnd = [
typeof CHILD_MESSAGE_END,
boolean
];
export declare type ChildMessage = ChildMessageInitialize | ChildMessageCall | ChildMessageEnd;
export declare type ParentMessageCustom = [
typeof PARENT_MESSAGE_CUSTOM,
unknown
];
export declare type ParentMessageOk = [
typeof PARENT_MESSAGE_OK,
unknown
];
export declare type ParentMessageError = [
PARENT_MESSAGE_ERROR,
string,
string,
string,
unknown
];
export declare type ParentMessage = ParentMessageOk | ParentMessageError | ParentMessageCustom;
export declare type OnStart = (worker: WorkerInterface) => void;
export declare type OnEnd = (err: Error | null, result: unknown) => void;
export declare type OnCustomMessage = (message: Array<unknown> | unknown) => void;
export declare type QueueChildMessage = {
request: ChildMessageCall;
onStart: OnStart;
onEnd: OnEnd;
onCustomMessage: OnCustomMessage;
};

View File

@@ -0,0 +1 @@
{"version":3,"file":"rotate-3-d.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}

View File

@@ -0,0 +1,13 @@
var toPropertyKey = require("./toPropertyKey.js");
function _defineProperties(e, r) {
for (var t = 0; t < r.length; t++) {
var o = r[t];
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o);
}
}
function _createClass(e, r, t) {
return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
writable: !1
}), e;
}
module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -0,0 +1,20 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./common"), exports);
__exportStar(require("./handler"), exports);
__exportStar(require("./client"), exports);
__exportStar(require("./audits"), exports);

View File

@@ -0,0 +1,36 @@
import { headers } from 'next/headers';
import { cache } from 'react';
import { HEADER_LOCALE_NAME } from '../../shared/constants.js';
import { isPromise } from '../../shared/utils.js';
import { getCachedRequestLocale } from './RequestLocaleCache.js';
async function getHeadersImpl() {
const promiseOrValue = headers();
// Compatibility with Next.js <15
return isPromise(promiseOrValue) ? await promiseOrValue : promiseOrValue;
}
const getHeaders = cache(getHeadersImpl);
async function getLocaleFromHeaderImpl() {
let locale;
try {
locale = (await getHeaders()).get(HEADER_LOCALE_NAME) || undefined;
} catch (error) {
if (error instanceof Error && error.digest === 'DYNAMIC_SERVER_USAGE') {
const wrappedError = new Error('Usage of next-intl APIs in Server Components currently opts into dynamic rendering. This limitation will eventually be lifted, but as a stopgap solution, you can use the `setRequestLocale` API to enable static rendering, see https://next-intl.dev/docs/routing/setup#static-rendering', {
cause: error
});
wrappedError.digest = error.digest;
throw wrappedError;
} else {
throw error;
}
}
return locale;
}
const getLocaleFromHeader = cache(getLocaleFromHeaderImpl);
async function getRequestLocale() {
return getCachedRequestLocale() || (await getLocaleFromHeader());
}
export { getRequestLocale };

View File

@@ -0,0 +1,14 @@
import { ExplorerBase } from './ExplorerBase';
import { CosmiconfigResult, ExplorerOptionsSync } from './types';
declare class ExplorerSync extends ExplorerBase<ExplorerOptionsSync> {
constructor(options: ExplorerOptionsSync);
searchSync(searchFrom?: string): CosmiconfigResult;
private searchFromDirectorySync;
private searchDirectorySync;
private loadSearchPlaceSync;
private loadFileContentSync;
private createCosmiconfigResultSync;
loadSync(filepath: string): CosmiconfigResult;
}
export { ExplorerSync };
//# sourceMappingURL=ExplorerSync.d.ts.map

View File

@@ -0,0 +1,21 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Shirt = createLucideIcon("Shirt", [
[
"path",
{
d: "M20.38 3.46 16 2a4 4 0 0 1-8 0L3.62 3.46a2 2 0 0 0-1.34 2.23l.58 3.47a1 1 0 0 0 .99.84H6v10c0 1.1.9 2 2 2h8a2 2 0 0 0 2-2V10h2.15a1 1 0 0 0 .99-.84l.58-3.47a2 2 0 0 0-1.34-2.23z",
key: "1wgbhj"
}
]
]);
export { Shirt as default };
//# sourceMappingURL=shirt.js.map

View File

@@ -0,0 +1,16 @@
import type { EmotionCache } from '@emotion/utils';
import { StylisPlugin } from "./types.js";
export interface Options {
nonce?: string;
stylisPlugins?: Array<StylisPlugin>;
key: string;
container?: Node;
speedy?: boolean;
/** @deprecate use `insertionPoint` instead */
prepend?: boolean;
insertionPoint?: HTMLElement;
}
declare let createCache: (options: Options) => EmotionCache;
export default createCache;
export type { EmotionCache };
export type { StylisElement, StylisPlugin, StylisPluginCallback } from "./types.js";

View File

@@ -0,0 +1,39 @@
import { buildFormatLongFn } from "../../_lib/buildFormatLongFn.js";
const dateFormats = {
full: "EEEE d MMMM y",
long: "d MMMM y",
medium: "d MMM y",
short: "y-MM-dd",
};
const timeFormats = {
full: "'kl'. HH:mm:ss zzzz",
long: "HH:mm:ss z",
medium: "HH:mm:ss",
short: "HH:mm",
};
const dateTimeFormats = {
full: "{{date}} 'kl.' {{time}}",
long: "{{date}} 'kl.' {{time}}",
medium: "{{date}} {{time}}",
short: "{{date}} {{time}}",
};
export const formatLong = {
date: buildFormatLongFn({
formats: dateFormats,
defaultWidth: "full",
}),
time: buildFormatLongFn({
formats: timeFormats,
defaultWidth: "full",
}),
dateTime: buildFormatLongFn({
formats: dateTimeFormats,
defaultWidth: "full",
}),
};

View File

@@ -0,0 +1,63 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
import { BaseSelection, ElementNode, LexicalEditor, LexicalNode, Point, RangeSelection, TextNode } from 'lexical';
/**
* Generally used to append text content to HTML and JSON. Grabs the text content and "slices"
* it to be generated into the new TextNode.
* @param selection - The selection containing the node whose TextNode is to be edited.
* @param textNode - The TextNode to be edited.
* @returns The updated TextNode.
*/
export declare function $sliceSelectedTextNodeContent(selection: BaseSelection, textNode: TextNode): LexicalNode;
/**
* Determines if the current selection is at the end of the node.
* @param point - The point of the selection to test.
* @returns true if the provided point offset is in the last possible position, false otherwise.
*/
export declare function $isAtNodeEnd(point: Point): boolean;
/**
* Trims text from a node in order to shorten it, eg. to enforce a text's max length. If it deletes text
* that is an ancestor of the anchor then it will leave 2 indents, otherwise, if no text content exists, it deletes
* the TextNode. It will move the focus to either the end of any left over text or beginning of a new TextNode.
* @param editor - The lexical editor.
* @param anchor - The anchor of the current selection, where the selection should be pointing.
* @param delCount - The amount of characters to delete. Useful as a dynamic variable eg. textContentSize - maxLength;
*/
export declare function $trimTextContentFromAnchor(editor: LexicalEditor, anchor: Point, delCount: number): void;
/**
* Gets the TextNode's style object and adds the styles to the CSS.
* @param node - The TextNode to add styles to.
*/
export declare function $addNodeStyle(node: TextNode): void;
/**
* Applies the provided styles to the given TextNode, ElementNode, or
* collapsed RangeSelection.
*
* @param target - The TextNode, ElementNode, or collapsed RangeSelection to apply the styles to
* @param patch - The patch to apply, which can include multiple styles. \\{CSSProperty: value\\} . Can also accept a function that returns the new property value.
*/
export declare function $patchStyle(target: TextNode | RangeSelection | ElementNode, patch: Record<string, string | null | ((currentStyleValue: string | null, _target: typeof target) => string)>): void;
/**
* Applies the provided styles to the TextNodes in the provided Selection.
* Will update partially selected TextNodes by splitting the TextNode and applying
* the styles to the appropriate one.
* @param selection - The selected node(s) to update.
* @param patch - The patch to apply, which can include multiple styles. \\{CSSProperty: value\\} . Can also accept a function that returns the new property value.
*/
export declare function $patchStyleText(selection: BaseSelection, patch: Record<string, string | null | ((currentStyleValue: string | null, target: TextNode | RangeSelection | ElementNode) => string)>): void;
export declare function $forEachSelectedTextNode(fn: (textNode: TextNode) => void): void;
/**
* Ensure that the given RangeSelection is not backwards. If it
* is backwards, then the anchor and focus points will be swapped
* in-place. Ensuring that the selection is a writable RangeSelection
* is the responsibility of the caller (e.g. in a read-only context
* you will want to clone $getSelection() before using this).
*
* @param selection a writable RangeSelection
*/
export declare function $ensureForwardRangeSelection(selection: RangeSelection): void;

View File

@@ -0,0 +1 @@
{"version":3,"file":"wrapGetStaticPropsWithSentry.js","sources":["../../../../src/common/pages-router-instrumentation/wrapGetStaticPropsWithSentry.ts"],"sourcesContent":["import type { GetStaticProps } from 'next';\nimport { isBuild } from '../utils/isBuild';\nimport { callDataFetcherTraced, withErrorInstrumentation } from '../utils/wrapperUtils';\n\ntype Props = { [key: string]: unknown };\n\n/**\n * Create a wrapped version of the user's exported `getStaticProps` function\n *\n * @param origGetStaticProps The user's `getStaticProps` function\n * @param parameterizedRoute The page's parameterized route\n * @returns A wrapped version of the function\n */\nexport function wrapGetStaticPropsWithSentry(\n origGetStaticPropsa: GetStaticProps<Props>,\n _parameterizedRoute: string,\n): GetStaticProps<Props> {\n return new Proxy(origGetStaticPropsa, {\n apply: async (wrappingTarget, thisArg, args: Parameters<GetStaticProps<Props>>) => {\n if (isBuild()) {\n return wrappingTarget.apply(thisArg, args);\n }\n\n const errorWrappedGetStaticProps = withErrorInstrumentation(wrappingTarget);\n return callDataFetcherTraced(errorWrappedGetStaticProps, args);\n },\n });\n}\n"],"names":["isBuild","withErrorInstrumentation","callDataFetcherTraced"],"mappings":";;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,4BAA4B;AAC5C,EAAE,mBAAmB;AACrB,EAAE,mBAAmB;AACrB,EAAyB;AACzB,EAAE,OAAO,IAAI,KAAK,CAAC,mBAAmB,EAAE;AACxC,IAAI,KAAK,EAAE,OAAO,cAAc,EAAE,OAAO,EAAE,IAAI,KAAwC;AACvF,MAAM,IAAIA,eAAO,EAAE,EAAE;AACrB,QAAQ,OAAO,cAAc,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC;AAClD,MAAM;;AAEN,MAAM,MAAM,0BAAA,GAA6BC,qCAAwB,CAAC,cAAc,CAAC;AACjF,MAAM,OAAOC,kCAAqB,CAAC,0BAA0B,EAAE,IAAI,CAAC;AACpE,IAAI,CAAC;AACL,GAAG,CAAC;AACJ;;;;"}

View File

@@ -0,0 +1,22 @@
import { isolateObjectProperty, verifyEmailOperation } from 'payload';
export function verifyEmail(collection) {
async function resolver(_, args, context) {
if (args.locale) {
context.req.locale = args.locale;
}
if (args.fallbackLocale) {
context.req.fallbackLocale = args.fallbackLocale;
}
const options = {
api: 'GraphQL',
collection,
req: isolateObjectProperty(context.req, 'transactionID'),
token: args.token
};
const success = await verifyEmailOperation(options);
return success;
}
return resolver;
}
//# sourceMappingURL=verifyEmail.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"instrumentation.js","sourceRoot":"","sources":["../../src/instrumentation.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,4CAA6C;AAC7C,oEAIwC;AACxC,kBAAkB;AAClB,uCAA0D;AAE1D,MAAa,0BAA2B,SAAQ,qCAAmB;IACjE,YAAY,SAAgC,EAAE;QAC5C,KAAK,CAAC,sBAAY,EAAE,yBAAe,EAAE,MAAM,CAAC,CAAC;IAC/C,CAAC;IAED,IAAI;QACF,OAAO;YACL,IAAI,qDAAmC,CACrC,cAAc,EACd,CAAC,UAAU,CAAC,EACZ,aAAa,CAAC,EAAE;gBACd,gEAAgE;gBAChE,qDAAqD;gBACrD,uDAAuD;gBACvD,MAAM,aAAa,GAAG;oBACpB,kGAAkG;oBAClG,2GAA2G;oBAC3G,MAAM,YAAY,GAAG,aAAa,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;oBAC1D,OAAO;wBACL,MAAM,iBAAiB,GAAG,CAAC,GAAG,SAAS,CAAC,CAAC;wBACzC,gCAAgC;wBAChC,MAAM,YAAY,GAAG,iBAAiB,CAAC,GAAG,EAAE,CAAC;wBAC7C,MAAM,mBAAmB,GACvB,OAAO,YAAY,KAAK,UAAU;4BAChC,CAAC,CAAC,aAAO,CAAC,IAAI,CAAC,aAAO,CAAC,MAAM,EAAE,EAAE,YAAY,CAAC;4BAC9C,CAAC,CAAC,YAAY,CAAC;wBACnB,iBAAiB,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;wBAC5C,OAAO,YAAY,CAAC,KAAK,CAAC,IAAI,EAAE,iBAAiB,CAAC,CAAC;oBACrD,CAAC,CAAC;gBACJ,CAAC,CAAC;gBAEF,kEAAkE;gBAClE,mCAAmC;gBACnC,aAAa,CAAC,IAAI,GAAG,aAAa,CAAC,IAAI,CAAC;gBACxC,OAAO,aAAa,CAAC;YACvB,CAAC,EACD,SAAS,CAAC,uEAAuE;aAClF;SACF,CAAC;IACJ,CAAC;CACF;AAxCD,gEAwCC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { context } from '@opentelemetry/api';\nimport {\n InstrumentationBase,\n InstrumentationConfig,\n InstrumentationNodeModuleDefinition,\n} from '@opentelemetry/instrumentation';\n/** @knipignore */\nimport { PACKAGE_NAME, PACKAGE_VERSION } from './version';\n\nexport class LruMemoizerInstrumentation extends InstrumentationBase {\n constructor(config: InstrumentationConfig = {}) {\n super(PACKAGE_NAME, PACKAGE_VERSION, config);\n }\n\n init(): InstrumentationNodeModuleDefinition[] {\n return [\n new InstrumentationNodeModuleDefinition(\n 'lru-memoizer',\n ['>=1.3 <3'],\n moduleExports => {\n // moduleExports is a function which receives an options object,\n // and returns a \"memoizer\" function upon invocation.\n // We want to patch this \"memoizer's\" internal function\n const asyncMemoizer = function (this: unknown) {\n // This following function is invoked every time the user wants to get a (possible) memoized value\n // We replace it with another function in which we bind the current context to the last argument (callback)\n const origMemoizer = moduleExports.apply(this, arguments);\n return function (this: unknown) {\n const modifiedArguments = [...arguments];\n // last argument is the callback\n const origCallback = modifiedArguments.pop();\n const callbackWithContext =\n typeof origCallback === 'function'\n ? context.bind(context.active(), origCallback)\n : origCallback;\n modifiedArguments.push(callbackWithContext);\n return origMemoizer.apply(this, modifiedArguments);\n };\n };\n\n // sync function preserves context, but we still need to export it\n // as the lru-memoizer package does\n asyncMemoizer.sync = moduleExports.sync;\n return asyncMemoizer;\n },\n undefined // no need to disable as this instrumentation does not create any spans\n ),\n ];\n }\n}\n"]}

View File

@@ -0,0 +1,11 @@
import type { EventBuffer, ReplayWorkerURL } from '../types';
interface CreateEventBufferParams {
useCompression: boolean;
workerUrl?: ReplayWorkerURL;
}
/**
* Create an event buffer for replays.
*/
export declare function createEventBuffer({ useCompression, workerUrl: customWorkerUrl, }: CreateEventBufferParams): EventBuffer;
export {};
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,8 @@
// This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
import { getOverlappingDaysInIntervals as fn } from "../getOverlappingDaysInIntervals.mjs";
import { convertToFP } from "./_lib/convertToFP.mjs";
export const getOverlappingDaysInIntervals = convertToFP(fn, 2);
// Fallback for modularized imports:
export default getOverlappingDaysInIntervals;

View File

@@ -0,0 +1,46 @@
import { constructFrom } from "./constructFrom.js";
import { getISOWeekYear } from "./getISOWeekYear.js";
import { startOfISOWeek } from "./startOfISOWeek.js";
/**
* The {@link lastDayOfISOWeekYear} function options.
*/
/**
* @name lastDayOfISOWeekYear
* @category ISO Week-Numbering Year Helpers
* @summary Return the last day of an ISO week-numbering year for the given date.
*
* @description
* Return the last day of an ISO week-numbering year,
* which always starts 3 days before the year's first Thursday.
* The result will be in the local timezone.
*
* ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
*
* @param date - The original date
* @param options - An object with options
*
* @returns The end of an ISO week-numbering year
*
* @example
* // The last day of an ISO week-numbering year for 2 July 2005:
* const result = lastDayOfISOWeekYear(new Date(2005, 6, 2))
* //=> Sun Jan 01 2006 00:00:00
*/
export function lastDayOfISOWeekYear(date, options) {
const year = getISOWeekYear(date, options);
const fourthOfJanuary = constructFrom(options?.in || date, 0);
fourthOfJanuary.setFullYear(year + 1, 0, 4);
fourthOfJanuary.setHours(0, 0, 0, 0);
const date_ = startOfISOWeek(fourthOfJanuary, options);
date_.setDate(date_.getDate() - 1);
return date_;
}
// Fallback for modularized imports:
export default lastDayOfISOWeekYear;

View File

@@ -0,0 +1 @@
{"version":3,"file":"scan-barcode.js","sources":["../../../src/icons/scan-barcode.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ScanBarcode\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMyA3VjVhMiAyIDAgMCAxIDItMmgyIiAvPgogIDxwYXRoIGQ9Ik0xNyAzaDJhMiAyIDAgMCAxIDIgMnYyIiAvPgogIDxwYXRoIGQ9Ik0yMSAxN3YyYTIgMiAwIDAgMS0yIDJoLTIiIC8+CiAgPHBhdGggZD0iTTcgMjFINWEyIDIgMCAwIDEtMi0ydi0yIiAvPgogIDxwYXRoIGQ9Ik04IDd2MTAiIC8+CiAgPHBhdGggZD0iTTEyIDd2MTAiIC8+CiAgPHBhdGggZD0iTTE3IDd2MTAiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/scan-barcode\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst ScanBarcode = createLucideIcon('ScanBarcode', [\n ['path', { d: 'M3 7V5a2 2 0 0 1 2-2h2', key: 'aa7l1z' }],\n ['path', { d: 'M17 3h2a2 2 0 0 1 2 2v2', key: '4qcy5o' }],\n ['path', { d: 'M21 17v2a2 2 0 0 1-2 2h-2', key: '6vwrx8' }],\n ['path', { d: 'M7 21H5a2 2 0 0 1-2-2v-2', key: 'ioqczr' }],\n ['path', { d: 'M8 7v10', key: '23sfjj' }],\n ['path', { d: 'M12 7v10', key: 'jspqdw' }],\n ['path', { d: 'M17 7v10', key: '578dap' }],\n]);\n\nexport default ScanBarcode;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAc,iBAAiB,aAAe,CAAA,CAAA,CAAA;AAAA,CAAA,CAClD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA0B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACvD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA2B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA6B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA4B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,286 @@
import type { Cache } from "../cache/core/cache.js";
import { entityKind } from "../entity.js";
import type { GelDialect } from "./dialect.js";
import { GelDeleteBase, GelInsertBuilder, GelSelectBuilder, GelUpdateBuilder, QueryBuilder } from "./query-builders/index.js";
import type { GelQueryResultHKT, GelSession, GelTransaction } from "./session.js";
import type { GelTable } from "./table.js";
import type { TypedQueryBuilder } from "../query-builders/query-builder.js";
import type { ExtractTablesWithRelations, RelationalSchemaConfig, TablesRelationalConfig } from "../relations.js";
import { type ColumnsSelection, type SQL, type SQLWrapper } from "../sql/sql.js";
import { WithSubquery } from "../subquery.js";
import type { DrizzleTypeError } from "../utils.js";
import type { GelColumn } from "./columns/index.js";
import { GelCountBuilder } from "./query-builders/count.js";
import { RelationalQueryBuilder } from "./query-builders/query.js";
import { GelRaw } from "./query-builders/raw.js";
import type { SelectedFields } from "./query-builders/select.types.js";
import type { WithSubqueryWithSelection } from "./subquery.js";
import type { GelViewBase } from "./view-base.js";
export declare class GelDatabase<TQueryResult extends GelQueryResultHKT, TFullSchema extends Record<string, unknown> = Record<string, never>, TSchema extends TablesRelationalConfig = ExtractTablesWithRelations<TFullSchema>> {
static readonly [entityKind]: string;
readonly _: {
readonly schema: TSchema | undefined;
readonly fullSchema: TFullSchema;
readonly tableNamesMap: Record<string, string>;
readonly session: GelSession<TQueryResult, TFullSchema, TSchema>;
};
query: TFullSchema extends Record<string, never> ? DrizzleTypeError<'Seems like the schema generic is missing - did you forget to add it to your DB type?'> : {
[K in keyof TSchema]: RelationalQueryBuilder<TSchema, TSchema[K]>;
};
constructor(
/** @internal */
dialect: GelDialect,
/** @internal */
session: GelSession<any, any, any>, schema: RelationalSchemaConfig<TSchema> | undefined);
/**
* Creates a subquery that defines a temporary named result set as a CTE.
*
* It is useful for breaking down complex queries into simpler parts and for reusing the result set in subsequent parts of the query.
*
* See docs: {@link https://orm.drizzle.team/docs/select#with-clause}
*
* @param alias The alias for the subquery.
*
* Failure to provide an alias will result in a DrizzleTypeError, preventing the subquery from being referenced in other queries.
*
* @example
*
* ```ts
* // Create a subquery with alias 'sq' and use it in the select query
* const sq = db.$with('sq').as(db.select().from(users).where(eq(users.id, 42)));
*
* const result = await db.with(sq).select().from(sq);
* ```
*
* To select arbitrary SQL values as fields in a CTE and reference them in other CTEs or in the main query, you need to add aliases to them:
*
* ```ts
* // Select an arbitrary SQL value as a field in a CTE and reference it in the main query
* const sq = db.$with('sq').as(db.select({
* name: sql<string>`upper(${users.name})`.as('name'),
* })
* .from(users));
*
* const result = await db.with(sq).select({ name: sq.name }).from(sq);
* ```
*/
$with<TAlias extends string>(alias: TAlias): {
as<TSelection extends ColumnsSelection>(qb: TypedQueryBuilder<TSelection> | ((qb: QueryBuilder) => TypedQueryBuilder<TSelection>)): WithSubqueryWithSelection<TSelection, TAlias>;
};
$count(source: GelTable | GelViewBase | SQL | SQLWrapper, filters?: SQL<unknown>): GelCountBuilder<GelSession<any, any, any>>;
/**
* Incorporates a previously defined CTE (using `$with`) into the main query.
*
* This method allows the main query to reference a temporary named result set.
*
* See docs: {@link https://orm.drizzle.team/docs/select#with-clause}
*
* @param queries The CTEs to incorporate into the main query.
*
* @example
*
* ```ts
* // Define a subquery 'sq' as a CTE using $with
* const sq = db.$with('sq').as(db.select().from(users).where(eq(users.id, 42)));
*
* // Incorporate the CTE 'sq' into the main query and select from it
* const result = await db.with(sq).select().from(sq);
* ```
*/
with(...queries: WithSubquery[]): {
select: {
(): GelSelectBuilder<undefined>;
<TSelection extends SelectedFields>(fields: TSelection): GelSelectBuilder<TSelection>;
};
selectDistinct: {
(): GelSelectBuilder<undefined>;
<TSelection extends SelectedFields>(fields: TSelection): GelSelectBuilder<TSelection>;
};
selectDistinctOn: {
(on: (GelColumn | SQLWrapper)[]): GelSelectBuilder<undefined>;
<TSelection extends SelectedFields>(on: (GelColumn | SQLWrapper)[], fields: TSelection): GelSelectBuilder<TSelection>;
};
update: <TTable extends GelTable>(table: TTable) => GelUpdateBuilder<TTable, TQueryResult>;
insert: <TTable extends GelTable>(table: TTable) => GelInsertBuilder<TTable, TQueryResult>;
delete: <TTable extends GelTable>(table: TTable) => GelDeleteBase<TTable, TQueryResult>;
};
/**
* Creates a select query.
*
* Calling this method with no arguments will select all columns from the table. Pass a selection object to specify the columns you want to select.
*
* Use `.from()` method to specify which table to select from.
*
* See docs: {@link https://orm.drizzle.team/docs/select}
*
* @param fields The selection object.
*
* @example
*
* ```ts
* // Select all columns and all rows from the 'cars' table
* const allCars: Car[] = await db.select().from(cars);
*
* // Select specific columns and all rows from the 'cars' table
* const carsIdsAndBrands: { id: number; brand: string }[] = await db.select({
* id: cars.id,
* brand: cars.brand
* })
* .from(cars);
* ```
*
* Like in SQL, you can use arbitrary expressions as selection fields, not just table columns:
*
* ```ts
* // Select specific columns along with expression and all rows from the 'cars' table
* const carsIdsAndLowerNames: { id: number; lowerBrand: string }[] = await db.select({
* id: cars.id,
* lowerBrand: sql<string>`lower(${cars.brand})`,
* })
* .from(cars);
* ```
*/
select(): GelSelectBuilder<undefined>;
select<TSelection extends SelectedFields>(fields: TSelection): GelSelectBuilder<TSelection>;
/**
* Adds `distinct` expression to the select query.
*
* Calling this method will return only unique values. When multiple columns are selected, it returns rows with unique combinations of values in these columns.
*
* Use `.from()` method to specify which table to select from.
*
* See docs: {@link https://orm.drizzle.team/docs/select#distinct}
*
* @param fields The selection object.
*
* @example
* ```ts
* // Select all unique rows from the 'cars' table
* await db.selectDistinct()
* .from(cars)
* .orderBy(cars.id, cars.brand, cars.color);
*
* // Select all unique brands from the 'cars' table
* await db.selectDistinct({ brand: cars.brand })
* .from(cars)
* .orderBy(cars.brand);
* ```
*/
selectDistinct(): GelSelectBuilder<undefined>;
selectDistinct<TSelection extends SelectedFields>(fields: TSelection): GelSelectBuilder<TSelection>;
/**
* Adds `distinct on` expression to the select query.
*
* Calling this method will specify how the unique rows are determined.
*
* Use `.from()` method to specify which table to select from.
*
* See docs: {@link https://orm.drizzle.team/docs/select#distinct}
*
* @param on The expression defining uniqueness.
* @param fields The selection object.
*
* @example
* ```ts
* // Select the first row for each unique brand from the 'cars' table
* await db.selectDistinctOn([cars.brand])
* .from(cars)
* .orderBy(cars.brand);
*
* // Selects the first occurrence of each unique car brand along with its color from the 'cars' table
* await db.selectDistinctOn([cars.brand], { brand: cars.brand, color: cars.color })
* .from(cars)
* .orderBy(cars.brand, cars.color);
* ```
*/
selectDistinctOn(on: (GelColumn | SQLWrapper)[]): GelSelectBuilder<undefined>;
selectDistinctOn<TSelection extends SelectedFields>(on: (GelColumn | SQLWrapper)[], fields: TSelection): GelSelectBuilder<TSelection>;
$cache: {
invalidate: Cache['onMutate'];
};
/**
* Creates an update query.
*
* Calling this method without `.where()` clause will update all rows in a table. The `.where()` clause specifies which rows should be updated.
*
* Use `.set()` method to specify which values to update.
*
* See docs: {@link https://orm.drizzle.team/docs/update}
*
* @param table The table to update.
*
* @example
*
* ```ts
* // Update all rows in the 'cars' table
* await db.update(cars).set({ color: 'red' });
*
* // Update rows with filters and conditions
* await db.update(cars).set({ color: 'red' }).where(eq(cars.brand, 'BMW'));
*
* // Update with returning clause
* const updatedCar: Car[] = await db.update(cars)
* .set({ color: 'red' })
* .where(eq(cars.id, 1))
* .returning();
* ```
*/
update<TTable extends GelTable>(table: TTable): GelUpdateBuilder<TTable, TQueryResult>;
/**
* Creates an insert query.
*
* Calling this method will create new rows in a table. Use `.values()` method to specify which values to insert.
*
* See docs: {@link https://orm.drizzle.team/docs/insert}
*
* @param table The table to insert into.
*
* @example
*
* ```ts
* // Insert one row
* await db.insert(cars).values({ brand: 'BMW' });
*
* // Insert multiple rows
* await db.insert(cars).values([{ brand: 'BMW' }, { brand: 'Porsche' }]);
*
* // Insert with returning clause
* const insertedCar: Car[] = await db.insert(cars)
* .values({ brand: 'BMW' })
* .returning();
* ```
*/
insert<TTable extends GelTable>(table: TTable): GelInsertBuilder<TTable, TQueryResult>;
/**
* Creates a delete query.
*
* Calling this method without `.where()` clause will delete all rows in a table. The `.where()` clause specifies which rows should be deleted.
*
* See docs: {@link https://orm.drizzle.team/docs/delete}
*
* @param table The table to delete from.
*
* @example
*
* ```ts
* // Delete all rows in the 'cars' table
* await db.delete(cars);
*
* // Delete rows with filters and conditions
* await db.delete(cars).where(eq(cars.color, 'green'));
*
* // Delete with returning clause
* const deletedCar: Car[] = await db.delete(cars)
* .where(eq(cars.id, 1))
* .returning();
* ```
*/
delete<TTable extends GelTable>(table: TTable): GelDeleteBase<TTable, TQueryResult>;
execute<TRow extends Record<string, unknown> = Record<string, unknown>>(query: SQLWrapper | string): GelRaw<TRow[]>;
transaction<T>(transaction: (tx: GelTransaction<TQueryResult, TFullSchema, TSchema>) => Promise<T>): Promise<T>;
}
export type GelWithReplicas<Q> = Q & {
$primary: Q;
$replicas: Q[];
};
export declare const withReplicas: <HKT extends GelQueryResultHKT, TFullSchema extends Record<string, unknown>, TSchema extends TablesRelationalConfig, Q extends GelDatabase<HKT, TFullSchema, TSchema extends Record<string, unknown> ? ExtractTablesWithRelations<TFullSchema> : TSchema>>(primary: Q, replicas: [Q, ...Q[]], getReplica?: (replicas: Q[]) => Q) => GelWithReplicas<Q>;

View File

@@ -0,0 +1,20 @@
import { DirectusCollection } from "../../../schema/collection.js";
import { NestedPartial } from "../../../types/utils.js";
import { ApplyQueryFields } from "../../../types/output.js";
import { FieldQuery, Query } from "../../../types/query.js";
import { RestCommand } from "../../types.js";
//#region src/rest/commands/create/collections.d.ts
type CreateCollectionOutput<Schema, TQuery extends Query<Schema, Item>, Item extends object = DirectusCollection<Schema>> = ApplyQueryFields<Schema, Item, TQuery['fields']>;
/**
* Create a new Collection. This will create a new table in the database as well.
*
* @param item This endpoint doesn't currently support any query parameters.
* @param query Optional return data query
*
* @returns The collection object for the collection created in this request.
*/
declare const createCollection: <Schema, const TQuery extends FieldQuery<Schema, DirectusCollection<Schema>>>(item: NestedPartial<DirectusCollection<Schema>>, query?: TQuery) => RestCommand<CreateCollectionOutput<Schema, TQuery>, Schema>;
//#endregion
export { CreateCollectionOutput, createCollection };
//# sourceMappingURL=collections.d.ts.map

View File

@@ -0,0 +1,99 @@
'use strict'
const { test } = require('node:test')
const { createWarning, createDeprecation } = require('..')
process.removeAllListeners('warning')
test('Create warning with zero parameter', t => {
t.plan(3)
const warnItem = createWarning({
name: 'TestWarning',
code: 'CODE',
message: 'Not available'
})
t.assert.deepStrictEqual(warnItem.name, 'TestWarning')
t.assert.deepStrictEqual(warnItem.message, 'Not available')
t.assert.deepStrictEqual(warnItem.code, 'CODE')
})
test('Create error with 1 parameter', t => {
t.plan(3)
const warnItem = createWarning({
name: 'TestWarning',
code: 'CODE',
message: 'hey %s'
})
t.assert.deepStrictEqual(warnItem.name, 'TestWarning')
t.assert.deepStrictEqual(warnItem.format('alice'), 'hey alice')
t.assert.deepStrictEqual(warnItem.code, 'CODE')
})
test('Create error with 2 parameters', t => {
t.plan(3)
const warnItem = createWarning({
name: 'TestWarning',
code: 'CODE',
message: 'hey %s, I like your %s'
})
t.assert.deepStrictEqual(warnItem.name, 'TestWarning')
t.assert.deepStrictEqual(warnItem.format('alice', 'attitude'), 'hey alice, I like your attitude')
t.assert.deepStrictEqual(warnItem.code, 'CODE')
})
test('Create error with 3 parameters', t => {
t.plan(3)
const warnItem = createWarning({
name: 'TestWarning',
code: 'CODE',
message: 'hey %s, I like your %s %s'
})
t.assert.deepStrictEqual(warnItem.name, 'TestWarning')
t.assert.deepStrictEqual(warnItem.format('alice', 'attitude', 'see you'), 'hey alice, I like your attitude see you')
t.assert.deepStrictEqual(warnItem.code, 'CODE')
})
test('Creates a deprecation warning', t => {
t.plan(3)
const deprecationItem = createDeprecation({
name: 'DeprecationWarning',
code: 'CODE',
message: 'hello %s'
})
t.assert.deepStrictEqual(deprecationItem.name, 'DeprecationWarning')
t.assert.deepStrictEqual(deprecationItem.format('world'), 'hello world')
t.assert.deepStrictEqual(deprecationItem.code, 'CODE')
})
test('Should throw when error code has no name', t => {
t.plan(1)
t.assert.throws(() => createWarning(), new Error('Warning name must not be empty'))
})
test('Should throw when error has no code', t => {
t.plan(1)
t.assert.throws(() => createWarning({ name: 'name' }), new Error('Warning code must not be empty'))
})
test('Should throw when error has no message', t => {
t.plan(1)
t.assert.throws(() => createWarning({
name: 'name',
code: 'code'
}), new Error('Warning message must not be empty'))
})
test('Cannot set unlimited other than boolean', t => {
t.plan(1)
t.assert.throws(() => createWarning({
name: 'name',
code: 'code',
message: 'message',
unlimited: 'unlimited'
}), new Error('Warning opts.unlimited must be a boolean'))
})

View File

@@ -0,0 +1,52 @@
import { type Connection as CallbackConnection, type Pool as CallbackPool, type PoolOptions } from 'mysql2';
import type { Connection, Pool } from 'mysql2/promise';
import type { Cache } from "../cache/core/cache.cjs";
import { entityKind } from "../entity.cjs";
import type { Logger } from "../logger.cjs";
import { type RelationalSchemaConfig, type TablesRelationalConfig } from "../relations.cjs";
import { SingleStoreDatabase } from "../singlestore-core/db.cjs";
import { SingleStoreDialect } from "../singlestore-core/dialect.cjs";
import { type DrizzleConfig } from "../utils.cjs";
import type { SingleStoreDriverClient, SingleStoreDriverPreparedQueryHKT, SingleStoreDriverQueryResultHKT } from "./session.cjs";
import { SingleStoreDriverSession } from "./session.cjs";
export interface SingleStoreDriverOptions {
logger?: Logger;
cache?: Cache;
}
export declare class SingleStoreDriverDriver {
private client;
private dialect;
private options;
static readonly [entityKind]: string;
constructor(client: SingleStoreDriverClient, dialect: SingleStoreDialect, options?: SingleStoreDriverOptions);
createSession(schema: RelationalSchemaConfig<TablesRelationalConfig> | undefined): SingleStoreDriverSession<Record<string, unknown>, TablesRelationalConfig>;
}
export { SingleStoreDatabase } from "../singlestore-core/db.cjs";
export declare class SingleStoreDriverDatabase<TSchema extends Record<string, unknown> = Record<string, never>> extends SingleStoreDatabase<SingleStoreDriverQueryResultHKT, SingleStoreDriverPreparedQueryHKT, TSchema> {
static readonly [entityKind]: string;
}
export type SingleStoreDriverDrizzleConfig<TSchema extends Record<string, unknown> = Record<string, never>> = Omit<DrizzleConfig<TSchema>, 'schema'> & ({
schema: TSchema;
} | {
schema?: undefined;
});
export type AnySingleStoreDriverConnection = Pool | Connection | CallbackPool | CallbackConnection;
export declare function drizzle<TSchema extends Record<string, unknown> = Record<string, never>, TClient extends AnySingleStoreDriverConnection = CallbackPool>(...params: [
TClient | string
] | [
TClient | string,
SingleStoreDriverDrizzleConfig<TSchema>
] | [
(SingleStoreDriverDrizzleConfig<TSchema> & ({
connection: string | PoolOptions;
} | {
client: TClient;
}))
]): SingleStoreDriverDatabase<TSchema> & {
$client: AnySingleStoreDriverConnection extends TClient ? CallbackPool : TClient;
};
export declare namespace drizzle {
function mock<TSchema extends Record<string, unknown> = Record<string, never>>(config?: SingleStoreDriverDrizzleConfig<TSchema>): SingleStoreDriverDatabase<TSchema> & {
$client: '$client is not available on drizzle.mock()';
};
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"circle-x.js","sources":["../../../src/icons/circle-x.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name CircleX\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMCIgLz4KICA8cGF0aCBkPSJtMTUgOS02IDYiIC8+CiAgPHBhdGggZD0ibTkgOSA2IDYiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/circle-x\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst CircleX = createLucideIcon('CircleX', [\n ['circle', { cx: '12', cy: '12', r: '10', key: '1mglay' }],\n ['path', { d: 'm15 9-6 6', key: '1uzhvr' }],\n ['path', { d: 'm9 9 6 6', key: 'z0biqf' }],\n]);\n\nexport default CircleX;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,iBAAiB,SAAW,CAAA,CAAA,CAAA;AAAA,CAC1C,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACzD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,23 @@
/**
* The base implementation of methods like `_.findKey` and `_.findLastKey`,
* without support for iteratee shorthands, which iterates over `collection`
* using `eachFunc`.
*
* @private
* @param {Array|Object} collection The collection to inspect.
* @param {Function} predicate The function invoked per iteration.
* @param {Function} eachFunc The function to iterate over `collection`.
* @returns {*} Returns the found element or its key, else `undefined`.
*/
function baseFindKey(collection, predicate, eachFunc) {
var result;
eachFunc(collection, function(value, key, collection) {
if (predicate(value, key, collection)) {
result = key;
return false;
}
});
return result;
}
module.exports = baseFindKey;

View File

@@ -0,0 +1,104 @@
import { getGlobalScope, getCurrentScope, addBreadcrumb, getClient, addNonEnumerableProperty } from '@sentry/core';
const ACTION_BREADCRUMB_CATEGORY = 'redux.action';
const ACTION_BREADCRUMB_TYPE = 'info';
const defaultOptions = {
attachReduxState: true,
actionTransformer: action => action,
stateTransformer: state => state || null,
};
/**
* Creates an enhancer that would be passed to Redux's createStore to log actions and the latest state to Sentry.
*
* @param enhancerOptions Options to pass to the enhancer
*/
function createReduxEnhancer(enhancerOptions) {
// Note: We return an any type as to not have type conflicts.
const options = {
...defaultOptions,
...enhancerOptions,
};
return (next) =>
(reducer, initialState) => {
options.attachReduxState &&
getGlobalScope().addEventProcessor((event, hint) => {
try {
// @ts-expect-error try catch to reduce bundle size
if (event.type === undefined && event.contexts.state.state.type === 'redux') {
hint.attachments = [
...(hint.attachments || []),
// @ts-expect-error try catch to reduce bundle size
{ filename: 'redux_state.json', data: JSON.stringify(event.contexts.state.state.value) },
];
}
} catch {
// empty
}
return event;
});
function sentryWrapReducer(reducer) {
return (state, action) => {
const newState = reducer(state, action);
const scope = getCurrentScope();
/* Action breadcrumbs */
const transformedAction = options.actionTransformer(action);
if (typeof transformedAction !== 'undefined' && transformedAction !== null) {
addBreadcrumb({
category: ACTION_BREADCRUMB_CATEGORY,
data: transformedAction,
type: ACTION_BREADCRUMB_TYPE,
});
}
/* Set latest state to scope */
const transformedState = options.stateTransformer(newState);
if (typeof transformedState !== 'undefined' && transformedState !== null) {
const client = getClient();
const options = client?.getOptions();
const normalizationDepth = options?.normalizeDepth || 3; // default state normalization depth to 3
// Set the normalization depth of the redux state to the configured `normalizeDepth` option or a sane number as a fallback
const newStateContext = { state: { type: 'redux', value: transformedState } };
addNonEnumerableProperty(
newStateContext,
'__sentry_override_normalization_depth__',
3 + // 3 layers for `state.value.transformedState`
normalizationDepth, // rest for the actual state
);
scope.setContext('state', newStateContext);
} else {
scope.setContext('state', null);
}
/* Allow user to configure scope with latest state */
const { configureScopeWithState } = options;
if (typeof configureScopeWithState === 'function') {
configureScopeWithState(scope, newState);
}
return newState;
};
}
const store = next(sentryWrapReducer(reducer), initialState);
// eslint-disable-next-line @typescript-eslint/unbound-method
store.replaceReducer = new Proxy(store.replaceReducer, {
apply: function (target, thisArg, args) {
target.apply(thisArg, [sentryWrapReducer(args[0])]);
},
});
return store;
};
}
export { createReduxEnhancer };
//# sourceMappingURL=redux.js.map

View File

@@ -0,0 +1,36 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const errors_js_1 = require("../util/errors.js");
function validateCrit(Err, recognizedDefault, recognizedOption, protectedHeader, joseHeader) {
if (joseHeader.crit !== undefined && protectedHeader?.crit === undefined) {
throw new Err('"crit" (Critical) Header Parameter MUST be integrity protected');
}
if (!protectedHeader || protectedHeader.crit === undefined) {
return new Set();
}
if (!Array.isArray(protectedHeader.crit) ||
protectedHeader.crit.length === 0 ||
protectedHeader.crit.some((input) => typeof input !== 'string' || input.length === 0)) {
throw new Err('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');
}
let recognized;
if (recognizedOption !== undefined) {
recognized = new Map([...Object.entries(recognizedOption), ...recognizedDefault.entries()]);
}
else {
recognized = recognizedDefault;
}
for (const parameter of protectedHeader.crit) {
if (!recognized.has(parameter)) {
throw new errors_js_1.JOSENotSupported(`Extension Header Parameter "${parameter}" is not recognized`);
}
if (joseHeader[parameter] === undefined) {
throw new Err(`Extension Header Parameter "${parameter}" is missing`);
}
if (recognized.get(parameter) && protectedHeader[parameter] === undefined) {
throw new Err(`Extension Header Parameter "${parameter}" MUST be integrity protected`);
}
}
return new Set(protectedHeader.crit);
}
exports.default = validateCrit;

View File

@@ -0,0 +1,11 @@
import type { AdminViewConfig, SanitizedConfig } from 'payload';
import type { ViewFromConfig } from './getRouteData.js';
export declare const getCustomViewByRoute: ({ config, currentRoute: currentRouteWithAdmin, }: {
config: SanitizedConfig;
currentRoute: string;
}) => {
view: ViewFromConfig;
viewConfig: AdminViewConfig;
viewKey: string;
};
//# sourceMappingURL=getCustomViewByRoute.d.ts.map

View File

@@ -0,0 +1,46 @@
var baseKeys = require('./_baseKeys'),
getTag = require('./_getTag'),
isArrayLike = require('./isArrayLike'),
isString = require('./isString'),
stringSize = require('./_stringSize');
/** `Object#toString` result references. */
var mapTag = '[object Map]',
setTag = '[object Set]';
/**
* Gets the size of `collection` by returning its length for array-like
* values or the number of own enumerable string keyed properties for objects.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Collection
* @param {Array|Object|string} collection The collection to inspect.
* @returns {number} Returns the collection size.
* @example
*
* _.size([1, 2, 3]);
* // => 3
*
* _.size({ 'a': 1, 'b': 2 });
* // => 2
*
* _.size('pebbles');
* // => 7
*/
function size(collection) {
if (collection == null) {
return 0;
}
if (isArrayLike(collection)) {
return isString(collection) ? stringSize(collection) : collection.length;
}
var tag = getTag(collection);
if (tag == mapTag || tag == setTag) {
return collection.size;
}
return baseKeys(collection).length;
}
module.exports = size;

View File

@@ -0,0 +1,7 @@
import type { SanitizedConfig } from 'payload';
export declare const isPublicAdminRoute: ({ adminRoute, config, route, }: {
adminRoute: string;
config: SanitizedConfig;
route: string;
}) => boolean;
//# sourceMappingURL=isPublicAdminRoute.d.ts.map

View File

@@ -0,0 +1,164 @@
import { buildLocalizeFn } from "../../_lib/buildLocalizeFn.mjs";
const eraValues = {
narrow: ["AC", "DC"],
abbreviated: ["AC", "DC"],
wide: ["antes de cristo", "después de cristo"],
};
const quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["T1", "T2", "T3", "T4"],
wide: ["1º trimestre", "2º trimestre", "3º trimestre", "4º trimestre"],
};
const monthValues = {
narrow: ["e", "f", "m", "a", "m", "j", "j", "a", "s", "o", "n", "d"],
abbreviated: [
"ene",
"feb",
"mar",
"abr",
"may",
"jun",
"jul",
"ago",
"sep",
"oct",
"nov",
"dic",
],
wide: [
"enero",
"febrero",
"marzo",
"abril",
"mayo",
"junio",
"julio",
"agosto",
"septiembre",
"octubre",
"noviembre",
"diciembre",
],
};
const dayValues = {
narrow: ["d", "l", "m", "m", "j", "v", "s"],
short: ["do", "lu", "ma", "mi", "ju", "vi", "sá"],
abbreviated: ["dom", "lun", "mar", "mié", "jue", "vie", "sáb"],
wide: [
"domingo",
"lunes",
"martes",
"miércoles",
"jueves",
"viernes",
"sábado",
],
};
const dayPeriodValues = {
narrow: {
am: "a",
pm: "p",
midnight: "mn",
noon: "md",
morning: "mañana",
afternoon: "tarde",
evening: "tarde",
night: "noche",
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "medianoche",
noon: "mediodia",
morning: "mañana",
afternoon: "tarde",
evening: "tarde",
night: "noche",
},
wide: {
am: "a.m.",
pm: "p.m.",
midnight: "medianoche",
noon: "mediodia",
morning: "mañana",
afternoon: "tarde",
evening: "tarde",
night: "noche",
},
};
const formattingDayPeriodValues = {
narrow: {
am: "a",
pm: "p",
midnight: "mn",
noon: "md",
morning: "de la mañana",
afternoon: "de la tarde",
evening: "de la tarde",
night: "de la noche",
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "medianoche",
noon: "mediodia",
morning: "de la mañana",
afternoon: "de la tarde",
evening: "de la tarde",
night: "de la noche",
},
wide: {
am: "a.m.",
pm: "p.m.",
midnight: "medianoche",
noon: "mediodia",
morning: "de la mañana",
afternoon: "de la tarde",
evening: "de la tarde",
night: "de la noche",
},
};
const ordinalNumber = (dirtyNumber, _options) => {
const number = Number(dirtyNumber);
return number + "º";
};
export const localize = {
ordinalNumber: ordinalNumber,
era: buildLocalizeFn({
values: eraValues,
defaultWidth: "wide",
}),
quarter: buildLocalizeFn({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: (quarter) => Number(quarter) - 1,
}),
month: buildLocalizeFn({
values: monthValues,
defaultWidth: "wide",
}),
day: buildLocalizeFn({
values: dayValues,
defaultWidth: "wide",
}),
dayPeriod: buildLocalizeFn({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide",
}),
};

View File

@@ -0,0 +1,353 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const currentScopes = require('../currentScopes.js');
const debugBuild = require('../debug-build.js');
const semanticAttributes = require('../semanticAttributes.js');
const debugLogger = require('../utils/debug-logger.js');
const hasSpansEnabled = require('../utils/hasSpansEnabled.js');
const shouldIgnoreSpan = require('../utils/should-ignore-span.js');
const spanOnScope = require('../utils/spanOnScope.js');
const spanUtils = require('../utils/spanUtils.js');
const time = require('../utils/time.js');
const dynamicSamplingContext = require('./dynamicSamplingContext.js');
const sentryNonRecordingSpan = require('./sentryNonRecordingSpan.js');
const sentrySpan = require('./sentrySpan.js');
const spanstatus = require('./spanstatus.js');
const trace = require('./trace.js');
const TRACING_DEFAULTS = {
idleTimeout: 1000,
finalTimeout: 30000,
childSpanTimeout: 15000,
};
const FINISH_REASON_HEARTBEAT_FAILED = 'heartbeatFailed';
const FINISH_REASON_IDLE_TIMEOUT = 'idleTimeout';
const FINISH_REASON_FINAL_TIMEOUT = 'finalTimeout';
const FINISH_REASON_EXTERNAL_FINISH = 'externalFinish';
/**
* An idle span is a span that automatically finishes. It does this by tracking child spans as activities.
* An idle span is always the active span.
*/
function startIdleSpan(startSpanOptions, options = {}) {
// Activities store a list of active spans
const activities = new Map();
// We should not use heartbeat if we finished a span
let _finished = false;
// Timer that tracks idleTimeout
let _idleTimeoutID;
// The reason why the span was finished
let _finishReason = FINISH_REASON_EXTERNAL_FINISH;
let _autoFinishAllowed = !options.disableAutoFinish;
const _cleanupHooks = [];
const {
idleTimeout = TRACING_DEFAULTS.idleTimeout,
finalTimeout = TRACING_DEFAULTS.finalTimeout,
childSpanTimeout = TRACING_DEFAULTS.childSpanTimeout,
beforeSpanEnd,
trimIdleSpanEndTimestamp = true,
} = options;
const client = currentScopes.getClient();
if (!client || !hasSpansEnabled.hasSpansEnabled()) {
const span = new sentryNonRecordingSpan.SentryNonRecordingSpan();
const dsc = {
sample_rate: '0',
sampled: 'false',
...dynamicSamplingContext.getDynamicSamplingContextFromSpan(span),
} ;
dynamicSamplingContext.freezeDscOnSpan(span, dsc);
return span;
}
const scope = currentScopes.getCurrentScope();
const previousActiveSpan = spanUtils.getActiveSpan();
const span = _startIdleSpan(startSpanOptions);
// We patch span.end to ensure we can run some things before the span is ended
// eslint-disable-next-line @typescript-eslint/unbound-method
span.end = new Proxy(span.end, {
apply(target, thisArg, args) {
if (beforeSpanEnd) {
beforeSpanEnd(span);
}
// If the span is non-recording, nothing more to do here...
// This is the case if tracing is enabled but this specific span was not sampled
if (thisArg instanceof sentryNonRecordingSpan.SentryNonRecordingSpan) {
return;
}
// Just ensuring that this keeps working, even if we ever have more arguments here
const [definedEndTimestamp, ...rest] = args;
const timestamp = definedEndTimestamp || time.timestampInSeconds();
const spanEndTimestamp = spanUtils.spanTimeInputToSeconds(timestamp);
// Ensure we end with the last span timestamp, if possible
const spans = spanUtils.getSpanDescendants(span).filter(child => child !== span);
const spanJson = spanUtils.spanToJSON(span);
// If we have no spans, we just end, nothing else to do here
// Likewise, if users explicitly ended the span, we simply end the span without timestamp adjustment
if (!spans.length || !trimIdleSpanEndTimestamp) {
onIdleSpanEnded(spanEndTimestamp);
return Reflect.apply(target, thisArg, [spanEndTimestamp, ...rest]);
}
const ignoreSpans = client.getOptions().ignoreSpans;
const latestSpanEndTimestamp = spans?.reduce((acc, current) => {
const currentSpanJson = spanUtils.spanToJSON(current);
if (!currentSpanJson.timestamp) {
return acc;
}
// Ignored spans will get dropped later (in the client) but since we already adjust
// the idle span end timestamp here, we can already take to-be-ignored spans out of
// the calculation here.
if (ignoreSpans && shouldIgnoreSpan.shouldIgnoreSpan(currentSpanJson, ignoreSpans)) {
return acc;
}
return acc ? Math.max(acc, currentSpanJson.timestamp) : currentSpanJson.timestamp;
}, undefined);
// In reality this should always exist here, but type-wise it may be undefined...
const spanStartTimestamp = spanJson.start_timestamp;
// The final endTimestamp should:
// * Never be before the span start timestamp
// * Be the latestSpanEndTimestamp, if there is one, and it is smaller than the passed span end timestamp
// * Otherwise be the passed end timestamp
// Final timestamp can never be after finalTimeout
const endTimestamp = Math.min(
spanStartTimestamp ? spanStartTimestamp + finalTimeout / 1000 : Infinity,
Math.max(spanStartTimestamp || -Infinity, Math.min(spanEndTimestamp, latestSpanEndTimestamp || Infinity)),
);
onIdleSpanEnded(endTimestamp);
return Reflect.apply(target, thisArg, [endTimestamp, ...rest]);
},
});
/**
* Cancels the existing idle timeout, if there is one.
*/
function _cancelIdleTimeout() {
if (_idleTimeoutID) {
clearTimeout(_idleTimeoutID);
_idleTimeoutID = undefined;
}
}
/**
* Restarts idle timeout, if there is no running idle timeout it will start one.
*/
function _restartIdleTimeout(endTimestamp) {
_cancelIdleTimeout();
_idleTimeoutID = setTimeout(() => {
if (!_finished && activities.size === 0 && _autoFinishAllowed) {
_finishReason = FINISH_REASON_IDLE_TIMEOUT;
span.end(endTimestamp);
}
}, idleTimeout);
}
/**
* Restarts child span timeout, if there is none running it will start one.
*/
function _restartChildSpanTimeout(endTimestamp) {
_idleTimeoutID = setTimeout(() => {
if (!_finished && _autoFinishAllowed) {
_finishReason = FINISH_REASON_HEARTBEAT_FAILED;
span.end(endTimestamp);
}
}, childSpanTimeout);
}
/**
* Start tracking a specific activity.
* @param spanId The span id that represents the activity
*/
function _pushActivity(spanId) {
_cancelIdleTimeout();
activities.set(spanId, true);
const endTimestamp = time.timestampInSeconds();
// We need to add the timeout here to have the real endtimestamp of the idle span
// Remember timestampInSeconds is in seconds, timeout is in ms
_restartChildSpanTimeout(endTimestamp + childSpanTimeout / 1000);
}
/**
* Remove an activity from usage
* @param spanId The span id that represents the activity
*/
function _popActivity(spanId) {
if (activities.has(spanId)) {
activities.delete(spanId);
}
if (activities.size === 0) {
const endTimestamp = time.timestampInSeconds();
// We need to add the timeout here to have the real endtimestamp of the idle span
// Remember timestampInSeconds is in seconds, timeout is in ms
_restartIdleTimeout(endTimestamp + idleTimeout / 1000);
}
}
function onIdleSpanEnded(endTimestamp) {
_finished = true;
activities.clear();
_cleanupHooks.forEach(cleanup => cleanup());
spanOnScope._setSpanForScope(scope, previousActiveSpan);
const spanJSON = spanUtils.spanToJSON(span);
const { start_timestamp: startTimestamp } = spanJSON;
// This should never happen, but to make TS happy...
if (!startTimestamp) {
return;
}
const attributes = spanJSON.data;
if (!attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON]) {
span.setAttribute(semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON, _finishReason);
}
// Set span status to 'ok' if it hasn't been explicitly set to an error status
const currentStatus = spanJSON.status;
if (!currentStatus || currentStatus === 'unknown') {
span.setStatus({ code: spanstatus.SPAN_STATUS_OK });
}
debugLogger.debug.log(`[Tracing] Idle span "${spanJSON.op}" finished`);
const childSpans = spanUtils.getSpanDescendants(span).filter(child => child !== span);
let discardedSpans = 0;
childSpans.forEach(childSpan => {
// We cancel all pending spans with status "cancelled" to indicate the idle span was finished early
if (childSpan.isRecording()) {
childSpan.setStatus({ code: spanstatus.SPAN_STATUS_ERROR, message: 'cancelled' });
childSpan.end(endTimestamp);
debugBuild.DEBUG_BUILD &&
debugLogger.debug.log('[Tracing] Cancelling span since span ended early', JSON.stringify(childSpan, undefined, 2));
}
const childSpanJSON = spanUtils.spanToJSON(childSpan);
const { timestamp: childEndTimestamp = 0, start_timestamp: childStartTimestamp = 0 } = childSpanJSON;
const spanStartedBeforeIdleSpanEnd = childStartTimestamp <= endTimestamp;
// Add a delta with idle timeout so that we prevent false positives
const timeoutWithMarginOfError = (finalTimeout + idleTimeout) / 1000;
const spanEndedBeforeFinalTimeout = childEndTimestamp - childStartTimestamp <= timeoutWithMarginOfError;
if (debugBuild.DEBUG_BUILD) {
const stringifiedSpan = JSON.stringify(childSpan, undefined, 2);
if (!spanStartedBeforeIdleSpanEnd) {
debugLogger.debug.log('[Tracing] Discarding span since it happened after idle span was finished', stringifiedSpan);
} else if (!spanEndedBeforeFinalTimeout) {
debugLogger.debug.log('[Tracing] Discarding span since it finished after idle span final timeout', stringifiedSpan);
}
}
if (!spanEndedBeforeFinalTimeout || !spanStartedBeforeIdleSpanEnd) {
spanUtils.removeChildSpanFromSpan(span, childSpan);
discardedSpans++;
}
});
if (discardedSpans > 0) {
span.setAttribute('sentry.idle_span_discarded_spans', discardedSpans);
}
}
_cleanupHooks.push(
client.on('spanStart', startedSpan => {
// If we already finished the idle span,
// or if this is the idle span itself being started,
// or if the started span has already been closed,
// we don't care about it for activity
if (
_finished ||
startedSpan === span ||
!!spanUtils.spanToJSON(startedSpan).timestamp ||
(startedSpan instanceof sentrySpan.SentrySpan && startedSpan.isStandaloneSpan())
) {
return;
}
const allSpans = spanUtils.getSpanDescendants(span);
// If the span that was just started is a child of the idle span, we should track it
if (allSpans.includes(startedSpan)) {
_pushActivity(startedSpan.spanContext().spanId);
}
}),
);
_cleanupHooks.push(
client.on('spanEnd', endedSpan => {
if (_finished) {
return;
}
_popActivity(endedSpan.spanContext().spanId);
}),
);
_cleanupHooks.push(
client.on('idleSpanEnableAutoFinish', spanToAllowAutoFinish => {
if (spanToAllowAutoFinish === span) {
_autoFinishAllowed = true;
_restartIdleTimeout();
if (activities.size) {
_restartChildSpanTimeout();
}
}
}),
);
// We only start the initial idle timeout if we are not delaying the auto finish
if (!options.disableAutoFinish) {
_restartIdleTimeout();
}
setTimeout(() => {
if (!_finished) {
span.setStatus({ code: spanstatus.SPAN_STATUS_ERROR, message: 'deadline_exceeded' });
_finishReason = FINISH_REASON_FINAL_TIMEOUT;
span.end();
}
}, finalTimeout);
return span;
}
function _startIdleSpan(options) {
const span = trace.startInactiveSpan(options);
spanOnScope._setSpanForScope(currentScopes.getCurrentScope(), span);
debugBuild.DEBUG_BUILD && debugLogger.debug.log('[Tracing] Started span is an idle span');
return span;
}
exports.TRACING_DEFAULTS = TRACING_DEFAULTS;
exports.startIdleSpan = startIdleSpan;
//# sourceMappingURL=idleSpan.js.map

View File

@@ -0,0 +1,3 @@
export { KnexInstrumentation } from './instrumentation';
export type { KnexInstrumentationConfig } from './types';
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/tracing/anthropic-ai/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAiB,MAAM,cAAc,CAAC;AAKtE,eAAO,MAAM,qBAAqB;;CAGjC,CAAC;AAYF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,eAAO,MAAM,sBAAsB,kFAA6C,CAAC"}

View File

@@ -0,0 +1,67 @@
'use strict'
const assert = require('node:assert')
const WrapHandler = require('./wrap-handler')
/**
* @deprecated
*/
module.exports = class DecoratorHandler {
#handler
#onCompleteCalled = false
#onErrorCalled = false
#onResponseStartCalled = false
constructor (handler) {
if (typeof handler !== 'object' || handler === null) {
throw new TypeError('handler must be an object')
}
this.#handler = WrapHandler.wrap(handler)
}
onRequestStart (...args) {
this.#handler.onRequestStart?.(...args)
}
onRequestUpgrade (...args) {
assert(!this.#onCompleteCalled)
assert(!this.#onErrorCalled)
return this.#handler.onRequestUpgrade?.(...args)
}
onResponseStart (...args) {
assert(!this.#onCompleteCalled)
assert(!this.#onErrorCalled)
assert(!this.#onResponseStartCalled)
this.#onResponseStartCalled = true
return this.#handler.onResponseStart?.(...args)
}
onResponseData (...args) {
assert(!this.#onCompleteCalled)
assert(!this.#onErrorCalled)
return this.#handler.onResponseData?.(...args)
}
onResponseEnd (...args) {
assert(!this.#onCompleteCalled)
assert(!this.#onErrorCalled)
this.#onCompleteCalled = true
return this.#handler.onResponseEnd?.(...args)
}
onResponseError (...args) {
this.#onErrorCalled = true
return this.#handler.onResponseError?.(...args)
}
/**
* @deprecated
*/
onBodySent () {}
}

View File

@@ -0,0 +1,65 @@
"use strict";
exports.formatRelative = void 0;
var _index = require("../../../isSameWeek.cjs");
const accusativeWeekdays = [
"жексенбіде",
"дүйсенбіде",
"сейсенбіде",
"сәрсенбіде",
"бейсенбіде",
"жұмада",
"сенбіде",
];
function lastWeek(day) {
const weekday = accusativeWeekdays[day];
return "'өткен " + weekday + " сағат' p'-де'";
}
function thisWeek(day) {
const weekday = accusativeWeekdays[day];
return "'" + weekday + " сағат' p'-де'";
}
function nextWeek(day) {
const weekday = accusativeWeekdays[day];
return "'келесі " + weekday + " сағат' p'-де'";
}
const formatRelativeLocale = {
lastWeek: (date, baseDate, options) => {
const day = date.getDay();
if ((0, _index.isSameWeek)(date, baseDate, options)) {
return thisWeek(day);
} else {
return lastWeek(day);
}
},
yesterday: "'кеше сағат' p'-де'",
today: "'бүгін сағат' p'-де'",
tomorrow: "'ертең сағат' p'-де'",
nextWeek: (date, baseDate, options) => {
const day = date.getDay();
if ((0, _index.isSameWeek)(date, baseDate, options)) {
return thisWeek(day);
} else {
return nextWeek(day);
}
},
other: "P",
};
const formatRelative = (token, date, baseDate, options) => {
const format = formatRelativeLocale[token];
if (typeof format === "function") {
return format(date, baseDate, options);
}
return format;
};
exports.formatRelative = formatRelative;

View File

@@ -0,0 +1,6 @@
export * from './trace';
export * from './resource';
export * from './stable_attributes';
export * from './stable_metrics';
export * from './stable_events';
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,165 @@
import { buildLocalizeFn } from "../../_lib/buildLocalizeFn.js";
const eraValues = {
narrow: ["pr. n. št.", "po n. št."],
abbreviated: ["pr. n. št.", "po n. št."],
wide: ["pred našim štetjem", "po našem štetju"],
};
const quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["1. čet.", "2. čet.", "3. čet.", "4. čet."],
wide: ["1. četrtletje", "2. četrtletje", "3. četrtletje", "4. četrtletje"],
};
const monthValues = {
narrow: ["j", "f", "m", "a", "m", "j", "j", "a", "s", "o", "n", "d"],
abbreviated: [
"jan.",
"feb.",
"mar.",
"apr.",
"maj",
"jun.",
"jul.",
"avg.",
"sep.",
"okt.",
"nov.",
"dec.",
],
wide: [
"januar",
"februar",
"marec",
"april",
"maj",
"junij",
"julij",
"avgust",
"september",
"oktober",
"november",
"december",
],
};
const dayValues = {
narrow: ["n", "p", "t", "s", "č", "p", "s"],
short: ["ned.", "pon.", "tor.", "sre.", "čet.", "pet.", "sob."],
abbreviated: ["ned.", "pon.", "tor.", "sre.", "čet.", "pet.", "sob."],
wide: [
"nedelja",
"ponedeljek",
"torek",
"sreda",
"četrtek",
"petek",
"sobota",
],
};
const dayPeriodValues = {
narrow: {
am: "d",
pm: "p",
midnight: "24.00",
noon: "12.00",
morning: "j",
afternoon: "p",
evening: "v",
night: "n",
},
abbreviated: {
am: "dop.",
pm: "pop.",
midnight: "poln.",
noon: "pold.",
morning: "jut.",
afternoon: "pop.",
evening: "več.",
night: "noč",
},
wide: {
am: "dop.",
pm: "pop.",
midnight: "polnoč",
noon: "poldne",
morning: "jutro",
afternoon: "popoldne",
evening: "večer",
night: "noč",
},
};
const formattingDayPeriodValues = {
narrow: {
am: "d",
pm: "p",
midnight: "24.00",
noon: "12.00",
morning: "zj",
afternoon: "p",
evening: "zv",
night: "po",
},
abbreviated: {
am: "dop.",
pm: "pop.",
midnight: "opoln.",
noon: "opold.",
morning: "zjut.",
afternoon: "pop.",
evening: "zveč.",
night: "ponoči",
},
wide: {
am: "dop.",
pm: "pop.",
midnight: "opolnoči",
noon: "opoldne",
morning: "zjutraj",
afternoon: "popoldan",
evening: "zvečer",
night: "ponoči",
},
};
const ordinalNumber = (dirtyNumber, _options) => {
const number = Number(dirtyNumber);
return number + ".";
};
export const localize = {
ordinalNumber,
era: buildLocalizeFn({
values: eraValues,
defaultWidth: "wide",
}),
quarter: buildLocalizeFn({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: (quarter) => quarter - 1,
}),
month: buildLocalizeFn({
values: monthValues,
defaultWidth: "wide",
}),
day: buildLocalizeFn({
values: dayValues,
defaultWidth: "wide",
}),
dayPeriod: buildLocalizeFn({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide",
}),
};

View File

@@ -0,0 +1,23 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const BicepsFlexed = createLucideIcon("BicepsFlexed", [
[
"path",
{
d: "M12.409 13.017A5 5 0 0 1 22 15c0 3.866-4 7-9 7-4.077 0-8.153-.82-10.371-2.462-.426-.316-.631-.832-.62-1.362C2.118 12.723 2.627 2 10 2a3 3 0 0 1 3 3 2 2 0 0 1-2 2c-1.105 0-1.64-.444-2-1",
key: "1pmlyh"
}
],
["path", { d: "M15 14a5 5 0 0 0-7.584 2", key: "5rb254" }],
["path", { d: "M9.964 6.825C8.019 7.977 9.5 13 8 15", key: "kbvsx9" }]
]);
export { BicepsFlexed as default };
//# sourceMappingURL=biceps-flexed.js.map

View File

@@ -0,0 +1,50 @@
import { GraphQLScalarType, Kind } from 'graphql';
// Taken from https://gist.github.com/langpavel/b30f3d507a47713b0c6e89016e4e9eb7
function serializeDate(value) {
if (value instanceof Date) {
return value.getTime();
}
else if (typeof value === 'number') {
return Math.trunc(value);
}
else if (typeof value === 'string') {
return Date.parse(value);
}
return null;
}
function parseDate(value) {
if (value === null) {
return null;
}
try {
return new Date(value);
}
catch (err) {
return null;
}
}
function parseDateFromLiteral(ast) {
if (ast.kind === Kind.INT) {
const num = parseInt(ast.value, 10);
return new Date(num);
}
else if (ast.kind === Kind.STRING) {
return parseDate(ast.value);
}
return null;
}
export const GraphQLTimestamp = /*#__PURE__*/ new GraphQLScalarType({
name: 'Timestamp',
description: 'The javascript `Date` as integer. Type represents date and time ' +
'as number of milliseconds from start of UNIX epoch.',
serialize: serializeDate,
parseValue: parseDate,
parseLiteral: parseDateFromLiteral,
extensions: {
codegenScalarType: 'Date | string | number',
jsonSchema: {
type: 'string',
format: 'unix-time',
},
},
});

Some files were not shown because too many files have changed in this diff Show More