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,52 @@
import { invariant } from 'motion-utils';
import { visualElementStore } from '../../render/store.mjs';
import { isMotionValue } from '../../value/utils/is-motion-value.mjs';
import { animateTarget } from '../interfaces/visual-element-target.mjs';
import { createDOMVisualElement, createObjectVisualElement } from '../utils/create-visual-element.mjs';
import { isDOMKeyframes } from '../utils/is-dom-keyframes.mjs';
import { resolveSubjects } from './resolve-subjects.mjs';
import { animateSingleValue } from './single-value.mjs';
function isSingleValue(subject, keyframes) {
return (isMotionValue(subject) ||
typeof subject === "number" ||
(typeof subject === "string" && !isDOMKeyframes(keyframes)));
}
/**
* Implementation
*/
function animateSubject(subject, keyframes, options, scope) {
const animations = [];
if (isSingleValue(subject, keyframes)) {
animations.push(animateSingleValue(subject, isDOMKeyframes(keyframes)
? keyframes.default || keyframes
: keyframes, options ? options.default || options : options));
}
else {
const subjects = resolveSubjects(subject, keyframes, scope);
const numSubjects = subjects.length;
invariant(Boolean(numSubjects), "No valid elements provided.");
for (let i = 0; i < numSubjects; i++) {
const thisSubject = subjects[i];
const createVisualElement = thisSubject instanceof Element
? createDOMVisualElement
: createObjectVisualElement;
if (!visualElementStore.has(thisSubject)) {
createVisualElement(thisSubject);
}
const visualElement = visualElementStore.get(thisSubject);
const transition = { ...options };
/**
* Resolve stagger function if provided.
*/
if ("delay" in transition &&
typeof transition.delay === "function") {
transition.delay = transition.delay(i, numSubjects);
}
animations.push(...animateTarget(visualElement, { ...keyframes, transition }, {}));
}
}
return animations;
}
export { animateSubject };
@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/pg-core/query-builders/raw.ts"],"sourcesContent":["import { entityKind } from '~/entity.ts';\nimport { QueryPromise } from '~/query-promise.ts';\nimport type { RunnableQuery } from '~/runnable-query.ts';\nimport type { PreparedQuery } from '~/session.ts';\nimport type { Query, SQL, SQLWrapper } from '~/sql/sql.ts';\n\nexport interface PgRaw<TResult> extends QueryPromise<TResult>, RunnableQuery<TResult, 'pg'>, SQLWrapper {}\n\nexport class PgRaw<TResult> extends QueryPromise<TResult>\n\timplements RunnableQuery<TResult, 'pg'>, SQLWrapper, PreparedQuery\n{\n\tstatic override readonly [entityKind]: string = 'PgRaw';\n\n\tdeclare readonly _: {\n\t\treadonly dialect: 'pg';\n\t\treadonly result: TResult;\n\t};\n\n\tconstructor(\n\t\tpublic execute: () => Promise<TResult>,\n\t\tprivate sql: SQL,\n\t\tprivate query: Query,\n\t\tprivate mapBatchResult: (result: unknown) => unknown,\n\t) {\n\t\tsuper();\n\t}\n\n\t/** @internal */\n\tgetSQL() {\n\t\treturn this.sql;\n\t}\n\n\tgetQuery() {\n\t\treturn this.query;\n\t}\n\n\tmapResult(result: unknown, isFromBatch?: boolean) {\n\t\treturn isFromBatch ? this.mapBatchResult(result) : result;\n\t}\n\n\t_prepare(): PreparedQuery {\n\t\treturn this;\n\t}\n\n\t/** @internal */\n\tisResponseInArrayMode() {\n\t\treturn false;\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAA2B;AAC3B,2BAA6B;AAOtB,MAAM,cAAuB,kCAEpC;AAAA,EAQC,YACQ,SACC,KACA,OACA,gBACP;AACD,UAAM;AALC;AACC;AACA;AACA;AAAA,EAGT;AAAA,EAdA,QAA0B,wBAAU,IAAY;AAAA;AAAA,EAiBhD,SAAS;AACR,WAAO,KAAK;AAAA,EACb;AAAA,EAEA,WAAW;AACV,WAAO,KAAK;AAAA,EACb;AAAA,EAEA,UAAU,QAAiB,aAAuB;AACjD,WAAO,cAAc,KAAK,eAAe,MAAM,IAAI;AAAA,EACpD;AAAA,EAEA,WAA0B;AACzB,WAAO;AAAA,EACR;AAAA;AAAA,EAGA,wBAAwB;AACvB,WAAO;AAAA,EACR;AACD;","names":[]}
@@ -0,0 +1 @@
{"version":3,"sources":["../src/findGlobal.ts"],"sourcesContent":["import type { FindGlobal } from 'payload'\n\nimport toSnakeCase from 'to-snake-case'\n\nimport type { DrizzleAdapter } from './types.js'\n\nimport { findMany } from './find/findMany.js'\n\nexport const findGlobal: FindGlobal = async function findGlobal(\n this: DrizzleAdapter,\n { slug, locale, req, select, where },\n) {\n const globalConfig = this.payload.globals.config.find((config) => config.slug === slug)\n\n const tableName = this.tableNameMap.get(toSnakeCase(globalConfig.slug))\n\n const {\n docs: [doc],\n } = await findMany({\n adapter: this,\n fields: globalConfig.flattenedFields,\n limit: 1,\n locale,\n pagination: false,\n req,\n select,\n tableName,\n where,\n })\n\n if (doc) {\n doc.globalType = slug\n return doc\n }\n\n return {}\n}\n"],"names":["toSnakeCase","findMany","findGlobal","slug","locale","req","select","where","globalConfig","payload","globals","config","find","tableName","tableNameMap","get","docs","doc","adapter","fields","flattenedFields","limit","pagination","globalType"],"mappings":"AAEA,OAAOA,iBAAiB,gBAAe;AAIvC,SAASC,QAAQ,QAAQ,qBAAoB;AAE7C,OAAO,MAAMC,aAAyB,eAAeA,WAEnD,EAAEC,IAAI,EAAEC,MAAM,EAAEC,GAAG,EAAEC,MAAM,EAAEC,KAAK,EAAE;IAEpC,MAAMC,eAAe,IAAI,CAACC,OAAO,CAACC,OAAO,CAACC,MAAM,CAACC,IAAI,CAAC,CAACD,SAAWA,OAAOR,IAAI,KAAKA;IAElF,MAAMU,YAAY,IAAI,CAACC,YAAY,CAACC,GAAG,CAACf,YAAYQ,aAAaL,IAAI;IAErE,MAAM,EACJa,MAAM,CAACC,IAAI,EACZ,GAAG,MAAMhB,SAAS;QACjBiB,SAAS,IAAI;QACbC,QAAQX,aAAaY,eAAe;QACpCC,OAAO;QACPjB;QACAkB,YAAY;QACZjB;QACAC;QACAO;QACAN;IACF;IAEA,IAAIU,KAAK;QACPA,IAAIM,UAAU,GAAGpB;QACjB,OAAOc;IACT;IAEA,OAAO,CAAC;AACV,EAAC"}
@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/packages/graphql-query-complexity/estimators/fieldExtensions/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAA2B,MAAM,0BAA0B,CAAA;AAE5F,eAAO,MAAM,wBAAwB,QAAO,mBAW3C,CAAA"}
@@ -0,0 +1,49 @@
import type { ColumnBuilderBaseConfig } from "../../column-builder.cjs";
import type { ColumnBaseConfig } from "../../column.cjs";
import { entityKind } from "../../entity.cjs";
import { type Equal } from "../../utils.cjs";
import { SingleStoreDateBaseColumn, SingleStoreDateColumnBaseBuilder } from "./date.common.cjs";
export type SingleStoreTimestampBuilderInitial<TName extends string> = SingleStoreTimestampBuilder<{
name: TName;
dataType: 'date';
columnType: 'SingleStoreTimestamp';
data: Date;
driverParam: string | number;
enumValues: undefined;
generated: undefined;
}>;
export declare class SingleStoreTimestampBuilder<T extends ColumnBuilderBaseConfig<'date', 'SingleStoreTimestamp'>> extends SingleStoreDateColumnBaseBuilder<T, SingleStoreTimestampConfig> {
static readonly [entityKind]: string;
constructor(name: T['name']);
defaultNow(): import("../../column-builder.ts").HasDefault<this>;
}
export declare class SingleStoreTimestamp<T extends ColumnBaseConfig<'date', 'SingleStoreTimestamp'>> extends SingleStoreDateBaseColumn<T, SingleStoreTimestampConfig> {
static readonly [entityKind]: string;
getSQLType(): string;
mapFromDriverValue(value: string): Date;
mapToDriverValue(value: Date): string;
}
export type SingleStoreTimestampStringBuilderInitial<TName extends string> = SingleStoreTimestampStringBuilder<{
name: TName;
dataType: 'string';
columnType: 'SingleStoreTimestampString';
data: string;
driverParam: string | number;
enumValues: undefined;
generated: undefined;
}>;
export declare class SingleStoreTimestampStringBuilder<T extends ColumnBuilderBaseConfig<'string', 'SingleStoreTimestampString'>> extends SingleStoreDateColumnBaseBuilder<T, SingleStoreTimestampConfig> {
static readonly [entityKind]: string;
constructor(name: T['name']);
defaultNow(): import("../../column-builder.ts").HasDefault<this>;
}
export declare class SingleStoreTimestampString<T extends ColumnBaseConfig<'string', 'SingleStoreTimestampString'>> extends SingleStoreDateBaseColumn<T, SingleStoreTimestampConfig> {
static readonly [entityKind]: string;
getSQLType(): string;
}
export interface SingleStoreTimestampConfig<TMode extends 'string' | 'date' = 'string' | 'date'> {
mode?: TMode;
}
export declare function timestamp(): SingleStoreTimestampBuilderInitial<''>;
export declare function timestamp<TMode extends SingleStoreTimestampConfig['mode'] & {}>(config?: SingleStoreTimestampConfig<TMode>): Equal<TMode, 'string'> extends true ? SingleStoreTimestampStringBuilderInitial<''> : SingleStoreTimestampBuilderInitial<''>;
export declare function timestamp<TName extends string, TMode extends SingleStoreTimestampConfig['mode'] & {}>(name: TName, config?: SingleStoreTimestampConfig<TMode>): Equal<TMode, 'string'> extends true ? SingleStoreTimestampStringBuilderInitial<TName> : SingleStoreTimestampBuilderInitial<TName>;
@@ -0,0 +1,13 @@
import { entityKind } from "../entity.js";
export interface PgRoleConfig {
createDb?: boolean;
createRole?: boolean;
inherit?: boolean;
}
export declare class PgRole implements PgRoleConfig {
readonly name: string;
static readonly [entityKind]: string;
constructor(name: string, config?: PgRoleConfig);
existing(): this;
}
export declare function pgRole(name: string, config?: PgRoleConfig): PgRole;
@@ -0,0 +1,202 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const Source = require("./Source");
const { getMap, getSourceAndMap } = require("./helpers/getFromStreamChunks");
const getGeneratedSourceInfo = require("./helpers/getGeneratedSourceInfo");
const splitIntoLines = require("./helpers/splitIntoLines");
const splitIntoPotentialTokens = require("./helpers/splitIntoPotentialTokens");
const {
isDualStringBufferCachingEnabled,
} = require("./helpers/stringBufferUtils");
/** @typedef {import("./Source").HashLike} HashLike */
/** @typedef {import("./Source").MapOptions} MapOptions */
/** @typedef {import("./Source").RawSourceMap} RawSourceMap */
/** @typedef {import("./Source").SourceAndMap} SourceAndMap */
/** @typedef {import("./Source").SourceValue} SourceValue */
/** @typedef {import("./helpers/getGeneratedSourceInfo").GeneratedSourceInfo} GeneratedSourceInfo */
/** @typedef {import("./helpers/streamChunks").OnChunk} OnChunk */
/** @typedef {import("./helpers/streamChunks").OnName} OnName */
/** @typedef {import("./helpers/streamChunks").OnSource} OnSource */
/** @typedef {import("./helpers/streamChunks").Options} Options */
class OriginalSource extends Source {
/**
* @param {string | Buffer} value value
* @param {string} name name
*/
constructor(value, name) {
super();
const isBuffer = Buffer.isBuffer(value);
/**
* @private
* @type {undefined | string}
*/
this._value = isBuffer ? undefined : value;
/**
* @private
* @type {undefined | Buffer}
*/
this._valueAsBuffer = isBuffer ? value : undefined;
/**
* @private
* @type {string}
*/
this._name = name;
}
getName() {
return this._name;
}
/**
* @returns {SourceValue} source
*/
source() {
if (this._value === undefined) {
const value =
/** @type {Buffer} */
(this._valueAsBuffer).toString("utf8");
if (isDualStringBufferCachingEnabled()) {
this._value = value;
}
return value;
}
return this._value;
}
buffer() {
if (this._valueAsBuffer === undefined) {
const value = Buffer.from(/** @type {string} */ (this._value), "utf8");
if (isDualStringBufferCachingEnabled()) {
this._valueAsBuffer = value;
}
return value;
}
return this._valueAsBuffer;
}
/**
* @param {MapOptions=} options map options
* @returns {RawSourceMap | null} map
*/
map(options) {
return getMap(this, options);
}
/**
* @param {MapOptions=} options map options
* @returns {SourceAndMap} source and map
*/
sourceAndMap(options) {
return getSourceAndMap(this, options);
}
/**
* @param {Options} options options
* @param {OnChunk} onChunk called for each chunk of code
* @param {OnSource} onSource called for each source
* @param {OnName} _onName called for each name
* @returns {GeneratedSourceInfo} generated source info
*/
streamChunks(options, onChunk, onSource, _onName) {
if (this._value === undefined) {
this._value =
/** @type {Buffer} */
(this._valueAsBuffer).toString("utf8");
}
onSource(0, this._name, this._value);
const finalSource = Boolean(options && options.finalSource);
if (!options || options.columns !== false) {
// With column info we need to read all lines and split them
const matches = splitIntoPotentialTokens(this._value);
let line = 1;
let column = 0;
if (matches !== null) {
for (const match of matches) {
const isEndOfLine = match.endsWith("\n");
if (isEndOfLine && match.length === 1) {
if (!finalSource) onChunk(match, line, column, -1, -1, -1, -1);
} else {
const chunk = finalSource ? undefined : match;
onChunk(chunk, line, column, 0, line, column, -1);
}
if (isEndOfLine) {
line++;
column = 0;
} else {
column += match.length;
}
}
}
return {
generatedLine: line,
generatedColumn: column,
source: finalSource ? this._value : undefined,
};
} else if (finalSource) {
// Without column info and with final source we only
// need meta info to generate mapping
const result = getGeneratedSourceInfo(this._value);
const { generatedLine, generatedColumn } = result;
if (generatedColumn === 0) {
for (
let line = 1;
line < /** @type {number} */ (generatedLine);
line++
) {
onChunk(undefined, line, 0, 0, line, 0, -1);
}
} else {
for (
let line = 1;
line <= /** @type {number} */ (generatedLine);
line++
) {
onChunk(undefined, line, 0, 0, line, 0, -1);
}
}
return result;
}
// Without column info, but also without final source
// we need to split source by lines
let line = 1;
const matches = splitIntoLines(this._value);
/** @type {string | undefined} */
let match;
for (match of matches) {
onChunk(finalSource ? undefined : match, line, 0, 0, line, 0, -1);
line++;
}
return matches.length === 0 || /** @type {string} */ (match).endsWith("\n")
? {
generatedLine: matches.length + 1,
generatedColumn: 0,
source: finalSource ? this._value : undefined,
}
: {
generatedLine: matches.length,
generatedColumn: /** @type {string} */ (match).length,
source: finalSource ? this._value : undefined,
};
}
/**
* @param {HashLike} hash hash
* @returns {void}
*/
updateHash(hash) {
hash.update("OriginalSource");
hash.update(this.buffer());
hash.update(this._name || "");
}
}
module.exports = OriginalSource;
@@ -0,0 +1,177 @@
import { buildLocalizeFn } from "../../_lib/buildLocalizeFn.mjs";
const eraValues = {
narrow: ["e.m.a", "m.a.j"],
abbreviated: ["e.m.a", "m.a.j"],
wide: ["enne meie ajaarvamist", "meie ajaarvamise järgi"],
};
const quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["K1", "K2", "K3", "K4"],
wide: ["1. kvartal", "2. kvartal", "3. kvartal", "4. kvartal"],
};
const monthValues = {
narrow: ["J", "V", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
abbreviated: [
"jaan",
"veebr",
"märts",
"apr",
"mai",
"juuni",
"juuli",
"aug",
"sept",
"okt",
"nov",
"dets",
],
wide: [
"jaanuar",
"veebruar",
"märts",
"aprill",
"mai",
"juuni",
"juuli",
"august",
"september",
"oktoober",
"november",
"detsember",
],
};
const dayValues = {
narrow: ["P", "E", "T", "K", "N", "R", "L"],
short: ["P", "E", "T", "K", "N", "R", "L"],
abbreviated: [
"pühap.",
"esmasp.",
"teisip.",
"kolmap.",
"neljap.",
"reede.",
"laup.",
],
wide: [
"pühapäev",
"esmaspäev",
"teisipäev",
"kolmapäev",
"neljapäev",
"reede",
"laupäev",
],
};
const dayPeriodValues = {
narrow: {
am: "AM",
pm: "PM",
midnight: "kesköö",
noon: "keskpäev",
morning: "hommik",
afternoon: "pärastlõuna",
evening: "õhtu",
night: "öö",
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "kesköö",
noon: "keskpäev",
morning: "hommik",
afternoon: "pärastlõuna",
evening: "õhtu",
night: "öö",
},
wide: {
am: "AM",
pm: "PM",
midnight: "kesköö",
noon: "keskpäev",
morning: "hommik",
afternoon: "pärastlõuna",
evening: "õhtu",
night: "öö",
},
};
const formattingDayPeriodValues = {
narrow: {
am: "AM",
pm: "PM",
midnight: "keskööl",
noon: "keskpäeval",
morning: "hommikul",
afternoon: "pärastlõunal",
evening: "õhtul",
night: "öösel",
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "keskööl",
noon: "keskpäeval",
morning: "hommikul",
afternoon: "pärastlõunal",
evening: "õhtul",
night: "öösel",
},
wide: {
am: "AM",
pm: "PM",
midnight: "keskööl",
noon: "keskpäeval",
morning: "hommikul",
afternoon: "pärastlõunal",
evening: "õhtul",
night: "öösel",
},
};
const ordinalNumber = (dirtyNumber, _options) => {
const number = Number(dirtyNumber);
return number + ".";
};
export const localize = {
ordinalNumber,
era: buildLocalizeFn({
values: eraValues,
defaultWidth: "wide",
}),
quarter: buildLocalizeFn({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: (quarter) => quarter - 1,
}),
month: buildLocalizeFn({
values: monthValues,
defaultWidth: "wide",
formattingValues: monthValues,
defaultFormattingWidth: "wide",
}),
day: buildLocalizeFn({
values: dayValues,
defaultWidth: "wide",
formattingValues: dayValues,
defaultFormattingWidth: "wide",
}),
dayPeriod: buildLocalizeFn({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide",
}),
};
@@ -0,0 +1,19 @@
import { isolateObjectProperty } from 'payload';
function wrapCustomResolver(resolver) {
return (source, args, context, info)=>{
return resolver(source, args, {
...context,
req: isolateObjectProperty(context.req, 'transactionID')
}, info);
};
}
export function wrapCustomFields(fields) {
for(const key in fields){
if (fields[key].resolve) {
fields[key].resolve = wrapCustomResolver(fields[key].resolve);
}
}
return fields;
}
//# sourceMappingURL=wrapCustomResolver.js.map
@@ -0,0 +1,103 @@
# sanitize-filename [![build status](https://secure.travis-ci.org/parshap/node-sanitize-filename.svg?branch=master)](http://travis-ci.org/parshap/node-sanitize-filename)
Sanitize a string to be safe for use as a filename by removing directory
paths and invalid characters.
## Install
[npm: *sanitize-filename*](https://www.npmjs.com/package/sanitize-filename)
```
npm install sanitize-filename
```
## Example
```js
var sanitize = require("sanitize-filename");
// Some string that may be unsafe or invalid as a filename
var UNSAFE_USER_INPUT = "~/.\u0000ssh/authorized_keys";
// Sanitize the string to be safe for use as a filename.
var filename = sanitize(UNSAFE_USER_INPUT);
// -> "~.sshauthorized_keys"
```
## Details
*sanitize-filename* removes the following:
* [Control characters][] (`0x00`–`0x1f` and `0x80`–`0x9f`)
* [Reserved characters][] (`/`, `?`, `<`, `>`, `\`, `:`, `*`, `|`, and
`"`)
* Unix reserved filenames (`.` and `..`)
* Trailing periods and spaces ([for Windows][windows trailing])
* Windows reserved filenames (`CON`, `PRN`, `AUX`, `NUL`, `COM1`,
`COM2`, `COM3`, `COM4`, `COM5`, `COM6`, `COM7`, `COM8`, `COM9`,
`LPT1`, `LPT2`, `LPT3`, `LPT4`, `LPT5`, `LPT6`, `LPT7`, `LPT8`, and
`LPT9`)
[control characters]: https://en.wikipedia.org/wiki/C0_and_C1_control_codes
[reserved characters]: https://kb.acronis.com/content/39790
[windows trailing]: https://msdn.microsoft.com/en-us/library/aa365247(v=vs.85).aspx#Naming_Conventions
The resulting string is truncated to [255 bytes in length][255]. The
string will not contain any directory paths and will be safe to use as a
filename.
[255]: http://unix.stackexchange.com/questions/32795/what-is-the-maximum-allowed-filename-and-folder-size-with-ecryptfs
### Empty String `""` Result
An empty string `""` can be returned. For example:
```js
var sanitize = require("sanitize-filename");
sanitize("..")
// -> ""
```
### Non-unique Filenames
Two different inputs can return the same value. For example:
```js
var sanitize = require("sanitize-filename");
sanitize("file?")
// -> "file"
sanitize ("*file*")
// -> "file"
```
### File Systems
Sanitized filenames will be safe for use on modern Windows, OS X, and
Unix file systems (`NTFS`, `ext`, etc.).
[`FAT` 8.3 filenames][8.3] are not supported.
[8.3]: https://en.wikipedia.org/wiki/8.3_filename
#### Test Your File System
The test program will use various strings (including the [Big List of
Naughty Strings][blns]) to create files in the working directory. Run
`npm test` to run tests against your file system.
[blns]: https://github.com/minimaxir/big-list-of-naughty-strings
## API
### `sanitize(inputString, [options])`
Sanitize `inputString` by removing or replacing invalid characters.
Options:
* `options.replacement`: *optional, string/function, default: `""`*. If passed
as a string, it's used as the replacement for invalid characters. If passed as
a function, the function will be called with the invalid characters and it's
return value will be used as the replacement. See [`String.prototype.replace`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace)
for more info.
@@ -0,0 +1,2 @@
import { isUndefined } from "../fp";
export = isUndefined;
@@ -0,0 +1,29 @@
/**
* Checks if `value` is object-like. A value is object-like if it's not `null`
* and has a `typeof` result of "object".
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
* @example
*
* _.isObjectLike({});
* // => true
*
* _.isObjectLike([1, 2, 3]);
* // => true
*
* _.isObjectLike(_.noop);
* // => false
*
* _.isObjectLike(null);
* // => false
*/
function isObjectLike(value) {
return value != null && typeof value == 'object';
}
module.exports = isObjectLike;
@@ -0,0 +1,19 @@
/**
* @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 ArrowDownZA = createLucideIcon("ArrowDownZA", [
["path", { d: "m3 16 4 4 4-4", key: "1co6wj" }],
["path", { d: "M7 4v16", key: "1glfcx" }],
["path", { d: "M15 4h5l-5 6h5", key: "8asdl1" }],
["path", { d: "M15 20v-3.5a2.5 2.5 0 0 1 5 0V20", key: "r6l5cz" }],
["path", { d: "M20 18h-5", key: "18j1r2" }]
]);
export { ArrowDownZA as default };
//# sourceMappingURL=arrow-down-z-a.js.map
@@ -0,0 +1,18 @@
var arrayMap = require('./_arrayMap');
/**
* The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array
* of key-value pairs for `object` corresponding to the property names of `props`.
*
* @private
* @param {Object} object The object to query.
* @param {Array} props The property names to get values for.
* @returns {Object} Returns the key-value pairs.
*/
function baseToPairs(object, props) {
return arrayMap(props, function(key) {
return [key, object[key]];
});
}
module.exports = baseToPairs;
@@ -0,0 +1 @@
!function(a){a.languages.llvm={comment:/;.*/,string:{pattern:/"[^"]*"/,greedy:!0},boolean:/\b(?:false|true)\b/,variable:/[%@!#](?:(?!\d)(?:[-$.\w]|\\[a-f\d]{2})+|\d+)/i,label:/(?!\d)(?:[-$.\w]|\\[a-f\d]{2})+:/i,type:{pattern:/\b(?:double|float|fp128|half|i[1-9]\d*|label|metadata|ppc_fp128|token|void|x86_fp80|x86_mmx)\b/,alias:"class-name"},keyword:/\b[a-z_][a-z_0-9]*\b/,number:/[+-]?\b\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\b|\b0x[\dA-Fa-f]+\b|\b0xK[\dA-Fa-f]{20}\b|\b0x[ML][\dA-Fa-f]{32}\b|\b0xH[\dA-Fa-f]{4}\b/,punctuation:/[{}[\];(),.!*=<>]/}}(Prism);
@@ -0,0 +1,89 @@
'use client';
import { c as _c } from "react/compiler-runtime";
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { LoadingOverlayToggle, Pagination, PerPage, Table, useListQuery, useTranslation } from '@payloadcms/ui';
import { useSearchParams } from 'next/navigation.js';
import React from 'react';
export const VersionsViewClient = props => {
const $ = _c(13);
const {
baseClass,
columns,
paginationLimits
} = props;
const {
data,
handlePageChange,
handlePerPageChange
} = useListQuery();
const searchParams = useSearchParams();
let t0;
if ($[0] !== searchParams) {
t0 = searchParams.get("limit");
$[0] = searchParams;
$[1] = t0;
} else {
t0 = $[1];
}
const limit = t0;
const {
i18n
} = useTranslation();
const versionCount = data?.totalDocs || 0;
const t1 = !data;
let t2;
if ($[2] !== baseClass || $[3] !== columns || $[4] !== data || $[5] !== handlePageChange || $[6] !== handlePerPageChange || $[7] !== i18n || $[8] !== limit || $[9] !== paginationLimits || $[10] !== t1 || $[11] !== versionCount) {
t2 = _jsxs(React.Fragment, {
children: [_jsx(LoadingOverlayToggle, {
name: "versions",
show: t1
}), versionCount === 0 && _jsx("div", {
className: `${baseClass}__no-versions`,
children: i18n.t("version:noFurtherVersionsFound")
}), versionCount > 0 && _jsxs(React.Fragment, {
children: [_jsx(Table, {
columns,
data: data?.docs
}), _jsxs("div", {
className: `${baseClass}__page-controls`,
children: [_jsx(Pagination, {
hasNextPage: data.hasNextPage,
hasPrevPage: data.hasPrevPage,
limit: data.limit,
nextPage: data.nextPage,
numberOfNeighbors: 1,
onChange: handlePageChange,
page: data.page,
prevPage: data.prevPage,
totalPages: data.totalPages
}), data?.totalDocs > 0 && _jsxs(React.Fragment, {
children: [_jsxs("div", {
className: `${baseClass}__page-info`,
children: [data.page * data.limit - (data.limit - 1), "-", data.totalPages > 1 && data.totalPages !== data.page ? data.limit * data.page : data.totalDocs, " ", i18n.t("general:of"), " ", data.totalDocs]
}), _jsx(PerPage, {
handleChange: handlePerPageChange,
limit: limit ? Number(limit) : 10,
limits: paginationLimits
})]
})]
})]
})]
});
$[2] = baseClass;
$[3] = columns;
$[4] = data;
$[5] = handlePageChange;
$[6] = handlePerPageChange;
$[7] = i18n;
$[8] = limit;
$[9] = paginationLimits;
$[10] = t1;
$[11] = versionCount;
$[12] = t2;
} else {
t2 = $[12];
}
return t2;
};
//# sourceMappingURL=index.client.js.map
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"F A B","2":"K D E zC"},B:{"1":"0 1 2 3 4 5 6 7 8 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","516":"C L M G"},C:{"1":"0 1 2 3 4 5 6 7 8 DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B WC 6B XC 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R YC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I ZC aC OC 1C 2C 3C","2":"0C VC 4C 5C","260":"9 J bB K D E F A B C L M G N O P cB AB BB CB"},D:{"1":"0 1 2 3 4 5 6 7 8 9 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 JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I ZC aC OC","4":"J"},E:{"1":"bB K D E F A B C L M G 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 qC rC sC HD tC uC vC wC ID","2":"6C","132":"J bC"},F:{"1":"0 1 2 3 4 5 6 7 8 9 B C G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R YC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JD KD LD MD PC xC ND QC","2":"F"},G:{"1":"E 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 qC rC sC lD tC uC vC wC","132":"bC OD"},H:{"260":"mD"},I:{"1":"VC J I qD yC rD sD","2":"nD oD pD"},J:{"1":"D A"},K:{"1":"H","260":"A B C PC xC QC"},L:{"1":"I"},M:{"1":"OC"},N:{"1":"A B"},O:{"1":"RC"},P:{"1":"9 J AB BB CB DB EB FB GB HB IB tD uD vD wD xD cC yD zD 0D 1D 2D SC TC UC 3D"},Q:{"1":"4D"},R:{"1":"5D"},S:{"1":"6D 7D"}},B:4,C:"SVG in CSS backgrounds",D:true};
@@ -0,0 +1,223 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
/*
* Browser-compatible JavaScript MD5
*
* Modification of JavaScript MD5
* https://github.com/blueimp/JavaScript-MD5
*
* Copyright 2011, Sebastian Tschan
* https://blueimp.net
*
* Licensed under the MIT license:
* https://opensource.org/licenses/MIT
*
* Based on
* A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
* Digest Algorithm, as defined in RFC 1321.
* Version 2.2 Copyright (C) Paul Johnston 1999 - 2009
* Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
* Distributed under the BSD License
* See http://pajhome.org.uk/crypt/md5 for more info.
*/
function md5(bytes) {
if (typeof bytes === 'string') {
const msg = unescape(encodeURIComponent(bytes)); // UTF8 escape
bytes = new Uint8Array(msg.length);
for (let i = 0; i < msg.length; ++i) {
bytes[i] = msg.charCodeAt(i);
}
}
return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));
}
/*
* Convert an array of little-endian words to an array of bytes
*/
function md5ToHexEncodedArray(input) {
const output = [];
const length32 = input.length * 32;
const hexTab = '0123456789abcdef';
for (let i = 0; i < length32; i += 8) {
const x = input[i >> 5] >>> i % 32 & 0xff;
const hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);
output.push(hex);
}
return output;
}
/**
* Calculate output length with padding and bit length
*/
function getOutputLength(inputLength8) {
return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;
}
/*
* Calculate the MD5 of an array of little-endian words, and a bit length.
*/
function wordsToMd5(x, len) {
/* append padding */
x[len >> 5] |= 0x80 << len % 32;
x[getOutputLength(len) - 1] = len;
let a = 1732584193;
let b = -271733879;
let c = -1732584194;
let d = 271733878;
for (let i = 0; i < x.length; i += 16) {
const olda = a;
const oldb = b;
const oldc = c;
const oldd = d;
a = md5ff(a, b, c, d, x[i], 7, -680876936);
d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);
c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);
b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);
a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);
d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);
c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);
b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);
a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);
d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);
c = md5ff(c, d, a, b, x[i + 10], 17, -42063);
b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);
a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);
d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);
c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);
b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);
a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);
d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);
c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);
b = md5gg(b, c, d, a, x[i], 20, -373897302);
a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);
d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);
c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);
b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);
a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);
d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);
c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);
b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);
a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);
d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);
c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);
b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);
a = md5hh(a, b, c, d, x[i + 5], 4, -378558);
d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);
c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);
b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);
a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);
d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);
c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);
b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);
a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);
d = md5hh(d, a, b, c, x[i], 11, -358537222);
c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);
b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);
a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);
d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);
c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);
b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);
a = md5ii(a, b, c, d, x[i], 6, -198630844);
d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);
c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);
b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);
a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);
d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);
c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);
b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);
a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);
d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);
c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);
b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);
a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);
d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);
c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);
b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);
a = safeAdd(a, olda);
b = safeAdd(b, oldb);
c = safeAdd(c, oldc);
d = safeAdd(d, oldd);
}
return [a, b, c, d];
}
/*
* Convert an array bytes to an array of little-endian words
* Characters >255 have their high-byte silently ignored.
*/
function bytesToWords(input) {
if (input.length === 0) {
return [];
}
const length8 = input.length * 8;
const output = new Uint32Array(getOutputLength(length8));
for (let i = 0; i < length8; i += 8) {
output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;
}
return output;
}
/*
* Add integers, wrapping at 2^32. This uses 16-bit operations internally
* to work around bugs in some JS interpreters.
*/
function safeAdd(x, y) {
const lsw = (x & 0xffff) + (y & 0xffff);
const msw = (x >> 16) + (y >> 16) + (lsw >> 16);
return msw << 16 | lsw & 0xffff;
}
/*
* Bitwise rotate a 32-bit number to the left.
*/
function bitRotateLeft(num, cnt) {
return num << cnt | num >>> 32 - cnt;
}
/*
* These functions implement the four basic operations the algorithm uses.
*/
function md5cmn(q, a, b, x, s, t) {
return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);
}
function md5ff(a, b, c, d, x, s, t) {
return md5cmn(b & c | ~b & d, a, b, x, s, t);
}
function md5gg(a, b, c, d, x, s, t) {
return md5cmn(b & d | c & ~d, a, b, x, s, t);
}
function md5hh(a, b, c, d, x, s, t) {
return md5cmn(b ^ c ^ d, a, b, x, s, t);
}
function md5ii(a, b, c, d, x, s, t) {
return md5cmn(c ^ (b | ~d), a, b, x, s, t);
}
var _default = md5;
exports.default = _default;
@@ -0,0 +1,11 @@
"use strict";
exports.eachQuarterOfIntervalWithOptions = void 0;
var _index = require("../eachQuarterOfInterval.cjs");
var _index2 = require("./_lib/convertToFP.cjs"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
const eachQuarterOfIntervalWithOptions =
(exports.eachQuarterOfIntervalWithOptions = (0, _index2.convertToFP)(
_index.eachQuarterOfInterval,
2,
));
@@ -0,0 +1,12 @@
function _defineEnumerableProperties(e, r) {
for (var t in r) {
var n = r[t];
n.configurable = n.enumerable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, t, n);
}
if (Object.getOwnPropertySymbols) for (var a = Object.getOwnPropertySymbols(r), b = 0; b < a.length; b++) {
var i = a[b];
(n = r[i]).configurable = n.enumerable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, i, n);
}
return e;
}
module.exports = _defineEnumerableProperties, module.exports.__esModule = true, module.exports["default"] = module.exports;
@@ -0,0 +1 @@
{"version":3,"names":["_classPrivateFieldGet","require","_classExtractFieldDescriptor","receiver","privateMap","classPrivateFieldGet2"],"sources":["../../src/helpers/classExtractFieldDescriptor.js"],"sourcesContent":["/* @minVersion 7.13.10 */\n/* @onlyBabel7 */\n\nimport classPrivateFieldGet2 from \"classPrivateFieldGet2\";\n\nexport default function _classExtractFieldDescriptor(receiver, privateMap) {\n return classPrivateFieldGet2(privateMap, receiver);\n}\n"],"mappings":";;;;;;AAGA,IAAAA,qBAAA,GAAAC,OAAA;AAEe,SAASC,4BAA4BA,CAACC,QAAQ,EAAEC,UAAU,EAAE;EACzE,OAAOC,qBAAqB,CAACD,UAAU,EAAED,QAAQ,CAAC;AACpD","ignoreList":[]}
@@ -0,0 +1,50 @@
import type { Database, Statement as BunStatement } from 'bun:sqlite';
import { entityKind } from "../entity.js";
import type { Logger } from "../logger.js";
import type { RelationalSchemaConfig, TablesRelationalConfig } from "../relations.js";
import { type Query } from "../sql/sql.js";
import type { SQLiteSyncDialect } from "../sqlite-core/dialect.js";
import { SQLiteTransaction } from "../sqlite-core/index.js";
import type { SelectedFieldsOrdered } from "../sqlite-core/query-builders/select.types.js";
import type { PreparedQueryConfig as PreparedQueryConfigBase, SQLiteExecuteMethod, SQLiteTransactionConfig } from "../sqlite-core/session.js";
import { SQLitePreparedQuery as PreparedQueryBase, SQLiteSession } from "../sqlite-core/session.js";
export interface SQLiteBunSessionOptions {
logger?: Logger;
}
type PreparedQueryConfig = Omit<PreparedQueryConfigBase, 'statement' | 'run'>;
type Statement = BunStatement<any>;
export declare class SQLiteBunSession<TFullSchema extends Record<string, unknown>, TSchema extends TablesRelationalConfig> extends SQLiteSession<'sync', void, TFullSchema, TSchema> {
private client;
private schema;
static readonly [entityKind]: string;
private logger;
constructor(client: Database, dialect: SQLiteSyncDialect, schema: RelationalSchemaConfig<TSchema> | undefined, options?: SQLiteBunSessionOptions);
exec(query: string): void;
prepareQuery<T extends Omit<PreparedQueryConfig, 'run'>>(query: Query, fields: SelectedFieldsOrdered | undefined, executeMethod: SQLiteExecuteMethod, isResponseInArrayMode: boolean, customResultMapper?: (rows: unknown[][]) => unknown): PreparedQuery<T>;
transaction<T>(transaction: (tx: SQLiteBunTransaction<TFullSchema, TSchema>) => T, config?: SQLiteTransactionConfig): T;
}
export declare class SQLiteBunTransaction<TFullSchema extends Record<string, unknown>, TSchema extends TablesRelationalConfig> extends SQLiteTransaction<'sync', void, TFullSchema, TSchema> {
static readonly [entityKind]: string;
transaction<T>(transaction: (tx: SQLiteBunTransaction<TFullSchema, TSchema>) => T): T;
}
export declare class PreparedQuery<T extends PreparedQueryConfig = PreparedQueryConfig> extends PreparedQueryBase<{
type: 'sync';
run: void;
all: T['all'];
get: T['get'];
values: T['values'];
execute: T['execute'];
}> {
private stmt;
private logger;
private fields;
private _isResponseInArrayMode;
private customResultMapper?;
static readonly [entityKind]: string;
constructor(stmt: Statement, query: Query, logger: Logger, fields: SelectedFieldsOrdered | undefined, executeMethod: SQLiteExecuteMethod, _isResponseInArrayMode: boolean, customResultMapper?: ((rows: unknown[][]) => unknown) | undefined);
run(placeholderValues?: Record<string, unknown>): import("bun:sqlite").Changes;
all(placeholderValues?: Record<string, unknown>): T['all'];
get(placeholderValues?: Record<string, unknown>): T['get'];
values(placeholderValues?: Record<string, unknown>): T['values'];
}
export {};
@@ -0,0 +1,12 @@
/**
* 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 './LexicalRichTextPlugin.dev.mjs';
import * as modProd from './LexicalRichTextPlugin.prod.mjs';
const mod = process.env.NODE_ENV !== 'production' ? modDev : modProd;
export const RichTextPlugin = mod.RichTextPlugin;
@@ -0,0 +1,23 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.position = void 0;
exports.position = {
name: 'position',
initialValue: 'static',
prefix: false,
type: 2 /* IDENT_VALUE */,
parse: function (_context, position) {
switch (position) {
case 'relative':
return 1 /* RELATIVE */;
case 'absolute':
return 2 /* ABSOLUTE */;
case 'fixed':
return 3 /* FIXED */;
case 'sticky':
return 4 /* STICKY */;
}
return 0 /* STATIC */;
}
};
//# sourceMappingURL=position.js.map
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('minBy', require('../minBy'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1 @@
{"version":3,"file":"reduceFieldsToValuesWithValidation.js","names":["unflatten","flatleyUnflatten","reduceFieldsToValuesWithValidation","fields","ignoreDisableFormData","state","data","valid","Object","keys","forEach","key","disableFormData","value"],"sources":["../../src/utilities/reduceFieldsToValuesWithValidation.ts"],"sourcesContent":["import type { Data, FormState } from 'payload'\n\nimport { unflatten as flatleyUnflatten } from 'payload/shared'\n\ntype ReturnType = {\n data: Data\n valid: boolean\n}\n\n/**\n * Reduce flattened form fields (Fields) to just map to the respective values instead of the full FormField object\n *\n * @param unflatten This also unflattens the data if `unflatten` is true. The unflattened data should match the original data structure\n * @param ignoreDisableFormData - if true, will include fields that have `disableFormData` set to true, for example, blocks or arrays fields.\n *\n */\nexport const reduceFieldsToValuesWithValidation = (\n fields: FormState,\n unflatten?: boolean,\n ignoreDisableFormData?: boolean,\n): ReturnType => {\n const state: ReturnType = {\n data: {},\n valid: true,\n }\n\n if (!fields) {\n return state\n }\n\n Object.keys(fields).forEach((key) => {\n if (ignoreDisableFormData === true || !fields[key]?.disableFormData) {\n state.data[key] = fields[key]?.value\n if (!fields[key].valid) {\n state.valid = false\n }\n }\n })\n\n if (unflatten) {\n state.data = flatleyUnflatten(state.data)\n }\n\n return state\n}\n"],"mappings":"AAEA,SAASA,SAAA,IAAaC,gBAAgB,QAAQ;AAO9C;;;;;;;AAOA,OAAO,MAAMC,kCAAA,GAAqCA,CAChDC,MAAA,EACAH,SAAA,EACAI,qBAAA;EAEA,MAAMC,KAAA,GAAoB;IACxBC,IAAA,EAAM,CAAC;IACPC,KAAA,EAAO;EACT;EAEA,IAAI,CAACJ,MAAA,EAAQ;IACX,OAAOE,KAAA;EACT;EAEAG,MAAA,CAAOC,IAAI,CAACN,MAAA,EAAQO,OAAO,CAAEC,GAAA;IAC3B,IAAIP,qBAAA,KAA0B,QAAQ,CAACD,MAAM,CAACQ,GAAA,CAAI,EAAEC,eAAA,EAAiB;MACnEP,KAAA,CAAMC,IAAI,CAACK,GAAA,CAAI,GAAGR,MAAM,CAACQ,GAAA,CAAI,EAAEE,KAAA;MAC/B,IAAI,CAACV,MAAM,CAACQ,GAAA,CAAI,CAACJ,KAAK,EAAE;QACtBF,KAAA,CAAME,KAAK,GAAG;MAChB;IACF;EACF;EAEA,IAAIP,SAAA,EAAW;IACbK,KAAA,CAAMC,IAAI,GAAGL,gBAAA,CAAiBI,KAAA,CAAMC,IAAI;EAC1C;EAEA,OAAOD,KAAA;AACT","ignoreList":[]}
@@ -0,0 +1,4 @@
export function cloneNode(n) {
// $FlowIgnore
return Object.assign({}, n);
}
@@ -0,0 +1,55 @@
import { entityKind } from "../../entity.cjs";
import { QueryPromise } from "../../query-promise.cjs";
import { type BuildQueryResult, type DBQueryConfig, type TableRelationalConfig, type TablesRelationalConfig } from "../../relations.cjs";
import type { RunnableQuery } from "../../runnable-query.cjs";
import type { Query, SQLWrapper } from "../../sql/sql.cjs";
import type { KnownKeysOnly } from "../../utils.cjs";
import type { SQLiteDialect } from "../dialect.cjs";
import type { PreparedQueryConfig, SQLitePreparedQuery, SQLiteSession } from "../session.cjs";
import type { SQLiteTable } from "../table.cjs";
export type SQLiteRelationalQueryKind<TMode extends 'sync' | 'async', TResult> = TMode extends 'async' ? SQLiteRelationalQuery<TMode, TResult> : SQLiteSyncRelationalQuery<TResult>;
export declare class RelationalQueryBuilder<TMode extends 'sync' | 'async', TFullSchema extends Record<string, unknown>, TSchema extends TablesRelationalConfig, TFields extends TableRelationalConfig> {
protected mode: TMode;
protected fullSchema: Record<string, unknown>;
protected schema: TSchema;
protected tableNamesMap: Record<string, string>;
protected table: SQLiteTable;
protected tableConfig: TableRelationalConfig;
protected dialect: SQLiteDialect;
protected session: SQLiteSession<'async', unknown, TFullSchema, TSchema>;
static readonly [entityKind]: string;
constructor(mode: TMode, fullSchema: Record<string, unknown>, schema: TSchema, tableNamesMap: Record<string, string>, table: SQLiteTable, tableConfig: TableRelationalConfig, dialect: SQLiteDialect, session: SQLiteSession<'async', unknown, TFullSchema, TSchema>);
findMany<TConfig extends DBQueryConfig<'many', true, TSchema, TFields>>(config?: KnownKeysOnly<TConfig, DBQueryConfig<'many', true, TSchema, TFields>>): SQLiteRelationalQueryKind<TMode, BuildQueryResult<TSchema, TFields, TConfig>[]>;
findFirst<TSelection extends Omit<DBQueryConfig<'many', true, TSchema, TFields>, 'limit'>>(config?: KnownKeysOnly<TSelection, Omit<DBQueryConfig<'many', true, TSchema, TFields>, 'limit'>>): SQLiteRelationalQueryKind<TMode, BuildQueryResult<TSchema, TFields, TSelection> | undefined>;
}
export declare class SQLiteRelationalQuery<TType extends 'sync' | 'async', TResult> extends QueryPromise<TResult> implements RunnableQuery<TResult, 'sqlite'>, SQLWrapper {
private fullSchema;
private schema;
private tableNamesMap;
private tableConfig;
private dialect;
private session;
private config;
static readonly [entityKind]: string;
readonly _: {
readonly dialect: 'sqlite';
readonly type: TType;
readonly result: TResult;
};
constructor(fullSchema: Record<string, unknown>, schema: TablesRelationalConfig, tableNamesMap: Record<string, string>,
/** @internal */
table: SQLiteTable, tableConfig: TableRelationalConfig, dialect: SQLiteDialect, session: SQLiteSession<'sync' | 'async', unknown, Record<string, unknown>, TablesRelationalConfig>, config: DBQueryConfig<'many', true> | true, mode: 'many' | 'first');
prepare(): SQLitePreparedQuery<PreparedQueryConfig & {
type: TType;
all: TResult;
get: TResult;
execute: TResult;
}>;
private _toSQL;
toSQL(): Query;
execute(): Promise<TResult>;
}
export declare class SQLiteSyncRelationalQuery<TResult> extends SQLiteRelationalQuery<'sync', TResult> {
static readonly [entityKind]: string;
sync(): TResult;
}
@@ -0,0 +1,5 @@
import { IImage } from './interface.mjs';
declare const GIF: IImage;
export { GIF };
@@ -0,0 +1,63 @@
import type { ClientField, Operator, ResolvedFilterOptions, SanitizedCollectionConfig, Where } from 'payload';
export type WhereBuilderProps = {
readonly collectionPluralLabel: SanitizedCollectionConfig['labels']['plural'];
readonly collectionSlug: SanitizedCollectionConfig['slug'];
readonly fields?: ClientField[];
readonly renderedFilters?: Map<string, React.ReactNode>;
readonly resolvedFilterOptions?: Map<string, ResolvedFilterOptions>;
};
export type Value = Date | number | number[] | string | string[];
export type ReducedField = {
field: ClientField;
label: React.ReactNode;
operators: {
label: string;
value: Operator;
}[];
plainTextLabel?: string;
value: Value;
};
export type Relation = 'and' | 'or';
export type ADD = {
andIndex?: number;
field: string;
orIndex?: number;
relation?: Relation;
type: 'add';
};
export type REMOVE = {
andIndex: number;
orIndex: number;
type: 'remove';
};
export type UPDATE = {
andIndex: number;
field?: string;
operator?: string;
orIndex: number;
type: 'update';
value?: unknown;
};
export type Action = ADD | REMOVE | UPDATE;
export type State = {
or: Where[];
};
export type AddCondition = ({ andIndex, field, orIndex, relation, }: {
andIndex: number;
field: ReducedField;
orIndex: number;
relation: 'and' | 'or';
}) => Promise<void> | void;
export type UpdateCondition = ({ type, andIndex, field, operator, orIndex, value, }: {
andIndex: number;
field: ReducedField;
operator: string;
orIndex: number;
type: 'field' | 'operator' | 'value';
value: Value;
}) => Promise<void> | void;
export type RemoveCondition = ({ andIndex, orIndex, }: {
andIndex: number;
orIndex: number;
}) => Promise<void> | void;
//# sourceMappingURL=types.d.ts.map
@@ -0,0 +1,4 @@
export declare const previousTuesday: import("./types.js").FPFn1<
Date,
import("../fp.js").DateArg<Date>
>;
@@ -0,0 +1,514 @@
/*
* 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.
*/
// This is a custom semantic versioning implementation compatible with the
// `satisfies(version, range, options?)` function from the `semver` npm package;
// with the exception that the `loose` option is not supported.
//
// The motivation for the custom semver implementation is that
// `semver` package has some initialization delay (lots of RegExp init and compile)
// and this leads to coldstart overhead for the OTEL Lambda Node.js layer.
// Hence, we have implemented lightweight version of it internally with required functionalities.
import { diag } from '@opentelemetry/api';
const VERSION_REGEXP = /^(?:v)?(?<version>(?<major>0|[1-9]\d*)\.(?<minor>0|[1-9]\d*)\.(?<patch>0|[1-9]\d*))(?:-(?<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?<build>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/;
const RANGE_REGEXP = /^(?<op><|>|=|==|<=|>=|~|\^|~>)?\s*(?:v)?(?<version>(?<major>x|X|\*|0|[1-9]\d*)(?:\.(?<minor>x|X|\*|0|[1-9]\d*))?(?:\.(?<patch>x|X|\*|0|[1-9]\d*))?)(?:-(?<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?<build>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/;
const operatorResMap = {
'>': [1],
'>=': [0, 1],
'=': [0],
'<=': [-1, 0],
'<': [-1],
'!=': [-1, 1],
};
/**
* Checks given version whether it satisfies given range expression.
* @param version the [version](https://github.com/npm/node-semver#versions) to be checked
* @param range the [range](https://github.com/npm/node-semver#ranges) expression for version check
* @param options options to configure semver satisfy check
*/
export function satisfies(version, range, options) {
// Strict semver format check
if (!_validateVersion(version)) {
diag.error(`Invalid version: ${version}`);
return false;
}
// If range is empty, satisfy check succeeds regardless what version is
if (!range) {
return true;
}
// Cleanup range
range = range.replace(/([<>=~^]+)\s+/g, '$1');
// Parse version
const parsedVersion = _parseVersion(version);
if (!parsedVersion) {
return false;
}
const allParsedRanges = [];
// Check given version whether it satisfies given range expression
const checkResult = _doSatisfies(parsedVersion, range, allParsedRanges, options);
// If check result is OK,
// do another final check for pre-release, if pre-release check is included by option
if (checkResult && !options?.includePrerelease) {
return _doPreleaseCheck(parsedVersion, allParsedRanges);
}
return checkResult;
}
function _validateVersion(version) {
return typeof version === 'string' && VERSION_REGEXP.test(version);
}
function _doSatisfies(parsedVersion, range, allParsedRanges, options) {
if (range.includes('||')) {
// A version matches a range if and only if
// every comparator in at least one of the ||-separated comparator sets is satisfied by the version
const ranges = range.trim().split('||');
for (const r of ranges) {
if (_checkRange(parsedVersion, r, allParsedRanges, options)) {
return true;
}
}
return false;
}
else if (range.includes(' - ')) {
// Hyphen ranges: https://github.com/npm/node-semver#hyphen-ranges-xyz---abc
range = replaceHyphen(range, options);
}
else if (range.includes(' ')) {
// Multiple separated ranges and all needs to be satisfied for success
const ranges = range
.trim()
.replace(/\s{2,}/g, ' ')
.split(' ');
for (const r of ranges) {
if (!_checkRange(parsedVersion, r, allParsedRanges, options)) {
return false;
}
}
return true;
}
// Check given parsed version with given range
return _checkRange(parsedVersion, range, allParsedRanges, options);
}
function _checkRange(parsedVersion, range, allParsedRanges, options) {
range = _normalizeRange(range, options);
if (range.includes(' ')) {
// If there are multiple ranges separated, satisfy each of them
return _doSatisfies(parsedVersion, range, allParsedRanges, options);
}
else {
// Validate and parse range
const parsedRange = _parseRange(range);
allParsedRanges.push(parsedRange);
// Check parsed version by parsed range
return _satisfies(parsedVersion, parsedRange);
}
}
function _satisfies(parsedVersion, parsedRange) {
// If range is invalid, satisfy check fails (no error throw)
if (parsedRange.invalid) {
return false;
}
// If range is empty or wildcard, satisfy check succeeds regardless what version is
if (!parsedRange.version || _isWildcard(parsedRange.version)) {
return true;
}
// Compare version segment first
let comparisonResult = _compareVersionSegments(parsedVersion.versionSegments || [], parsedRange.versionSegments || []);
// If versions segments are equal, compare by pre-release segments
if (comparisonResult === 0) {
const versionPrereleaseSegments = parsedVersion.prereleaseSegments || [];
const rangePrereleaseSegments = parsedRange.prereleaseSegments || [];
if (!versionPrereleaseSegments.length && !rangePrereleaseSegments.length) {
comparisonResult = 0;
}
else if (!versionPrereleaseSegments.length &&
rangePrereleaseSegments.length) {
comparisonResult = 1;
}
else if (versionPrereleaseSegments.length &&
!rangePrereleaseSegments.length) {
comparisonResult = -1;
}
else {
comparisonResult = _compareVersionSegments(versionPrereleaseSegments, rangePrereleaseSegments);
}
}
// Resolve check result according to comparison operator
return operatorResMap[parsedRange.op]?.includes(comparisonResult);
}
function _doPreleaseCheck(parsedVersion, allParsedRanges) {
if (parsedVersion.prerelease) {
return allParsedRanges.some(r => r.prerelease && r.version === parsedVersion.version);
}
return true;
}
function _normalizeRange(range, options) {
range = range.trim();
range = replaceCaret(range, options);
range = replaceTilde(range);
range = replaceXRange(range, options);
range = range.trim();
return range;
}
function isX(id) {
return !id || id.toLowerCase() === 'x' || id === '*';
}
function _parseVersion(versionString) {
const match = versionString.match(VERSION_REGEXP);
if (!match) {
diag.error(`Invalid version: ${versionString}`);
return undefined;
}
const version = match.groups.version;
const prerelease = match.groups.prerelease;
const build = match.groups.build;
const versionSegments = version.split('.');
const prereleaseSegments = prerelease?.split('.');
return {
op: undefined,
version,
versionSegments,
versionSegmentCount: versionSegments.length,
prerelease,
prereleaseSegments,
prereleaseSegmentCount: prereleaseSegments ? prereleaseSegments.length : 0,
build,
};
}
function _parseRange(rangeString) {
if (!rangeString) {
return {};
}
const match = rangeString.match(RANGE_REGEXP);
if (!match) {
diag.error(`Invalid range: ${rangeString}`);
return {
invalid: true,
};
}
let op = match.groups.op;
const version = match.groups.version;
const prerelease = match.groups.prerelease;
const build = match.groups.build;
const versionSegments = version.split('.');
const prereleaseSegments = prerelease?.split('.');
if (op === '==') {
op = '=';
}
return {
op: op || '=',
version,
versionSegments,
versionSegmentCount: versionSegments.length,
prerelease,
prereleaseSegments,
prereleaseSegmentCount: prereleaseSegments ? prereleaseSegments.length : 0,
build,
};
}
function _isWildcard(s) {
return s === '*' || s === 'x' || s === 'X';
}
function _parseVersionString(v) {
const n = parseInt(v, 10);
return isNaN(n) ? v : n;
}
function _normalizeVersionType(a, b) {
if (typeof a === typeof b) {
if (typeof a === 'number') {
return [a, b];
}
else if (typeof a === 'string') {
return [a, b];
}
else {
throw new Error('Version segments can only be strings or numbers');
}
}
else {
return [String(a), String(b)];
}
}
function _compareVersionStrings(v1, v2) {
if (_isWildcard(v1) || _isWildcard(v2)) {
return 0;
}
const [parsedV1, parsedV2] = _normalizeVersionType(_parseVersionString(v1), _parseVersionString(v2));
if (parsedV1 > parsedV2) {
return 1;
}
else if (parsedV1 < parsedV2) {
return -1;
}
return 0;
}
function _compareVersionSegments(v1, v2) {
for (let i = 0; i < Math.max(v1.length, v2.length); i++) {
const res = _compareVersionStrings(v1[i] || '0', v2[i] || '0');
if (res !== 0) {
return res;
}
}
return 0;
}
////////////////////////////////////////////////////////////////////////////////
// The rest of this file is adapted from portions of https://github.com/npm/node-semver/tree/868d4bb
// License:
/*
* The ISC License
*
* Copyright (c) Isaac Z. Schlueter and Contributors
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
* IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
const LETTERDASHNUMBER = '[a-zA-Z0-9-]';
const NUMERICIDENTIFIER = '0|[1-9]\\d*';
const NONNUMERICIDENTIFIER = `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`;
const GTLT = '((?:<|>)?=?)';
const PRERELEASEIDENTIFIER = `(?:${NUMERICIDENTIFIER}|${NONNUMERICIDENTIFIER})`;
const PRERELEASE = `(?:-(${PRERELEASEIDENTIFIER}(?:\\.${PRERELEASEIDENTIFIER})*))`;
const BUILDIDENTIFIER = `${LETTERDASHNUMBER}+`;
const BUILD = `(?:\\+(${BUILDIDENTIFIER}(?:\\.${BUILDIDENTIFIER})*))`;
const XRANGEIDENTIFIER = `${NUMERICIDENTIFIER}|x|X|\\*`;
const XRANGEPLAIN = `[v=\\s]*(${XRANGEIDENTIFIER})` +
`(?:\\.(${XRANGEIDENTIFIER})` +
`(?:\\.(${XRANGEIDENTIFIER})` +
`(?:${PRERELEASE})?${BUILD}?` +
`)?)?`;
const XRANGE = `^${GTLT}\\s*${XRANGEPLAIN}$`;
const XRANGE_REGEXP = new RegExp(XRANGE);
const HYPHENRANGE = `^\\s*(${XRANGEPLAIN})` + `\\s+-\\s+` + `(${XRANGEPLAIN})` + `\\s*$`;
const HYPHENRANGE_REGEXP = new RegExp(HYPHENRANGE);
const LONETILDE = '(?:~>?)';
const TILDE = `^${LONETILDE}${XRANGEPLAIN}$`;
const TILDE_REGEXP = new RegExp(TILDE);
const LONECARET = '(?:\\^)';
const CARET = `^${LONECARET}${XRANGEPLAIN}$`;
const CARET_REGEXP = new RegExp(CARET);
// Borrowed from https://github.com/npm/node-semver/blob/868d4bbe3d318c52544f38d5f9977a1103e924c2/classes/range.js#L285
//
// ~, ~> --> * (any, kinda silly)
// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0
// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0
// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0
// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0
// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0
// ~0.0.1 --> >=0.0.1 <0.1.0-0
function replaceTilde(comp) {
const r = TILDE_REGEXP;
return comp.replace(r, (_, M, m, p, pr) => {
let ret;
if (isX(M)) {
ret = '';
}
else if (isX(m)) {
ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;
}
else if (isX(p)) {
// ~1.2 == >=1.2.0 <1.3.0-0
ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`;
}
else if (pr) {
ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
}
else {
// ~1.2.3 == >=1.2.3 <1.3.0-0
ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
}
return ret;
});
}
// Borrowed from https://github.com/npm/node-semver/blob/868d4bbe3d318c52544f38d5f9977a1103e924c2/classes/range.js#L329
//
// ^ --> * (any, kinda silly)
// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0
// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0
// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0
// ^1.2.3 --> >=1.2.3 <2.0.0-0
// ^1.2.0 --> >=1.2.0 <2.0.0-0
// ^0.0.1 --> >=0.0.1 <0.0.2-0
// ^0.1.0 --> >=0.1.0 <0.2.0-0
function replaceCaret(comp, options) {
const r = CARET_REGEXP;
const z = options?.includePrerelease ? '-0' : '';
return comp.replace(r, (_, M, m, p, pr) => {
let ret;
if (isX(M)) {
ret = '';
}
else if (isX(m)) {
ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;
}
else if (isX(p)) {
if (M === '0') {
ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;
}
else {
ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`;
}
}
else if (pr) {
if (M === '0') {
if (m === '0') {
ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`;
}
else {
ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
}
}
else {
ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`;
}
}
else {
if (M === '0') {
if (m === '0') {
ret = `>=${M}.${m}.${p}${z} <${M}.${m}.${+p + 1}-0`;
}
else {
ret = `>=${M}.${m}.${p}${z} <${M}.${+m + 1}.0-0`;
}
}
else {
ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`;
}
}
return ret;
});
}
// Borrowed from https://github.com/npm/node-semver/blob/868d4bbe3d318c52544f38d5f9977a1103e924c2/classes/range.js#L390
function replaceXRange(comp, options) {
const r = XRANGE_REGEXP;
return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
const xM = isX(M);
const xm = xM || isX(m);
const xp = xm || isX(p);
const anyX = xp;
if (gtlt === '=' && anyX) {
gtlt = '';
}
// if we're including prereleases in the match, then we need
// to fix this to -0, the lowest possible prerelease value
pr = options?.includePrerelease ? '-0' : '';
if (xM) {
if (gtlt === '>' || gtlt === '<') {
// nothing is allowed
ret = '<0.0.0-0';
}
else {
// nothing is forbidden
ret = '*';
}
}
else if (gtlt && anyX) {
// we know patch is an x, because we have any x at all.
// replace X with 0
if (xm) {
m = 0;
}
p = 0;
if (gtlt === '>') {
// >1 => >=2.0.0
// >1.2 => >=1.3.0
gtlt = '>=';
if (xm) {
M = +M + 1;
m = 0;
p = 0;
}
else {
m = +m + 1;
p = 0;
}
}
else if (gtlt === '<=') {
// <=0.7.x is actually <0.8.0, since any 0.7.x should
// pass. Similarly, <=7.x is actually <8.0.0, etc.
gtlt = '<';
if (xm) {
M = +M + 1;
}
else {
m = +m + 1;
}
}
if (gtlt === '<') {
pr = '-0';
}
ret = `${gtlt + M}.${m}.${p}${pr}`;
}
else if (xm) {
ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`;
}
else if (xp) {
ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`;
}
return ret;
});
}
// Borrowed from https://github.com/npm/node-semver/blob/868d4bbe3d318c52544f38d5f9977a1103e924c2/classes/range.js#L488
//
// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5
// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do
// 1.2 - 3.4 => >=1.2.0 <3.5.0-0
function replaceHyphen(comp, options) {
const r = HYPHENRANGE_REGEXP;
return comp.replace(r, (_, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => {
if (isX(fM)) {
from = '';
}
else if (isX(fm)) {
from = `>=${fM}.0.0${options?.includePrerelease ? '-0' : ''}`;
}
else if (isX(fp)) {
from = `>=${fM}.${fm}.0${options?.includePrerelease ? '-0' : ''}`;
}
else if (fpr) {
from = `>=${from}`;
}
else {
from = `>=${from}${options?.includePrerelease ? '-0' : ''}`;
}
if (isX(tM)) {
to = '';
}
else if (isX(tm)) {
to = `<${+tM + 1}.0.0-0`;
}
else if (isX(tp)) {
to = `<${tM}.${+tm + 1}.0-0`;
}
else if (tpr) {
to = `<=${tM}.${tm}.${tp}-${tpr}`;
}
else if (options?.includePrerelease) {
to = `<${tM}.${tm}.${+tp + 1}-0`;
}
else {
to = `<=${to}`;
}
return `${from} ${to}`.trim();
});
}
//# sourceMappingURL=semver.js.map
@@ -0,0 +1,23 @@
import { jsx as _jsx } from "react/jsx-runtime";
import { isReactServerComponentOrFunction } from 'payload/shared';
import React from 'react';
export const WithServerSideProps = ({
Component,
serverOnlyProps,
...rest
}) => {
if (Component) {
const WithServerSideProps = passedProps => {
const propsWithServerOnlyProps = {
...passedProps,
...(isReactServerComponentOrFunction(Component) ? serverOnlyProps ?? {} : {})
};
return /*#__PURE__*/_jsx(Component, {
...propsWithServerOnlyProps
});
};
return WithServerSideProps(rest);
}
return null;
};
//# sourceMappingURL=index.js.map
@@ -0,0 +1,10 @@
/**
* Provided a value and a ValueType, returns the value as that value type.
*/
const getValueAsType = (value, type) => {
return type && typeof value === "number"
? type.transform(value)
: value;
};
export { getValueAsType };
@@ -0,0 +1,10 @@
function _objectWithoutPropertiesLoose(r, e) {
if (null == r) return {};
var t = {};
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
if (-1 !== e.indexOf(n)) continue;
t[n] = r[n];
}
return t;
}
module.exports = _objectWithoutPropertiesLoose, module.exports.__esModule = true, module.exports["default"] = module.exports;
@@ -0,0 +1,71 @@
import { Context } from '../context/types';
import { Span } from './span';
import { SpanOptions } from './SpanOptions';
/**
* Tracer provides an interface for creating {@link Span}s.
*/
export interface Tracer {
/**
* Starts a new {@link Span}. Start the span without setting it on context.
*
* This method do NOT modify the current Context.
*
* @param name The name of the span
* @param [options] SpanOptions used for span creation
* @param [context] Context to use to extract parent
* @returns Span The newly created span
* @example
* const span = tracer.startSpan('op');
* span.setAttribute('key', 'value');
* span.end();
*/
startSpan(name: string, options?: SpanOptions, context?: Context): Span;
/**
* Starts a new {@link Span} and calls the given function passing it the
* created span as first argument.
* Additionally the new span gets set in context and this context is activated
* for the duration of the function call.
*
* @param name The name of the span
* @param [options] SpanOptions used for span creation
* @param [context] Context to use to extract parent
* @param fn function called in the context of the span and receives the newly created span as an argument
* @returns return value of fn
* @example
* const something = tracer.startActiveSpan('op', span => {
* try {
* do some work
* span.setStatus({code: SpanStatusCode.OK});
* return something;
* } catch (err) {
* span.setStatus({
* code: SpanStatusCode.ERROR,
* message: err.message,
* });
* throw err;
* } finally {
* span.end();
* }
* });
*
* @example
* const span = tracer.startActiveSpan('op', span => {
* try {
* do some work
* return span;
* } catch (err) {
* span.setStatus({
* code: SpanStatusCode.ERROR,
* message: err.message,
* });
* throw err;
* }
* });
* do some more work
* span.end();
*/
startActiveSpan<F extends (span: Span) => unknown>(name: string, fn: F): ReturnType<F>;
startActiveSpan<F extends (span: Span) => unknown>(name: string, options: SpanOptions, fn: F): ReturnType<F>;
startActiveSpan<F extends (span: Span) => unknown>(name: string, options: SpanOptions, context: Context, fn: F): ReturnType<F>;
}
//# sourceMappingURL=tracer.d.ts.map
@@ -0,0 +1,8 @@
"use strict";
exports.fromUnixTimeWithOptions = void 0;
var _index = require("../fromUnixTime.cjs");
var _index2 = require("./_lib/convertToFP.cjs"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
const fromUnixTimeWithOptions = (exports.fromUnixTimeWithOptions = (0,
_index2.convertToFP)(_index.fromUnixTime, 2));
@@ -0,0 +1,235 @@
import type { SpanLink, SpanLinkJSON } from './link';
import type { Measurements } from './measurement';
import type { HrTime } from './opentelemetry';
import type { SpanStatus } from './spanStatus';
import type { TransactionSource } from './transaction';
type SpanOriginType = 'manual' | 'auto';
type SpanOriginCategory = string;
type SpanOriginIntegrationName = string;
type SpanOriginIntegrationPart = string;
export type SpanOrigin = SpanOriginType | `${SpanOriginType}.${SpanOriginCategory}` | `${SpanOriginType}.${SpanOriginCategory}.${SpanOriginIntegrationName}` | `${SpanOriginType}.${SpanOriginCategory}.${SpanOriginIntegrationName}.${SpanOriginIntegrationPart}`;
export type SpanAttributeValue = string | number | boolean | Array<null | undefined | string> | Array<null | undefined | number> | Array<null | undefined | boolean>;
export type SpanAttributes = Partial<{
'sentry.origin': string;
'sentry.op': string;
'sentry.source': TransactionSource;
'sentry.sample_rate': number;
}> & Record<string, SpanAttributeValue | undefined>;
/** This type is aligned with the OpenTelemetry TimeInput type. */
export type SpanTimeInput = HrTime | number | Date;
/** A JSON representation of a span. */
export interface SpanJSON {
data: SpanAttributes;
description?: string;
op?: string;
parent_span_id?: string;
span_id: string;
start_timestamp: number;
status?: string;
timestamp?: number;
trace_id: string;
origin?: SpanOrigin;
profile_id?: string;
exclusive_time?: number;
measurements?: Measurements;
is_segment?: boolean;
segment_id?: string;
links?: SpanLinkJSON[];
}
type TraceFlagNone = 0;
type TraceFlagSampled = 1;
export type TraceFlag = TraceFlagNone | TraceFlagSampled;
export interface TraceState {
/**
* Create a new TraceState which inherits from this TraceState and has the
* given key set.
* The new entry will always be added in the front of the list of states.
*
* @param key key of the TraceState entry.
* @param value value of the TraceState entry.
*/
set(key: string, value: string): TraceState;
/**
* Return a new TraceState which inherits from this TraceState but does not
* contain the given key.
*
* @param key the key for the TraceState entry to be removed.
*/
unset(key: string): TraceState;
/**
* Returns the value to which the specified key is mapped, or `undefined` if
* this map contains no mapping for the key.
*
* @param key with which the specified value is to be associated.
* @returns the value to which the specified key is mapped, or `undefined` if
* this map contains no mapping for the key.
*/
get(key: string): string | undefined;
/**
* Serializes the TraceState to a `list` as defined below. The `list` is a
* series of `list-members` separated by commas `,`, and a list-member is a
* key/value pair separated by an equals sign `=`. Spaces and horizontal tabs
* surrounding `list-members` are ignored. There can be a maximum of 32
* `list-members` in a `list`.
*
* @returns the serialized string.
*/
serialize(): string;
}
export interface SpanContextData {
/**
* The ID of the trace that this span belongs to. It is worldwide unique
* with practically sufficient probability by being made as 16 randomly
* generated bytes, encoded as a 32 lowercase hex characters corresponding to
* 128 bits.
*/
traceId: string;
/**
* The ID of the Span. It is globally unique with practically sufficient
* probability by being made as 8 randomly generated bytes, encoded as a 16
* lowercase hex characters corresponding to 64 bits.
*/
spanId: string;
/**
* Only true if the SentrySpanArguments was propagated from a remote parent.
*/
isRemote?: boolean | undefined;
/**
* Trace flags to propagate.
*
* It is represented as 1 byte (bitmap). Bit to represent whether trace is
* sampled or not. When set, the least significant bit documents that the
* caller may have recorded trace data. A caller who does not record trace
* data out-of-band leaves this flag unset.
*/
traceFlags: TraceFlag | number;
/** In OpenTelemetry, this can be used to store trace state, which are basically key-value pairs. */
traceState?: TraceState | undefined;
}
/**
* Interface holding all properties that can be set on a Span on creation.
* This is only used for the legacy span/transaction creation and will go away in v8.
*/
export interface SentrySpanArguments {
/**
* Human-readable identifier for the span.
*/
name?: string | undefined;
/**
* Operation of the Span.
*/
op?: string | undefined;
/**
* Parent Span ID
*/
parentSpanId?: string | undefined;
/**
* Was this span chosen to be sent as part of the sample?
*/
sampled?: boolean | undefined;
/**
* Span ID
*/
spanId?: string | undefined;
/**
* Trace ID
*/
traceId?: string | undefined;
/**
* Attributes of the Span.
*/
attributes?: SpanAttributes;
/**
* Timestamp in seconds (epoch time) indicating when the span started.
*/
startTimestamp?: number | undefined;
/**
* Timestamp in seconds (epoch time) indicating when the span ended.
*/
endTimestamp?: number | undefined;
/**
* Links to associate with the new span. Setting links here is preferred over addLink()
* as certain context information is only available during span creation.
*/
links?: SpanLink[];
/**
* Set to `true` if this span should be sent as a standalone segment span
* as opposed to a transaction.
*
* @experimental this option is currently experimental and should only be
* used within SDK code. It might be removed or changed in the future.
*/
isStandalone?: boolean | undefined;
}
/**
* A generic Span which holds trace data.
*/
export interface Span {
/**
* Get context data for this span.
* This includes the spanId & the traceId.
*/
spanContext(): SpanContextData;
/**
* End the current span.
*/
end(endTimestamp?: SpanTimeInput): void;
/**
* Set a single attribute on the span.
* Set it to `undefined` to remove the attribute.
*/
setAttribute(key: string, value: SpanAttributeValue | undefined): this;
/**
* Set multiple attributes on the span.
* Any attribute set to `undefined` will be removed.
*/
setAttributes(attributes: SpanAttributes): this;
/**
* Sets the status attribute on the current span.
*/
setStatus(status: SpanStatus): this;
/**
* Update the name of the span.
*
* **Important:** You most likely want to use `Sentry.updateSpanName(span, name)` instead!
*
* This method will update the current span name but cannot guarantee that the new name will be
* the final name of the span. Instrumentation might still overwrite the name with an automatically
* computed name, for example in `http.server` or `db` spans.
*
* You can ensure that your name is kept and not overwritten by calling `Sentry.updateSpanName(span, name)`
*
* @param name the new name of the span
*/
updateName(name: string): this;
/**
* If this is span is actually recording data.
* This will return false if tracing is disabled, this span was not sampled or if the span is already finished.
*/
isRecording(): boolean;
/**
* Adds an event to the Span.
*/
addEvent(name: string, attributesOrStartTime?: SpanAttributes | SpanTimeInput, startTime?: SpanTimeInput): this;
/**
* Associates this span with a related span. Links can reference spans from the same or different trace
* and are typically used for batch operations, cross-trace scenarios, or scatter/gather patterns.
*
* Prefer setting links directly when starting a span (e.g. `Sentry.startSpan()`) as some context information is only available during span creation.
* @param link - The link containing the context of the span to link to and optional attributes
*/
addLink(link: SpanLink): this;
/**
* Associates this span with multiple related spans. See {@link addLink} for more details.
*
* Prefer setting links directly when starting a span (e.g. `Sentry.startSpan()`) as some context information is only available during span creation.
* @param links - Array of links to associate with this span
*/
addLinks(links: SpanLink[]): this;
/**
* NOT USED IN SENTRY, only added for compliance with OTEL Span interface
*/
recordException(exception: unknown, time?: number): void;
}
export {};
//# sourceMappingURL=span.d.ts.map
@@ -0,0 +1,19 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
/** @typedef {import("../Compiler")} Compiler */
class NodeSourcePlugin {
/**
* Apply the plugin
* @param {Compiler} compiler the compiler instance
* @returns {void}
*/
apply(compiler) {}
}
module.exports = NodeSourcePlugin;
@@ -0,0 +1,8 @@
"use strict";
exports.differenceInISOWeekYears = void 0;
var _index = require("../differenceInISOWeekYears.js");
var _index2 = require("./_lib/convertToFP.js"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
const differenceInISOWeekYears = (exports.differenceInISOWeekYears = (0,
_index2.convertToFP)(_index.differenceInISOWeekYears, 2));
@@ -0,0 +1,2 @@
const e=require(`../../utils/throw-if-empty.cjs`),t=t=>()=>(e.throwIfEmpty(t,`Keys cannot be empty`),{path:`/versions`,body:JSON.stringify(t),method:`DELETE`}),n=t=>()=>(e.throwIfEmpty(t,`Key cannot be empty`),{path:`/versions/${t}`,method:`DELETE`});exports.deleteContentVersion=n,exports.deleteContentVersions=t;
//# sourceMappingURL=versions.cjs.map
@@ -0,0 +1 @@
{"version":3,"file":"panel-bottom.js","sources":["../../../src/icons/panel-bottom.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name PanelBottom\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHg9IjMiIHk9IjMiIHJ4PSIyIiAvPgogIDxwYXRoIGQ9Ik0zIDE1aDE4IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/panel-bottom\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 PanelBottom = createLucideIcon('PanelBottom', [\n ['rect', { width: '18', height: '18', x: '3', y: '3', rx: '2', key: 'afitv7' }],\n ['path', { d: 'M3 15h18', key: '5xshup' }],\n]);\n\nexport default PanelBottom;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAc,iBAAiB,aAAe,CAAA,CAAA,CAAA;AAAA,CAAA,CAClD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,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,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 @@
{"version":3,"file":"nextNavigationErrorUtils.js","sources":["../../../src/common/nextNavigationErrorUtils.ts"],"sourcesContent":["import { isError } from '@sentry/core';\n\n/**\n * Determines whether input is a Next.js not-found error.\n * https://beta.nextjs.org/docs/api-reference/notfound#notfound\n */\nexport function isNotFoundNavigationError(subject: unknown): boolean {\n return (\n isError(subject) &&\n ['NEXT_NOT_FOUND', 'NEXT_HTTP_ERROR_FALLBACK;404'].includes(\n (subject as Error & { digest?: unknown }).digest as string,\n )\n );\n}\n\n/**\n * Determines whether input is a Next.js redirect error.\n * https://beta.nextjs.org/docs/api-reference/redirect#redirect\n */\nexport function isRedirectNavigationError(subject: unknown): boolean {\n return (\n isError(subject) &&\n typeof (subject as Error & { digest?: unknown }).digest === 'string' &&\n (subject as Error & { digest: string }).digest.startsWith('NEXT_REDIRECT;') // a redirect digest looks like \"NEXT_REDIRECT;[redirect path]\"\n );\n}\n"],"names":[],"mappings":";;AAEA;AACA;AACA;AACA;AACO,SAAS,yBAAyB,CAAC,OAAO,EAAoB;AACrE,EAAE;AACF,IAAI,OAAO,CAAC,OAAO,CAAA;AACnB,IAAI,CAAC,gBAAgB,EAAE,8BAA8B,CAAC,CAAC,QAAQ;AAC/D,MAAM,CAAC,OAAA,GAAyC,MAAA;AAChD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACO,SAAS,yBAAyB,CAAC,OAAO,EAAoB;AACrE,EAAE;AACF,IAAI,OAAO,CAAC,OAAO,CAAA;AACnB,IAAI,OAAO,CAAC,OAAA,GAAyC,MAAA,KAAW,QAAA;AAChE,IAAI,CAAC,UAAuC,MAAM,CAAC,UAAU,CAAC,gBAAgB,CAAA;AAC9E;AACA;;;;"}
@@ -0,0 +1 @@
{"version":3,"file":"fetchSession.d.ts","sourceRoot":"","sources":["../../../../src/session/fetchSession.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAKxC;;GAEG;AACH,wBAAgB,YAAY,IAAI,OAAO,GAAG,IAAI,CAqB7C"}
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"zC","8":"K D E F A","164":"B"},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","513":"C L M G N O P"},C:{"1":"0 1 2 3 4 5 6 7 8 hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B WC 6B XC 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R YC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I ZC aC OC 1C 2C 3C","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 4C 5C","66":"fB gB"},D:{"1":"0 1 2 3 4 5 6 7 8 kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B WC 6B XC 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I ZC aC OC","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"},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","8":"J bB K D 6C bC 7C 8C","289":"E F A 9C AD cC"},F:{"1":"0 1 2 3 4 5 6 7 8 DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R YC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","8":"9 F B C G N O P cB AB BB CB JD KD LD MD PC xC ND QC"},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","8":"bC OD yC PD QD RD","289":"E SD TD UD VD WD"},H:{"2":"mD"},I:{"1":"I","8":"VC J nD oD pD qD yC rD sD"},J:{"8":"D A"},K:{"1":"H","8":"A B C PC xC QC"},L:{"1":"I"},M:{"1":"OC"},N:{"8":"A","164":"B"},O:{"1":"RC"},P:{"1":"9 J AB BB CB DB EB FB GB HB IB tD uD vD wD xD cC yD zD 0D 1D 2D SC TC UC 3D"},Q:{"1":"4D"},R:{"1":"5D"},S:{"1":"6D 7D"}},B:2,C:"Web Cryptography",D:true};
@@ -0,0 +1,8 @@
"use strict";
exports.startOfISOWeekWithOptions = void 0;
var _index = require("../startOfISOWeek.cjs");
var _index2 = require("./_lib/convertToFP.cjs"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
const startOfISOWeekWithOptions = (exports.startOfISOWeekWithOptions = (0,
_index2.convertToFP)(_index.startOfISOWeek, 2));
@@ -0,0 +1 @@
{"version":3,"file":"spans.d.ts","sourceRoot":"","sources":["../../../../src/integrations/mcp-server/spans.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAqBH,OAAO,KAAK,EACV,gBAAgB,EAChB,mBAAmB,EACnB,cAAc,EAEd,YAAY,EACZ,kBAAkB,EACnB,MAAM,SAAS,CAAC;AAuFjB;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CACvC,cAAc,EAAE,mBAAmB,EACnC,SAAS,EAAE,YAAY,EACvB,KAAK,EAAE,gBAAgB,EACvB,OAAO,EAAE,kBAAkB,EAC3B,QAAQ,EAAE,MAAM,OAAO,GACtB,OAAO,CAST;AAED;;;;;;;GAOG;AACH,wBAAgB,iCAAiC,CAC/C,cAAc,EAAE,mBAAmB,EACnC,SAAS,EAAE,YAAY,EACvB,OAAO,EAAE,kBAAkB,EAC3B,QAAQ,EAAE,MAAM,OAAO,GACtB,OAAO,CAQT;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CACtC,cAAc,EAAE,cAAc,EAC9B,SAAS,EAAE,YAAY,EACvB,KAAK,CAAC,EAAE,gBAAgB,EACxB,OAAO,CAAC,EAAE,kBAAkB,GAC3B;IACD,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,gBAAgB,EAAE,OAAO,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;CAC7C,CAwBA"}
@@ -0,0 +1,9 @@
import type { PromiseOrValue } from '../jsutils/PromiseOrValue';
/**
* Given an AsyncIterable and a callback function, return an AsyncIterator
* which produces values mapped via calling the callback function.
*/
export declare function mapAsyncIterator<T, U, R = undefined>(
iterable: AsyncGenerator<T, R, void> | AsyncIterable<T>,
callback: (value: T) => PromiseOrValue<U>,
): AsyncGenerator<U, R, void>;
@@ -0,0 +1,249 @@
const formatDistanceLocale = {
lessThanXSeconds: {
regular: {
one: "1 секундтан аз",
singularNominative: "{{count}} секундтан аз",
singularGenitive: "{{count}} секундтан аз",
pluralGenitive: "{{count}} секундтан аз",
},
future: {
one: "бір секундтан кейін",
singularNominative: "{{count}} секундтан кейін",
singularGenitive: "{{count}} секундтан кейін",
pluralGenitive: "{{count}} секундтан кейін",
},
},
xSeconds: {
regular: {
singularNominative: "{{count}} секунд",
singularGenitive: "{{count}} секунд",
pluralGenitive: "{{count}} секунд",
},
past: {
singularNominative: "{{count}} секунд бұрын",
singularGenitive: "{{count}} секунд бұрын",
pluralGenitive: "{{count}} секунд бұрын",
},
future: {
singularNominative: "{{count}} секундтан кейін",
singularGenitive: "{{count}} секундтан кейін",
pluralGenitive: "{{count}} секундтан кейін",
},
},
halfAMinute: (options) => {
if (options?.addSuffix) {
if (options.comparison && options.comparison > 0) {
return "жарты минут ішінде";
} else {
return "жарты минут бұрын";
}
}
return "жарты минут";
},
lessThanXMinutes: {
regular: {
one: "1 минуттан аз",
singularNominative: "{{count}} минуттан аз",
singularGenitive: "{{count}} минуттан аз",
pluralGenitive: "{{count}} минуттан аз",
},
future: {
one: "минуттан кем ",
singularNominative: "{{count}} минуттан кем",
singularGenitive: "{{count}} минуттан кем",
pluralGenitive: "{{count}} минуттан кем",
},
},
xMinutes: {
regular: {
singularNominative: "{{count}} минут",
singularGenitive: "{{count}} минут",
pluralGenitive: "{{count}} минут",
},
past: {
singularNominative: "{{count}} минут бұрын",
singularGenitive: "{{count}} минут бұрын",
pluralGenitive: "{{count}} минут бұрын",
},
future: {
singularNominative: "{{count}} минуттан кейін",
singularGenitive: "{{count}} минуттан кейін",
pluralGenitive: "{{count}} минуттан кейін",
},
},
aboutXHours: {
regular: {
singularNominative: "шамамен {{count}} сағат",
singularGenitive: "шамамен {{count}} сағат",
pluralGenitive: "шамамен {{count}} сағат",
},
future: {
singularNominative: "шамамен {{count}} сағаттан кейін",
singularGenitive: "шамамен {{count}} сағаттан кейін",
pluralGenitive: "шамамен {{count}} сағаттан кейін",
},
},
xHours: {
regular: {
singularNominative: "{{count}} сағат",
singularGenitive: "{{count}} сағат",
pluralGenitive: "{{count}} сағат",
},
},
xDays: {
regular: {
singularNominative: "{{count}} күн",
singularGenitive: "{{count}} күн",
pluralGenitive: "{{count}} күн",
},
future: {
singularNominative: "{{count}} күннен кейін",
singularGenitive: "{{count}} күннен кейін",
pluralGenitive: "{{count}} күннен кейін",
},
},
aboutXWeeks: {
type: "weeks",
one: "шамамен 1 апта",
other: "шамамен {{count}} апта",
},
xWeeks: {
type: "weeks",
one: "1 апта",
other: "{{count}} апта",
},
aboutXMonths: {
regular: {
singularNominative: "шамамен {{count}} ай",
singularGenitive: "шамамен {{count}} ай",
pluralGenitive: "шамамен {{count}} ай",
},
future: {
singularNominative: "шамамен {{count}} айдан кейін",
singularGenitive: "шамамен {{count}} айдан кейін",
pluralGenitive: "шамамен {{count}} айдан кейін",
},
},
xMonths: {
regular: {
singularNominative: "{{count}} ай",
singularGenitive: "{{count}} ай",
pluralGenitive: "{{count}} ай",
},
},
aboutXYears: {
regular: {
singularNominative: "шамамен {{count}} жыл",
singularGenitive: "шамамен {{count}} жыл",
pluralGenitive: "шамамен {{count}} жыл",
},
future: {
singularNominative: "шамамен {{count}} жылдан кейін",
singularGenitive: "шамамен {{count}} жылдан кейін",
pluralGenitive: "шамамен {{count}} жылдан кейін",
},
},
xYears: {
regular: {
singularNominative: "{{count}} жыл",
singularGenitive: "{{count}} жыл",
pluralGenitive: "{{count}} жыл",
},
future: {
singularNominative: "{{count}} жылдан кейін",
singularGenitive: "{{count}} жылдан кейін",
pluralGenitive: "{{count}} жылдан кейін",
},
},
overXYears: {
regular: {
singularNominative: "{{count}} жылдан астам",
singularGenitive: "{{count}} жылдан астам",
pluralGenitive: "{{count}} жылдан астам",
},
future: {
singularNominative: "{{count}} жылдан астам",
singularGenitive: "{{count}} жылдан астам",
pluralGenitive: "{{count}} жылдан астам",
},
},
almostXYears: {
regular: {
singularNominative: "{{count}} жылға жақын",
singularGenitive: "{{count}} жылға жақын",
pluralGenitive: "{{count}} жылға жақын",
},
future: {
singularNominative: "{{count}} жылдан кейін",
singularGenitive: "{{count}} жылдан кейін",
pluralGenitive: "{{count}} жылдан кейін",
},
},
};
function declension(scheme, count) {
// scheme for count=1 exists
if (scheme.one && count === 1) return scheme.one;
const rem10 = count % 10;
const rem100 = count % 100;
// 1, 21, 31, ...
if (rem10 === 1 && rem100 !== 11) {
return scheme.singularNominative.replace("{{count}}", String(count));
// 2, 3, 4, 22, 23, 24, 32 ...
} else if (rem10 >= 2 && rem10 <= 4 && (rem100 < 10 || rem100 > 20)) {
return scheme.singularGenitive.replace("{{count}}", String(count));
// 5, 6, 7, 8, 9, 10, 11, ...
} else {
return scheme.pluralGenitive.replace("{{count}}", String(count));
}
}
export const formatDistance = (token, count, options) => {
const tokenValue = formatDistanceLocale[token];
if (typeof tokenValue === "function") return tokenValue(options);
if (tokenValue.type === "weeks") {
return count === 1
? tokenValue.one
: tokenValue.other.replace("{{count}}", String(count));
}
if (options?.addSuffix) {
if (options.comparison && options.comparison > 0) {
if (tokenValue.future) {
return declension(tokenValue.future, count);
} else {
return declension(tokenValue.regular, count) + " кейін";
}
} else {
if (tokenValue.past) {
return declension(tokenValue.past, count);
} else {
return declension(tokenValue.regular, count) + " бұрын";
}
}
} else {
return declension(tokenValue.regular, count);
}
};
@@ -0,0 +1,53 @@
import type { ParsedUrlQueryInput } from 'node:querystring';
import type { UrlObject } from 'url';
import type { Locale } from 'use-intl';
import type { ResolvedRoutingConfig } from '../../routing/config.js';
import type { DomainsConfig, LocalePrefixMode, Locales, Pathnames } from '../../routing/types.js';
import type StrictParams from './StrictParams.js';
type SearchParamValue = ParsedUrlQueryInput[keyof ParsedUrlQueryInput];
type HrefOrHrefWithParamsImpl<Pathname, Other> = Pathname extends `${string}[[...${string}` ? Pathname | ({
pathname: Pathname;
params?: StrictParams<Pathname>;
} & Other) : Pathname extends `${string}[${string}` ? // Required catch-all & regular params
{
pathname: Pathname;
params: StrictParams<Pathname>;
} & Other : // No params
Pathname | ({
pathname: Pathname;
} & Other);
export type HrefOrUrlObjectWithParams<Pathname> = HrefOrHrefWithParamsImpl<Pathname, Omit<UrlObject, 'pathname'>>;
export type QueryParams = Record<string, SearchParamValue>;
export type HrefOrHrefWithParams<Pathname> = HrefOrHrefWithParamsImpl<Pathname, {
query?: QueryParams;
}>;
export declare function normalizeNameOrNameWithParams<Pathname>(href: HrefOrHrefWithParams<Pathname> | {
locale: Locale;
href: HrefOrHrefWithParams<Pathname>;
}): {
pathname: Pathname;
params?: StrictParams<Pathname>;
};
export declare function serializeSearchParams(searchParams: Record<string, SearchParamValue>): string;
type StrictUrlObject<Pathname> = Omit<UrlObject, 'pathname'> & {
pathname: Pathname;
};
export declare function compileLocalizedPathname<AppLocales extends Locales, Pathname>(opts: {
locale: AppLocales[number];
pathname: Pathname;
params?: StrictParams<Pathname>;
pathnames: Pathnames<AppLocales>;
query?: Record<string, SearchParamValue>;
}): string;
export declare function compileLocalizedPathname<AppLocales extends Locales, Pathname>(opts: {
locale: AppLocales[number];
pathname: StrictUrlObject<Pathname>;
params?: StrictParams<Pathname>;
pathnames: Pathnames<AppLocales>;
query?: Record<string, SearchParamValue>;
}): UrlObject;
export declare function getRoute<AppLocales extends Locales>(locale: AppLocales[number], pathname: string, pathnames: Pathnames<AppLocales>): keyof Pathnames<AppLocales>;
export declare function getBasePath(pathname: string, windowPathname?: string): string;
export declare function applyPathnamePrefix<AppLocales extends Locales, AppLocalePrefixMode extends LocalePrefixMode, AppPathnames extends Pathnames<AppLocales> | undefined, AppDomains extends DomainsConfig<AppLocales> | undefined>(pathname: string, locale: Locales[number], routing: Pick<ResolvedRoutingConfig<AppLocales, AppLocalePrefixMode, AppPathnames, AppDomains>, 'localePrefix' | 'domains'> & Partial<Pick<ResolvedRoutingConfig<AppLocales, AppLocalePrefixMode, AppPathnames, AppDomains>, 'defaultLocale'>>, force?: boolean): string;
export declare function validateReceivedConfig<AppLocales extends Locales, AppLocalePrefixMode extends LocalePrefixMode, AppPathnames extends Pathnames<AppLocales> | undefined, AppDomains extends DomainsConfig<AppLocales> | undefined>(config: Partial<Pick<ResolvedRoutingConfig<AppLocales, AppLocalePrefixMode, AppPathnames, AppDomains>, 'defaultLocale' | 'localePrefix'>>): void;
export {};
@@ -0,0 +1 @@
{"version":3,"file":"file-audio-2.js","sources":["../../../src/icons/file-audio-2.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name FileAudio2\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNCAyMmgxNGEyIDIgMCAwIDAgMi0yVjdsLTUtNUg2YTIgMiAwIDAgMC0yIDJ2MiIgLz4KICA8cGF0aCBkPSJNMTQgMnY0YTIgMiAwIDAgMCAyIDJoNCIgLz4KICA8Y2lyY2xlIGN4PSIzIiBjeT0iMTciIHI9IjEiIC8+CiAgPHBhdGggZD0iTTIgMTd2LTNhNCA0IDAgMCAxIDggMHYzIiAvPgogIDxjaXJjbGUgY3g9IjkiIGN5PSIxNyIgcj0iMSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/file-audio-2\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 FileAudio2 = createLucideIcon('FileAudio2', [\n ['path', { d: 'M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v2', key: '17k7jt' }],\n ['path', { d: 'M14 2v4a2 2 0 0 0 2 2h4', key: 'tnqrlb' }],\n ['circle', { cx: '3', cy: '17', r: '1', key: 'vo6nti' }],\n ['path', { d: 'M2 17v-3a4 4 0 0 1 8 0v3', key: '1ggdre' }],\n ['circle', { cx: '9', cy: '17', r: '1', key: 'bc1fq4' }],\n]);\n\nexport default FileAudio2;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAa,iBAAiB,YAAc,CAAA,CAAA,CAAA;AAAA,CAAA,CAChD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAmD,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,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAChF,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA2B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CACxD,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,EAAK,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,CACvD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA4B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CACzD,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,EAAK,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;AACzD,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,36 @@
import { entityKind } from "../../entity.js";
import { getColumnNameAndConfig } from "../../utils.js";
import { PgColumn, PgColumnBuilder } from "./common.js";
class PgVarcharBuilder extends PgColumnBuilder {
static [entityKind] = "PgVarcharBuilder";
constructor(name, config) {
super(name, "string", "PgVarchar");
this.config.length = config.length;
this.config.enumValues = config.enum;
}
/** @internal */
build(table) {
return new PgVarchar(
table,
this.config
);
}
}
class PgVarchar extends PgColumn {
static [entityKind] = "PgVarchar";
length = this.config.length;
enumValues = this.config.enumValues;
getSQLType() {
return this.length === void 0 ? `varchar` : `varchar(${this.length})`;
}
}
function varchar(a, b = {}) {
const { name, config } = getColumnNameAndConfig(a, b);
return new PgVarcharBuilder(name, config);
}
export {
PgVarchar,
PgVarcharBuilder,
varchar
};
//# sourceMappingURL=varchar.js.map
@@ -0,0 +1,36 @@
import type { ContextOptions, DateArg } from "./types.js";
/**
* The {@link addYears} function options.
*/
export interface AddYearsOptions<DateType extends Date = Date>
extends ContextOptions<DateType> {}
/**
* @name addYears
* @category Year Helpers
* @summary Add the specified number of years to the given date.
*
* @description
* Add the specified number of years to the given date.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
* @typeParam ResultDate - The result `Date` type.
*
* @param date - The date to be changed
* @param amount - The amount of years to be added.
* @param options - The options
*
* @returns The new date with the years added
*
* @example
* // Add 5 years to 1 September 2014:
* const result = addYears(new Date(2014, 8, 1), 5)
* //=> Sun Sep 01 2019 00:00:00
*/
export declare function addYears<
DateType extends Date,
ResultDate extends Date = DateType,
>(
date: DateArg<DateType>,
amount: number,
options?: AddYearsOptions<ResultDate> | undefined,
): ResultDate;
@@ -0,0 +1,235 @@
(function (Prism) {
// $ set | grep '^[A-Z][^[:space:]]*=' | cut -d= -f1 | tr '\n' '|'
// + LC_ALL, RANDOM, REPLY, SECONDS.
// + make sure PS1..4 are here as they are not always set,
// - some useless things.
var envVars = '\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b';
var commandAfterHeredoc = {
pattern: /(^(["']?)\w+\2)[ \t]+\S.*/,
lookbehind: true,
alias: 'punctuation', // this looks reasonably well in all themes
inside: null // see below
};
var insideString = {
'bash': commandAfterHeredoc,
'environment': {
pattern: RegExp('\\$' + envVars),
alias: 'constant'
},
'variable': [
// [0]: Arithmetic Environment
{
pattern: /\$?\(\([\s\S]+?\)\)/,
greedy: true,
inside: {
// If there is a $ sign at the beginning highlight $(( and )) as variable
'variable': [
{
pattern: /(^\$\(\([\s\S]+)\)\)/,
lookbehind: true
},
/^\$\(\(/
],
'number': /\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,
// Operators according to https://www.gnu.org/software/bash/manual/bashref.html#Shell-Arithmetic
'operator': /--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,
// If there is no $ sign at the beginning highlight (( and )) as punctuation
'punctuation': /\(\(?|\)\)?|,|;/
}
},
// [1]: Command Substitution
{
pattern: /\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,
greedy: true,
inside: {
'variable': /^\$\(|^`|\)$|`$/
}
},
// [2]: Brace expansion
{
pattern: /\$\{[^}]+\}/,
greedy: true,
inside: {
'operator': /:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,
'punctuation': /[\[\]]/,
'environment': {
pattern: RegExp('(\\{)' + envVars),
lookbehind: true,
alias: 'constant'
}
}
},
/\$(?:\w+|[#?*!@$])/
],
// Escape sequences from echo and printf's manuals, and escaped quotes.
'entity': /\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/
};
Prism.languages.bash = {
'shebang': {
pattern: /^#!\s*\/.*/,
alias: 'important'
},
'comment': {
pattern: /(^|[^"{\\$])#.*/,
lookbehind: true
},
'function-name': [
// a) function foo {
// b) foo() {
// c) function foo() {
// but not “foo {”
{
// a) and c)
pattern: /(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,
lookbehind: true,
alias: 'function'
},
{
// b)
pattern: /\b[\w-]+(?=\s*\(\s*\)\s*\{)/,
alias: 'function'
}
],
// Highlight variable names as variables in for and select beginnings.
'for-or-select': {
pattern: /(\b(?:for|select)\s+)\w+(?=\s+in\s)/,
alias: 'variable',
lookbehind: true
},
// Highlight variable names as variables in the left-hand part
// of assignments (“=” and “+=”).
'assign-left': {
pattern: /(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,
inside: {
'environment': {
pattern: RegExp('(^|[\\s;|&]|[<>]\\()' + envVars),
lookbehind: true,
alias: 'constant'
}
},
alias: 'variable',
lookbehind: true
},
// Highlight parameter names as variables
'parameter': {
pattern: /(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,
alias: 'variable',
lookbehind: true
},
'string': [
// Support for Here-documents https://en.wikipedia.org/wiki/Here_document
{
pattern: /((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,
lookbehind: true,
greedy: true,
inside: insideString
},
// Here-document with quotes around the tag
// → No expansion (so no “inside”).
{
pattern: /((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,
lookbehind: true,
greedy: true,
inside: {
'bash': commandAfterHeredoc
}
},
// “Normal” string
{
// https://www.gnu.org/software/bash/manual/html_node/Double-Quotes.html
pattern: /(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,
lookbehind: true,
greedy: true,
inside: insideString
},
{
// https://www.gnu.org/software/bash/manual/html_node/Single-Quotes.html
pattern: /(^|[^$\\])'[^']*'/,
lookbehind: true,
greedy: true
},
{
// https://www.gnu.org/software/bash/manual/html_node/ANSI_002dC-Quoting.html
pattern: /\$'(?:[^'\\]|\\[\s\S])*'/,
greedy: true,
inside: {
'entity': insideString.entity
}
}
],
'environment': {
pattern: RegExp('\\$?' + envVars),
alias: 'constant'
},
'variable': insideString.variable,
'function': {
pattern: /(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,
lookbehind: true
},
'keyword': {
pattern: /(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,
lookbehind: true
},
// https://www.gnu.org/software/bash/manual/html_node/Shell-Builtin-Commands.html
'builtin': {
pattern: /(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,
lookbehind: true,
// Alias added to make those easier to distinguish from strings.
alias: 'class-name'
},
'boolean': {
pattern: /(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,
lookbehind: true
},
'file-descriptor': {
pattern: /\B&\d\b/,
alias: 'important'
},
'operator': {
// Lots of redirections here, but not just that.
pattern: /\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,
inside: {
'file-descriptor': {
pattern: /^\d/,
alias: 'important'
}
}
},
'punctuation': /\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,
'number': {
pattern: /(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,
lookbehind: true
}
};
commandAfterHeredoc.inside = Prism.languages.bash;
/* Patterns in command substitution. */
var toBeCopied = [
'comment',
'function-name',
'for-or-select',
'assign-left',
'parameter',
'string',
'environment',
'function',
'keyword',
'builtin',
'boolean',
'file-descriptor',
'operator',
'punctuation',
'number'
];
var inside = insideString.variable[1].inside;
for (var i = 0; i < toBeCopied.length; i++) {
inside[toBeCopied[i]] = Prism.languages.bash[toBeCopied[i]];
}
Prism.languages.sh = Prism.languages.bash;
Prism.languages.shell = Prism.languages.bash;
}(Prism));
@@ -0,0 +1,185 @@
'use client';
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { useModal } from '@faceless-ui/modal';
import { hoistQueryParamsToAnd } from 'payload/shared';
import React, { useCallback, useEffect, useState } from 'react';
import { useDocumentDrawer } from '../../elements/DocumentDrawer/index.js';
import { useEffectEvent } from '../../hooks/useEffectEvent.js';
import { useConfig } from '../../providers/Config/index.js';
import { useServerFunctions } from '../../providers/ServerFunctions/index.js';
import { ListDrawerContextProvider } from '../ListDrawer/Provider.js';
import { LoadingOverlay } from '../Loading/index.js';
export const ListDrawerContent = ({
allowCreate = true,
collectionSlugs,
disableQueryPresets,
drawerSlug,
enableRowSelections,
filterOptions,
onBulkSelect,
onSelect,
overrideEntityVisibility = true,
selectedCollection: collectionSlugFromProps
}) => {
const {
closeModal,
isModalOpen
} = useModal();
const {
serverFunction
} = useServerFunctions();
const [ListView, setListView] = useState(undefined);
const [isLoading, setIsLoading] = useState(true);
const {
config: {
collections
},
getEntityConfig
} = useConfig();
const isOpen = isModalOpen(drawerSlug);
const enabledCollections = collections.filter(({
slug
}) => {
return collectionSlugs.includes(slug);
});
const [selectedOption, setSelectedOption] = useState(() => {
const initialSelection = collectionSlugFromProps || enabledCollections[0]?.slug;
const found = getEntityConfig({
collectionSlug: initialSelection
});
return found ? {
label: found.labels,
value: found.slug
} : undefined;
});
const [DocumentDrawer, DocumentDrawerToggler, {
drawerSlug: documentDrawerSlug
}] = useDocumentDrawer({
collectionSlug: selectedOption.value
});
const updateSelectedOption = useEffectEvent(collectionSlug => {
if (collectionSlug && collectionSlug !== selectedOption?.value) {
setSelectedOption({
label: getEntityConfig({
collectionSlug
})?.labels,
value: collectionSlug
});
}
});
useEffect(() => {
updateSelectedOption(collectionSlugFromProps);
}, [collectionSlugFromProps]);
/**
* This performs a full server round trip to get the list view for the selected collection.
* On the server, the data is freshly queried for the list view and all components are fully rendered.
* This work includes building column state, rendering custom components, etc.
*/
const refresh = useCallback(async ({
slug: slug_0,
query
}) => {
try {
const newQuery = {
...(query || {}),
where: {
...(query?.where || {})
}
};
const filterOption = filterOptions?.[slug_0];
if (filterOptions && typeof filterOption !== 'boolean') {
newQuery.where = hoistQueryParamsToAnd(newQuery.where, filterOption);
}
if (slug_0) {
const result = await serverFunction({
name: 'render-list',
args: {
collectionSlug: slug_0,
disableBulkDelete: true,
disableBulkEdit: true,
disableQueryPresets,
drawerSlug,
enableRowSelections,
overrideEntityVisibility,
query: newQuery
}
});
setListView(result?.List || null);
} else {
setListView(null);
}
setIsLoading(false);
} catch (_err) {
console.error('Error rendering List View: ', _err); // eslint-disable-line no-console
if (isOpen) {
closeModal(drawerSlug);
}
}
}, [serverFunction, closeModal, drawerSlug, isOpen, enableRowSelections, filterOptions, overrideEntityVisibility, disableQueryPresets]);
useEffect(() => {
if (!ListView) {
void refresh({
slug: selectedOption?.value
});
}
}, [refresh, ListView, selectedOption.value]);
const onCreateNew = useCallback(({
doc
}) => {
if (typeof onSelect === 'function') {
onSelect({
collectionSlug: selectedOption?.value,
doc,
docID: doc.id
});
}
closeModal(documentDrawerSlug);
closeModal(drawerSlug);
}, [closeModal, documentDrawerSlug, drawerSlug, onSelect, selectedOption.value]);
const onQueryChange = useCallback(query_0 => {
void refresh({
slug: selectedOption?.value,
query: query_0
});
}, [refresh, selectedOption.value]);
const setMySelectedOption = useCallback(incomingSelection => {
setSelectedOption(incomingSelection);
void refresh({
slug: incomingSelection?.value
});
}, [refresh]);
const refreshSelf = useCallback(async incomingCollectionSlug => {
if (incomingCollectionSlug) {
setSelectedOption({
label: getEntityConfig({
collectionSlug: incomingCollectionSlug
})?.labels,
value: incomingCollectionSlug
});
}
await refresh({
slug: selectedOption.value || incomingCollectionSlug
});
}, [getEntityConfig, refresh, selectedOption.value]);
if (isLoading) {
return /*#__PURE__*/_jsx(LoadingOverlay, {});
}
return /*#__PURE__*/_jsxs(ListDrawerContextProvider, {
allowCreate: allowCreate,
createNewDrawerSlug: documentDrawerSlug,
DocumentDrawerToggler: DocumentDrawerToggler,
drawerSlug: drawerSlug,
enabledCollections: collectionSlugs,
onBulkSelect: onBulkSelect,
onQueryChange: onQueryChange,
onSelect: onSelect,
refresh: refreshSelf,
selectedOption: selectedOption,
setSelectedOption: setMySelectedOption,
children: [ListView, /*#__PURE__*/_jsx(DocumentDrawer, {
onSave: onCreateNew
})]
});
};
//# sourceMappingURL=DrawerContent.js.map
@@ -0,0 +1 @@
{"version":3,"file":"APIKey.d.ts","sourceRoot":"","sources":["../../../../src/views/Edit/Auth/APIKey.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAuC,MAAM,OAAO,CAAA;AAiB3D,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,CA6HvF,CAAA"}
@@ -0,0 +1 @@
{"version":3,"sources":["../../src/auth/getAccessResults.ts"],"sourcesContent":["import type { AllOperations, PayloadRequest } from '../types/index.js'\nimport type { Permissions, SanitizedPermissions } from './types.js'\n\nimport { getEntityPermissions } from '../utilities/getEntityPermissions/getEntityPermissions.js'\nimport { sanitizePermissions } from '../utilities/sanitizePermissions.js'\n\ntype GetAccessResultsArgs = {\n req: PayloadRequest\n}\nexport async function getAccessResults({\n req,\n}: GetAccessResultsArgs): Promise<SanitizedPermissions> {\n const results = {\n collections: {},\n globals: {},\n } as Permissions\n const { payload, user } = req\n\n const isLoggedIn = !!user\n const userCollectionConfig =\n user && user.collection ? payload?.collections?.[user.collection]?.config : null\n\n if (userCollectionConfig && payload.config.admin.user === user?.collection) {\n results.canAccessAdmin = userCollectionConfig.access.admin\n ? await userCollectionConfig.access.admin({ req })\n : isLoggedIn\n } else {\n results.canAccessAdmin = false\n }\n const blockReferencesPermissions = {}\n\n await Promise.all(\n payload.config.collections.map(async (collection) => {\n const collectionOperations: AllOperations[] = ['create', 'read', 'update', 'delete']\n\n if (\n collection.auth &&\n typeof collection.auth.maxLoginAttempts !== 'undefined' &&\n collection.auth.maxLoginAttempts !== 0\n ) {\n collectionOperations.push('unlock')\n }\n\n if (collection.versions) {\n collectionOperations.push('readVersions')\n }\n\n const collectionPermissions = await getEntityPermissions({\n blockReferencesPermissions,\n entity: collection,\n entityType: 'collection',\n fetchData: false,\n operations: collectionOperations,\n req,\n })\n results.collections![collection.slug] = collectionPermissions\n }),\n )\n\n await Promise.all(\n payload.config.globals.map(async (global) => {\n const globalOperations: AllOperations[] = ['read', 'update']\n\n if (global.versions) {\n globalOperations.push('readVersions')\n }\n\n const globalPermissions = await getEntityPermissions({\n blockReferencesPermissions,\n entity: global,\n entityType: 'global',\n fetchData: false,\n operations: globalOperations,\n req,\n })\n results.globals![global.slug] = globalPermissions\n }),\n )\n\n return sanitizePermissions(results)\n}\n"],"names":["getEntityPermissions","sanitizePermissions","getAccessResults","req","results","collections","globals","payload","user","isLoggedIn","userCollectionConfig","collection","config","admin","canAccessAdmin","access","blockReferencesPermissions","Promise","all","map","collectionOperations","auth","maxLoginAttempts","push","versions","collectionPermissions","entity","entityType","fetchData","operations","slug","global","globalOperations","globalPermissions"],"mappings":"AAGA,SAASA,oBAAoB,QAAQ,4DAA2D;AAChG,SAASC,mBAAmB,QAAQ,sCAAqC;AAKzE,OAAO,eAAeC,iBAAiB,EACrCC,GAAG,EACkB;IACrB,MAAMC,UAAU;QACdC,aAAa,CAAC;QACdC,SAAS,CAAC;IACZ;IACA,MAAM,EAAEC,OAAO,EAAEC,IAAI,EAAE,GAAGL;IAE1B,MAAMM,aAAa,CAAC,CAACD;IACrB,MAAME,uBACJF,QAAQA,KAAKG,UAAU,GAAGJ,SAASF,aAAa,CAACG,KAAKG,UAAU,CAAC,EAAEC,SAAS;IAE9E,IAAIF,wBAAwBH,QAAQK,MAAM,CAACC,KAAK,CAACL,IAAI,KAAKA,MAAMG,YAAY;QAC1EP,QAAQU,cAAc,GAAGJ,qBAAqBK,MAAM,CAACF,KAAK,GACtD,MAAMH,qBAAqBK,MAAM,CAACF,KAAK,CAAC;YAAEV;QAAI,KAC9CM;IACN,OAAO;QACLL,QAAQU,cAAc,GAAG;IAC3B;IACA,MAAME,6BAA6B,CAAC;IAEpC,MAAMC,QAAQC,GAAG,CACfX,QAAQK,MAAM,CAACP,WAAW,CAACc,GAAG,CAAC,OAAOR;QACpC,MAAMS,uBAAwC;YAAC;YAAU;YAAQ;YAAU;SAAS;QAEpF,IACET,WAAWU,IAAI,IACf,OAAOV,WAAWU,IAAI,CAACC,gBAAgB,KAAK,eAC5CX,WAAWU,IAAI,CAACC,gBAAgB,KAAK,GACrC;YACAF,qBAAqBG,IAAI,CAAC;QAC5B;QAEA,IAAIZ,WAAWa,QAAQ,EAAE;YACvBJ,qBAAqBG,IAAI,CAAC;QAC5B;QAEA,MAAME,wBAAwB,MAAMzB,qBAAqB;YACvDgB;YACAU,QAAQf;YACRgB,YAAY;YACZC,WAAW;YACXC,YAAYT;YACZjB;QACF;QACAC,QAAQC,WAAW,AAAC,CAACM,WAAWmB,IAAI,CAAC,GAAGL;IAC1C;IAGF,MAAMR,QAAQC,GAAG,CACfX,QAAQK,MAAM,CAACN,OAAO,CAACa,GAAG,CAAC,OAAOY;QAChC,MAAMC,mBAAoC;YAAC;YAAQ;SAAS;QAE5D,IAAID,OAAOP,QAAQ,EAAE;YACnBQ,iBAAiBT,IAAI,CAAC;QACxB;QAEA,MAAMU,oBAAoB,MAAMjC,qBAAqB;YACnDgB;YACAU,QAAQK;YACRJ,YAAY;YACZC,WAAW;YACXC,YAAYG;YACZ7B;QACF;QACAC,QAAQE,OAAO,AAAC,CAACyB,OAAOD,IAAI,CAAC,GAAGG;IAClC;IAGF,OAAOhC,oBAAoBG;AAC7B"}
@@ -0,0 +1 @@
{"version":3,"file":"lock-keyhole.js","sources":["../../../src/icons/lock-keyhole.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name LockKeyhole\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjE2IiByPSIxIiAvPgogIDxyZWN0IHg9IjMiIHk9IjEwIiB3aWR0aD0iMTgiIGhlaWdodD0iMTIiIHJ4PSIyIiAvPgogIDxwYXRoIGQ9Ik03IDEwVjdhNSA1IDAgMCAxIDEwIDB2MyIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/lock-keyhole\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 LockKeyhole = createLucideIcon('LockKeyhole', [\n ['circle', { cx: '12', cy: '16', r: '1', key: '1au0dj' }],\n ['rect', { x: '3', y: '10', width: '18', height: '12', rx: '2', key: '6s8ecr' }],\n ['path', { d: 'M7 10V7a5 5 0 0 1 10 0v3', key: '1pqi11' }],\n]);\n\nexport default LockKeyhole;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAc,iBAAiB,aAAe,CAAA,CAAA,CAAA;AAAA,CAClD,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,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAG,KAAK,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,QAAQ,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC/E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA4B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3D,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,273 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const { ConcatSource } = require("webpack-sources");
const { HotUpdateChunk, RuntimeGlobals } = require("..");
const { JAVASCRIPT_TYPE } = require("../ModuleSourceTypeConstants");
const Template = require("../Template");
const {
createChunkHashHandler,
getChunkInfo
} = require("../javascript/ChunkFormatHelpers");
const { getAllChunks } = require("../javascript/ChunkHelpers");
const {
chunkHasJs,
getChunkFilenameTemplate,
getCompilationHooks
} = require("../javascript/JavascriptModulesPlugin");
const { getUndoPath } = require("../util/identifier");
/** @typedef {import("webpack-sources").Source} Source */
/** @typedef {import("../Chunk")} Chunk */
/** @typedef {import("../ChunkGraph")} ChunkGraph */
/** @typedef {import("../Compilation")} Compilation */
/** @typedef {import("../Compiler")} Compiler */
/** @typedef {import("../Entrypoint")} Entrypoint */
/**
* @param {Compilation} compilation the compilation instance
* @param {Chunk} chunk the chunk
* @param {Chunk} runtimeChunk the runtime chunk
* @returns {string} the relative path
*/
const getRelativePath = (compilation, chunk, runtimeChunk) => {
const currentOutputName = compilation
.getPath(
getChunkFilenameTemplate(runtimeChunk, compilation.outputOptions),
{
chunk: runtimeChunk,
contentHashType: "javascript"
}
)
.replace(/^\/+/g, "")
.split("/");
const baseOutputName = [...currentOutputName];
const chunkOutputName = compilation
.getPath(getChunkFilenameTemplate(chunk, compilation.outputOptions), {
chunk,
contentHashType: "javascript"
})
.replace(/^\/+/g, "")
.split("/");
// remove common parts except filename
while (
baseOutputName.length > 1 &&
chunkOutputName.length > 1 &&
baseOutputName[0] === chunkOutputName[0]
) {
baseOutputName.shift();
chunkOutputName.shift();
}
const last = chunkOutputName.join("/");
// create final path
return getUndoPath(baseOutputName.join("/"), last, true) + last;
};
/**
* @param {Compilation} compilation the compilation instance
* @param {Chunk} chunk the chunk to render the import for
* @param {string=} namedImport the named import to use for the import
* @param {Chunk=} runtimeChunk the runtime chunk
* @returns {string} the import source
*/
function renderChunkImport(compilation, chunk, namedImport, runtimeChunk) {
return `import ${namedImport ? `* as ${namedImport}` : `{ ${RuntimeGlobals.require} }`} from ${JSON.stringify(
getRelativePath(compilation, chunk, runtimeChunk || chunk)
)};\n`;
}
/**
* @param {number} index the index of the chunk
* @returns {string} the named import to use for the import
*/
function getChunkNamedImport(index) {
return `__webpack_chunk_${index}__`;
}
const PLUGIN_NAME = "ModuleChunkFormatPlugin";
class ModuleChunkFormatPlugin {
/**
* Apply the plugin
* @param {Compiler} compiler the compiler instance
* @returns {void}
*/
apply(compiler) {
compiler.hooks.thisCompilation.tap(PLUGIN_NAME, (compilation) => {
compilation.hooks.additionalChunkRuntimeRequirements.tap(
PLUGIN_NAME,
(chunk, set) => {
if (chunk.hasRuntime()) return;
if (compilation.chunkGraph.getNumberOfEntryModules(chunk) > 0) {
set.add(RuntimeGlobals.require);
set.add(RuntimeGlobals.externalInstallChunk);
}
}
);
const hooks = getCompilationHooks(compilation);
/**
* @param {Iterable<Chunk>} chunks the chunks to render
* @param {ChunkGraph} chunkGraph the chunk graph
* @param {Chunk=} runtimeChunk the runtime chunk
* @returns {Source | undefined} the source
*/
const withDependentChunks = (chunks, chunkGraph, runtimeChunk) => {
if (/** @type {Set<Chunk>} */ (chunks).size > 0) {
const source = new ConcatSource();
let index = 0;
for (const chunk of chunks) {
index++;
if (!chunkHasJs(chunk, chunkGraph)) {
continue;
}
const namedImport = getChunkNamedImport(index);
source.add(
renderChunkImport(
compilation,
chunk,
namedImport,
runtimeChunk || chunk
)
);
source.add(
`${RuntimeGlobals.externalInstallChunk}(${namedImport});\n`
);
}
return source;
}
};
hooks.renderStartup.tap(
PLUGIN_NAME,
(modules, _lastModule, renderContext) => {
const { chunk, chunkGraph } = renderContext;
if (
chunkGraph.getNumberOfEntryModules(chunk) > 0 &&
chunk.hasRuntime()
) {
const entryDependentChunks =
chunkGraph.getChunkEntryDependentChunksIterable(chunk);
const sourceWithDependentChunks = withDependentChunks(
entryDependentChunks,
chunkGraph,
chunk
);
if (!sourceWithDependentChunks) {
return modules;
}
if (modules.size() === 0) {
return sourceWithDependentChunks;
}
const source = new ConcatSource();
source.add(sourceWithDependentChunks);
source.add("\n");
source.add(modules);
return source;
}
return modules;
}
);
hooks.renderChunk.tap(PLUGIN_NAME, (modules, renderContext) => {
const { chunk, chunkGraph, runtimeTemplate } = renderContext;
const hotUpdateChunk = chunk instanceof HotUpdateChunk ? chunk : null;
const source = new ConcatSource();
source.add(
`export const ${RuntimeGlobals.esmId} = ${JSON.stringify(chunk.id)};\n`
);
source.add(
`export const ${RuntimeGlobals.esmIds} = ${JSON.stringify(chunk.ids)};\n`
);
source.add(`export const ${RuntimeGlobals.esmModules} = `);
source.add(modules);
source.add(";\n");
const runtimeModules = chunkGraph.getChunkRuntimeModulesInOrder(chunk);
if (runtimeModules.length > 0) {
source.add(`export const ${RuntimeGlobals.esmRuntime} =\n`);
source.add(
Template.renderChunkRuntimeModules(runtimeModules, renderContext)
);
}
if (hotUpdateChunk) {
return source;
}
const { entries, runtimeChunk } = getChunkInfo(chunk, chunkGraph);
if (runtimeChunk) {
const entrySource = new ConcatSource();
entrySource.add(source);
entrySource.add(";\n\n// load runtime\n");
entrySource.add(
renderChunkImport(compilation, runtimeChunk, "", chunk)
);
const startupSource = new ConcatSource();
startupSource.add(
`var __webpack_exec__ = ${runtimeTemplate.returningFunction(
`${RuntimeGlobals.require}(${RuntimeGlobals.entryModuleId} = moduleId)`,
"moduleId"
)}\n`
);
/** @type {Set<Chunk>} */
const loadedChunks = new Set();
for (let i = 0; i < entries.length; i++) {
const [module, entrypoint] = entries[i];
if (!chunkGraph.getModuleSourceTypes(module).has(JAVASCRIPT_TYPE)) {
continue;
}
const final = i + 1 === entries.length;
const moduleId = chunkGraph.getModuleId(module);
const chunks = getAllChunks(
/** @type {Entrypoint} */ (entrypoint),
/** @type {Chunk} */ (runtimeChunk),
undefined
);
/** @type {Set<Chunk>} */
const processChunks = new Set();
for (const chunk of chunks) {
if (loadedChunks.has(chunk)) {
continue;
}
loadedChunks.add(chunk);
processChunks.add(chunk);
}
const sourceWithDependentChunks = withDependentChunks(
processChunks,
chunkGraph,
chunk
);
if (sourceWithDependentChunks) {
startupSource.add("\n");
startupSource.add(sourceWithDependentChunks);
}
startupSource.add(
`${
final ? `var ${RuntimeGlobals.exports} = ` : ""
}__webpack_exec__(${JSON.stringify(moduleId)});\n`
);
}
entrySource.add(
hooks.renderStartup.call(
startupSource,
entries[entries.length - 1][0],
{
...renderContext,
inlined: false
}
)
);
return entrySource;
}
return source;
});
hooks.chunkHash.tap(PLUGIN_NAME, createChunkHashHandler(PLUGIN_NAME));
});
}
}
module.exports = ModuleChunkFormatPlugin;
@@ -0,0 +1 @@
{"version":3,"file":"logout.d.ts","sourceRoot":"","sources":["../../../src/auth/operations/logout.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAQ1D,MAAM,MAAM,SAAS,GAAG;IACtB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,UAAU,EAAE,UAAU,CAAA;IACtB,GAAG,EAAE,cAAc,CAAA;CACpB,CAAA;AAED,eAAO,MAAM,eAAe,iBAAwB,SAAS,KAAG,OAAO,CAAC,OAAO,CAqF9E,CAAA"}
@@ -0,0 +1,16 @@
export interface KitConfig {
out: string;
schema: string;
}
export interface MigrationConfig {
migrationsFolder: string;
migrationsTable?: string;
migrationsSchema?: string;
}
export interface MigrationMeta {
sql: string[];
folderMillis: number;
hash: string;
bps: boolean;
}
export declare function readMigrationFiles(config: MigrationConfig): MigrationMeta[];
@@ -0,0 +1,9 @@
// This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
import { previousTuesday as fn } from "../previousTuesday.js";
import { convertToFP } from "./_lib/convertToFP.js";
export const previousTuesday = convertToFP(fn, 1);
// Fallback for modularized imports:
export default previousTuesday;
@@ -0,0 +1,44 @@
import { DirectusUser } from "./user.cjs";
import { MergeCoreCollection } from "../types/schema.cjs";
//#region src/schema/deployment.d.ts
/**
* Directus Deployment configuration
*/
type DirectusDeployment<Schema = any> = MergeCoreCollection<Schema, 'directus_deployments', {
id: string;
provider: string;
credentials: Record<string, any>;
options: Record<string, any> | null;
date_created: 'datetime' | null;
user_created: DirectusUser<Schema> | string | null;
projects: DirectusDeploymentProject<Schema>[] | string[];
}>;
/**
* Directus Deployment Project
*/
type DirectusDeploymentProject<Schema = any> = MergeCoreCollection<Schema, 'directus_deployment_projects', {
id: string;
deployment: DirectusDeployment<Schema> | string;
external_id: string;
name: string;
date_created: 'datetime' | null;
user_created: DirectusUser<Schema> | string | null;
}>;
/**
* Directus Deployment Run
*/
type DirectusDeploymentRun<Schema = any> = MergeCoreCollection<Schema, 'directus_deployment_runs', {
id: string;
project: DirectusDeploymentProject<Schema> | string;
external_id: string;
status: 'building' | 'ready' | 'error' | 'canceled';
target: string;
url: string | null;
date_created: 'datetime' | null;
user_created: DirectusUser<Schema> | string | null;
}>;
//#endregion
export { DirectusDeployment, DirectusDeploymentProject, DirectusDeploymentRun };
//# sourceMappingURL=deployment.d.cts.map
@@ -0,0 +1 @@
{"version":3,"file":"auth.js","names":[],"sources":["../../../src/realtime/commands/auth.ts"],"sourcesContent":["export interface EmailAuth {\n\temail: string;\n\tpassword: string;\n\tuid?: string;\n}\nexport interface TokenAuth {\n\taccess_token: string;\n\tuid?: string;\n}\nexport interface RefreshAuth {\n\trefresh_token: string;\n\tuid?: string;\n}\n\nexport function auth(creds: EmailAuth | TokenAuth | RefreshAuth) {\n\treturn JSON.stringify({ ...creds, type: 'auth' });\n}\n"],"mappings":"AAcA,SAAgB,EAAK,EAA4C,CAChE,OAAO,KAAK,UAAU,CAAE,GAAG,EAAO,KAAM,OAAQ,CAAC"}
@@ -0,0 +1,36 @@
'use client';
import { jsx as _jsx } from "react/jsx-runtime";
import React from 'react';
import { useWatchForm } from '../../Form/context.js';
const RowLabel = /*#__PURE__*/React.createContext({
data: {},
path: '',
rowNumber: undefined
});
export const RowLabelProvider = ({
children,
path,
rowNumber
}) => {
const {
getDataByPath,
getSiblingData
} = useWatchForm();
const collapsibleData = getSiblingData(path);
const arrayData = getDataByPath(path);
const data = arrayData || collapsibleData;
const contextValue = React.useMemo(() => ({
data,
path,
rowNumber
}), [data, path, rowNumber]);
return /*#__PURE__*/_jsx(RowLabel, {
value: contextValue,
children: children
});
};
export const useRowLabel = () => {
return React.use(RowLabel);
};
//# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"E F A B","2":"K D 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":"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 aB I ZC aC OC 1C 2C 3C 4C 5C"},D:{"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 JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I ZC aC OC"},E:{"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 qC rC sC HD tC uC vC wC ID"},F:{"1":"F B C JD KD LD MD PC xC ND QC","16":"0 1 2 3 4 5 6 7 8 9 G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 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"},G:{"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 qC rC sC lD tC uC vC wC"},H:{"16":"mD"},I:{"2":"VC J I nD oD pD qD yC rD sD"},J:{"16":"D A"},K:{"2":"H","16":"A B C PC xC QC"},L:{"16":"I"},M:{"16":"OC"},N:{"16":"A B"},O:{"16":"RC"},P:{"16":"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:{"16":"5D"},S:{"1":"6D 7D"}},B:1,C:"Alternate stylesheet",D:false};
@@ -0,0 +1,43 @@
import { bigint } from "./bigint.js";
import { bigintT } from "./bigintT.js";
import { boolean } from "./boolean.js";
import { bytes } from "./bytes.js";
import { customType } from "./custom.js";
import { dateDuration } from "./date-duration.js";
import { decimal } from "./decimal.js";
import { doublePrecision } from "./double-precision.js";
import { duration } from "./duration.js";
import { integer } from "./integer.js";
import { json } from "./json.js";
import { localDate } from "./localdate.js";
import { localTime } from "./localtime.js";
import { real } from "./real.js";
import { relDuration } from "./relative-duration.js";
import { smallint } from "./smallint.js";
import { text } from "./text.js";
import { timestamp } from "./timestamp.js";
import { timestamptz } from "./timestamptz.js";
import { uuid } from "./uuid.js";
export declare function getGelColumnBuilders(): {
localDate: typeof localDate;
localTime: typeof localTime;
decimal: typeof decimal;
dateDuration: typeof dateDuration;
bigintT: typeof bigintT;
duration: typeof duration;
relDuration: typeof relDuration;
bytes: typeof bytes;
customType: typeof customType;
bigint: typeof bigint;
boolean: typeof boolean;
doublePrecision: typeof doublePrecision;
integer: typeof integer;
json: typeof json;
real: typeof real;
smallint: typeof smallint;
text: typeof text;
timestamptz: typeof timestamptz;
uuid: typeof uuid;
timestamp: typeof timestamp;
};
export type GelColumnsBuilders = ReturnType<typeof getGelColumnBuilders>;
@@ -0,0 +1,11 @@
export interface FontMetric {
baseline: number;
middle: number;
}
export declare class FontMetrics {
private readonly _data;
private readonly _document;
constructor(document: Document);
private parseMetrics;
getMetrics(fontFamily: string, fontSize: string): FontMetric;
}
@@ -0,0 +1 @@
module.exports={C:{"78":0.06712,"108":0.00305,"112":0.00305,"115":0.0061,"125":0.09153,"128":0.0061,"130":0.00915,"137":0.00305,"138":0.00305,"140":0.05187,"141":0.0061,"144":0.02441,"145":0.74139,"146":1.01293,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 109 110 111 113 114 116 117 118 119 120 121 122 123 124 126 127 129 131 132 133 134 135 136 139 142 143 147 148 149 3.5 3.6"},D:{"34":0.00305,"61":0.00305,"67":0.00305,"76":0.0122,"87":0.00305,"103":0.09458,"104":0.00305,"105":0.0061,"107":0.00305,"109":1.84891,"115":0.00305,"116":0.17391,"120":0.03966,"122":0.00305,"123":0.00305,"124":0.11289,"125":0.08848,"126":0.00305,"128":0.14035,"130":0.05492,"131":0.26849,"132":0.00305,"133":0.0061,"134":0.00915,"135":0.0061,"136":0.02441,"137":0.0061,"138":0.02746,"139":0.03966,"140":0.02136,"141":0.04577,"142":8.76552,"143":9.58014,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 62 63 64 65 66 68 69 70 71 72 73 74 75 77 78 79 80 81 83 84 85 86 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 106 108 110 111 112 113 114 117 118 119 121 127 129 144 145 146"},F:{"89":0.09763,"123":0.0122,"124":0.23188,"125":0.08543,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"109":0.00305,"125":0.35087,"141":0.00915,"142":0.58579,"143":1.42787,_:"12 13 14 15 16 17 18 79 80 81 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140"},E:{_:"0 4 5 6 7 8 9 10 11 12 13 14 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 15.1 15.2-15.3 15.4 15.5 16.2 16.3 16.4 17.0 17.2 17.3 18.0 18.1 26.3","11.1":0.00305,"12.1":0.08238,"13.1":0.01831,"14.1":0.00305,"15.6":0.05492,"16.0":0.00305,"16.1":0.00305,"16.5":0.00305,"16.6":0.15255,"17.1":0.07017,"17.4":0.02136,"17.5":0.17391,"17.6":0.13424,"18.2":0.05797,"18.3":0.00915,"18.4":0.00305,"18.5-18.6":0.05187,"26.0":0.56138,"26.1":0.28985,"26.2":0.08238},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00124,"5.0-5.1":0,"6.0-6.1":0.00247,"7.0-7.1":0.00186,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.00495,"10.0-10.2":0.00062,"10.3":0.00866,"11.0-11.2":0.10638,"11.3-11.4":0.00309,"12.0-12.1":0.00247,"12.2-12.5":0.02783,"13.0-13.1":0.00062,"13.2":0.00433,"13.3":0.00124,"13.4-13.7":0.00433,"14.0-14.4":0.00866,"14.5-14.8":0.00928,"15.0-15.1":0.0099,"15.2-15.3":0.00742,"15.4":0.00804,"15.5":0.00866,"15.6-15.8":0.13421,"16.0":0.01546,"16.1":0.02969,"16.2":0.01546,"16.3":0.02783,"16.4":0.0068,"16.5":0.01175,"16.6-16.7":0.17441,"17.0":0.0099,"17.1":0.01608,"17.2":0.01175,"17.3":0.01794,"17.4":0.0303,"17.5":0.05937,"17.6-17.7":0.1373,"18.0":0.03092,"18.1":0.06432,"18.2":0.03402,"18.3":0.1107,"18.4":0.0569,"18.5-18.7":4.08555,"26.0":0.07978,"26.1":0.66361,"26.2":0.12617,"26.3":0.00557},P:{"21":0.01006,"24":0.01006,"28":0.01006,"29":54.2971,_:"4 20 22 23 25 26 27 5.0-5.4 6.2-6.4 7.2-7.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0"},I:{"0":0,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0},A:{_:"6 7 8 9 10 11 5.5"},K:{"0":0,_:"10 11 12 11.1 11.5 12.1"},N:{_:"10 11"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},Q:{_:"14.9"},O:{_:"0"},H:{"0":0},L:{"0":10.40803},R:{_:"0"},M:{"0":0.09729}};
@@ -0,0 +1,65 @@
"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 mediumint_exports = {};
__export(mediumint_exports, {
MySqlMediumInt: () => MySqlMediumInt,
MySqlMediumIntBuilder: () => MySqlMediumIntBuilder,
mediumint: () => mediumint
});
module.exports = __toCommonJS(mediumint_exports);
var import_entity = require("../../entity.cjs");
var import_utils = require("../../utils.cjs");
var import_common = require("./common.cjs");
class MySqlMediumIntBuilder extends import_common.MySqlColumnBuilderWithAutoIncrement {
static [import_entity.entityKind] = "MySqlMediumIntBuilder";
constructor(name, config) {
super(name, "number", "MySqlMediumInt");
this.config.unsigned = config ? config.unsigned : false;
}
/** @internal */
build(table) {
return new MySqlMediumInt(
table,
this.config
);
}
}
class MySqlMediumInt extends import_common.MySqlColumnWithAutoIncrement {
static [import_entity.entityKind] = "MySqlMediumInt";
getSQLType() {
return `mediumint${this.config.unsigned ? " unsigned" : ""}`;
}
mapFromDriverValue(value) {
if (typeof value === "string") {
return Number(value);
}
return value;
}
}
function mediumint(a, b) {
const { name, config } = (0, import_utils.getColumnNameAndConfig)(a, b);
return new MySqlMediumIntBuilder(name, config);
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
MySqlMediumInt,
MySqlMediumIntBuilder,
mediumint
});
//# sourceMappingURL=mediumint.cjs.map
@@ -0,0 +1,248 @@
'use strict'
const { kMockCallHistoryAddLog } = require('./mock-symbols')
const { InvalidArgumentError } = require('../core/errors')
function handleFilterCallsWithOptions (criteria, options, handler, store) {
switch (options.operator) {
case 'OR':
store.push(...handler(criteria))
return store
case 'AND':
return handler.call({ logs: store }, criteria)
default:
// guard -- should never happens because buildAndValidateFilterCallsOptions is called before
throw new InvalidArgumentError('options.operator must to be a case insensitive string equal to \'OR\' or \'AND\'')
}
}
function buildAndValidateFilterCallsOptions (options = {}) {
const finalOptions = {}
if ('operator' in options) {
if (typeof options.operator !== 'string' || (options.operator.toUpperCase() !== 'OR' && options.operator.toUpperCase() !== 'AND')) {
throw new InvalidArgumentError('options.operator must to be a case insensitive string equal to \'OR\' or \'AND\'')
}
return {
...finalOptions,
operator: options.operator.toUpperCase()
}
}
return finalOptions
}
function makeFilterCalls (parameterName) {
return (parameterValue) => {
if (typeof parameterValue === 'string' || parameterValue == null) {
return this.logs.filter((log) => {
return log[parameterName] === parameterValue
})
}
if (parameterValue instanceof RegExp) {
return this.logs.filter((log) => {
return parameterValue.test(log[parameterName])
})
}
throw new InvalidArgumentError(`${parameterName} parameter should be one of string, regexp, undefined or null`)
}
}
function computeUrlWithMaybeSearchParameters (requestInit) {
// path can contains query url parameters
// or query can contains query url parameters
try {
const url = new URL(requestInit.path, requestInit.origin)
// requestInit.path contains query url parameters
// requestInit.query is then undefined
if (url.search.length !== 0) {
return url
}
// requestInit.query can be populated here
url.search = new URLSearchParams(requestInit.query).toString()
return url
} catch (error) {
throw new InvalidArgumentError('An error occurred when computing MockCallHistoryLog.url', { cause: error })
}
}
class MockCallHistoryLog {
constructor (requestInit = {}) {
this.body = requestInit.body
this.headers = requestInit.headers
this.method = requestInit.method
const url = computeUrlWithMaybeSearchParameters(requestInit)
this.fullUrl = url.toString()
this.origin = url.origin
this.path = url.pathname
this.searchParams = Object.fromEntries(url.searchParams)
this.protocol = url.protocol
this.host = url.host
this.port = url.port
this.hash = url.hash
}
toMap () {
return new Map([
['protocol', this.protocol],
['host', this.host],
['port', this.port],
['origin', this.origin],
['path', this.path],
['hash', this.hash],
['searchParams', this.searchParams],
['fullUrl', this.fullUrl],
['method', this.method],
['body', this.body],
['headers', this.headers]]
)
}
toString () {
const options = { betweenKeyValueSeparator: '->', betweenPairSeparator: '|' }
let result = ''
this.toMap().forEach((value, key) => {
if (typeof value === 'string' || value === undefined || value === null) {
result = `${result}${key}${options.betweenKeyValueSeparator}${value}${options.betweenPairSeparator}`
}
if ((typeof value === 'object' && value !== null) || Array.isArray(value)) {
result = `${result}${key}${options.betweenKeyValueSeparator}${JSON.stringify(value)}${options.betweenPairSeparator}`
}
// maybe miss something for non Record / Array headers and searchParams here
})
// delete last betweenPairSeparator
return result.slice(0, -1)
}
}
class MockCallHistory {
logs = []
calls () {
return this.logs
}
firstCall () {
return this.logs.at(0)
}
lastCall () {
return this.logs.at(-1)
}
nthCall (number) {
if (typeof number !== 'number') {
throw new InvalidArgumentError('nthCall must be called with a number')
}
if (!Number.isInteger(number)) {
throw new InvalidArgumentError('nthCall must be called with an integer')
}
if (Math.sign(number) !== 1) {
throw new InvalidArgumentError('nthCall must be called with a positive value. use firstCall or lastCall instead')
}
// non zero based index. this is more human readable
return this.logs.at(number - 1)
}
filterCalls (criteria, options) {
// perf
if (this.logs.length === 0) {
return this.logs
}
if (typeof criteria === 'function') {
return this.logs.filter(criteria)
}
if (criteria instanceof RegExp) {
return this.logs.filter((log) => {
return criteria.test(log.toString())
})
}
if (typeof criteria === 'object' && criteria !== null) {
// no criteria - returning all logs
if (Object.keys(criteria).length === 0) {
return this.logs
}
const finalOptions = { operator: 'OR', ...buildAndValidateFilterCallsOptions(options) }
let maybeDuplicatedLogsFiltered = []
if ('protocol' in criteria) {
maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.protocol, finalOptions, this.filterCallsByProtocol, maybeDuplicatedLogsFiltered)
}
if ('host' in criteria) {
maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.host, finalOptions, this.filterCallsByHost, maybeDuplicatedLogsFiltered)
}
if ('port' in criteria) {
maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.port, finalOptions, this.filterCallsByPort, maybeDuplicatedLogsFiltered)
}
if ('origin' in criteria) {
maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.origin, finalOptions, this.filterCallsByOrigin, maybeDuplicatedLogsFiltered)
}
if ('path' in criteria) {
maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.path, finalOptions, this.filterCallsByPath, maybeDuplicatedLogsFiltered)
}
if ('hash' in criteria) {
maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.hash, finalOptions, this.filterCallsByHash, maybeDuplicatedLogsFiltered)
}
if ('fullUrl' in criteria) {
maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.fullUrl, finalOptions, this.filterCallsByFullUrl, maybeDuplicatedLogsFiltered)
}
if ('method' in criteria) {
maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.method, finalOptions, this.filterCallsByMethod, maybeDuplicatedLogsFiltered)
}
const uniqLogsFiltered = [...new Set(maybeDuplicatedLogsFiltered)]
return uniqLogsFiltered
}
throw new InvalidArgumentError('criteria parameter should be one of function, regexp, or object')
}
filterCallsByProtocol = makeFilterCalls.call(this, 'protocol')
filterCallsByHost = makeFilterCalls.call(this, 'host')
filterCallsByPort = makeFilterCalls.call(this, 'port')
filterCallsByOrigin = makeFilterCalls.call(this, 'origin')
filterCallsByPath = makeFilterCalls.call(this, 'path')
filterCallsByHash = makeFilterCalls.call(this, 'hash')
filterCallsByFullUrl = makeFilterCalls.call(this, 'fullUrl')
filterCallsByMethod = makeFilterCalls.call(this, 'method')
clear () {
this.logs = []
}
[kMockCallHistoryAddLog] (requestInit) {
const log = new MockCallHistoryLog(requestInit)
this.logs.push(log)
return log
}
* [Symbol.iterator] () {
for (const log of this.calls()) {
yield log
}
}
}
module.exports.MockCallHistory = MockCallHistory
module.exports.MockCallHistoryLog = MockCallHistoryLog
@@ -0,0 +1 @@
{"version":3,"file":"sentryNonRecordingSpan.js","sources":["../../../src/tracing/sentryNonRecordingSpan.ts"],"sourcesContent":["import type {\n SentrySpanArguments,\n Span,\n SpanAttributes,\n SpanAttributeValue,\n SpanContextData,\n SpanTimeInput,\n} from '../types-hoist/span';\nimport type { SpanStatus } from '../types-hoist/spanStatus';\nimport { generateSpanId, generateTraceId } from '../utils/propagationContext';\nimport { TRACE_FLAG_NONE } from '../utils/spanUtils';\n\n/**\n * A Sentry Span that is non-recording, meaning it will not be sent to Sentry.\n */\nexport class SentryNonRecordingSpan implements Span {\n private _traceId: string;\n private _spanId: string;\n\n public constructor(spanContext: SentrySpanArguments = {}) {\n this._traceId = spanContext.traceId || generateTraceId();\n this._spanId = spanContext.spanId || generateSpanId();\n }\n\n /** @inheritdoc */\n public spanContext(): SpanContextData {\n return {\n spanId: this._spanId,\n traceId: this._traceId,\n traceFlags: TRACE_FLAG_NONE,\n };\n }\n\n /** @inheritdoc */\n public end(_timestamp?: SpanTimeInput): void {}\n\n /** @inheritdoc */\n public setAttribute(_key: string, _value: SpanAttributeValue | undefined): this {\n return this;\n }\n\n /** @inheritdoc */\n public setAttributes(_values: SpanAttributes): this {\n return this;\n }\n\n /** @inheritdoc */\n public setStatus(_status: SpanStatus): this {\n return this;\n }\n\n /** @inheritdoc */\n public updateName(_name: string): this {\n return this;\n }\n\n /** @inheritdoc */\n public isRecording(): boolean {\n return false;\n }\n\n /** @inheritdoc */\n public addEvent(\n _name: string,\n _attributesOrStartTime?: SpanAttributes | SpanTimeInput,\n _startTime?: SpanTimeInput,\n ): this {\n return this;\n }\n\n /** @inheritDoc */\n public addLink(_link: unknown): this {\n return this;\n }\n\n /** @inheritDoc */\n public addLinks(_links: unknown[]): this {\n return this;\n }\n\n /**\n * This should generally not be used,\n * but we need it for being compliant with the OTEL Span interface.\n *\n * @hidden\n * @internal\n */\n public recordException(_exception: unknown, _time?: number | undefined): void {\n // noop\n }\n}\n"],"names":["generateTraceId","generateSpanId","TRACE_FLAG_NONE"],"mappings":";;;;;AAYA;AACA;AACA;AACO,MAAM,wBAAuC;;AAIpD,GAAS,WAAW,CAAC,WAAW,GAAwB,EAAE,EAAE;AAC5D,IAAI,IAAI,CAAC,QAAA,GAAW,WAAW,CAAC,OAAA,IAAWA,kCAAe,EAAE;AAC5D,IAAI,IAAI,CAAC,OAAA,GAAU,WAAW,CAAC,MAAA,IAAUC,iCAAc,EAAE;AACzD,EAAE;;AAEF;AACA,GAAS,WAAW,GAAoB;AACxC,IAAI,OAAO;AACX,MAAM,MAAM,EAAE,IAAI,CAAC,OAAO;AAC1B,MAAM,OAAO,EAAE,IAAI,CAAC,QAAQ;AAC5B,MAAM,UAAU,EAAEC,yBAAe;AACjC,KAAK;AACL,EAAE;;AAEF;AACA,GAAS,GAAG,CAAC,UAAU,EAAwB,CAAC;;AAEhD;AACA,GAAS,YAAY,CAAC,IAAI,EAAU,MAAM,EAAwC;AAClF,IAAI,OAAO,IAAI;AACf,EAAE;;AAEF;AACA,GAAS,aAAa,CAAC,OAAO,EAAwB;AACtD,IAAI,OAAO,IAAI;AACf,EAAE;;AAEF;AACA,GAAS,SAAS,CAAC,OAAO,EAAoB;AAC9C,IAAI,OAAO,IAAI;AACf,EAAE;;AAEF;AACA,GAAS,UAAU,CAAC,KAAK,EAAgB;AACzC,IAAI,OAAO,IAAI;AACf,EAAE;;AAEF;AACA,GAAS,WAAW,GAAY;AAChC,IAAI,OAAO,KAAK;AAChB,EAAE;;AAEF;AACA,GAAS,QAAQ;AACjB,IAAI,KAAK;AACT,IAAI,sBAAsB;AAC1B,IAAI,UAAU;AACd,IAAU;AACV,IAAI,OAAO,IAAI;AACf,EAAE;;AAEF;AACA,GAAS,OAAO,CAAC,KAAK,EAAiB;AACvC,IAAI,OAAO,IAAI;AACf,EAAE;;AAEF;AACA,GAAS,QAAQ,CAAC,MAAM,EAAmB;AAC3C,IAAI,OAAO,IAAI;AACf,EAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAS,eAAe,CAAC,UAAU,EAAW,KAAK,EAA6B;AAChF;AACA,EAAE;AACF;;;;"}
@@ -0,0 +1 @@
{"version":3,"file":"graphqlClient.d.ts","sourceRoot":"","sources":["../../../../src/integrations/graphqlClient.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AAGzE,UAAU,oBAAoB;IAC5B,SAAS,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;CACnC;AAED,yGAAyG;AACzG,UAAU,sBAAsB;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC;AAED,kCAAkC;AAClC,UAAU,uBAAuB;IAC/B,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,UAAU,EAAE;QACV,cAAc,EAAE;YACd,OAAO,EAAE,MAAM,CAAC;YAChB,UAAU,EAAE,MAAM,CAAC;SACpB,CAAC;KACH,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC7B;AAED,KAAK,qBAAqB,GAAG,sBAAsB,GAAG,uBAAuB,CAAC;AAE9E,UAAU,gBAAgB;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAiGD;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,qBAAqB,GAAG,MAAM,CAgB/E;AAED;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAczF;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,gBAAgB,CAuBjE;AA8BD;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,GAAG,qBAAqB,GAAG,SAAS,CAe3F;AAED;;;GAGG;AACH,eAAO,MAAM,wBAAwB,uEAA+C,CAAC"}
@@ -0,0 +1,451 @@
import type { RegisteredCache, SerializedStyles } from '@emotion/utils'
import hashString from '@emotion/hash'
import unitless from '@emotion/unitless'
import memoize from '@emotion/memoize'
import isDevelopment from '#is-development'
import * as CSS from 'csstype'
export type { RegisteredCache, SerializedStyles }
type Cursor = {
name: string
styles: string
next?: Cursor
}
export type CSSProperties = CSS.PropertiesFallback<number | string>
export type CSSPropertiesWithMultiValues = {
[K in keyof CSSProperties]:
| CSSProperties[K]
| ReadonlyArray<Extract<CSSProperties[K], string>>
}
export type CSSPseudos = { [K in CSS.Pseudos]?: CSSObject }
export interface ArrayCSSInterpolation
extends ReadonlyArray<CSSInterpolation> {}
export type InterpolationPrimitive =
| null
| undefined
| boolean
| number
| string
| ComponentSelector
| Keyframes
| SerializedStyles
| CSSObject
export type CSSInterpolation = InterpolationPrimitive | ArrayCSSInterpolation
export interface CSSOthersObject {
[propertiesName: string]: CSSInterpolation
}
export interface CSSObject
extends CSSPropertiesWithMultiValues,
CSSPseudos,
CSSOthersObject {}
export interface ComponentSelector {
__emotion_styles: any
}
export type Keyframes = {
name: string
styles: string
anim: number
toString: () => string
} & string
export interface ArrayInterpolation<Props = unknown>
extends ReadonlyArray<Interpolation<Props>> {}
export interface FunctionInterpolation<Props = unknown> {
(props: Props): Interpolation<Props>
}
export type Interpolation<Props = unknown> =
| InterpolationPrimitive
| ArrayInterpolation<Props>
| FunctionInterpolation<Props>
const ILLEGAL_ESCAPE_SEQUENCE_ERROR = `You have illegal escape sequence in your template literal, most likely inside content's property value.
Because you write your CSS inside a JavaScript string you actually have to do double escaping, so for example "content: '\\00d7';" should become "content: '\\\\00d7';".
You can read more about this here:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences`
const UNDEFINED_AS_OBJECT_KEY_ERROR =
"You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key)."
let hyphenateRegex = /[A-Z]|^ms/g
let animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g
const isCustomProperty = (property: string) => property.charCodeAt(1) === 45
const isProcessableValue = (value: Interpolation) =>
value != null && typeof value !== 'boolean'
const processStyleName = /* #__PURE__ */ memoize((styleName: string) =>
isCustomProperty(styleName)
? styleName
: styleName.replace(hyphenateRegex, '-$&').toLowerCase()
)
let processStyleValue = (
key: string,
value: string | number
): string | number => {
switch (key) {
case 'animation':
case 'animationName': {
if (typeof value === 'string') {
return value.replace(animationRegex, (match, p1, p2) => {
cursor = {
name: p1,
styles: p2,
next: cursor
}
return p1
})
}
}
}
if (
unitless[key as keyof typeof unitless] !== 1 &&
!isCustomProperty(key) &&
typeof value === 'number' &&
value !== 0
) {
return value + 'px'
}
return value
}
if (isDevelopment) {
let contentValuePattern =
/(var|attr|counters?|url|element|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/
let contentValues = ['normal', 'none', 'initial', 'inherit', 'unset']
let oldProcessStyleValue = processStyleValue
let msPattern = /^-ms-/
let hyphenPattern = /-(.)/g
let hyphenatedCache: Record<string, boolean | undefined> = {}
processStyleValue = (key: string, value: string | number) => {
if (key === 'content') {
if (
typeof value !== 'string' ||
(contentValues.indexOf(value) === -1 &&
!contentValuePattern.test(value) &&
(value.charAt(0) !== value.charAt(value.length - 1) ||
(value.charAt(0) !== '"' && value.charAt(0) !== "'")))
) {
throw new Error(
`You seem to be using a value for 'content' without quotes, try replacing it with \`content: '"${value}"'\``
)
}
}
const processed = oldProcessStyleValue(key, value)
if (
processed !== '' &&
!isCustomProperty(key) &&
key.indexOf('-') !== -1 &&
hyphenatedCache[key] === undefined
) {
hyphenatedCache[key] = true
console.error(
`Using kebab-case for css properties in objects is not supported. Did you mean ${key
.replace(msPattern, 'ms-')
.replace(hyphenPattern, (str, char) => char.toUpperCase())}?`
)
}
return processed
}
}
const noComponentSelectorMessage =
'Component selectors can only be used in conjunction with ' +
'@emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware ' +
'compiler transform.'
function handleInterpolation(
mergedProps: unknown | undefined,
registered: RegisteredCache | undefined,
interpolation: Interpolation
): string | number {
if (interpolation == null) {
return ''
}
const componentSelector = interpolation as ComponentSelector
if (componentSelector.__emotion_styles !== undefined) {
if (
isDevelopment &&
String(componentSelector) === 'NO_COMPONENT_SELECTOR'
) {
throw new Error(noComponentSelectorMessage)
}
return componentSelector as unknown as string
}
switch (typeof interpolation) {
case 'boolean': {
return ''
}
case 'object': {
const keyframes = interpolation as Keyframes
if (keyframes.anim === 1) {
cursor = {
name: keyframes.name,
styles: keyframes.styles,
next: cursor
}
return keyframes.name
}
const serializedStyles = interpolation as SerializedStyles
if (serializedStyles.styles !== undefined) {
let next = serializedStyles.next
if (next !== undefined) {
// not the most efficient thing ever but this is a pretty rare case
// and there will be very few iterations of this generally
while (next !== undefined) {
cursor = {
name: next.name,
styles: next.styles,
next: cursor
}
next = next.next
}
}
let styles = `${serializedStyles.styles};`
return styles
}
return createStringFromObject(
mergedProps,
registered,
interpolation as ArrayInterpolation | CSSObject
)
}
case 'function': {
if (mergedProps !== undefined) {
let previousCursor = cursor
let result = interpolation(mergedProps)
cursor = previousCursor
return handleInterpolation(mergedProps, registered, result)
} else if (isDevelopment) {
console.error(
'Functions that are interpolated in css calls will be stringified.\n' +
'If you want to have a css call based on props, create a function that returns a css call like this\n' +
'let dynamicStyle = (props) => css`color: ${props.color}`\n' +
'It can be called directly with props or interpolated in a styled call like this\n' +
"let SomeComponent = styled('div')`${dynamicStyle}`"
)
}
break
}
case 'string':
if (isDevelopment) {
const matched: string[] = []
const replaced = interpolation.replace(
animationRegex,
(_match, _p1, p2) => {
const fakeVarName = `animation${matched.length}`
matched.push(
`const ${fakeVarName} = keyframes\`${p2.replace(
/^@keyframes animation-\w+/,
''
)}\``
)
return `\${${fakeVarName}}`
}
)
if (matched.length) {
console.error(
`\`keyframes\` output got interpolated into plain string, please wrap it with \`css\`.
Instead of doing this:
${[...matched, `\`${replaced}\``].join('\n')}
You should wrap it with \`css\` like this:
css\`${replaced}\``
)
}
}
break
}
// finalize string values (regular strings and functions interpolated into css calls)
const asString = interpolation as string
if (registered == null) {
return asString
}
const cached = registered[asString]
return cached !== undefined ? cached : asString
}
function createStringFromObject(
mergedProps: unknown | undefined,
registered: RegisteredCache | undefined,
obj: ArrayInterpolation | CSSObject
): string {
let string = ''
if (Array.isArray(obj)) {
for (let i = 0; i < obj.length; i++) {
string += `${handleInterpolation(mergedProps, registered, obj[i])};`
}
} else {
for (let key in obj) {
let value: unknown = obj[key as never]
if (typeof value !== 'object') {
const asString = value as string
if (registered != null && registered[asString] !== undefined) {
string += `${key}{${registered[asString]}}`
} else if (isProcessableValue(asString)) {
string += `${processStyleName(key)}:${processStyleValue(
key,
asString
)};`
}
} else {
if (key === 'NO_COMPONENT_SELECTOR' && isDevelopment) {
throw new Error(noComponentSelectorMessage)
}
if (
Array.isArray(value) &&
typeof value[0] === 'string' &&
(registered == null || registered[value[0]] === undefined)
) {
for (let i = 0; i < value.length; i++) {
if (isProcessableValue(value[i])) {
string += `${processStyleName(key)}:${processStyleValue(
key,
value[i] as string | number
)};`
}
}
} else {
const interpolated = handleInterpolation(
mergedProps,
registered,
value as Interpolation
)
switch (key) {
case 'animation':
case 'animationName': {
string += `${processStyleName(key)}:${interpolated};`
break
}
default: {
if (isDevelopment && key === 'undefined') {
console.error(UNDEFINED_AS_OBJECT_KEY_ERROR)
}
string += `${key}{${interpolated}}`
}
}
}
}
}
}
return string
}
let labelPattern = /label:\s*([^\s;{]+)\s*(;|$)/g
// this is the cursor for keyframes
// keyframes are stored on the SerializedStyles object as a linked list
let cursor: Cursor | undefined
export function serializeStyles<Props>(
args: Array<TemplateStringsArray | Interpolation<Props>>,
registered?: RegisteredCache,
mergedProps?: Props
): SerializedStyles
export function serializeStyles(
args: Array<TemplateStringsArray | Interpolation<unknown>>,
registered?: RegisteredCache,
mergedProps?: unknown
): SerializedStyles {
if (
args.length === 1 &&
typeof args[0] === 'object' &&
args[0] !== null &&
(args[0] as SerializedStyles).styles !== undefined
) {
return args[0] as SerializedStyles
}
let stringMode = true
let styles = ''
cursor = undefined
let strings = args[0]
if (strings == null || (strings as TemplateStringsArray).raw === undefined) {
stringMode = false
styles += handleInterpolation(
mergedProps,
registered,
strings as Interpolation
)
} else {
const asTemplateStringsArr = strings as TemplateStringsArray
if (isDevelopment && asTemplateStringsArr[0] === undefined) {
console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR)
}
styles += asTemplateStringsArr[0]
}
// we start at 1 since we've already handled the first arg
for (let i = 1; i < args.length; i++) {
styles += handleInterpolation(
mergedProps,
registered,
args[i] as Interpolation
)
if (stringMode) {
const templateStringsArr = strings as TemplateStringsArray
if (isDevelopment && templateStringsArr[i] === undefined) {
console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR)
}
styles += templateStringsArr[i]
}
}
// using a global regex with .exec is stateful so lastIndex has to be reset each time
labelPattern.lastIndex = 0
let identifierName = ''
let match
// https://esbench.com/bench/5b809c2cf2949800a0f61fb5
while ((match = labelPattern.exec(styles)) !== null) {
identifierName += '-' + match[1]
}
let name = hashString(styles) + identifierName
if (isDevelopment) {
const devStyles = {
name,
styles,
next: cursor,
toString() {
return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."
}
}
return devStyles
}
return {
name,
styles,
next: cursor
}
}
@@ -0,0 +1,3 @@
import type { Where } from 'payload';
export declare const sanitizeFilterOptionsQuery: (query: Where) => Where;
//# sourceMappingURL=sanitizeFilterOptionsQuery.d.ts.map
@@ -0,0 +1,86 @@
# Pino Ecosystem
This is a list of ecosystem modules that integrate with `pino`.
Modules listed under [Core](#core) are maintained by the Pino team. Modules
listed under [Community](#community) are maintained by independent community
members.
Please send a PR to add new modules!
<a id="core"></a>
## Core
### Frameworks
+ [`express-pino-logger`](https://github.com/pinojs/express-pino-logger): use
Pino to log requests within [express](https://expressjs.com/).
+ [`koa-pino-logger`](https://github.com/pinojs/koa-pino-logger): use Pino to
log requests within [Koa](https://koajs.com/).
+ [`restify-pino-logger`](https://github.com/pinojs/restify-pino-logger): use
Pino to log requests within [restify](http://restify.com/).
+ [`rill-pino-logger`](https://github.com/pinojs/rill-pino-logger): use Pino as
the logger for the [Rill framework](https://rill.site/).
### Utilities
+ [`pino-arborsculpture`](https://github.com/pinojs/pino-arborsculpture): change
log levels at runtime.
+ [`pino-caller`](https://github.com/pinojs/pino-caller): add callsite to the log line.
+ [`pino-clf`](https://github.com/pinojs/pino-clf): reformat Pino logs into
Common Log Format.
+ [`pino-console`](https://github.com/pinojs/pino-console): adapter for the [WHATWG Console](https://console.spec.whatwg.org/) spec.
+ [`pino-debug`](https://github.com/pinojs/pino-debug): use Pino to interpret
[`debug`](https://npm.im/debug) logs.
+ [`pino-elasticsearch`](https://github.com/pinojs/pino-elasticsearch): send
Pino logs to an Elasticsearch instance.
+ [`pino-eventhub`](https://github.com/pinojs/pino-eventhub): send Pino logs
to an [Event Hub](https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-what-is-event-hubs).
+ [`pino-filter`](https://github.com/pinojs/pino-filter): filter Pino logs in
the same fashion as the [`debug`](https://npm.im/debug) module.
+ [`pino-gelf`](https://github.com/pinojs/pino-gelf): reformat Pino logs into
GELF format for Graylog.
+ [`pino-hapi`](https://github.com/pinojs/hapi-pino): use Pino as the logger
for [Hapi](https://hapijs.com/).
+ [`pino-http`](https://github.com/pinojs/pino-http): easily use Pino to log
requests with the core `http` module.
+ [`pino-http-print`](https://github.com/pinojs/pino-http-print): reformat Pino
logs into traditional [HTTPD](https://httpd.apache.org/) style request logs.
+ [`pino-mongodb`](https://github.com/pinojs/pino-mongodb): store Pino logs
in a MongoDB database.
+ [`pino-multi-stream`](https://github.com/pinojs/pino-multi-stream): send
logs to multiple destination streams (slow!).
+ [`pino-noir`](https://github.com/pinojs/pino-noir): redact sensitive information
in logs.
+ [`pino-pretty`](https://github.com/pinojs/pino-pretty): basic prettifier to
make log lines human-readable.
+ [`pino-socket`](https://github.com/pinojs/pino-socket): send logs to TCP or UDP
destinations.
+ [`pino-std-serializers`](https://github.com/pinojs/pino-std-serializers): the
core object serializers used within Pino.
+ [`pino-syslog`](https://github.com/pinojs/pino-syslog): reformat Pino logs
to standard syslog format.
+ [`pino-tee`](https://github.com/pinojs/pino-tee): pipe Pino logs into files
based upon log levels.
+ [`pino-test`](https://github.com/pinojs/pino-test): a set of utilities for
verifying logs generated by the Pino logger.
+ [`pino-toke`](https://github.com/pinojs/pino-toke): reformat Pino logs
according to a given format string.
<a id="community"></a>
## Community
+ [`@google-cloud/pino-logging-gcp-config`](https://www.npmjs.com/package/@google-cloud/pino-logging-gcp-config): Config helper and formatter to output [Google Cloud Platform Structured Logging](https://cloud.google.com/logging/docs/structured-logging)
+ [`@newrelic/pino-enricher`](https://github.com/newrelic/newrelic-node-log-extensions/blob/main/packages/pino-log-enricher): a log customization to add New Relic context to use [Logs In Context](https://docs.newrelic.com/docs/logs/logs-context/logs-in-context/)
+ [`cloud-pine`](https://github.com/metcoder95/cloud-pine): transport that provides abstraction and compatibility with [`@google-cloud/logging`](https://www.npmjs.com/package/@google-cloud/logging).
+ [`cls-proxify`](https://github.com/keenondrums/cls-proxify): integration of pino and [CLS](https://github.com/jeff-lewis/cls-hooked). Useful for creating dynamically configured child loggers (e.g. with added trace ID) for each request.
+ [`crawlee-pino`](https://github.com/imyelo/crawlee-pino): use Pino to log within Crawlee
+ [`eslint-plugin-pino`](https://github.com/orzarchi/eslint-plugin-pino): linting rules for pino usage, primarly for preventing missing context in logs due to incorrect argument order.
+ [`pino-colada`](https://github.com/lrlna/pino-colada): cute ndjson formatter for pino.
+ [`pino-dev`](https://github.com/dnjstrom/pino-dev): simple prettifier for pino with built-in support for common ecosystem packages.
+ [`pino-fluentd`](https://github.com/davidedantonio/pino-fluentd): send Pino logs to Elasticsearch,
MongoDB, and many [others](https://www.fluentd.org/dataoutputs) via Fluentd.
+ [`pino-lambda`](https://github.com/FormidableLabs/pino-lambda): log transport for cloudwatch support inside aws-lambda
+ [`pino-pretty-min`](https://github.com/unjello/pino-pretty-min): a minimal
prettifier inspired by the [logrus](https://github.com/sirupsen/logrus) logger.
+ [`pino-rotating-file`](https://github.com/homeaway/pino-rotating-file): a hapi-pino log transport for splitting logs into separate, automatically rotating files.
+ [`pino-tiny`](https://github.com/holmok/pino-tiny): a tiny (and extensible?) little log formatter for pino.
@@ -0,0 +1,2 @@
export declare function validatePDF(buffer: Buffer): boolean;
//# sourceMappingURL=validatePDF.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"chart-column-increasing.js","sources":["../../../src/icons/chart-column-increasing.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ChartColumnIncreasing\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTMgMTdWOSIgLz4KICA8cGF0aCBkPSJNMTggMTdWNSIgLz4KICA8cGF0aCBkPSJNMyAzdjE2YTIgMiAwIDAgMCAyIDJoMTYiIC8+CiAgPHBhdGggZD0iTTggMTd2LTMiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/chart-column-increasing\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 ChartColumnIncreasing = createLucideIcon('ChartColumnIncreasing', [\n ['path', { d: 'M13 17V9', key: '1fwyjl' }],\n ['path', { d: 'M18 17V5', key: 'sfb6ij' }],\n ['path', { d: 'M3 3v16a2 2 0 0 0 2 2h16', key: 'c24i48' }],\n ['path', { d: 'M8 17v-3', key: '17ska0' }],\n]);\n\nexport default ChartColumnIncreasing;\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,CAAA,CAAA,CAAA,CAAA,CAAwB,iBAAiB,uBAAyB,CAAA,CAAA,CAAA;AAAA,CAAA,CACtE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA4B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,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,292 @@
# Changelog
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
## [10.0.0](https://github.com/uuidjs/uuid/compare/v9.0.0...v10.0.0) (2024-06-07)
### ⚠ BREAKING CHANGES
- update node support (drop node@12, node@14, add node@20) (#750)
### Features
- support support rfc9562 MAX uuid (new in RFC9562) ([#714](https://github.com/uuidjs/uuid/issues/714)) ([0385cd3](https://github.com/uuidjs/uuid/commit/0385cd3f18ae9920678b2849932fa7a9d9aee7d0))
- support rfc9562 v6 uuids ([#754](https://github.com/uuidjs/uuid/issues/754)) ([c4ed13e](https://github.com/uuidjs/uuid/commit/c4ed13e7159d87c9e42a349bdd9dc955f1af46b6))
- support rfc9562 v7 uuids ([#681](https://github.com/uuidjs/uuid/issues/681)) ([db76a12](https://github.com/uuidjs/uuid/commit/db76a1284760c441438f50a57924b322dae08891))
- update node support matrix (only support node 16-20) ([#750](https://github.com/uuidjs/uuid/issues/750)) ([883b163](https://github.com/uuidjs/uuid/commit/883b163b9ab9d6655bfbd8a35e61a3c71674dfe1))
- support rfc9562 v8 uuids ([#759](https://github.com/uuidjs/uuid/issues/759)) ([35a5342](https://github.com/uuidjs/uuid/commit/35a53428202657e402e6b4aa68f56c08194541bf))
### Bug Fixes
- revert "perf: remove superfluous call to toLowerCase ([#677](https://github.com/uuidjs/uuid/issues/677))" ([#738](https://github.com/uuidjs/uuid/issues/738)) ([e267b90](https://github.com/uuidjs/uuid/commit/e267b9073df1d0ce119ee53c0487fe76acb2be37))
## [9.0.1](https://github.com/uuidjs/uuid/compare/v9.0.0...v9.0.1) (2023-09-12)
### build
- Fix CI to work with Node.js 20.x
## [9.0.0](https://github.com/uuidjs/uuid/compare/v8.3.2...v9.0.0) (2022-09-05)
### ⚠ BREAKING CHANGES
- Drop Node.js 10.x support. This library always aims at supporting one EOLed LTS release which by this time now is 12.x which has reached EOL 30 Apr 2022.
- Remove the minified UMD build from the package.
Minified code is hard to audit and since this is a widely used library it seems more appropriate nowadays to optimize for auditability than to ship a legacy module format that, at best, serves educational purposes nowadays.
For production browser use cases, users should be using a bundler. For educational purposes, today's online sandboxes like replit.com offer convenient ways to load npm modules, so the use case for UMD through repos like UNPKG or jsDelivr has largely vanished.
- Drop IE 11 and Safari 10 support. Drop support for browsers that don't correctly implement const/let and default arguments, and no longer transpile the browser build to ES2015.
This also removes the fallback on msCrypto instead of the crypto API.
Browser tests are run in the first supported version of each supported browser and in the latest (as of this commit) version available on Browserstack.
### Features
- optimize uuid.v1 by 1.3x uuid.v4 by 4.3x (430%) ([#597](https://github.com/uuidjs/uuid/issues/597)) ([3a033f6](https://github.com/uuidjs/uuid/commit/3a033f6bab6bb3780ece6d645b902548043280bc))
- remove UMD build ([#645](https://github.com/uuidjs/uuid/issues/645)) ([e948a0f](https://github.com/uuidjs/uuid/commit/e948a0f22bf22f4619b27bd913885e478e20fe6f)), closes [#620](https://github.com/uuidjs/uuid/issues/620)
- use native crypto.randomUUID when available ([#600](https://github.com/uuidjs/uuid/issues/600)) ([c9e076c](https://github.com/uuidjs/uuid/commit/c9e076c852edad7e9a06baaa1d148cf4eda6c6c4))
### Bug Fixes
- add Jest/jsdom compatibility ([#642](https://github.com/uuidjs/uuid/issues/642)) ([16f9c46](https://github.com/uuidjs/uuid/commit/16f9c469edf46f0786164cdf4dc980743984a6fd))
- change default export to named function ([#545](https://github.com/uuidjs/uuid/issues/545)) ([c57bc5a](https://github.com/uuidjs/uuid/commit/c57bc5a9a0653273aa639cda9177ce52efabe42a))
- handle error when parameter is not set in v3 and v5 ([#622](https://github.com/uuidjs/uuid/issues/622)) ([fcd7388](https://github.com/uuidjs/uuid/commit/fcd73881692d9fabb63872576ba28e30ff852091))
- run npm audit fix ([#644](https://github.com/uuidjs/uuid/issues/644)) ([04686f5](https://github.com/uuidjs/uuid/commit/04686f54c5fed2cfffc1b619f4970c4bb8532353))
- upgrading from uuid3 broken link ([#568](https://github.com/uuidjs/uuid/issues/568)) ([1c849da](https://github.com/uuidjs/uuid/commit/1c849da6e164259e72e18636726345b13a7eddd6))
### build
- drop Node.js 8.x from babel transpile target ([#603](https://github.com/uuidjs/uuid/issues/603)) ([aa11485](https://github.com/uuidjs/uuid/commit/aa114858260402107ec8a1e1a825dea0a259bcb5))
- drop support for legacy browsers (IE11, Safari 10) ([#604](https://github.com/uuidjs/uuid/issues/604)) ([0f433e5](https://github.com/uuidjs/uuid/commit/0f433e5ec444edacd53016de67db021102f36148))
- drop node 10.x to upgrade dev dependencies ([#653](https://github.com/uuidjs/uuid/issues/653)) ([28a5712](https://github.com/uuidjs/uuid/commit/28a571283f8abda6b9d85e689f95b7d3ee9e282e)), closes [#643](https://github.com/uuidjs/uuid/issues/643)
### [8.3.2](https://github.com/uuidjs/uuid/compare/v8.3.1...v8.3.2) (2020-12-08)
### Bug Fixes
- lazy load getRandomValues ([#537](https://github.com/uuidjs/uuid/issues/537)) ([16c8f6d](https://github.com/uuidjs/uuid/commit/16c8f6df2f6b09b4d6235602d6a591188320a82e)), closes [#536](https://github.com/uuidjs/uuid/issues/536)
### [8.3.1](https://github.com/uuidjs/uuid/compare/v8.3.0...v8.3.1) (2020-10-04)
### Bug Fixes
- support expo>=39.0.0 ([#515](https://github.com/uuidjs/uuid/issues/515)) ([c65a0f3](https://github.com/uuidjs/uuid/commit/c65a0f3fa73b901959d638d1e3591dfacdbed867)), closes [#375](https://github.com/uuidjs/uuid/issues/375)
## [8.3.0](https://github.com/uuidjs/uuid/compare/v8.2.0...v8.3.0) (2020-07-27)
### Features
- add parse/stringify/validate/version/NIL APIs ([#479](https://github.com/uuidjs/uuid/issues/479)) ([0e6c10b](https://github.com/uuidjs/uuid/commit/0e6c10ba1bf9517796ff23c052fc0468eedfd5f4)), closes [#475](https://github.com/uuidjs/uuid/issues/475) [#478](https://github.com/uuidjs/uuid/issues/478) [#480](https://github.com/uuidjs/uuid/issues/480) [#481](https://github.com/uuidjs/uuid/issues/481) [#180](https://github.com/uuidjs/uuid/issues/180)
## [8.2.0](https://github.com/uuidjs/uuid/compare/v8.1.0...v8.2.0) (2020-06-23)
### Features
- improve performance of v1 string representation ([#453](https://github.com/uuidjs/uuid/issues/453)) ([0ee0b67](https://github.com/uuidjs/uuid/commit/0ee0b67c37846529c66089880414d29f3ae132d5))
- remove deprecated v4 string parameter ([#454](https://github.com/uuidjs/uuid/issues/454)) ([88ce3ca](https://github.com/uuidjs/uuid/commit/88ce3ca0ba046f60856de62c7ce03f7ba98ba46c)), closes [#437](https://github.com/uuidjs/uuid/issues/437)
- support jspm ([#473](https://github.com/uuidjs/uuid/issues/473)) ([e9f2587](https://github.com/uuidjs/uuid/commit/e9f2587a92575cac31bc1d4ae944e17c09756659))
### Bug Fixes
- prepare package exports for webpack 5 ([#468](https://github.com/uuidjs/uuid/issues/468)) ([8d6e6a5](https://github.com/uuidjs/uuid/commit/8d6e6a5f8965ca9575eb4d92e99a43435f4a58a8))
## [8.1.0](https://github.com/uuidjs/uuid/compare/v8.0.0...v8.1.0) (2020-05-20)
### Features
- improve v4 performance by reusing random number array ([#435](https://github.com/uuidjs/uuid/issues/435)) ([bf4af0d](https://github.com/uuidjs/uuid/commit/bf4af0d711b4d2ed03d1f74fd12ad0baa87dc79d))
- optimize V8 performance of bytesToUuid ([#434](https://github.com/uuidjs/uuid/issues/434)) ([e156415](https://github.com/uuidjs/uuid/commit/e156415448ec1af2351fa0b6660cfb22581971f2))
### Bug Fixes
- export package.json required by react-native and bundlers ([#449](https://github.com/uuidjs/uuid/issues/449)) ([be1c8fe](https://github.com/uuidjs/uuid/commit/be1c8fe9a3206c358e0059b52fafd7213aa48a52)), closes [ai/nanoevents#44](https://github.com/ai/nanoevents/issues/44#issuecomment-602010343) [#444](https://github.com/uuidjs/uuid/issues/444)
## [8.0.0](https://github.com/uuidjs/uuid/compare/v7.0.3...v8.0.0) (2020-04-29)
### ⚠ BREAKING CHANGES
- For native ECMAScript Module (ESM) usage in Node.js only named exports are exposed, there is no more default export.
```diff
-import uuid from 'uuid';
-console.log(uuid.v4()); // -> 'cd6c3b08-0adc-4f4b-a6ef-36087a1c9869'
+import { v4 as uuidv4 } from 'uuid';
+uuidv4(); // ⇨ '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d'
```
- Deep requiring specific algorithms of this library like `require('uuid/v4')`, which has been deprecated in `uuid@7`, is no longer supported.
Instead use the named exports that this module exports.
For ECMAScript Modules (ESM):
```diff
-import uuidv4 from 'uuid/v4';
+import { v4 as uuidv4 } from 'uuid';
uuidv4();
```
For CommonJS:
```diff
-const uuidv4 = require('uuid/v4');
+const { v4: uuidv4 } = require('uuid');
uuidv4();
```
### Features
- native Node.js ES Modules (wrapper approach) ([#423](https://github.com/uuidjs/uuid/issues/423)) ([2d9f590](https://github.com/uuidjs/uuid/commit/2d9f590ad9701d692625c07ed62f0a0f91227991)), closes [#245](https://github.com/uuidjs/uuid/issues/245) [#419](https://github.com/uuidjs/uuid/issues/419) [#342](https://github.com/uuidjs/uuid/issues/342)
- remove deep requires ([#426](https://github.com/uuidjs/uuid/issues/426)) ([daf72b8](https://github.com/uuidjs/uuid/commit/daf72b84ceb20272a81bb5fbddb05dd95922cbba))
### Bug Fixes
- add CommonJS syntax example to README quickstart section ([#417](https://github.com/uuidjs/uuid/issues/417)) ([e0ec840](https://github.com/uuidjs/uuid/commit/e0ec8402c7ad44b7ef0453036c612f5db513fda0))
### [7.0.3](https://github.com/uuidjs/uuid/compare/v7.0.2...v7.0.3) (2020-03-31)
### Bug Fixes
- make deep require deprecation warning work in browsers ([#409](https://github.com/uuidjs/uuid/issues/409)) ([4b71107](https://github.com/uuidjs/uuid/commit/4b71107d8c0d2ef56861ede6403fc9dc35a1e6bf)), closes [#408](https://github.com/uuidjs/uuid/issues/408)
### [7.0.2](https://github.com/uuidjs/uuid/compare/v7.0.1...v7.0.2) (2020-03-04)
### Bug Fixes
- make access to msCrypto consistent ([#393](https://github.com/uuidjs/uuid/issues/393)) ([8bf2a20](https://github.com/uuidjs/uuid/commit/8bf2a20f3565df743da7215eebdbada9d2df118c))
- simplify link in deprecation warning ([#391](https://github.com/uuidjs/uuid/issues/391)) ([bb2c8e4](https://github.com/uuidjs/uuid/commit/bb2c8e4e9f4c5f9c1eaaf3ea59710c633cd90cb7))
- update links to match content in readme ([#386](https://github.com/uuidjs/uuid/issues/386)) ([44f2f86](https://github.com/uuidjs/uuid/commit/44f2f86e9d2bbf14ee5f0f00f72a3db1292666d4))
### [7.0.1](https://github.com/uuidjs/uuid/compare/v7.0.0...v7.0.1) (2020-02-25)
### Bug Fixes
- clean up esm builds for node and browser ([#383](https://github.com/uuidjs/uuid/issues/383)) ([59e6a49](https://github.com/uuidjs/uuid/commit/59e6a49e7ce7b3e8fb0f3ee52b9daae72af467dc))
- provide browser versions independent from module system ([#380](https://github.com/uuidjs/uuid/issues/380)) ([4344a22](https://github.com/uuidjs/uuid/commit/4344a22e7aed33be8627eeaaf05360f256a21753)), closes [#378](https://github.com/uuidjs/uuid/issues/378)
## [7.0.0](https://github.com/uuidjs/uuid/compare/v3.4.0...v7.0.0) (2020-02-24)
### ⚠ BREAKING CHANGES
- The default export, which used to be the v4() method but which was already discouraged in v3.x of this library, has been removed.
- Explicitly note that deep imports of the different uuid version functions are deprecated and no longer encouraged and that ECMAScript module named imports should be used instead. Emit a deprecation warning for people who deep-require the different algorithm variants.
- Remove builtin support for insecure random number generators in the browser. Users who want that will have to supply their own random number generator function.
- Remove support for generating v3 and v5 UUIDs in Node.js<4.x
- Convert code base to ECMAScript Modules (ESM) and release CommonJS build for node and ESM build for browser bundlers.
### Features
- add UMD build to npm package ([#357](https://github.com/uuidjs/uuid/issues/357)) ([4e75adf](https://github.com/uuidjs/uuid/commit/4e75adf435196f28e3fbbe0185d654b5ded7ca2c)), closes [#345](https://github.com/uuidjs/uuid/issues/345)
- add various es module and CommonJS examples ([b238510](https://github.com/uuidjs/uuid/commit/b238510bf352463521f74bab175a3af9b7a42555))
- ensure that docs are up-to-date in CI ([ee5e77d](https://github.com/uuidjs/uuid/commit/ee5e77db547474f5a8f23d6c857a6d399209986b))
- hybrid CommonJS & ECMAScript modules build ([a3f078f](https://github.com/uuidjs/uuid/commit/a3f078faa0baff69ab41aed08e041f8f9c8993d0))
- remove insecure fallback random number generator ([3a5842b](https://github.com/uuidjs/uuid/commit/3a5842b141a6e5de0ae338f391661e6b84b167c9)), closes [#173](https://github.com/uuidjs/uuid/issues/173)
- remove support for pre Node.js v4 Buffer API ([#356](https://github.com/uuidjs/uuid/issues/356)) ([b59b5c5](https://github.com/uuidjs/uuid/commit/b59b5c5ecad271c5453f1a156f011671f6d35627))
- rename repository to github:uuidjs/uuid ([#351](https://github.com/uuidjs/uuid/issues/351)) ([c37a518](https://github.com/uuidjs/uuid/commit/c37a518e367ac4b6d0aa62dba1bc6ce9e85020f7)), closes [#338](https://github.com/uuidjs/uuid/issues/338)
### Bug Fixes
- add deep-require proxies for local testing and adjust tests ([#365](https://github.com/uuidjs/uuid/issues/365)) ([7fedc79](https://github.com/uuidjs/uuid/commit/7fedc79ac8fda4bfd1c566c7f05ef4ac13b2db48))
- add note about removal of default export ([#372](https://github.com/uuidjs/uuid/issues/372)) ([12749b7](https://github.com/uuidjs/uuid/commit/12749b700eb49db8a9759fd306d8be05dbfbd58c)), closes [#370](https://github.com/uuidjs/uuid/issues/370)
- deprecated deep requiring of the different algorithm versions ([#361](https://github.com/uuidjs/uuid/issues/361)) ([c0bdf15](https://github.com/uuidjs/uuid/commit/c0bdf15e417639b1aeb0b247b2fb11f7a0a26b23))
## [3.4.0](https://github.com/uuidjs/uuid/compare/v3.3.3...v3.4.0) (2020-01-16)
### Features
- rename repository to github:uuidjs/uuid ([#351](https://github.com/uuidjs/uuid/issues/351)) ([e2d7314](https://github.com/uuidjs/uuid/commit/e2d7314)), closes [#338](https://github.com/uuidjs/uuid/issues/338)
## [3.3.3](https://github.com/uuidjs/uuid/compare/v3.3.2...v3.3.3) (2019-08-19)
### Bug Fixes
- no longer run ci tests on node v4
- upgrade dependencies
## [3.3.2](https://github.com/uuidjs/uuid/compare/v3.3.1...v3.3.2) (2018-06-28)
### Bug Fixes
- typo ([305d877](https://github.com/uuidjs/uuid/commit/305d877))
## [3.3.1](https://github.com/uuidjs/uuid/compare/v3.3.0...v3.3.1) (2018-06-28)
### Bug Fixes
- fix [#284](https://github.com/uuidjs/uuid/issues/284) by setting function name in try-catch ([f2a60f2](https://github.com/uuidjs/uuid/commit/f2a60f2))
# [3.3.0](https://github.com/uuidjs/uuid/compare/v3.2.1...v3.3.0) (2018-06-22)
### Bug Fixes
- assignment to readonly property to allow running in strict mode ([#270](https://github.com/uuidjs/uuid/issues/270)) ([d062fdc](https://github.com/uuidjs/uuid/commit/d062fdc))
- fix [#229](https://github.com/uuidjs/uuid/issues/229) ([c9684d4](https://github.com/uuidjs/uuid/commit/c9684d4))
- Get correct version of IE11 crypto ([#274](https://github.com/uuidjs/uuid/issues/274)) ([153d331](https://github.com/uuidjs/uuid/commit/153d331))
- mem issue when generating uuid ([#267](https://github.com/uuidjs/uuid/issues/267)) ([c47702c](https://github.com/uuidjs/uuid/commit/c47702c))
### Features
- enforce Conventional Commit style commit messages ([#282](https://github.com/uuidjs/uuid/issues/282)) ([cc9a182](https://github.com/uuidjs/uuid/commit/cc9a182))
## [3.2.1](https://github.com/uuidjs/uuid/compare/v3.2.0...v3.2.1) (2018-01-16)
### Bug Fixes
- use msCrypto if available. Fixes [#241](https://github.com/uuidjs/uuid/issues/241) ([#247](https://github.com/uuidjs/uuid/issues/247)) ([1fef18b](https://github.com/uuidjs/uuid/commit/1fef18b))
# [3.2.0](https://github.com/uuidjs/uuid/compare/v3.1.0...v3.2.0) (2018-01-16)
### Bug Fixes
- remove mistakenly added typescript dependency, rollback version (standard-version will auto-increment) ([09fa824](https://github.com/uuidjs/uuid/commit/09fa824))
- use msCrypto if available. Fixes [#241](https://github.com/uuidjs/uuid/issues/241) ([#247](https://github.com/uuidjs/uuid/issues/247)) ([1fef18b](https://github.com/uuidjs/uuid/commit/1fef18b))
### Features
- Add v3 Support ([#217](https://github.com/uuidjs/uuid/issues/217)) ([d94f726](https://github.com/uuidjs/uuid/commit/d94f726))
# [3.1.0](https://github.com/uuidjs/uuid/compare/v3.1.0...v3.0.1) (2017-06-17)
### Bug Fixes
- (fix) Add .npmignore file to exclude test/ and other non-essential files from packing. (#183)
- Fix typo (#178)
- Simple typo fix (#165)
### Features
- v5 support in CLI (#197)
- V5 support (#188)
# 3.0.1 (2016-11-28)
- split uuid versions into separate files
# 3.0.0 (2016-11-17)
- remove .parse and .unparse
# 2.0.0
- Removed uuid.BufferClass
# 1.4.0
- Improved module context detection
- Removed public RNG functions
# 1.3.2
- Improve tests and handling of v1() options (Issue #24)
- Expose RNG option to allow for perf testing with different generators
# 1.3.0
- Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)!
- Support for node.js crypto API
- De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code
@@ -0,0 +1,366 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const splitIntoLines = require("./splitIntoLines");
const streamChunksOfSourceMap = require("./streamChunksOfSourceMap");
/** @typedef {import("../Source").RawSourceMap} RawSourceMap */
/** @typedef {import("./getGeneratedSourceInfo").GeneratedSourceInfo} GeneratedSourceInfo */
/** @typedef {import("./streamChunks").OnChunk} onChunk */
/** @typedef {import("./streamChunks").OnName} OnName */
/** @typedef {import("./streamChunks").OnSource} OnSource */
/**
* @param {string} source source
* @param {RawSourceMap} sourceMap source map
* @param {string} innerSourceName inner source name
* @param {string} innerSource inner source
* @param {RawSourceMap} innerSourceMap inner source map
* @param {boolean | undefined} removeInnerSource do remove inner source
* @param {onChunk} onChunk on chunk
* @param {OnSource} onSource on source
* @param {OnName} onName on name
* @param {boolean} finalSource finalSource
* @param {boolean} columns columns
* @returns {GeneratedSourceInfo} generated source info
*/
const streamChunksOfCombinedSourceMap = (
source,
sourceMap,
innerSourceName,
innerSource,
innerSourceMap,
removeInnerSource,
onChunk,
onSource,
onName,
finalSource,
columns,
) => {
/** @type {Map<string | null, number>} */
const sourceMapping = new Map();
/** @type {Map<string, number>} */
const nameMapping = new Map();
/** @type {number[]} */
const sourceIndexMapping = [];
/** @type {number[]} */
const nameIndexMapping = [];
/** @type {string[]} */
const nameIndexValueMapping = [];
let outerSourceIndex = -2;
/** @type {number[]} */
const innerSourceIndexMapping = [];
/** @type {[string | null, string | undefined][]} */
const innerSourceIndexValueMapping = [];
/** @type {(string | undefined)[]} */
const innerSourceContents = [];
/** @type {(null | undefined | string[])[]} */
const innerSourceContentLines = [];
/** @type {number[]} */
const innerNameIndexMapping = [];
/** @type {string[]} */
const innerNameIndexValueMapping = [];
/** @typedef {[number, number, number, number, number] | number[]} MappingsData */
/** @type {{ chunks: string[], mappingsData: MappingsData }[]} */
const innerSourceMapLineData = [];
/**
* @param {number} line line
* @param {number} column column
* @returns {number} result
*/
const findInnerMapping = (line, column) => {
if (line > innerSourceMapLineData.length) return -1;
const { mappingsData } = innerSourceMapLineData[line - 1];
let l = 0;
let r = mappingsData.length / 5;
while (l < r) {
const m = (l + r) >> 1;
if (mappingsData[m * 5] <= column) {
l = m + 1;
} else {
r = m;
}
}
if (l === 0) return -1;
return l - 1;
};
return streamChunksOfSourceMap(
source,
sourceMap,
(
chunk,
generatedLine,
generatedColumn,
sourceIndex,
originalLine,
originalColumn,
nameIndex,
) => {
// Check if this is a mapping to the inner source
if (sourceIndex === outerSourceIndex) {
// Check if there is a mapping in the inner source
const idx = findInnerMapping(originalLine, originalColumn);
if (idx !== -1) {
const { chunks, mappingsData } =
innerSourceMapLineData[originalLine - 1];
const mi = idx * 5;
const innerSourceIndex = mappingsData[mi + 1];
const innerOriginalLine = mappingsData[mi + 2];
let innerOriginalColumn = mappingsData[mi + 3];
let innerNameIndex = mappingsData[mi + 4];
if (innerSourceIndex >= 0) {
// Check for an identity mapping
// where we are allowed to adjust the original column
const innerChunk = chunks[idx];
const innerGeneratedColumn = mappingsData[mi];
const locationInChunk = originalColumn - innerGeneratedColumn;
if (locationInChunk > 0) {
let originalSourceLines =
innerSourceIndex < innerSourceContentLines.length
? innerSourceContentLines[innerSourceIndex]
: null;
if (originalSourceLines === undefined) {
const originalSource = innerSourceContents[innerSourceIndex];
originalSourceLines = originalSource
? splitIntoLines(originalSource)
: null;
innerSourceContentLines[innerSourceIndex] = originalSourceLines;
}
if (originalSourceLines !== null) {
const originalChunk =
innerOriginalLine <= originalSourceLines.length
? originalSourceLines[innerOriginalLine - 1].slice(
innerOriginalColumn,
innerOriginalColumn + locationInChunk,
)
: "";
if (innerChunk.slice(0, locationInChunk) === originalChunk) {
innerOriginalColumn += locationInChunk;
innerNameIndex = -1;
}
}
}
// We have a inner mapping to original source
// emit source when needed and compute global source index
let sourceIndex =
innerSourceIndex < innerSourceIndexMapping.length
? innerSourceIndexMapping[innerSourceIndex]
: -2;
if (sourceIndex === -2) {
const [source, sourceContent] =
innerSourceIndex < innerSourceIndexValueMapping.length
? innerSourceIndexValueMapping[innerSourceIndex]
: [null, undefined];
let globalIndex = sourceMapping.get(source);
if (globalIndex === undefined) {
sourceMapping.set(source, (globalIndex = sourceMapping.size));
onSource(globalIndex, source, sourceContent);
}
sourceIndex = globalIndex;
innerSourceIndexMapping[innerSourceIndex] = sourceIndex;
}
// emit name when needed and compute global name index
let finalNameIndex = -1;
if (innerNameIndex >= 0) {
// when we have a inner name
finalNameIndex =
innerNameIndex < innerNameIndexMapping.length
? innerNameIndexMapping[innerNameIndex]
: -2;
if (finalNameIndex === -2) {
const name =
innerNameIndex < innerNameIndexValueMapping.length
? innerNameIndexValueMapping[innerNameIndex]
: undefined;
if (name) {
let globalIndex = nameMapping.get(name);
if (globalIndex === undefined) {
nameMapping.set(name, (globalIndex = nameMapping.size));
onName(globalIndex, name);
}
finalNameIndex = globalIndex;
} else {
finalNameIndex = -1;
}
innerNameIndexMapping[innerNameIndex] = finalNameIndex;
}
} else if (nameIndex >= 0) {
// when we don't have an inner name,
// but we have an outer name
// it can be used when inner original code equals to the name
let originalSourceLines =
innerSourceContentLines[innerSourceIndex];
if (originalSourceLines === undefined) {
const originalSource = innerSourceContents[innerSourceIndex];
originalSourceLines = originalSource
? splitIntoLines(originalSource)
: null;
innerSourceContentLines[innerSourceIndex] = originalSourceLines;
}
if (originalSourceLines !== null) {
const name = nameIndexValueMapping[nameIndex];
const originalName =
innerOriginalLine <= originalSourceLines.length
? originalSourceLines[innerOriginalLine - 1].slice(
innerOriginalColumn,
innerOriginalColumn + name.length,
)
: "";
if (name === originalName) {
finalNameIndex =
nameIndex < nameIndexMapping.length
? nameIndexMapping[nameIndex]
: -2;
if (finalNameIndex === -2) {
const name = nameIndexValueMapping[nameIndex];
if (name) {
let globalIndex = nameMapping.get(name);
if (globalIndex === undefined) {
nameMapping.set(name, (globalIndex = nameMapping.size));
onName(globalIndex, name);
}
finalNameIndex = globalIndex;
} else {
finalNameIndex = -1;
}
nameIndexMapping[nameIndex] = finalNameIndex;
}
}
}
}
onChunk(
chunk,
generatedLine,
generatedColumn,
sourceIndex,
innerOriginalLine,
innerOriginalColumn,
finalNameIndex,
);
return;
}
}
// We have a mapping to the inner source, but no inner mapping
if (removeInnerSource) {
onChunk(chunk, generatedLine, generatedColumn, -1, -1, -1, -1);
return;
}
if (sourceIndexMapping[sourceIndex] === -2) {
let globalIndex = sourceMapping.get(innerSourceName);
if (globalIndex === undefined) {
sourceMapping.set(source, (globalIndex = sourceMapping.size));
onSource(globalIndex, innerSourceName, innerSource);
}
sourceIndexMapping[sourceIndex] = globalIndex;
}
}
const finalSourceIndex =
sourceIndex < 0 || sourceIndex >= sourceIndexMapping.length
? -1
: sourceIndexMapping[sourceIndex];
if (finalSourceIndex < 0) {
// no source, so we make it a generated chunk
onChunk(chunk, generatedLine, generatedColumn, -1, -1, -1, -1);
} else {
// Pass through the chunk with mapping
let finalNameIndex = -1;
if (nameIndex >= 0 && nameIndex < nameIndexMapping.length) {
finalNameIndex = nameIndexMapping[nameIndex];
if (finalNameIndex === -2) {
const name = nameIndexValueMapping[nameIndex];
let globalIndex = nameMapping.get(name);
if (globalIndex === undefined) {
nameMapping.set(name, (globalIndex = nameMapping.size));
onName(globalIndex, name);
}
finalNameIndex = globalIndex;
nameIndexMapping[nameIndex] = finalNameIndex;
}
}
onChunk(
chunk,
generatedLine,
generatedColumn,
finalSourceIndex,
originalLine,
originalColumn,
finalNameIndex,
);
}
},
(i, source, sourceContent) => {
if (source === innerSourceName) {
outerSourceIndex = i;
if (innerSource !== undefined) sourceContent = innerSource;
else innerSource = /** @type {string} */ (sourceContent);
sourceIndexMapping[i] = -2;
streamChunksOfSourceMap(
/** @type {string} */
(sourceContent),
innerSourceMap,
(
chunk,
generatedLine,
generatedColumn,
sourceIndex,
originalLine,
originalColumn,
nameIndex,
) => {
while (innerSourceMapLineData.length < generatedLine) {
innerSourceMapLineData.push({
mappingsData: [],
chunks: [],
});
}
const data = innerSourceMapLineData[generatedLine - 1];
data.mappingsData.push(
generatedColumn,
sourceIndex,
originalLine,
originalColumn,
nameIndex,
);
data.chunks.push(/** @type {string} */ (chunk));
},
(i, source, sourceContent) => {
innerSourceContents[i] = sourceContent;
innerSourceContentLines[i] = undefined;
innerSourceIndexMapping[i] = -2;
innerSourceIndexValueMapping[i] = [source, sourceContent];
},
(i, name) => {
innerNameIndexMapping[i] = -2;
innerNameIndexValueMapping[i] = name;
},
false,
columns,
);
} else {
let globalIndex = sourceMapping.get(source);
if (globalIndex === undefined) {
sourceMapping.set(source, (globalIndex = sourceMapping.size));
onSource(globalIndex, source, sourceContent);
}
sourceIndexMapping[i] = globalIndex;
}
},
(i, name) => {
nameIndexMapping[i] = -2;
nameIndexValueMapping[i] = name;
},
finalSource,
columns,
);
};
module.exports = streamChunksOfCombinedSourceMap;
@@ -0,0 +1,9 @@
/**
* @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.
*/
export { default } from './circle-divide.js';
//# sourceMappingURL=divide-circle.js.map
@@ -0,0 +1,10 @@
"use strict";
exports.endOfDay = void 0;
var _index = require("../endOfDay.js");
var _index2 = require("./_lib/convertToFP.js"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
const endOfDay = (exports.endOfDay = (0, _index2.convertToFP)(
_index.endOfDay,
1,
));
@@ -0,0 +1,9 @@
import type { Field } from '@aws-sdk/client-rds-data';
import { TypeHint } from '@aws-sdk/client-rds-data';
import type { QueryTypingsValue } from "../../sql/sql.js";
export declare function getValueFromDataApi(field: Field): string | number | boolean | string[] | number[] | Uint8Array | boolean[] | import("@aws-sdk/client-rds-data").ArrayValue[] | null;
export declare function typingsToAwsTypeHint(typings?: QueryTypingsValue): TypeHint | undefined;
export declare function toValueParam(value: any, typings?: QueryTypingsValue): {
value: Field;
typeHint?: TypeHint;
};
@@ -0,0 +1,21 @@
'use client';
import { jsx as _jsx } from "react/jsx-runtime";
import React from 'react';
const baseClass = 'paginator__page';
export const Page = ({
isCurrent,
isFirstPage = false,
isLastPage = false,
page = 1,
updatePage
}) => {
const classes = [baseClass, isCurrent && `${baseClass}--is-current`, isFirstPage && `${baseClass}--is-first-page`, isLastPage && `${baseClass}--is-last-page`].filter(Boolean).join(' ');
return /*#__PURE__*/_jsx("button", {
className: classes,
onClick: () => updatePage(page),
type: "button",
children: page
});
};
//# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
{"version":3,"sources":["../../src/utilities/slugify.ts"],"sourcesContent":["export const slugify = (val?: string): string | undefined =>\n val\n ?.replace(/ /g, '-')\n .replace(/[^\\w-]+/g, '')\n .toLowerCase()\n"],"names":["slugify","val","replace","toLowerCase"],"mappings":"AAAA,OAAO,MAAMA,UAAU,CAACC,MACtBA,KACIC,QAAQ,MAAM,KACfA,QAAQ,YAAY,IACpBC,cAAa"}
@@ -0,0 +1,14 @@
import { getNameFromDrizzleTable } from '../utilities/getNameFromDrizzleTable.js';
export const addJoinTable = ({ type, condition, joins, queryPath, table })=>{
const name = getNameFromDrizzleTable(table);
if (!joins.some((eachJoin)=>getNameFromDrizzleTable(eachJoin.table) === name)) {
joins.push({
type,
condition,
queryPath,
table
});
}
};
//# sourceMappingURL=addJoinTable.js.map
@@ -0,0 +1,4 @@
export {
macros
} from "./emotion-babel-plugin.cjs.js";
export { _default as default } from "./emotion-babel-plugin.cjs.default.js";

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