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

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

View File

@@ -0,0 +1,42 @@
"use strict";
exports.getISOWeek = getISOWeek;
var _index = require("./constants.cjs");
var _index2 = require("./startOfISOWeek.cjs");
var _index3 = require("./startOfISOWeekYear.cjs");
var _index4 = require("./toDate.cjs");
/**
* The {@link getISOWeek} function options.
*/
/**
* @name getISOWeek
* @category ISO Week Helpers
* @summary Get the ISO week of the given date.
*
* @description
* Get the ISO week of the given date.
*
* ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
*
* @param date - The given date
* @param options - The options
*
* @returns The ISO week
*
* @example
* // Which week of the ISO-week numbering year is 2 January 2005?
* const result = getISOWeek(new Date(2005, 0, 2))
* //=> 53
*/
function getISOWeek(date, options) {
const _date = (0, _index4.toDate)(date, options?.in);
const diff =
+(0, _index2.startOfISOWeek)(_date) -
+(0, _index3.startOfISOWeekYear)(_date);
// Round the number of weeks to the nearest integer because the number of
// milliseconds in a week is not constant (e.g. it's different in the week of
// the daylight saving time clock shift).
return Math.round(diff / _index.millisecondsInWeek) + 1;
}

View File

@@ -0,0 +1,5 @@
import React from 'react';
import type { RowLabelProps } from './types.js';
export type { RowLabelProps };
export declare const RowLabel: React.FC<RowLabelProps>;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,41 @@
import { px } from '../../../value/types/numbers/units.mjs';
const browserNumberValueTypes = {
// Border props
borderWidth: px,
borderTopWidth: px,
borderRightWidth: px,
borderBottomWidth: px,
borderLeftWidth: px,
borderRadius: px,
radius: px,
borderTopLeftRadius: px,
borderTopRightRadius: px,
borderBottomRightRadius: px,
borderBottomLeftRadius: px,
// Positioning props
width: px,
maxWidth: px,
height: px,
maxHeight: px,
top: px,
right: px,
bottom: px,
left: px,
// Spacing props
padding: px,
paddingTop: px,
paddingRight: px,
paddingBottom: px,
paddingLeft: px,
margin: px,
marginTop: px,
marginRight: px,
marginBottom: px,
marginLeft: px,
// Misc
backgroundPositionX: px,
backgroundPositionY: px,
};
export { browserNumberValueTypes };

View File

@@ -0,0 +1,13 @@
/**
* Returns current db transaction instance from req or adapter.drizzle itself
*
* If a transaction session doesn't exist (e.g., it was already committed/rolled back),
* falls back to the default adapter.drizzle instance to prevent errors.
*/ export const getTransaction = async (adapter, req)=>{
if (!req?.transactionID) {
return adapter.drizzle;
}
return adapter.sessions[await req.transactionID]?.db || adapter.drizzle;
};
//# sourceMappingURL=getTransaction.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"types.js","names":[],"sources":["../../../../src/views/Edit/Auth/types.ts"],"sourcesContent":["import type { SanitizedCollectionConfig } from 'payload'\n\nexport type Props = {\n className?: string\n collectionSlug: SanitizedCollectionConfig['slug']\n disableLocalStrategy?: SanitizedCollectionConfig['auth']['disableLocalStrategy']\n email: string\n loginWithUsername: SanitizedCollectionConfig['auth']['loginWithUsername']\n operation: 'create' | 'update'\n readOnly: boolean\n requirePassword?: boolean\n setValidateBeforeSubmit: (validate: boolean) => void\n useAPIKey?: boolean\n username: string\n verify?: boolean\n}\n"],"mappings":"AAEA","ignoreList":[]}

View File

@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9saWIvZGVlcC1wYXJ0aWFsL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBCdWlsdGluIH0gZnJvbSBcIi4uL2J1aWx0LWluXCI7XG5pbXBvcnQgeyBJc1R1cGxlIH0gZnJvbSBcIi4uL2lzLXR1cGxlXCI7XG5pbXBvcnQgeyBJc1Vua25vd24gfSBmcm9tIFwiLi4vaXMtdW5rbm93blwiO1xuXG5leHBvcnQgdHlwZSBEZWVwUGFydGlhbDxUeXBlPiA9IFR5cGUgZXh0ZW5kcyBFeGNsdWRlPEJ1aWx0aW4sIEVycm9yPlxuICA/IFR5cGVcbiAgOiBUeXBlIGV4dGVuZHMgTWFwPGluZmVyIEtleXMsIGluZmVyIFZhbHVlcz5cbiAgPyBNYXA8RGVlcFBhcnRpYWw8S2V5cz4sIERlZXBQYXJ0aWFsPFZhbHVlcz4+XG4gIDogVHlwZSBleHRlbmRzIFJlYWRvbmx5TWFwPGluZmVyIEtleXMsIGluZmVyIFZhbHVlcz5cbiAgPyBSZWFkb25seU1hcDxEZWVwUGFydGlhbDxLZXlzPiwgRGVlcFBhcnRpYWw8VmFsdWVzPj5cbiAgOiBUeXBlIGV4dGVuZHMgV2Vha01hcDxpbmZlciBLZXlzLCBpbmZlciBWYWx1ZXM+XG4gID8gV2Vha01hcDxEZWVwUGFydGlhbDxLZXlzPiwgRGVlcFBhcnRpYWw8VmFsdWVzPj5cbiAgOiBUeXBlIGV4dGVuZHMgU2V0PGluZmVyIFZhbHVlcz5cbiAgPyBTZXQ8RGVlcFBhcnRpYWw8VmFsdWVzPj5cbiAgOiBUeXBlIGV4dGVuZHMgUmVhZG9ubHlTZXQ8aW5mZXIgVmFsdWVzPlxuICA/IFJlYWRvbmx5U2V0PERlZXBQYXJ0aWFsPFZhbHVlcz4+XG4gIDogVHlwZSBleHRlbmRzIFdlYWtTZXQ8aW5mZXIgVmFsdWVzPlxuICA/IFdlYWtTZXQ8RGVlcFBhcnRpYWw8VmFsdWVzPj5cbiAgOiBUeXBlIGV4dGVuZHMgUmVhZG9ubHlBcnJheTxpbmZlciBWYWx1ZXM+XG4gID8gVHlwZSBleHRlbmRzIElzVHVwbGU8VHlwZT5cbiAgICA/IHsgW0tleSBpbiBrZXlvZiBUeXBlXT86IERlZXBQYXJ0aWFsPFR5cGVbS2V5XT4gfVxuICAgIDogVHlwZSBleHRlbmRzIEFycmF5PFZhbHVlcz5cbiAgICA/IEFycmF5PERlZXBQYXJ0aWFsPFZhbHVlcz4gfCB1bmRlZmluZWQ+XG4gICAgOiBSZWFkb25seUFycmF5PERlZXBQYXJ0aWFsPFZhbHVlcz4gfCB1bmRlZmluZWQ+XG4gIDogVHlwZSBleHRlbmRzIFByb21pc2U8aW5mZXIgVmFsdWU+XG4gID8gUHJvbWlzZTxEZWVwUGFydGlhbDxWYWx1ZT4+XG4gIDogVHlwZSBleHRlbmRzIHt9XG4gID8geyBbS2V5IGluIGtleW9mIFR5cGVdPzogRGVlcFBhcnRpYWw8VHlwZVtLZXldPiB9XG4gIDogSXNVbmtub3duPFR5cGU+IGV4dGVuZHMgdHJ1ZVxuICA/IHVua25vd25cbiAgOiBQYXJ0aWFsPFR5cGU+O1xuIl19

View File

@@ -0,0 +1,189 @@
"use strict";
exports.localize = void 0;
var _index = require("../../_lib/buildLocalizeFn.js");
const eraValues = {
narrow: ["B", "A"],
abbreviated: ["BC", "AD"],
wide: ["Before Christ", "Anno Domini"],
};
const quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"],
};
// Note: in English, the names of days of the week and months are capitalized.
// If you are making a new locale based on this one, check if the same is true for the language you're working on.
// Generally, formatted dates should look like they are in the middle of a sentence,
// e.g. in Spanish language the weekdays and months should be in the lowercase.
const monthValues = {
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
abbreviated: [
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
"Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec",
],
wide: [
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December",
],
};
const dayValues = {
narrow: ["S", "M", "T", "W", "T", "F", "S"],
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
wide: [
"Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday",
],
};
const dayPeriodValues = {
narrow: {
am: "a",
pm: "p",
midnight: "mi",
noon: "n",
morning: "morning",
afternoon: "afternoon",
evening: "evening",
night: "night",
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "midnight",
noon: "noon",
morning: "morning",
afternoon: "afternoon",
evening: "evening",
night: "night",
},
wide: {
am: "a.m.",
pm: "p.m.",
midnight: "midnight",
noon: "noon",
morning: "morning",
afternoon: "afternoon",
evening: "evening",
night: "night",
},
};
const formattingDayPeriodValues = {
narrow: {
am: "a",
pm: "p",
midnight: "mi",
noon: "n",
morning: "in the morning",
afternoon: "in the afternoon",
evening: "in the evening",
night: "at night",
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "midnight",
noon: "noon",
morning: "in the morning",
afternoon: "in the afternoon",
evening: "in the evening",
night: "at night",
},
wide: {
am: "a.m.",
pm: "p.m.",
midnight: "midnight",
noon: "noon",
morning: "in the morning",
afternoon: "in the afternoon",
evening: "in the evening",
night: "at night",
},
};
const ordinalNumber = (dirtyNumber, _options) => {
const number = Number(dirtyNumber);
// If ordinal numbers depend on context, for example,
// if they are different for different grammatical genders,
// use `options.unit`.
//
// `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',
// 'day', 'hour', 'minute', 'second'.
const rem100 = number % 100;
if (rem100 > 20 || rem100 < 10) {
switch (rem100 % 10) {
case 1:
return number + "st";
case 2:
return number + "nd";
case 3:
return number + "rd";
}
}
return number + "th";
};
const localize = (exports.localize = {
ordinalNumber,
era: (0, _index.buildLocalizeFn)({
values: eraValues,
defaultWidth: "wide",
}),
quarter: (0, _index.buildLocalizeFn)({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: (quarter) => quarter - 1,
}),
month: (0, _index.buildLocalizeFn)({
values: monthValues,
defaultWidth: "wide",
}),
day: (0, _index.buildLocalizeFn)({
values: dayValues,
defaultWidth: "wide",
}),
dayPeriod: (0, _index.buildLocalizeFn)({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide",
}),
});

View File

@@ -0,0 +1,247 @@
# jest-worker
Module for executing heavy tasks under forked processes in parallel, by providing a `Promise` based interface, minimum overhead, and bound workers.
The module works by providing an absolute path of the module to be loaded in all forked processes. Files relative to a node module are also accepted. All methods are exposed on the parent process as promises, so they can be `await`'ed. Child (worker) methods can either be synchronous or asynchronous.
The module also implements support for bound workers. Binding a worker means that, based on certain parameters, the same task will always be executed by the same worker. The way bound workers work is by using the returned string of the `computeWorkerKey` method. If the string was used before for a task, the call will be queued to the related worker that processed the task earlier; if not, it will be executed by the first available worker, then sticked to the worker that executed it; so the next time it will be processed by the same worker. If you have no preference on the worker executing the task, but you have defined a `computeWorkerKey` method because you want _some_ of the tasks to be sticked, you can return `null` from it.
The list of exposed methods can be explicitly provided via the `exposedMethods` option. If it is not provided, it will be obtained by requiring the child module into the main process, and analyzed via reflection. Check the "minimal example" section for a valid one.
## Install
```sh
$ yarn add jest-worker
```
## Example
This example covers the minimal usage:
### File `parent.js`
```javascript
import {Worker as JestWorker} from 'jest-worker';
async function main() {
const worker = new JestWorker(require.resolve('./Worker'));
const result = await worker.hello('Alice'); // "Hello, Alice"
}
main();
```
### File `worker.js`
```javascript
export function hello(param) {
return 'Hello, ' + param;
}
```
## Experimental worker
Node 10 shipped with [worker-threads](https://nodejs.org/api/worker_threads.html), a "threading API" that uses SharedArrayBuffers to communicate between the main process and its child threads. This experimental Node feature can significantly improve the communication time between parent and child processes in `jest-worker`.
Since `worker_threads` are considered experimental in Node, you have to opt-in to this behavior by passing `enableWorkerThreads: true` when instantiating the worker. While the feature was unflagged in Node 11.7.0, you'll need to run the Node process with the `--experimental-worker` flag for Node 10.
## API
The `Worker` export is a constructor that is initialized by passing the worker path, plus an options object.
### `workerPath: string` (required)
Node module name or absolute path of the file to be loaded in the child processes. Use `require.resolve` to transform a relative path into an absolute one.
### `options: Object` (optional)
#### `exposedMethods: $ReadOnlyArray<string>` (optional)
List of method names that can be called on the child processes from the parent process. You cannot expose any method named like a public `Worker` method, or starting with `_`. If you use method auto-discovery, then these methods will not be exposed, even if they exist.
#### `numWorkers: number` (optional)
Amount of workers to spawn. Defaults to the number of CPUs minus 1.
#### `maxRetries: number` (optional)
Maximum amount of times that a dead child can be re-spawned, per call. Defaults to `3`, pass `Infinity` to allow endless retries.
#### `forkOptions: Object` (optional)
Allow customizing all options passed to `childProcess.fork`. By default, some values are set (`cwd`, `env` and `execArgv`), but you can override them and customize the rest. For a list of valid values, check [the Node documentation](https://nodejs.org/api/child_process.html#child_process_child_process_fork_modulepath_args_options).
#### `computeWorkerKey: (method: string, ...args: Array<any>) => ?string` (optional)
Every time a method exposed via the API is called, `computeWorkerKey` is also called in order to bound the call to a worker. This is useful for workers that are able to cache the result or part of it. You bound calls to a worker by making `computeWorkerKey` return the same identifier for all different calls. If you do not want to bind the call to any worker, return `null`.
The callback you provide is called with the method name, plus all the rest of the arguments of the call. Thus, you have full control to decide what to return. Check a practical example on bound workers under the "bound worker usage" section.
By default, no process is bound to any worker.
#### `setupArgs: Array<mixed>` (optional)
The arguments that will be passed to the `setup` method during initialization.
#### `WorkerPool: (workerPath: string, options?: WorkerPoolOptions) => WorkerPoolInterface` (optional)
Provide a custom worker pool to be used for spawning child processes. By default, Jest will use a node thread pool if available and fall back to child process threads.
#### `enableWorkerThreads: boolean` (optional)
`jest-worker` will automatically detect if `worker_threads` are available, but will not use them unless passed `enableWorkerThreads: true`.
### `workerSchedulingPolicy: 'round-robin' | 'in-order'` (optional)
Specifies the policy how tasks are assigned to workers if multiple workers are _idle_:
- `round-robin` (default): The task will be sequentially distributed onto the workers. The first task is assigned to the worker 1, the second to the worker 2, to ensure that the work is distributed across workers.
- `in-order`: The task will be assigned to the first free worker starting with worker 1 and only assign the work to worker 2 if the worker 1 is busy.
Tasks are always assigned to the first free worker as soon as tasks start to queue up. The scheduling policy does not define the task scheduling which is always first-in, first-out.
### `taskQueue`: TaskQueue` (optional)
The task queue defines in which order tasks (method calls) are processed by the workers. `jest-worker` ships with a `FifoQueue` and `PriorityQueue`:
- `FifoQueue` (default): Processes the method calls (tasks) in the call order.
- `PriorityQueue`: Processes the method calls by a computed priority in natural ordering (lower priorities first). Tasks with the same priority are processed in any order (FIFO not guaranteed). The constructor accepts a single argument, the function that is passed the name of the called function and the arguments and returns a numerical value for the priority: `new require('jest-worker').PriorityQueue((method, filename) => filename.length)`.
## JestWorker
### Methods
The returned `JestWorker` instance has all the exposed methods, plus some additional ones to interact with the workers itself:
#### `getStdout(): Readable`
Returns a `ReadableStream` where the standard output of all workers is piped. Note that the `silent` option of the child workers must be set to `true` to make it work. This is the default set by `jest-worker`, but keep it in mind when overriding options through `forkOptions`.
#### `getStderr(): Readable`
Returns a `ReadableStream` where the standard error of all workers is piped. Note that the `silent` option of the child workers must be set to `true` to make it work. This is the default set by `jest-worker`, but keep it in mind when overriding options through `forkOptions`.
#### `end()`
Finishes the workers by killing all workers. No further calls can be done to the `Worker` instance.
Returns a Promise that resolves with `{ forceExited: boolean }` once all workers are dead. If `forceExited` is `true`, at least one of the workers did not exit gracefully, which likely happened because it executed a leaky task that left handles open. This should be avoided, force exiting workers is a last resort to prevent creating lots of orphans.
**Note:**
`await`ing the `end()` Promise immediately after the workers are no longer needed before proceeding to do other useful things in your program may not be a good idea. If workers have to be force exited, `jest-worker` may go through multiple stages of force exiting (e.g. SIGTERM, later SIGKILL) and give the worker overall around 1 second time to exit on its own. During this time, your program will wait, even though it may not be necessary that all workers are dead before continuing execution.
Consider deliberately leaving this Promise floating (unhandled resolution). After your program has done the rest of its work and is about to exit, the Node process will wait for the Promise to resolve after all workers are dead as the last event loop task. That way you parallelized computation time of your program and waiting time and you didn't delay the outputs of your program unnecessarily.
### Worker IDs
Each worker has a unique id (index that starts with `1`), which is available inside the worker as `process.env.JEST_WORKER_ID`.
## Setting up and tearing down the child process
The child process can define two special methods (both of them can be asynchronous):
- `setup()`: If defined, it's executed before the first call to any method in the child.
- `teardown()`: If defined, it's executed when the farm ends.
# More examples
## Standard usage
This example covers the standard usage:
### File `parent.js`
```javascript
import {Worker as JestWorker} from 'jest-worker';
async function main() {
const myWorker = new JestWorker(require.resolve('./Worker'), {
exposedMethods: ['foo', 'bar', 'getWorkerId'],
numWorkers: 4,
});
console.log(await myWorker.foo('Alice')); // "Hello from foo: Alice"
console.log(await myWorker.bar('Bob')); // "Hello from bar: Bob"
console.log(await myWorker.getWorkerId()); // "3" -> this message has sent from the 3rd worker
const {forceExited} = await myWorker.end();
if (forceExited) {
console.error('Workers failed to exit gracefully');
}
}
main();
```
### File `worker.js`
```javascript
export function foo(param) {
return 'Hello from foo: ' + param;
}
export function bar(param) {
return 'Hello from bar: ' + param;
}
export function getWorkerId() {
return process.env.JEST_WORKER_ID;
}
```
## Bound worker usage:
This example covers the usage with a `computeWorkerKey` method:
### File `parent.js`
```javascript
import {Worker as JestWorker} from 'jest-worker';
async function main() {
const myWorker = new JestWorker(require.resolve('./Worker'), {
computeWorkerKey: (method, filename) => filename,
});
// Transform the given file, within the first available worker.
console.log(await myWorker.transform('/tmp/foo.js'));
// Wait a bit.
await sleep(10000);
// Transform the same file again. Will immediately return because the
// transformed file is cached in the worker, and `computeWorkerKey` ensures
// the same worker that processed the file the first time will process it now.
console.log(await myWorker.transform('/tmp/foo.js'));
const {forceExited} = await myWorker.end();
if (forceExited) {
console.error('Workers failed to exit gracefully');
}
}
main();
```
### File `worker.js`
```javascript
import babel from '@babel/core';
const cache = Object.create(null);
export function transform(filename) {
if (cache[filename]) {
return cache[filename];
}
// jest-worker can handle both immediate results and thenables. If a
// thenable is returned, it will be await'ed until it resolves.
return babel.transformFileAsync(filename).then(result => {
cache[filename] = result;
return result;
});
}
```

View File

@@ -0,0 +1,43 @@
### Versions
## 1.0.7
###### *Jan 7, 2021*
- package: add jsdelivr source path
## 1.0.6
###### *Jan 3, 2021*
- use default export in the entry file
- fix library import in `spec.js`
## 1.0.5
###### *Jan 3, 2021*
- replace `webpack` with `rollup`
- add cjs/es bundles
## 1.0.4
###### *Nov 15, 2020*
- revert "corrected moudles"
## 1.0.3
###### *Nov 15, 2020*
- remove `src` from `.npmignore` and refer it to `package.module`
## 1.0.2
###### *Nov 14, 2020*
- fix `module` path in package.json
## 1.0.1
###### *Aug 6, 2020*
- add default export into the index point
## 1.0.0
###### *Aug 6, 2020*
🎉 First stable version of the library

View File

@@ -0,0 +1,91 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const core = require('@sentry/core');
const util = require('../util.js');
const generateValueInjectionRules = require('./generateValueInjectionRules.js');
/**
* Construct a Turbopack config object from a Next.js config object and a Turbopack options object.
*
* @param userNextConfig - The Next.js config object.
* @param userSentryOptions - The Sentry build options object.
* @param routeManifest - The route manifest object.
* @param nextJsVersion - The Next.js version.
* @param vercelCronsConfig - The Vercel crons configuration from vercel.json.
* @returns The Turbopack config object.
*/
function constructTurbopackConfig({
userNextConfig,
userSentryOptions,
routeManifest,
nextJsVersion,
vercelCronsConfig,
}
) {
// If sourcemaps are disabled, we don't need to enable native debug ids as this will add build time.
const shouldEnableNativeDebugIds =
(util.supportsNativeDebugIds(nextJsVersion ?? '') && userNextConfig?.turbopack?.debugIds) ??
userSentryOptions?.sourcemaps?.disable !== true;
const newConfig = {
...userNextConfig.turbopack,
...(shouldEnableNativeDebugIds ? { debugIds: true } : {}),
};
const tunnelPath =
userSentryOptions?.tunnelRoute !== undefined &&
userNextConfig.output !== 'export' &&
typeof userSentryOptions.tunnelRoute === 'string'
? `${userNextConfig.basePath ?? ''}${userSentryOptions.tunnelRoute}`
: undefined;
const valueInjectionRules = generateValueInjectionRules.generateValueInjectionRules({
routeManifest,
nextJsVersion,
tunnelPath,
vercelCronsConfig,
});
for (const { matcher, rule } of valueInjectionRules) {
newConfig.rules = safelyAddTurbopackRule(newConfig.rules, { matcher, rule });
}
return newConfig;
}
/**
* Safely add a Turbopack rule to the existing rules.
*
* @param existingRules - The existing rules.
* @param matcher - The matcher for the rule.
* @param rule - The rule to add.
* @returns The updated rules object.
*/
function safelyAddTurbopackRule(
existingRules,
{ matcher, rule },
) {
if (!existingRules) {
return {
[matcher]: rule,
};
}
// If the rule already exists, we don't want to mess with it.
if (existingRules[matcher]) {
core.debug.log(
`[@sentry/nextjs] - Turbopack rule already exists for ${matcher}. Please remove it from your Next.js config in order for Sentry to work properly.`,
);
return existingRules;
}
return {
...existingRules,
[matcher]: rule,
};
}
exports.constructTurbopackConfig = constructTurbopackConfig;
exports.safelyAddTurbopackRule = safelyAddTurbopackRule;
//# sourceMappingURL=constructTurbopackConfig.js.map

View File

@@ -0,0 +1,5 @@
declare module 'emoji-regex/RGI_Emoji' {
function emojiRegex(): RegExp;
export = emojiRegex;
}

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F zC","132":"A B"},B:{"1":"0 1 2 3 4 5 6 7 8 Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I","132":"C L M G N O P"},C:{"1":"0 1 2 3 4 5 6 7 8 9 N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B WC 6B XC 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R YC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I ZC aC OC 1C 2C 3C","2":"0C VC 4C 5C","33":"A B C L M G","36":"J bB K D E F"},D:{"1":"0 1 2 3 4 5 6 7 8 DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B WC 6B XC 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I ZC aC OC","2":"A","8":"J bB K D E F","33":"CB","36":"9 B C L M G N O P cB AB BB"},E:{"1":"A B C L M G cC PC QC BD DD dC eC RC ED SC fC gC hC iC jC FD TC kC lC mC nC oC GD UC pC qC rC sC HD tC uC vC wC ID","8":"J bB K D 6C bC 7C 8C","260":"E F 9C AD","516":"CD"},F:{"1":"0 1 2 3 4 5 6 7 8 9 G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R YC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","2":"F JD KD","8":"B C LD MD PC xC ND QC"},G:{"1":"VD WD XD YD ZD aD bD cD dD eD fD hD dC eC RC iD SC fC gC hC iC jC jD TC kC lC mC nC oC kD UC pC qC rC sC lD tC uC vC wC","8":"bC OD yC PD QD RD","260":"E SD TD UD","516":"gD"},H:{"2":"mD"},I:{"1":"I rD sD","8":"VC J nD oD pD qD yC"},J:{"1":"A","8":"D"},K:{"1":"H","2":"A","8":"B C PC xC QC"},L:{"1":"I"},M:{"1":"OC"},N:{"132":"A B"},O:{"1":"RC"},P:{"1":"9 J AB BB CB DB EB FB GB HB IB tD uD vD wD xD cC yD zD 0D 1D 2D SC TC UC 3D"},Q:{"1":"4D"},R:{"1":"5D"},S:{"1":"6D 7D"}},B:2,C:"IndexedDB",D:true};

View File

@@ -0,0 +1,28 @@
import { formatDistance } from "./ug/_lib/formatDistance.mjs";
import { formatLong } from "./ug/_lib/formatLong.mjs";
import { formatRelative } from "./ug/_lib/formatRelative.mjs";
import { localize } from "./ug/_lib/localize.mjs";
import { match } from "./ug/_lib/match.mjs";
/**
* @category Locales
* @summary Uighur locale
* @language Uighur
* @iso-639-2 uig
* @author Abduwaly M. [@abduwaly](https://github.com/abduwaly)
*/
export const ug = {
code: "ug",
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
options: {
weekStartsOn: 0 /* Sunday */,
firstWeekContainsDate: 1,
},
};
// Fallback for modularized imports:
export default ug;

View File

@@ -0,0 +1 @@
Prism.languages.rip={comment:{pattern:/#.*/,greedy:!0},char:{pattern:/\B`[^\s`'",.:;#\/\\()<>\[\]{}]\b/,greedy:!0},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},regex:{pattern:/(^|[^/])\/(?!\/)(?:\[[^\n\r\]]*\]|\\.|[^/\\\r\n\[])+\/(?=\s*(?:$|[\r\n,.;})]))/,lookbehind:!0,greedy:!0},keyword:/(?:=>|->)|\b(?:case|catch|class|else|exit|finally|if|raise|return|switch|try)\b/,builtin:/@|\bSystem\b/,boolean:/\b(?:false|true)\b/,date:/\b\d{4}-\d{2}-\d{2}\b/,time:/\b\d{2}:\d{2}:\d{2}\b/,datetime:/\b\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\b/,symbol:/:[^\d\s`'",.:;#\/\\()<>\[\]{}][^\s`'",.:;#\/\\()<>\[\]{}]*/,number:/[+-]?\b(?:\d+\.\d+|\d+)\b/,punctuation:/(?:\.{2,3})|[`,.:;=\/\\()<>\[\]{}]/,reference:/[^\d\s`'",.:;#\/\\()<>\[\]{}][^\s`'",.:;#\/\\()<>\[\]{}]*/};

View File

@@ -0,0 +1,122 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.callRef = exports.getValidate = void 0;
const ref_error_1 = require("../../compile/ref_error");
const code_1 = require("../code");
const codegen_1 = require("../../compile/codegen");
const names_1 = require("../../compile/names");
const compile_1 = require("../../compile");
const util_1 = require("../../compile/util");
const def = {
keyword: "$ref",
schemaType: "string",
code(cxt) {
const { gen, schema: $ref, it } = cxt;
const { baseId, schemaEnv: env, validateName, opts, self } = it;
const { root } = env;
if (($ref === "#" || $ref === "#/") && baseId === root.baseId)
return callRootRef();
const schOrEnv = compile_1.resolveRef.call(self, root, baseId, $ref);
if (schOrEnv === undefined)
throw new ref_error_1.default(it.opts.uriResolver, baseId, $ref);
if (schOrEnv instanceof compile_1.SchemaEnv)
return callValidate(schOrEnv);
return inlineRefSchema(schOrEnv);
function callRootRef() {
if (env === root)
return callRef(cxt, validateName, env, env.$async);
const rootName = gen.scopeValue("root", { ref: root });
return callRef(cxt, (0, codegen_1._) `${rootName}.validate`, root, root.$async);
}
function callValidate(sch) {
const v = getValidate(cxt, sch);
callRef(cxt, v, sch, sch.$async);
}
function inlineRefSchema(sch) {
const schName = gen.scopeValue("schema", opts.code.source === true ? { ref: sch, code: (0, codegen_1.stringify)(sch) } : { ref: sch });
const valid = gen.name("valid");
const schCxt = cxt.subschema({
schema: sch,
dataTypes: [],
schemaPath: codegen_1.nil,
topSchemaRef: schName,
errSchemaPath: $ref,
}, valid);
cxt.mergeEvaluated(schCxt);
cxt.ok(valid);
}
},
};
function getValidate(cxt, sch) {
const { gen } = cxt;
return sch.validate
? gen.scopeValue("validate", { ref: sch.validate })
: (0, codegen_1._) `${gen.scopeValue("wrapper", { ref: sch })}.validate`;
}
exports.getValidate = getValidate;
function callRef(cxt, v, sch, $async) {
const { gen, it } = cxt;
const { allErrors, schemaEnv: env, opts } = it;
const passCxt = opts.passContext ? names_1.default.this : codegen_1.nil;
if ($async)
callAsyncRef();
else
callSyncRef();
function callAsyncRef() {
if (!env.$async)
throw new Error("async schema referenced by sync schema");
const valid = gen.let("valid");
gen.try(() => {
gen.code((0, codegen_1._) `await ${(0, code_1.callValidateCode)(cxt, v, passCxt)}`);
addEvaluatedFrom(v); // TODO will not work with async, it has to be returned with the result
if (!allErrors)
gen.assign(valid, true);
}, (e) => {
gen.if((0, codegen_1._) `!(${e} instanceof ${it.ValidationError})`, () => gen.throw(e));
addErrorsFrom(e);
if (!allErrors)
gen.assign(valid, false);
});
cxt.ok(valid);
}
function callSyncRef() {
cxt.result((0, code_1.callValidateCode)(cxt, v, passCxt), () => addEvaluatedFrom(v), () => addErrorsFrom(v));
}
function addErrorsFrom(source) {
const errs = (0, codegen_1._) `${source}.errors`;
gen.assign(names_1.default.vErrors, (0, codegen_1._) `${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`); // TODO tagged
gen.assign(names_1.default.errors, (0, codegen_1._) `${names_1.default.vErrors}.length`);
}
function addEvaluatedFrom(source) {
var _a;
if (!it.opts.unevaluated)
return;
const schEvaluated = (_a = sch === null || sch === void 0 ? void 0 : sch.validate) === null || _a === void 0 ? void 0 : _a.evaluated;
// TODO refactor
if (it.props !== true) {
if (schEvaluated && !schEvaluated.dynamicProps) {
if (schEvaluated.props !== undefined) {
it.props = util_1.mergeEvaluated.props(gen, schEvaluated.props, it.props);
}
}
else {
const props = gen.var("props", (0, codegen_1._) `${source}.evaluated.props`);
it.props = util_1.mergeEvaluated.props(gen, props, it.props, codegen_1.Name);
}
}
if (it.items !== true) {
if (schEvaluated && !schEvaluated.dynamicItems) {
if (schEvaluated.items !== undefined) {
it.items = util_1.mergeEvaluated.items(gen, schEvaluated.items, it.items);
}
}
else {
const items = gen.var("items", (0, codegen_1._) `${source}.evaluated.items`);
it.items = util_1.mergeEvaluated.items(gen, items, it.items, codegen_1.Name);
}
}
}
}
exports.callRef = callRef;
exports.default = def;
//# sourceMappingURL=ref.js.map

View File

@@ -0,0 +1,7 @@
declare class BrowserslistError extends Error {
constructor(message: any)
name: 'BrowserslistError'
browserslist: true
}
export = BrowserslistError

View File

@@ -0,0 +1,160 @@
var isDevelopment = true;
/*
Based off glamor's StyleSheet, thanks Sunil ❤️
high performance StyleSheet for css-in-js systems
- uses multiple style tags behind the scenes for millions of rules
- uses `insertRule` for appending in production for *much* faster performance
// usage
import { StyleSheet } from '@emotion/sheet'
let styleSheet = new StyleSheet({ key: '', container: document.head })
styleSheet.insert('#box { border: 1px solid red; }')
- appends a css rule into the stylesheet
styleSheet.flush()
- empties the stylesheet of all its contents
*/
function sheetForTag(tag) {
if (tag.sheet) {
return tag.sheet;
} // this weirdness brought to you by firefox
/* istanbul ignore next */
for (var i = 0; i < document.styleSheets.length; i++) {
if (document.styleSheets[i].ownerNode === tag) {
return document.styleSheets[i];
}
} // this function should always return with a value
// TS can't understand it though so we make it stop complaining here
return undefined;
}
function createStyleElement(options) {
var tag = document.createElement('style');
tag.setAttribute('data-emotion', options.key);
if (options.nonce !== undefined) {
tag.setAttribute('nonce', options.nonce);
}
tag.appendChild(document.createTextNode(''));
tag.setAttribute('data-s', '');
return tag;
}
var StyleSheet = /*#__PURE__*/function () {
// Using Node instead of HTMLElement since container may be a ShadowRoot
function StyleSheet(options) {
var _this = this;
this._insertTag = function (tag) {
var before;
if (_this.tags.length === 0) {
if (_this.insertionPoint) {
before = _this.insertionPoint.nextSibling;
} else if (_this.prepend) {
before = _this.container.firstChild;
} else {
before = _this.before;
}
} else {
before = _this.tags[_this.tags.length - 1].nextSibling;
}
_this.container.insertBefore(tag, before);
_this.tags.push(tag);
};
this.isSpeedy = options.speedy === undefined ? !isDevelopment : options.speedy;
this.tags = [];
this.ctr = 0;
this.nonce = options.nonce; // key is the value of the data-emotion attribute, it's used to identify different sheets
this.key = options.key;
this.container = options.container;
this.prepend = options.prepend;
this.insertionPoint = options.insertionPoint;
this.before = null;
}
var _proto = StyleSheet.prototype;
_proto.hydrate = function hydrate(nodes) {
nodes.forEach(this._insertTag);
};
_proto.insert = function insert(rule) {
// the max length is how many rules we have per style tag, it's 65000 in speedy mode
// it's 1 in dev because we insert source maps that map a single rule to a location
// and you can only have one source map per style tag
if (this.ctr % (this.isSpeedy ? 65000 : 1) === 0) {
this._insertTag(createStyleElement(this));
}
var tag = this.tags[this.tags.length - 1];
{
var isImportRule = rule.charCodeAt(0) === 64 && rule.charCodeAt(1) === 105;
if (isImportRule && this._alreadyInsertedOrderInsensitiveRule) {
// this would only cause problem in speedy mode
// but we don't want enabling speedy to affect the observable behavior
// so we report this error at all times
console.error("You're attempting to insert the following rule:\n" + rule + '\n\n`@import` rules must be before all other types of rules in a stylesheet but other rules have already been inserted. Please ensure that `@import` rules are before all other rules.');
}
this._alreadyInsertedOrderInsensitiveRule = this._alreadyInsertedOrderInsensitiveRule || !isImportRule;
}
if (this.isSpeedy) {
var sheet = sheetForTag(tag);
try {
// this is the ultrafast version, works across browsers
// the big drawback is that the css won't be editable in devtools
sheet.insertRule(rule, sheet.cssRules.length);
} catch (e) {
if (!/:(-moz-placeholder|-moz-focus-inner|-moz-focusring|-ms-input-placeholder|-moz-read-write|-moz-read-only|-ms-clear|-ms-expand|-ms-reveal){/.test(rule)) {
console.error("There was a problem inserting the following rule: \"" + rule + "\"", e);
}
}
} else {
tag.appendChild(document.createTextNode(rule));
}
this.ctr++;
};
_proto.flush = function flush() {
this.tags.forEach(function (tag) {
var _tag$parentNode;
return (_tag$parentNode = tag.parentNode) == null ? void 0 : _tag$parentNode.removeChild(tag);
});
this.tags = [];
this.ctr = 0;
{
this._alreadyInsertedOrderInsensitiveRule = false;
}
};
return StyleSheet;
}();
export { StyleSheet };

View File

@@ -0,0 +1,122 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const http = require('node:http');
require('node:https');
/**
* This code was originally forked from https://github.com/TooTallNate/proxy-agents/tree/b133295fd16f6475578b6b15bd9b4e33ecb0d0b7
* With the following LICENSE:
*
* (The MIT License)
*
* Copyright (c) 2013 Nathan Rajlich <nathan@tootallnate.net>*
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* 'Software'), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:*
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.*
*
* THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
const INTERNAL = Symbol('AgentBaseInternalState');
class Agent extends http.Agent {
// Set by `http.Agent` - missing from `@types/node`
constructor(opts) {
super(opts);
this[INTERNAL] = {};
}
/**
* Determine whether this is an `http` or `https` request.
*/
isSecureEndpoint(options) {
if (options) {
// First check the `secureEndpoint` property explicitly, since this
// means that a parent `Agent` is "passing through" to this instance.
if (typeof (options ).secureEndpoint === 'boolean') {
return options.secureEndpoint;
}
// If no explicit `secure` endpoint, check if `protocol` property is
// set. This will usually be the case since using a full string URL
// or `URL` instance should be the most common usage.
if (typeof options.protocol === 'string') {
return options.protocol === 'https:';
}
}
// Finally, if no `protocol` property was set, then fall back to
// checking the stack trace of the current call stack, and try to
// detect the "https" module.
const { stack } = new Error();
if (typeof stack !== 'string') return false;
return stack.split('\n').some(l => l.indexOf('(https.js:') !== -1 || l.indexOf('node:https:') !== -1);
}
createSocket(req, options, cb) {
const connectOpts = {
...options,
secureEndpoint: this.isSecureEndpoint(options),
};
Promise.resolve()
.then(() => this.connect(req, connectOpts))
.then(socket => {
if (socket instanceof http.Agent) {
// @ts-expect-error `addRequest()` isn't defined in `@types/node`
return socket.addRequest(req, connectOpts);
}
this[INTERNAL].currentSocket = socket;
// @ts-expect-error `createSocket()` isn't defined in `@types/node`
super.createSocket(req, options, cb);
}, cb);
}
createConnection() {
const socket = this[INTERNAL].currentSocket;
this[INTERNAL].currentSocket = undefined;
if (!socket) {
throw new Error('No socket was returned in the `connect()` function');
}
return socket;
}
get defaultPort() {
return this[INTERNAL].defaultPort ?? (this.protocol === 'https:' ? 443 : 80);
}
set defaultPort(v) {
if (this[INTERNAL]) {
this[INTERNAL].defaultPort = v;
}
}
get protocol() {
return this[INTERNAL].protocol ?? (this.isSecureEndpoint() ? 'https:' : 'http:');
}
set protocol(v) {
if (this[INTERNAL]) {
this[INTERNAL].protocol = v;
}
}
}
exports.Agent = Agent;
//# sourceMappingURL=base.js.map

View File

@@ -0,0 +1,6 @@
/**
* Convert camelCase to dash-case properties.
*/
const camelToDash = (str) => str.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase();
export { camelToDash };

View File

@@ -0,0 +1 @@
{"version":3,"file":"sanitizeFilterOptionsQuery.d.ts","sourceRoot":"","sources":["../../src/utilities/sanitizeFilterOptionsQuery.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAEpC,eAAO,MAAM,0BAA0B,UAAW,KAAK,KAAG,KAqBzD,CAAA"}

View File

@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2014 Mathias Buus
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.

View File

@@ -0,0 +1 @@
{"version":3,"file":"performance.d.ts","sourceRoot":"","sources":["../../../../src/types/performance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,WAAW,CAAC;AAEhE,MAAM,MAAM,mBAAmB,GAAG,sBAAsB,GAAG,yBAAyB,GAAG,2BAA2B,CAAC;AAInH,MAAM,MAAM,sBAAsB,GAAG,gBAAgB,CAAC;AACtD,MAAM,MAAM,2BAA2B,GAAG,gBAAgB,GACxD,yBAAyB,GAAG;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,0BAA0B,EAAE,MAAM,CAAC;IACnC;;;OAGG;IACH,wBAAwB,EAAE,MAAM,CAAC;IAEjC;;;OAGG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AACJ,MAAM,MAAM,qCAAqC,GAAG,yBAAyB,GAAG;IAG9E,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,SAAS,CAAC;AAElC;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,OAAO,CAClC,IAAI,CACF,2BAA2B,EACzB,iBAAiB,GACjB,iBAAiB,GACjB,UAAU,GACV,gBAAgB,GAChB,0BAA0B,GAC1B,4BAA4B,GAC5B,gBAAgB,GAChB,cAAc,GACd,aAAa,GACb,eAAe,CAClB,CACF,GAAG;IACF;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,yBAAyB,EAAE,iBAAiB,GAAG,iBAAiB,CAAC,GAAG;IAClG;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,MAAM,EAAE,MAAM,GAAG,mBAAmB,GAAG,MAAM,CAAC;IAC9C;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB;;OAEG;IACH,YAAY,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,EAAE,GAAG,SAAS,CAAA;KAAE,EAAE,CAAC;CACnE;AAED;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,SAAS,GAAG,cAAc,GAAG,YAAY,GAAG,YAAY,CAAC;AAE/F,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE;QACN,eAAe,EAAE,MAAM,CAAC;QACxB,eAAe,EAAE,MAAM,CAAC;QACxB,cAAc,EAAE,MAAM,CAAC;KACxB,CAAC;CACH;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,OAAO,CAAC,EAAE,8BAA8B,CAAC;IACzC,QAAQ,CAAC,EAAE,8BAA8B,CAAC;CAC3C;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B;AAED,MAAM,MAAM,YAAY,GAAG,uBAAuB,GAAG,UAAU,GAAG,kBAAkB,GAAG,WAAW,CAAC;AAEnG,MAAM,WAAW,sBAAsB,CAAC,CAAC;IACvC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,IAAI,EAAE,CAAC,CAAC;CACT"}

View File

@@ -0,0 +1,88 @@
{
"name": "postcss",
"version": "8.4.31",
"description": "Tool for transforming styles with JS plugins",
"engines": {
"node": "^10 || ^12 || >=14"
},
"exports": {
".": {
"require": "./lib/postcss.js",
"import": "./lib/postcss.mjs"
},
"./lib/at-rule": "./lib/at-rule.js",
"./lib/comment": "./lib/comment.js",
"./lib/container": "./lib/container.js",
"./lib/css-syntax-error": "./lib/css-syntax-error.js",
"./lib/declaration": "./lib/declaration.js",
"./lib/fromJSON": "./lib/fromJSON.js",
"./lib/input": "./lib/input.js",
"./lib/lazy-result": "./lib/lazy-result.js",
"./lib/no-work-result": "./lib/no-work-result.js",
"./lib/list": "./lib/list.js",
"./lib/map-generator": "./lib/map-generator.js",
"./lib/node": "./lib/node.js",
"./lib/parse": "./lib/parse.js",
"./lib/parser": "./lib/parser.js",
"./lib/postcss": "./lib/postcss.js",
"./lib/previous-map": "./lib/previous-map.js",
"./lib/processor": "./lib/processor.js",
"./lib/result": "./lib/result.js",
"./lib/root": "./lib/root.js",
"./lib/rule": "./lib/rule.js",
"./lib/stringifier": "./lib/stringifier.js",
"./lib/stringify": "./lib/stringify.js",
"./lib/symbols": "./lib/symbols.js",
"./lib/terminal-highlight": "./lib/terminal-highlight.js",
"./lib/tokenize": "./lib/tokenize.js",
"./lib/warn-once": "./lib/warn-once.js",
"./lib/warning": "./lib/warning.js",
"./package.json": "./package.json"
},
"main": "./lib/postcss.js",
"types": "./lib/postcss.d.ts",
"keywords": [
"css",
"postcss",
"rework",
"preprocessor",
"parser",
"source map",
"transform",
"manipulation",
"transpiler"
],
"funding": [
{
"type": "opencollective",
"url": "https://opencollective.com/postcss/"
},
{
"type": "tidelift",
"url": "https://tidelift.com/funding/github/npm/postcss"
},
{
"type": "github",
"url": "https://github.com/sponsors/ai"
}
],
"author": "Andrey Sitnik <andrey@sitnik.ru>",
"license": "MIT",
"homepage": "https://postcss.org/",
"repository": "postcss/postcss",
"bugs": {
"url": "https://github.com/postcss/postcss/issues"
},
"dependencies": {
"nanoid": "^3.3.6",
"picocolors": "^1.0.0",
"source-map-js": "^1.0.2"
},
"browser": {
"./lib/terminal-highlight": false,
"source-map-js": false,
"path": false,
"url": false,
"fs": false
}
}

View File

@@ -0,0 +1,12 @@
import type { ASTVisitor } from '../../language/visitor';
import type { ValidationContext } from '../ValidationContext';
/**
* Possible fragment spread
*
* A fragment spread is only valid if the type condition could ever possibly
* be true: if there is a non-empty intersection of the possible parent types,
* and possible types which pass the type condition.
*/
export declare function PossibleFragmentSpreadsRule(
context: ValidationContext,
): ASTVisitor;

View File

@@ -0,0 +1,113 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const browser = require('@sentry/browser');
const core = require('@sentry/core');
const React = require('react');
/**
* See if React major version is 17+ by parsing version string.
*/
function isAtLeastReact17(reactVersion) {
const reactMajor = reactVersion.match(/^([^.]+)/);
return reactMajor !== null && parseInt(reactMajor[0]) >= 17;
}
/**
* Recurse through `error.cause` chain to set cause on an error.
*/
function setCause(error, cause) {
const seenErrors = new WeakSet();
function recurse(error, cause) {
// If we've already seen the error, there is a recursive loop somewhere in the error's
// cause chain. Let's just bail out then to prevent a stack overflow.
if (seenErrors.has(error)) {
return;
}
if (error.cause) {
seenErrors.add(error);
return recurse(error.cause, cause);
}
error.cause = cause;
}
recurse(error, cause);
}
/**
* Captures an error that was thrown by a React ErrorBoundary or React root.
*
* @param error The error to capture.
* @param errorInfo The errorInfo provided by React.
* @param hint Optional additional data to attach to the Sentry event.
* @returns the id of the captured Sentry event.
*/
function captureReactException(
// eslint-disable-next-line @typescript-eslint/no-explicit-any
error,
{ componentStack },
hint,
) {
// If on React version >= 17, create stack trace from componentStack param and links
// to to the original error using `error.cause` otherwise relies on error param for stacktrace.
// Linking errors requires the `LinkedErrors` integration be enabled.
// See: https://reactjs.org/blog/2020/08/10/react-v17-rc.html#native-component-stacks
//
// Although `componentDidCatch` is typed to accept an `Error` object, it can also be invoked
// with non-error objects. This is why we need to check if the error is an error-like object.
// See: https://github.com/getsentry/sentry-javascript/issues/6167
if (isAtLeastReact17(React.version) && core.isError(error) && componentStack) {
const errorBoundaryError = new Error(error.message);
errorBoundaryError.name = `React ErrorBoundary ${error.name}`;
errorBoundaryError.stack = componentStack;
// Using the `LinkedErrors` integration to link the errors together.
setCause(error, errorBoundaryError);
}
return browser.withScope(scope => {
scope.setContext('react', { componentStack });
return browser.captureException(error, hint);
});
}
/**
* Creates an error handler that can be used with the `onCaughtError`, `onUncaughtError`,
* and `onRecoverableError` options in `createRoot` and `hydrateRoot` React DOM methods.
*
* @param callback An optional callback that will be called after the error is captured.
* Use this to add custom handling for errors.
*
* @example
*
* ```JavaScript
* const root = createRoot(container, {
* onCaughtError: Sentry.reactErrorHandler(),
* onUncaughtError: Sentry.reactErrorHandler((error, errorInfo) => {
* console.warn('Caught error', error, errorInfo.componentStack);
* });
* });
* ```
*/
function reactErrorHandler(
// eslint-disable-next-line @typescript-eslint/no-explicit-any
callback,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
return (error, errorInfo) => {
const hasCallback = !!callback;
const eventId = captureReactException(error, errorInfo, {
mechanism: { handled: hasCallback, type: 'auto.function.react.error_handler' },
});
if (hasCallback) {
callback(error, errorInfo, eventId);
}
};
}
exports.captureReactException = captureReactException;
exports.isAtLeastReact17 = isAtLeastReact17;
exports.reactErrorHandler = reactErrorHandler;
exports.setCause = setCause;
//# sourceMappingURL=error.js.map

View File

@@ -0,0 +1,339 @@
'use strict'
const { states, opcodes } = require('./constants')
const { isUtf8 } = require('node:buffer')
const { removeHTTPWhitespace } = require('../fetch/data-url')
const { collectASequenceOfCodePointsFast } = require('../infra')
/**
* @param {number} readyState
* @returns {boolean}
*/
function isConnecting (readyState) {
// If the WebSocket connection is not yet established, and the connection
// is not yet closed, then the WebSocket connection is in the CONNECTING state.
return readyState === states.CONNECTING
}
/**
* @param {number} readyState
* @returns {boolean}
*/
function isEstablished (readyState) {
// If the server's response is validated as provided for above, it is
// said that _The WebSocket Connection is Established_ and that the
// WebSocket Connection is in the OPEN state.
return readyState === states.OPEN
}
/**
* @param {number} readyState
* @returns {boolean}
*/
function isClosing (readyState) {
// Upon either sending or receiving a Close control frame, it is said
// that _The WebSocket Closing Handshake is Started_ and that the
// WebSocket connection is in the CLOSING state.
return readyState === states.CLOSING
}
/**
* @param {number} readyState
* @returns {boolean}
*/
function isClosed (readyState) {
return readyState === states.CLOSED
}
/**
* @see https://dom.spec.whatwg.org/#concept-event-fire
* @param {string} e
* @param {EventTarget} target
* @param {(...args: ConstructorParameters<typeof Event>) => Event} eventFactory
* @param {EventInit | undefined} eventInitDict
* @returns {void}
*/
function fireEvent (e, target, eventFactory = (type, init) => new Event(type, init), eventInitDict = {}) {
// 1. If eventConstructor is not given, then let eventConstructor be Event.
// 2. Let event be the result of creating an event given eventConstructor,
// in the relevant realm of target.
// 3. Initialize events type attribute to e.
const event = eventFactory(e, eventInitDict)
// 4. Initialize any other IDL attributes of event as described in the
// invocation of this algorithm.
// 5. Return the result of dispatching event at target, with legacy target
// override flag set if set.
target.dispatchEvent(event)
}
/**
* @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol
* @param {import('./websocket').Handler} handler
* @param {number} type Opcode
* @param {Buffer} data application data
* @returns {void}
*/
function websocketMessageReceived (handler, type, data) {
handler.onMessage(type, data)
}
/**
* @param {Buffer} buffer
* @returns {ArrayBuffer}
*/
function toArrayBuffer (buffer) {
if (buffer.byteLength === buffer.buffer.byteLength) {
return buffer.buffer
}
return new Uint8Array(buffer).buffer
}
/**
* @see https://datatracker.ietf.org/doc/html/rfc6455
* @see https://datatracker.ietf.org/doc/html/rfc2616
* @see https://bugs.chromium.org/p/chromium/issues/detail?id=398407
* @param {string} protocol
* @returns {boolean}
*/
function isValidSubprotocol (protocol) {
// If present, this value indicates one
// or more comma-separated subprotocol the client wishes to speak,
// ordered by preference. The elements that comprise this value
// MUST be non-empty strings with characters in the range U+0021 to
// U+007E not including separator characters as defined in
// [RFC2616] and MUST all be unique strings.
if (protocol.length === 0) {
return false
}
for (let i = 0; i < protocol.length; ++i) {
const code = protocol.charCodeAt(i)
if (
code < 0x21 || // CTL, contains SP (0x20) and HT (0x09)
code > 0x7E ||
code === 0x22 || // "
code === 0x28 || // (
code === 0x29 || // )
code === 0x2C || // ,
code === 0x2F || // /
code === 0x3A || // :
code === 0x3B || // ;
code === 0x3C || // <
code === 0x3D || // =
code === 0x3E || // >
code === 0x3F || // ?
code === 0x40 || // @
code === 0x5B || // [
code === 0x5C || // \
code === 0x5D || // ]
code === 0x7B || // {
code === 0x7D // }
) {
return false
}
}
return true
}
/**
* @see https://datatracker.ietf.org/doc/html/rfc6455#section-7-4
* @param {number} code
* @returns {boolean}
*/
function isValidStatusCode (code) {
if (code >= 1000 && code < 1015) {
return (
code !== 1004 && // reserved
code !== 1005 && // "MUST NOT be set as a status code"
code !== 1006 // "MUST NOT be set as a status code"
)
}
return code >= 3000 && code <= 4999
}
/**
* @see https://datatracker.ietf.org/doc/html/rfc6455#section-5.5
* @param {number} opcode
* @returns {boolean}
*/
function isControlFrame (opcode) {
return (
opcode === opcodes.CLOSE ||
opcode === opcodes.PING ||
opcode === opcodes.PONG
)
}
/**
* @param {number} opcode
* @returns {boolean}
*/
function isContinuationFrame (opcode) {
return opcode === opcodes.CONTINUATION
}
/**
* @param {number} opcode
* @returns {boolean}
*/
function isTextBinaryFrame (opcode) {
return opcode === opcodes.TEXT || opcode === opcodes.BINARY
}
/**
*
* @param {number} opcode
* @returns {boolean}
*/
function isValidOpcode (opcode) {
return isTextBinaryFrame(opcode) || isContinuationFrame(opcode) || isControlFrame(opcode)
}
/**
* Parses a Sec-WebSocket-Extensions header value.
* @param {string} extensions
* @returns {Map<string, string>}
*/
// TODO(@Uzlopak, @KhafraDev): make compliant https://datatracker.ietf.org/doc/html/rfc6455#section-9.1
function parseExtensions (extensions) {
const position = { position: 0 }
const extensionList = new Map()
while (position.position < extensions.length) {
const pair = collectASequenceOfCodePointsFast(';', extensions, position)
const [name, value = ''] = pair.split('=', 2)
extensionList.set(
removeHTTPWhitespace(name, true, false),
removeHTTPWhitespace(value, false, true)
)
position.position++
}
return extensionList
}
/**
* @see https://www.rfc-editor.org/rfc/rfc7692#section-7.1.2.2
* @description "client-max-window-bits = 1*DIGIT"
* @param {string} value
* @returns {boolean}
*/
function isValidClientWindowBits (value) {
for (let i = 0; i < value.length; i++) {
const byte = value.charCodeAt(i)
if (byte < 0x30 || byte > 0x39) {
return false
}
}
return true
}
/**
* @see https://whatpr.org/websockets/48/7b748d3...d5570f3.html#get-a-url-record
* @param {string} url
* @param {string} [baseURL]
*/
function getURLRecord (url, baseURL) {
// 1. Let urlRecord be the result of applying the URL parser to url with baseURL .
// 2. If urlRecord is failure, then throw a " SyntaxError " DOMException .
let urlRecord
try {
urlRecord = new URL(url, baseURL)
} catch (e) {
throw new DOMException(e, 'SyntaxError')
}
// 3. If urlRecord s scheme is " http ", then set urlRecord s scheme to " ws ".
// 4. Otherwise, if urlRecord s scheme is " https ", set urlRecord s scheme to " wss ".
if (urlRecord.protocol === 'http:') {
urlRecord.protocol = 'ws:'
} else if (urlRecord.protocol === 'https:') {
urlRecord.protocol = 'wss:'
}
// 5. If urlRecord s scheme is not " ws " or " wss ", then throw a " SyntaxError " DOMException .
if (urlRecord.protocol !== 'ws:' && urlRecord.protocol !== 'wss:') {
throw new DOMException('expected a ws: or wss: url', 'SyntaxError')
}
// If urlRecord s fragment is non-null, then throw a " SyntaxError " DOMException .
if (urlRecord.hash.length || urlRecord.href.endsWith('#')) {
throw new DOMException('hash', 'SyntaxError')
}
// Return urlRecord .
return urlRecord
}
// https://whatpr.org/websockets/48.html#validate-close-code-and-reason
function validateCloseCodeAndReason (code, reason) {
// 1. If code is not null, but is neither an integer equal to
// 1000 nor an integer in the range 3000 to 4999, inclusive,
// throw an "InvalidAccessError" DOMException.
if (code !== null) {
if (code !== 1000 && (code < 3000 || code > 4999)) {
throw new DOMException('invalid code', 'InvalidAccessError')
}
}
// 2. If reason is not null, then:
if (reason !== null) {
// 2.1. Let reasonBytes be the result of UTF-8 encoding reason.
// 2.2. If reasonBytes is longer than 123 bytes, then throw a
// "SyntaxError" DOMException.
const reasonBytesLength = Buffer.byteLength(reason)
if (reasonBytesLength > 123) {
throw new DOMException(`Reason must be less than 123 bytes; received ${reasonBytesLength}`, 'SyntaxError')
}
}
}
/**
* Converts a Buffer to utf-8, even on platforms without icu.
* @type {(buffer: Buffer) => string}
*/
const utf8Decode = (() => {
if (typeof process.versions.icu === 'string') {
const fatalDecoder = new TextDecoder('utf-8', { fatal: true })
return fatalDecoder.decode.bind(fatalDecoder)
}
return function (buffer) {
if (isUtf8(buffer)) {
return buffer.toString('utf-8')
}
throw new TypeError('Invalid utf-8 received.')
}
})()
module.exports = {
isConnecting,
isEstablished,
isClosing,
isClosed,
fireEvent,
isValidSubprotocol,
isValidStatusCode,
websocketMessageReceived,
utf8Decode,
isControlFrame,
isContinuationFrame,
isTextBinaryFrame,
isValidOpcode,
parseExtensions,
isValidClientWindowBits,
toArrayBuffer,
getURLRecord,
validateCloseCodeAndReason
}

View File

@@ -0,0 +1,35 @@
import { escapeStringForRegex } from '@sentry/core';
import * as fs from 'fs';
import * as path from 'path';
/**
* Inject templated code into the beginning of a module.
*
* Options:
* - `templatePrefix`: The XXX in `XXXPrefixLoaderTemplate.ts`, to specify which template to use
* - `replacements`: An array of tuples of the form `[<placeholder>, <replacementValue>]`, used for doing global
* string replacement in the template. Note: The replacement is done sequentially, in the order in which the
* replacement values are given. If any placeholder is a substring of any replacement value besides its own, make
* sure to order the tuples in such a way as to avoid over-replacement.
*/
function prefixLoader( userCode) {
// We know one or the other will be defined, depending on the version of webpack being used
const { templatePrefix, replacements } = 'getOptions' in this ? this.getOptions() : this.query;
const templatePath = path.resolve(__dirname, `../templates/${templatePrefix}PrefixLoaderTemplate.js`);
// make sure the template is included when running `webpack watch`
this.addDependency(templatePath);
// Fill in placeholders
let templateCode = fs.readFileSync(templatePath).toString();
replacements.forEach(([placeholder, value]) => {
// eslint-disable-next-line @sentry-internal/sdk/no-regexp-constructor -- user input is escaped
const placeholderRegex = new RegExp(escapeStringForRegex(placeholder), 'g');
templateCode = templateCode.replace(placeholderRegex, value);
});
return `${templateCode}\n${userCode}`;
}
export { prefixLoader as default };
//# sourceMappingURL=prefixLoader.js.map

View File

@@ -0,0 +1,55 @@
{
"name": "ansi-regex",
"version": "5.0.1",
"description": "Regular expression for matching ANSI escape codes",
"license": "MIT",
"repository": "chalk/ansi-regex",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"engines": {
"node": ">=8"
},
"scripts": {
"test": "xo && ava && tsd",
"view-supported": "node fixtures/view-codes.js"
},
"files": [
"index.js",
"index.d.ts"
],
"keywords": [
"ansi",
"styles",
"color",
"colour",
"colors",
"terminal",
"console",
"cli",
"string",
"tty",
"escape",
"formatting",
"rgb",
"256",
"shell",
"xterm",
"command-line",
"text",
"regex",
"regexp",
"re",
"match",
"test",
"find",
"pattern"
],
"devDependencies": {
"ava": "^2.4.0",
"tsd": "^0.9.0",
"xo": "^0.25.3"
}
}

View File

@@ -0,0 +1,9 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
import{useLexicalComposerContext as o}from"@lexical/react/LexicalComposerContext";import{registerLexicalTextEntity as t}from"@lexical/text";import{mergeRegister as r}from"@lexical/utils";import{useEffect as e}from"react";function i(i,m,c){const[l]=o();e((()=>r(...t(l,i,m,c))),[c,l,i,m])}export{i as useLexicalTextEntity};

View File

@@ -0,0 +1,13 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
open-pull-requests-limit: 10
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 10

View File

@@ -0,0 +1,18 @@
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=span.js.map

View File

@@ -0,0 +1,6 @@
import type { Option, OptionObject } from 'payload';
/**
* Formats an array of options for use in a select input.
*/
export declare const formatOptions: (options: Option[]) => OptionObject[];
//# sourceMappingURL=formatOptions.d.ts.map

View File

@@ -0,0 +1,103 @@
"use strict";
exports.differenceInDays = differenceInDays;
var _index = require("./differenceInCalendarDays.js");
var _index2 = require("./toDate.js");
/**
* @name differenceInDays
* @category Day Helpers
* @summary Get the number of full days between the given dates.
*
* @description
* Get the number of full day periods between two dates. Fractional days are
* truncated towards zero.
*
* One "full day" is the distance between a local time in one day to the same
* local time on the next or previous day. A full day can sometimes be less than
* or more than 24 hours if a daylight savings change happens between two dates.
*
* To ignore DST and only measure exact 24-hour periods, use this instead:
* `Math.trunc(differenceInHours(dateLeft, dateRight)/24)|0`.
*
* @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 full days according to the local timezone
*
* @example
* // How many full days are between
* // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?
* const result = differenceInDays(
* new Date(2012, 6, 2, 0, 0),
* new Date(2011, 6, 2, 23, 0)
* )
* //=> 365
*
* @example
* // How many full days are between
* // 2 July 2011 23:59:00 and 3 July 2011 00:01:00?
* const result = differenceInDays(
* new Date(2011, 6, 3, 0, 1),
* new Date(2011, 6, 2, 23, 59)
* )
* //=> 0
*
* @example
* // How many full days are between
* // 1 March 2020 0:00 and 1 June 2020 0:00 ?
* // Note: because local time is used, the
* // result will always be 92 days, even in
* // time zones where DST starts and the
* // period has only 92*24-1 hours.
* const result = differenceInDays(
* new Date(2020, 5, 1),
* new Date(2020, 2, 1)
* )
* //=> 92
*/
function differenceInDays(dateLeft, dateRight) {
const _dateLeft = (0, _index2.toDate)(dateLeft);
const _dateRight = (0, _index2.toDate)(dateRight);
const sign = compareLocalAsc(_dateLeft, _dateRight);
const difference = Math.abs(
(0, _index.differenceInCalendarDays)(_dateLeft, _dateRight),
);
_dateLeft.setDate(_dateLeft.getDate() - sign * difference);
// Math.abs(diff in full days - diff in calendar days) === 1 if last calendar day is not full
// If so, result must be decreased by 1 in absolute value
const isLastDayNotFull = Number(
compareLocalAsc(_dateLeft, _dateRight) === -sign,
);
const result = sign * (difference - isLastDayNotFull);
// Prevent negative zero
return result === 0 ? 0 : result;
}
// Like `compareAsc` but uses local time not UTC, which is needed
// for accurate equality comparisons of UTC timestamps that end up
// having the same representation in local time, e.g. one hour before
// DST ends vs. the instant that DST ends.
function compareLocalAsc(dateLeft, dateRight) {
const diff =
dateLeft.getFullYear() - dateRight.getFullYear() ||
dateLeft.getMonth() - dateRight.getMonth() ||
dateLeft.getDate() - dateRight.getDate() ||
dateLeft.getHours() - dateRight.getHours() ||
dateLeft.getMinutes() - dateRight.getMinutes() ||
dateLeft.getSeconds() - dateRight.getSeconds() ||
dateLeft.getMilliseconds() - dateRight.getMilliseconds();
if (diff < 0) {
return -1;
} else if (diff > 0) {
return 1;
// Return 0 if diff is 0; return NaN if diff is NaN
} else {
return diff;
}
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"sdk-info.js","sourceRoot":"","sources":["../../../../src/platform/node/sdk-info.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EACL,uBAAuB,EACvB,2BAA2B,EAC3B,mCAAmC,EACnC,0BAA0B,GAC3B,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAE1D,0CAA0C;AAC1C,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,CAAC,uBAAuB,CAAC,EAAE,eAAe;IAC1C,CAAC,yBAAyB,CAAC,EAAE,MAAM;IACnC,CAAC,2BAA2B,CAAC,EAAE,mCAAmC;IAClE,CAAC,0BAA0B,CAAC,EAAE,OAAO;CACtC,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 { VERSION } from '../../version';\nimport {\n ATTR_TELEMETRY_SDK_NAME,\n ATTR_TELEMETRY_SDK_LANGUAGE,\n TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS,\n ATTR_TELEMETRY_SDK_VERSION,\n} from '@opentelemetry/semantic-conventions';\nimport { ATTR_PROCESS_RUNTIME_NAME } from '../../semconv';\n\n/** Constants describing the SDK in use */\nexport const SDK_INFO = {\n [ATTR_TELEMETRY_SDK_NAME]: 'opentelemetry',\n [ATTR_PROCESS_RUNTIME_NAME]: 'node',\n [ATTR_TELEMETRY_SDK_LANGUAGE]: TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS,\n [ATTR_TELEMETRY_SDK_VERSION]: VERSION,\n};\n"]}

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/views/Version/RenderFieldsToDiff/DiffCollapser/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAI1C,OAAO,KAAmB,MAAM,OAAO,CAAA;AAEvC,OAAO,cAAc,CAAA;AAKrB,KAAK,KAAK,GAAG;IACX,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,OAAO,EAAE,MAAM,EAAE,GAAG,SAAS,CAAA;IAC7B,iBAAiB,EAAE,OAAO,CAAA;IAC1B,OAAO,EAAE,OAAO,CAAA;CACjB,GAAG,CACA;IAEE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,KAAK,CAAC,EAAE,KAAK,CAAA;IACb,MAAM,EAAE,WAAW,EAAE,CAAA;IACrB,UAAU,CAAC,EAAE,KAAK,CAAA;IAClB,SAAS,EAAE,OAAO,CAAA;CACnB,GACD;IAEE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,KAAK,EAAE,WAAW,CAAA;IAClB,MAAM,CAAC,EAAE,KAAK,CAAA;IACd,UAAU,EAAE,IAAI,CAAA;IAChB,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,CACJ,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAmFzC,CAAA"}

View File

@@ -0,0 +1,108 @@
'use strict'
const refs = {
exit: [],
beforeExit: []
}
const functions = {
exit: onExit,
beforeExit: onBeforeExit
}
let registry
function ensureRegistry () {
if (registry === undefined) {
registry = new FinalizationRegistry(clear)
}
}
function install (event) {
if (refs[event].length > 0) {
return
}
process.on(event, functions[event])
}
function uninstall (event) {
if (refs[event].length > 0) {
return
}
process.removeListener(event, functions[event])
if (refs.exit.length === 0 && refs.beforeExit.length === 0) {
registry = undefined
}
}
function onExit () {
callRefs('exit')
}
function onBeforeExit () {
callRefs('beforeExit')
}
function callRefs (event) {
for (const ref of refs[event]) {
const obj = ref.deref()
const fn = ref.fn
// This should always happen, however GC is
// undeterministic so it might not happen.
/* istanbul ignore else */
if (obj !== undefined) {
fn(obj, event)
}
}
refs[event] = []
}
function clear (ref) {
for (const event of ['exit', 'beforeExit']) {
const index = refs[event].indexOf(ref)
refs[event].splice(index, index + 1)
uninstall(event)
}
}
function _register (event, obj, fn) {
if (obj === undefined) {
throw new Error('the object can\'t be undefined')
}
install(event)
const ref = new WeakRef(obj)
ref.fn = fn
ensureRegistry()
registry.register(obj, ref)
refs[event].push(ref)
}
function register (obj, fn) {
_register('exit', obj, fn)
}
function registerBeforeExit (obj, fn) {
_register('beforeExit', obj, fn)
}
function unregister (obj) {
if (registry === undefined) {
return
}
registry.unregister(obj)
for (const event of ['exit', 'beforeExit']) {
refs[event] = refs[event].filter((ref) => {
const _obj = ref.deref()
return _obj && _obj !== obj
})
uninstall(event)
}
}
module.exports = {
register,
registerBeforeExit,
unregister
}

View File

@@ -0,0 +1,60 @@
type Parse = typeof parse
declare namespace parse {
export type ParseOptions = {
/**
* What to do when a `__proto__` key is found.
* - `'error'` - throw a `SyntaxError` when a `__proto__` key is found. This is the default value.
* - `'remove'` - deletes any `__proto__` keys from the result object.
* - `'ignore'` - skips all validation (same as calling `JSON.parse()` directly).
*/
protoAction?: 'error' | 'remove' | 'ignore';
/**
* What to do when a `constructor` key is found.
* - `'error'` - throw a `SyntaxError` when a `constructor.prototype` key is found. This is the default value.
* - `'remove'` - deletes any `constructor` keys from the result object.
* - `'ignore'` - skips all validation (same as calling `JSON.parse()` directly).
*/
constructorAction?: 'error' | 'remove' | 'ignore';
/** If `true`, returns `null` instead of throwing an error when a security issue is found. */
safe?: boolean;
}
export type ScanOptions = ParseOptions
export type Reviver = (this: any, key: string, value: any) => any
/**
* Parses a given JSON-formatted text into an object.
*
* @param text The JSON text string.
* @param reviver The `JSON.parse()` optional `reviver` argument.
* @param options Optional configuration object.
* @returns The parsed object.
*/
export const parse: Parse
/**
* Safely parses a given JSON-formatted text into an object.
*
* @param text The JSON text string.
* @param reviver The `JSON.parse()` optional `reviver` argument.
* @returns The parsed object, or `undefined` if there was an error or if the JSON contained possibly insecure properties.
*/
export function safeParse (text: string | Buffer, reviver?: Reviver | null): any
/**
* Scans a given object for prototype properties.
*
* @param obj The object being scanned.
* @param options Optional configuration object.
* @returns The object, or `null` if onError is set to `nullify`
*/
export function scan (obj: { [key: string | number]: any }, options?: ParseOptions): any
export { parse as default }
}
declare function parse (text: string | Buffer, options?: parse.ParseOptions): any
declare function parse (text: string | Buffer, reviver?: parse.Reviver | null, options?: parse.ParseOptions): any
export = parse

View File

@@ -0,0 +1,22 @@
import ObjectIdImport from 'bson-objectid';
const ObjectId = 'default' in ObjectIdImport ? ObjectIdImport.default : ObjectIdImport;
export const baseIDField = {
name: 'id',
type: 'text',
admin: {
hidden: true
},
defaultValue: ()=>new ObjectId().toHexString(),
hooks: {
beforeChange: [
({ value })=>value || new ObjectId().toHexString()
],
// ID field values for arrays and blocks need to be unique when duplicating, as on postgres they are stored on the same table as primary keys.
beforeDuplicate: [
()=>new ObjectId().toHexString()
]
},
label: 'ID'
};
//# sourceMappingURL=baseIDField.js.map

View File

@@ -0,0 +1,29 @@
export type AttachmentType = 'event.attachment' | 'event.minidump' | 'event.applecrashreport' | 'unreal.context' | 'unreal.logs' | 'event.view_hierarchy';
/**
* An attachment to an event. This is used to upload arbitrary data to Sentry.
*
* Please take care to not add sensitive information in attachments.
*
* https://develop.sentry.dev/sdk/envelopes/#attachment
*/
export interface Attachment {
/**
* The attachment data. Can be a string or a binary data (byte array)
*/
data: string | Uint8Array;
/**
* The name of the uploaded file without a path component
*/
filename: string;
/**
* The content type of the attachment payload. Defaults to `application/octet-stream` if not specified.
*
* Any valid [media type](https://www.iana.org/assignments/media-types/media-types.xhtml) is allowed.
*/
contentType?: string;
/**
* The type of the attachment. Defaults to `event.attachment` if not specified.
*/
attachmentType?: AttachmentType;
}
//# sourceMappingURL=attachment.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"rowHelpers.js","names":["extractRowsAndCollapsedIDs","collapsed","rowID","rows","reduce","acc","row","id","collapsedIDs","push","updatedRows","toggleAllRows"],"sources":["../../../src/forms/Form/rowHelpers.ts"],"sourcesContent":["'use client'\nimport type { Row } from 'payload'\n\nexport const extractRowsAndCollapsedIDs = ({\n collapsed,\n rowID,\n rows,\n}: {\n collapsed: boolean\n rowID: string\n rows: Row[]\n}): {\n collapsedIDs: string[]\n updatedRows: Row[]\n} => {\n return rows.reduce(\n (acc, row) => {\n if (rowID === row.id) {\n row.collapsed = collapsed\n }\n if (row.collapsed) {\n acc.collapsedIDs.push(row.id)\n }\n acc.updatedRows.push(row)\n return acc\n },\n {\n collapsedIDs: [],\n updatedRows: [],\n },\n )\n}\n\nexport const toggleAllRows = ({\n collapsed,\n rows,\n}): {\n collapsedIDs: string[]\n updatedRows: Row[]\n} => {\n return rows.reduce(\n (acc, row) => {\n row.collapsed = collapsed\n if (collapsed) {\n acc.collapsedIDs.push(row.id)\n }\n acc.updatedRows.push(row)\n return acc\n },\n {\n collapsedIDs: [],\n updatedRows: [],\n },\n )\n}\n"],"mappings":"AAAA;;AAGA,OAAO,MAAMA,0BAAA,GAA6BA,CAAC;EACzCC,SAAS;EACTC,KAAK;EACLC;AAAI,CAKL;EAIC,OAAOA,IAAA,CAAKC,MAAM,CAChB,CAACC,GAAA,EAAKC,GAAA;IACJ,IAAIJ,KAAA,KAAUI,GAAA,CAAIC,EAAE,EAAE;MACpBD,GAAA,CAAIL,SAAS,GAAGA,SAAA;IAClB;IACA,IAAIK,GAAA,CAAIL,SAAS,EAAE;MACjBI,GAAA,CAAIG,YAAY,CAACC,IAAI,CAACH,GAAA,CAAIC,EAAE;IAC9B;IACAF,GAAA,CAAIK,WAAW,CAACD,IAAI,CAACH,GAAA;IACrB,OAAOD,GAAA;EACT,GACA;IACEG,YAAA,EAAc,EAAE;IAChBE,WAAA,EAAa;EACf;AAEJ;AAEA,OAAO,MAAMC,aAAA,GAAgBA,CAAC;EAC5BV,SAAS;EACTE;AAAI,CACL;EAIC,OAAOA,IAAA,CAAKC,MAAM,CAChB,CAACC,GAAA,EAAKC,GAAA;IACJA,GAAA,CAAIL,SAAS,GAAGA,SAAA;IAChB,IAAIA,SAAA,EAAW;MACbI,GAAA,CAAIG,YAAY,CAACC,IAAI,CAACH,GAAA,CAAIC,EAAE;IAC9B;IACAF,GAAA,CAAIK,WAAW,CAACD,IAAI,CAACH,GAAA;IACrB,OAAOD,GAAA;EACT,GACA;IACEG,YAAA,EAAc,EAAE;IAChBE,WAAA,EAAa;EACf;AAEJ","ignoreList":[]}

View File

@@ -0,0 +1 @@
{"version":3,"file":"panel-bottom-open.js","sources":["../../../src/icons/panel-bottom-open.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name PanelBottomOpen\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHg9IjMiIHk9IjMiIHJ4PSIyIiAvPgogIDxwYXRoIGQ9Ik0zIDE1aDE4IiAvPgogIDxwYXRoIGQ9Im05IDEwIDMtMyAzIDMiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/panel-bottom-open\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 PanelBottomOpen = createLucideIcon('PanelBottomOpen', [\n ['rect', { width: '18', height: '18', x: '3', y: '3', rx: '2', key: 'afitv7' }],\n ['path', { d: 'M3 15h18', key: '5xshup' }],\n ['path', { d: 'm9 10 3-3 3 3', key: '11gsxs' }],\n]);\n\nexport default PanelBottomOpen;\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,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,CAAiB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAChD,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/sql-js/migrator.ts"],"sourcesContent":["import type { MigrationConfig } from '~/migrator.ts';\nimport { readMigrationFiles } from '~/migrator.ts';\nimport type { SQLJsDatabase } from './driver.ts';\n\nexport function migrate<TSchema extends Record<string, unknown>>(\n\tdb: SQLJsDatabase<TSchema>,\n\tconfig: MigrationConfig,\n) {\n\tconst migrations = readMigrationFiles(config);\n\tdb.dialect.migrate(migrations, db.session, config);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,sBAAmC;AAG5B,SAAS,QACf,IACA,QACC;AACD,QAAM,iBAAa,oCAAmB,MAAM;AAC5C,KAAG,QAAQ,QAAQ,YAAY,GAAG,SAAS,MAAM;AAClD;","names":[]}

View File

@@ -0,0 +1,109 @@
"use strict";
exports.formatISO = formatISO;
var _index = require("./toDate.js");
var _index2 = require("./_lib/addLeadingZeros.js");
/**
* The {@link formatISO} function options.
*/
/**
* @name formatISO
* @category Common Helpers
* @summary Format the date according to the ISO 8601 standard (https://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a003169814.htm).
*
* @description
* Return the formatted date string in ISO 8601 format. Options may be passed to control the parts and notations of the date.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param date - The original date
* @param options - An object with options.
*
* @returns The formatted date string (in loca.l time zone)
*
* @throws `date` must not be Invalid Date
*
* @example
* // Represent 18 September 2019 in ISO 8601 format (local time zone is UTC):
* const result = formatISO(new Date(2019, 8, 18, 19, 0, 52))
* //=> '2019-09-18T19:00:52Z'
*
* @example
* // Represent 18 September 2019 in ISO 8601, short format (local time zone is UTC):
* const result = formatISO(new Date(2019, 8, 18, 19, 0, 52), { format: 'basic' })
* //=> '20190918T190052'
*
* @example
* // Represent 18 September 2019 in ISO 8601 format, date only:
* const result = formatISO(new Date(2019, 8, 18, 19, 0, 52), { representation: 'date' })
* //=> '2019-09-18'
*
* @example
* // Represent 18 September 2019 in ISO 8601 format, time only (local time zone is UTC):
* const result = formatISO(new Date(2019, 8, 18, 19, 0, 52), { representation: 'time' })
* //=> '19:00:52Z'
*/
function formatISO(date, options) {
const _date = (0, _index.toDate)(date);
if (isNaN(_date.getTime())) {
throw new RangeError("Invalid time value");
}
const format = options?.format ?? "extended";
const representation = options?.representation ?? "complete";
let result = "";
let tzOffset = "";
const dateDelimiter = format === "extended" ? "-" : "";
const timeDelimiter = format === "extended" ? ":" : "";
// Representation is either 'date' or 'complete'
if (representation !== "time") {
const day = (0, _index2.addLeadingZeros)(_date.getDate(), 2);
const month = (0, _index2.addLeadingZeros)(_date.getMonth() + 1, 2);
const year = (0, _index2.addLeadingZeros)(_date.getFullYear(), 4);
// yyyyMMdd or yyyy-MM-dd.
result = `${year}${dateDelimiter}${month}${dateDelimiter}${day}`;
}
// Representation is either 'time' or 'complete'
if (representation !== "date") {
// Add the timezone.
const offset = _date.getTimezoneOffset();
if (offset !== 0) {
const absoluteOffset = Math.abs(offset);
const hourOffset = (0, _index2.addLeadingZeros)(
Math.trunc(absoluteOffset / 60),
2,
);
const minuteOffset = (0, _index2.addLeadingZeros)(absoluteOffset % 60, 2);
// If less than 0, the sign is +, because it is ahead of time.
const sign = offset < 0 ? "+" : "-";
tzOffset = `${sign}${hourOffset}:${minuteOffset}`;
} else {
tzOffset = "Z";
}
const hour = (0, _index2.addLeadingZeros)(_date.getHours(), 2);
const minute = (0, _index2.addLeadingZeros)(_date.getMinutes(), 2);
const second = (0, _index2.addLeadingZeros)(_date.getSeconds(), 2);
// If there's also date, separate it with time with 'T'
const separator = result === "" ? "" : "T";
// Creates a time string consisting of hour, minute, and second, separated by delimiters, if defined.
const time = [hour, minute, second].join(timeDelimiter);
// HHmmss or HH:mm:ss.
result = `${result}${separator}${time}${tzOffset}`;
}
return result;
}

View File

@@ -0,0 +1,146 @@
import { buildMatchFn } from "../../_lib/buildMatchFn.js";
import { buildMatchPatternFn } from "../../_lib/buildMatchPatternFn.js";
const matchOrdinalNumberPattern = /^(\d+)?/i;
const parseOrdinalNumberPattern = /\d+/i;
const matchEraPatterns = {
narrow: /^(p\.?\s*n\.?\s*e\.?\s*|n\.?\s*e\.?\s*)/i,
abbreviated: /^(p\.?\s*n\.?\s*e\.?\s*|n\.?\s*e\.?\s*)/i,
wide: /^(przed\s*nasz(ą|a)\s*er(ą|a)|naszej\s*ery)/i,
};
const parseEraPatterns = {
any: [/^p/i, /^n/i],
};
const matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^(I|II|III|IV)\s*kw\.?/i,
wide: /^(I|II|III|IV)\s*kwarta(ł|l)/i,
};
const parseQuarterPatterns = {
narrow: [/1/i, /2/i, /3/i, /4/i],
any: [/^I kw/i, /^II kw/i, /^III kw/i, /^IV kw/i],
};
const matchMonthPatterns = {
narrow: /^[slmkcwpg]/i,
abbreviated: /^(sty|lut|mar|kwi|maj|cze|lip|sie|wrz|pa(ź|z)|lis|gru)/i,
wide: /^(stycznia|stycze(ń|n)|lutego|luty|marca|marzec|kwietnia|kwiecie(ń|n)|maja|maj|czerwca|czerwiec|lipca|lipiec|sierpnia|sierpie(ń|n)|wrze(ś|s)nia|wrzesie(ń|n)|pa(ź|z)dziernika|pa(ź|z)dziernik|listopada|listopad|grudnia|grudzie(ń|n))/i,
};
const parseMonthPatterns = {
narrow: [
/^s/i,
/^l/i,
/^m/i,
/^k/i,
/^m/i,
/^c/i,
/^l/i,
/^s/i,
/^w/i,
/^p/i,
/^l/i,
/^g/i,
],
any: [
/^st/i,
/^lu/i,
/^mar/i,
/^k/i,
/^maj/i,
/^c/i,
/^lip/i,
/^si/i,
/^w/i,
/^p/i,
/^lis/i,
/^g/i,
],
};
const matchDayPatterns = {
narrow: /^[npwścs]/i,
short: /^(nie|pon|wto|(ś|s)ro|czw|pi(ą|a)|sob)/i,
abbreviated: /^(niedz|pon|wt|(ś|s)r|czw|pt|sob)\.?/i,
wide: /^(niedziela|poniedzia(ł|l)ek|wtorek|(ś|s)roda|czwartek|pi(ą|a)tek|sobota)/i,
};
const parseDayPatterns = {
narrow: [/^n/i, /^p/i, /^w/i, /^ś/i, /^c/i, /^p/i, /^s/i],
abbreviated: [/^n/i, /^po/i, /^w/i, /^(ś|s)r/i, /^c/i, /^pt/i, /^so/i],
any: [/^n/i, /^po/i, /^w/i, /^(ś|s)r/i, /^c/i, /^pi/i, /^so/i],
};
const matchDayPeriodPatterns = {
narrow:
/^(^a$|^p$|pó(ł|l)n\.?|o\s*pó(ł|l)n\.?|po(ł|l)\.?|w\s*po(ł|l)\.?|po\s*po(ł|l)\.?|rano|wiecz\.?|noc|w\s*nocy)/i,
any: /^(am|pm|pó(ł|l)noc|o\s*pó(ł|l)nocy|po(ł|l)udnie|w\s*po(ł|l)udnie|popo(ł|l)udnie|po\s*po(ł|l)udniu|rano|wieczór|wieczorem|noc|w\s*nocy)/i,
};
const parseDayPeriodPatterns = {
narrow: {
am: /^a$/i,
pm: /^p$/i,
midnight: /pó(ł|l)n/i,
noon: /po(ł|l)/i,
morning: /rano/i,
afternoon: /po\s*po(ł|l)/i,
evening: /wiecz/i,
night: /noc/i,
},
any: {
am: /^am/i,
pm: /^pm/i,
midnight: /pó(ł|l)n/i,
noon: /po(ł|l)/i,
morning: /rano/i,
afternoon: /po\s*po(ł|l)/i,
evening: /wiecz/i,
night: /noc/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",
}),
};

View File

@@ -0,0 +1,5 @@
export declare const setWeek: import("./types.js").FPFn2<
Date,
number,
import("../fp.js").DateArg<Date>
>;

View File

@@ -0,0 +1,14 @@
import { Client } from "@sentry/types";
import { NormalizedOptions } from "../options-mapping";
import { Scope } from "@sentry/core";
export declare function createSentryInstance(options: NormalizedOptions, shouldSendTelemetry: Promise<boolean>, buildTool: string, buildToolMajorVersion: string | undefined): {
sentryScope: Scope;
sentryClient: Client;
};
export declare function setTelemetryDataOnScope(options: NormalizedOptions, scope: Scope, buildTool: string, buildToolMajorVersion?: string): void;
export declare function allowedToSendTelemetry(options: NormalizedOptions): Promise<boolean>;
/**
* Flushing the SDK client can fail. We never want to crash the plugin because of telemetry.
*/
export declare function safeFlushTelemetry(sentryClient: Client): Promise<void>;
//# sourceMappingURL=telemetry.d.ts.map

View File

@@ -0,0 +1,30 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GraphQLNegativeFloat = void 0;
const graphql_1 = require("graphql");
const error_js_1 = require("../error.js");
const utilities_js_1 = require("./utilities.js");
exports.GraphQLNegativeFloat = new graphql_1.GraphQLScalarType({
name: 'NegativeFloat',
description: 'Floats that will have a value less than 0.',
serialize(value) {
return (0, utilities_js_1.processValue)(value, 'NegativeFloat');
},
parseValue(value) {
return (0, utilities_js_1.processValue)(value, 'NegativeFloat');
},
parseLiteral(ast) {
if (ast.kind !== graphql_1.Kind.FLOAT && ast.kind !== graphql_1.Kind.INT) {
throw (0, error_js_1.createGraphQLError)(`Can only validate floating point numbers as negative floating point numbers but got a: ${ast.kind}`, { nodes: ast });
}
return (0, utilities_js_1.processValue)(ast.value, 'NegativeFloat');
},
extensions: {
codegenScalarType: 'number',
jsonSchema: {
title: 'NegativeFloat',
type: 'number',
maximum: 0,
},
},
});

View File

@@ -0,0 +1,9 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
import { $createHashtagNode, $isHashtagNode, HashtagNode } from './LexicalHashtagNode';
export { $createHashtagNode, $isHashtagNode, HashtagNode };

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/mysql-core/columns/double.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyMySqlTable } from '~/mysql-core/table.ts';\nimport { getColumnNameAndConfig } from '~/utils.ts';\nimport { MySqlColumnBuilderWithAutoIncrement, MySqlColumnWithAutoIncrement } from './common.ts';\n\nexport type MySqlDoubleBuilderInitial<TName extends string> = MySqlDoubleBuilder<{\n\tname: TName;\n\tdataType: 'number';\n\tcolumnType: 'MySqlDouble';\n\tdata: number;\n\tdriverParam: number | string;\n\tenumValues: undefined;\n}>;\n\nexport class MySqlDoubleBuilder<T extends ColumnBuilderBaseConfig<'number', 'MySqlDouble'>>\n\textends MySqlColumnBuilderWithAutoIncrement<T, MySqlDoubleConfig>\n{\n\tstatic override readonly [entityKind]: string = 'MySqlDoubleBuilder';\n\n\tconstructor(name: T['name'], config: MySqlDoubleConfig | undefined) {\n\t\tsuper(name, 'number', 'MySqlDouble');\n\t\tthis.config.precision = config?.precision;\n\t\tthis.config.scale = config?.scale;\n\t\tthis.config.unsigned = config?.unsigned;\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyMySqlTable<{ name: TTableName }>,\n\t): MySqlDouble<MakeColumnConfig<T, TTableName>> {\n\t\treturn new MySqlDouble<MakeColumnConfig<T, TTableName>>(table, this.config as ColumnBuilderRuntimeConfig<any, any>);\n\t}\n}\n\nexport class MySqlDouble<T extends ColumnBaseConfig<'number', 'MySqlDouble'>>\n\textends MySqlColumnWithAutoIncrement<T, MySqlDoubleConfig>\n{\n\tstatic override readonly [entityKind]: string = 'MySqlDouble';\n\n\treadonly precision: number | undefined = this.config.precision;\n\treadonly scale: number | undefined = this.config.scale;\n\treadonly unsigned: boolean | undefined = this.config.unsigned;\n\n\tgetSQLType(): string {\n\t\tlet type = '';\n\t\tif (this.precision !== undefined && this.scale !== undefined) {\n\t\t\ttype += `double(${this.precision},${this.scale})`;\n\t\t} else if (this.precision === undefined) {\n\t\t\ttype += 'double';\n\t\t} else {\n\t\t\ttype += `double(${this.precision})`;\n\t\t}\n\t\treturn this.unsigned ? `${type} unsigned` : type;\n\t}\n}\n\nexport interface MySqlDoubleConfig {\n\tprecision?: number;\n\tscale?: number;\n\tunsigned?: boolean;\n}\n\nexport function double(): MySqlDoubleBuilderInitial<''>;\nexport function double(\n\tconfig?: MySqlDoubleConfig,\n): MySqlDoubleBuilderInitial<''>;\nexport function double<TName extends string>(\n\tname: TName,\n\tconfig?: MySqlDoubleConfig,\n): MySqlDoubleBuilderInitial<TName>;\nexport function double(a?: string | MySqlDoubleConfig, b?: MySqlDoubleConfig) {\n\tconst { name, config } = getColumnNameAndConfig<MySqlDoubleConfig>(a, b);\n\treturn new MySqlDoubleBuilder(name, config);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,oBAA2B;AAE3B,mBAAuC;AACvC,oBAAkF;AAW3E,MAAM,2BACJ,kDACT;AAAA,EACC,QAA0B,wBAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB,QAAuC;AACnE,UAAM,MAAM,UAAU,aAAa;AACnC,SAAK,OAAO,YAAY,QAAQ;AAChC,SAAK,OAAO,QAAQ,QAAQ;AAC5B,SAAK,OAAO,WAAW,QAAQ;AAAA,EAChC;AAAA;AAAA,EAGS,MACR,OAC+C;AAC/C,WAAO,IAAI,YAA6C,OAAO,KAAK,MAA8C;AAAA,EACnH;AACD;AAEO,MAAM,oBACJ,2CACT;AAAA,EACC,QAA0B,wBAAU,IAAY;AAAA,EAEvC,YAAgC,KAAK,OAAO;AAAA,EAC5C,QAA4B,KAAK,OAAO;AAAA,EACxC,WAAgC,KAAK,OAAO;AAAA,EAErD,aAAqB;AACpB,QAAI,OAAO;AACX,QAAI,KAAK,cAAc,UAAa,KAAK,UAAU,QAAW;AAC7D,cAAQ,UAAU,KAAK,SAAS,IAAI,KAAK,KAAK;AAAA,IAC/C,WAAW,KAAK,cAAc,QAAW;AACxC,cAAQ;AAAA,IACT,OAAO;AACN,cAAQ,UAAU,KAAK,SAAS;AAAA,IACjC;AACA,WAAO,KAAK,WAAW,GAAG,IAAI,cAAc;AAAA,EAC7C;AACD;AAgBO,SAAS,OAAO,GAAgC,GAAuB;AAC7E,QAAM,EAAE,MAAM,OAAO,QAAI,qCAA0C,GAAG,CAAC;AACvE,SAAO,IAAI,mBAAmB,MAAM,MAAM;AAC3C;","names":[]}

View File

@@ -0,0 +1 @@
{"version":3,"file":"database-zap.js","sources":["../../../src/icons/database-zap.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name DatabaseZap\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8ZWxsaXBzZSBjeD0iMTIiIGN5PSI1IiByeD0iOSIgcnk9IjMiIC8+CiAgPHBhdGggZD0iTTMgNVYxOUE5IDMgMCAwIDAgMTUgMjEuODQiIC8+CiAgPHBhdGggZD0iTTIxIDVWOCIgLz4KICA8cGF0aCBkPSJNMjEgMTJMMTggMTdIMjJMMTkgMjIiIC8+CiAgPHBhdGggZD0iTTMgMTJBOSAzIDAgMCAwIDE0LjU5IDE0Ljg3IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/database-zap\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 DatabaseZap = createLucideIcon('DatabaseZap', [\n ['ellipse', { cx: '12', cy: '5', rx: '9', ry: '3', key: 'msslwz' }],\n ['path', { d: 'M3 5V19A9 3 0 0 0 15 21.84', key: '14ibmq' }],\n ['path', { d: 'M21 5V8', key: '1marbg' }],\n ['path', { d: 'M21 12L18 17H22L19 22', key: 'zafso' }],\n ['path', { d: 'M3 12A9 3 0 0 0 14.59 14.87', key: '1y4wr8' }],\n]);\n\nexport default DatabaseZap;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAc,iBAAiB,aAAe,CAAA,CAAA,CAAA;AAAA,CAClD,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,CAAE,CAAA,CAAA,CAAA,EAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAClE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA8B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC3D,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,CAAyB,CAAA,CAAA,CAAA,CAAA,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,CACrD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA+B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC9D,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,12 @@
import React from 'react';
import './index.scss';
export type Props = {
readonly children?: React.ReactNode;
readonly className?: string;
readonly disabled?: boolean;
readonly dropzoneStyle?: 'default' | 'none';
readonly multipleFiles?: boolean;
readonly onChange: (e: FileList) => void;
};
export declare function Dropzone({ children, className, disabled, dropzoneStyle, multipleFiles, onChange, }: Props): React.JSX.Element;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,30 @@
var baseGet = require('./_baseGet');
/**
* The opposite of `_.property`; this method creates a function that returns
* the value at a given path of `object`.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Util
* @param {Object} object The object to query.
* @returns {Function} Returns the new accessor function.
* @example
*
* var array = [0, 1, 2],
* object = { 'a': array, 'b': array, 'c': array };
*
* _.map(['a[2]', 'c[0]'], _.propertyOf(object));
* // => [2, 0]
*
* _.map([['a', '2'], ['c', '0']], _.propertyOf(object));
* // => [2, 0]
*/
function propertyOf(object) {
return function(path) {
return object == null ? undefined : baseGet(object, path);
};
}
module.exports = propertyOf;

View File

@@ -0,0 +1,9 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
export { default } from './user-round-plus.js';
//# sourceMappingURL=user-plus-2.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"typeof.js","sourceRoot":"","sources":["../../src/definitions/typeof.ts"],"names":[],"mappings":";;AACA,sDAA0C;AAE1C,MAAM,KAAK,GAAG,CAAC,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAA;AAE1F,SAAwB,MAAM;IAC5B,OAAO;QACL,OAAO,EAAE,QAAQ;QACjB,UAAU,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC;QAC/B,IAAI,CAAC,GAAe;YAClB,MAAM,EAAC,IAAI,EAAE,MAAM,EAAE,WAAW,EAAC,GAAG,GAAG,CAAA;YACvC,GAAG,CAAC,IAAI,CACN,OAAO,MAAM,IAAI,QAAQ;gBACvB,CAAC,CAAC,IAAA,WAAC,EAAA,UAAU,IAAI,OAAO,MAAM,EAAE;gBAChC,CAAC,CAAC,IAAA,WAAC,EAAA,GAAG,WAAW,mBAAmB,IAAI,OAAO,CAClD,CAAA;QACH,CAAC;QACD,UAAU,EAAE;YACV,KAAK,EAAE;gBACL,EAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAC;gBAC7B,EAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAC,EAAC;aACtD;SACF;KACF,CAAA;AACH,CAAC;AAnBD,yBAmBC;AAED,MAAM,CAAC,OAAO,GAAG,MAAM,CAAA"}

View File

@@ -0,0 +1,43 @@
export type CronJobParams = {
cronTime: string | Date;
onTick: (context: unknown, onComplete?: unknown) => void | Promise<void>;
onComplete?: () => void | Promise<void>;
start?: boolean | null;
context?: unknown;
runOnInit?: boolean | null;
unrefTimeout?: boolean | null;
} & ({
timeZone?: string | null;
utcOffset?: never;
} | {
timeZone?: never;
utcOffset?: number | null;
});
export type CronJob = {};
export type CronJobConstructor = {
from: (param: CronJobParams) => CronJob;
new (cronTime: CronJobParams['cronTime'], onTick: CronJobParams['onTick'], onComplete?: CronJobParams['onComplete'], start?: CronJobParams['start'], timeZone?: CronJobParams['timeZone'], context?: CronJobParams['context'], runOnInit?: CronJobParams['runOnInit'], utcOffset?: null, unrefTimeout?: CronJobParams['unrefTimeout']): CronJob;
new (cronTime: CronJobParams['cronTime'], onTick: CronJobParams['onTick'], onComplete?: CronJobParams['onComplete'], start?: CronJobParams['start'], timeZone?: null, context?: CronJobParams['context'], runOnInit?: CronJobParams['runOnInit'], utcOffset?: CronJobParams['utcOffset'], unrefTimeout?: CronJobParams['unrefTimeout']): CronJob;
};
/**
* Instruments the `cron` library to send a check-in event to Sentry for each job execution.
*
* ```ts
* import * as Sentry from '@sentry/node';
* import { CronJob } from 'cron';
*
* const CronJobWithCheckIn = Sentry.cron.instrumentCron(CronJob, 'my-cron-job');
*
* // use the constructor
* const job = new CronJobWithCheckIn('* * * * *', () => {
* console.log('You will see this message every minute');
* });
*
* // or from
* const job = CronJobWithCheckIn.from({ cronTime: '* * * * *', onTick: () => {
* console.log('You will see this message every minute');
* });
* ```
*/
export declare function instrumentCron<T>(lib: T & CronJobConstructor, monitorSlug: string): T;
//# sourceMappingURL=cron.d.ts.map

View File

@@ -0,0 +1,50 @@
import { Instrumentation } from '@opentelemetry/instrumentation';
import { PrismaInstrumentation } from '@prisma/instrumentation';
interface PrismaOptions {
/**
* @deprecated This is no longer used, v5 works out of the box.
*/
prismaInstrumentation?: Instrumentation;
/**
* Configuration passed through to the {@link PrismaInstrumentation} constructor.
*/
instrumentationConfig?: ConstructorParameters<typeof PrismaInstrumentation>[0];
}
export declare const instrumentPrisma: ((options?: PrismaOptions | undefined) => Instrumentation<import("@opentelemetry/instrumentation").InstrumentationConfig>) & {
id: string;
};
/**
* Adds Sentry tracing instrumentation for the [prisma](https://www.npmjs.com/package/prisma) library.
* For more information, see the [`prismaIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/prisma/).
*
* NOTE: By default, this integration works with Prisma version 6.
* To get performance instrumentation for other Prisma versions,
* 1. Install the `@prisma/instrumentation` package with the desired version.
* 1. Pass a `new PrismaInstrumentation()` instance as exported from `@prisma/instrumentation` to the `prismaInstrumentation` option of this integration:
*
* ```js
* import { PrismaInstrumentation } from '@prisma/instrumentation'
*
* Sentry.init({
* integrations: [
* prismaIntegration({
* // Override the default instrumentation that Sentry uses
* prismaInstrumentation: new PrismaInstrumentation()
* })
* ]
* })
* ```
*
* The passed instrumentation instance will override the default instrumentation instance the integration would use, while the `prismaIntegration` will still ensure data compatibility for the various Prisma versions.
* 1. Depending on your Prisma version (prior to version 6), add `previewFeatures = ["tracing"]` to the client generator block of your Prisma schema:
*
* ```
* generator client {
* provider = "prisma-client-js"
* previewFeatures = ["tracing"]
* }
* ```
*/
export declare const prismaIntegration: (options?: PrismaOptions | undefined) => import("@sentry/core").Integration;
export {};
//# sourceMappingURL=prisma.d.ts.map

View File

@@ -0,0 +1,28 @@
import { createClient } from "@libsql/client/ws";
import { isConfig } from "../../utils.js";
import { construct } from "../driver-core.js";
function drizzle(...params) {
if (typeof params[0] === "string") {
const instance = createClient({
url: params[0]
});
return construct(instance, params[1]);
}
if (isConfig(params[0])) {
const { connection, client, ...drizzleConfig } = params[0];
if (client) return construct(client, drizzleConfig);
const instance = typeof connection === "string" ? createClient({ url: connection }) : createClient(connection);
return construct(instance, drizzleConfig);
}
return construct(params[0], params[1]);
}
((drizzle2) => {
function mock(config) {
return construct({}, config);
}
drizzle2.mock = mock;
})(drizzle || (drizzle = {}));
export {
drizzle
};
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,7 @@
export declare const formatDistanceStrictWithOptions: import("./types.js").FPFn3<
string,
| import("../formatDistanceStrict.js").FormatDistanceStrictOptions
| undefined,
string | number | Date,
string | number | Date
>;

View File

@@ -0,0 +1 @@
{"version":3,"file":"alarm-clock-plus.js","sources":["../../../src/icons/alarm-clock-plus.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name AlarmClockPlus\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEzIiByPSI4IiAvPgogIDxwYXRoIGQ9Ik01IDMgMiA2IiAvPgogIDxwYXRoIGQ9Im0yMiA2LTMtMyIgLz4KICA8cGF0aCBkPSJNNi4zOCAxOC43IDQgMjEiIC8+CiAgPHBhdGggZD0iTTE3LjY0IDE4LjY3IDIwIDIxIiAvPgogIDxwYXRoIGQ9Ik0xMiAxMHY2IiAvPgogIDxwYXRoIGQ9Ik05IDEzaDYiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/alarm-clock-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 AlarmClockPlus = createLucideIcon('AlarmClockPlus', [\n ['circle', { cx: '12', cy: '13', r: '8', key: '3y4lt7' }],\n ['path', { d: 'M5 3 2 6', key: '18tl5t' }],\n ['path', { d: 'm22 6-3-3', key: '1opdir' }],\n ['path', { d: 'M6.38 18.7 4 21', key: '17xu3x' }],\n ['path', { d: 'M17.64 18.67 20 21', key: 'kv2oe2' }],\n ['path', { d: 'M12 10v6', key: '1bos4e' }],\n ['path', { d: 'M9 13h6', key: '1uhe8q' }],\n]);\n\nexport default AlarmClockPlus;\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,CAAiB,iBAAiB,gBAAkB,CAAA,CAAA,CAAA;AAAA,CACxD,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,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,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAmB,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,CAChD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAsB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACnD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC1C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"resolveAllFilterOptions.d.ts","sourceRoot":"","sources":["../../../src/views/List/resolveAllFilterOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAU3E,eAAO,MAAM,uBAAuB,yCAKjC;IACD,MAAM,EAAE,KAAK,EAAE,CAAA;IACf,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,GAAG,EAAE,cAAc,CAAA;IACnB,MAAM,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAA;CAC5C,KAAG,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAgE7C,CAAA"}

View File

@@ -0,0 +1,135 @@
const formatDistanceLocale = {
lessThanXSeconds: {
one: "أقل من ثانية",
two: "أقل من ثانيتين",
threeToTen: "أقل من {{count}} ثواني",
other: "أقل من {{count}} ثانية",
},
xSeconds: {
one: "ثانية",
two: "ثانيتين",
threeToTen: "{{count}} ثواني",
other: "{{count}} ثانية",
},
halfAMinute: "نص دقيقة",
lessThanXMinutes: {
one: "أقل من دقيقة",
two: "أقل من دقيقتين",
threeToTen: "أقل من {{count}} دقايق",
other: "أقل من {{count}} دقيقة",
},
xMinutes: {
one: "دقيقة",
two: "دقيقتين",
threeToTen: "{{count}} دقايق",
other: "{{count}} دقيقة",
},
aboutXHours: {
one: "حوالي ساعة",
two: "حوالي ساعتين",
threeToTen: "حوالي {{count}} ساعات",
other: "حوالي {{count}} ساعة",
},
xHours: {
one: "ساعة",
two: "ساعتين",
threeToTen: "{{count}} ساعات",
other: "{{count}} ساعة",
},
xDays: {
one: "يوم",
two: "يومين",
threeToTen: "{{count}} أيام",
other: "{{count}} يوم",
},
aboutXWeeks: {
one: "حوالي أسبوع",
two: "حوالي أسبوعين",
threeToTen: "حوالي {{count}} أسابيع",
other: "حوالي {{count}} أسبوع",
},
xWeeks: {
one: "أسبوع",
two: "أسبوعين",
threeToTen: "{{count}} أسابيع",
other: "{{count}} أسبوع",
},
aboutXMonths: {
one: "حوالي شهر",
two: "حوالي شهرين",
threeToTen: "حوالي {{count}} أشهر",
other: "حوالي {{count}} شهر",
},
xMonths: {
one: "شهر",
two: "شهرين",
threeToTen: "{{count}} أشهر",
other: "{{count}} شهر",
},
aboutXYears: {
one: "حوالي سنة",
two: "حوالي سنتين",
threeToTen: "حوالي {{count}} سنين",
other: "حوالي {{count}} سنة",
},
xYears: {
one: "عام",
two: "عامين",
threeToTen: "{{count}} أعوام",
other: "{{count}} عام",
},
overXYears: {
one: "أكثر من سنة",
two: "أكثر من سنتين",
threeToTen: "أكثر من {{count}} سنين",
other: "أكثر من {{count}} سنة",
},
almostXYears: {
one: "عام تقريبًا",
two: "عامين تقريبًا",
threeToTen: "{{count}} أعوام تقريبًا",
other: "{{count}} عام تقريبًا",
},
};
export const formatDistance = (token, count, options) => {
let result;
const tokenValue = formatDistanceLocale[token];
if (typeof tokenValue === "string") {
result = tokenValue;
} else if (count === 1) {
result = tokenValue.one;
} else if (count === 2) {
result = tokenValue.two;
} else if (count <= 10) {
result = tokenValue.threeToTen.replace("{{count}}", String(count));
} else {
result = tokenValue.other.replace("{{count}}", String(count));
}
if (options?.addSuffix) {
if (options.comparison && options.comparison > 0) {
return `في خلال ${result}`;
} else {
return `منذ ${result}`;
}
}
return result;
};

View File

@@ -0,0 +1,39 @@
import { iife } from "./tracing-utils.js";
import { npmVersion } from "./version.js";
let otel;
let rawTracer;
const tracer = {
startActiveSpan(name, fn) {
if (!otel) {
return fn();
}
if (!rawTracer) {
rawTracer = otel.trace.getTracer("drizzle-orm", npmVersion);
}
return iife(
(otel2, rawTracer2) => rawTracer2.startActiveSpan(
name,
(span) => {
try {
return fn(span);
} catch (e) {
span.setStatus({
code: otel2.SpanStatusCode.ERROR,
message: e instanceof Error ? e.message : "Unknown error"
// eslint-disable-line no-instanceof/no-instanceof
});
throw e;
} finally {
span.end();
}
}
),
otel,
rawTracer
);
}
};
export {
tracer
};
//# sourceMappingURL=tracing.js.map

View File

@@ -0,0 +1,527 @@
import { getAsyncContextStrategy } from '../asyncContext/index.js';
import { getMainCarrier } from '../carrier.js';
import { getClient, withScope, getCurrentScope, getIsolationScope } from '../currentScopes.js';
import { DEBUG_BUILD } from '../debug-build.js';
import { SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE } from '../semanticAttributes.js';
import { baggageHeaderToDynamicSamplingContext } from '../utils/baggage.js';
import { debug } from '../utils/debug-logger.js';
import { handleCallbackErrors } from '../utils/handleCallbackErrors.js';
import { hasSpansEnabled } from '../utils/hasSpansEnabled.js';
import { parseSampleRate } from '../utils/parseSampleRate.js';
import { generateTraceId } from '../utils/propagationContext.js';
import { safeMathRandom } from '../utils/randomSafeContext.js';
import { _getSpanForScope, _setSpanForScope } from '../utils/spanOnScope.js';
import { spanTimeInputToSeconds, getRootSpan, addChildSpanToSpan, spanIsSampled, spanToJSON } from '../utils/spanUtils.js';
import { shouldContinueTrace, propagationContextFromHeaders } from '../utils/tracing.js';
import { getDynamicSamplingContextFromSpan, freezeDscOnSpan } from './dynamicSamplingContext.js';
import { logSpanStart } from './logSpans.js';
import { sampleSpan } from './sampling.js';
import { SentryNonRecordingSpan } from './sentryNonRecordingSpan.js';
import { SentrySpan } from './sentrySpan.js';
import { SPAN_STATUS_ERROR } from './spanstatus.js';
import { setCapturedScopesOnSpan } from './utils.js';
/* eslint-disable max-lines */
const SUPPRESS_TRACING_KEY = '__SENTRY_SUPPRESS_TRACING__';
/**
* Wraps a function with a transaction/span and finishes the span after the function is done.
* The created span is the active span and will be used as parent by other spans created inside the function
* and can be accessed via `Sentry.getActiveSpan()`, as long as the function is executed while the scope is active.
*
* If you want to create a span that is not set as active, use {@link startInactiveSpan}.
*
* You'll always get a span passed to the callback,
* it may just be a non-recording span if the span is not sampled or if tracing is disabled.
*/
function startSpan(options, callback) {
const acs = getAcs();
if (acs.startSpan) {
return acs.startSpan(options, callback);
}
const spanArguments = parseSentrySpanArguments(options);
const { forceTransaction, parentSpan: customParentSpan, scope: customScope } = options;
// We still need to fork a potentially passed scope, as we set the active span on it
// and we need to ensure that it is cleaned up properly once the span ends.
const customForkedScope = customScope?.clone();
return withScope(customForkedScope, () => {
// If `options.parentSpan` is defined, we want to wrap the callback in `withActiveSpan`
const wrapper = getActiveSpanWrapper(customParentSpan);
return wrapper(() => {
const scope = getCurrentScope();
const parentSpan = getParentSpan(scope, customParentSpan);
const shouldSkipSpan = options.onlyIfParent && !parentSpan;
const activeSpan = shouldSkipSpan
? new SentryNonRecordingSpan()
: createChildOrRootSpan({
parentSpan,
spanArguments,
forceTransaction,
scope,
});
_setSpanForScope(scope, activeSpan);
return handleCallbackErrors(
() => callback(activeSpan),
() => {
// Only update the span status if it hasn't been changed yet, and the span is not yet finished
const { status } = spanToJSON(activeSpan);
if (activeSpan.isRecording() && (!status || status === 'ok')) {
activeSpan.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });
}
},
() => {
activeSpan.end();
},
);
});
});
}
/**
* Similar to `Sentry.startSpan`. Wraps a function with a transaction/span, but does not finish the span
* after the function is done automatically. Use `span.end()` to end the span.
*
* The created span is the active span and will be used as parent by other spans created inside the function
* and can be accessed via `Sentry.getActiveSpan()`, as long as the function is executed while the scope is active.
*
* You'll always get a span passed to the callback,
* it may just be a non-recording span if the span is not sampled or if tracing is disabled.
*/
function startSpanManual(options, callback) {
const acs = getAcs();
if (acs.startSpanManual) {
return acs.startSpanManual(options, callback);
}
const spanArguments = parseSentrySpanArguments(options);
const { forceTransaction, parentSpan: customParentSpan, scope: customScope } = options;
const customForkedScope = customScope?.clone();
return withScope(customForkedScope, () => {
// If `options.parentSpan` is defined, we want to wrap the callback in `withActiveSpan`
const wrapper = getActiveSpanWrapper(customParentSpan);
return wrapper(() => {
const scope = getCurrentScope();
const parentSpan = getParentSpan(scope, customParentSpan);
const shouldSkipSpan = options.onlyIfParent && !parentSpan;
const activeSpan = shouldSkipSpan
? new SentryNonRecordingSpan()
: createChildOrRootSpan({
parentSpan,
spanArguments,
forceTransaction,
scope,
});
_setSpanForScope(scope, activeSpan);
return handleCallbackErrors(
// We pass the `finish` function to the callback, so the user can finish the span manually
// this is mainly here for historic purposes because previously, we instructed users to call
// `finish` instead of `span.end()` to also clean up the scope. Nowadays, calling `span.end()`
// or `finish` has the same effect and we simply leave it here to avoid breaking user code.
() => callback(activeSpan, () => activeSpan.end()),
() => {
// Only update the span status if it hasn't been changed yet, and the span is not yet finished
const { status } = spanToJSON(activeSpan);
if (activeSpan.isRecording() && (!status || status === 'ok')) {
activeSpan.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });
}
},
);
});
});
}
/**
* Creates a span. This span is not set as active, so will not get automatic instrumentation spans
* as children or be able to be accessed via `Sentry.getActiveSpan()`.
*
* If you want to create a span that is set as active, use {@link startSpan}.
*
* This function will always return a span,
* it may just be a non-recording span if the span is not sampled or if tracing is disabled.
*/
function startInactiveSpan(options) {
const acs = getAcs();
if (acs.startInactiveSpan) {
return acs.startInactiveSpan(options);
}
const spanArguments = parseSentrySpanArguments(options);
const { forceTransaction, parentSpan: customParentSpan } = options;
// If `options.scope` is defined, we use this as as a wrapper,
// If `options.parentSpan` is defined, we want to wrap the callback in `withActiveSpan`
const wrapper = options.scope
? (callback) => withScope(options.scope, callback)
: customParentSpan !== undefined
? (callback) => withActiveSpan(customParentSpan, callback)
: (callback) => callback();
return wrapper(() => {
const scope = getCurrentScope();
const parentSpan = getParentSpan(scope, customParentSpan);
const shouldSkipSpan = options.onlyIfParent && !parentSpan;
if (shouldSkipSpan) {
return new SentryNonRecordingSpan();
}
return createChildOrRootSpan({
parentSpan,
spanArguments,
forceTransaction,
scope,
});
});
}
/**
* Continue a trace from `sentry-trace` and `baggage` values.
* These values can be obtained from incoming request headers, or in the browser from `<meta name="sentry-trace">`
* and `<meta name="baggage">` HTML tags.
*
* Spans started with `startSpan`, `startSpanManual` and `startInactiveSpan`, within the callback will automatically
* be attached to the incoming trace.
*/
const continueTrace = (
options
,
callback,
) => {
const carrier = getMainCarrier();
const acs = getAsyncContextStrategy(carrier);
if (acs.continueTrace) {
return acs.continueTrace(options, callback);
}
const { sentryTrace, baggage } = options;
const client = getClient();
const incomingDsc = baggageHeaderToDynamicSamplingContext(baggage);
if (client && !shouldContinueTrace(client, incomingDsc?.org_id)) {
return startNewTrace(callback);
}
return withScope(scope => {
const propagationContext = propagationContextFromHeaders(sentryTrace, baggage);
scope.setPropagationContext(propagationContext);
_setSpanForScope(scope, undefined);
return callback();
});
};
/**
* Forks the current scope and sets the provided span as active span in the context of the provided callback. Can be
* passed `null` to start an entirely new span tree.
*
* @param span Spans started in the context of the provided callback will be children of this span. If `null` is passed,
* spans started within the callback will not be attached to a parent span.
* @param callback Execution context in which the provided span will be active. Is passed the newly forked scope.
* @returns the value returned from the provided callback function.
*/
function withActiveSpan(span, callback) {
const acs = getAcs();
if (acs.withActiveSpan) {
return acs.withActiveSpan(span, callback);
}
return withScope(scope => {
_setSpanForScope(scope, span || undefined);
return callback(scope);
});
}
/** Suppress tracing in the given callback, ensuring no spans are generated inside of it. */
function suppressTracing(callback) {
const acs = getAcs();
if (acs.suppressTracing) {
return acs.suppressTracing(callback);
}
return withScope(scope => {
// Note: We do not wait for the callback to finish before we reset the metadata
// the reason for this is that otherwise, in the browser this can lead to very weird behavior
// as there is only a single top scope, if the callback takes longer to finish,
// other, unrelated spans may also be suppressed, which we do not want
// so instead, we only suppress tracing synchronoysly in the browser
scope.setSDKProcessingMetadata({ [SUPPRESS_TRACING_KEY]: true });
const res = callback();
scope.setSDKProcessingMetadata({ [SUPPRESS_TRACING_KEY]: undefined });
return res;
});
}
/**
* Starts a new trace for the duration of the provided callback. Spans started within the
* callback will be part of the new trace instead of a potentially previously started trace.
*
* Important: Only use this function if you want to override the default trace lifetime and
* propagation mechanism of the SDK for the duration and scope of the provided callback.
* The newly created trace will also be the root of a new distributed trace, for example if
* you make http requests within the callback.
* This function might be useful if the operation you want to instrument should not be part
* of a potentially ongoing trace.
*
* Default behavior:
* - Server-side: A new trace is started for each incoming request.
* - Browser: A new trace is started for each page our route. Navigating to a new route
* or page will automatically create a new trace.
*/
function startNewTrace(callback) {
return withScope(scope => {
scope.setPropagationContext({
traceId: generateTraceId(),
sampleRand: safeMathRandom(),
});
DEBUG_BUILD && debug.log(`Starting a new trace with id ${scope.getPropagationContext().traceId}`);
return withActiveSpan(null, callback);
});
}
function createChildOrRootSpan({
parentSpan,
spanArguments,
forceTransaction,
scope,
}
) {
if (!hasSpansEnabled()) {
const span = new SentryNonRecordingSpan();
// If this is a root span, we ensure to freeze a DSC
// So we can have at least partial data here
if (forceTransaction || !parentSpan) {
const dsc = {
sampled: 'false',
sample_rate: '0',
transaction: spanArguments.name,
...getDynamicSamplingContextFromSpan(span),
} ;
freezeDscOnSpan(span, dsc);
}
return span;
}
const isolationScope = getIsolationScope();
let span;
if (parentSpan && !forceTransaction) {
span = _startChildSpan(parentSpan, scope, spanArguments);
addChildSpanToSpan(parentSpan, span);
} else if (parentSpan) {
// If we forced a transaction but have a parent span, make sure to continue from the parent span, not the scope
const dsc = getDynamicSamplingContextFromSpan(parentSpan);
const { traceId, spanId: parentSpanId } = parentSpan.spanContext();
const parentSampled = spanIsSampled(parentSpan);
span = _startRootSpan(
{
traceId,
parentSpanId,
...spanArguments,
},
scope,
parentSampled,
);
freezeDscOnSpan(span, dsc);
} else {
const {
traceId,
dsc,
parentSpanId,
sampled: parentSampled,
} = {
...isolationScope.getPropagationContext(),
...scope.getPropagationContext(),
};
span = _startRootSpan(
{
traceId,
parentSpanId,
...spanArguments,
},
scope,
parentSampled,
);
if (dsc) {
freezeDscOnSpan(span, dsc);
}
}
logSpanStart(span);
setCapturedScopesOnSpan(span, scope, isolationScope);
return span;
}
/**
* This converts StartSpanOptions to SentrySpanArguments.
* For the most part (for now) we accept the same options,
* but some of them need to be transformed.
*/
function parseSentrySpanArguments(options) {
const exp = options.experimental || {};
const initialCtx = {
isStandalone: exp.standalone,
...options,
};
if (options.startTime) {
const ctx = { ...initialCtx };
ctx.startTimestamp = spanTimeInputToSeconds(options.startTime);
delete ctx.startTime;
return ctx;
}
return initialCtx;
}
function getAcs() {
const carrier = getMainCarrier();
return getAsyncContextStrategy(carrier);
}
function _startRootSpan(spanArguments, scope, parentSampled) {
const client = getClient();
const options = client?.getOptions() || {};
const { name = '' } = spanArguments;
const mutableSpanSamplingData = { spanAttributes: { ...spanArguments.attributes }, spanName: name, parentSampled };
// we don't care about the decision for the moment; this is just a placeholder
client?.emit('beforeSampling', mutableSpanSamplingData, { decision: false });
// If hook consumers override the parentSampled flag, we will use that value instead of the actual one
const finalParentSampled = mutableSpanSamplingData.parentSampled ?? parentSampled;
const finalAttributes = mutableSpanSamplingData.spanAttributes;
const currentPropagationContext = scope.getPropagationContext();
const [sampled, sampleRate, localSampleRateWasApplied] = scope.getScopeData().sdkProcessingMetadata[
SUPPRESS_TRACING_KEY
]
? [false]
: sampleSpan(
options,
{
name,
parentSampled: finalParentSampled,
attributes: finalAttributes,
parentSampleRate: parseSampleRate(currentPropagationContext.dsc?.sample_rate),
},
currentPropagationContext.sampleRand,
);
const rootSpan = new SentrySpan({
...spanArguments,
attributes: {
[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'custom',
[SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE]:
sampleRate !== undefined && localSampleRateWasApplied ? sampleRate : undefined,
...finalAttributes,
},
sampled,
});
if (!sampled && client) {
DEBUG_BUILD && debug.log('[Tracing] Discarding root span because its trace was not chosen to be sampled.');
client.recordDroppedEvent('sample_rate', 'transaction');
}
if (client) {
client.emit('spanStart', rootSpan);
}
return rootSpan;
}
/**
* Creates a new `Span` while setting the current `Span.id` as `parentSpanId`.
* This inherits the sampling decision from the parent span.
*/
function _startChildSpan(parentSpan, scope, spanArguments) {
const { spanId, traceId } = parentSpan.spanContext();
const sampled = scope.getScopeData().sdkProcessingMetadata[SUPPRESS_TRACING_KEY] ? false : spanIsSampled(parentSpan);
const childSpan = sampled
? new SentrySpan({
...spanArguments,
parentSpanId: spanId,
traceId,
sampled,
})
: new SentryNonRecordingSpan({ traceId });
addChildSpanToSpan(parentSpan, childSpan);
const client = getClient();
if (client) {
client.emit('spanStart', childSpan);
// If it has an endTimestamp, it's already ended
if (spanArguments.endTimestamp) {
client.emit('spanEnd', childSpan);
}
}
return childSpan;
}
function getParentSpan(scope, customParentSpan) {
// always use the passed in span directly
if (customParentSpan) {
return customParentSpan ;
}
// This is different from `undefined` as it means the user explicitly wants no parent span
if (customParentSpan === null) {
return undefined;
}
const span = _getSpanForScope(scope) ;
if (!span) {
return undefined;
}
const client = getClient();
const options = client ? client.getOptions() : {};
if (options.parentSpanIsAlwaysRootSpan) {
return getRootSpan(span) ;
}
return span;
}
function getActiveSpanWrapper(parentSpan) {
return parentSpan !== undefined
? (callback) => {
return withActiveSpan(parentSpan, callback);
}
: (callback) => callback();
}
export { continueTrace, startInactiveSpan, startNewTrace, startSpan, startSpanManual, suppressTracing, withActiveSpan };
//# sourceMappingURL=trace.js.map

View File

@@ -0,0 +1,49 @@
(function (Prism) {
function createBlock(prefix, inside, contentAlias) {
return {
pattern: RegExp('<#' + prefix + '[\\s\\S]*?#>'),
alias: 'block',
inside: {
'delimiter': {
pattern: RegExp('^<#' + prefix + '|#>$'),
alias: 'important'
},
'content': {
pattern: /[\s\S]+/,
inside: inside,
alias: contentAlias
}
}
};
}
function createT4(insideLang) {
var grammar = Prism.languages[insideLang];
var className = 'language-' + insideLang;
return {
'block': {
pattern: /<#[\s\S]+?#>/,
inside: {
'directive': createBlock('@', {
'attr-value': {
pattern: /=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+)/,
inside: {
'punctuation': /^=|^["']|["']$/
}
},
'keyword': /\b\w+(?=\s)/,
'attr-name': /\b\w+/
}),
'expression': createBlock('=', grammar, className),
'class-feature': createBlock('\\+', grammar, className),
'standard': createBlock('', grammar, className)
}
}
};
}
Prism.languages['t4-templating'] = Object.defineProperty({}, 'createT4', { value: createT4 });
}(Prism));

View File

@@ -0,0 +1,153 @@
import { entityKind } from "../../entity.js";
import { QueryPromise } from "../../query-promise.js";
import {
mapRelationalRow
} from "../../relations.js";
class RelationalQueryBuilder {
constructor(mode, fullSchema, schema, tableNamesMap, table, tableConfig, dialect, session) {
this.mode = mode;
this.fullSchema = fullSchema;
this.schema = schema;
this.tableNamesMap = tableNamesMap;
this.table = table;
this.tableConfig = tableConfig;
this.dialect = dialect;
this.session = session;
}
static [entityKind] = "SQLiteAsyncRelationalQueryBuilder";
findMany(config) {
return this.mode === "sync" ? new SQLiteSyncRelationalQuery(
this.fullSchema,
this.schema,
this.tableNamesMap,
this.table,
this.tableConfig,
this.dialect,
this.session,
config ? config : {},
"many"
) : new SQLiteRelationalQuery(
this.fullSchema,
this.schema,
this.tableNamesMap,
this.table,
this.tableConfig,
this.dialect,
this.session,
config ? config : {},
"many"
);
}
findFirst(config) {
return this.mode === "sync" ? new SQLiteSyncRelationalQuery(
this.fullSchema,
this.schema,
this.tableNamesMap,
this.table,
this.tableConfig,
this.dialect,
this.session,
config ? { ...config, limit: 1 } : { limit: 1 },
"first"
) : new SQLiteRelationalQuery(
this.fullSchema,
this.schema,
this.tableNamesMap,
this.table,
this.tableConfig,
this.dialect,
this.session,
config ? { ...config, limit: 1 } : { limit: 1 },
"first"
);
}
}
class SQLiteRelationalQuery extends QueryPromise {
constructor(fullSchema, schema, tableNamesMap, table, tableConfig, dialect, session, config, mode) {
super();
this.fullSchema = fullSchema;
this.schema = schema;
this.tableNamesMap = tableNamesMap;
this.table = table;
this.tableConfig = tableConfig;
this.dialect = dialect;
this.session = session;
this.config = config;
this.mode = mode;
}
static [entityKind] = "SQLiteAsyncRelationalQuery";
/** @internal */
mode;
/** @internal */
getSQL() {
return this.dialect.buildRelationalQuery({
fullSchema: this.fullSchema,
schema: this.schema,
tableNamesMap: this.tableNamesMap,
table: this.table,
tableConfig: this.tableConfig,
queryConfig: this.config,
tableAlias: this.tableConfig.tsName
}).sql;
}
/** @internal */
_prepare(isOneTimeQuery = false) {
const { query, builtQuery } = this._toSQL();
return this.session[isOneTimeQuery ? "prepareOneTimeQuery" : "prepareQuery"](
builtQuery,
void 0,
this.mode === "first" ? "get" : "all",
true,
(rawRows, mapColumnValue) => {
const rows = rawRows.map(
(row) => mapRelationalRow(this.schema, this.tableConfig, row, query.selection, mapColumnValue)
);
if (this.mode === "first") {
return rows[0];
}
return rows;
}
);
}
prepare() {
return this._prepare(false);
}
_toSQL() {
const query = this.dialect.buildRelationalQuery({
fullSchema: this.fullSchema,
schema: this.schema,
tableNamesMap: this.tableNamesMap,
table: this.table,
tableConfig: this.tableConfig,
queryConfig: this.config,
tableAlias: this.tableConfig.tsName
});
const builtQuery = this.dialect.sqlToQuery(query.sql);
return { query, builtQuery };
}
toSQL() {
return this._toSQL().builtQuery;
}
/** @internal */
executeRaw() {
if (this.mode === "first") {
return this._prepare(false).get();
}
return this._prepare(false).all();
}
async execute() {
return this.executeRaw();
}
}
class SQLiteSyncRelationalQuery extends SQLiteRelationalQuery {
static [entityKind] = "SQLiteSyncRelationalQuery";
sync() {
return this.executeRaw();
}
}
export {
RelationalQueryBuilder,
SQLiteRelationalQuery,
SQLiteSyncRelationalQuery
};
//# sourceMappingURL=query.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"useControllableState.d.ts","sourceRoot":"","sources":["../../src/hooks/useControllableState.ts"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,CAAC,EACvC,SAAS,EAAE,CAAC,EACZ,aAAa,EAAE,CAAC,GACf,CAAC,CAAC,SAAS,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC,CAAA;AAE7F,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC,CAAA"}

View File

@@ -0,0 +1,144 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Alexander Akait @alexander-akait
*/
"use strict";
const Hash = require("../Hash");
const { digest, update } = require("./hash-digest");
/** @typedef {import("../../../declarations/WebpackOptions").HashDigest} Encoding */
/** @typedef {() => Hash} HashFactory */
const BULK_SIZE = 3;
// We are using an object instead of a Map as this will stay static during the runtime
// so access to it can be optimized by v8
/** @type {{ [key: string]: Map<string, string> }} */
const digestCaches = {};
class BulkUpdateHash extends Hash {
/**
* @param {Hash | HashFactory} hashOrFactory function to create a hash
* @param {string=} hashKey key for caching
*/
constructor(hashOrFactory, hashKey) {
super();
/** @type {undefined | string} */
this.hashKey = hashKey;
if (typeof hashOrFactory === "function") {
/** @type {undefined | HashFactory} */
this.hashFactory = hashOrFactory;
/** @type {undefined | Hash} */
this.hash = undefined;
} else {
/** @type {undefined | HashFactory} */
this.hashFactory = undefined;
/** @type {undefined | Hash} */
this.hash = hashOrFactory;
}
this.buffer = "";
}
/**
* Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding}
* @overload
* @param {string | Buffer} data data
* @returns {Hash} updated hash
*/
/**
* Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding}
* @overload
* @param {string} data data
* @param {Encoding} inputEncoding data encoding
* @returns {Hash} updated hash
*/
/**
* Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding}
* @param {string | Buffer} data data
* @param {Encoding=} inputEncoding data encoding
* @returns {Hash} updated hash
*/
update(data, inputEncoding) {
if (
inputEncoding !== undefined ||
typeof data !== "string" ||
data.length > BULK_SIZE
) {
if (this.hash === undefined) {
this.hash = /** @type {HashFactory} */ (this.hashFactory)();
}
if (this.buffer.length > 0) {
update(this.hash, this.buffer);
this.buffer = "";
}
if (typeof data === "string" && inputEncoding) {
update(this.hash, data, inputEncoding);
} else {
update(this.hash, data);
}
} else {
this.buffer += data;
if (this.buffer.length > BULK_SIZE) {
if (this.hash === undefined) {
this.hash = /** @type {HashFactory} */ (this.hashFactory)();
}
update(this.hash, this.buffer);
this.buffer = "";
}
}
return this;
}
/**
* Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding}
* @overload
* @returns {Buffer} digest
*/
/**
* Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding}
* @overload
* @param {Encoding} encoding encoding of the return value
* @returns {string} digest
*/
/**
* Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding}
* @param {Encoding=} encoding encoding of the return value
* @returns {string | Buffer} digest
*/
digest(encoding) {
/** @type {undefined | Map<string, string | Buffer>} */
let digestCache;
const buffer = this.buffer;
if (this.hash === undefined) {
// short data for hash, we can use caching
const cacheKey = `${this.hashKey}-${encoding}`;
digestCache = digestCaches[cacheKey];
if (digestCache === undefined) {
digestCache = digestCaches[cacheKey] = new Map();
}
const cacheEntry = digestCache.get(buffer);
if (cacheEntry !== undefined) return cacheEntry;
this.hash = /** @type {HashFactory} */ (this.hashFactory)();
}
if (buffer.length > 0) {
update(this.hash, buffer);
}
if (!encoding) {
const result = digest(this.hash, undefined, Boolean(this.hashKey));
if (digestCache !== undefined) {
digestCache.set(buffer, result);
}
return result;
}
const result = digest(this.hash, encoding, Boolean(this.hashKey));
if (digestCache !== undefined) {
digestCache.set(buffer, result);
}
return result;
}
}
module.exports = BulkUpdateHash;

View File

@@ -0,0 +1 @@
!function(e){e.languages.velocity=e.languages.extend("markup",{});var n={variable:{pattern:/(^|[^\\](?:\\\\)*)\$!?(?:[a-z][\w-]*(?:\([^)]*\))?(?:\.[a-z][\w-]*(?:\([^)]*\))?|\[[^\]]+\])*|\{[^}]+\})/i,lookbehind:!0,inside:{}},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},number:/\b\d+\b/,boolean:/\b(?:false|true)\b/,operator:/[=!<>]=?|[+*/%-]|&&|\|\||\.\.|\b(?:eq|g[et]|l[et]|n(?:e|ot))\b/,punctuation:/[(){}[\]:,.]/};n.variable.inside={string:n.string,function:{pattern:/([^\w-])[a-z][\w-]*(?=\()/,lookbehind:!0},number:n.number,boolean:n.boolean,punctuation:n.punctuation},e.languages.insertBefore("velocity","comment",{unparsed:{pattern:/(^|[^\\])#\[\[[\s\S]*?\]\]#/,lookbehind:!0,greedy:!0,inside:{punctuation:/^#\[\[|\]\]#$/}},"velocity-comment":[{pattern:/(^|[^\\])#\*[\s\S]*?\*#/,lookbehind:!0,greedy:!0,alias:"comment"},{pattern:/(^|[^\\])##.*/,lookbehind:!0,greedy:!0,alias:"comment"}],directive:{pattern:/(^|[^\\](?:\\\\)*)#@?(?:[a-z][\w-]*|\{[a-z][\w-]*\})(?:\s*\((?:[^()]|\([^()]*\))*\))?/i,lookbehind:!0,inside:{keyword:{pattern:/^#@?(?:[a-z][\w-]*|\{[a-z][\w-]*\})|\bin\b/,inside:{punctuation:/[{}]/}},rest:n}},variable:n.variable}),e.languages.velocity.tag.inside["attr-value"].inside.rest=e.languages.velocity}(Prism);

View File

@@ -0,0 +1,3 @@
export { TediousInstrumentation } from './instrumentation';
export type { TediousInstrumentationConfig } from './types';
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,142 @@
import type { $ZodStringFormats } from "../core/checks.js";
import type * as errors from "../core/errors.js";
import * as util from "../core/util.js";
const error: () => errors.$ZodErrorMap = () => {
const Sizable: Record<string, { unit: string; verb: string }> = {
string: { unit: "znaků", verb: "mít" },
file: { unit: "bajtů", verb: "mít" },
array: { unit: "prvků", verb: "mít" },
set: { unit: "prvků", verb: "mít" },
};
function getSizing(origin: string): { unit: string; verb: string } | null {
return Sizable[origin] ?? null;
}
const parsedType = (data: any): string => {
const t = typeof data;
switch (t) {
case "number": {
return Number.isNaN(data) ? "NaN" : "číslo";
}
case "string": {
return "řetězec";
}
case "boolean": {
return "boolean";
}
case "bigint": {
return "bigint";
}
case "function": {
return "funkce";
}
case "symbol": {
return "symbol";
}
case "undefined": {
return "undefined";
}
case "object": {
if (Array.isArray(data)) {
return "pole";
}
if (data === null) {
return "null";
}
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
return data.constructor.name;
}
}
}
return t;
};
const Nouns: {
[k in $ZodStringFormats | (string & {})]?: string;
} = {
regex: "regulární výraz",
email: "e-mailová adresa",
url: "URL",
emoji: "emoji",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "datum a čas ve formátu ISO",
date: "datum ve formátu ISO",
time: "čas ve formátu ISO",
duration: "doba trvání ISO",
ipv4: "IPv4 adresa",
ipv6: "IPv6 adresa",
cidrv4: "rozsah IPv4",
cidrv6: "rozsah IPv6",
base64: "řetězec zakódovaný ve formátu base64",
base64url: "řetězec zakódovaný ve formátu base64url",
json_string: "řetězec ve formátu JSON",
e164: "číslo E.164",
jwt: "JWT",
template_literal: "vstup",
};
return (issue) => {
switch (issue.code) {
case "invalid_type":
return `Neplatný vstup: očekáváno ${issue.expected}, obdrženo ${parsedType(issue.input)}`;
case "invalid_value":
if (issue.values.length === 1) return `Neplatný vstup: očekáváno ${util.stringifyPrimitive(issue.values[0])}`;
return `Neplatná možnost: očekávána jedna z hodnot ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing) {
return `Hodnota je příliš velká: ${issue.origin ?? "hodnota"} musí mít ${adj}${issue.maximum.toString()} ${sizing.unit ?? "prvků"}`;
}
return `Hodnota je příliš velká: ${issue.origin ?? "hodnota"} musí být ${adj}${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
return `Hodnota je příliš malá: ${issue.origin ?? "hodnota"} musí mít ${adj}${issue.minimum.toString()} ${sizing.unit ?? "prvků"}`;
}
return `Hodnota je příliš malá: ${issue.origin ?? "hodnota"} musí být ${adj}${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue as errors.$ZodStringFormatIssues;
if (_issue.format === "starts_with") return `Neplatný řetězec: musí začínat na "${_issue.prefix}"`;
if (_issue.format === "ends_with") return `Neplatný řetězec: musí končit na "${_issue.suffix}"`;
if (_issue.format === "includes") return `Neplatný řetězec: musí obsahovat "${_issue.includes}"`;
if (_issue.format === "regex") return `Neplatný řetězec: musí odpovídat vzoru ${_issue.pattern}`;
return `Neplatný formát ${Nouns[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `Neplatné číslo: musí být násobkem ${issue.divisor}`;
case "unrecognized_keys":
return `Neznámé klíče: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `Neplatný klíč v ${issue.origin}`;
case "invalid_union":
return "Neplatný vstup";
case "invalid_element":
return `Neplatná hodnota v ${issue.origin}`;
default:
return `Neplatný vstup`;
}
};
};
export default function (): { localeError: errors.$ZodErrorMap } {
return {
localeError: error(),
};
}

View File

@@ -0,0 +1 @@
export default function scrollTo(selected: HTMLElement, scrollParent?: HTMLElement): (() => void) | undefined;

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"spanstatus.d.ts","sourceRoot":"","sources":["../../../src/tracing/spanstatus.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAE5D,eAAO,MAAM,iBAAiB,IAAI,CAAC;AACnC,eAAO,MAAM,cAAc,IAAI,CAAC;AAChC,eAAO,MAAM,iBAAiB,IAAI,CAAC;AAEnC;;;;;GAKG;AAEH,wBAAgB,yBAAyB,CAAC,UAAU,EAAE,MAAM,GAAG,UAAU,CAwCxE;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI,CAOlE"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"dsn.d.ts","sourceRoot":"","sources":["../../../src/types-hoist/dsn.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,OAAO,CAAC;AAE3C,qCAAqC;AACrC,MAAM,WAAW,aAAa;IAC5B,0CAA0C;IAC1C,QAAQ,EAAE,WAAW,CAAC;IACtB,gCAAgC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wDAAwD;IACxD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uCAAuC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,mCAAmC;IACnC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gBAAgB;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iBAAiB;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,8CAA8C;AAC9C,MAAM,MAAM,OAAO,GAAG,MAAM,GAAG,aAAa,CAAC"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"chart-spline.js","sources":["../../../src/icons/chart-spline.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ChartSpline\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMyAzdjE2YTIgMiAwIDAgMCAyIDJoMTYiIC8+CiAgPHBhdGggZD0iTTcgMTZjLjUtMiAxLjUtNyA0LTcgMiAwIDIgMyA0IDMgMi41IDAgNC41LTUgNS03IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/chart-spline\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 ChartSpline = createLucideIcon('ChartSpline', [\n ['path', { d: 'M3 3v16a2 2 0 0 0 2 2h16', key: 'c24i48' }],\n ['path', { d: 'M7 16c.5-2 1.5-7 4-7 2 0 2 3 4 3 2.5 0 4.5-5 5-7', key: 'lw07rv' }],\n]);\n\nexport default ChartSpline;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAc,iBAAiB,aAAe,CAAA,CAAA,CAAA;AAAA,CAAA,CAClD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA4B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAoD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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;AACnF,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../../../src/views/CollectionFolders/metadata.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAA;AACpC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAA;AAIxD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAA;AAI5D,eAAO,MAAM,gCAAgC,SACrC;IACJ,gBAAgB,EAAE,yBAAyB,CAAA;CAC5C,GAAG,UAAU,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,KACtC,OAAO,CAAC,QAAQ,CAqBlB,CAAA"}

View File

@@ -0,0 +1,7 @@
'use strict';
if (process.env.NODE_ENV === "production") {
module.exports = require("./react-select.cjs.prod.js");
} else {
module.exports = require("./react-select.cjs.dev.js");
}

View File

@@ -0,0 +1,120 @@
'use client';
import { jsx as _jsx } from "react/jsx-runtime";
import React, { useCallback, useMemo } from 'react';
import { useField } from '../../forms/useField/index.js';
import { withCondition } from '../../forms/withCondition/index.js';
import { mergeFieldStyles } from '../mergeFieldStyles.js';
import { SelectInput } from './Input.js';
export const formatOptions = options => options.map(option => {
if (typeof option === 'object' && (option.value || option.value === '')) {
return option;
}
return {
label: option,
value: option
};
});
const SelectFieldComponent = props => {
const {
field,
field: {
name,
admin: {
className,
description,
isClearable = true,
isSortable = true,
placeholder
} = {},
hasMany = false,
label,
localized,
options: optionsFromProps = [],
required
},
onChange: onChangeFromProps,
path: pathFromProps,
readOnly,
validate
} = props;
const options = React.useMemo(() => formatOptions(optionsFromProps), [optionsFromProps]);
const memoizedValidate = useCallback((value, validationOptions) => {
if (typeof validate === 'function') {
return validate(value, {
...validationOptions,
hasMany,
options,
required
});
}
}, [validate, required, hasMany, options]);
const {
customComponents: {
AfterInput,
BeforeInput,
Description,
Error,
Label
} = {},
disabled,
path,
selectFilterOptions,
setValue,
showError,
value: value_0
} = useField({
potentiallyStalePath: pathFromProps,
validate: memoizedValidate
});
const onChange = useCallback(selectedOption => {
if (!readOnly || disabled) {
let newValue = null;
if (selectedOption && hasMany) {
if (Array.isArray(selectedOption)) {
newValue = selectedOption.map(option => option.value);
} else {
newValue = [];
}
} else if (selectedOption && !Array.isArray(selectedOption)) {
newValue = selectedOption.value;
}
if (typeof onChangeFromProps === 'function') {
onChangeFromProps(newValue);
}
setValue(newValue);
}
}, [readOnly, disabled, hasMany, setValue, onChangeFromProps]);
const styles = useMemo(() => mergeFieldStyles(field), [field]);
return /*#__PURE__*/_jsx(SelectInput, {
AfterInput: AfterInput,
BeforeInput: BeforeInput,
className: className,
Description: Description,
description: description,
Error: Error,
filterOption: selectFilterOptions ? ({
label: label_0,
value: value_1
}, search) => selectFilterOptions?.some(option_0 => (typeof option_0 === 'string' ? option_0 : option_0.value) === value_1) && label_0.toLowerCase().includes(search.toLowerCase()) : undefined,
hasMany: hasMany,
isClearable: isClearable,
isSortable: isSortable,
Label: Label,
label: label,
localized: localized,
name: name,
onChange: onChange,
options: options,
path: path,
placeholder: placeholder,
readOnly: readOnly || disabled,
required: required,
showError: showError,
style: styles,
value: value_0
});
};
export const SelectField = withCondition(SelectFieldComponent);
export { SelectInput };
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const d=r=>r!==null&&typeof r=="object",s=(r,t)=>Object.assign(new Error(`[${r}]: ${t}`),{code:r}),g="ERR_INVALID_PACKAGE_CONFIG",E="ERR_INVALID_PACKAGE_TARGET",I="ERR_PACKAGE_PATH_NOT_EXPORTED",P="ERR_PACKAGE_IMPORT_NOT_DEFINED",R=/^\d+$/,O=/^(\.{1,2}|node_modules)$/i,u=/\/|\\/;var h=(r=>(r.Export="exports",r.Import="imports",r))(h||{});const f=(r,t,n,o,c)=>{if(t==null)return[];if(typeof t=="string"){const[e,...i]=t.split(u);if(e===".."||i.some(l=>O.test(l)))throw s(E,`Invalid "${r}" target "${t}" defined in the package config`);return[c?t.replace(/\*/g,c):t]}if(Array.isArray(t))return t.flatMap(e=>f(r,e,n,o,c));if(d(t)){for(const e of Object.keys(t)){if(R.test(e))throw s(g,"Cannot contain numeric property keys");if(e==="default"||o.includes(e))return f(r,t[e],n,o,c)}return[]}throw s(E,`Invalid "${r}" target "${t}"`)},a="*",v=(r,t)=>{const n=r.indexOf(a),o=t.indexOf(a);return n===o?t.length>r.length:o>n};function A(r,t){if(!t.includes(a)&&r.hasOwnProperty(t))return[t];let n,o;for(const c of Object.keys(r))if(c.includes(a)){const[e,i,l]=c.split(a);if(l===void 0&&t.startsWith(e)&&t.endsWith(i)){const _=t.slice(e.length,-i.length||void 0);_&&(!n||v(n,c))&&(n=c,o=_)}}return[n,o]}const p=r=>Object.keys(r).reduce((t,n)=>{const o=n===""||n[0]!==".";if(t===void 0||t===o)return o;throw s(g,'"exports" cannot contain some keys starting with "." and some not')},void 0),w=/^\w+:/,m=(r,t,n)=>{if(!r)throw new Error('"exports" is required');t=t===""?".":`./${t}`,(typeof r=="string"||Array.isArray(r)||d(r)&&p(r))&&(r={".":r});const[o,c]=A(r,t),e=f(h.Export,r[o],t,n,c);if(e.length===0)throw s(I,t==="."?'No "exports" main defined':`Package subpath '${t}' is not defined by "exports"`);for(const i of e)if(!i.startsWith("./")&&!w.test(i))throw s(E,`Invalid "exports" target "${i}" defined in the package config`);return e},T=(r,t,n)=>{if(!r)throw new Error('"imports" is required');const[o,c]=A(r,t),e=f(h.Import,r[o],t,n,c);if(e.length===0)throw s(P,`Package import specifier "${t}" is not defined in package`);return e};exports.resolveExports=m,exports.resolveImports=T;

View File

@@ -0,0 +1,238 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.transform = transform;
var _index = require("../../index");
var _astModuleToModuleContext = require("../ast-module-to-module-context");
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
// FIXME(sven): do the same with all block instructions, must be more generic here
function newUnexpectedFunction(i) {
return new Error("unknown function at offset: " + i);
}
function transform(ast) {
var module = null;
(0, _index.traverse)(ast, {
Module: function (_Module) {
function Module(_x) {
return _Module.apply(this, arguments);
}
Module.toString = function () {
return _Module.toString();
};
return Module;
}(function (path) {
module = path.node;
})
});
if (module == null) {
throw new Error("Module not foudn in program");
}
var moduleContext = (0, _astModuleToModuleContext.moduleContextFromModuleAST)(module); // Transform the actual instruction in function bodies
(0, _index.traverse)(ast, {
Func: function (_Func) {
function Func(_x2) {
return _Func.apply(this, arguments);
}
Func.toString = function () {
return _Func.toString();
};
return Func;
}(function (path) {
transformFuncPath(path, moduleContext);
}),
Start: function (_Start) {
function Start(_x3) {
return _Start.apply(this, arguments);
}
Start.toString = function () {
return _Start.toString();
};
return Start;
}(function (path) {
var index = path.node.index;
if ((0, _index.isIdentifier)(index) === true) {
var offsetInModule = moduleContext.getFunctionOffsetByIdentifier(index.value);
if (typeof offsetInModule === "undefined") {
throw newUnexpectedFunction(index.value);
} // Replace the index Identifier
// $FlowIgnore: reference?
path.node.index = (0, _index.numberLiteralFromRaw)(offsetInModule);
}
})
});
}
function transformFuncPath(funcPath, moduleContext) {
var funcNode = funcPath.node;
var signature = funcNode.signature;
if (signature.type !== "Signature") {
throw new Error("Function signatures must be denormalised before execution");
}
var params = signature.params; // Add func locals in the context
params.forEach(function (p) {
return moduleContext.addLocal(p.valtype);
});
(0, _index.traverse)(funcNode, {
Instr: function (_Instr) {
function Instr(_x4) {
return _Instr.apply(this, arguments);
}
Instr.toString = function () {
return _Instr.toString();
};
return Instr;
}(function (instrPath) {
var instrNode = instrPath.node;
/**
* Local access
*/
if (instrNode.id === "get_local" || instrNode.id === "set_local" || instrNode.id === "tee_local") {
var _instrNode$args = _slicedToArray(instrNode.args, 1),
firstArg = _instrNode$args[0];
if (firstArg.type === "Identifier") {
var offsetInParams = params.findIndex(function (_ref) {
var id = _ref.id;
return id === firstArg.value;
});
if (offsetInParams === -1) {
throw new Error("".concat(firstArg.value, " not found in ").concat(instrNode.id, ": not declared in func params"));
} // Replace the Identifer node by our new NumberLiteral node
instrNode.args[0] = (0, _index.numberLiteralFromRaw)(offsetInParams);
}
}
/**
* Global access
*/
if (instrNode.id === "get_global" || instrNode.id === "set_global") {
var _instrNode$args2 = _slicedToArray(instrNode.args, 1),
_firstArg = _instrNode$args2[0];
if ((0, _index.isIdentifier)(_firstArg) === true) {
var globalOffset = moduleContext.getGlobalOffsetByIdentifier( // $FlowIgnore: reference?
_firstArg.value);
if (typeof globalOffset === "undefined") {
// $FlowIgnore: reference?
throw new Error("global ".concat(_firstArg.value, " not found in module"));
} // Replace the Identifer node by our new NumberLiteral node
instrNode.args[0] = (0, _index.numberLiteralFromRaw)(globalOffset);
}
}
/**
* Labels lookup
*/
if (instrNode.id === "br") {
var _instrNode$args3 = _slicedToArray(instrNode.args, 1),
_firstArg2 = _instrNode$args3[0];
if ((0, _index.isIdentifier)(_firstArg2) === true) {
// if the labels is not found it is going to be replaced with -1
// which is invalid.
var relativeBlockCount = -1; // $FlowIgnore: reference?
instrPath.findParent(function (_ref2) {
var node = _ref2.node;
if ((0, _index.isBlock)(node)) {
relativeBlockCount++; // $FlowIgnore: reference?
var name = node.label || node.name;
if (_typeof(name) === "object") {
// $FlowIgnore: isIdentifier ensures that
if (name.value === _firstArg2.value) {
// Found it
return false;
}
}
}
if ((0, _index.isFunc)(node)) {
return false;
}
}); // Replace the Identifer node by our new NumberLiteral node
instrNode.args[0] = (0, _index.numberLiteralFromRaw)(relativeBlockCount);
}
}
}),
/**
* Func lookup
*/
CallInstruction: function (_CallInstruction) {
function CallInstruction(_x5) {
return _CallInstruction.apply(this, arguments);
}
CallInstruction.toString = function () {
return _CallInstruction.toString();
};
return CallInstruction;
}(function (_ref3) {
var node = _ref3.node;
var index = node.index;
if ((0, _index.isIdentifier)(index) === true) {
var offsetInModule = moduleContext.getFunctionOffsetByIdentifier(index.value);
if (typeof offsetInModule === "undefined") {
throw newUnexpectedFunction(index.value);
} // Replace the index Identifier
// $FlowIgnore: reference?
node.index = (0, _index.numberLiteralFromRaw)(offsetInModule);
}
})
});
}

View File

@@ -0,0 +1,931 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const APIPlugin = require("./APIPlugin");
const CompatibilityPlugin = require("./CompatibilityPlugin");
const ConstPlugin = require("./ConstPlugin");
const EntryOptionPlugin = require("./EntryOptionPlugin");
const ExportsInfoApiPlugin = require("./ExportsInfoApiPlugin");
const FlagDependencyExportsPlugin = require("./FlagDependencyExportsPlugin");
const JavascriptMetaInfoPlugin = require("./JavascriptMetaInfoPlugin");
const NodeStuffPlugin = require("./NodeStuffPlugin");
const OptionsApply = require("./OptionsApply");
const RecordIdsPlugin = require("./RecordIdsPlugin");
const RuntimePlugin = require("./RuntimePlugin");
const TemplatedPathPlugin = require("./TemplatedPathPlugin");
const UseStrictPlugin = require("./UseStrictPlugin");
const WarnCaseSensitiveModulesPlugin = require("./WarnCaseSensitiveModulesPlugin");
const WebpackIsIncludedPlugin = require("./WebpackIsIncludedPlugin");
const AssetModulesPlugin = require("./asset/AssetModulesPlugin");
const InferAsyncModulesPlugin = require("./async-modules/InferAsyncModulesPlugin");
const ResolverCachePlugin = require("./cache/ResolverCachePlugin");
const CommonJsPlugin = require("./dependencies/CommonJsPlugin");
const HarmonyModulesPlugin = require("./dependencies/HarmonyModulesPlugin");
const ImportMetaContextPlugin = require("./dependencies/ImportMetaContextPlugin");
const ImportMetaPlugin = require("./dependencies/ImportMetaPlugin");
const ImportPlugin = require("./dependencies/ImportPlugin");
const LoaderPlugin = require("./dependencies/LoaderPlugin");
const RequireContextPlugin = require("./dependencies/RequireContextPlugin");
const RequireEnsurePlugin = require("./dependencies/RequireEnsurePlugin");
const RequireIncludePlugin = require("./dependencies/RequireIncludePlugin");
const SystemPlugin = require("./dependencies/SystemPlugin");
const URLPlugin = require("./dependencies/URLPlugin");
const WorkerPlugin = require("./dependencies/WorkerPlugin");
const JavascriptModulesPlugin = require("./javascript/JavascriptModulesPlugin");
const JsonModulesPlugin = require("./json/JsonModulesPlugin");
const ChunkPrefetchPreloadPlugin = require("./prefetch/ChunkPrefetchPreloadPlugin");
const DataUriPlugin = require("./schemes/DataUriPlugin");
const FileUriPlugin = require("./schemes/FileUriPlugin");
const DefaultStatsFactoryPlugin = require("./stats/DefaultStatsFactoryPlugin");
const DefaultStatsPresetPlugin = require("./stats/DefaultStatsPresetPlugin");
const DefaultStatsPrinterPlugin = require("./stats/DefaultStatsPrinterPlugin");
const { cleverMerge } = require("./util/cleverMerge");
/** @typedef {import("../declarations/WebpackOptions").WebpackPluginFunction} WebpackPluginFunction */
/** @typedef {import("./config/defaults").WebpackOptionsNormalizedWithDefaults} WebpackOptions */
/** @typedef {import("./config/normalization").WebpackOptionsInterception} WebpackOptionsInterception */
/** @typedef {import("./Compiler")} Compiler */
/** @typedef {import("./util/fs").InputFileSystem} InputFileSystem */
/** @typedef {import("./util/fs").IntermediateFileSystem} IntermediateFileSystem */
const CLASS_NAME = "WebpackOptionsApply";
class WebpackOptionsApply extends OptionsApply {
constructor() {
super();
}
/**
* @param {WebpackOptions} options options object
* @param {Compiler} compiler compiler object
* @param {WebpackOptionsInterception=} interception intercepted options
* @returns {WebpackOptions} options object
*/
process(options, compiler, interception) {
compiler.outputPath = options.output.path;
compiler.recordsInputPath = options.recordsInputPath || null;
compiler.recordsOutputPath = options.recordsOutputPath || null;
compiler.name = options.name;
if (options.externals) {
// @ts-expect-error https://github.com/microsoft/TypeScript/issues/41697
const ExternalsPlugin = require("./ExternalsPlugin");
new ExternalsPlugin(options.externalsType, options.externals).apply(
compiler
);
}
if (options.externalsPresets.node) {
const NodeTargetPlugin = require("./node/NodeTargetPlugin");
// Some older versions of Node.js don't support all built-in modules via import, only via `require`,
// but it seems like there shouldn't be a warning here since these versions are rarely used in real applications
new NodeTargetPlugin(
options.output.module ? "module-import" : "node-commonjs"
).apply(compiler);
// Handle external CSS `@import` and `url()`
if (options.experiments.css) {
// @ts-expect-error https://github.com/microsoft/TypeScript/issues/41697
const ExternalsPlugin = require("./ExternalsPlugin");
new ExternalsPlugin(
"module",
({ request, dependencyType, contextInfo }, callback) => {
if (
/\.css(?:\?|$)/.test(contextInfo.issuer) &&
/^(?:\/\/|https?:\/\/|#)/.test(request)
) {
if (dependencyType === "url") {
return callback(null, `asset ${request}`);
} else if (
(dependencyType === "css-import" ||
dependencyType === "css-import-local-module" ||
dependencyType === "css-import-global-module") &&
options.experiments.css
) {
return callback(null, `css-import ${request}`);
}
}
callback();
}
).apply(compiler);
}
}
if (options.externalsPresets.webAsync || options.externalsPresets.web) {
const type = options.externalsPresets.webAsync ? "import" : "module";
// @ts-expect-error https://github.com/microsoft/TypeScript/issues/41697
const ExternalsPlugin = require("./ExternalsPlugin");
new ExternalsPlugin(type, ({ request, dependencyType }, callback) => {
if (/^(?:\/\/|https?:\/\/|#|std:|jsr:|npm:)/.test(request)) {
if (dependencyType === "url") {
return callback(null, `asset ${request}`);
} else if (
(dependencyType === "css-import" ||
dependencyType === "css-import-local-module" ||
dependencyType === "css-import-global-module") &&
options.experiments.css
) {
return callback(null, `css-import ${request}`);
} else if (/^(?:\/\/|https?:\/\/|std:|jsr:|npm:)/.test(request)) {
return callback(null, `${type} ${request}`);
}
}
callback();
}).apply(compiler);
}
if (options.externalsPresets.electron) {
if (options.externalsPresets.electronMain) {
// @ts-expect-error https://github.com/microsoft/TypeScript/issues/41697
const ElectronTargetPlugin = require("./electron/ElectronTargetPlugin");
new ElectronTargetPlugin("main").apply(compiler);
}
if (options.externalsPresets.electronPreload) {
// @ts-expect-error https://github.com/microsoft/TypeScript/issues/41697
const ElectronTargetPlugin = require("./electron/ElectronTargetPlugin");
new ElectronTargetPlugin("preload").apply(compiler);
}
if (options.externalsPresets.electronRenderer) {
// @ts-expect-error https://github.com/microsoft/TypeScript/issues/41697
const ElectronTargetPlugin = require("./electron/ElectronTargetPlugin");
new ElectronTargetPlugin("renderer").apply(compiler);
}
if (
!options.externalsPresets.electronMain &&
!options.externalsPresets.electronPreload &&
!options.externalsPresets.electronRenderer
) {
// @ts-expect-error https://github.com/microsoft/TypeScript/issues/41697
const ElectronTargetPlugin = require("./electron/ElectronTargetPlugin");
new ElectronTargetPlugin().apply(compiler);
}
}
if (options.externalsPresets.nwjs) {
// @ts-expect-error https://github.com/microsoft/TypeScript/issues/41697
const ExternalsPlugin = require("./ExternalsPlugin");
new ExternalsPlugin("node-commonjs", "nw.gui").apply(compiler);
}
new ChunkPrefetchPreloadPlugin().apply(compiler);
if (typeof options.output.chunkFormat === "string") {
switch (options.output.chunkFormat) {
case "array-push": {
const ArrayPushCallbackChunkFormatPlugin = require("./javascript/ArrayPushCallbackChunkFormatPlugin");
new ArrayPushCallbackChunkFormatPlugin().apply(compiler);
break;
}
case "commonjs": {
const CommonJsChunkFormatPlugin = require("./javascript/CommonJsChunkFormatPlugin");
new CommonJsChunkFormatPlugin().apply(compiler);
break;
}
case "module": {
const ModuleChunkFormatPlugin = require("./esm/ModuleChunkFormatPlugin");
new ModuleChunkFormatPlugin().apply(compiler);
break;
}
default:
throw new Error(
`Unsupported chunk format '${options.output.chunkFormat}'.`
);
}
}
const enabledChunkLoadingTypes =
/** @type {NonNullable<WebpackOptions["output"]["enabledChunkLoadingTypes"]>} */
(options.output.enabledChunkLoadingTypes);
if (enabledChunkLoadingTypes.length > 0) {
for (const type of enabledChunkLoadingTypes) {
const EnableChunkLoadingPlugin = require("./javascript/EnableChunkLoadingPlugin");
new EnableChunkLoadingPlugin(type).apply(compiler);
}
}
const enabledWasmLoadingTypes =
/** @type {NonNullable<WebpackOptions["output"]["enabledWasmLoadingTypes"]>} */
(options.output.enabledWasmLoadingTypes);
if (enabledWasmLoadingTypes.length > 0) {
for (const type of enabledWasmLoadingTypes) {
const EnableWasmLoadingPlugin = require("./wasm/EnableWasmLoadingPlugin");
new EnableWasmLoadingPlugin(type).apply(compiler);
}
}
const enabledLibraryTypes =
/** @type {NonNullable<WebpackOptions["output"]["enabledLibraryTypes"]>} */
(options.output.enabledLibraryTypes);
if (enabledLibraryTypes.length > 0) {
let once = true;
for (const type of enabledLibraryTypes) {
const EnableLibraryPlugin = require("./library/EnableLibraryPlugin");
new EnableLibraryPlugin(type, {
// eslint-disable-next-line no-loop-func
additionalApply: () => {
if (!once) return;
once = false;
// We rely on `exportInfo` to generate the `export statement` in certain library bundles.
// Therefore, we ignore the disabling of `optimization.providedExport` and continue to apply `FlagDependencyExportsPlugin`.
if (
["module", "commonjs-static", "modern-module"].includes(type) &&
!options.optimization.providedExports
) {
new FlagDependencyExportsPlugin().apply(compiler);
}
}
}).apply(compiler);
}
}
if (options.output.pathinfo) {
const ModuleInfoHeaderPlugin = require("./ModuleInfoHeaderPlugin");
new ModuleInfoHeaderPlugin(options.output.pathinfo !== true).apply(
compiler
);
}
if (options.output.clean) {
const CleanPlugin = require("./CleanPlugin");
new CleanPlugin(
options.output.clean === true ? {} : options.output.clean
).apply(compiler);
}
if (options.dotenv) {
const DotenvPlugin = require("./DotenvPlugin");
new DotenvPlugin(
typeof options.dotenv === "boolean" ? {} : options.dotenv
).apply(compiler);
}
let devtool =
interception === undefined ? options.devtool : interception.devtool;
devtool = Array.isArray(devtool)
? devtool
: typeof devtool === "string"
? [{ type: "all", use: devtool }]
: [];
for (const item of devtool) {
const { type, use } = item;
if (use) {
if (use.includes("source-map")) {
const hidden = use.includes("hidden");
const inline = use.includes("inline");
const evalWrapped = use.includes("eval");
const cheap = use.includes("cheap");
const moduleMaps = use.includes("module");
const noSources = use.includes("nosources");
const debugIds = use.includes("debugids");
const Plugin = evalWrapped
? require("./EvalSourceMapDevToolPlugin")
: require("./SourceMapDevToolPlugin");
const assetExt =
type === "javascript"
? /\.((c|m)?js)($|\?)/i
: type === "css"
? /\.(css)($|\?)/i
: /\.((c|m)?js|css)($|\?)/i;
new Plugin({
test: evalWrapped ? undefined : assetExt,
filename: inline ? null : options.output.sourceMapFilename,
moduleFilenameTemplate:
options.output.devtoolModuleFilenameTemplate,
fallbackModuleFilenameTemplate:
options.output.devtoolFallbackModuleFilenameTemplate,
append: hidden ? false : undefined,
module: moduleMaps ? true : !cheap,
columns: !cheap,
noSources,
namespace: options.output.devtoolNamespace,
debugIds
}).apply(compiler);
} else if (use.includes("eval")) {
const EvalDevToolModulePlugin = require("./EvalDevToolModulePlugin");
new EvalDevToolModulePlugin({
moduleFilenameTemplate:
options.output.devtoolModuleFilenameTemplate,
namespace: options.output.devtoolNamespace
}).apply(compiler);
}
}
}
new JavascriptModulesPlugin().apply(compiler);
new JsonModulesPlugin().apply(compiler);
new AssetModulesPlugin().apply(compiler);
if (!options.experiments.outputModule) {
if (options.output.module) {
throw new Error(
"'output.module: true' is only allowed when 'experiments.outputModule' is enabled"
);
}
if (options.output.enabledLibraryTypes.includes("module")) {
throw new Error(
"library type \"module\" is only allowed when 'experiments.outputModule' is enabled"
);
}
if (options.output.enabledLibraryTypes.includes("modern-module")) {
throw new Error(
"library type \"modern-module\" is only allowed when 'experiments.outputModule' is enabled"
);
}
if (
options.externalsType === "module" ||
options.externalsType === "module-import"
) {
throw new Error(
"'externalsType: \"module\"' is only allowed when 'experiments.outputModule' is enabled"
);
}
}
if (options.experiments.syncWebAssembly) {
const WebAssemblyModulesPlugin = require("./wasm-sync/WebAssemblyModulesPlugin");
new WebAssemblyModulesPlugin({
mangleImports: options.optimization.mangleWasmImports
}).apply(compiler);
}
if (options.experiments.asyncWebAssembly) {
const AsyncWebAssemblyModulesPlugin = require("./wasm-async/AsyncWebAssemblyModulesPlugin");
new AsyncWebAssemblyModulesPlugin({
mangleImports: options.optimization.mangleWasmImports
}).apply(compiler);
}
if (options.experiments.css) {
const CssModulesPlugin = require("./css/CssModulesPlugin");
new CssModulesPlugin().apply(compiler);
}
if (options.experiments.lazyCompilation) {
const LazyCompilationPlugin = require("./hmr/LazyCompilationPlugin");
const lazyOptions =
typeof options.experiments.lazyCompilation === "object"
? options.experiments.lazyCompilation
: {};
const isUniversalTarget =
options.output.module &&
compiler.platform.node === null &&
compiler.platform.web === null;
if (isUniversalTarget) {
const emitter = require.resolve("../hot/emitter-event-target.js");
const NormalModuleReplacementPlugin = require("./NormalModuleReplacementPlugin");
// Override emitter that using `EventEmitter` to `EventTarget`
// TODO webpack6 - migrate to `EventTarget` by default
new NormalModuleReplacementPlugin(/emitter(\.js)?$/, (result) => {
if (
/webpack[/\\]hot|webpack-dev-server[/\\]client|webpack-hot-middleware[/\\]client/.test(
result.context
)
) {
result.request = emitter;
}
return result;
}).apply(compiler);
}
const backend = require.resolve(
isUniversalTarget
? "../hot/lazy-compilation-universal.js"
: `../hot/lazy-compilation-${
options.externalsPresets.node ? "node" : "web"
}.js`
);
new LazyCompilationPlugin({
backend:
typeof lazyOptions.backend === "function"
? lazyOptions.backend
: require("./hmr/lazyCompilationBackend")({
...lazyOptions.backend,
client:
(lazyOptions.backend && lazyOptions.backend.client) || backend
}),
entries: !lazyOptions || lazyOptions.entries !== false,
imports: !lazyOptions || lazyOptions.imports !== false,
test: (lazyOptions && lazyOptions.test) || undefined
}).apply(compiler);
}
if (options.experiments.buildHttp) {
const HttpUriPlugin = require("./schemes/HttpUriPlugin");
const httpOptions = options.experiments.buildHttp;
new HttpUriPlugin(httpOptions).apply(compiler);
}
if (options.experiments.deferImport) {
const JavascriptParser = require("./javascript/JavascriptParser");
const importPhases = require("acorn-import-phases");
JavascriptParser.extend(importPhases({ source: false }));
}
new EntryOptionPlugin().apply(compiler);
compiler.hooks.entryOption.call(options.context, options.entry);
new RuntimePlugin().apply(compiler);
new InferAsyncModulesPlugin().apply(compiler);
new DataUriPlugin().apply(compiler);
new FileUriPlugin().apply(compiler);
new CompatibilityPlugin().apply(compiler);
new HarmonyModulesPlugin({
deferImport: options.experiments.deferImport
}).apply(compiler);
if (options.amd !== false) {
const AMDPlugin = require("./dependencies/AMDPlugin");
const RequireJsStuffPlugin = require("./RequireJsStuffPlugin");
new AMDPlugin(options.amd || {}).apply(compiler);
new RequireJsStuffPlugin().apply(compiler);
}
new CommonJsPlugin().apply(compiler);
new LoaderPlugin().apply(compiler);
new NodeStuffPlugin({
global: options.node ? options.node.global : false,
__dirname: options.node ? options.node.__dirname : false,
__filename: options.node ? options.node.__filename : false
}).apply(compiler);
new APIPlugin().apply(compiler);
new ExportsInfoApiPlugin().apply(compiler);
new WebpackIsIncludedPlugin().apply(compiler);
new ConstPlugin().apply(compiler);
new UseStrictPlugin().apply(compiler);
new RequireIncludePlugin().apply(compiler);
new RequireEnsurePlugin().apply(compiler);
new RequireContextPlugin().apply(compiler);
new ImportPlugin().apply(compiler);
new ImportMetaContextPlugin().apply(compiler);
new SystemPlugin().apply(compiler);
new ImportMetaPlugin().apply(compiler);
new URLPlugin().apply(compiler);
new WorkerPlugin(
options.output.workerChunkLoading,
options.output.workerWasmLoading,
options.output.module,
options.output.workerPublicPath
).apply(compiler);
new DefaultStatsFactoryPlugin().apply(compiler);
new DefaultStatsPresetPlugin().apply(compiler);
new DefaultStatsPrinterPlugin().apply(compiler);
new JavascriptMetaInfoPlugin().apply(compiler);
if (typeof options.mode !== "string") {
const WarnNoModeSetPlugin = require("./WarnNoModeSetPlugin");
new WarnNoModeSetPlugin().apply(compiler);
}
const EnsureChunkConditionsPlugin = require("./optimize/EnsureChunkConditionsPlugin");
new EnsureChunkConditionsPlugin().apply(compiler);
if (options.optimization.removeAvailableModules) {
const RemoveParentModulesPlugin = require("./optimize/RemoveParentModulesPlugin");
new RemoveParentModulesPlugin().apply(compiler);
}
if (options.optimization.removeEmptyChunks) {
const RemoveEmptyChunksPlugin = require("./optimize/RemoveEmptyChunksPlugin");
new RemoveEmptyChunksPlugin().apply(compiler);
}
if (options.optimization.mergeDuplicateChunks) {
const MergeDuplicateChunksPlugin = require("./optimize/MergeDuplicateChunksPlugin");
new MergeDuplicateChunksPlugin().apply(compiler);
}
if (options.optimization.flagIncludedChunks) {
const FlagIncludedChunksPlugin = require("./optimize/FlagIncludedChunksPlugin");
new FlagIncludedChunksPlugin().apply(compiler);
}
if (options.optimization.sideEffects) {
const SideEffectsFlagPlugin = require("./optimize/SideEffectsFlagPlugin");
new SideEffectsFlagPlugin(
options.optimization.sideEffects === true
).apply(compiler);
}
if (options.optimization.providedExports) {
new FlagDependencyExportsPlugin().apply(compiler);
}
if (options.optimization.usedExports) {
const FlagDependencyUsagePlugin = require("./FlagDependencyUsagePlugin");
new FlagDependencyUsagePlugin(
options.optimization.usedExports === "global"
).apply(compiler);
}
if (options.optimization.innerGraph) {
const InnerGraphPlugin = require("./optimize/InnerGraphPlugin");
new InnerGraphPlugin().apply(compiler);
}
if (options.optimization.mangleExports) {
const MangleExportsPlugin = require("./optimize/MangleExportsPlugin");
new MangleExportsPlugin(
options.optimization.mangleExports !== "size"
).apply(compiler);
}
if (options.optimization.concatenateModules) {
const ModuleConcatenationPlugin = require("./optimize/ModuleConcatenationPlugin");
new ModuleConcatenationPlugin().apply(compiler);
}
if (options.optimization.splitChunks) {
const SplitChunksPlugin = require("./optimize/SplitChunksPlugin");
new SplitChunksPlugin(options.optimization.splitChunks).apply(compiler);
}
if (options.optimization.runtimeChunk) {
const RuntimeChunkPlugin = require("./optimize/RuntimeChunkPlugin");
new RuntimeChunkPlugin(options.optimization.runtimeChunk).apply(compiler);
}
if (!options.optimization.emitOnErrors) {
const NoEmitOnErrorsPlugin = require("./NoEmitOnErrorsPlugin");
new NoEmitOnErrorsPlugin().apply(compiler);
}
if (options.optimization.realContentHash) {
const RealContentHashPlugin = require("./optimize/RealContentHashPlugin");
new RealContentHashPlugin({
hashFunction:
/** @type {NonNullable<WebpackOptions["output"]["hashFunction"]>} */
(options.output.hashFunction),
hashDigest:
/** @type {NonNullable<WebpackOptions["output"]["hashDigest"]>} */
(options.output.hashDigest)
}).apply(compiler);
}
if (options.optimization.checkWasmTypes) {
const WasmFinalizeExportsPlugin = require("./wasm-sync/WasmFinalizeExportsPlugin");
new WasmFinalizeExportsPlugin().apply(compiler);
}
const moduleIds = options.optimization.moduleIds;
if (moduleIds) {
switch (moduleIds) {
case "natural": {
const NaturalModuleIdsPlugin = require("./ids/NaturalModuleIdsPlugin");
new NaturalModuleIdsPlugin().apply(compiler);
break;
}
case "named": {
const NamedModuleIdsPlugin = require("./ids/NamedModuleIdsPlugin");
new NamedModuleIdsPlugin().apply(compiler);
break;
}
case "hashed": {
const WarnDeprecatedOptionPlugin = require("./WarnDeprecatedOptionPlugin");
const HashedModuleIdsPlugin = require("./ids/HashedModuleIdsPlugin");
new WarnDeprecatedOptionPlugin(
"optimization.moduleIds",
"hashed",
"deterministic"
).apply(compiler);
new HashedModuleIdsPlugin({
hashFunction: options.output.hashFunction
}).apply(compiler);
break;
}
case "deterministic": {
const DeterministicModuleIdsPlugin = require("./ids/DeterministicModuleIdsPlugin");
new DeterministicModuleIdsPlugin().apply(compiler);
break;
}
case "size": {
const OccurrenceModuleIdsPlugin = require("./ids/OccurrenceModuleIdsPlugin");
new OccurrenceModuleIdsPlugin({
prioritiseInitial: true
}).apply(compiler);
break;
}
default:
throw new Error(
`webpack bug: moduleIds: ${moduleIds} is not implemented`
);
}
}
const chunkIds = options.optimization.chunkIds;
if (chunkIds) {
switch (chunkIds) {
case "natural": {
const NaturalChunkIdsPlugin = require("./ids/NaturalChunkIdsPlugin");
new NaturalChunkIdsPlugin().apply(compiler);
break;
}
case "named": {
const NamedChunkIdsPlugin = require("./ids/NamedChunkIdsPlugin");
new NamedChunkIdsPlugin().apply(compiler);
break;
}
case "deterministic": {
const DeterministicChunkIdsPlugin = require("./ids/DeterministicChunkIdsPlugin");
new DeterministicChunkIdsPlugin().apply(compiler);
break;
}
case "size": {
// @ts-expect-error https://github.com/microsoft/TypeScript/issues/41697
const OccurrenceChunkIdsPlugin = require("./ids/OccurrenceChunkIdsPlugin");
new OccurrenceChunkIdsPlugin({
prioritiseInitial: true
}).apply(compiler);
break;
}
case "total-size": {
// @ts-expect-error https://github.com/microsoft/TypeScript/issues/41697
const OccurrenceChunkIdsPlugin = require("./ids/OccurrenceChunkIdsPlugin");
new OccurrenceChunkIdsPlugin({
prioritiseInitial: false
}).apply(compiler);
break;
}
default:
throw new Error(
`webpack bug: chunkIds: ${chunkIds} is not implemented`
);
}
}
if (options.optimization.nodeEnv) {
const DefinePlugin = require("./DefinePlugin");
const defValue = JSON.stringify(options.optimization.nodeEnv);
new DefinePlugin({
"process.env.NODE_ENV": defValue,
"import.meta.env.NODE_ENV": defValue
}).apply(compiler);
}
if (options.optimization.minimize) {
for (const minimizer of options.optimization.minimizer) {
if (typeof minimizer === "function") {
/** @type {WebpackPluginFunction} */
(minimizer).call(compiler, compiler);
} else if (minimizer !== "..." && minimizer) {
minimizer.apply(compiler);
}
}
}
if (options.performance) {
const SizeLimitsPlugin = require("./performance/SizeLimitsPlugin");
new SizeLimitsPlugin(options.performance).apply(compiler);
}
new TemplatedPathPlugin().apply(compiler);
new RecordIdsPlugin({
portableIds: options.optimization.portableRecords
}).apply(compiler);
new WarnCaseSensitiveModulesPlugin().apply(compiler);
const AddManagedPathsPlugin = require("./cache/AddManagedPathsPlugin");
new AddManagedPathsPlugin(
/** @type {NonNullable<WebpackOptions["snapshot"]["managedPaths"]>} */
(options.snapshot.managedPaths),
/** @type {NonNullable<WebpackOptions["snapshot"]["managedPaths"]>} */
(options.snapshot.immutablePaths),
/** @type {NonNullable<WebpackOptions["snapshot"]["managedPaths"]>} */
(options.snapshot.unmanagedPaths)
).apply(compiler);
if (options.cache && typeof options.cache === "object") {
const cacheOptions = options.cache;
switch (cacheOptions.type) {
case "memory": {
if (Number.isFinite(cacheOptions.maxGenerations)) {
// @ts-expect-error https://github.com/microsoft/TypeScript/issues/41697
const MemoryWithGcCachePlugin = require("./cache/MemoryWithGcCachePlugin");
new MemoryWithGcCachePlugin({
maxGenerations:
/** @type {number} */
(cacheOptions.maxGenerations)
}).apply(compiler);
} else {
// @ts-expect-error https://github.com/microsoft/TypeScript/issues/41697
const MemoryCachePlugin = require("./cache/MemoryCachePlugin");
new MemoryCachePlugin().apply(compiler);
}
if (cacheOptions.cacheUnaffected) {
if (!options.experiments.cacheUnaffected) {
throw new Error(
"'cache.cacheUnaffected: true' is only allowed when 'experiments.cacheUnaffected' is enabled"
);
}
compiler.moduleMemCaches = new Map();
}
break;
}
case "filesystem": {
const AddBuildDependenciesPlugin = require("./cache/AddBuildDependenciesPlugin");
for (const key in cacheOptions.buildDependencies) {
const list = cacheOptions.buildDependencies[key];
new AddBuildDependenciesPlugin(list).apply(compiler);
}
if (!Number.isFinite(cacheOptions.maxMemoryGenerations)) {
// @ts-expect-error https://github.com/microsoft/TypeScript/issues/41697
const MemoryCachePlugin = require("./cache/MemoryCachePlugin");
new MemoryCachePlugin().apply(compiler);
} else if (cacheOptions.maxMemoryGenerations !== 0) {
// @ts-expect-error https://github.com/microsoft/TypeScript/issues/41697
const MemoryWithGcCachePlugin = require("./cache/MemoryWithGcCachePlugin");
new MemoryWithGcCachePlugin({
maxGenerations:
/** @type {number} */
(cacheOptions.maxMemoryGenerations)
}).apply(compiler);
}
if (cacheOptions.memoryCacheUnaffected) {
if (!options.experiments.cacheUnaffected) {
throw new Error(
"'cache.memoryCacheUnaffected: true' is only allowed when 'experiments.cacheUnaffected' is enabled"
);
}
compiler.moduleMemCaches = new Map();
}
switch (cacheOptions.store) {
case "pack": {
const IdleFileCachePlugin = require("./cache/IdleFileCachePlugin");
const PackFileCacheStrategy = require("./cache/PackFileCacheStrategy");
new IdleFileCachePlugin(
new PackFileCacheStrategy({
compiler,
fs:
/** @type {IntermediateFileSystem} */
(compiler.intermediateFileSystem),
context: options.context,
cacheLocation:
/** @type {string} */
(cacheOptions.cacheLocation),
version: /** @type {string} */ (cacheOptions.version),
logger: compiler.getInfrastructureLogger(
"webpack.cache.PackFileCacheStrategy"
),
snapshot: options.snapshot,
maxAge: /** @type {number} */ (cacheOptions.maxAge),
profile: cacheOptions.profile,
allowCollectingMemory: cacheOptions.allowCollectingMemory,
compression: cacheOptions.compression,
readonly: cacheOptions.readonly
}),
/** @type {number} */
(cacheOptions.idleTimeout),
/** @type {number} */
(cacheOptions.idleTimeoutForInitialStore),
/** @type {number} */
(cacheOptions.idleTimeoutAfterLargeChanges)
).apply(compiler);
break;
}
default:
throw new Error("Unhandled value for cache.store");
}
break;
}
default:
// @ts-expect-error Property 'type' does not exist on type 'never'. ts(2339)
throw new Error(`Unknown cache type ${cacheOptions.type}`);
}
}
new ResolverCachePlugin().apply(compiler);
if (options.ignoreWarnings && options.ignoreWarnings.length > 0) {
const IgnoreWarningsPlugin = require("./IgnoreWarningsPlugin");
new IgnoreWarningsPlugin(options.ignoreWarnings).apply(compiler);
}
compiler.hooks.afterPlugins.call(compiler);
if (!compiler.inputFileSystem) {
throw new Error("No input filesystem provided");
}
compiler.resolverFactory.hooks.resolveOptions
.for("normal")
.tap(CLASS_NAME, (resolveOptions) => {
resolveOptions = cleverMerge(options.resolve, resolveOptions);
resolveOptions.fileSystem =
/** @type {InputFileSystem} */
(compiler.inputFileSystem);
return resolveOptions;
});
compiler.resolverFactory.hooks.resolveOptions
.for("context")
.tap(CLASS_NAME, (resolveOptions) => {
resolveOptions = cleverMerge(options.resolve, resolveOptions);
resolveOptions.fileSystem =
/** @type {InputFileSystem} */
(compiler.inputFileSystem);
resolveOptions.resolveToContext = true;
return resolveOptions;
});
compiler.resolverFactory.hooks.resolveOptions
.for("loader")
.tap(CLASS_NAME, (resolveOptions) => {
resolveOptions = cleverMerge(options.resolveLoader, resolveOptions);
resolveOptions.fileSystem =
/** @type {InputFileSystem} */
(compiler.inputFileSystem);
return resolveOptions;
});
compiler.hooks.afterResolvers.call(compiler);
return options;
}
}
module.exports = WebpackOptionsApply;

View File

@@ -0,0 +1,59 @@
//#region src/auth/types.d.ts
type AuthenticationMode = 'json' | 'cookie' | 'session';
type LocalLoginPayload = {
email: string;
password: string;
};
type LDAPLoginPayload = {
identifier: string;
password: string;
};
type LoginPayload = LocalLoginPayload | LDAPLoginPayload;
type LoginOptions = {
/** The user's one-time-password (if MFA is enabled). */
otp?: string;
/** Whether to retrieve the refresh token in the JSON response, or in a httpOnly cookie. One of `json`, `cookie` or `session`. Defaults to `cookie`. */
mode?: AuthenticationMode;
/** Use a specific authentication provider (does not work for SSO that relies on browser redirects). */
provider?: string;
};
type LogoutOptions = {
refresh_token?: string;
mode?: AuthenticationMode;
};
type RefreshOptions = {
refresh_token?: string;
mode?: AuthenticationMode;
};
interface AuthenticationData {
access_token: string | null;
refresh_token: string | null;
expires: number | null;
expires_at: number | null;
}
interface AuthenticationStorage {
get: () => Promise<AuthenticationData | null> | AuthenticationData | null;
set: (value: AuthenticationData | null) => Promise<unknown> | unknown;
}
interface AuthenticationConfig {
autoRefresh: boolean;
msRefreshBeforeExpires: number;
credentials?: RequestCredentials;
storage?: AuthenticationStorage;
}
interface AuthenticationClient<_Schema> {
login(payload: LocalLoginPayload, options?: LoginOptions): Promise<AuthenticationData>;
login(payload: LDAPLoginPayload, options?: LoginOptions): Promise<AuthenticationData>;
refresh(options?: RefreshOptions): Promise<AuthenticationData>;
logout(options?: LogoutOptions): Promise<void>;
stopRefreshing(): void;
getToken(): Promise<string | null>;
setToken(access_token: string | null): Promise<unknown>;
}
interface StaticTokenClient<_Schema> {
getToken(): Promise<string | null>;
setToken(access_token: string | null): Promise<unknown>;
}
//#endregion
export { AuthenticationClient, AuthenticationConfig, AuthenticationData, AuthenticationMode, AuthenticationStorage, LDAPLoginPayload, LocalLoginPayload, LoginOptions, LoginPayload, LogoutOptions, RefreshOptions, StaticTokenClient };
//# sourceMappingURL=types.d.ts.map

View File

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

View File

@@ -0,0 +1,3 @@
import type { AfterScheduleFn } from '../../config/types/index.js';
export declare const defaultAfterSchedule: AfterScheduleFn;
//# sourceMappingURL=defaultAfterSchedule.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"video.js","sources":["../../../src/icons/video.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Video\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtMTYgMTMgNS4yMjMgMy40ODJhLjUuNSAwIDAgMCAuNzc3LS40MTZWNy44N2EuNS41IDAgMCAwLS43NTItLjQzMkwxNiAxMC41IiAvPgogIDxyZWN0IHg9IjIiIHk9IjYiIHdpZHRoPSIxNCIgaGVpZ2h0PSIxMiIgcng9IjIiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/video\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 Video = createLucideIcon('Video', [\n [\n 'path',\n {\n d: 'm16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5',\n key: 'ftymec',\n },\n ],\n ['rect', { x: '2', y: '6', width: '14', height: '12', rx: '2', key: '158x01' }],\n]);\n\nexport default Video;\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;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA,CAAA;AAAA,CAAA,CACA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAG,KAAK,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,QAAQ,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAChF,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"clock-5.js","sources":["../../../src/icons/clock-5.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Clock5\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMCIgLz4KICA8cG9seWxpbmUgcG9pbnRzPSIxMiA2IDEyIDEyIDE0LjUgMTYiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/clock-5\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 Clock5 = createLucideIcon('Clock5', [\n ['circle', { cx: '12', cy: '12', r: '10', key: '1mglay' }],\n ['polyline', { points: '12 6 12 12 14.5 16', key: '1pcbox' }],\n]);\n\nexport default Clock5;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,iBAAiB,QAAU,CAAA,CAAA,CAAA;AAAA,CACxC,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACzD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,CAAA,CAAA,CAAA,CAAE,QAAQ,CAAsB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC9D,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"mail-warning.js","sources":["../../../src/icons/mail-warning.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name MailWarning\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMjIgMTAuNVY2YTIgMiAwIDAgMC0yLTJINGEyIDIgMCAwIDAtMiAydjEyYzAgMS4xLjkgMiAyIDJoMTIuNSIgLz4KICA8cGF0aCBkPSJtMjIgNy04Ljk3IDUuN2ExLjk0IDEuOTQgMCAwIDEtMi4wNiAwTDIgNyIgLz4KICA8cGF0aCBkPSJNMjAgMTR2NCIgLz4KICA8cGF0aCBkPSJNMjAgMjJ2LjAxIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/mail-warning\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 MailWarning = createLucideIcon('MailWarning', [\n ['path', { d: 'M22 10.5V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h12.5', key: 'e61zoh' }],\n ['path', { d: 'm22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7', key: '1ocrg3' }],\n ['path', { d: 'M20 14v4', key: '1hm744' }],\n ['path', { d: 'M20 22v.01', key: '12bgn6' }],\n]);\n\nexport default MailWarning;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAc,iBAAiB,aAAe,CAAA,CAAA,CAAA;AAAA,CAAA,CAClD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAkE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAC/F,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA6C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC7C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1 @@
Prism.languages.warpscript={comment:/#.*|\/\/.*|\/\*[\s\S]*?\*\//,string:{pattern:/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'|<'(?:[^\\']|'(?!>)|\\.)*'>/,greedy:!0},variable:/\$\S+/,macro:{pattern:/@\S+/,alias:"property"},keyword:/\b(?:BREAK|CHECKMACRO|CONTINUE|CUDF|DEFINED|DEFINEDMACRO|EVAL|FAIL|FOR|FOREACH|FORSTEP|IFT|IFTE|MSGFAIL|NRETURN|RETHROW|RETURN|SWITCH|TRY|UDF|UNTIL|WHILE)\b/,number:/[+-]?\b(?:NaN|Infinity|\d+(?:\.\d*)?(?:[Ee][+-]?\d+)?|0x[\da-fA-F]+|0b[01]+)\b/,boolean:/\b(?:F|T|false|true)\b/,punctuation:/<%|%>|[{}[\]()]/,operator:/==|&&?|\|\|?|\*\*?|>>>?|<<|[<>!~]=?|[-/%^]|\+!?|\b(?:AND|NOT|OR)\b/};

View File

@@ -0,0 +1,29 @@
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./node"), exports);
//# sourceMappingURL=index.js.map

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