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

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

View File

@@ -0,0 +1,173 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const util = require("util");
const memoize = require("./util/memoize");
/** @typedef {import("tapable").Tap} Tap */
/** @typedef {import("webpack-sources").Source} Source */
/** @typedef {import("./Chunk")} Chunk */
/** @typedef {import("./Compilation")} Compilation */
/** @typedef {import("./DependencyTemplates")} DependencyTemplates */
/** @typedef {import("./Module")} Module */
/** @typedef {import("./RuntimeTemplate")} RuntimeTemplate */
/** @typedef {import("./javascript/JavascriptModulesPlugin").ChunkRenderContext} ChunkRenderContext */
/** @typedef {import("./javascript/JavascriptModulesPlugin").ModuleRenderContext} ModuleRenderContext */
/** @typedef {import("./util/Hash")} Hash */
/**
* @template T
* @typedef {import("tapable").IfSet<T>} IfSet
*/
const getJavascriptModulesPlugin = memoize(() =>
require("./javascript/JavascriptModulesPlugin")
);
// TODO webpack 6: remove this class
class ModuleTemplate {
/**
* @param {RuntimeTemplate} runtimeTemplate the runtime template
* @param {Compilation} compilation the compilation
*/
constructor(runtimeTemplate, compilation) {
this._runtimeTemplate = runtimeTemplate;
this.type = "javascript";
this.hooks = Object.freeze({
content: {
tap: util.deprecate(
/**
* @template AdditionalOptions
* @param {string | Tap & IfSet<AdditionalOptions>} options options
* @param {(source: Source, module: Module, moduleRenderContext: ModuleRenderContext, dependencyTemplates: DependencyTemplates) => Source} fn fn
*/
(options, fn) => {
getJavascriptModulesPlugin()
.getCompilationHooks(compilation)
.renderModuleContent.tap(
options,
(source, module, renderContext) =>
fn(
source,
module,
renderContext,
renderContext.dependencyTemplates
)
);
},
"ModuleTemplate.hooks.content is deprecated (use JavascriptModulesPlugin.getCompilationHooks().renderModuleContent instead)",
"DEP_MODULE_TEMPLATE_CONTENT"
)
},
module: {
tap: util.deprecate(
/**
* @template AdditionalOptions
* @param {string | Tap & IfSet<AdditionalOptions>} options options
* @param {(source: Source, module: Module, moduleRenderContext: ModuleRenderContext, dependencyTemplates: DependencyTemplates) => Source} fn fn
*/
(options, fn) => {
getJavascriptModulesPlugin()
.getCompilationHooks(compilation)
.renderModuleContent.tap(
options,
(source, module, renderContext) =>
fn(
source,
module,
renderContext,
renderContext.dependencyTemplates
)
);
},
"ModuleTemplate.hooks.module is deprecated (use JavascriptModulesPlugin.getCompilationHooks().renderModuleContent instead)",
"DEP_MODULE_TEMPLATE_MODULE"
)
},
render: {
tap: util.deprecate(
/**
* @template AdditionalOptions
* @param {string | Tap & IfSet<AdditionalOptions>} options options
* @param {(source: Source, module: Module, chunkRenderContext: ChunkRenderContext, dependencyTemplates: DependencyTemplates) => Source} fn fn
*/
(options, fn) => {
getJavascriptModulesPlugin()
.getCompilationHooks(compilation)
.renderModuleContainer.tap(
options,
(source, module, renderContext) =>
fn(
source,
module,
renderContext,
renderContext.dependencyTemplates
)
);
},
"ModuleTemplate.hooks.render is deprecated (use JavascriptModulesPlugin.getCompilationHooks().renderModuleContainer instead)",
"DEP_MODULE_TEMPLATE_RENDER"
)
},
package: {
tap: util.deprecate(
/**
* @template AdditionalOptions
* @param {string | Tap & IfSet<AdditionalOptions>} options options
* @param {(source: Source, module: Module, chunkRenderContext: ChunkRenderContext, dependencyTemplates: DependencyTemplates) => Source} fn fn
*/
(options, fn) => {
getJavascriptModulesPlugin()
.getCompilationHooks(compilation)
.renderModulePackage.tap(
options,
(source, module, renderContext) =>
fn(
source,
module,
renderContext,
renderContext.dependencyTemplates
)
);
},
"ModuleTemplate.hooks.package is deprecated (use JavascriptModulesPlugin.getCompilationHooks().renderModulePackage instead)",
"DEP_MODULE_TEMPLATE_PACKAGE"
)
},
hash: {
tap: util.deprecate(
/**
* @template AdditionalOptions
* @param {string | Tap & IfSet<AdditionalOptions>} options options
* @param {(hash: Hash) => void} fn fn
*/
(options, fn) => {
compilation.hooks.fullHash.tap(options, fn);
},
"ModuleTemplate.hooks.hash is deprecated (use Compilation.hooks.fullHash instead)",
"DEP_MODULE_TEMPLATE_HASH"
)
}
});
}
}
Object.defineProperty(ModuleTemplate.prototype, "runtimeTemplate", {
get: util.deprecate(
/**
* @this {ModuleTemplate}
* @returns {RuntimeTemplate} output options
*/
function runtimeTemplate() {
return this._runtimeTemplate;
},
"ModuleTemplate.runtimeTemplate is deprecated (use Compilation.runtimeTemplate instead)",
"DEP_WEBPACK_CHUNK_TEMPLATE_OUTPUT_OPTIONS"
)
});
module.exports = ModuleTemplate;

View File

@@ -0,0 +1,80 @@
/**
* Deprecated, use `db.namespace` instead.
*
* @example customers
* @example main
*
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*
* @deprecated Replaced by `db.namespace`.
*/
export declare const ATTR_DB_NAME: "db.name";
/**
* Deprecated, use `db.collection.name` instead.
*
* @example "mytable"
*
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*
* @deprecated Replaced by `db.collection.name`, but only if not extracting the value from `db.query.text`.
*/
export declare const ATTR_DB_SQL_TABLE: "db.sql.table";
/**
* The database statement being executed.
*
* @example SELECT * FROM wuser_table
* @example SET mykey "WuValue"
*
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*
* @deprecated Replaced by `db.query.text`.
*/
export declare const ATTR_DB_STATEMENT: "db.statement";
/**
* Deprecated, use `db.system.name` instead.
*
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*
* @deprecated Replaced by `db.system.name`.
*/
export declare const ATTR_DB_SYSTEM: "db.system";
/**
* Deprecated, no replacement at this time.
*
* @example readonly_user
* @example reporting_user
*
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*
* @deprecated Removed, no replacement at this time.
*/
export declare const ATTR_DB_USER: "db.user";
/**
* Deprecated, use `server.address` on client spans and `client.address` on server spans.
*
* @example example.com
*
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*
* @deprecated Replaced by `server.address` on client spans and `client.address` on server spans.
*/
export declare const ATTR_NET_PEER_NAME: "net.peer.name";
/**
* Deprecated, use `server.port` on client spans and `client.port` on server spans.
*
* @example 8080
*
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*
* @deprecated Replaced by `server.port` on client spans and `client.port` on server spans.
*/
export declare const ATTR_NET_PEER_PORT: "net.peer.port";
/**
* Enum value "mssql" for attribute {@link ATTR_DB_SYSTEM}.
*
* Microsoft SQL Server
*
* @experimental This enum value is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*/
export declare const DB_SYSTEM_VALUE_MSSQL: "mssql";
//# sourceMappingURL=semconv.d.ts.map

View File

@@ -0,0 +1,23 @@
import ObjectIdImport from 'bson-objectid';
const ObjectId = 'default' in ObjectIdImport ? ObjectIdImport.default : ObjectIdImport;
export const isValidID = (value, type)=>{
if (type === 'text' && value) {
if ([
'object',
'string'
].includes(typeof value)) {
const isObjectID = ObjectId.isValid(value);
return typeof value === 'string' || isObjectID;
}
return false;
}
if (type === 'number' && typeof value === 'number' && !Number.isNaN(value)) {
return true;
}
if (type === 'ObjectID') {
return ObjectId.isValid(String(value));
}
return false;
};
//# sourceMappingURL=isValidID.js.map

View File

@@ -0,0 +1,493 @@
// functions
export function assertEqual(val) {
return val;
}
export function assertNotEqual(val) {
return val;
}
export function assertIs(_arg) { }
export function assertNever(_x) {
throw new Error();
}
export function assert(_) { }
export function getEnumValues(entries) {
const numericValues = Object.values(entries).filter((v) => typeof v === "number");
const values = Object.entries(entries)
.filter(([k, _]) => numericValues.indexOf(+k) === -1)
.map(([_, v]) => v);
return values;
}
export function joinValues(array, separator = "|") {
return array.map((val) => stringifyPrimitive(val)).join(separator);
}
export function jsonStringifyReplacer(_, value) {
if (typeof value === "bigint")
return value.toString();
return value;
}
export function cached(getter) {
const set = false;
return {
get value() {
if (!set) {
const value = getter();
Object.defineProperty(this, "value", { value });
return value;
}
throw new Error("cached value already set");
},
};
}
export function nullish(input) {
return input === null || input === undefined;
}
export function cleanRegex(source) {
const start = source.startsWith("^") ? 1 : 0;
const end = source.endsWith("$") ? source.length - 1 : source.length;
return source.slice(start, end);
}
export function floatSafeRemainder(val, step) {
const valDecCount = (val.toString().split(".")[1] || "").length;
const stepDecCount = (step.toString().split(".")[1] || "").length;
const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
const valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""));
const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
return (valInt % stepInt) / 10 ** decCount;
}
export function defineLazy(object, key, getter) {
const set = false;
Object.defineProperty(object, key, {
get() {
if (!set) {
const value = getter();
object[key] = value;
return value;
}
throw new Error("cached value already set");
},
set(v) {
Object.defineProperty(object, key, {
value: v,
// configurable: true,
});
// object[key] = v;
},
configurable: true,
});
}
export function assignProp(target, prop, value) {
Object.defineProperty(target, prop, {
value,
writable: true,
enumerable: true,
configurable: true,
});
}
export function getElementAtPath(obj, path) {
if (!path)
return obj;
return path.reduce((acc, key) => acc?.[key], obj);
}
export function promiseAllObject(promisesObj) {
const keys = Object.keys(promisesObj);
const promises = keys.map((key) => promisesObj[key]);
return Promise.all(promises).then((results) => {
const resolvedObj = {};
for (let i = 0; i < keys.length; i++) {
resolvedObj[keys[i]] = results[i];
}
return resolvedObj;
});
}
export function randomString(length = 10) {
const chars = "abcdefghijklmnopqrstuvwxyz";
let str = "";
for (let i = 0; i < length; i++) {
str += chars[Math.floor(Math.random() * chars.length)];
}
return str;
}
export function esc(str) {
return JSON.stringify(str);
}
export const captureStackTrace = Error.captureStackTrace
? Error.captureStackTrace
: (..._args) => { };
export function isObject(data) {
return typeof data === "object" && data !== null && !Array.isArray(data);
}
export const allowsEval = cached(() => {
if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) {
return false;
}
try {
const F = Function;
new F("");
return true;
}
catch (_) {
return false;
}
});
export function isPlainObject(o) {
if (isObject(o) === false)
return false;
// modified constructor
const ctor = o.constructor;
if (ctor === undefined)
return true;
// modified prototype
const prot = ctor.prototype;
if (isObject(prot) === false)
return false;
// ctor doesn't have static `isPrototypeOf`
if (Object.prototype.hasOwnProperty.call(prot, "isPrototypeOf") === false) {
return false;
}
return true;
}
export function numKeys(data) {
let keyCount = 0;
for (const key in data) {
if (Object.prototype.hasOwnProperty.call(data, key)) {
keyCount++;
}
}
return keyCount;
}
export const getParsedType = (data) => {
const t = typeof data;
switch (t) {
case "undefined":
return "undefined";
case "string":
return "string";
case "number":
return Number.isNaN(data) ? "nan" : "number";
case "boolean":
return "boolean";
case "function":
return "function";
case "bigint":
return "bigint";
case "symbol":
return "symbol";
case "object":
if (Array.isArray(data)) {
return "array";
}
if (data === null) {
return "null";
}
if (data.then && typeof data.then === "function" && data.catch && typeof data.catch === "function") {
return "promise";
}
if (typeof Map !== "undefined" && data instanceof Map) {
return "map";
}
if (typeof Set !== "undefined" && data instanceof Set) {
return "set";
}
if (typeof Date !== "undefined" && data instanceof Date) {
return "date";
}
if (typeof File !== "undefined" && data instanceof File) {
return "file";
}
return "object";
default:
throw new Error(`Unknown data type: ${t}`);
}
};
export const propertyKeyTypes = new Set(["string", "number", "symbol"]);
export const primitiveTypes = new Set(["string", "number", "bigint", "boolean", "symbol", "undefined"]);
export function escapeRegex(str) {
return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
}
// zod-specific utils
export function clone(inst, def, params) {
const cl = new inst._zod.constr(def ?? inst._zod.def);
if (!def || params?.parent)
cl._zod.parent = inst;
return cl;
}
export function normalizeParams(_params) {
const params = _params;
if (!params)
return {};
if (typeof params === "string")
return { error: () => params };
if (params?.message !== undefined) {
if (params?.error !== undefined)
throw new Error("Cannot specify both `message` and `error` params");
params.error = params.message;
}
delete params.message;
if (typeof params.error === "string")
return { ...params, error: () => params.error };
return params;
}
export function createTransparentProxy(getter) {
let target;
return new Proxy({}, {
get(_, prop, receiver) {
target ?? (target = getter());
return Reflect.get(target, prop, receiver);
},
set(_, prop, value, receiver) {
target ?? (target = getter());
return Reflect.set(target, prop, value, receiver);
},
has(_, prop) {
target ?? (target = getter());
return Reflect.has(target, prop);
},
deleteProperty(_, prop) {
target ?? (target = getter());
return Reflect.deleteProperty(target, prop);
},
ownKeys(_) {
target ?? (target = getter());
return Reflect.ownKeys(target);
},
getOwnPropertyDescriptor(_, prop) {
target ?? (target = getter());
return Reflect.getOwnPropertyDescriptor(target, prop);
},
defineProperty(_, prop, descriptor) {
target ?? (target = getter());
return Reflect.defineProperty(target, prop, descriptor);
},
});
}
export function stringifyPrimitive(value) {
if (typeof value === "bigint")
return value.toString() + "n";
if (typeof value === "string")
return `"${value}"`;
return `${value}`;
}
export function optionalKeys(shape) {
return Object.keys(shape).filter((k) => {
return shape[k]._zod.optin === "optional" && shape[k]._zod.optout === "optional";
});
}
export const NUMBER_FORMAT_RANGES = {
safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
int32: [-2147483648, 2147483647],
uint32: [0, 4294967295],
float32: [-3.4028234663852886e38, 3.4028234663852886e38],
float64: [-Number.MAX_VALUE, Number.MAX_VALUE],
};
export const BIGINT_FORMAT_RANGES = {
int64: [/* @__PURE__*/ BigInt("-9223372036854775808"), /* @__PURE__*/ BigInt("9223372036854775807")],
uint64: [/* @__PURE__*/ BigInt(0), /* @__PURE__*/ BigInt("18446744073709551615")],
};
export function pick(schema, mask) {
const newShape = {};
const currDef = schema._zod.def; //.shape;
for (const key in mask) {
if (!(key in currDef.shape)) {
throw new Error(`Unrecognized key: "${key}"`);
}
if (!mask[key])
continue;
// pick key
newShape[key] = currDef.shape[key];
}
return clone(schema, {
...schema._zod.def,
shape: newShape,
checks: [],
});
}
export function omit(schema, mask) {
const newShape = { ...schema._zod.def.shape };
const currDef = schema._zod.def; //.shape;
for (const key in mask) {
if (!(key in currDef.shape)) {
throw new Error(`Unrecognized key: "${key}"`);
}
if (!mask[key])
continue;
delete newShape[key];
}
return clone(schema, {
...schema._zod.def,
shape: newShape,
checks: [],
});
}
export function extend(schema, shape) {
if (!isPlainObject(shape)) {
throw new Error("Invalid input to extend: expected a plain object");
}
const def = {
...schema._zod.def,
get shape() {
const _shape = { ...schema._zod.def.shape, ...shape };
assignProp(this, "shape", _shape); // self-caching
return _shape;
},
checks: [], // delete existing checks
};
return clone(schema, def);
}
export function merge(a, b) {
return clone(a, {
...a._zod.def,
get shape() {
const _shape = { ...a._zod.def.shape, ...b._zod.def.shape };
assignProp(this, "shape", _shape); // self-caching
return _shape;
},
catchall: b._zod.def.catchall,
checks: [], // delete existing checks
});
}
export function partial(Class, schema, mask) {
const oldShape = schema._zod.def.shape;
const shape = { ...oldShape };
if (mask) {
for (const key in mask) {
if (!(key in oldShape)) {
throw new Error(`Unrecognized key: "${key}"`);
}
if (!mask[key])
continue;
// if (oldShape[key]!._zod.optin === "optional") continue;
shape[key] = Class
? new Class({
type: "optional",
innerType: oldShape[key],
})
: oldShape[key];
}
}
else {
for (const key in oldShape) {
// if (oldShape[key]!._zod.optin === "optional") continue;
shape[key] = Class
? new Class({
type: "optional",
innerType: oldShape[key],
})
: oldShape[key];
}
}
return clone(schema, {
...schema._zod.def,
shape,
checks: [],
});
}
export function required(Class, schema, mask) {
const oldShape = schema._zod.def.shape;
const shape = { ...oldShape };
if (mask) {
for (const key in mask) {
if (!(key in shape)) {
throw new Error(`Unrecognized key: "${key}"`);
}
if (!mask[key])
continue;
// overwrite with non-optional
shape[key] = new Class({
type: "nonoptional",
innerType: oldShape[key],
});
}
}
else {
for (const key in oldShape) {
// overwrite with non-optional
shape[key] = new Class({
type: "nonoptional",
innerType: oldShape[key],
});
}
}
return clone(schema, {
...schema._zod.def,
shape,
// optional: [],
checks: [],
});
}
export function aborted(x, startIndex = 0) {
for (let i = startIndex; i < x.issues.length; i++) {
if (x.issues[i]?.continue !== true)
return true;
}
return false;
}
export function prefixIssues(path, issues) {
return issues.map((iss) => {
var _a;
(_a = iss).path ?? (_a.path = []);
iss.path.unshift(path);
return iss;
});
}
export function unwrapMessage(message) {
return typeof message === "string" ? message : message?.message;
}
export function finalizeIssue(iss, ctx, config) {
const full = { ...iss, path: iss.path ?? [] };
// for backwards compatibility
if (!iss.message) {
const message = unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ??
unwrapMessage(ctx?.error?.(iss)) ??
unwrapMessage(config.customError?.(iss)) ??
unwrapMessage(config.localeError?.(iss)) ??
"Invalid input";
full.message = message;
}
// delete (full as any).def;
delete full.inst;
delete full.continue;
if (!ctx?.reportInput) {
delete full.input;
}
return full;
}
export function getSizableOrigin(input) {
if (input instanceof Set)
return "set";
if (input instanceof Map)
return "map";
if (input instanceof File)
return "file";
return "unknown";
}
export function getLengthableOrigin(input) {
if (Array.isArray(input))
return "array";
if (typeof input === "string")
return "string";
return "unknown";
}
export function issue(...args) {
const [iss, input, inst] = args;
if (typeof iss === "string") {
return {
message: iss,
code: "custom",
input,
inst,
};
}
return { ...iss };
}
export function cleanEnum(obj) {
return Object.entries(obj)
.filter(([k, _]) => {
// return true if NaN, meaning it's not a number, thus a string key
return Number.isNaN(Number.parseInt(k, 10));
})
.map((el) => el[1]);
}
// instanceof
export class Class {
constructor(..._args) { }
}

View File

@@ -0,0 +1,30 @@
import { status as httpStatus } from 'http-status';
import { getRequestCollection } from '../../utilities/getRequestEntity.js';
import { headersWithCors } from '../../utilities/headersWithCors.js';
import { unlockOperation } from '../operations/unlock.js';
export const unlockHandler = async (req)=>{
const collection = getRequestCollection(req);
const { t } = req;
const authData = collection.config.auth?.loginWithUsername !== false ? {
email: typeof req.data?.email === 'string' ? req.data.email : '',
username: typeof req.data?.username === 'string' ? req.data.username : ''
} : {
email: typeof req.data?.email === 'string' ? req.data.email : ''
};
await unlockOperation({
collection,
data: authData,
req
});
return Response.json({
message: t('general:success')
}, {
headers: headersWithCors({
headers: new Headers(),
req
}),
status: httpStatus.OK
});
};
//# sourceMappingURL=unlock.js.map

View File

@@ -0,0 +1,13 @@
import type { UseDraggableArguments } from '@dnd-kit/core';
import type { SyntheticListenerMap } from '@dnd-kit/core/dist/hooks/utilities';
import type React from 'react';
import type { UseDraggableSortableReturn } from '../useDraggableSortable/types.js';
export type DragHandleProps = {
attributes: UseDraggableArguments['attributes'];
listeners: SyntheticListenerMap;
} & UseDraggableArguments;
export type ChildFunction = (args: UseDraggableSortableReturn) => React.ReactNode;
export type Props = {
children: ChildFunction;
} & UseDraggableArguments;
//# sourceMappingURL=types.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"errorboundary.d.ts","sourceRoot":"","sources":["../../src/errorboundary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAE3D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,eAAO,MAAM,iBAAiB,YAAY,CAAC;AAE3C,MAAM,MAAM,cAAc,GAAG,CAAC,SAAS,EAAE;IACvC,KAAK,EAAE,OAAO,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,IAAI,IAAI,CAAC;CACpB,KAAK,KAAK,CAAC,YAAY,CAAC;AAEzB,KAAK,aAAa,GAAG;IACnB,CAAC,KAAK,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,GAAG,IAAI,CAAC;IACzD,CAAC,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACjE,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,CAAC,MAAM,KAAK,CAAC,SAAS,CAAC,CAAC;IACrD,4DAA4D;IAC5D,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACjC;;;OAGG;IACH,aAAa,CAAC,EAAE,mBAAmB,GAAG,SAAS,CAAC;IAChD;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,YAAY,GAAG,cAAc,GAAG,SAAS,CAAC;IAC3D;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B,yDAAyD;IACzD,OAAO,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAC1F,oCAAoC;IACpC,OAAO,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC;IACnC;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAC1F;;;;;OAKG;IACH,SAAS,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;IACtC,2GAA2G;IAC3G,aAAa,CAAC,EAAE,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;CAC9F,CAAC;AAEF,KAAK,kBAAkB,GACnB;IACE,cAAc,EAAE,IAAI,CAAC;IACrB,KAAK,EAAE,IAAI,CAAC;IACZ,OAAO,EAAE,IAAI,CAAC;CACf,GACD;IACE,cAAc,EAAE,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAClD,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAQN;;;;;GAKG;AACH,cAAM,aAAc,SAAQ,KAAK,CAAC,SAAS,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;IAC1E,KAAK,EAAE,kBAAkB,CAAC;IAEjC,OAAO,CAAC,QAAQ,CAAC,yBAAyB,CAAU;IAEpD,OAAO,CAAC,YAAY,CAAC,CAAS;IAC9B,OAAO,CAAC,YAAY,CAAC,CAAa;gBAEf,KAAK,EAAE,kBAAkB;IAiBrC,iBAAiB,CAAC,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,GAAG,IAAI;IA6BnE,iBAAiB,IAAI,IAAI;IAOzB,oBAAoB,IAAI,IAAI;IAqB5B,kBAAkB,IAAI,IAAI;IAY1B,MAAM,IAAI,KAAK,CAAC,SAAS;CAgCjC;AAGD,iBAAS,iBAAiB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACtD,gBAAgB,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,EACxC,oBAAoB,EAAE,kBAAkB,GACvC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAeb;AAED,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,CAAC"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"access.d.ts","sourceRoot":"","sources":["../../../src/auth/endpoints/access.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAK3D,eAAO,MAAM,aAAa,EAAE,cA0B3B,CAAA"}

View File

@@ -0,0 +1,29 @@
import { winterCGHeadersToDict, httpHeadersToSpanAttributes, getClient } from '@sentry/core';
/**
* Extracts HTTP request headers as span attributes and optionally applies them to a span.
*/
function addHeadersAsAttributes(
headers,
span,
) {
if (!headers) {
return {};
}
const headersDict =
headers instanceof Headers || (typeof headers === 'object' && 'get' in headers)
? winterCGHeadersToDict(headers )
: headers;
const headerAttributes = httpHeadersToSpanAttributes(headersDict, getClient()?.getOptions().sendDefaultPii ?? false);
if (span) {
span.setAttributes(headerAttributes);
}
return headerAttributes;
}
export { addHeadersAsAttributes };
//# sourceMappingURL=addHeadersAsAttributes.js.map

View File

@@ -0,0 +1,30 @@
"use strict";
exports.endOfYesterday = endOfYesterday; /**
* @name endOfYesterday
* @category Day Helpers
* @summary Return the end of yesterday.
* @pure false
*
* @description
* Return the end of yesterday.
*
* @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).
*
* @returns The end of yesterday
*
* @example
* // If today is 6 October 2014:
* const result = endOfYesterday()
* //=> Sun Oct 5 2014 23:59:59.999
*/
function endOfYesterday() {
const now = new Date();
const year = now.getFullYear();
const month = now.getMonth();
const day = now.getDate();
const date = new Date(0);
date.setFullYear(year, month, day - 1);
date.setHours(23, 59, 59, 999);
return date;
}

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/drizzle-proxy/pg-core.ts"],"sourcesContent":["export * from 'drizzle-orm/pg-core'\n"],"names":[],"mappings":"AAAA,cAAc,sBAAqB"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"user-pen.js","sources":["../../../src/icons/user-pen.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name UserPen\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTEuNSAxNUg3YTQgNCAwIDAgMC00IDR2MiIgLz4KICA8cGF0aCBkPSJNMjEuMzc4IDE2LjYyNmExIDEgMCAwIDAtMy4wMDQtMy4wMDRsLTQuMDEgNC4wMTJhMiAyIDAgMCAwLS41MDYuODU0bC0uODM3IDIuODdhLjUuNSAwIDAgMCAuNjIuNjJsMi44Ny0uODM3YTIgMiAwIDAgMCAuODU0LS41MDZ6IiAvPgogIDxjaXJjbGUgY3g9IjEwIiBjeT0iNyIgcj0iNCIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/user-pen\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 UserPen = createLucideIcon('UserPen', [\n ['path', { d: 'M11.5 15H7a4 4 0 0 0-4 4v2', key: '15lzij' }],\n [\n 'path',\n {\n d: 'M21.378 16.626a1 1 0 0 0-3.004-3.004l-4.01 4.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z',\n key: '1817ys',\n },\n ],\n ['circle', { cx: '10', cy: '7', r: '4', key: 'e45bow' }],\n]);\n\nexport default UserPen;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,iBAAiB,SAAW,CAAA,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA8B,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,CAC3D,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,GAAA,CAAK,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA;AACzD,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"isURLAllowed.js","names":["isURLAllowed","url","allowList","parsedUrl","URL","some","allowItem","Object","entries","every","key","value","protocol","regexPattern","replace","regex","RegExp","test","pathname"],"sources":["../../src/utilities/isURLAllowed.ts"],"sourcesContent":["import type { AllowList } from 'payload'\n\nexport const isURLAllowed = (url: string, allowList: AllowList): boolean => {\n try {\n const parsedUrl = new URL(url)\n\n return allowList.some((allowItem) => {\n return Object.entries(allowItem).every(([key, value]) => {\n // Skip undefined or null values\n if (!value) {\n return true\n }\n // Compare protocol with colon\n if (key === 'protocol') {\n return typeof value === 'string' && parsedUrl.protocol === `${value}:`\n }\n\n if (key === 'pathname') {\n // Convert wildcards to a regex\n const regexPattern = value\n .replace(/\\*\\*/g, '.*') // Match any path\n .replace(/\\*/g, '[^/]*') // Match any part of a path segment\n const regex = new RegExp(`^${regexPattern}$`)\n return regex.test(parsedUrl.pathname)\n }\n\n // Default comparison for all other properties (hostname, port, search)\n return parsedUrl[key as keyof URL] === value\n })\n })\n } catch {\n return false // If the URL is invalid, deny by default\n }\n}\n"],"mappings":"AAEA,OAAO,MAAMA,YAAA,GAAeA,CAACC,GAAA,EAAaC,SAAA;EACxC,IAAI;IACF,MAAMC,SAAA,GAAY,IAAIC,GAAA,CAAIH,GAAA;IAE1B,OAAOC,SAAA,CAAUG,IAAI,CAAEC,SAAA;MACrB,OAAOC,MAAA,CAAOC,OAAO,CAACF,SAAA,EAAWG,KAAK,CAAC,CAAC,CAACC,GAAA,EAAKC,KAAA,CAAM;QAClD;QACA,IAAI,CAACA,KAAA,EAAO;UACV,OAAO;QACT;QACA;QACA,IAAID,GAAA,KAAQ,YAAY;UACtB,OAAO,OAAOC,KAAA,KAAU,YAAYR,SAAA,CAAUS,QAAQ,KAAK,GAAGD,KAAA,GAAQ;QACxE;QAEA,IAAID,GAAA,KAAQ,YAAY;UACtB;UACA,MAAMG,YAAA,GAAeF,KAAA,CAClBG,OAAO,CAAC,SAAS,MAAM;UAAA,CACvBA,OAAO,CAAC,OAAO,SAAS;AAAA;UAC3B,MAAMC,KAAA,GAAQ,IAAIC,MAAA,CAAO,IAAIH,YAAA,GAAe;UAC5C,OAAOE,KAAA,CAAME,IAAI,CAACd,SAAA,CAAUe,QAAQ;QACtC;QAEA;QACA,OAAOf,SAAS,CAACO,GAAA,CAAiB,KAAKC,KAAA;MACzC;IACF;EACF,EAAE,MAAM;IACN,OAAO,MAAM;AAAA;EACf;AACF","ignoreList":[]}

View File

@@ -0,0 +1,26 @@
import { status as httpStatus } from 'http-status';
import { getRequestCollectionWithID } from '../../utilities/getRequestEntity.js';
import { headersWithCors } from '../../utilities/headersWithCors.js';
import { verifyEmailOperation } from '../operations/verifyEmail.js';
export const verifyEmailHandler = async (req)=>{
const { id, collection } = getRequestCollectionWithID(req, {
disableSanitize: true
});
const { t } = req;
await verifyEmailOperation({
collection,
req,
token: id
});
return Response.json({
message: t('authentication:accountVerified')
}, {
headers: headersWithCors({
headers: new Headers(),
req
}),
status: httpStatus.OK
});
};
//# sourceMappingURL=verifyEmail.js.map

View File

@@ -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 './LexicalBlockWithAlignableContents.dev.mjs';
import * as modProd from './LexicalBlockWithAlignableContents.prod.mjs';
const mod = process.env.NODE_ENV !== 'production' ? modDev : modProd;
export const BlockWithAlignableContents = mod.BlockWithAlignableContents;

View File

@@ -0,0 +1,7 @@
"use strict";
exports.isMatch = void 0;
var _index = require("../isMatch.js");
var _index2 = require("./_lib/convertToFP.js"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
const isMatch = (exports.isMatch = (0, _index2.convertToFP)(_index.isMatch, 2));

View File

@@ -0,0 +1,97 @@
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { diag } from '@opentelemetry/api';
import { inspect } from 'util';
/**
* Retrieves a number from an environment variable.
* - Returns `undefined` if the environment variable is empty, unset, contains only whitespace, or is not a number.
* - Returns a number in all other cases.
*
* @param {string} key - The name of the environment variable to retrieve.
* @returns {number | undefined} - The number value or `undefined`.
*/
export function getNumberFromEnv(key) {
const raw = process.env[key];
if (raw == null || raw.trim() === '') {
return undefined;
}
const value = Number(raw);
if (isNaN(value)) {
diag.warn(`Unknown value ${inspect(raw)} for ${key}, expected a number, using defaults`);
return undefined;
}
return value;
}
/**
* Retrieves a string from an environment variable.
* - Returns `undefined` if the environment variable is empty, unset, or contains only whitespace.
*
* @param {string} key - The name of the environment variable to retrieve.
* @returns {string | undefined} - The string value or `undefined`.
*/
export function getStringFromEnv(key) {
const raw = process.env[key];
if (raw == null || raw.trim() === '') {
return undefined;
}
return raw;
}
/**
* Retrieves a boolean value from an environment variable.
* - Trims leading and trailing whitespace and ignores casing.
* - Returns `false` if the environment variable is empty, unset, or contains only whitespace.
* - Returns `false` for strings that cannot be mapped to a boolean.
*
* @param {string} key - The name of the environment variable to retrieve.
* @returns {boolean} - The boolean value or `false` if the environment variable is unset empty, unset, or contains only whitespace.
*/
export function getBooleanFromEnv(key) {
const raw = process.env[key]?.trim().toLowerCase();
if (raw == null || raw === '') {
// NOTE: falling back to `false` instead of `undefined` as required by the specification.
// If you have a use-case that requires `undefined`, consider using `getStringFromEnv()` and applying the necessary
// normalizations in the consuming code.
return false;
}
if (raw === 'true') {
return true;
}
else if (raw === 'false') {
return false;
}
else {
diag.warn(`Unknown value ${inspect(raw)} for ${key}, expected 'true' or 'false', falling back to 'false' (default)`);
return false;
}
}
/**
* Retrieves a list of strings from an environment variable.
* - Uses ',' as the delimiter.
* - Trims leading and trailing whitespace from each entry.
* - Excludes empty entries.
* - Returns `undefined` if the environment variable is empty or contains only whitespace.
* - Returns an empty array if all entries are empty or whitespace.
*
* @param {string} key - The name of the environment variable to retrieve.
* @returns {string[] | undefined} - The list of strings or `undefined`.
*/
export function getStringListFromEnv(key) {
return getStringFromEnv(key)
?.split(',')
.map(v => v.trim())
.filter(s => s !== '');
}
//# sourceMappingURL=environment.js.map

View File

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

View File

@@ -0,0 +1,19 @@
{
"name": "buffer-from",
"version": "1.1.2",
"license": "MIT",
"repository": "LinusU/buffer-from",
"files": [
"index.js"
],
"scripts": {
"test": "standard && node test"
},
"devDependencies": {
"standard": "^12.0.1"
},
"keywords": [
"buffer",
"buffer from"
]
}

View File

@@ -0,0 +1,27 @@
// eslint-disable-next-line regexp/no-super-linear-backtracking, regexp/no-obscure-range
const ACCEPTABLE_CONTENT_TYPE = /multipart\/['"()+-_]+(?:; ?['"()+-_]*)+$/i;
const UNACCEPTABLE_METHODS = new Set([
'CONNECT',
'DELETE',
'GET',
'HEAD',
'OPTIONS',
'TRACE'
]);
const hasBody = (req)=>{
return Boolean(req.headers.get('transfer-encoding') || req.headers.get('content-length') && req.headers.get('content-length') !== '0');
};
const hasAcceptableMethod = (req)=>!UNACCEPTABLE_METHODS.has(req.method);
const hasAcceptableContentType = (req)=>{
const contType = req.headers.get('content-type');
return contType.includes('boundary=') && ACCEPTABLE_CONTENT_TYPE.test(contType);
};
export const isEligibleRequest = (req)=>{
try {
return hasBody(req) && hasAcceptableMethod(req) && hasAcceptableContentType(req);
} catch (ignore) {
return false;
}
};
//# sourceMappingURL=isEligibleRequest.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"sessionExtraction.d.ts","sourceRoot":"","sources":["../../../../src/integrations/mcp-server/sessionExtraction.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAmBH,OAAO,KAAK,EAAE,gBAAgB,EAAE,cAAc,EAAE,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AA0BtG;;;;GAIG;AACH,wBAAgB,uCAAuC,CAAC,OAAO,EAAE,cAAc,GAAG,WAAW,CAW5F;AAED;;;;GAIG;AACH,wBAAgB,wCAAwC,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC,CAW9F;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAenF;AAED;;;;GAIG;AACH,wBAAgB,6BAA6B,CAAC,UAAU,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAc5F;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAenF;AAED;;;;GAIG;AACH,wBAAgB,6BAA6B,CAAC,UAAU,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAc5F;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,GAAG;IAC1D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CASA;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,YAAY,GAAG;IAAE,YAAY,EAAE,MAAM,CAAC;IAAC,gBAAgB,EAAE,MAAM,CAAA;CAAE,CAkB7G;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,YAAY,EACvB,KAAK,CAAC,EAAE,gBAAgB,GACvB,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAqBjC"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"types.js","names":[],"sources":["../../../src/views/Versions/types.ts"],"sourcesContent":["import type { I18n } from '@payloadcms/translations'\nimport type {\n PaginatedDocs,\n SanitizedCollectionConfig,\n SanitizedConfig,\n SanitizedGlobalConfig,\n TypedUser,\n} from 'payload'\n\nexport type DefaultVersionsViewProps = {\n canAccessAdmin: boolean\n collectionConfig?: SanitizedCollectionConfig\n config: SanitizedConfig\n data: Document\n editURL: string\n entityLabel: string\n globalConfig?: SanitizedGlobalConfig\n i18n: I18n\n id: number | string\n limit: number\n user: TypedUser\n versionsData: PaginatedDocs<Document>\n}\n"],"mappings":"AASA","ignoreList":[]}

View File

@@ -0,0 +1,468 @@
import {DeprecationOrId, Version} from './deprecations';
import {FileImporter, Importer, NodePackageImporter} from './importer';
import {Logger} from './logger';
import {Value} from './value';
import {PromiseOr} from './util/promise_or';
/**
* Syntaxes supported by Sass:
*
* - `'scss'` is the [SCSS
* syntax](https://sass-lang.com/documentation/syntax#scss).
* - `'indented'` is the [indented
* syntax](https://sass-lang.com/documentation/syntax#the-indented-syntax)
* - `'css'` is plain CSS, which is parsed like SCSS but forbids the use of any
* special Sass features.
*
* @category Options
*/
export type Syntax = 'scss' | 'indented' | 'css';
/**
* Possible output styles for the compiled CSS:
*
* - `"expanded"` (the default for Dart Sass) writes each selector and
* declaration on its own line.
*
* - `"compressed"` removes as many extra characters as possible, and writes
* the entire stylesheet on a single line.
*
* @category Options
*/
export type OutputStyle = 'expanded' | 'compressed';
/**
* A callback that implements a custom Sass function. This can be passed to
* {@link Options.functions}.
*
* ```js
* const result = sass.compile('style.scss', {
* functions: {
* "sum($arg1, $arg2)": (args) => {
* const arg1 = args[0].assertNumber('arg1');
* const value1 = arg1.value;
* const value2 = args[1].assertNumber('arg2')
* .convertValueToMatch(arg1, 'arg2', 'arg1');
* return new sass.SassNumber(value1 + value2).coerceToMatch(arg1);
* }
* }
* });
* ```
*
* @typeParam sync - A `CustomFunction<'sync'>` must return synchronously, but
* in return it can be passed to {@link compile} and {@link compileString} in
* addition to {@link compileAsync} and {@link compileStringAsync}.
*
* A `CustomFunction<'async'>` may either return synchronously or
* asynchronously, but it can only be used with {@link compileAsync} and {@link
* compileStringAsync}.
*
* @param args - An array of arguments passed by the function's caller. If the
* function takes [arbitrary
* arguments](https://sass-lang.com/documentation/at-rules/function#taking-arbitrary-arguments),
* the last element will be a {@link SassArgumentList}.
*
* @returns The function's result. This may be in the form of a `Promise`, but
* if it is the function may only be passed to {@link compileAsync} and {@link
* compileStringAsync}, not {@link compile} or {@link compileString}.
*
* @throws any - This function may throw an error, which the Sass compiler will
* treat as the function call failing. If the exception object has a `message`
* property, it will be used as the wrapped exception's message; otherwise, the
* exception object's `toString()` will be used. This means it's safe for custom
* functions to throw plain strings.
*
* @category Custom Function
*/
export type CustomFunction<sync extends 'sync' | 'async'> = (
args: Value[]
) => PromiseOr<Value, sync>;
/**
* Options that can be passed to {@link compile}, {@link compileAsync}, {@link
* compileString}, or {@link compileStringAsync}.
*
* @typeParam sync - This lets the TypeScript checker verify that asynchronous
* {@link Importer}s, {@link FileImporter}s, and {@link CustomFunction}s aren't
* passed to {@link compile} or {@link compileString}.
*
* @category Options
*/
export interface Options<sync extends 'sync' | 'async'> {
/**
* If this is `true`, the compiler will exclusively use ASCII characters in
* its error and warning messages. Otherwise, it may use non-ASCII Unicode
* characters as well.
*
* @defaultValue `false`
* @category Messages
*/
alertAscii?: boolean;
/**
* If this is `true`, the compiler will use ANSI color escape codes in its
* error and warning messages. If it's `false`, it won't use these. If it's
* undefined, the compiler will determine whether or not to use colors
* depending on whether the user is using an interactive terminal.
*
* @category Messages
*/
alertColor?: boolean;
/**
* If `true`, the compiler may prepend `@charset "UTF-8";` or U+FEFF
* (byte-order marker) if it outputs non-ASCII CSS.
*
* If `false`, the compiler never emits these byte sequences. This is ideal
* when concatenating or embedding in HTML `<style>` tags. (The output will
* still be UTF-8.)
*
* @defaultValue `true`
* @category Output
* @compatibility dart: "1.54.0", node: false
*/
charset?: boolean;
/**
* A set of deprecations to treat as fatal.
*
* If a deprecation warning of any provided type is encountered during
* compilation, the compiler will error instead.
*
* If a `Version` is provided, then all deprecations that were active in that
* compiler version will be treated as fatal.
*
* @category Messages
* @compatiblity dart: "1.74.0", node: false
*/
fatalDeprecations?: (DeprecationOrId | Version)[];
/**
* Additional built-in Sass functions that are available in all stylesheets.
* This option takes an object whose keys are Sass function signatures like
* you'd write for the [`@function
* rule`](https://sass-lang.com/documentation/at-rules/function) and whose
* values are {@link CustomFunction}s.
*
* Functions are passed subclasses of {@link Value}, and must return the same.
* If the return value includes {@link SassCalculation}s they will be
* simplified before being returned.
*
* When writing custom functions, it's important to make them as user-friendly
* and as close to the standards set by Sass's core functions as possible. Some
* good guidelines to follow include:
*
* * Use `Value.assert*` methods, like {@link Value.assertString}, to cast
* untyped `Value` objects to more specific types. For values that were
* passed directly as arguments, pass in the argument name as well. This
* ensures that the user gets good error messages when they pass in the
* wrong type to your function.
*
* * Individual classes may have more specific `assert*` methods, like {@link
* SassNumber.assertInt}, which should be used when possible.
*
* * In Sass, every value counts as a list. Rather than trying to detect the
* {@link SassList} type, you should use {@link Value.asList} to treat all
* values as lists.
*
* * When manipulating values like lists, strings, and numbers that have
* metadata (comma versus space separated, bracketed versus unbracketed,
* quoted versus unquoted, units), the output metadata should match the
* input metadata.
*
* * When in doubt, lists should default to comma-separated, strings should
* default to quoted, and numbers should default to unitless.
*
* * In Sass, lists and strings use one-based indexing and use negative
* indices to index from the end of value. Functions should follow these
* conventions. {@link Value.sassIndexToListIndex} and {@link
* SassString.sassIndexToStringIndex} can be used to do this automatically.
*
* * String indexes in Sass refer to Unicode code points while JavaScript
* string indices refer to UTF-16 code units. For example, the character
* U+1F60A SMILING FACE WITH SMILING EYES is a single Unicode code point but
* is represented in UTF-16 as two code units (`0xD83D` and `0xDE0A`). So in
* JavaScript, `"a😊b".charCodeAt(1)` returns `0xD83D`, whereas in Sass
* `str-slice("a😊b", 1, 1)` returns `"😊"`. Functions should follow Sass's
* convention. {@link SassString.sassIndexToStringIndex} can be used to do
* this automatically, and the {@link SassString.sassLength} getter can be
* used to access a string's length in code points.
*
* @example
*
* ```js
* sass.compileString(`
* h1 {
* font-size: pow(2, 5) * 1px;
* }`, {
* functions: {
* // Note: in real code, you should use `math.pow()` from the built-in
* // `sass:math` module.
* 'pow($base, $exponent)': function(args) {
* const base = args[0].assertNumber('base').assertNoUnits('base');
* const exponent =
* args[1].assertNumber('exponent').assertNoUnits('exponent');
*
* return new sass.SassNumber(Math.pow(base.value, exponent.value));
* }
* }
* });
* ```
*
* @category Plugins
*/
functions?: Record<string, CustomFunction<sync>>;
/**
* A set of future deprecations to opt into early.
*
* Future deprecations passed here will be treated as active by the compiler,
* emitting warnings as necessary.
*
* @category Messages
* @compatiblity dart: "1.74.0", node: false
*/
futureDeprecations?: DeprecationOrId[];
/**
* Custom importers that control how Sass resolves loads from rules like
* [`@use`](https://sass-lang.com/documentation/at-rules/use) and
* [`@import`](https://sass-lang.com/documentation/at-rules/import).
*
* Loads are resolved by trying, in order:
*
* - **For relative URLs only:** the URL resolved relative to the current
* stylesheet's canonical URL, passed to the importer that loaded the current
* stylesheet.
*
* When calling {@link compileString} or {@link compileStringAsync}, the
* entrypoint file isn't "loaded" in the same sense as other files. In that
* case:
*
* - {@link StringOptions.url} is the canonical URL and {@link
* StringOptions.importer} is the importer that loaded it.
*
* - If {@link StringOptions.importer} isn't passed and {@link
* StringOptions.url} is a `file:` URL, the URL is loaded from the
* filesystem by default. (You can disable this by passing `{canonicalize:
* url => null}` as {@link StringOptions.importer}.)
*
* - If {@link StringOptions.url} isn't passed but {@link
* StringOptions.importer} is, the relative URL is passed to {@link
* StringOptions.importer} as-is.
*
* - Each {@link Importer}, {@link FileImporter}, or
* {@link NodePackageImporter} in {@link importers}, in order.
*
* - Each load path in {@link loadPaths}, in order.
*
* If none of these return a Sass file, the load fails and Sass throws an
* error.
*
* @category Plugins
*/
importers?: (Importer<sync> | FileImporter<sync> | NodePackageImporter)[];
/**
* Paths in which to look for stylesheets loaded by rules like
* [`@use`](https://sass-lang.com/documentation/at-rules/use) and
* [`@import`](https://sass-lang.com/documentation/at-rules/import).
*
* A load path `loadPath` is equivalent to the following {@link FileImporter}:
*
* ```js
* {
* findFileUrl(url) {
* // Load paths only support relative URLs.
* if (/^[a-z]+:/i.test(url)) return null;
* return new URL(url, pathToFileURL(loadPath));
* }
* }
* ```
*
* @category Input
*/
loadPaths?: string[];
/**
* An object to use to handle warnings and/or debug messages from Sass.
*
* By default, Sass emits warnings and debug messages to standard error, but
* if {@link Logger.warn} or {@link Logger.debug} is set, this will invoke
* them instead.
*
* The special value {@link Logger.silent} can be used to easily silence all
* messages.
*
* @category Messages
*/
logger?: Logger;
/**
* If this option is set to `true`, Sass wont print warnings that are caused
* by dependencies. A “dependency” is defined as any file thats loaded
* through {@link loadPaths} or {@link importers}. Stylesheets that are
* imported relative to the entrypoint are not considered dependencies.
*
* This is useful for silencing deprecation warnings that you cant fix on
* your own. However, please <em>also</em> notify your dependencies of the deprecations
* so that they can get fixed as soon as possible!
*
* **Heads up!** If {@link compileString} or {@link compileStringAsync} is
* called without {@link StringOptions.url}, <em>all</em> stylesheets it loads
* will be considered dependencies. Since it doesnt have a path of its own,
* everything it loads is coming from a load path rather than a relative
* import.
*
* @defaultValue `false`
* @category Messages
*/
quietDeps?: boolean;
/**
* A set of active deprecations to ignore.
*
* If a deprecation warning of any provided type is encountered during
* compilation, the compiler will ignore it instead.
*
* **Heads up!** The deprecated functionality you're depending on will
* eventually break.
*
* @category Messages
* @compatiblity dart: "1.74.0", node: false
*/
silenceDeprecations?: DeprecationOrId[];
/**
* Whether or not Sass should generate a source map. If it does, the source
* map will be available as {@link CompileResult.sourceMap}.
*
* **Heads up!** Sass doesn't automatically add a `sourceMappingURL` comment
* to the generated CSS. It's up to callers to do that, since callers have
* full knowledge of where the CSS and the source map will exist in relation
* to one another and how they'll be served to the browser.
*
* @defaultValue `false`
* @category Output
*/
sourceMap?: boolean;
/**
* Whether Sass should include the sources in the generated source map.
*
* This option has no effect if {@link sourceMap} is `false`.
*
* @defaultValue `false`
* @category Output
*/
sourceMapIncludeSources?: boolean;
/**
* The {@link OutputStyle} of the compiled CSS.
*
* @example
*
* ```js
* const source = `
* h1 {
* font-size: 40px;
* code {
* font-face: Roboto Mono;
* }
* }`;
*
* let result = sass.compileString(source, {style: "expanded"});
* console.log(result.css.toString());
* // h1 {
* // font-size: 40px;
* // }
* // h1 code {
* // font-face: Roboto Mono;
* // }
*
* result = sass.compileString(source, {style: "compressed"})
* console.log(result.css.toString());
* // h1{font-size:40px}h1 code{font-face:Roboto Mono}
* ```
*
* @category Output
*/
style?: OutputStyle;
/**
* By default, Dart Sass will print only five instances of the same
* deprecation warning per compilation to avoid deluging users in console
* noise. If you set `verbose` to `true`, it will instead print every
* deprecation warning it encounters.
*
* @defaultValue `false`
* @category Messages
*/
verbose?: boolean;
}
/**
* Options that can be passed to {@link compileString} or {@link
* compileStringAsync}.
*
* If the {@link StringOptions.importer} field isn't passed, the entrypoint file
* can load files relative to itself if a `file://` URL is passed to the {@link
* url} field. If `importer` is passed, the entrypoint file uses that importer
* to load files relative to itself.
*
* @typeParam sync - This lets the TypeScript checker verify that asynchronous
* {@link Importer}s, {@link FileImporter}s, and {@link CustomFunction}s aren't
* passed to {@link compile} or {@link compileString}.
*
* @category Options
*/
export interface StringOptions<sync extends 'sync' | 'async'>
extends Options<sync> {
/**
* The {@link Syntax} to use to parse the entrypoint stylesheet.
*
* @default `'scss'`
*
* @category Input
*/
syntax?: Syntax;
/**
* The importer to use to handle relative URL loads in the entrypoint
* stylesheet and stylesheets loaded relative to the entrypoint stylesheet.
*
* See {@link Options.importers} for details on how loads are resolved for the
* entrypoint stylesheet.
*
* @category Input
*/
importer?: Importer<sync> | FileImporter<sync>;
/**
* The canonical URL of the entrypoint stylesheet.
*
* See {@link Options.importers} for details on how loads are resolved for the
* entrypoint stylesheet.
*
* @category Input
* @compatibility feature: "Undefined URL with importer", dart: "1.75.0", node: false
*
* Earlier versions of Dart Sass required {@link url} to be defined when
* passing {@link StringOptions.importer}.
*/
url?: URL;
}
/**
* @category Options
* @deprecated Use {@link StringOptions} instead.
*/
type StringOptionsWithoutImporter<sync extends 'sync' | 'async'> =
StringOptions<sync>;
/**
* @category Options
* @deprecated Use {@link StringOptions} instead.
*/
type StringOptionsWithImporter<sync extends 'sync' | 'async'> =
StringOptions<sync>;

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/exports/i18n/es.ts"],"sourcesContent":["export { es } from '@payloadcms/translations/languages/es'\n"],"names":["es"],"mappings":"AAAA,SAASA,EAAE,QAAQ,wCAAuC"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"trace-info.d.ts","sourceRoot":"","sources":["../../../src/utils/trace-info.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAExC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAKtC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAGtE,2CAA2C;AAC3C,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,KAAK,GAAG,SAAS,GACvB,CAAC,sBAAsB,EAAE,OAAO,CAAC,sBAAsB,CAAC,GAAG,SAAS,EAAE,YAAY,EAAE,YAAY,GAAG,SAAS,CAAC,CAa/G"}

View File

@@ -0,0 +1,39 @@
import { status as httpStatus } from 'http-status';
// This gets dynamically reassigned during compilation
export let APIErrorName = 'APIError';
class ExtendableError extends Error {
data;
isOperational;
isPublic;
status;
constructor(message, status, data, isPublic){
super(message, {
// show data in cause
cause: data
});
APIErrorName = this.constructor.name;
this.name = this.constructor.name;
this.message = message;
this.status = status;
this.data = data;
this.isPublic = isPublic;
this.isOperational = true; // This is required since bluebird 4 doesn't append it anymore.
Error.captureStackTrace(this, this.constructor);
}
}
/**
* Class representing an API error.
* @extends ExtendableError
*/ export class APIError extends ExtendableError {
/**
* Creates an API error.
* @param {string} message - Error message.
* @param {number} status - HTTP status code of error.
* @param {object} data - response data to be returned.
* @param {boolean} isPublic - Whether the message should be visible to user or not.
*/ constructor(message, status = httpStatus.INTERNAL_SERVER_ERROR, data = null, isPublic){
super(message, status, data, typeof isPublic === 'boolean' ? isPublic : status !== httpStatus.INTERNAL_SERVER_ERROR);
}
}
//# sourceMappingURL=APIError.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/gel-core/sequence.ts"],"sourcesContent":["import { entityKind, is } from '~/entity.ts';\n\nexport type GelSequenceOptions = {\n\tincrement?: number | string;\n\tminValue?: number | string;\n\tmaxValue?: number | string;\n\tstartWith?: number | string;\n\tcache?: number | string;\n\tcycle?: boolean;\n};\n\nexport class GelSequence {\n\tstatic readonly [entityKind]: string = 'GelSequence';\n\n\tconstructor(\n\t\tpublic readonly seqName: string | undefined,\n\t\tpublic readonly seqOptions: GelSequenceOptions | undefined,\n\t\tpublic readonly schema: string | undefined,\n\t) {\n\t}\n}\n\nexport function gelSequence(\n\tname: string,\n\toptions?: GelSequenceOptions,\n): GelSequence {\n\treturn gelSequenceWithSchema(name, options, undefined);\n}\n\n/** @internal */\nexport function gelSequenceWithSchema(\n\tname: string,\n\toptions?: GelSequenceOptions,\n\tschema?: string,\n): GelSequence {\n\treturn new GelSequence(name, options, schema);\n}\n\nexport function isGelSequence(obj: unknown): obj is GelSequence {\n\treturn is(obj, GelSequence);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAA+B;AAWxB,MAAM,YAAY;AAAA,EAGxB,YACiB,SACA,YACA,QACf;AAHe;AACA;AACA;AAAA,EAEjB;AAAA,EAPA,QAAiB,wBAAU,IAAY;AAQxC;AAEO,SAAS,YACf,MACA,SACc;AACd,SAAO,sBAAsB,MAAM,SAAS,MAAS;AACtD;AAGO,SAAS,sBACf,MACA,SACA,QACc;AACd,SAAO,IAAI,YAAY,MAAM,SAAS,MAAM;AAC7C;AAEO,SAAS,cAAc,KAAkC;AAC/D,aAAO,kBAAG,KAAK,WAAW;AAC3B;","names":[]}

View File

@@ -0,0 +1,266 @@
import { entityKind } from "../entity.js";
import { SelectionProxyHandler } from "../selection-proxy.js";
import { sql } from "../sql/sql.js";
import { WithSubquery } from "../subquery.js";
import { MySqlCountBuilder } from "./query-builders/count.js";
import {
MySqlDeleteBase,
MySqlInsertBuilder,
MySqlSelectBuilder,
MySqlUpdateBuilder,
QueryBuilder
} from "./query-builders/index.js";
import { RelationalQueryBuilder } from "./query-builders/query.js";
class MySqlDatabase {
constructor(dialect, session, schema, mode) {
this.dialect = dialect;
this.session = session;
this.mode = mode;
this._ = schema ? {
schema: schema.schema,
fullSchema: schema.fullSchema,
tableNamesMap: schema.tableNamesMap
} : {
schema: void 0,
fullSchema: {},
tableNamesMap: {}
};
this.query = {};
if (this._.schema) {
for (const [tableName, columns] of Object.entries(this._.schema)) {
this.query[tableName] = new RelationalQueryBuilder(
schema.fullSchema,
this._.schema,
this._.tableNamesMap,
schema.fullSchema[tableName],
columns,
dialect,
session,
this.mode
);
}
}
this.$cache = { invalidate: async (_params) => {
} };
}
static [entityKind] = "MySqlDatabase";
query;
/**
* Creates a subquery that defines a temporary named result set as a CTE.
*
* It is useful for breaking down complex queries into simpler parts and for reusing the result set in subsequent parts of the query.
*
* See docs: {@link https://orm.drizzle.team/docs/select#with-clause}
*
* @param alias The alias for the subquery.
*
* Failure to provide an alias will result in a DrizzleTypeError, preventing the subquery from being referenced in other queries.
*
* @example
*
* ```ts
* // Create a subquery with alias 'sq' and use it in the select query
* const sq = db.$with('sq').as(db.select().from(users).where(eq(users.id, 42)));
*
* const result = await db.with(sq).select().from(sq);
* ```
*
* To select arbitrary SQL values as fields in a CTE and reference them in other CTEs or in the main query, you need to add aliases to them:
*
* ```ts
* // Select an arbitrary SQL value as a field in a CTE and reference it in the main query
* const sq = db.$with('sq').as(db.select({
* name: sql<string>`upper(${users.name})`.as('name'),
* })
* .from(users));
*
* const result = await db.with(sq).select({ name: sq.name }).from(sq);
* ```
*/
$with = (alias, selection) => {
const self = this;
const as = (qb) => {
if (typeof qb === "function") {
qb = qb(new QueryBuilder(self.dialect));
}
return new Proxy(
new WithSubquery(
qb.getSQL(),
selection ?? ("getSelectedFields" in qb ? qb.getSelectedFields() ?? {} : {}),
alias,
true
),
new SelectionProxyHandler({ alias, sqlAliasedBehavior: "alias", sqlBehavior: "error" })
);
};
return { as };
};
$count(source, filters) {
return new MySqlCountBuilder({ source, filters, session: this.session });
}
$cache;
/**
* Incorporates a previously defined CTE (using `$with`) into the main query.
*
* This method allows the main query to reference a temporary named result set.
*
* See docs: {@link https://orm.drizzle.team/docs/select#with-clause}
*
* @param queries The CTEs to incorporate into the main query.
*
* @example
*
* ```ts
* // Define a subquery 'sq' as a CTE using $with
* const sq = db.$with('sq').as(db.select().from(users).where(eq(users.id, 42)));
*
* // Incorporate the CTE 'sq' into the main query and select from it
* const result = await db.with(sq).select().from(sq);
* ```
*/
with(...queries) {
const self = this;
function select(fields) {
return new MySqlSelectBuilder({
fields: fields ?? void 0,
session: self.session,
dialect: self.dialect,
withList: queries
});
}
function selectDistinct(fields) {
return new MySqlSelectBuilder({
fields: fields ?? void 0,
session: self.session,
dialect: self.dialect,
withList: queries,
distinct: true
});
}
function update(table) {
return new MySqlUpdateBuilder(table, self.session, self.dialect, queries);
}
function delete_(table) {
return new MySqlDeleteBase(table, self.session, self.dialect, queries);
}
return { select, selectDistinct, update, delete: delete_ };
}
select(fields) {
return new MySqlSelectBuilder({ fields: fields ?? void 0, session: this.session, dialect: this.dialect });
}
selectDistinct(fields) {
return new MySqlSelectBuilder({
fields: fields ?? void 0,
session: this.session,
dialect: this.dialect,
distinct: true
});
}
/**
* Creates an update query.
*
* Calling this method without `.where()` clause will update all rows in a table. The `.where()` clause specifies which rows should be updated.
*
* Use `.set()` method to specify which values to update.
*
* See docs: {@link https://orm.drizzle.team/docs/update}
*
* @param table The table to update.
*
* @example
*
* ```ts
* // Update all rows in the 'cars' table
* await db.update(cars).set({ color: 'red' });
*
* // Update rows with filters and conditions
* await db.update(cars).set({ color: 'red' }).where(eq(cars.brand, 'BMW'));
* ```
*/
update(table) {
return new MySqlUpdateBuilder(table, this.session, this.dialect);
}
/**
* Creates an insert query.
*
* Calling this method will create new rows in a table. Use `.values()` method to specify which values to insert.
*
* See docs: {@link https://orm.drizzle.team/docs/insert}
*
* @param table The table to insert into.
*
* @example
*
* ```ts
* // Insert one row
* await db.insert(cars).values({ brand: 'BMW' });
*
* // Insert multiple rows
* await db.insert(cars).values([{ brand: 'BMW' }, { brand: 'Porsche' }]);
* ```
*/
insert(table) {
return new MySqlInsertBuilder(table, this.session, this.dialect);
}
/**
* Creates a delete query.
*
* Calling this method without `.where()` clause will delete all rows in a table. The `.where()` clause specifies which rows should be deleted.
*
* See docs: {@link https://orm.drizzle.team/docs/delete}
*
* @param table The table to delete from.
*
* @example
*
* ```ts
* // Delete all rows in the 'cars' table
* await db.delete(cars);
*
* // Delete rows with filters and conditions
* await db.delete(cars).where(eq(cars.color, 'green'));
* ```
*/
delete(table) {
return new MySqlDeleteBase(table, this.session, this.dialect);
}
execute(query) {
return this.session.execute(typeof query === "string" ? sql.raw(query) : query.getSQL());
}
transaction(transaction, config) {
return this.session.transaction(transaction, config);
}
}
const withReplicas = (primary, replicas, getReplica = () => replicas[Math.floor(Math.random() * replicas.length)]) => {
const select = (...args) => getReplica(replicas).select(...args);
const selectDistinct = (...args) => getReplica(replicas).selectDistinct(...args);
const $count = (...args) => getReplica(replicas).$count(...args);
const $with = (...args) => getReplica(replicas).with(...args);
const update = (...args) => primary.update(...args);
const insert = (...args) => primary.insert(...args);
const $delete = (...args) => primary.delete(...args);
const execute = (...args) => primary.execute(...args);
const transaction = (...args) => primary.transaction(...args);
return {
...primary,
update,
insert,
delete: $delete,
execute,
transaction,
$primary: primary,
$replicas: replicas,
select,
selectDistinct,
$count,
with: $with,
get query() {
return getReplica(replicas).query;
}
};
};
export {
MySqlDatabase,
withReplicas
};
//# sourceMappingURL=db.js.map

View File

@@ -0,0 +1,136 @@
import { ReplayNetworkRequestOrResponse } from './request';
export type AllPerformanceEntry = PerformancePaintTiming | PerformanceResourceTiming | PerformanceNavigationTiming;
export type PerformancePaintTiming = PerformanceEntry;
export type PerformanceNavigationTiming = PerformanceEntry & PerformanceResourceTiming & {
type: string;
transferSize: number;
/**
* A DOMHighResTimeStamp representing the time immediately before the user agent
* sets the document's readyState to "interactive".
*/
domInteractive: number;
/**
* A DOMHighResTimeStamp representing the time immediately before the current
* document's DOMContentLoaded event handler starts.
*/
domContentLoadedEventStart: number;
/**
* A DOMHighResTimeStamp representing the time immediately after the current
* document's DOMContentLoaded event handler completes.
*/
domContentLoadedEventEnd: number;
/**
* A DOMHighResTimeStamp representing the time immediately before the current
* document's load event handler starts.
*/
loadEventStart: number;
/**
* A DOMHighResTimeStamp representing the time immediately after the current
* document's load event handler completes.
*/
loadEventEnd: number;
/**
* A DOMHighResTimeStamp representing the time immediately before the user agent
* sets the document's readyState to "complete".
*/
domComplete: number;
/**
* A number representing the number of redirects since the last non-redirect
* navigation in the current browsing context.
*/
redirectCount: number;
};
export type ExperimentalPerformanceResourceTiming = PerformanceResourceTiming & {
responseStatus?: number;
};
export type PaintData = undefined;
/**
* See https://developer.mozilla.org/en-US/docs/Web/API/PerformanceNavigationTiming
*
* Note `navigation.push` will not have any data
*/
export type NavigationData = Partial<Pick<PerformanceNavigationTiming, 'decodedBodySize' | 'encodedBodySize' | 'duration' | 'domInteractive' | 'domContentLoadedEventEnd' | 'domContentLoadedEventStart' | 'loadEventStart' | 'loadEventEnd' | 'domComplete' | 'redirectCount'>> & {
/**
* Transfer size of resource
*/
size?: number;
};
export type ResourceData = Pick<PerformanceResourceTiming, 'decodedBodySize' | 'encodedBodySize'> & {
/**
* Transfer size of resource
*/
size: number;
/**
* HTTP status code. Note this is experimental and not available on all browsers.
*/
statusCode?: number;
};
export interface WebVitalData {
/**
* Render time (in ms) of the LCP
*/
value: number;
size: number;
/**
* The rating as to whether the metric value is within the "good",
* "needs improvement", or "poor" thresholds of the metric.
*/
rating: 'good' | 'needs-improvement' | 'poor';
/**
* The recording id of the web vital nodes. -1 if not found
*/
nodeIds?: number[];
/**
* The layout shifts of a CLS metric
*/
attributions?: {
value: number;
nodeIds: number[] | undefined;
}[];
}
/**
* Entries that come from window.performance
*/
export type AllPerformanceEntryData = PaintData | NavigationData | ResourceData | WebVitalData;
export interface MemoryData {
memory: {
jsHeapSizeLimit: number;
totalJSHeapSize: number;
usedJSHeapSize: number;
};
}
export interface NetworkRequestData {
method?: string;
statusCode?: number;
requestBodySize?: number;
responseBodySize?: number;
request?: ReplayNetworkRequestOrResponse;
response?: ReplayNetworkRequestOrResponse;
}
export interface HistoryData {
previous: string | undefined;
}
export type AllEntryData = AllPerformanceEntryData | MemoryData | NetworkRequestData | HistoryData;
export interface ReplayPerformanceEntry<T> {
/**
* One of these types https://developer.mozilla.org/en-US/docs/Web/API/PerformanceEntry/entryType
*/
type: string;
/**
* A more specific description of the performance entry
*/
name: string;
/**
* The start timestamp in seconds
*/
start: number;
/**
* The end timestamp in seconds
*/
end: number;
/**
* Additional unstructured data to be included
*/
data: T;
}
//# sourceMappingURL=performance.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"onFCP.js","sources":["../../../../src/metrics/web-vitals/onFCP.ts"],"sourcesContent":["/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { bindReporter } from './lib/bindReporter';\nimport { getActivationStart } from './lib/getActivationStart';\nimport { getVisibilityWatcher } from './lib/getVisibilityWatcher';\nimport { initMetric } from './lib/initMetric';\nimport { observe } from './lib/observe';\nimport { whenActivated } from './lib/whenActivated';\nimport type { FCPMetric, MetricRatingThresholds, ReportOpts } from './types';\n\n/** Thresholds for FCP. See https://web.dev/articles/fcp#what_is_a_good_fcp_score */\nexport const FCPThresholds: MetricRatingThresholds = [1800, 3000];\n\n/**\n * Calculates the [FCP](https://web.dev/articles/fcp) value for the current page and\n * calls the `callback` function once the value is ready, along with the\n * relevant `paint` performance entry used to determine the value. The reported\n * value is a `DOMHighResTimeStamp`.\n */\nexport const onFCP = (onReport: (metric: FCPMetric) => void, opts: ReportOpts = {}) => {\n whenActivated(() => {\n const visibilityWatcher = getVisibilityWatcher();\n const metric = initMetric('FCP');\n let report: ReturnType<typeof bindReporter>;\n\n const handleEntries = (entries: FCPMetric['entries']) => {\n for (const entry of entries) {\n if (entry.name === 'first-contentful-paint') {\n po!.disconnect();\n\n // Only report if the page wasn't hidden prior to the first paint.\n if (entry.startTime < visibilityWatcher.firstHiddenTime) {\n // The activationStart reference is used because FCP should be\n // relative to page activation rather than navigation start if the\n // page was prerendered. But in cases where `activationStart` occurs\n // after the FCP, this time should be clamped at 0.\n metric.value = Math.max(entry.startTime - getActivationStart(), 0);\n metric.entries.push(entry);\n report(true);\n }\n }\n }\n };\n\n const po = observe('paint', handleEntries);\n\n if (po) {\n report = bindReporter(onReport, metric, FCPThresholds, opts.reportAllChanges);\n }\n });\n};\n"],"names":["whenActivated","getVisibilityWatcher","initMetric","getActivationStart","observe","bindReporter"],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAUA;AACO,MAAM,aAAa,GAA2B,CAAC,IAAI,EAAE,IAAI;;AAEhE;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,KAAA,GAAQ,CAAC,QAAQ,EAA+B,IAAI,GAAe,EAAE,KAAK;AACvF,EAAEA,2BAAa,CAAC,MAAM;AACtB,IAAI,MAAM,iBAAA,GAAoBC,yCAAoB,EAAE;AACpD,IAAI,MAAM,MAAA,GAASC,qBAAU,CAAC,KAAK,CAAC;AACpC,IAAI,IAAI,MAAM;;AAEd,IAAI,MAAM,aAAA,GAAgB,CAAC,OAAO,KAA2B;AAC7D,MAAM,KAAK,MAAM,KAAA,IAAS,OAAO,EAAE;AACnC,QAAQ,IAAI,KAAK,CAAC,IAAA,KAAS,wBAAwB,EAAE;AACrD,UAAU,EAAE,CAAE,UAAU,EAAE;;AAE1B;AACA,UAAU,IAAI,KAAK,CAAC,YAAY,iBAAiB,CAAC,eAAe,EAAE;AACnE;AACA;AACA;AACA;AACA,YAAY,MAAM,CAAC,KAAA,GAAQ,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,YAAYC,qCAAkB,EAAE,EAAE,CAAC,CAAC;AAC9E,YAAY,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;AACtC,YAAY,MAAM,CAAC,IAAI,CAAC;AACxB,UAAU;AACV,QAAQ;AACR,MAAM;AACN,IAAI,CAAC;;AAEL,IAAI,MAAM,KAAKC,eAAO,CAAC,OAAO,EAAE,aAAa,CAAC;;AAE9C,IAAI,IAAI,EAAE,EAAE;AACZ,MAAM,MAAA,GAASC,yBAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,aAAa,EAAE,IAAI,CAAC,gBAAgB,CAAC;AACnF,IAAI;AACJ,EAAE,CAAC,CAAC;AACJ;;;;;"}

View File

@@ -0,0 +1,42 @@
import { GraphQLScalarType, Kind } from 'graphql';
import { createGraphQLError } from '../error.js';
const PHONE_NUMBER_REGEX = /^\+[1-9]\d{6,14}$/;
export const GraphQLPhoneNumber = /*#__PURE__*/ new GraphQLScalarType({
name: 'PhoneNumber',
description: 'A field whose value conforms to the standard E.164 format as specified in: https://en.wikipedia.org/wiki/E.164. Basically this is +17895551234.',
serialize(value) {
if (typeof value !== 'string') {
throw createGraphQLError(`Value is not string: ${value}`);
}
if (!PHONE_NUMBER_REGEX.test(value)) {
throw createGraphQLError(`Value is not a valid phone number of the form +17895551234 (7-15 digits): ${value}`);
}
return value;
},
parseValue(value) {
if (typeof value !== 'string') {
throw createGraphQLError(`Value is not string: ${value}`);
}
if (!PHONE_NUMBER_REGEX.test(value)) {
throw createGraphQLError(`Value is not a valid phone number of the form +17895551234 (7-15 digits): ${value}`);
}
return value;
},
parseLiteral(ast) {
if (ast.kind !== Kind.STRING) {
throw createGraphQLError(`Can only validate strings as phone numbers but got a: ${ast.kind}`, { nodes: ast });
}
if (!PHONE_NUMBER_REGEX.test(ast.value)) {
throw createGraphQLError(`Value is not a valid phone number of the form +17895551234 (7-15 digits): ${ast.value}`, { nodes: ast });
}
return ast.value;
},
extensions: {
codegenScalarType: 'string',
jsonSchema: {
title: 'PhoneNumber',
type: 'string',
pattern: PHONE_NUMBER_REGEX.source,
},
},
});

View File

@@ -0,0 +1,43 @@
import { buildVersionGlobalFields } from 'payload';
import toSnakeCase from 'to-snake-case';
import { buildQuery } from './queries/buildQuery.js';
import { upsertRow } from './upsertRow/index.js';
import { getTransaction } from './utilities/getTransaction.js';
export async function updateGlobalVersion({ id, global, locale, req, returning, select, versionData, where: whereArg }) {
const globalConfig = this.payload.globals.config.find(({ slug })=>slug === global);
const whereToUse = whereArg || {
id: {
equals: id
}
};
const tableName = this.tableNameMap.get(`_${toSnakeCase(globalConfig.slug)}${this.versionsSuffix}`);
const fields = buildVersionGlobalFields(this.payload.config, globalConfig, true);
const { where } = buildQuery({
adapter: this,
fields,
locale,
tableName,
where: whereToUse
});
const db = await getTransaction(this, req);
const result = await upsertRow({
id,
adapter: this,
data: versionData,
db,
fields,
globalSlug: global,
ignoreResult: returning === false,
operation: 'update',
req,
select,
tableName,
where
});
if (returning === false) {
return null;
}
return result;
}
//# sourceMappingURL=updateGlobalVersion.js.map

View File

@@ -0,0 +1,12 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = clone;
var _cloneNode = require("./cloneNode.js");
function clone(node) {
return (0, _cloneNode.default)(node, false);
}
//# sourceMappingURL=clone.js.map

View File

@@ -0,0 +1,148 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = default_1;
const util = __importStar(require("../core/util.cjs"));
const error = () => {
const Sizable = {
string: { unit: "کاراکتر", verb: "داشته باشد" },
file: { unit: "بایت", verb: "داشته باشد" },
array: { unit: "آیتم", verb: "داشته باشد" },
set: { unit: "آیتم", verb: "داشته باشد" },
};
function getSizing(origin) {
return Sizable[origin] ?? null;
}
const parsedType = (data) => {
const t = typeof data;
switch (t) {
case "number": {
return Number.isNaN(data) ? "NaN" : "عدد";
}
case "object": {
if (Array.isArray(data)) {
return "آرایه";
}
if (data === null) {
return "null";
}
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
return data.constructor.name;
}
}
}
return t;
};
const Nouns = {
regex: "ورودی",
email: "آدرس ایمیل",
url: "URL",
emoji: "ایموجی",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "تاریخ و زمان ایزو",
date: "تاریخ ایزو",
time: "زمان ایزو",
duration: "مدت زمان ایزو",
ipv4: "IPv4 آدرس",
ipv6: "IPv6 آدرس",
cidrv4: "IPv4 دامنه",
cidrv6: "IPv6 دامنه",
base64: "base64-encoded رشته",
base64url: "base64url-encoded رشته",
json_string: "JSON رشته",
e164: "E.164 عدد",
jwt: "JWT",
template_literal: "ورودی",
};
return (issue) => {
switch (issue.code) {
case "invalid_type":
return `ورودی نامعتبر: می‌بایست ${issue.expected} می‌بود، ${parsedType(issue.input)} دریافت شد`;
case "invalid_value":
if (issue.values.length === 1) {
return `ورودی نامعتبر: می‌بایست ${util.stringifyPrimitive(issue.values[0])} می‌بود`;
}
return `گزینه نامعتبر: می‌بایست یکی از ${util.joinValues(issue.values, "|")} می‌بود`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing) {
return `خیلی بزرگ: ${issue.origin ?? "مقدار"} باید ${adj}${issue.maximum.toString()} ${sizing.unit ?? "عنصر"} باشد`;
}
return `خیلی بزرگ: ${issue.origin ?? "مقدار"} باید ${adj}${issue.maximum.toString()} باشد`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
return `خیلی کوچک: ${issue.origin} باید ${adj}${issue.minimum.toString()} ${sizing.unit} باشد`;
}
return `خیلی کوچک: ${issue.origin} باید ${adj}${issue.minimum.toString()} باشد`;
}
case "invalid_format": {
const _issue = issue;
if (_issue.format === "starts_with") {
return `رشته نامعتبر: باید با "${_issue.prefix}" شروع شود`;
}
if (_issue.format === "ends_with") {
return `رشته نامعتبر: باید با "${_issue.suffix}" تمام شود`;
}
if (_issue.format === "includes") {
return `رشته نامعتبر: باید شامل "${_issue.includes}" باشد`;
}
if (_issue.format === "regex") {
return `رشته نامعتبر: باید با الگوی ${_issue.pattern} مطابقت داشته باشد`;
}
return `${Nouns[_issue.format] ?? issue.format} نامعتبر`;
}
case "not_multiple_of":
return `عدد نامعتبر: باید مضرب ${issue.divisor} باشد`;
case "unrecognized_keys":
return `کلید${issue.keys.length > 1 ? "های" : ""} ناشناس: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `کلید ناشناس در ${issue.origin}`;
case "invalid_union":
return `ورودی نامعتبر`;
case "invalid_element":
return `مقدار نامعتبر در ${issue.origin}`;
default:
return `ورودی نامعتبر`;
}
};
};
function default_1() {
return {
localeError: error(),
};
}

View File

@@ -0,0 +1,8 @@
import * as React from 'react';
type Props = {
className?: string;
isMinimized?: boolean;
};
export declare const MinimizeMaximizeIcon: React.FC<Props>;
export {};
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,12 @@
import type { Measurements, MeasurementUnit } from '../types-hoist/measurement';
import type { TimedEvent } from '../types-hoist/timedEvent';
/**
* Adds a measurement to the active transaction on the current global scope. You can optionally pass in a different span
* as the 4th parameter.
*/
export declare function setMeasurement(name: string, value: number, unit: MeasurementUnit, activeSpan?: import("..").Span | undefined): void;
/**
* Convert timed events to measurements.
*/
export declare function timedEventsToMeasurements(events: TimedEvent[]): Measurements | undefined;
//# sourceMappingURL=measurement.d.ts.map

View File

@@ -0,0 +1,32 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.z = void 0;
const z = __importStar(require("./external.cjs"));
exports.z = z;
__exportStar(require("./external.cjs"), exports);

View File

@@ -0,0 +1,18 @@
#ifndef WINDOWS_H
#define WINDOWS_H
#include <winsock2.h>
#include <windows.h>
#include "../shared/BruteForceBackend.hh"
class WindowsBackend : public BruteForceBackend {
public:
void start() override;
~WindowsBackend();
void subscribe(WatcherRef watcher) override;
void unsubscribe(WatcherRef watcher) override;
private:
bool mRunning;
};
#endif

View File

@@ -0,0 +1,133 @@
# Class: WebSocket
Extends: [`EventTarget`](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget)
The WebSocket object provides a way to manage a WebSocket connection to a server, allowing bidirectional communication. The API follows the [WebSocket spec](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket) and [RFC 6455](https://datatracker.ietf.org/doc/html/rfc6455).
## `new WebSocket(url[, protocol])`
Arguments:
* **url** `URL | string`
* **protocol** `string | string[] | WebSocketInit` (optional) - Subprotocol(s) to request the server use, or a [`Dispatcher`](/docs/docs/api/Dispatcher.md).
### Example:
This example will not work in browsers or other platforms that don't allow passing an object.
```mjs
import { WebSocket, ProxyAgent } from 'undici'
const proxyAgent = new ProxyAgent('my.proxy.server')
const ws = new WebSocket('wss://echo.websocket.events', {
dispatcher: proxyAgent,
protocols: ['echo', 'chat']
})
```
If you do not need a custom Dispatcher, it's recommended to use the following pattern:
```mjs
import { WebSocket } from 'undici'
const ws = new WebSocket('wss://echo.websocket.events', ['echo', 'chat'])
```
### Example with HTTP/2:
> ⚠️ Warning: WebSocket over HTTP/2 is experimental, it is likely to change in the future.
> 🗒️ Note: WebSocket over HTTP/2 may be enabled by default in a future version,
> this will happen by enabling HTTP/2 connections as the default behavior of Undici's Agent as well the global dispatcher.
> Stay tuned to the changelog for more information.
This example will not work in browsers or other platforms that don't allow passing an object.
```mjs
import { Agent } from 'undici'
const agent = new Agent({ allowH2: true })
const ws = new WebSocket('wss://echo.websocket.events', {
dispatcher: agent,
protocols: ['echo', 'chat']
})
```
# Class: WebSocketStream
> ⚠️ Warning: the WebSocketStream API has not been finalized and is likely to change.
See [MDN](https://developer.mozilla.org/en-US/docs/Web/API/WebSocketStream) for more information.
## `new WebSocketStream(url[, protocol])`
Arguments:
* **url** `URL | string`
* **options** `WebSocketStreamOptions` (optional)
### WebSocketStream Example
```js
const stream = new WebSocketStream('https://echo.websocket.org/')
const { readable, writable } = await stream.opened
async function read () {
/** @type {ReadableStreamReader} */
const reader = readable.getReader()
while (true) {
const { done, value } = await reader.read()
if (done) break
// do something with value
}
}
async function write () {
/** @type {WritableStreamDefaultWriter} */
const writer = writable.getWriter()
writer.write('Hello, world!')
writer.releaseLock()
}
read()
setInterval(() => write(), 5000)
```
## ping(websocket, payload)
Arguments:
* **websocket** `WebSocket` - The WebSocket instance to send the ping frame on
* **payload** `Buffer|undefined` (optional) - Optional payload data to include with the ping frame. Must not exceed 125 bytes.
Sends a ping frame to the WebSocket server. The server must respond with a pong frame containing the same payload data. This can be used for keepalive purposes or to verify that the connection is still active.
### Example:
```js
import { WebSocket, ping } from 'undici'
const ws = new WebSocket('wss://echo.websocket.events')
ws.addEventListener('open', () => {
// Send ping with no payload
ping(ws)
// Send ping with payload
const payload = Buffer.from('hello')
ping(ws, payload)
})
```
**Note**: A ping frame cannot have a payload larger than 125 bytes. The ping will only be sent if the WebSocket connection is in the OPEN state.
## Read More
- [MDN - WebSocket](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket)
- [The WebSocket Specification](https://www.rfc-editor.org/rfc/rfc6455)
- [The WHATWG WebSocket Specification](https://websockets.spec.whatwg.org/)

View File

@@ -0,0 +1,3 @@
import type { Init } from 'payload';
export declare const init: Init;
//# sourceMappingURL=init.d.ts.map

View File

@@ -0,0 +1,8 @@
import type { Where } from '../types/index.js';
export declare const appendNonTrashedFilter: ({ deletedAtPath, enableTrash, trash, where, }: {
deletedAtPath?: string;
enableTrash: boolean;
trash?: boolean;
where: Where;
}) => Where;
//# sourceMappingURL=appendNonTrashedFilter.d.ts.map

View File

@@ -0,0 +1,14 @@
import type { FeedbackFormData, FeedbackInternalOptions, FeedbackScreenshotIntegration, SendFeedback } from '@sentry/core';
import type { VNode } from 'preact';
export interface Props extends Pick<FeedbackInternalOptions, 'showEmail' | 'showName'> {
options: FeedbackInternalOptions;
defaultEmail: string;
defaultName: string;
onFormClose: () => void;
onSubmit: SendFeedback;
onSubmitSuccess: (data: FeedbackFormData, eventId: string) => void;
onSubmitError: (error: Error) => void;
screenshotInput: ReturnType<FeedbackScreenshotIntegration['createInput']> | undefined;
}
export declare function Form({ options, defaultEmail, defaultName, onFormClose, onSubmit, onSubmitSuccess, onSubmitError, showEmail, showName, screenshotInput, }: Props): VNode;
//# sourceMappingURL=Form.d.ts.map

View File

@@ -0,0 +1,13 @@
import { BaseGroupPlaybackControls } from './BaseGroup.mjs';
/**
* TODO: This is a temporary class to support the legacy
* thennable API
*/
class GroupPlaybackControls extends BaseGroupPlaybackControls {
then(onResolve, onReject) {
return Promise.all(this.animations).then(onResolve).catch(onReject);
}
}
export { GroupPlaybackControls };

View File

@@ -0,0 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CanonicalizeUnicodeLocaleId = CanonicalizeUnicodeLocaleId;
function CanonicalizeUnicodeLocaleId(locale) {
return Intl.getCanonicalLocales(locale)[0];
}

View File

@@ -0,0 +1,35 @@
import { type Field, type FieldState, type ServerFunction } from 'payload';
export type RenderFieldServerFnArgs<TField = Field> = {
/**
* Override field config pulled from schemaPath lookup
*/
field?: Partial<TField>;
/**
* Pass the value this field will receive when rendering it on the server.
* For richText, this helps provide initial state for sub-fields that are immediately rendered (like blocks)
* so that we can avoid multiple waterfall requests for each block that renders on the client.
*/
initialValue?: unknown;
/**
* Path to the field to render
* @default field name
*/
path?: string;
/**
* Dot schema path to a richText field declared in your config.
* Format:
* "collection.<collectionSlug>.<fieldPath>"
* "global.<globalSlug>.<fieldPath>"
*
* Examples:
* "collection.posts.richText"
* "global.siteSettings.content"
*/
schemaPath: string;
};
export type RenderFieldServerFnReturnType = {} & FieldState['customComponents'];
/**
* @experimental - may break in minor releases
*/
export declare const _internal_renderFieldHandler: ServerFunction<RenderFieldServerFnArgs, Promise<RenderFieldServerFnReturnType>>;
//# sourceMappingURL=renderFieldServerFn.d.ts.map

View File

@@ -0,0 +1,36 @@
import { toDate } from "./toDate.js";
/**
* The {@link startOfDay} function options.
*/
/**
* @name startOfDay
* @category Day Helpers
* @summary Return the start of a day for the given date.
*
* @description
* Return the start of a day for the given date.
* The result will be in the local timezone.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
*
* @param date - The original date
* @param options - The options
*
* @returns The start of a day
*
* @example
* // The start of a day for 2 September 2014 11:55:00:
* const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))
* //=> Tue Sep 02 2014 00:00:00
*/
export function startOfDay(date, options) {
const _date = toDate(date, options?.in);
_date.setHours(0, 0, 0, 0);
return _date;
}
// Fallback for modularized imports:
export default startOfDay;

View File

@@ -0,0 +1,10 @@
export declare class Deferred<T> {
private _promise;
private _resolve;
private _reject;
constructor();
get promise(): Promise<T>;
resolve(val: T): void;
reject(err: unknown): void;
}
//# sourceMappingURL=promise.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/List/ListSelection/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAEvE,OAAO,KAAgC,MAAM,OAAO,CAAA;AAWpD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,gBAAgB,CAAC,EAAE,sBAAsB,CAAA;IACzC,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,wBAAwB,CAAC,EAAE,OAAO,CAAA;IAClC,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,KAAK,CAAC,EAAE,KAAK,CAAA;CACd,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAoFtD,CAAA"}

View File

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

View File

@@ -0,0 +1,242 @@
import { entityKind } from "./entity.cjs";
import type { Column } from "./column.cjs";
import type { GelColumn, GelExtraConfigColumn } from "./gel-core/index.cjs";
import type { MySqlColumn } from "./mysql-core/index.cjs";
import type { ExtraConfigColumn, PgColumn, PgSequenceOptions } from "./pg-core/index.cjs";
import type { SingleStoreColumn } from "./singlestore-core/index.cjs";
import type { SQL } from "./sql/sql.cjs";
import type { SQLiteColumn } from "./sqlite-core/index.cjs";
import type { Assume, Simplify } from "./utils.cjs";
export type ColumnDataType = 'string' | 'number' | 'boolean' | 'array' | 'json' | 'date' | 'bigint' | 'custom' | 'buffer' | 'dateDuration' | 'duration' | 'relDuration' | 'localTime' | 'localDate' | 'localDateTime';
export type Dialect = 'pg' | 'mysql' | 'sqlite' | 'singlestore' | 'common' | 'gel';
export type GeneratedStorageMode = 'virtual' | 'stored';
export type GeneratedType = 'always' | 'byDefault';
export type GeneratedColumnConfig<TDataType> = {
as: TDataType | SQL | (() => SQL);
type?: GeneratedType;
mode?: GeneratedStorageMode;
};
export type GeneratedIdentityConfig = {
sequenceName?: string;
sequenceOptions?: PgSequenceOptions;
type: 'always' | 'byDefault';
};
export interface ColumnBuilderBaseConfig<TDataType extends ColumnDataType, TColumnType extends string> {
name: string;
dataType: TDataType;
columnType: TColumnType;
data: unknown;
driverParam: unknown;
enumValues: string[] | undefined;
}
export type MakeColumnConfig<T extends ColumnBuilderBaseConfig<ColumnDataType, string>, TTableName extends string, TData = T extends {
$type: infer U;
} ? U : T['data']> = {
name: T['name'];
tableName: TTableName;
dataType: T['dataType'];
columnType: T['columnType'];
data: TData;
driverParam: T['driverParam'];
notNull: T extends {
notNull: true;
} ? true : false;
hasDefault: T extends {
hasDefault: true;
} ? true : false;
isPrimaryKey: T extends {
isPrimaryKey: true;
} ? true : false;
isAutoincrement: T extends {
isAutoincrement: true;
} ? true : false;
hasRuntimeDefault: T extends {
hasRuntimeDefault: true;
} ? true : false;
enumValues: T['enumValues'];
baseColumn: T extends {
baseBuilder: infer U extends ColumnBuilderBase;
} ? BuildColumn<TTableName, U, 'common'> : never;
identity: T extends {
identity: 'always';
} ? 'always' : T extends {
identity: 'byDefault';
} ? 'byDefault' : undefined;
generated: T extends {
generated: infer G;
} ? unknown extends G ? undefined : G extends undefined ? undefined : G : undefined;
} & {};
export type ColumnBuilderTypeConfig<T extends ColumnBuilderBaseConfig<ColumnDataType, string>, TTypeConfig extends object = object> = Simplify<{
brand: 'ColumnBuilder';
name: T['name'];
dataType: T['dataType'];
columnType: T['columnType'];
data: T['data'];
driverParam: T['driverParam'];
notNull: T extends {
notNull: infer U;
} ? U : boolean;
hasDefault: T extends {
hasDefault: infer U;
} ? U : boolean;
enumValues: T['enumValues'];
identity: T extends {
identity: infer U;
} ? U : unknown;
generated: T extends {
generated: infer G;
} ? G extends undefined ? unknown : G : unknown;
} & TTypeConfig>;
export type ColumnBuilderRuntimeConfig<TData, TRuntimeConfig extends object = object> = {
name: string;
keyAsName: boolean;
notNull: boolean;
default: TData | SQL | undefined;
defaultFn: (() => TData | SQL) | undefined;
onUpdateFn: (() => TData | SQL) | undefined;
hasDefault: boolean;
primaryKey: boolean;
isUnique: boolean;
uniqueName: string | undefined;
uniqueType: string | undefined;
dataType: string;
columnType: string;
generated: GeneratedColumnConfig<TData> | undefined;
generatedIdentity: GeneratedIdentityConfig | undefined;
} & TRuntimeConfig;
export interface ColumnBuilderExtraConfig {
primaryKeyHasDefault?: boolean;
}
export type NotNull<T extends ColumnBuilderBase> = T & {
_: {
notNull: true;
};
};
export type HasDefault<T extends ColumnBuilderBase> = T & {
_: {
hasDefault: true;
};
};
export type IsPrimaryKey<T extends ColumnBuilderBase> = T & {
_: {
isPrimaryKey: true;
};
};
export type IsAutoincrement<T extends ColumnBuilderBase> = T & {
_: {
isAutoincrement: true;
};
};
export type HasRuntimeDefault<T extends ColumnBuilderBase> = T & {
_: {
hasRuntimeDefault: true;
};
};
export type $Type<T extends ColumnBuilderBase, TType> = T & {
_: {
$type: TType;
};
};
export type HasGenerated<T extends ColumnBuilderBase, TGenerated extends {} = {}> = T & {
_: {
hasDefault: true;
generated: TGenerated;
};
};
export type IsIdentity<T extends ColumnBuilderBase, TType extends 'always' | 'byDefault'> = T & {
_: {
notNull: true;
hasDefault: true;
identity: TType;
};
};
export interface ColumnBuilderBase<T extends ColumnBuilderBaseConfig<ColumnDataType, string> = ColumnBuilderBaseConfig<ColumnDataType, string>, TTypeConfig extends object = object> {
_: ColumnBuilderTypeConfig<T, TTypeConfig>;
}
export declare abstract class ColumnBuilder<T extends ColumnBuilderBaseConfig<ColumnDataType, string> = ColumnBuilderBaseConfig<ColumnDataType, string>, TRuntimeConfig extends object = object, TTypeConfig extends object = object, TExtraConfig extends ColumnBuilderExtraConfig = ColumnBuilderExtraConfig> implements ColumnBuilderBase<T, TTypeConfig> {
static readonly [entityKind]: string;
_: ColumnBuilderTypeConfig<T, TTypeConfig>;
protected config: ColumnBuilderRuntimeConfig<T['data'], TRuntimeConfig>;
constructor(name: T['name'], dataType: T['dataType'], columnType: T['columnType']);
/**
* Changes the data type of the column. Commonly used with `json` columns. Also, useful for branded types.
*
* @example
* ```ts
* const users = pgTable('users', {
* id: integer('id').$type<UserId>().primaryKey(),
* details: json('details').$type<UserDetails>().notNull(),
* });
* ```
*/
$type<TType>(): $Type<this, TType>;
/**
* Adds a `not null` clause to the column definition.
*
* Affects the `select` model of the table - columns *without* `not null` will be nullable on select.
*/
notNull(): NotNull<this>;
/**
* Adds a `default <value>` clause to the column definition.
*
* Affects the `insert` model of the table - columns *with* `default` are optional on insert.
*
* If you need to set a dynamic default value, use {@link $defaultFn} instead.
*/
default(value: (this['_'] extends {
$type: infer U;
} ? U : this['_']['data']) | SQL): HasDefault<this>;
/**
* Adds a dynamic default value to the column.
* The function will be called when the row is inserted, and the returned value will be used as the column value.
*
* **Note:** This value does not affect the `drizzle-kit` behavior, it is only used at runtime in `drizzle-orm`.
*/
$defaultFn(fn: () => (this['_'] extends {
$type: infer U;
} ? U : this['_']['data']) | SQL): HasRuntimeDefault<HasDefault<this>>;
/**
* Alias for {@link $defaultFn}.
*/
$default: (fn: () => (this["_"] extends {
$type: infer U;
} ? U : this["_"]["data"]) | SQL) => HasRuntimeDefault<HasDefault<this>>;
/**
* Adds a dynamic update value to the column.
* The function will be called when the row is updated, and the returned value will be used as the column value if none is provided.
* If no `default` (or `$defaultFn`) value is provided, the function will be called when the row is inserted as well, and the returned value will be used as the column value.
*
* **Note:** This value does not affect the `drizzle-kit` behavior, it is only used at runtime in `drizzle-orm`.
*/
$onUpdateFn(fn: () => (this['_'] extends {
$type: infer U;
} ? U : this['_']['data']) | SQL): HasDefault<this>;
/**
* Alias for {@link $onUpdateFn}.
*/
$onUpdate: (fn: () => (this["_"] extends {
$type: infer U;
} ? U : this["_"]["data"]) | SQL) => HasDefault<this>;
/**
* Adds a `primary key` clause to the column definition. This implicitly makes the column `not null`.
*
* In SQLite, `integer primary key` implicitly makes the column auto-incrementing.
*/
primaryKey(): TExtraConfig['primaryKeyHasDefault'] extends true ? IsPrimaryKey<HasDefault<NotNull<this>>> : IsPrimaryKey<NotNull<this>>;
abstract generatedAlwaysAs(as: SQL | T['data'] | (() => SQL), config?: Partial<GeneratedColumnConfig<unknown>>): HasGenerated<this, {
type: 'always';
}>;
}
export type BuildColumn<TTableName extends string, TBuilder extends ColumnBuilderBase, TDialect extends Dialect> = TDialect extends 'pg' ? PgColumn<MakeColumnConfig<TBuilder['_'], TTableName>, {}, Simplify<Omit<TBuilder['_'], keyof MakeColumnConfig<TBuilder['_'], TTableName> | 'brand' | 'dialect'>>> : TDialect extends 'mysql' ? MySqlColumn<MakeColumnConfig<TBuilder['_'], TTableName>, {}, Simplify<Omit<TBuilder['_'], keyof MakeColumnConfig<TBuilder['_'], TTableName> | 'brand' | 'dialect' | 'primaryKeyHasDefault' | 'mysqlColumnBuilderBrand'>>> : TDialect extends 'sqlite' ? SQLiteColumn<MakeColumnConfig<TBuilder['_'], TTableName>, {}, Simplify<Omit<TBuilder['_'], keyof MakeColumnConfig<TBuilder['_'], TTableName> | 'brand' | 'dialect'>>> : TDialect extends 'common' ? Column<MakeColumnConfig<TBuilder['_'], TTableName>, {}, Simplify<Omit<TBuilder['_'], keyof MakeColumnConfig<TBuilder['_'], TTableName> | 'brand' | 'dialect'>>> : TDialect extends 'singlestore' ? SingleStoreColumn<MakeColumnConfig<TBuilder['_'], TTableName>, {}, Simplify<Omit<TBuilder['_'], keyof MakeColumnConfig<TBuilder['_'], TTableName> | 'brand' | 'dialect' | 'primaryKeyHasDefault' | 'singlestoreColumnBuilderBrand'>>> : TDialect extends 'gel' ? GelColumn<MakeColumnConfig<TBuilder['_'], TTableName>, {}, Simplify<Omit<TBuilder['_'], keyof MakeColumnConfig<TBuilder['_'], TTableName> | 'brand' | 'dialect'>>> : never;
export type BuildIndexColumn<TDialect extends Dialect> = TDialect extends 'pg' ? ExtraConfigColumn : TDialect extends 'gel' ? GelExtraConfigColumn : never;
export type BuildColumns<TTableName extends string, TConfigMap extends Record<string, ColumnBuilderBase>, TDialect extends Dialect> = {
[Key in keyof TConfigMap]: BuildColumn<TTableName, {
_: Omit<TConfigMap[Key]['_'], 'name'> & {
name: TConfigMap[Key]['_']['name'] extends '' ? Assume<Key, string> : TConfigMap[Key]['_']['name'];
};
}, TDialect>;
} & {};
export type BuildExtraConfigColumns<_TTableName extends string, TConfigMap extends Record<string, ColumnBuilderBase>, TDialect extends Dialect> = {
[Key in keyof TConfigMap]: BuildIndexColumn<TDialect>;
} & {};
export type ChangeColumnTableName<TColumn extends Column, TAlias extends string, TDialect extends Dialect> = TDialect extends 'pg' ? PgColumn<MakeColumnConfig<TColumn['_'], TAlias>> : TDialect extends 'mysql' ? MySqlColumn<MakeColumnConfig<TColumn['_'], TAlias>> : TDialect extends 'singlestore' ? SingleStoreColumn<MakeColumnConfig<TColumn['_'], TAlias>> : TDialect extends 'sqlite' ? SQLiteColumn<MakeColumnConfig<TColumn['_'], TAlias>> : TDialect extends 'gel' ? GelColumn<MakeColumnConfig<TColumn['_'], TAlias>> : never;

View File

@@ -0,0 +1 @@
{"version":3,"file":"heater.js","sources":["../../../src/icons/heater.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Heater\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTEgOGMyLTMtMi0zIDAtNiIgLz4KICA8cGF0aCBkPSJNMTUuNSA4YzItMy0yLTMgMC02IiAvPgogIDxwYXRoIGQ9Ik02IDEwaC4wMSIgLz4KICA8cGF0aCBkPSJNNiAxNGguMDEiIC8+CiAgPHBhdGggZD0iTTEwIDE2di00IiAvPgogIDxwYXRoIGQ9Ik0xNCAxNnYtNCIgLz4KICA8cGF0aCBkPSJNMTggMTZ2LTQiIC8+CiAgPHBhdGggZD0iTTIwIDZhMiAyIDAgMCAxIDIgMnYxMGEyIDIgMCAwIDEtMiAySDRhMiAyIDAgMCAxLTItMlY4YTIgMiAwIDAgMSAyLTJoMyIgLz4KICA8cGF0aCBkPSJNNSAyMHYyIiAvPgogIDxwYXRoIGQ9Ik0xOSAyMHYyIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/heater\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 Heater = createLucideIcon('Heater', [\n ['path', { d: 'M11 8c2-3-2-3 0-6', key: '1ldv5m' }],\n ['path', { d: 'M15.5 8c2-3-2-3 0-6', key: '1otqoz' }],\n ['path', { d: 'M6 10h.01', key: '1lbq93' }],\n ['path', { d: 'M6 14h.01', key: 'zudwn7' }],\n ['path', { d: 'M10 16v-4', key: '1c25yv' }],\n ['path', { d: 'M14 16v-4', key: '1dkbt8' }],\n ['path', { d: 'M18 16v-4', key: '1yg9me' }],\n [\n 'path',\n { d: 'M20 6a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h3', key: '1ubg90' },\n ],\n ['path', { d: 'M5 20v2', key: '1abpe8' }],\n ['path', { d: 'M19 20v2', key: 'kqn6ft' }],\n]);\n\nexport default Heater;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,iBAAiB,QAAU,CAAA,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAqB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAClD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAuB,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,CACpD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAC1C,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA,CAAE,CAAA,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA0E,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,QAAS,CAAA,CAAA;AAAA,CAC/F,CAAA,CAAA,CAAA;AAAA,CAAA,CACA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,61 @@
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { buildSamplerFromEnv, loadDefaultConfig } from './config';
import { getNumberFromEnv } from '@opentelemetry/core';
export const DEFAULT_ATTRIBUTE_COUNT_LIMIT = 128;
export const DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT = Infinity;
/**
* Function to merge Default configuration (as specified in './config') with
* user provided configurations.
*/
export function mergeConfig(userConfig) {
const perInstanceDefaults = {
sampler: buildSamplerFromEnv(),
};
const DEFAULT_CONFIG = loadDefaultConfig();
const target = Object.assign({}, DEFAULT_CONFIG, perInstanceDefaults, userConfig);
target.generalLimits = Object.assign({}, DEFAULT_CONFIG.generalLimits, userConfig.generalLimits || {});
target.spanLimits = Object.assign({}, DEFAULT_CONFIG.spanLimits, userConfig.spanLimits || {});
return target;
}
/**
* When general limits are provided and model specific limits are not,
* configures the model specific limits by using the values from the general ones.
* @param userConfig User provided tracer configuration
*/
export function reconfigureLimits(userConfig) {
const spanLimits = Object.assign({}, userConfig.spanLimits);
/**
* Reassign span attribute count limit to use first non null value defined by user or use default value
*/
spanLimits.attributeCountLimit =
userConfig.spanLimits?.attributeCountLimit ??
userConfig.generalLimits?.attributeCountLimit ??
getNumberFromEnv('OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT') ??
getNumberFromEnv('OTEL_ATTRIBUTE_COUNT_LIMIT') ??
DEFAULT_ATTRIBUTE_COUNT_LIMIT;
/**
* Reassign span attribute value length limit to use first non null value defined by user or use default value
*/
spanLimits.attributeValueLengthLimit =
userConfig.spanLimits?.attributeValueLengthLimit ??
userConfig.generalLimits?.attributeValueLengthLimit ??
getNumberFromEnv('OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT') ??
getNumberFromEnv('OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT') ??
DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT;
return Object.assign({}, userConfig, { spanLimits });
}
//# sourceMappingURL=utility.js.map

View File

@@ -0,0 +1,79 @@
{
"name": "domutils",
"version": "3.2.2",
"description": "Utilities for working with htmlparser2's dom",
"author": "Felix Boehm <me@feedic.com>",
"funding": {
"url": "https://github.com/fb55/domutils?sponsor=1"
},
"license": "BSD-2-Clause",
"sideEffects": false,
"main": "lib/index.js",
"types": "lib/index.d.ts",
"module": "lib/esm/index.js",
"exports": {
"require": "./lib/index.js",
"import": "./lib/esm/index.js"
},
"files": [
"lib/**/*"
],
"scripts": {
"test": "npm run test:jest && npm run lint",
"test:jest": "jest",
"lint": "npm run lint:es && npm run lint:prettier",
"lint:es": "eslint --ignore-path .gitignore .",
"lint:prettier": "npm run prettier -- --check",
"format": "npm run format:es && npm run format:prettier",
"format:es": "npm run lint:es -- --fix",
"format:prettier": "npm run prettier -- --write",
"prettier": "prettier \"**/*.{ts,md,json,yml}\" --ignore-path .gitignore",
"build": "npm run build:cjs && npm run build:esm",
"build:cjs": "tsc --sourceRoot https://raw.githubusercontent.com/fb55/domutils/$(git rev-parse HEAD)/src/",
"build:esm": "npm run build:cjs -- --module esnext --target es2019 --outDir lib/esm && echo '{\"type\":\"module\"}' > lib/esm/package.json",
"build:docs": "typedoc src",
"prepare": "npm run build"
},
"repository": {
"type": "git",
"url": "git://github.com/fb55/domutils.git"
},
"keywords": [
"dom",
"htmlparser2"
],
"dependencies": {
"dom-serializer": "^2.0.0",
"domelementtype": "^2.3.0",
"domhandler": "^5.0.3"
},
"devDependencies": {
"@types/jest": "^29.5.14",
"@types/node": "^22.10.5",
"@typescript-eslint/eslint-plugin": "^8.19.0",
"@typescript-eslint/parser": "^8.19.0",
"eslint": "^8.57.1",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-jsdoc": "^50.6.1",
"htmlparser2": "~9.1.0",
"jest": "^29.7.0",
"prettier": "^3.4.2",
"ts-jest": "^29.2.5",
"typedoc": "^0.27.6",
"typescript": "^5.7.2"
},
"jest": {
"preset": "ts-jest",
"testEnvironment": "node",
"coverageProvider": "v8",
"moduleNameMapper": {
"^(.*)\\.js$": [
"$1.js",
"$1"
]
}
},
"prettier": {
"tabWidth": 4
}
}

View File

@@ -0,0 +1,121 @@
#!/usr/bin/env zx
import { $, fs, glob } from "zx";
import { ast_grep } from "./ast_grep.js";
import { errors } from "./errors.js";
import { root } from "./utils.js";
// clear generated content
await Promise.all([
fs.remove(root("cjs")),
fs.remove(root("_")),
fs.remove(root("src")),
]);
let modules = await glob("*.js", { cwd: root("esm") });
const task_queue = [];
const NO_MODIFY = [
"/* This file is automatically generated and should not be manually edited. */",
"/* To modify this file, please run the `npm run build` command instead. */",
];
// generate index.js
const indexESM = [...NO_MODIFY, ""];
const indexCJS = [`"use strict";`, "", ...NO_MODIFY, ""];
const cjs_export_list = [];
const cjs_module_lexer = [];
const main_package_json = fs.readJSONSync(root("package.json"));
main_package_json.exports = {
"./package.json": "./package.json",
"./esm/*": "./esm/*",
"./cjs/*": "./cjs/*",
"./src/*": "./src/*",
".": { import: "./esm/index.js", default: "./cjs/index.cjs" },
"./_": { import: "./esm/index.js", default: "./cjs/index.cjs" },
};
modules.forEach((p) => {
const importBinding = p.slice(0, -3);
main_package_json.exports[`./_/${importBinding}`] = {
import: `./esm/${importBinding}.js`,
default: `./cjs/${importBinding}.cjs`,
};
const alias_package = {
main: `../../cjs/${importBinding}.cjs`,
module: `../../esm/${importBinding}.js`,
};
task_queue.push(
fs.outputJSON(root("_", importBinding, "package.json"), alias_package, {
encoding: "utf-8",
spaces: 4,
}),
);
if (importBinding === "index") {
return;
}
task_queue.push(
fs.outputFile(root("src", `${importBinding}.mjs`), re_export_esm(importBinding), {
encoding: "utf-8",
}),
);
indexESM.push(`export { _ as ${importBinding} } from "./${importBinding}.js";`);
cjs_module_lexer.push(`${importBinding}: null,`);
cjs_export_list.push(`get ${importBinding}() {
return require("./${importBinding}.cjs")._;
},`);
});
indexCJS.push(
`0 && (module.exports = {`,
"/* @Annotate_start: the CommonJS named exports for ESM import in node */",
...cjs_module_lexer,
"/* @Annotate_end */",
`});`,
`module.exports = {`,
...cjs_export_list,
`};`,
);
task_queue.push(
fs.outputJSON(root("package.json"), main_package_json, { spaces: 4 }),
fs.outputFile(root("esm", "index.js"), indexESM.join("\n") + "\n", {
encoding: "utf-8",
}),
fs.outputFile(root("cjs", "index.cjs"), indexCJS.join("\n") + "\n", {
encoding: "utf-8",
}),
fs.outputFile(root("src", "index.mjs"), `export * from "../esm/index.js"`, {
"encoding": "utf-8",
}),
);
task_queue.push(...ast_grep());
await Promise.all(task_queue);
if (errors.length > 0) {
errors.forEach((e) => {
console.error(e);
});
process.exitCode = 1;
} else {
$.cwd = root(".");
await $`dprint fmt`;
await $`dprint fmt "scripts/*.js" -c scripts/.dprint.json`;
}
function re_export_esm(importBinding) {
return `export { _ as default } from "../esm/${importBinding}.js"`;
}

View File

@@ -0,0 +1,244 @@
import {URIComponent} from "fast-uri"
import type {CodeGen, Code, Name, ScopeValueSets, ValueScopeName} from "../compile/codegen"
import type {SchemaEnv, SchemaCxt, SchemaObjCxt} from "../compile"
import type {JSONType} from "../compile/rules"
import type {KeywordCxt} from "../compile/validate"
import type Ajv from "../core"
interface _SchemaObject {
id?: string
$id?: string
$schema?: string
[x: string]: any // TODO
}
export interface SchemaObject extends _SchemaObject {
id?: string
$id?: string
$schema?: string
$async?: false
[x: string]: any // TODO
}
export interface AsyncSchema extends _SchemaObject {
$async: true
}
export type AnySchemaObject = SchemaObject | AsyncSchema
export type Schema = SchemaObject | boolean
export type AnySchema = Schema | AsyncSchema
export type SchemaMap = {[Key in string]?: AnySchema}
export interface SourceCode {
validateName: ValueScopeName
validateCode: string
scopeValues: ScopeValueSets
evaluated?: Code
}
export interface DataValidationCxt<T extends string | number = string | number> {
instancePath: string
parentData: {[K in T]: any} // object or array
parentDataProperty: T // string or number
rootData: Record<string, any> | any[]
dynamicAnchors: {[Ref in string]?: ValidateFunction}
}
export interface ValidateFunction<T = unknown> {
// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
(this: Ajv | any, data: any, dataCxt?: DataValidationCxt): data is T
errors?: null | ErrorObject[]
evaluated?: Evaluated
schema: AnySchema
schemaEnv: SchemaEnv
source?: SourceCode
}
export interface JTDParser<T = unknown> {
(json: string): T | undefined
message?: string
position?: number
}
export type EvaluatedProperties = {[K in string]?: true} | true
export type EvaluatedItems = number | true
export interface Evaluated {
// determined at compile time if staticProps/Items is true
props?: EvaluatedProperties
items?: EvaluatedItems
// whether props/items determined at compile time
dynamicProps: boolean
dynamicItems: boolean
}
export interface AsyncValidateFunction<T = unknown> extends ValidateFunction<T> {
(...args: Parameters<ValidateFunction<T>>): Promise<T>
$async: true
}
export type AnyValidateFunction<T = any> = ValidateFunction<T> | AsyncValidateFunction<T>
export interface ErrorObject<K extends string = string, P = Record<string, any>, S = unknown> {
keyword: K
instancePath: string
schemaPath: string
params: P
// Added to validation errors of "propertyNames" keyword schema
propertyName?: string
// Excluded if option `messages` set to false.
message?: string
// These are added with the `verbose` option.
schema?: S
parentSchema?: AnySchemaObject
data?: unknown
}
export type ErrorNoParams<K extends string, S = unknown> = ErrorObject<K, Record<string, never>, S>
interface _KeywordDef {
keyword: string | string[]
type?: JSONType | JSONType[] // data types that keyword applies to
schemaType?: JSONType | JSONType[] // allowed type(s) of keyword value in the schema
allowUndefined?: boolean // used for keywords that can be invoked by other keywords, not being present in the schema
$data?: boolean // keyword supports [$data reference](../../docs/guide/combining-schemas.md#data-reference)
implements?: string[] // other schema keywords that this keyword implements
before?: string // keyword should be executed before this keyword (should be applicable to the same type)
post?: boolean // keyword should be executed after other keywords without post flag
metaSchema?: AnySchemaObject // meta-schema for keyword schema value - it is better to use schemaType where applicable
validateSchema?: AnyValidateFunction // compiled keyword metaSchema - should not be passed
dependencies?: string[] // keywords that must be present in the same schema
error?: KeywordErrorDefinition
$dataError?: KeywordErrorDefinition
}
export interface CodeKeywordDefinition extends _KeywordDef {
code: (cxt: KeywordCxt, ruleType?: string) => void
trackErrors?: boolean
}
export type MacroKeywordFunc = (
schema: any,
parentSchema: AnySchemaObject,
it: SchemaCxt
) => AnySchema
export type CompileKeywordFunc = (
schema: any,
parentSchema: AnySchemaObject,
it: SchemaObjCxt
) => DataValidateFunction
export interface DataValidateFunction {
(...args: Parameters<ValidateFunction>): boolean | Promise<any>
errors?: Partial<ErrorObject>[]
}
export interface SchemaValidateFunction {
(
schema: any,
data: any,
parentSchema?: AnySchemaObject,
dataCxt?: DataValidationCxt
): boolean | Promise<any>
errors?: Partial<ErrorObject>[]
}
export interface FuncKeywordDefinition extends _KeywordDef {
validate?: SchemaValidateFunction | DataValidateFunction
compile?: CompileKeywordFunc
// schema: false makes validate not to expect schema (DataValidateFunction)
schema?: boolean // requires "validate"
modifying?: boolean
async?: boolean
valid?: boolean
errors?: boolean | "full"
}
export interface MacroKeywordDefinition extends FuncKeywordDefinition {
macro: MacroKeywordFunc
}
export type KeywordDefinition =
| CodeKeywordDefinition
| FuncKeywordDefinition
| MacroKeywordDefinition
export type AddedKeywordDefinition = KeywordDefinition & {
type: JSONType[]
schemaType: JSONType[]
}
export interface KeywordErrorDefinition {
message: string | Code | ((cxt: KeywordErrorCxt) => string | Code)
params?: Code | ((cxt: KeywordErrorCxt) => Code)
}
export type Vocabulary = (KeywordDefinition | string)[]
export interface KeywordErrorCxt {
gen: CodeGen
keyword: string
data: Name
$data?: string | false
schema: any // TODO
parentSchema?: AnySchemaObject
schemaCode: Code | number | boolean
schemaValue: Code | number | boolean
schemaType?: JSONType[]
errsCount?: Name
params: KeywordCxtParams
it: SchemaCxt
}
export type KeywordCxtParams = {[P in string]?: Code | string | number}
export type FormatValidator<T extends string | number> = (data: T) => boolean
export type FormatCompare<T extends string | number> = (data1: T, data2: T) => number | undefined
export type AsyncFormatValidator<T extends string | number> = (data: T) => Promise<boolean>
export interface FormatDefinition<T extends string | number> {
type?: T extends string ? "string" | undefined : "number"
validate: FormatValidator<T> | (T extends string ? string | RegExp : never)
async?: false | undefined
compare?: FormatCompare<T>
}
export interface AsyncFormatDefinition<T extends string | number> {
type?: T extends string ? "string" | undefined : "number"
validate: AsyncFormatValidator<T>
async: true
compare?: FormatCompare<T>
}
export type AddedFormat =
| true
| RegExp
| FormatValidator<string>
| FormatDefinition<string>
| FormatDefinition<number>
| AsyncFormatDefinition<string>
| AsyncFormatDefinition<number>
export type Format = AddedFormat | string
export interface RegExpEngine {
(pattern: string, u: string): RegExpLike
code: string
}
export interface RegExpLike {
test: (s: string) => boolean
}
export interface UriResolver {
parse(uri: string): URIComponent
resolve(base: string, path: string): string
serialize(component: URIComponent): string
}

View File

@@ -0,0 +1,14 @@
.PHONY: publish-patch test
test:
npm test
patch: test
npm version patch -m "Bump version"
git push origin master --tags
npm publish
minor: test
npm version minor -m "Bump version"
git push origin master --tags
npm publish

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/providers/Params/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAC/D,OAAO,KAA6B,MAAM,OAAO,CAAA;AAEjD,MAAM,MAAM,MAAM,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAA;AACrD,UAAU,cAAe,SAAQ,MAAM;CAAG;AAI1C;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,CAGnE,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,SAAS,QAAO,cAA8B,CAAA"}

View File

@@ -0,0 +1,8 @@
import regeneratorAsyncGen from "./regeneratorAsyncGen.js";
function _regeneratorAsync(n, e, r, t, o) {
var a = regeneratorAsyncGen(n, e, r, t, o);
return a.next().then(function (n) {
return n.done ? n.value : a.next();
});
}
export { _regeneratorAsync as default };

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B zC"},B:{"1":"0 1 2 3 4 5 6 7 8 n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I","2":"C L M 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"},C:{"2":"0 1 2 3 4 5 6 7 8 9 0C VC J bB K D E F A B C L M G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B WC 6B XC 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R YC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I ZC aC OC 1C 2C 3C 4C 5C"},D:{"1":"0 1 2 3 4 5 6 7 8 n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I ZC aC OC","2":"9 J bB K D E F A B C L M G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB 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"},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":"0 1 2 3 4 5 6 7 8 Z a b c d e f g h i j k l m n o p q r s t u v w x y z","2":"9 F B C G N O P cB AB BB CB DB EB FB GB HB 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 JD KD LD MD PC xC ND QC"},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:{"2":"mD"},I:{"1":"I","2":"VC J nD oD pD qD yC rD sD"},J:{"2":"D A"},K:{"1":"H","2":"A B C PC xC QC"},L:{"1":"I"},M:{"2":"OC"},N:{"2":"A B"},O:{"2":"RC"},P:{"2":"9 J AB BB CB DB EB FB GB HB IB tD uD vD wD xD cC yD zD 0D 1D 2D SC TC UC 3D"},Q:{"2":"4D"},R:{"2":"5D"},S:{"2":"6D 7D"}},B:7,C:"Subresource Loading with Web Bundles",D:false};

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/elements/WhereBuilder/Condition/Text/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,eAAe,IAAI,KAAK,EAAE,MAAM,YAAY,CAAA;AAI1D,OAAO,cAAc,CAAA;AAIrB,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CA2EhC,CAAA"}

View File

@@ -0,0 +1 @@
Prism.languages.jsstacktrace={"error-message":{pattern:/^\S.*/m,alias:"string"},"stack-frame":{pattern:/(^[ \t]+)at[ \t].*/m,lookbehind:!0,inside:{"not-my-code":{pattern:/^at[ \t]+(?!\s)(?:node\.js|<unknown>|.*(?:node_modules|\(<anonymous>\)|\(<unknown>|<anonymous>$|\(internal\/|\(node\.js)).*/m,alias:"comment"},filename:{pattern:/(\bat\s+(?!\s)|\()(?:[a-zA-Z]:)?[^():]+(?=:)/,lookbehind:!0,alias:"url"},function:{pattern:/(\bat\s+(?:new\s+)?)(?!\s)[_$a-zA-Z\xA0-\uFFFF<][.$\w\xA0-\uFFFF<>]*/,lookbehind:!0,inside:{punctuation:/\./}},punctuation:/[()]/,keyword:/\b(?:at|new)\b/,alias:{pattern:/\[(?:as\s+)?(?!\s)[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\]/,alias:"variable"},"line-number":{pattern:/:\d+(?::\d+)?\b/,alias:"number",inside:{punctuation:/:/}}}}};

View File

@@ -0,0 +1 @@
{"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../../src/collections/endpoints/delete.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAO3D,eAAO,MAAM,aAAa,EAAE,cAqE3B,CAAA"}

View File

@@ -0,0 +1,32 @@
import type {SchemaObjCxt} from ".."
import {_, getProperty, stringify} from "../codegen"
import {checkStrictMode} from "../util"
export function assignDefaults(it: SchemaObjCxt, ty?: string): void {
const {properties, items} = it.schema
if (ty === "object" && properties) {
for (const key in properties) {
assignDefault(it, key, properties[key].default)
}
} else if (ty === "array" && Array.isArray(items)) {
items.forEach((sch, i: number) => assignDefault(it, i, sch.default))
}
}
function assignDefault(it: SchemaObjCxt, prop: string | number, defaultValue: unknown): void {
const {gen, compositeRule, data, opts} = it
if (defaultValue === undefined) return
const childData = _`${data}${getProperty(prop)}`
if (compositeRule) {
checkStrictMode(it, `default is ignored for: ${childData}`)
return
}
let condition = _`${childData} === undefined`
if (opts.useDefaults === "empty") {
condition = _`${condition} || ${childData} === null || ${childData} === ""`
}
// `${childData} === undefined` +
// (opts.useDefaults === "empty" ? ` || ${childData} === null || ${childData} === ""` : "")
gen.if(condition, _`${childData} = ${stringify(defaultValue)}`)
}

View File

@@ -0,0 +1,13 @@
#!/usr/bin/env node
const {spawn} = require('child_process');
if (process.env.npm_config_build_from_source === 'true') {
build();
}
function build() {
spawn('node-gyp', ['rebuild'], { stdio: 'inherit', shell: true }).on('exit', function (code) {
process.exit(code);
});
}

View File

@@ -0,0 +1,37 @@
Prism.languages.bro = {
'comment': {
pattern: /(^|[^\\$])#.*/,
lookbehind: true,
inside: {
'italic': /\b(?:FIXME|TODO|XXX)\b/
}
},
'string': {
pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
greedy: true
},
'boolean': /\b[TF]\b/,
'function': {
pattern: /(\b(?:event|function|hook)[ \t]+)\w+(?:::\w+)?/,
lookbehind: true
},
'builtin': /(?:@(?:load(?:-(?:plugin|sigs))?|unload|prefixes|ifn?def|else|(?:end)?if|DIR|FILENAME))|(?:&?(?:add_func|create_expire|default|delete_func|encrypt|error_handler|expire_func|group|log|mergeable|optional|persistent|priority|raw_output|read_expire|redef|rotate_interval|rotate_size|synchronized|type_column|write_expire))/,
'constant': {
pattern: /(\bconst[ \t]+)\w+/i,
lookbehind: true
},
'keyword': /\b(?:add|addr|alarm|any|bool|break|const|continue|count|delete|double|else|enum|event|export|file|for|function|global|hook|if|in|int|interval|local|module|next|of|opaque|pattern|port|print|record|return|schedule|set|string|subnet|table|time|timeout|using|vector|when)\b/,
'operator': /--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&|\|\|?|\?|\*|\/|~|\^|%/,
'number': /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,
'punctuation': /[{}[\];(),.:]/
};

View File

@@ -0,0 +1,636 @@
# path-scurry
Extremely high performant utility for building tools that read
the file system, minimizing filesystem and path string munging
operations to the greatest degree possible.
## Ugh, yet another file traversal thing on npm?
Yes. None of the existing ones gave me exactly what I wanted.
## Well what is it you wanted?
While working on [glob](http://npm.im/glob), I found that I
needed a module to very efficiently manage the traversal over a
folder tree, such that:
1. No `readdir()` or `stat()` would ever be called on the same
file or directory more than one time.
2. No `readdir()` calls would be made if we can be reasonably
sure that the path is not a directory. (Ie, a previous
`readdir()` or `stat()` covered the path, and
`ent.isDirectory()` is false.)
3. `path.resolve()`, `dirname()`, `basename()`, and other
string-parsing/munging operations are be minimized. This means
it has to track "provisional" child nodes that may not exist
(and if we find that they _don't_ exist, store that
information as well, so we don't have to ever check again).
4. The API is not limited to use as a stream/iterator/etc. There
are many cases where an API like node's `fs` is preferrable.
5. It's more important to prevent excess syscalls than to be up
to date, but it should be smart enough to know what it
_doesn't_ know, and go get it seamlessly when requested.
6. Do not blow up the JS heap allocation if operating on a
directory with a huge number of entries.
7. Handle all the weird aspects of Windows paths, like UNC paths
and drive letters and wrongway slashes, so that the consumer
can return canonical platform-specific paths without having to
parse or join or do any error-prone string munging.
## PERFORMANCE
JavaScript people throw around the word "blazing" a lot. I hope
that this module doesn't blaze anyone. But it does go very fast,
in the cases it's optimized for, if used properly.
PathScurry provides ample opportunities to get extremely good
performance, as well as several options to trade performance for
convenience.
Benchmarks can be run by executing `npm run bench`.
As is always the case, doing more means going slower, doing less
means going faster, and there are trade offs between speed and
memory usage.
PathScurry makes heavy use of [LRUCache](http://npm.im/lru-cache)
to efficiently cache whatever it can, and `Path` objects remain
in the graph for the lifetime of the walker, so repeated calls
with a single PathScurry object will be extremely fast. However,
adding items to a cold cache means "doing more", so in those
cases, we pay a price. Nothing is free, but every effort has been
made to reduce costs wherever possible.
Also, note that a "cache as long as possible" approach means that
changes to the filesystem may not be reflected in the results of
repeated PathScurry operations.
For resolving string paths, `PathScurry` ranges from 5-50 times
faster than `path.resolve` on repeated resolutions, but around
100 to 1000 times _slower_ on the first resolution. If your
program is spending a lot of time resolving the _same_ paths
repeatedly (like, thousands or millions of times), then this can
be beneficial. But both implementations are pretty fast, and
speeding up an infrequent operation from 4µs to 400ns is not
going to move the needle on your app's performance.
For walking file system directory trees, a lot depends on how
often a given PathScurry object will be used, and also on the
walk method used.
With default settings on a folder tree of 100,000 items,
consisting of around a 10-to-1 ratio of normal files to
directories, PathScurry performs comparably to
[@nodelib/fs.walk](http://npm.im/@nodelib/fs.walk), which is the
fastest and most reliable file system walker I could find. As far
as I can tell, it's almost impossible to go much faster in a
Node.js program, just based on how fast you can push syscalls out
to the fs thread pool.
On my machine, that is about 1000-1200 completed walks per second
for async or stream walks, and around 500-600 walks per second
synchronously.
In the warm cache state, PathScurry's performance increases
around 4x for async `for await` iteration, 10-15x faster for
streams and synchronous `for of` iteration, and anywhere from 30x
to 80x faster for the rest.
```
# walk 100,000 fs entries, 10/1 file/dir ratio
# operations / ms
New PathScurry object | Reuse PathScurry object
stream: 1112.589 | 13974.917
sync stream: 492.718 | 15028.343
async walk: 1095.648 | 32706.395
sync walk: 527.632 | 46129.772
async iter: 1288.821 | 5045.510
sync iter: 498.496 | 17920.746
```
A hand-rolled walk calling `entry.readdir()` and recursing
through the entries can benefit even more from caching, with
greater flexibility and without the overhead of streams or
generators.
The cold cache state is still limited by the costs of file system
operations, but with a warm cache, the only bottleneck is CPU
speed and VM optimizations. Of course, in that case, some care
must be taken to ensure that you don't lose performance as a
result of silly mistakes, like calling `readdir()` on entries
that you know are not directories.
```
# manual recursive iteration functions
cold cache | warm cache
async: 1164.901 | 17923.320
cb: 1101.127 | 40999.344
zalgo: 1082.240 | 66689.936
sync: 526.935 | 87097.591
```
In this case, the speed improves by around 10-20x in the async
case, 40x in the case of using `entry.readdirCB` with protections
against synchronous callbacks, and 50-100x with callback
deferrals disabled, and _several hundred times faster_ for
synchronous iteration.
If you can think of a case that is not covered in these
benchmarks, or an implementation that performs significantly
better than PathScurry, please [let me
know](https://github.com/isaacs/path-scurry/issues).
## USAGE
```ts
// hybrid module, load with either method
import { PathScurry, Path } from 'path-scurry'
// or:
const { PathScurry, Path } = require('path-scurry')
// very simple example, say we want to find and
// delete all the .DS_Store files in a given path
// note that the API is very similar to just a
// naive walk with fs.readdir()
import { unlink } from 'fs/promises'
// easy way, iterate over the directory and do the thing
const pw = new PathScurry(process.cwd())
for await (const entry of pw) {
if (entry.isFile() && entry.name === '.DS_Store') {
unlink(entry.fullpath())
}
}
// here it is as a manual recursive method
const walk = async (entry: Path) => {
const promises: Promise<any> = []
// readdir doesn't throw on non-directories, it just doesn't
// return any entries, to save stack trace costs.
// Items are returned in arbitrary unsorted order
for (const child of await pw.readdir(entry)) {
// each child is a Path object
if (child.name === '.DS_Store' && child.isFile()) {
// could also do pw.resolve(entry, child.name),
// just like fs.readdir walking, but .fullpath is
// a *slightly* more efficient shorthand.
promises.push(unlink(child.fullpath()))
} else if (child.isDirectory()) {
promises.push(walk(child))
}
}
return Promise.all(promises)
}
walk(pw.cwd).then(() => {
console.log('all .DS_Store files removed')
})
const pw2 = new PathScurry('/a/b/c') // pw2.cwd is the Path for /a/b/c
const relativeDir = pw2.cwd.resolve('../x') // Path entry for '/a/b/x'
const relative2 = pw2.cwd.resolve('/a/b/d/../x') // same path, same entry
assert.equal(relativeDir, relative2)
```
## API
[Full TypeDoc API](https://isaacs.github.io/path-scurry)
There are platform-specific classes exported, but for the most
part, the default `PathScurry` and `Path` exports are what you
most likely need, unless you are testing behavior for other
platforms.
Intended public API is documented here, but the full
documentation does include internal types, which should not be
accessed directly.
### Interface `PathScurryOpts`
The type of the `options` argument passed to the `PathScurry`
constructor.
- `nocase`: Boolean indicating that file names should be compared
case-insensitively. Defaults to `true` on darwin and win32
implementations, `false` elsewhere.
**Warning** Performing case-insensitive matching on a
case-sensitive filesystem will result in occasionally very
bizarre behavior. Performing case-sensitive matching on a
case-insensitive filesystem may negatively impact performance.
- `childrenCacheSize`: Number of child entries to cache, in order
to speed up `resolve()` and `readdir()` calls. Defaults to
`16 * 1024` (ie, `16384`).
Setting it to a higher value will run the risk of JS heap
allocation errors on large directory trees. Setting it to `256`
or smaller will significantly reduce the construction time and
data consumption overhead, but with the downside of operations
being slower on large directory trees. Setting it to `0` will
mean that effectively no operations are cached, and this module
will be roughly the same speed as `fs` for file system
operations, and _much_ slower than `path.resolve()` for
repeated path resolution.
- `fs` An object that will be used to override the default `fs`
methods. Any methods that are not overridden will use Node's
built-in implementations.
- lstatSync
- readdir (callback `withFileTypes` Dirent variant, used for
readdirCB and most walks)
- readdirSync
- readlinkSync
- realpathSync
- promises: Object containing the following async methods:
- lstat
- readdir (Dirent variant only)
- readlink
- realpath
### Interface `WalkOptions`
The options object that may be passed to all walk methods.
- `withFileTypes`: Boolean, default true. Indicates that `Path`
objects should be returned. Set to `false` to get string paths
instead.
- `follow`: Boolean, default false. Attempt to read directory
entries from symbolic links. Otherwise, only actual directories
are traversed. Regardless of this setting, a given target path
will only ever be walked once, meaning that a symbolic link to
a previously traversed directory will never be followed.
Setting this imposes a slight performance penalty, because
`readlink` must be called on all symbolic links encountered, in
order to avoid infinite cycles.
- `filter`: Function `(entry: Path) => boolean`. If provided,
will prevent the inclusion of any entry for which it returns a
falsey value. This will not prevent directories from being
traversed if they do not pass the filter, though it will
prevent the directories themselves from being included in the
results. By default, if no filter is provided, then all entries
are included in the results.
- `walkFilter`: Function `(entry: Path) => boolean`. If provided,
will prevent the traversal of any directory (or in the case of
`follow:true` symbolic links to directories) for which the
function returns false. This will not prevent the directories
themselves from being included in the result set. Use `filter`
for that.
Note that TypeScript return types will only be inferred properly
from static analysis if the `withFileTypes` option is omitted, or
a constant `true` or `false` value.
### Class `PathScurry`
The main interface. Defaults to an appropriate class based on the
current platform.
Use `PathScurryWin32`, `PathScurryDarwin`, or `PathScurryPosix`
if implementation-specific behavior is desired.
All walk methods may be called with a `WalkOptions` argument to
walk over the object's current working directory with the
supplied options.
#### `async pw.walk(entry?: string | Path | WalkOptions, opts?: WalkOptions)`
Walk the directory tree according to the options provided,
resolving to an array of all entries found.
#### `pw.walkSync(entry?: string | Path | WalkOptions, opts?: WalkOptions)`
Walk the directory tree according to the options provided,
returning an array of all entries found.
#### `pw.iterate(entry?: string | Path | WalkOptions, opts?: WalkOptions)`
Iterate over the directory asynchronously, for use with `for
await of`. This is also the default async iterator method.
#### `pw.iterateSync(entry?: string | Path | WalkOptions, opts?: WalkOptions)`
Iterate over the directory synchronously, for use with `for of`.
This is also the default sync iterator method.
#### `pw.stream(entry?: string | Path | WalkOptions, opts?: WalkOptions)`
Return a [Minipass](http://npm.im/minipass) stream that emits
each entry or path string in the walk. Results are made available
asynchronously.
#### `pw.streamSync(entry?: string | Path | WalkOptions, opts?: WalkOptions)`
Return a [Minipass](http://npm.im/minipass) stream that emits
each entry or path string in the walk. Results are made available
synchronously, meaning that the walk will complete in a single
tick if the stream is fully consumed.
#### `pw.cwd`
Path object representing the current working directory for the
PathScurry.
#### `pw.chdir(path: string)`
Set the new effective current working directory for the scurry
object, so that `path.relative()` and `path.relativePosix()`
return values relative to the new cwd path.
#### `pw.depth(path?: Path | string): number`
Return the depth of the specified path (or the PathScurry cwd)
within the directory tree.
Root entries have a depth of `0`.
#### `pw.resolve(...paths: string[])`
Caching `path.resolve()`.
Significantly faster than `path.resolve()` if called repeatedly
with the same paths. Significantly slower otherwise, as it builds
out the cached Path entries.
To get a `Path` object resolved from the `PathScurry`, use
`pw.cwd.resolve(path)`. Note that `Path.resolve` only takes a
single string argument, not multiple.
#### `pw.resolvePosix(...paths: string[])`
Caching `path.resolve()`, but always using posix style paths.
This is identical to `pw.resolve(...paths)` on posix systems (ie,
everywhere except Windows).
On Windows, it returns the full absolute UNC path using `/`
separators. Ie, instead of `'C:\\foo\\bar`, it would return
`//?/C:/foo/bar`.
#### `pw.relative(path: string | Path): string`
Return the relative path from the PathWalker cwd to the supplied
path string or entry.
If the nearest common ancestor is the root, then an absolute path
is returned.
#### `pw.relativePosix(path: string | Path): string`
Return the relative path from the PathWalker cwd to the supplied
path string or entry, using `/` path separators.
If the nearest common ancestor is the root, then an absolute path
is returned.
On posix platforms (ie, all platforms except Windows), this is
identical to `pw.relative(path)`.
On Windows systems, it returns the resulting string as a
`/`-delimited path. If an absolute path is returned (because the
target does not share a common ancestor with `pw.cwd`), then a
full absolute UNC path will be returned. Ie, instead of
`'C:\\foo\\bar`, it would return `//?/C:/foo/bar`.
#### `pw.basename(path: string | Path): string`
Return the basename of the provided string or Path.
#### `pw.dirname(path: string | Path): string`
Return the parent directory of the supplied string or Path.
#### `async pw.readdir(dir = pw.cwd, opts = { withFileTypes: true })`
Read the directory and resolve to an array of strings if
`withFileTypes` is explicitly set to `false` or Path objects
otherwise.
Can be called as `pw.readdir({ withFileTypes: boolean })` as
well.
Returns `[]` if no entries are found, or if any error occurs.
Note that TypeScript return types will only be inferred properly
from static analysis if the `withFileTypes` option is omitted, or
a constant `true` or `false` value.
#### `pw.readdirSync(dir = pw.cwd, opts = { withFileTypes: true })`
Synchronous `pw.readdir()`
#### `async pw.readlink(link = pw.cwd, opts = { withFileTypes: false })`
Call `fs.readlink` on the supplied string or Path object, and
return the result.
Can be called as `pw.readlink({ withFileTypes: boolean })` as
well.
Returns `undefined` if any error occurs (for example, if the
argument is not a symbolic link), or a `Path` object if
`withFileTypes` is explicitly set to `true`, or a string
otherwise.
Note that TypeScript return types will only be inferred properly
from static analysis if the `withFileTypes` option is omitted, or
a constant `true` or `false` value.
#### `pw.readlinkSync(link = pw.cwd, opts = { withFileTypes: false })`
Synchronous `pw.readlink()`
#### `async pw.lstat(entry = pw.cwd)`
Call `fs.lstat` on the supplied string or Path object, and fill
in as much information as possible, returning the updated `Path`
object.
Returns `undefined` if the entry does not exist, or if any error
is encountered.
Note that some `Stats` data (such as `ino`, `dev`, and `mode`)
will not be supplied. For those things, you'll need to call
`fs.lstat` yourself.
#### `pw.lstatSync(entry = pw.cwd)`
Synchronous `pw.lstat()`
#### `pw.realpath(entry = pw.cwd, opts = { withFileTypes: false })`
Call `fs.realpath` on the supplied string or Path object, and
return the realpath if available.
Returns `undefined` if any error occurs.
May be called as `pw.realpath({ withFileTypes: boolean })` to run
on `pw.cwd`.
#### `pw.realpathSync(entry = pw.cwd, opts = { withFileTypes: false })`
Synchronous `pw.realpath()`
### Class `Path` implements [fs.Dirent](https://nodejs.org/docs/latest/api/fs.html#class-fsdirent)
Object representing a given path on the filesystem, which may or
may not exist.
Note that the actual class in use will be either `PathWin32` or
`PathPosix`, depending on the implementation of `PathScurry` in
use. They differ in the separators used to split and join path
strings, and the handling of root paths.
In `PathPosix` implementations, paths are split and joined using
the `'/'` character, and `'/'` is the only root path ever in use.
In `PathWin32` implementations, paths are split using either
`'/'` or `'\\'` and joined using `'\\'`, and multiple roots may
be in use based on the drives and UNC paths encountered. UNC
paths such as `//?/C:/` that identify a drive letter, will be
treated as an alias for the same root entry as their associated
drive letter (in this case `'C:\\'`).
#### `path.name`
Name of this file system entry.
**Important**: _always_ test the path name against any test
string using the `isNamed` method, and not by directly comparing
this string. Otherwise, unicode path strings that the system sees
as identical will not be properly treated as the same path,
leading to incorrect behavior and possible security issues.
#### `path.isNamed(name: string): boolean`
Return true if the path is a match for the given path name. This
handles case sensitivity and unicode normalization.
Note: even on case-sensitive systems, it is **not** safe to test
the equality of the `.name` property to determine whether a given
pathname matches, due to unicode normalization mismatches.
Always use this method instead of testing the `path.name`
property directly.
#### `path.isCWD`
Set to true if this `Path` object is the current working
directory of the `PathScurry` collection that contains it.
#### `path.getType()`
Returns the type of the Path object, `'File'`, `'Directory'`,
etc.
#### `path.isType(t: type)`
Returns true if `is{t}()` returns true.
For example, `path.isType('Directory')` is equivalent to
`path.isDirectory()`.
#### `path.depth()`
Return the depth of the Path entry within the directory tree.
Root paths have a depth of `0`.
#### `path.fullpath()`
The fully resolved path to the entry.
#### `path.fullpathPosix()`
The fully resolved path to the entry, using `/` separators.
On posix systems, this is identical to `path.fullpath()`. On
windows, this will return a fully resolved absolute UNC path
using `/` separators. Eg, instead of `'C:\\foo\\bar'`, it will
return `'//?/C:/foo/bar'`.
#### `path.isFile()`, `path.isDirectory()`, etc.
Same as the identical `fs.Dirent.isX()` methods.
#### `path.isUnknown()`
Returns true if the path's type is unknown. Always returns true
when the path is known to not exist.
#### `path.resolve(p: string)`
Return a `Path` object associated with the provided path string
as resolved from the current Path object.
#### `path.relative(): string`
Return the relative path from the PathWalker cwd to the supplied
path string or entry.
If the nearest common ancestor is the root, then an absolute path
is returned.
#### `path.relativePosix(): string`
Return the relative path from the PathWalker cwd to the supplied
path string or entry, using `/` path separators.
If the nearest common ancestor is the root, then an absolute path
is returned.
On posix platforms (ie, all platforms except Windows), this is
identical to `pw.relative(path)`.
On Windows systems, it returns the resulting string as a
`/`-delimited path. If an absolute path is returned (because the
target does not share a common ancestor with `pw.cwd`), then a
full absolute UNC path will be returned. Ie, instead of
`'C:\\foo\\bar`, it would return `//?/C:/foo/bar`.
#### `async path.readdir()`
Return an array of `Path` objects found by reading the associated
path entry.
If path is not a directory, or if any error occurs, returns `[]`,
and marks all children as provisional and non-existent.
#### `path.readdirSync()`
Synchronous `path.readdir()`
#### `async path.readlink()`
Return the `Path` object referenced by the `path` as a symbolic
link.
If the `path` is not a symbolic link, or any error occurs,
returns `undefined`.
#### `path.readlinkSync()`
Synchronous `path.readlink()`
#### `async path.lstat()`
Call `lstat` on the path object, and fill it in with details
determined.
If path does not exist, or any other error occurs, returns
`undefined`, and marks the path as "unknown" type.
#### `path.lstatSync()`
Synchronous `path.lstat()`
#### `async path.realpath()`
Call `realpath` on the path, and return a Path object
corresponding to the result, or `undefined` if any error occurs.
#### `path.realpathSync()`
Synchornous `path.realpath()`

View File

@@ -0,0 +1 @@
module.exports={C:{"5":0.05075,"43":0.00423,"68":0.00423,"69":0.00423,"72":0.00423,"98":0.00423,"109":0.00423,"110":0.00423,"115":0.07189,"120":0.00423,"121":0.00423,"125":0.00423,"126":0.00423,"127":0.01692,"129":0.00423,"139":0.00423,"140":0.0296,"141":0.00423,"142":0.00846,"143":0.01692,"144":0.02537,"145":0.65127,"146":0.71893,"147":0.00423,_:"2 3 4 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 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 70 71 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 99 100 101 102 103 104 105 106 107 108 111 112 113 114 116 117 118 119 122 123 124 128 130 131 132 133 134 135 136 137 138 148 149 3.5 3.6"},D:{"47":0.00423,"56":0.00423,"59":0.00423,"62":0.00423,"64":0.01269,"65":0.00423,"66":0.00423,"67":0.02537,"68":0.00423,"69":0.05075,"70":0.00846,"72":0.00846,"73":0.00846,"75":0.01269,"79":0.0296,"81":0.03806,"83":0.01692,"85":0.01269,"86":0.00423,"87":0.03383,"90":0.00423,"91":0.00423,"93":0.00846,"94":0.01269,"95":0.02115,"96":0.00423,"97":0.00423,"98":0.01692,"103":0.17339,"104":0.15224,"105":0.14379,"106":0.15647,"107":0.14802,"108":0.15224,"109":0.79928,"110":0.14802,"111":0.21145,"112":5.36237,"113":0.00423,"114":0.01269,"116":0.33832,"117":0.14802,"119":0.08458,"120":0.15647,"121":0.00846,"122":0.08881,"123":0.00423,"124":0.15224,"125":0.12687,"126":2.90532,"127":0.02537,"128":0.03806,"129":0.00423,"130":0.01692,"131":0.35101,"132":0.06344,"133":0.2918,"134":0.0296,"135":0.01269,"136":0.03806,"137":0.06344,"138":0.2326,"139":0.11418,"140":0.09304,"141":0.2622,"142":4.34318,"143":6.26315,"144":0.06344,"145":0.01269,_:"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 48 49 50 51 52 53 54 55 57 58 60 61 63 71 74 76 77 78 80 84 88 89 92 99 100 101 102 115 118 146"},F:{"46":0.00846,"63":0.00423,"92":0.00423,"93":0.01692,"95":0.01692,"113":0.00423,"120":0.00423,"122":0.00423,"123":0.00846,"124":0.52017,"125":0.44405,_:"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 47 48 49 50 51 52 53 54 55 56 57 58 60 62 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 89 90 91 94 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 114 115 116 117 118 119 121 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"13":0.00423,"17":0.00423,"18":0.00846,"85":0.00423,"89":0.00423,"90":0.00846,"92":0.05075,"100":0.01269,"103":0.00423,"109":0.00846,"122":0.01269,"124":0.00423,"125":0.00423,"126":0.00846,"130":0.00423,"132":0.00423,"133":0.00846,"134":0.00423,"136":0.00423,"137":0.00423,"138":0.01269,"139":0.02115,"140":0.05075,"141":0.02537,"142":1.30253,"143":2.41053,_:"12 14 15 16 79 80 81 83 84 86 87 88 91 93 94 95 96 97 98 99 101 102 104 105 106 107 108 110 111 112 113 114 115 116 117 118 119 120 121 123 127 128 129 131 135"},E:{"14":0.00423,_:"0 4 5 6 7 8 9 10 11 12 13 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 12.1 15.1 15.2-15.3 15.4 15.5 16.0 16.2 16.3 16.4 17.0 17.3","11.1":0.00423,"13.1":0.02115,"14.1":0.01269,"15.6":0.07612,"16.1":0.00423,"16.5":0.00423,"16.6":0.04229,"17.1":0.00846,"17.2":0.00423,"17.4":0.00423,"17.5":0.01269,"17.6":0.06766,"18.0":0.00423,"18.1":0.00846,"18.2":0.00423,"18.3":0.01269,"18.4":0.01692,"18.5-18.6":0.02115,"26.0":0.04229,"26.1":0.22414,"26.2":0.06344,"26.3":0.00846},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00213,"5.0-5.1":0,"6.0-6.1":0.00426,"7.0-7.1":0.0032,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.00852,"10.0-10.2":0.00107,"10.3":0.01491,"11.0-11.2":0.18324,"11.3-11.4":0.00533,"12.0-12.1":0.00426,"12.2-12.5":0.04794,"13.0-13.1":0.00107,"13.2":0.00746,"13.3":0.00213,"13.4-13.7":0.00746,"14.0-14.4":0.01491,"14.5-14.8":0.01598,"15.0-15.1":0.01705,"15.2-15.3":0.01278,"15.4":0.01385,"15.5":0.01491,"15.6-15.8":0.23118,"16.0":0.02663,"16.1":0.05114,"16.2":0.02663,"16.3":0.04794,"16.4":0.01172,"16.5":0.02024,"16.6-16.7":0.30042,"17.0":0.01705,"17.1":0.0277,"17.2":0.02024,"17.3":0.03089,"17.4":0.0522,"17.5":0.10227,"17.6-17.7":0.2365,"18.0":0.05327,"18.1":0.11079,"18.2":0.05859,"18.3":0.19069,"18.4":0.09801,"18.5-18.7":7.03755,"26.0":0.13743,"26.1":1.1431,"26.2":0.21733,"26.3":0.00959},P:{"4":0.02101,"22":0.01051,"24":0.02101,"25":0.03152,"26":0.02101,"27":0.09455,"28":0.13657,"29":0.93495,_:"20 21 23 5.0-5.4 6.2-6.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","7.2-7.4":0.06303,"19.0":0.01051},I:{"0":0.0749,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0.00002,"4.4":0,"4.4.3-4.4.4":0.00006},A:{"11":0.10995,_:"6 7 8 9 10 5.5"},K:{"0":0.61675,_:"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":0.01154},O:{"0":0.08079},H:{"0":0.07},L:{"0":54.31331},R:{_:"0"},M:{"0":0.08657}};

View File

@@ -0,0 +1 @@
{"version":3,"file":"is-directus-error.js","names":[],"sources":["../../src/utils/is-directus-error.ts"],"sourcesContent":["import type { DirectusError } from '../types/error.js';\n\n/**\n * A type guard to check if an error is a Directus API error\n */\nexport function isDirectusError<R = Response>(error: unknown): error is DirectusError<R> {\n\treturn (\n\t\ttypeof error === 'object' &&\n\t\terror !== null &&\n\t\t'errors' in error &&\n\t\tArray.isArray(error.errors) &&\n\t\t'message' in error.errors[0] &&\n\t\t'extensions' in error.errors[0] &&\n\t\t'code' in error.errors[0].extensions\n\t);\n}\n"],"mappings":"AAKA,SAAgB,EAA8B,EAA2C,CACxF,OACC,OAAO,GAAU,YACjB,GACA,WAAY,GACZ,MAAM,QAAQ,EAAM,OAAO,EAC3B,YAAa,EAAM,OAAO,IAC1B,eAAgB,EAAM,OAAO,IAC7B,SAAU,EAAM,OAAO,GAAG"}

View File

@@ -0,0 +1,27 @@
"use strict";
exports.subMonths = subMonths;
var _index = require("./addMonths.js");
/**
* @name subMonths
* @category Month Helpers
* @summary Subtract the specified number of months from the given date.
*
* @description
* Subtract the specified number of months from 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).
*
* @param date - The date to be changed
* @param amount - The amount of months to be subtracted.
*
* @returns The new date with the months subtracted
*
* @example
* // Subtract 5 months from 1 February 2015:
* const result = subMonths(new Date(2015, 1, 1), 5)
* //=> Mon Sep 01 2014 00:00:00
*/
function subMonths(date, amount) {
return (0, _index.addMonths)(date, -amount);
}

View File

@@ -0,0 +1,44 @@
"use strict";
exports.tzOffset = tzOffset;
const offsetFormatCache = {};
const offsetCache = {};
/**
* The function extracts UTC offset in minutes from the given date in specified
* time zone.
*
* Unlike `Date.prototype.getTimezoneOffset`, this function returns the value
* mirrored to the sign of the offset in the time zone. For Asia/Singapore
* (UTC+8), `tzOffset` returns 480, while `getTimezoneOffset` returns -480.
*
* @param timeZone - Time zone name (IANA or UTC offset)
* @param date - Date to check the offset for
*
* @returns UTC offset in minutes
*/
function tzOffset(timeZone, date) {
try {
const format = offsetFormatCache[timeZone] ||= new Intl.DateTimeFormat("en-GB", {
timeZone,
hour: "numeric",
timeZoneName: "longOffset"
}).format;
const offsetStr = format(date).split('GMT')[1] || '';
if (offsetStr in offsetCache) return offsetCache[offsetStr];
return calcOffset(offsetStr, offsetStr.split(":"));
} catch {
// Fallback to manual parsing if the runtime doesn't support ±HH:MM/±HHMM/±HH
// See: https://github.com/nodejs/node/issues/53419
if (timeZone in offsetCache) return offsetCache[timeZone];
const captures = timeZone?.match(offsetRe);
if (captures) return calcOffset(timeZone, captures.slice(1));
return NaN;
}
}
const offsetRe = /([+-]\d\d):?(\d\d)?/;
function calcOffset(cacheStr, values) {
const hours = +values[0];
const minutes = +(values[1] || 0);
return offsetCache[cacheStr] = hours > 0 ? hours * 60 + minutes : hours * 60 - minutes;
}

View File

@@ -0,0 +1,16 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const ToggleRight = createLucideIcon("ToggleRight", [
["rect", { width: "20", height: "12", x: "2", y: "6", rx: "6", ry: "6", key: "f2vt7d" }],
["circle", { cx: "16", cy: "12", r: "2", key: "4ma0v8" }]
]);
export { ToggleRight as default };
//# sourceMappingURL=toggle-right.js.map

View File

@@ -0,0 +1,48 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const integration = require('../integration.js');
const metadata = require('../metadata.js');
const envelope = require('../utils/envelope.js');
/**
* Adds module metadata to stack frames.
*
* Metadata can be injected by the Sentry bundler plugins using the `moduleMetadata` config option.
*
* When this integration is added, the metadata passed to the bundler plugin is added to the stack frames of all events
* under the `module_metadata` property. This can be used to help in tagging or routing of events from different teams
* our sources
*/
const moduleMetadataIntegration = integration.defineIntegration(() => {
return {
name: 'ModuleMetadata',
setup(client) {
// We need to strip metadata from stack frames before sending them to Sentry since these are client side only.
client.on('beforeEnvelope', envelope$1 => {
envelope.forEachEnvelopeItem(envelope$1, (item, type) => {
if (type === 'event') {
const event = Array.isArray(item) ? (item )[1] : undefined;
if (event) {
metadata.stripMetadataFromStackFrames(event);
item[1] = event;
}
}
});
});
client.on('applyFrameMetadata', event => {
// Only apply stack frame metadata to error events
if (event.type) {
return;
}
const stackParser = client.getOptions().stackParser;
metadata.addMetadataToStackFrames(stackParser, event);
});
},
};
});
exports.moduleMetadataIntegration = moduleMetadataIntegration;
//# sourceMappingURL=moduleMetadata.js.map

View File

@@ -0,0 +1,17 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const PillBottle = createLucideIcon("PillBottle", [
["path", { d: "M18 11h-4a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1h4", key: "17ldeb" }],
["path", { d: "M6 7v13a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V7", key: "nc37y6" }],
["rect", { width: "16", height: "5", x: "4", y: "2", rx: "1", key: "3jeezo" }]
]);
export { PillBottle as default };
//# sourceMappingURL=pill-bottle.js.map

View File

@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('value', require('../value'), require('./_falseOptions'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -0,0 +1,345 @@
import net from 'net';
import http from 'http';
import https from 'https';
import { Duplex } from 'stream';
import { EventEmitter } from 'events';
import createDebug from 'debug';
import promisify from './promisify';
const debug = createDebug('agent-base');
function isAgent(v: any): v is createAgent.AgentLike {
return Boolean(v) && typeof v.addRequest === 'function';
}
function isSecureEndpoint(): boolean {
const { stack } = new Error();
if (typeof stack !== 'string') return false;
return stack.split('\n').some(l => l.indexOf('(https.js:') !== -1 || l.indexOf('node:https:') !== -1);
}
function createAgent(opts?: createAgent.AgentOptions): createAgent.Agent;
function createAgent(
callback: createAgent.AgentCallback,
opts?: createAgent.AgentOptions
): createAgent.Agent;
function createAgent(
callback?: createAgent.AgentCallback | createAgent.AgentOptions,
opts?: createAgent.AgentOptions
) {
return new createAgent.Agent(callback, opts);
}
namespace createAgent {
export interface ClientRequest extends http.ClientRequest {
_last?: boolean;
_hadError?: boolean;
method: string;
}
export interface AgentRequestOptions {
host?: string;
path?: string;
// `port` on `http.RequestOptions` can be a string or undefined,
// but `net.TcpNetConnectOpts` expects only a number
port: number;
}
export interface HttpRequestOptions
extends AgentRequestOptions,
Omit<http.RequestOptions, keyof AgentRequestOptions> {
secureEndpoint: false;
}
export interface HttpsRequestOptions
extends AgentRequestOptions,
Omit<https.RequestOptions, keyof AgentRequestOptions> {
secureEndpoint: true;
}
export type RequestOptions = HttpRequestOptions | HttpsRequestOptions;
export type AgentLike = Pick<createAgent.Agent, 'addRequest'> | http.Agent;
export type AgentCallbackReturn = Duplex | AgentLike;
export type AgentCallbackCallback = (
err?: Error | null,
socket?: createAgent.AgentCallbackReturn
) => void;
export type AgentCallbackPromise = (
req: createAgent.ClientRequest,
opts: createAgent.RequestOptions
) =>
| createAgent.AgentCallbackReturn
| Promise<createAgent.AgentCallbackReturn>;
export type AgentCallback = typeof Agent.prototype.callback;
export type AgentOptions = {
timeout?: number;
};
/**
* Base `http.Agent` implementation.
* No pooling/keep-alive is implemented by default.
*
* @param {Function} callback
* @api public
*/
export class Agent extends EventEmitter {
public timeout: number | null;
public maxFreeSockets: number;
public maxTotalSockets: number;
public maxSockets: number;
public sockets: {
[key: string]: net.Socket[];
};
public freeSockets: {
[key: string]: net.Socket[];
};
public requests: {
[key: string]: http.IncomingMessage[];
};
public options: https.AgentOptions;
private promisifiedCallback?: createAgent.AgentCallbackPromise;
private explicitDefaultPort?: number;
private explicitProtocol?: string;
constructor(
callback?: createAgent.AgentCallback | createAgent.AgentOptions,
_opts?: createAgent.AgentOptions
) {
super();
let opts = _opts;
if (typeof callback === 'function') {
this.callback = callback;
} else if (callback) {
opts = callback;
}
// Timeout for the socket to be returned from the callback
this.timeout = null;
if (opts && typeof opts.timeout === 'number') {
this.timeout = opts.timeout;
}
// These aren't actually used by `agent-base`, but are required
// for the TypeScript definition files in `@types/node` :/
this.maxFreeSockets = 1;
this.maxSockets = 1;
this.maxTotalSockets = Infinity;
this.sockets = {};
this.freeSockets = {};
this.requests = {};
this.options = {};
}
get defaultPort(): number {
if (typeof this.explicitDefaultPort === 'number') {
return this.explicitDefaultPort;
}
return isSecureEndpoint() ? 443 : 80;
}
set defaultPort(v: number) {
this.explicitDefaultPort = v;
}
get protocol(): string {
if (typeof this.explicitProtocol === 'string') {
return this.explicitProtocol;
}
return isSecureEndpoint() ? 'https:' : 'http:';
}
set protocol(v: string) {
this.explicitProtocol = v;
}
callback(
req: createAgent.ClientRequest,
opts: createAgent.RequestOptions,
fn: createAgent.AgentCallbackCallback
): void;
callback(
req: createAgent.ClientRequest,
opts: createAgent.RequestOptions
):
| createAgent.AgentCallbackReturn
| Promise<createAgent.AgentCallbackReturn>;
callback(
req: createAgent.ClientRequest,
opts: createAgent.AgentOptions,
fn?: createAgent.AgentCallbackCallback
):
| createAgent.AgentCallbackReturn
| Promise<createAgent.AgentCallbackReturn>
| void {
throw new Error(
'"agent-base" has no default implementation, you must subclass and override `callback()`'
);
}
/**
* Called by node-core's "_http_client.js" module when creating
* a new HTTP request with this Agent instance.
*
* @api public
*/
addRequest(req: ClientRequest, _opts: RequestOptions): void {
const opts: RequestOptions = { ..._opts };
if (typeof opts.secureEndpoint !== 'boolean') {
opts.secureEndpoint = isSecureEndpoint();
}
if (opts.host == null) {
opts.host = 'localhost';
}
if (opts.port == null) {
opts.port = opts.secureEndpoint ? 443 : 80;
}
if (opts.protocol == null) {
opts.protocol = opts.secureEndpoint ? 'https:' : 'http:';
}
if (opts.host && opts.path) {
// If both a `host` and `path` are specified then it's most
// likely the result of a `url.parse()` call... we need to
// remove the `path` portion so that `net.connect()` doesn't
// attempt to open that as a unix socket file.
delete opts.path;
}
delete opts.agent;
delete opts.hostname;
delete opts._defaultAgent;
delete opts.defaultPort;
delete opts.createConnection;
// Hint to use "Connection: close"
// XXX: non-documented `http` module API :(
req._last = true;
req.shouldKeepAlive = false;
let timedOut = false;
let timeoutId: ReturnType<typeof setTimeout> | null = null;
const timeoutMs = opts.timeout || this.timeout;
const onerror = (err: NodeJS.ErrnoException) => {
if (req._hadError) return;
req.emit('error', err);
// For Safety. Some additional errors might fire later on
// and we need to make sure we don't double-fire the error event.
req._hadError = true;
};
const ontimeout = () => {
timeoutId = null;
timedOut = true;
const err: NodeJS.ErrnoException = new Error(
`A "socket" was not created for HTTP request before ${timeoutMs}ms`
);
err.code = 'ETIMEOUT';
onerror(err);
};
const callbackError = (err: NodeJS.ErrnoException) => {
if (timedOut) return;
if (timeoutId !== null) {
clearTimeout(timeoutId);
timeoutId = null;
}
onerror(err);
};
const onsocket = (socket: AgentCallbackReturn) => {
if (timedOut) return;
if (timeoutId != null) {
clearTimeout(timeoutId);
timeoutId = null;
}
if (isAgent(socket)) {
// `socket` is actually an `http.Agent` instance, so
// relinquish responsibility for this `req` to the Agent
// from here on
debug(
'Callback returned another Agent instance %o',
socket.constructor.name
);
(socket as createAgent.Agent).addRequest(req, opts);
return;
}
if (socket) {
socket.once('free', () => {
this.freeSocket(socket as net.Socket, opts);
});
req.onSocket(socket as net.Socket);
return;
}
const err = new Error(
`no Duplex stream was returned to agent-base for \`${req.method} ${req.path}\``
);
onerror(err);
};
if (typeof this.callback !== 'function') {
onerror(new Error('`callback` is not defined'));
return;
}
if (!this.promisifiedCallback) {
if (this.callback.length >= 3) {
debug('Converting legacy callback function to promise');
this.promisifiedCallback = promisify(this.callback);
} else {
this.promisifiedCallback = this.callback;
}
}
if (typeof timeoutMs === 'number' && timeoutMs > 0) {
timeoutId = setTimeout(ontimeout, timeoutMs);
}
if ('port' in opts && typeof opts.port !== 'number') {
opts.port = Number(opts.port);
}
try {
debug(
'Resolving socket for %o request: %o',
opts.protocol,
`${req.method} ${req.path}`
);
Promise.resolve(this.promisifiedCallback(req, opts)).then(
onsocket,
callbackError
);
} catch (err) {
Promise.reject(err).catch(callbackError);
}
}
freeSocket(socket: net.Socket, opts: AgentOptions) {
debug('Freeing socket %o %o', socket.constructor.name, opts);
socket.destroy();
}
destroy() {
debug('Destroying agent %o', this.constructor.name);
}
}
// So that `instanceof` works correctly
createAgent.prototype = createAgent.Agent.prototype;
}
export = createAgent;

View File

@@ -0,0 +1 @@
{"version":3,"file":"accessibility.cjs.development.js","sources":["../src/components/HiddenText/HiddenText.tsx","../src/components/LiveRegion/LiveRegion.tsx","../src/hooks/useAnnouncement.ts"],"sourcesContent":["import React from 'react';\n\ninterface Props {\n id: string;\n value: string;\n}\n\nconst hiddenStyles: React.CSSProperties = {\n display: 'none',\n};\n\nexport function HiddenText({id, value}: Props) {\n return (\n <div id={id} style={hiddenStyles}>\n {value}\n </div>\n );\n}\n","import React from 'react';\n\nexport interface Props {\n id: string;\n announcement: string;\n ariaLiveType?: \"polite\" | \"assertive\" | \"off\";\n}\n\nexport function LiveRegion({id, announcement, ariaLiveType = \"assertive\"}: Props) {\n // Hide element visually but keep it readable by screen readers\n const visuallyHidden: React.CSSProperties = {\n position: 'fixed',\n top: 0,\n left: 0,\n width: 1,\n height: 1,\n margin: -1,\n border: 0,\n padding: 0,\n overflow: 'hidden',\n clip: 'rect(0 0 0 0)',\n clipPath: 'inset(100%)',\n whiteSpace: 'nowrap',\n };\n \n return (\n <div\n id={id}\n style={visuallyHidden}\n role=\"status\"\n aria-live={ariaLiveType}\n aria-atomic\n >\n {announcement}\n </div>\n );\n}\n","import {useCallback, useState} from 'react';\n\nexport function useAnnouncement() {\n const [announcement, setAnnouncement] = useState('');\n const announce = useCallback((value: string | undefined) => {\n if (value != null) {\n setAnnouncement(value);\n }\n }, []);\n\n return {announce, announcement} as const;\n}\n"],"names":["hiddenStyles","display","HiddenText","id","value","React","style","LiveRegion","announcement","ariaLiveType","visuallyHidden","position","top","left","width","height","margin","border","padding","overflow","clip","clipPath","whiteSpace","role","useAnnouncement","setAnnouncement","useState","announce","useCallback"],"mappings":";;;;;;;;;AAOA,MAAMA,YAAY,GAAwB;EACxCC,OAAO,EAAE;AAD+B,CAA1C;SAIgBC;MAAW;IAACC,EAAD;IAAKC;;EAC9B,OACEC,4BAAA,MAAA;IAAKF,EAAE,EAAEA;IAAIG,KAAK,EAAEN;GAApB,EACGI,KADH,CADF;AAKD;;SCTeG;MAAW;IAACJ,EAAD;IAAKK,YAAL;IAAmBC,YAAY,GAAG;;;EAE3D,MAAMC,cAAc,GAAwB;IAC1CC,QAAQ,EAAE,OADgC;IAE1CC,GAAG,EAAE,CAFqC;IAG1CC,IAAI,EAAE,CAHoC;IAI1CC,KAAK,EAAE,CAJmC;IAK1CC,MAAM,EAAE,CALkC;IAM1CC,MAAM,EAAE,CAAC,CANiC;IAO1CC,MAAM,EAAE,CAPkC;IAQ1CC,OAAO,EAAE,CARiC;IAS1CC,QAAQ,EAAE,QATgC;IAU1CC,IAAI,EAAE,eAVoC;IAW1CC,QAAQ,EAAE,aAXgC;IAY1CC,UAAU,EAAE;GAZd;EAeA,OACEjB,4BAAA,MAAA;IACEF,EAAE,EAAEA;IACJG,KAAK,EAAEI;IACPa,IAAI,EAAC;iBACMd;;GAJb,EAOGD,YAPH,CADF;AAWD;;SClCegB;EACd,MAAM,CAAChB,YAAD,EAAeiB,eAAf,IAAkCC,cAAQ,CAAC,EAAD,CAAhD;EACA,MAAMC,QAAQ,GAAGC,iBAAW,CAAExB,KAAD;IAC3B,IAAIA,KAAK,IAAI,IAAb,EAAmB;MACjBqB,eAAe,CAACrB,KAAD,CAAf;;GAFwB,EAIzB,EAJyB,CAA5B;EAMA,OAAO;IAACuB,QAAD;IAAWnB;GAAlB;AACD;;;;;;"}

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"setUrlProcessingMetadata.d.ts","sourceRoot":"","sources":["../../../../src/common/utils/setUrlProcessingMetadata.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAI1C;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAkC3D"}

View File

@@ -0,0 +1,386 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/**
* Default maximum size in bytes for GenAI messages.
* Messages exceeding this limit will be truncated.
*/
const DEFAULT_GEN_AI_MESSAGES_BYTE_LIMIT = 20000;
/**
* Message format used by OpenAI and Anthropic APIs.
*/
/**
* Calculate the UTF-8 byte length of a string.
*/
const utf8Bytes = (text) => {
return new TextEncoder().encode(text).length;
};
/**
* Calculate the UTF-8 byte length of a value's JSON representation.
*/
const jsonBytes = (value) => {
return utf8Bytes(JSON.stringify(value));
};
/**
* Truncate a string to fit within maxBytes when encoded as UTF-8.
* Uses binary search for efficiency with multi-byte characters.
*
* @param text - The string to truncate
* @param maxBytes - Maximum byte length (UTF-8 encoded)
* @returns Truncated string that fits within maxBytes
*/
function truncateTextByBytes(text, maxBytes) {
if (utf8Bytes(text) <= maxBytes) {
return text;
}
let low = 0;
let high = text.length;
let bestFit = '';
while (low <= high) {
const mid = Math.floor((low + high) / 2);
const candidate = text.slice(0, mid);
const byteSize = utf8Bytes(candidate);
if (byteSize <= maxBytes) {
bestFit = candidate;
low = mid + 1;
} else {
high = mid - 1;
}
}
return bestFit;
}
/**
* Extract text content from a Google GenAI message part.
* Parts are either plain strings or objects with a text property.
*
* @returns The text content
*/
function getPartText(part) {
if (typeof part === 'string') {
return part;
}
if ('text' in part) return part.text;
return '';
}
/**
* Create a new part with updated text content while preserving the original structure.
*
* @param part - Original part (string or object)
* @param text - New text content
* @returns New part with updated text
*/
function withPartText(part, text) {
if (typeof part === 'string') {
return text;
}
return { ...part, text };
}
/**
* Check if a message has the OpenAI/Anthropic content format.
*/
function isContentMessage(message) {
return (
message !== null &&
typeof message === 'object' &&
'content' in message &&
typeof (message ).content === 'string'
);
}
/**
* Check if a message has the OpenAI/Anthropic content array format.
*/
function isContentArrayMessage(message) {
return message !== null && typeof message === 'object' && 'content' in message && Array.isArray(message.content);
}
/**
* Check if a content part is an OpenAI/Anthropic media source
*/
function isContentMedia(part) {
if (!part || typeof part !== 'object') return false;
return (
isContentMediaSource(part) ||
hasInlineData(part) ||
('media_type' in part && typeof part.media_type === 'string' && 'data' in part) ||
('image_url' in part && typeof part.image_url === 'string' && part.image_url.startsWith('data:')) ||
('type' in part && (part.type === 'blob' || part.type === 'base64')) ||
'b64_json' in part ||
('type' in part && 'result' in part && part.type === 'image_generation') ||
('uri' in part && typeof part.uri === 'string' && part.uri.startsWith('data:'))
);
}
function isContentMediaSource(part) {
return 'type' in part && typeof part.type === 'string' && 'source' in part && isContentMedia(part.source);
}
function hasInlineData(part) {
return (
'inlineData' in part &&
!!part.inlineData &&
typeof part.inlineData === 'object' &&
'data' in part.inlineData &&
typeof part.inlineData.data === 'string'
);
}
/**
* Check if a message has the Google GenAI parts format.
*/
function isPartsMessage(message) {
return (
message !== null &&
typeof message === 'object' &&
'parts' in message &&
Array.isArray((message ).parts) &&
(message ).parts.length > 0
);
}
/**
* Truncate a message with `content: string` format (OpenAI/Anthropic).
*
* @param message - Message with content property
* @param maxBytes - Maximum byte limit
* @returns Array with truncated message, or empty array if it doesn't fit
*/
function truncateContentMessage(message, maxBytes) {
// Calculate overhead (message structure without content)
const emptyMessage = { ...message, content: '' };
const overhead = jsonBytes(emptyMessage);
const availableForContent = maxBytes - overhead;
if (availableForContent <= 0) {
return [];
}
const truncatedContent = truncateTextByBytes(message.content, availableForContent);
return [{ ...message, content: truncatedContent }];
}
/**
* Truncate a message with `parts: [...]` format (Google GenAI).
* Keeps as many complete parts as possible, only truncating the first part if needed.
*
* @param message - Message with parts array
* @param maxBytes - Maximum byte limit
* @returns Array with truncated message, or empty array if it doesn't fit
*/
function truncatePartsMessage(message, maxBytes) {
const { parts } = message;
// Calculate overhead by creating empty text parts
const emptyParts = parts.map(part => withPartText(part, ''));
const overhead = jsonBytes({ ...message, parts: emptyParts });
let remainingBytes = maxBytes - overhead;
if (remainingBytes <= 0) {
return [];
}
// Include parts until we run out of space
const includedParts = [];
for (const part of parts) {
const text = getPartText(part);
const textSize = utf8Bytes(text);
if (textSize <= remainingBytes) {
// Part fits: include it as-is
includedParts.push(part);
remainingBytes -= textSize;
} else if (includedParts.length === 0) {
// First part doesn't fit: truncate it
const truncated = truncateTextByBytes(text, remainingBytes);
if (truncated) {
includedParts.push(withPartText(part, truncated));
}
break;
} else {
// Subsequent part doesn't fit: stop here
break;
}
}
/* c8 ignore start
* for type safety only, algorithm guarantees SOME text included */
if (includedParts.length <= 0) {
return [];
} else {
/* c8 ignore stop */
return [{ ...message, parts: includedParts }];
}
}
/**
* Truncate a single message to fit within maxBytes.
*
* Supports two message formats:
* - OpenAI/Anthropic: `{ ..., content: string }`
* - Google GenAI: `{ ..., parts: Array<string | {text: string} | non-text> }`
*
* @param message - The message to truncate
* @param maxBytes - Maximum byte limit for the message
* @returns Array containing the truncated message, or empty array if truncation fails
*/
function truncateSingleMessage(message, maxBytes) {
if (!message) return [];
// Handle plain strings (e.g., embeddings input)
if (typeof message === 'string') {
const truncated = truncateTextByBytes(message, maxBytes);
return truncated ? [truncated] : [];
}
if (typeof message !== 'object') {
return [];
}
if (isContentMessage(message)) {
return truncateContentMessage(message, maxBytes);
}
if (isPartsMessage(message)) {
return truncatePartsMessage(message, maxBytes);
}
// Unknown message format: cannot truncate safely
return [];
}
const REMOVED_STRING = '[Filtered]';
const MEDIA_FIELDS = ['image_url', 'data', 'content', 'b64_json', 'result', 'uri'] ;
function stripInlineMediaFromSingleMessage(part) {
const strip = { ...part };
if (isContentMedia(strip.source)) {
strip.source = stripInlineMediaFromSingleMessage(strip.source);
}
// google genai inline data blob objects
if (hasInlineData(part)) {
strip.inlineData = { ...part.inlineData, data: REMOVED_STRING };
}
for (const field of MEDIA_FIELDS) {
if (typeof strip[field] === 'string') strip[field] = REMOVED_STRING;
}
return strip;
}
/**
* Strip the inline media from message arrays.
*
* This returns a stripped message. We do NOT want to mutate the data in place,
* because of course we still want the actual API/client to handle the media.
*/
function stripInlineMediaFromMessages(messages) {
const stripped = messages.map(message => {
let newMessage = undefined;
if (!!message && typeof message === 'object') {
if (isContentArrayMessage(message)) {
newMessage = {
...message,
content: stripInlineMediaFromMessages(message.content),
};
} else if ('content' in message && isContentMedia(message.content)) {
newMessage = {
...message,
content: stripInlineMediaFromSingleMessage(message.content),
};
}
if (isPartsMessage(message)) {
newMessage = {
// might have to strip content AND parts
...(newMessage ?? message),
parts: stripInlineMediaFromMessages(message.parts),
};
}
if (isContentMedia(newMessage)) {
newMessage = stripInlineMediaFromSingleMessage(newMessage);
} else if (isContentMedia(message)) {
newMessage = stripInlineMediaFromSingleMessage(message);
}
}
return newMessage ?? message;
});
return stripped;
}
/**
* Truncate an array of messages to fit within a byte limit.
*
* Strategy:
* - Always keeps only the last (newest) message
* - Strips inline media from the message
* - Truncates the message content if it exceeds the byte limit
*
* @param messages - Array of messages to truncate
* @param maxBytes - Maximum total byte limit for the message
* @returns Array containing only the last message (possibly truncated)
*
* @example
* ```ts
* const messages = [msg1, msg2, msg3, msg4]; // newest is msg4
* const truncated = truncateMessagesByBytes(messages, 10000);
* // Returns [msg4] (truncated if needed)
* ```
*/
function truncateMessagesByBytes(messages, maxBytes) {
// Early return for empty or invalid input
if (!Array.isArray(messages) || messages.length === 0) {
return messages;
}
// Always keep only the last message
const lastMessage = messages[messages.length - 1];
// Strip inline media from the single message
const stripped = stripInlineMediaFromMessages([lastMessage]);
const strippedMessage = stripped[0];
// Check if it fits
const messageBytes = jsonBytes(strippedMessage);
if (messageBytes <= maxBytes) {
return stripped;
}
// Truncate the single message if needed
return truncateSingleMessage(strippedMessage, maxBytes);
}
/**
* Truncate GenAI messages using the default byte limit.
*
* Convenience wrapper around `truncateMessagesByBytes` with the default limit.
*
* @param messages - Array of messages to truncate
* @returns Truncated array of messages
*/
function truncateGenAiMessages(messages) {
return truncateMessagesByBytes(messages, DEFAULT_GEN_AI_MESSAGES_BYTE_LIMIT);
}
/**
* Truncate GenAI string input using the default byte limit.
*
* @param input - The string to truncate
* @returns Truncated string
*/
function truncateGenAiStringInput(input) {
return truncateTextByBytes(input, DEFAULT_GEN_AI_MESSAGES_BYTE_LIMIT);
}
exports.DEFAULT_GEN_AI_MESSAGES_BYTE_LIMIT = DEFAULT_GEN_AI_MESSAGES_BYTE_LIMIT;
exports.truncateGenAiMessages = truncateGenAiMessages;
exports.truncateGenAiStringInput = truncateGenAiStringInput;
//# sourceMappingURL=messageTruncation.js.map

View File

@@ -0,0 +1,111 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
*/
"use strict";
const WebpackError = require("../WebpackError");
/** @typedef {import("../ChunkGraph")} ChunkGraph */
/** @typedef {import("../Module")} Module */
/** @typedef {import("../ModuleGraph")} ModuleGraph */
/** @typedef {import("../RequestShortener")} RequestShortener */
/**
* @param {Module} module module to get chains from
* @param {ModuleGraph} moduleGraph the module graph
* @param {ChunkGraph} chunkGraph the chunk graph
* @param {RequestShortener} requestShortener to make readable identifiers
* @returns {string[]} all chains to the module
*/
const getInitialModuleChains = (
module,
moduleGraph,
chunkGraph,
requestShortener
) => {
const queue = [
{ head: module, message: module.readableIdentifier(requestShortener) }
];
/** @type {Set<string>} */
const results = new Set();
/** @type {Set<string>} */
const incompleteResults = new Set();
/** @type {Set<Module>} */
const visitedModules = new Set();
for (const chain of queue) {
const { head, message } = chain;
let final = true;
/** @type {Set<Module>} */
const alreadyReferencedModules = new Set();
for (const connection of moduleGraph.getIncomingConnections(head)) {
const newHead = connection.originModule;
if (newHead) {
if (
!chunkGraph.getModuleChunks(newHead).some((c) => c.canBeInitial())
) {
continue;
}
final = false;
if (alreadyReferencedModules.has(newHead)) continue;
alreadyReferencedModules.add(newHead);
const moduleName = newHead.readableIdentifier(requestShortener);
const detail = connection.explanation
? ` (${connection.explanation})`
: "";
const newMessage = `${moduleName}${detail} --> ${message}`;
if (visitedModules.has(newHead)) {
incompleteResults.add(`... --> ${newMessage}`);
continue;
}
visitedModules.add(newHead);
queue.push({
head: newHead,
message: newMessage
});
} else {
final = false;
const newMessage = connection.explanation
? `(${connection.explanation}) --> ${message}`
: message;
results.add(newMessage);
}
}
if (final) {
results.add(message);
}
}
for (const result of incompleteResults) {
results.add(result);
}
return [...results];
};
module.exports = class WebAssemblyInInitialChunkError extends WebpackError {
/**
* @param {Module} module WASM module
* @param {ModuleGraph} moduleGraph the module graph
* @param {ChunkGraph} chunkGraph the chunk graph
* @param {RequestShortener} requestShortener request shortener
*/
constructor(module, moduleGraph, chunkGraph, requestShortener) {
const moduleChains = getInitialModuleChains(
module,
moduleGraph,
chunkGraph,
requestShortener
);
const message = `WebAssembly module is included in initial chunk.
This is not allowed, because WebAssembly download and compilation must happen asynchronous.
Add an async split point (i. e. import()) somewhere between your entrypoint and the WebAssembly module:
${moduleChains.map((s) => `* ${s}`).join("\n")}`;
super(message);
/** @type {string} */
this.name = "WebAssemblyInInitialChunkError";
this.hideStack = true;
this.module = module;
}
};

View File

@@ -0,0 +1,34 @@
import { addDays } from "./addDays.js";
/**
* The {@link addWeeks} function options.
*/
/**
* @name addWeeks
* @category Week Helpers
* @summary Add the specified number of weeks to the given date.
*
* @description
* Add the specified number of weeks 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, it is the type returned from the context function if it is passed, or inferred from the arguments.
*
* @param date - The date to be changed
* @param amount - The amount of weeks to be added.
* @param options - An object with options
*
* @returns The new date with the weeks added
*
* @example
* // Add 4 weeks to 1 September 2014:
* const result = addWeeks(new Date(2014, 8, 1), 4)
* //=> Mon Sep 29 2014 00:00:00
*/
export function addWeeks(date, amount, options) {
return addDays(date, amount * 7, options);
}
// Fallback for modularized imports:
export default addWeeks;

View File

@@ -0,0 +1,35 @@
import { Session, SessionContext, SessionStatus } from './types-hoist/session';
/**
* Creates a new `Session` object by setting certain default parameters. If optional @param context
* is passed, the passed properties are applied to the session object.
*
* @param context (optional) additional properties to be applied to the returned session object
*
* @returns a new `Session` object
*/
export declare function makeSession(context?: Pick<SessionContext, Exclude<keyof SessionContext, 'started' | 'status'>>): Session;
/**
* Updates a session object with the properties passed in the context.
*
* Note that this function mutates the passed object and returns void.
* (Had to do this instead of returning a new and updated session because closing and sending a session
* makes an update to the session after it was passed to the sending logic.
* @see Client.captureSession )
*
* @param session the `Session` to update
* @param context the `SessionContext` holding the properties that should be updated in @param session
*/
export declare function updateSession(session: Session, context?: SessionContext): void;
/**
* Closes a session by setting its status and updating the session object with it.
* Internally calls `updateSession` to update the passed session object.
*
* Note that this function mutates the passed session (@see updateSession for explanation).
*
* @param session the `Session` object to be closed
* @param status the `SessionStatus` with which the session was closed. If you don't pass a status,
* this function will keep the previously set status, unless it was `'ok'` in which case
* it is changed to `'exited'`.
*/
export declare function closeSession(session: Session, status?: Exclude<SessionStatus, 'ok'>): void;
//# sourceMappingURL=session.d.ts.map

View File

@@ -0,0 +1,44 @@
{
"name": "mime-types",
"description": "The ultimate javascript content-type utility.",
"version": "2.1.35",
"contributors": [
"Douglas Christopher Wilson <doug@somethingdoug.com>",
"Jeremiah Senkpiel <fishrock123@rocketmail.com> (https://searchbeam.jit.su)",
"Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)"
],
"license": "MIT",
"keywords": [
"mime",
"types"
],
"repository": "jshttp/mime-types",
"dependencies": {
"mime-db": "1.52.0"
},
"devDependencies": {
"eslint": "7.32.0",
"eslint-config-standard": "14.1.1",
"eslint-plugin-import": "2.25.4",
"eslint-plugin-markdown": "2.2.1",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-promise": "5.2.0",
"eslint-plugin-standard": "4.1.0",
"mocha": "9.2.2",
"nyc": "15.1.0"
},
"files": [
"HISTORY.md",
"LICENSE",
"index.js"
],
"engines": {
"node": ">= 0.6"
},
"scripts": {
"lint": "eslint .",
"test": "mocha --reporter spec test/test.js",
"test-ci": "nyc --reporter=lcov --reporter=text npm test",
"test-cov": "nyc --reporter=html --reporter=text npm test"
}
}

View File

@@ -0,0 +1,35 @@
/**
* @name isExists
* @category Common Helpers
* @summary Is the given date exists?
*
* @description
* Checks if the given arguments convert to an existing date.
*
* @param year - The year of the date to check
* @param month - The month of the date to check
* @param day - The day of the date to check
*
* @returns `true` if the date exists
*
* @example
* // For the valid date:
* const result = isExists(2018, 0, 31)
* //=> true
*
* @example
* // For the invalid date:
* const result = isExists(2018, 1, 31)
* //=> false
*/
export function isExists(year, month, day) {
const date = new Date(year, month, day);
return (
date.getFullYear() === year &&
date.getMonth() === month &&
date.getDate() === day
);
}
// Fallback for modularized imports:
export default isExists;

View File

@@ -0,0 +1,11 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const detection = require('./detection.js');
const createMissingInstrumentationContext = (pkg) => ({
package: pkg,
'javascript.is_cjs': detection.isCjs(),
});
exports.createMissingInstrumentationContext = createMissingInstrumentationContext;
//# sourceMappingURL=createMissingInstrumentationContext.js.map

View File

@@ -0,0 +1,425 @@
/**
* Sentry-internal base interface for build-time options used in Sentry's meta-framework SDKs (e.g., Next.js, Nuxt, SvelteKit).
*
* SDKs should extend this interface to add framework-specific configurations. To include bundler-specific
* options, combine this type with one of the `Unstable[Bundler]PluginOptions` types, such as
* `UnstableVitePluginOptions` or `UnstableWebpackPluginOptions`.
*
* If an option from this base interface doesn't apply to an SDK, use the `Omit` utility type to exclude it.
*
* @example
* ```typescript
* import type { BuildTimeOptionsBase, UnstableVitePluginOptions } from '@sentry/core';
* import type { SentryVitePluginOptions } from '@sentry/vite-plugin';
*
* // Example of how a framework SDK would define its build-time options
* type MyFrameworkBuildOptions =
* BuildTimeOptionsBase &
* UnstableVitePluginOptions<SentryVitePluginOptions> & {
* // Framework-specific options can be added here
* myFrameworkSpecificOption?: boolean;
* };
* ```
*
* @internal Only meant for Sentry-internal SDK usage.
* @hidden
*/
export interface BuildTimeOptionsBase {
/**
* The slug of the Sentry organization associated with the app.
*
* This value can also be specified via the `SENTRY_ORG` environment variable.
*/
org?: string;
/**
* The slug of the Sentry project associated with the app.
*
* This value can also be specified via the `SENTRY_PROJECT` environment variable.
*/
project?: string;
/**
* The authentication token to use for all communication with Sentry.
* Can be obtained from https://sentry.io/orgredirect/organizations/:orgslug/settings/auth-tokens/.
*
* This value can also be specified via the `SENTRY_AUTH_TOKEN` environment variable.
*
* @see https://docs.sentry.io/product/accounts/auth-tokens/#organization-auth-tokens
*/
authToken?: string;
/**
* The base URL of your Sentry instance. Use this if you are using a self-hosted
* or Sentry instance other than sentry.io.
*
* This value can also be set via the `SENTRY_URL` environment variable.
*
* @default "https://sentry.io"
*/
sentryUrl?: string;
/**
* Additional headers to send with every outgoing request to Sentry.
*/
headers?: Record<string, string>;
/**
* If this flag is `true`, internal plugin errors and performance data will be sent to Sentry.
* It will not collect any sensitive or user-specific data.
*
* At Sentry, we like to use Sentry ourselves to deliver faster and more stable products.
* We're very careful of what we're sending. We won't collect anything other than error
* and high-level performance data. We will never collect your code or any details of the
* projects in which you're using this plugin.
*
* @default true
*/
telemetry?: boolean;
/**
* Suppresses all Sentry SDK build logs.
*
* @default false
*/
silent?: boolean;
/**
* When an error occurs during release creation or sourcemaps upload, the plugin will call this function.
*
* By default, the plugin will simply throw an error, thereby stopping the bundling process.
* If an `errorHandler` callback is provided, compilation will continue unless an error is
* thrown in the provided callback.
*
* To allow compilation to continue but still emit a warning, set this option to the following:
*
* ```js
* (err) => {
* console.warn(err);
* }
* ```
*/
errorHandler?: (err: Error) => void;
/**
* Enable debug information logs about the SDK during build-time.
* Enabling this will give you, for example, logs about source maps.
*
* @default false
*/
debug?: boolean;
/**
* Options related to source maps upload and processing.
*/
sourcemaps?: SourceMapsOptions;
/**
* Options related to managing the Sentry releases for a build.
*
* More info: https://docs.sentry.io/product/releases/
*/
release?: ReleaseOptions;
/**
* Options for bundle size optimizations by excluding certain features of the Sentry SDK.
*/
bundleSizeOptimizations?: BundleSizeOptimizationsOptions;
}
/**
* Utility type for adding Vite plugin options to build-time configuration.
* Use this type to extend your build-time options with Vite-specific plugin configurations.
*
* @template PluginOptionsType - The type of Vite plugin options to include
*
* @example
* ```typescript
* type SomeSDKsBuildOptions = BuildTimeOptionsBase & UnstableVitePluginOptions<SentryVitePluginOptions>;
* ```
*
* @internal Only meant for Sentry-internal SDK usage.
* @hidden
*/
export type UnstableVitePluginOptions<PluginOptionsType> = {
/**
* Options to be passed directly to the Sentry Vite Plugin (`@sentry/vite-plugin`) that ships with the Sentry SDK.
* You can use this option to override any options the SDK passes to the Vite plugin.
*
* Please note that this option is unstable and may change in a breaking way in any release.
*/
unstable_sentryVitePluginOptions?: PluginOptionsType;
};
/**
* Utility type for adding Webpack plugin options to build-time configuration.
* Use this type to extend your build-time options with Webpack-specific plugin configurations.
*
* @template PluginOptionsType - The type of Webpack plugin options to include
*
* @example
* ```typescript
* type SomeSDKsBuildOptions = BuildTimeOptionsBase & UnstableWebpackPluginOptions<SentryWebpackPluginOptions>;
* ```
*
* @internal Only meant for Sentry-internal SDK usage.
* @hidden
*/
export type UnstableWebpackPluginOptions<PluginOptionsType> = {
/**
* Options to be passed directly to the Sentry Webpack Plugin (`@sentry/webpack-plugin`) that ships with the Sentry SDK.
* You can use this option to override any options the SDK passes to the Webpack plugin.
*
* Please note that this option is unstable and may change in a breaking way in any release.
*/
unstable_sentryWebpackPluginOptions?: PluginOptionsType;
};
/**
* Utility type for adding Rollup plugin options to build-time configuration.
* Use this type to extend your build-time options with Rollup-specific plugin configurations.
*
* @template PluginOptionsType - The type of Rollup plugin options to include
*
* @example
* ```typescript
* type SomeSDKsBuildOptions = BuildTimeOptionsBase & UnstableRollupPluginOptions<SentryRollupPluginOptions>;
* ```
*
* @internal Only meant for Sentry-internal SDK usage.
* @hidden
*/
export type UnstableRollupPluginOptions<PluginOptionsType> = {
/**
* Options to be passed directly to the Sentry Rollup Plugin (`@sentry/rollup-plugin`) that ships with the Sentry SDK.
* You can use this option to override any options the SDK passes to the Rollup plugin.
*
* Please note that this option is unstable and may change in a breaking way in any release.
*/
unstable_sentryRollupPluginOptions?: PluginOptionsType;
};
interface SourceMapsOptions {
/**
* If this flag is `true`, any functionality related to source maps will be disabled. This includes the automatic upload of source maps.
*
* By default (`false`), the plugin automatically uploads source maps during a production build if a Sentry auth token is detected.
*
* If set to `"disable-upload"`, the plugin will not upload source maps to Sentry, but will inject debug IDs into the build artifacts.
* This is useful if you want to manually upload source maps to Sentry at a later point in time.
*
* @default false
*/
disable?: boolean | 'disable-upload';
/**
* A glob or an array of globs that specify the build artifacts and source maps that will be uploaded to Sentry.
*
* The globbing patterns must follow the implementation of the `glob` package: https://www.npmjs.com/package/glob#glob-primer
*
* If this option is not specified, the plugin will try to upload all JavaScript files and source map files that are created during build.
* Use the `debug` option to print information about which files end up being uploaded.
*
*/
assets?: string | string[];
/**
* A glob or an array of globs that specifies which build artifacts should not be uploaded to Sentry.
*
* The globbing patterns must follow the implementation of the `glob` package: https://www.npmjs.com/package/glob#glob-primer
*
* Use the `debug` option to print information about which files end up being uploaded.
*
* @default []
*/
ignore?: string | string[];
/**
* A glob or an array of globs that specifies the build artifacts that should be deleted after the artifact
* upload to Sentry has been completed.
*
* The globbing patterns must follow the implementation of the `glob` package: https://www.npmjs.com/package/glob#glob-primer
*/
filesToDeleteAfterUpload?: string | Array<string>;
}
type AutoSetCommitsOptions = {
/**
* Automatically sets `commit` and `previousCommit`. Sets `commit` to `HEAD`
* and `previousCommit` as described in the option's documentation.
*
* If you set this to `true`, manually specified `commit` and `previousCommit`
* options will be overridden. It is best to not specify them at all if you
* set this option to `true`.
*/
auto: true;
repo?: undefined;
commit?: undefined;
};
type ManualSetCommitsOptions = {
auto?: false | undefined;
/**
* The full repo name as defined in Sentry.
*
* Required if the `auto` option is not set to `true`.
*/
repo: string;
/**
* The current (last) commit in the release.
*
* Required if the `auto` option is not set to `true`.
*/
commit: string;
};
interface ReleaseOptions {
/**
* Unique identifier for the release you want to create.
*
* This value can also be specified via the `SENTRY_RELEASE` environment variable.
*
* Defaults to automatically detecting a value for your environment.
* This includes values for Cordova, Heroku, AWS CodeBuild, CircleCI, Xcode, and Gradle, and otherwise uses the git `HEAD`'s commit SHA
* (the latter requires access to git CLI and for the root directory to be a valid repository).
*
* If no `name` is provided and the plugin can't automatically detect one, no release will be created.
*/
name?: string;
/**
* Whether the plugin should inject release information into the build for the SDK to pick it up when sending events (recommended).
*
* @default true
*/
inject?: boolean;
/**
* Whether to create a new release.
*
* Note that a release may still appear in Sentry even if this value is `false`. Any Sentry event that has a release value attached
* will automatically create a release (for example, via the `inject` option).
*
* @default true
*/
create?: boolean;
/**
* Whether to automatically finalize the release. The release is finalized by adding an end timestamp after the build ends.
*
* @default true
*/
finalize?: boolean;
/**
* Unique distribution identifier for the release. Used to further segment the release.
*
* Usually your build number.
*/
dist?: string;
/**
* Version control system (VCS) remote name.
*
* This value can also be specified via the `SENTRY_VSC_REMOTE` environment variable.
*
* @default "origin"
*/
vcsRemote?: string;
/**
* Configuration for associating the release with its commits in Sentry.
*
* Set to `false` to disable commit association.
*
* @default { auto: true }
*/
setCommits?: false | ((AutoSetCommitsOptions | ManualSetCommitsOptions) & {
/**
* The commit before the beginning of this release (in other words,
* the last commit of the previous release).
*
* Defaults to the last commit of the previous release in Sentry.
*
* If there was no previous release, the last 10 commits will be used.
*/
previousCommit?: string;
/**
* If the flag is to `true` and the previous release commit was not found
* in the repository, the plugin creates a release with the default commits
* count instead of failing the command.
*
* @default false
*/
ignoreMissing?: boolean;
/**
* If this flag is set, the setCommits step will not fail and just exit
* silently if no new commits for a given release have been found.
*
* @default false
*/
ignoreEmpty?: boolean;
});
/**
* Configuration for adding deployment information to the release in Sentry.
*
* Set to `false` to disable automatic deployment detection and creation.
*/
deploy?: false | {
/**
* Environment for this release. Values that make sense here would
* be `production` or `staging`.
*/
env: string;
/**
* Deployment start time in Unix timestamp (in seconds) or ISO 8601 format.
*/
started?: number | string;
/**
* Deployment finish time in Unix timestamp (in seconds) or ISO 8601 format.
*/
finished?: number | string;
/**
* Deployment duration (in seconds). Can be used instead of started and finished.
*/
time?: number;
/**
* Human-readable name for the deployment.
*/
name?: string;
/**
* URL that points to the deployment.
*/
url?: string;
};
}
interface BundleSizeOptimizationsOptions {
/**
* Exclude debug statements from the bundle, thus disabling features like the SDK's `debug` option.
*
* If set to `true`, the Sentry SDK will attempt to tree-shake (remove) any debugging code within itself during the build.
* Note that the success of this depends on tree shaking being enabled in your build tooling.
*
* @default false
*/
excludeDebugStatements?: boolean;
/**
* Exclude tracing functionality from the bundle, thus disabling features like performance monitoring.
*
* If set to `true`, the Sentry SDK will attempt to tree-shake (remove) code within itself that is related to tracing and performance monitoring.
* Note that the success of this depends on tree shaking being enabled in your build tooling.
*
* **Notice:** Do not enable this when you're using any performance monitoring-related SDK features (e.g. `Sentry.startTransaction()`).
* @default false
*/
excludeTracing?: boolean;
/**
* Exclude Replay Shadow DOM functionality from the bundle.
*
* If set to `true`, the Sentry SDK will attempt to tree-shake (remove) code related to the SDK's Session Replay Shadow DOM recording functionality.
* Note that the success of this depends on tree shaking being enabled in your build tooling.
*
* This option is safe to be used when you do not want to capture any Shadow DOM activity via Sentry Session Replay.
*
* @default false
*/
excludeReplayShadowDom?: boolean;
/**
* Exclude Replay iFrame functionality from the bundle.
*
* If set to `true`, the Sentry SDK will attempt to tree-shake (remove) code related to the SDK's Session Replay `iframe` recording functionality.
* Note that the success of this depends on tree shaking being enabled in your build tooling.
*
* You can safely do this when you do not want to capture any `iframe` activity via Sentry Session Replay.
*
* @default false
*/
excludeReplayIframe?: boolean;
/**
* Exclude Replay worker functionality from the bundle.
*
* If set to `true`, the Sentry SDK will attempt to tree-shake (remove) code related to the SDK's Session Replay's Compression Web Worker.
* Note that the success of this depends on tree shaking being enabled in your build tooling.
*
* **Notice:** You should only use this option if you manually host a compression worker and configure it in your Sentry Session Replay integration config via the `workerUrl` option.
*
* @default false
*/
excludeReplayWorker?: boolean;
}
export {};
//# sourceMappingURL=buildTimeOptionsBase.d.ts.map

View File

@@ -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 './square-chevron-right.js';
//# sourceMappingURL=chevron-right-square.js.map

View File

@@ -0,0 +1,68 @@
"use strict";
exports.getOverlappingDaysInIntervals = getOverlappingDaysInIntervals;
var _index = require("./_lib/getTimezoneOffsetInMilliseconds.js");
var _index2 = require("./constants.js");
var _index3 = require("./toDate.js");
/**
* @name getOverlappingDaysInIntervals
* @category Interval Helpers
* @summary Get the number of days that overlap in two time intervals
*
* @description
* Get the number of days that overlap in two time intervals. It uses the time
* between dates to calculate the number of days, rounding it up to include
* partial days.
*
* Two equal 0-length intervals will result in 0. Two equal 1ms intervals will
* result in 1.
*
* @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).
*
* @param intervalLeft - The first interval to compare.
* @param intervalRight - The second interval to compare.
*
* @returns The number of days that overlap in two time intervals
*
* @example
* // For overlapping time intervals adds 1 for each started overlapping day:
* getOverlappingDaysInIntervals(
* { start: new Date(2014, 0, 10), end: new Date(2014, 0, 20) },
* { start: new Date(2014, 0, 17), end: new Date(2014, 0, 21) }
* )
* //=> 3
*
* @example
* // For non-overlapping time intervals returns 0:
* getOverlappingDaysInIntervals(
* { start: new Date(2014, 0, 10), end: new Date(2014, 0, 20) },
* { start: new Date(2014, 0, 21), end: new Date(2014, 0, 22) }
* )
* //=> 0
*/
function getOverlappingDaysInIntervals(intervalLeft, intervalRight) {
const [leftStart, leftEnd] = [
+(0, _index3.toDate)(intervalLeft.start),
+(0, _index3.toDate)(intervalLeft.end),
].sort((a, b) => a - b);
const [rightStart, rightEnd] = [
+(0, _index3.toDate)(intervalRight.start),
+(0, _index3.toDate)(intervalRight.end),
].sort((a, b) => a - b);
// Prevent NaN result if intervals don't overlap at all.
const isOverlapping = leftStart < rightEnd && rightStart < leftEnd;
if (!isOverlapping) return 0;
// Remove the timezone offset to negate the DST effect on calculations.
const overlapLeft = rightStart < leftStart ? leftStart : rightStart;
const left =
overlapLeft - (0, _index.getTimezoneOffsetInMilliseconds)(overlapLeft);
const overlapRight = rightEnd > leftEnd ? leftEnd : rightEnd;
const right =
overlapRight - (0, _index.getTimezoneOffsetInMilliseconds)(overlapRight);
// Ceil the number to include partial days too.
return Math.ceil((right - left) / _index2.millisecondsInDay);
}

View File

@@ -0,0 +1,135 @@
@layer payload-default {
.draggable-table-row {
// vars
--border-top-left-radius: var(--style-radius-m);
--border-top-right-radius: var(--style-radius-m);
--border-bottom-right-radius: var(--style-radius-m);
--border-bottom-left-radius: var(--style-radius-m);
--row-text-color: var(--theme-text);
--row-icon-opacity: 1;
--row-icon-color: var(--theme-elevation-400);
--row-bg-color: transparent;
--row-opacity: 1;
--foreground-opacity: 0;
--row-cursor: pointer;
isolation: isolate;
opacity: var(--row-opacity);
cursor: var(--row-cursor);
&__first-td {
border-top-left-radius: var(--border-top-left-radius);
border-bottom-left-radius: var(--border-bottom-left-radius);
}
td.draggable-table-row__last-td {
border-top-right-radius: var(--border-top-right-radius);
border-bottom-right-radius: var(--border-bottom-right-radius);
padding-inline-end: calc(var(--base) * (0.8));
}
&:not(.draggable-table-row--selected):nth-child(odd) {
--row-bg-color: var(--theme-elevation-50);
}
&:nth-child(odd) {
&:after {
display: none;
}
}
&--focused {
&.draggable-table-row:nth-child(odd),
&.draggable-table-row:nth-child(even) {
--row-bg-color: var(--theme-elevation-100);
}
}
&--disabled {
--row-cursor: no-drop;
--row-opacity: 0.6;
}
&--selected {
--row-icon-color: var(--theme-success-800);
--row-icon-opacity: 0.6;
&.draggable-table-row:nth-child(odd),
&.draggable-table-row:nth-child(even) {
--row-bg-color: var(--theme-success-150);
}
}
&--selected + .draggable-table-row--selected {
--border-top-left-radius: 0;
--border-top-right-radius: 0;
}
&--selected:not(:last-child):has(+ .draggable-table-row--selected) {
--border-bottom-left-radius: 0;
--border-bottom-right-radius: 0;
}
&--over {
&.draggable-table-row:nth-child(odd),
&.draggable-table-row:nth-child(even) {
--row-bg-color: var(--theme-elevation-150);
}
}
&__cell-content {
position: relative;
z-index: 1;
color: var(--row-text-color);
background-color: var(--row-bg-color);
}
&__drag-handle {
position: absolute;
top: 0;
width: 100%;
height: 100%;
left: 0;
right: 0;
cursor: var(--row-cursor);
background: none;
border: none;
padding: 0;
outline-offset: 0;
z-index: 2;
&:focus-visible {
box-shadow: inset 0px 0px 0px 2px var(--theme-text);
outline: none;
}
}
&__drop-area {
position: absolute;
top: 0;
width: 100%;
height: 100%;
left: 0;
right: 0;
}
.simple-table {
&__hidden-cell {
position: absolute;
padding: 0;
width: 100%;
height: 100%;
left: 0;
right: 0;
}
}
&.draggable-table-row {
position: relative;
}
.icon {
color: var(--row-icon-color);
opacity: var(--row-icon-opacity);
}
}
}

View File

@@ -0,0 +1,40 @@
/*
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
const instanceMap = new WeakMap();
/**
* A function that accepts and identity object and a class object and returns
* either a new instance of that class or an existing instance, if the
* identity object was previously used.
*/
function initUnique(identityObj, ClassObj) {
try {
if (!instanceMap.get(identityObj)) {
instanceMap.set(identityObj, new ClassObj());
}
return instanceMap.get(identityObj) ;
} catch (e) {
// --- START Sentry-custom code (try/catch wrapping) ---
// Fix for cases where identityObj is not a valid key for WeakMap (sometimes a problem in Safari)
// Just return a new instance without caching it in instanceMap
return new ClassObj();
}
// --- END Sentry-custom code ---
}
export { initUnique };
//# sourceMappingURL=initUnique.js.map

View File

@@ -0,0 +1,2 @@
import{throwIfEmpty as e}from"../../utils/throw-if-empty.js";const t=(t,n,r)=>()=>(e(t,`Keys cannot be empty`),{path:`/roles`,params:r??{},body:JSON.stringify({keys:t,data:n}),method:`PATCH`}),n=(e,t)=>()=>({path:`/roles`,params:t??{},body:JSON.stringify(e),method:`PATCH`}),r=(t,n,r)=>()=>(e(t,`Key cannot be empty`),{path:`/roles/${t}`,params:r??{},body:JSON.stringify(n),method:`PATCH`});export{r as updateRole,t as updateRoles,n as updateRolesBatch};
//# sourceMappingURL=roles.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"rpc-metadata.js","sourceRoot":"","sources":["../../../src/trace/rpc-metadata.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,4CAAqE;AAErE,MAAM,gBAAgB,GAAG,IAAA,sBAAgB,EACvC,4CAA4C,CAC7C,CAAC;AAEF,IAAY,OAEX;AAFD,WAAY,OAAO;IACjB,wBAAa,CAAA;AACf,CAAC,EAFW,OAAO,GAAP,eAAO,KAAP,eAAO,QAElB;AAaD,SAAgB,cAAc,CAAC,OAAgB,EAAE,IAAiB;IAChE,OAAO,OAAO,CAAC,QAAQ,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAC;AAClD,CAAC;AAFD,wCAEC;AAED,SAAgB,iBAAiB,CAAC,OAAgB;IAChD,OAAO,OAAO,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC;AAC/C,CAAC;AAFD,8CAEC;AAED,SAAgB,cAAc,CAAC,OAAgB;IAC7C,OAAO,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAA4B,CAAC;AACvE,CAAC;AAFD,wCAEC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Context, createContextKey, Span } from '@opentelemetry/api';\n\nconst RPC_METADATA_KEY = createContextKey(\n 'OpenTelemetry SDK Context Key RPC_METADATA'\n);\n\nexport enum RPCType {\n HTTP = 'http',\n}\n\ntype HTTPMetadata = {\n type: RPCType.HTTP;\n route?: string;\n span: Span;\n};\n\n/**\n * Allows for future rpc metadata to be used with this mechanism\n */\nexport type RPCMetadata = HTTPMetadata;\n\nexport function setRPCMetadata(context: Context, meta: RPCMetadata): Context {\n return context.setValue(RPC_METADATA_KEY, meta);\n}\n\nexport function deleteRPCMetadata(context: Context): Context {\n return context.deleteValue(RPC_METADATA_KEY);\n}\n\nexport function getRPCMetadata(context: Context): RPCMetadata | undefined {\n return context.getValue(RPC_METADATA_KEY) as RPCMetadata | undefined;\n}\n"]}

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/providers/Locale/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAIrC,OAAO,KAA0D,MAAM,OAAO,CAAA;AAQ9E,eAAO,MAAM,oBAAoB;;4BAEP,OAAO;EAC/B,CAAA;AAcF,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,CAAA;CAAE,CA4F5F,CAAA;AAED,eAAO,MAAM,gBAAgB;;4BA7GH,OAAO;CA6G8B,CAAA;AAE/D;;;GAGG;AACH,eAAO,MAAM,SAAS,QAAO,MAA4B,CAAA"}

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