fix(products): fix breadcrumbs and product filtering (backport from main)
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
@@ -0,0 +1,13 @@
/**
* https://tc39.es/ecma402/#sec-getoption
* @param opts
* @param prop
* @param type
* @param values
* @param fallback
*/
export declare function GetOption<
T extends object,
K extends keyof T,
F
>(opts: T, prop: K, type: "string" | "boolean", values: readonly T[K][] | undefined, fallback: F): Exclude<T[K], undefined> | F;
@@ -0,0 +1 @@
{"version":3,"file":"verifyEmail.d.ts","sourceRoot":"","sources":["../../../src/auth/endpoints/verifyEmail.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAM3D,eAAO,MAAM,kBAAkB,EAAE,cAqBhC,CAAA"}
@@ -0,0 +1,160 @@
import type { CaptureContext } from './scope';
import type { CheckIn, MonitorConfig } from './types-hoist/checkin';
import type { Event, EventHint } from './types-hoist/event';
import type { EventProcessor } from './types-hoist/eventprocessor';
import type { Extra, Extras } from './types-hoist/extra';
import type { Primitive } from './types-hoist/misc';
import type { Session, SessionContext } from './types-hoist/session';
import type { SeverityLevel } from './types-hoist/severity';
import type { User } from './types-hoist/user';
import type { ExclusiveEventHintOrCaptureContext } from './utils/prepareEvent';
/**
* Captures an exception event and sends it to Sentry.
*
* @param exception The exception to capture.
* @param hint Optional additional data to attach to the Sentry event.
* @returns the id of the captured Sentry event.
*/
export declare function captureException(exception: unknown, hint?: ExclusiveEventHintOrCaptureContext): string;
/**
* Captures a message event and sends it to Sentry.
*
* @param message The message to send to Sentry.
* @param captureContext Define the level of the message or pass in additional data to attach to the message.
* @returns the id of the captured message.
*/
export declare function captureMessage(message: string, captureContext?: CaptureContext | SeverityLevel): string;
/**
* Captures a manually created event and sends it to Sentry.
*
* @param event The event to send to Sentry.
* @param hint Optional additional data to attach to the Sentry event.
* @returns the id of the captured event.
*/
export declare function captureEvent(event: Event, hint?: EventHint): string;
/**
* Sets context data with the given name.
* @param name of the context
* @param context Any kind of data. This data will be normalized.
*/
export declare function setContext(name: string, context: {
[key: string]: unknown;
} | null): void;
/**
* Set an object that will be merged sent as extra data with the event.
* @param extras Extras object to merge into current context.
*/
export declare function setExtras(extras: Extras): void;
/**
* Set key:value that will be sent as extra data with the event.
* @param key String of extra
* @param extra Any kind of data. This data will be normalized.
*/
export declare function setExtra(key: string, extra: Extra): void;
/**
* Set an object that will be merged sent as tags data with the event.
* @param tags Tags context object to merge into current context.
*/
export declare function setTags(tags: {
[key: string]: Primitive;
}): void;
/**
* Set key:value that will be sent as tags data with the event.
*
* Can also be used to unset a tag, by passing `undefined`.
*
* @param key String key of tag
* @param value Value of tag
*/
export declare function setTag(key: string, value: Primitive): void;
/**
* Updates user context information for future events.
*
* @param user User context object to be set in the current context. Pass `null` to unset the user.
*/
export declare function setUser(user: User | null): void;
/**
* Sets the conversation ID for the current isolation scope.
*
* @param conversationId The conversation ID to set. Pass `null` or `undefined` to unset the conversation ID.
*/
export declare function setConversationId(conversationId: string | null | undefined): void;
/**
* The last error event id of the isolation scope.
*
* Warning: This function really returns the last recorded error event id on the current
* isolation scope. If you call this function after handling a certain error and another error
* is captured in between, the last one is returned instead of the one you might expect.
* Also, ids of events that were never sent to Sentry (for example because
* they were dropped in `beforeSend`) could be returned.
*
* @returns The last event id of the isolation scope.
*/
export declare function lastEventId(): string | undefined;
/**
* Create a cron monitor check in and send it to Sentry.
*
* @param checkIn An object that describes a check in.
* @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want
* to create a monitor automatically when sending a check in.
*/
export declare function captureCheckIn(checkIn: CheckIn, upsertMonitorConfig?: MonitorConfig): string;
/**
* Wraps a callback with a cron monitor check in. The check in will be sent to Sentry when the callback finishes.
*
* @param monitorSlug The distinct slug of the monitor.
* @param callback Callback to be monitored
* @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want
* to create a monitor automatically when sending a check in.
*/
export declare function withMonitor<T>(monitorSlug: CheckIn['monitorSlug'], callback: () => T, upsertMonitorConfig?: MonitorConfig): T;
/**
* Call `flush()` on the current client, if there is one. See {@link Client.flush}.
*
* @param timeout Maximum time in ms the client should wait to flush its event queue. Omitting this parameter will cause
* the client to wait until all events are sent before resolving the promise.
* @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it
* doesn't (or if there's no client defined).
*/
export declare function flush(timeout?: number): Promise<boolean>;
/**
* Call `close()` on the current client, if there is one. See {@link Client.close}.
*
* @param timeout Maximum time in ms the client should wait to flush its event queue before shutting down. Omitting this
* parameter will cause the client to wait until all events are sent before disabling itself.
* @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it
* doesn't (or if there's no client defined).
*/
export declare function close(timeout?: number): Promise<boolean>;
/**
* Returns true if Sentry has been properly initialized.
*/
export declare function isInitialized(): boolean;
/** If the SDK is initialized & enabled. */
export declare function isEnabled(): boolean;
/**
* Add an event processor.
* This will be added to the current isolation scope, ensuring any event that is processed in the current execution
* context will have the processor applied.
*/
export declare function addEventProcessor(callback: EventProcessor): void;
/**
* Start a session on the current isolation scope.
*
* @param context (optional) additional properties to be applied to the returned session object
*
* @returns the new active session
*/
export declare function startSession(context?: SessionContext): Session;
/**
* End the session on the current isolation scope.
*/
export declare function endSession(): void;
/**
* Sends the current session on the scope to Sentry
*
* @param end If set the session will be marked as exited and removed from the scope.
* Defaults to `false`.
*/
export declare function captureSession(end?: boolean): void;
//# sourceMappingURL=exports.d.ts.map
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"B","2":"K D E F A zC"},B:{"2":"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":"9 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","2":"0 1 2 3 4 5 6 7 8 0C VC J bB K D E F A B C 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 4C 5C"},D:{"1":"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","2":"0 1 2 3 4 5 6 7 8 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"},E:{"1":"E F A B C AD cC PC","2":"J bB K D 6C bC 7C 8C 9C","129":"L M G 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"},F:{"1":"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 pB rB QC","2":"0 1 2 3 4 5 6 7 8 F B C nB oB qB 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 JD KD LD MD PC xC ND"},G:{"1":"E SD TD UD VD WD XD YD ZD","2":"bC OD yC PD QD RD","257":"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"},H:{"2":"mD"},I:{"1":"VC J qD yC rD sD","2":"I nD oD pD"},J:{"2":"D A"},K:{"1":"QC","2":"A B C H PC xC"},L:{"2":"I"},M:{"2":"OC"},N:{"1":"B","2":"A"},O:{"2":"RC"},P:{"1":"J","2":"9 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:{"2":"4D"},R:{"2":"5D"},S:{"1":"6D","2":"7D"}},B:7,C:"SPDY protocol",D:true};
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('next', require('../next'), require('./_falseOptions'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B zC"},B:{"1":"JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I","2":"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"},C:{"2":"0 1 2 3 4 5 6 7 8 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 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 4C 5C","194":"aB","260":"I ZC aC OC 1C 2C 3C"},D:{"1":"JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I ZC aC OC","2":"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 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"},E:{"1":"qC rC sC HD tC uC vC wC ID","2":"J bB K D E F A B C L M G 6C bC 7C 8C 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"},F:{"1":"0 1 2 3 4 5 6 7 8 v w x y z","2":"9 F 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 JD KD LD MD PC xC ND QC"},G:{"1":"qC rC sC lD tC uC vC wC","2":"E bC OD yC PD QD 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"},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:{"260":"OC"},N:{"2":"A B"},O:{"2":"RC"},P:{"2":"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:{"2":"4D"},R:{"2":"5D"},S:{"2":"6D 7D"}},B:5,C:"View Transitions (cross-document)",D:true};
@@ -0,0 +1,537 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Ivan Kopeykin @vankop
*/
"use strict";
const { CSS_TYPE, JAVASCRIPT_TYPE } = require("../ModuleSourceTypeConstants");
const WebpackError = require("../WebpackError");
const { cssExportConvention } = require("../util/conventions");
const createHash = require("../util/createHash");
const { makePathsRelative } = require("../util/identifier");
const makeSerializable = require("../util/makeSerializable");
const memoize = require("../util/memoize");
const nonNumericOnlyHash = require("../util/nonNumericOnlyHash");
const CssIcssImportDependency = require("./CssIcssImportDependency");
const NullDependency = require("./NullDependency");
const getCssParser = memoize(() => require("../css/CssParser"));
/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */
/** @typedef {import("../../declarations/WebpackOptions").CssGeneratorExportsConvention} CssGeneratorExportsConvention */
/** @typedef {import("../../declarations/WebpackOptions").CssGeneratorLocalIdentName} CssGeneratorLocalIdentName */
/** @typedef {import("../CssModule")} CssModule */
/** @typedef {import("../Dependency")} Dependency */
/** @typedef {import("../Dependency").ReferencedExports} ReferencedExports */
/** @typedef {import("../Dependency").ExportsSpec} ExportsSpec */
/** @typedef {import("../Dependency").UpdateHashContext} UpdateHashContext */
/** @typedef {import("../DependencyTemplate").CssDependencyTemplateContext} DependencyTemplateContext */
/** @typedef {import("../ModuleGraph")} ModuleGraph */
/** @typedef {import("../css/CssGenerator")} CssGenerator */
/** @typedef {import("../serialization/ObjectMiddleware").ObjectDeserializerContext} ObjectDeserializerContext */
/** @typedef {import("../serialization/ObjectMiddleware").ObjectSerializerContext} ObjectSerializerContext */
/** @typedef {import("../util/Hash")} Hash */
/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */
/** @typedef {import("../ChunkGraph")} ChunkGraph */
/** @typedef {import("../RuntimeTemplate")} RuntimeTemplate */
/** @typedef {import("../css/CssParser").Range} Range */
/**
* @param {string} local css local
* @param {CssModule} module module
* @param {ChunkGraph} chunkGraph chunk graph
* @param {RuntimeTemplate} runtimeTemplate runtime template
* @returns {string} local ident
*/
const getLocalIdent = (local, module, chunkGraph, runtimeTemplate) => {
const generator = /** @type {CssGenerator} */ (module.generator);
const localIdentName =
/** @type {CssGeneratorLocalIdentName} */
(generator.options.localIdentName);
const relativeResourcePath = makePathsRelative(
/** @type {string} */
(module.context),
/** @type {string} */
(module.getResource()),
runtimeTemplate.compilation.compiler.root
);
const { uniqueName } = runtimeTemplate.outputOptions;
let localIdentHash = "";
if (/\[(?:fullhash|hash)\]/.test(localIdentName)) {
const hashSalt = generator.options.localIdentHashSalt;
const hashDigest =
/** @type {string} */
(generator.options.localIdentHashDigest);
const hashDigestLength = generator.options.localIdentHashDigestLength;
const { hashFunction } = runtimeTemplate.outputOptions;
const hash = createHash(hashFunction);
if (hashSalt) {
hash.update(hashSalt);
}
if (uniqueName) {
hash.update(uniqueName);
}
hash.update(relativeResourcePath);
hash.update(local);
localIdentHash = hash.digest(hashDigest).slice(0, hashDigestLength);
}
let contentHash = "";
if (/\[contenthash\]/.test(localIdentName)) {
const hash = createHash(runtimeTemplate.outputOptions.hashFunction);
const source = module.originalSource();
if (source) {
hash.update(source.buffer());
}
if (module.error) {
hash.update(module.error.toString());
}
const fullContentHash = hash.digest(
runtimeTemplate.outputOptions.hashDigest
);
contentHash = nonNumericOnlyHash(
fullContentHash,
runtimeTemplate.outputOptions.hashDigestLength
);
}
let localIdent = runtimeTemplate.compilation.getPath(localIdentName, {
prepareId: (id) => {
if (typeof id !== "string") return id;
return id
.replace(/^([.-]|[^a-z0-9_-])+/i, "")
.replace(/[^a-z0-9_-]+/gi, "_");
},
filename: relativeResourcePath,
hash: localIdentHash,
contentHash,
chunkGraph,
module
});
if (/\[local\]/.test(localIdentName)) {
localIdent = localIdent.replace(/\[local\]/g, local);
}
if (/\[uniqueName\]/.test(localIdentName)) {
localIdent = localIdent.replace(
/\[uniqueName\]/g,
/** @type {string} */ (uniqueName)
);
}
// Protect the first character from unsupported values
return localIdent.replace(/^((-?\d)|--)/, "_$1");
};
// 0 - replace, 1 - replace, 2 - append, 2 - once
/** @typedef {0 | 1 | 2 | 3 | 4} ExportMode */
// 0 - normal, 1 - custom css variable, 2 - grid custom ident
/** @typedef {0 | 1 | 2} ExportType */
class CssIcssExportDependency extends NullDependency {
/**
* Example of dependency:
*
* :export { LOCAL_NAME: EXPORT_NAME }
* @param {string} name export name
* @param {string | [string, string, boolean]} value export value or true when we need interpolate name as a value
* @param {Range=} range range
* @param {boolean=} interpolate true when value need to be interpolated, otherwise false
* @param {ExportMode=} exportMode export mode
* @param {ExportType=} exportType export type
*/
constructor(
name,
value,
range,
interpolate = false,
exportMode = CssIcssExportDependency.EXPORT_MODE.REPLACE,
exportType = CssIcssExportDependency.EXPORT_TYPE.NORMAL
) {
super();
this.name = name;
this.value = value;
this.range = range;
this.interpolate = interpolate;
this.exportMode = exportMode;
this.exportType = exportType;
/** @type {undefined | string} */
this._hashUpdate = undefined;
}
get type() {
return "css :export";
}
/**
* @param {string} name export name
* @param {CssGeneratorExportsConvention} convention convention of the export name
* @returns {string[]} convention results
*/
getExportsConventionNames(name, convention) {
if (this._conventionNames) {
return this._conventionNames;
}
this._conventionNames = cssExportConvention(name, convention);
return this._conventionNames;
}
/**
* Returns list of exports referenced by this dependency
* @param {ModuleGraph} moduleGraph module graph
* @param {RuntimeSpec} runtime the runtime for which the module is analysed
* @returns {ReferencedExports} referenced exports
*/
getReferencedExports(moduleGraph, runtime) {
if (
this.exportMode === CssIcssExportDependency.EXPORT_MODE.SELF_REFERENCE
) {
return [
{
name: [this.name],
canMangle: true
}
];
}
return super.getReferencedExports(moduleGraph, runtime);
}
/**
* Returns the exported names
* @param {ModuleGraph} moduleGraph module graph
* @returns {ExportsSpec | undefined} export names
*/
getExports(moduleGraph) {
if (
this.exportMode === CssIcssExportDependency.EXPORT_MODE.NONE ||
this.exportMode === CssIcssExportDependency.EXPORT_MODE.SELF_REFERENCE
) {
return;
}
const module = /** @type {CssModule} */ (moduleGraph.getParentModule(this));
const generator = /** @type {CssGenerator} */ (module.generator);
const names = this.getExportsConventionNames(
this.name,
/** @type {CssGeneratorExportsConvention} */
(generator.options.exportsConvention)
);
return {
exports: [
...names,
...(Array.isArray(this.value) ? [this.value[1]] : [])
].map((name) => ({
name,
canMangle: true
})),
dependencies: undefined
};
}
/**
* Returns warnings
* @param {ModuleGraph} moduleGraph module graph
* @returns {WebpackError[] | null | undefined} warnings
*/
getWarnings(moduleGraph) {
if (
this.exportMode === CssIcssExportDependency.EXPORT_MODE.SELF_REFERENCE &&
!Array.isArray(this.value)
) {
const module = moduleGraph.getParentModule(this);
if (
module &&
!moduleGraph.getExportsInfo(module).isExportProvided(this.value)
) {
const error = new WebpackError(
`Self-referencing name "${this.value}" not found`
);
error.module = module;
return [error];
}
}
return null;
}
/**
* Update the hash
* @param {Hash} hash hash to be updated
* @param {UpdateHashContext} context context
* @returns {void}
*/
updateHash(hash, { chunkGraph }) {
if (this._hashUpdate === undefined) {
const module =
/** @type {CssModule} */
(chunkGraph.moduleGraph.getParentModule(this));
const generator = /** @type {CssGenerator} */ (module.generator);
const names = this.getExportsConventionNames(
this.name,
/** @type {CssGeneratorExportsConvention} */
(generator.options.exportsConvention)
);
this._hashUpdate = `exportsConvention|${JSON.stringify(names)}|localIdentName|${JSON.stringify(generator.options.localIdentName)}`;
}
hash.update(this._hashUpdate);
}
/**
* @param {ObjectSerializerContext} context context
*/
serialize(context) {
const { write } = context;
write(this.name);
write(this.value);
write(this.range);
write(this.interpolate);
write(this.exportMode);
write(this.exportType);
super.serialize(context);
}
/**
* @param {ObjectDeserializerContext} context context
*/
deserialize(context) {
const { read } = context;
this.name = read();
this.value = read();
this.range = read();
this.interpolate = read();
this.exportMode = read();
this.exportType = read();
super.deserialize(context);
}
}
CssIcssExportDependency.Template = class CssIcssExportDependencyTemplate extends (
NullDependency.Template
) {
// TODO looking how to cache
/**
* @param {string} symbol the name of symbol
* @param {DependencyTemplateContext} templateContext the context object
* @returns {string | undefined} found reference
*/
static findReference(symbol, templateContext) {
for (const item of templateContext.module.dependencies) {
if (item instanceof CssIcssImportDependency) {
// Looking for the referring module
const module = templateContext.moduleGraph.getModule(item);
if (!module) {
return undefined;
}
for (let i = module.dependencies.length - 1; i >= 0; i--) {
const nestedDep = module.dependencies[i];
if (
nestedDep instanceof CssIcssExportDependency &&
symbol === nestedDep.name
) {
if (Array.isArray(nestedDep.value)) {
return this.findReference(nestedDep.value[1], {
...templateContext,
module
});
}
return CssIcssExportDependency.Template.getIdentifier(
nestedDep.value,
nestedDep,
{
...templateContext,
module
}
);
}
}
}
}
}
/**
* @param {string} value value to identifier
* @param {Dependency} dependency the dependency for which the template should be applied
* @param {DependencyTemplateContext} templateContext the context object
* @returns {string} identifier
*/
static getIdentifier(value, dependency, templateContext) {
const dep = /** @type {CssIcssExportDependency} */ (dependency);
if (dep.interpolate) {
const { module: m } = templateContext;
const module = /** @type {CssModule} */ (m);
const generator = /** @type {CssGenerator} */ (module.generator);
const local = cssExportConvention(
value,
/** @type {CssGeneratorExportsConvention} */
(generator.options.exportsConvention)
)[0];
const prefix =
dep.exportType === CssIcssExportDependency.EXPORT_TYPE.CUSTOM_VARIABLE
? "--"
: "";
return (
prefix +
getCssParser().escapeIdentifier(
getLocalIdent(
local,
/** @type {CssModule} */
(templateContext.module),
templateContext.chunkGraph,
templateContext.runtimeTemplate
)
)
);
}
return /** @type {string} */ (dep.value);
}
/**
* @param {Dependency} dependency the dependency for which the template should be applied
* @param {ReplaceSource} source the current replace source which can be modified
* @param {DependencyTemplateContext} templateContext the context object
* @returns {void}
*/
apply(dependency, source, templateContext) {
const dep = /** @type {CssIcssExportDependency} */ (dependency);
if (!dep.range && templateContext.type !== JAVASCRIPT_TYPE) return;
const { cssData } = templateContext;
const { module: m, moduleGraph, runtime } = templateContext;
const module = /** @type {CssModule} */ (m);
const generator = /** @type {CssGenerator} */ (module.generator);
const names = dep.getExportsConventionNames(
dep.name,
/** @type {CssGeneratorExportsConvention} */
(generator.options.exportsConvention)
);
const usedNames =
/** @type {string[]} */
(
names
.map((name) =>
moduleGraph.getExportInfo(module, name).getUsedName(name, runtime)
)
.filter(Boolean)
);
const allNames = new Set([...usedNames, ...names]);
const isReference = Array.isArray(dep.value);
/** @type {string} */
let value;
if (isReference && dep.value[2] === true) {
const resolved = CssIcssExportDependencyTemplate.findReference(
dep.value[1],
templateContext
);
// Fallback to the original name if not found
value = resolved || dep.value[0];
} else {
value = isReference ? dep.value[1] : /** @type {string} */ (dep.value);
}
if (dep.interpolate) {
value = CssIcssExportDependencyTemplate.getIdentifier(
value,
dep,
templateContext
);
}
if (
dep.exportType ===
CssIcssExportDependency.EXPORT_TYPE.GRID_CUSTOM_IDENTIFIER
) {
value += `-${dep.name}`;
}
if (
templateContext.type === JAVASCRIPT_TYPE &&
dep.exportMode !== CssIcssExportDependency.EXPORT_MODE.NONE
) {
for (const used of allNames) {
if (dep.exportMode === CssIcssExportDependency.EXPORT_MODE.ONCE) {
const newValue = getCssParser().unescapeIdentifier(value);
if (isReference) {
cssData.exports.set(dep.value[1], newValue);
}
if (cssData.exports.has(used)) return;
cssData.exports.set(used, newValue);
} else {
const originalValue =
dep.exportMode === CssIcssExportDependency.EXPORT_MODE.REPLACE
? undefined
: cssData.exports.get(used);
const newValue =
dep.exportMode ===
CssIcssExportDependency.EXPORT_MODE.SELF_REFERENCE
? cssData.exports.get(
isReference ? dep.value[0] : /** @type {string} */ (dep.value)
) || value
: getCssParser().unescapeIdentifier(value);
cssData.exports.set(
used,
`${originalValue ? `${originalValue}${newValue ? " " : ""}` : ""}${newValue}`
);
}
}
} else if (
dep.range &&
templateContext.type === CSS_TYPE &&
dep.exportMode !== CssIcssExportDependency.EXPORT_MODE.APPEND &&
dep.exportMode !== CssIcssExportDependency.EXPORT_MODE.SELF_REFERENCE
) {
source.replace(dep.range[0], dep.range[1] - 1, value);
}
}
};
/** @type {Record<"NONE" | "REPLACE" | "APPEND" | "ONCE" | "SELF_REFERENCE", ExportMode>} */
CssIcssExportDependency.EXPORT_MODE = {
NONE: 0,
REPLACE: 1,
APPEND: 2,
ONCE: 3,
SELF_REFERENCE: 4
};
/** @type {Record<"NORMAL" | "CUSTOM_VARIABLE" | "GRID_CUSTOM_IDENTIFIER", ExportType>} */
CssIcssExportDependency.EXPORT_TYPE = {
NORMAL: 0,
CUSTOM_VARIABLE: 1,
GRID_CUSTOM_IDENTIFIER: 2
};
makeSerializable(
CssIcssExportDependency,
"webpack/lib/dependencies/CssIcssExportDependency"
);
module.exports = CssIcssExportDependency;
@@ -0,0 +1 @@
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../src/globals/operations/update.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAEhD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAA;AAC7E,OAAO,KAAK,EAAE,UAAU,EAAc,MAAM,gBAAgB,CAAA;AAC5D,OAAO,KAAK,EAEV,cAAc,EACd,YAAY,EACZ,UAAU,EACV,yBAAyB,EAE1B,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EACV,kBAAkB,EAClB,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,oBAAoB,CAAA;AAsB3B,KAAK,IAAI,CAAC,KAAK,SAAS,UAAU,IAAI;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,EAAE,WAAW,CAAC,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,CAAC,CAAA;IACxD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,YAAY,EAAE,qBAAqB,CAAA;IACnC,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,QAAQ,CAAC,EAAE,YAAY,CAAA;IACvB,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,GAAG,EAAE,cAAc,CAAA;IACnB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,mBAAmB,CAAC,EAAE,OAAO,CAAA;CAC9B,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,UAAU,CAAC,EAAE,QAAQ,CAAC,CAAA;AAEnD,eAAO,MAAM,eAAe,GAC1B,KAAK,SAAS,UAAU,EACxB,OAAO,SAAS,oBAAoB,CAAC,KAAK,CAAC,QAErC,IAAI,CAAC,KAAK,CAAC,KAChB,OAAO,CAAC,yBAAyB,CAAC,KAAK,EAAE,OAAO,CAAC,CAyanD,CAAA"}
@@ -0,0 +1,87 @@
// Format function modified from nodejs
// Copyright Joyent, Inc. and other Node contributors.
//
// 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.
const slashedProtocols = /https?|ftp|gopher|file/;
function stringifyUrlQueryParam(param) {
if (typeof param === 'string' || typeof param === 'number' && !isNaN(param) || typeof param === 'boolean') {
return String(param);
} else {
return '';
}
}
export function urlQueryToSearchParams(urlQuery) {
const result = new URLSearchParams();
Object.entries(urlQuery).forEach(([key, value]) => {
if (Array.isArray(value)) {
value.forEach(item => result.append(key, stringifyUrlQueryParam(item)));
} else {
result.set(key, stringifyUrlQueryParam(value));
}
});
return result;
}
export function formatUrl(urlObj) {
let {
auth
} = urlObj;
const {
hostname
} = urlObj;
let protocol = urlObj.protocol || '';
let pathname = urlObj.pathname || '';
let hash = urlObj.hash || '';
let query = urlObj.query || '';
let host = false;
auth = auth ? encodeURIComponent(auth).replace(/%3A/i, ':') + '@' : '';
if (urlObj.host) {
host = auth + urlObj.host;
} else if (hostname) {
host = auth + (~hostname.indexOf(':') ? `[${hostname}]` : hostname);
if (urlObj.port) {
host += ':' + urlObj.port;
}
}
if (query && typeof query === 'object') {
query = String(urlQueryToSearchParams(query));
}
let search = urlObj.search || query && `?${query}` || '';
if (protocol && !protocol.endsWith(':')) {
protocol += ':';
}
if (urlObj.slashes || (!protocol || slashedProtocols.test(protocol)) && host !== false) {
host = '//' + (host || '');
if (pathname && pathname[0] !== '/') {
pathname = '/' + pathname;
}
} else if (!host) {
host = '';
}
if (hash && hash[0] !== '#') {
hash = '#' + hash;
}
if (search && search[0] !== '?') {
search = '?' + search;
}
pathname = pathname.replace(/[?#]/g, encodeURIComponent);
search = search.replace('#', '%23');
return `${protocol}${host}${pathname}${search}${hash}`;
}
//# sourceMappingURL=formatUrl.js.map
@@ -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 PaintRoller = createLucideIcon("PaintRoller", [
["rect", { width: "16", height: "6", x: "2", y: "2", rx: "2", key: "jcyz7m" }],
["path", { d: "M10 16v-2a2 2 0 0 1 2-2h8a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-2", key: "1b9h7c" }],
["rect", { width: "4", height: "6", x: "8", y: "16", rx: "1", key: "d6e7yl" }]
]);
export { PaintRoller as default };
//# sourceMappingURL=paint-roller.js.map
@@ -0,0 +1,7 @@
import type { Dialect } from "./column-builder.js";
export interface RunnableQuery<T, TDialect extends Dialect> {
readonly _: {
readonly dialect: TDialect;
readonly result: T;
};
}
@@ -0,0 +1,8 @@
"use strict";
exports.eachMinuteOfInterval = void 0;
var _index = require("../eachMinuteOfInterval.js");
var _index2 = require("./_lib/convertToFP.js"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
const eachMinuteOfInterval = (exports.eachMinuteOfInterval = (0,
_index2.convertToFP)(_index.eachMinuteOfInterval, 1));
@@ -0,0 +1,54 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var expressions_exports = {};
__export(expressions_exports, {
concat: () => concat,
rowId: () => rowId,
substring: () => substring
});
module.exports = __toCommonJS(expressions_exports);
var import_expressions = require("../sql/expressions/index.cjs");
var import_sql = require("../sql/sql.cjs");
__reExport(expressions_exports, require("../sql/expressions/index.cjs"), module.exports);
function concat(column, value) {
return import_sql.sql`${column} || ${(0, import_expressions.bindIfParam)(value, column)}`;
}
function substring(column, { from, for: _for }) {
const chunks = [import_sql.sql`substring(`, column];
if (from !== void 0) {
chunks.push(import_sql.sql` from `, (0, import_expressions.bindIfParam)(from, column));
}
if (_for !== void 0) {
chunks.push(import_sql.sql` for `, (0, import_expressions.bindIfParam)(_for, column));
}
chunks.push(import_sql.sql`)`);
return import_sql.sql.join(chunks);
}
function rowId() {
return import_sql.sql`rowid`;
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
concat,
rowId,
substring,
...require("../sql/expressions/index.cjs")
});
//# sourceMappingURL=expressions.cjs.map
@@ -0,0 +1,89 @@
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* 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.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.ModuleNameTrie = exports.ModuleNameSeparator = void 0;
exports.ModuleNameSeparator = '/';
/**
* Node in a `ModuleNameTrie`
*/
class ModuleNameTrieNode {
hooks = [];
children = new Map();
}
/**
* Trie containing nodes that represent a part of a module name (i.e. the parts separated by forward slash)
*/
class ModuleNameTrie {
_trie = new ModuleNameTrieNode();
_counter = 0;
/**
* Insert a module hook into the trie
*
* @param {Hooked} hook Hook
*/
insert(hook) {
let trieNode = this._trie;
for (const moduleNamePart of hook.moduleName.split(exports.ModuleNameSeparator)) {
let nextNode = trieNode.children.get(moduleNamePart);
if (!nextNode) {
nextNode = new ModuleNameTrieNode();
trieNode.children.set(moduleNamePart, nextNode);
}
trieNode = nextNode;
}
trieNode.hooks.push({ hook, insertedId: this._counter++ });
}
/**
* Search for matching hooks in the trie
*
* @param {string} moduleName Module name
* @param {boolean} maintainInsertionOrder Whether to return the results in insertion order
* @param {boolean} fullOnly Whether to return only full matches
* @returns {Hooked[]} Matching hooks
*/
search(moduleName, { maintainInsertionOrder, fullOnly } = {}) {
let trieNode = this._trie;
const results = [];
let foundFull = true;
for (const moduleNamePart of moduleName.split(exports.ModuleNameSeparator)) {
const nextNode = trieNode.children.get(moduleNamePart);
if (!nextNode) {
foundFull = false;
break;
}
if (!fullOnly) {
results.push(...nextNode.hooks);
}
trieNode = nextNode;
}
if (fullOnly && foundFull) {
results.push(...trieNode.hooks);
}
if (results.length === 0) {
return [];
}
if (results.length === 1) {
return [results[0].hook];
}
if (maintainInsertionOrder) {
results.sort((a, b) => a.insertedId - b.insertedId);
}
return results.map(({ hook }) => hook);
}
}
exports.ModuleNameTrie = ModuleNameTrie;
//# sourceMappingURL=ModuleNameTrie.js.map
@@ -0,0 +1,75 @@
import { entityKind, is } from "../../entity.js";
import { MySqlDialect } from "../dialect.js";
import { SelectionProxyHandler } from "../../selection-proxy.js";
import { WithSubquery } from "../../subquery.js";
import { MySqlSelectBuilder } from "./select.js";
class QueryBuilder {
static [entityKind] = "MySqlQueryBuilder";
dialect;
dialectConfig;
constructor(dialect) {
this.dialect = is(dialect, MySqlDialect) ? dialect : void 0;
this.dialectConfig = is(dialect, MySqlDialect) ? void 0 : dialect;
}
$with = (alias, selection) => {
const queryBuilder = this;
const as = (qb) => {
if (typeof qb === "function") {
qb = qb(queryBuilder);
}
return new Proxy(
new WithSubquery(
qb.getSQL(),
selection ?? ("getSelectedFields" in qb ? qb.getSelectedFields() ?? {} : {}),
alias,
true
),
new SelectionProxyHandler({ alias, sqlAliasedBehavior: "alias", sqlBehavior: "error" })
);
};
return { as };
};
with(...queries) {
const self = this;
function select(fields) {
return new MySqlSelectBuilder({
fields: fields ?? void 0,
session: void 0,
dialect: self.getDialect(),
withList: queries
});
}
function selectDistinct(fields) {
return new MySqlSelectBuilder({
fields: fields ?? void 0,
session: void 0,
dialect: self.getDialect(),
withList: queries,
distinct: true
});
}
return { select, selectDistinct };
}
select(fields) {
return new MySqlSelectBuilder({ fields: fields ?? void 0, session: void 0, dialect: this.getDialect() });
}
selectDistinct(fields) {
return new MySqlSelectBuilder({
fields: fields ?? void 0,
session: void 0,
dialect: this.getDialect(),
distinct: true
});
}
// Lazy load dialect to avoid circular dependency
getDialect() {
if (!this.dialect) {
this.dialect = new MySqlDialect(this.dialectConfig);
}
return this.dialect;
}
}
export {
QueryBuilder
};
//# sourceMappingURL=query-builder.js.map
@@ -0,0 +1,39 @@
import { buildFormatLongFn } from "../../_lib/buildFormatLongFn.mjs";
const dateFormats = {
full: "EEEE, MMMM do, y",
long: "MMMM do, y",
medium: "MMM d, y",
short: "MM/dd/yyyy",
};
const timeFormats = {
full: "h:mm:ss a zzzz",
long: "h:mm:ss a z",
medium: "h:mm:ss a",
short: "h:mm a",
};
const dateTimeFormats = {
full: "{{date}} 'aig' {{time}}",
long: "{{date}} 'aig' {{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",
}),
};
@@ -0,0 +1,316 @@
'use strict'
const test = require('tape')
const concat = require('concat-stream')
const fs = require('fs')
const os = require('os')
const path = require('path')
const helpMe = require('./')
const proxyquire = require('proxyquire')
test('throws if no directory is passed', function (t) {
try {
helpMe()
t.fail()
} catch (err) {
t.equal(err.message, 'missing dir')
}
t.end()
})
test('throws if a normal file is passed', function (t) {
try {
helpMe({
dir: __filename
})
t.fail()
} catch (err) {
t.equal(err.message, `${__filename} is not a directory`)
}
t.end()
})
test('throws if the directory cannot be accessed', function (t) {
try {
helpMe({
dir: './foo'
})
t.fail()
} catch (err) {
t.equal(err.message, './foo is not a directory')
}
t.end()
})
test('show a generic help.txt from a folder to a stream with relative path in dir', function (t) {
t.plan(2)
helpMe({
dir: 'fixture/basic'
}).createStream()
.pipe(concat(function (data) {
fs.readFile('fixture/basic/help.txt', function (err, expected) {
t.error(err)
t.equal(data.toString(), expected.toString())
})
}))
})
test('show a generic help.txt from a folder to a stream with absolute path in dir', function (t) {
t.plan(2)
helpMe({
dir: path.join(__dirname, 'fixture/basic')
}).createStream()
.pipe(concat(function (data) {
fs.readFile('fixture/basic/help.txt', function (err, expected) {
t.error(err)
t.equal(data.toString(), expected.toString())
})
}))
})
test('custom help command with an array', function (t) {
t.plan(2)
helpMe({
dir: 'fixture/basic'
}).createStream(['hello'])
.pipe(concat(function (data) {
fs.readFile('fixture/basic/hello.txt', function (err, expected) {
t.error(err)
t.equal(data.toString(), expected.toString())
})
}))
})
test('custom help command without an ext', function (t) {
t.plan(2)
helpMe({
dir: 'fixture/no-ext',
ext: ''
}).createStream(['hello'])
.pipe(concat(function (data) {
fs.readFile('fixture/no-ext/hello', function (err, expected) {
t.error(err)
t.equal(data.toString(), expected.toString())
})
}))
})
test('custom help command with a string', function (t) {
t.plan(2)
helpMe({
dir: 'fixture/basic'
}).createStream('hello')
.pipe(concat(function (data) {
fs.readFile('fixture/basic/hello.txt', function (err, expected) {
t.error(err)
t.equal(data.toString(), expected.toString())
})
}))
})
test('missing help file', function (t) {
t.plan(1)
helpMe({
dir: 'fixture/basic'
}).createStream('abcde')
.on('error', function (err) {
t.equal(err.message, 'no such help file')
})
.resume()
})
test('custom help command with an array', function (t) {
const helper = helpMe({
dir: 'fixture/shortnames'
})
t.test('abbreviates two words in one', function (t) {
t.plan(2)
helper
.createStream(['world'])
.pipe(concat(function (data) {
fs.readFile('fixture/shortnames/hello world.txt', function (err, expected) {
t.error(err)
t.equal(data.toString(), expected.toString())
})
}))
})
t.test('abbreviates three words in two', function (t) {
t.plan(2)
helper
.createStream(['abcde', 'fghi'])
.pipe(concat(function (data) {
fs.readFile('fixture/shortnames/abcde fghi lmno.txt', function (err, expected) {
t.error(err)
t.equal(data.toString(), expected.toString())
})
}))
})
t.test('abbreviates a word', function (t) {
t.plan(2)
helper
.createStream(['abc', 'fg'])
.pipe(concat(function (data) {
fs.readFile('fixture/shortnames/abcde fghi lmno.txt', function (err, expected) {
t.error(err)
t.equal(data.toString(), expected.toString())
})
}))
})
t.test('abbreviates a word using strings', function (t) {
t.plan(2)
helper
.createStream('abc fg')
.pipe(concat(function (data) {
fs.readFile('fixture/shortnames/abcde fghi lmno.txt', function (err, expected) {
t.error(err)
t.equal(data.toString(), expected.toString())
})
}))
})
t.test('print a disambiguation', function (t) {
t.plan(1)
const expected = '' +
'There are 2 help pages that matches the given request, please disambiguate:\n' +
' * abcde fghi lmno\n' +
' * abcde hello\n'
helper
.createStream(['abc'])
.pipe(concat({ encoding: 'string' }, function (data) {
t.equal(data, expected)
}))
})
t.test('choose exact match over partial', function (t) {
t.plan(1)
helpMe({
dir: 'fixture/sameprefix'
}).createStream(['hello'])
.pipe(concat({ encoding: 'string' }, function (data) {
t.equal(data, 'hello')
}))
})
})
test('toStdout helper', async function (t) {
t.plan(2)
let completed = false
const stream = concat(function (data) {
completed = true
fs.readFile('fixture/basic/help.txt', function (err, expected) {
t.error(err)
t.equal(data.toString(), expected.toString())
})
})
await helpMe({
dir: 'fixture/basic'
}).toStdout([], { stream })
t.ok(completed)
})
test('handle error in toStdout', async function (t) {
t.plan(2)
let completed = false
const stream = concat(function (data) {
completed = true
fs.readFile('fixture/basic/help.txt', function (err, expected) {
t.error(err)
t.equal(data.toString(), 'no such help file: something.\n\n' + expected.toString())
})
})
await helpMe({
dir: 'fixture/basic'
}).toStdout(['something'], {
stream
})
t.ok(completed)
})
test('customize missing help fle message', async function (t) {
t.plan(3)
const stream = concat(function (data) {
t.equal(data.toString(), 'kaboom\n\n')
})
await helpMe({
dir: 'fixture/basic'
}).toStdout(['something'], {
stream,
async onMissingHelp (err, args, stream) {
t.equal(err.message, 'no such help file')
t.deepEquals(args, ['something'])
stream.end('kaboom\n\n')
}
})
})
test('toStdout without factory', async function (t) {
t.plan(2)
let completed = false
const stream = concat(function (data) {
completed = true
fs.readFile('fixture/basic/help.txt', function (err, expected) {
t.error(err)
t.equal(data.toString(), expected.toString())
})
})
await helpMe.help({
dir: 'fixture/basic',
stream
}, [])
t.ok(completed)
})
test('should allow for awaiting the response with default stdout stream', async function (t) {
t.plan(2)
const _process = Object.create(process)
const stdout = Object.create(process.stdout)
Object.defineProperty(_process, 'stdout', {
value: stdout
})
let completed = false
stdout.write = (data, cb) => {
t.equal(data.toString(), 'hello world' + os.EOL)
completed = true
cb()
}
const helpMe = proxyquire('./help-me', {
process: _process
})
await helpMe.help({
dir: 'fixture/basic'
})
t.ok(completed)
})
@@ -0,0 +1,36 @@
{
"title": "DllPluginOptions",
"type": "object",
"additionalProperties": false,
"properties": {
"context": {
"description": "Context of requests in the manifest file (defaults to the webpack context).",
"type": "string",
"minLength": 1
},
"entryOnly": {
"description": "If true, only entry points will be exposed (default: true).",
"type": "boolean"
},
"format": {
"description": "If true, manifest json file (output) will be formatted.",
"type": "boolean"
},
"name": {
"description": "Name of the exposed dll function (external name, use value of 'output.library').",
"type": "string",
"minLength": 1
},
"path": {
"description": "Absolute path to the manifest json file (output).",
"type": "string",
"minLength": 1
},
"type": {
"description": "Type of the dll bundle (external type, use value of 'output.libraryTarget').",
"type": "string",
"minLength": 1
}
},
"required": ["path"]
}
@@ -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 BetweenVerticalStart = createLucideIcon("BetweenVerticalStart", [
["rect", { width: "7", height: "13", x: "3", y: "8", rx: "1", key: "1fjrkv" }],
["path", { d: "m15 2-3 3-3-3", key: "1uh6eb" }],
["rect", { width: "7", height: "13", x: "14", y: "8", rx: "1", key: "w3fjg8" }]
]);
export { BetweenVerticalStart as default };
//# sourceMappingURL=between-vertical-start.js.map
@@ -0,0 +1 @@
{"version":3,"file":"sdkMetadata.js","sources":["../../../src/utils/sdkMetadata.ts"],"sourcesContent":["import type { CoreOptions } from '../types-hoist/options';\nimport { SDK_VERSION } from '../utils/version';\n\n/**\n * A builder for the SDK metadata in the options for the SDK initialization.\n *\n * Note: This function is identical to `buildMetadata` in Remix and NextJS and SvelteKit.\n * We don't extract it for bundle size reasons.\n * @see https://github.com/getsentry/sentry-javascript/pull/7404\n * @see https://github.com/getsentry/sentry-javascript/pull/4196\n *\n * If you make changes to this function consider updating the others as well.\n *\n * @param options SDK options object that gets mutated\n * @param names list of package names\n */\nexport function applySdkMetadata(options: CoreOptions, name: string, names = [name], source = 'npm'): void {\n const sdk = ((options._metadata = options._metadata || {}).sdk = options._metadata.sdk || {});\n\n if (!sdk.name) {\n sdk.name = `sentry.javascript.${name}`;\n sdk.packages = names.map(name => ({\n name: `${source}:@sentry/${name}`,\n version: SDK_VERSION,\n }));\n sdk.version = SDK_VERSION;\n }\n}\n"],"names":["SDK_VERSION"],"mappings":";;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,gBAAgB,CAAC,OAAO,EAAe,IAAI,EAAU,KAAA,GAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,KAAK,EAAQ;AAC3G,EAAE,MAAM,GAAA,IAAO,CAAC,OAAO,CAAC,SAAA,GAAY,OAAO,CAAC,SAAA,IAAa,EAAE,EAAE,GAAA,GAAM,OAAO,CAAC,SAAS,CAAC,GAAA,IAAO,EAAE,CAAC;;AAE/F,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE;AACjB,IAAI,GAAG,CAAC,IAAA,GAAO,CAAC,kBAAkB,EAAE,IAAI,CAAC,CAAA;AACA,IAAA,GAAA,CAAA,QAAA,GAAA,KAAA,CAAA,GAAA,CAAA,IAAA,KAAA;AACA,MAAA,IAAA,EAAA,CAAA,EAAA,MAAA,CAAA,SAAA,EAAA,IAAA,CAAA,CAAA;AACA,MAAA,OAAA,EAAAA,mBAAA;AACA,KAAA,CAAA,CAAA;AACA,IAAA,GAAA,CAAA,OAAA,GAAAA,mBAAA;AACA,EAAA;AACA;;;;"}
@@ -0,0 +1 @@
{"version":3,"sources":["../../src/uploads/mimeTypeValidator.ts"],"sourcesContent":["import type { Validate } from '../fields/config/types.js'\n\nimport { validateMimeType } from '../utilities/validateMimeType.js'\n\nexport const mimeTypeValidator =\n (mimeTypes: string[]): Validate =>\n (val: string, { siblingData }) => {\n if (!siblingData.filename) {\n return true\n }\n\n if (!val) {\n return 'Invalid file type'\n }\n\n const isValidMimeType = validateMimeType(val, mimeTypes)\n return isValidMimeType ? true : `Invalid file type: '${val}'`\n }\n"],"names":["validateMimeType","mimeTypeValidator","mimeTypes","val","siblingData","filename","isValidMimeType"],"mappings":"AAEA,SAASA,gBAAgB,QAAQ,mCAAkC;AAEnE,OAAO,MAAMC,oBACX,CAACC,YACD,CAACC,KAAa,EAAEC,WAAW,EAAE;QAC3B,IAAI,CAACA,YAAYC,QAAQ,EAAE;YACzB,OAAO;QACT;QAEA,IAAI,CAACF,KAAK;YACR,OAAO;QACT;QAEA,MAAMG,kBAAkBN,iBAAiBG,KAAKD;QAC9C,OAAOI,kBAAkB,OAAO,CAAC,oBAAoB,EAAEH,IAAI,CAAC,CAAC;IAC/D,EAAC"}
@@ -0,0 +1,39 @@
// lib/types/utils.ts
var decoder = new TextDecoder();
var toUTF8String = (input, start = 0, end = input.length) => decoder.decode(input.slice(start, end));
var getView = (input, offset) => new DataView(input.buffer, input.byteOffset + offset);
var readUInt32BE = (input, offset = 0) => getView(input, offset).getUint32(0, false);
// lib/types/png.ts
var pngSignature = "PNG\r\n\n";
var pngImageHeaderChunkName = "IHDR";
var pngFriedChunkName = "CgBI";
var PNG = {
validate(input) {
if (pngSignature === toUTF8String(input, 1, 8)) {
let chunkName = toUTF8String(input, 12, 16);
if (chunkName === pngFriedChunkName) {
chunkName = toUTF8String(input, 28, 32);
}
if (chunkName !== pngImageHeaderChunkName) {
throw new TypeError("Invalid PNG");
}
return true;
}
return false;
},
calculate(input) {
if (toUTF8String(input, 12, 16) === pngFriedChunkName) {
return {
height: readUInt32BE(input, 36),
width: readUInt32BE(input, 32)
};
}
return {
height: readUInt32BE(input, 20),
width: readUInt32BE(input, 16)
};
}
};
export { PNG };
@@ -0,0 +1,11 @@
/**
* Calls `unref` on a timer, if the method is available on @param timer.
*
* `unref()` is used to allow processes to exit immediately, even if the timer
* is still running and hasn't resolved yet.
*
* Use this in places where code can run on browser or server, since browsers
* do not support `unref`.
*/
export declare function safeUnref(timer: ReturnType<typeof setTimeout>): ReturnType<typeof setTimeout>;
//# sourceMappingURL=timer.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/platform/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,+BAA+D;AAAtD,0GAAA,kBAAkB,OAAA;AAAE,yGAAA,iBAAiB,OAAA","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\nexport { BatchSpanProcessor, RandomIdGenerator } from './node';\n"]}
@@ -0,0 +1,29 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const core = require('@sentry/core');
/**
* Sentry integration for capturing feature flag evaluations from GrowthBook.
*
* See the feature flag documentation: https://develop.sentry.dev/sdk/expected-features/#feature-flags
*
* @example
* ```
* import { GrowthBook } from '@growthbook/growthbook';
* import * as Sentry from '@sentry/browser';
*
* Sentry.init({
* dsn: '___PUBLIC_DSN___',
* integrations: [Sentry.growthbookIntegration({ growthbookClass: GrowthBook })],
* });
*
* const gb = new GrowthBook();
* gb.isOn('my-feature');
* Sentry.captureException(new Error('something went wrong'));
* ```
*/
const growthbookIntegration = (({ growthbookClass }) =>
core.growthbookIntegration({ growthbookClass })) ;
exports.growthbookIntegration = growthbookIntegration;
//# sourceMappingURL=integration.js.map
@@ -0,0 +1,3 @@
export type Extra = unknown;
export type Extras = Record<string, Extra>;
//# sourceMappingURL=extra.d.ts.map
@@ -0,0 +1,74 @@
{
"definitions": {
"HttpUriOptions": {
"description": "Options for building http resources.",
"type": "object",
"additionalProperties": false,
"properties": {
"allowedUris": {
"$ref": "#/definitions/HttpUriOptionsAllowedUris"
},
"cacheLocation": {
"description": "Location where resource content is stored for lockfile entries. It's also possible to disable storing by passing false.",
"anyOf": [
{
"enum": [false]
},
{
"type": "string",
"absolutePath": true
}
]
},
"frozen": {
"description": "When set, anything that would lead to a modification of the lockfile or any resource content, will result in an error.",
"type": "boolean"
},
"lockfileLocation": {
"description": "Location of the lockfile.",
"type": "string",
"absolutePath": true
},
"proxy": {
"description": "Proxy configuration, which can be used to specify a proxy server to use for HTTP requests.",
"type": "string"
},
"upgrade": {
"description": "When set, resources of existing lockfile entries will be fetched and entries will be upgraded when resource content has changed.",
"type": "boolean"
}
},
"required": ["allowedUris"]
},
"HttpUriOptionsAllowedUris": {
"description": "List of allowed URIs (resp. the beginning of them).",
"type": "array",
"items": {
"description": "List of allowed URIs (resp. the beginning of them).",
"anyOf": [
{
"description": "Allowed URI pattern.",
"instanceof": "RegExp",
"tsType": "RegExp"
},
{
"description": "Allowed URI (resp. the beginning of it).",
"type": "string",
"pattern": "^https?://"
},
{
"description": "Allowed URI filter function.",
"instanceof": "Function",
"tsType": "((uri: string) => boolean)"
}
]
}
}
},
"title": "HttpUriPluginOptions",
"oneOf": [
{
"$ref": "#/definitions/HttpUriOptions"
}
]
}
@@ -0,0 +1,89 @@
import { runJobs } from '../operations/runJobs/index.js';
/**
* /api/payload-jobs/run endpoint
*
* This endpoint is GET instead of POST to allow it to be used in a Vercel Cron.
*/ export const runJobsEndpoint = {
handler: async (req)=>{
const jobsConfig = req.payload.config.jobs;
if (!configHasJobs(jobsConfig)) {
return Response.json({
message: 'No jobs to run.'
}, {
status: 200
});
}
const accessFn = jobsConfig.access?.run ?? (()=>true);
const hasAccess = await accessFn({
req
});
if (!hasAccess) {
return Response.json({
message: req.i18n.t('error:unauthorized')
}, {
status: 401
});
}
const { allQueues, disableScheduling: disableSchedulingParam, limit, queue, silent: silentParam } = req.query;
const silent = silentParam === 'true';
const shouldHandleSchedules = disableSchedulingParam !== 'true';
const runAllQueues = allQueues && !(typeof allQueues === 'string' && allQueues === 'false');
if (shouldHandleSchedules && jobsConfig.scheduling) {
// If should handle schedules and schedules are defined
await req.payload.jobs.handleSchedules({
allQueues: runAllQueues,
queue,
req
});
}
const runJobsArgs = {
queue,
req,
// Access is validated above, so it's safe to override here
allQueues: runAllQueues,
overrideAccess: true,
silent
};
if (typeof queue === 'string') {
runJobsArgs.queue = queue;
}
const parsedLimit = Number(limit);
if (!isNaN(parsedLimit)) {
runJobsArgs.limit = parsedLimit;
}
let noJobsRemaining = false;
let remainingJobsFromQueried = 0;
try {
const result = await runJobs(runJobsArgs);
noJobsRemaining = !!result.noJobsRemaining;
remainingJobsFromQueried = result.remainingJobsFromQueried;
} catch (err) {
req.payload.logger.error({
err,
msg: 'There was an error running jobs:',
queue: runJobsArgs.queue
});
return Response.json({
message: req.i18n.t('error:unknown'),
noJobsRemaining: true,
remainingJobsFromQueried
}, {
status: 500
});
}
return Response.json({
message: req.i18n.t('general:success'),
noJobsRemaining,
remainingJobsFromQueried
}, {
status: 200
});
},
method: 'get',
path: '/run'
};
export const configHasJobs = (jobsConfig)=>{
return Boolean(jobsConfig.tasks?.length || jobsConfig.workflows?.length);
};
//# sourceMappingURL=run.js.map
@@ -0,0 +1,165 @@
'use strict'
const Dispatcher = require('./dispatcher')
const UnwrapHandler = require('../handler/unwrap-handler')
const {
ClientDestroyedError,
ClientClosedError,
InvalidArgumentError
} = require('../core/errors')
const { kDestroy, kClose, kClosed, kDestroyed, kDispatch } = require('../core/symbols')
const kOnDestroyed = Symbol('onDestroyed')
const kOnClosed = Symbol('onClosed')
class DispatcherBase extends Dispatcher {
/** @type {boolean} */
[kDestroyed] = false;
/** @type {Array<Function|null} */
[kOnDestroyed] = null;
/** @type {boolean} */
[kClosed] = false;
/** @type {Array<Function>|null} */
[kOnClosed] = null
/** @returns {boolean} */
get destroyed () {
return this[kDestroyed]
}
/** @returns {boolean} */
get closed () {
return this[kClosed]
}
close (callback) {
if (callback === undefined) {
return new Promise((resolve, reject) => {
this.close((err, data) => {
return err ? reject(err) : resolve(data)
})
})
}
if (typeof callback !== 'function') {
throw new InvalidArgumentError('invalid callback')
}
if (this[kDestroyed]) {
const err = new ClientDestroyedError()
queueMicrotask(() => callback(err, null))
return
}
if (this[kClosed]) {
if (this[kOnClosed]) {
this[kOnClosed].push(callback)
} else {
queueMicrotask(() => callback(null, null))
}
return
}
this[kClosed] = true
this[kOnClosed] ??= []
this[kOnClosed].push(callback)
const onClosed = () => {
const callbacks = this[kOnClosed]
this[kOnClosed] = null
for (let i = 0; i < callbacks.length; i++) {
callbacks[i](null, null)
}
}
// Should not error.
this[kClose]()
.then(() => this.destroy())
.then(() => queueMicrotask(onClosed))
}
destroy (err, callback) {
if (typeof err === 'function') {
callback = err
err = null
}
if (callback === undefined) {
return new Promise((resolve, reject) => {
this.destroy(err, (err, data) => {
return err ? reject(err) : resolve(data)
})
})
}
if (typeof callback !== 'function') {
throw new InvalidArgumentError('invalid callback')
}
if (this[kDestroyed]) {
if (this[kOnDestroyed]) {
this[kOnDestroyed].push(callback)
} else {
queueMicrotask(() => callback(null, null))
}
return
}
if (!err) {
err = new ClientDestroyedError()
}
this[kDestroyed] = true
this[kOnDestroyed] ??= []
this[kOnDestroyed].push(callback)
const onDestroyed = () => {
const callbacks = this[kOnDestroyed]
this[kOnDestroyed] = null
for (let i = 0; i < callbacks.length; i++) {
callbacks[i](null, null)
}
}
// Should not error.
this[kDestroy](err)
.then(() => queueMicrotask(onDestroyed))
}
dispatch (opts, handler) {
if (!handler || typeof handler !== 'object') {
throw new InvalidArgumentError('handler must be an object')
}
handler = UnwrapHandler.unwrap(handler)
try {
if (!opts || typeof opts !== 'object') {
throw new InvalidArgumentError('opts must be an object.')
}
if (this[kDestroyed] || this[kOnDestroyed]) {
throw new ClientDestroyedError()
}
if (this[kClosed]) {
throw new ClientClosedError()
}
return this[kDispatch](opts, handler)
} catch (err) {
if (typeof handler.onError !== 'function') {
throw err
}
handler.onError(err)
return false
}
}
}
module.exports = DispatcherBase
@@ -0,0 +1 @@
{"version":3,"file":"trace.js","sourceRoot":"","sources":["../../../src/api/trace.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,2DAIkC;AAClC,sEAAmE;AACnE,kEAGoC;AAGpC,0DAOgC;AAChC,iCAAiC;AAEjC,MAAM,QAAQ,GAAG,OAAO,CAAC;AAEzB;;GAEG;AACH,MAAa,QAAQ;IAKnB,+FAA+F;IAC/F;QAHQ,yBAAoB,GAAG,IAAI,yCAAmB,EAAE,CAAC;QAmDlD,oBAAe,GAAG,mCAAe,CAAC;QAElC,uBAAkB,GAAG,sCAAkB,CAAC;QAExC,eAAU,GAAG,0BAAU,CAAC;QAExB,YAAO,GAAG,uBAAO,CAAC;QAElB,kBAAa,GAAG,6BAAa,CAAC;QAE9B,mBAAc,GAAG,8BAAc,CAAC;QAEhC,YAAO,GAAG,uBAAO,CAAC;QAElB,mBAAc,GAAG,8BAAc,CAAC;IA9DhB,CAAC;IAExB,kDAAkD;IAC3C,MAAM,CAAC,WAAW;QACvB,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;YACnB,IAAI,CAAC,SAAS,GAAG,IAAI,QAAQ,EAAE,CAAC;SACjC;QAED,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED;;;;OAIG;IACI,uBAAuB,CAAC,QAAwB;QACrD,MAAM,OAAO,GAAG,IAAA,6BAAc,EAC5B,QAAQ,EACR,IAAI,CAAC,oBAAoB,EACzB,cAAO,CAAC,QAAQ,EAAE,CACnB,CAAC;QACF,IAAI,OAAO,EAAE;YACX,IAAI,CAAC,oBAAoB,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;SACjD;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;IAED;;OAEG;IACI,iBAAiB;QACtB,OAAO,IAAA,wBAAS,EAAC,QAAQ,CAAC,IAAI,IAAI,CAAC,oBAAoB,CAAC;IAC1D,CAAC;IAED;;OAEG;IACI,SAAS,CAAC,IAAY,EAAE,OAAgB;QAC7C,OAAO,IAAI,CAAC,iBAAiB,EAAE,CAAC,SAAS,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC3D,CAAC;IAED,wCAAwC;IACjC,OAAO;QACZ,IAAA,+BAAgB,EAAC,QAAQ,EAAE,cAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;QAC/C,IAAI,CAAC,oBAAoB,GAAG,IAAI,yCAAmB,EAAE,CAAC;IACxD,CAAC;CAiBF;AArED,4BAqEC","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 {\n getGlobal,\n registerGlobal,\n unregisterGlobal,\n} from '../internal/global-utils';\nimport { ProxyTracerProvider } from '../trace/ProxyTracerProvider';\nimport {\n isSpanContextValid,\n wrapSpanContext,\n} from '../trace/spancontext-utils';\nimport { Tracer } from '../trace/tracer';\nimport { TracerProvider } from '../trace/tracer_provider';\nimport {\n deleteSpan,\n getActiveSpan,\n getSpan,\n getSpanContext,\n setSpan,\n setSpanContext,\n} from '../trace/context-utils';\nimport { DiagAPI } from './diag';\n\nconst API_NAME = 'trace';\n\n/**\n * Singleton object which represents the entry point to the OpenTelemetry Tracing API\n */\nexport class TraceAPI {\n private static _instance?: TraceAPI;\n\n private _proxyTracerProvider = new ProxyTracerProvider();\n\n /** Empty private constructor prevents end users from constructing a new instance of the API */\n private constructor() {}\n\n /** Get the singleton instance of the Trace API */\n public static getInstance(): TraceAPI {\n if (!this._instance) {\n this._instance = new TraceAPI();\n }\n\n return this._instance;\n }\n\n /**\n * Set the current global tracer.\n *\n * @returns true if the tracer provider was successfully registered, else false\n */\n public setGlobalTracerProvider(provider: TracerProvider): boolean {\n const success = registerGlobal(\n API_NAME,\n this._proxyTracerProvider,\n DiagAPI.instance()\n );\n if (success) {\n this._proxyTracerProvider.setDelegate(provider);\n }\n return success;\n }\n\n /**\n * Returns the global tracer provider.\n */\n public getTracerProvider(): TracerProvider {\n return getGlobal(API_NAME) || this._proxyTracerProvider;\n }\n\n /**\n * Returns a tracer from the global tracer provider.\n */\n public getTracer(name: string, version?: string): Tracer {\n return this.getTracerProvider().getTracer(name, version);\n }\n\n /** Remove the global tracer provider */\n public disable() {\n unregisterGlobal(API_NAME, DiagAPI.instance());\n this._proxyTracerProvider = new ProxyTracerProvider();\n }\n\n public wrapSpanContext = wrapSpanContext;\n\n public isSpanContextValid = isSpanContextValid;\n\n public deleteSpan = deleteSpan;\n\n public getSpan = getSpan;\n\n public getActiveSpan = getActiveSpan;\n\n public getSpanContext = getSpanContext;\n\n public setSpan = setSpan;\n\n public setSpanContext = setSpanContext;\n}\n"]}
@@ -0,0 +1,4 @@
type Result = [boolean, () => void];
export declare const useDelay: (delay: number, triggerOnMount?: boolean) => Result;
export {};
//# sourceMappingURL=useDelay.d.ts.map
@@ -0,0 +1,8 @@
import type { AdminViewServerProps } from 'payload';
import React from 'react';
import './index.scss';
export declare const LogoutView: React.FC<{
inactivity?: boolean;
} & AdminViewServerProps>;
export declare function LogoutInactivity(props: AdminViewServerProps): React.JSX.Element;
//# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,35 @@
import type { ContextOptions, DateArg } from "./types.js";
/**
* The {@link endOfMonth} function options.
*/
export interface EndOfMonthOptions<DateType extends Date = Date>
extends ContextOptions<DateType> {}
/**
* @name endOfMonth
* @category Month Helpers
* @summary Return the end of a month for the given date.
*
* @description
* Return the end of a month for the given date.
* The result will be in the local timezone.
*
* @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 a month
*
* @example
* // The end of a month for 2 September 2014 11:55:00:
* const result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0))
* //=> Tue Sep 30 2014 23:59:59.999
*/
export declare function endOfMonth<
DateType extends Date,
ResultDate extends Date = DateType,
>(
date: DateArg<DateType>,
options?: EndOfMonthOptions<ResultDate> | undefined,
): ResultDate;
@@ -0,0 +1,8 @@
// This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
import { previousWednesday as fn } from "../previousWednesday.mjs";
import { convertToFP } from "./_lib/convertToFP.mjs";
export const previousWednesday = convertToFP(fn, 1);
// Fallback for modularized imports:
export default previousWednesday;
@@ -0,0 +1,25 @@
/**
* @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 Siren = createLucideIcon("Siren", [
["path", { d: "M7 18v-6a5 5 0 1 1 10 0v6", key: "pcx96s" }],
[
"path",
{ d: "M5 21a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-1a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2z", key: "1b4s83" }
],
["path", { d: "M21 12h1", key: "jtio3y" }],
["path", { d: "M18.5 4.5 18 5", key: "g5sp9y" }],
["path", { d: "M2 12h1", key: "1uaihz" }],
["path", { d: "M12 2v1", key: "11qlp1" }],
["path", { d: "m4.929 4.929.707.707", key: "1i51kw" }],
["path", { d: "M12 12v6", key: "3ahymv" }]
]);
export { Siren as default };
//# sourceMappingURL=siren.js.map
@@ -0,0 +1,71 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
/** @typedef {import("../Cache").Etag} Etag */
class MergedEtag {
/**
* @param {Etag} a first
* @param {Etag} b second
*/
constructor(a, b) {
this.a = a;
this.b = b;
}
toString() {
return `${this.a.toString()}|${this.b.toString()}`;
}
}
/** @type {WeakMap<Etag, WeakMap<Etag, MergedEtag>>} */
const dualObjectMap = new WeakMap();
/** @type {WeakMap<Etag, WeakMap<Etag, MergedEtag>>} */
const objectStringMap = new WeakMap();
/**
* @param {Etag} a first
* @param {Etag} b second
* @returns {string | MergedEtag} result
*/
const mergeEtags = (a, b) => {
if (typeof a === "string") {
if (typeof b === "string") {
return `${a}|${b}`;
}
const temp = b;
b = a;
a = temp;
} else if (typeof b !== "string") {
// both a and b are objects
let map = dualObjectMap.get(a);
if (map === undefined) {
dualObjectMap.set(a, (map = new WeakMap()));
}
const mergedEtag = map.get(b);
if (mergedEtag === undefined) {
const newMergedEtag = new MergedEtag(a, b);
map.set(b, newMergedEtag);
return newMergedEtag;
}
return mergedEtag;
}
// a is object, b is string
let map = objectStringMap.get(a);
if (map === undefined) {
objectStringMap.set(a, (map = new Map()));
}
const mergedEtag = map.get(b);
if (mergedEtag === undefined) {
const newMergedEtag = new MergedEtag(a, b);
map.set(b, newMergedEtag);
return newMergedEtag;
}
return mergedEtag;
};
module.exports = mergeEtags;
@@ -0,0 +1 @@
{"version":3,"file":"iteration-ccw.js","sources":["../../../src/icons/iteration-ccw.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name IterationCcw\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMjAgMTBjMC00LjQtMy42LTgtOC04cy04IDMuNi04IDggMy42IDggOCA4aDgiIC8+CiAgPHBvbHlsaW5lIHBvaW50cz0iMTYgMTQgMjAgMTggMTYgMjIiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/iteration-ccw\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 IterationCcw = createLucideIcon('IterationCcw', [\n ['path', { d: 'M20 10c0-4.4-3.6-8-8-8s-8 3.6-8 8 3.6 8 8 8h8', key: '4znkd0' }],\n ['polyline', { points: '16 14 20 18 16 22', key: '11njsm' }],\n]);\n\nexport default IterationCcw;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAe,iBAAiB,cAAgB,CAAA,CAAA,CAAA;AAAA,CAAA,CACpD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAiD,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,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC9E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,CAAA,CAAA,CAAA,CAAE,QAAQ,CAAqB,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;AAC7D,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,26 @@
import type {CodeKeywordDefinition, KeywordErrorDefinition} from "../../types"
import type {KeywordCxt} from "../../compile/validate"
import {_, str, operators} from "../../compile/codegen"
const error: KeywordErrorDefinition = {
message({keyword, schemaCode}) {
const comp = keyword === "maxProperties" ? "more" : "fewer"
return str`must NOT have ${comp} than ${schemaCode} properties`
},
params: ({schemaCode}) => _`{limit: ${schemaCode}}`,
}
const def: CodeKeywordDefinition = {
keyword: ["maxProperties", "minProperties"],
type: "object",
schemaType: "number",
$data: true,
error,
code(cxt: KeywordCxt) {
const {keyword, data, schemaCode} = cxt
const op = keyword === "maxProperties" ? operators.GT : operators.LT
cxt.fail$data(_`Object.keys(${data}).length ${op} ${schemaCode}`)
},
}
export default def
@@ -0,0 +1,21 @@
import type { Span } from '@opentelemetry/api';
import type { InstrumentationConfig } from '@opentelemetry/instrumentation';
export interface FastifyRequestInfo {
request: any;
}
/**
* Function that can be used to add custom attributes to the current span
* @param span - The Fastify handler span.
* @param info - The Fastify request info object.
*/
export interface FastifyCustomAttributeFunction {
(span: Span, info: FastifyRequestInfo): void;
}
/**
* Options available for the Fastify Instrumentation
*/
export interface FastifyInstrumentationConfig extends InstrumentationConfig {
/** Function for adding custom attributes to each handler span */
requestHook?: FastifyCustomAttributeFunction;
}
//# sourceMappingURL=types.d.ts.map
@@ -0,0 +1,558 @@
function _typeof(o) {"@babel/helpers - typeof";return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {return typeof o;} : function (o) {return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;}, _typeof(o);}function ownKeys(e, r) {var t = Object.keys(e);if (Object.getOwnPropertySymbols) {var o = Object.getOwnPropertySymbols(e);r && (o = o.filter(function (r) {return Object.getOwnPropertyDescriptor(e, r).enumerable;})), t.push.apply(t, o);}return t;}function _objectSpread(e) {for (var r = 1; r < arguments.length; r++) {var t = null != arguments[r] ? arguments[r] : {};r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {_defineProperty(e, r, t[r]);}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));});}return e;}function _defineProperty(obj, key, value) {key = _toPropertyKey(key);if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}function _toPropertyKey(t) {var i = _toPrimitive(t, "string");return "symbol" == _typeof(i) ? i : String(i);}function _toPrimitive(t, r) {if ("object" != _typeof(t) || !t) return t;var e = t[Symbol.toPrimitive];if (void 0 !== e) {var i = e.call(t, r || "default");if ("object" != _typeof(i)) return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return ("string" === r ? String : Number)(t);}(function (_window$dateFns) {var __defProp = Object.defineProperty;
var __export = function __export(target, all) {
for (var name in all)
__defProp(target, name, {
get: all[name],
enumerable: true,
configurable: true,
set: function set(newValue) {return all[name] = function () {return newValue;};}
});
};
// lib/locale/eu/_lib/formatDistance.mjs
var formatDistanceLocale = {
lessThanXSeconds: {
one: "segundo bat baino gutxiago",
other: "{{count}} segundo baino gutxiago"
},
xSeconds: {
one: "1 segundo",
other: "{{count}} segundo"
},
halfAMinute: "minutu erdi",
lessThanXMinutes: {
one: "minutu bat baino gutxiago",
other: "{{count}} minutu baino gutxiago"
},
xMinutes: {
one: "1 minutu",
other: "{{count}} minutu"
},
aboutXHours: {
one: "1 ordu gutxi gorabehera",
other: "{{count}} ordu gutxi gorabehera"
},
xHours: {
one: "1 ordu",
other: "{{count}} ordu"
},
xDays: {
one: "1 egun",
other: "{{count}} egun"
},
aboutXWeeks: {
one: "aste 1 inguru",
other: "{{count}} aste inguru"
},
xWeeks: {
one: "1 aste",
other: "{{count}} astean"
},
aboutXMonths: {
one: "1 hilabete gutxi gorabehera",
other: "{{count}} hilabete gutxi gorabehera"
},
xMonths: {
one: "1 hilabete",
other: "{{count}} hilabete"
},
aboutXYears: {
one: "1 urte gutxi gorabehera",
other: "{{count}} urte gutxi gorabehera"
},
xYears: {
one: "1 urte",
other: "{{count}} urte"
},
overXYears: {
one: "1 urte baino gehiago",
other: "{{count}} urte baino gehiago"
},
almostXYears: {
one: "ia 1 urte",
other: "ia {{count}} urte"
}
};
var formatDistance = function formatDistance(token, count, options) {
var result;
var tokenValue = formatDistanceLocale[token];
if (typeof tokenValue === "string") {
result = tokenValue;
} else if (count === 1) {
result = tokenValue.one;
} else {
result = tokenValue.other.replace("{{count}}", String(count));
}
if (options !== null && options !== void 0 && options.addSuffix) {
if (options.comparison && options.comparison > 0) {
return "en " + result;
} else {
return "duela " + result;
}
}
return result;
};
// lib/locale/_lib/buildFormatLongFn.mjs
function buildFormatLongFn(args) {
return function () {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var width = options.width ? String(options.width) : args.defaultWidth;
var format = args.formats[width] || args.formats[args.defaultWidth];
return format;
};
}
// lib/locale/eu/_lib/formatLong.mjs
var dateFormats = {
full: "EEEE, y'ko' MMMM'ren' d'a' y'ren'",
long: "y'ko' MMMM'ren' d'a'",
medium: "y MMM d",
short: "yy/MM/dd"
};
var timeFormats = {
full: "HH:mm:ss zzzz",
long: "HH:mm:ss z",
medium: "HH:mm:ss",
short: "HH:mm"
};
var dateTimeFormats = {
full: "{{date}} 'tan' {{time}}",
long: "{{date}} 'tan' {{time}}",
medium: "{{date}}, {{time}}",
short: "{{date}}, {{time}}"
};
var formatLong = {
date: buildFormatLongFn({
formats: dateFormats,
defaultWidth: "full"
}),
time: buildFormatLongFn({
formats: timeFormats,
defaultWidth: "full"
}),
dateTime: buildFormatLongFn({
formats: dateTimeFormats,
defaultWidth: "full"
})
};
// lib/locale/eu/_lib/formatRelative.mjs
var formatRelativeLocale = {
lastWeek: "'joan den' eeee, LT",
yesterday: "'atzo,' p",
today: "'gaur,' p",
tomorrow: "'bihar,' p",
nextWeek: "eeee, p",
other: "P"
};
var formatRelativeLocalePlural = {
lastWeek: "'joan den' eeee, p",
yesterday: "'atzo,' p",
today: "'gaur,' p",
tomorrow: "'bihar,' p",
nextWeek: "eeee, p",
other: "P"
};
var formatRelative = function formatRelative(token, date) {
if (date.getHours() !== 1) {
return formatRelativeLocalePlural[token];
}
return formatRelativeLocale[token];
};
// lib/locale/_lib/buildLocalizeFn.mjs
function buildLocalizeFn(args) {
return function (value, options) {
var context = options !== null && options !== void 0 && options.context ? String(options.context) : "standalone";
var valuesArray;
if (context === "formatting" && args.formattingValues) {
var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;
valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
} else {
var _defaultWidth = args.defaultWidth;
var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;
valuesArray = args.values[_width] || args.values[_defaultWidth];
}
var index = args.argumentCallback ? args.argumentCallback(value) : value;
return valuesArray[index];
};
}
// lib/locale/eu/_lib/localize.mjs
var eraValues = {
narrow: ["k.a.", "k.o."],
abbreviated: ["k.a.", "k.o."],
wide: ["kristo aurretik", "kristo ondoren"]
};
var quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["1H", "2H", "3H", "4H"],
wide: [
"1. hiruhilekoa",
"2. hiruhilekoa",
"3. hiruhilekoa",
"4. hiruhilekoa"]
};
var monthValues = {
narrow: ["u", "o", "m", "a", "m", "e", "u", "a", "i", "u", "a", "a"],
abbreviated: [
"urt",
"ots",
"mar",
"api",
"mai",
"eka",
"uzt",
"abu",
"ira",
"urr",
"aza",
"abe"],
wide: [
"urtarrila",
"otsaila",
"martxoa",
"apirila",
"maiatza",
"ekaina",
"uztaila",
"abuztua",
"iraila",
"urria",
"azaroa",
"abendua"]
};
var dayValues = {
narrow: ["i", "a", "a", "a", "o", "o", "l"],
short: ["ig", "al", "as", "az", "og", "or", "lr"],
abbreviated: ["iga", "ast", "ast", "ast", "ost", "ost", "lar"],
wide: [
"igandea",
"astelehena",
"asteartea",
"asteazkena",
"osteguna",
"ostirala",
"larunbata"]
};
var dayPeriodValues = {
narrow: {
am: "a",
pm: "p",
midnight: "ge",
noon: "eg",
morning: "goiza",
afternoon: "arratsaldea",
evening: "arratsaldea",
night: "gaua"
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "gauerdia",
noon: "eguerdia",
morning: "goiza",
afternoon: "arratsaldea",
evening: "arratsaldea",
night: "gaua"
},
wide: {
am: "a.m.",
pm: "p.m.",
midnight: "gauerdia",
noon: "eguerdia",
morning: "goiza",
afternoon: "arratsaldea",
evening: "arratsaldea",
night: "gaua"
}
};
var formattingDayPeriodValues = {
narrow: {
am: "a",
pm: "p",
midnight: "ge",
noon: "eg",
morning: "goizean",
afternoon: "arratsaldean",
evening: "arratsaldean",
night: "gauean"
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "gauerdia",
noon: "eguerdia",
morning: "goizean",
afternoon: "arratsaldean",
evening: "arratsaldean",
night: "gauean"
},
wide: {
am: "a.m.",
pm: "p.m.",
midnight: "gauerdia",
noon: "eguerdia",
morning: "goizean",
afternoon: "arratsaldean",
evening: "arratsaldean",
night: "gauean"
}
};
var ordinalNumber = function ordinalNumber(dirtyNumber, _options) {
var number = Number(dirtyNumber);
return number + ".";
};
var localize = {
ordinalNumber: ordinalNumber,
era: buildLocalizeFn({
values: eraValues,
defaultWidth: "wide"
}),
quarter: buildLocalizeFn({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: function argumentCallback(quarter) {return quarter - 1;}
}),
month: buildLocalizeFn({
values: monthValues,
defaultWidth: "wide"
}),
day: buildLocalizeFn({
values: dayValues,
defaultWidth: "wide"
}),
dayPeriod: buildLocalizeFn({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide"
})
};
// lib/locale/_lib/buildMatchFn.mjs
function buildMatchFn(args) {
return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var width = options.width;
var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
var matchResult = string.match(matchPattern);
if (!matchResult) {
return null;
}
var matchedString = matchResult[0];
var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) {return pattern.test(matchedString);}) : findKey(parsePatterns, function (pattern) {return pattern.test(matchedString);});
var value;
value = args.valueCallback ? args.valueCallback(key) : key;
value = options.valueCallback ? options.valueCallback(value) : value;
var rest = string.slice(matchedString.length);
return { value: value, rest: rest };
};
}
var findKey = function findKey(object, predicate) {
for (var key in object) {
if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) {
return key;
}
}
return;
};
var findIndex = function findIndex(array, predicate) {
for (var key = 0; key < array.length; key++) {
if (predicate(array[key])) {
return key;
}
}
return;
};
// lib/locale/_lib/buildMatchPatternFn.mjs
function buildMatchPatternFn(args) {
return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var matchResult = string.match(args.matchPattern);
if (!matchResult)
return null;
var matchedString = matchResult[0];
var parseResult = string.match(args.parsePattern);
if (!parseResult)
return null;
var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
value = options.valueCallback ? options.valueCallback(value) : value;
var rest = string.slice(matchedString.length);
return { value: value, rest: rest };
};
}
// lib/locale/eu/_lib/match.mjs
var matchOrdinalNumberPattern = /^(\d+)(.)?/i;
var parseOrdinalNumberPattern = /\d+/i;
var matchEraPatterns = {
narrow: /^(k.a.|k.o.)/i,
abbreviated: /^(k.a.|k.o.)/i,
wide: /^(kristo aurretik|kristo ondoren)/i
};
var parseEraPatterns = {
narrow: [/^k.a./i, /^k.o./i],
abbreviated: [/^(k.a.)/i, /^(k.o.)/i],
wide: [/^(kristo aurretik)/i, /^(kristo ondoren)/i]
};
var matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^[1234]H/i,
wide: /^[1234](.)? hiruhilekoa/i
};
var parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i]
};
var matchMonthPatterns = {
narrow: /^[uomaei]/i,
abbreviated: /^(urt|ots|mar|api|mai|eka|uzt|abu|ira|urr|aza|abe)/i,
wide: /^(urtarrila|otsaila|martxoa|apirila|maiatza|ekaina|uztaila|abuztua|iraila|urria|azaroa|abendua)/i
};
var parseMonthPatterns = {
narrow: [
/^u/i,
/^o/i,
/^m/i,
/^a/i,
/^m/i,
/^e/i,
/^u/i,
/^a/i,
/^i/i,
/^u/i,
/^a/i,
/^a/i],
any: [
/^urt/i,
/^ots/i,
/^mar/i,
/^api/i,
/^mai/i,
/^eka/i,
/^uzt/i,
/^abu/i,
/^ira/i,
/^urr/i,
/^aza/i,
/^abe/i]
};
var matchDayPatterns = {
narrow: /^[iaol]/i,
short: /^(ig|al|as|az|og|or|lr)/i,
abbreviated: /^(iga|ast|ast|ast|ost|ost|lar)/i,
wide: /^(igandea|astelehena|asteartea|asteazkena|osteguna|ostirala|larunbata)/i
};
var parseDayPatterns = {
narrow: [/^i/i, /^a/i, /^a/i, /^a/i, /^o/i, /^o/i, /^l/i],
short: [/^ig/i, /^al/i, /^as/i, /^az/i, /^og/i, /^or/i, /^lr/i],
abbreviated: [/^iga/i, /^ast/i, /^ast/i, /^ast/i, /^ost/i, /^ost/i, /^lar/i],
wide: [
/^igandea/i,
/^astelehena/i,
/^asteartea/i,
/^asteazkena/i,
/^osteguna/i,
/^ostirala/i,
/^larunbata/i]
};
var matchDayPeriodPatterns = {
narrow: /^(a|p|ge|eg|((goiza|goizean)|arratsaldea|(gaua|gauean)))/i,
any: /^([ap]\.?\s?m\.?|gauerdia|eguerdia|((goiza|goizean)|arratsaldea|(gaua|gauean)))/i
};
var parseDayPeriodPatterns = {
narrow: {
am: /^a/i,
pm: /^p/i,
midnight: /^ge/i,
noon: /^eg/i,
morning: /goiz/i,
afternoon: /arratsaldea/i,
evening: /arratsaldea/i,
night: /gau/i
},
any: {
am: /^a/i,
pm: /^p/i,
midnight: /^gauerdia/i,
noon: /^eguerdia/i,
morning: /goiz/i,
afternoon: /arratsaldea/i,
evening: /arratsaldea/i,
night: /gau/i
}
};
var match = {
ordinalNumber: buildMatchPatternFn({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: function valueCallback(value) {return parseInt(value, 10);}
}),
era: buildMatchFn({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "wide"
}),
quarter: buildMatchFn({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: function valueCallback(index) {return index + 1;}
}),
month: buildMatchFn({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any"
}),
day: buildMatchFn({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "wide"
}),
dayPeriod: buildMatchFn({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any"
})
};
// lib/locale/eu.mjs
var eu = {
code: "eu",
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
options: {
weekStartsOn: 1,
firstWeekContainsDate: 1
}
};
// lib/locale/eu/cdn.js
window.dateFns = _objectSpread(_objectSpread({},
window.dateFns), {}, {
locale: _objectSpread(_objectSpread({}, (_window$dateFns =
window.dateFns) === null || _window$dateFns === void 0 ? void 0 : _window$dateFns.locale), {}, {
eu: eu }) });
//# debugId=1F6898AB2DA81D5B64756e2164756e21
})();
//# sourceMappingURL=cdn.js.map
@@ -0,0 +1,66 @@
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { RenderServerComponent } from '@payloadcms/ui/elements/RenderServerComponent';
import { Fragment } from 'react';
import { DocumentTabLink } from './TabLink.js';
export const baseClass = 'doc-tab';
export const DefaultDocumentTab = props => {
const {
apiURL,
collectionConfig,
globalConfig,
permissions,
req,
tabConfig: {
href: tabHref,
isActive: tabIsActive,
label,
newTab,
Pill,
Pill_Component
}
} = props;
let href = typeof tabHref === 'string' ? tabHref : '';
let isActive = typeof tabIsActive === 'boolean' ? tabIsActive : false;
if (typeof tabHref === 'function') {
href = tabHref({
apiURL,
collection: collectionConfig,
global: globalConfig,
routes: req.payload.config.routes
});
}
if (typeof tabIsActive === 'function') {
isActive = tabIsActive({
href
});
}
const labelToRender = typeof label === 'function' ? label({
t: req.i18n.t
}) : label;
return /*#__PURE__*/_jsx(DocumentTabLink, {
adminRoute: req.payload.config.routes.admin,
ariaLabel: labelToRender,
baseClass: baseClass,
href: href,
isActive: isActive,
newTab: newTab,
children: /*#__PURE__*/_jsxs("span", {
className: `${baseClass}__label`,
children: [labelToRender, Pill || Pill_Component ? /*#__PURE__*/_jsxs(Fragment, {
children: [" ", RenderServerComponent({
Component: Pill,
Fallback: Pill_Component,
importMap: req.payload.importMap,
serverProps: {
i18n: req.i18n,
payload: req.payload,
permissions,
req,
user: req.user
}
})]
}) : null]
})
});
};
//# sourceMappingURL=index.js.map
@@ -0,0 +1,185 @@
"use strict";
exports.localize = void 0;
var _index = require("../../_lib/buildLocalizeFn.cjs");
const eraValues = {
narrow: ["前", "公元"],
abbreviated: ["前", "公元"],
wide: ["公元前", "公元"],
};
const quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["第一刻", "第二刻", "第三刻", "第四刻"],
wide: ["第一刻鐘", "第二刻鐘", "第三刻鐘", "第四刻鐘"],
};
const monthValues = {
narrow: [
"一",
"二",
"三",
"四",
"五",
"六",
"七",
"八",
"九",
"十",
"十一",
"十二",
],
abbreviated: [
"1月",
"2月",
"3月",
"4月",
"5月",
"6月",
"7月",
"8月",
"9月",
"10月",
"11月",
"12月",
],
wide: [
"一月",
"二月",
"三月",
"四月",
"五月",
"六月",
"七月",
"八月",
"九月",
"十月",
"十一月",
"十二月",
],
};
const dayValues = {
narrow: ["日", "一", "二", "三", "四", "五", "六"],
short: ["日", "一", "二", "三", "四", "五", "六"],
abbreviated: ["週日", "週一", "週二", "週三", "週四", "週五", "週六"],
wide: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"],
};
const dayPeriodValues = {
narrow: {
am: "上",
pm: "下",
midnight: "凌晨",
noon: "午",
morning: "早",
afternoon: "下午",
evening: "晚",
night: "夜",
},
abbreviated: {
am: "上午",
pm: "下午",
midnight: "凌晨",
noon: "中午",
morning: "早晨",
afternoon: "中午",
evening: "晚上",
night: "夜間",
},
wide: {
am: "上午",
pm: "下午",
midnight: "凌晨",
noon: "中午",
morning: "早晨",
afternoon: "中午",
evening: "晚上",
night: "夜間",
},
};
const formattingDayPeriodValues = {
narrow: {
am: "上",
pm: "下",
midnight: "凌晨",
noon: "午",
morning: "早",
afternoon: "下午",
evening: "晚",
night: "夜",
},
abbreviated: {
am: "上午",
pm: "下午",
midnight: "凌晨",
noon: "中午",
morning: "早晨",
afternoon: "中午",
evening: "晚上",
night: "夜間",
},
wide: {
am: "上午",
pm: "下午",
midnight: "凌晨",
noon: "中午",
morning: "早晨",
afternoon: "中午",
evening: "晚上",
night: "夜間",
},
};
const ordinalNumber = (dirtyNumber, options) => {
const number = Number(dirtyNumber);
switch (options?.unit) {
case "date":
return number + "日";
case "hour":
return number + "時";
case "minute":
return number + "分";
case "second":
return number + "秒";
default:
return "第 " + number;
}
};
const localize = (exports.localize = {
ordinalNumber,
era: (0, _index.buildLocalizeFn)({
values: eraValues,
defaultWidth: "wide",
}),
quarter: (0, _index.buildLocalizeFn)({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: (quarter) => quarter - 1,
}),
month: (0, _index.buildLocalizeFn)({
values: monthValues,
defaultWidth: "wide",
}),
day: (0, _index.buildLocalizeFn)({
values: dayValues,
defaultWidth: "wide",
}),
dayPeriod: (0, _index.buildLocalizeFn)({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide",
}),
});
@@ -0,0 +1 @@
{"version":3,"sources":["../src/migrator.ts"],"sourcesContent":["import crypto from 'node:crypto';\nimport fs from 'node:fs';\n\nexport interface KitConfig {\n\tout: string;\n\tschema: string;\n}\n\nexport interface MigrationConfig {\n\tmigrationsFolder: string;\n\tmigrationsTable?: string;\n\tmigrationsSchema?: string;\n}\n\nexport interface MigrationMeta {\n\tsql: string[];\n\tfolderMillis: number;\n\thash: string;\n\tbps: boolean;\n}\n\nexport function readMigrationFiles(config: MigrationConfig): MigrationMeta[] {\n\tconst migrationFolderTo = config.migrationsFolder;\n\n\tconst migrationQueries: MigrationMeta[] = [];\n\n\tconst journalPath = `${migrationFolderTo}/meta/_journal.json`;\n\tif (!fs.existsSync(journalPath)) {\n\t\tthrow new Error(`Can't find meta/_journal.json file`);\n\t}\n\n\tconst journalAsString = fs.readFileSync(`${migrationFolderTo}/meta/_journal.json`).toString();\n\n\tconst journal = JSON.parse(journalAsString) as {\n\t\tentries: { idx: number; when: number; tag: string; breakpoints: boolean }[];\n\t};\n\n\tfor (const journalEntry of journal.entries) {\n\t\tconst migrationPath = `${migrationFolderTo}/${journalEntry.tag}.sql`;\n\n\t\ttry {\n\t\t\tconst query = fs.readFileSync(`${migrationFolderTo}/${journalEntry.tag}.sql`).toString();\n\n\t\t\tconst result = query.split('--> statement-breakpoint').map((it) => {\n\t\t\t\treturn it;\n\t\t\t});\n\n\t\t\tmigrationQueries.push({\n\t\t\t\tsql: result,\n\t\t\t\tbps: journalEntry.breakpoints,\n\t\t\t\tfolderMillis: journalEntry.when,\n\t\t\t\thash: crypto.createHash('sha256').update(query).digest('hex'),\n\t\t\t});\n\t\t} catch {\n\t\t\tthrow new Error(`No file ${migrationPath} found in ${migrationFolderTo} folder`);\n\t\t}\n\t}\n\n\treturn migrationQueries;\n}\n"],"mappings":"AAAA,OAAO,YAAY;AACnB,OAAO,QAAQ;AAoBR,SAAS,mBAAmB,QAA0C;AAC5E,QAAM,oBAAoB,OAAO;AAEjC,QAAM,mBAAoC,CAAC;AAE3C,QAAM,cAAc,GAAG,iBAAiB;AACxC,MAAI,CAAC,GAAG,WAAW,WAAW,GAAG;AAChC,UAAM,IAAI,MAAM,oCAAoC;AAAA,EACrD;AAEA,QAAM,kBAAkB,GAAG,aAAa,GAAG,iBAAiB,qBAAqB,EAAE,SAAS;AAE5F,QAAM,UAAU,KAAK,MAAM,eAAe;AAI1C,aAAW,gBAAgB,QAAQ,SAAS;AAC3C,UAAM,gBAAgB,GAAG,iBAAiB,IAAI,aAAa,GAAG;AAE9D,QAAI;AACH,YAAM,QAAQ,GAAG,aAAa,GAAG,iBAAiB,IAAI,aAAa,GAAG,MAAM,EAAE,SAAS;AAEvF,YAAM,SAAS,MAAM,MAAM,0BAA0B,EAAE,IAAI,CAAC,OAAO;AAClE,eAAO;AAAA,MACR,CAAC;AAED,uBAAiB,KAAK;AAAA,QACrB,KAAK;AAAA,QACL,KAAK,aAAa;AAAA,QAClB,cAAc,aAAa;AAAA,QAC3B,MAAM,OAAO,WAAW,QAAQ,EAAE,OAAO,KAAK,EAAE,OAAO,KAAK;AAAA,MAC7D,CAAC;AAAA,IACF,QAAQ;AACP,YAAM,IAAI,MAAM,WAAW,aAAa,aAAa,iBAAiB,SAAS;AAAA,IAChF;AAAA,EACD;AAEA,SAAO;AACR;","names":[]}
@@ -0,0 +1,2 @@
function e(e){return JSON.stringify({...e,type:`auth`})}exports.auth=e;
//# sourceMappingURL=auth.cjs.map
@@ -0,0 +1,104 @@
import { getTsconfig } from 'get-tsconfig';
import path from 'path';
import { findUpSync } from '../utilities/findUp.js';
/**
* List of all filenames to detect as a Payload configuration file.
*/ export const payloadConfigFileNames = [
'payload.config.js',
'payload.config.ts'
];
/**
* Returns the source and output paths from the nearest tsconfig.json file.
* If no tsconfig.json file is found, returns the current working directory.
* @returns An object containing the source and output paths.
*/ const getTSConfigPaths = ()=>{
const tsConfigResult = getTsconfig();
const tsConfig = tsConfigResult.config;
const tsConfigDir = path.dirname(tsConfigResult.path);
try {
const rootConfigDir = path.resolve(tsConfigDir, tsConfig.compilerOptions.baseUrl || '');
const srcPath = tsConfig.compilerOptions?.rootDir || path.resolve(process.cwd(), 'src');
const outPath = tsConfig.compilerOptions?.outDir || path.resolve(process.cwd(), 'dist');
let configPath = tsConfig.compilerOptions?.paths?.['@payload-config']?.[0];
if (configPath) {
configPath = path.resolve(rootConfigDir, configPath);
}
return {
configPath,
outPath,
rootPath: rootConfigDir,
srcPath,
tsConfigPath: tsConfigResult.path
};
} catch (error) {
console.error(`Error parsing tsconfig.json: ${error}`); // Do not throw the error, as we can still continue with the other config path finding methods
return {
rootPath: process.cwd()
};
}
};
/**
* Searches for a Payload configuration file.
* @returns The absolute path to the Payload configuration file.
* @throws An error if no configuration file is found.
*/ export const findConfig = ()=>{
// If the developer has specified a config path,
// format it if relative and use it directly if absolute
if (process.env.PAYLOAD_CONFIG_PATH) {
if (path.isAbsolute(process.env.PAYLOAD_CONFIG_PATH)) {
return process.env.PAYLOAD_CONFIG_PATH;
}
return path.resolve(process.cwd(), process.env.PAYLOAD_CONFIG_PATH);
}
const { configPath, outPath, rootPath, srcPath } = getTSConfigPaths();
// if configPath is absolute file, not folder, return it
if (configPath && (path.extname(configPath) === '.js' || path.extname(configPath) === '.ts')) {
return configPath;
}
const searchPaths = process.env.NODE_ENV === 'production' ? [
configPath,
outPath,
srcPath,
rootPath
] : [
configPath,
srcPath,
rootPath
];
for (const searchPath of searchPaths){
if (!searchPath) {
continue;
}
const configPath = findUpSync({
dir: searchPath,
fileNames: payloadConfigFileNames
});
if (configPath) {
return configPath;
}
}
// If no config file is found in the directories defined by tsconfig.json,
// try searching in the 'src' and 'dist' directory as a last resort, as they are most commonly used
if (process.env.NODE_ENV === 'production') {
const distConfigPath = findUpSync({
dir: path.resolve(process.cwd(), 'dist'),
fileNames: [
'payload.config.js'
]
});
if (distConfigPath) {
return distConfigPath;
}
} else {
const srcConfigPath = findUpSync({
dir: path.resolve(process.cwd(), 'src'),
fileNames: payloadConfigFileNames
});
if (srcConfigPath) {
return srcConfigPath;
}
}
throw new Error('Error: cannot find Payload config. Please create a configuration file located at the root of your current working directory called "payload.config.js" or "payload.config.ts".');
};
//# sourceMappingURL=find.js.map
@@ -0,0 +1,28 @@
import { formatDistance } from "./it/_lib/formatDistance.mjs";
import { formatRelative } from "./it/_lib/formatRelative.mjs";
import { localize } from "./it/_lib/localize.mjs";
import { match } from "./it/_lib/match.mjs";
import { formatLong } from "./it-CH/_lib/formatLong.mjs";
/**
* @category Locales
* @summary Italian locale (Switzerland).
* @language Italian
* @iso-639-2 ita
* @author Mike Peyer [@maic66](https://github.com/maic66)
*/
export const itCH = {
code: "it-CH",
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
options: {
weekStartsOn: 1 /* Monday */,
firstWeekContainsDate: 4,
},
};
// Fallback for modularized imports:
export default itCH;
@@ -0,0 +1,77 @@
/*
* Copyright The OpenTelemetry Authors
*
* 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.
*/
import { diag, } from '@opentelemetry/api';
/** Combines multiple propagators into a single propagator. */
export class CompositePropagator {
_propagators;
_fields;
/**
* Construct a composite propagator from a list of propagators.
*
* @param [config] Configuration object for composite propagator
*/
constructor(config = {}) {
this._propagators = config.propagators ?? [];
this._fields = Array.from(new Set(this._propagators
// older propagators may not have fields function, null check to be sure
.map(p => (typeof p.fields === 'function' ? p.fields() : []))
.reduce((x, y) => x.concat(y), [])));
}
/**
* Run each of the configured propagators with the given context and carrier.
* Propagators are run in the order they are configured, so if multiple
* propagators write the same carrier key, the propagator later in the list
* will "win".
*
* @param context Context to inject
* @param carrier Carrier into which context will be injected
*/
inject(context, carrier, setter) {
for (const propagator of this._propagators) {
try {
propagator.inject(context, carrier, setter);
}
catch (err) {
diag.warn(`Failed to inject with ${propagator.constructor.name}. Err: ${err.message}`);
}
}
}
/**
* Run each of the configured propagators with the given context and carrier.
* Propagators are run in the order they are configured, so if multiple
* propagators write the same context key, the propagator later in the list
* will "win".
*
* @param context Context to add values to
* @param carrier Carrier from which to extract context
*/
extract(context, carrier, getter) {
return this._propagators.reduce((ctx, propagator) => {
try {
return propagator.extract(ctx, carrier, getter);
}
catch (err) {
diag.warn(`Failed to extract with ${propagator.constructor.name}. Err: ${err.message}`);
}
return ctx;
}, context);
}
fields() {
// return a new array so our fields cannot be modified
return this._fields.slice();
}
}
//# sourceMappingURL=composite.js.map
@@ -0,0 +1,63 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var varchar_exports = {};
__export(varchar_exports, {
SingleStoreVarChar: () => SingleStoreVarChar,
SingleStoreVarCharBuilder: () => SingleStoreVarCharBuilder,
varchar: () => varchar
});
module.exports = __toCommonJS(varchar_exports);
var import_entity = require("../../entity.cjs");
var import_utils = require("../../utils.cjs");
var import_common = require("./common.cjs");
class SingleStoreVarCharBuilder extends import_common.SingleStoreColumnBuilder {
static [import_entity.entityKind] = "SingleStoreVarCharBuilder";
/** @internal */
constructor(name, config) {
super(name, "string", "SingleStoreVarChar");
this.config.length = config.length;
this.config.enum = config.enum;
}
/** @internal */
build(table) {
return new SingleStoreVarChar(
table,
this.config
);
}
}
class SingleStoreVarChar extends import_common.SingleStoreColumn {
static [import_entity.entityKind] = "SingleStoreVarChar";
length = this.config.length;
enumValues = this.config.enum;
getSQLType() {
return this.length === void 0 ? `varchar` : `varchar(${this.length})`;
}
}
function varchar(a, b) {
const { name, config } = (0, import_utils.getColumnNameAndConfig)(a, b);
return new SingleStoreVarCharBuilder(name, config);
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
SingleStoreVarChar,
SingleStoreVarCharBuilder,
varchar
});
//# sourceMappingURL=varchar.cjs.map
@@ -0,0 +1,61 @@
import { bigint } from "./bigint.js";
import { binary } from "./binary.js";
import { boolean } from "./boolean.js";
import { char } from "./char.js";
import { customType } from "./custom.js";
import { date } from "./date.js";
import { datetime } from "./datetime.js";
import { decimal } from "./decimal.js";
import { double } from "./double.js";
import { singlestoreEnum } from "./enum.js";
import { float } from "./float.js";
import { int } from "./int.js";
import { json } from "./json.js";
import { mediumint } from "./mediumint.js";
import { real } from "./real.js";
import { serial } from "./serial.js";
import { smallint } from "./smallint.js";
import { longtext, mediumtext, text, tinytext } from "./text.js";
import { time } from "./time.js";
import { timestamp } from "./timestamp.js";
import { tinyint } from "./tinyint.js";
import { varbinary } from "./varbinary.js";
import { varchar } from "./varchar.js";
import { vector } from "./vector.js";
import { year } from "./year.js";
function getSingleStoreColumnBuilders() {
return {
bigint,
binary,
boolean,
char,
customType,
date,
datetime,
decimal,
double,
singlestoreEnum,
float,
int,
json,
mediumint,
real,
serial,
smallint,
longtext,
mediumtext,
text,
tinytext,
time,
timestamp,
tinyint,
varbinary,
varchar,
vector,
year
};
}
export {
getSingleStoreColumnBuilders
};
//# sourceMappingURL=all.js.map
@@ -0,0 +1,8 @@
"use strict";
exports.eachQuarterOfInterval = void 0;
var _index = require("../eachQuarterOfInterval.js");
var _index2 = require("./_lib/convertToFP.js"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
const eachQuarterOfInterval = (exports.eachQuarterOfInterval = (0,
_index2.convertToFP)(_index.eachQuarterOfInterval, 1));
@@ -0,0 +1,41 @@
import { constructFrom } from "./constructFrom.js";
import { constructNow } from "./constructNow.js";
/**
* The {@link startOfTomorrow} function options.
*/
/**
* @name startOfTomorrow
* @category Day Helpers
* @summary Return the start of tomorrow.
* @pure false
*
* @typeParam ContextDate - The `Date` type of the context function.
*
* @param options - An object with options
*
* @returns The start of tomorrow
*
* @description
* Return the start of tomorrow.
*
* @example
* // If today is 6 October 2014:
* const result = startOfTomorrow()
* //=> Tue Oct 7 2014 00:00:00
*/
export function startOfTomorrow(options) {
const now = constructNow(options?.in);
const year = now.getFullYear();
const month = now.getMonth();
const day = now.getDate();
const date = constructFrom(options?.in, 0);
date.setFullYear(year, month, day + 1);
date.setHours(0, 0, 0, 0);
return date;
}
// Fallback for modularized imports:
export default startOfTomorrow;
@@ -0,0 +1,233 @@
import type { ResultSetHeader } from 'mysql2/promise';
import type { Cache } from "../cache/core/cache.js";
import { entityKind } from "../entity.js";
import type { ExtractTablesWithRelations, RelationalSchemaConfig, TablesRelationalConfig } from "../relations.js";
import type { SingleStoreDriverDatabase } from "../singlestore/driver.js";
import { type SQL, type SQLWrapper } from "../sql/sql.js";
import { WithSubquery } from "../subquery.js";
import type { SingleStoreDialect } from "./dialect.js";
import { SingleStoreCountBuilder } from "./query-builders/count.js";
import { SingleStoreDeleteBase, SingleStoreInsertBuilder, SingleStoreSelectBuilder, SingleStoreUpdateBuilder } from "./query-builders/index.js";
import type { SelectedFields } from "./query-builders/select.types.js";
import type { PreparedQueryHKTBase, SingleStoreQueryResultHKT, SingleStoreQueryResultKind, SingleStoreSession, SingleStoreTransaction, SingleStoreTransactionConfig } from "./session.js";
import type { WithBuilder } from "./subquery.js";
import type { SingleStoreTable } from "./table.js";
export declare class SingleStoreDatabase<TQueryResult extends SingleStoreQueryResultHKT, TPreparedQueryHKT extends PreparedQueryHKTBase, TFullSchema extends Record<string, unknown> = {}, TSchema extends TablesRelationalConfig = ExtractTablesWithRelations<TFullSchema>> {
static readonly [entityKind]: string;
readonly _: {
readonly schema: TSchema | undefined;
readonly fullSchema: TFullSchema;
readonly tableNamesMap: Record<string, string>;
};
/**@inrernal */
query: unknown;
constructor(
/** @internal */
dialect: SingleStoreDialect,
/** @internal */
session: SingleStoreSession<any, 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: WithBuilder;
$count(source: SingleStoreTable | SQL | SQLWrapper, // SingleStoreViewBase |
filters?: SQL<unknown>): SingleStoreCountBuilder<SingleStoreSession<any, 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: {
(): SingleStoreSelectBuilder<undefined, TPreparedQueryHKT>;
<TSelection extends SelectedFields>(fields: TSelection): SingleStoreSelectBuilder<TSelection, TPreparedQueryHKT>;
};
selectDistinct: {
(): SingleStoreSelectBuilder<undefined, TPreparedQueryHKT>;
<TSelection extends SelectedFields>(fields: TSelection): SingleStoreSelectBuilder<TSelection, TPreparedQueryHKT>;
};
update: <TTable extends SingleStoreTable>(table: TTable) => SingleStoreUpdateBuilder<TTable, TQueryResult, TPreparedQueryHKT>;
delete: <TTable extends SingleStoreTable>(table: TTable) => SingleStoreDeleteBase<TTable, TQueryResult, TPreparedQueryHKT>;
};
/**
* 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(): SingleStoreSelectBuilder<undefined, TPreparedQueryHKT>;
select<TSelection extends SelectedFields>(fields: TSelection): SingleStoreSelectBuilder<TSelection, TPreparedQueryHKT>;
/**
* 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(): SingleStoreSelectBuilder<undefined, TPreparedQueryHKT>;
selectDistinct<TSelection extends SelectedFields>(fields: TSelection): SingleStoreSelectBuilder<TSelection, TPreparedQueryHKT>;
/**
* 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<TTable extends SingleStoreTable>(table: TTable): SingleStoreUpdateBuilder<TTable, TQueryResult, TPreparedQueryHKT>;
/**
* 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<TTable extends SingleStoreTable>(table: TTable): SingleStoreInsertBuilder<TTable, TQueryResult, TPreparedQueryHKT>;
/**
* 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<TTable extends SingleStoreTable>(table: TTable): SingleStoreDeleteBase<TTable, TQueryResult, TPreparedQueryHKT>;
execute<T extends {
[column: string]: any;
} = ResultSetHeader>(query: SQLWrapper | string): Promise<SingleStoreQueryResultKind<TQueryResult, T>>;
$cache: {
invalidate: Cache['onMutate'];
};
transaction<T>(transaction: (tx: SingleStoreTransaction<TQueryResult, TPreparedQueryHKT, TFullSchema, TSchema>, config?: SingleStoreTransactionConfig) => Promise<T>, config?: SingleStoreTransactionConfig): Promise<T>;
}
export type SingleStoreWithReplicas<Q> = Q & {
$primary: Q;
$replicas: Q[];
};
export declare const withReplicas: <Q extends SingleStoreDriverDatabase>(primary: Q, replicas: [Q, ...Q[]], getReplica?: (replicas: Q[]) => Q) => SingleStoreWithReplicas<Q>;
@@ -0,0 +1,19 @@
[![npm version](https://badge.fury.io/js/%40tokenizer%2Ftoken.svg)](https://www.npmjs.com/package/@tokenizer/token)
[![npm downloads](http://img.shields.io/npm/dm/@tokenizer/token.svg)](https://npmcharts.com/compare/@tokenizer/token?interval=30)
# @tokenizer/token
TypeScript definition of an [strtok3](https://github.com/Borewit/strtok3) token.
## Licence
(The MIT License)
Copyright (c) 2020 Borewit
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.
@@ -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 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","2":"C L M","260":"G N O P"},C:{"1":"0 1 2 3 4 5 6 7 8 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 4C 5C","33":"BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB"},D:{"1":"0 1 2 3 4 5 6 7 8 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","33":"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"},E:{"1":"B C L M G 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 A 6C bC 7C 8C 9C AD cC"},F:{"1":"0 1 2 3 4 5 6 7 8 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":"F B C G N O JD KD LD MD PC xC ND QC","33":"9 P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB"},G:{"1":"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","2":"E bC OD yC PD QD RD SD TD UD VD WD"},H:{"2":"mD"},I:{"1":"I","2":"VC J nD oD pD qD yC rD sD"},J:{"2":"D","130":"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 AB BB CB DB EB FB GB HB IB uD vD wD xD cC yD zD 0D 1D 2D SC TC UC 3D","33":"J tD"},Q:{"1":"4D"},R:{"1":"5D"},S:{"1":"6D 7D"}},B:5,C:"WebRTC Peer-to-peer connections",D:true};
@@ -0,0 +1 @@
{"version":3,"file":"reportPageLoaded.d.ts","sourceRoot":"","sources":["../../../../src/tracing/reportPageLoaded.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAG3C;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,GAAE,MAAM,GAAG,SAAuB,GAAG,IAAI,CAE/E"}
@@ -0,0 +1 @@
{"version":3,"file":"grid-3x3.js","sources":["../../../src/icons/grid-3x3.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Grid3x3\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHg9IjMiIHk9IjMiIHJ4PSIyIiAvPgogIDxwYXRoIGQ9Ik0zIDloMTgiIC8+CiAgPHBhdGggZD0iTTMgMTVoMTgiIC8+CiAgPHBhdGggZD0iTTkgM3YxOCIgLz4KICA8cGF0aCBkPSJNMTUgM3YxOCIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/grid-3x3\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 Grid3x3 = createLucideIcon('Grid3x3', [\n ['rect', { width: '18', height: '18', x: '3', y: '3', rx: '2', key: 'afitv7' }],\n ['path', { d: 'M3 9h18', key: '1pudct' }],\n ['path', { d: 'M3 15h18', key: '5xshup' }],\n ['path', { d: 'M9 3v18', key: 'fh3hqa' }],\n ['path', { d: 'M15 3v18', key: '14nvp0' }],\n]);\n\nexport default Grid3x3;\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,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,MAAM,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC9E,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,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;AAC3C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,6 @@
export declare const isSameWeekWithOptions: import("./types.js").FPFn3<
boolean,
import("../isSameWeek.js").IsSameWeekOptions | undefined,
string | number | Date,
string | number | Date
>;
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_get.cjs",
"module": "../../esm/_get.js"
}
@@ -0,0 +1,9 @@
// This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
import { setMinutes as fn } from "../setMinutes.js";
import { convertToFP } from "./_lib/convertToFP.js";
export const setMinutesWithOptions = convertToFP(fn, 3);
// Fallback for modularized imports:
export default setMinutesWithOptions;
@@ -0,0 +1,24 @@
/**
* A time duration.
*/
export type DurationUnit = 'nanosecond' | 'microsecond' | 'millisecond' | 'second' | 'minute' | 'hour' | 'day' | 'week';
/**
* Size of information derived from bytes.
*/
export type InformationUnit = 'bit' | 'byte' | 'kilobyte' | 'kibibyte' | 'megabyte' | 'mebibyte' | 'gigabyte' | 'gibibyte' | 'terabyte' | 'tebibyte' | 'petabyte' | 'pebibyte' | 'exabyte' | 'exbibyte';
/**
* Fractions such as percentages.
*/
export type FractionUnit = 'ratio' | 'percent';
/**
* Untyped value without a unit.
*/
export type NoneUnit = '' | 'none';
type LiteralUnion<T extends string> = T | Pick<T, Exclude<keyof T, T>>;
export type MeasurementUnit = LiteralUnion<DurationUnit | InformationUnit | FractionUnit | NoneUnit>;
export type Measurements = Record<string, {
value: number;
unit: MeasurementUnit;
}>;
export {};
//# sourceMappingURL=measurement.d.ts.map
@@ -0,0 +1,8 @@
import type { CollectionBeforeDeleteHook } from '../../index.js';
type Args = {
folderFieldName: string;
folderSlug: string;
};
export declare const deleteSubfoldersBeforeDelete: ({ folderFieldName, folderSlug, }: Args) => CollectionBeforeDeleteHook;
export {};
//# sourceMappingURL=deleteSubfoldersAfterDelete.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"receipt-swiss-franc.js","sources":["../../../src/icons/receipt-swiss-franc.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ReceiptSwissFranc\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNCAydjIwbDItMSAyIDEgMi0xIDIgMSAyLTEgMiAxIDItMSAyIDFWMmwtMiAxLTItMS0yIDEtMi0xLTIgMS0yLTEtMiAxWiIgLz4KICA8cGF0aCBkPSJNMTAgMTdWN2g1IiAvPgogIDxwYXRoIGQ9Ik0xMCAxMWg0IiAvPgogIDxwYXRoIGQ9Ik04IDE1aDUiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/receipt-swiss-franc\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 ReceiptSwissFranc = createLucideIcon('ReceiptSwissFranc', [\n [\n 'path',\n { d: 'M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z', key: 'q3az6g' },\n ],\n ['path', { d: 'M10 17V7h5', key: 'k7jq18' }],\n ['path', { d: 'M10 11h4', key: '1i0mka' }],\n ['path', { d: 'M8 15h5', key: 'vxg57a' }],\n]);\n\nexport default ReceiptSwissFranc;\n"],"names":[],"mappings":";;;;;;;;;AAaM,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,CAAoB,iBAAiB,mBAAqB,CAAA,CAAA,CAAA;AAAA,CAC9D,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA,CAAE,CAAA,CAAG,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,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,CAA2E,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,QAAS,CAAA,CAAA;AAAA,CAChG,CAAA,CAAA,CAAA;AAAA,CAAA,CACA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC3C,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,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC1C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,108 @@
import { URL } from 'url'
import { TlsOptions } from 'tls'
import Dispatcher from './dispatcher'
import buildConnector from "./connector";
type ClientConnectOptions = Omit<Dispatcher.ConnectOptions, "origin">;
/**
* A basic HTTP/1.1 client, mapped on top a single TCP/TLS connection. Pipelining is disabled by default.
*/
export class Client extends Dispatcher {
constructor(url: string | URL, options?: Client.Options);
/** Property to get and set the pipelining factor. */
pipelining: number;
/** `true` after `client.close()` has been called. */
closed: boolean;
/** `true` after `client.destroyed()` has been called or `client.close()` has been called and the client shutdown has completed. */
destroyed: boolean;
// Override dispatcher APIs.
override connect(
options: ClientConnectOptions
): Promise<Dispatcher.ConnectData>;
override connect(
options: ClientConnectOptions,
callback: (err: Error | null, data: Dispatcher.ConnectData) => void
): void;
}
export declare namespace Client {
export interface OptionsInterceptors {
Client: readonly Dispatcher.DispatchInterceptor[];
}
export interface Options {
/** TODO */
interceptors?: OptionsInterceptors;
/** The maximum length of request headers in bytes. Default: Node.js' `--max-http-header-size` or `16384` (16KiB). */
maxHeaderSize?: number;
/** The amount of time, in milliseconds, the parser will wait to receive the complete HTTP headers (Node 14 and above only). Default: `300e3` milliseconds (300s). */
headersTimeout?: number;
/** @deprecated unsupported socketTimeout, use headersTimeout & bodyTimeout instead */
socketTimeout?: never;
/** @deprecated unsupported requestTimeout, use headersTimeout & bodyTimeout instead */
requestTimeout?: never;
/** TODO */
connectTimeout?: number;
/** The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use `0` to disable it entirely. Default: `300e3` milliseconds (300s). */
bodyTimeout?: number;
/** @deprecated unsupported idleTimeout, use keepAliveTimeout instead */
idleTimeout?: never;
/** @deprecated unsupported keepAlive, use pipelining=0 instead */
keepAlive?: never;
/** the timeout, in milliseconds, after which a socket without active requests will time out. Monitors time between activity on a connected socket. This value may be overridden by *keep-alive* hints from the server. Default: `4e3` milliseconds (4s). */
keepAliveTimeout?: number;
/** @deprecated unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead */
maxKeepAliveTimeout?: never;
/** the maximum allowed `idleTimeout`, in milliseconds, when overridden by *keep-alive* hints from the server. Default: `600e3` milliseconds (10min). */
keepAliveMaxTimeout?: number;
/** A number of milliseconds subtracted from server *keep-alive* hints when overriding `idleTimeout` to account for timing inaccuracies caused by e.g. transport latency. Default: `1e3` milliseconds (1s). */
keepAliveTimeoutThreshold?: number;
/** TODO */
socketPath?: string;
/** The amount of concurrent requests to be sent over the single TCP/TLS connection according to [RFC7230](https://tools.ietf.org/html/rfc7230#section-6.3.2). Default: `1`. */
pipelining?: number;
/** @deprecated use the connect option instead */
tls?: never;
/** If `true`, an error is thrown when the request content-length header doesn't match the length of the request body. Default: `true`. */
strictContentLength?: boolean;
/** TODO */
maxCachedSessions?: number;
/** TODO */
maxRedirections?: number;
/** TODO */
connect?: buildConnector.BuildOptions | buildConnector.connector;
/** TODO */
maxRequestsPerClient?: number;
/** TODO */
localAddress?: string;
/** Max response body size in bytes, -1 is disabled */
maxResponseSize?: number;
/** Enables a family autodetection algorithm that loosely implements section 5 of RFC 8305. */
autoSelectFamily?: boolean;
/** The amount of time in milliseconds to wait for a connection attempt to finish before trying the next address when using the `autoSelectFamily` option. */
autoSelectFamilyAttemptTimeout?: number;
/**
* @description Enables support for H2 if the server has assigned bigger priority to it through ALPN negotiation.
* @default false
*/
allowH2?: boolean;
/**
* @description Dictates the maximum number of concurrent streams for a single H2 session. It can be overridden by a SETTINGS remote frame.
* @default 100
*/
maxConcurrentStreams?: number
}
export interface SocketInfo {
localAddress?: string
localPort?: number
remoteAddress?: string
remotePort?: number
remoteFamily?: string
timeout?: number
bytesWritten?: number
bytesRead?: number
}
}
export default Client;
@@ -0,0 +1,6 @@
/**
* Merges objects together
* @param args - objects / values to be merged
*/
export declare function merge(...args: any[]): any;
//# sourceMappingURL=merge.d.ts.map
@@ -0,0 +1,89 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var unique_constraint_exports = {};
__export(unique_constraint_exports, {
UniqueConstraint: () => UniqueConstraint,
UniqueConstraintBuilder: () => UniqueConstraintBuilder,
UniqueOnConstraintBuilder: () => UniqueOnConstraintBuilder,
unique: () => unique,
uniqueKeyName: () => uniqueKeyName
});
module.exports = __toCommonJS(unique_constraint_exports);
var import_entity = require("../entity.cjs");
var import_table_utils = require("../table.utils.cjs");
function unique(name) {
return new UniqueOnConstraintBuilder(name);
}
function uniqueKeyName(table, columns) {
return `${table[import_table_utils.TableName]}_${columns.join("_")}_unique`;
}
class UniqueConstraintBuilder {
constructor(columns, name) {
this.name = name;
this.columns = columns;
}
static [import_entity.entityKind] = "GelUniqueConstraintBuilder";
/** @internal */
columns;
/** @internal */
nullsNotDistinctConfig = false;
nullsNotDistinct() {
this.nullsNotDistinctConfig = true;
return this;
}
/** @internal */
build(table) {
return new UniqueConstraint(table, this.columns, this.nullsNotDistinctConfig, this.name);
}
}
class UniqueOnConstraintBuilder {
static [import_entity.entityKind] = "GelUniqueOnConstraintBuilder";
/** @internal */
name;
constructor(name) {
this.name = name;
}
on(...columns) {
return new UniqueConstraintBuilder(columns, this.name);
}
}
class UniqueConstraint {
constructor(table, columns, nullsNotDistinct, name) {
this.table = table;
this.columns = columns;
this.name = name ?? uniqueKeyName(this.table, this.columns.map((column) => column.name));
this.nullsNotDistinct = nullsNotDistinct;
}
static [import_entity.entityKind] = "GelUniqueConstraint";
columns;
name;
nullsNotDistinct = false;
getName() {
return this.name;
}
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
UniqueConstraint,
UniqueConstraintBuilder,
UniqueOnConstraintBuilder,
unique,
uniqueKeyName
});
//# sourceMappingURL=unique-constraint.cjs.map
@@ -0,0 +1,113 @@
const singleComment = Symbol('singleComment');
const multiComment = Symbol('multiComment');
const stripWithoutWhitespace = () => '';
// Replace all characters except ASCII spaces, tabs and line endings with regular spaces to ensure valid JSON output.
const stripWithWhitespace = (string, start, end) => string.slice(start, end).replace(/[^ \t\r\n]/g, ' ');
const isEscaped = (jsonString, quotePosition) => {
let index = quotePosition - 1;
let backslashCount = 0;
while (jsonString[index] === '\\') {
index -= 1;
backslashCount += 1;
}
return Boolean(backslashCount % 2);
};
export default function stripJsonComments(jsonString, {whitespace = true, trailingCommas = false} = {}) {
if (typeof jsonString !== 'string') {
throw new TypeError(`Expected argument \`jsonString\` to be a \`string\`, got \`${typeof jsonString}\``);
}
const strip = whitespace ? stripWithWhitespace : stripWithoutWhitespace;
let isInsideString = false;
let isInsideComment = false;
let offset = 0;
let buffer = '';
let result = '';
let commaIndex = -1;
for (let index = 0; index < jsonString.length; index++) {
const currentCharacter = jsonString[index];
const nextCharacter = jsonString[index + 1];
if (!isInsideComment && currentCharacter === '"') {
// Enter or exit string
const escaped = isEscaped(jsonString, index);
if (!escaped) {
isInsideString = !isInsideString;
}
}
if (isInsideString) {
continue;
}
if (!isInsideComment && currentCharacter + nextCharacter === '//') {
// Enter single-line comment
buffer += jsonString.slice(offset, index);
offset = index;
isInsideComment = singleComment;
index++;
} else if (isInsideComment === singleComment && currentCharacter + nextCharacter === '\r\n') {
// Exit single-line comment via \r\n
index++;
isInsideComment = false;
buffer += strip(jsonString, offset, index);
offset = index;
continue;
} else if (isInsideComment === singleComment && currentCharacter === '\n') {
// Exit single-line comment via \n
isInsideComment = false;
buffer += strip(jsonString, offset, index);
offset = index;
} else if (!isInsideComment && currentCharacter + nextCharacter === '/*') {
// Enter multiline comment
buffer += jsonString.slice(offset, index);
offset = index;
isInsideComment = multiComment;
index++;
continue;
} else if (isInsideComment === multiComment && currentCharacter + nextCharacter === '*/') {
// Exit multiline comment
index++;
isInsideComment = false;
buffer += strip(jsonString, offset, index + 1);
offset = index + 1;
continue;
} else if (trailingCommas && !isInsideComment) {
if (commaIndex !== -1) {
if (currentCharacter === '}' || currentCharacter === ']') {
// Strip trailing comma
buffer += jsonString.slice(offset, index);
result += strip(buffer, 0, 1) + buffer.slice(1);
buffer = '';
offset = index;
commaIndex = -1;
} else if (currentCharacter !== ' ' && currentCharacter !== '\t' && currentCharacter !== '\r' && currentCharacter !== '\n') {
// Hit non-whitespace following a comma; comma is not trailing
buffer += jsonString.slice(offset, index);
offset = index;
commaIndex = -1;
}
} else if (currentCharacter === ',') {
// Flush buffer prior to this point, and save new comma index
result += buffer + jsonString.slice(offset, index);
buffer = '';
offset = index;
commaIndex = index;
}
}
}
const remaining = (isInsideComment === singleComment)
? strip(jsonString, offset)
: jsonString.slice(offset);
return result + buffer + remaining;
}
@@ -0,0 +1,10 @@
"use strict";
exports.isSameYear = void 0;
var _index = require("../isSameYear.cjs");
var _index2 = require("./_lib/convertToFP.cjs"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
const isSameYear = (exports.isSameYear = (0, _index2.convertToFP)(
_index.isSameYear,
2,
));
@@ -0,0 +1,60 @@
{
"name": "@types/unist",
"version": "3.0.3",
"description": "TypeScript definitions for unist",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/unist",
"license": "MIT",
"contributors": [
{
"name": "bizen241",
"githubUsername": "bizen241",
"url": "https://github.com/bizen241"
},
{
"name": "Jun Lu",
"githubUsername": "lujun2",
"url": "https://github.com/lujun2"
},
{
"name": "Hernan Rajchert",
"githubUsername": "hrajchert",
"url": "https://github.com/hrajchert"
},
{
"name": "Titus Wormer",
"githubUsername": "wooorm",
"url": "https://github.com/wooorm"
},
{
"name": "Junyoung Choi",
"githubUsername": "rokt33r",
"url": "https://github.com/rokt33r"
},
{
"name": "Ben Moon",
"githubUsername": "GuiltyDolphin",
"url": "https://github.com/GuiltyDolphin"
},
{
"name": "JounQin",
"githubUsername": "JounQin",
"url": "https://github.com/JounQin"
},
{
"name": "Remco Haszing",
"githubUsername": "remcohaszing",
"url": "https://github.com/remcohaszing"
}
],
"main": "",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/unist"
},
"scripts": {},
"dependencies": {},
"typesPublisherContentHash": "7f3d5ce8d56003f3583a5317f98d444bdc99910c7b486c6b10af4f38694e61fe",
"typeScriptVersion": "4.8"
}
@@ -0,0 +1 @@
{"version":3,"sources":["../../src/utilities/executeSchemaHooks.ts"],"sourcesContent":["import type { DrizzleAdapter } from '../types.js'\n\nimport { extendDrizzleTable } from './extendDrizzleTable.js'\n\ntype DatabaseSchema = {\n enums?: DrizzleAdapter['enums']\n relations: Record<string, any>\n tables: DrizzleAdapter['tables']\n}\n\ntype Adapter = {\n afterSchemaInit: DatabaseSchemaHook[]\n beforeSchemaInit: DatabaseSchemaHook[]\n} & DatabaseSchema\n\ntype DatabaseSchemaHookArgs = {\n adapter: Record<string, unknown>\n extendTable: typeof extendDrizzleTable\n schema: DatabaseSchema\n}\n\ntype DatabaseSchemaHook = (args: DatabaseSchemaHookArgs) => DatabaseSchema | Promise<DatabaseSchema>\n\ntype Args = {\n adapter: Adapter\n type: 'afterSchemaInit' | 'beforeSchemaInit'\n}\n\nexport const executeSchemaHooks = async ({ type, adapter }: Args): Promise<void> => {\n for (const hook of (adapter as unknown as Adapter)[type]) {\n const result = await hook({\n adapter: adapter as unknown as Adapter,\n extendTable: extendDrizzleTable,\n schema: {\n enums: adapter.enums,\n relations: adapter.relations,\n tables: adapter.tables,\n },\n })\n if (result.enums) {\n adapter.enums = result.enums\n }\n\n adapter.tables = result.tables\n adapter.relations = result.relations\n }\n}\n"],"names":["extendDrizzleTable","executeSchemaHooks","type","adapter","hook","result","extendTable","schema","enums","relations","tables"],"mappings":"AAEA,SAASA,kBAAkB,QAAQ,0BAAyB;AA0B5D,OAAO,MAAMC,qBAAqB,OAAO,EAAEC,IAAI,EAAEC,OAAO,EAAQ;IAC9D,KAAK,MAAMC,QAAQ,AAACD,OAA8B,CAACD,KAAK,CAAE;QACxD,MAAMG,SAAS,MAAMD,KAAK;YACxBD,SAASA;YACTG,aAAaN;YACbO,QAAQ;gBACNC,OAAOL,QAAQK,KAAK;gBACpBC,WAAWN,QAAQM,SAAS;gBAC5BC,QAAQP,QAAQO,MAAM;YACxB;QACF;QACA,IAAIL,OAAOG,KAAK,EAAE;YAChBL,QAAQK,KAAK,GAAGH,OAAOG,KAAK;QAC9B;QAEAL,QAAQO,MAAM,GAAGL,OAAOK,MAAM;QAC9BP,QAAQM,SAAS,GAAGJ,OAAOI,SAAS;IACtC;AACF,EAAC"}
@@ -0,0 +1,8 @@
"use strict";
exports.intervalToDurationWithOptions = void 0;
var _index = require("../intervalToDuration.cjs");
var _index2 = require("./_lib/convertToFP.cjs"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
const intervalToDurationWithOptions = (exports.intervalToDurationWithOptions =
(0, _index2.convertToFP)(_index.intervalToDuration, 2));
@@ -0,0 +1,5 @@
import type { SdkInfo } from './sdkinfo';
export interface SdkMetadata {
sdk?: SdkInfo;
}
//# sourceMappingURL=sdkmetadata.d.ts.map
@@ -0,0 +1,16 @@
export declare const eachMinuteOfIntervalWithOptions: import("./types.js").FPFn2<
import("../eachMinuteOfInterval.js").EachMinuteOfIntervalResult<
import("../fp.js").Interval<
import("../fp.js").DateArg<Date>,
import("../fp.js").DateArg<Date>
>,
| import("../eachMinuteOfInterval.js").EachMinuteOfIntervalOptions<Date>
| undefined
>,
| import("../eachMinuteOfInterval.js").EachMinuteOfIntervalOptions<Date>
| undefined,
import("../fp.js").Interval<
import("../fp.js").DateArg<Date>,
import("../fp.js").DateArg<Date>
>
>;
@@ -0,0 +1 @@
{"version":3,"file":"uploadFiles.d.ts","sourceRoot":"","sources":["../../src/uploads/uploadFiles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAK5C,eAAO,MAAM,WAAW,YACb,OAAO,SACT,UAAU,EAAE,OACd,cAAc,KAClB,OAAO,CAAC,IAAI,CAWd,CAAA"}
@@ -0,0 +1,25 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var xata_http_exports = {};
module.exports = __toCommonJS(xata_http_exports);
__reExport(xata_http_exports, require("./driver.cjs"), module.exports);
__reExport(xata_http_exports, require("./session.cjs"), module.exports);
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
...require("./driver.cjs"),
...require("./session.cjs")
});
//# sourceMappingURL=index.cjs.map
@@ -0,0 +1,22 @@
var baseMean = require('./_baseMean'),
identity = require('./identity');
/**
* Computes the mean of the values in `array`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Math
* @param {Array} array The array to iterate over.
* @returns {number} Returns the mean.
* @example
*
* _.mean([4, 2, 8, 6]);
* // => 5
*/
function mean(array) {
return baseMean(array, identity);
}
module.exports = mean;
@@ -0,0 +1,15 @@
import type { HandlerDataHistory } from '@sentry/core';
/**
* Add an instrumentation handler for when a fetch request happens.
* The handler function is called once when the request starts and once when it ends,
* which can be identified by checking if it has an `endTimestamp`.
*
* Use at your own risk, this might break without changelog notice, only used internally.
* @hidden
*/
export declare function addHistoryInstrumentationHandler(handler: (data: HandlerDataHistory) => void): void;
/**
* Exported just for testing
*/
export declare function instrumentHistory(): void;
//# sourceMappingURL=history.d.ts.map
@@ -0,0 +1,207 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.ArrayExpression = ArrayExpression;
exports.AssignmentExpression = AssignmentExpression;
exports.BinaryExpression = BinaryExpression;
exports.BooleanLiteral = BooleanLiteral;
exports.CallExpression = CallExpression;
exports.ConditionalExpression = ConditionalExpression;
exports.ClassDeclaration = exports.ClassExpression = exports.FunctionDeclaration = exports.ArrowFunctionExpression = exports.FunctionExpression = Func;
Object.defineProperty(exports, "Identifier", {
enumerable: true,
get: function () {
return _infererReference.default;
}
});
exports.LogicalExpression = LogicalExpression;
exports.NewExpression = NewExpression;
exports.NullLiteral = NullLiteral;
exports.NumericLiteral = NumericLiteral;
exports.ObjectExpression = ObjectExpression;
exports.ParenthesizedExpression = ParenthesizedExpression;
exports.RegExpLiteral = RegExpLiteral;
exports.RestElement = RestElement;
exports.SequenceExpression = SequenceExpression;
exports.StringLiteral = StringLiteral;
exports.TSAsExpression = TSAsExpression;
exports.TSNonNullExpression = TSNonNullExpression;
exports.TaggedTemplateExpression = TaggedTemplateExpression;
exports.TemplateLiteral = TemplateLiteral;
exports.TypeCastExpression = TypeCastExpression;
exports.UnaryExpression = UnaryExpression;
exports.UpdateExpression = UpdateExpression;
exports.VariableDeclarator = VariableDeclarator;
var _t = require("@babel/types");
var _infererReference = require("./inferer-reference.js");
var _util = require("./util.js");
const {
BOOLEAN_BINARY_OPERATORS,
BOOLEAN_UNARY_OPERATORS,
NUMBER_BINARY_OPERATORS,
NUMBER_UNARY_OPERATORS,
STRING_UNARY_OPERATORS,
anyTypeAnnotation,
arrayTypeAnnotation,
booleanTypeAnnotation,
buildMatchMemberExpression,
genericTypeAnnotation,
identifier,
nullLiteralTypeAnnotation,
numberTypeAnnotation,
stringTypeAnnotation,
tupleTypeAnnotation,
unionTypeAnnotation,
voidTypeAnnotation,
isIdentifier
} = _t;
function VariableDeclarator() {
if (!this.get("id").isIdentifier()) return;
return this.get("init").getTypeAnnotation();
}
function TypeCastExpression(node) {
return node.typeAnnotation;
}
TypeCastExpression.validParent = true;
function TSAsExpression(node) {
return node.typeAnnotation;
}
TSAsExpression.validParent = true;
function TSNonNullExpression() {
return this.get("expression").getTypeAnnotation();
}
function NewExpression(node) {
if (node.callee.type === "Identifier") {
return genericTypeAnnotation(node.callee);
}
}
function TemplateLiteral() {
return stringTypeAnnotation();
}
function UnaryExpression(node) {
const operator = node.operator;
if (operator === "void") {
return voidTypeAnnotation();
} else if (NUMBER_UNARY_OPERATORS.includes(operator)) {
return numberTypeAnnotation();
} else if (STRING_UNARY_OPERATORS.includes(operator)) {
return stringTypeAnnotation();
} else if (BOOLEAN_UNARY_OPERATORS.includes(operator)) {
return booleanTypeAnnotation();
}
}
function BinaryExpression(node) {
const operator = node.operator;
if (NUMBER_BINARY_OPERATORS.includes(operator)) {
return numberTypeAnnotation();
} else if (BOOLEAN_BINARY_OPERATORS.includes(operator)) {
return booleanTypeAnnotation();
} else if (operator === "+") {
const right = this.get("right");
const left = this.get("left");
if (left.isBaseType("number") && right.isBaseType("number")) {
return numberTypeAnnotation();
} else if (left.isBaseType("string") || right.isBaseType("string")) {
return stringTypeAnnotation();
}
return unionTypeAnnotation([stringTypeAnnotation(), numberTypeAnnotation()]);
}
}
function LogicalExpression() {
const argumentTypes = [this.get("left").getTypeAnnotation(), this.get("right").getTypeAnnotation()];
return (0, _util.createUnionType)(argumentTypes);
}
function ConditionalExpression() {
const argumentTypes = [this.get("consequent").getTypeAnnotation(), this.get("alternate").getTypeAnnotation()];
return (0, _util.createUnionType)(argumentTypes);
}
function SequenceExpression() {
return this.get("expressions").pop().getTypeAnnotation();
}
function ParenthesizedExpression() {
return this.get("expression").getTypeAnnotation();
}
function AssignmentExpression() {
return this.get("right").getTypeAnnotation();
}
function UpdateExpression(node) {
const operator = node.operator;
if (operator === "++" || operator === "--") {
return numberTypeAnnotation();
}
}
function StringLiteral() {
return stringTypeAnnotation();
}
function NumericLiteral() {
return numberTypeAnnotation();
}
function BooleanLiteral() {
return booleanTypeAnnotation();
}
function NullLiteral() {
return nullLiteralTypeAnnotation();
}
function RegExpLiteral() {
return genericTypeAnnotation(identifier("RegExp"));
}
function ObjectExpression() {
return genericTypeAnnotation(identifier("Object"));
}
function ArrayExpression() {
return genericTypeAnnotation(identifier("Array"));
}
function RestElement() {
return ArrayExpression();
}
RestElement.validParent = true;
function Func() {
return genericTypeAnnotation(identifier("Function"));
}
const isArrayFrom = buildMatchMemberExpression("Array.from");
const isObjectKeys = buildMatchMemberExpression("Object.keys");
const isObjectValues = buildMatchMemberExpression("Object.values");
const isObjectEntries = buildMatchMemberExpression("Object.entries");
function CallExpression() {
const {
callee
} = this.node;
if (isObjectKeys(callee)) {
return arrayTypeAnnotation(stringTypeAnnotation());
} else if (isArrayFrom(callee) || isObjectValues(callee) || isIdentifier(callee, {
name: "Array"
})) {
return arrayTypeAnnotation(anyTypeAnnotation());
} else if (isObjectEntries(callee)) {
return arrayTypeAnnotation(tupleTypeAnnotation([stringTypeAnnotation(), anyTypeAnnotation()]));
}
return resolveCall(this.get("callee"));
}
function TaggedTemplateExpression() {
return resolveCall(this.get("tag"));
}
function resolveCall(callee) {
callee = callee.resolve();
if (callee.isFunction()) {
const {
node
} = callee;
if (node.async) {
if (node.generator) {
return genericTypeAnnotation(identifier("AsyncIterator"));
} else {
return genericTypeAnnotation(identifier("Promise"));
}
} else {
if (node.generator) {
return genericTypeAnnotation(identifier("Iterator"));
} else if (callee.node.returnType) {
return callee.node.returnType;
} else {}
}
}
}
//# sourceMappingURL=inferers.js.map
@@ -0,0 +1,13 @@
/**
* 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 * as modDev from './LexicalHistoryPlugin.dev.mjs';
import * as modProd from './LexicalHistoryPlugin.prod.mjs';
const mod = process.env.NODE_ENV !== 'production' ? modDev : modProd;
export const HistoryPlugin = mod.HistoryPlugin;
export const createEmptyHistoryState = mod.createEmptyHistoryState;
@@ -0,0 +1,126 @@
import type { $ZodStringFormats } from "../core/checks.js";
import type * as errors from "../core/errors.js";
import * as util from "../core/util.js";
const error: () => errors.$ZodErrorMap = () => {
const Sizable: Record<string, { unit: string; verb: string }> = {
string: { unit: "តួអក្សរ", verb: "គួរមាន" },
file: { unit: "បៃ", verb: "គួរមាន" },
array: { unit: "ធាតុ", verb: "គួរមាន" },
set: { unit: "ធាតុ", verb: "គួរមាន" },
};
function getSizing(origin: string): { unit: string; verb: string } | null {
return Sizable[origin] ?? null;
}
const parsedType = (data: any): string => {
const t = typeof data;
switch (t) {
case "number": {
return Number.isNaN(data) ? "មិនមែនជាលេខ (NaN)" : "លេខ";
}
case "object": {
if (Array.isArray(data)) {
return "អារេ (Array)";
}
if (data === null) {
return "គ្មានតម្លៃ (null)";
}
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
return data.constructor.name;
}
}
}
return t;
};
const Nouns: {
[k in $ZodStringFormats | (string & {})]?: string;
} = {
regex: "ទិន្នន័យបញ្ចូល",
email: "អាសយដ្ឋានអ៊ីមែល",
url: "URL",
emoji: "សញ្ញាអារម្មណ៍",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "កាលបរិច្ឆេទ និងម៉ោង ISO",
date: "កាលបរិច្ឆេទ ISO",
time: "ម៉ោង ISO",
duration: "រយៈពេល ISO",
ipv4: "អាសយដ្ឋាន IPv4",
ipv6: "អាសយដ្ឋាន IPv6",
cidrv4: "ដែនអាសយដ្ឋាន IPv4",
cidrv6: "ដែនអាសយដ្ឋាន IPv6",
base64: "ខ្សែអក្សរអ៊ិកូដ base64",
base64url: "ខ្សែអក្សរអ៊ិកូដ base64url",
json_string: "ខ្សែអក្សរ JSON",
e164: "លេខ E.164",
jwt: "JWT",
template_literal: "ទិន្នន័យបញ្ចូល",
};
return (issue) => {
switch (issue.code) {
case "invalid_type":
return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${issue.expected} ប៉ុន្តែទទួលបាន ${parsedType(issue.input)}`;
case "invalid_value":
if (issue.values.length === 1) return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${util.stringifyPrimitive(issue.values[0])}`;
return `ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return `ធំពេក៖ ត្រូវការ ${issue.origin ?? "តម្លៃ"} ${adj} ${issue.maximum.toString()} ${sizing.unit ?? "ធាតុ"}`;
return `ធំពេក៖ ត្រូវការ ${issue.origin ?? "តម្លៃ"} ${adj} ${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
return `តូចពេក៖ ត្រូវការ ${issue.origin} ${adj} ${issue.minimum.toString()} ${sizing.unit}`;
}
return `តូចពេក៖ ត្រូវការ ${issue.origin} ${adj} ${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue as errors.$ZodStringFormatIssues;
if (_issue.format === "starts_with") {
return `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${_issue.prefix}"`;
}
if (_issue.format === "ends_with") return `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${_issue.suffix}"`;
if (_issue.format === "includes") return `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${_issue.includes}"`;
if (_issue.format === "regex") return `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${_issue.pattern}`;
return `មិនត្រឹមត្រូវ៖ ${Nouns[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${issue.divisor}`;
case "unrecognized_keys":
return `រកឃើញសោមិនស្គាល់៖ ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `សោមិនត្រឹមត្រូវនៅក្នុង ${issue.origin}`;
case "invalid_union":
return `ទិន្នន័យមិនត្រឹមត្រូវ`;
case "invalid_element":
return `ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${issue.origin}`;
default:
return `ទិន្នន័យមិនត្រឹមត្រូវ`;
}
};
};
export default function (): { localeError: errors.$ZodErrorMap } {
return {
localeError: error(),
};
}
@@ -0,0 +1,310 @@
import { APIView as DefaultAPIView } from '../API/index.js';
import { EditView as DefaultEditView } from '../Edit/index.js';
import { UnauthorizedViewWithGutter } from '../Unauthorized/index.js';
import { VersionView as DefaultVersionView } from '../Version/index.js';
import { VersionsView as DefaultVersionsView } from '../Versions/index.js';
import { getCustomDocumentViewByKey } from './getCustomDocumentViewByKey.js';
import { getCustomViewByRoute } from './getCustomViewByRoute.js';
export const getDocumentView = ({
collectionConfig,
config,
docPermissions,
globalConfig,
routeSegments
}) => {
// Conditionally import and lazy load the default view
let View = null;
let viewKey;
const {
routes: {
admin: adminRoute
}
} = config;
const views = collectionConfig && collectionConfig?.admin?.components?.views || globalConfig && globalConfig?.admin?.components?.views;
if (!docPermissions?.read) {
throw new Error('not-found');
}
if (collectionConfig) {
const [collectionEntity, collectionSlug, segment3, segment4, segment5, ...remainingSegments] = routeSegments;
// --> /collections/:collectionSlug/:id
// --> /collections/:collectionSlug/create
switch (routeSegments.length) {
case 3:
{
switch (segment3) {
// --> /collections/:collectionSlug/create
case 'create':
{
if ('create' in docPermissions && docPermissions.create) {
View = getCustomDocumentViewByKey(views, 'default') || DefaultEditView;
} else {
View = UnauthorizedViewWithGutter;
}
break;
}
// --> /collections/:collectionSlug/:id
default:
{
const baseRoute = [adminRoute !== '/' && adminRoute, 'collections', collectionSlug, segment3].filter(Boolean).join('/');
const currentRoute = [baseRoute, segment4, segment5, ...remainingSegments].filter(Boolean).join('/');
const {
Component: CustomViewComponent,
viewKey: customViewKey
} = getCustomViewByRoute({
baseRoute,
currentRoute,
views
});
if (customViewKey) {
viewKey = customViewKey;
View = CustomViewComponent;
} else {
View = getCustomDocumentViewByKey(views, 'default') || DefaultEditView;
}
break;
}
}
break;
}
// --> /collections/:collectionSlug/:id/api
// --> /collections/:collectionSlug/:id/versions
// --> /collections/:collectionSlug/:id/<custom-segment>
// --> /collections/:collectionSlug/trash/:id
case 4:
{
// --> /collections/:collectionSlug/trash/:id
if (segment3 === 'trash' && segment4) {
View = getCustomDocumentViewByKey(views, 'default') || DefaultEditView;
break;
}
switch (segment4) {
// --> /collections/:collectionSlug/:id/api
case 'api':
{
if (collectionConfig?.admin?.hideAPIURL !== true) {
View = getCustomDocumentViewByKey(views, 'api') || DefaultAPIView;
}
break;
}
case 'versions':
{
// --> /collections/:collectionSlug/:id/versions
if (docPermissions?.readVersions) {
View = getCustomDocumentViewByKey(views, 'versions') || DefaultVersionsView;
} else {
View = UnauthorizedViewWithGutter;
}
break;
}
// --> /collections/:collectionSlug/:id/<custom-segment>
default:
{
const baseRoute = [adminRoute !== '/' && adminRoute, 'collections', collectionSlug, segment3].filter(Boolean).join('/');
const currentRoute = [baseRoute, segment4, segment5, ...remainingSegments].filter(Boolean).join('/');
const {
Component: CustomViewComponent,
viewKey: customViewKey
} = getCustomViewByRoute({
baseRoute,
currentRoute,
views
});
if (customViewKey) {
viewKey = customViewKey;
View = CustomViewComponent;
}
break;
}
}
break;
}
// --> /collections/:collectionSlug/trash/:id/api
// --> /collections/:collectionSlug/trash/:id/versions
// --> /collections/:collectionSlug/trash/:id/<custom-segment>
// --> /collections/:collectionSlug/:id/versions/:version
case 5:
{
// --> /collections/:slug/trash/:id/api
if (segment3 === 'trash') {
switch (segment5) {
case 'api':
{
if (collectionConfig?.admin?.hideAPIURL !== true) {
View = getCustomDocumentViewByKey(views, 'api') || DefaultAPIView;
}
break;
}
// --> /collections/:slug/trash/:id/versions
case 'versions':
{
if (docPermissions?.readVersions) {
View = getCustomDocumentViewByKey(views, 'versions') || DefaultVersionsView;
} else {
View = UnauthorizedViewWithGutter;
}
break;
}
default:
{
View = getCustomDocumentViewByKey(views, 'default') || DefaultEditView;
break;
}
}
// --> /collections/:collectionSlug/:id/versions/:version
} else if (segment4 === 'versions') {
if (docPermissions?.readVersions) {
View = getCustomDocumentViewByKey(views, 'version') || DefaultVersionView;
} else {
View = UnauthorizedViewWithGutter;
}
} else {
// --> /collections/:collectionSlug/:id/<custom>/<custom>
const baseRoute = [adminRoute !== '/' && adminRoute, collectionEntity, collectionSlug, segment3].filter(Boolean).join('/');
const currentRoute = [baseRoute, segment4, segment5, ...remainingSegments].filter(Boolean).join('/');
const {
Component: CustomViewComponent,
viewKey: customViewKey
} = getCustomViewByRoute({
baseRoute,
currentRoute,
views
});
if (customViewKey) {
viewKey = customViewKey;
View = CustomViewComponent;
}
}
break;
}
// --> /collections/:collectionSlug/trash/:id/versions/:version
// --> /collections/:collectionSlug/:id/<custom>/<custom>/<custom...>
default:
{
// --> /collections/:collectionSlug/trash/:id/versions/:version
const isTrashedVersionView = segment3 === 'trash' && segment5 === 'versions';
if (isTrashedVersionView) {
if (docPermissions?.readVersions) {
View = getCustomDocumentViewByKey(views, 'version') || DefaultVersionView;
} else {
View = UnauthorizedViewWithGutter;
}
} else {
// --> /collections/:collectionSlug/:id/<custom>/<custom>/<custom...>
const baseRoute = [adminRoute !== '/' && adminRoute, collectionEntity, collectionSlug, segment3].filter(Boolean).join('/');
const currentRoute = [baseRoute, segment4, segment5, ...remainingSegments].filter(Boolean).join('/');
const {
Component: CustomViewComponent,
viewKey: customViewKey
} = getCustomViewByRoute({
baseRoute,
currentRoute,
views
});
if (customViewKey) {
viewKey = customViewKey;
View = CustomViewComponent;
}
}
break;
}
}
}
if (globalConfig) {
const [globalEntity, globalSlug, segment3, ...remainingSegments] = routeSegments;
switch (routeSegments.length) {
// --> /globals/:globalSlug
case 2:
{
View = getCustomDocumentViewByKey(views, 'default') || DefaultEditView;
break;
}
case 3:
{
// --> /globals/:globalSlug/api
// --> /globals/:globalSlug/versions
// --> /globals/:globalSlug/<custom-segment>
switch (segment3) {
// --> /globals/:globalSlug/api
case 'api':
{
if (globalConfig?.admin?.hideAPIURL !== true) {
View = getCustomDocumentViewByKey(views, 'api') || DefaultAPIView;
}
break;
}
case 'versions':
{
// --> /globals/:globalSlug/versions
if (docPermissions?.readVersions) {
View = getCustomDocumentViewByKey(views, 'versions') || DefaultVersionsView;
} else {
View = UnauthorizedViewWithGutter;
}
break;
}
// --> /globals/:globalSlug/<custom-segment>
default:
{
if (docPermissions?.read) {
const baseRoute = [adminRoute, globalEntity, globalSlug, segment3].filter(Boolean).join('/');
const currentRoute = [baseRoute, segment3, ...remainingSegments].filter(Boolean).join('/');
const {
Component: CustomViewComponent,
viewKey: customViewKey
} = getCustomViewByRoute({
baseRoute,
currentRoute,
views
});
if (customViewKey) {
viewKey = customViewKey;
View = CustomViewComponent;
} else {
View = DefaultEditView;
}
} else {
View = UnauthorizedViewWithGutter;
}
break;
}
}
break;
}
// --> /globals/:globalSlug/versions/:version
// --> /globals/:globalSlug/<custom-segment>/<custom-segment>
default:
{
// --> /globals/:globalSlug/versions/:version
if (segment3 === 'versions') {
if (docPermissions?.readVersions) {
View = getCustomDocumentViewByKey(views, 'version') || DefaultVersionView;
} else {
View = UnauthorizedViewWithGutter;
}
} else {
// --> /globals/:globalSlug/<custom-segment>/<custom-segment>
const baseRoute = [adminRoute !== '/' && adminRoute, 'globals', globalSlug].filter(Boolean).join('/');
const currentRoute = [baseRoute, segment3, ...remainingSegments].filter(Boolean).join('/');
const {
Component: CustomViewComponent,
viewKey: customViewKey
} = getCustomViewByRoute({
baseRoute,
currentRoute,
views
});
if (customViewKey) {
viewKey = customViewKey;
View = CustomViewComponent;
}
}
break;
}
}
}
return {
View,
viewKey
};
};
//# sourceMappingURL=getDocumentView.js.map
@@ -0,0 +1,21 @@
// @ts-ignore TS6133
import { expect, test } from "vitest";
import * as z from "zod/v3";
const schema = z.nan();
test("passing validations", () => {
schema.parse(Number.NaN);
schema.parse(Number("Not a number"));
});
test("failing validations", () => {
expect(() => schema.parse(5)).toThrow();
expect(() => schema.parse("John")).toThrow();
expect(() => schema.parse(true)).toThrow();
expect(() => schema.parse(null)).toThrow();
expect(() => schema.parse(undefined)).toThrow();
expect(() => schema.parse({})).toThrow();
expect(() => schema.parse([])).toThrow();
});
@@ -0,0 +1,18 @@
/**
* @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 CaseLower = createLucideIcon("CaseLower", [
["circle", { cx: "7", cy: "12", r: "3", key: "12clwm" }],
["path", { d: "M10 9v6", key: "17i7lo" }],
["circle", { cx: "17", cy: "12", r: "3", key: "gl7c2s" }],
["path", { d: "M14 7v8", key: "dl84cr" }]
]);
export { CaseLower as default };
//# sourceMappingURL=case-lower.js.map
@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/globals/endpoints/findVersions.ts"],"sourcesContent":["import { status as httpStatus } from 'http-status'\n\nimport type { PayloadHandler } from '../../config/types.js'\nimport type { Where } from '../../types/index.js'\n\nimport { getRequestGlobal } from '../../utilities/getRequestEntity.js'\nimport { headersWithCors } from '../../utilities/headersWithCors.js'\nimport { isNumber } from '../../utilities/isNumber.js'\nimport { sanitizePopulateParam } from '../../utilities/sanitizePopulateParam.js'\nimport { sanitizeSelectParam } from '../../utilities/sanitizeSelectParam.js'\nimport { sanitizeSortParams } from '../../utilities/sanitizeSortParams.js'\nimport { findVersionsOperation } from '../operations/findVersions.js'\n\nexport const findVersionsHandler: PayloadHandler = async (req) => {\n const globalConfig = getRequestGlobal(req)\n const { depth, limit, page, pagination, populate, select, sort, where } = req.query as {\n depth?: string\n limit?: string\n page?: string\n pagination?: string\n populate?: Record<string, unknown>\n select?: Record<string, unknown>\n sort?: string | string[]\n where?: Where\n }\n\n const result = await findVersionsOperation({\n depth: isNumber(depth) ? Number(depth) : undefined,\n globalConfig,\n limit: isNumber(limit) ? Number(limit) : undefined,\n page: isNumber(page) ? Number(page) : undefined,\n pagination: pagination === 'false' ? false : undefined,\n populate: sanitizePopulateParam(populate),\n req,\n select: sanitizeSelectParam(select),\n sort: sanitizeSortParams(sort),\n where,\n })\n\n return Response.json(result, {\n headers: headersWithCors({\n headers: new Headers(),\n req,\n }),\n status: httpStatus.OK,\n })\n}\n"],"names":["status","httpStatus","getRequestGlobal","headersWithCors","isNumber","sanitizePopulateParam","sanitizeSelectParam","sanitizeSortParams","findVersionsOperation","findVersionsHandler","req","globalConfig","depth","limit","page","pagination","populate","select","sort","where","query","result","Number","undefined","Response","json","headers","Headers","OK"],"mappings":"AAAA,SAASA,UAAUC,UAAU,QAAQ,cAAa;AAKlD,SAASC,gBAAgB,QAAQ,sCAAqC;AACtE,SAASC,eAAe,QAAQ,qCAAoC;AACpE,SAASC,QAAQ,QAAQ,8BAA6B;AACtD,SAASC,qBAAqB,QAAQ,2CAA0C;AAChF,SAASC,mBAAmB,QAAQ,yCAAwC;AAC5E,SAASC,kBAAkB,QAAQ,wCAAuC;AAC1E,SAASC,qBAAqB,QAAQ,gCAA+B;AAErE,OAAO,MAAMC,sBAAsC,OAAOC;IACxD,MAAMC,eAAeT,iBAAiBQ;IACtC,MAAM,EAAEE,KAAK,EAAEC,KAAK,EAAEC,IAAI,EAAEC,UAAU,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,IAAI,EAAEC,KAAK,EAAE,GAAGT,IAAIU,KAAK;IAWnF,MAAMC,SAAS,MAAMb,sBAAsB;QACzCI,OAAOR,SAASQ,SAASU,OAAOV,SAASW;QACzCZ;QACAE,OAAOT,SAASS,SAASS,OAAOT,SAASU;QACzCT,MAAMV,SAASU,QAAQQ,OAAOR,QAAQS;QACtCR,YAAYA,eAAe,UAAU,QAAQQ;QAC7CP,UAAUX,sBAAsBW;QAChCN;QACAO,QAAQX,oBAAoBW;QAC5BC,MAAMX,mBAAmBW;QACzBC;IACF;IAEA,OAAOK,SAASC,IAAI,CAACJ,QAAQ;QAC3BK,SAASvB,gBAAgB;YACvBuB,SAAS,IAAIC;YACbjB;QACF;QACAV,QAAQC,WAAW2B,EAAE;IACvB;AACF,EAAC"}
@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/singlestore-core/columns/enum.ts"],"sourcesContent":["import type {\n\tColumnBuilderBaseConfig,\n\tColumnBuilderRuntimeConfig,\n\tGeneratedColumnConfig,\n\tHasGenerated,\n\tMakeColumnConfig,\n} from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnySingleStoreTable } from '~/singlestore-core/table.ts';\nimport type { SQL } from '~/sql/index.ts';\nimport { getColumnNameAndConfig, type Writable } from '~/utils.ts';\nimport { SingleStoreColumn, SingleStoreColumnBuilder } from './common.ts';\n\nexport type SingleStoreEnumColumnBuilderInitial<TName extends string, TEnum extends [string, ...string[]]> =\n\tSingleStoreEnumColumnBuilder<{\n\t\tname: TName;\n\t\tdataType: 'string';\n\t\tcolumnType: 'SingleStoreEnumColumn';\n\t\tdata: TEnum[number];\n\t\tdriverParam: string;\n\t\tenumValues: TEnum;\n\t\tgenerated: undefined;\n\t}>;\n\nexport class SingleStoreEnumColumnBuilder<T extends ColumnBuilderBaseConfig<'string', 'SingleStoreEnumColumn'>>\n\textends SingleStoreColumnBuilder<T, { enumValues: T['enumValues'] }>\n{\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\toverride generatedAlwaysAs(\n\t\tas: SQL<unknown> | (() => SQL) | T['data'],\n\t\tconfig?: Partial<GeneratedColumnConfig<unknown>>,\n\t): HasGenerated<this, {}> {\n\t\tthrow new Error('Method not implemented.');\n\t}\n\tstatic override readonly [entityKind]: string = 'SingleStoreEnumColumnBuilder';\n\n\tconstructor(name: T['name'], values: T['enumValues']) {\n\t\tsuper(name, 'string', 'SingleStoreEnumColumn');\n\t\tthis.config.enumValues = values;\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnySingleStoreTable<{ name: TTableName }>,\n\t): SingleStoreEnumColumn<MakeColumnConfig<T, TTableName> & { enumValues: T['enumValues'] }> {\n\t\treturn new SingleStoreEnumColumn<MakeColumnConfig<T, TTableName> & { enumValues: T['enumValues'] }>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig<any, any>,\n\t\t);\n\t}\n}\n\nexport class SingleStoreEnumColumn<T extends ColumnBaseConfig<'string', 'SingleStoreEnumColumn'>>\n\textends SingleStoreColumn<T, { enumValues: T['enumValues'] }>\n{\n\tstatic override readonly [entityKind]: string = 'SingleStoreEnumColumn';\n\n\toverride readonly enumValues = this.config.enumValues;\n\n\tgetSQLType(): string {\n\t\treturn `enum(${this.enumValues!.map((value) => `'${value}'`).join(',')})`;\n\t}\n}\n\nexport function singlestoreEnum<U extends string, T extends Readonly<[U, ...U[]]>>(\n\tvalues: T | Writable<T>,\n): SingleStoreEnumColumnBuilderInitial<'', Writable<T>>;\nexport function singlestoreEnum<TName extends string, U extends string, T extends Readonly<[U, ...U[]]>>(\n\tname: TName,\n\tvalues: T | Writable<T>,\n): SingleStoreEnumColumnBuilderInitial<TName, Writable<T>>;\nexport function singlestoreEnum(\n\ta?: string | readonly [string, ...string[]] | [string, ...string[]],\n\tb?: readonly [string, ...string[]] | [string, ...string[]],\n): any {\n\tconst { name, config: values } = getColumnNameAndConfig<readonly [string, ...string[]] | [string, ...string[]]>(a, b);\n\n\tif (values.length === 0) {\n\t\tthrow new Error(`You have an empty array for \"${name}\" enum values`);\n\t}\n\n\treturn new SingleStoreEnumColumnBuilder(name, values as any);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQA,oBAA2B;AAG3B,mBAAsD;AACtD,oBAA4D;AAarD,MAAM,qCACJ,uCACT;AAAA;AAAA,EAEU,kBACR,IACA,QACyB;AACzB,UAAM,IAAI,MAAM,yBAAyB;AAAA,EAC1C;AAAA,EACA,QAA0B,wBAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB,QAAyB;AACrD,UAAM,MAAM,UAAU,uBAAuB;AAC7C,SAAK,OAAO,aAAa;AAAA,EAC1B;AAAA;AAAA,EAGS,MACR,OAC2F;AAC3F,WAAO,IAAI;AAAA,MACV;AAAA,MACA,KAAK;AAAA,IACN;AAAA,EACD;AACD;AAEO,MAAM,8BACJ,gCACT;AAAA,EACC,QAA0B,wBAAU,IAAY;AAAA,EAE9B,aAAa,KAAK,OAAO;AAAA,EAE3C,aAAqB;AACpB,WAAO,QAAQ,KAAK,WAAY,IAAI,CAAC,UAAU,IAAI,KAAK,GAAG,EAAE,KAAK,GAAG,CAAC;AAAA,EACvE;AACD;AASO,SAAS,gBACf,GACA,GACM;AACN,QAAM,EAAE,MAAM,QAAQ,OAAO,QAAI,qCAA+E,GAAG,CAAC;AAEpH,MAAI,OAAO,WAAW,GAAG;AACxB,UAAM,IAAI,MAAM,gCAAgC,IAAI,eAAe;AAAA,EACpE;AAEA,SAAO,IAAI,6BAA6B,MAAM,MAAa;AAC5D;","names":[]}
@@ -0,0 +1,18 @@
const isPrimaryPointer = (event) => {
if (event.pointerType === "mouse") {
return typeof event.button !== "number" || event.button <= 0;
}
else {
/**
* isPrimary is true for all mice buttons, whereas every touch point
* is regarded as its own input. So subsequent concurrent touch points
* will be false.
*
* Specifically match against false here as incomplete versions of
* PointerEvents in very old browser might have it set as undefined.
*/
return event.isPrimary !== false;
}
};
export { isPrimaryPointer };
@@ -0,0 +1,8 @@
"use strict";
exports.millisecondsToMinutes = void 0;
var _index = require("../millisecondsToMinutes.js");
var _index2 = require("./_lib/convertToFP.js"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
const millisecondsToMinutes = (exports.millisecondsToMinutes = (0,
_index2.convertToFP)(_index.millisecondsToMinutes, 1));
@@ -0,0 +1,39 @@
import type { Span } from '@sentry/core';
/**
* Sets an inactive span active on the current scope.
*
* This is useful in browser applications, if you want to create a span that cannot be finished
* within its callback. Any spans started while the given span is active, will be children of the span.
*
* If there already was an active span on the scope prior to calling this function, it is replaced
* with the given span and restored after the span ended. Otherwise, the span will simply be
* removed, resulting in no active span on the scope.
*
* IMPORTANT: This function can ONLY be used in the browser! Calling this function in a server
* environment (for example in a server-side rendered component) will result in undefined behaviour
* and is not supported.
* You MUST call `span.end()` manually, otherwise the span will never be finished.
*
* @example
* ```js
* let checkoutSpan;
*
* on('checkoutStarted', () => {
* checkoutSpan = Sentry.startInactiveSpan({ name: 'checkout-flow' });
* Sentry.setActiveSpanInBrowser(checkoutSpan);
* })
*
* // during this time, any spans started will be children of `checkoutSpan`:
* Sentry.startSpan({ name: 'checkout-step-1' }, () => {
* // ... `
* })
*
* on('checkoutCompleted', () => {
* checkoutSpan?.end();
* })
* ```
*
* @param span - the span to set active
*/
export declare function setActiveSpanInBrowser(span: Span): void;
//# sourceMappingURL=setActiveSpan.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"callback.js","sourceRoot":"","sources":["../../../src/utils/callback.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,uCAAqC;AAErC;;GAEG;AACH,MAAa,cAAc;IAKjB,SAAS,GAAG,KAAK,CAAC;IAClB,SAAS,GAAG,IAAI,kBAAQ,EAAK,CAAC;IAC9B,SAAS,CAAI;IACb,KAAK,CAAO;IAEpB,YAAY,QAAW,EAAE,IAAU;QACjC,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;IACpB,CAAC;IAED,IAAI,QAAQ;QACV,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;IAChC,CAAC;IAED,IAAI,CAAC,GAAG,IAAmB;QACzB,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;YACnB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;YACtB,IAAI;gBACF,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAC5D,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,EAClC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,CAClC,CAAC;aACH;YAAC,OAAO,GAAG,EAAE;gBACZ,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;aAC5B;SACF;QACD,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;IAChC,CAAC;CACF;AArCD,wCAqCC","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 { Deferred } from './promise';\n\n/**\n * Bind the callback and only invoke the callback once regardless how many times `BindOnceFuture.call` is invoked.\n */\nexport class BindOnceFuture<\n R,\n This = unknown,\n T extends (this: This, ...args: unknown[]) => R = () => R,\n> {\n private _isCalled = false;\n private _deferred = new Deferred<R>();\n private _callback: T;\n private _that: This;\n\n constructor(callback: T, that: This) {\n this._callback = callback;\n this._that = that;\n }\n\n get isCalled() {\n return this._isCalled;\n }\n\n get promise() {\n return this._deferred.promise;\n }\n\n call(...args: Parameters<T>): Promise<R> {\n if (!this._isCalled) {\n this._isCalled = true;\n try {\n Promise.resolve(this._callback.call(this._that, ...args)).then(\n val => this._deferred.resolve(val),\n err => this._deferred.reject(err)\n );\n } catch (err) {\n this._deferred.reject(err);\n }\n }\n return this._deferred.promise;\n }\n}\n"]}
@@ -0,0 +1 @@
{"version":3,"file":"user-round-search.js","sources":["../../../src/icons/user-round-search.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name UserRoundSearch\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMCIgY3k9IjgiIHI9IjUiIC8+CiAgPHBhdGggZD0iTTIgMjFhOCA4IDAgMCAxIDEwLjQzNC03LjYyIiAvPgogIDxjaXJjbGUgY3g9IjE4IiBjeT0iMTgiIHI9IjMiIC8+CiAgPHBhdGggZD0ibTIyIDIyLTEuOS0xLjkiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/user-round-search\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 UserRoundSearch = createLucideIcon('UserRoundSearch', [\n ['circle', { cx: '10', cy: '8', r: '5', key: 'o932ke' }],\n ['path', { d: 'M2 21a8 8 0 0 1 10.434-7.62', key: '1yezr2' }],\n ['circle', { cx: '18', cy: '18', r: '3', key: '1xkwt0' }],\n ['path', { d: 'm22 22-1.9-1.9', key: '1e5ubv' }],\n]);\n\nexport default UserRoundSearch;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAkB,iBAAiB,iBAAmB,CAAA,CAAA,CAAA;AAAA,CAC1D,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,GAAA,CAAK,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACvD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA+B,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,CAAA;AAAA,CAC5D,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,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAkB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACjD,CAAC,CAAA,CAAA;;"}

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