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

This commit is contained in:
2026-02-24 16:04:21 +01:00
parent 915eb61613
commit 5397309103
43805 changed files with 4324295 additions and 3 deletions
@@ -0,0 +1,6 @@
import { ReplayContainer } from '../types';
/**
* Add global listeners that cannot be removed.
*/
export declare function addGlobalListeners(replay: ReplayContainer): void;
//# sourceMappingURL=addGlobalListeners.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"integration.d.ts","sourceRoot":"","sources":["../../../src/types-hoist/integration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEhD,4BAA4B;AAC5B,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;OAGG;IACH,SAAS,CAAC,IAAI,IAAI,CAAC;IAEnB;;;;;;;OAOG;IACH,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAE7B;;;OAGG;IACH,aAAa,CAAC,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAErC;;OAEG;IACH,eAAe,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,GAAG,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAElF;;;;OAIG;IACH,YAAY,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,KAAK,GAAG,IAAI,GAAG,WAAW,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC;CACxG;AAED;;;GAGG;AAEH,MAAM,MAAM,aAAa,CAAC,eAAe,GAAG,WAAW,IAAI,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,eAAe,CAAC"}
@@ -0,0 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isExact = void 0;
const isExact = () => (x) => x;
exports.isExact = isExact;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9saWIvZnVuY3Rpb25zL2lzLWV4YWN0L2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUVPLE1BQU0sT0FBTyxHQUNsQixHQUFrQixFQUFFLENBQ3BCLENBQWMsQ0FBb0MsRUFBRSxFQUFFLENBQ3BELENBQWtCLENBQUM7QUFIVixRQUFBLE9BQU8sV0FHRyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEV4YWN0IH0gZnJvbSBcIi4uLy4uL2V4YWN0XCI7XG5cbmV4cG9ydCBjb25zdCBpc0V4YWN0ID1cbiAgPEV4cGVjdGVkU2hhcGU+KCkgPT5cbiAgPEFjdHVhbFNoYXBlPih4OiBFeGFjdDxBY3R1YWxTaGFwZSwgRXhwZWN0ZWRTaGFwZT4pID0+XG4gICAgeCBhcyBFeHBlY3RlZFNoYXBlO1xuIl19
@@ -0,0 +1 @@
{"version":3,"file":"isBrowser.js","sources":["../../../src/utils/isBrowser.ts"],"sourcesContent":["import { isNodeEnv } from './node';\nimport { GLOBAL_OBJ } from './worldwide';\n\n/**\n * Returns true if we are in the browser.\n */\nexport function isBrowser(): boolean {\n // eslint-disable-next-line no-restricted-globals\n return typeof window !== 'undefined' && (!isNodeEnv() || isElectronNodeRenderer());\n}\n\ntype ElectronProcess = { type?: string };\n\n// Electron renderers with nodeIntegration enabled are detected as Node.js so we specifically test for them\nfunction isElectronNodeRenderer(): boolean {\n const process = (GLOBAL_OBJ as typeof GLOBAL_OBJ & { process?: ElectronProcess }).process;\n return process?.type === 'renderer';\n}\n"],"names":["isNodeEnv","GLOBAL_OBJ"],"mappings":";;;;;AAGA;AACA;AACA;AACO,SAAS,SAAS,GAAY;AACrC;AACA,EAAE,OAAO,OAAO,MAAA,KAAW,gBAAgB,CAACA,cAAS,EAAC,IAAK,sBAAsB,EAAE,CAAC;AACpF;;AAIA;AACA,SAAS,sBAAsB,GAAY;AAC3C,EAAE,MAAM,OAAA,GAAU,CAACC,oBAAA,GAAiE,OAAO;AAC3F,EAAE,OAAO,OAAO,EAAE,IAAA,KAAS,UAAU;AACrC;;;;"}
@@ -0,0 +1,27 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.default = offsetParent;
var _css = _interopRequireDefault(require("./css"));
var _ownerDocument = _interopRequireDefault(require("./ownerDocument"));
var isHTMLElement = function isHTMLElement(e) {
return !!e && 'offsetParent' in e;
};
function offsetParent(node) {
var doc = (0, _ownerDocument.default)(node);
var parent = node && node.offsetParent;
while (isHTMLElement(parent) && parent.nodeName !== 'HTML' && (0, _css.default)(parent, 'position') === 'static') {
parent = parent.offsetParent;
}
return parent || doc.documentElement;
}
module.exports = exports["default"];
@@ -0,0 +1,100 @@
/*
* 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 { merge } from '@opentelemetry/core';
import { defaultResource } from '@opentelemetry/resources';
import { Tracer } from './Tracer';
import { loadDefaultConfig } from './config';
import { MultiSpanProcessor } from './MultiSpanProcessor';
import { reconfigureLimits } from './utility';
export var ForceFlushState;
(function (ForceFlushState) {
ForceFlushState[ForceFlushState["resolved"] = 0] = "resolved";
ForceFlushState[ForceFlushState["timeout"] = 1] = "timeout";
ForceFlushState[ForceFlushState["error"] = 2] = "error";
ForceFlushState[ForceFlushState["unresolved"] = 3] = "unresolved";
})(ForceFlushState || (ForceFlushState = {}));
/**
* This class represents a basic tracer provider which platform libraries can extend
*/
export class BasicTracerProvider {
_config;
_tracers = new Map();
_resource;
_activeSpanProcessor;
constructor(config = {}) {
const mergedConfig = merge({}, loadDefaultConfig(), reconfigureLimits(config));
this._resource = mergedConfig.resource ?? defaultResource();
this._config = Object.assign({}, mergedConfig, {
resource: this._resource,
});
const spanProcessors = [];
if (config.spanProcessors?.length) {
spanProcessors.push(...config.spanProcessors);
}
this._activeSpanProcessor = new MultiSpanProcessor(spanProcessors);
}
getTracer(name, version, options) {
const key = `${name}@${version || ''}:${options?.schemaUrl || ''}`;
if (!this._tracers.has(key)) {
this._tracers.set(key, new Tracer({ name, version, schemaUrl: options?.schemaUrl }, this._config, this._resource, this._activeSpanProcessor));
}
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
return this._tracers.get(key);
}
forceFlush() {
const timeout = this._config.forceFlushTimeoutMillis;
const promises = this._activeSpanProcessor['_spanProcessors'].map((spanProcessor) => {
return new Promise(resolve => {
let state;
const timeoutInterval = setTimeout(() => {
resolve(new Error(`Span processor did not completed within timeout period of ${timeout} ms`));
state = ForceFlushState.timeout;
}, timeout);
spanProcessor
.forceFlush()
.then(() => {
clearTimeout(timeoutInterval);
if (state !== ForceFlushState.timeout) {
state = ForceFlushState.resolved;
resolve(state);
}
})
.catch(error => {
clearTimeout(timeoutInterval);
state = ForceFlushState.error;
resolve(error);
});
});
});
return new Promise((resolve, reject) => {
Promise.all(promises)
.then(results => {
const errors = results.filter(result => result !== ForceFlushState.resolved);
if (errors.length > 0) {
reject(errors);
}
else {
resolve();
}
})
.catch(error => reject([error]));
});
}
shutdown() {
return this._activeSpanProcessor.shutdown();
}
}
//# sourceMappingURL=BasicTracerProvider.js.map
@@ -0,0 +1,13 @@
import { sql } from 'drizzle-orm';
export const execute = function execute({ db, drizzle, raw, sql: statement }) {
const executeFrom = db ?? drizzle;
if (raw) {
const result = executeFrom.run(sql.raw(raw));
return result;
} else {
const result = executeFrom.run(statement);
return result;
}
};
//# sourceMappingURL=execute.js.map
@@ -0,0 +1,50 @@
Prism.languages.scala = Prism.languages.extend('java', {
'triple-quoted-string': {
pattern: /"""[\s\S]*?"""/,
greedy: true,
alias: 'string'
},
'string': {
pattern: /("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,
greedy: true
},
'keyword': /<-|=>|\b(?:abstract|case|catch|class|def|derives|do|else|enum|extends|extension|final|finally|for|forSome|given|if|implicit|import|infix|inline|lazy|match|new|null|object|opaque|open|override|package|private|protected|return|sealed|self|super|this|throw|trait|transparent|try|type|using|val|var|while|with|yield)\b/,
'number': /\b0x(?:[\da-f]*\.)?[\da-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e\d+)?[dfl]?/i,
'builtin': /\b(?:Any|AnyRef|AnyVal|Boolean|Byte|Char|Double|Float|Int|Long|Nothing|Short|String|Unit)\b/,
'symbol': /'[^\d\s\\]\w*/
});
Prism.languages.insertBefore('scala', 'triple-quoted-string', {
'string-interpolation': {
pattern: /\b[a-z]\w*(?:"""(?:[^$]|\$(?:[^{]|\{(?:[^{}]|\{[^{}]*\})*\}))*?"""|"(?:[^$"\r\n]|\$(?:[^{]|\{(?:[^{}]|\{[^{}]*\})*\}))*")/i,
greedy: true,
inside: {
'id': {
pattern: /^\w+/,
greedy: true,
alias: 'function'
},
'escape': {
pattern: /\\\$"|\$[$"]/,
greedy: true,
alias: 'symbol'
},
'interpolation': {
pattern: /\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,
greedy: true,
inside: {
'punctuation': /^\$\{?|\}$/,
'expression': {
pattern: /[\s\S]+/,
inside: Prism.languages.scala
}
}
},
'string': /[\s\S]+/
}
}
});
delete Prism.languages.scala['class-name'];
delete Prism.languages.scala['function'];
delete Prism.languages.scala['constant'];
@@ -0,0 +1 @@
{"version":3,"file":"tent-tree.js","sources":["../../../src/icons/tent-tree.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name TentTree\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSI0IiBjeT0iNCIgcj0iMiIgLz4KICA8cGF0aCBkPSJtMTQgNSAzLTMgMyAzIiAvPgogIDxwYXRoIGQ9Im0xNCAxMCAzLTMgMyAzIiAvPgogIDxwYXRoIGQ9Ik0xNyAxNFYyIiAvPgogIDxwYXRoIGQ9Ik0xNyAxNEg3bC01IDhoMjBaIiAvPgogIDxwYXRoIGQ9Ik04IDE0djgiIC8+CiAgPHBhdGggZD0ibTkgMTQgNSA4IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/tent-tree\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 TentTree = createLucideIcon('TentTree', [\n ['circle', { cx: '4', cy: '4', r: '2', key: 'bt5ra8' }],\n ['path', { d: 'm14 5 3-3 3 3', key: '1sorif' }],\n ['path', { d: 'm14 10 3-3 3 3', key: '1jyi9h' }],\n ['path', { d: 'M17 14V2', key: '8ymqnk' }],\n ['path', { d: 'M17 14H7l-5 8h20Z', key: '13ar7p' }],\n ['path', { d: 'M8 14v8', key: '1ghmqk' }],\n ['path', { d: 'm9 14 5 8', key: '13pgi6' }],\n]);\n\nexport default TentTree;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,iBAAiB,UAAY,CAAA,CAAA,CAAA;AAAA,CAC5C,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,EAAK,CAAI,CAAA,CAAA,CAAA,GAAA,CAAK,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACtD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAiB,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,CAC9C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAkB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC/C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,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,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,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC5C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
{"version":3,"file":"setColumnID.d.ts","sourceRoot":"","sources":["../../../src/postgres/schema/setColumnID.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAEjD,eAAO,MAAM,WAAW,EAAE,WAyCzB,CAAA"}
@@ -0,0 +1,328 @@
import { debug, parseSemver, isMatchingPattern } from '@sentry/core';
import { getSentryRelease } from '@sentry/node';
import * as fs from 'fs';
import * as path from 'path';
import { createRouteManifest } from '../manifest/createRouteManifest.js';
import { requiresInstrumentationHook } from '../util.js';
import { getGitRevision, getInstrumentationClientFileContents } from './buildTime.js';
import { resolveTunnelRoute, setUpTunnelRewriteRules } from './tunnel.js';
let showedExportModeTunnelWarning = false;
let showedExperimentalBuildModeWarning = false;
/**
* Resolves the Sentry release name to use for build-time behavior.
*
* Note: if `release.create === false`, we avoid falling back to git to preserve build determinism.
*/
function resolveReleaseName(userSentryOptions) {
const shouldCreateRelease = userSentryOptions.release?.create !== false;
return shouldCreateRelease
? (userSentryOptions.release?.name ?? getSentryRelease() ?? getGitRevision())
: userSentryOptions.release?.name;
}
/**
* Applies tunnel-route rewrites, if configured.
*
* Note: this mutates `userSentryOptions` (to store the resolved tunnel route) and `incomingUserNextConfigObject`.
*/
function maybeSetUpTunnelRouteRewriteRules(
incomingUserNextConfigObject,
userSentryOptions,
) {
if (!userSentryOptions.tunnelRoute) {
return;
}
if (incomingUserNextConfigObject.output === 'export') {
if (!showedExportModeTunnelWarning) {
showedExportModeTunnelWarning = true;
// eslint-disable-next-line no-console
console.warn(
'[@sentry/nextjs] The Sentry Next.js SDK `tunnelRoute` option will not work in combination with Next.js static exports. The `tunnelRoute` option uses server-side features that cannot be accessed in export mode. If you still want to tunnel Sentry events, set up your own tunnel: https://docs.sentry.io/platforms/javascript/troubleshooting/#using-the-tunnel-option',
);
}
return;
}
// Update the global options object to use the resolved value everywhere
const resolvedTunnelRoute = resolveTunnelRoute(userSentryOptions.tunnelRoute);
userSentryOptions.tunnelRoute = resolvedTunnelRoute || undefined;
setUpTunnelRewriteRules(incomingUserNextConfigObject, resolvedTunnelRoute);
}
/**
* Handles Next's experimental build-mode warning/early return behavior.
*
* @returns `true` if Sentry config processing should be skipped for the current process invocation
*/
function shouldReturnEarlyInExperimentalBuildMode() {
if (!process.argv.includes('--experimental-build-mode')) {
return false;
}
if (!showedExperimentalBuildModeWarning) {
showedExperimentalBuildModeWarning = true;
// eslint-disable-next-line no-console
console.warn(
'[@sentry/nextjs] The Sentry Next.js SDK does not currently fully support next build --experimental-build-mode',
);
}
// Next.js v15.3.0-canary.1 splits the experimental build into two phases:
// 1. compile: Code compilation
// 2. generate: Environment variable inlining and prerendering (We don't instrument this phase, we inline in the compile phase)
//
// We assume a single "full" build and reruns Webpack instrumentation in both phases.
// During the generate step it collides with Next.js's inliner
// producing malformed JS and build failures.
// We skip Sentry processing during generate to avoid this issue.
return process.argv.includes('generate');
}
/**
* Creates the route manifest used for client-side route name normalization, unless disabled.
*/
function maybeCreateRouteManifest(
incomingUserNextConfigObject,
userSentryOptions,
) {
// Handle deprecated option with warning
// eslint-disable-next-line deprecation/deprecation
if (userSentryOptions.disableManifestInjection) {
// eslint-disable-next-line no-console
console.warn(
'[@sentry/nextjs] The `disableManifestInjection` option is deprecated. Use `routeManifestInjection: false` instead.',
);
}
// If explicitly disabled, skip
if (userSentryOptions.routeManifestInjection === false) {
return undefined;
}
// Still check the deprecated option if the new option is not set
// eslint-disable-next-line deprecation/deprecation
if (userSentryOptions.routeManifestInjection === undefined && userSentryOptions.disableManifestInjection) {
return undefined;
}
const manifest = createRouteManifest({
basePath: incomingUserNextConfigObject.basePath,
});
// Apply route exclusion filter if configured
const excludeFilter = userSentryOptions.routeManifestInjection?.exclude;
return filterRouteManifest(manifest, excludeFilter);
}
/**
* Filters routes from the manifest based on the exclude filter.
* (Exported only for testing)
*/
function filterRouteManifest(manifest, excludeFilter) {
if (!excludeFilter) {
return manifest;
}
const shouldExclude = (route) => {
if (typeof excludeFilter === 'function') {
return excludeFilter(route);
}
return excludeFilter.some(pattern => isMatchingPattern(route, pattern));
};
return {
staticRoutes: manifest.staticRoutes.filter(r => !shouldExclude(r.path)),
dynamicRoutes: manifest.dynamicRoutes.filter(r => !shouldExclude(r.path)),
isrRoutes: manifest.isrRoutes.filter(r => !shouldExclude(r)),
};
}
/**
* Adds `experimental.clientTraceMetadata` for supported Next.js versions.
*/
function maybeSetClientTraceMetadataOption(
incomingUserNextConfigObject,
nextJsVersion,
) {
// Add the `clientTraceMetadata` experimental option based on Next.js version. The option got introduced in Next.js version 15.0.0 (actually 14.3.0-canary.64).
// Adding the option on lower versions will cause Next.js to print nasty warnings we wouldn't confront our users with.
if (nextJsVersion) {
const { major, minor } = parseSemver(nextJsVersion);
if (major !== undefined && minor !== undefined && (major >= 15 || (major === 14 && minor >= 3))) {
incomingUserNextConfigObject.experimental = incomingUserNextConfigObject.experimental || {};
incomingUserNextConfigObject.experimental.clientTraceMetadata = [
'baggage',
'sentry-trace',
...(incomingUserNextConfigObject.experimental?.clientTraceMetadata || []),
];
}
} else {
// eslint-disable-next-line no-console
console.log(
"[@sentry/nextjs] The Sentry SDK was not able to determine your Next.js version. If you are using Next.js version 15 or greater, please add `experimental.clientTraceMetadata: ['sentry-trace', 'baggage']` to your Next.js config to enable pageload tracing for App Router.",
);
}
}
/**
* Ensures Next.js' `experimental.instrumentationHook` is set for versions which require it.
*/
function maybeSetInstrumentationHookOption(
incomingUserNextConfigObject,
nextJsVersion,
) {
// From Next.js version (15.0.0-canary.124) onwards, Next.js does no longer require the `experimental.instrumentationHook` option and will
// print a warning when it is set, so we need to conditionally provide it for lower versions.
if (nextJsVersion && requiresInstrumentationHook(nextJsVersion)) {
if (incomingUserNextConfigObject.experimental?.instrumentationHook === false) {
// eslint-disable-next-line no-console
console.warn(
'[@sentry/nextjs] You turned off the `experimental.instrumentationHook` option. Note that Sentry will not be initialized if you did not set it up inside `instrumentation.(js|ts)`.',
);
}
incomingUserNextConfigObject.experimental = {
instrumentationHook: true,
...incomingUserNextConfigObject.experimental,
};
return;
}
if (nextJsVersion) {
return;
}
// If we cannot detect a Next.js version for whatever reason, the sensible default is to set the `experimental.instrumentationHook`, even though it may create a warning.
if (incomingUserNextConfigObject.experimental && 'instrumentationHook' in incomingUserNextConfigObject.experimental) {
if (incomingUserNextConfigObject.experimental.instrumentationHook === false) {
// eslint-disable-next-line no-console
console.warn(
'[@sentry/nextjs] You set `experimental.instrumentationHook` to `false`. If you are using Next.js version 15 or greater, you can remove that option. If you are using Next.js version 14 or lower, you need to set `experimental.instrumentationHook` in your `next.config.(js|mjs)` to `true` for the SDK to be properly initialized in combination with `instrumentation.(js|ts)`.',
);
}
} else {
// eslint-disable-next-line no-console
console.log(
"[@sentry/nextjs] The Sentry SDK was not able to determine your Next.js version. If you are using Next.js version 15 or greater, Next.js will probably show you a warning about the `experimental.instrumentationHook` being set. To silence Next.js' warning, explicitly set the `experimental.instrumentationHook` option in your `next.config.(js|mjs|ts)` to `undefined`. If you are on Next.js version 14 or lower, you can silence this particular warning by explicitly setting the `experimental.instrumentationHook` option in your `next.config.(js|mjs)` to `true`.",
);
incomingUserNextConfigObject.experimental = {
instrumentationHook: true,
...incomingUserNextConfigObject.experimental,
};
}
}
/**
* Warns if the project has an `instrumentation-client` file but doesn't export `onRouterTransitionStart`.
*/
function warnIfMissingOnRouterTransitionStartHook(userSentryOptions) {
// We wanna check whether the user added a `onRouterTransitionStart` handler to their client instrumentation file.
const instrumentationClientFileContents = getInstrumentationClientFileContents();
if (
instrumentationClientFileContents !== undefined &&
!instrumentationClientFileContents.includes('onRouterTransitionStart') &&
!userSentryOptions.suppressOnRouterTransitionStartWarning
) {
// eslint-disable-next-line no-console
console.warn(
'[@sentry/nextjs] ACTION REQUIRED: To instrument navigations, the Sentry SDK requires you to export an `onRouterTransitionStart` hook from your `instrumentation-client.(js|ts)` file. You can do so by adding `export const onRouterTransitionStart = Sentry.captureRouterTransitionStart;` to the file.',
);
}
}
/**
* Parses the major Next.js version number from a semver string.
*/
function getNextMajor(nextJsVersion) {
if (!nextJsVersion) {
return undefined;
}
const { major } = parseSemver(nextJsVersion);
return major;
}
/**
* Reads the Vercel crons configuration from vercel.json.
* Returns undefined if vercel.json doesn't exist or doesn't contain crons.
*/
function readVercelCronsConfig() {
try {
const vercelJsonPath = path.join(process.cwd(), 'vercel.json');
const vercelJsonContents = fs.readFileSync(vercelJsonPath, 'utf8');
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
const cronsConfig = JSON.parse(vercelJsonContents).crons ;
if (cronsConfig && Array.isArray(cronsConfig) && cronsConfig.length > 0) {
return cronsConfig;
}
return undefined;
} catch (e) {
if ((e ).code === 'ENOENT') {
return undefined;
}
debug.error('[@sentry/nextjs] Failed to read vercel.json for automatic cron job monitoring instrumentation', e);
return undefined;
}
}
/** Strategy for Vercel cron monitoring instrumentation */
/**
* Reads and returns the Vercel crons configuration from vercel.json along with
* information about which instrumentation approach to use.
*
* - `_experimental.vercelCronsMonitoring`: New span-based approach (works for both App Router and Pages Router)
* - `automaticVercelMonitors`: Old wrapper-based approach (Pages Router only)
*
* If both are enabled, the new approach is preferred and a warning is logged.
*/
function maybeGetVercelCronsConfig(userSentryOptions) {
const result = { config: undefined, strategy: undefined };
if (!process.env.VERCEL) {
return result;
}
const experimentalEnabled = userSentryOptions._experimental?.vercelCronsMonitoring === true;
const legacyEnabled = userSentryOptions.webpack?.automaticVercelMonitors === true;
if (!experimentalEnabled && !legacyEnabled) {
return result;
}
const config = readVercelCronsConfig();
if (!config) {
return result;
}
result.config = config;
if (experimentalEnabled && legacyEnabled) {
debug.warn(
"[@sentry/nextjs] Both '_experimental.vercelCronsMonitoring' and 'webpack.automaticVercelMonitors' are enabled. " +
"Using the new span-based approach from '_experimental.vercelCronsMonitoring'. " +
"You can remove 'webpack.automaticVercelMonitors' from your config.",
);
result.strategy = 'spans';
} else if (experimentalEnabled) {
debug.log(
'[@sentry/nextjs] Creating Sentry cron monitors for your Vercel Cron Jobs using span-based instrumentation.',
);
result.strategy = 'spans';
} else {
debug.log(
"[@sentry/nextjs] Creating Sentry cron monitors for your Vercel Cron Jobs. You can disable this feature by setting the 'automaticVercelMonitors' option to false in your Next.js config.",
);
result.strategy = 'wrapper';
}
return result;
}
export { filterRouteManifest, getNextMajor, maybeCreateRouteManifest, maybeGetVercelCronsConfig, maybeSetClientTraceMetadataOption, maybeSetInstrumentationHookOption, maybeSetUpTunnelRouteRewriteRules, resolveReleaseName, shouldReturnEarlyInExperimentalBuildMode, warnIfMissingOnRouterTransitionStartHook };
//# sourceMappingURL=getFinalConfigObjectUtils.js.map
@@ -0,0 +1,5 @@
import { IImage } from './interface.mjs';
declare const J2C: IImage;
export { J2C };
@@ -0,0 +1,48 @@
/**
* 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 type { SerializedListItemNode } from './LexicalListItemNode';
import type { ListNodeTagType, ListType, SerializedListNode } from './LexicalListNode';
import type { LexicalCommand, LexicalEditor, NodeKey } from 'lexical';
import { INSERT_CHECK_LIST_COMMAND, registerCheckList } from './checkList';
import { $handleListInsertParagraph, $insertList, $removeList } from './formatList';
import { $createListItemNode, $isListItemNode, ListItemNode } from './LexicalListItemNode';
import { $createListNode, $isListNode, ListNode } from './LexicalListNode';
import { $getListDepth } from './utils';
export { $createListItemNode, $createListNode, $getListDepth, $handleListInsertParagraph, $insertList, $isListItemNode, $isListNode, $removeList, INSERT_CHECK_LIST_COMMAND, ListItemNode, ListNode, ListNodeTagType, ListType, registerCheckList, SerializedListItemNode, SerializedListNode, };
export declare const UPDATE_LIST_START_COMMAND: LexicalCommand<{
listNodeKey: NodeKey;
newStart: number;
}>;
export declare const INSERT_UNORDERED_LIST_COMMAND: LexicalCommand<void>;
export declare const INSERT_ORDERED_LIST_COMMAND: LexicalCommand<void>;
export declare const REMOVE_LIST_COMMAND: LexicalCommand<void>;
export declare function registerList(editor: LexicalEditor): () => void;
export declare function registerListStrictIndentTransform(editor: LexicalEditor): () => void;
/**
* @deprecated use {@link $insertList} from an update or command listener.
*
* Inserts a new ListNode. If the selection's anchor node is an empty ListItemNode and is a child of
* the root/shadow root, it will replace the ListItemNode with a ListNode and the old ListItemNode.
* Otherwise it will replace its parent with a new ListNode and re-insert the ListItemNode and any previous children.
* If the selection's anchor node is not an empty ListItemNode, it will add a new ListNode or merge an existing ListNode,
* unless the the node is a leaf node, in which case it will attempt to find a ListNode up the branch and replace it with
* a new ListNode, or create a new ListNode at the nearest root/shadow root.
* @param editor - The lexical editor.
* @param listType - The type of list, "number" | "bullet" | "check".
*/
export declare function insertList(editor: LexicalEditor, listType: ListType): void;
/**
* @deprecated use {@link $removeList} from an update or command listener.
*
* Searches for the nearest ancestral ListNode and removes it. If selection is an empty ListItemNode
* it will remove the whole list, including the ListItemNode. For each ListItemNode in the ListNode,
* removeList will also generate new ParagraphNodes in the removed ListNode's place. Any child node
* inside a ListItemNode will be appended to the new ParagraphNodes.
* @param editor - The lexical editor.
*/
export declare function removeList(editor: LexicalEditor): void;
@@ -0,0 +1,6 @@
export { sendFeedback } from './core/sendFeedback';
export { buildFeedbackIntegration } from './core/integration';
export { getFeedback } from './core/getFeedback';
export { feedbackModalIntegration } from './modal/integration';
export { feedbackScreenshotIntegration } from './screenshot/integration';
//# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,10 @@
"use strict";
exports.monthsToYears = void 0;
var _index = require("../monthsToYears.cjs");
var _index2 = require("./_lib/convertToFP.cjs"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
const monthsToYears = (exports.monthsToYears = (0, _index2.convertToFP)(
_index.monthsToYears,
1,
));
@@ -0,0 +1,24 @@
const formatRelativeLocale = {
lastWeek: "'o' eeee 'pasado á' LT",
yesterday: "'onte á' p",
today: "'hoxe á' p",
tomorrow: "'mañá á' p",
nextWeek: "eeee 'á' p",
other: "P",
};
const formatRelativeLocalePlural = {
lastWeek: "'o' eeee 'pasado ás' p",
yesterday: "'onte ás' p",
today: "'hoxe ás' p",
tomorrow: "'mañá ás' p",
nextWeek: "eeee 'ás' p",
other: "P",
};
export const formatRelative = (token, date, _baseDate, _options) => {
if (date.getHours() !== 1) {
return formatRelativeLocalePlural[token];
}
return formatRelativeLocale[token];
};
@@ -0,0 +1,115 @@
import { defaultAccess } from '../auth/defaultAccess.js';
import { buildFolderField } from './buildFolderField.js';
import { deleteSubfoldersBeforeDelete } from './hooks/deleteSubfoldersAfterDelete.js';
import { dissasociateAfterDelete } from './hooks/dissasociateAfterDelete.js';
import { ensureSafeCollectionsChange } from './hooks/ensureSafeCollectionsChange.js';
import { reparentChildFolder } from './hooks/reparentChildFolder.js';
export const createFolderCollection = ({ slug, collectionSpecific, debug, folderEnabledCollections, folderFieldName })=>{
const { collectionOptions, collectionSlugs } = folderEnabledCollections.reduce((acc, collection)=>{
acc.collectionSlugs.push(collection.slug);
acc.collectionOptions.push({
label: collection.labels?.plural || collection.slug,
value: collection.slug
});
return acc;
}, {
collectionOptions: [],
collectionSlugs: []
});
return {
slug,
access: {
create: defaultAccess,
delete: defaultAccess,
read: defaultAccess,
readVersions: defaultAccess,
update: defaultAccess
},
admin: {
hidden: !debug,
useAsTitle: 'name'
},
fields: [
{
name: 'name',
type: 'text',
index: true,
required: true
},
buildFolderField({
collectionSpecific,
folderFieldName,
folderSlug: slug,
overrides: {
admin: {
hidden: !debug
}
}
}),
{
name: 'documentsAndFolders',
type: 'join',
admin: {
hidden: !debug
},
collection: [
slug,
...collectionSlugs
],
hasMany: true,
on: folderFieldName
},
...collectionSpecific ? [
{
name: 'folderType',
type: 'select',
admin: {
components: {
Field: {
path: '@payloadcms/next/client#FolderTypeField'
}
},
position: 'sidebar'
},
hasMany: true,
options: collectionOptions
}
] : []
],
hooks: {
afterChange: [
reparentChildFolder({
folderFieldName
})
],
afterDelete: [
dissasociateAfterDelete({
collectionSlugs,
folderFieldName
})
],
beforeDelete: [
deleteSubfoldersBeforeDelete({
folderFieldName,
folderSlug: slug
})
],
beforeValidate: [
...collectionSpecific ? [
ensureSafeCollectionsChange({
foldersSlug: slug
})
] : []
]
},
labels: {
plural: 'Folders',
singular: 'Folder'
},
typescript: {
interface: 'FolderInterface'
}
};
};
//# sourceMappingURL=createFolderCollection.js.map
@@ -0,0 +1,27 @@
import { entityKind } from "../../entity.js";
import { SQLiteColumn, SQLiteColumnBuilder } from "./common.js";
class SQLiteRealBuilder extends SQLiteColumnBuilder {
static [entityKind] = "SQLiteRealBuilder";
constructor(name) {
super(name, "number", "SQLiteReal");
}
/** @internal */
build(table) {
return new SQLiteReal(table, this.config);
}
}
class SQLiteReal extends SQLiteColumn {
static [entityKind] = "SQLiteReal";
getSQLType() {
return "real";
}
}
function real(name) {
return new SQLiteRealBuilder(name ?? "");
}
export {
SQLiteReal,
SQLiteRealBuilder,
real
};
//# sourceMappingURL=real.js.map
@@ -0,0 +1,4 @@
import type { CustomComponent } from '../../config/types.js';
export type RowLabelComponent = CustomComponent;
export type RowLabel = Record<string, string> | string;
//# sourceMappingURL=RowLabel.d.ts.map
@@ -0,0 +1,63 @@
import type { ContextOptions, DateArg } from "./types.js";
/**
* The {@link differenceInDays} function options.
*/
export interface DifferenceInDaysOptions extends ContextOptions<Date> {}
/**
* @name differenceInDays
* @category Day Helpers
* @summary Get the number of full days between the given dates.
*
* @description
* Get the number of full day periods between two dates. Fractional days are
* truncated towards zero.
*
* One "full day" is the distance between a local time in one day to the same
* local time on the next or previous day. A full day can sometimes be less than
* or more than 24 hours if a daylight savings change happens between two dates.
*
* To ignore DST and only measure exact 24-hour periods, use this instead:
* `Math.trunc(differenceInHours(dateLeft, dateRight)/24)|0`.
*
* @param laterDate - The later date
* @param earlierDate - The earlier date
* @param options - An object with options
*
* @returns The number of full days according to the local timezone
*
* @example
* // How many full days are between
* // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?
* const result = differenceInDays(
* new Date(2012, 6, 2, 0, 0),
* new Date(2011, 6, 2, 23, 0)
* )
* //=> 365
*
* @example
* // How many full days are between
* // 2 July 2011 23:59:00 and 3 July 2011 00:01:00?
* const result = differenceInDays(
* new Date(2011, 6, 3, 0, 1),
* new Date(2011, 6, 2, 23, 59)
* )
* //=> 0
*
* @example
* // How many full days are between
* // 1 March 2020 0:00 and 1 June 2020 0:00 ?
* // Note: because local time is used, the
* // result will always be 92 days, even in
* // time zones where DST starts and the
* // period has only 92*24-1 hours.
* const result = differenceInDays(
* new Date(2020, 5, 1),
* new Date(2020, 2, 1)
* )
* //=> 92
*/
export declare function differenceInDays(
laterDate: DateArg<Date> & {},
earlierDate: DateArg<Date> & {},
options?: DifferenceInDaysOptions | undefined,
): number;
@@ -0,0 +1,23 @@
/**
* @name endOfQuarter
* @category Quarter Helpers
* @summary Return the end of a year quarter for the given date.
*
* @description
* Return the end of a year quarter 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).
*
* @param date - The original date
*
* @returns The end of a quarter
*
* @example
* // The end of a quarter for 2 September 2014 11:55:00:
* const result = endOfQuarter(new Date(2014, 8, 2, 11, 55, 0))
* //=> Tue Sep 30 2014 23:59:59.999
*/
export declare function endOfQuarter<DateType extends Date>(
date: DateType | number | string,
): DateType;
@@ -0,0 +1,73 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const makeSerializable = require("../util/makeSerializable");
const ContextDependency = require("./ContextDependency");
const ContextDependencyTemplateAsRequireCall = require("./ContextDependencyTemplateAsRequireCall");
/** @typedef {import("../javascript/JavascriptParser").Range} Range */
/** @typedef {import("../serialization/ObjectMiddleware").ObjectDeserializerContext} ObjectDeserializerContext */
/** @typedef {import("../serialization/ObjectMiddleware").ObjectSerializerContext} ObjectSerializerContext */
/** @typedef {import("./ContextDependency").ContextDependencyOptions} ContextDependencyOptions */
class CommonJsRequireContextDependency extends ContextDependency {
/**
* @param {ContextDependencyOptions} options options for the context module
* @param {Range} range location in source code
* @param {Range=} valueRange location of the require call
* @param {boolean | string=} inShorthand true or name
* @param {string=} context context
*/
constructor(options, range, valueRange, inShorthand, context) {
super(options, context);
this.range = range;
this.valueRange = valueRange;
// inShorthand must be serialized by subclasses that use it
this.inShorthand = inShorthand;
}
get type() {
return "cjs require context";
}
/**
* @param {ObjectSerializerContext} context context
*/
serialize(context) {
const { write } = context;
write(this.range);
write(this.valueRange);
write(this.inShorthand);
super.serialize(context);
}
/**
* @param {ObjectDeserializerContext} context context
*/
deserialize(context) {
const { read } = context;
this.range = read();
this.valueRange = read();
this.inShorthand = read();
super.deserialize(context);
}
}
makeSerializable(
CommonJsRequireContextDependency,
"webpack/lib/dependencies/CommonJsRequireContextDependency"
);
CommonJsRequireContextDependency.Template =
ContextDependencyTemplateAsRequireCall;
module.exports = CommonJsRequireContextDependency;
@@ -0,0 +1,550 @@
"use strict";
/* @minVersion 7.20.0 */
/**
Enums are used in this file, but not assigned to vars to avoid non-hoistable values
CONSTRUCTOR = 0;
PUBLIC = 1;
PRIVATE = 2;
FIELD = 0;
ACCESSOR = 1;
METHOD = 2;
GETTER = 3;
SETTER = 4;
STATIC = 5;
CLASS = 10; // only used in assertValidReturnValue
*/
function _apply_decs_2203_r(targetClass, memberDecs, classDecs, parentClass) {
function createAddInitializerMethod(initializers, decoratorFinishedRef) {
return function addInitializer(initializer) {
assertNotFinished(decoratorFinishedRef, "addInitializer");
assertCallable(initializer, "An initializer");
initializers.push(initializer);
};
}
function memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, metadata, value) {
var kindStr;
switch (kind) {
case 1 /* ACCESSOR */:
kindStr = "accessor";
break;
case 2 /* METHOD */:
kindStr = "method";
break;
case 3 /* GETTER */:
kindStr = "getter";
break;
case 4 /* SETTER */:
kindStr = "setter";
break;
default:
kindStr = "field";
}
var ctx = { kind: kindStr, name: isPrivate ? "#" + name : name, static: isStatic, private: isPrivate, metadata: metadata };
var decoratorFinishedRef = { v: false };
ctx.addInitializer = createAddInitializerMethod(initializers, decoratorFinishedRef);
var get, set;
if (kind === 0 /* FIELD */) {
if (isPrivate) {
get = desc.get;
set = desc.set;
} else {
get = function() {
return this[name];
};
set = function(v) {
this[name] = v;
};
}
} else if (kind === 2 /* METHOD */) {
get = function() {
return desc.value;
};
} else {
// replace with values that will go through the final getter and setter
if (kind === 1 /* ACCESSOR */ || kind === 3 /* GETTER */) {
get = function() {
return desc.get.call(this);
};
}
if (kind === 1 /* ACCESSOR */ || kind === 4 /* SETTER */) {
set = function(v) {
desc.set.call(this, v);
};
}
}
ctx.access = get && set ? { get: get, set: set } : get ? { get: get } : { set: set };
try {
return dec(value, ctx);
} finally {
decoratorFinishedRef.v = true;
}
}
function assertNotFinished(decoratorFinishedRef, fnName) {
if (decoratorFinishedRef.v) {
throw new Error("attempted to call " + fnName + " after decoration was finished");
}
}
function assertCallable(fn, hint) {
if (typeof fn !== "function") {
throw new TypeError(hint + " must be a function");
}
}
function assertValidReturnValue(kind, value) {
var type = typeof value;
if (kind === 1 /* ACCESSOR */) {
if (type !== "object" || value === null) {
throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
}
if (value.get !== undefined) {
assertCallable(value.get, "accessor.get");
}
if (value.set !== undefined) {
assertCallable(value.set, "accessor.set");
}
if (value.init !== undefined) {
assertCallable(value.init, "accessor.init");
}
} else if (type !== "function") {
var hint;
if (kind === 0 /* FIELD */) {
hint = "field";
} else if (kind === 10 /* CLASS */) {
hint = "class";
} else {
hint = "method";
}
throw new TypeError(hint + " decorators must return a function or void 0");
}
}
function applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers, metadata) {
var decs = decInfo[0];
var desc, init, value;
if (isPrivate) {
if (kind === 0 /* FIELD */ || kind === 1 /* ACCESSOR */) {
desc = { get: decInfo[3], set: decInfo[4] };
} else if (kind === 3 /* GETTER */) {
desc = { get: decInfo[3] };
} else if (kind === 4 /* SETTER */) {
desc = { set: decInfo[3] };
} else {
desc = { value: decInfo[3] };
}
} else if (kind !== 0 /* FIELD */) {
desc = Object.getOwnPropertyDescriptor(base, name);
}
if (kind === 1 /* ACCESSOR */) {
value = { get: desc.get, set: desc.set };
} else if (kind === 2 /* METHOD */) {
value = desc.value;
} else if (kind === 3 /* GETTER */) {
value = desc.get;
} else if (kind === 4 /* SETTER */) {
value = desc.set;
}
var newValue, get, set;
if (typeof decs === "function") {
newValue = memberDec(decs, name, desc, initializers, kind, isStatic, isPrivate, metadata, value);
if (newValue !== void 0) {
assertValidReturnValue(kind, newValue);
if (kind === 0 /* FIELD */) {
init = newValue;
} else if (kind === 1 /* ACCESSOR */) {
init = newValue.init;
get = newValue.get || value.get;
set = newValue.set || value.set;
value = { get: get, set: set };
} else {
value = newValue;
}
}
} else {
for (var i = decs.length - 1; i >= 0; i--) {
var dec = decs[i];
newValue = memberDec(dec, name, desc, initializers, kind, isStatic, isPrivate, metadata, value);
if (newValue !== void 0) {
assertValidReturnValue(kind, newValue);
var newInit;
if (kind === 0 /* FIELD */) {
newInit = newValue;
} else if (kind === 1 /* ACCESSOR */) {
newInit = newValue.init;
get = newValue.get || value.get;
set = newValue.set || value.set;
value = { get: get, set: set };
} else {
value = newValue;
}
if (newInit !== void 0) {
if (init === void 0) {
init = newInit;
} else if (typeof init === "function") {
init = [init, newInit];
} else {
init.push(newInit);
}
}
}
}
}
if (kind === 0 /* FIELD */ || kind === 1 /* ACCESSOR */) {
if (init === void 0) {
// If the initializer was void 0, sub in a dummy initializer
init = function(instance, init) {
return init;
};
} else if (typeof init !== "function") {
var ownInitializers = init;
init = function(instance, init) {
var value = init;
for (var i = 0; i < ownInitializers.length; i++) value = ownInitializers[i].call(instance, value);
return value;
};
} else {
var originalInitializer = init;
init = function(instance, init) {
return originalInitializer.call(instance, init);
};
}
ret.push(init);
}
if (kind !== 0 /* FIELD */) {
if (kind === 1 /* ACCESSOR */) {
desc.get = value.get;
desc.set = value.set;
} else if (kind === 2 /* METHOD */) {
desc.value = value;
} else if (kind === 3 /* GETTER */) {
desc.get = value;
} else if (kind === 4 /* SETTER */) {
desc.set = value;
}
if (isPrivate) {
if (kind === 1 /* ACCESSOR */) {
ret.push(function(instance, args) {
return value.get.call(instance, args);
});
ret.push(function(instance, args) {
return value.set.call(instance, args);
});
} else if (kind === 2 /* METHOD */) {
ret.push(value);
} else {
ret.push(function(instance, args) {
return value.call(instance, args);
});
}
} else {
Object.defineProperty(base, name, desc);
}
}
}
function applyMemberDecs(Class, decInfos, metadata) {
var ret = [];
var protoInitializers;
var staticInitializers;
var existingProtoNonFields = new Map();
var existingStaticNonFields = new Map();
for (var i = 0; i < decInfos.length; i++) {
var decInfo = decInfos[i];
// skip computed property names
if (!Array.isArray(decInfo)) continue;
var kind = decInfo[1];
var name = decInfo[2];
var isPrivate = decInfo.length > 3;
var isStatic = kind >= 5; /* STATIC */
var base;
var initializers;
if (isStatic) {
base = Class;
kind = kind - 5 /* STATIC */;
// initialize staticInitializers when we see a non-field static member
staticInitializers = staticInitializers || [];
initializers = staticInitializers;
} else {
base = Class.prototype;
// initialize protoInitializers when we see a non-field member
protoInitializers = protoInitializers || [];
initializers = protoInitializers;
}
if (kind !== 0 /* FIELD */ && !isPrivate) {
var existingNonFields = isStatic ? existingStaticNonFields : existingProtoNonFields;
var existingKind = existingNonFields.get(name) || 0;
if (existingKind === true || (existingKind === 3 /* GETTER */ && kind !== 4) /* SETTER */ || (existingKind === 4 /* SETTER */ && kind !== 3) /* GETTER */) {
throw new Error(
"Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: "
+ name
);
} else if (!existingKind && kind > 2 /* METHOD */) {
existingNonFields.set(name, kind);
} else {
existingNonFields.set(name, true);
}
}
applyMemberDec(ret, base, decInfo, name, kind, isStatic, isPrivate, initializers, metadata);
}
pushInitializers(ret, protoInitializers);
pushInitializers(ret, staticInitializers);
return ret;
}
function pushInitializers(ret, initializers) {
if (initializers) {
ret.push(function(instance) {
for (var i = 0; i < initializers.length; i++) initializers[i].call(instance);
return instance;
});
}
}
function applyClassDecs(targetClass, classDecs, metadata) {
if (classDecs.length > 0) {
var initializers = [];
var newClass = targetClass;
var name = targetClass.name;
for (var i = classDecs.length - 1; i >= 0; i--) {
var decoratorFinishedRef = { v: false };
try {
var nextNewClass = classDecs[i](newClass, { kind: "class", name: name, addInitializer: createAddInitializerMethod(initializers, decoratorFinishedRef), metadata });
} finally {
decoratorFinishedRef.v = true;
}
if (nextNewClass !== undefined) {
assertValidReturnValue(10, /* CLASS */ nextNewClass);
newClass = nextNewClass;
}
}
return [defineMetadata(newClass, metadata), function() {
for (var i = 0; i < initializers.length; i++) initializers[i].call(newClass);
}];
}
// The transformer will not emit assignment when there are no class decorators,
// so we don't have to return an empty array here.
}
function defineMetadata(Class, metadata) {
return Object.defineProperty(Class, Symbol.metadata || Symbol.for("Symbol.metadata"), { configurable: true, enumerable: true, value: metadata });
}
/**
Basic usage:
applyDecs(
Class,
[
// member decorators
[
dec, // dec or array of decs
0, // kind of value being decorated
'prop', // name of public prop on class containing the value being decorated,
'#p', // the name of the private property (if is private, void 0 otherwise),
]
],
[
// class decorators
dec1, dec2
]
)
```
Fully transpiled example:
```js
@dec
class Class {
@dec
a = 123;
@dec
#a = 123;
@dec
@dec2
accessor b = 123;
@dec
accessor #b = 123;
@dec
c() { console.log('c'); }
@dec
#c() { console.log('privC'); }
@dec
get d() { console.log('d'); }
@dec
get #d() { console.log('privD'); }
@dec
set e(v) { console.log('e'); }
@dec
set #e(v) { console.log('privE'); }
}
// becomes
let initializeInstance;
let initializeClass;
let initA;
let initPrivA;
let initB;
let initPrivB, getPrivB, setPrivB;
let privC;
let privD;
let privE;
let Class;
class _Class {
static {
let ret = applyDecs(
this,
[
[dec, 0, 'a'],
[dec, 0, 'a', (i) => i.#a, (i, v) => i.#a = v],
[[dec, dec2], 1, 'b'],
[dec, 1, 'b', (i) => i.#privBData, (i, v) => i.#privBData = v],
[dec, 2, 'c'],
[dec, 2, 'c', () => console.log('privC')],
[dec, 3, 'd'],
[dec, 3, 'd', () => console.log('privD')],
[dec, 4, 'e'],
[dec, 4, 'e', () => console.log('privE')],
],
[
dec
]
)
initA = ret[0];
initPrivA = ret[1];
initB = ret[2];
initPrivB = ret[3];
getPrivB = ret[4];
setPrivB = ret[5];
privC = ret[6];
privD = ret[7];
privE = ret[8];
initializeInstance = ret[9];
Class = ret[10]
initializeClass = ret[11];
}
a = (initializeInstance(this), initA(this, 123));
#a = initPrivA(this, 123);
#bData = initB(this, 123);
get b() { return this.#bData }
set b(v) { this.#bData = v }
#privBData = initPrivB(this, 123);
get #b() { return getPrivB(this); }
set #b(v) { setPrivB(this, v); }
c() { console.log('c'); }
#c(...args) { return privC(this, ...args) }
get d() { console.log('d'); }
get #d() { return privD(this); }
set e(v) { console.log('e'); }
set #e(v) { privE(this, v); }
}
initializeClass(Class);
*/
exports._ = _apply_decs_2203_r = function(targetClass, memberDecs, classDecs, parentClass) {
if (parentClass !== void 0) {
var parentMetadata = parentClass[Symbol.metadata || Symbol.for("Symbol.metadata")];
}
var metadata = Object.create(parentMetadata === void 0 ? null : parentMetadata);
var e = applyMemberDecs(targetClass, memberDecs, metadata);
if (!classDecs.length) defineMetadata(targetClass, metadata);
return {
e: e,
// Lazily apply class decorations so that member init locals can be properly bound.
get c() {
return applyClassDecs(targetClass, classDecs, metadata);
}
};
};
return _apply_decs_2203_r(targetClass, memberDecs, classDecs, parentClass);
}
exports._ = _apply_decs_2203_r;
@@ -0,0 +1,8 @@
// This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
import { getMinutes as fn } from "../getMinutes.mjs";
import { convertToFP } from "./_lib/convertToFP.mjs";
export const getMinutes = convertToFP(fn, 1);
// Fallback for modularized imports:
export default getMinutes;
@@ -0,0 +1,198 @@
import { ColumnBuilder } from "../../column-builder.js";
import { Column } from "../../column.js";
import { entityKind, is } from "../../entity.js";
import { ForeignKeyBuilder } from "../foreign-keys.js";
import { iife } from "../../tracing-utils.js";
import { uniqueKeyName } from "../unique-constraint.js";
import { makePgArray, parsePgArray } from "../utils/array.js";
class PgColumnBuilder extends ColumnBuilder {
foreignKeyConfigs = [];
static [entityKind] = "PgColumnBuilder";
array(size) {
return new PgArrayBuilder(this.config.name, this, size);
}
references(ref, actions = {}) {
this.foreignKeyConfigs.push({ ref, actions });
return this;
}
unique(name, config) {
this.config.isUnique = true;
this.config.uniqueName = name;
this.config.uniqueType = config?.nulls;
return this;
}
generatedAlwaysAs(as) {
this.config.generated = {
as,
type: "always",
mode: "stored"
};
return this;
}
/** @internal */
buildForeignKeys(column, table) {
return this.foreignKeyConfigs.map(({ ref, actions }) => {
return iife(
(ref2, actions2) => {
const builder = new ForeignKeyBuilder(() => {
const foreignColumn = ref2();
return { columns: [column], foreignColumns: [foreignColumn] };
});
if (actions2.onUpdate) {
builder.onUpdate(actions2.onUpdate);
}
if (actions2.onDelete) {
builder.onDelete(actions2.onDelete);
}
return builder.build(table);
},
ref,
actions
);
});
}
/** @internal */
buildExtraConfigColumn(table) {
return new ExtraConfigColumn(table, this.config);
}
}
class PgColumn extends Column {
constructor(table, config) {
if (!config.uniqueName) {
config.uniqueName = uniqueKeyName(table, [config.name]);
}
super(table, config);
this.table = table;
}
static [entityKind] = "PgColumn";
}
class ExtraConfigColumn extends PgColumn {
static [entityKind] = "ExtraConfigColumn";
getSQLType() {
return this.getSQLType();
}
indexConfig = {
order: this.config.order ?? "asc",
nulls: this.config.nulls ?? "last",
opClass: this.config.opClass
};
defaultConfig = {
order: "asc",
nulls: "last",
opClass: void 0
};
asc() {
this.indexConfig.order = "asc";
return this;
}
desc() {
this.indexConfig.order = "desc";
return this;
}
nullsFirst() {
this.indexConfig.nulls = "first";
return this;
}
nullsLast() {
this.indexConfig.nulls = "last";
return this;
}
/**
* ### PostgreSQL documentation quote
*
* > An operator class with optional parameters can be specified for each column of an index.
* The operator class identifies the operators to be used by the index for that column.
* For example, a B-tree index on four-byte integers would use the int4_ops class;
* this operator class includes comparison functions for four-byte integers.
* In practice the default operator class for the column's data type is usually sufficient.
* The main point of having operator classes is that for some data types, there could be more than one meaningful ordering.
* For example, we might want to sort a complex-number data type either by absolute value or by real part.
* We could do this by defining two operator classes for the data type and then selecting the proper class when creating an index.
* More information about operator classes check:
*
* ### Useful links
* https://www.postgresql.org/docs/current/sql-createindex.html
*
* https://www.postgresql.org/docs/current/indexes-opclass.html
*
* https://www.postgresql.org/docs/current/xindex.html
*
* ### Additional types
* If you have the `pg_vector` extension installed in your database, you can use the
* `vector_l2_ops`, `vector_ip_ops`, `vector_cosine_ops`, `vector_l1_ops`, `bit_hamming_ops`, `bit_jaccard_ops`, `halfvec_l2_ops`, `sparsevec_l2_ops` options, which are predefined types.
*
* **You can always specify any string you want in the operator class, in case Drizzle doesn't have it natively in its types**
*
* @param opClass
* @returns
*/
op(opClass) {
this.indexConfig.opClass = opClass;
return this;
}
}
class IndexedColumn {
static [entityKind] = "IndexedColumn";
constructor(name, keyAsName, type, indexConfig) {
this.name = name;
this.keyAsName = keyAsName;
this.type = type;
this.indexConfig = indexConfig;
}
name;
keyAsName;
type;
indexConfig;
}
class PgArrayBuilder extends PgColumnBuilder {
static [entityKind] = "PgArrayBuilder";
constructor(name, baseBuilder, size) {
super(name, "array", "PgArray");
this.config.baseBuilder = baseBuilder;
this.config.size = size;
}
/** @internal */
build(table) {
const baseColumn = this.config.baseBuilder.build(table);
return new PgArray(
table,
this.config,
baseColumn
);
}
}
class PgArray extends PgColumn {
constructor(table, config, baseColumn, range) {
super(table, config);
this.baseColumn = baseColumn;
this.range = range;
this.size = config.size;
}
size;
static [entityKind] = "PgArray";
getSQLType() {
return `${this.baseColumn.getSQLType()}[${typeof this.size === "number" ? this.size : ""}]`;
}
mapFromDriverValue(value) {
if (typeof value === "string") {
value = parsePgArray(value);
}
return value.map((v) => this.baseColumn.mapFromDriverValue(v));
}
mapToDriverValue(value, isNestedArray = false) {
const a = value.map(
(v) => v === null ? null : is(this.baseColumn, PgArray) ? this.baseColumn.mapToDriverValue(v, true) : this.baseColumn.mapToDriverValue(v)
);
if (isNestedArray) return a;
return makePgArray(a);
}
}
export {
ExtraConfigColumn,
IndexedColumn,
PgArray,
PgArrayBuilder,
PgColumn,
PgColumnBuilder
};
//# sourceMappingURL=common.js.map
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/__tests__/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kCAAmC;AAEnC,oEAAgE;AAChE,0DAAsD;AACtD,4CAA0C;AAE1C,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;AAC5B,IAAI,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;AAClC,IAAI,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC;AACpC,IAAI,CAAC,IAAI,CAAC,oBAAoB,EAAE;IAC5B,OAAO;QACH,aAAa,EAAE,cAAM,OAAA,KAAK,EAAL,CAAK;QAC1B,aAAa,EAAE,cAAM,OAAA,KAAK,EAAL,CAAK;QAC1B,SAAS,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,kBAAkB,CAAC;YACpC,OAAO,EAAC,MAAM,EAAE,EAAE,EAAC,CAAC;QACxB,CAAC,CAAC;KACL,CAAC;AACN,CAAC,CAAC,CAAC;AAEH,IAAI,CAAC,IAAI,CAAC,4BAA4B,CAAC,CAAC;AACxC,IAAI,CAAC,IAAI,CAAC,kCAAkC,CAAC,CAAC;AAE9C,QAAQ,CAAC,aAAa,EAAE;IACpB,IAAM,OAAO,GAAG;QACZ,aAAa,EAAE;YACX,WAAW,EAAE;gBACT,WAAW,EAAE,EAAE;gBACf,WAAW,EAAE,EAAE;aAClB;SACJ;KACW,CAAC;IAEjB,EAAE,CAAC,+BAA+B,EAAE;;;;oBAChC,gCAAc,CAAC,OAAO,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;oBACzD,qBAAM,eAAW,CAAC,OAAO,CAAC,EAAA;;oBAA1B,SAA0B,CAAC;oBAC3B,MAAM,CAAC,gCAAc,CAAC,CAAC,wBAAwB,CAC3C,MAAM,CAAC,gBAAgB,CAAC;wBACpB,KAAK,EAAE,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC;wBACzB,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC;wBAC1B,YAAY,EAAE,MAAM,CAAC,gBAAgB,CAAC,EAAC,IAAI,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAC,CAAC;qBAC7D,CAAC,EACF,MAAM,CAAC,gBAAgB,CAAC;wBACpB,eAAe,EAAE,UAAU;wBAC3B,KAAK,EAAE,CAAC;wBACR,MAAM,EAAE,EAAE;wBACV,KAAK,EAAE,GAAG;wBACV,CAAC,EAAE,CAAC;wBACJ,CAAC,EAAE,CAAC;wBACJ,MAAM,EAAE,SAAS;qBACpB,CAAC,CACL,CAAC;oBACF,MAAM,CAAC,gCAAc,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,CAAC;;;;SAC/C,CAAC,CAAC;IAEH,EAAE,CAAC,+DAA+D,EAAE;;;wBAChE,qBAAM,eAAW,CAAC,OAAO,EAAE,EAAC,eAAe,EAAE,IAAI,EAAC,CAAC,EAAA;;oBAAnD,SAAmD,CAAC;oBACpD,MAAM,CAAC,gCAAc,CAAC,CAAC,wBAAwB,CAC3C,MAAM,CAAC,QAAQ,EAAE,EACjB,MAAM,CAAC,gBAAgB,CAAC;wBACpB,eAAe,EAAE,cAAM,CAAC,WAAW;qBACtC,CAAC,CACL,CAAC;;;;SACL,CAAC,CAAC;IAEH,EAAE,CAAC,iDAAiD,EAAE;;;;;oBAC5C,MAAM,GAAG,EAAuB,CAAC;oBACvC,qBAAM,eAAW,CAAC,OAAO,EAAE,EAAC,MAAM,QAAA,EAAC,CAAC,EAAA;;oBAApC,SAAoC,CAAC;oBACrC,MAAM,CAAC,gCAAc,CAAC,CAAC,wBAAwB,CAC3C,MAAM,CAAC,QAAQ,EAAE,EACjB,MAAM,CAAC,gBAAgB,CAAC;wBACpB,MAAM,QAAA;qBACT,CAAC,CACL,CAAC;;;;SACL,CAAC,CAAC;IAEH,EAAE,CAAC,6DAA6D,EAAE;;;;oBAC9D,gCAAc,CAAC,OAAO,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;oBACnC,qBAAM,eAAW,CAAC,OAAO,EAAE,EAAC,eAAe,EAAE,KAAK,EAAC,CAAC,EAAA;;oBAApD,SAAoD,CAAC;oBACrD,MAAM,CAAC,gCAAc,CAAC,CAAC,wBAAwB,CAC3C,MAAM,CAAC,QAAQ,EAAE,EACjB,MAAM,CAAC,gBAAgB,CAAC;wBACpB,eAAe,EAAE,UAAU;wBAC3B,KAAK,EAAE,CAAC;wBACR,MAAM,EAAE,EAAE;wBACV,KAAK,EAAE,GAAG;wBACV,CAAC,EAAE,CAAC;wBACJ,CAAC,EAAE,CAAC;wBACJ,MAAM,EAAE,SAAS;qBACpB,CAAC,CACL,CAAC;oBACF,MAAM,CAAC,gCAAc,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,UAAU,EAAE,CAAC;;;;SACnD,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -0,0 +1,8 @@
"use strict";
exports.getDecadeWithOptions = void 0;
var _index = require("../getDecade.cjs");
var _index2 = require("./_lib/convertToFP.cjs"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
const getDecadeWithOptions = (exports.getDecadeWithOptions = (0,
_index2.convertToFP)(_index.getDecade, 2));
@@ -0,0 +1,159 @@
'use strict';
function _worker_threads() {
const data = require('worker_threads');
_worker_threads = function () {
return data;
};
return data;
}
var _types = require('../types');
/**
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
let file = null;
let setupArgs = [];
let initialized = false;
/**
* This file is a small bootstrapper for workers. It sets up the communication
* between the worker and the parent process, interpreting parent messages and
* sending results back.
*
* The file loaded will be lazily initialized the first time any of the workers
* is called. This is done for optimal performance: if the farm is initialized,
* but no call is made to it, child Node processes will be consuming the least
* possible amount of memory.
*
* If an invalid message is detected, the child will exit (by throwing) with a
* non-zero exit code.
*/
const messageListener = request => {
switch (request[0]) {
case _types.CHILD_MESSAGE_INITIALIZE:
const init = request;
file = init[2];
setupArgs = request[3];
process.env.JEST_WORKER_ID = request[4];
break;
case _types.CHILD_MESSAGE_CALL:
const call = request;
execMethod(call[2], call[3]);
break;
case _types.CHILD_MESSAGE_END:
end();
break;
default:
throw new TypeError(
'Unexpected request from parent process: ' + request[0]
);
}
};
_worker_threads().parentPort.on('message', messageListener);
function reportSuccess(result) {
if (_worker_threads().isMainThread) {
throw new Error('Child can only be used on a forked process');
}
_worker_threads().parentPort.postMessage([_types.PARENT_MESSAGE_OK, result]);
}
function reportClientError(error) {
return reportError(error, _types.PARENT_MESSAGE_CLIENT_ERROR);
}
function reportInitializeError(error) {
return reportError(error, _types.PARENT_MESSAGE_SETUP_ERROR);
}
function reportError(error, type) {
if (_worker_threads().isMainThread) {
throw new Error('Child can only be used on a forked process');
}
if (error == null) {
error = new Error('"null" or "undefined" thrown');
}
_worker_threads().parentPort.postMessage([
type,
error.constructor && error.constructor.name,
error.message,
error.stack,
typeof error === 'object' ? {...error} : error
]);
}
function end() {
const main = require(file);
if (!main.teardown) {
exitProcess();
return;
}
execFunction(main.teardown, main, [], exitProcess, exitProcess);
}
function exitProcess() {
// Clean up open handles so the worker ideally exits gracefully
_worker_threads().parentPort.removeListener('message', messageListener);
}
function execMethod(method, args) {
const main = require(file);
let fn;
if (method === 'default') {
fn = main.__esModule ? main['default'] : main;
} else {
fn = main[method];
}
function execHelper() {
execFunction(fn, main, args, reportSuccess, reportClientError);
}
if (initialized || !main.setup) {
execHelper();
return;
}
initialized = true;
execFunction(main.setup, main, setupArgs, execHelper, reportInitializeError);
}
const isPromise = obj =>
!!obj &&
(typeof obj === 'object' || typeof obj === 'function') &&
typeof obj.then === 'function';
function execFunction(fn, ctx, args, onResult, onError) {
let result;
try {
result = fn.apply(ctx, args);
} catch (err) {
onError(err);
return;
}
if (isPromise(result)) {
result.then(onResult, onError);
} else {
onResult(result);
}
}
@@ -0,0 +1,39 @@
// Helper type. Not useful on its own.
type Without<FirstType, SecondType> = {[KeyType in Exclude<keyof FirstType, keyof SecondType>]?: never};
/**
Create a type that has mutually exclusive properties.
This type was inspired by [this comment](https://github.com/Microsoft/TypeScript/issues/14094#issuecomment-373782604).
This type works with a helper type, called `Without`. `Without<FirstType, SecondType>` produces a type that has only keys from `FirstType` which are not present on `SecondType` and sets the value type for these keys to `never`. This helper type is then used in `MergeExclusive` to remove keys from either `FirstType` or `SecondType`.
@example
```
import {MergeExclusive} from 'type-fest';
interface ExclusiveVariation1 {
exclusive1: boolean;
}
interface ExclusiveVariation2 {
exclusive2: string;
}
type ExclusiveOptions = MergeExclusive<ExclusiveVariation1, ExclusiveVariation2>;
let exclusiveOptions: ExclusiveOptions;
exclusiveOptions = {exclusive1: true};
//=> Works
exclusiveOptions = {exclusive2: 'hi'};
//=> Works
exclusiveOptions = {exclusive1: true, exclusive2: 'hi'};
//=> Error
```
*/
export type MergeExclusive<FirstType, SecondType> =
(FirstType | SecondType) extends object ?
(Without<FirstType, SecondType> & SecondType) | (Without<SecondType, FirstType> & FirstType) :
FirstType | SecondType;
@@ -0,0 +1,11 @@
export { HTMLProjectionNode } from './projection/node/HTMLProjectionNode.mjs';
export { nodeGroup } from './projection/node/group.mjs';
export { calcBoxDelta } from './projection/geometry/delta-calc.mjs';
export { mix } from './utils/mix/index.mjs';
export { animateValue as animate } from './animation/animators/MainThreadAnimation.mjs';
export { buildTransform } from './render/html/utils/build-transform.mjs';
export { addScaleCorrector } from './projection/styles/scale-correction.mjs';
export { correctBorderRadius } from './projection/styles/scale-border-radius.mjs';
export { correctBoxShadow } from './projection/styles/scale-box-shadow.mjs';
export { HTMLVisualElement } from './render/html/HTMLVisualElement.mjs';
export { frame, frameData } from './frameloop/frame.mjs';
@@ -0,0 +1,48 @@
'use strict'
module.exports = errWithCauseSerializer
const { isErrorLike } = require('./err-helpers')
const { pinoErrProto, pinoErrorSymbols } = require('./err-proto')
const { seen } = pinoErrorSymbols
const { toString } = Object.prototype
function errWithCauseSerializer (err) {
if (!isErrorLike(err)) {
return err
}
err[seen] = undefined // tag to prevent re-looking at this
const _err = Object.create(pinoErrProto)
_err.type = toString.call(err.constructor) === '[object Function]'
? err.constructor.name
: err.name
_err.message = err.message
_err.stack = err.stack
if (Array.isArray(err.errors)) {
_err.aggregateErrors = err.errors.map(err => errWithCauseSerializer(err))
}
if (isErrorLike(err.cause) && !Object.prototype.hasOwnProperty.call(err.cause, seen)) {
_err.cause = errWithCauseSerializer(err.cause)
}
for (const key in err) {
if (_err[key] === undefined) {
const val = err[key]
if (isErrorLike(val)) {
if (!Object.prototype.hasOwnProperty.call(val, seen)) {
_err[key] = errWithCauseSerializer(val)
}
} else {
_err[key] = val
}
}
}
delete err[seen] // clean up tag in case err is serialized again later
_err.raw = err
return _err
}
@@ -0,0 +1,162 @@
import type { PaginatedDocs } from '../../../database/types.js';
import type { CollectionSlug, JoinQuery, Payload, PayloadTypes, RequestContext, TypedFallbackLocale, TypedLocale } from '../../../index.js';
import type { Document, DraftTransformCollectionWithSelect, PayloadRequest, PopulateType, SelectType, Sort, TransformCollectionWithSelect, Where } from '../../../types/index.js';
import type { DraftFlagFromCollectionSlug, SelectFromCollectionSlug } from '../../config/types.js';
type BaseFindOptions<TSlug extends CollectionSlug, TSelect extends SelectType> = {
/**
* the Collection slug to operate against.
*/
collection: TSlug;
/**
* [Context](https://payloadcms.com/docs/hooks/context), which will then be passed to `context` and `req.context`,
* which can be read by hooks. Useful if you want to pass additional information to the hooks which
* shouldn't be necessarily part of the document, for example a `triggerBeforeChange` option which can be read by the BeforeChange hook
* to determine if it should run or not.
*/
context?: RequestContext;
/**
* The current population depth, used internally for relationships population.
* @internal
*/
currentDepth?: number;
/**
* [Control auto-population](https://payloadcms.com/docs/queries/depth) of nested relationship and upload fields.
*/
depth?: number;
/**
* When set to `true`, errors will not be thrown.
*/
disableErrors?: boolean;
/**
* Specify a [fallback locale](https://payloadcms.com/docs/configuration/localization) to use for any returned documents.
*/
fallbackLocale?: TypedFallbackLocale;
/**
* Include info about the lock status to the result into all documents with fields: `_isLocked` and `_userEditing`
*/
includeLockStatus?: boolean;
/**
* The [Join Field Query](https://payloadcms.com/docs/fields/join#query-options).
* Pass `false` to disable all join fields from the result.
*/
joins?: JoinQuery<TSlug>;
/**
* The maximum related documents to be returned.
* Defaults unless `defaultLimit` is specified for the collection config
* @default 10
*/
limit?: number;
/**
* Specify [locale](https://payloadcms.com/docs/configuration/localization) for any returned documents.
*/
locale?: 'all' | TypedLocale;
/**
* Skip access control.
* Set to `false` if you want to respect Access Control for the operation, for example when fetching data for the front-end.
* @default true
*/
overrideAccess?: boolean;
/**
* Get a specific page number
* @default 1
*/
page?: number;
/**
* Set to `false` to return all documents and avoid querying for document counts which introduces some overhead.
* You can also combine that property with a specified `limit` to limit documents but avoid the count query.
*/
pagination?: boolean;
/**
* Specify [populate](https://payloadcms.com/docs/queries/select#populate) to control which fields to include to the result from populated documents.
*/
populate?: PopulateType;
/**
* The `PayloadRequest` object. You can pass it to thread the current [transaction](https://payloadcms.com/docs/database/transactions), user and locale to the operation.
* Recommended to pass when using the Local API from hooks, as usually you want to execute the operation within the current transaction.
*/
req?: Partial<PayloadRequest>;
/**
* By default, Payload's APIs will return all fields for a given collection or global.
* But you may not need all of that data for all of your queries.
* Sometimes, you might want just a few fields from the response.
*
* With the Select API, you can define exactly which fields you'd like to retrieve.
* This can impact performance by reducing database load and response size.
*
*
* **Example: Select specific fields**
* ```ts
* const post = await payload.findByID({
* collection: 'posts',
* id: '1',
* select: { title: true, content: true },
* })
*
* console.log(post) // { id: '1', title: 'My Post', content: 'This is my post' }
* ```
*
* **Example: Select all fields except `content`**
*
* ```ts
* const post = await payload.findByID({
* collection: 'posts',
* id: '1',
* select: { content: false },
* })
*
* console.log(post) // { id: '1', title: 'My Post', number: 3 }
* ```
*
* **Example: Empty select returns only `id`**
*
* ```ts
* const post = await payload.findByID({
* collection: 'posts',
* id: '1',
* select: {},
* })
*
* console.log(post) // { id: '1' }
* ```
*
* @see https://payloadcms.com/docs/queries/select
*/
select?: TSelect;
/**
* Opt-in to receiving hidden fields. By default, they are hidden from returned documents in accordance to your config.
* @default false
*/
showHiddenFields?: boolean;
/**
* Sort the documents, can be a string or an array of strings
* @example '-createdAt' // Sort DESC by createdAt
* @example ['group', '-createdAt'] // sort by 2 fields, ASC group and DESC createdAt
*/
sort?: Sort;
/**
* When set to `true`, the query will include both normal and trashed documents.
* To query only trashed documents, pass `trash: true` and combine with a `where` clause filtering by `deletedAt`.
* By default (`false`), the query will only include normal documents and exclude those with a `deletedAt` field.
*
* This argument has no effect unless `trash` is enabled on the collection.
* @default false
*/
trash?: boolean;
/**
* If you set `overrideAccess` to `false`, you can pass a user to use against the access control checks.
*/
user?: Document;
/**
* A filter [query](https://payloadcms.com/docs/queries/overview)
*/
where?: Where;
};
export type Options<TSlug extends CollectionSlug, TSelect extends SelectType> = BaseFindOptions<TSlug, TSelect> & DraftFlagFromCollectionSlug<TSlug>;
export type FindOptions<TSlug extends CollectionSlug, TSelect extends SelectType> = Options<TSlug, TSelect>;
export declare function findLocal<TSlug extends CollectionSlug, TSelect extends SelectFromCollectionSlug<TSlug>, TDraft extends boolean = false>(payload: Payload, options: {
draft?: TDraft;
} & FindOptions<TSlug, TSelect>): Promise<PaginatedDocs<TDraft extends true ? PayloadTypes extends {
strictDraftTypes: true;
} ? DraftTransformCollectionWithSelect<TSlug, TSelect> : TransformCollectionWithSelect<TSlug, TSelect> : TransformCollectionWithSelect<TSlug, TSelect>>>;
export {};
//# sourceMappingURL=find.d.ts.map
@@ -0,0 +1,4 @@
import type { DefaultTranslationsObject, Language } from '../types.js';
export declare const caTranslations: DefaultTranslationsObject;
export declare const ca: Language;
//# sourceMappingURL=ca.d.ts.map
@@ -0,0 +1,33 @@
'use strict';
const main = {
arrowUp: '↑',
arrowDown: '↓',
arrowLeft: '←',
arrowRight: '→',
radioOn: '◉',
radioOff: '◯',
tick: '✔',
cross: '✖',
ellipsis: '…',
pointerSmall: '›',
line: '─',
pointer: '❯'
};
const win = {
arrowUp: main.arrowUp,
arrowDown: main.arrowDown,
arrowLeft: main.arrowLeft,
arrowRight: main.arrowRight,
radioOn: '(*)',
radioOff: '( )',
tick: '√',
cross: '×',
ellipsis: '...',
pointerSmall: '»',
line: '─',
pointer: '>'
};
const figures = process.platform === 'win32' ? win : main;
module.exports = figures;
@@ -0,0 +1,36 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.UnsecuredJWT = void 0;
const base64url = require("../runtime/base64url.js");
const buffer_utils_js_1 = require("../lib/buffer_utils.js");
const errors_js_1 = require("../util/errors.js");
const jwt_claims_set_js_1 = require("../lib/jwt_claims_set.js");
const produce_js_1 = require("./produce.js");
class UnsecuredJWT extends produce_js_1.ProduceJWT {
encode() {
const header = base64url.encode(JSON.stringify({ alg: 'none' }));
const payload = base64url.encode(JSON.stringify(this._payload));
return `${header}.${payload}.`;
}
static decode(jwt, options) {
if (typeof jwt !== 'string') {
throw new errors_js_1.JWTInvalid('Unsecured JWT must be a string');
}
const { 0: encodedHeader, 1: encodedPayload, 2: signature, length } = jwt.split('.');
if (length !== 3 || signature !== '') {
throw new errors_js_1.JWTInvalid('Invalid Unsecured JWT');
}
let header;
try {
header = JSON.parse(buffer_utils_js_1.decoder.decode(base64url.decode(encodedHeader)));
if (header.alg !== 'none')
throw new Error();
}
catch {
throw new errors_js_1.JWTInvalid('Invalid Unsecured JWT');
}
const payload = (0, jwt_claims_set_js_1.default)(header, base64url.decode(encodedPayload), options);
return { payload, header };
}
}
exports.UnsecuredJWT = UnsecuredJWT;
@@ -0,0 +1,24 @@
import { MongooseInstrumentationConfig } from './types';
import { InstrumentationBase, InstrumentationModuleDefinition } from '@opentelemetry/instrumentation';
export declare const _STORED_PARENT_SPAN: unique symbol;
export declare const _ALREADY_INSTRUMENTED: unique symbol;
export declare class MongooseInstrumentation extends InstrumentationBase<MongooseInstrumentationConfig> {
private _netSemconvStability;
private _dbSemconvStability;
constructor(config?: MongooseInstrumentationConfig);
private _setSemconvStabilityFromEnv;
protected init(): InstrumentationModuleDefinition;
private patch;
private unpatch;
private patchAggregateExec;
private patchQueryExec;
private patchOnModelMethods;
private _patchDocumentUpdateMethods;
private patchModelStatic;
private patchModelAggregate;
private patchAndCaptureSpanContext;
private _startSpan;
private _handleResponse;
private _callOriginalFunction;
}
//# sourceMappingURL=mongoose.d.ts.map
@@ -0,0 +1 @@
exports._default = require("./emotion-cache.browser.development.cjs.js").default;
@@ -0,0 +1,20 @@
import { useEffect } from 'react';
import { useClickOutsideContext } from '../providers/ClickOutside/index.js';
export function useClickOutside(ref, handler, enabled = true) {
const {
register,
unregister
} = useClickOutsideContext();
useEffect(() => {
if (!enabled || !ref.current) {
return;
}
const listener = {
handler,
ref
};
register(listener);
return () => unregister(listener);
}, [ref, handler, enabled, register, unregister]);
}
//# sourceMappingURL=useClickOutside.js.map
@@ -0,0 +1,28 @@
import { createClient } from "@libsql/client/sqlite3";
import { isConfig } from "../../utils.js";
import { construct } from "../driver-core.js";
function drizzle(...params) {
if (typeof params[0] === "string") {
const instance = createClient({
url: params[0]
});
return construct(instance, params[1]);
}
if (isConfig(params[0])) {
const { connection, client, ...drizzleConfig } = params[0];
if (client) return construct(client, drizzleConfig);
const instance = typeof connection === "string" ? createClient({ url: connection }) : createClient(connection);
return construct(instance, drizzleConfig);
}
return construct(params[0], params[1]);
}
((drizzle2) => {
function mock(config) {
return construct({}, config);
}
drizzle2.mock = mock;
})(drizzle || (drizzle = {}));
export {
drizzle
};
//# sourceMappingURL=index.js.map
@@ -0,0 +1,8 @@
"use strict";
exports.previousThursdayWithOptions = void 0;
var _index = require("../previousThursday.cjs");
var _index2 = require("./_lib/convertToFP.cjs"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
const previousThursdayWithOptions = (exports.previousThursdayWithOptions = (0,
_index2.convertToFP)(_index.previousThursday, 2));
@@ -0,0 +1,16 @@
'use client';
import { fieldAffectsData } from 'payload/shared';
export const createNestedClientFieldPath = (parentPath, field) => {
if (parentPath) {
if (fieldAffectsData(field) && field.name) {
return `${parentPath}.${field.name}`;
}
return parentPath;
}
if (fieldAffectsData(field)) {
return field.name;
}
return '';
};
//# sourceMappingURL=createNestedClientFieldPath.js.map
@@ -0,0 +1,15 @@
"use strict";
function _defaults(obj, defaults) {
var keys = Object.getOwnPropertyNames(defaults);
for (var i = 0; i < keys.length; i++) {
var key = keys[i];
var value = Object.getOwnPropertyDescriptor(defaults, key);
if (value && value.configurable && obj[key] === undefined) Object.defineProperty(obj, key, value);
}
return obj;
}
exports._ = _defaults;
@@ -0,0 +1 @@
module.exports={C:{"5":0.04974,"47":0.00383,"52":0.00383,"72":0.00383,"78":0.00383,"84":0.00765,"112":0.00383,"115":0.18747,"120":0.00383,"127":0.00383,"128":0.00383,"134":0.00383,"138":0.00383,"140":0.00765,"141":0.00383,"142":0.00383,"143":0.02296,"144":0.01148,"145":0.15687,"146":0.2066,"147":0.00383,_:"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 43 44 45 46 48 49 50 51 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 73 74 75 76 77 79 80 81 82 83 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 113 114 116 117 118 119 121 122 123 124 125 126 129 130 131 132 133 135 136 137 139 148 149 3.5 3.6"},D:{"34":0.00383,"38":0.00383,"43":0.00383,"51":0.00383,"55":0.00383,"56":0.00765,"58":0.00383,"60":0.00383,"62":0.00383,"63":0.00383,"64":0.00383,"65":0.00383,"66":0.0153,"68":0.02296,"69":0.04974,"70":0.04591,"71":0.0153,"72":0.01148,"73":0.0153,"74":0.00765,"75":0.00765,"76":0.00383,"77":0.00383,"78":0.00765,"79":0.04209,"80":0.00765,"81":0.00765,"83":0.02678,"85":0.00383,"86":0.00765,"87":0.05739,"88":0.00765,"89":0.00383,"90":0.00383,"91":0.00383,"92":0.00383,"94":0.01148,"96":0.00383,"97":0.00765,"98":0.06504,"99":0.00383,"100":0.00383,"101":0.01148,"102":0.01148,"103":0.24486,"104":0.24486,"105":0.24486,"106":0.24104,"107":0.24486,"108":0.26782,"109":0.88381,"110":0.23339,"111":0.29078,"112":7.15462,"113":0.01148,"114":0.0153,"115":0.01148,"116":0.48973,"117":0.24486,"118":0.00765,"119":0.0153,"120":0.29843,"121":0.00383,"122":0.07652,"123":0.01913,"124":0.24486,"125":0.04591,"126":3.52757,"127":0.02296,"128":0.00765,"129":0.01148,"130":0.02678,"131":0.5739,"132":0.06122,"133":0.49355,"134":0.03061,"135":0.03826,"136":0.04974,"137":0.09565,"138":0.14921,"139":0.07269,"140":0.14156,"141":0.15687,"142":1.63753,"143":2.07752,"144":0.00383,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 35 36 37 39 40 41 42 44 45 46 47 48 49 50 52 53 54 57 59 61 67 84 93 95 145 146"},F:{"56":0.00383,"79":0.00383,"85":0.00383,"90":0.00765,"91":0.01913,"92":0.02296,"93":0.09948,"95":0.02296,"122":0.00383,"123":0.00383,"124":0.12626,"125":0.06887,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 80 81 82 83 84 86 87 88 89 94 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"18":0.00383,"90":0.00383,"92":0.02296,"100":0.00383,"109":0.0153,"114":0.00383,"122":0.00765,"130":0.00383,"136":0.00383,"137":0.00383,"138":0.00383,"139":0.00765,"140":0.0153,"141":0.01913,"142":0.17982,"143":0.47825,_:"12 13 14 15 16 17 79 80 81 83 84 85 86 87 88 89 91 93 94 95 96 97 98 99 101 102 103 104 105 106 107 108 110 111 112 113 115 116 117 118 119 120 121 123 124 125 126 127 128 129 131 132 133 134 135"},E:{_:"0 4 5 6 7 8 9 10 11 12 13 14 15 3.1 3.2 6.1 7.1 9.1 10.1 11.1 12.1 15.2-15.3 15.4 15.5 16.0 16.1 16.2 16.3 16.5 17.0 17.1 17.3 18.0 18.1 18.2 26.3","5.1":0.08035,"13.1":0.00383,"14.1":0.00383,"15.1":0.00383,"15.6":0.01148,"16.4":0.00383,"16.6":0.00765,"17.2":0.00383,"17.4":0.00383,"17.5":0.00383,"17.6":0.00383,"18.3":0.00383,"18.4":0.00383,"18.5-18.6":0.00765,"26.0":0.01913,"26.1":0.0153,"26.2":0.00383},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00046,"5.0-5.1":0,"6.0-6.1":0.00092,"7.0-7.1":0.00069,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.00183,"10.0-10.2":0.00023,"10.3":0.00321,"11.0-11.2":0.0394,"11.3-11.4":0.00115,"12.0-12.1":0.00092,"12.2-12.5":0.01031,"13.0-13.1":0.00023,"13.2":0.0016,"13.3":0.00046,"13.4-13.7":0.0016,"14.0-14.4":0.00321,"14.5-14.8":0.00344,"15.0-15.1":0.00366,"15.2-15.3":0.00275,"15.4":0.00298,"15.5":0.00321,"15.6-15.8":0.04971,"16.0":0.00573,"16.1":0.01099,"16.2":0.00573,"16.3":0.01031,"16.4":0.00252,"16.5":0.00435,"16.6-16.7":0.06459,"17.0":0.00366,"17.1":0.00596,"17.2":0.00435,"17.3":0.00664,"17.4":0.01122,"17.5":0.02199,"17.6-17.7":0.05085,"18.0":0.01145,"18.1":0.02382,"18.2":0.0126,"18.3":0.041,"18.4":0.02107,"18.5-18.7":1.51314,"26.0":0.02955,"26.1":0.24578,"26.2":0.04673,"26.3":0.00206},P:{"4":0.58151,"20":0.03061,"21":0.04081,"22":0.05101,"23":0.04081,"24":0.04081,"25":0.21424,"26":0.18364,"27":0.28565,"28":0.5407,"29":0.92838,"5.0-5.4":0.03061,"6.2-6.4":0.12242,"7.2-7.4":0.23465,"8.2":0.0102,"9.2":0.05101,"10.1":0.04081,"11.1-11.2":0.03061,"12.0":0.0102,"13.0":0.10202,"14.0":0.06121,"15.0":0.0204,"16.0":0.04081,"17.0":0.09182,"18.0":0.0102,"19.0":0.0204},I:{"0":0.08013,"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.11478,_:"6 7 8 9 10 5.5"},K:{"0":0.96106,_:"10 11 12 11.1 11.5 12.1"},N:{_:"10 11"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},Q:{_:"14.9"},O:{"0":0.30253},H:{"0":0.07},L:{"0":68.53547},R:{_:"0"},M:{"0":0.05557}};
@@ -0,0 +1 @@
{"version":3,"file":"replay.d.ts","sourceRoot":"","sources":["../../../src/types-hoist/replay.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC;;;GAGG;AACH,MAAM,WAAW,WAAY,SAAQ,KAAK;IACxC,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,mBAAmB,CAAC;CAClC;AAED;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,UAAU,CAAC;AAEtD;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,QAAQ,CAAC"}
@@ -0,0 +1,129 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _exportNames = {
numberLiteralFromRaw: true,
withLoc: true,
withRaw: true,
funcParam: true,
indexLiteral: true,
memIndexLiteral: true,
instruction: true,
objectInstruction: true,
traverse: true,
signatures: true,
cloneNode: true,
moduleContextFromModuleAST: true
};
Object.defineProperty(exports, "numberLiteralFromRaw", {
enumerable: true,
get: function get() {
return _nodeHelpers.numberLiteralFromRaw;
}
});
Object.defineProperty(exports, "withLoc", {
enumerable: true,
get: function get() {
return _nodeHelpers.withLoc;
}
});
Object.defineProperty(exports, "withRaw", {
enumerable: true,
get: function get() {
return _nodeHelpers.withRaw;
}
});
Object.defineProperty(exports, "funcParam", {
enumerable: true,
get: function get() {
return _nodeHelpers.funcParam;
}
});
Object.defineProperty(exports, "indexLiteral", {
enumerable: true,
get: function get() {
return _nodeHelpers.indexLiteral;
}
});
Object.defineProperty(exports, "memIndexLiteral", {
enumerable: true,
get: function get() {
return _nodeHelpers.memIndexLiteral;
}
});
Object.defineProperty(exports, "instruction", {
enumerable: true,
get: function get() {
return _nodeHelpers.instruction;
}
});
Object.defineProperty(exports, "objectInstruction", {
enumerable: true,
get: function get() {
return _nodeHelpers.objectInstruction;
}
});
Object.defineProperty(exports, "traverse", {
enumerable: true,
get: function get() {
return _traverse.traverse;
}
});
Object.defineProperty(exports, "signatures", {
enumerable: true,
get: function get() {
return _signatures.signatures;
}
});
Object.defineProperty(exports, "cloneNode", {
enumerable: true,
get: function get() {
return _clone.cloneNode;
}
});
Object.defineProperty(exports, "moduleContextFromModuleAST", {
enumerable: true,
get: function get() {
return _astModuleToModuleContext.moduleContextFromModuleAST;
}
});
var _nodes = require("./nodes");
Object.keys(_nodes).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _nodes[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _nodes[key];
}
});
});
var _nodeHelpers = require("./node-helpers.js");
var _traverse = require("./traverse");
var _signatures = require("./signatures");
var _utils = require("./utils");
Object.keys(_utils).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
if (key in exports && exports[key] === _utils[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
return _utils[key];
}
});
});
var _clone = require("./clone");
var _astModuleToModuleContext = require("./transform/ast-module-to-module-context");
@@ -0,0 +1,34 @@
import type { FileInfo, JSONSchema } from "../types/index.js";
import type { ParserOptions } from "../options.js";
import type { ResolverOptions } from "../types/index.js";
import type $Refs from "../refs.js";
import type { Plugin } from "../types/index.js";
/**
* Returns the given plugins as an array, rather than an object map.
* All other methods in this module expect an array of plugins rather than an object map.
*
* @returns
*/
export declare function all<S extends object = JSONSchema, O extends ParserOptions<S> = ParserOptions<S>>(plugins: O["resolve"]): Plugin[];
/**
* Filters the given plugins, returning only the ones return `true` for the given method.
*/
export declare function filter(plugins: Plugin[], method: any, file: any): Plugin[];
/**
* Sorts the given plugins, in place, by their `order` property.
*/
export declare function sort(plugins: Plugin[]): Plugin[];
export interface PluginResult<S extends object = JSONSchema> {
plugin: Plugin;
result?: string | Buffer | S;
error?: any;
}
/**
* Runs the specified method of the given plugins, in order, until one of them returns a successful result.
* Each method can return a synchronous value, a Promise, or call an error-first callback.
* If the promise resolves successfully, or the callback is called without an error, then the result
* is immediately returned and no further plugins are called.
* If the promise rejects, or the callback is called with an error, then the next plugin is called.
* If ALL plugins fail, then the last error is thrown.
*/
export declare function run<S extends object = JSONSchema, O extends ParserOptions<S> = ParserOptions<S>>(plugins: Plugin[], method: keyof Plugin | keyof ResolverOptions<S>, file: FileInfo, $refs: $Refs<S, O>): Promise<PluginResult<S>>;
@@ -0,0 +1,11 @@
import type { ASTVisitor } from '../../language/visitor';
import type { SDLValidationContext } from '../ValidationContext';
/**
* Unique argument definition names
*
* A GraphQL Object or Interface type is only valid if all its fields have uniquely named arguments.
* A GraphQL Directive is only valid if all its arguments are uniquely named.
*/
export declare function UniqueArgumentDefinitionNamesRule(
context: SDLValidationContext,
): ASTVisitor;
@@ -0,0 +1,26 @@
/**
* Gets all existing migrations from the database, excluding the dev migration
*/ export async function getMigrations({ payload }) {
const migrationQuery = await payload.find({
collection: 'payload-migrations',
limit: 0,
sort: [
'-batch',
'-name'
],
where: {
batch: {
not_equals: -1
}
}
});
const existingMigrations = migrationQuery.docs;
// Get the highest batch number from existing migrations
const latestBatch = Number(existingMigrations?.[0]?.batch) || 0;
return {
existingMigrations,
latestBatch
};
}
//# sourceMappingURL=getMigrations.js.map
@@ -0,0 +1,8 @@
// This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
import { startOfMinute as fn } from "../startOfMinute.mjs";
import { convertToFP } from "./_lib/convertToFP.mjs";
export const startOfMinute = convertToFP(fn, 1);
// Fallback for modularized imports:
export default startOfMinute;
@@ -0,0 +1,233 @@
// @ts-ignore TS6133
import { expect, test } from "vitest";
import * as z from "zod/v3";
import { util } from "../helpers/util.js";
const stringToNumber = z.string().transform((arg) => Number.parseFloat(arg));
// const numberToString = z
// .transformer(z.number())
// .transform((n) => String(n));
const asyncNumberToString = z.number().transform(async (n) => String(n));
test("transform ctx.addIssue with parse", () => {
const strs = ["foo", "bar"];
expect(() => {
z.string()
.transform((data, ctx) => {
const i = strs.indexOf(data);
if (i === -1) {
ctx.addIssue({
code: "custom",
message: `${data} is not one of our allowed strings`,
});
}
return data.length;
})
.parse("asdf");
}).toThrow(
JSON.stringify(
[
{
code: "custom",
message: "asdf is not one of our allowed strings",
path: [],
},
],
null,
2
)
);
});
test("transform ctx.addIssue with parseAsync", async () => {
const strs = ["foo", "bar"];
const result = await z
.string()
.transform(async (data, ctx) => {
const i = strs.indexOf(data);
if (i === -1) {
ctx.addIssue({
code: "custom",
message: `${data} is not one of our allowed strings`,
});
}
return data.length;
})
.safeParseAsync("asdf");
expect(JSON.parse(JSON.stringify(result))).toEqual({
success: false,
error: {
issues: [
{
code: "custom",
message: "asdf is not one of our allowed strings",
path: [],
},
],
name: "ZodError",
},
});
});
test("z.NEVER in transform", () => {
const foo = z
.number()
.optional()
.transform((val, ctx) => {
if (!val) {
ctx.addIssue({ code: z.ZodIssueCode.custom, message: "bad" });
return z.NEVER;
}
return val;
});
type foo = z.infer<typeof foo>;
util.assertEqual<foo, number>(true);
const arg = foo.safeParse(undefined);
if (!arg.success) {
expect(arg.error.issues[0].message).toEqual("bad");
}
});
test("basic transformations", () => {
const r1 = z
.string()
.transform((data) => data.length)
.parse("asdf");
expect(r1).toEqual(4);
});
test("coercion", () => {
const numToString = z.number().transform((n) => String(n));
const data = z
.object({
id: numToString,
})
.parse({ id: 5 });
expect(data).toEqual({ id: "5" });
});
test("async coercion", async () => {
const numToString = z.number().transform(async (n) => String(n));
const data = await z
.object({
id: numToString,
})
.parseAsync({ id: 5 });
expect(data).toEqual({ id: "5" });
});
test("sync coercion async error", async () => {
expect(() =>
z
.object({
id: asyncNumberToString,
})
.parse({ id: 5 })
).toThrow();
// expect(data).toEqual({ id: '5' });
});
test("default", () => {
const data = z.string().default("asdf").parse(undefined); // => "asdf"
expect(data).toEqual("asdf");
});
test("dynamic default", () => {
const data = z
.string()
.default(() => "string")
.parse(undefined); // => "asdf"
expect(data).toEqual("string");
});
test("default when property is null or undefined", () => {
const data = z
.object({
foo: z.boolean().nullable().default(true),
bar: z.boolean().default(true),
})
.parse({ foo: null });
expect(data).toEqual({ foo: null, bar: true });
});
test("default with falsy values", () => {
const schema = z.object({
emptyStr: z.string().default("def"),
zero: z.number().default(5),
falseBoolean: z.boolean().default(true),
});
const input = { emptyStr: "", zero: 0, falseBoolean: true };
const output = schema.parse(input);
// defaults are not supposed to be used
expect(output).toEqual(input);
});
test("object typing", () => {
const t1 = z.object({
stringToNumber,
});
type t1 = z.input<typeof t1>;
type t2 = z.output<typeof t1>;
util.assertEqual<t1, { stringToNumber: string }>(true);
util.assertEqual<t2, { stringToNumber: number }>(true);
});
test("transform method overloads", () => {
const t1 = z.string().transform((val) => val.toUpperCase());
expect(t1.parse("asdf")).toEqual("ASDF");
const t2 = z.string().transform((val) => val.length);
expect(t2.parse("asdf")).toEqual(4);
});
test("multiple transformers", () => {
const doubler = stringToNumber.transform((val) => {
return val * 2;
});
expect(doubler.parse("5")).toEqual(10);
});
test("short circuit on dirty", () => {
const schema = z
.string()
.refine(() => false)
.transform((val) => val.toUpperCase());
const result = schema.safeParse("asdf");
expect(result.success).toEqual(false);
if (!result.success) {
expect(result.error.issues[0].code).toEqual(z.ZodIssueCode.custom);
}
const result2 = schema.safeParse(1234);
expect(result2.success).toEqual(false);
if (!result2.success) {
expect(result2.error.issues[0].code).toEqual(z.ZodIssueCode.invalid_type);
}
});
test("async short circuit on dirty", async () => {
const schema = z
.string()
.refine(() => false)
.transform((val) => val.toUpperCase());
const result = await schema.spa("asdf");
expect(result.success).toEqual(false);
if (!result.success) {
expect(result.error.issues[0].code).toEqual(z.ZodIssueCode.custom);
}
const result2 = await schema.spa(1234);
expect(result2.success).toEqual(false);
if (!result2.success) {
expect(result2.error.issues[0].code).toEqual(z.ZodIssueCode.invalid_type);
}
});
@@ -0,0 +1,27 @@
export { APIError, APIErrorName } from './APIError.js';
export { AuthenticationError } from './AuthenticationError.js';
export { DuplicateCollection } from './DuplicateCollection.js';
export { DuplicateFieldName } from './DuplicateFieldName.js';
export { DuplicateGlobal } from './DuplicateGlobal.js';
export { ErrorDeletingFile } from './ErrorDeletingFile.js';
export { FileRetrievalError } from './FileRetrievalError.js';
export { FileUploadError } from './FileUploadError.js';
export { Forbidden } from './Forbidden.js';
export { InvalidConfiguration } from './InvalidConfiguration.js';
export { InvalidFieldName } from './InvalidFieldName.js';
export { InvalidFieldRelationship } from './InvalidFieldRelationship.js';
export { Locked } from './Locked.js';
export { LockedAuth } from './LockedAuth.js';
export { MissingCollectionLabel } from './MissingCollectionLabel.js';
export { MissingEditorProp } from './MissingEditorProp.js';
export { MissingFieldInputOptions } from './MissingFieldInputOptions.js';
export { MissingFieldType } from './MissingFieldType.js';
export { MissingFile } from './MissingFile.js';
export { NotFound } from './NotFound.js';
export { QueryError } from './QueryError.js';
export { ReservedFieldName } from './ReservedFieldName.js';
export { UnauthorizedError } from './UnauthorizedError.js';
export { UnverifiedEmail } from './UnverifiedEmail.js';
export { ValidationError, ValidationErrorName } from './ValidationError.js';
export type { ValidationFieldError } from './ValidationError.js';
//# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,48 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getDeepKeys = exports.toJSON = void 0;
const nonJsonTypes = ["function", "symbol", "undefined"];
const protectedProps = ["constructor", "prototype", "__proto__"];
const objectPrototype = Object.getPrototypeOf({});
/**
* Custom JSON serializer for Error objects.
* Returns all built-in error properties, as well as extended properties.
*/
function toJSON() {
// HACK: We have to cast the objects to `any` so we can use symbol indexers.
// see https://github.com/Microsoft/TypeScript/issues/1863
let pojo = {};
let error = this;
for (let key of getDeepKeys(error)) {
if (typeof key === "string") {
let value = error[key];
let type = typeof value;
if (!nonJsonTypes.includes(type)) {
pojo[key] = value;
}
}
}
return pojo;
}
exports.toJSON = toJSON;
/**
* Returns own, inherited, enumerable, non-enumerable, string, and symbol keys of `obj`.
* Does NOT return members of the base Object prototype, or the specified omitted keys.
*/
function getDeepKeys(obj, omit = []) {
let keys = [];
// Crawl the prototype chain, finding all the string and symbol keys
while (obj && obj !== objectPrototype) {
keys = keys.concat(Object.getOwnPropertyNames(obj), Object.getOwnPropertySymbols(obj));
obj = Object.getPrototypeOf(obj);
}
// De-duplicate the list of keys
let uniqueKeys = new Set(keys);
// Remove any omitted keys
for (let key of omit.concat(protectedProps)) {
uniqueKeys.delete(key);
}
return uniqueKeys;
}
exports.getDeepKeys = getDeepKeys;
//# sourceMappingURL=to-json.js.map
@@ -0,0 +1,29 @@
import path from 'path';
class SourceFileFilter {
static EXTENSIONS = ['ts', 'tsx', 'js', 'jsx'];
// Will not be entered, except if explicitly asked for
// TODO: At some point we should infer these from .gitignore
static IGNORED_DIRECTORIES = ['node_modules', '.next', '.git'];
static isSourceFile(filePath) {
const ext = path.extname(filePath);
return SourceFileFilter.EXTENSIONS.map(cur => '.' + cur).includes(ext);
}
static shouldEnterDirectory(dirPath, srcPaths) {
const dirName = path.basename(dirPath);
if (SourceFileFilter.IGNORED_DIRECTORIES.includes(dirName)) {
return SourceFileFilter.isIgnoredDirectoryExplicitlyIncluded(dirPath, srcPaths);
}
return true;
}
static isIgnoredDirectoryExplicitlyIncluded(ignoredDirPath, srcPaths) {
return srcPaths.some(srcPath => SourceFileFilter.isWithinPath(srcPath, ignoredDirPath));
}
static isWithinPath(targetPath, basePath) {
const relativePath = path.relative(basePath, targetPath);
return relativePath === '' || !relativePath.startsWith('..');
}
}
export { SourceFileFilter as default };
@@ -0,0 +1 @@
{"version":3,"file":"download.js","sources":["../../../src/icons/download.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Download\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMjEgMTV2NGEyIDIgMCAwIDEtMiAySDVhMiAyIDAgMCAxLTItMnYtNCIgLz4KICA8cG9seWxpbmUgcG9pbnRzPSI3IDEwIDEyIDE1IDE3IDEwIiAvPgogIDxsaW5lIHgxPSIxMiIgeDI9IjEyIiB5MT0iMTUiIHkyPSIzIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/download\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 Download = createLucideIcon('Download', [\n ['path', { d: 'M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4', key: 'ih7n3h' }],\n ['polyline', { points: '7 10 12 15 17 10', key: '2ggqvy' }],\n ['line', { x1: '12', x2: '12', y1: '15', y2: '3', key: '1vk2je' }],\n]);\n\nexport default Download;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,iBAAiB,UAAY,CAAA,CAAA,CAAA;AAAA,CAAA,CAC5C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA6C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAC1E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,CAAA,CAAA,CAAA,CAAE,QAAQ,CAAoB,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,CAC1D,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACnE,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,34 @@
/**
* Transport layer instrumentation for MCP server
*
* Handles message interception and response correlation.
* @see https://modelcontextprotocol.io/specification/2025-06-18/basic/transports
*/
import { MCPTransport, ResolvedMcpOptions } from './types';
/**
* Wraps transport.onmessage to create spans for incoming messages.
* For "initialize" requests, extracts and stores client info and protocol version
* in the session data for the transport.
* @param transport - MCP transport instance to wrap
* @param options - Resolved MCP options
*/
export declare function wrapTransportOnMessage(transport: MCPTransport, options: ResolvedMcpOptions): void;
/**
* Wraps transport.send to handle outgoing messages and response correlation.
* For "initialize" responses, extracts and stores protocol version and server info
* in the session data for the transport.
* @param transport - MCP transport instance to wrap
* @param options - Resolved MCP options
*/
export declare function wrapTransportSend(transport: MCPTransport, options: ResolvedMcpOptions): void;
/**
* Wraps transport.onclose to clean up pending spans for this transport only
* @param transport - MCP transport instance to wrap
*/
export declare function wrapTransportOnClose(transport: MCPTransport): void;
/**
* Wraps transport error handlers to capture connection errors
* @param transport - MCP transport instance to wrap
*/
export declare function wrapTransportError(transport: MCPTransport): void;
//# sourceMappingURL=transport.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"align-end-horizontal.js","sources":["../../../src/icons/align-end-horizontal.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name AlignEndHorizontal\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iNiIgaGVpZ2h0PSIxNiIgeD0iNCIgeT0iMiIgcng9IjIiIC8+CiAgPHJlY3Qgd2lkdGg9IjYiIGhlaWdodD0iOSIgeD0iMTQiIHk9IjkiIHJ4PSIyIiAvPgogIDxwYXRoIGQ9Ik0yMiAyMkgyIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/align-end-horizontal\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 AlignEndHorizontal = createLucideIcon('AlignEndHorizontal', [\n ['rect', { width: '6', height: '16', x: '4', y: '2', rx: '2', key: 'z5wdxg' }],\n ['rect', { width: '6', height: '9', x: '14', y: '9', rx: '2', key: 'um7a8w' }],\n ['path', { d: 'M22 22H2', key: '19qnx5' }],\n]);\n\nexport default AlignEndHorizontal;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAqB,iBAAiB,oBAAsB,CAAA,CAAA,CAAA;AAAA,CAAA,CAChE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,KAAK,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC7E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,KAAK,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,GAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC7E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAW,MAAM,SAAS,CAAA;AA6D1D,OAAO,KAAK,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAMvD,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,GAAG,kBAAkB,CAAC,eAAe,CAAC,CA6K/E;AAED,YAAY,EACV,IAAI,IAAI,mBAAmB,EAC3B,uBAAuB,EACvB,eAAe,GAChB,MAAM,YAAY,CAAA;AACnB,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAClF,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAC7D,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAA"}
@@ -0,0 +1,2 @@
const e=require(`../../utils/throw-if-empty.cjs`),t=t=>()=>(e.throwIfEmpty(t,`Keys cannot be empty`),{path:`/policies`,body:JSON.stringify(t),method:`DELETE`}),n=t=>()=>(e.throwIfEmpty(String(t),`Key cannot be empty`),{path:`/policies/${t}`,method:`DELETE`});exports.deletePolicies=t,exports.deletePolicy=n;
//# sourceMappingURL=policies.cjs.map
@@ -0,0 +1,21 @@
import { stat as fsStat } from 'node:fs/promises';
import { fromStream as coreFromStream } from './core.js';
export { fromFile } from './FileTokenizer.js';
export * from './core.js';
/**
* Construct ReadStreamTokenizer from given Stream.
* Will set fileSize, if provided given Stream has set the .path property.
* @param stream - Node.js Stream.Readable
* @param options - Pass additional file information to the tokenizer
* @returns Tokenizer
*/
export async function fromStream(stream, options) {
const augmentedOptions = options ?? {};
augmentedOptions.fileInfo = augmentedOptions.fileInfo ?? {};
if (stream.path) {
const stat = await fsStat(stream.path);
augmentedOptions.fileInfo.path = stream.path;
augmentedOptions.fileInfo.size = stat.size;
}
return coreFromStream(stream, augmentedOptions);
}
@@ -0,0 +1,26 @@
/**
* @name addISOWeekYears
* @category ISO Week-Numbering Year Helpers
* @summary Add the specified number of ISO week-numbering years to the given date.
*
* @description
* Add the specified number of ISO week-numbering years to the given date.
*
* ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param date - The date to be changed
* @param amount - The amount of ISO week-numbering years to be added.
*
* @returns The new date with the ISO week-numbering years added
*
* @example
* // Add 5 ISO week-numbering years to 2 July 2010:
* const result = addISOWeekYears(new Date(2010, 6, 2), 5)
* //=> Fri Jn 26 2015 00:00:00
*/
export declare function addISOWeekYears<DateType extends Date>(
date: DateType | number | string,
amount: number,
): DateType;
@@ -0,0 +1,12 @@
import { ElementContainer } from '../element-container';
import { Context } from '../../core/context';
export declare const CHECKBOX = "checkbox";
export declare const RADIO = "radio";
export declare const PASSWORD = "password";
export declare const INPUT_COLOR = 707406591;
export declare class InputElementContainer extends ElementContainer {
readonly type: string;
readonly checked: boolean;
readonly value: string;
constructor(context: Context, input: HTMLInputElement);
}
@@ -0,0 +1,84 @@
"use strict";
exports.getWeekYear = getWeekYear;
var _index = require("./constructFrom.js");
var _index2 = require("./startOfWeek.js");
var _index3 = require("./toDate.js");
var _index4 = require("./_lib/defaultOptions.js");
/**
* The {@link getWeekYear} function options.
*/
/**
* @name getWeekYear
* @category Week-Numbering Year Helpers
* @summary Get the local week-numbering year of the given date.
*
* @description
* Get the local week-numbering year of the given date.
* The exact calculation depends on the values of
* `options.weekStartsOn` (which is the index of the first day of the week)
* and `options.firstWeekContainsDate` (which is the day of January, which is always in
* the first week of the week-numbering year)
*
* Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system
*
* @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 given date
* @param options - An object with options.
*
* @returns The local week-numbering year
*
* @example
* // Which week numbering year is 26 December 2004 with the default settings?
* const result = getWeekYear(new Date(2004, 11, 26))
* //=> 2005
*
* @example
* // Which week numbering year is 26 December 2004 if week starts on Saturday?
* const result = getWeekYear(new Date(2004, 11, 26), { weekStartsOn: 6 })
* //=> 2004
*
* @example
* // Which week numbering year is 26 December 2004 if the first week contains 4 January?
* const result = getWeekYear(new Date(2004, 11, 26), { firstWeekContainsDate: 4 })
* //=> 2004
*/
function getWeekYear(date, options) {
const _date = (0, _index3.toDate)(date);
const year = _date.getFullYear();
const defaultOptions = (0, _index4.getDefaultOptions)();
const firstWeekContainsDate =
options?.firstWeekContainsDate ??
options?.locale?.options?.firstWeekContainsDate ??
defaultOptions.firstWeekContainsDate ??
defaultOptions.locale?.options?.firstWeekContainsDate ??
1;
const firstWeekOfNextYear = (0, _index.constructFrom)(date, 0);
firstWeekOfNextYear.setFullYear(year + 1, 0, firstWeekContainsDate);
firstWeekOfNextYear.setHours(0, 0, 0, 0);
const startOfNextYear = (0, _index2.startOfWeek)(
firstWeekOfNextYear,
options,
);
const firstWeekOfThisYear = (0, _index.constructFrom)(date, 0);
firstWeekOfThisYear.setFullYear(year, 0, firstWeekContainsDate);
firstWeekOfThisYear.setHours(0, 0, 0, 0);
const startOfThisYear = (0, _index2.startOfWeek)(
firstWeekOfThisYear,
options,
);
if (_date.getTime() >= startOfNextYear.getTime()) {
return year + 1;
} else if (_date.getTime() >= startOfThisYear.getTime()) {
return year;
} else {
return year - 1;
}
}
@@ -0,0 +1,40 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
// By default, we want to infer the IP address, unless this is explicitly set to `null`
// We do this after all other processing is done
// If `ip_address` is explicitly set to `null` or a value, we leave it as is
/**
* @internal
* @deprecated -- set ip inferral via via SDK metadata options on client instead.
*/
function addAutoIpAddressToUser(objWithMaybeUser) {
if (objWithMaybeUser.user?.ip_address === undefined) {
objWithMaybeUser.user = {
...objWithMaybeUser.user,
ip_address: '{{auto}}',
};
}
}
/**
* @internal
*/
function addAutoIpAddressToSession(session) {
if ('aggregates' in session) {
if (session.attrs?.['ip_address'] === undefined) {
session.attrs = {
...session.attrs,
ip_address: '{{auto}}',
};
}
} else {
if (session.ipAddress === undefined) {
session.ipAddress = '{{auto}}';
}
}
}
exports.addAutoIpAddressToSession = addAutoIpAddressToSession;
exports.addAutoIpAddressToUser = addAutoIpAddressToUser;
//# sourceMappingURL=ipAddress.js.map
@@ -0,0 +1,10 @@
"use strict";
exports.isSameISOWeekYear = void 0;
var _index = require("../isSameISOWeekYear.cjs");
var _index2 = require("./_lib/convertToFP.cjs"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
const isSameISOWeekYear = (exports.isSameISOWeekYear = (0, _index2.convertToFP)(
_index.isSameISOWeekYear,
2,
));
@@ -0,0 +1,4 @@
export { default as valueInjectionLoader } from './valueInjectionLoader.js';
export { default as prefixLoader } from './prefixLoader.js';
export { default as wrappingLoader } from './wrappingLoader.js';
//# sourceMappingURL=index.js.map
@@ -0,0 +1,15 @@
/**
* @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 Moon = createLucideIcon("Moon", [
["path", { d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z", key: "a7tn18" }]
]);
export { Moon as default };
//# sourceMappingURL=moon.js.map
@@ -0,0 +1 @@
{"version":3,"file":"ExplorerSync.d.ts","sourceRoot":"","sources":["../src/ExplorerSync.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAI9C,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EAEpB,MAAM,SAAS,CAAC;AAEjB,cAAM,YAAa,SAAQ,YAAY,CAAC,mBAAmB,CAAC;gBACvC,OAAO,EAAE,mBAAmB;IAIxC,UAAU,CAAC,UAAU,GAAE,MAAsB,GAAG,iBAAiB;IAOxE,OAAO,CAAC,uBAAuB;IAuB/B,OAAO,CAAC,mBAAmB;IAa3B,OAAO,CAAC,mBAAmB;IAS3B,OAAO,CAAC,mBAAmB;IAgB3B,OAAO,CAAC,2BAA2B;IAU5B,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,iBAAiB;CAsBrD;AAED,OAAO,EAAE,YAAY,EAAE,CAAC"}
@@ -0,0 +1,144 @@
import { defineIntegration } from '../integration.js';
import { stripMetadataFromStackFrames, addMetadataToStackFrames } from '../metadata.js';
import { forEachEnvelopeItem } from '../utils/envelope.js';
import { getFramesFromEvent } from '../utils/stacktrace.js';
/**
* This integration allows you to filter out, or tag error events that do not come from user code marked with a bundle key via the Sentry bundler plugins.
*/
const thirdPartyErrorFilterIntegration = defineIntegration((options) => {
return {
name: 'ThirdPartyErrorsFilter',
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 => {
forEachEnvelopeItem(envelope, (item, type) => {
if (type === 'event') {
const event = Array.isArray(item) ? (item )[1] : undefined;
if (event) {
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;
addMetadataToStackFrames(stackParser, event);
});
},
processEvent(event) {
const frameKeys = getBundleKeysForAllFramesWithFilenames(event, options.ignoreSentryInternalFrames);
if (frameKeys) {
const arrayMethod =
options.behaviour === 'drop-error-if-contains-third-party-frames' ||
options.behaviour === 'apply-tag-if-contains-third-party-frames'
? 'some'
: 'every';
const behaviourApplies = frameKeys[arrayMethod](keys => !keys.some(key => options.filterKeys.includes(key)));
if (behaviourApplies) {
const shouldDrop =
options.behaviour === 'drop-error-if-contains-third-party-frames' ||
options.behaviour === 'drop-error-if-exclusively-contains-third-party-frames';
if (shouldDrop) {
return null;
} else {
event.tags = {
...event.tags,
third_party_code: true,
};
}
}
}
return event;
},
};
});
/**
* Checks if a stack frame is a Sentry internal frame by strictly matching:
* 1. The frame must be the last frame in the stack
* 2. The filename must indicate the internal helpers file
* 3. The context_line must contain the exact pattern "fn.apply(this, wrappedArguments)"
* 4. The comment pattern "Attempt to invoke user-land function" must be present in pre_context
*
*/
function isSentryInternalFrame(frame, frameIndex) {
// Only match the last frame (index 0 in reversed stack)
if (frameIndex !== 0 || !frame.context_line || !frame.filename) {
return false;
}
if (
!frame.filename.includes('sentry') ||
!frame.filename.includes('helpers') || // Filename would look something like this: 'node_modules/@sentry/browser/build/npm/esm/helpers.js'
!frame.context_line.includes(SENTRY_INTERNAL_FN_APPLY) // Must have context_line with the exact fn.apply pattern
) {
return false;
}
// Check pre_context array for comment pattern
if (frame.pre_context) {
const len = frame.pre_context.length;
for (let i = 0; i < len; i++) {
if (frame.pre_context[i]?.includes(SENTRY_INTERNAL_COMMENT)) {
return true;
}
}
}
return false;
}
function getBundleKeysForAllFramesWithFilenames(
event,
ignoreSentryInternalFrames,
) {
const frames = getFramesFromEvent(event);
if (!frames) {
return undefined;
}
return frames
.filter((frame, index) => {
// Exclude frames without a filename
if (!frame.filename) {
return false;
}
// Exclude frames without location info, since these are likely native code or built-ins.
// JS frames have lineno/colno, WASM frames have instruction_addr instead.
if (frame.lineno == null && frame.colno == null && frame.instruction_addr == null) {
return false;
}
// Optionally ignore Sentry internal frames
return !ignoreSentryInternalFrames || !isSentryInternalFrame(frame, index);
})
.map(frame => {
if (!frame.module_metadata) {
return [];
}
return Object.keys(frame.module_metadata)
.filter(key => key.startsWith(BUNDLER_PLUGIN_APP_KEY_PREFIX))
.map(key => key.slice(BUNDLER_PLUGIN_APP_KEY_PREFIX.length));
});
}
const BUNDLER_PLUGIN_APP_KEY_PREFIX = '_sentryBundlerPluginAppKey:';
const SENTRY_INTERNAL_COMMENT = 'Attempt to invoke user-land function';
const SENTRY_INTERNAL_FN_APPLY = 'fn.apply(this, wrappedArguments)';
export { thirdPartyErrorFilterIntegration };
//# sourceMappingURL=third-party-errors-filter.js.map
@@ -0,0 +1,122 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const bindReporter = require('./lib/bindReporter.js');
const getActivationStart = require('./lib/getActivationStart.js');
const getVisibilityWatcher = require('./lib/getVisibilityWatcher.js');
const globalListeners = require('./lib/globalListeners.js');
const initMetric = require('./lib/initMetric.js');
const initUnique = require('./lib/initUnique.js');
const LCPEntryManager = require('./lib/LCPEntryManager.js');
const observe = require('./lib/observe.js');
const runOnce = require('./lib/runOnce.js');
const whenActivated = require('./lib/whenActivated.js');
const whenIdleOrHidden = require('./lib/whenIdleOrHidden.js');
/*
* Copyright 2020 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.
*/
/** Thresholds for LCP. See https://web.dev/articles/lcp#what_is_a_good_lcp_score */
const LCPThresholds = [2500, 4000];
/**
* Calculates the [LCP](https://web.dev/articles/lcp) value for the current page and
* calls the `callback` function once the value is ready (along with the
* relevant `largest-contentful-paint` performance entry used to determine the
* value). The reported value is a `DOMHighResTimeStamp`.
*
* If the `reportAllChanges` configuration option is set to `true`, the
* `callback` function will be called any time a new `largest-contentful-paint`
* performance entry is dispatched, or once the final value of the metric has
* been determined.
*/
const onLCP = (onReport, opts = {}) => {
whenActivated.whenActivated(() => {
const visibilityWatcher = getVisibilityWatcher.getVisibilityWatcher();
const metric = initMetric.initMetric('LCP');
let report;
const lcpEntryManager = initUnique.initUnique(opts, LCPEntryManager.LCPEntryManager);
const handleEntries = (entries) => {
// If reportAllChanges is set then call this function for each entry,
// otherwise only consider the last one.
if (!opts.reportAllChanges) {
// eslint-disable-next-line no-param-reassign
entries = entries.slice(-1);
}
for (const entry of entries) {
lcpEntryManager._processEntry(entry);
// Only report if the page wasn't hidden prior to LCP.
if (entry.startTime < visibilityWatcher.firstHiddenTime) {
// The startTime attribute returns the value of the renderTime if it is
// not 0, and the value of the loadTime otherwise. The activationStart
// reference is used because LCP should be relative to page activation
// rather than navigation start if the page was prerendered. But in cases
// where `activationStart` occurs after the LCP, this time should be
// clamped at 0.
metric.value = Math.max(entry.startTime - getActivationStart.getActivationStart(), 0);
metric.entries = [entry];
report();
}
}
};
const po = observe.observe('largest-contentful-paint', handleEntries);
if (po) {
report = bindReporter.bindReporter(onReport, metric, LCPThresholds, opts.reportAllChanges);
// Ensure this logic only runs once, since it can be triggered from
// any of three different event listeners below.
const stopListening = runOnce.runOnce(() => {
handleEntries(po.takeRecords() );
po.disconnect();
report(true);
});
// Need a separate wrapper to ensure the `runOnce` function above is
// common for all three functions
const stopListeningWrapper = (event) => {
if (event.isTrusted) {
// Wrap the listener in an idle callback so it's run in a separate
// task to reduce potential INP impact.
// https://github.com/GoogleChrome/web-vitals/issues/383
whenIdleOrHidden.whenIdleOrHidden(stopListening);
globalListeners.removePageListener(event.type, stopListeningWrapper, {
capture: true,
});
}
};
// Stop listening after input or visibilitychange.
// Note: while scrolling is an input that stops LCP observation, it's
// unreliable since it can be programmatically generated.
// See: https://github.com/GoogleChrome/web-vitals/issues/75
for (const type of ['keydown', 'click', 'visibilitychange']) {
globalListeners.addPageListener(type, stopListeningWrapper, {
capture: true,
});
}
}
});
};
exports.LCPThresholds = LCPThresholds;
exports.onLCP = onLCP;
//# sourceMappingURL=getLCP.js.map
@@ -0,0 +1,41 @@
// Number.isNaN as it is not supported in IE11 so conditionally using ponyfill
// Using Number.isNaN where possible as it is ~10% faster
const safeIsNaN =
Number.isNaN ||
function ponyfill(value: unknown): boolean {
// // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN#polyfill
// NaN is the only value in JavaScript which is not equal to itself.
return typeof value === 'number' && value !== value;
};
function isEqual(first: unknown, second: unknown): boolean {
if (first === second) {
return true;
}
// Special case for NaN (NaN !== NaN)
if (safeIsNaN(first) && safeIsNaN(second)) {
return true;
}
return false;
}
export default function areInputsEqual(
newInputs: readonly unknown[],
lastInputs: readonly unknown[],
): boolean {
// no checks needed if the inputs length has changed
if (newInputs.length !== lastInputs.length) {
return false;
}
// Using for loop for speed. It generally performs better than array.every
// https://github.com/alexreardon/memoize-one/pull/59
for (let i = 0; i < newInputs.length; i++) {
if (!isEqual(newInputs[i], lastInputs[i])) {
return false;
}
}
return true;
}
@@ -0,0 +1 @@
{"version":3,"sources":["../../src/mysql-core/checks.ts"],"sourcesContent":["import { entityKind } from '~/entity.ts';\nimport type { SQL } from '~/sql/sql.ts';\nimport type { MySqlTable } from './table.ts';\n\nexport class CheckBuilder {\n\tstatic readonly [entityKind]: string = 'MySqlCheckBuilder';\n\n\tprotected brand!: 'MySqlConstraintBuilder';\n\n\tconstructor(public name: string, public value: SQL) {}\n\n\t/** @internal */\n\tbuild(table: MySqlTable): Check {\n\t\treturn new Check(table, this);\n\t}\n}\n\nexport class Check {\n\tstatic readonly [entityKind]: string = 'MySqlCheck';\n\n\treadonly name: string;\n\treadonly value: SQL;\n\n\tconstructor(public table: MySqlTable, builder: CheckBuilder) {\n\t\tthis.name = builder.name;\n\t\tthis.value = builder.value;\n\t}\n}\n\nexport function check(name: string, value: SQL): CheckBuilder {\n\treturn new CheckBuilder(name, value);\n}\n"],"mappings":"AAAA,SAAS,kBAAkB;AAIpB,MAAM,aAAa;AAAA,EAKzB,YAAmB,MAAqB,OAAY;AAAjC;AAAqB;AAAA,EAAa;AAAA,EAJrD,QAAiB,UAAU,IAAY;AAAA,EAE7B;AAAA;AAAA,EAKV,MAAM,OAA0B;AAC/B,WAAO,IAAI,MAAM,OAAO,IAAI;AAAA,EAC7B;AACD;AAEO,MAAM,MAAM;AAAA,EAMlB,YAAmB,OAAmB,SAAuB;AAA1C;AAClB,SAAK,OAAO,QAAQ;AACpB,SAAK,QAAQ,QAAQ;AAAA,EACtB;AAAA,EARA,QAAiB,UAAU,IAAY;AAAA,EAE9B;AAAA,EACA;AAMV;AAEO,SAAS,MAAM,MAAc,OAA0B;AAC7D,SAAO,IAAI,aAAa,MAAM,KAAK;AACpC;","names":[]}
@@ -0,0 +1,28 @@
import { InstrumentationBase, InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation';
import { MySQLInstrumentationConfig } from './types';
export declare class MySQLInstrumentation extends InstrumentationBase<MySQLInstrumentationConfig> {
private _netSemconvStability;
private _dbSemconvStability;
private _connectionsUsageOld;
constructor(config?: MySQLInstrumentationConfig);
private _setSemconvStabilityFromEnv;
protected _updateMetricInstruments(): void;
/**
* Convenience function for updating the `db.client.connections.usage` metric.
* The name "count" comes from the eventually replacement for this metric per
* https://opentelemetry.io/docs/specs/semconv/non-normative/db-migration/#database-client-connection-count
*/
private _connCountAdd;
protected init(): InstrumentationNodeModuleDefinition[];
private _patchCreateConnection;
private _patchCreatePool;
private _patchPoolEnd;
private _patchCreatePoolCluster;
private _patchAdd;
private _patchGetConnection;
private _getConnectionCallbackPatchFn;
private _patchQuery;
private _patchCallbackQuery;
private _setPoolCallbacks;
}
//# sourceMappingURL=instrumentation.d.ts.map
@@ -0,0 +1,23 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const CarFront = createLucideIcon("CarFront", [
[
"path",
{ d: "m21 8-2 2-1.5-3.7A2 2 0 0 0 15.646 5H8.4a2 2 0 0 0-1.903 1.257L5 10 3 8", key: "1imjwt" }
],
["path", { d: "M7 14h.01", key: "1qa3f1" }],
["path", { d: "M17 14h.01", key: "7oqj8z" }],
["rect", { width: "18", height: "8", x: "3", y: "10", rx: "2", key: "a7itu8" }],
["path", { d: "M5 18v2", key: "ppbyun" }],
["path", { d: "M19 18v2", key: "gy7782" }]
]);
export { CarFront as default };
//# sourceMappingURL=car-front.js.map
@@ -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 SkipForward = createLucideIcon("SkipForward", [
["polygon", { points: "5 4 15 12 5 20 5 4", key: "16p6eg" }],
["line", { x1: "19", x2: "19", y1: "5", y2: "19", key: "futhcm" }]
]);
export { SkipForward as default };
//# sourceMappingURL=skip-forward.js.map
@@ -0,0 +1 @@
export { _ as default } from "../esm/_class_static_private_field_update.js";
@@ -0,0 +1 @@
{"version":3,"sources":["../../src/uploads/getFileTypeFallback.ts"],"sourcesContent":["type ReturnType = {\n ext: string\n mime: string\n}\n\nconst extensionMap: {\n [ext: string]: string\n} = {\n css: 'text/css',\n csv: 'text/csv',\n htm: 'text/html',\n html: 'text/html',\n js: 'application/javascript',\n json: 'application/json',\n md: 'text/markdown',\n svg: 'image/svg+xml',\n xml: 'application/xml',\n yml: 'application/x-yaml',\n}\n\nexport const getFileTypeFallback = (path: string): ReturnType => {\n const ext = path.split('.').pop() || 'txt'\n\n return {\n ext,\n mime: extensionMap[ext] || 'text/plain',\n }\n}\n"],"names":["extensionMap","css","csv","htm","html","js","json","md","svg","xml","yml","getFileTypeFallback","path","ext","split","pop","mime"],"mappings":"AAKA,MAAMA,eAEF;IACFC,KAAK;IACLC,KAAK;IACLC,KAAK;IACLC,MAAM;IACNC,IAAI;IACJC,MAAM;IACNC,IAAI;IACJC,KAAK;IACLC,KAAK;IACLC,KAAK;AACP;AAEA,OAAO,MAAMC,sBAAsB,CAACC;IAClC,MAAMC,MAAMD,KAAKE,KAAK,CAAC,KAAKC,GAAG,MAAM;IAErC,OAAO;QACLF;QACAG,MAAMhB,YAAY,CAACa,IAAI,IAAI;IAC7B;AACF,EAAC"}
@@ -0,0 +1,22 @@
import { entityKind } from "../entity.cjs";
import type { SQL } from "../sql/sql.cjs";
import type { SQLiteTable } from "./table.cjs";
export declare class CheckBuilder {
name: string;
value: SQL;
static readonly [entityKind]: string;
protected brand: 'SQLiteConstraintBuilder';
constructor(name: string, value: SQL);
build(table: SQLiteTable): Check;
}
export declare class Check {
table: SQLiteTable;
static readonly [entityKind]: string;
_: {
brand: 'SQLiteCheck';
};
readonly name: string;
readonly value: SQL;
constructor(table: SQLiteTable, builder: CheckBuilder);
}
export declare function check(name: string, value: SQL): CheckBuilder;
@@ -0,0 +1 @@
{"version":3,"file":"index.bundle.feedback.d.ts","sourceRoot":"","sources":["../../../src/index.bundle.feedback.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,6BAA6B,EAC7B,6BAA6B,EAC7B,UAAU,EACV,qBAAqB,EACtB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAE3D,cAAc,qBAAqB,CAAC;AAGpC,OAAO,EAAE,6BAA6B,IAAI,yBAAyB,EAAE,UAAU,IAAI,MAAM,EAAE,CAAC;AAE5F,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEtE,OAAO,EACL,6BAA6B,IAAI,yBAAyB,EAC1D,wBAAwB,IAAI,wBAAwB,EACpD,wBAAwB,IAAI,mBAAmB,EAC/C,qBAAqB,IAAI,iBAAiB,GAC3C,CAAC"}
@@ -0,0 +1,13 @@
import { LoaderThis } from './types';
export type ValueInjectionLoaderOptions = {
values: Record<string, unknown>;
};
/**
* Set values on the global/window object at the start of a module.
*
* Options:
* - `values`: An object where the keys correspond to the keys of the global values to set and the values
* correspond to the values of the values on the global object. Values must be JSON serializable.
*/
export default function valueInjectionLoader(this: LoaderThis<ValueInjectionLoaderOptions>, userCode: string): string;
//# sourceMappingURL=valueInjectionLoader.d.ts.map
@@ -0,0 +1,48 @@
import { normalizeDates } from "./_lib/normalizeDates.js";
import { getISOWeekYear } from "./getISOWeekYear.js";
/**
* The {@link differenceInCalendarISOWeekYears} function options.
*/
/**
* @name differenceInCalendarISOWeekYears
* @category ISO Week-Numbering Year Helpers
* @summary Get the number of calendar ISO week-numbering years between the given dates.
*
* @description
* Get the number of calendar ISO week-numbering years between the given dates.
*
* ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
*
* @param laterDate - The later date
* @param earlierDate - The earlier date
* @param options - An object with options
*
* @returns The number of calendar ISO week-numbering years
*
* @example
* // How many calendar ISO week-numbering years are 1 January 2010 and 1 January 2012?
* const result = differenceInCalendarISOWeekYears(
* new Date(2012, 0, 1),
* new Date(2010, 0, 1)
* )
* //=> 2
*/
export function differenceInCalendarISOWeekYears(
laterDate,
earlierDate,
options,
) {
const [laterDate_, earlierDate_] = normalizeDates(
options?.in,
laterDate,
earlierDate,
);
return (
getISOWeekYear(laterDate_, options) - getISOWeekYear(earlierDate_, options)
);
}
// Fallback for modularized imports:
export default differenceInCalendarISOWeekYears;
@@ -0,0 +1,27 @@
"use strict";
exports.subWeeks = subWeeks;
var _index = require("./addWeeks.js");
/**
* @name subWeeks
* @category Week Helpers
* @summary Subtract the specified number of weeks from the given date.
*
* @description
* Subtract the specified number of weeks 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 weeks to be subtracted.
*
* @returns The new date with the weeks subtracted
*
* @example
* // Subtract 4 weeks from 1 September 2014:
* const result = subWeeks(new Date(2014, 8, 1), 4)
* //=> Mon Aug 04 2014 00:00:00
*/
function subWeeks(date, amount) {
return (0, _index.addWeeks)(date, -amount);
}
@@ -0,0 +1,338 @@
import { addFetchEndInstrumentationHandler, addFetchInstrumentationHandler, instrumentFetchRequest, parseUrl, stripDataUrlContent, spanToJSON, hasSpansEnabled, setHttpStatus, stripUrlQueryAndFragment, getActiveSpan, startInactiveSpan, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SentryNonRecordingSpan, getClient, getLocationHref, stringMatchesSomePattern, getTraceData } from '@sentry/core';
import { addXhrInstrumentationHandler, addPerformanceInstrumentationHandler, resourceTimingToSpanAttributes, SENTRY_XHR_DATA_KEY, parseXhrResponseHeaders } from '@sentry-internal/browser-utils';
import { getFullURL, createHeadersSafely, isPerformanceResourceTiming, baggageHeaderHasSentryValues } from './utils.js';
/** Options for Request Instrumentation */
const responseToSpanId = new WeakMap();
const spanIdToEndTimestamp = new Map();
const defaultRequestInstrumentationOptions = {
traceFetch: true,
traceXHR: true,
enableHTTPTimings: true,
trackFetchStreamPerformance: false,
};
/** Registers span creators for xhr and fetch requests */
function instrumentOutgoingRequests(client, _options) {
const {
traceFetch,
traceXHR,
trackFetchStreamPerformance,
shouldCreateSpanForRequest,
enableHTTPTimings,
tracePropagationTargets,
onRequestSpanStart,
onRequestSpanEnd,
} = {
...defaultRequestInstrumentationOptions,
..._options,
};
const shouldCreateSpan =
typeof shouldCreateSpanForRequest === 'function' ? shouldCreateSpanForRequest : (_) => true;
const shouldAttachHeadersWithTargets = (url) => shouldAttachHeaders(url, tracePropagationTargets);
const spans = {};
const propagateTraceparent = (client ).getOptions().propagateTraceparent;
if (traceFetch) {
// Keeping track of http requests, whose body payloads resolved later than the initial resolved request
// e.g. streaming using server sent events (SSE)
client.addEventProcessor(event => {
if (event.type === 'transaction' && event.spans) {
event.spans.forEach(span => {
if (span.op === 'http.client') {
const updatedTimestamp = spanIdToEndTimestamp.get(span.span_id);
if (updatedTimestamp) {
span.timestamp = updatedTimestamp / 1000;
spanIdToEndTimestamp.delete(span.span_id);
}
}
});
}
return event;
});
if (trackFetchStreamPerformance) {
addFetchEndInstrumentationHandler(handlerData => {
if (handlerData.response) {
const span = responseToSpanId.get(handlerData.response);
if (span && handlerData.endTimestamp) {
spanIdToEndTimestamp.set(span, handlerData.endTimestamp);
}
}
});
}
addFetchInstrumentationHandler(handlerData => {
const createdSpan = instrumentFetchRequest(handlerData, shouldCreateSpan, shouldAttachHeadersWithTargets, spans, {
propagateTraceparent,
onRequestSpanEnd,
});
if (handlerData.response && handlerData.fetchData.__span) {
responseToSpanId.set(handlerData.response, handlerData.fetchData.__span);
}
// We cannot use `window.location` in the generic fetch instrumentation,
// but we need it for reliable `server.address` attribute.
// so we extend this in here
if (createdSpan) {
const fullUrl = getFullURL(handlerData.fetchData.url);
const host = fullUrl ? parseUrl(fullUrl).host : undefined;
createdSpan.setAttributes({
'http.url': fullUrl ? stripDataUrlContent(fullUrl) : undefined,
'server.address': host,
});
if (enableHTTPTimings) {
addHTTPTimings(createdSpan);
}
onRequestSpanStart?.(createdSpan, { headers: handlerData.headers });
}
});
}
if (traceXHR) {
addXhrInstrumentationHandler(handlerData => {
const createdSpan = xhrCallback(
handlerData,
shouldCreateSpan,
shouldAttachHeadersWithTargets,
spans,
propagateTraceparent,
onRequestSpanEnd,
);
if (createdSpan) {
if (enableHTTPTimings) {
addHTTPTimings(createdSpan);
}
onRequestSpanStart?.(createdSpan, {
headers: createHeadersSafely(handlerData.xhr.__sentry_xhr_v3__?.request_headers),
});
}
});
}
}
/**
* Creates a temporary observer to listen to the next fetch/xhr resourcing timings,
* so that when timings hit their per-browser limit they don't need to be removed.
*
* @param span A span that has yet to be finished, must contain `url` on data.
*/
function addHTTPTimings(span) {
const { url } = spanToJSON(span).data;
if (!url || typeof url !== 'string') {
return;
}
const cleanup = addPerformanceInstrumentationHandler('resource', ({ entries }) => {
entries.forEach(entry => {
if (isPerformanceResourceTiming(entry) && entry.name.endsWith(url)) {
span.setAttributes(resourceTimingToSpanAttributes(entry));
// In the next tick, clean this handler up
// We have to wait here because otherwise this cleans itself up before it is fully done
setTimeout(cleanup);
}
});
});
}
/**
* A function that determines whether to attach tracing headers to a request.
* We only export this function for testing purposes.
*/
function shouldAttachHeaders(
targetUrl,
tracePropagationTargets,
) {
// window.location.href not being defined is an edge case in the browser but we need to handle it.
// Potentially dangerous situations where it may not be defined: Browser Extensions, Web Workers, patching of the location obj
const href = getLocationHref();
if (!href) {
// If there is no window.location.origin, we default to only attaching tracing headers to relative requests, i.e. ones that start with `/`
// BIG DISCLAIMER: Users can call URLs with a double slash (fetch("//example.com/api")), this is a shorthand for "send to the same protocol",
// so we need a to exclude those requests, because they might be cross origin.
const isRelativeSameOriginRequest = !!targetUrl.match(/^\/(?!\/)/);
if (!tracePropagationTargets) {
return isRelativeSameOriginRequest;
} else {
return stringMatchesSomePattern(targetUrl, tracePropagationTargets);
}
} else {
let resolvedUrl;
let currentOrigin;
// URL parsing may fail, we default to not attaching trace headers in that case.
try {
resolvedUrl = new URL(targetUrl, href);
currentOrigin = new URL(href).origin;
} catch {
return false;
}
const isSameOriginRequest = resolvedUrl.origin === currentOrigin;
if (!tracePropagationTargets) {
return isSameOriginRequest;
} else {
return (
stringMatchesSomePattern(resolvedUrl.toString(), tracePropagationTargets) ||
(isSameOriginRequest && stringMatchesSomePattern(resolvedUrl.pathname, tracePropagationTargets))
);
}
}
}
/**
* Create and track xhr request spans
*
* @returns Span if a span was created, otherwise void.
*/
function xhrCallback(
handlerData,
shouldCreateSpan,
shouldAttachHeaders,
spans,
propagateTraceparent,
onRequestSpanEnd,
) {
const xhr = handlerData.xhr;
const sentryXhrData = xhr?.[SENTRY_XHR_DATA_KEY];
if (!xhr || xhr.__sentry_own_request__ || !sentryXhrData) {
return undefined;
}
const { url, method } = sentryXhrData;
const shouldCreateSpanResult = hasSpansEnabled() && shouldCreateSpan(url);
// check first if the request has finished and is tracked by an existing span which should now end
if (handlerData.endTimestamp && shouldCreateSpanResult) {
const spanId = xhr.__sentry_xhr_span_id__;
if (!spanId) return;
const span = spans[spanId];
if (span && sentryXhrData.status_code !== undefined) {
setHttpStatus(span, sentryXhrData.status_code);
span.end();
onRequestSpanEnd?.(span, {
headers: createHeadersSafely(parseXhrResponseHeaders(xhr )),
error: handlerData.error,
});
// eslint-disable-next-line @typescript-eslint/no-dynamic-delete
delete spans[spanId];
}
return undefined;
}
const fullUrl = getFullURL(url);
const parsedUrl = fullUrl ? parseUrl(fullUrl) : parseUrl(url);
const urlForSpanName = stripDataUrlContent(stripUrlQueryAndFragment(url));
const hasParent = !!getActiveSpan();
const span =
shouldCreateSpanResult && hasParent
? startInactiveSpan({
name: `${method} ${urlForSpanName}`,
attributes: {
url: stripDataUrlContent(url),
type: 'xhr',
'http.method': method,
'http.url': fullUrl ? stripDataUrlContent(fullUrl) : undefined,
'server.address': parsedUrl?.host,
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.browser',
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'http.client',
...(parsedUrl?.search && { 'http.query': parsedUrl?.search }),
...(parsedUrl?.hash && { 'http.fragment': parsedUrl?.hash }),
},
})
: new SentryNonRecordingSpan();
xhr.__sentry_xhr_span_id__ = span.spanContext().spanId;
spans[xhr.__sentry_xhr_span_id__] = span;
if (shouldAttachHeaders(url)) {
addTracingHeadersToXhrRequest(
xhr,
// If performance is disabled (TWP) or there's no active root span (pageload/navigation/interaction),
// we do not want to use the span as base for the trace headers,
// which means that the headers will be generated from the scope and the sampling decision is deferred
hasSpansEnabled() && hasParent ? span : undefined,
propagateTraceparent,
);
}
const client = getClient();
if (client) {
client.emit('beforeOutgoingRequestSpan', span, handlerData );
}
return span;
}
function addTracingHeadersToXhrRequest(
xhr,
span,
propagateTraceparent,
) {
const { 'sentry-trace': sentryTrace, baggage, traceparent } = getTraceData({ span, propagateTraceparent });
if (sentryTrace) {
setHeaderOnXhr(xhr, sentryTrace, baggage, traceparent);
}
}
function setHeaderOnXhr(
xhr,
sentryTraceHeader,
sentryBaggageHeader,
traceparentHeader,
) {
const originalHeaders = xhr.__sentry_xhr_v3__?.request_headers;
if (originalHeaders?.['sentry-trace'] || !xhr.setRequestHeader) {
// bail if a sentry-trace header is already set
return;
}
try {
xhr.setRequestHeader('sentry-trace', sentryTraceHeader);
if (traceparentHeader && !originalHeaders?.['traceparent']) {
xhr.setRequestHeader('traceparent', traceparentHeader);
}
if (sentryBaggageHeader) {
// only add our headers if
// - no pre-existing baggage header exists
// - or it is set and doesn't yet contain sentry values
const originalBaggageHeader = originalHeaders?.['baggage'];
if (!originalBaggageHeader || !baggageHeaderHasSentryValues(originalBaggageHeader)) {
// From MDN: "If this method is called several times with the same header, the values are merged into one single request header."
// We can therefore simply set a baggage header without checking what was there before
// https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/setRequestHeader
xhr.setRequestHeader('baggage', sentryBaggageHeader);
}
}
} catch {
// Error: InvalidStateError: Failed to execute 'setRequestHeader' on 'XMLHttpRequest': The object's state must be OPENED.
}
}
export { defaultRequestInstrumentationOptions, instrumentOutgoingRequests, shouldAttachHeaders };
//# sourceMappingURL=request.js.map
@@ -0,0 +1,227 @@
import { buildLocalizeFn } from "../../_lib/buildLocalizeFn.js";
const eraValues = {
narrow: ["pr.n.e.", "AD"],
abbreviated: ["pr. Hr.", "po. Hr."],
wide: ["Prije Hrista", "Poslije Hrista"],
};
const quarterValues = {
narrow: ["1.", "2.", "3.", "4."],
abbreviated: ["1. kv.", "2. kv.", "3. kv.", "4. kv."],
wide: ["1. kvartal", "2. kvartal", "3. kvartal", "4. kvartal"],
};
const monthValues = {
narrow: [
"1.",
"2.",
"3.",
"4.",
"5.",
"6.",
"7.",
"8.",
"9.",
"10.",
"11.",
"12.",
],
abbreviated: [
"jan",
"feb",
"mar",
"apr",
"maj",
"jun",
"jul",
"avg",
"sep",
"okt",
"nov",
"dec",
],
wide: [
"januar",
"februar",
"mart",
"april",
"maj",
"juni",
"juli",
"avgust",
"septembar",
"oktobar",
"novembar",
"decembar",
],
};
const formattingMonthValues = {
narrow: [
"1.",
"2.",
"3.",
"4.",
"5.",
"6.",
"7.",
"8.",
"9.",
"10.",
"11.",
"12.",
],
abbreviated: [
"jan",
"feb",
"mar",
"apr",
"maj",
"jun",
"jul",
"avg",
"sep",
"okt",
"nov",
"dec",
],
wide: [
"januar",
"februar",
"mart",
"april",
"maj",
"juni",
"juli",
"avgust",
"septembar",
"oktobar",
"novembar",
"decembar",
],
};
const dayValues = {
narrow: ["N", "P", "U", "S", "Č", "P", "S"],
short: ["ned", "pon", "uto", "sre", "čet", "pet", "sub"],
abbreviated: ["ned", "pon", "uto", "sre", "čet", "pet", "sub"],
wide: [
"nedjelja",
"ponedjeljak",
"utorak",
"srijeda",
"četvrtak",
"petak",
"subota",
],
};
const dayPeriodValues = {
narrow: {
am: "AM",
pm: "PM",
midnight: "ponoć",
noon: "podne",
morning: "ujutru",
afternoon: "popodne",
evening: "uveče",
night: "noću",
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "ponoć",
noon: "podne",
morning: "ujutru",
afternoon: "popodne",
evening: "uveče",
night: "noću",
},
wide: {
am: "AM",
pm: "PM",
midnight: "ponoć",
noon: "podne",
morning: "ujutru",
afternoon: "poslije podne",
evening: "uveče",
night: "noću",
},
};
const formattingDayPeriodValues = {
narrow: {
am: "AM",
pm: "PM",
midnight: "ponoć",
noon: "podne",
morning: "ujutru",
afternoon: "popodne",
evening: "uveče",
night: "noću",
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "ponoć",
noon: "podne",
morning: "ujutru",
afternoon: "popodne",
evening: "uveče",
night: "noću",
},
wide: {
am: "AM",
pm: "PM",
midnight: "ponoć",
noon: "podne",
morning: "ujutru",
afternoon: "poslije podne",
evening: "uveče",
night: "noću",
},
};
const ordinalNumber = (dirtyNumber, _options) => {
const number = Number(dirtyNumber);
return String(number) + ".";
};
export const localize = {
ordinalNumber,
era: buildLocalizeFn({
values: eraValues,
defaultWidth: "wide",
}),
quarter: buildLocalizeFn({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: (quarter) => quarter - 1,
}),
month: buildLocalizeFn({
values: monthValues,
defaultWidth: "wide",
formattingValues: formattingMonthValues,
defaultFormattingWidth: "wide",
}),
day: buildLocalizeFn({
values: dayValues,
defaultWidth: "wide",
}),
dayPeriod: buildLocalizeFn({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide",
}),
};
@@ -0,0 +1 @@
{"version":3,"names":["_core","require","_traverse","rewriteThisVisitor","rewriteThis","programPath","visitors","environmentVisitor","ThisExpression","path","replaceWith","t","unaryExpression","numericLiteral","noScope","traverse","node"],"sources":["../src/rewrite-this.ts"],"sourcesContent":["import { types as t } from \"@babel/core\";\nimport traverse, { visitors, type NodePath } from \"@babel/traverse\";\n\n/**\n * A lazily constructed visitor to walk the tree, rewriting all `this` references in the\n * top-level scope to be `void 0` (undefined).\n *\n */\nlet rewriteThisVisitor: Parameters<typeof traverse>[1];\n\nexport default function rewriteThis(programPath: NodePath) {\n if (!rewriteThisVisitor) {\n rewriteThisVisitor = visitors.environmentVisitor({\n ThisExpression(path) {\n path.replaceWith(t.unaryExpression(\"void\", t.numericLiteral(0), true));\n },\n });\n rewriteThisVisitor.noScope = true;\n }\n // Rewrite \"this\" to be \"undefined\".\n traverse(programPath.node, rewriteThisVisitor);\n}\n"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAOA,IAAIE,kBAAkD;AAEvC,SAASC,WAAWA,CAACC,WAAqB,EAAE;EACzD,IAAI,CAACF,kBAAkB,EAAE;IACvBA,kBAAkB,GAAGG,kBAAQ,CAACC,kBAAkB,CAAC;MAC/CC,cAAcA,CAACC,IAAI,EAAE;QACnBA,IAAI,CAACC,WAAW,CAACC,WAAC,CAACC,eAAe,CAAC,MAAM,EAAED,WAAC,CAACE,cAAc,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;MACxE;IACF,CAAC,CAAC;IACFV,kBAAkB,CAACW,OAAO,GAAG,IAAI;EACnC;EAEA,IAAAC,iBAAQ,EAACV,WAAW,CAACW,IAAI,EAAEb,kBAAkB,CAAC;AAChD","ignoreList":[]}
@@ -0,0 +1 @@
{"version":3,"file":"bluetooth-off.js","sources":["../../../src/icons/bluetooth-off.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name BluetoothOff\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtMTcgMTctNSA1VjEybC01IDUiIC8+CiAgPHBhdGggZD0ibTIgMiAyMCAyMCIgLz4KICA8cGF0aCBkPSJNMTQuNSA5LjUgMTcgN2wtNS01djQuNSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/bluetooth-off\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 BluetoothOff = createLucideIcon('BluetoothOff', [\n ['path', { d: 'm17 17-5 5V12l-5 5', key: 'v5aci6' }],\n ['path', { d: 'm2 2 20 20', key: '1ooewy' }],\n ['path', { d: 'M14.5 9.5 17 7l-5-5v4.5', key: '1kddfz' }],\n]);\n\nexport default BluetoothOff;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAe,iBAAiB,cAAgB,CAAA,CAAA,CAAA;AAAA,CAAA,CACpD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAsB,CAAA,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,CACnD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC3C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA2B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC1D,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,46 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.diagLogLevelFromString = void 0;
/*
* 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.
*/
const api_1 = require("@opentelemetry/api");
const logLevelMap = {
ALL: api_1.DiagLogLevel.ALL,
VERBOSE: api_1.DiagLogLevel.VERBOSE,
DEBUG: api_1.DiagLogLevel.DEBUG,
INFO: api_1.DiagLogLevel.INFO,
WARN: api_1.DiagLogLevel.WARN,
ERROR: api_1.DiagLogLevel.ERROR,
NONE: api_1.DiagLogLevel.NONE,
};
/**
* Convert a string to a {@link DiagLogLevel}, defaults to {@link DiagLogLevel} if the log level does not exist or undefined if the input is undefined.
* @param value
*/
function diagLogLevelFromString(value) {
if (value == null) {
// don't fall back to default - no value set has different semantics for ús than an incorrect value (do not set vs. fall back to default)
return undefined;
}
const resolvedLogLevel = logLevelMap[value.toUpperCase()];
if (resolvedLogLevel == null) {
api_1.diag.warn(`Unknown log level "${value}", expected one of ${Object.keys(logLevelMap)}, using default`);
return api_1.DiagLogLevel.INFO;
}
return resolvedLogLevel;
}
exports.diagLogLevelFromString = diagLogLevelFromString;
//# sourceMappingURL=configuration.js.map
@@ -0,0 +1,6 @@
var async = require('./lib/async');
async.core = require('./lib/core');
async.isCore = require('./lib/is-core');
async.sync = require('./lib/sync');
module.exports = async;
@@ -0,0 +1,59 @@
import { Redis } from '@upstash/redis';
import type { MutationOption } from "../core/index.js";
import { Cache } from "../core/index.js";
import { entityKind } from "../../entity.js";
import type { CacheConfig } from "../core/types.js";
export declare class UpstashCache extends Cache {
redis: Redis;
protected useGlobally?: boolean | undefined;
static readonly [entityKind]: string;
/**
* Prefix for sets which denote the composite table names for each unique table
*
* Example: In the composite table set of "table1", you may find
* `${compositeTablePrefix}table1,table2` and `${compositeTablePrefix}table1,table3`
*/
private static compositeTableSetPrefix;
/**
* Prefix for hashes which map hash or tags to cache values
*/
private static compositeTablePrefix;
/**
* Key which holds the mapping of tags to composite table names
*
* Using this tagsMapKey, you can find the composite table name for a given tag
* and get the cache value for that tag:
*
* ```ts
* const compositeTable = redis.hget(tagsMapKey, 'tag1')
* console.log(compositeTable) // `${compositeTablePrefix}table1,table2`
*
* const cachevalue = redis.hget(compositeTable, 'tag1')
*/
private static tagsMapKey;
/**
* Queries whose auto invalidation is false aren't stored in their respective
* composite table hashes because those hashes are deleted when a mutation
* occurs on related tables.
*
* Instead, they are stored in a separate hash with the prefix
* `__nonAutoInvalidate__` to prevent them from being deleted when a mutation
*/
private static nonAutoInvalidateTablePrefix;
private luaScripts;
private internalConfig;
constructor(redis: Redis, config?: CacheConfig, useGlobally?: boolean | undefined);
strategy(): "all" | "explicit";
private toInternalConfig;
get(key: string, tables: string[], isTag?: boolean, isAutoInvalidate?: boolean): Promise<any[] | undefined>;
put(key: string, response: any, tables: string[], isTag?: boolean, config?: CacheConfig): Promise<void>;
onMutate(params: MutationOption): Promise<void>;
private addTablePrefix;
private getCompositeKey;
}
export declare function upstashCache({ url, token, config, global }: {
url: string;
token: string;
config?: CacheConfig;
global?: boolean;
}): UpstashCache;
@@ -0,0 +1 @@
{"version":3,"file":"buildPathSegments.d.ts","sourceRoot":"","sources":["../../../src/forms/WatchChildErrors/buildPathSegments.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAI1C,eAAO,MAAM,iBAAiB,WAAY,WAAW,EAAE,KAAG,CAAC,GAAG,MAAM,GAAG,GAAG,MAAM,CAAC,EA8BhF,CAAA"}
@@ -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 MessageCircleWarning = createLucideIcon("MessageCircleWarning", [
["path", { d: "M7.9 20A9 9 0 1 0 4 16.1L2 22Z", key: "vv11sd" }],
["path", { d: "M12 8v4", key: "1got3b" }],
["path", { d: "M12 16h.01", key: "1drbdi" }]
]);
export { MessageCircleWarning as default };
//# sourceMappingURL=message-circle-warning.js.map
@@ -0,0 +1,155 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var view_exports = {};
__export(view_exports, {
ManualViewBuilder: () => ManualViewBuilder,
MySqlView: () => MySqlView,
ViewBuilder: () => ViewBuilder,
ViewBuilderCore: () => ViewBuilderCore,
mysqlView: () => mysqlView,
mysqlViewWithSchema: () => mysqlViewWithSchema
});
module.exports = __toCommonJS(view_exports);
var import_entity = require("../entity.cjs");
var import_selection_proxy = require("../selection-proxy.cjs");
var import_utils = require("../utils.cjs");
var import_query_builder = require("./query-builders/query-builder.cjs");
var import_table = require("./table.cjs");
var import_view_base = require("./view-base.cjs");
var import_view_common = require("./view-common.cjs");
class ViewBuilderCore {
constructor(name, schema) {
this.name = name;
this.schema = schema;
}
static [import_entity.entityKind] = "MySqlViewBuilder";
config = {};
algorithm(algorithm) {
this.config.algorithm = algorithm;
return this;
}
sqlSecurity(sqlSecurity) {
this.config.sqlSecurity = sqlSecurity;
return this;
}
withCheckOption(withCheckOption) {
this.config.withCheckOption = withCheckOption ?? "cascaded";
return this;
}
}
class ViewBuilder extends ViewBuilderCore {
static [import_entity.entityKind] = "MySqlViewBuilder";
as(qb) {
if (typeof qb === "function") {
qb = qb(new import_query_builder.QueryBuilder());
}
const selectionProxy = new import_selection_proxy.SelectionProxyHandler({
alias: this.name,
sqlBehavior: "error",
sqlAliasedBehavior: "alias",
replaceOriginalName: true
});
const aliasedSelection = new Proxy(qb.getSelectedFields(), selectionProxy);
return new Proxy(
new MySqlView({
mysqlConfig: this.config,
config: {
name: this.name,
schema: this.schema,
selectedFields: aliasedSelection,
query: qb.getSQL().inlineParams()
}
}),
selectionProxy
);
}
}
class ManualViewBuilder extends ViewBuilderCore {
static [import_entity.entityKind] = "MySqlManualViewBuilder";
columns;
constructor(name, columns, schema) {
super(name, schema);
this.columns = (0, import_utils.getTableColumns)((0, import_table.mysqlTable)(name, columns));
}
existing() {
return new Proxy(
new MySqlView({
mysqlConfig: void 0,
config: {
name: this.name,
schema: this.schema,
selectedFields: this.columns,
query: void 0
}
}),
new import_selection_proxy.SelectionProxyHandler({
alias: this.name,
sqlBehavior: "error",
sqlAliasedBehavior: "alias",
replaceOriginalName: true
})
);
}
as(query) {
return new Proxy(
new MySqlView({
mysqlConfig: this.config,
config: {
name: this.name,
schema: this.schema,
selectedFields: this.columns,
query: query.inlineParams()
}
}),
new import_selection_proxy.SelectionProxyHandler({
alias: this.name,
sqlBehavior: "error",
sqlAliasedBehavior: "alias",
replaceOriginalName: true
})
);
}
}
class MySqlView extends import_view_base.MySqlViewBase {
static [import_entity.entityKind] = "MySqlView";
[import_view_common.MySqlViewConfig];
constructor({ mysqlConfig, config }) {
super(config);
this[import_view_common.MySqlViewConfig] = mysqlConfig;
}
}
function mysqlViewWithSchema(name, selection, schema) {
if (selection) {
return new ManualViewBuilder(name, selection, schema);
}
return new ViewBuilder(name, schema);
}
function mysqlView(name, selection) {
return mysqlViewWithSchema(name, selection, void 0);
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
ManualViewBuilder,
MySqlView,
ViewBuilder,
ViewBuilderCore,
mysqlView,
mysqlViewWithSchema
});
//# sourceMappingURL=view.cjs.map
@@ -0,0 +1,36 @@
import { DirectusPermission } from "../../../schema/permission.cjs";
import { NestedPartial } from "../../../types/utils.cjs";
import { ApplyQueryFields } from "../../../types/output.cjs";
import { Query } from "../../../types/query.cjs";
import { RestCommand } from "../../types.cjs";
//#region src/rest/commands/update/permissions.d.ts
type UpdatePermissionOutput<Schema, TQuery extends Query<Schema, Item>, Item extends object = DirectusPermission<Schema>> = ApplyQueryFields<Schema, Item, TQuery['fields']>;
/**
* Update multiple existing permissions rules.
* @param keys
* @param item
* @param query
* @returns Returns the permission object for the updated permissions.
* @throws Will throw if keys is empty
*/
declare const updatePermissions: <Schema, const TQuery extends Query<Schema, DirectusPermission<Schema>>>(keys: DirectusPermission<Schema>["id"][], item: NestedPartial<DirectusPermission<Schema>>, query?: TQuery) => RestCommand<UpdatePermissionOutput<Schema, TQuery>[], Schema>;
/**
* Update multiple permissions rules as batch.
* @param items
* @param query
* @returns Returns the permission object for the updated permissions.
*/
declare const updatePermissionsBatch: <Schema, const TQuery extends Query<Schema, DirectusPermission<Schema>>>(items: NestedPartial<DirectusPermission<Schema>>[], query?: TQuery) => RestCommand<UpdatePermissionOutput<Schema, TQuery>[], Schema>;
/**
* Update an existing permissions rule.
* @param key
* @param item
* @param query
* @returns Returns the permission object for the updated permission.
* @throws Will throw if key is empty
*/
declare const updatePermission: <Schema, const TQuery extends Query<Schema, DirectusPermission<Schema>>>(key: DirectusPermission<Schema>["id"], item: NestedPartial<DirectusPermission<Schema>>, query?: TQuery) => RestCommand<UpdatePermissionOutput<Schema, TQuery>, Schema>;
//#endregion
export { UpdatePermissionOutput, updatePermission, updatePermissions, updatePermissionsBatch };
//# sourceMappingURL=permissions.d.cts.map
@@ -0,0 +1,76 @@
import { RestCommand } from "../../types.js";
//#region src/rest/commands/utils/users.d.ts
/**
* Invite a new user by email.
*
* @param email User email to invite.
* @param role Role of the new user.
* @param invite_url Provide a custom invite url which the link in the email will lead to. The invite token will be passed as a parameter.
*
* @returns Nothing
*/
declare const inviteUser: <Schema>(email: string, role: string, invite_url?: string) => RestCommand<void, Schema>;
/**
* Accept your invite. The invite user endpoint sends the email a link to the Admin App.
*
* @param token Accept invite token.
* @param password Password for the user.
*
* @returns Nothing
*/
declare const acceptUserInvite: <Schema>(token: string, password: string) => RestCommand<void, Schema>;
/**
* Register a new user.
*
* @param email The new user email.
* @param password The new user password.
* @param options Optional registration fields.
*
* @returns Nothing
*/
declare const registerUser: <Schema>(email: string, password: string, options?: {
verification_url?: string;
first_name?: string;
last_name?: string;
}) => RestCommand<void, Schema>;
/**
* Verify a registered user email using a token sent to the address.
*
* @param token Accept registration token.
*
* @returns Nothing
*/
declare const registerUserVerify: <Schema>(token: string) => RestCommand<void, Schema>;
/**
* Generates a secret and returns the URL to be used in an authenticator app.
*
* @param password The user's password.
*
* @returns A two-factor secret
*/
declare const generateTwoFactorSecret: <Schema>(password: string) => RestCommand<{
secret: string;
otpauth_url: string;
}, Schema>;
/**
* Adds a TFA secret to the user account.
*
* @param secret The TFA secret from tfa/generate.
* @param otp OTP generated with the secret, to recheck if the user has a correct TFA setup
*
* @returns Nothing
*/
declare const enableTwoFactor: <Schema>(secret: string, otp: string) => RestCommand<void, Schema>;
/**
* Disables two-factor authentication by removing the OTP secret from the user.
*
* @param otp One-time password generated by the authenticator app.
*
* @returns Nothing
*/
declare const disableTwoFactor: <Schema>(otp: string) => RestCommand<void, Schema>;
//#endregion
export { acceptUserInvite, disableTwoFactor, enableTwoFactor, generateTwoFactorSecret, inviteUser, registerUser, registerUserVerify };
//# sourceMappingURL=users.d.ts.map
@@ -0,0 +1,72 @@
var SetCache = require('./_SetCache'),
arrayIncludes = require('./_arrayIncludes'),
arrayIncludesWith = require('./_arrayIncludesWith'),
cacheHas = require('./_cacheHas'),
createSet = require('./_createSet'),
setToArray = require('./_setToArray');
/** Used as the size to enable large array optimizations. */
var LARGE_ARRAY_SIZE = 200;
/**
* The base implementation of `_.uniqBy` without support for iteratee shorthands.
*
* @private
* @param {Array} array The array to inspect.
* @param {Function} [iteratee] The iteratee invoked per element.
* @param {Function} [comparator] The comparator invoked per element.
* @returns {Array} Returns the new duplicate free array.
*/
function baseUniq(array, iteratee, comparator) {
var index = -1,
includes = arrayIncludes,
length = array.length,
isCommon = true,
result = [],
seen = result;
if (comparator) {
isCommon = false;
includes = arrayIncludesWith;
}
else if (length >= LARGE_ARRAY_SIZE) {
var set = iteratee ? null : createSet(array);
if (set) {
return setToArray(set);
}
isCommon = false;
includes = cacheHas;
seen = new SetCache;
}
else {
seen = iteratee ? [] : result;
}
outer:
while (++index < length) {
var value = array[index],
computed = iteratee ? iteratee(value) : value;
value = (comparator || value !== 0) ? value : 0;
if (isCommon && computed === computed) {
var seenIndex = seen.length;
while (seenIndex--) {
if (seen[seenIndex] === computed) {
continue outer;
}
}
if (iteratee) {
seen.push(computed);
}
result.push(value);
}
else if (!includes(seen, computed, comparator)) {
if (seen !== result) {
seen.push(computed);
}
result.push(value);
}
}
return result;
}
module.exports = baseUniq;

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