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,11 @@
/**
* 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.
*
*/
'use strict'
const LexicalNodeEventPlugin = process.env.NODE_ENV !== 'production' ? require('./LexicalNodeEventPlugin.dev.js') : require('./LexicalNodeEventPlugin.prod.js');
module.exports = LexicalNodeEventPlugin;
@@ -0,0 +1 @@
{"version":3,"file":"duplicate.d.ts","sourceRoot":"","sources":["../../../src/collections/endpoints/duplicate.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAO3D,eAAO,MAAM,gBAAgB,EAAE,cAkC9B,CAAA"}
@@ -0,0 +1,21 @@
MIT License
Copyright (c) Microsoft Corporation.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE
@@ -0,0 +1,21 @@
MIT License
Copyright (c) Microsoft Corporation.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE
@@ -0,0 +1,3 @@
export type Groups = 'addColumn' | 'addConstraint' | 'alterType' | 'createIndex' | 'createTable' | 'createType' | 'disableRowSecurity' | 'dropColumn' | 'dropConstraint' | 'dropIndex' | 'dropTable' | 'dropType' | 'notNull' | 'renameColumn' | 'setDefault';
export declare const groupUpSQLStatements: (list: string[]) => Record<Groups, string[]>;
//# sourceMappingURL=groupUpSQLStatements.d.ts.map
@@ -0,0 +1,21 @@
interface BrowserApiErrorsOptions {
setTimeout: boolean;
setInterval: boolean;
requestAnimationFrame: boolean;
XMLHttpRequest: boolean;
eventTarget: boolean | string[];
/**
* If you experience issues with this integration causing double-invocations of event listeners,
* try setting this option to `true`. It will unregister the original callbacks from the event targets
* before adding the instrumented callback.
*
* @default false
*/
unregisterOriginalCallbacks: boolean;
}
/**
* Wrap timer functions and event targets to catch errors and provide better meta data.
*/
export declare const browserApiErrorsIntegration: (options?: Partial<BrowserApiErrorsOptions> | undefined) => import("@sentry/core").Integration;
export {};
//# sourceMappingURL=browserapierrors.d.ts.map
@@ -0,0 +1,44 @@
'use strict'
const { test } = require('tap')
const { join } = require('node:path')
const proxyquire = require('proxyquire')
const Writable = require('node:stream').Writable
const pino = require('../../pino')
test('file-target mocked', async function ({ equal, same, plan, pass }) {
plan(1)
let ret
const fileTarget = proxyquire('../../file', {
'./pino': {
destination (opts) {
same(opts, { dest: 1, sync: false })
ret = new Writable()
ret.fd = opts.dest
process.nextTick(() => {
ret.emit('ready')
})
return ret
}
}
})
await fileTarget()
})
test('pino.transport with syntax error', ({ same, teardown, plan }) => {
plan(1)
const transport = pino.transport({
targets: [{
target: join(__dirname, '..', 'fixtures', 'syntax-error-esm.mjs')
}]
})
teardown(transport.end.bind(transport))
transport.on('error', (err) => {
same(err, new SyntaxError('Unexpected end of input'))
})
})
@@ -0,0 +1 @@
{"version":3,"file":"updateGlobal.d.ts","sourceRoot":"","sources":["../src/updateGlobal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAI/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAKhD,wBAAsB,YAAY,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAClE,IAAI,EAAE,cAAc,EACpB,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,gBAAgB,GACvD,OAAO,CAAC,CAAC,CAAC,CA2BZ"}
@@ -0,0 +1,43 @@
{
"name": "negotiator",
"description": "HTTP content negotiation",
"version": "1.0.0",
"contributors": [
"Douglas Christopher Wilson <doug@somethingdoug.com>",
"Federico Romero <federico.romero@outboxlabs.com>",
"Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)"
],
"license": "MIT",
"keywords": [
"http",
"content negotiation",
"accept",
"accept-language",
"accept-encoding",
"accept-charset"
],
"repository": "jshttp/negotiator",
"devDependencies": {
"eslint": "7.32.0",
"eslint-plugin-markdown": "2.2.1",
"mocha": "9.1.3",
"nyc": "15.1.0"
},
"files": [
"lib/",
"HISTORY.md",
"LICENSE",
"index.js",
"README.md"
],
"engines": {
"node": ">= 0.6"
},
"scripts": {
"lint": "eslint .",
"test": "mocha --reporter spec --check-leaks --bail test/",
"test:debug": "mocha --reporter spec --check-leaks --inspect --inspect-brk test/",
"test-ci": "nyc --reporter=lcov --reporter=text npm test",
"test-cov": "nyc --reporter=html --reporter=text npm test"
}
}
@@ -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 Cloudy = createLucideIcon("Cloudy", [
["path", { d: "M17.5 21H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z", key: "gqqjvc" }],
["path", { d: "M22 10a3 3 0 0 0-3-3h-2.207a5.502 5.502 0 0 0-10.702.5", key: "1p2s76" }]
]);
export { Cloudy as default };
//# sourceMappingURL=cloudy.js.map
@@ -0,0 +1,83 @@
import { millisecondsToSeconds, secondsToMilliseconds, noop } from 'motion-utils';
import { attachTimeline } from './utils/attach-timeline.mjs';
class NativeAnimationControls {
constructor(animation) {
this.animation = animation;
}
get duration() {
var _a, _b, _c;
const durationInMs = ((_b = (_a = this.animation) === null || _a === void 0 ? void 0 : _a.effect) === null || _b === void 0 ? void 0 : _b.getComputedTiming().duration) ||
((_c = this.options) === null || _c === void 0 ? void 0 : _c.duration) ||
300;
return millisecondsToSeconds(Number(durationInMs));
}
get time() {
var _a;
if (this.animation) {
return millisecondsToSeconds(((_a = this.animation) === null || _a === void 0 ? void 0 : _a.currentTime) || 0);
}
return 0;
}
set time(newTime) {
if (this.animation) {
this.animation.currentTime = secondsToMilliseconds(newTime);
}
}
get speed() {
return this.animation ? this.animation.playbackRate : 1;
}
set speed(newSpeed) {
if (this.animation) {
this.animation.playbackRate = newSpeed;
}
}
get state() {
return this.animation ? this.animation.playState : "finished";
}
get startTime() {
return this.animation ? this.animation.startTime : null;
}
get finished() {
return this.animation ? this.animation.finished : Promise.resolve();
}
play() {
this.animation && this.animation.play();
}
pause() {
this.animation && this.animation.pause();
}
stop() {
if (!this.animation ||
this.state === "idle" ||
this.state === "finished") {
return;
}
if (this.animation.commitStyles) {
this.animation.commitStyles();
}
this.cancel();
}
flatten() {
var _a;
if (!this.animation)
return;
(_a = this.animation.effect) === null || _a === void 0 ? void 0 : _a.updateTiming({ easing: "linear" });
}
attachTimeline(timeline) {
if (this.animation)
attachTimeline(this.animation, timeline);
return noop;
}
complete() {
this.animation && this.animation.finish();
}
cancel() {
try {
this.animation && this.animation.cancel();
}
catch (e) { }
}
}
export { NativeAnimationControls };
@@ -0,0 +1,9 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
export { default } from './university.js';
//# sourceMappingURL=school-2.js.map
@@ -0,0 +1 @@
{"version":3,"file":"panel-left-dashed.js","sources":["../../../src/icons/panel-left-dashed.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name PanelLeftDashed\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHg9IjMiIHk9IjMiIHJ4PSIyIiAvPgogIDxwYXRoIGQ9Ik05IDE0djEiIC8+CiAgPHBhdGggZD0iTTkgMTl2MiIgLz4KICA8cGF0aCBkPSJNOSAzdjIiIC8+CiAgPHBhdGggZD0iTTkgOXYxIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/panel-left-dashed\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 PanelLeftDashed = createLucideIcon('PanelLeftDashed', [\n ['rect', { width: '18', height: '18', x: '3', y: '3', rx: '2', key: 'afitv7' }],\n ['path', { d: 'M9 14v1', key: 'askpd8' }],\n ['path', { d: 'M9 19v2', key: '16tejx' }],\n ['path', { d: 'M9 3v2', key: '1noubl' }],\n ['path', { d: 'M9 9v1', key: '19ebxg' }],\n]);\n\nexport default PanelLeftDashed;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAkB,iBAAiB,iBAAmB,CAAA,CAAA,CAAA;AAAA,CAAA,CAC1D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,MAAM,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC9E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,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,CAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACvC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACzC,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,58 @@
import { ChildProcessByStdio, SpawnOptions, ChildProcess } from 'child_process';
/**
* The signature for the cleanup method.
*
* Arguments indicate the exit status of the child process.
*
* If a Promise is returned, then the process is not terminated
* until it resolves, and the resolution value is treated as the
* exit status (if a number) or signal exit (if a signal string).
*
* If `undefined` is returned, then no change is made, and the parent
* exits in the same way that the child exited.
*
* If boolean `false` is returned, then the parent's exit is canceled.
*
* If a number is returned, then the parent process exits with the number
* as its exitCode.
*
* If a signal string is returned, then the parent process is killed with
* the same signal that caused the child to exit.
*/
export type Cleanup = (code: number | null, signal: null | NodeJS.Signals, processInfo: {
watchdogPid?: ChildProcess['pid'];
}) => void | undefined | number | NodeJS.Signals | false | Promise<void | undefined | number | NodeJS.Signals | false>;
export type FgArgs = [program: string | [cmd: string, ...args: string[]], cleanup?: Cleanup] | [
program: [cmd: string, ...args: string[]],
opts?: SpawnOptions,
cleanup?: Cleanup
] | [program: string, cleanup?: Cleanup] | [program: string, opts?: SpawnOptions, cleanup?: Cleanup] | [program: string, args?: string[], cleanup?: Cleanup] | [
program: string,
args?: string[],
opts?: SpawnOptions,
cleanup?: Cleanup
];
/**
* Normalizes the arguments passed to `foregroundChild`.
*
* Exposed for testing.
*
* @internal
*/
export declare const normalizeFgArgs: (fgArgs: FgArgs) => [program: string, args: string[], spawnOpts: SpawnOptions, cleanup: Cleanup];
/**
* Spawn the specified program as a "foreground" process, or at least as
* close as is possible given node's lack of exec-without-fork.
*
* Cleanup method may be used to modify or ignore the result of the child's
* exit code or signal. If cleanup returns undefined (or a Promise that
* resolves to undefined), then the parent will exit in the same way that
* the child did.
*
* Return boolean `false` to prevent the parent's exit entirely.
*/
export declare function foregroundChild(cmd: string | [cmd: string, ...args: string[]], cleanup?: Cleanup): ChildProcessByStdio<null, null, null>;
export declare function foregroundChild(program: string, args?: string[], cleanup?: Cleanup): ChildProcessByStdio<null, null, null>;
export declare function foregroundChild(program: string, spawnOpts?: SpawnOptions, cleanup?: Cleanup): ChildProcessByStdio<null, null, null>;
export declare function foregroundChild(program: string, args?: string[], spawnOpts?: SpawnOptions, cleanup?: Cleanup): ChildProcessByStdio<null, null, null>;
//# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"eventProcessors.js","sources":["../../src/eventProcessors.ts"],"sourcesContent":["import { DEBUG_BUILD } from './debug-build';\nimport type { Event, EventHint } from './types-hoist/event';\nimport type { EventProcessor } from './types-hoist/eventprocessor';\nimport { debug } from './utils/debug-logger';\nimport { isThenable } from './utils/is';\nimport { rejectedSyncPromise, resolvedSyncPromise } from './utils/syncpromise';\n\n/**\n * Process an array of event processors, returning the processed event (or `null` if the event was dropped).\n */\nexport function notifyEventProcessors(\n processors: EventProcessor[],\n event: Event | null,\n hint: EventHint,\n index: number = 0,\n): PromiseLike<Event | null> {\n try {\n const result = _notifyEventProcessors(event, hint, processors, index);\n return isThenable(result) ? result : resolvedSyncPromise(result);\n } catch (error) {\n return rejectedSyncPromise(error);\n }\n}\n\nfunction _notifyEventProcessors(\n event: Event | null,\n hint: EventHint,\n processors: EventProcessor[],\n index: number,\n): Event | null | PromiseLike<Event | null> {\n const processor = processors[index];\n\n if (!event || !processor) {\n return event;\n }\n\n const result = processor({ ...event }, hint);\n\n DEBUG_BUILD && result === null && debug.log(`Event processor \"${processor.id || '?'}\" dropped event`);\n\n if (isThenable(result)) {\n return result.then(final => _notifyEventProcessors(final, hint, processors, index + 1));\n }\n\n return _notifyEventProcessors(result, hint, processors, index + 1);\n}\n"],"names":[],"mappings":";;;;;AAOA;AACA;AACA;AACO,SAAS,qBAAqB;AACrC,EAAE,UAAU;AACZ,EAAE,KAAK;AACP,EAAE,IAAI;AACN,EAAE,KAAK,GAAW,CAAC;AACnB,EAA6B;AAC7B,EAAE,IAAI;AACN,IAAI,MAAM,MAAA,GAAS,sBAAsB,CAAC,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,CAAC;AACzE,IAAI,OAAO,UAAU,CAAC,MAAM,CAAA,GAAI,MAAA,GAAS,mBAAmB,CAAC,MAAM,CAAC;AACpE,EAAE,CAAA,CAAE,OAAO,KAAK,EAAE;AAClB,IAAI,OAAO,mBAAmB,CAAC,KAAK,CAAC;AACrC,EAAE;AACF;;AAEA,SAAS,sBAAsB;AAC/B,EAAE,KAAK;AACP,EAAE,IAAI;AACN,EAAE,UAAU;AACZ,EAAE,KAAK;AACP,EAA4C;AAC5C,EAAE,MAAM,SAAA,GAAY,UAAU,CAAC,KAAK,CAAC;;AAErC,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE;AAC5B,IAAI,OAAO,KAAK;AAChB,EAAE;;AAEF,EAAE,MAAM,MAAA,GAAS,SAAS,CAAC,EAAE,GAAG,KAAA,EAAO,EAAE,IAAI,CAAC;;AAE9C,EAAE,WAAA,IAAe,MAAA,KAAW,QAAQ,KAAK,CAAC,GAAG,CAAC,CAAC,iBAAiB,EAAE,SAAS,CAAC,EAAA,IAAM,GAAG,CAAC,eAAe,CAAC,CAAC;;AAEvG,EAAE,IAAI,UAAU,CAAC,MAAM,CAAC,EAAE;AAC1B,IAAI,OAAO,MAAM,CAAC,IAAI,CAAC,KAAA,IAAS,sBAAsB,CAAC,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC;AAC3F,EAAE;;AAEF,EAAE,OAAO,sBAAsB,CAAC,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,KAAA,GAAQ,CAAC,CAAC;AACpE;;;;"}
@@ -0,0 +1,12 @@
import { LRUMap } from '@sentry/core';
import { ClientRequest, IncomingMessage, RequestOptions } from 'http';
/** Add a breadcrumb for outgoing requests. */
export declare function addRequestBreadcrumb(request: ClientRequest, response: IncomingMessage | undefined): void;
/**
* Add trace propagation headers to an outgoing request.
* This must be called _before_ the request is sent!
*/
export declare function addTracePropagationHeadersToOutgoingRequest(request: ClientRequest, propagationDecisionMap: LRUMap<string, boolean>): void;
/** Convert an outgoing request to request options. */
export declare function getRequestOptions(request: ClientRequest): RequestOptions;
//# sourceMappingURL=outgoingHttpRequest.d.ts.map
@@ -0,0 +1,142 @@
'use client';
import { jsx as _jsx } from "react/jsx-runtime";
import React, { useCallback, useEffect, useMemo, useState } from 'react';
import { useField } from '../../forms/useField/index.js';
import { withCondition } from '../../forms/withCondition/index.js';
import { useConfig } from '../../providers/Config/index.js';
import { useLocale } from '../../providers/Locale/index.js';
import { mergeFieldStyles } from '../mergeFieldStyles.js';
import { isFieldRTL } from '../shared/index.js';
import { TextInput } from './Input.js';
import './index.scss';
export { TextInput };
const TextFieldComponent = props => {
const {
field,
field: {
admin: {
autoComplete,
className,
description,
placeholder,
rtl
} = {},
hasMany,
label,
localized,
maxLength,
maxRows,
minLength,
minRows,
required
},
inputRef,
path: pathFromProps,
readOnly,
validate
} = props;
const locale = useLocale();
const {
config: {
localization: localizationConfig
}
} = useConfig();
const memoizedValidate = useCallback((value, options) => {
if (typeof validate === 'function') {
return validate(value, {
...options,
maxLength,
minLength,
required
});
}
}, [validate, minLength, maxLength, required]);
const {
customComponents: {
AfterInput,
BeforeInput,
Description,
Error,
Label
} = {},
disabled,
path,
setValue,
showError,
value: value_0
} = useField({
potentiallyStalePath: pathFromProps,
validate: memoizedValidate
});
const renderRTL = isFieldRTL({
fieldLocalized: localized,
fieldRTL: rtl,
locale,
localizationConfig: localizationConfig || undefined
});
const [valueToRender, setValueToRender] = useState([]) // Only for hasMany
;
const handleHasManyChange = useCallback(selectedOption => {
if (!(readOnly || disabled)) {
let newValue;
if (!selectedOption) {
newValue = [];
} else if (Array.isArray(selectedOption)) {
newValue = selectedOption.map(option => option.value?.value || option.value);
} else {
newValue = [selectedOption.value?.value || selectedOption.value];
}
setValue(newValue);
}
}, [readOnly, setValue, disabled]);
// useEffect update valueToRender:
useEffect(() => {
if (hasMany && Array.isArray(value_0)) {
setValueToRender(value_0.map((val, index) => {
return {
id: `${val}${index}`,
label: `${val}`,
value: {
// React-select automatically uses "label-value" as a key, so we will get that react duplicate key warning if we just pass in the value as multiple values can be the same. So we need to append the index to the toString() of the value to avoid that warning, as it uses that as the key.
toString: () => `${val}${index}`,
value: val?.value || val
}
};
}));
}
}, [value_0, hasMany]);
const styles = useMemo(() => mergeFieldStyles(field), [field]);
return /*#__PURE__*/_jsx(TextInput, {
AfterInput: AfterInput,
BeforeInput: BeforeInput,
className: className,
Description: Description,
description: description,
Error: Error,
hasMany: hasMany,
htmlAttributes: {
autoComplete: autoComplete || undefined
},
inputRef: inputRef,
Label: Label,
label: label,
localized: localized,
maxRows: maxRows,
minRows: minRows,
onChange: hasMany ? handleHasManyChange : e => {
setValue(e.target.value);
},
path: path,
placeholder: placeholder,
readOnly: readOnly || disabled,
required: required,
rtl: renderRTL,
showError: showError,
style: styles,
value: value_0 || '',
valueToRender: valueToRender
});
};
export const TextField = withCondition(TextFieldComponent);
//# sourceMappingURL=index.js.map
@@ -0,0 +1,170 @@
/**
*
* client
*
*/
import { isObject } from './utils.mjs';
/** This file is the entry point for browsers, re-export common elements. */
export * from './common.mjs';
/**
* Creates a disposable GraphQL over HTTP client to transmit
* GraphQL operation results.
*
* @category Client
*/
export function createClient(options) {
const { credentials = 'same-origin', referrer, referrerPolicy, shouldRetry = () => false, } = options;
const fetchFn = (options.fetchFn || fetch);
const AbortControllerImpl = (options.abortControllerImpl ||
AbortController);
// we dont use yet another AbortController here because of
// node's max EventEmitters listeners being only 10
const client = (() => {
let disposed = false;
const listeners = [];
return {
get disposed() {
return disposed;
},
onDispose(cb) {
if (disposed) {
// empty the call stack and then call the cb
setTimeout(() => cb(), 0);
return () => {
// noop
};
}
listeners.push(cb);
return () => {
listeners.splice(listeners.indexOf(cb), 1);
};
},
dispose() {
if (disposed)
return;
disposed = true;
// we copy the listeners so that onDispose unlistens dont "pull the rug under our feet"
for (const listener of [...listeners]) {
listener();
}
},
};
})();
return {
subscribe(request, sink) {
if (client.disposed)
throw new Error('Client has been disposed');
const control = new AbortControllerImpl();
const unlisten = client.onDispose(() => {
unlisten();
control.abort();
});
(async () => {
var _a;
let retryingErr = null, retries = 0;
for (;;) {
if (retryingErr) {
const should = await shouldRetry(retryingErr, retries);
// requst might've been canceled while waiting for retry
if (control.signal.aborted)
return;
if (!should)
throw retryingErr;
retries++;
}
try {
const url = typeof options.url === 'function'
? await options.url(request)
: options.url;
if (control.signal.aborted)
return;
const headers = typeof options.headers === 'function'
? await options.headers()
: (_a = options.headers) !== null && _a !== void 0 ? _a : {};
if (control.signal.aborted)
return;
let res;
try {
res = await fetchFn(url, {
signal: control.signal,
method: 'POST',
headers: Object.assign(Object.assign({}, headers), { 'content-type': 'application/json; charset=utf-8', accept: 'application/graphql-response+json, application/json' }),
credentials,
referrer,
referrerPolicy,
body: JSON.stringify(request),
});
}
catch (err) {
throw new NetworkError(err);
}
if (!res.ok)
throw new NetworkError(res);
if (!res.body)
throw new Error('Missing response body');
const contentType = res.headers.get('content-type');
if (!contentType)
throw new Error('Missing response content-type');
if (!contentType.includes('application/graphql-response+json') &&
!contentType.includes('application/json')) {
throw new Error(`Unsupported response content-type ${contentType}`);
}
const result = await res.json();
// eslint-disable-next-line @typescript-eslint/no-explicit-any
sink.next(result);
return control.abort();
}
catch (err) {
if (control.signal.aborted)
return;
// all non-network errors are worth reporting immediately
if (!(err instanceof NetworkError))
throw err;
// try again
retryingErr = err;
}
}
})()
.then(() => sink.complete())
.catch((err) => sink.error(err));
return () => control.abort();
},
dispose() {
client.dispose();
},
};
}
/**
* A network error caused by the client or an unexpected response from the server.
*
* To avoid bundling DOM typings (because the client can run in Node env too),
* you should supply the `Response` generic depending on your Fetch implementation.
*
* @category Client
*/
export class NetworkError extends Error {
constructor(msgOrErrOrResponse) {
let message, response;
if (isResponseLike(msgOrErrOrResponse)) {
response = msgOrErrOrResponse;
message =
'Server responded with ' +
msgOrErrOrResponse.status +
': ' +
msgOrErrOrResponse.statusText;
}
else if (msgOrErrOrResponse instanceof Error)
message = msgOrErrOrResponse.message;
else
message = String(msgOrErrOrResponse);
super(message);
this.name = this.constructor.name;
this.response = response;
}
}
function isResponseLike(val) {
return (isObject(val) &&
typeof val['ok'] === 'boolean' &&
typeof val['status'] === 'number' &&
typeof val['statusText'] === 'string');
}
@@ -0,0 +1 @@
{"version":3,"file":"parse-proxy-response.js","sourceRoot":"","sources":["../src/parse-proxy-response.ts"],"names":[],"mappings":";;;;;AAAA,kDAAgC;AAGhC,MAAM,KAAK,GAAG,eAAW,CAAC,wCAAwC,CAAC,CAAC;AAOpE,SAAwB,kBAAkB,CACzC,MAAgB;IAEhB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACtC,+EAA+E;QAC/E,gFAAgF;QAChF,8EAA8E;QAC9E,8BAA8B;QAC9B,IAAI,aAAa,GAAG,CAAC,CAAC;QACtB,MAAM,OAAO,GAAa,EAAE,CAAC;QAE7B,SAAS,IAAI;YACZ,MAAM,CAAC,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC;YACxB,IAAI,CAAC;gBAAE,MAAM,CAAC,CAAC,CAAC,CAAC;;gBACZ,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;QACpC,CAAC;QAED,SAAS,OAAO;YACf,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;YACpC,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YACxC,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YACxC,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;QACzC,CAAC;QAED,SAAS,OAAO,CAAC,GAAW;YAC3B,KAAK,CAAC,sBAAsB,EAAE,GAAG,CAAC,CAAC;QACpC,CAAC;QAED,SAAS,KAAK;YACb,KAAK,CAAC,OAAO,CAAC,CAAC;QAChB,CAAC;QAED,SAAS,OAAO,CAAC,GAAU;YAC1B,OAAO,EAAE,CAAC;YACV,KAAK,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC;YACzB,MAAM,CAAC,GAAG,CAAC,CAAC;QACb,CAAC;QAED,SAAS,MAAM,CAAC,CAAS;YACxB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAChB,aAAa,IAAI,CAAC,CAAC,MAAM,CAAC;YAE1B,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;YACvD,MAAM,YAAY,GAAG,QAAQ,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;YAElD,IAAI,YAAY,KAAK,CAAC,CAAC,EAAE;gBACxB,iBAAiB;gBACjB,KAAK,CAAC,8CAA8C,CAAC,CAAC;gBACtD,IAAI,EAAE,CAAC;gBACP,OAAO;aACP;YAED,MAAM,SAAS,GAAG,QAAQ,CAAC,QAAQ,CAClC,OAAO,EACP,CAAC,EACD,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,CACxB,CAAC;YACF,MAAM,UAAU,GAAG,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;YAC5C,KAAK,CAAC,+BAA+B,EAAE,SAAS,CAAC,CAAC;YAClD,OAAO,CAAC;gBACP,UAAU;gBACV,QAAQ;aACR,CAAC,CAAC;QACJ,CAAC;QAED,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC5B,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC5B,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QAExB,IAAI,EAAE,CAAC;IACR,CAAC,CAAC,CAAC;AACJ,CAAC;AAvED,qCAuEC"}
@@ -0,0 +1,58 @@
"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 checks_exports = {};
__export(checks_exports, {
Check: () => Check,
CheckBuilder: () => CheckBuilder,
check: () => check
});
module.exports = __toCommonJS(checks_exports);
var import_entity = require("../entity.cjs");
class CheckBuilder {
constructor(name, value) {
this.name = name;
this.value = value;
}
static [import_entity.entityKind] = "MySqlCheckBuilder";
brand;
/** @internal */
build(table) {
return new Check(table, this);
}
}
class Check {
constructor(table, builder) {
this.table = table;
this.name = builder.name;
this.value = builder.value;
}
static [import_entity.entityKind] = "MySqlCheck";
name;
value;
}
function check(name, value) {
return new CheckBuilder(name, value);
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
Check,
CheckBuilder,
check
});
//# sourceMappingURL=checks.cjs.map
@@ -0,0 +1,433 @@
import * as parseley from 'parseley';
import { compareSpecificity } from 'parseley';
var Ast = /*#__PURE__*/Object.freeze({
__proto__: null
});
var Types = /*#__PURE__*/Object.freeze({
__proto__: null
});
const treeify = (nodes) => '▽\n' + treeifyArray(nodes, thinLines);
const thinLines = [['├─', '│ '], ['└─', ' ']];
const heavyLines = [['┠─', '┃ '], ['┖─', ' ']];
const doubleLines = [['╟─', '║ '], ['╙─', ' ']];
function treeifyArray(nodes, tpl = heavyLines) {
return prefixItems(tpl, nodes.map(n => treeifyNode(n)));
}
function treeifyNode(node) {
switch (node.type) {
case 'terminal': {
const vctr = node.valueContainer;
return `◁ #${vctr.index} ${JSON.stringify(vctr.specificity)} ${vctr.value}`;
}
case 'tagName':
return `◻ Tag name\n${treeifyArray(node.variants, doubleLines)}`;
case 'attrValue':
return `▣ Attr value: ${node.name}\n${treeifyArray(node.matchers, doubleLines)}`;
case 'attrPresence':
return `◨ Attr presence: ${node.name}\n${treeifyArray(node.cont)}`;
case 'pushElement':
return `◉ Push element: ${node.combinator}\n${treeifyArray(node.cont, thinLines)}`;
case 'popElement':
return `◌ Pop element\n${treeifyArray(node.cont, thinLines)}`;
case 'variant':
return `◇ = ${node.value}\n${treeifyArray(node.cont)}`;
case 'matcher':
return `◈ ${node.matcher} "${node.value}"${node.modifier || ''}\n${treeifyArray(node.cont)}`;
}
}
function prefixItems(tpl, items) {
return items
.map((item, i, { length }) => prefixItem(tpl, item, i === length - 1))
.join('\n');
}
function prefixItem(tpl, item, tail = true) {
const tpl1 = tpl[tail ? 1 : 0];
return tpl1[0] + item.split('\n').join('\n' + tpl1[1]);
}
var TreeifyBuilder = /*#__PURE__*/Object.freeze({
__proto__: null,
treeify: treeify
});
class DecisionTree {
constructor(input) {
this.branches = weave(toAstTerminalPairs(input));
}
build(builder) {
return builder(this.branches);
}
}
function toAstTerminalPairs(array) {
const len = array.length;
const results = new Array(len);
for (let i = 0; i < len; i++) {
const [selectorString, val] = array[i];
const ast = preprocess(parseley.parse1(selectorString));
results[i] = {
ast: ast,
terminal: {
type: 'terminal',
valueContainer: { index: i, value: val, specificity: ast.specificity }
}
};
}
return results;
}
function preprocess(ast) {
reduceSelectorVariants(ast);
parseley.normalize(ast);
return ast;
}
function reduceSelectorVariants(ast) {
const newList = [];
ast.list.forEach(sel => {
switch (sel.type) {
case 'class':
newList.push({
matcher: '~=',
modifier: null,
name: 'class',
namespace: null,
specificity: sel.specificity,
type: 'attrValue',
value: sel.name,
});
break;
case 'id':
newList.push({
matcher: '=',
modifier: null,
name: 'id',
namespace: null,
specificity: sel.specificity,
type: 'attrValue',
value: sel.name,
});
break;
case 'combinator':
reduceSelectorVariants(sel.left);
newList.push(sel);
break;
case 'universal':
break;
default:
newList.push(sel);
break;
}
});
ast.list = newList;
}
function weave(items) {
const branches = [];
while (items.length) {
const topKind = findTopKey(items, (sel) => true, getSelectorKind);
const { matches, nonmatches, empty } = breakByKind(items, topKind);
items = nonmatches;
if (matches.length) {
branches.push(branchOfKind(topKind, matches));
}
if (empty.length) {
branches.push(...terminate(empty));
}
}
return branches;
}
function terminate(items) {
const results = [];
for (const item of items) {
const terminal = item.terminal;
if (terminal.type === 'terminal') {
results.push(terminal);
}
else {
const { matches, rest } = partition(terminal.cont, (node) => node.type === 'terminal');
matches.forEach((node) => results.push(node));
if (rest.length) {
terminal.cont = rest;
results.push(terminal);
}
}
}
return results;
}
function breakByKind(items, selectedKind) {
const matches = [];
const nonmatches = [];
const empty = [];
for (const item of items) {
const simpsels = item.ast.list;
if (simpsels.length) {
const isMatch = simpsels.some(node => getSelectorKind(node) === selectedKind);
(isMatch ? matches : nonmatches).push(item);
}
else {
empty.push(item);
}
}
return { matches, nonmatches, empty };
}
function getSelectorKind(sel) {
switch (sel.type) {
case 'attrPresence':
return `attrPresence ${sel.name}`;
case 'attrValue':
return `attrValue ${sel.name}`;
case 'combinator':
return `combinator ${sel.combinator}`;
default:
return sel.type;
}
}
function branchOfKind(kind, items) {
if (kind === 'tag') {
return tagNameBranch(items);
}
if (kind.startsWith('attrValue ')) {
return attrValueBranch(kind.substring(10), items);
}
if (kind.startsWith('attrPresence ')) {
return attrPresenceBranch(kind.substring(13), items);
}
if (kind === 'combinator >') {
return combinatorBranch('>', items);
}
if (kind === 'combinator +') {
return combinatorBranch('+', items);
}
throw new Error(`Unsupported selector kind: ${kind}`);
}
function tagNameBranch(items) {
const groups = spliceAndGroup(items, (x) => x.type === 'tag', (x) => x.name);
const variants = Object.entries(groups).map(([name, group]) => ({
type: 'variant',
value: name,
cont: weave(group.items)
}));
return {
type: 'tagName',
variants: variants
};
}
function attrPresenceBranch(name, items) {
for (const item of items) {
spliceSimpleSelector(item, (x) => (x.type === 'attrPresence') && (x.name === name));
}
return {
type: 'attrPresence',
name: name,
cont: weave(items)
};
}
function attrValueBranch(name, items) {
const groups = spliceAndGroup(items, (x) => (x.type === 'attrValue') && (x.name === name), (x) => `${x.matcher} ${x.modifier || ''} ${x.value}`);
const matchers = [];
for (const group of Object.values(groups)) {
const sel = group.oneSimpleSelector;
const predicate = getAttrPredicate(sel);
const continuation = weave(group.items);
matchers.push({
type: 'matcher',
matcher: sel.matcher,
modifier: sel.modifier,
value: sel.value,
predicate: predicate,
cont: continuation
});
}
return {
type: 'attrValue',
name: name,
matchers: matchers
};
}
function getAttrPredicate(sel) {
if (sel.modifier === 'i') {
const expected = sel.value.toLowerCase();
switch (sel.matcher) {
case '=':
return (actual) => expected === actual.toLowerCase();
case '~=':
return (actual) => actual.toLowerCase().split(/[ \t]+/).includes(expected);
case '^=':
return (actual) => actual.toLowerCase().startsWith(expected);
case '$=':
return (actual) => actual.toLowerCase().endsWith(expected);
case '*=':
return (actual) => actual.toLowerCase().includes(expected);
case '|=':
return (actual) => {
const lower = actual.toLowerCase();
return (expected === lower) || (lower.startsWith(expected) && lower[expected.length] === '-');
};
}
}
else {
const expected = sel.value;
switch (sel.matcher) {
case '=':
return (actual) => expected === actual;
case '~=':
return (actual) => actual.split(/[ \t]+/).includes(expected);
case '^=':
return (actual) => actual.startsWith(expected);
case '$=':
return (actual) => actual.endsWith(expected);
case '*=':
return (actual) => actual.includes(expected);
case '|=':
return (actual) => (expected === actual) || (actual.startsWith(expected) && actual[expected.length] === '-');
}
}
}
function combinatorBranch(combinator, items) {
const groups = spliceAndGroup(items, (x) => (x.type === 'combinator') && (x.combinator === combinator), (x) => parseley.serialize(x.left));
const leftItems = [];
for (const group of Object.values(groups)) {
const rightCont = weave(group.items);
const leftAst = group.oneSimpleSelector.left;
leftItems.push({
ast: leftAst,
terminal: { type: 'popElement', cont: rightCont }
});
}
return {
type: 'pushElement',
combinator: combinator,
cont: weave(leftItems)
};
}
function spliceAndGroup(items, predicate, keyCallback) {
const groups = {};
while (items.length) {
const bestKey = findTopKey(items, predicate, keyCallback);
const bestKeyPredicate = (sel) => predicate(sel) && keyCallback(sel) === bestKey;
const hasBestKeyPredicate = (item) => item.ast.list.some(bestKeyPredicate);
const { matches, rest } = partition1(items, hasBestKeyPredicate);
let oneSimpleSelector = null;
for (const item of matches) {
const splicedNode = spliceSimpleSelector(item, bestKeyPredicate);
if (!oneSimpleSelector) {
oneSimpleSelector = splicedNode;
}
}
if (oneSimpleSelector == null) {
throw new Error('No simple selector is found.');
}
groups[bestKey] = { oneSimpleSelector: oneSimpleSelector, items: matches };
items = rest;
}
return groups;
}
function spliceSimpleSelector(item, predicate) {
const simpsels = item.ast.list;
const matches = new Array(simpsels.length);
let firstIndex = -1;
for (let i = simpsels.length; i-- > 0;) {
if (predicate(simpsels[i])) {
matches[i] = true;
firstIndex = i;
}
}
if (firstIndex == -1) {
throw new Error(`Couldn't find the required simple selector.`);
}
const result = simpsels[firstIndex];
item.ast.list = simpsels.filter((sel, i) => !matches[i]);
return result;
}
function findTopKey(items, predicate, keyCallback) {
const candidates = {};
for (const item of items) {
const candidates1 = {};
for (const node of item.ast.list.filter(predicate)) {
candidates1[keyCallback(node)] = true;
}
for (const key of Object.keys(candidates1)) {
if (candidates[key]) {
candidates[key]++;
}
else {
candidates[key] = 1;
}
}
}
let topKind = '';
let topCounter = 0;
for (const entry of Object.entries(candidates)) {
if (entry[1] > topCounter) {
topKind = entry[0];
topCounter = entry[1];
}
}
return topKind;
}
function partition(src, predicate) {
const matches = [];
const rest = [];
for (const x of src) {
if (predicate(x)) {
matches.push(x);
}
else {
rest.push(x);
}
}
return { matches, rest };
}
function partition1(src, predicate) {
const matches = [];
const rest = [];
for (const x of src) {
if (predicate(x)) {
matches.push(x);
}
else {
rest.push(x);
}
}
return { matches, rest };
}
class Picker {
constructor(f) {
this.f = f;
}
pickAll(el) {
return this.f(el);
}
pick1(el, preferFirst = false) {
const results = this.f(el);
const len = results.length;
if (len === 0) {
return null;
}
if (len === 1) {
return results[0].value;
}
const comparator = (preferFirst)
? comparatorPreferFirst
: comparatorPreferLast;
let result = results[0];
for (let i = 1; i < len; i++) {
const next = results[i];
if (comparator(result, next)) {
result = next;
}
}
return result.value;
}
}
function comparatorPreferFirst(acc, next) {
const diff = compareSpecificity(next.specificity, acc.specificity);
return diff > 0 || (diff === 0 && next.index < acc.index);
}
function comparatorPreferLast(acc, next) {
const diff = compareSpecificity(next.specificity, acc.specificity);
return diff > 0 || (diff === 0 && next.index > acc.index);
}
export { Ast, DecisionTree, Picker, TreeifyBuilder as Treeify, Types };
@@ -0,0 +1,7 @@
/*
* This file was automatically generated.
* DO NOT MODIFY BY HAND.
* Run `yarn fix:special` to update
*/
declare const check: (options: import("../../declarations/plugins/DllPlugin").DllPluginOptions) => boolean;
export = check;
@@ -0,0 +1,533 @@
(() => {
var _window$dateFns;function _typeof(o) {"@babel/helpers - typeof";return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {return typeof o;} : function (o) {return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;}, _typeof(o);}function ownKeys(e, r) {var t = Object.keys(e);if (Object.getOwnPropertySymbols) {var o = Object.getOwnPropertySymbols(e);r && (o = o.filter(function (r) {return Object.getOwnPropertyDescriptor(e, r).enumerable;})), t.push.apply(t, o);}return t;}function _objectSpread(e) {for (var r = 1; r < arguments.length; r++) {var t = null != arguments[r] ? arguments[r] : {};r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {_defineProperty(e, r, t[r]);}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));});}return e;}function _defineProperty(obj, key, value) {key = _toPropertyKey(key);if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}function _toPropertyKey(t) {var i = _toPrimitive(t, "string");return "symbol" == _typeof(i) ? i : String(i);}function _toPrimitive(t, r) {if ("object" != _typeof(t) || !t) return t;var e = t[Symbol.toPrimitive];if (void 0 !== e) {var i = e.call(t, r || "default");if ("object" != _typeof(i)) return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return ("string" === r ? String : Number)(t);}var __defProp = Object.defineProperty;
var __export = function __export(target, all) {
for (var name in all)
__defProp(target, name, {
get: all[name],
enumerable: true,
configurable: true,
set: function set(newValue) {return all[name] = function () {return newValue;};}
});
};
// lib/locale/ja/_lib/formatDistance.js
var formatDistanceLocale = {
lessThanXSeconds: {
one: "1\u79D2\u672A\u6E80",
other: "{{count}}\u79D2\u672A\u6E80",
oneWithSuffix: "\u7D041\u79D2",
otherWithSuffix: "\u7D04{{count}}\u79D2"
},
xSeconds: {
one: "1\u79D2",
other: "{{count}}\u79D2"
},
halfAMinute: "30\u79D2",
lessThanXMinutes: {
one: "1\u5206\u672A\u6E80",
other: "{{count}}\u5206\u672A\u6E80",
oneWithSuffix: "\u7D041\u5206",
otherWithSuffix: "\u7D04{{count}}\u5206"
},
xMinutes: {
one: "1\u5206",
other: "{{count}}\u5206"
},
aboutXHours: {
one: "\u7D041\u6642\u9593",
other: "\u7D04{{count}}\u6642\u9593"
},
xHours: {
one: "1\u6642\u9593",
other: "{{count}}\u6642\u9593"
},
xDays: {
one: "1\u65E5",
other: "{{count}}\u65E5"
},
aboutXWeeks: {
one: "\u7D041\u9031\u9593",
other: "\u7D04{{count}}\u9031\u9593"
},
xWeeks: {
one: "1\u9031\u9593",
other: "{{count}}\u9031\u9593"
},
aboutXMonths: {
one: "\u7D041\u304B\u6708",
other: "\u7D04{{count}}\u304B\u6708"
},
xMonths: {
one: "1\u304B\u6708",
other: "{{count}}\u304B\u6708"
},
aboutXYears: {
one: "\u7D041\u5E74",
other: "\u7D04{{count}}\u5E74"
},
xYears: {
one: "1\u5E74",
other: "{{count}}\u5E74"
},
overXYears: {
one: "1\u5E74\u4EE5\u4E0A",
other: "{{count}}\u5E74\u4EE5\u4E0A"
},
almostXYears: {
one: "1\u5E74\u8FD1\u304F",
other: "{{count}}\u5E74\u8FD1\u304F"
}
};
var formatDistance = function formatDistance(token, count, options) {
options = options || {};
var result;
var tokenValue = formatDistanceLocale[token];
if (typeof tokenValue === "string") {
result = tokenValue;
} else if (count === 1) {
if (options.addSuffix && tokenValue.oneWithSuffix) {
result = tokenValue.oneWithSuffix;
} else {
result = tokenValue.one;
}
} else {
if (options.addSuffix && tokenValue.otherWithSuffix) {
result = tokenValue.otherWithSuffix.replace("{{count}}", String(count));
} else {
result = tokenValue.other.replace("{{count}}", String(count));
}
}
if (options.addSuffix) {
if (options.comparison && options.comparison > 0) {
return result + "\u5F8C";
} else {
return result + "\u524D";
}
}
return result;
};
// lib/locale/_lib/buildFormatLongFn.js
function buildFormatLongFn(args) {
return function () {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var width = options.width ? String(options.width) : args.defaultWidth;
var format = args.formats[width] || args.formats[args.defaultWidth];
return format;
};
}
// lib/locale/ja/_lib/formatLong.js
var dateFormats = {
full: "y\u5E74M\u6708d\u65E5EEEE",
long: "y\u5E74M\u6708d\u65E5",
medium: "y/MM/dd",
short: "y/MM/dd"
};
var timeFormats = {
full: "H\u6642mm\u5206ss\u79D2 zzzz",
long: "H:mm:ss z",
medium: "H:mm:ss",
short: "H:mm"
};
var dateTimeFormats = {
full: "{{date}} {{time}}",
long: "{{date}} {{time}}",
medium: "{{date}} {{time}}",
short: "{{date}} {{time}}"
};
var formatLong = {
date: buildFormatLongFn({
formats: dateFormats,
defaultWidth: "full"
}),
time: buildFormatLongFn({
formats: timeFormats,
defaultWidth: "full"
}),
dateTime: buildFormatLongFn({
formats: dateTimeFormats,
defaultWidth: "full"
})
};
// lib/locale/ja/_lib/formatRelative.js
var formatRelativeLocale = {
lastWeek: "\u5148\u9031\u306Eeeee\u306Ep",
yesterday: "\u6628\u65E5\u306Ep",
today: "\u4ECA\u65E5\u306Ep",
tomorrow: "\u660E\u65E5\u306Ep",
nextWeek: "\u7FCC\u9031\u306Eeeee\u306Ep",
other: "P"
};
var formatRelative = function formatRelative(token, _date, _baseDate, _options) {
return formatRelativeLocale[token];
};
// lib/locale/_lib/buildLocalizeFn.js
function buildLocalizeFn(args) {
return function (value, options) {
var context = options !== null && options !== void 0 && options.context ? String(options.context) : "standalone";
var valuesArray;
if (context === "formatting" && args.formattingValues) {
var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;
valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
} else {
var _defaultWidth = args.defaultWidth;
var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;
valuesArray = args.values[_width] || args.values[_defaultWidth];
}
var index = args.argumentCallback ? args.argumentCallback(value) : value;
return valuesArray[index];
};
}
// lib/locale/ja/_lib/localize.js
var eraValues = {
narrow: ["BC", "AC"],
abbreviated: ["\u7D00\u5143\u524D", "\u897F\u66A6"],
wide: ["\u7D00\u5143\u524D", "\u897F\u66A6"]
};
var quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
wide: ["\u7B2C1\u56DB\u534A\u671F", "\u7B2C2\u56DB\u534A\u671F", "\u7B2C3\u56DB\u534A\u671F", "\u7B2C4\u56DB\u534A\u671F"]
};
var monthValues = {
narrow: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"],
abbreviated: [
"1\u6708",
"2\u6708",
"3\u6708",
"4\u6708",
"5\u6708",
"6\u6708",
"7\u6708",
"8\u6708",
"9\u6708",
"10\u6708",
"11\u6708",
"12\u6708"],
wide: [
"1\u6708",
"2\u6708",
"3\u6708",
"4\u6708",
"5\u6708",
"6\u6708",
"7\u6708",
"8\u6708",
"9\u6708",
"10\u6708",
"11\u6708",
"12\u6708"]
};
var dayValues = {
narrow: ["\u65E5", "\u6708", "\u706B", "\u6C34", "\u6728", "\u91D1", "\u571F"],
short: ["\u65E5", "\u6708", "\u706B", "\u6C34", "\u6728", "\u91D1", "\u571F"],
abbreviated: ["\u65E5", "\u6708", "\u706B", "\u6C34", "\u6728", "\u91D1", "\u571F"],
wide: ["\u65E5\u66DC\u65E5", "\u6708\u66DC\u65E5", "\u706B\u66DC\u65E5", "\u6C34\u66DC\u65E5", "\u6728\u66DC\u65E5", "\u91D1\u66DC\u65E5", "\u571F\u66DC\u65E5"]
};
var dayPeriodValues = {
narrow: {
am: "\u5348\u524D",
pm: "\u5348\u5F8C",
midnight: "\u6DF1\u591C",
noon: "\u6B63\u5348",
morning: "\u671D",
afternoon: "\u5348\u5F8C",
evening: "\u591C",
night: "\u6DF1\u591C"
},
abbreviated: {
am: "\u5348\u524D",
pm: "\u5348\u5F8C",
midnight: "\u6DF1\u591C",
noon: "\u6B63\u5348",
morning: "\u671D",
afternoon: "\u5348\u5F8C",
evening: "\u591C",
night: "\u6DF1\u591C"
},
wide: {
am: "\u5348\u524D",
pm: "\u5348\u5F8C",
midnight: "\u6DF1\u591C",
noon: "\u6B63\u5348",
morning: "\u671D",
afternoon: "\u5348\u5F8C",
evening: "\u591C",
night: "\u6DF1\u591C"
}
};
var formattingDayPeriodValues = {
narrow: {
am: "\u5348\u524D",
pm: "\u5348\u5F8C",
midnight: "\u6DF1\u591C",
noon: "\u6B63\u5348",
morning: "\u671D",
afternoon: "\u5348\u5F8C",
evening: "\u591C",
night: "\u6DF1\u591C"
},
abbreviated: {
am: "\u5348\u524D",
pm: "\u5348\u5F8C",
midnight: "\u6DF1\u591C",
noon: "\u6B63\u5348",
morning: "\u671D",
afternoon: "\u5348\u5F8C",
evening: "\u591C",
night: "\u6DF1\u591C"
},
wide: {
am: "\u5348\u524D",
pm: "\u5348\u5F8C",
midnight: "\u6DF1\u591C",
noon: "\u6B63\u5348",
morning: "\u671D",
afternoon: "\u5348\u5F8C",
evening: "\u591C",
night: "\u6DF1\u591C"
}
};
var ordinalNumber = function ordinalNumber(dirtyNumber, options) {
var number = Number(dirtyNumber);
var unit = String(options === null || options === void 0 ? void 0 : options.unit);
switch (unit) {
case "year":
return "".concat(number, "\u5E74");
case "quarter":
return "\u7B2C".concat(number, "\u56DB\u534A\u671F");
case "month":
return "".concat(number, "\u6708");
case "week":
return "\u7B2C".concat(number, "\u9031");
case "date":
return "".concat(number, "\u65E5");
case "hour":
return "".concat(number, "\u6642");
case "minute":
return "".concat(number, "\u5206");
case "second":
return "".concat(number, "\u79D2");
default:
return "".concat(number);
}
};
var localize = {
ordinalNumber: ordinalNumber,
era: buildLocalizeFn({
values: eraValues,
defaultWidth: "wide"
}),
quarter: buildLocalizeFn({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: function argumentCallback(quarter) {return Number(quarter) - 1;}
}),
month: buildLocalizeFn({
values: monthValues,
defaultWidth: "wide"
}),
day: buildLocalizeFn({
values: dayValues,
defaultWidth: "wide"
}),
dayPeriod: buildLocalizeFn({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide"
})
};
// lib/locale/_lib/buildMatchPatternFn.js
function buildMatchPatternFn(args) {
return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var matchResult = string.match(args.matchPattern);
if (!matchResult)
return null;
var matchedString = matchResult[0];
var parseResult = string.match(args.parsePattern);
if (!parseResult)
return null;
var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
value = options.valueCallback ? options.valueCallback(value) : value;
var rest = string.slice(matchedString.length);
return { value: value, rest: rest };
};
}
// lib/locale/_lib/buildMatchFn.js
function buildMatchFn(args) {
return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var width = options.width;
var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
var matchResult = string.match(matchPattern);
if (!matchResult) {
return null;
}
var matchedString = matchResult[0];
var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) {return pattern.test(matchedString);}) : findKey(parsePatterns, function (pattern) {return pattern.test(matchedString);});
var value;
value = args.valueCallback ? args.valueCallback(key) : key;
value = options.valueCallback ? options.valueCallback(value) : value;
var rest = string.slice(matchedString.length);
return { value: value, rest: rest };
};
}
function findKey(object, predicate) {
for (var key in object) {
if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) {
return key;
}
}
return;
}
function findIndex(array, predicate) {
for (var key = 0; key < array.length; key++) {
if (predicate(array[key])) {
return key;
}
}
return;
}
// lib/locale/ja/_lib/match.js
var matchOrdinalNumberPattern = /^第?\d+(年|四半期|月|週|日|時|分|秒)?/i;
var parseOrdinalNumberPattern = /\d+/i;
var matchEraPatterns = {
narrow: /^(B\.?C\.?|A\.?D\.?)/i,
abbreviated: /^(紀元[前後]|西暦)/i,
wide: /^(紀元[前後]|西暦)/i
};
var parseEraPatterns = {
narrow: [/^B/i, /^A/i],
any: [/^(紀元前)/i, /^(西暦|紀元後)/i]
};
var matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^Q[1234]/i,
wide: /^第[1234一二三四1234]四半期/i
};
var parseQuarterPatterns = {
any: [/(1|一|1)/i, /(2|二|2)/i, /(3|三|3)/i, /(4|四|4)/i]
};
var matchMonthPatterns = {
narrow: /^([123456789]|1[012])/,
abbreviated: /^([123456789]|1[012])月/i,
wide: /^([123456789]|1[012])月/i
};
var parseMonthPatterns = {
any: [
/^1\D/,
/^2/,
/^3/,
/^4/,
/^5/,
/^6/,
/^7/,
/^8/,
/^9/,
/^10/,
/^11/,
/^12/]
};
var matchDayPatterns = {
narrow: /^[日月火水木金土]/,
short: /^[日月火水木金土]/,
abbreviated: /^[日月火水木金土]/,
wide: /^[日月火水木金土]曜日/
};
var parseDayPatterns = {
any: [/^日/, /^月/, /^火/, /^水/, /^木/, /^金/, /^土/]
};
var matchDayPeriodPatterns = {
any: /^(AM|PM|午前|午後|正午|深夜|真夜中|夜|朝)/i
};
var parseDayPeriodPatterns = {
any: {
am: /^(A|午前)/i,
pm: /^(P|午後)/i,
midnight: /^深夜|真夜中/i,
noon: /^正午/i,
morning: /^朝/i,
afternoon: /^午後/i,
evening: /^夜/i,
night: /^深夜/i
}
};
var match = {
ordinalNumber: buildMatchPatternFn({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: function valueCallback(value) {
return parseInt(value, 10);
}
}),
era: buildMatchFn({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any"
}),
quarter: buildMatchFn({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: function valueCallback(index) {return index + 1;}
}),
month: buildMatchFn({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any"
}),
day: buildMatchFn({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any"
}),
dayPeriod: buildMatchFn({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any"
})
};
// lib/locale/ja.js
var ja = {
code: "ja",
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
options: {
weekStartsOn: 0,
firstWeekContainsDate: 1
}
};
// lib/locale/ja/cdn.js
window.dateFns = _objectSpread(_objectSpread({},
window.dateFns), {}, {
locale: _objectSpread(_objectSpread({}, (_window$dateFns =
window.dateFns) === null || _window$dateFns === void 0 ? void 0 : _window$dateFns.locale), {}, {
ja: ja }) });
//# debugId=9EA6FEDE7BE31FCC64756E2164756E21
//# sourceMappingURL=cdn.js.map
})();
@@ -0,0 +1 @@
{"version":3,"file":"singleton.cjs","names":[],"sources":["../../../../src/rest/commands/update/singleton.ts"],"sourcesContent":["import type {\n\tApplyQueryFields,\n\tCollectionType,\n\tNestedPartial,\n\tQuery,\n\tSingletonCollections,\n} from '../../../types/index.js';\nimport type { RestCommand } from '../../types.js';\nimport { throwIfCoreCollection, throwIfEmpty } from '../../utils/index.js';\n\nexport type UpdateSingletonOutput<\n\tSchema,\n\tCollection extends SingletonCollections<Schema>,\n\tTQuery extends Query<Schema, Schema[Collection]>,\n> = ApplyQueryFields<Schema, CollectionType<Schema, Collection>, TQuery['fields']>;\n\n/**\n * Update a singleton item\n *\n * @param collection The collection of the items\n * @param query The query parameters\n *\n * @returns An array of up to limit item objects. If no items are available, data will be an empty array.\n * @throws Will throw if collection is a core collection\n * @throws Will throw if collection is empty\n */\nexport const updateSingleton =\n\t<\n\t\tSchema,\n\t\tCollection extends SingletonCollections<Schema>,\n\t\tconst TQuery extends Query<Schema, Schema[Collection]>,\n\t\tItem = Schema[Collection],\n\t>(\n\t\tcollection: Collection,\n\t\titem: NestedPartial<Item>,\n\t\tquery?: TQuery,\n\t): RestCommand<UpdateSingletonOutput<Schema, Collection, TQuery>, Schema> =>\n\t() => {\n\t\tthrowIfEmpty(String(collection), 'Collection cannot be empty');\n\t\tthrowIfCoreCollection(collection, 'Cannot use updateSingleton for core collections');\n\n\t\treturn {\n\t\t\tpath: `/items/${collection as string}`,\n\t\t\tparams: query ?? {},\n\t\t\tbody: JSON.stringify(item),\n\t\t\tmethod: 'PATCH',\n\t\t};\n\t};\n"],"mappings":"qGA0Ba,GAOX,EACA,EACA,SAGA,EAAA,aAAa,OAAO,EAAW,CAAE,6BAA6B,CAC9D,EAAA,sBAAsB,EAAY,kDAAkD,CAE7E,CACN,KAAM,UAAU,IAChB,OAAQ,GAAS,EAAE,CACnB,KAAM,KAAK,UAAU,EAAK,CAC1B,OAAQ,QACR"}
@@ -0,0 +1,68 @@
"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 primary_keys_exports = {};
__export(primary_keys_exports, {
PrimaryKey: () => PrimaryKey,
PrimaryKeyBuilder: () => PrimaryKeyBuilder,
primaryKey: () => primaryKey
});
module.exports = __toCommonJS(primary_keys_exports);
var import_entity = require("../entity.cjs");
var import_table = require("./table.cjs");
function primaryKey(...config) {
if (config[0].columns) {
return new PrimaryKeyBuilder(config[0].columns, config[0].name);
}
return new PrimaryKeyBuilder(config);
}
class PrimaryKeyBuilder {
static [import_entity.entityKind] = "GelPrimaryKeyBuilder";
/** @internal */
columns;
/** @internal */
name;
constructor(columns, name) {
this.columns = columns;
this.name = name;
}
/** @internal */
build(table) {
return new PrimaryKey(table, this.columns, this.name);
}
}
class PrimaryKey {
constructor(table, columns, name) {
this.table = table;
this.columns = columns;
this.name = name;
}
static [import_entity.entityKind] = "GelPrimaryKey";
columns;
name;
getName() {
return this.name ?? `${this.table[import_table.GelTable.Symbol.Name]}_${this.columns.map((column) => column.name).join("_")}_pk`;
}
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
PrimaryKey,
PrimaryKeyBuilder,
primaryKey
});
//# sourceMappingURL=primary-keys.cjs.map
@@ -0,0 +1,32 @@
/**
* @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 Unlink = createLucideIcon("Unlink", [
[
"path",
{
d: "m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71",
key: "yqzxt4"
}
],
[
"path",
{
d: "m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71",
key: "4qinb0"
}
],
["line", { x1: "8", x2: "8", y1: "2", y2: "5", key: "1041cp" }],
["line", { x1: "2", x2: "5", y1: "8", y2: "8", key: "14m1p5" }],
["line", { x1: "16", x2: "16", y1: "19", y2: "22", key: "rzdirn" }],
["line", { x1: "19", x2: "22", y1: "16", y2: "16", key: "ox905f" }]
]);
export { Unlink as default };
//# sourceMappingURL=unlink.js.map
@@ -0,0 +1,21 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.visibility = void 0;
exports.visibility = {
name: 'visible',
initialValue: 'none',
prefix: false,
type: 2 /* IDENT_VALUE */,
parse: function (_context, visibility) {
switch (visibility) {
case 'hidden':
return 1 /* HIDDEN */;
case 'collapse':
return 2 /* COLLAPSE */;
case 'visible':
default:
return 0 /* VISIBLE */;
}
}
};
//# sourceMappingURL=visibility.js.map
@@ -0,0 +1,104 @@
import { defaultLocale } from "./_lib/defaultLocale.mjs";
import { getDefaultOptions } from "./_lib/defaultOptions.mjs";
/**
* The {@link formatDuration} function options.
*/
const defaultFormat = [
"years",
"months",
"weeks",
"days",
"hours",
"minutes",
"seconds",
];
/**
* @name formatDuration
* @category Common Helpers
* @summary Formats a duration in human-readable format
*
* @description
* Return human-readable duration string i.e. "9 months 2 days"
*
* @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 duration - The duration to format
* @param options - An object with options.
*
* @returns The formatted date string
*
* @example
* // Format full duration
* formatDuration({
* years: 2,
* months: 9,
* weeks: 1,
* days: 7,
* hours: 5,
* minutes: 9,
* seconds: 30
* })
* //=> '2 years 9 months 1 week 7 days 5 hours 9 minutes 30 seconds'
*
* @example
* // Format partial duration
* formatDuration({ months: 9, days: 2 })
* //=> '9 months 2 days'
*
* @example
* // Customize the format
* formatDuration(
* {
* years: 2,
* months: 9,
* weeks: 1,
* days: 7,
* hours: 5,
* minutes: 9,
* seconds: 30
* },
* { format: ['months', 'weeks'] }
* ) === '9 months 1 week'
*
* @example
* // Customize the zeros presence
* formatDuration({ years: 0, months: 9 })
* //=> '9 months'
* formatDuration({ years: 0, months: 9 }, { zero: true })
* //=> '0 years 9 months'
*
* @example
* // Customize the delimiter
* formatDuration({ years: 2, months: 9, weeks: 3 }, { delimiter: ', ' })
* //=> '2 years, 9 months, 3 weeks'
*/
export function formatDuration(duration, options) {
const defaultOptions = getDefaultOptions();
const locale = options?.locale ?? defaultOptions.locale ?? defaultLocale;
const format = options?.format ?? defaultFormat;
const zero = options?.zero ?? false;
const delimiter = options?.delimiter ?? " ";
if (!locale.formatDistance) {
return "";
}
const result = format
.reduce((acc, unit) => {
const token = `x${unit.replace(/(^.)/, (m) => m.toUpperCase())}`;
const value = duration[unit];
if (value !== undefined && (zero || duration[unit])) {
return acc.concat(locale.formatDistance(token, value));
}
return acc;
}, [])
.join(delimiter);
return result;
}
// Fallback for modularized imports:
export default formatDuration;
@@ -0,0 +1,3 @@
import { GraphQLScalarType, GraphQLScalarTypeConfig } from 'graphql';
export declare const GraphQLLCCSubclassConfig: GraphQLScalarTypeConfig<string, string>;
export declare const GraphQLLCCSubclass: GraphQLScalarType<string, string>;
@@ -0,0 +1,45 @@
var __defProp = Object.defineProperty;
var __defProps = Object.defineProperties;
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
var __objRest = (source, exclude) => {
var target = {};
for (var prop in source)
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
target[prop] = source[prop];
if (source != null && __getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(source)) {
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
target[prop] = source[prop];
}
return target;
};
// src/html.tsx
import * as React from "react";
import { jsx } from "react/jsx-runtime";
var Html = React.forwardRef(
(_a, ref) => {
var _b = _a, { children, lang = "en", dir = "ltr" } = _b, props = __objRest(_b, ["children", "lang", "dir"]);
return /* @__PURE__ */ jsx("html", __spreadProps(__spreadValues({}, props), { dir, lang, ref, children }));
}
);
Html.displayName = "Html";
export {
Html
};
@@ -0,0 +1,86 @@
'use strict'
const bench = require('fastbench')
const pino = require('../../')
const fs = require('node:fs')
const dest = fs.createWriteStream('/dev/null')
const plog = pino(dest)
delete require.cache[require.resolve('../../')]
const plogAsync = require('../../')(pino.destination({ dest: '/dev/null', sync: false }))
delete require.cache[require.resolve('../../')]
const plogUnsafe = require('../../')({ safe: false }, dest)
delete require.cache[require.resolve('../../')]
const plogUnsafeAsync = require('../../')(
{ safe: false },
pino.destination({ dest: '/dev/null', sync: false })
)
const plogRedact = pino({ redact: ['a.b.c'] }, dest)
delete require.cache[require.resolve('../../')]
const plogAsyncRedact = require('../../')(
{ redact: ['a.b.c'] },
pino.destination({ dest: '/dev/null', sync: false })
)
delete require.cache[require.resolve('../../')]
const plogUnsafeRedact = require('../../')({ redact: ['a.b.c'], safe: false }, dest)
delete require.cache[require.resolve('../../')]
const plogUnsafeAsyncRedact = require('../../')(
{ redact: ['a.b.c'], safe: false },
pino.destination({ dest: '/dev/null', sync: false })
)
const max = 10
// note that "redact me." is the same amount of bytes as the censor: "[Redacted]"
const run = bench([
function benchPinoNoRedact (cb) {
for (var i = 0; i < max; i++) {
plog.info({ a: { b: { c: 'redact me.', d: 'leave me' } } })
}
setImmediate(cb)
},
function benchPinoRedact (cb) {
for (var i = 0; i < max; i++) {
plogRedact.info({ a: { b: { c: 'redact me.', d: 'leave me' } } })
}
setImmediate(cb)
},
function benchPinoUnsafeNoRedact (cb) {
for (var i = 0; i < max; i++) {
plogUnsafe.info({ a: { b: { c: 'redact me.', d: 'leave me' } } })
}
setImmediate(cb)
},
function benchPinoUnsafeRedact (cb) {
for (var i = 0; i < max; i++) {
plogUnsafeRedact.info({ a: { b: { c: 'redact me.', d: 'leave me' } } })
}
setImmediate(cb)
},
function benchPinoAsyncNoRedact (cb) {
for (var i = 0; i < max; i++) {
plogAsync.info({ a: { b: { c: 'redact me.', d: 'leave me' } } })
}
setImmediate(cb)
},
function benchPinoAsyncRedact (cb) {
for (var i = 0; i < max; i++) {
plogAsyncRedact.info({ a: { b: { c: 'redact me.', d: 'leave me' } } })
}
setImmediate(cb)
},
function benchPinoUnsafeAsyncNoRedact (cb) {
for (var i = 0; i < max; i++) {
plogUnsafeAsync.info({ a: { b: { c: 'redact me.', d: 'leave me' } } })
}
setImmediate(cb)
},
function benchPinoUnsafeAsyncRedact (cb) {
for (var i = 0; i < max; i++) {
plogUnsafeAsyncRedact.info({ a: { b: { c: 'redact me.', d: 'leave me' } } })
}
setImmediate(cb)
}
], 10000)
run(run)
@@ -0,0 +1,28 @@
"use strict";
exports.subSeconds = subSeconds;
var _index = require("./addSeconds.cjs");
/**
* The {@link subSeconds} function options.
*/
/**
* Subtract the specified number of seconds 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).
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
*
* @param date - The date to be changed
* @param amount - The amount of seconds to be subtracted.
* @param options - The options
*
* @returns The new date with the seconds subtracted
*
* @example
* // Subtract 30 seconds from 10 July 2014 12:45:00:
* const result = subSeconds(new Date(2014, 6, 10, 12, 45, 0), 30)
* //=> Thu Jul 10 2014 12:44:30
*/
function subSeconds(date, amount, options) {
return (0, _index.addSeconds)(date, -amount, options);
}
@@ -0,0 +1,8 @@
import React from 'react';
export declare const Context: React.Context<boolean>;
export declare const RowProvider: React.FC<{
children?: React.ReactNode;
withinRow?: boolean;
}>;
export declare const useRow: () => boolean;
//# sourceMappingURL=provider.d.ts.map
@@ -0,0 +1,62 @@
{
"name": "@opentelemetry/instrumentation-knex",
"version": "0.55.0",
"description": "OpenTelemetry instrumentation for `knex` database SQL query builder",
"main": "build/src/index.js",
"types": "build/src/index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/open-telemetry/opentelemetry-js-contrib.git",
"directory": "packages/instrumentation-knex"
},
"scripts": {
"clean": "rimraf build/*",
"compile": "tsc -p .",
"compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/instrumentation-knex",
"lint:readme": "node ../../scripts/lint-readme",
"prepublishOnly": "npm run compile",
"tdd": "npm run test -- --watch-extensions ts --watch",
"test": "nyc mocha 'test/**/*.ts'",
"test-all-versions": "tav",
"version:update": "node ../../scripts/version-update.js",
"watch": "tsc -w"
},
"keywords": [
"instrumentation",
"knex",
"nodejs",
"opentelemetry",
"tracing"
],
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
"engines": {
"node": "^18.19.0 || >=20.6.0"
},
"files": [
"build/src/**/*.js",
"build/src/**/*.js.map",
"build/src/**/*.d.ts"
],
"publishConfig": {
"access": "public"
},
"peerDependencies": {
"@opentelemetry/api": "^1.3.0"
},
"devDependencies": {
"@opentelemetry/api": "^1.3.0",
"@opentelemetry/context-async-hooks": "^2.0.0",
"@opentelemetry/sdk-trace-base": "^2.0.0",
"@opentelemetry/sdk-trace-node": "^2.0.0",
"better-sqlite3": "^11.10.0",
"knex": "3.1.0",
"sqlite3": "5.1.7"
},
"dependencies": {
"@opentelemetry/instrumentation": "^0.211.0",
"@opentelemetry/semantic-conventions": "^1.33.1"
},
"homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/packages/instrumentation-knex#readme",
"gitHead": "7a5f3c0a09b6a2d32c712b2962b95137c906a016"
}
@@ -0,0 +1,9 @@
import React from 'react';
import './index.scss';
type Props = {
CustomAvatar?: React.ReactNode;
CustomIcon?: React.ReactNode;
};
export declare function AppHeader({ CustomAvatar, CustomIcon }: Props): React.JSX.Element;
export {};
//# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,2 @@
export { SortableContext, Context } from './SortableContext';
export type { Props as SortableContextProps } from './SortableContext';
@@ -0,0 +1,28 @@
/**
* @name differenceInMilliseconds
* @category Millisecond Helpers
* @summary Get the number of milliseconds between the given dates.
*
* @description
* Get the number of milliseconds between the given dates.
*
* @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 dateLeft - The later date
* @param dateRight - The earlier date
*
* @returns The number of milliseconds
*
* @example
* // How many milliseconds are between
* // 2 July 2014 12:30:20.600 and 2 July 2014 12:30:21.700?
* const result = differenceInMilliseconds(
* new Date(2014, 6, 2, 12, 30, 21, 700),
* new Date(2014, 6, 2, 12, 30, 20, 600)
* )
* //=> 1100
*/
export declare function differenceInMilliseconds<DateType extends Date>(
dateLeft: DateType | number | string,
dateRight: DateType | number | string,
): number;
@@ -0,0 +1,132 @@
#include <sys/stat.h>
#include "WasmBackend.hh"
#define CONVERT_TIME(ts) ((uint64_t)ts.tv_sec * 1000000000 + ts.tv_nsec)
void WasmBackend::start() {
notifyStarted();
}
void WasmBackend::subscribe(WatcherRef watcher) {
// Build a full directory tree recursively, and watch each directory.
std::shared_ptr<DirTree> tree = getTree(watcher);
for (auto it = tree->entries.begin(); it != tree->entries.end(); it++) {
if (it->second.isDir) {
watchDir(watcher, it->second.path, tree);
}
}
}
void WasmBackend::watchDir(WatcherRef watcher, std::string path, std::shared_ptr<DirTree> tree) {
int wd = wasm_backend_add_watch(path.c_str(), (void *)this);
std::shared_ptr<WasmSubscription> sub = std::make_shared<WasmSubscription>();
sub->tree = tree;
sub->path = path;
sub->watcher = watcher;
mSubscriptions.emplace(wd, sub);
}
extern "C" void wasm_backend_event_handler(void *backend, int wd, int type, char *filename) {
WasmBackend *b = (WasmBackend *)(backend);
b->handleEvent(wd, type, filename);
}
void WasmBackend::handleEvent(int wd, int type, char *filename) {
// Find the subscriptions for this watch descriptor
auto range = mSubscriptions.equal_range(wd);
std::unordered_set<std::shared_ptr<WasmSubscription>> set;
for (auto it = range.first; it != range.second; it++) {
set.insert(it->second);
}
for (auto it = set.begin(); it != set.end(); it++) {
if (handleSubscription(type, filename, *it)) {
(*it)->watcher->notify();
}
}
}
bool WasmBackend::handleSubscription(int type, char *filename, std::shared_ptr<WasmSubscription> sub) {
// Build full path and check if its in our ignore list.
WatcherRef watcher = sub->watcher;
std::string path = std::string(sub->path);
if (filename[0] != '\0') {
path += "/" + std::string(filename);
}
if (watcher->isIgnored(path)) {
return false;
}
if (type == 1) {
struct stat st;
stat(path.c_str(), &st);
sub->tree->update(path, CONVERT_TIME(st.st_mtim));
watcher->mEvents.update(path);
} else if (type == 2) {
// Determine if this is a create or delete depending on if the file exists or not.
struct stat st;
if (lstat(path.c_str(), &st)) {
// If the entry being deleted/moved is a directory, remove it from the list of subscriptions
DirEntry *entry = sub->tree->find(path);
if (!entry) {
return false;
}
if (entry->isDir) {
std::string pathStart = path + DIR_SEP;
for (auto it = mSubscriptions.begin(); it != mSubscriptions.end();) {
if (it->second->path == path || it->second->path.rfind(pathStart, 0) == 0) {
wasm_backend_remove_watch(it->first);
it = mSubscriptions.erase(it);
} else {
++it;
}
}
// Remove all sub-entries
for (auto it = sub->tree->entries.begin(); it != sub->tree->entries.end();) {
if (it->first.rfind(pathStart, 0) == 0) {
watcher->mEvents.remove(it->first);
it = sub->tree->entries.erase(it);
} else {
it++;
}
}
}
watcher->mEvents.remove(path);
sub->tree->remove(path);
} else if (sub->tree->find(path)) {
sub->tree->update(path, CONVERT_TIME(st.st_mtim));
watcher->mEvents.update(path);
} else {
watcher->mEvents.create(path);
// If this is a create, check if it's a directory and start watching if it is.
DirEntry *entry = sub->tree->add(path, CONVERT_TIME(st.st_mtim), S_ISDIR(st.st_mode));
if (entry->isDir) {
watchDir(watcher, path, sub->tree);
}
}
}
return true;
}
void WasmBackend::unsubscribe(WatcherRef watcher) {
// Find any subscriptions pointing to this watcher, and remove them.
for (auto it = mSubscriptions.begin(); it != mSubscriptions.end();) {
if (it->second->watcher.get() == watcher.get()) {
if (mSubscriptions.count(it->first) == 1) {
wasm_backend_remove_watch(it->first);
}
it = mSubscriptions.erase(it);
} else {
it++;
}
}
}
@@ -0,0 +1,57 @@
import { GraphQLError } from '../../error/GraphQLError.mjs';
/**
* Lone Schema definition
*
* A GraphQL document is only valid if it contains only one schema definition.
*/
export function LoneSchemaDefinitionRule(context) {
var _ref, _ref2, _oldSchema$astNode;
const oldSchema = context.getSchema();
const alreadyDefined =
(_ref =
(_ref2 =
(_oldSchema$astNode =
oldSchema === null || oldSchema === void 0
? void 0
: oldSchema.astNode) !== null && _oldSchema$astNode !== void 0
? _oldSchema$astNode
: oldSchema === null || oldSchema === void 0
? void 0
: oldSchema.getQueryType()) !== null && _ref2 !== void 0
? _ref2
: oldSchema === null || oldSchema === void 0
? void 0
: oldSchema.getMutationType()) !== null && _ref !== void 0
? _ref
: oldSchema === null || oldSchema === void 0
? void 0
: oldSchema.getSubscriptionType();
let schemaDefinitionsCount = 0;
return {
SchemaDefinition(node) {
if (alreadyDefined) {
context.reportError(
new GraphQLError(
'Cannot define a new schema within a schema extension.',
{
nodes: node,
},
),
);
return;
}
if (schemaDefinitionsCount > 0) {
context.reportError(
new GraphQLError('Must provide only one schema definition.', {
nodes: node,
}),
);
}
++schemaDefinitionsCount;
},
};
}
@@ -0,0 +1,14 @@
import { ResourceDetectionConfig } from '../../../config';
import { DetectedResource, ResourceDetector } from '../../../types';
/**
* ServiceInstanceIdDetector detects the resources related to the service instance ID.
*/
declare class ServiceInstanceIdDetector implements ResourceDetector {
detect(_config?: ResourceDetectionConfig): DetectedResource;
}
/**
* @experimental
*/
export declare const serviceInstanceIdDetector: ServiceInstanceIdDetector;
export {};
//# sourceMappingURL=ServiceInstanceIdDetector.d.ts.map
@@ -0,0 +1,34 @@
import type { ContextOptions, DateArg } from "./types.js";
/**
* The {@link previousFriday} function options.
*/
export interface PreviousFridayOptions<DateType extends Date = Date>
extends ContextOptions<DateType> {}
/**
* @name previousFriday
* @category Weekday Helpers
* @summary When is the previous Friday?
*
* @description
* When is the previous Friday?
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [UTCDate](https://github.com/date-fns/utc).
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
*
* @param date - The date to start counting from
* @param options - The options
*
* @returns The previous Friday
*
* @example
* // When is the previous Friday before Jun, 19, 2021?
* const result = previousFriday(new Date(2021, 5, 19))
* //=> Fri June 18 2021 00:00:00
*/
export declare function previousFriday<
DateType extends Date,
ResultDate extends Date = DateType,
>(
date: DateArg<DateType>,
options?: PreviousFridayOptions<ResultDate> | undefined,
): ResultDate;
@@ -0,0 +1,15 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _callSuper;
var _getPrototypeOf = require("./getPrototypeOf.js");
var _isNativeReflectConstruct = require("./isNativeReflectConstruct.js");
var _possibleConstructorReturn = require("./possibleConstructorReturn.js");
function _callSuper(_this, derived, args) {
derived = (0, _getPrototypeOf.default)(derived);
return (0, _possibleConstructorReturn.default)(_this, (0, _isNativeReflectConstruct.default)() ? Reflect.construct(derived, args || [], (0, _getPrototypeOf.default)(_this).constructor) : derived.apply(_this, args));
}
//# sourceMappingURL=callSuper.js.map
@@ -0,0 +1,63 @@
![React Email button cover](https://react.email/static/covers/button.png)
<div align="center"><strong>@react-email/button</strong></div>
<div align="center">A link that is styled to look like a button.</div>
<br />
<div align="center">
<a href="https://react.email">Website</a>
<span> · </span>
<a href="https://github.com/resend/react-email">GitHub</a>
<span> · </span>
<a href="https://react.email/discord">Discord</a>
</div>
## Install
Install component from your command line.
#### With yarn
```sh
yarn add @react-email/button -E
```
#### With npm
```sh
npm install @react-email/button -E
```
## Getting started
Add the component to your email template. Include styles where needed.
```jsx
import { Button } from "@react-email/button";
const Email = () => {
return (
<Button href="https://example.com" style={{ color: "#61dafb" }}>
Click me
</Button>
);
};
```
## Props
| Name | Type | Default | Description |
| ------ | ------ | -------- | ------------------------------------------------ |
| href | string | | Link to be triggered when the button is clicked |
| target | string | `_blank` | Specify the target attribute for the button link |
## Support
This component was tested using the most popular email clients.
| <img src="https://react.email/static/icons/gmail.svg" width="48px" height="48px" alt="Gmail logo"> | <img src="https://react.email/static/icons/apple-mail.svg" width="48px" height="48px" alt="Apple Mail"> | <img src="https://react.email/static/icons/outlook.svg" width="48px" height="48px" alt="Outlook logo"> | <img src="https://react.email/static/icons/yahoo-mail.svg" width="48px" height="48px" alt="Yahoo! Mail logo"> | <img src="https://react.email/static/icons/hey.svg" width="48px" height="48px" alt="HEY logo"> | <img src="https://react.email/static/icons/superhuman.svg" width="48px" height="48px" alt="Superhuman logo"> |
| -------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
| Gmail ✔ | Apple Mail ✔ | Outlook ✔ | Yahoo! Mail ✔ | HEY ✔ | Superhuman ✔ |
## License
MIT License
@@ -0,0 +1 @@
{"version":3,"file":"normalize.d.ts","sourceRoot":"","sources":["../../../src/utils/normalize.ts"],"names":[],"mappings":"AAmBA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,GAAE,MAAY,EAAE,aAAa,GAAE,MAAkB,GAAG,GAAG,CAOrG;AAED,YAAY;AACZ,wBAAgB,eAAe,CAAC,CAAC,EAE/B,MAAM,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,EAE9B,KAAK,GAAE,MAAU,EAEjB,OAAO,GAAE,MAAmB,GAC3B,CAAC,CAQH;AAwND;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAoBxE"}
@@ -0,0 +1,5 @@
import type { FieldDiffClientProps } from 'payload';
import './index.scss';
import React from 'react';
export declare const Iterable: React.FC<FieldDiffClientProps>;
//# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,52 @@
import type { ColumnBuilderBaseConfig } from "../../column-builder.js";
import type { ColumnBaseConfig } from "../../column.js";
import { entityKind } from "../../entity.js";
import { MySqlColumnBuilderWithAutoIncrement, MySqlColumnWithAutoIncrement } from "./common.js";
export type MySqlBigInt53BuilderInitial<TName extends string> = MySqlBigInt53Builder<{
name: TName;
dataType: 'number';
columnType: 'MySqlBigInt53';
data: number;
driverParam: number | string;
enumValues: undefined;
}>;
export declare class MySqlBigInt53Builder<T extends ColumnBuilderBaseConfig<'number', 'MySqlBigInt53'>> extends MySqlColumnBuilderWithAutoIncrement<T, {
unsigned: boolean;
}> {
static readonly [entityKind]: string;
constructor(name: T['name'], unsigned?: boolean);
}
export declare class MySqlBigInt53<T extends ColumnBaseConfig<'number', 'MySqlBigInt53'>> extends MySqlColumnWithAutoIncrement<T, {
unsigned: boolean;
}> {
static readonly [entityKind]: string;
getSQLType(): string;
mapFromDriverValue(value: number | string): number;
}
export type MySqlBigInt64BuilderInitial<TName extends string> = MySqlBigInt64Builder<{
name: TName;
dataType: 'bigint';
columnType: 'MySqlBigInt64';
data: bigint;
driverParam: string;
enumValues: undefined;
}>;
export declare class MySqlBigInt64Builder<T extends ColumnBuilderBaseConfig<'bigint', 'MySqlBigInt64'>> extends MySqlColumnBuilderWithAutoIncrement<T, {
unsigned: boolean;
}> {
static readonly [entityKind]: string;
constructor(name: T['name'], unsigned?: boolean);
}
export declare class MySqlBigInt64<T extends ColumnBaseConfig<'bigint', 'MySqlBigInt64'>> extends MySqlColumnWithAutoIncrement<T, {
unsigned: boolean;
}> {
static readonly [entityKind]: string;
getSQLType(): string;
mapFromDriverValue(value: string): bigint;
}
export interface MySqlBigIntConfig<T extends 'number' | 'bigint' = 'number' | 'bigint'> {
mode: T;
unsigned?: boolean;
}
export declare function bigint<TMode extends MySqlBigIntConfig['mode']>(config: MySqlBigIntConfig<TMode>): TMode extends 'number' ? MySqlBigInt53BuilderInitial<''> : MySqlBigInt64BuilderInitial<''>;
export declare function bigint<TName extends string, TMode extends MySqlBigIntConfig['mode']>(name: TName, config: MySqlBigIntConfig<TMode>): TMode extends 'number' ? MySqlBigInt53BuilderInitial<TName> : MySqlBigInt64BuilderInitial<TName>;
@@ -0,0 +1,60 @@
"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 smallint_exports = {};
__export(smallint_exports, {
PgSmallInt: () => PgSmallInt,
PgSmallIntBuilder: () => PgSmallIntBuilder,
smallint: () => smallint
});
module.exports = __toCommonJS(smallint_exports);
var import_entity = require("../../entity.cjs");
var import_common = require("./common.cjs");
var import_int_common = require("./int.common.cjs");
class PgSmallIntBuilder extends import_int_common.PgIntColumnBaseBuilder {
static [import_entity.entityKind] = "PgSmallIntBuilder";
constructor(name) {
super(name, "number", "PgSmallInt");
}
/** @internal */
build(table) {
return new PgSmallInt(table, this.config);
}
}
class PgSmallInt extends import_common.PgColumn {
static [import_entity.entityKind] = "PgSmallInt";
getSQLType() {
return "smallint";
}
mapFromDriverValue = (value) => {
if (typeof value === "string") {
return Number(value);
}
return value;
};
}
function smallint(name) {
return new PgSmallIntBuilder(name ?? "");
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
PgSmallInt,
PgSmallIntBuilder,
smallint
});
//# sourceMappingURL=smallint.cjs.map
@@ -0,0 +1 @@
{"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../../../src/views/Root/metadata.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAA;AACpC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AA8B9C,KAAK,IAAI,GAAG;IACV,MAAM,EAAE,OAAO,CAAC,eAAe,CAAC,CAAA;IAChC,MAAM,EAAE,OAAO,CAAC;QACd,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,CAAA;KACjC,CAAC,CAAA;IACF,YAAY,EAAE,OAAO,CAAC;QACpB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,CAAA;KACjC,CAAC,CAAA;CACH,CAAA;AAED,eAAO,MAAM,oBAAoB,sDAG9B,IAAI,sBA0JN,CAAA"}
@@ -0,0 +1 @@
{"version":3,"sources":["../../../../src/pg-core/columns/vector_extension/sparsevec.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyPgTable } from '~/pg-core/table.ts';\nimport { getColumnNameAndConfig } from '~/utils.ts';\nimport { PgColumn, PgColumnBuilder } from '../common.ts';\n\nexport type PgSparseVectorBuilderInitial<TName extends string> = PgSparseVectorBuilder<{\n\tname: TName;\n\tdataType: 'string';\n\tcolumnType: 'PgSparseVector';\n\tdata: string;\n\tdriverParam: string;\n\tenumValues: undefined;\n}>;\n\nexport class PgSparseVectorBuilder<T extends ColumnBuilderBaseConfig<'string', 'PgSparseVector'>>\n\textends PgColumnBuilder<\n\t\tT,\n\t\t{ dimensions: number | undefined }\n\t>\n{\n\tstatic override readonly [entityKind]: string = 'PgSparseVectorBuilder';\n\n\tconstructor(name: string, config: PgSparseVectorConfig) {\n\t\tsuper(name, 'string', 'PgSparseVector');\n\t\tthis.config.dimensions = config.dimensions;\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyPgTable<{ name: TTableName }>,\n\t): PgSparseVector<MakeColumnConfig<T, TTableName>> {\n\t\treturn new PgSparseVector<MakeColumnConfig<T, TTableName>>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig<any, any>,\n\t\t);\n\t}\n}\n\nexport class PgSparseVector<T extends ColumnBaseConfig<'string', 'PgSparseVector'>>\n\textends PgColumn<T, { dimensions: number | undefined }>\n{\n\tstatic override readonly [entityKind]: string = 'PgSparseVector';\n\n\treadonly dimensions = this.config.dimensions;\n\n\tgetSQLType(): string {\n\t\treturn `sparsevec(${this.dimensions})`;\n\t}\n}\n\nexport interface PgSparseVectorConfig {\n\tdimensions: number;\n}\n\nexport function sparsevec(\n\tconfig: PgSparseVectorConfig,\n): PgSparseVectorBuilderInitial<''>;\nexport function sparsevec<TName extends string>(\n\tname: TName,\n\tconfig: PgSparseVectorConfig,\n): PgSparseVectorBuilderInitial<TName>;\nexport function sparsevec(a: string | PgSparseVectorConfig, b?: PgSparseVectorConfig) {\n\tconst { name, config } = getColumnNameAndConfig<PgSparseVectorConfig>(a, b);\n\treturn new PgSparseVectorBuilder(name, config);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,oBAA2B;AAE3B,mBAAuC;AACvC,oBAA0C;AAWnC,MAAM,8BACJ,8BAIT;AAAA,EACC,QAA0B,wBAAU,IAAY;AAAA,EAEhD,YAAY,MAAc,QAA8B;AACvD,UAAM,MAAM,UAAU,gBAAgB;AACtC,SAAK,OAAO,aAAa,OAAO;AAAA,EACjC;AAAA;AAAA,EAGS,MACR,OACkD;AAClD,WAAO,IAAI;AAAA,MACV;AAAA,MACA,KAAK;AAAA,IACN;AAAA,EACD;AACD;AAEO,MAAM,uBACJ,uBACT;AAAA,EACC,QAA0B,wBAAU,IAAY;AAAA,EAEvC,aAAa,KAAK,OAAO;AAAA,EAElC,aAAqB;AACpB,WAAO,aAAa,KAAK,UAAU;AAAA,EACpC;AACD;AAaO,SAAS,UAAU,GAAkC,GAA0B;AACrF,QAAM,EAAE,MAAM,OAAO,QAAI,qCAA6C,GAAG,CAAC;AAC1E,SAAO,IAAI,sBAAsB,MAAM,MAAM;AAC9C;","names":[]}
@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9saWIvdGFpbC9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgQW55QXJyYXkgfSBmcm9tIFwiLi4vYW55LWFycmF5XCI7XG5cbmV4cG9ydCB0eXBlIFRhaWw8VHlwZSBleHRlbmRzIEFueUFycmF5PiA9IFR5cGUgZXh0ZW5kcyBbYW55LCAuLi5pbmZlciBSZXN0XSA/IFJlc3QgOiBuZXZlcjtcbiJdfQ==
@@ -0,0 +1,13 @@
{
"compilerOptions": {
"target": "es6",
"lib": [ "es2015" ],
"module": "commonjs",
"noEmit": true,
"strict": true
},
"include": [
"./test/types/pino-pretty.test.d.ts",
"./index.d.ts"
]
}
@@ -0,0 +1,25 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const ClipboardType = createLucideIcon("ClipboardType", [
["rect", { width: "8", height: "4", x: "8", y: "2", rx: "1", ry: "1", key: "tgr4d6" }],
[
"path",
{
d: "M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",
key: "116196"
}
],
["path", { d: "M9 12v-1h6v1", key: "iehl6m" }],
["path", { d: "M11 17h2", key: "12w5me" }],
["path", { d: "M12 11v6", key: "1bwqyc" }]
]);
export { ClipboardType as default };
//# sourceMappingURL=clipboard-type.js.map
@@ -0,0 +1,31 @@
var realNames = require('./_realNames');
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* Gets the name of `func`.
*
* @private
* @param {Function} func The function to query.
* @returns {string} Returns the function name.
*/
function getFuncName(func) {
var result = (func.name + ''),
array = realNames[result],
length = hasOwnProperty.call(realNames, result) ? array.length : 0;
while (length--) {
var data = array[length],
otherFunc = data.func;
if (otherFunc == null || otherFunc == func) {
return data.name;
}
}
return result;
}
module.exports = getFuncName;
@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/pg-core/columns/varchar.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyPgTable } from '~/pg-core/table.ts';\nimport { getColumnNameAndConfig, type Writable } from '~/utils.ts';\nimport { PgColumn, PgColumnBuilder } from './common.ts';\n\nexport type PgVarcharBuilderInitial<\n\tTName extends string,\n\tTEnum extends [string, ...string[]],\n\tTLength extends number | undefined,\n> = PgVarcharBuilder<{\n\tname: TName;\n\tdataType: 'string';\n\tcolumnType: 'PgVarchar';\n\tdata: TEnum[number];\n\tdriverParam: string;\n\tenumValues: TEnum;\n\tlength: TLength;\n}>;\n\nexport class PgVarcharBuilder<\n\tT extends ColumnBuilderBaseConfig<'string', 'PgVarchar'> & { length?: number | undefined },\n> extends PgColumnBuilder<\n\tT,\n\t{ length: T['length']; enumValues: T['enumValues'] },\n\t{ length: T['length'] }\n> {\n\tstatic override readonly [entityKind]: string = 'PgVarcharBuilder';\n\n\tconstructor(name: T['name'], config: PgVarcharConfig<T['enumValues'], T['length']>) {\n\t\tsuper(name, 'string', 'PgVarchar');\n\t\tthis.config.length = config.length;\n\t\tthis.config.enumValues = config.enum;\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyPgTable<{ name: TTableName }>,\n\t): PgVarchar<MakeColumnConfig<T, TTableName> & { length: T['length'] }> {\n\t\treturn new PgVarchar<MakeColumnConfig<T, TTableName> & { length: T['length'] }>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig<any, any>,\n\t\t);\n\t}\n}\n\nexport class PgVarchar<T extends ColumnBaseConfig<'string', 'PgVarchar'> & { length?: number | undefined }>\n\textends PgColumn<T, { length: T['length']; enumValues: T['enumValues'] }, { length: T['length'] }>\n{\n\tstatic override readonly [entityKind]: string = 'PgVarchar';\n\n\treadonly length = this.config.length;\n\toverride readonly enumValues = this.config.enumValues;\n\n\tgetSQLType(): string {\n\t\treturn this.length === undefined ? `varchar` : `varchar(${this.length})`;\n\t}\n}\n\nexport interface PgVarcharConfig<\n\tTEnum extends readonly string[] | string[] | undefined = readonly string[] | string[] | undefined,\n\tTLength extends number | undefined = number | undefined,\n> {\n\tenum?: TEnum;\n\tlength?: TLength;\n}\n\nexport function varchar(): PgVarcharBuilderInitial<'', [string, ...string[]], undefined>;\nexport function varchar<\n\tU extends string,\n\tT extends Readonly<[U, ...U[]]>,\n\tL extends number | undefined,\n>(\n\tconfig?: PgVarcharConfig<T | Writable<T>, L>,\n): PgVarcharBuilderInitial<'', Writable<T>, L>;\nexport function varchar<\n\tTName extends string,\n\tU extends string,\n\tT extends Readonly<[U, ...U[]]>,\n\tL extends number | undefined,\n>(\n\tname: TName,\n\tconfig?: PgVarcharConfig<T | Writable<T>, L>,\n): PgVarcharBuilderInitial<TName, Writable<T>, L>;\nexport function varchar(a?: string | PgVarcharConfig, b: PgVarcharConfig = {}): any {\n\tconst { name, config } = getColumnNameAndConfig<PgVarcharConfig>(a, b);\n\treturn new PgVarcharBuilder(name, config as any);\n}\n"],"mappings":"AAEA,SAAS,kBAAkB;AAE3B,SAAS,8BAA6C;AACtD,SAAS,UAAU,uBAAuB;AAgBnC,MAAM,yBAEH,gBAIR;AAAA,EACD,QAA0B,UAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB,QAAuD;AACnF,UAAM,MAAM,UAAU,WAAW;AACjC,SAAK,OAAO,SAAS,OAAO;AAC5B,SAAK,OAAO,aAAa,OAAO;AAAA,EACjC;AAAA;AAAA,EAGS,MACR,OACuE;AACvE,WAAO,IAAI;AAAA,MACV;AAAA,MACA,KAAK;AAAA,IACN;AAAA,EACD;AACD;AAEO,MAAM,kBACJ,SACT;AAAA,EACC,QAA0B,UAAU,IAAY;AAAA,EAEvC,SAAS,KAAK,OAAO;AAAA,EACZ,aAAa,KAAK,OAAO;AAAA,EAE3C,aAAqB;AACpB,WAAO,KAAK,WAAW,SAAY,YAAY,WAAW,KAAK,MAAM;AAAA,EACtE;AACD;AA2BO,SAAS,QAAQ,GAA8B,IAAqB,CAAC,GAAQ;AACnF,QAAM,EAAE,MAAM,OAAO,IAAI,uBAAwC,GAAG,CAAC;AACrE,SAAO,IAAI,iBAAiB,MAAM,MAAa;AAChD;","names":[]}
@@ -0,0 +1,27 @@
Copyright 2014 Yahoo! Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the Yahoo! Inc. nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL YAHOO! INC. BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,14 @@
export declare const eachMinuteOfInterval: import("./types.js").FPFn1<
import("../eachMinuteOfInterval.js").EachMinuteOfIntervalResult<
import("../fp.js").Interval<
import("../fp.js").DateArg<Date>,
import("../fp.js").DateArg<Date>
>,
| import("../eachMinuteOfInterval.js").EachMinuteOfIntervalOptions<Date>
| undefined
>,
import("../fp.js").Interval<
import("../fp.js").DateArg<Date>,
import("../fp.js").DateArg<Date>
>
>;
@@ -0,0 +1,5 @@
/**
* Creates <style> element for widget dialog
*/
export declare function createScreenshotInputStyles(styleNonce?: string): HTMLStyleElement;
//# sourceMappingURL=ScreenshotInput.css.d.ts.map
@@ -0,0 +1,4 @@
import { Bounds } from '../css/layout/bounds';
import { ElementContainer } from '../dom/element-container';
export declare const paddingBox: (element: ElementContainer) => Bounds;
export declare const contentBox: (element: ElementContainer) => Bounds;
@@ -0,0 +1,9 @@
/*
return the Locale for given locale code, else return null
*/export const findLocaleFromCode = (localizationConfig, locale) => {
if (!localizationConfig?.locales || localizationConfig.locales.length === 0) {
return null;
}
return localizationConfig.locales.find(el => el?.code === locale);
};
//# sourceMappingURL=findLocaleFromCode.js.map
@@ -0,0 +1,357 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const currentScopes = require('./currentScopes.js');
const debugBuild = require('./debug-build.js');
const session = require('./session.js');
const trace = require('./tracing/trace.js');
const debugLogger = require('./utils/debug-logger.js');
const is = require('./utils/is.js');
const misc = require('./utils/misc.js');
const prepareEvent = require('./utils/prepareEvent.js');
const time = require('./utils/time.js');
const worldwide = require('./utils/worldwide.js');
/**
* Captures an exception event and sends it to Sentry.
*
* @param exception The exception to capture.
* @param hint Optional additional data to attach to the Sentry event.
* @returns the id of the captured Sentry event.
*/
function captureException(exception, hint) {
return currentScopes.getCurrentScope().captureException(exception, prepareEvent.parseEventHintOrCaptureContext(hint));
}
/**
* Captures a message event and sends it to Sentry.
*
* @param message The message to send to Sentry.
* @param captureContext Define the level of the message or pass in additional data to attach to the message.
* @returns the id of the captured message.
*/
function captureMessage(message, captureContext) {
// This is necessary to provide explicit scopes upgrade, without changing the original
// arity of the `captureMessage(message, level)` method.
const level = typeof captureContext === 'string' ? captureContext : undefined;
const hint = typeof captureContext !== 'string' ? { captureContext } : undefined;
return currentScopes.getCurrentScope().captureMessage(message, level, hint);
}
/**
* Captures a manually created event and sends it to Sentry.
*
* @param event The event to send to Sentry.
* @param hint Optional additional data to attach to the Sentry event.
* @returns the id of the captured event.
*/
function captureEvent(event, hint) {
return currentScopes.getCurrentScope().captureEvent(event, hint);
}
/**
* Sets context data with the given name.
* @param name of the context
* @param context Any kind of data. This data will be normalized.
*/
function setContext(name, context) {
currentScopes.getIsolationScope().setContext(name, context);
}
/**
* Set an object that will be merged sent as extra data with the event.
* @param extras Extras object to merge into current context.
*/
function setExtras(extras) {
currentScopes.getIsolationScope().setExtras(extras);
}
/**
* Set key:value that will be sent as extra data with the event.
* @param key String of extra
* @param extra Any kind of data. This data will be normalized.
*/
function setExtra(key, extra) {
currentScopes.getIsolationScope().setExtra(key, extra);
}
/**
* Set an object that will be merged sent as tags data with the event.
* @param tags Tags context object to merge into current context.
*/
function setTags(tags) {
currentScopes.getIsolationScope().setTags(tags);
}
/**
* Set key:value that will be sent as tags data with the event.
*
* Can also be used to unset a tag, by passing `undefined`.
*
* @param key String key of tag
* @param value Value of tag
*/
function setTag(key, value) {
currentScopes.getIsolationScope().setTag(key, value);
}
/**
* Updates user context information for future events.
*
* @param user User context object to be set in the current context. Pass `null` to unset the user.
*/
function setUser(user) {
currentScopes.getIsolationScope().setUser(user);
}
/**
* Sets the conversation ID for the current isolation scope.
*
* @param conversationId The conversation ID to set. Pass `null` or `undefined` to unset the conversation ID.
*/
function setConversationId(conversationId) {
currentScopes.getIsolationScope().setConversationId(conversationId);
}
/**
* The last error event id of the isolation scope.
*
* Warning: This function really returns the last recorded error event id on the current
* isolation scope. If you call this function after handling a certain error and another error
* is captured in between, the last one is returned instead of the one you might expect.
* Also, ids of events that were never sent to Sentry (for example because
* they were dropped in `beforeSend`) could be returned.
*
* @returns The last event id of the isolation scope.
*/
function lastEventId() {
return currentScopes.getIsolationScope().lastEventId();
}
/**
* Create a cron monitor check in and send it to Sentry.
*
* @param checkIn An object that describes a check in.
* @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want
* to create a monitor automatically when sending a check in.
*/
function captureCheckIn(checkIn, upsertMonitorConfig) {
const scope = currentScopes.getCurrentScope();
const client = currentScopes.getClient();
if (!client) {
debugBuild.DEBUG_BUILD && debugLogger.debug.warn('Cannot capture check-in. No client defined.');
} else if (!client.captureCheckIn) {
debugBuild.DEBUG_BUILD && debugLogger.debug.warn('Cannot capture check-in. Client does not support sending check-ins.');
} else {
return client.captureCheckIn(checkIn, upsertMonitorConfig, scope);
}
return misc.uuid4();
}
/**
* Wraps a callback with a cron monitor check in. The check in will be sent to Sentry when the callback finishes.
*
* @param monitorSlug The distinct slug of the monitor.
* @param callback Callback to be monitored
* @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want
* to create a monitor automatically when sending a check in.
*/
function withMonitor(
monitorSlug,
callback,
upsertMonitorConfig,
) {
function runCallback() {
const checkInId = captureCheckIn({ monitorSlug, status: 'in_progress' }, upsertMonitorConfig);
const now = time.timestampInSeconds();
function finishCheckIn(status) {
captureCheckIn({ monitorSlug, status, checkInId, duration: time.timestampInSeconds() - now });
}
// Default behavior without isolateTrace
let maybePromiseResult;
try {
maybePromiseResult = callback();
} catch (e) {
finishCheckIn('error');
throw e;
}
if (is.isThenable(maybePromiseResult)) {
return maybePromiseResult.then(
r => {
finishCheckIn('ok');
return r;
},
e => {
finishCheckIn('error');
throw e;
},
) ;
}
finishCheckIn('ok');
return maybePromiseResult;
}
return currentScopes.withIsolationScope(() => (upsertMonitorConfig?.isolateTrace ? trace.startNewTrace(runCallback) : runCallback()));
}
/**
* Call `flush()` on the current client, if there is one. See {@link Client.flush}.
*
* @param timeout Maximum time in ms the client should wait to flush its event queue. Omitting this parameter will cause
* the client to wait until all events are sent before resolving the promise.
* @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it
* doesn't (or if there's no client defined).
*/
async function flush(timeout) {
const client = currentScopes.getClient();
if (client) {
return client.flush(timeout);
}
debugBuild.DEBUG_BUILD && debugLogger.debug.warn('Cannot flush events. No client defined.');
return Promise.resolve(false);
}
/**
* Call `close()` on the current client, if there is one. See {@link Client.close}.
*
* @param timeout Maximum time in ms the client should wait to flush its event queue before shutting down. Omitting this
* parameter will cause the client to wait until all events are sent before disabling itself.
* @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it
* doesn't (or if there's no client defined).
*/
async function close(timeout) {
const client = currentScopes.getClient();
if (client) {
return client.close(timeout);
}
debugBuild.DEBUG_BUILD && debugLogger.debug.warn('Cannot flush events and disable SDK. No client defined.');
return Promise.resolve(false);
}
/**
* Returns true if Sentry has been properly initialized.
*/
function isInitialized() {
return !!currentScopes.getClient();
}
/** If the SDK is initialized & enabled. */
function isEnabled() {
const client = currentScopes.getClient();
return client?.getOptions().enabled !== false && !!client?.getTransport();
}
/**
* Add an event processor.
* This will be added to the current isolation scope, ensuring any event that is processed in the current execution
* context will have the processor applied.
*/
function addEventProcessor(callback) {
currentScopes.getIsolationScope().addEventProcessor(callback);
}
/**
* Start a session on the current isolation scope.
*
* @param context (optional) additional properties to be applied to the returned session object
*
* @returns the new active session
*/
function startSession(context) {
const isolationScope = currentScopes.getIsolationScope();
const currentScope = currentScopes.getCurrentScope();
// Will fetch userAgent if called from browser sdk
const { userAgent } = worldwide.GLOBAL_OBJ.navigator || {};
const session$1 = session.makeSession({
user: currentScope.getUser() || isolationScope.getUser(),
...(userAgent && { userAgent }),
...context,
});
// End existing session if there's one
const currentSession = isolationScope.getSession();
if (currentSession?.status === 'ok') {
session.updateSession(currentSession, { status: 'exited' });
}
endSession();
// Afterwards we set the new session on the scope
isolationScope.setSession(session$1);
return session$1;
}
/**
* End the session on the current isolation scope.
*/
function endSession() {
const isolationScope = currentScopes.getIsolationScope();
const currentScope = currentScopes.getCurrentScope();
const session$1 = currentScope.getSession() || isolationScope.getSession();
if (session$1) {
session.closeSession(session$1);
}
_sendSessionUpdate();
// the session is over; take it off of the scope
isolationScope.setSession();
}
/**
* Sends the current Session on the scope
*/
function _sendSessionUpdate() {
const isolationScope = currentScopes.getIsolationScope();
const client = currentScopes.getClient();
const session = isolationScope.getSession();
if (session && client) {
client.captureSession(session);
}
}
/**
* Sends the current session on the scope to Sentry
*
* @param end If set the session will be marked as exited and removed from the scope.
* Defaults to `false`.
*/
function captureSession(end = false) {
// both send the update and pull the session from the scope
if (end) {
endSession();
return;
}
// only send the update
_sendSessionUpdate();
}
exports.addEventProcessor = addEventProcessor;
exports.captureCheckIn = captureCheckIn;
exports.captureEvent = captureEvent;
exports.captureException = captureException;
exports.captureMessage = captureMessage;
exports.captureSession = captureSession;
exports.close = close;
exports.endSession = endSession;
exports.flush = flush;
exports.isEnabled = isEnabled;
exports.isInitialized = isInitialized;
exports.lastEventId = lastEventId;
exports.setContext = setContext;
exports.setConversationId = setConversationId;
exports.setExtra = setExtra;
exports.setExtras = setExtras;
exports.setTag = setTag;
exports.setTags = setTags;
exports.setUser = setUser;
exports.startSession = startSession;
exports.withMonitor = withMonitor;
//# sourceMappingURL=exports.js.map
@@ -0,0 +1,89 @@
{
"name": "use-context-selector",
"description": "React useContextSelector hook in userland",
"version": "2.0.0",
"type": "module",
"author": "Daishi Kato",
"repository": {
"type": "git",
"url": "https://github.com/dai-shi/use-context-selector.git"
},
"source": "./src/index.ts",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
"./package.json": "./package.json",
".": {
"require": {
"types": "./dist/cjs/index.d.ts",
"default": "./dist/cjs/index.js"
},
"default": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
}
},
"sideEffects": false,
"files": [
"src",
"dist"
],
"packageManager": "pnpm@8.15.0",
"scripts": {
"compile": "rm -rf dist && pnpm run '/^compile:.*/'",
"compile:esm": "tsc -p tsconfig.esm.json",
"compile:cjs": "tsc -p tsconfig.cjs.json && echo '{\"type\":\"commonjs\"}' > dist/cjs/package.json",
"test": "pnpm run '/^test:.*/'",
"test:format": "prettier -c .",
"test:lint": "eslint .",
"test:types": "tsc -p . --noEmit",
"test:types:examples": "tsc -p examples --noEmit",
"test:spec": "vitest run",
"apidoc": "documentation readme src --section API --markdown-toc false --parse-extension ts",
"examples:01_counter": "DIR=01_counter vite",
"examples:02_person": "DIR=02_person vite",
"examples:03_suspense": "DIR=03_suspense vite"
},
"keywords": [
"react",
"context",
"hooks"
],
"license": "MIT",
"prettier": {
"singleQuote": true
},
"devDependencies": {
"@testing-library/jest-dom": "^6.4.2",
"@testing-library/react": "^15.0.5",
"@testing-library/user-event": "^14.5.2",
"@types/node": "^20.12.7",
"@types/react": "^18.3.1",
"@types/react-dom": "^18.3.0",
"@types/scheduler": "^0.23.0",
"@typescript-eslint/eslint-plugin": "^7.7.1",
"@typescript-eslint/parser": "^7.7.1",
"documentation": "^14.0.3",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-react": "^7.34.1",
"eslint-plugin-react-hooks": "^4.6.2",
"happy-dom": "^14.7.1",
"prettier": "^3.2.5",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"scheduler": "^0.23.2",
"ts-expect": "^1.3.0",
"typescript": "^5.4.5",
"vite": "^5.2.10",
"vitest": "^1.5.2"
},
"peerDependencies": {
"react": ">=18.0.0",
"scheduler": ">=0.19.0"
}
}
@@ -0,0 +1,2 @@
import{throwIfEmpty as e}from"../../utils/throw-if-empty.js";const t=t=>()=>(e(t,`Keys cannot be empty`),{path:`/presets`,body:JSON.stringify(t),method:`DELETE`}),n=t=>()=>(e(String(t),`Key cannot be empty`),{path:`/presets/${t}`,method:`DELETE`});export{n as deletePreset,t as deletePresets};
//# sourceMappingURL=presets.js.map
@@ -0,0 +1,4 @@
declare const imports = "import { migratePostgresV2toV3 } from '@payloadcms/db-postgres/migration-utils'";
declare const upSQL = " await migratePostgresV2toV3({\n // enables logging of changes that will be made to the database\n debug: false,\n payload,\n req,\n })\n";
export { imports, upSQL };
//# sourceMappingURL=relationships-v2-v3.d.ts.map
@@ -0,0 +1 @@
{"version":3,"names":["_defineProperty","require","ownKeys","object","enumerableOnly","keys","Object","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread2","target","i","arguments","length","source","forEach","key","defineProperty","getOwnPropertyDescriptors","defineProperties"],"sources":["../../src/helpers/objectSpread2.ts"],"sourcesContent":["/* @minVersion 7.5.0 */\n\nimport defineProperty from \"./defineProperty.ts\";\n\n// This function is different to \"Reflect.ownKeys\". The enumerableOnly\n// filters on symbol properties only. Returned string properties are always\n// enumerable. It is good to use in objectSpread.\n\nfunction ownKeys(\n object: object,\n enumerableOnly?: boolean | undefined,\n): (string | symbol)[] {\n var keys: (string | symbol)[] = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) {\n symbols = symbols.filter(function (sym) {\n // sym already comes from `Object.getOwnPropertySymbols`, so getOwnPropertyDescriptor should always be defined\n return Object.getOwnPropertyDescriptor(object, sym)!.enumerable;\n });\n }\n keys.push.apply(keys, symbols);\n }\n return keys;\n}\n\ntype Intersection<R extends any[]> = R extends [infer H, ...infer S]\n ? H & Intersection<S>\n : unknown;\n\nexport default function _objectSpread2<T extends object, U extends unknown[]>(\n target: T,\n ...sources: U\n): T & Intersection<U>;\nexport default function _objectSpread2(target: object) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(\n target,\n key,\n // key already comes from ownKeys, so getOwnPropertyDescriptor should always be defined\n Object.getOwnPropertyDescriptor(source, key)!,\n );\n });\n }\n }\n return target;\n}\n"],"mappings":";;;;;;AAEA,IAAAA,eAAA,GAAAC,OAAA;AAMA,SAASC,OAAOA,CACdC,MAAc,EACdC,cAAoC,EACf;EACrB,IAAIC,IAAyB,GAAGC,MAAM,CAACD,IAAI,CAACF,MAAM,CAAC;EACnD,IAAIG,MAAM,CAACC,qBAAqB,EAAE;IAChC,IAAIC,OAAO,GAAGF,MAAM,CAACC,qBAAqB,CAACJ,MAAM,CAAC;IAClD,IAAIC,cAAc,EAAE;MAClBI,OAAO,GAAGA,OAAO,CAACC,MAAM,CAAC,UAAUC,GAAG,EAAE;QAEtC,OAAOJ,MAAM,CAACK,wBAAwB,CAACR,MAAM,EAAEO,GAAG,CAAC,CAAEE,UAAU;MACjE,CAAC,CAAC;IACJ;IACAP,IAAI,CAACQ,IAAI,CAACC,KAAK,CAACT,IAAI,EAAEG,OAAO,CAAC;EAChC;EACA,OAAOH,IAAI;AACb;AAUe,SAASU,cAAcA,CAACC,MAAc,EAAE;EACrD,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGC,SAAS,CAACC,MAAM,EAAEF,CAAC,EAAE,EAAE;IACzC,IAAIG,MAAM,GAAGF,SAAS,CAACD,CAAC,CAAC,IAAI,IAAI,GAAGC,SAAS,CAACD,CAAC,CAAC,GAAG,CAAC,CAAC;IACrD,IAAIA,CAAC,GAAG,CAAC,EAAE;MACTf,OAAO,CAACI,MAAM,CAACc,MAAM,CAAC,EAAE,IAAI,CAAC,CAACC,OAAO,CAAC,UAAUC,GAAG,EAAE;QACnD,IAAAC,uBAAc,EAACP,MAAM,EAAEM,GAAG,EAAEF,MAAM,CAACE,GAAG,CAAC,CAAC;MAC1C,CAAC,CAAC;IACJ,CAAC,MAAM,IAAIhB,MAAM,CAACkB,yBAAyB,EAAE;MAC3ClB,MAAM,CAACmB,gBAAgB,CAACT,MAAM,EAAEV,MAAM,CAACkB,yBAAyB,CAACJ,MAAM,CAAC,CAAC;IAC3E,CAAC,MAAM;MACLlB,OAAO,CAACI,MAAM,CAACc,MAAM,CAAC,CAAC,CAACC,OAAO,CAAC,UAAUC,GAAG,EAAE;QAC7ChB,MAAM,CAACiB,cAAc,CACnBP,MAAM,EACNM,GAAG,EAEHhB,MAAM,CAACK,wBAAwB,CAACS,MAAM,EAAEE,GAAG,CAC7C,CAAC;MACH,CAAC,CAAC;IACJ;EACF;EACA,OAAON,MAAM;AACf","ignoreList":[]}
@@ -0,0 +1 @@
{"version":3,"file":"link-2.js","sources":["../../../src/icons/link-2.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Link2\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNOSAxN0g3QTUgNSAwIDAgMSA3IDdoMiIgLz4KICA8cGF0aCBkPSJNMTUgN2gyYTUgNSAwIDEgMSAwIDEwaC0yIiAvPgogIDxsaW5lIHgxPSI4IiB4Mj0iMTYiIHkxPSIxMiIgeTI9IjEyIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/link-2\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Link2 = createLucideIcon('Link2', [\n ['path', { d: 'M9 17H7A5 5 0 0 1 7 7h2', key: '8i5ue5' }],\n ['path', { d: 'M15 7h2a5 5 0 1 1 0 10h-2', key: '1b9ql8' }],\n ['line', { x1: '8', x2: '16', y1: '12', y2: '12', key: '1jonct' }],\n]);\n\nexport default Link2;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,iBAAiB,OAAS,CAAA,CAAA,CAAA;AAAA,CAAA,CACtC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA2B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA6B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAC1D,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAK,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,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACnE,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,2 @@
import type { ExtractorConfig } from './types.js';
export default function extractMessages(params: ExtractorConfig): Promise<void>;
@@ -0,0 +1,103 @@
import type { CLSMetric, CLSMetricWithAttribution } from './cls';
import type { FCPMetric, FCPMetricWithAttribution } from './fcp';
import type { INPMetric, INPMetricWithAttribution } from './inp';
import type { LCPMetric, LCPMetricWithAttribution } from './lcp';
import type { TTFBMetric, TTFBMetricWithAttribution } from './ttfb';
export interface Metric {
/**
* The name of the metric (in acronym form).
*/
name: 'CLS' | 'FCP' | 'INP' | 'LCP' | 'TTFB';
/**
* The current value of the metric.
*/
value: number;
/**
* The rating as to whether the metric value is within the "good",
* "needs improvement", or "poor" thresholds of the metric.
*/
rating: 'good' | 'needs-improvement' | 'poor';
/**
* The delta between the current value and the last-reported value.
* On the first report, `delta` and `value` will always be the same.
*/
delta: number;
/**
* A unique ID representing this particular metric instance. This ID can
* be used by an analytics tool to dedupe multiple values sent for the same
* metric instance, or to group multiple deltas together and calculate a
* total. It can also be used to differentiate multiple different metric
* instances sent from the same page, which can happen if the page is
* restored from the back/forward cache (in that case new metrics object
* get created).
*/
id: string;
/**
* Any performance entries relevant to the metric value calculation.
* The array may also be empty if the metric value was not based on any
* entries (e.g. a CLS value of 0 given no layout shifts).
*/
entries: PerformanceEntry[];
/**
* The type of navigation.
*
* This will be the value returned by the Navigation Timing API (or
* `undefined` if the browser doesn't support that API), with the following
* exceptions:
* - 'back-forward-cache': for pages that are restored from the bfcache.
* - 'back_forward' is renamed to 'back-forward' for consistency.
* - 'prerender': for pages that were prerendered.
* - 'restore': for pages that were discarded by the browser and then
* restored by the user.
*/
navigationType: 'navigate' | 'reload' | 'back-forward' | 'back-forward-cache' | 'prerender' | 'restore';
}
/** The union of supported metric types. */
export type MetricType = CLSMetric | FCPMetric | INPMetric | LCPMetric | TTFBMetric;
/** The union of supported metric attribution types. */
export type MetricWithAttribution = CLSMetricWithAttribution | FCPMetricWithAttribution | INPMetricWithAttribution | LCPMetricWithAttribution | TTFBMetricWithAttribution;
/**
* The thresholds of metric's "good", "needs improvement", and "poor" ratings.
*
* - Metric values up to and including [0] are rated "good"
* - Metric values up to and including [1] are rated "needs improvement"
* - Metric values above [1] are "poor"
*
* | Metric value | Rating |
* | --------------- | ------------------- |
* | ≦ [0] | "good" |
* | > [0] and ≦ [1] | "needs improvement" |
* | > [1] | "poor" |
*/
export type MetricRatingThresholds = [number, number];
/**
* @deprecated Use metric-specific function types instead, such as:
* `(metric: LCPMetric) => void`. If a single callback type is needed for
* multiple metrics, use `(metric: MetricType) => void`.
*/
export interface ReportCallback {
(metric: MetricType): void;
}
export interface ReportOpts {
reportAllChanges?: boolean;
}
export interface AttributionReportOpts extends ReportOpts {
generateTarget?: (el: Node | null) => string | undefined;
}
/**
* The loading state of the document. Note: this value is similar to
* `document.readyState` but it subdivides the "interactive" state into the
* time before and after the DOMContentLoaded event fires.
*
* State descriptions:
* - `loading`: the initial document response has not yet been fully downloaded
* and parsed. This is equivalent to the corresponding `readyState` value.
* - `dom-interactive`: the document has been fully loaded and parsed, but
* scripts may not have yet finished loading and executing.
* - `dom-content-loaded`: the document is fully loaded and parsed, and all
* scripts (except `async` scripts) have loaded and finished executing.
* - `complete`: the document and all of its sub-resources have finished
* loading. This is equivalent to the corresponding `readyState` value.
*/
export type LoadState = 'loading' | 'dom-interactive' | 'dom-content-loaded' | 'complete';
//# sourceMappingURL=base.d.ts.map
@@ -0,0 +1,34 @@
import type { Match } from "../../locale/types.js";
import { ValueSetter } from "./Setter.js";
import type { ParseFlags, ParseResult, ParserOptions } from "./types.js";
export declare abstract class Parser<Value> {
abstract incompatibleTokens: string[] | "*";
abstract priority: number;
subPriority?: number;
run(
dateString: string,
token: string,
match: Match,
options: ParserOptions,
): {
setter: ValueSetter<Value>;
rest: string;
} | null;
protected abstract parse(
dateString: string,
token: string,
match: Match,
options: ParserOptions,
): ParseResult<Value>;
protected validate<DateType extends Date>(
_utcDate: DateType,
_value: Value,
_options: ParserOptions,
): boolean;
protected abstract set<DateType extends Date>(
date: DateType,
flags: ParseFlags,
value: Value,
options: ParserOptions,
): DateType | [DateType, ParseFlags];
}
@@ -0,0 +1,131 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var utilities = require('@dnd-kit/utilities');
function createSnapModifier(gridSize) {
return _ref => {
let {
transform
} = _ref;
return { ...transform,
x: Math.ceil(transform.x / gridSize) * gridSize,
y: Math.ceil(transform.y / gridSize) * gridSize
};
};
}
const restrictToHorizontalAxis = _ref => {
let {
transform
} = _ref;
return { ...transform,
y: 0
};
};
function restrictToBoundingRect(transform, rect, boundingRect) {
const value = { ...transform
};
if (rect.top + transform.y <= boundingRect.top) {
value.y = boundingRect.top - rect.top;
} else if (rect.bottom + transform.y >= boundingRect.top + boundingRect.height) {
value.y = boundingRect.top + boundingRect.height - rect.bottom;
}
if (rect.left + transform.x <= boundingRect.left) {
value.x = boundingRect.left - rect.left;
} else if (rect.right + transform.x >= boundingRect.left + boundingRect.width) {
value.x = boundingRect.left + boundingRect.width - rect.right;
}
return value;
}
const restrictToParentElement = _ref => {
let {
containerNodeRect,
draggingNodeRect,
transform
} = _ref;
if (!draggingNodeRect || !containerNodeRect) {
return transform;
}
return restrictToBoundingRect(transform, draggingNodeRect, containerNodeRect);
};
const restrictToFirstScrollableAncestor = _ref => {
let {
draggingNodeRect,
transform,
scrollableAncestorRects
} = _ref;
const firstScrollableAncestorRect = scrollableAncestorRects[0];
if (!draggingNodeRect || !firstScrollableAncestorRect) {
return transform;
}
return restrictToBoundingRect(transform, draggingNodeRect, firstScrollableAncestorRect);
};
const restrictToVerticalAxis = _ref => {
let {
transform
} = _ref;
return { ...transform,
x: 0
};
};
const restrictToWindowEdges = _ref => {
let {
transform,
draggingNodeRect,
windowRect
} = _ref;
if (!draggingNodeRect || !windowRect) {
return transform;
}
return restrictToBoundingRect(transform, draggingNodeRect, windowRect);
};
const snapCenterToCursor = _ref => {
let {
activatorEvent,
draggingNodeRect,
transform
} = _ref;
if (draggingNodeRect && activatorEvent) {
const activatorCoordinates = utilities.getEventCoordinates(activatorEvent);
if (!activatorCoordinates) {
return transform;
}
const offsetX = activatorCoordinates.x - draggingNodeRect.left;
const offsetY = activatorCoordinates.y - draggingNodeRect.top;
return { ...transform,
x: transform.x + offsetX - draggingNodeRect.width / 2,
y: transform.y + offsetY - draggingNodeRect.height / 2
};
}
return transform;
};
exports.createSnapModifier = createSnapModifier;
exports.restrictToFirstScrollableAncestor = restrictToFirstScrollableAncestor;
exports.restrictToHorizontalAxis = restrictToHorizontalAxis;
exports.restrictToParentElement = restrictToParentElement;
exports.restrictToVerticalAxis = restrictToVerticalAxis;
exports.restrictToWindowEdges = restrictToWindowEdges;
exports.snapCenterToCursor = snapCenterToCursor;
//# sourceMappingURL=modifiers.cjs.development.js.map
@@ -0,0 +1 @@
{"version":3,"file":"context-helpers.js","sourceRoot":"","sources":["../../../src/baggage/context-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAItD;;GAEG;AACH,IAAM,WAAW,GAAG,gBAAgB,CAAC,2BAA2B,CAAC,CAAC;AAElE;;;;;GAKG;AACH,MAAM,UAAU,UAAU,CAAC,OAAgB;IACzC,OAAQ,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAa,IAAI,SAAS,CAAC;AACjE,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,gBAAgB;IAC9B,OAAO,UAAU,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;AACvD,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,UAAU,CAAC,OAAgB,EAAE,OAAgB;IAC3D,OAAO,OAAO,CAAC,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;AAChD,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,OAAgB;IAC5C,OAAO,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;AAC1C,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ContextAPI } from '../api/context';\nimport { createContextKey } from '../context/context';\nimport { Context } from '../context/types';\nimport { Baggage } from './types';\n\n/**\n * Baggage key\n */\nconst BAGGAGE_KEY = createContextKey('OpenTelemetry Baggage Key');\n\n/**\n * Retrieve the current baggage from the given context\n *\n * @param {Context} Context that manage all context values\n * @returns {Baggage} Extracted baggage from the context\n */\nexport function getBaggage(context: Context): Baggage | undefined {\n return (context.getValue(BAGGAGE_KEY) as Baggage) || undefined;\n}\n\n/**\n * Retrieve the current baggage from the active/current context\n *\n * @returns {Baggage} Extracted baggage from the context\n */\nexport function getActiveBaggage(): Baggage | undefined {\n return getBaggage(ContextAPI.getInstance().active());\n}\n\n/**\n * Store a baggage in the given context\n *\n * @param {Context} Context that manage all context values\n * @param {Baggage} baggage that will be set in the actual context\n */\nexport function setBaggage(context: Context, baggage: Baggage): Context {\n return context.setValue(BAGGAGE_KEY, baggage);\n}\n\n/**\n * Delete the baggage stored in the given context\n *\n * @param {Context} Context that manage all context values\n */\nexport function deleteBaggage(context: Context): Context {\n return context.deleteValue(BAGGAGE_KEY);\n}\n"]}
@@ -0,0 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _interopRequireDefault;
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}
//# sourceMappingURL=interopRequireDefault.js.map
@@ -0,0 +1 @@
{"version":3,"names":["tsRewriteRelativeImportExtensions","path","preserveJsx","test","replace","m","tsx","d","ext","cm","toLowerCase"],"sources":["../../src/helpers/tsRewriteRelativeImportExtensions.ts"],"sourcesContent":["/* @minVersion 7.27.0 */\n\n// https://github.com/microsoft/TypeScript/blob/71716a2868c87248af5020e33a84a2178d41a2d6/src/compiler/factory/emitHelpers.ts#L1451\nexport default function tsRewriteRelativeImportExtensions(\n path: unknown,\n preserveJsx?: boolean,\n) {\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\n return path.replace(\n /\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+)?)\\.([cm]?)ts$/i,\n function (m, tsx, d, ext, cm) {\n return tsx\n ? preserveJsx\n ? \".jsx\"\n : \".js\"\n : d && (!ext || !cm)\n ? m\n : d + ext + \".\" + cm.toLowerCase() + \"js\";\n },\n );\n }\n return path;\n}\n"],"mappings":";;;;;;AAGe,SAASA,iCAAiCA,CACvDC,IAAa,EACbC,WAAqB,EACrB;EACA,IAAI,OAAOD,IAAI,KAAK,QAAQ,IAAI,UAAU,CAACE,IAAI,CAACF,IAAI,CAAC,EAAE;IACrD,OAAOA,IAAI,CAACG,OAAO,CACjB,iDAAiD,EACjD,UAAUC,CAAC,EAAEC,GAAG,EAAEC,CAAC,EAAEC,GAAG,EAAEC,EAAE,EAAE;MAC5B,OAAOH,GAAG,GACNJ,WAAW,GACT,MAAM,GACN,KAAK,GACPK,CAAC,KAAK,CAACC,GAAG,IAAI,CAACC,EAAE,CAAC,GAChBJ,CAAC,GACDE,CAAC,GAAGC,GAAG,GAAG,GAAG,GAAGC,EAAE,CAACC,WAAW,CAAC,CAAC,GAAG,IAAI;IAC/C,CACF,CAAC;EACH;EACA,OAAOT,IAAI;AACb","ignoreList":[]}
@@ -0,0 +1,234 @@
'use strict'
const { Writable } = require('node:stream')
const { EventEmitter } = require('node:events')
const { assertCacheKey, assertCacheValue } = require('../util/cache.js')
/**
* @typedef {import('../../types/cache-interceptor.d.ts').default.CacheKey} CacheKey
* @typedef {import('../../types/cache-interceptor.d.ts').default.CacheValue} CacheValue
* @typedef {import('../../types/cache-interceptor.d.ts').default.CacheStore} CacheStore
* @typedef {import('../../types/cache-interceptor.d.ts').default.GetResult} GetResult
*/
/**
* @implements {CacheStore}
* @extends {EventEmitter}
*/
class MemoryCacheStore extends EventEmitter {
#maxCount = 1024
#maxSize = 104857600 // 100MB
#maxEntrySize = 5242880 // 5MB
#size = 0
#count = 0
#entries = new Map()
#hasEmittedMaxSizeEvent = false
/**
* @param {import('../../types/cache-interceptor.d.ts').default.MemoryCacheStoreOpts | undefined} [opts]
*/
constructor (opts) {
super()
if (opts) {
if (typeof opts !== 'object') {
throw new TypeError('MemoryCacheStore options must be an object')
}
if (opts.maxCount !== undefined) {
if (
typeof opts.maxCount !== 'number' ||
!Number.isInteger(opts.maxCount) ||
opts.maxCount < 0
) {
throw new TypeError('MemoryCacheStore options.maxCount must be a non-negative integer')
}
this.#maxCount = opts.maxCount
}
if (opts.maxSize !== undefined) {
if (
typeof opts.maxSize !== 'number' ||
!Number.isInteger(opts.maxSize) ||
opts.maxSize < 0
) {
throw new TypeError('MemoryCacheStore options.maxSize must be a non-negative integer')
}
this.#maxSize = opts.maxSize
}
if (opts.maxEntrySize !== undefined) {
if (
typeof opts.maxEntrySize !== 'number' ||
!Number.isInteger(opts.maxEntrySize) ||
opts.maxEntrySize < 0
) {
throw new TypeError('MemoryCacheStore options.maxEntrySize must be a non-negative integer')
}
this.#maxEntrySize = opts.maxEntrySize
}
}
}
/**
* Get the current size of the cache in bytes
* @returns {number} The current size of the cache in bytes
*/
get size () {
return this.#size
}
/**
* Check if the cache is full (either max size or max count reached)
* @returns {boolean} True if the cache is full, false otherwise
*/
isFull () {
return this.#size >= this.#maxSize || this.#count >= this.#maxCount
}
/**
* @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} req
* @returns {import('../../types/cache-interceptor.d.ts').default.GetResult | undefined}
*/
get (key) {
assertCacheKey(key)
const topLevelKey = `${key.origin}:${key.path}`
const now = Date.now()
const entries = this.#entries.get(topLevelKey)
const entry = entries ? findEntry(key, entries, now) : null
return entry == null
? undefined
: {
statusMessage: entry.statusMessage,
statusCode: entry.statusCode,
headers: entry.headers,
body: entry.body,
vary: entry.vary ? entry.vary : undefined,
etag: entry.etag,
cacheControlDirectives: entry.cacheControlDirectives,
cachedAt: entry.cachedAt,
staleAt: entry.staleAt,
deleteAt: entry.deleteAt
}
}
/**
* @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} key
* @param {import('../../types/cache-interceptor.d.ts').default.CacheValue} val
* @returns {Writable | undefined}
*/
createWriteStream (key, val) {
assertCacheKey(key)
assertCacheValue(val)
const topLevelKey = `${key.origin}:${key.path}`
const store = this
const entry = { ...key, ...val, body: [], size: 0 }
return new Writable({
write (chunk, encoding, callback) {
if (typeof chunk === 'string') {
chunk = Buffer.from(chunk, encoding)
}
entry.size += chunk.byteLength
if (entry.size >= store.#maxEntrySize) {
this.destroy()
} else {
entry.body.push(chunk)
}
callback(null)
},
final (callback) {
let entries = store.#entries.get(topLevelKey)
if (!entries) {
entries = []
store.#entries.set(topLevelKey, entries)
}
const previousEntry = findEntry(key, entries, Date.now())
if (previousEntry) {
const index = entries.indexOf(previousEntry)
entries.splice(index, 1, entry)
store.#size -= previousEntry.size
} else {
entries.push(entry)
store.#count += 1
}
store.#size += entry.size
// Check if cache is full and emit event if needed
if (store.#size > store.#maxSize || store.#count > store.#maxCount) {
// Emit maxSizeExceeded event if we haven't already
if (!store.#hasEmittedMaxSizeEvent) {
store.emit('maxSizeExceeded', {
size: store.#size,
maxSize: store.#maxSize,
count: store.#count,
maxCount: store.#maxCount
})
store.#hasEmittedMaxSizeEvent = true
}
// Perform eviction
for (const [key, entries] of store.#entries) {
for (const entry of entries.splice(0, entries.length / 2)) {
store.#size -= entry.size
store.#count -= 1
}
if (entries.length === 0) {
store.#entries.delete(key)
}
}
// Reset the event flag after eviction
if (store.#size < store.#maxSize && store.#count < store.#maxCount) {
store.#hasEmittedMaxSizeEvent = false
}
}
callback(null)
}
})
}
/**
* @param {CacheKey} key
*/
delete (key) {
if (typeof key !== 'object') {
throw new TypeError(`expected key to be object, got ${typeof key}`)
}
const topLevelKey = `${key.origin}:${key.path}`
for (const entry of this.#entries.get(topLevelKey) ?? []) {
this.#size -= entry.size
this.#count -= 1
}
this.#entries.delete(topLevelKey)
}
}
function findEntry (key, entries, now) {
return entries.find((entry) => (
entry.deleteAt > now &&
entry.method === key.method &&
(entry.vary == null || Object.keys(entry.vary).every(headerName => {
if (entry.vary[headerName] === null) {
return key.headers[headerName] === undefined
}
return entry.vary[headerName] === key.headers[headerName]
}))
))
}
module.exports = MemoryCacheStore
@@ -0,0 +1,84 @@
import { parse32F, parse64F, parse32I, parse64I, parseU32, isNanLiteral, isInfLiteral } from "@webassemblyjs/helper-numbers";
import { longNumberLiteral, floatLiteral, numberLiteral, instr } from "./nodes";
export function numberLiteralFromRaw(rawValue) {
var instructionType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "i32";
var original = rawValue; // Remove numeric separators _
if (typeof rawValue === "string") {
rawValue = rawValue.replace(/_/g, "");
}
if (typeof rawValue === "number") {
return numberLiteral(rawValue, String(original));
} else {
switch (instructionType) {
case "i32":
{
return numberLiteral(parse32I(rawValue), String(original));
}
case "u32":
{
return numberLiteral(parseU32(rawValue), String(original));
}
case "i64":
{
return longNumberLiteral(parse64I(rawValue), String(original));
}
case "f32":
{
return floatLiteral(parse32F(rawValue), isNanLiteral(rawValue), isInfLiteral(rawValue), String(original));
}
// f64
default:
{
return floatLiteral(parse64F(rawValue), isNanLiteral(rawValue), isInfLiteral(rawValue), String(original));
}
}
}
}
export function instruction(id) {
var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
var namedArgs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
return instr(id, undefined, args, namedArgs);
}
export function objectInstruction(id, object) {
var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
var namedArgs = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
return instr(id, object, args, namedArgs);
}
/**
* Decorators
*/
export function withLoc(n, end, start) {
var loc = {
start: start,
end: end
};
n.loc = loc;
return n;
}
export function withRaw(n, raw) {
n.raw = raw;
return n;
}
export function funcParam(valtype, id) {
return {
id: id,
valtype: valtype
};
}
export function indexLiteral(value) {
// $FlowIgnore
var x = numberLiteralFromRaw(value, "u32");
return x;
}
export function memIndexLiteral(value) {
// $FlowIgnore
var x = numberLiteralFromRaw(value, "u32");
return x;
}
@@ -0,0 +1 @@
{"version":3,"names":["_semver","require","_targets","prettifyVersion","version","major","minor","patch","semver","parse","parts","push","join","prettifyTargets","targets","Object","keys","reduce","results","target","value","unreleasedLabel","unreleasedLabels"],"sources":["../src/pretty.ts"],"sourcesContent":["import semver from \"semver\";\nimport { unreleasedLabels } from \"./targets.ts\";\nimport type { Targets, Target } from \"./types.ts\";\n\nexport function prettifyVersion(version: string) {\n if (typeof version !== \"string\") {\n return version;\n }\n\n const { major, minor, patch } = semver.parse(version);\n\n const parts = [major];\n\n if (minor || patch) {\n parts.push(minor);\n }\n\n if (patch) {\n parts.push(patch);\n }\n\n return parts.join(\".\");\n}\n\nexport function prettifyTargets(targets: Targets): Targets {\n return Object.keys(targets).reduce((results, target: Target) => {\n let value = targets[target];\n\n const unreleasedLabel =\n // @ts-expect-error undefined is strictly compared with string later\n unreleasedLabels[target];\n if (typeof value === \"string\" && unreleasedLabel !== value) {\n value = prettifyVersion(value);\n }\n\n results[target] = value;\n return results;\n }, {} as Targets);\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAGO,SAASE,eAAeA,CAACC,OAAe,EAAE;EAC/C,IAAI,OAAOA,OAAO,KAAK,QAAQ,EAAE;IAC/B,OAAOA,OAAO;EAChB;EAEA,MAAM;IAAEC,KAAK;IAAEC,KAAK;IAAEC;EAAM,CAAC,GAAGC,OAAM,CAACC,KAAK,CAACL,OAAO,CAAC;EAErD,MAAMM,KAAK,GAAG,CAACL,KAAK,CAAC;EAErB,IAAIC,KAAK,IAAIC,KAAK,EAAE;IAClBG,KAAK,CAACC,IAAI,CAACL,KAAK,CAAC;EACnB;EAEA,IAAIC,KAAK,EAAE;IACTG,KAAK,CAACC,IAAI,CAACJ,KAAK,CAAC;EACnB;EAEA,OAAOG,KAAK,CAACE,IAAI,CAAC,GAAG,CAAC;AACxB;AAEO,SAASC,eAAeA,CAACC,OAAgB,EAAW;EACzD,OAAOC,MAAM,CAACC,IAAI,CAACF,OAAO,CAAC,CAACG,MAAM,CAAC,CAACC,OAAO,EAAEC,MAAc,KAAK;IAC9D,IAAIC,KAAK,GAAGN,OAAO,CAACK,MAAM,CAAC;IAE3B,MAAME,eAAe,GAEnBC,yBAAgB,CAACH,MAAM,CAAC;IAC1B,IAAI,OAAOC,KAAK,KAAK,QAAQ,IAAIC,eAAe,KAAKD,KAAK,EAAE;MAC1DA,KAAK,GAAGjB,eAAe,CAACiB,KAAK,CAAC;IAChC;IAEAF,OAAO,CAACC,MAAM,CAAC,GAAGC,KAAK;IACvB,OAAOF,OAAO;EAChB,CAAC,EAAE,CAAC,CAAY,CAAC;AACnB","ignoreList":[]}
@@ -0,0 +1 @@
{"version":3,"file":"plane.js","sources":["../../../src/icons/plane.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Plane\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTcuOCAxOS4yIDE2IDExbDMuNS0zLjVDMjEgNiAyMS41IDQgMjEgM2MtMS0uNS0zIDAtNC41IDEuNUwxMyA4IDQuOCA2LjJjLS41LS4xLS45LjEtMS4xLjVsLS4zLjVjLS4yLjUtLjEgMSAuMyAxLjNMOSAxMmwtMiAzSDRsLTEgMSAzIDIgMiAzIDEtMXYtM2wzLTIgMy41IDUuM2MuMy40LjguNSAxLjMuM2wuNS0uMmMuNC0uMy42LS43LjUtMS4yeiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/plane\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 Plane = createLucideIcon('Plane', [\n [\n 'path',\n {\n d: 'M17.8 19.2 16 11l3.5-3.5C21 6 21.5 4 21 3c-1-.5-3 0-4.5 1.5L13 8 4.8 6.2c-.5-.1-.9.1-1.1.5l-.3.5c-.2.5-.1 1 .3 1.3L9 12l-2 3H4l-1 1 3 2 2 3 1-1v-3l3-2 3.5 5.3c.3.4.8.5 1.3.3l.5-.2c.4-.3.6-.7.5-1.2z',\n key: '1v9wt8',\n },\n ],\n]);\n\nexport default Plane;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,iBAAiB,OAAS,CAAA,CAAA,CAAA;AAAA,CACtC,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA;AACF,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,77 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GeneralSign = void 0;
const sign_js_1 = require("../flattened/sign.js");
const errors_js_1 = require("../../util/errors.js");
class IndividualSignature {
parent;
protectedHeader;
unprotectedHeader;
options;
key;
constructor(sig, key, options) {
this.parent = sig;
this.key = key;
this.options = options;
}
setProtectedHeader(protectedHeader) {
if (this.protectedHeader) {
throw new TypeError('setProtectedHeader can only be called once');
}
this.protectedHeader = protectedHeader;
return this;
}
setUnprotectedHeader(unprotectedHeader) {
if (this.unprotectedHeader) {
throw new TypeError('setUnprotectedHeader can only be called once');
}
this.unprotectedHeader = unprotectedHeader;
return this;
}
addSignature(...args) {
return this.parent.addSignature(...args);
}
sign(...args) {
return this.parent.sign(...args);
}
done() {
return this.parent;
}
}
class GeneralSign {
_payload;
_signatures = [];
constructor(payload) {
this._payload = payload;
}
addSignature(key, options) {
const signature = new IndividualSignature(this, key, options);
this._signatures.push(signature);
return signature;
}
async sign() {
if (!this._signatures.length) {
throw new errors_js_1.JWSInvalid('at least one signature must be added');
}
const jws = {
signatures: [],
payload: '',
};
for (let i = 0; i < this._signatures.length; i++) {
const signature = this._signatures[i];
const flattened = new sign_js_1.FlattenedSign(this._payload);
flattened.setProtectedHeader(signature.protectedHeader);
flattened.setUnprotectedHeader(signature.unprotectedHeader);
const { payload, ...rest } = await flattened.sign(signature.key, signature.options);
if (i === 0) {
jws.payload = payload;
}
else if (jws.payload !== payload) {
throw new errors_js_1.JWSInvalid('inconsistent use of JWS Unencoded Payload (RFC7797)');
}
jws.signatures.push(rest);
}
return jws;
}
}
exports.GeneralSign = GeneralSign;
@@ -0,0 +1,178 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Locale = exports.CountryCode = exports.DID = exports.SafeInt = exports.Void = exports.IBAN = exports.JSONObject = exports.JSON = exports.Currency = exports.USCurrency = exports.Longitude = exports.Latitude = exports.JWT = exports.ISBN = exports.RGBA = exports.RGB = exports.Port = exports.MAC = exports.IPv6 = exports.IPv4 = exports.IP = exports.HSLA = exports.HSL = exports.Hexadecimal = exports.HexColorCode = exports.UUID = exports.PostalCode = exports.PositiveInt = exports.PositiveFloat = exports.ObjectID = exports.PhoneNumber = exports.NonPositiveInt = exports.NonPositiveFloat = exports.NonNegativeInt = exports.NonNegativeFloat = exports.NonEmptyString = exports.NegativeInt = exports.NegativeFloat = exports.EmailAddress = exports.LocalEndTime = exports.LocalDateTime = exports.LocalTime = exports.LocalDate = exports.Duration = exports.UtcOffset = exports.TimeZone = exports.Timestamp = exports.DateTimeISO = exports.DateTime = exports.Time = void 0;
exports.ISO8601Duration = exports.Byte = exports.BigInt = exports.Long = exports.GUID = exports.UnsignedFloat = exports.UnsignedInt = exports.URL = exports.Date = exports.IPCPatent = exports.LCCSubclass = exports.DeweyDecimal = exports.SemVer = exports.Cuid = exports.AccountNumber = exports.RoutingNumber = void 0;
const BigIntMock = () => BigInt(Number.MAX_SAFE_INTEGER);
exports.Long = BigIntMock;
exports.BigInt = BigIntMock;
const ByteMock = () => new Uint8Array([1988, 1981, 1965, 1963, 1959, 1955]);
exports.Byte = ByteMock;
const DateMock = () => '2007-12-03';
exports.Date = DateMock;
const Time = () => '10:15:30Z';
exports.Time = Time;
const DateTime = () => '2007-12-03T10:15:30Z';
exports.DateTime = DateTime;
const DateTimeISO = () => '2007-12-03T10:15:30Z';
exports.DateTimeISO = DateTimeISO;
const Timestamp = () => 1592577642;
exports.Timestamp = Timestamp;
const TimeZone = () => 'Etc/UTC';
exports.TimeZone = TimeZone;
const UtcOffset = () => '+03:00';
exports.UtcOffset = UtcOffset;
const Duration = () => 'P3Y6M4DT12H30M5S';
exports.Duration = Duration;
exports.ISO8601Duration = exports.Duration;
const LocalDate = () => '2020-07-19';
exports.LocalDate = LocalDate;
const LocalTime = () => '08:45:59';
exports.LocalTime = LocalTime;
const LocalDateTime = () => '2020-07-19T08:45:59';
exports.LocalDateTime = LocalDateTime;
const LocalEndTime = () => '24:00:00';
exports.LocalEndTime = LocalEndTime;
const EmailAddress = () => 'test@test.com';
exports.EmailAddress = EmailAddress;
const NegativeFloat = () => -123.45;
exports.NegativeFloat = NegativeFloat;
const NegativeInt = () => -123;
exports.NegativeInt = NegativeInt;
const NonEmptyString = () => 'string';
exports.NonEmptyString = NonEmptyString;
const NonNegativeFloat = () => 123.45;
exports.NonNegativeFloat = NonNegativeFloat;
exports.UnsignedFloat = exports.NonNegativeFloat;
const NonNegativeInt = () => 123;
exports.NonNegativeInt = NonNegativeInt;
exports.UnsignedInt = exports.NonNegativeInt;
const NonPositiveFloat = () => -123.45;
exports.NonPositiveFloat = NonPositiveFloat;
const NonPositiveInt = () => -123;
exports.NonPositiveInt = NonPositiveInt;
const PhoneNumber = () => '+17895551234';
exports.PhoneNumber = PhoneNumber;
const ObjectID = () => '5e5677d71bdc2ae76344968c';
exports.ObjectID = ObjectID;
const PositiveFloat = () => 123.45;
exports.PositiveFloat = PositiveFloat;
const PositiveInt = () => 123;
exports.PositiveInt = PositiveInt;
const PostalCode = () => '60031';
exports.PostalCode = PostalCode;
const URLMock = () => new URL('http://www.test.com/');
exports.URL = URLMock;
// https://stackoverflow.com/questions/105034/create-guid-uuid-in-javascript
const UUID = () => {
// Public Domain/MIT
let d = new Date().getTime();
if (typeof performance !== 'undefined' && typeof performance.now === 'function') {
d += performance.now(); // use high-precision timer if available
}
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
// tslint:disable-next-line: no-bitwise
const r = (d + Math.random() * 16) % 16 | 0;
d = Math.floor(d / 16);
// tslint:disable-next-line: no-bitwise
return (c === 'x' ? r : (r & 0x3) | 0x8).toString(16);
});
};
exports.UUID = UUID;
exports.GUID = exports.UUID;
const HexColorCode = () => '#' + Math.floor(Math.random() * 16777215).toString(16);
exports.HexColorCode = HexColorCode;
const Hexadecimal = () => Math.floor(Math.random() * 16777215).toString(16);
exports.Hexadecimal = Hexadecimal;
const randomVal = (min, max) => {
return Math.floor(Math.random() * (max - min) + 1) + min;
};
// https://codepen.io/meowwwls/pen/jbEJRp
const HSL = () => `hsl(${randomVal(0, 360)}, ${randomVal(30, 95)}%, ${randomVal(30, 80)}%)`;
exports.HSL = HSL;
const HSLA = () => `hsla(${randomVal(0, 360)}, ${randomVal(30, 95)}%, ${randomVal(30, 80)}%, ${Math.random()})`;
exports.HSLA = HSLA;
const IP = () => '2001:0db8:85a3:0000:0000:8a2e:0370:7334';
exports.IP = IP;
// https://stackoverflow.com/questions/43464519/creating-fake-ip-address-using-javascript
const IPv4 = () => Math.floor(Math.random() * 255) +
1 +
'.' +
(Math.floor(Math.random() * 255) + 0) +
'.' +
(Math.floor(Math.random() * 255) + 0) +
'.' +
(Math.floor(Math.random() * 255) + 0);
exports.IPv4 = IPv4;
const IPv6 = () => '2001:0db8:85a3:0000:0000:8a2e:0370:7334';
exports.IPv6 = IPv6;
// http://jsfiddle.net/guest271314/qhbC9/
const MAC = () => 'XX:XX:XX:XX:XX:XX'.replace(/X/g, () => '0123456789ABCDEF'.charAt(Math.floor(Math.random() * 16)));
exports.MAC = MAC;
const Port = () => randomVal(0, 65535);
exports.Port = Port;
const RGB = () => `rgb(${randomVal(0, 255)}, ${randomVal(0, 255)}, ${randomVal(0, 255)})`;
exports.RGB = RGB;
const RGBA = () => `rgba(${randomVal(0, 255)}, ${randomVal(0, 255)}, ${randomVal(0, 255)}, ${Math.random()})`;
exports.RGBA = RGBA;
const ISBN = () => `978-3-16-148410-0`;
exports.ISBN = ISBN;
const JWT = () => {
// HEADER: {
// "alg": "HS256",
// "typ": "JWT"
// }
//
// PAYLOAD: {
// "sub": "1234567890",
// "iat": 1516239022,
// "project": "graphql-scalars"
// }
//
// SIGNATURE: {
// HMACSHA256(
// base64UrlEncode(header) + "." +
// base64UrlEncode(payload),
// password
// )
// }
return `eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwiaWF0IjoxNTE2MjM5MDIyLCJwcm9qZWN0IjoiZ3JhcGhxbC1zY2FsYXJzIn0.nYdrSfE2nNRAgpiEU1uKgn2AYYKLo28Z0nhPXvsuIww`;
};
exports.JWT = JWT;
const Latitude = () => 41.902782;
exports.Latitude = Latitude;
const Longitude = () => 12.496366;
exports.Longitude = Longitude;
const USCurrency = () => 1000;
exports.USCurrency = USCurrency;
const Currency = () => 'USD';
exports.Currency = Currency;
const JSON = () => ({});
exports.JSON = JSON;
const JSONObject = () => ({});
exports.JSONObject = JSONObject;
const IBAN = () => 'NL55INGB4789170233';
exports.IBAN = IBAN;
const Void = () => null;
exports.Void = Void;
const SafeInt = () => Number.MAX_SAFE_INTEGER;
exports.SafeInt = SafeInt;
const DID = () => 'did:example:123456789abcdefghi';
exports.DID = DID;
const CountryCode = () => 'US';
exports.CountryCode = CountryCode;
const Locale = () => 'zh-cmn-Hans-CN';
exports.Locale = Locale;
const RoutingNumber = () => '111000025';
exports.RoutingNumber = RoutingNumber;
const AccountNumber = () => '000000012345';
exports.AccountNumber = AccountNumber;
const Cuid = () => 'cjld2cyuq0000t3rmniod1foy';
exports.Cuid = Cuid;
const SemVer = () => '1.0.0-alpha.1';
exports.SemVer = SemVer;
const DeweyDecimal = () => '435.4357';
exports.DeweyDecimal = DeweyDecimal;
const LCCSubclass = () => 'KBM';
exports.LCCSubclass = LCCSubclass;
const IPCPatent = () => 'G06F 12/803';
exports.IPCPatent = IPCPatent;
@@ -0,0 +1 @@
{"version":3,"file":"fire-extinguisher.js","sources":["../../../src/icons/fire-extinguisher.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name FireExtinguisher\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTUgNi41VjNhMSAxIDAgMCAwLTEtMWgtMmExIDEgMCAwIDAtMSAxdjMuNSIgLz4KICA8cGF0aCBkPSJNOSAxOGg4IiAvPgogIDxwYXRoIGQ9Ik0xOCAzaC0zIiAvPgogIDxwYXRoIGQ9Ik0xMSAzYTYgNiAwIDAgMC02IDZ2MTEiIC8+CiAgPHBhdGggZD0iTTUgMTNoNCIgLz4KICA8cGF0aCBkPSJNMTcgMTBhNCA0IDAgMCAwLTggMHYxMGEyIDIgMCAwIDAgMiAyaDRhMiAyIDAgMCAwIDItMloiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/fire-extinguisher\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 FireExtinguisher = createLucideIcon('FireExtinguisher', [\n ['path', { d: 'M15 6.5V3a1 1 0 0 0-1-1h-2a1 1 0 0 0-1 1v3.5', key: 'sqyvz' }],\n ['path', { d: 'M9 18h8', key: 'i7pszb' }],\n ['path', { d: 'M18 3h-3', key: '7idoqj' }],\n ['path', { d: 'M11 3a6 6 0 0 0-6 6v11', key: '1v5je3' }],\n ['path', { d: 'M5 13h4', key: 'svpcxo' }],\n ['path', { d: 'M17 10a4 4 0 0 0-8 0v10a2 2 0 0 0 2 2h4a2 2 0 0 0 2-2Z', key: 'vsjego' }],\n]);\n\nexport default FireExtinguisher;\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,CAAmB,iBAAiB,kBAAoB,CAAA,CAAA,CAAA;AAAA,CAAA,CAC5D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAgD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,SAAS,CAAA,CAAA;AAAA,CAAA,CAC5E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA0B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACvD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,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,CAA0D,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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;AACzF,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,121 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const {
JAVASCRIPT_MODULE_TYPE_AUTO,
JAVASCRIPT_MODULE_TYPE_DYNAMIC,
JAVASCRIPT_MODULE_TYPE_ESM
} = require("./ModuleTypeConstants");
const ConstDependency = require("./dependencies/ConstDependency");
const ProvidedDependency = require("./dependencies/ProvidedDependency");
const { approve } = require("./javascript/JavascriptParserHelpers");
/** @typedef {import("../declarations/WebpackOptions").JavascriptParserOptions} JavascriptParserOptions */
/** @typedef {import("./Compiler")} Compiler */
/** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */
/** @typedef {import("./javascript/JavascriptParser")} JavascriptParser */
/** @typedef {import("./javascript/JavascriptParser").Range} Range */
const PLUGIN_NAME = "ProvidePlugin";
class ProvidePlugin {
/**
* @param {Record<string, string | string[]>} definitions the provided identifiers
*/
constructor(definitions) {
this.definitions = definitions;
}
/**
* Apply the plugin
* @param {Compiler} compiler the compiler instance
* @returns {void}
*/
apply(compiler) {
const definitions = this.definitions;
compiler.hooks.compilation.tap(
PLUGIN_NAME,
(compilation, { normalModuleFactory }) => {
compilation.dependencyTemplates.set(
ConstDependency,
new ConstDependency.Template()
);
compilation.dependencyFactories.set(
ProvidedDependency,
normalModuleFactory
);
compilation.dependencyTemplates.set(
ProvidedDependency,
new ProvidedDependency.Template()
);
/**
* @param {JavascriptParser} parser the parser
* @param {JavascriptParserOptions} parserOptions options
* @returns {void}
*/
const handler = (parser, parserOptions) => {
for (const name of Object.keys(definitions)) {
const request = [
...(Array.isArray(definitions[name])
? definitions[name]
: [definitions[name]])
];
const splittedName = name.split(".");
if (splittedName.length > 0) {
for (const [i, _] of splittedName.slice(1).entries()) {
const name = splittedName.slice(0, i + 1).join(".");
parser.hooks.canRename.for(name).tap(PLUGIN_NAME, approve);
}
}
parser.hooks.expression.for(name).tap(PLUGIN_NAME, (expr) => {
const nameIdentifier = name.includes(".")
? `__webpack_provided_${name.replace(/\./g, "_dot_")}`
: name;
const dep = new ProvidedDependency(
request[0],
nameIdentifier,
request.slice(1),
/** @type {Range} */ (expr.range)
);
dep.loc = /** @type {DependencyLocation} */ (expr.loc);
parser.state.module.addDependency(dep);
return true;
});
parser.hooks.call.for(name).tap(PLUGIN_NAME, (expr) => {
const nameIdentifier = name.includes(".")
? `__webpack_provided_${name.replace(/\./g, "_dot_")}`
: name;
const dep = new ProvidedDependency(
request[0],
nameIdentifier,
request.slice(1),
/** @type {Range} */ (expr.callee.range)
);
dep.loc = /** @type {DependencyLocation} */ (expr.callee.loc);
parser.state.module.addDependency(dep);
parser.walkExpressions(expr.arguments);
return true;
});
}
};
normalModuleFactory.hooks.parser
.for(JAVASCRIPT_MODULE_TYPE_AUTO)
.tap(PLUGIN_NAME, handler);
normalModuleFactory.hooks.parser
.for(JAVASCRIPT_MODULE_TYPE_DYNAMIC)
.tap(PLUGIN_NAME, handler);
normalModuleFactory.hooks.parser
.for(JAVASCRIPT_MODULE_TYPE_ESM)
.tap(PLUGIN_NAME, handler);
}
);
}
}
module.exports = ProvidePlugin;
@@ -0,0 +1,215 @@
import { type AnyTable, type InferModelFromColumns, Table } from "./table.cjs";
import { type AnyColumn, Column } from "./column.cjs";
import { entityKind } from "./entity.cjs";
import { and, asc, between, desc, exists, ilike, inArray, isNotNull, isNull, like, not, notBetween, notExists, notIlike, notInArray, notLike, or } from "./sql/expressions/index.cjs";
import { type Placeholder, SQL, sql } from "./sql/sql.cjs";
import type { Assume, ColumnsWithTable, Equal, Simplify, ValueOrArray } from "./utils.cjs";
export declare abstract class Relation<TTableName extends string = string> {
readonly sourceTable: Table;
readonly referencedTable: AnyTable<{
name: TTableName;
}>;
readonly relationName: string | undefined;
static readonly [entityKind]: string;
readonly $brand: 'Relation';
readonly referencedTableName: TTableName;
fieldName: string;
constructor(sourceTable: Table, referencedTable: AnyTable<{
name: TTableName;
}>, relationName: string | undefined);
abstract withFieldName(fieldName: string): Relation<TTableName>;
}
export declare class Relations<TTableName extends string = string, TConfig extends Record<string, Relation> = Record<string, Relation>> {
readonly table: AnyTable<{
name: TTableName;
}>;
readonly config: (helpers: TableRelationsHelpers<TTableName>) => TConfig;
static readonly [entityKind]: string;
readonly $brand: 'Relations';
constructor(table: AnyTable<{
name: TTableName;
}>, config: (helpers: TableRelationsHelpers<TTableName>) => TConfig);
}
export declare class One<TTableName extends string = string, TIsNullable extends boolean = boolean> extends Relation<TTableName> {
readonly config: RelationConfig<TTableName, string, AnyColumn<{
tableName: TTableName;
}>[]> | undefined;
readonly isNullable: TIsNullable;
static readonly [entityKind]: string;
protected $relationBrand: 'One';
constructor(sourceTable: Table, referencedTable: AnyTable<{
name: TTableName;
}>, config: RelationConfig<TTableName, string, AnyColumn<{
tableName: TTableName;
}>[]> | undefined, isNullable: TIsNullable);
withFieldName(fieldName: string): One<TTableName>;
}
export declare class Many<TTableName extends string> extends Relation<TTableName> {
readonly config: {
relationName: string;
} | undefined;
static readonly [entityKind]: string;
protected $relationBrand: 'Many';
constructor(sourceTable: Table, referencedTable: AnyTable<{
name: TTableName;
}>, config: {
relationName: string;
} | undefined);
withFieldName(fieldName: string): Many<TTableName>;
}
export type TableRelationsKeysOnly<TSchema extends Record<string, unknown>, TTableName extends string, K extends keyof TSchema> = TSchema[K] extends Relations<TTableName> ? K : never;
export type ExtractTableRelationsFromSchema<TSchema extends Record<string, unknown>, TTableName extends string> = ExtractObjectValues<{
[K in keyof TSchema as TableRelationsKeysOnly<TSchema, TTableName, K>]: TSchema[K] extends Relations<TTableName, infer TConfig> ? TConfig : never;
}>;
export type ExtractObjectValues<T> = T[keyof T];
export type ExtractRelationsFromTableExtraConfigSchema<TConfig extends unknown[]> = ExtractObjectValues<{
[K in keyof TConfig as TConfig[K] extends Relations<any> ? K : never]: TConfig[K] extends Relations<infer TRelationConfig> ? TRelationConfig : never;
}>;
export declare function getOperators(): {
and: typeof and;
between: typeof between;
eq: import("./index.ts").BinaryOperator;
exists: typeof exists;
gt: import("./index.ts").BinaryOperator;
gte: import("./index.ts").BinaryOperator;
ilike: typeof ilike;
inArray: typeof inArray;
isNull: typeof isNull;
isNotNull: typeof isNotNull;
like: typeof like;
lt: import("./index.ts").BinaryOperator;
lte: import("./index.ts").BinaryOperator;
ne: import("./index.ts").BinaryOperator;
not: typeof not;
notBetween: typeof notBetween;
notExists: typeof notExists;
notLike: typeof notLike;
notIlike: typeof notIlike;
notInArray: typeof notInArray;
or: typeof or;
sql: typeof sql;
};
export type Operators = ReturnType<typeof getOperators>;
export declare function getOrderByOperators(): {
sql: typeof sql;
asc: typeof asc;
desc: typeof desc;
};
export type OrderByOperators = ReturnType<typeof getOrderByOperators>;
export type FindTableByDBName<TSchema extends TablesRelationalConfig, TTableName extends string> = ExtractObjectValues<{
[K in keyof TSchema as TSchema[K]['dbName'] extends TTableName ? K : never]: TSchema[K];
}>;
export type DBQueryConfig<TRelationType extends 'one' | 'many' = 'one' | 'many', TIsRoot extends boolean = boolean, TSchema extends TablesRelationalConfig = TablesRelationalConfig, TTableConfig extends TableRelationalConfig = TableRelationalConfig> = {
columns?: {
[K in keyof TTableConfig['columns']]?: boolean;
} | undefined;
with?: {
[K in keyof TTableConfig['relations']]?: true | DBQueryConfig<TTableConfig['relations'][K] extends One ? 'one' : 'many', false, TSchema, FindTableByDBName<TSchema, TTableConfig['relations'][K]['referencedTableName']>> | undefined;
} | undefined;
extras?: Record<string, SQL.Aliased> | ((fields: Simplify<[
TTableConfig['columns']
] extends [never] ? {} : TTableConfig['columns']>, operators: {
sql: Operators['sql'];
}) => Record<string, SQL.Aliased>) | undefined;
} & (TRelationType extends 'many' ? {
where?: SQL | undefined | ((fields: Simplify<[
TTableConfig['columns']
] extends [never] ? {} : TTableConfig['columns']>, operators: Operators) => SQL | undefined);
orderBy?: ValueOrArray<AnyColumn | SQL> | ((fields: Simplify<[
TTableConfig['columns']
] extends [never] ? {} : TTableConfig['columns']>, operators: OrderByOperators) => ValueOrArray<AnyColumn | SQL>) | undefined;
limit?: number | Placeholder | undefined;
} & (TIsRoot extends true ? {
offset?: number | Placeholder | undefined;
} : {}) : {});
export interface TableRelationalConfig {
tsName: string;
dbName: string;
columns: Record<string, Column>;
relations: Record<string, Relation>;
primaryKey: AnyColumn[];
schema?: string;
}
export type TablesRelationalConfig = Record<string, TableRelationalConfig>;
export interface RelationalSchemaConfig<TSchema extends TablesRelationalConfig> {
fullSchema: Record<string, unknown>;
schema: TSchema;
tableNamesMap: Record<string, string>;
}
export type ExtractTablesWithRelations<TSchema extends Record<string, unknown>> = {
[K in keyof TSchema as TSchema[K] extends Table ? K : never]: TSchema[K] extends Table ? {
tsName: K & string;
dbName: TSchema[K]['_']['name'];
columns: TSchema[K]['_']['columns'];
relations: ExtractTableRelationsFromSchema<TSchema, TSchema[K]['_']['name']>;
primaryKey: AnyColumn[];
} : never;
};
export type ReturnTypeOrValue<T> = T extends (...args: any[]) => infer R ? R : T;
export type BuildRelationResult<TSchema extends TablesRelationalConfig, TInclude, TRelations extends Record<string, Relation>> = {
[K in NonUndefinedKeysOnly<TInclude> & keyof TRelations]: TRelations[K] extends infer TRel extends Relation ? BuildQueryResult<TSchema, FindTableByDBName<TSchema, TRel['referencedTableName']>, Assume<TInclude[K], true | Record<string, unknown>>> extends infer TResult ? TRel extends One ? TResult | (Equal<TRel['isNullable'], false> extends true ? null : never) : TResult[] : never : never;
};
export type NonUndefinedKeysOnly<T> = ExtractObjectValues<{
[K in keyof T as T[K] extends undefined ? never : K]: K;
}> & keyof T;
export type BuildQueryResult<TSchema extends TablesRelationalConfig, TTableConfig extends TableRelationalConfig, TFullSelection extends true | Record<string, unknown>> = Equal<TFullSelection, true> extends true ? InferModelFromColumns<TTableConfig['columns']> : TFullSelection extends Record<string, unknown> ? Simplify<(TFullSelection['columns'] extends Record<string, unknown> ? InferModelFromColumns<{
[K in Equal<Exclude<TFullSelection['columns'][keyof TFullSelection['columns'] & keyof TTableConfig['columns']], undefined>, false> extends true ? Exclude<keyof TTableConfig['columns'], NonUndefinedKeysOnly<TFullSelection['columns']>> : {
[K in keyof TFullSelection['columns']]: Equal<TFullSelection['columns'][K], true> extends true ? K : never;
}[keyof TFullSelection['columns']] & keyof TTableConfig['columns']]: TTableConfig['columns'][K];
}> : InferModelFromColumns<TTableConfig['columns']>) & (TFullSelection['extras'] extends Record<string, unknown> | ((...args: any[]) => Record<string, unknown>) ? {
[K in NonUndefinedKeysOnly<ReturnTypeOrValue<TFullSelection['extras']>>]: Assume<ReturnTypeOrValue<TFullSelection['extras']>[K], SQL.Aliased>['_']['type'];
} : {}) & (TFullSelection['with'] extends Record<string, unknown> ? BuildRelationResult<TSchema, TFullSelection['with'], TTableConfig['relations']> : {})> : never;
export interface RelationConfig<TTableName extends string, TForeignTableName extends string, TColumns extends AnyColumn<{
tableName: TTableName;
}>[]> {
relationName?: string;
fields: TColumns;
references: ColumnsWithTable<TTableName, TForeignTableName, TColumns>;
}
export declare function extractTablesRelationalConfig<TTables extends TablesRelationalConfig>(schema: Record<string, unknown>, configHelpers: (table: Table) => any): {
tables: TTables;
tableNamesMap: Record<string, string>;
};
export declare function relations<TTableName extends string, TRelations extends Record<string, Relation<any>>>(table: AnyTable<{
name: TTableName;
}>, relations: (helpers: TableRelationsHelpers<TTableName>) => TRelations): Relations<TTableName, TRelations>;
export declare function createOne<TTableName extends string>(sourceTable: Table): <TForeignTable extends Table, TColumns extends [AnyColumn<{
tableName: TTableName;
}>, ...AnyColumn<{
tableName: TTableName;
}>[]]>(table: TForeignTable, config?: RelationConfig<TTableName, TForeignTable["_"]["name"], TColumns>) => One<TForeignTable["_"]["name"], Equal<TColumns[number]["_"]["notNull"], true>>;
export declare function createMany(sourceTable: Table): <TForeignTable extends Table>(referencedTable: TForeignTable, config?: {
relationName: string;
}) => Many<TForeignTable["_"]["name"]>;
export interface NormalizedRelation {
fields: AnyColumn[];
references: AnyColumn[];
}
export declare function normalizeRelation(schema: TablesRelationalConfig, tableNamesMap: Record<string, string>, relation: Relation): NormalizedRelation;
export declare function createTableRelationsHelpers<TTableName extends string>(sourceTable: AnyTable<{
name: TTableName;
}>): {
one: <TForeignTable extends Table, TColumns extends [AnyColumn<{
tableName: TTableName;
}>, ...AnyColumn<{
tableName: TTableName;
}>[]]>(table: TForeignTable, config?: RelationConfig<TTableName, TForeignTable["_"]["name"], TColumns> | undefined) => One<TForeignTable["_"]["name"], Equal<TColumns[number]["_"]["notNull"], true>>;
many: <TForeignTable extends Table>(referencedTable: TForeignTable, config?: {
relationName: string;
}) => Many<TForeignTable["_"]["name"]>;
};
export type TableRelationsHelpers<TTableName extends string> = ReturnType<typeof createTableRelationsHelpers<TTableName>>;
export interface BuildRelationalQueryResult<TTable extends Table = Table, TColumn extends Column = Column> {
tableTsKey: string;
selection: {
dbKey: string;
tsKey: string;
field: TColumn | SQL | SQL.Aliased;
relationTableTsKey: string | undefined;
isJson: boolean;
isExtra?: boolean;
selection: BuildRelationalQueryResult<TTable>['selection'];
}[];
sql: TTable | SQL;
}
export declare function mapRelationalRow(tablesConfig: TablesRelationalConfig, tableConfig: TableRelationalConfig, row: unknown[], buildQueryResultSelection: BuildRelationalQueryResult['selection'], mapColumnValue?: (value: unknown) => unknown): Record<string, unknown>;
@@ -0,0 +1 @@
{"version":3,"file":"file-plus.js","sources":["../../../src/icons/file-plus.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name FilePlus\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTUgMkg2YTIgMiAwIDAgMC0yIDJ2MTZhMiAyIDAgMCAwIDIgMmgxMmEyIDIgMCAwIDAgMi0yVjdaIiAvPgogIDxwYXRoIGQ9Ik0xNCAydjRhMiAyIDAgMCAwIDIgMmg0IiAvPgogIDxwYXRoIGQ9Ik05IDE1aDYiIC8+CiAgPHBhdGggZD0iTTEyIDE4di02IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/file-plus\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 FilePlus = createLucideIcon('FilePlus', [\n ['path', { d: 'M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z', key: '1rqfz7' }],\n ['path', { d: 'M14 2v4a2 2 0 0 0 2 2h4', key: 'tnqrlb' }],\n ['path', { d: 'M9 15h6', key: 'cctwl0' }],\n ['path', { d: 'M12 18v-6', key: '17g6i2' }],\n]);\n\nexport default FilePlus;\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,CAA8D,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAC3F,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA2B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,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,77 @@
import { getRoundingMethod } from "./_lib/getRoundingMethod.js";
import { constructFrom } from "./constructFrom.js";
import { toDate } from "./toDate.js";
/**
* The {@link roundToNearestHours} function options.
*/
/**
* @name roundToNearestHours
* @category Hour Helpers
* @summary Rounds the given date to the nearest hour
*
* @description
* Rounds the given date to the nearest hour (or number of hours).
* Rounds up when the given date is exactly between the nearest round hours.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
*
* @param date - The date to round
* @param options - An object with options.
*
* @returns The new date rounded to the closest hour
*
* @example
* // Round 10 July 2014 12:34:56 to nearest hour:
* const result = roundToNearestHours(new Date(2014, 6, 10, 12, 34, 56))
* //=> Thu Jul 10 2014 13:00:00
*
* @example
* // Round 10 July 2014 12:34:56 to nearest half hour:
* const result = roundToNearestHours(new Date(2014, 6, 10, 12, 34, 56), { nearestTo: 6 })
* //=> Thu Jul 10 2014 12:00:00
*
* @example
* // Round 10 July 2014 12:34:56 to nearest half hour:
* const result = roundToNearestHours(new Date(2014, 6, 10, 12, 34, 56), { nearestTo: 8 })
* //=> Thu Jul 10 2014 16:00:00
*
* @example
* // Floor (rounds down) 10 July 2014 12:34:56 to nearest hour:
* const result = roundToNearestHours(new Date(2014, 6, 10, 1, 23, 45), { roundingMethod: 'ceil' })
* //=> Thu Jul 10 2014 02:00:00
*
* @example
* // Ceil (rounds up) 10 July 2014 12:34:56 to nearest quarter hour:
* const result = roundToNearestHours(new Date(2014, 6, 10, 12, 34, 56), { roundingMethod: 'floor', nearestTo: 8 })
* //=> Thu Jul 10 2014 08:00:00
*/
export function roundToNearestHours(date, options) {
const nearestTo = options?.nearestTo ?? 1;
if (nearestTo < 1 || nearestTo > 12)
return constructFrom(options?.in || date, NaN);
const date_ = toDate(date, options?.in);
const fractionalMinutes = date_.getMinutes() / 60;
const fractionalSeconds = date_.getSeconds() / 60 / 60;
const fractionalMilliseconds = date_.getMilliseconds() / 1000 / 60 / 60;
const hours =
date_.getHours() +
fractionalMinutes +
fractionalSeconds +
fractionalMilliseconds;
const method = options?.roundingMethod ?? "round";
const roundingMethod = getRoundingMethod(method);
const roundedHours = roundingMethod(hours / nearestTo) * nearestTo;
date_.setHours(roundedHours, 0, 0, 0);
return date_;
}
// Fallback for modularized imports:
export default roundToNearestHours;
@@ -0,0 +1,17 @@
import { jsx as _jsx } from "react/jsx-runtime";
import React from 'react';
import './index.scss';
export const MenuIcon = () => /*#__PURE__*/_jsx("svg", {
className: "icon icon--menu",
fill: "none",
height: "20",
viewBox: "0 0 20 20",
width: "20",
xmlns: "http://www.w3.org/2000/svg",
children: /*#__PURE__*/_jsx("path", {
className: "stroke",
d: "M4.66667 10H15.3333M4.66667 6H15.3333M4.66667 14H15.3333",
strokeLinecap: "square"
})
});
//# sourceMappingURL=index.js.map
@@ -0,0 +1,9 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
export { default } from './square-chevron-down.js';
//# sourceMappingURL=chevron-down-square.js.map
@@ -0,0 +1 @@
{"version":3,"file":"findLocaleFromCode.d.ts","sourceRoot":"","sources":["../../src/utilities/findLocaleFromCode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,2BAA2B,EAAE,MAAM,SAAS,CAAA;AAIlE,eAAO,MAAM,kBAAkB,uBACT,2BAA2B,UACvC,MAAM,KACb,MAAM,GAAG,IAMX,CAAA"}
@@ -0,0 +1,59 @@
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { diag } from '@opentelemetry/api';
/**
* Returns a function that logs an error using the provided logger, or a
* console logger if one was not provided.
*/
export function loggingErrorHandler() {
return (ex) => {
diag.error(stringifyException(ex));
};
}
/**
* Converts an exception into a string representation
* @param {Exception} ex
*/
function stringifyException(ex) {
if (typeof ex === 'string') {
return ex;
}
else {
return JSON.stringify(flattenException(ex));
}
}
/**
* Flattens an exception into key-value pairs by traversing the prototype chain
* and coercing values to strings. Duplicate properties will not be overwritten;
* the first insert wins.
*/
function flattenException(ex) {
const result = {};
let current = ex;
while (current !== null) {
Object.getOwnPropertyNames(current).forEach(propertyName => {
if (result[propertyName])
return;
const value = current[propertyName];
if (value) {
result[propertyName] = String(value);
}
});
current = Object.getPrototypeOf(current);
}
return result;
}
//# sourceMappingURL=logging-error-handler.js.map
@@ -0,0 +1,415 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const semanticConventions = require('@opentelemetry/semantic-conventions');
const core = require('@sentry/core');
const node = require('@sentry/node');
const debugBuild = require('../common/debug-build.js');
const devErrorSymbolicationEventProcessor = require('../common/devErrorSymbolicationEventProcessor.js');
const getVercelEnv = require('../common/getVercelEnv.js');
const nextSpanAttributes = require('../common/nextSpanAttributes.js');
const spanAttributesWithLogicAttached = require('../common/span-attributes-with-logic-attached.js');
const isBuild = require('../common/utils/isBuild.js');
const responseEnd = require('../common/utils/responseEnd.js');
const setUrlProcessingMetadata = require('../common/utils/setUrlProcessingMetadata.js');
const distDirRewriteFramesIntegration = require('./distDirRewriteFramesIntegration.js');
const handleOnSpanStart = require('./handleOnSpanStart.js');
const prepareSafeIdGeneratorContext = require('./prepareSafeIdGeneratorContext.js');
const vercelCronsMonitoring = require('./vercelCronsMonitoring.js');
const _error = require('../common/pages-router-instrumentation/_error.js');
const nextSpan = require('../common/utils/nextSpan.js');
const wrapGetStaticPropsWithSentry = require('../common/pages-router-instrumentation/wrapGetStaticPropsWithSentry.js');
const wrapGetInitialPropsWithSentry = require('../common/pages-router-instrumentation/wrapGetInitialPropsWithSentry.js');
const wrapAppGetInitialPropsWithSentry = require('../common/pages-router-instrumentation/wrapAppGetInitialPropsWithSentry.js');
const wrapDocumentGetInitialPropsWithSentry = require('../common/pages-router-instrumentation/wrapDocumentGetInitialPropsWithSentry.js');
const wrapErrorGetInitialPropsWithSentry = require('../common/pages-router-instrumentation/wrapErrorGetInitialPropsWithSentry.js');
const wrapGetServerSidePropsWithSentry = require('../common/pages-router-instrumentation/wrapGetServerSidePropsWithSentry.js');
const wrapServerComponentWithSentry = require('../common/wrapServerComponentWithSentry.js');
const wrapRouteHandlerWithSentry = require('../common/wrapRouteHandlerWithSentry.js');
const wrapApiHandlerWithSentryVercelCrons = require('../common/pages-router-instrumentation/wrapApiHandlerWithSentryVercelCrons.js');
const wrapMiddlewareWithSentry = require('../common/wrapMiddlewareWithSentry.js');
const wrapPageComponentWithSentry = require('../common/pages-router-instrumentation/wrapPageComponentWithSentry.js');
const wrapGenerationFunctionWithSentry = require('../common/wrapGenerationFunctionWithSentry.js');
const withServerActionInstrumentation = require('../common/withServerActionInstrumentation.js');
const captureRequestError = require('../common/captureRequestError.js');
const wrapApiHandlerWithSentry = require('../common/pages-router-instrumentation/wrapApiHandlerWithSentry.js');
// import/export got a false positive, and affects most of our index barrel files
// can be removed once following issue is fixed: https://github.com/import-js/eslint-plugin-import/issues/703
/* eslint-disable import/export */
const globalWithInjectedValues = core.GLOBAL_OBJ
;
/**
* A passthrough error boundary for the server that doesn't depend on any react. Error boundaries don't catch SSR errors
* so they should simply be a passthrough.
*/
const ErrorBoundary = (props) => {
if (!props.children) {
return null;
}
if (typeof props.children === 'function') {
return (props.children )();
}
// since Next.js >= 10 requires React ^16.6.0 we are allowed to return children like this here
return props.children ;
};
/**
* A passthrough redux enhancer for the server that doesn't depend on anything from the `@sentry/react` package.
*/
function createReduxEnhancer() {
return (createStore) => createStore;
}
/**
* A passthrough error boundary wrapper for the server that doesn't depend on any react. Error boundaries don't catch
* SSR errors so they should simply be a passthrough.
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function withErrorBoundary(
WrappedComponent,
) {
return WrappedComponent ;
}
/**
* Just a passthrough since we're on the server and showing the report dialog on the server doesn't make any sense.
*/
function showReportDialog() {
return;
}
/**
* Returns the runtime configuration for the SDK based on the environment.
* When running on OpenNext/Cloudflare, returns cloudflare runtime config.
*/
function getCloudflareRuntimeConfig() {
if (responseEnd.isCloudflareWaitUntilAvailable()) {
// todo: add version information?
return { runtime: { name: 'cloudflare' } };
}
return undefined;
}
/** Inits the Sentry NextJS SDK on node. */
function init(options) {
prepareSafeIdGeneratorContext.prepareSafeIdGeneratorContext();
if (isBuild.isBuild()) {
return;
}
if (!debugBuild.DEBUG_BUILD && options.debug) {
// eslint-disable-next-line no-console
console.warn(
'[@sentry/nextjs] You have enabled `debug: true`, but Sentry debug logging was removed from your bundle (likely via `withSentryConfig({ disableLogger: true })` / `webpack.treeshake.removeDebugLogging: true`). Set that option to `false` to see Sentry debug output.',
);
}
const customDefaultIntegrations = node.getDefaultIntegrations(options)
.filter(integration => integration.name !== 'Http')
.concat(
// We are using the HTTP integration without instrumenting incoming HTTP requests because Next.js does that by itself.
node.httpIntegration({
disableIncomingRequestSpans: true,
}),
);
// Turn off Next.js' own fetch instrumentation (only when we manage OTEL)
// https://github.com/lforst/nextjs-fork/blob/1994fd186defda77ad971c36dc3163db263c993f/packages/next/src/server/lib/patch-fetch.ts#L245
// Enable with custom OTel setup: https://github.com/getsentry/sentry-javascript/issues/17581
if (!options.skipOpenTelemetrySetup) {
process.env.NEXT_OTEL_FETCH_DISABLED = '1';
}
// This value is injected at build time, based on the output directory specified in the build config. Though a default
// is set there, we set it here as well, just in case something has gone wrong with the injection.
const distDirName = process.env._sentryRewriteFramesDistDir || globalWithInjectedValues._sentryRewriteFramesDistDir;
if (distDirName) {
customDefaultIntegrations.push(distDirRewriteFramesIntegration.distDirRewriteFramesIntegration({ distDirName }));
}
// Detect if running on OpenNext/Cloudflare and get runtime config
const cloudflareConfig = getCloudflareRuntimeConfig();
const opts = {
environment: process.env.SENTRY_ENVIRONMENT || getVercelEnv.getVercelEnv(false) || process.env.NODE_ENV,
release: process.env._sentryRelease || globalWithInjectedValues._sentryRelease,
defaultIntegrations: customDefaultIntegrations,
...options,
// Override runtime to 'cloudflare' when running on OpenNext/Cloudflare
...cloudflareConfig,
};
if (debugBuild.DEBUG_BUILD && opts.debug) {
core.debug.enable();
}
debugBuild.DEBUG_BUILD && core.debug.log('Initializing SDK...');
if (sdkAlreadyInitialized()) {
debugBuild.DEBUG_BUILD && core.debug.log('SDK already initialized');
return;
}
// Use appropriate SDK metadata based on the runtime environment
core.applySdkMetadata(opts, 'nextjs', ['nextjs', cloudflareConfig ? 'cloudflare' : 'node']);
const client = node.init(opts);
client?.on('beforeSampling', ({ spanAttributes }, samplingDecision) => {
// There are situations where the Next.js Node.js server forwards requests for the Edge Runtime server (e.g. in
// middleware) and this causes spans for Sentry ingest requests to be created. These are not exempt from our tracing
// because we didn't get the chance to do `suppressTracing`, since this happens outside of userland.
// We need to drop these spans.
if (
// eslint-disable-next-line deprecation/deprecation
(typeof spanAttributes[semanticConventions.SEMATTRS_HTTP_TARGET] === 'string' &&
// eslint-disable-next-line deprecation/deprecation
spanAttributes[semanticConventions.SEMATTRS_HTTP_TARGET].includes('sentry_key') &&
// eslint-disable-next-line deprecation/deprecation
spanAttributes[semanticConventions.SEMATTRS_HTTP_TARGET].includes('sentry_client')) ||
(typeof spanAttributes[semanticConventions.ATTR_URL_QUERY] === 'string' &&
spanAttributes[semanticConventions.ATTR_URL_QUERY].includes('sentry_key') &&
spanAttributes[semanticConventions.ATTR_URL_QUERY].includes('sentry_client'))
) {
samplingDecision.decision = false;
}
});
client?.on('spanStart', handleOnSpanStart.handleOnSpanStart);
client?.on('spanEnd', vercelCronsMonitoring.maybeCompleteCronCheckIn);
core.getGlobalScope().addEventProcessor(
Object.assign(
(event => {
if (event.type === 'transaction') {
// Filter out transactions for static assets
// This regex matches the default path to the static assets (`_next/static`) and could potentially filter out too many transactions.
// We match `/_next/static/` anywhere in the transaction name because its location may change with the basePath setting.
if (event.transaction?.match(/^GET (\/.*)?\/_next\/static\//)) {
return null;
}
// Filter out transactions for requests to the tunnel route
if (
(globalWithInjectedValues._sentryRewritesTunnelPath &&
event.transaction === `POST ${globalWithInjectedValues._sentryRewritesTunnelPath}`) ||
(process.env._sentryRewritesTunnelPath &&
event.transaction === `POST ${process.env._sentryRewritesTunnelPath}`)
) {
return null;
}
// Filter out requests to resolve source maps for stack frames in dev mode
if (event.transaction?.match(/\/__nextjs_original-stack-frame/)) {
return null;
}
// Filter out /404 transactions which seem to be created excessively
if (
// Pages router
event.transaction === '/404' ||
// App router (could be "GET /404", "POST /404", ...)
event.transaction?.match(/^(GET|HEAD|POST|PUT|DELETE|CONNECT|OPTIONS|TRACE|PATCH) \/(404|_not-found)$/)
) {
return null;
}
// Filter transactions that we explicitly want to drop.
if (event.contexts?.trace?.data?.[spanAttributesWithLogicAttached.TRANSACTION_ATTR_SHOULD_DROP_TRANSACTION]) {
return null;
}
// Next.js 13 sometimes names the root transactions like this containing useless tracing.
if (event.transaction === 'NextServer.getRequestHandler') {
return null;
}
// Next.js 13 is not correctly picking up tracing data for trace propagation so we use a back-fill strategy
if (typeof event.contexts?.trace?.data?.[spanAttributesWithLogicAttached.TRANSACTION_ATTR_SENTRY_TRACE_BACKFILL] === 'string') {
const traceparentData = core.extractTraceparentData(
event.contexts.trace.data[spanAttributesWithLogicAttached.TRANSACTION_ATTR_SENTRY_TRACE_BACKFILL],
);
if (traceparentData?.parentSampled === false) {
return null;
}
}
return event;
} else {
return event;
}
}) ,
{ id: 'NextLowQualityTransactionsFilter' },
),
);
core.getGlobalScope().addEventProcessor(
Object.assign(
((event, hint) => {
if (event.type !== undefined) {
return event;
}
const originalException = hint.originalException;
const isPostponeError =
typeof originalException === 'object' &&
originalException !== null &&
'$$typeof' in originalException &&
originalException.$$typeof === Symbol.for('react.postpone');
if (isPostponeError) {
// Postpone errors are used for partial-pre-rendering (PPR)
return null;
}
// We don't want to capture suspense errors as they are simply used by React/Next.js for control flow
const exceptionMessage = event.exception?.values?.[0]?.value;
if (
exceptionMessage?.includes('Suspense Exception: This is not a real error!') ||
exceptionMessage?.includes('Suspense Exception: This is not a real error, and should not leak')
) {
return null;
}
return event;
}) ,
{ id: 'DropReactControlFlowErrors' },
),
);
// Use the preprocessEvent hook instead of an event processor, so that the users event processors receive the most
// up-to-date value, but also so that the logic that detects changes to the transaction names to set the source to
// "custom", doesn't trigger.
client?.on('preprocessEvent', event => {
// Enhance route handler transactions
if (
event.type === 'transaction' &&
event.contexts?.trace?.data?.[nextSpanAttributes.ATTR_NEXT_SPAN_TYPE] === 'BaseServer.handleRequest'
) {
event.contexts.trace.data[core.SEMANTIC_ATTRIBUTE_SENTRY_OP] = 'http.server';
event.contexts.trace.op = 'http.server';
if (event.transaction) {
event.transaction = core.stripUrlQueryAndFragment(event.transaction);
}
// eslint-disable-next-line deprecation/deprecation
const method = event.contexts.trace.data[semanticConventions.SEMATTRS_HTTP_METHOD];
// eslint-disable-next-line deprecation/deprecation
const target = event.contexts?.trace?.data?.[semanticConventions.SEMATTRS_HTTP_TARGET];
const route = event.contexts.trace.data[semanticConventions.ATTR_HTTP_ROUTE] || event.contexts.trace.data[nextSpanAttributes.ATTR_NEXT_ROUTE];
const spanName = event.contexts.trace.data[nextSpanAttributes.ATTR_NEXT_SPAN_NAME];
if (typeof method === 'string' && typeof route === 'string' && !route.startsWith('middleware')) {
const cleanRoute = route.replace(/\/route$/, '');
event.transaction = `${method} ${cleanRoute}`;
event.contexts.trace.data[core.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] = 'route';
// Preserve next.route in case it did not get hoisted
event.contexts.trace.data[nextSpanAttributes.ATTR_NEXT_ROUTE] = cleanRoute;
}
// backfill transaction name for pages that would otherwise contain unparameterized routes
if (event.contexts.trace.data[spanAttributesWithLogicAttached.TRANSACTION_ATTR_SENTRY_ROUTE_BACKFILL] && event.transaction !== 'GET /_app') {
event.transaction = `${method} ${event.contexts.trace.data[spanAttributesWithLogicAttached.TRANSACTION_ATTR_SENTRY_ROUTE_BACKFILL]}`;
}
const middlewareMatch =
typeof spanName === 'string' && spanName.match(/^middleware (GET|POST|PUT|DELETE|PATCH|HEAD|OPTIONS)/);
if (middlewareMatch) {
const normalizedName = `middleware ${middlewareMatch[1]}`;
event.transaction = normalizedName;
event.contexts.trace.op = 'http.server.middleware';
}
// Next.js overrides transaction names for page loads that throw an error
// but we want to keep the original target name
if (event.transaction === 'GET /_error' && target) {
event.transaction = `${method ? `${method} ` : ''}${target}`;
}
}
// Next.js 13 is not correctly picking up tracing data for trace propagation so we use a back-fill strategy
if (
event.type === 'transaction' &&
typeof event.contexts?.trace?.data?.[spanAttributesWithLogicAttached.TRANSACTION_ATTR_SENTRY_TRACE_BACKFILL] === 'string'
) {
const traceparentData = core.extractTraceparentData(event.contexts.trace.data[spanAttributesWithLogicAttached.TRANSACTION_ATTR_SENTRY_TRACE_BACKFILL]);
if (traceparentData?.traceId) {
event.contexts.trace.trace_id = traceparentData.traceId;
}
if (traceparentData?.parentSpanId) {
event.contexts.trace.parent_span_id = traceparentData.parentSpanId;
}
}
setUrlProcessingMetadata.setUrlProcessingMetadata(event);
});
if (process.env.NODE_ENV === 'development') {
core.getGlobalScope().addEventProcessor(devErrorSymbolicationEventProcessor.devErrorSymbolicationEventProcessor);
}
try {
// @ts-expect-error `process.turbopack` is a magic string that will be replaced by Next.js
if (process.turbopack) {
core.getGlobalScope().setTag('turbopack', true);
}
} catch {
// Noop
// The statement above can throw because process is not defined on the client
}
debugBuild.DEBUG_BUILD && core.debug.log('SDK successfully initialized');
return client;
}
function sdkAlreadyInitialized() {
return !!core.getClient();
}
exports.captureUnderscoreErrorException = _error.captureUnderscoreErrorException;
exports.startInactiveSpan = nextSpan.startInactiveSpan;
exports.startSpan = nextSpan.startSpan;
exports.startSpanManual = nextSpan.startSpanManual;
exports.wrapGetStaticPropsWithSentry = wrapGetStaticPropsWithSentry.wrapGetStaticPropsWithSentry;
exports.wrapGetInitialPropsWithSentry = wrapGetInitialPropsWithSentry.wrapGetInitialPropsWithSentry;
exports.wrapAppGetInitialPropsWithSentry = wrapAppGetInitialPropsWithSentry.wrapAppGetInitialPropsWithSentry;
exports.wrapDocumentGetInitialPropsWithSentry = wrapDocumentGetInitialPropsWithSentry.wrapDocumentGetInitialPropsWithSentry;
exports.wrapErrorGetInitialPropsWithSentry = wrapErrorGetInitialPropsWithSentry.wrapErrorGetInitialPropsWithSentry;
exports.wrapGetServerSidePropsWithSentry = wrapGetServerSidePropsWithSentry.wrapGetServerSidePropsWithSentry;
exports.wrapServerComponentWithSentry = wrapServerComponentWithSentry.wrapServerComponentWithSentry;
exports.wrapRouteHandlerWithSentry = wrapRouteHandlerWithSentry.wrapRouteHandlerWithSentry;
exports.wrapApiHandlerWithSentryVercelCrons = wrapApiHandlerWithSentryVercelCrons.wrapApiHandlerWithSentryVercelCrons;
exports.wrapMiddlewareWithSentry = wrapMiddlewareWithSentry.wrapMiddlewareWithSentry;
exports.wrapPageComponentWithSentry = wrapPageComponentWithSentry.wrapPageComponentWithSentry;
exports.wrapGenerationFunctionWithSentry = wrapGenerationFunctionWithSentry.wrapGenerationFunctionWithSentry;
exports.withServerActionInstrumentation = withServerActionInstrumentation.withServerActionInstrumentation;
exports.captureRequestError = captureRequestError.captureRequestError;
exports.wrapApiHandlerWithSentry = wrapApiHandlerWithSentry.wrapApiHandlerWithSentry;
exports.ErrorBoundary = ErrorBoundary;
exports.createReduxEnhancer = createReduxEnhancer;
exports.init = init;
exports.showReportDialog = showReportDialog;
exports.withErrorBoundary = withErrorBoundary;
Object.prototype.hasOwnProperty.call(node, '__proto__') &&
!Object.prototype.hasOwnProperty.call(exports, '__proto__') &&
Object.defineProperty(exports, '__proto__', {
enumerable: true,
value: node['__proto__']
});
Object.keys(node).forEach(k => {
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = node[k];
});
//# sourceMappingURL=index.js.map
@@ -0,0 +1,132 @@
import { buildMatchFn } from "../../_lib/buildMatchFn.js";
import { buildMatchPatternFn } from "../../_lib/buildMatchPatternFn.js";
const matchOrdinalNumberPattern = /^(\d+)(-rë|-të|t|)?/i;
const parseOrdinalNumberPattern = /\d+/i;
const matchEraPatterns = {
narrow: /^(p|m)/i,
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
wide: /^(para krishtit|mbas krishtit)/i,
};
const parseEraPatterns = {
any: [/^b/i, /^(p|m)/i],
};
const matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^q[1234]/i,
wide: /^[1234]-mujori (i{1,3}|iv)/i,
};
const parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i],
};
const matchMonthPatterns = {
narrow: /^[jsmpqkftnd]/i,
abbreviated: /^(jan|shk|mar|pri|maj|qer|kor|gus|sht|tet|nën|dhj)/i,
wide: /^(janar|shkurt|mars|prill|maj|qershor|korrik|gusht|shtator|tetor|nëntor|dhjetor)/i,
};
const parseMonthPatterns = {
narrow: [
/^j/i,
/^s/i,
/^m/i,
/^p/i,
/^m/i,
/^q/i,
/^k/i,
/^g/i,
/^s/i,
/^t/i,
/^n/i,
/^d/i,
],
any: [
/^ja/i,
/^shk/i,
/^mar/i,
/^pri/i,
/^maj/i,
/^qer/i,
/^kor/i,
/^gu/i,
/^sht/i,
/^tet/i,
/^n/i,
/^d/i,
],
};
const matchDayPatterns = {
narrow: /^[dhmeps]/i,
short: /^(di|hë|ma|më|en|pr|sh)/i,
abbreviated: /^(die|hën|mar|mër|enj|pre|sht)/i,
wide: /^(dielë|hënë|martë|mërkurë|enjte|premte|shtunë)/i,
};
const parseDayPatterns = {
narrow: [/^d/i, /^h/i, /^m/i, /^m/i, /^e/i, /^p/i, /^s/i],
any: [/^d/i, /^h/i, /^ma/i, /^më/i, /^e/i, /^p/i, /^s/i],
};
const matchDayPeriodPatterns = {
narrow: /^(p|m|me|në (mëngjes|mbasdite|mbrëmje|mesnatë))/i,
any: /^([pm]\.?\s?d\.?|drek|në (mëngjes|mbasdite|mbrëmje|mesnatë))/i,
};
const parseDayPeriodPatterns = {
any: {
am: /^p/i,
pm: /^m/i,
midnight: /^me/i,
noon: /^dr/i,
morning: /mëngjes/i,
afternoon: /mbasdite/i,
evening: /mbrëmje/i,
night: /natë/i,
},
};
export const match = {
ordinalNumber: buildMatchPatternFn({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: (value) => parseInt(value, 10),
}),
era: buildMatchFn({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any",
}),
quarter: buildMatchFn({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: (index) => index + 1,
}),
month: buildMatchFn({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any",
}),
day: buildMatchFn({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any",
}),
dayPeriod: buildMatchFn({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any",
}),
};
@@ -0,0 +1,16 @@
# Installation
> `npm install --save @types/pg`
# Summary
This package contains type definitions for pg (https://github.com/brianc/node-postgres).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/pg.
### Additional Details
* Last updated: Tue, 06 Jun 2023 06:02:51 GMT
* Dependencies: [@types/node](https://npmjs.com/package/@types/node), [@types/pg-protocol](https://npmjs.com/package/@types/pg-protocol), [@types/pg-types](https://npmjs.com/package/@types/pg-types)
* Global values: none
# Credits
These definitions were written by [Phips Peter](https://github.com/pspeter3), and [Ravi van Rooijen](https://github.com/HoldYourWaffle).
@@ -0,0 +1 @@
{"version":3,"sources":["../../src/errors/MissingFieldType.ts"],"sourcesContent":["import type { Field } from '../fields/config/types.js'\n\nimport { fieldAffectsData } from '../fields/config/types.js'\nimport { APIError } from './APIError.js'\n\nexport class MissingFieldType extends APIError {\n constructor(field: Field) {\n super(\n `Field${\n fieldAffectsData(field) ? ` \"${field.name}\"` : ''\n } is either missing a field type or it does not match an available field type`,\n )\n }\n}\n"],"names":["fieldAffectsData","APIError","MissingFieldType","field","name"],"mappings":"AAEA,SAASA,gBAAgB,QAAQ,4BAA2B;AAC5D,SAASC,QAAQ,QAAQ,gBAAe;AAExC,OAAO,MAAMC,yBAAyBD;IACpC,YAAYE,KAAY,CAAE;QACxB,KAAK,CACH,CAAC,KAAK,EACJH,iBAAiBG,SAAS,CAAC,EAAE,EAAEA,MAAMC,IAAI,CAAC,CAAC,CAAC,GAAG,GAChD,4EAA4E,CAAC;IAElF;AACF"}
@@ -0,0 +1 @@
{"version":3,"file":"sanitizeInternalFields.d.ts","sourceRoot":"","sources":["../../src/utilities/sanitizeInternalFields.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB,GAAI,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,eAAe,CAAC,KAAG,CAc1F,CAAA"}
@@ -0,0 +1 @@
{"version":3,"file":"trace_flags.js","sourceRoot":"","sources":["../../../src/trace/trace_flags.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAN,IAAY,UAKX;AALD,WAAY,UAAU;IACpB,8BAA8B;IAC9B,2CAAU,CAAA;IACV,gEAAgE;IAChE,iDAAkB,CAAA;AACpB,CAAC,EALW,UAAU,KAAV,UAAU,QAKrB","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport enum TraceFlags {\n /** Represents no flag set. */\n NONE = 0x0,\n /** Bit to represent whether trace is sampled in trace flags. */\n SAMPLED = 0x1 << 0,\n}\n"]}
@@ -0,0 +1 @@
{"version":3,"file":"worldwide.js","sources":["../../../src/utils/worldwide.ts"],"sourcesContent":["/**\n * NOTE: In order to avoid circular dependencies, if you add a function to this module and it needs to print something,\n * you must either a) use `console.log` rather than the `debug` singleton, or b) put your function elsewhere.\n *\n * Note: This file was originally called `global.ts`, but was changed to unblock users which might be doing\n * string replaces with bundlers like Vite for `global` (would break imports that rely on importing from utils/src/global).\n *\n * Why worldwide?\n *\n * Why not?\n */\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport type { Carrier } from '../carrier';\nimport type { SdkSource } from './env';\n\n/** Internal global with common properties and Sentry extensions */\nexport type InternalGlobal = {\n navigator?: { userAgent?: string; maxTouchPoints?: number };\n console: Console;\n PerformanceObserver?: any;\n Sentry?: any;\n onerror?: {\n (event: object | string, source?: string, lineno?: number, colno?: number, error?: Error): any;\n __SENTRY_INSTRUMENTED__?: true;\n };\n onunhandledrejection?: {\n (event: unknown): boolean;\n __SENTRY_INSTRUMENTED__?: true;\n };\n SENTRY_ENVIRONMENT?: string;\n SENTRY_DSN?: string;\n SENTRY_RELEASE?: {\n id?: string;\n };\n SENTRY_SDK_SOURCE?: SdkSource;\n /**\n * Debug IDs are indirectly injected by Sentry CLI or bundler plugins to directly reference a particular source map\n * for resolving of a source file. The injected code will place an entry into the record for each loaded bundle/JS\n * file.\n */\n _sentryDebugIds?: Record<string, string>;\n /**\n * Native debug IDs implementation (e.g., from Vercel).\n * This uses the same format as _sentryDebugIds but with a different global name.\n * Keys are `error.stack` strings, values are debug IDs.\n */\n _debugIds?: Record<string, string>;\n /**\n * Raw module metadata that is injected by bundler plugins.\n *\n * Keys are `error.stack` strings, values are the metadata.\n */\n _sentryModuleMetadata?: Record<string, any>;\n _sentryEsmLoaderHookRegistered?: boolean;\n _sentryInjectLoaderHookRegister?: () => void;\n _sentryInjectLoaderHookRegistered?: boolean;\n} & Carrier;\n\n/** Get's the global object for the current JavaScript runtime */\nexport const GLOBAL_OBJ = globalThis as unknown as InternalGlobal;\n"],"names":[],"mappings":";;AAiBA;;AA2CA;AACO,MAAM,UAAA,GAAa,UAAA;;;;"}

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