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 @@
{"version":3,"file":"httpIntegration.d.ts","sourceRoot":"","sources":["../../../../src/light/integrations/httpIntegration.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAkC,cAAc,EAAU,MAAM,WAAW,CAAC;AACxF,OAAO,KAAK,EAAE,WAAW,EAAiB,MAAM,cAAc,CAAC;AA0B/D,MAAM,WAAW,sBAAsB;IACrC;;;;;;OAMG;IACH,iBAAiB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,KAAK,OAAO,CAAC;IAEtE;;;;;;;;;;;;;OAaG;IACH,kBAAkB,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC;IAE5D;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;;;;OAMG;IACH,sBAAsB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,KAAK,OAAO,CAAC;CAC5E;AA4CD;;;;;GAKG;AACH,eAAO,MAAM,eAAe,EAAuB,CAAC,OAAO,CAAC,EAAE,sBAAsB,KAAK,WAAW,GAAG;IACrG,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB,CAAC"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"arrow-up-za.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}

View File

@@ -0,0 +1,28 @@
import type { Cache } from "../cache/core/cache.cjs";
import { entityKind } from "../entity.cjs";
import type { Logger } from "../logger.cjs";
import { PgDatabase } from "../pg-core/db.cjs";
import { PgDialect } from "../pg-core/dialect.cjs";
import type { RelationalSchemaConfig, TablesRelationalConfig } from "../relations.cjs";
import type { DrizzleConfig } from "../utils.cjs";
import type { XataHttpClient, XataHttpQueryResultHKT } from "./session.cjs";
import { XataHttpSession } from "./session.cjs";
export interface XataDriverOptions {
logger?: Logger;
cache?: Cache;
}
export declare class XataHttpDriver {
private client;
private dialect;
private options;
static readonly [entityKind]: string;
constructor(client: XataHttpClient, dialect: PgDialect, options?: XataDriverOptions);
createSession(schema: RelationalSchemaConfig<TablesRelationalConfig> | undefined): XataHttpSession<Record<string, unknown>, TablesRelationalConfig>;
initMappers(): void;
}
export declare class XataHttpDatabase<TSchema extends Record<string, unknown> = Record<string, never>> extends PgDatabase<XataHttpQueryResultHKT, TSchema> {
static readonly [entityKind]: string;
}
export declare function drizzle<TSchema extends Record<string, unknown> = Record<string, never>>(client: XataHttpClient, config?: DrizzleConfig<TSchema>): XataHttpDatabase<TSchema> & {
$client: XataHttpClient;
};

View File

@@ -0,0 +1,88 @@
import type { SourceMapInput } from '@jridgewell/trace-mapping';
import type { DecodedSourceMap, EncodedSourceMap, Pos, Mapping } from './types';
export type { DecodedSourceMap, EncodedSourceMap, Mapping };
export type Options = {
file?: string | null;
sourceRoot?: string | null;
};
/**
* Provides the state to generate a sourcemap.
*/
export declare class GenMapping {
private _names;
private _sources;
private _sourcesContent;
private _mappings;
private _ignoreList;
file: string | null | undefined;
sourceRoot: string | null | undefined;
constructor({ file, sourceRoot }?: Options);
}
/**
* A low-level API to associate a generated position with an original source position. Line and
* column here are 0-based, unlike `addMapping`.
*/
export declare function addSegment(map: GenMapping, genLine: number, genColumn: number, source?: null, sourceLine?: null, sourceColumn?: null, name?: null, content?: null): void;
export declare function addSegment(map: GenMapping, genLine: number, genColumn: number, source: string, sourceLine: number, sourceColumn: number, name?: null, content?: string | null): void;
export declare function addSegment(map: GenMapping, genLine: number, genColumn: number, source: string, sourceLine: number, sourceColumn: number, name: string, content?: string | null): void;
/**
* A high-level API to associate a generated position with an original source position. Line is
* 1-based, but column is 0-based, due to legacy behavior in `source-map` library.
*/
export declare function addMapping(map: GenMapping, mapping: {
generated: Pos;
source?: null;
original?: null;
name?: null;
content?: null;
}): void;
export declare function addMapping(map: GenMapping, mapping: {
generated: Pos;
source: string;
original: Pos;
name?: null;
content?: string | null;
}): void;
export declare function addMapping(map: GenMapping, mapping: {
generated: Pos;
source: string;
original: Pos;
name: string;
content?: string | null;
}): void;
/**
* Same as `addSegment`, but will only add the segment if it generates useful information in the
* resulting map. This only works correctly if segments are added **in order**, meaning you should
* not add a segment with a lower generated line/column than one that came before.
*/
export declare const maybeAddSegment: typeof addSegment;
/**
* Same as `addMapping`, but will only add the mapping if it generates useful information in the
* resulting map. This only works correctly if mappings are added **in order**, meaning you should
* not add a mapping with a lower generated line/column than one that came before.
*/
export declare const maybeAddMapping: typeof addMapping;
/**
* Adds/removes the content of the source file to the source map.
*/
export declare function setSourceContent(map: GenMapping, source: string, content: string | null): void;
export declare function setIgnore(map: GenMapping, source: string, ignore?: boolean): void;
/**
* Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects
* a sourcemap, or to JSON.stringify.
*/
export declare function toDecodedMap(map: GenMapping): DecodedSourceMap;
/**
* Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects
* a sourcemap, or to JSON.stringify.
*/
export declare function toEncodedMap(map: GenMapping): EncodedSourceMap;
/**
* Constructs a new GenMapping, using the already present mappings of the input.
*/
export declare function fromMap(input: SourceMapInput): GenMapping;
/**
* Returns an array of high-level mapping objects for every recorded segment, which could then be
* passed to the `source-map` library.
*/
export declare function allMappings(map: GenMapping): Mapping[];

View File

@@ -0,0 +1,209 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const core = require('@sentry/core');
const debugBuild = require('../debug-build.js');
const eventbuilder = require('../eventbuilder.js');
const helpers = require('../helpers.js');
const INTEGRATION_NAME = 'GlobalHandlers';
const _globalHandlersIntegration = ((options = {}) => {
const _options = {
onerror: true,
onunhandledrejection: true,
...options,
};
return {
name: INTEGRATION_NAME,
setupOnce() {
Error.stackTraceLimit = 50;
},
setup(client) {
if (_options.onerror) {
_installGlobalOnErrorHandler(client);
globalHandlerLog('onerror');
}
if (_options.onunhandledrejection) {
_installGlobalOnUnhandledRejectionHandler(client);
globalHandlerLog('onunhandledrejection');
}
},
};
}) ;
const globalHandlersIntegration = core.defineIntegration(_globalHandlersIntegration);
function _installGlobalOnErrorHandler(client) {
core.addGlobalErrorInstrumentationHandler(data => {
const { stackParser, attachStacktrace } = getOptions();
if (core.getClient() !== client || helpers.shouldIgnoreOnError()) {
return;
}
const { msg, url, line, column, error } = data;
const event = _enhanceEventWithInitialFrame(
eventbuilder.eventFromUnknownInput(stackParser, error || msg, undefined, attachStacktrace, false),
url,
line,
column,
);
event.level = 'error';
core.captureEvent(event, {
originalException: error,
mechanism: {
handled: false,
type: 'auto.browser.global_handlers.onerror',
},
});
});
}
function _installGlobalOnUnhandledRejectionHandler(client) {
core.addGlobalUnhandledRejectionInstrumentationHandler(e => {
const { stackParser, attachStacktrace } = getOptions();
if (core.getClient() !== client || helpers.shouldIgnoreOnError()) {
return;
}
const error = _getUnhandledRejectionError(e);
const event = core.isPrimitive(error)
? _eventFromRejectionWithPrimitive(error)
: eventbuilder.eventFromUnknownInput(stackParser, error, undefined, attachStacktrace, true);
event.level = 'error';
core.captureEvent(event, {
originalException: error,
mechanism: {
handled: false,
type: 'auto.browser.global_handlers.onunhandledrejection',
},
});
});
}
/**
*
*/
function _getUnhandledRejectionError(error) {
if (core.isPrimitive(error)) {
return error;
}
// dig the object of the rejection out of known event types
try {
// PromiseRejectionEvents store the object of the rejection under 'reason'
// see https://developer.mozilla.org/en-US/docs/Web/API/PromiseRejectionEvent
if ('reason' in (error )) {
return (error ).reason;
}
// something, somewhere, (likely a browser extension) effectively casts PromiseRejectionEvents
// to CustomEvents, moving the `promise` and `reason` attributes of the PRE into
// the CustomEvent's `detail` attribute, since they're not part of CustomEvent's spec
// see https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent and
// https://github.com/getsentry/sentry-javascript/issues/2380
if ('detail' in (error ) && 'reason' in (error ).detail) {
return (error ).detail.reason;
}
} catch {} // eslint-disable-line no-empty
return error;
}
/**
* Create an event from a promise rejection where the `reason` is a primitive.
*
* @param reason: The `reason` property of the promise rejection
* @returns An Event object with an appropriate `exception` value
*/
function _eventFromRejectionWithPrimitive(reason) {
return {
exception: {
values: [
{
type: 'UnhandledRejection',
// String() is needed because the Primitive type includes symbols (which can't be automatically stringified)
value: `Non-Error promise rejection captured with value: ${String(reason)}`,
},
],
},
};
}
function _enhanceEventWithInitialFrame(
event,
url,
line,
column,
) {
// event.exception
const e = (event.exception = event.exception || {});
// event.exception.values
const ev = (e.values = e.values || []);
// event.exception.values[0]
const ev0 = (ev[0] = ev[0] || {});
// event.exception.values[0].stacktrace
const ev0s = (ev0.stacktrace = ev0.stacktrace || {});
// event.exception.values[0].stacktrace.frames
const ev0sf = (ev0s.frames = ev0s.frames || []);
const colno = column;
const lineno = line;
const filename = getFilenameFromUrl(url) ?? core.getLocationHref();
// event.exception.values[0].stacktrace.frames
if (ev0sf.length === 0) {
ev0sf.push({
colno,
filename,
function: core.UNKNOWN_FUNCTION,
in_app: true,
lineno,
});
}
return event;
}
function globalHandlerLog(type) {
debugBuild.DEBUG_BUILD && core.debug.log(`Global Handler attached: ${type}`);
}
function getOptions() {
const client = core.getClient();
const options = client?.getOptions() || {
stackParser: () => [],
attachStacktrace: false,
};
return options;
}
function getFilenameFromUrl(url) {
if (!core.isString(url) || url.length === 0) {
return undefined;
}
// Strip data URL content to avoid long base64 strings in stack frames
// (e.g. when initializing a Worker with a base64 encoded script)
// Don't include data prefix for filenames as it's not useful for stack traces
// Wrap with < > to indicate it's a placeholder
if (url.startsWith('data:')) {
return `<${core.stripDataUrlContent(url, false)}>`;
}
return url;
}
exports._eventFromRejectionWithPrimitive = _eventFromRejectionWithPrimitive;
exports._getUnhandledRejectionError = _getUnhandledRejectionError;
exports.globalHandlersIntegration = globalHandlersIntegration;
//# sourceMappingURL=globalhandlers.js.map

View File

@@ -0,0 +1,29 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const KeySquare = createLucideIcon("KeySquare", [
[
"path",
{
d: "M12.4 2.7a2.5 2.5 0 0 1 3.4 0l5.5 5.5a2.5 2.5 0 0 1 0 3.4l-3.7 3.7a2.5 2.5 0 0 1-3.4 0L8.7 9.8a2.5 2.5 0 0 1 0-3.4z",
key: "165ttr"
}
],
["path", { d: "m14 7 3 3", key: "1r5n42" }],
[
"path",
{
d: "m9.4 10.6-6.814 6.814A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814",
key: "1ubxi2"
}
]
]);
export { KeySquare as default };
//# sourceMappingURL=key-square.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"constants.js","sources":["../../../../src/tracing/vercel-ai/constants.ts"],"sourcesContent":["import type { Span } from '../../types-hoist/span';\n\n// Global Map to track tool call IDs to their corresponding spans\n// This allows us to capture tool errors and link them to the correct span\nexport const toolCallSpanMap = new Map<string, Span>();\n\n// Operation sets for efficient mapping to OpenTelemetry semantic convention values\nexport const INVOKE_AGENT_OPS = new Set([\n 'ai.generateText',\n 'ai.streamText',\n 'ai.generateObject',\n 'ai.streamObject',\n 'ai.embed',\n 'ai.embedMany',\n 'ai.rerank',\n]);\n\nexport const GENERATE_CONTENT_OPS = new Set([\n 'ai.generateText.doGenerate',\n 'ai.streamText.doStream',\n 'ai.generateObject.doGenerate',\n 'ai.streamObject.doStream',\n]);\n\nexport const EMBEDDINGS_OPS = new Set(['ai.embed.doEmbed', 'ai.embedMany.doEmbed']);\n\nexport const RERANK_OPS = new Set(['ai.rerank.doRerank']);\n"],"names":[],"mappings":"AAEA;AACA;MACa,eAAA,GAAkB,IAAI,GAAG;;AAEtC;AACO,MAAM,gBAAA,GAAmB,IAAI,GAAG,CAAC;AACxC,EAAE,iBAAiB;AACnB,EAAE,eAAe;AACjB,EAAE,mBAAmB;AACrB,EAAE,iBAAiB;AACnB,EAAE,UAAU;AACZ,EAAE,cAAc;AAChB,EAAE,WAAW;AACb,CAAC;;AAEM,MAAM,oBAAA,GAAuB,IAAI,GAAG,CAAC;AAC5C,EAAE,4BAA4B;AAC9B,EAAE,wBAAwB;AAC1B,EAAE,8BAA8B;AAChC,EAAE,0BAA0B;AAC5B,CAAC;;AAEM,MAAM,cAAA,GAAiB,IAAI,GAAG,CAAC,CAAC,kBAAkB,EAAE,sBAAsB,CAAC;;AAE3E,MAAM,aAAa,IAAI,GAAG,CAAC,CAAC,oBAAoB,CAAC;;;;"}

View File

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

View File

@@ -0,0 +1,27 @@
# truncate-utf8-bytes [![build status](https://secure.travis-ci.org/parshap/truncate-utf8-bytes.svg?branch=master)](http://travis-ci.org/parshap/truncate-utf8-bytes)
Truncate a string to the given length in bytes. Correctly handles
multi-byte characters and surrogate pairs.
A browser implementation that doesn't use `Buffer.byteLength` is
provided to minimize build size.
## Example
```js
var truncate = require("truncate-utf8-bytes")
var str = "a☃" // a = 1 byte, ☃ = 3 bytes
console.log(truncate(str, 2))
// -> "a"
```
## API
### `var truncate = require("truncate-utf8-bytes")`
*When using browserify or webpack*, this automatically resolves to an
implementation that does not use `Buffer.byteLength`.
### `truncate(string, length)`
Returns `string` truncated to at most `length` bytes in length.

View File

@@ -0,0 +1,11 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
'use strict'
const LexicalDevtoolsCore = process.env.NODE_ENV !== 'production' ? require('./LexicalDevtoolsCore.dev.js') : require('./LexicalDevtoolsCore.prod.js');
module.exports = LexicalDevtoolsCore;

View File

@@ -0,0 +1,21 @@
(The MIT License)
Copyright (C) 2011-2015 by Vitaly Puzrin
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,29 @@
"use strict";
exports.startOfHour = startOfHour;
var _index = require("./toDate.js");
/**
* @name startOfHour
* @category Hour Helpers
* @summary Return the start of an hour for the given date.
*
* @description
* Return the start of an hour for the given date.
* The result will be in the local timezone.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param date - The original date
*
* @returns The start of an hour
*
* @example
* // The start of an hour for 2 September 2014 11:55:00:
* const result = startOfHour(new Date(2014, 8, 2, 11, 55))
* //=> Tue Sep 02 2014 11:00:00
*/
function startOfHour(date) {
const _date = (0, _index.toDate)(date);
_date.setMinutes(0, 0, 0);
return _date;
}

View File

@@ -0,0 +1,7 @@
import type {Plugin} from "ajv"
import getDef from "../definitions/regexp"
const regexp: Plugin<undefined> = (ajv) => ajv.addKeyword(getDef())
export default regexp
module.exports = regexp

View File

@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9saWIvb21pdC1wcm9wZXJ0aWVzL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgdHlwZSBPbWl0UHJvcGVydGllczxUeXBlLCBWYWx1ZT4gPSB7IFtLZXkgaW4ga2V5b2YgVHlwZSBhcyBUeXBlW0tleV0gZXh0ZW5kcyBWYWx1ZSA/IG5ldmVyIDogS2V5XTogVHlwZVtLZXldIH07XG4iXX0=

View File

@@ -0,0 +1,2 @@
import { GraphQLScalarType } from 'graphql';
export declare const GraphQLLocalDate: GraphQLScalarType<string, string>;

View File

@@ -0,0 +1,83 @@
/* eslint-disable @typescript-eslint/ban-types */
import { GraphQLScalarType, print } from 'graphql';
import { createGraphQLError } from '../error.js';
import { serializeObject } from './utilities.js';
let warned = false;
function isSafeInteger(val) {
return val <= Number.MAX_SAFE_INTEGER && val >= Number.MIN_SAFE_INTEGER;
}
function serializeSafeBigInt(val) {
if (isSafeInteger(val)) {
return Number(val);
}
if ('toJSON' in BigInt.prototype) {
return val;
}
if (!warned) {
warned = true;
console.warn('By default, BigInts are not serialized to JSON as numbers but instead as strings which may lead an unintegrity in your data. ' +
'To fix this, you can use "json-bigint-patch" to enable correct serialization for BigInts.');
}
return val.toString();
}
export const GraphQLBigIntConfig = /*#__PURE__*/ {
name: 'BigInt',
description: 'The `BigInt` scalar type represents non-fractional signed whole numeric values.',
serialize(outputValue) {
const coercedValue = serializeObject(outputValue);
let num = coercedValue;
if (typeof coercedValue === 'object' && coercedValue != null && 'toString' in coercedValue) {
num = BigInt(coercedValue.toString());
if (num.toString() !== coercedValue.toString()) {
throw createGraphQLError(`BigInt cannot represent non-integer value: ${coercedValue}`);
}
}
if (typeof coercedValue === 'boolean') {
num = BigInt(coercedValue);
}
if (typeof coercedValue === 'string' && coercedValue !== '') {
num = BigInt(coercedValue);
if (num.toString() !== coercedValue) {
throw createGraphQLError(`BigInt cannot represent non-integer value: ${coercedValue}`);
}
}
if (typeof coercedValue === 'number') {
if (!Number.isInteger(coercedValue)) {
throw createGraphQLError(`BigInt cannot represent non-integer value: ${coercedValue}`);
}
num = BigInt(coercedValue);
}
if (typeof num !== 'bigint') {
throw createGraphQLError(`BigInt cannot represent non-integer value: ${coercedValue}`);
}
return serializeSafeBigInt(num);
},
parseValue(inputValue) {
const bigint = BigInt(inputValue.toString());
if (inputValue.toString() !== bigint.toString()) {
throw createGraphQLError(`BigInt cannot represent value: ${inputValue}`);
}
return bigint;
},
parseLiteral(valueNode) {
if (!('value' in valueNode)) {
throw createGraphQLError(`BigInt cannot represent non-integer value: ${print(valueNode)}`, {
nodes: valueNode,
});
}
const strOrBooleanValue = valueNode.value;
const bigint = BigInt(strOrBooleanValue);
if (strOrBooleanValue.toString() !== bigint.toString()) {
throw createGraphQLError(`BigInt cannot represent value: ${strOrBooleanValue}`);
}
return bigint;
},
extensions: {
codegenScalarType: 'bigint',
jsonSchema: {
type: 'integer',
format: 'int64',
},
},
};
export const GraphQLBigInt = /*#__PURE__*/ new GraphQLScalarType(GraphQLBigIntConfig);

View File

@@ -0,0 +1 @@
{"version":3,"file":"handleAfterSendEvent.d.ts","sourceRoot":"","sources":["../../../../src/coreHandlers/handleAfterSendEvent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAc,KAAK,EAAoB,4BAA4B,EAAE,MAAM,cAAc,CAAC;AAEtG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAGhD,KAAK,sBAAsB,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,4BAA4B,KAAK,IAAI,CAAC;AAEjG;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,eAAe,GAAG,sBAAsB,CAqBpF"}

View File

@@ -0,0 +1,3 @@
const singleColorRegex = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;
export { singleColorRegex };

View File

@@ -0,0 +1,69 @@
"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 });
exports.NonRecordingSpan = void 0;
const invalid_span_constants_1 = require("./invalid-span-constants");
/**
* The NonRecordingSpan is the default {@link Span} that is used when no Span
* implementation is available. All operations are no-op including context
* propagation.
*/
class NonRecordingSpan {
constructor(_spanContext = invalid_span_constants_1.INVALID_SPAN_CONTEXT) {
this._spanContext = _spanContext;
}
// Returns a SpanContext.
spanContext() {
return this._spanContext;
}
// By default does nothing
setAttribute(_key, _value) {
return this;
}
// By default does nothing
setAttributes(_attributes) {
return this;
}
// By default does nothing
addEvent(_name, _attributes) {
return this;
}
addLink(_link) {
return this;
}
addLinks(_links) {
return this;
}
// By default does nothing
setStatus(_status) {
return this;
}
// By default does nothing
updateName(_name) {
return this;
}
// By default does nothing
end(_endTime) { }
// isRecording always returns false for NonRecordingSpan.
isRecording() {
return false;
}
// By default does nothing
recordException(_exception, _time) { }
}
exports.NonRecordingSpan = NonRecordingSpan;
//# sourceMappingURL=NonRecordingSpan.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"prepareRecordingData.d.ts","sourceRoot":"","sources":["../../../../src/util/prepareRecordingData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAExD;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,aAAa,EACb,OAAO,GACR,EAAE;IACD,aAAa,EAAE,mBAAmB,CAAC;IACnC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC,GAAG,mBAAmB,CAoBtB"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"folder-clock.js","sources":["../../../src/icons/folder-clock.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name FolderClock\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxNiIgY3k9IjE2IiByPSI2IiAvPgogIDxwYXRoIGQ9Ik03IDIwSDRhMiAyIDAgMCAxLTItMlY1YTIgMiAwIDAgMSAyLTJoMy45YTIgMiAwIDAgMSAxLjY5LjlsLjgxIDEuMmEyIDIgMCAwIDAgMS42Ny45SDIwYTIgMiAwIDAgMSAyIDIiIC8+CiAgPHBhdGggZD0iTTE2IDE0djJsMSAxIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/folder-clock\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 FolderClock = createLucideIcon('FolderClock', [\n ['circle', { cx: '16', cy: '16', r: '6', key: 'qoo3c4' }],\n [\n 'path',\n {\n d: 'M7 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2',\n key: '1urifu',\n },\n ],\n ['path', { d: 'M16 14v2l1 1', key: 'xth2jh' }],\n]);\n\nexport default FolderClock;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAc,iBAAiB,aAAe,CAAA,CAAA,CAAA;AAAA,CAClD,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CACxD,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;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,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAgB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC/C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1 @@
module.exports={C:{"5":0.02716,"11":0.0498,"43":0.01358,"52":0.00905,"78":0.00453,"115":0.14486,"118":0.1177,"128":0.00905,"135":0.00453,"136":0.00905,"137":0.00453,"138":0.00453,"139":0.00453,"140":0.09507,"141":0.00453,"142":0.00905,"143":0.01358,"144":0.02716,"145":0.52966,"146":0.76959,_:"2 3 4 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 44 45 46 47 48 49 50 51 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 116 117 119 120 121 122 123 124 125 126 127 129 130 131 132 133 134 147 148 149 3.5 3.6"},D:{"39":0.00905,"40":0.00905,"41":0.00905,"42":0.00905,"43":0.00905,"44":0.00905,"45":0.00905,"46":0.00905,"47":0.00905,"48":0.01358,"49":0.01358,"50":0.00905,"51":0.00905,"52":0.01358,"53":0.00905,"54":0.00905,"55":0.00905,"56":0.00905,"57":0.00905,"58":0.00905,"59":0.00905,"60":0.00905,"66":0.01811,"69":0.03622,"78":0.00453,"79":0.06791,"80":0.00905,"81":0.00905,"83":0.04074,"85":0.00905,"86":0.00905,"87":0.02716,"88":0.00453,"91":0.01358,"92":0.00905,"93":0.00905,"97":0.00905,"98":0.04527,"99":0.01811,"101":0.01358,"102":0.00905,"103":0.10865,"104":0.05432,"105":0.24899,"106":0.12223,"107":0.19013,"108":0.09959,"109":0.71979,"110":0.09959,"111":0.14486,"112":1.62972,"113":0.00905,"114":0.11318,"115":0.03169,"116":0.14939,"117":0.14939,"118":0.06338,"119":0.02264,"120":0.27162,"121":0.05432,"122":0.16297,"123":0.09507,"124":0.13128,"125":0.58851,"126":0.73337,"127":0.12676,"128":0.07696,"129":0.06791,"130":0.17203,"131":0.36669,"132":0.08601,"133":0.20372,"134":0.14486,"135":0.06791,"136":0.05885,"137":0.08149,"138":0.27162,"139":3.59897,"140":0.27162,"141":0.60209,"142":6.09787,"143":8.50171,"144":0.03622,"145":0.00905,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 61 62 63 64 65 67 68 70 71 72 73 74 75 76 77 84 89 90 94 95 96 100 146"},F:{"92":0.00905,"93":0.08149,"95":0.02716,"122":0.00453,"123":0.00905,"124":0.56135,"125":0.2173,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 94 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"92":0.00905,"109":0.03169,"114":0.00453,"120":0.02264,"122":0.00905,"126":0.00453,"127":0.00453,"130":0.00453,"131":0.01811,"132":0.00453,"133":0.00905,"134":0.00905,"135":0.01358,"136":0.00905,"137":0.01358,"138":0.02264,"139":0.01811,"140":0.03622,"141":0.06791,"142":1.10912,"143":2.8339,_:"12 13 14 15 16 17 18 79 80 81 83 84 85 86 87 88 89 90 91 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 110 111 112 113 115 116 117 118 119 121 123 124 125 128 129"},E:{"14":0.00905,_:"0 4 5 6 7 8 9 10 11 12 13 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 12.1 15.1 15.2-15.3 26.3","11.1":0.00453,"13.1":0.01811,"14.1":0.02264,"15.4":0.00453,"15.5":0.00905,"15.6":0.08149,"16.0":0.00453,"16.1":0.00905,"16.2":0.00905,"16.3":0.01811,"16.4":0.00905,"16.5":0.01358,"16.6":0.13581,"17.0":0.00453,"17.1":0.09054,"17.2":0.00905,"17.3":0.01358,"17.4":0.02264,"17.5":0.04074,"17.6":0.14939,"18.0":0.00905,"18.1":0.02264,"18.2":0.01358,"18.3":0.0498,"18.4":0.02716,"18.5-18.6":0.10412,"26.0":0.06338,"26.1":0.36216,"26.2":0.09054},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00245,"5.0-5.1":0,"6.0-6.1":0.0049,"7.0-7.1":0.00367,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.00979,"10.0-10.2":0.00122,"10.3":0.01714,"11.0-11.2":0.21058,"11.3-11.4":0.00612,"12.0-12.1":0.0049,"12.2-12.5":0.05509,"13.0-13.1":0.00122,"13.2":0.00857,"13.3":0.00245,"13.4-13.7":0.00857,"14.0-14.4":0.01714,"14.5-14.8":0.01836,"15.0-15.1":0.01959,"15.2-15.3":0.01469,"15.4":0.01592,"15.5":0.01714,"15.6-15.8":0.26568,"16.0":0.03061,"16.1":0.05877,"16.2":0.03061,"16.3":0.05509,"16.4":0.01347,"16.5":0.02326,"16.6-16.7":0.34526,"17.0":0.01959,"17.1":0.03183,"17.2":0.02326,"17.3":0.0355,"17.4":0.05999,"17.5":0.11753,"17.6-17.7":0.2718,"18.0":0.06122,"18.1":0.12733,"18.2":0.06734,"18.3":0.21915,"18.4":0.11264,"18.5-18.7":8.08779,"26.0":0.15794,"26.1":1.31368,"26.2":0.24976,"26.3":0.01102},P:{"21":0.01079,"22":0.01079,"23":0.02159,"24":0.02159,"25":0.02159,"26":0.04317,"27":0.04317,"28":0.12952,"29":1.62976,_:"4 20 5.0-5.4 6.2-6.4 7.2-7.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0"},I:{"0":0.55189,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0.00011,"4.4":0,"4.4.3-4.4.4":0.00044},A:{"8":0.01975,"9":0.05926,"11":0.35558,_:"6 7 10 5.5"},K:{"0":0.83021,_:"10 11 12 11.1 11.5 12.1"},N:{_:"10 11"},S:{"2.5":0.01642,_:"3.0-3.1"},J:{_:"7 10"},Q:{"14.9":0.15324},O:{"0":0.49804},H:{"0":0.04},L:{"0":44.12129},R:{_:"0"},M:{"0":0.30649}};

View File

@@ -0,0 +1,8 @@
import { IPropertyListDescriptor } from '../IPropertyDescriptor';
export declare const enum BACKGROUND_ORIGIN {
BORDER_BOX = 0,
PADDING_BOX = 1,
CONTENT_BOX = 2
}
export declare type BackgroundOrigin = BACKGROUND_ORIGIN[];
export declare const backgroundOrigin: IPropertyListDescriptor<BackgroundOrigin>;

View File

@@ -0,0 +1,911 @@
[
"AbortController",
"AbortSignal",
"AbsoluteOrientationSensor",
"AbstractRange",
"Accelerometer",
"AI",
"AICreateMonitor",
"AITextSession",
"AnalyserNode",
"Animation",
"AnimationEffect",
"AnimationEvent",
"AnimationPlaybackEvent",
"AnimationTimeline",
"AsyncDisposableStack",
"Attr",
"Audio",
"AudioBuffer",
"AudioBufferSourceNode",
"AudioContext",
"AudioData",
"AudioDecoder",
"AudioDestinationNode",
"AudioEncoder",
"AudioListener",
"AudioNode",
"AudioParam",
"AudioParamMap",
"AudioProcessingEvent",
"AudioScheduledSourceNode",
"AudioSinkInfo",
"AudioWorklet",
"AudioWorkletGlobalScope",
"AudioWorkletNode",
"AudioWorkletProcessor",
"AuthenticatorAssertionResponse",
"AuthenticatorAttestationResponse",
"AuthenticatorResponse",
"BackgroundFetchManager",
"BackgroundFetchRecord",
"BackgroundFetchRegistration",
"BarcodeDetector",
"BarProp",
"BaseAudioContext",
"BatteryManager",
"BeforeUnloadEvent",
"BiquadFilterNode",
"Blob",
"BlobEvent",
"Bluetooth",
"BluetoothCharacteristicProperties",
"BluetoothDevice",
"BluetoothRemoteGATTCharacteristic",
"BluetoothRemoteGATTDescriptor",
"BluetoothRemoteGATTServer",
"BluetoothRemoteGATTService",
"BluetoothUUID",
"BroadcastChannel",
"BrowserCaptureMediaStreamTrack",
"ByteLengthQueuingStrategy",
"Cache",
"CacheStorage",
"CanvasCaptureMediaStream",
"CanvasCaptureMediaStreamTrack",
"CanvasGradient",
"CanvasPattern",
"CanvasRenderingContext2D",
"CaptureController",
"CaretPosition",
"CDATASection",
"ChannelMergerNode",
"ChannelSplitterNode",
"ChapterInformation",
"CharacterBoundsUpdateEvent",
"CharacterData",
"Clipboard",
"ClipboardEvent",
"ClipboardItem",
"CloseEvent",
"CloseWatcher",
"CommandEvent",
"Comment",
"CompositionEvent",
"CompressionStream",
"ConstantSourceNode",
"ContentVisibilityAutoStateChangeEvent",
"ConvolverNode",
"CookieChangeEvent",
"CookieDeprecationLabel",
"CookieStore",
"CookieStoreManager",
"CountQueuingStrategy",
"Credential",
"CredentialsContainer",
"CropTarget",
"Crypto",
"CryptoKey",
"CSPViolationReportBody",
"CSS",
"CSSAnimation",
"CSSConditionRule",
"CSSContainerRule",
"CSSCounterStyleRule",
"CSSFontFaceRule",
"CSSFontFeatureValuesRule",
"CSSFontPaletteValuesRule",
"CSSGroupingRule",
"CSSImageValue",
"CSSImportRule",
"CSSKeyframeRule",
"CSSKeyframesRule",
"CSSKeywordValue",
"CSSLayerBlockRule",
"CSSLayerStatementRule",
"CSSMarginRule",
"CSSMathClamp",
"CSSMathInvert",
"CSSMathMax",
"CSSMathMin",
"CSSMathNegate",
"CSSMathProduct",
"CSSMathSum",
"CSSMathValue",
"CSSMatrixComponent",
"CSSMediaRule",
"CSSNamespaceRule",
"CSSNestedDeclarations",
"CSSNumericArray",
"CSSNumericValue",
"CSSPageDescriptors",
"CSSPageRule",
"CSSPerspective",
"CSSPositionTryDescriptors",
"CSSPositionTryRule",
"CSSPositionValue",
"CSSPropertyRule",
"CSSRotate",
"CSSRule",
"CSSRuleList",
"CSSScale",
"CSSScopeRule",
"CSSSkew",
"CSSSkewX",
"CSSSkewY",
"CSSStartingStyleRule",
"CSSStyleDeclaration",
"CSSStyleRule",
"CSSStyleSheet",
"CSSStyleValue",
"CSSSupportsRule",
"CSSTransformComponent",
"CSSTransformValue",
"CSSTransition",
"CSSTranslate",
"CSSUnitValue",
"CSSUnparsedValue",
"CSSVariableReferenceValue",
"CSSViewTransitionRule",
"CustomElementRegistry",
"CustomEvent",
"CustomStateSet",
"DataTransfer",
"DataTransferItem",
"DataTransferItemList",
"DecompressionStream",
"DelayNode",
"DelegatedInkTrailPresenter",
"DeviceMotionEvent",
"DeviceMotionEventAcceleration",
"DeviceMotionEventRotationRate",
"DeviceOrientationEvent",
"DevicePosture",
"DisposableStack",
"Document",
"DocumentFragment",
"DocumentPictureInPicture",
"DocumentPictureInPictureEvent",
"DocumentTimeline",
"DocumentType",
"DOMError",
"DOMException",
"DOMImplementation",
"DOMMatrix",
"DOMMatrixReadOnly",
"DOMParser",
"DOMPoint",
"DOMPointReadOnly",
"DOMQuad",
"DOMRect",
"DOMRectList",
"DOMRectReadOnly",
"DOMStringList",
"DOMStringMap",
"DOMTokenList",
"DragEvent",
"DynamicsCompressorNode",
"EditContext",
"Element",
"ElementInternals",
"EncodedAudioChunk",
"EncodedVideoChunk",
"ErrorEvent",
"Event",
"EventCounts",
"EventSource",
"EventTarget",
"External",
"EyeDropper",
"FeaturePolicy",
"FederatedCredential",
"Fence",
"FencedFrameConfig",
"FetchLaterResult",
"File",
"FileList",
"FileReader",
"FileSystem",
"FileSystemDirectoryEntry",
"FileSystemDirectoryHandle",
"FileSystemDirectoryReader",
"FileSystemEntry",
"FileSystemFileEntry",
"FileSystemFileHandle",
"FileSystemHandle",
"FileSystemObserver",
"FileSystemWritableFileStream",
"FocusEvent",
"FontData",
"FontFace",
"FontFaceSet",
"FontFaceSetLoadEvent",
"FormData",
"FormDataEvent",
"FragmentDirective",
"GainNode",
"Gamepad",
"GamepadAxisMoveEvent",
"GamepadButton",
"GamepadButtonEvent",
"GamepadEvent",
"GamepadHapticActuator",
"GamepadPose",
"Geolocation",
"GeolocationCoordinates",
"GeolocationPosition",
"GeolocationPositionError",
"GPU",
"GPUAdapter",
"GPUAdapterInfo",
"GPUBindGroup",
"GPUBindGroupLayout",
"GPUBuffer",
"GPUBufferUsage",
"GPUCanvasContext",
"GPUColorWrite",
"GPUCommandBuffer",
"GPUCommandEncoder",
"GPUCompilationInfo",
"GPUCompilationMessage",
"GPUComputePassEncoder",
"GPUComputePipeline",
"GPUDevice",
"GPUDeviceLostInfo",
"GPUError",
"GPUExternalTexture",
"GPUInternalError",
"GPUMapMode",
"GPUOutOfMemoryError",
"GPUPipelineError",
"GPUPipelineLayout",
"GPUQuerySet",
"GPUQueue",
"GPURenderBundle",
"GPURenderBundleEncoder",
"GPURenderPassEncoder",
"GPURenderPipeline",
"GPUSampler",
"GPUShaderModule",
"GPUShaderStage",
"GPUSupportedFeatures",
"GPUSupportedLimits",
"GPUTexture",
"GPUTextureUsage",
"GPUTextureView",
"GPUUncapturedErrorEvent",
"GPUValidationError",
"GravitySensor",
"Gyroscope",
"HashChangeEvent",
"Headers",
"HID",
"HIDConnectionEvent",
"HIDDevice",
"HIDInputReportEvent",
"Highlight",
"HighlightRegistry",
"History",
"HTMLAllCollection",
"HTMLAnchorElement",
"HTMLAreaElement",
"HTMLAudioElement",
"HTMLBaseElement",
"HTMLBodyElement",
"HTMLBRElement",
"HTMLButtonElement",
"HTMLCanvasElement",
"HTMLCollection",
"HTMLDataElement",
"HTMLDataListElement",
"HTMLDetailsElement",
"HTMLDialogElement",
"HTMLDirectoryElement",
"HTMLDivElement",
"HTMLDListElement",
"HTMLDocument",
"HTMLElement",
"HTMLEmbedElement",
"HTMLFencedFrameElement",
"HTMLFieldSetElement",
"HTMLFontElement",
"HTMLFormControlsCollection",
"HTMLFormElement",
"HTMLFrameElement",
"HTMLFrameSetElement",
"HTMLHeadElement",
"HTMLHeadingElement",
"HTMLHRElement",
"HTMLHtmlElement",
"HTMLIFrameElement",
"HTMLImageElement",
"HTMLInputElement",
"HTMLLabelElement",
"HTMLLegendElement",
"HTMLLIElement",
"HTMLLinkElement",
"HTMLMapElement",
"HTMLMarqueeElement",
"HTMLMediaElement",
"HTMLMenuElement",
"HTMLMetaElement",
"HTMLMeterElement",
"HTMLModElement",
"HTMLObjectElement",
"HTMLOListElement",
"HTMLOptGroupElement",
"HTMLOptionElement",
"HTMLOptionsCollection",
"HTMLOutputElement",
"HTMLParagraphElement",
"HTMLParamElement",
"HTMLPictureElement",
"HTMLPreElement",
"HTMLProgressElement",
"HTMLQuoteElement",
"HTMLScriptElement",
"HTMLSelectedContentElement",
"HTMLSelectElement",
"HTMLSlotElement",
"HTMLSourceElement",
"HTMLSpanElement",
"HTMLStyleElement",
"HTMLTableCaptionElement",
"HTMLTableCellElement",
"HTMLTableColElement",
"HTMLTableElement",
"HTMLTableRowElement",
"HTMLTableSectionElement",
"HTMLTemplateElement",
"HTMLTextAreaElement",
"HTMLTimeElement",
"HTMLTitleElement",
"HTMLTrackElement",
"HTMLUListElement",
"HTMLUnknownElement",
"HTMLVideoElement",
"IDBCursor",
"IDBCursorWithValue",
"IDBDatabase",
"IDBFactory",
"IDBIndex",
"IDBKeyRange",
"IDBObjectStore",
"IDBOpenDBRequest",
"IDBRequest",
"IDBTransaction",
"IDBVersionChangeEvent",
"IdentityCredential",
"IdentityCredentialError",
"IdentityProvider",
"IdleDeadline",
"IdleDetector",
"IIRFilterNode",
"Image",
"ImageBitmap",
"ImageBitmapRenderingContext",
"ImageCapture",
"ImageData",
"ImageDecoder",
"ImageTrack",
"ImageTrackList",
"Ink",
"InputDeviceCapabilities",
"InputDeviceInfo",
"InputEvent",
"IntersectionObserver",
"IntersectionObserverEntry",
"Keyboard",
"KeyboardEvent",
"KeyboardLayoutMap",
"KeyframeEffect",
"LanguageDetector",
"LargestContentfulPaint",
"LaunchParams",
"LaunchQueue",
"LayoutShift",
"LayoutShiftAttribution",
"LinearAccelerationSensor",
"Location",
"Lock",
"LockManager",
"MathMLElement",
"MediaCapabilities",
"MediaCapabilitiesInfo",
"MediaDeviceInfo",
"MediaDevices",
"MediaElementAudioSourceNode",
"MediaEncryptedEvent",
"MediaError",
"MediaKeyError",
"MediaKeyMessageEvent",
"MediaKeys",
"MediaKeySession",
"MediaKeyStatusMap",
"MediaKeySystemAccess",
"MediaList",
"MediaMetadata",
"MediaQueryList",
"MediaQueryListEvent",
"MediaRecorder",
"MediaRecorderErrorEvent",
"MediaSession",
"MediaSource",
"MediaSourceHandle",
"MediaStream",
"MediaStreamAudioDestinationNode",
"MediaStreamAudioSourceNode",
"MediaStreamEvent",
"MediaStreamTrack",
"MediaStreamTrackAudioSourceNode",
"MediaStreamTrackAudioStats",
"MediaStreamTrackEvent",
"MediaStreamTrackGenerator",
"MediaStreamTrackProcessor",
"MediaStreamTrackVideoStats",
"MessageChannel",
"MessageEvent",
"MessagePort",
"MIDIAccess",
"MIDIConnectionEvent",
"MIDIInput",
"MIDIInputMap",
"MIDIMessageEvent",
"MIDIOutput",
"MIDIOutputMap",
"MIDIPort",
"MimeType",
"MimeTypeArray",
"ModelGenericSession",
"ModelManager",
"MouseEvent",
"MutationEvent",
"MutationObserver",
"MutationRecord",
"NamedNodeMap",
"NavigateEvent",
"Navigation",
"NavigationActivation",
"NavigationCurrentEntryChangeEvent",
"NavigationDestination",
"NavigationHistoryEntry",
"NavigationPreloadManager",
"NavigationTransition",
"Navigator",
"NavigatorLogin",
"NavigatorManagedData",
"NavigatorUAData",
"NetworkInformation",
"Node",
"NodeFilter",
"NodeIterator",
"NodeList",
"Notification",
"NotifyPaintEvent",
"NotRestoredReasonDetails",
"NotRestoredReasons",
"Observable",
"OfflineAudioCompletionEvent",
"OfflineAudioContext",
"OffscreenCanvas",
"OffscreenCanvasRenderingContext2D",
"Option",
"OrientationSensor",
"OscillatorNode",
"OTPCredential",
"OverconstrainedError",
"PageRevealEvent",
"PageSwapEvent",
"PageTransitionEvent",
"PannerNode",
"PasswordCredential",
"Path2D",
"PaymentAddress",
"PaymentManager",
"PaymentMethodChangeEvent",
"PaymentRequest",
"PaymentRequestUpdateEvent",
"PaymentResponse",
"Performance",
"PerformanceElementTiming",
"PerformanceEntry",
"PerformanceEventTiming",
"PerformanceLongAnimationFrameTiming",
"PerformanceLongTaskTiming",
"PerformanceMark",
"PerformanceMeasure",
"PerformanceNavigation",
"PerformanceNavigationTiming",
"PerformanceObserver",
"PerformanceObserverEntryList",
"PerformancePaintTiming",
"PerformanceResourceTiming",
"PerformanceScriptTiming",
"PerformanceServerTiming",
"PerformanceTiming",
"PeriodicSyncManager",
"PeriodicWave",
"Permissions",
"PermissionStatus",
"PERSISTENT",
"PictureInPictureEvent",
"PictureInPictureWindow",
"Plugin",
"PluginArray",
"PointerEvent",
"PopStateEvent",
"Presentation",
"PresentationAvailability",
"PresentationConnection",
"PresentationConnectionAvailableEvent",
"PresentationConnectionCloseEvent",
"PresentationConnectionList",
"PresentationReceiver",
"PresentationRequest",
"PressureObserver",
"PressureRecord",
"ProcessingInstruction",
"Profiler",
"ProgressEvent",
"PromiseRejectionEvent",
"ProtectedAudience",
"PublicKeyCredential",
"PushManager",
"PushSubscription",
"PushSubscriptionOptions",
"RadioNodeList",
"Range",
"ReadableByteStreamController",
"ReadableStream",
"ReadableStreamBYOBReader",
"ReadableStreamBYOBRequest",
"ReadableStreamDefaultController",
"ReadableStreamDefaultReader",
"RelativeOrientationSensor",
"RemotePlayback",
"ReportBody",
"ReportingObserver",
"Request",
"ResizeObserver",
"ResizeObserverEntry",
"ResizeObserverSize",
"Response",
"RestrictionTarget",
"RTCCertificate",
"RTCDataChannel",
"RTCDataChannelEvent",
"RTCDtlsTransport",
"RTCDTMFSender",
"RTCDTMFToneChangeEvent",
"RTCEncodedAudioFrame",
"RTCEncodedVideoFrame",
"RTCError",
"RTCErrorEvent",
"RTCIceCandidate",
"RTCIceTransport",
"RTCPeerConnection",
"RTCPeerConnectionIceErrorEvent",
"RTCPeerConnectionIceEvent",
"RTCRtpReceiver",
"RTCRtpScriptTransform",
"RTCRtpSender",
"RTCRtpTransceiver",
"RTCSctpTransport",
"RTCSessionDescription",
"RTCStatsReport",
"RTCTrackEvent",
"Scheduler",
"Scheduling",
"Screen",
"ScreenDetailed",
"ScreenDetails",
"ScreenOrientation",
"ScriptProcessorNode",
"ScrollTimeline",
"SecurityPolicyViolationEvent",
"Selection",
"Sensor",
"SensorErrorEvent",
"Serial",
"SerialPort",
"ServiceWorker",
"ServiceWorkerContainer",
"ServiceWorkerRegistration",
"ShadowRoot",
"SharedStorage",
"SharedStorageAppendMethod",
"SharedStorageClearMethod",
"SharedStorageDeleteMethod",
"SharedStorageModifierMethod",
"SharedStorageSetMethod",
"SharedStorageWorklet",
"SharedWorker",
"SnapEvent",
"SourceBuffer",
"SourceBufferList",
"SpeechSynthesis",
"SpeechSynthesisErrorEvent",
"SpeechSynthesisEvent",
"SpeechSynthesisUtterance",
"SpeechSynthesisVoice",
"StaticRange",
"StereoPannerNode",
"Storage",
"StorageBucket",
"StorageBucketManager",
"StorageEvent",
"StorageManager",
"StylePropertyMap",
"StylePropertyMapReadOnly",
"StyleSheet",
"StyleSheetList",
"SubmitEvent",
"Subscriber",
"SubtleCrypto",
"SuppressedError",
"SVGAElement",
"SVGAngle",
"SVGAnimatedAngle",
"SVGAnimatedBoolean",
"SVGAnimatedEnumeration",
"SVGAnimatedInteger",
"SVGAnimatedLength",
"SVGAnimatedLengthList",
"SVGAnimatedNumber",
"SVGAnimatedNumberList",
"SVGAnimatedPreserveAspectRatio",
"SVGAnimatedRect",
"SVGAnimatedString",
"SVGAnimatedTransformList",
"SVGAnimateElement",
"SVGAnimateMotionElement",
"SVGAnimateTransformElement",
"SVGAnimationElement",
"SVGCircleElement",
"SVGClipPathElement",
"SVGComponentTransferFunctionElement",
"SVGDefsElement",
"SVGDescElement",
"SVGElement",
"SVGEllipseElement",
"SVGFEBlendElement",
"SVGFEColorMatrixElement",
"SVGFEComponentTransferElement",
"SVGFECompositeElement",
"SVGFEConvolveMatrixElement",
"SVGFEDiffuseLightingElement",
"SVGFEDisplacementMapElement",
"SVGFEDistantLightElement",
"SVGFEDropShadowElement",
"SVGFEFloodElement",
"SVGFEFuncAElement",
"SVGFEFuncBElement",
"SVGFEFuncGElement",
"SVGFEFuncRElement",
"SVGFEGaussianBlurElement",
"SVGFEImageElement",
"SVGFEMergeElement",
"SVGFEMergeNodeElement",
"SVGFEMorphologyElement",
"SVGFEOffsetElement",
"SVGFEPointLightElement",
"SVGFESpecularLightingElement",
"SVGFESpotLightElement",
"SVGFETileElement",
"SVGFETurbulenceElement",
"SVGFilterElement",
"SVGForeignObjectElement",
"SVGGElement",
"SVGGeometryElement",
"SVGGradientElement",
"SVGGraphicsElement",
"SVGImageElement",
"SVGLength",
"SVGLengthList",
"SVGLinearGradientElement",
"SVGLineElement",
"SVGMarkerElement",
"SVGMaskElement",
"SVGMatrix",
"SVGMetadataElement",
"SVGMPathElement",
"SVGNumber",
"SVGNumberList",
"SVGPathElement",
"SVGPatternElement",
"SVGPoint",
"SVGPointList",
"SVGPolygonElement",
"SVGPolylineElement",
"SVGPreserveAspectRatio",
"SVGRadialGradientElement",
"SVGRect",
"SVGRectElement",
"SVGScriptElement",
"SVGSetElement",
"SVGStopElement",
"SVGStringList",
"SVGStyleElement",
"SVGSVGElement",
"SVGSwitchElement",
"SVGSymbolElement",
"SVGTextContentElement",
"SVGTextElement",
"SVGTextPathElement",
"SVGTextPositioningElement",
"SVGTitleElement",
"SVGTransform",
"SVGTransformList",
"SVGTSpanElement",
"SVGUnitTypes",
"SVGUseElement",
"SVGViewElement",
"SyncManager",
"TaskAttributionTiming",
"TaskController",
"TaskPriorityChangeEvent",
"TaskSignal",
"TEMPORARY",
"Text",
"TextDecoder",
"TextDecoderStream",
"TextEncoder",
"TextEncoderStream",
"TextEvent",
"TextFormat",
"TextFormatUpdateEvent",
"TextMetrics",
"TextTrack",
"TextTrackCue",
"TextTrackCueList",
"TextTrackList",
"TextUpdateEvent",
"TimeEvent",
"TimeRanges",
"ToggleEvent",
"Touch",
"TouchEvent",
"TouchList",
"TrackEvent",
"TransformStream",
"TransformStreamDefaultController",
"TransitionEvent",
"TreeWalker",
"TrustedHTML",
"TrustedScript",
"TrustedScriptURL",
"TrustedTypePolicy",
"TrustedTypePolicyFactory",
"UIEvent",
"URL",
"URLPattern",
"URLSearchParams",
"USB",
"USBAlternateInterface",
"USBConfiguration",
"USBConnectionEvent",
"USBDevice",
"USBEndpoint",
"USBInterface",
"USBInTransferResult",
"USBIsochronousInTransferPacket",
"USBIsochronousInTransferResult",
"USBIsochronousOutTransferPacket",
"USBIsochronousOutTransferResult",
"USBOutTransferResult",
"UserActivation",
"ValidityState",
"VideoColorSpace",
"VideoDecoder",
"VideoEncoder",
"VideoFrame",
"VideoPlaybackQuality",
"ViewTimeline",
"ViewTransition",
"ViewTransitionTypeSet",
"VirtualKeyboard",
"VirtualKeyboardGeometryChangeEvent",
"VisibilityStateEntry",
"VisualViewport",
"VTTCue",
"VTTRegion",
"WakeLock",
"WakeLockSentinel",
"WaveShaperNode",
"WebAssembly",
"WebGL2RenderingContext",
"WebGLActiveInfo",
"WebGLBuffer",
"WebGLContextEvent",
"WebGLFramebuffer",
"WebGLObject",
"WebGLProgram",
"WebGLQuery",
"WebGLRenderbuffer",
"WebGLRenderingContext",
"WebGLSampler",
"WebGLShader",
"WebGLShaderPrecisionFormat",
"WebGLSync",
"WebGLTexture",
"WebGLTransformFeedback",
"WebGLUniformLocation",
"WebGLVertexArrayObject",
"WebSocket",
"WebSocketError",
"WebSocketStream",
"WebTransport",
"WebTransportBidirectionalStream",
"WebTransportDatagramDuplexStream",
"WebTransportError",
"WebTransportReceiveStream",
"WebTransportSendStream",
"WGSLLanguageFeatures",
"WheelEvent",
"Window",
"WindowControlsOverlay",
"WindowControlsOverlayGeometryChangeEvent",
"Worker",
"Worklet",
"WorkletGlobalScope",
"WritableStream",
"WritableStreamDefaultController",
"WritableStreamDefaultWriter",
"XMLDocument",
"XMLHttpRequest",
"XMLHttpRequestEventTarget",
"XMLHttpRequestUpload",
"XMLSerializer",
"XPathEvaluator",
"XPathExpression",
"XPathResult",
"XRAnchor",
"XRAnchorSet",
"XRBoundedReferenceSpace",
"XRCamera",
"XRCPUDepthInformation",
"XRDepthInformation",
"XRDOMOverlayState",
"XRFrame",
"XRHand",
"XRHitTestResult",
"XRHitTestSource",
"XRInputSource",
"XRInputSourceArray",
"XRInputSourceEvent",
"XRInputSourcesChangeEvent",
"XRJointPose",
"XRJointSpace",
"XRLayer",
"XRLightEstimate",
"XRLightProbe",
"XRPose",
"XRRay",
"XRReferenceSpace",
"XRReferenceSpaceEvent",
"XRRenderState",
"XRRigidTransform",
"XRSession",
"XRSessionEvent",
"XRSpace",
"XRSystem",
"XRTransientInputHitTestResult",
"XRTransientInputHitTestSource",
"XRView",
"XRViewerPose",
"XRViewport",
"XRWebGLBinding",
"XRWebGLDepthInformation",
"XRWebGLLayer",
"XSLTProcessor"
]

View File

@@ -0,0 +1,39 @@
/*
* 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.
*/
/**
* @deprecated use the one declared in @opentelemetry/sdk-trace-base instead.
* A sampling decision that determines how a {@link Span} will be recorded
* and collected.
*/
export var SamplingDecision;
(function (SamplingDecision) {
/**
* `Span.isRecording() === false`, span will not be recorded and all events
* and attributes will be dropped.
*/
SamplingDecision[SamplingDecision["NOT_RECORD"] = 0] = "NOT_RECORD";
/**
* `Span.isRecording() === true`, but `Sampled` flag in {@link TraceFlags}
* MUST NOT be set.
*/
SamplingDecision[SamplingDecision["RECORD"] = 1] = "RECORD";
/**
* `Span.isRecording() === true` AND `Sampled` flag in {@link TraceFlags}
* MUST be set.
*/
SamplingDecision[SamplingDecision["RECORD_AND_SAMPLED"] = 2] = "RECORD_AND_SAMPLED";
})(SamplingDecision || (SamplingDecision = {}));
//# sourceMappingURL=SamplingResult.js.map

View File

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

View File

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

View File

@@ -0,0 +1,57 @@
import { defaultAccess } from '../auth/defaultAccess.js';
export const lockedDocumentsCollectionSlug = 'payload-locked-documents';
export const getLockedDocumentsCollection = (config)=>{
const lockableCollections = config.collections.filter((collectionConfig)=>collectionConfig.lockDocuments !== false).map((collectionConfig)=>collectionConfig.slug);
const lockableGlobals = config.globals ? config.globals.filter((globalConfig)=>globalConfig.lockDocuments !== false) : [];
const authCollections = config.collections.filter((collectionConfig)=>collectionConfig.auth).map((collectionConfig)=>collectionConfig.slug);
// If there are no lockable collections AND no lockable globals, don't create the collection
if (lockableCollections.length === 0 && lockableGlobals.length === 0) {
return null;
}
// If there are no auth collections, we can't track who locked the document
// so we shouldn't create the locked-documents collection
if (authCollections.length === 0) {
return null;
}
const fields = [];
// Only include the document field if there are lockable collections
if (lockableCollections.length > 0) {
fields.push({
name: 'document',
type: 'relationship',
index: true,
maxDepth: 0,
relationTo: lockableCollections
});
}
// Always include globalSlug field for tracking global locks
fields.push({
name: 'globalSlug',
type: 'text',
index: true
});
// Always include user field
fields.push({
name: 'user',
type: 'relationship',
maxDepth: 1,
relationTo: authCollections,
required: true
});
return {
slug: lockedDocumentsCollectionSlug,
access: {
create: defaultAccess,
delete: defaultAccess,
read: defaultAccess,
update: defaultAccess
},
admin: {
hidden: true
},
fields,
lockDocuments: false
};
};
//# sourceMappingURL=config.js.map

View File

@@ -0,0 +1,190 @@
const formatDistanceLocale = {
lessThanXSeconds: {
one: {
standalone: "manje od 1 sekunde",
withPrepositionAgo: "manje od 1 sekunde",
withPrepositionIn: "manje od 1 sekundu",
},
dual: "manje od {{count}} sekunde",
other: "manje od {{count}} sekundi",
},
xSeconds: {
one: {
standalone: "1 sekunda",
withPrepositionAgo: "1 sekunde",
withPrepositionIn: "1 sekundu",
},
dual: "{{count}} sekunde",
other: "{{count}} sekundi",
},
halfAMinute: "pola minute",
lessThanXMinutes: {
one: {
standalone: "manje od 1 minute",
withPrepositionAgo: "manje od 1 minute",
withPrepositionIn: "manje od 1 minutu",
},
dual: "manje od {{count}} minute",
other: "manje od {{count}} minuta",
},
xMinutes: {
one: {
standalone: "1 minuta",
withPrepositionAgo: "1 minute",
withPrepositionIn: "1 minutu",
},
dual: "{{count}} minute",
other: "{{count}} minuta",
},
aboutXHours: {
one: {
standalone: "oko 1 sat",
withPrepositionAgo: "oko 1 sat",
withPrepositionIn: "oko 1 sat",
},
dual: "oko {{count}} sata",
other: "oko {{count}} sati",
},
xHours: {
one: {
standalone: "1 sat",
withPrepositionAgo: "1 sat",
withPrepositionIn: "1 sat",
},
dual: "{{count}} sata",
other: "{{count}} sati",
},
xDays: {
one: {
standalone: "1 dan",
withPrepositionAgo: "1 dan",
withPrepositionIn: "1 dan",
},
dual: "{{count}} dana",
other: "{{count}} dana",
},
aboutXWeeks: {
one: {
standalone: "oko 1 nedelju",
withPrepositionAgo: "oko 1 nedelju",
withPrepositionIn: "oko 1 nedelju",
},
dual: "oko {{count}} nedelje",
other: "oko {{count}} nedelje",
},
xWeeks: {
one: {
standalone: "1 nedelju",
withPrepositionAgo: "1 nedelju",
withPrepositionIn: "1 nedelju",
},
dual: "{{count}} nedelje",
other: "{{count}} nedelje",
},
aboutXMonths: {
one: {
standalone: "oko 1 mesec",
withPrepositionAgo: "oko 1 mesec",
withPrepositionIn: "oko 1 mesec",
},
dual: "oko {{count}} meseca",
other: "oko {{count}} meseci",
},
xMonths: {
one: {
standalone: "1 mesec",
withPrepositionAgo: "1 mesec",
withPrepositionIn: "1 mesec",
},
dual: "{{count}} meseca",
other: "{{count}} meseci",
},
aboutXYears: {
one: {
standalone: "oko 1 godinu",
withPrepositionAgo: "oko 1 godinu",
withPrepositionIn: "oko 1 godinu",
},
dual: "oko {{count}} godine",
other: "oko {{count}} godina",
},
xYears: {
one: {
standalone: "1 godina",
withPrepositionAgo: "1 godine",
withPrepositionIn: "1 godinu",
},
dual: "{{count}} godine",
other: "{{count}} godina",
},
overXYears: {
one: {
standalone: "preko 1 godinu",
withPrepositionAgo: "preko 1 godinu",
withPrepositionIn: "preko 1 godinu",
},
dual: "preko {{count}} godine",
other: "preko {{count}} godina",
},
almostXYears: {
one: {
standalone: "gotovo 1 godinu",
withPrepositionAgo: "gotovo 1 godinu",
withPrepositionIn: "gotovo 1 godinu",
},
dual: "gotovo {{count}} godine",
other: "gotovo {{count}} godina",
},
};
export const formatDistance = (token, count, options) => {
let result;
const tokenValue = formatDistanceLocale[token];
if (typeof tokenValue === "string") {
result = tokenValue;
} else if (count === 1) {
if (options?.addSuffix) {
if (options.comparison && options.comparison > 0) {
result = tokenValue.one.withPrepositionIn;
} else {
result = tokenValue.one.withPrepositionAgo;
}
} else {
result = tokenValue.one.standalone;
}
} else if (
count % 10 > 1 &&
count % 10 < 5 && // if last digit is between 2 and 4
String(count).substr(-2, 1) !== "1" // unless the 2nd to last digit is "1"
) {
result = tokenValue.dual.replace("{{count}}", String(count));
} else {
result = tokenValue.other.replace("{{count}}", String(count));
}
if (options?.addSuffix) {
if (options.comparison && options.comparison > 0) {
return "za " + result;
} else {
return "pre " + result;
}
}
return result;
};

View File

@@ -0,0 +1,21 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = isImmutable;
var _isType = require("./isType.js");
var _index = require("./generated/index.js");
function isImmutable(node) {
if ((0, _isType.default)(node.type, "Immutable")) return true;
if ((0, _index.isIdentifier)(node)) {
if (node.name === "undefined") {
return true;
} else {
return false;
}
}
return false;
}
//# sourceMappingURL=isImmutable.js.map

View File

@@ -0,0 +1,34 @@
import { addMonths } from "./addMonths.js";
/**
* The {@link addQuarters} function options.
*/
/**
* @name addQuarters
* @category Quarter Helpers
* @summary Add the specified number of year quarters to the given date.
*
* @description
* Add the specified number of year quarters to the given date.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
*
* @param date - The date to be changed
* @param amount - The amount of quarters to be added.
* @param options - An object with options
*
* @returns The new date with the quarters added
*
* @example
* // Add 1 quarter to 1 September 2014:
* const result = addQuarters(new Date(2014, 8, 1), 1)
* //=; Mon Dec 01 2014 00:00:00
*/
export function addQuarters(date, amount, options) {
return addMonths(date, amount * 3, options);
}
// Fallback for modularized imports:
export default addQuarters;

View File

@@ -0,0 +1,81 @@
import { memoize, strategies } from "@formatjs/fast-memoize";
export function repeat(s, times) {
if (typeof s.repeat === "function") {
return s.repeat(times);
}
const arr = Array.from({ length: times });
for (let i = 0; i < arr.length; i++) {
arr[i] = s;
}
return arr.join("");
}
export function setInternalSlot(map, pl, field, value) {
if (!map.get(pl)) {
map.set(pl, Object.create(null));
}
const slots = map.get(pl);
slots[field] = value;
}
export function setMultiInternalSlots(map, pl, props) {
for (const k of Object.keys(props)) {
setInternalSlot(map, pl, k, props[k]);
}
}
export function getInternalSlot(map, pl, field) {
return getMultiInternalSlots(map, pl, field)[field];
}
export function getMultiInternalSlots(map, pl, ...fields) {
const slots = map.get(pl);
if (!slots) {
throw new TypeError(`${pl} InternalSlot has not been initialized`);
}
return fields.reduce((all, f) => {
all[f] = slots[f];
return all;
}, Object.create(null));
}
export function isLiteralPart(patternPart) {
return patternPart.type === "literal";
}
/*
17 ECMAScript Standard Built-in Objects:
Every built-in Function object, including constructors, that is not
identified as an anonymous function has a name property whose value
is a String.
Unless otherwise specified, the name property of a built-in Function
object, if it exists, has the attributes { [[Writable]]: false,
[[Enumerable]]: false, [[Configurable]]: true }.
*/
export function defineProperty(target, name, { value }) {
Object.defineProperty(target, name, {
configurable: true,
enumerable: false,
writable: true,
value
});
}
/**
* 7.3.5 CreateDataProperty
* @param target
* @param name
* @param value
*/
export function createDataProperty(target, name, value) {
Object.defineProperty(target, name, {
configurable: true,
enumerable: true,
writable: true,
value
});
}
export const UNICODE_EXTENSION_SEQUENCE_REGEX = /-u(?:-[0-9a-z]{2,8})+/gi;
export function invariant(condition, message, Err = Error) {
if (!condition) {
throw new Err(message);
}
}
export const createMemoizedNumberFormat = memoize((...args) => new Intl.NumberFormat(...args), { strategy: strategies.variadic });
export const createMemoizedPluralRules = memoize((...args) => new Intl.PluralRules(...args), { strategy: strategies.variadic });
export const createMemoizedLocale = memoize((...args) => new Intl.Locale(...args), { strategy: strategies.variadic });
export const createMemoizedListFormat = memoize((...args) => new Intl.ListFormat(...args), { strategy: strategies.variadic });

View File

@@ -0,0 +1,33 @@
'use strict'
let Container = require('./container')
let LazyResult, Processor
class Document extends Container {
constructor(defaults) {
// type needs to be passed to super, otherwise child roots won't be normalized correctly
super({ type: 'document', ...defaults })
if (!this.nodes) {
this.nodes = []
}
}
toResult(opts = {}) {
let lazy = new LazyResult(new Processor(), this, opts)
return lazy.stringify()
}
}
Document.registerLazyResult = dependant => {
LazyResult = dependant
}
Document.registerProcessor = dependant => {
Processor = dependant
}
module.exports = Document
Document.default = Document

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"moduleMetadata.js","sources":["../../../src/integrations/moduleMetadata.ts"],"sourcesContent":["import { defineIntegration } from '../integration';\nimport { addMetadataToStackFrames, stripMetadataFromStackFrames } from '../metadata';\nimport type { EventItem } from '../types-hoist/envelope';\nimport { forEachEnvelopeItem } from '../utils/envelope';\n\n/**\n * Adds module metadata to stack frames.\n *\n * Metadata can be injected by the Sentry bundler plugins using the `moduleMetadata` config option.\n *\n * When this integration is added, the metadata passed to the bundler plugin is added to the stack frames of all events\n * under the `module_metadata` property. This can be used to help in tagging or routing of events from different teams\n * our sources\n */\nexport const moduleMetadataIntegration = defineIntegration(() => {\n return {\n name: 'ModuleMetadata',\n setup(client) {\n // We need to strip metadata from stack frames before sending them to Sentry since these are client side only.\n client.on('beforeEnvelope', envelope => {\n forEachEnvelopeItem(envelope, (item, type) => {\n if (type === 'event') {\n const event = Array.isArray(item) ? (item as EventItem)[1] : undefined;\n\n if (event) {\n stripMetadataFromStackFrames(event);\n item[1] = event;\n }\n }\n });\n });\n\n client.on('applyFrameMetadata', event => {\n // Only apply stack frame metadata to error events\n if (event.type) {\n return;\n }\n\n const stackParser = client.getOptions().stackParser;\n addMetadataToStackFrames(stackParser, event);\n });\n },\n };\n});\n"],"names":[],"mappings":";;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;MACa,yBAAA,GAA4B,iBAAiB,CAAC,MAAM;AACjE,EAAE,OAAO;AACT,IAAI,IAAI,EAAE,gBAAgB;AAC1B,IAAI,KAAK,CAAC,MAAM,EAAE;AAClB;AACA,MAAM,MAAM,CAAC,EAAE,CAAC,gBAAgB,EAAE,YAAY;AAC9C,QAAQ,mBAAmB,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK;AACtD,UAAU,IAAI,IAAA,KAAS,OAAO,EAAE;AAChC,YAAY,MAAM,KAAA,GAAQ,KAAK,CAAC,OAAO,CAAC,IAAI,CAAA,GAAI,CAAC,IAAA,GAAmB,CAAC,CAAA,GAAI,SAAS;;AAElF,YAAY,IAAI,KAAK,EAAE;AACvB,cAAc,4BAA4B,CAAC,KAAK,CAAC;AACjD,cAAc,IAAI,CAAC,CAAC,CAAA,GAAI,KAAK;AAC7B,YAAY;AACZ,UAAU;AACV,QAAQ,CAAC,CAAC;AACV,MAAM,CAAC,CAAC;;AAER,MAAM,MAAM,CAAC,EAAE,CAAC,oBAAoB,EAAE,SAAS;AAC/C;AACA,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE;AACxB,UAAU;AACV,QAAQ;;AAER,QAAQ,MAAM,cAAc,MAAM,CAAC,UAAU,EAAE,CAAC,WAAW;AAC3D,QAAQ,wBAAwB,CAAC,WAAW,EAAE,KAAK,CAAC;AACpD,MAAM,CAAC,CAAC;AACR,IAAI,CAAC;AACL,GAAG;AACH,CAAC;;;;"}

View File

@@ -0,0 +1,42 @@
import { getSortedMessages, setNestedProperty } from '../../utils.js';
import { defineCodec } from '../ExtractorCodec.js';
var JSONCodec = defineCodec(() => ({
decode(source) {
const json = JSON.parse(source);
const messages = [];
traverseMessages(json, (message, id) => {
messages.push({
id,
message
});
});
return messages;
},
encode(messages) {
const root = {};
for (const message of getSortedMessages(messages)) {
setNestedProperty(root, message.id, message.message);
}
return JSON.stringify(root, null, 2) + '\n';
},
toJSONString(source) {
return source;
}
}));
function traverseMessages(obj, callback, path = '') {
const NAMESPACE_SEPARATOR = '.';
for (const key of Object.keys(obj)) {
const newPath = path ? path + NAMESPACE_SEPARATOR + key : key;
const value = obj[key];
if (typeof value === 'string') {
callback(value, newPath);
} else if (Array.isArray(value)) {
throw new Error(`Message at \`${newPath}\` resolved to an array, but only strings are supported. See https://next-intl.dev/docs/usage/translations#arrays-of-messages`);
} else if (typeof value === 'object') {
traverseMessages(value, callback, newPath);
}
}
}
export { JSONCodec as default };

View File

@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9saWIvcHJlZGljYXRlLXR5cGUvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IFByZWRpY2F0ZUZ1bmN0aW9uIH0gZnJvbSBcIi4uL3ByZWRpY2F0ZS1mdW5jdGlvblwiO1xuXG5leHBvcnQgdHlwZSBQcmVkaWNhdGVUeXBlPFR5cGUgZXh0ZW5kcyBQcmVkaWNhdGVGdW5jdGlvbj4gPSBUeXBlIGV4dGVuZHMgKFxuICB0YXJnZXQ6IGFueSxcbiAgLi4ucmVzdDogYW55W11cbikgPT4gdGFyZ2V0IGlzIGluZmVyIE5hcnJvd2VkVHlwZVxuICA/IE5hcnJvd2VkVHlwZVxuICA6IG5ldmVyO1xuIl19

View File

@@ -0,0 +1,494 @@
'use strict'
process.env.TZ = 'UTC'
const { Writable } = require('node:stream')
const { describe, test, afterEach, beforeEach } = require('node:test')
const pino = require('pino')
const semver = require('semver')
const serializers = pino.stdSerializers
const pinoPretty = require('../')
const _prettyFactory = pinoPretty.prettyFactory
function prettyFactory (opts) {
if (!opts) {
opts = { colorize: false }
} else if (!Object.prototype.hasOwnProperty.call(opts, 'colorize')) {
opts.colorize = false
}
return _prettyFactory(opts)
}
// All dates are computed from 'Fri, 30 Mar 2018 17:35:28 GMT'
const epoch = 1522431328992
const formattedEpoch = '17:35:28.992'
const pid = process.pid
describe('error like objects tests', () => {
beforeEach(() => {
Date.originalNow = Date.now
Date.now = () => epoch
})
afterEach(() => {
Date.now = Date.originalNow
delete Date.originalNow
})
test('pino transform prettifies Error', (t) => {
t.plan(2)
const pretty = prettyFactory()
const err = Error('hello world')
const expected = err.stack.split('\n')
expected.unshift(err.message)
const log = pino({}, new Writable({
write (chunk, enc, cb) {
const formatted = pretty(chunk.toString())
const lines = formatted.split('\n')
t.assert.strictEqual(lines.length, expected.length + 6)
t.assert.strictEqual(lines[0], `[${formattedEpoch}] INFO (${pid}): hello world`)
cb()
}
}))
log.info(err)
})
test('errorProps recognizes user specified properties', (t) => {
t.plan(3)
const pretty = prettyFactory({ errorProps: 'statusCode,originalStack' })
const log = pino({}, new Writable({
write (chunk, enc, cb) {
const formatted = pretty(chunk.toString())
t.assert.match(formatted, /\s{4}error stack/)
t.assert.match(formatted, /"statusCode": 500/)
t.assert.match(formatted, /"originalStack": "original stack"/)
cb()
}
}))
const error = Error('error message')
error.stack = 'error stack'
error.statusCode = 500
error.originalStack = 'original stack'
log.error(error)
})
test('prettifies ignores undefined errorLikeObject', (t) => {
const pretty = prettyFactory()
pretty({ err: undefined })
pretty({ error: undefined })
})
test('prettifies Error in property within errorLikeObjectKeys', (t) => {
t.plan(8)
const pretty = prettyFactory({
errorLikeObjectKeys: ['err']
})
const err = Error('hello world')
const expected = err.stack.split('\n')
expected.unshift(err.message)
const log = pino({ serializers: { err: serializers.err } }, new Writable({
write (chunk, enc, cb) {
const formatted = pretty(chunk.toString())
const lines = formatted.split('\n')
t.assert.strictEqual(lines.length, expected.length + 6)
t.assert.strictEqual(lines[0], `[${formattedEpoch}] INFO (${pid}): hello world`)
t.assert.match(lines[1], /\s{4}err: {/)
t.assert.match(lines[2], /\s{6}"type": "Error",/)
t.assert.match(lines[3], /\s{6}"message": "hello world",/)
t.assert.match(lines[4], /\s{6}"stack":/)
t.assert.match(lines[5], /\s{6}Error: hello world/)
// Node 12 labels the test `<anonymous>`
t.assert.match(lines[6], /\s{10}at TestContext.<anonymous>/)
cb()
}
}))
log.info({ err })
})
test('prettifies Error in property with singleLine=true', (t) => {
// singleLine=true doesn't apply to errors
t.plan(8)
const pretty = prettyFactory({
singleLine: true,
errorLikeObjectKeys: ['err']
})
const err = Error('hello world')
const expected = [
'{"extra":{"a":1,"b":2}}',
err.message,
...err.stack.split('\n')
]
const log = pino({ serializers: { err: serializers.err } }, new Writable({
write (chunk, enc, cb) {
const formatted = pretty(chunk.toString())
const lines = formatted.split('\n')
t.assert.strictEqual(lines.length, expected.length + 5)
t.assert.strictEqual(lines[0], `[${formattedEpoch}] INFO (${pid}): hello world {"extra":{"a":1,"b":2}}`)
t.assert.match(lines[1], /\s{4}err: {/)
t.assert.match(lines[2], /\s{6}"type": "Error",/)
t.assert.match(lines[3], /\s{6}"message": "hello world",/)
t.assert.match(lines[4], /\s{6}"stack":/)
t.assert.match(lines[5], /\s{6}Error: hello world/)
// Node 12 labels the test `<anonymous>`
t.assert.match(lines[6], /\s{10}at TestContext.<anonymous>/)
cb()
}
}))
log.info({ err, extra: { a: 1, b: 2 } })
})
test('prettifies Error in property within errorLikeObjectKeys with custom function', (t) => {
t.plan(4)
const pretty = prettyFactory({
errorLikeObjectKeys: ['err'],
customPrettifiers: {
err: val => `error is ${val.message}`
}
})
const err = Error('hello world')
err.stack = 'Error: hello world\n at anonymous (C:\\project\\node_modules\\example\\index.js)'
const expected = err.stack.split('\n')
expected.unshift(err.message)
const log = pino({ serializers: { err: serializers.err } }, new Writable({
write (chunk, enc, cb) {
const formatted = pretty(chunk.toString())
const lines = formatted.split('\n')
t.assert.strictEqual(lines.length, 3)
t.assert.strictEqual(lines[0], `[${formattedEpoch}] INFO (${pid}): hello world`)
t.assert.strictEqual(lines[1], ' err: error is hello world')
t.assert.strictEqual(lines[2], '')
cb()
}
}))
log.info({ err })
})
test('prettifies Error in property within errorLikeObjectKeys when stack has escaped characters', (t) => {
t.plan(8)
const pretty = prettyFactory({
errorLikeObjectKeys: ['err']
})
const err = Error('hello world')
err.stack = 'Error: hello world\n at anonymous (C:\\project\\node_modules\\example\\index.js)'
const expected = err.stack.split('\n')
expected.unshift(err.message)
const log = pino({ serializers: { err: serializers.err } }, new Writable({
write (chunk, enc, cb) {
const formatted = pretty(chunk.toString())
const lines = formatted.split('\n')
t.assert.strictEqual(lines.length, expected.length + 6)
t.assert.strictEqual(lines[0], `[${formattedEpoch}] INFO (${pid}): hello world`)
t.assert.match(lines[1], /\s{4}err: {$/)
t.assert.match(lines[2], /\s{6}"type": "Error",$/)
t.assert.match(lines[3], /\s{6}"message": "hello world",$/)
t.assert.match(lines[4], /\s{6}"stack":$/)
t.assert.match(lines[5], /\s{10}Error: hello world$/)
t.assert.match(lines[6], /\s{10}at anonymous \(C:\\project\\node_modules\\example\\index.js\)$/)
cb()
}
}))
log.info({ err })
})
test('prettifies Error in property within errorLikeObjectKeys when stack is not the last property', (t) => {
t.plan(9)
const pretty = prettyFactory({
errorLikeObjectKeys: ['err']
})
const err = Error('hello world')
err.anotherField = 'dummy value'
const expected = err.stack.split('\n')
expected.unshift(err.message)
const log = pino({ serializers: { err: serializers.err } }, new Writable({
write (chunk, enc, cb) {
const formatted = pretty(chunk.toString())
const lines = formatted.split('\n')
t.assert.strictEqual(lines.length, expected.length + 7)
t.assert.strictEqual(lines[0], `[${formattedEpoch}] INFO (${pid}): hello world`)
t.assert.match(lines[1], /\s{4}err: {/)
t.assert.match(lines[2], /\s{6}"type": "Error",/)
t.assert.match(lines[3], /\s{6}"message": "hello world",/)
t.assert.match(lines[4], /\s{6}"stack":/)
t.assert.match(lines[5], /\s{6}Error: hello world/)
// Node 12 labels the test `<anonymous>`
t.assert.match(lines[6], /\s{10}at TestContext.<anonymous>/)
t.assert.match(lines[lines.length - 3], /\s{6}"anotherField": "dummy value"/)
cb()
}
}))
log.info({ err })
})
test('errorProps flag with "*" (print all nested props)', function (t) {
const pretty = prettyFactory({ errorProps: '*' })
const expectedLines = [
' err: {',
' "type": "Error",',
' "message": "error message",',
' "stack":',
' error stack',
' "statusCode": 500,',
' "originalStack": "original stack",',
' "dataBaseSpecificError": {',
' "erroMessage": "some database error message",',
' "evenMoreSpecificStuff": {',
' "someErrorRelatedObject": "error"',
' }',
' }',
' }'
]
t.plan(expectedLines.length)
const log = pino({}, new Writable({
write (chunk, enc, cb) {
const formatted = pretty(chunk.toString())
const lines = formatted.split('\n')
lines.shift(); lines.pop()
for (let i = 0; i < lines.length; i += 1) {
t.assert.strictEqual(lines[i], expectedLines[i])
}
cb()
}
}))
const error = Error('error message')
error.stack = 'error stack'
error.statusCode = 500
error.originalStack = 'original stack'
error.dataBaseSpecificError = {
erroMessage: 'some database error message',
evenMoreSpecificStuff: {
someErrorRelatedObject: 'error'
}
}
log.error(error)
})
test('prettifies legacy error object at top level when singleLine=true', function (t) {
t.plan(4)
const pretty = prettyFactory({ singleLine: true })
const err = Error('hello world')
const expected = err.stack.split('\n')
expected.unshift(err.message)
const log = pino({}, new Writable({
write (chunk, enc, cb) {
const formatted = pretty(chunk.toString())
const lines = formatted.split('\n')
t.assert.strictEqual(lines.length, expected.length + 1)
t.assert.strictEqual(lines[0], `[${formattedEpoch}] INFO (${pid}): ${expected[0]}`)
t.assert.strictEqual(lines[1], ` ${expected[1]}`)
t.assert.strictEqual(lines[2], ` ${expected[2]}`)
cb()
}
}))
log.info({ type: 'Error', stack: err.stack, msg: err.message })
})
test('errorProps: legacy error object at top level', function (t) {
const pretty = prettyFactory({ errorProps: '*' })
const expectedLines = [
'INFO:',
' error stack',
' message: hello message',
' statusCode: 500',
' originalStack: original stack',
' dataBaseSpecificError: {',
' errorMessage: "some database error message"',
' evenMoreSpecificStuff: {',
' "someErrorRelatedObject": "error"',
' }',
' }',
''
]
t.plan(expectedLines.length)
const error = {}
error.level = 30
error.message = 'hello message'
error.type = 'Error'
error.stack = 'error stack'
error.statusCode = 500
error.originalStack = 'original stack'
error.dataBaseSpecificError = {
errorMessage: 'some database error message',
evenMoreSpecificStuff: {
someErrorRelatedObject: 'error'
}
}
const formatted = pretty(JSON.stringify(error))
const lines = formatted.split('\n')
for (let i = 0; i < lines.length; i += 1) {
t.assert.strictEqual(lines[i], expectedLines[i])
}
})
test('errorProps flag with a single property', function (t) {
const pretty = prettyFactory({ errorProps: 'originalStack' })
const expectedLines = [
'INFO:',
' error stack',
' originalStack: original stack',
''
]
t.plan(expectedLines.length)
const error = {}
error.level = 30
error.message = 'hello message'
error.type = 'Error'
error.stack = 'error stack'
error.statusCode = 500
error.originalStack = 'original stack'
error.dataBaseSpecificError = {
erroMessage: 'some database error message',
evenMoreSpecificStuff: {
someErrorRelatedObject: 'error'
}
}
const formatted = pretty(JSON.stringify(error))
const lines = formatted.split('\n')
for (let i = 0; i < lines.length; i += 1) {
t.assert.strictEqual(lines[i], expectedLines[i])
}
})
test('errorProps flag with a single property non existent', function (t) {
const pretty = prettyFactory({ errorProps: 'originalStackABC' })
const expectedLines = [
'INFO:',
' error stack',
''
]
t.plan(expectedLines.length)
const error = {}
error.level = 30
error.message = 'hello message'
error.type = 'Error'
error.stack = 'error stack'
error.statusCode = 500
error.originalStack = 'original stack'
error.dataBaseSpecificError = {
erroMessage: 'some database error message',
evenMoreSpecificStuff: {
someErrorRelatedObject: 'error'
}
}
const formatted = pretty(JSON.stringify(error))
const lines = formatted.split('\n')
for (let i = 0; i < lines.length; i += 1) {
t.assert.strictEqual(lines[i], expectedLines[i])
}
})
test('handles errors with a null stack', (t) => {
t.plan(2)
const pretty = prettyFactory()
const log = pino({}, new Writable({
write (chunk, enc, cb) {
const formatted = pretty(chunk.toString())
t.assert.match(formatted, /\s{4}message: "foo"/)
t.assert.match(formatted, /\s{4}stack: null/)
cb()
}
}))
const error = { message: 'foo', stack: null }
log.error(error)
})
test('handles errors with a null stack for Error object', (t) => {
const pretty = prettyFactory()
const expectedLines = [
' "type": "Error",',
' "message": "error message",',
' "stack":',
' ',
' "some": "property"'
]
t.plan(expectedLines.length)
const log = pino({}, new Writable({
write (chunk, enc, cb) {
const formatted = pretty(chunk.toString())
const lines = formatted.split('\n')
lines.shift(); lines.shift(); lines.pop(); lines.pop()
for (let i = 0; i < lines.length; i += 1) {
t.assert.ok(lines[i].includes(expectedLines[i]))
}
cb()
}
}))
const error = Error('error message')
error.stack = null
error.some = 'property'
log.error(error)
})
})
if (semver.gte(pino.version, '8.21.0')) {
describe('using pino config', () => {
beforeEach(() => {
Date.originalNow = Date.now
Date.now = () => epoch
})
afterEach(() => {
Date.now = Date.originalNow
delete Date.originalNow
})
test('prettifies Error in custom errorKey', (t) => {
t.plan(8)
const destination = new Writable({
write (chunk, enc, cb) {
const formatted = chunk.toString()
const lines = formatted.split('\n')
t.assert.strictEqual(lines.length, expected.length + 7)
t.assert.strictEqual(lines[0], `[${formattedEpoch}] INFO (${pid}): hello world`)
t.assert.match(lines[1], /\s{4}customErrorKey: {/)
t.assert.match(lines[2], /\s{6}"type": "Error",/)
t.assert.match(lines[3], /\s{6}"message": "hello world",/)
t.assert.match(lines[4], /\s{6}"stack":/)
t.assert.match(lines[5], /\s{6}Error: hello world/)
// Node 12 labels the test `<anonymous>`
t.assert.match(lines[6], /\s{10}(at Test.await t.test|at Test.<anonymous>)/)
cb()
}
})
const pretty = pinoPretty({
destination,
colorize: false
})
const log = pino({ errorKey: 'customErrorKey' }, pretty)
const err = Error('hello world')
const expected = err.stack.split('\n')
log.info({ customErrorKey: err })
})
})
}

View File

@@ -0,0 +1,94 @@
"use strict";
exports.StandAloneMonthParser = void 0;
var _constants = require("../constants.js");
var _Parser = require("../Parser.js");
var _utils = require("../utils.js");
class StandAloneMonthParser extends _Parser.Parser {
priority = 110;
parse(dateString, token, match) {
const valueCallback = (value) => value - 1;
switch (token) {
// 1, 2, ..., 12
case "L":
return (0, _utils.mapValue)(
(0, _utils.parseNumericPattern)(
_constants.numericPatterns.month,
dateString,
),
valueCallback,
);
// 01, 02, ..., 12
case "LL":
return (0, _utils.mapValue)(
(0, _utils.parseNDigits)(2, dateString),
valueCallback,
);
// 1st, 2nd, ..., 12th
case "Lo":
return (0, _utils.mapValue)(
match.ordinalNumber(dateString, {
unit: "month",
}),
valueCallback,
);
// Jan, Feb, ..., Dec
case "LLL":
return (
match.month(dateString, {
width: "abbreviated",
context: "standalone",
}) ||
match.month(dateString, { width: "narrow", context: "standalone" })
);
// J, F, ..., D
case "LLLLL":
return match.month(dateString, {
width: "narrow",
context: "standalone",
});
// January, February, ..., December
case "LLLL":
default:
return (
match.month(dateString, { width: "wide", context: "standalone" }) ||
match.month(dateString, {
width: "abbreviated",
context: "standalone",
}) ||
match.month(dateString, { width: "narrow", context: "standalone" })
);
}
}
validate(_date, value) {
return value >= 0 && value <= 11;
}
set(date, _flags, value) {
date.setMonth(value, 1);
date.setHours(0, 0, 0, 0);
return date;
}
incompatibleTokens = [
"Y",
"R",
"q",
"Q",
"M",
"w",
"I",
"D",
"i",
"e",
"c",
"t",
"T",
];
}
exports.StandAloneMonthParser = StandAloneMonthParser;

View File

@@ -0,0 +1,6 @@
import { ElementContainer } from '../element-container';
import { Context } from '../../core/context';
export declare class SelectElementContainer extends ElementContainer {
readonly value: string;
constructor(context: Context, element: HTMLSelectElement);
}

View File

@@ -0,0 +1,482 @@
import { minify, _default_options } from "../main.js";
import { parse } from "./parse.js";
import {
AST_Assign,
AST_Array,
AST_Constant,
AST_Node,
AST_PropAccess,
AST_RegExp,
AST_Sequence,
AST_Symbol,
AST_Token,
walk
} from "./ast.js";
import { OutputStream } from "./output.js";
export async function run_cli({ program, packageJson, fs, path }) {
const skip_keys = new Set([ "cname", "parent_scope", "scope", "uses_eval", "uses_with" ]);
var files = {};
var options = {
compress: false,
mangle: false
};
const default_options = await _default_options();
program.version(packageJson.name + " " + packageJson.version);
program.parseArgv = program.parse;
program.parse = undefined;
if (process.argv.includes("ast")) program.helpInformation = describe_ast;
else if (process.argv.includes("options")) program.helpInformation = function() {
var text = [];
for (var option in default_options) {
text.push("--" + (option === "sourceMap" ? "source-map" : option) + " options:");
text.push(format_object(default_options[option]));
text.push("");
}
return text.join("\n");
};
program.option("-p, --parse <options>", "Specify parser options.", parse_js());
program.option("-c, --compress [options]", "Enable compressor/specify compressor options.", parse_js());
program.option("-m, --mangle [options]", "Mangle names/specify mangler options.", parse_js());
program.option("--mangle-props [options]", "Mangle properties/specify mangler options.", parse_js());
program.option("-f, --format [options]", "Format options.", parse_js());
program.option("-b, --beautify [options]", "Alias for --format.", parse_js());
program.option("-o, --output <file>", "Output file (default STDOUT).");
program.option("--comments [filter]", "Preserve copyright comments in the output.");
program.option("--config-file <file>", "Read minify() options from JSON file.");
program.option("-d, --define <expr>[=value]", "Global definitions.", parse_js("define"));
program.option("--ecma <version>", "Specify ECMAScript release: 5, 2015, 2016 or 2017...");
program.option("-e, --enclose [arg[,...][:value[,...]]]", "Embed output in a big function with configurable arguments and values.");
program.option("--ie8", "Support non-standard Internet Explorer 8.");
program.option("--keep-classnames", "Do not mangle/drop class names.");
program.option("--keep-fnames", "Do not mangle/drop function names. Useful for code relying on Function.prototype.name.");
program.option("--module", "Input is an ES6 module");
program.option("--name-cache <file>", "File to hold mangled name mappings.");
program.option("--rename", "Force symbol expansion.");
program.option("--no-rename", "Disable symbol expansion.");
program.option("--safari10", "Support non-standard Safari 10.");
program.option("--source-map [options]", "Enable source map/specify source map options.", parse_js());
program.option("--timings", "Display operations run time on STDERR.");
program.option("--toplevel", "Compress and/or mangle variables in toplevel scope.");
program.option("--wrap <name>", "Embed everything as a function with “exports” corresponding to “name” globally.");
program.arguments("[files...]").parseArgv(process.argv);
if (program.configFile) {
options = JSON.parse(read_file(program.configFile));
}
if (!program.output && program.sourceMap && program.sourceMap.url != "inline") {
fatal("ERROR: cannot write source map to STDOUT");
}
[
"compress",
"enclose",
"ie8",
"mangle",
"module",
"safari10",
"sourceMap",
"toplevel",
"wrap"
].forEach(function(name) {
if (name in program) {
options[name] = program[name];
}
});
if ("ecma" in program) {
if (program.ecma != (program.ecma | 0)) fatal("ERROR: ecma must be an integer");
const ecma = program.ecma | 0;
if (ecma > 5 && ecma < 2015)
options.ecma = ecma + 2009;
else
options.ecma = ecma;
}
if (program.format || program.beautify) {
const chosenOption = program.format || program.beautify;
options.format = typeof chosenOption === "object" ? chosenOption : {};
}
if (program.comments) {
if (typeof options.format != "object") options.format = {};
options.format.comments = typeof program.comments == "string" ? (program.comments == "false" ? false : program.comments) : "some";
}
if (program.define) {
if (typeof options.compress != "object") options.compress = {};
if (typeof options.compress.global_defs != "object") options.compress.global_defs = {};
for (var expr in program.define) {
options.compress.global_defs[expr] = program.define[expr];
}
}
if (program.keepClassnames) {
options.keep_classnames = true;
}
if (program.keepFnames) {
options.keep_fnames = true;
}
if (program.mangleProps) {
if (program.mangleProps.domprops) {
delete program.mangleProps.domprops;
} else {
if (typeof program.mangleProps != "object") program.mangleProps = {};
if (!Array.isArray(program.mangleProps.reserved)) program.mangleProps.reserved = [];
}
if (typeof options.mangle != "object") options.mangle = {};
options.mangle.properties = program.mangleProps;
}
if (program.nameCache) {
options.nameCache = JSON.parse(read_file(program.nameCache, "{}"));
}
if (program.output == "ast") {
options.format = {
ast: true,
code: false
};
}
if (program.parse) {
if (!program.parse.acorn && !program.parse.spidermonkey) {
options.parse = program.parse;
} else if (program.sourceMap && program.sourceMap.content == "inline") {
fatal("ERROR: inline source map only works with built-in parser");
}
}
if (~program.rawArgs.indexOf("--rename")) {
options.rename = true;
} else if (!program.rename) {
options.rename = false;
}
let convert_path = name => name;
if (typeof program.sourceMap == "object" && "base" in program.sourceMap) {
convert_path = function() {
var base = program.sourceMap.base;
delete options.sourceMap.base;
return function(name) {
return path.relative(base, name);
};
}();
}
let filesList;
if (options.files && options.files.length) {
filesList = options.files;
delete options.files;
} else if (program.args.length) {
filesList = program.args;
}
if (filesList) {
simple_glob(filesList).forEach(function(name) {
files[convert_path(name)] = read_file(name);
});
} else {
await new Promise((resolve) => {
var chunks = [];
process.stdin.setEncoding("utf8");
process.stdin.on("data", function(chunk) {
chunks.push(chunk);
}).on("end", function() {
files = [ chunks.join("") ];
resolve();
});
process.stdin.resume();
});
}
await run_cli();
function convert_ast(fn) {
return AST_Node.from_mozilla_ast(Object.keys(files).reduce(fn, null));
}
async function run_cli() {
var content = program.sourceMap && program.sourceMap.content;
if (content && content !== "inline") {
options.sourceMap.content = read_file(content, content);
}
if (program.timings) options.timings = true;
try {
if (program.parse) {
if (program.parse.acorn) {
files = convert_ast(function(toplevel, name) {
return require("acorn").parse(files[name], {
ecmaVersion: 2024,
locations: true,
program: toplevel,
sourceFile: name,
sourceType: options.module || program.parse.module ? "module" : "script"
});
});
} else if (program.parse.spidermonkey) {
files = convert_ast(function(toplevel, name) {
var obj = JSON.parse(files[name]);
if (!toplevel) return obj;
toplevel.body = toplevel.body.concat(obj.body);
return toplevel;
});
}
}
} catch (ex) {
fatal(ex);
}
let result;
try {
result = await minify(files, options, fs);
} catch (ex) {
if (ex.name == "SyntaxError") {
print_error("Parse error at " + ex.filename + ":" + ex.line + "," + ex.col);
var col = ex.col;
var lines = files[ex.filename].split(/\r?\n/);
var line = lines[ex.line - 1];
if (!line && !col) {
line = lines[ex.line - 2];
col = line.length;
}
if (line) {
var limit = 70;
if (col > limit) {
line = line.slice(col - limit);
col = limit;
}
print_error(line.slice(0, 80));
print_error(line.slice(0, col).replace(/\S/g, " ") + "^");
}
}
if (ex.defs) {
print_error("Supported options:");
print_error(format_object(ex.defs));
}
fatal(ex);
return;
}
if (program.output == "ast") {
if (!options.compress && !options.mangle) {
result.ast.figure_out_scope({});
}
console.log(JSON.stringify(result.ast, function(key, value) {
if (value) switch (key) {
case "thedef":
return symdef(value);
case "enclosed":
return value.length ? value.map(symdef) : undefined;
case "variables":
case "globals":
return value.size ? collect_from_map(value, symdef) : undefined;
}
if (skip_keys.has(key)) return;
if (value instanceof AST_Token) return;
if (value instanceof Map) return;
if (value instanceof AST_Node) {
var result = {
_class: "AST_" + value.TYPE
};
if (value.block_scope) {
result.variables = value.block_scope.variables;
result.enclosed = value.block_scope.enclosed;
}
value.CTOR.PROPS.forEach(function(prop) {
if (prop !== "block_scope") {
result[prop] = value[prop];
}
});
return result;
}
return value;
}, 2));
} else if (program.output == "spidermonkey") {
try {
const minified = await minify(
result.code,
{
compress: false,
mangle: false,
format: {
ast: true,
code: false
}
},
fs
);
console.log(JSON.stringify(minified.ast.to_mozilla_ast(), null, 2));
} catch (ex) {
fatal(ex);
return;
}
} else if (program.output) {
fs.mkdirSync(path.dirname(program.output), { recursive: true });
fs.writeFileSync(program.output, result.code);
if (options.sourceMap && options.sourceMap.url !== "inline" && result.map) {
fs.writeFileSync(program.output + ".map", result.map);
}
} else {
console.log(result.code);
}
if (program.nameCache) {
fs.writeFileSync(program.nameCache, JSON.stringify(options.nameCache));
}
if (result.timings) for (var phase in result.timings) {
print_error("- " + phase + ": " + result.timings[phase].toFixed(3) + "s");
}
}
function fatal(message) {
if (message instanceof Error) message = message.stack.replace(/^\S*?Error:/, "ERROR:");
print_error(message);
process.exit(1);
}
// A file glob function that only supports "*" and "?" wildcards in the basename.
// Example: "foo/bar/*baz??.*.js"
// Argument `glob` may be a string or an array of strings.
// Returns an array of strings. Garbage in, garbage out.
function simple_glob(glob) {
if (Array.isArray(glob)) {
return [].concat.apply([], glob.map(simple_glob));
}
if (glob && glob.match(/[*?]/)) {
var dir = path.dirname(glob);
try {
var entries = fs.readdirSync(dir);
} catch (ex) {}
if (entries) {
var pattern = "^" + path.basename(glob)
.replace(/[.+^$[\]\\(){}]/g, "\\$&")
.replace(/\*/g, "[^/\\\\]*")
.replace(/\?/g, "[^/\\\\]") + "$";
var mod = process.platform === "win32" ? "i" : "";
var rx = new RegExp(pattern, mod);
var results = entries.filter(function(name) {
return rx.test(name);
}).map(function(name) {
return path.join(dir, name);
});
if (results.length) return results;
}
}
return [ glob ];
}
function read_file(path, default_value) {
try {
return fs.readFileSync(path, "utf8");
} catch (ex) {
if ((ex.code == "ENOENT" || ex.code == "ENAMETOOLONG") && default_value != null) return default_value;
fatal(ex);
}
}
function parse_js(flag) {
return function(value, options) {
options = options || {};
try {
walk(parse(value, { expression: true }), node => {
if (node instanceof AST_Assign) {
var name = node.left.print_to_string();
var value = node.right;
if (flag) {
options[name] = value;
} else if (value instanceof AST_Array) {
options[name] = value.elements.map(to_string);
} else if (value instanceof AST_RegExp) {
value = value.value;
options[name] = new RegExp(value.source, value.flags);
} else {
options[name] = to_string(value);
}
return true;
}
if (node instanceof AST_Symbol || node instanceof AST_PropAccess) {
var name = node.print_to_string();
options[name] = true;
return true;
}
if (!(node instanceof AST_Sequence)) throw node;
function to_string(value) {
return value instanceof AST_Constant ? value.getValue() : value.print_to_string({
quote_keys: true
});
}
});
} catch(ex) {
if (flag) {
fatal("Error parsing arguments for '" + flag + "': " + value);
} else {
options[value] = null;
}
}
return options;
};
}
function symdef(def) {
var ret = (1e6 + def.id) + " " + def.name;
if (def.mangled_name) ret += " " + def.mangled_name;
return ret;
}
function collect_from_map(map, callback) {
var result = [];
map.forEach(function (def) {
result.push(callback(def));
});
return result;
}
function format_object(obj) {
var lines = [];
var padding = "";
Object.keys(obj).map(function(name) {
if (padding.length < name.length) padding = Array(name.length + 1).join(" ");
return [ name, JSON.stringify(obj[name]) ];
}).forEach(function(tokens) {
lines.push(" " + tokens[0] + padding.slice(tokens[0].length - 2) + tokens[1]);
});
return lines.join("\n");
}
function print_error(msg) {
process.stderr.write(msg);
process.stderr.write("\n");
}
function describe_ast() {
var out = OutputStream({ beautify: true });
function doitem(ctor) {
out.print("AST_" + ctor.TYPE);
const props = ctor.SELF_PROPS.filter(prop => !/^\$/.test(prop));
if (props.length > 0) {
out.space();
out.with_parens(function() {
props.forEach(function(prop, i) {
if (i) out.space();
out.print(prop);
});
});
}
if (ctor.documentation) {
out.space();
out.print_string(ctor.documentation);
}
if (ctor.SUBCLASSES.length > 0) {
out.space();
out.with_block(function() {
ctor.SUBCLASSES.forEach(function(ctor) {
out.indent();
doitem(ctor);
out.newline();
});
});
}
}
doitem(AST_Node);
return out + "\n";
}
}

View File

@@ -0,0 +1,240 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const {
JAVASCRIPT_MODULE_TYPE_AUTO,
JAVASCRIPT_MODULE_TYPE_DYNAMIC,
JAVASCRIPT_MODULE_TYPE_ESM
} = require("./ModuleTypeConstants");
const RuntimeGlobals = require("./RuntimeGlobals");
const ConstDependency = require("./dependencies/ConstDependency");
/** @typedef {import("estree").CallExpression} CallExpression */
/** @typedef {import("./Compiler")} Compiler */
/** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */
/** @typedef {import("./dependencies/ContextDependency")} ContextDependency */
/** @typedef {import("./javascript/JavascriptParser")} JavascriptParser */
/** @typedef {import("./javascript/JavascriptParser").Range} Range */
/**
* @typedef {object} CompatibilitySettingsDeclaration
* @property {boolean} updated
* @property {DependencyLocation} loc
* @property {Range} range
*/
/**
* @typedef {object} CompatibilitySettings
* @property {string} name
* @property {CompatibilitySettingsDeclaration} declaration
*/
const nestedWebpackIdentifierTag = Symbol("nested webpack identifier");
const PLUGIN_NAME = "CompatibilityPlugin";
class CompatibilityPlugin {
/**
* Apply the plugin
* @param {Compiler} compiler the compiler instance
* @returns {void}
*/
apply(compiler) {
compiler.hooks.compilation.tap(
PLUGIN_NAME,
(compilation, { normalModuleFactory }) => {
compilation.dependencyTemplates.set(
ConstDependency,
new ConstDependency.Template()
);
normalModuleFactory.hooks.parser
.for(JAVASCRIPT_MODULE_TYPE_AUTO)
.tap(PLUGIN_NAME, (parser, parserOptions) => {
if (
parserOptions.browserify !== undefined &&
!parserOptions.browserify
) {
return;
}
parser.hooks.call.for("require").tap(
PLUGIN_NAME,
/**
* @param {CallExpression} expr call expression
* @returns {boolean | void} true when need to handle
*/
(expr) => {
// support for browserify style require delegator: "require(o, !0)"
if (expr.arguments.length !== 2) return;
const second = parser.evaluateExpression(expr.arguments[1]);
if (!second.isBoolean()) return;
if (second.asBool() !== true) return;
const dep = new ConstDependency(
"require",
/** @type {Range} */ (expr.callee.range)
);
dep.loc = /** @type {DependencyLocation} */ (expr.loc);
if (parser.state.current.dependencies.length > 0) {
const last =
/** @type {ContextDependency} */
(
parser.state.current.dependencies[
parser.state.current.dependencies.length - 1
]
);
if (
last.critical &&
last.options &&
last.options.request === "." &&
last.userRequest === "." &&
last.options.recursive
) {
parser.state.current.dependencies.pop();
}
}
parser.state.module.addPresentationalDependency(dep);
return true;
}
);
});
/**
* @param {JavascriptParser} parser the parser
* @returns {void}
*/
const handler = (parser) => {
// Handle nested requires
parser.hooks.preStatement.tap(PLUGIN_NAME, (statement) => {
if (
statement.type === "FunctionDeclaration" &&
statement.id &&
statement.id.name === RuntimeGlobals.require
) {
const newName = `__nested_webpack_require_${
/** @type {Range} */
(statement.range)[0]
}__`;
parser.tagVariable(
statement.id.name,
nestedWebpackIdentifierTag,
{
name: newName,
declaration: {
updated: false,
loc: /** @type {DependencyLocation} */ (statement.id.loc),
range: /** @type {Range} */ (statement.id.range)
}
}
);
return true;
}
});
parser.hooks.pattern
.for(RuntimeGlobals.require)
.tap(PLUGIN_NAME, (pattern) => {
const newName = `__nested_webpack_require_${
/** @type {Range} */ (pattern.range)[0]
}__`;
parser.tagVariable(pattern.name, nestedWebpackIdentifierTag, {
name: newName,
declaration: {
updated: false,
loc: /** @type {DependencyLocation} */ (pattern.loc),
range: /** @type {Range} */ (pattern.range)
}
});
if (!parser.scope.topLevelScope) {
return true;
}
});
parser.hooks.pattern
.for(RuntimeGlobals.exports)
.tap(PLUGIN_NAME, (pattern) => {
const newName = "__nested_webpack_exports__";
parser.tagVariable(pattern.name, nestedWebpackIdentifierTag, {
name: newName,
declaration: {
updated: false,
loc: /** @type {DependencyLocation} */ (pattern.loc),
range: /** @type {Range} */ (pattern.range)
}
});
return true;
});
// Update single `var __webpack_require__ = {};` and `var __webpack_exports__ = {};` without expression
parser.hooks.declarator.tap(PLUGIN_NAME, (declarator) => {
if (
declarator.id.type === "Identifier" &&
(declarator.id.name === RuntimeGlobals.exports ||
declarator.id.name === RuntimeGlobals.require)
) {
const { name, declaration } =
/** @type {CompatibilitySettings} */ (
parser.getTagData(
declarator.id.name,
nestedWebpackIdentifierTag
)
);
if (!declaration.updated) {
const dep = new ConstDependency(name, declaration.range);
dep.loc = declaration.loc;
parser.state.module.addPresentationalDependency(dep);
declaration.updated = true;
}
}
});
parser.hooks.expression
.for(nestedWebpackIdentifierTag)
.tap(PLUGIN_NAME, (expr) => {
const { name, declaration } =
/** @type {CompatibilitySettings} */
(parser.currentTagData);
if (!declaration.updated) {
const dep = new ConstDependency(name, declaration.range);
dep.loc = declaration.loc;
parser.state.module.addPresentationalDependency(dep);
declaration.updated = true;
}
const dep = new ConstDependency(
name,
/** @type {Range} */ (expr.range)
);
dep.loc = /** @type {DependencyLocation} */ (expr.loc);
parser.state.module.addPresentationalDependency(dep);
return true;
});
// Handle hashbang
parser.hooks.program.tap(PLUGIN_NAME, (program, comments) => {
if (comments.length === 0) return;
const c = comments[0];
if (c.type === "Line" && /** @type {Range} */ (c.range)[0] === 0) {
if (parser.state.source.slice(0, 2).toString() !== "#!") return;
// this is a hashbang comment
const dep = new ConstDependency("//", 0);
dep.loc = /** @type {DependencyLocation} */ (c.loc);
parser.state.module.addPresentationalDependency(dep);
}
});
};
normalModuleFactory.hooks.parser
.for(JAVASCRIPT_MODULE_TYPE_AUTO)
.tap(PLUGIN_NAME, handler);
normalModuleFactory.hooks.parser
.for(JAVASCRIPT_MODULE_TYPE_DYNAMIC)
.tap(PLUGIN_NAME, handler);
normalModuleFactory.hooks.parser
.for(JAVASCRIPT_MODULE_TYPE_ESM)
.tap(PLUGIN_NAME, handler);
}
);
}
}
module.exports = CompatibilityPlugin;
module.exports.nestedWebpackIdentifierTag = nestedWebpackIdentifierTag;

View File

@@ -0,0 +1,7 @@
"use strict";
/**
*
* audit/common
*
*/
Object.defineProperty(exports, "__esModule", { value: true });

View File

@@ -0,0 +1,13 @@
import type {ErrorObject} from "../types"
export default class ValidationError extends Error {
readonly errors: Partial<ErrorObject>[]
readonly ajv: true
readonly validation: true
constructor(errors: Partial<ErrorObject>[]) {
super("validation failed")
this.errors = errors
this.ajv = this.validation = true
}
}

View File

@@ -0,0 +1,5 @@
import { IImage } from './interface.mjs';
declare const CUR: IImage;
export { CUR };

View File

@@ -0,0 +1 @@
{"version":3,"file":"isCustomAdminView.d.ts","sourceRoot":"","sources":["../../src/utilities/isCustomAdminView.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAI9C;;GAEG;AACH,eAAO,MAAM,iBAAiB,mCAI3B;IACD,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,eAAe,CAAA;IACvB,KAAK,EAAE,MAAM,CAAA;CACd,KAAG,OAmBH,CAAA"}

View File

@@ -0,0 +1,29 @@
import { DirectusRole } from "../../../schema/role.cjs";
import { NestedPartial } from "../../../types/utils.cjs";
import { ApplyQueryFields } from "../../../types/output.cjs";
import { Query } from "../../../types/query.cjs";
import { RestCommand } from "../../types.cjs";
//#region src/rest/commands/create/roles.d.ts
type CreateRoleOutput<Schema, TQuery extends Query<Schema, Item>, Item extends object = DirectusRole<Schema>> = ApplyQueryFields<Schema, Item, TQuery['fields']>;
/**
* Create multiple new roles.
*
* @param items The roles to create
* @param query Optional return data query
*
* @returns Returns the role objects for the created roles.
*/
declare const createRoles: <Schema, const TQuery extends Query<Schema, DirectusRole<Schema>>>(items: NestedPartial<DirectusRole<Schema>>[], query?: TQuery) => RestCommand<CreateRoleOutput<Schema, TQuery>[], Schema>;
/**
* Create a new role.
*
* @param item The role to create
* @param query Optional return data query
*
* @returns Returns the role object for the created role.
*/
declare const createRole: <Schema, const TQuery extends Query<Schema, DirectusRole<Schema>>>(item: NestedPartial<DirectusRole<Schema>>, query?: TQuery) => RestCommand<CreateRoleOutput<Schema, TQuery>, Schema>;
//#endregion
export { CreateRoleOutput, createRole, createRoles };
//# sourceMappingURL=roles.d.cts.map

View File

@@ -0,0 +1,41 @@
import { Context } from '@opentelemetry/api';
import { Span } from '../Span';
import { SpanProcessor } from '../SpanProcessor';
import { BufferConfig } from '../types';
import { ReadableSpan } from './ReadableSpan';
import { SpanExporter } from './SpanExporter';
/**
* Implementation of the {@link SpanProcessor} that batches spans exported by
* the SDK then pushes them to the exporter pipeline.
*/
export declare abstract class BatchSpanProcessorBase<T extends BufferConfig> implements SpanProcessor {
private readonly _maxExportBatchSize;
private readonly _maxQueueSize;
private readonly _scheduledDelayMillis;
private readonly _exportTimeoutMillis;
private readonly _exporter;
private _isExporting;
private _finishedSpans;
private _timer;
private _shutdownOnce;
private _droppedSpansCount;
constructor(exporter: SpanExporter, config?: T);
forceFlush(): Promise<void>;
onStart(_span: Span, _parentContext: Context): void;
onEnd(span: ReadableSpan): void;
shutdown(): Promise<void>;
private _shutdown;
/** Add a span in the buffer. */
private _addToBuffer;
/**
* Send all spans to the exporter respecting the batch size limit
* This function is used only on forceFlush or shutdown,
* for all other cases _flush should be used
* */
private _flushAll;
private _flushOneBatch;
private _maybeStartTimer;
private _clearTimer;
protected abstract onShutdown(): void;
}
//# sourceMappingURL=BatchSpanProcessorBase.d.ts.map

View File

@@ -0,0 +1,42 @@
{
"name": "@img/sharp-libvips-linux-arm64",
"version": "1.2.4",
"description": "Prebuilt libvips and dependencies for use with sharp on Linux (glibc) 64-bit ARM",
"author": "Lovell Fuller <npm@lovell.info>",
"homepage": "https://sharp.pixelplumbing.com",
"repository": {
"type": "git",
"url": "git+https://github.com/lovell/sharp-libvips.git",
"directory": "npm/linux-arm64"
},
"license": "LGPL-3.0-or-later",
"funding": {
"url": "https://opencollective.com/libvips"
},
"preferUnplugged": true,
"publishConfig": {
"access": "public"
},
"files": [
"lib",
"versions.json"
],
"type": "commonjs",
"exports": {
"./lib": "./lib/index.js",
"./package": "./package.json",
"./versions": "./versions.json"
},
"config": {
"glibc": ">=2.26"
},
"os": [
"linux"
],
"libc": [
"glibc"
],
"cpu": [
"arm64"
]
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"isErrorPublic.d.ts","sourceRoot":"","sources":["../../src/utilities/isErrorPublic.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAOzD;;GAEG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,eAAe,WAiBlE"}

View File

@@ -0,0 +1,46 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const core = require('@sentry/core');
const urls = require('./urls.js');
/**
* Sets the URL processing metadata for the event.
*/
function setUrlProcessingMetadata(event) {
// Skip if not a server-side transaction
if (event.type !== 'transaction' || event.contexts?.trace?.op !== 'http.server' || !event.contexts?.trace?.data) {
return;
}
// Only add URL if sendDefaultPii is enabled, as URLs may contain PII
const client = core.getClient();
if (!client?.getOptions().sendDefaultPii) {
return;
}
const traceData = event.contexts.trace.data;
// Get the route from trace data
const componentRoute = traceData['next.route'] || traceData['http.route'];
const httpTarget = traceData['http.target'] ;
if (!componentRoute) {
return;
}
// Extract headers
const isolationScopeData = event.sdkProcessingMetadata?.capturedSpanIsolationScope?.getScopeData();
const headersDict = isolationScopeData?.sdkProcessingMetadata?.normalizedRequest?.headers;
const url = urls.getSanitizedRequestUrl(componentRoute, undefined, headersDict, httpTarget?.toString());
// Add URL to the isolation scope's normalizedRequest so requestDataIntegration picks it up
if (url && isolationScopeData?.sdkProcessingMetadata) {
isolationScopeData.sdkProcessingMetadata.normalizedRequest =
isolationScopeData.sdkProcessingMetadata.normalizedRequest || {};
isolationScopeData.sdkProcessingMetadata.normalizedRequest.url = url;
}
}
exports.setUrlProcessingMetadata = setUrlProcessingMetadata;
//# sourceMappingURL=setUrlProcessingMetadata.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/common/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,6DAA6D,CAAC;AAC3G,OAAO,EAAE,6BAA6B,EAAE,MAAM,8DAA8D,CAAC;AAC7G,OAAO,EAAE,gCAAgC,EAAE,MAAM,iEAAiE,CAAC;AACnH,OAAO,EAAE,qCAAqC,EAAE,MAAM,sEAAsE,CAAC;AAC7H,OAAO,EAAE,kCAAkC,EAAE,MAAM,mEAAmE,CAAC;AACvH,OAAO,EAAE,gCAAgC,EAAE,MAAM,iEAAiE,CAAC;AACnH,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAChF,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,mCAAmC,EAAE,MAAM,oEAAoE,CAAC;AACzH,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,2BAA2B,EAAE,MAAM,4DAA4D,CAAC;AACzG,OAAO,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAC;AACtF,OAAO,EAAE,+BAA+B,EAAE,MAAM,mCAAmC,CAAC;AACpF,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC"}

View File

@@ -0,0 +1,204 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const checkin = require('./checkin.js');
const client = require('./client.js');
const currentScopes = require('./currentScopes.js');
const debugBuild = require('./debug-build.js');
const errors = require('./tracing/errors.js');
const debugLogger = require('./utils/debug-logger.js');
const misc = require('./utils/misc.js');
const userAgent = require('./transports/userAgent.js');
const eventbuilder = require('./utils/eventbuilder.js');
const syncpromise = require('./utils/syncpromise.js');
const traceInfo = require('./utils/trace-info.js');
/**
* The Sentry Server Runtime Client SDK.
*/
class ServerRuntimeClient
extends client.Client {
/**
* Creates a new Edge SDK instance.
* @param options Configuration options for this SDK.
*/
constructor(options) {
// Server clients always support tracing
errors.registerSpanErrorInstrumentation();
userAgent.addUserAgentToTransportHeaders(options);
super(options);
this._setUpMetricsProcessing();
}
/**
* @inheritDoc
*/
eventFromException(exception, hint) {
const event = eventbuilder.eventFromUnknownInput(this, this._options.stackParser, exception, hint);
event.level = 'error';
return syncpromise.resolvedSyncPromise(event);
}
/**
* @inheritDoc
*/
eventFromMessage(
message,
level = 'info',
hint,
) {
return syncpromise.resolvedSyncPromise(
eventbuilder.eventFromMessage(this._options.stackParser, message, level, hint, this._options.attachStacktrace),
);
}
/**
* @inheritDoc
*/
captureException(exception, hint, scope) {
setCurrentRequestSessionErroredOrCrashed(hint);
return super.captureException(exception, hint, scope);
}
/**
* @inheritDoc
*/
captureEvent(event, hint, scope) {
// If the event is of type Exception, then a request session should be captured
const isException = !event.type && event.exception?.values && event.exception.values.length > 0;
if (isException) {
setCurrentRequestSessionErroredOrCrashed(hint);
}
return super.captureEvent(event, hint, scope);
}
/**
* Create a cron monitor check in and send it to Sentry.
*
* @param checkIn An object that describes a check in.
* @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want
* to create a monitor automatically when sending a check in.
*/
captureCheckIn(checkIn, monitorConfig, scope) {
const id = 'checkInId' in checkIn && checkIn.checkInId ? checkIn.checkInId : misc.uuid4();
if (!this._isEnabled()) {
debugBuild.DEBUG_BUILD && debugLogger.debug.warn('SDK not enabled, will not capture check-in.');
return id;
}
const options = this.getOptions();
const { release, environment, tunnel } = options;
const serializedCheckIn = {
check_in_id: id,
monitor_slug: checkIn.monitorSlug,
status: checkIn.status,
release,
environment,
};
if ('duration' in checkIn) {
serializedCheckIn.duration = checkIn.duration;
}
if (monitorConfig) {
serializedCheckIn.monitor_config = {
schedule: monitorConfig.schedule,
checkin_margin: monitorConfig.checkinMargin,
max_runtime: monitorConfig.maxRuntime,
timezone: monitorConfig.timezone,
failure_issue_threshold: monitorConfig.failureIssueThreshold,
recovery_threshold: monitorConfig.recoveryThreshold,
};
}
const [dynamicSamplingContext, traceContext] = traceInfo._getTraceInfoFromScope(this, scope);
if (traceContext) {
serializedCheckIn.contexts = {
trace: traceContext,
};
}
const envelope = checkin.createCheckInEnvelope(
serializedCheckIn,
dynamicSamplingContext,
this.getSdkMetadata(),
tunnel,
this.getDsn(),
);
debugBuild.DEBUG_BUILD && debugLogger.debug.log('Sending checkin:', checkIn.monitorSlug, checkIn.status);
// sendEnvelope should not throw
// eslint-disable-next-line @typescript-eslint/no-floating-promises
this.sendEnvelope(envelope);
return id;
}
/**
* @inheritDoc
*/
_prepareEvent(
event,
hint,
currentScope,
isolationScope,
) {
if (this._options.platform) {
event.platform = event.platform || this._options.platform;
}
if (this._options.runtime) {
event.contexts = {
...event.contexts,
runtime: event.contexts?.runtime || this._options.runtime,
};
}
if (this._options.serverName) {
event.server_name = event.server_name || this._options.serverName;
}
return super._prepareEvent(event, hint, currentScope, isolationScope);
}
/**
* Process a server-side metric before it is captured.
*/
_setUpMetricsProcessing() {
this.on('processMetric', metric => {
if (this._options.serverName) {
metric.attributes = {
'server.address': this._options.serverName,
...metric.attributes,
};
}
});
}
}
function setCurrentRequestSessionErroredOrCrashed(eventHint) {
const requestSession = currentScopes.getIsolationScope().getScopeData().sdkProcessingMetadata.requestSession;
if (requestSession) {
// We mutate instead of doing `setSdkProcessingMetadata` because the http integration stores away a particular
// isolationScope. If that isolation scope is forked, setting the processing metadata here will not mutate the
// original isolation scope that the http integration stored away.
const isHandledException = eventHint?.mechanism?.handled ?? true;
// A request session can go from "errored" -> "crashed" but not "crashed" -> "errored".
// Crashed (unhandled exception) is worse than errored (handled exception).
if (isHandledException && requestSession.status !== 'crashed') {
requestSession.status = 'errored';
} else if (!isHandledException) {
requestSession.status = 'crashed';
}
}
}
exports.ServerRuntimeClient = ServerRuntimeClient;
//# sourceMappingURL=server-runtime-client.js.map

View File

@@ -0,0 +1,47 @@
import { status as httpStatus } from 'http-status';
import { getRequestCollection } from '../../utilities/getRequestEntity.js';
import { headersWithCors } from '../../utilities/headersWithCors.js';
import { isNumber } from '../../utilities/isNumber.js';
import { generatePayloadCookie } from '../cookies.js';
import { loginOperation } from '../operations/login.js';
export const loginHandler = async (req)=>{
const collection = getRequestCollection(req);
const { searchParams, t } = req;
const depth = searchParams.get('depth');
const authData = collection.config.auth?.loginWithUsername !== false ? {
email: typeof req.data?.email === 'string' ? req.data.email : '',
password: typeof req.data?.password === 'string' ? req.data.password : '',
username: typeof req.data?.username === 'string' ? req.data.username : ''
} : {
email: typeof req.data?.email === 'string' ? req.data.email : '',
password: typeof req.data?.password === 'string' ? req.data.password : ''
};
const result = await loginOperation({
collection,
data: authData,
depth: isNumber(depth) ? Number(depth) : undefined,
req
});
const cookie = generatePayloadCookie({
collectionAuthConfig: collection.config.auth,
cookiePrefix: req.payload.config.cookiePrefix,
token: result.token
});
if (collection.config.auth.removeTokenFromResponses) {
delete result.token;
}
return Response.json({
message: t('authentication:passed'),
...result
}, {
headers: headersWithCors({
headers: new Headers({
'Set-Cookie': cookie
}),
req
}),
status: httpStatus.OK
});
};
//# sourceMappingURL=login.js.map

View File

@@ -0,0 +1,43 @@
const nonJsonTypes = ["function", "symbol", "undefined"];
const protectedProps = ["constructor", "prototype", "__proto__"];
const objectPrototype = Object.getPrototypeOf({});
/**
* Custom JSON serializer for Error objects.
* Returns all built-in error properties, as well as extended properties.
*/
export function toJSON() {
// HACK: We have to cast the objects to `any` so we can use symbol indexers.
// see https://github.com/Microsoft/TypeScript/issues/1863
let pojo = {};
let error = this;
for (let key of getDeepKeys(error)) {
if (typeof key === "string") {
let value = error[key];
let type = typeof value;
if (!nonJsonTypes.includes(type)) {
pojo[key] = value;
}
}
}
return pojo;
}
/**
* Returns own, inherited, enumerable, non-enumerable, string, and symbol keys of `obj`.
* Does NOT return members of the base Object prototype, or the specified omitted keys.
*/
export function getDeepKeys(obj, omit = []) {
let keys = [];
// Crawl the prototype chain, finding all the string and symbol keys
while (obj && obj !== objectPrototype) {
keys = keys.concat(Object.getOwnPropertyNames(obj), Object.getOwnPropertySymbols(obj));
obj = Object.getPrototypeOf(obj);
}
// De-duplicate the list of keys
let uniqueKeys = new Set(keys);
// Remove any omitted keys
for (let key of omit.concat(protectedProps)) {
uniqueKeys.delete(key);
}
return uniqueKeys;
}
//# sourceMappingURL=to-json.js.map

View File

@@ -0,0 +1,18 @@
var baseSlice = require('./_baseSlice');
/**
* Casts `array` to a slice if it's needed.
*
* @private
* @param {Array} array The array to inspect.
* @param {number} start The start position.
* @param {number} [end=array.length] The end position.
* @returns {Array} Returns the cast slice.
*/
function castSlice(array, start, end) {
var length = array.length;
end = end === undefined ? length : end;
return (!start && end >= length) ? array : baseSlice(array, start, end);
}
module.exports = castSlice;

View File

@@ -0,0 +1 @@
{"version":3,"file":"FeedbackIcon.d.ts","sourceRoot":"","sources":["../../../../../src/core/components/FeedbackIcon.ts"],"names":[],"mappings":"AAMA;;GAEG;AACH,wBAAgB,YAAY,IAAI,UAAU,CAsCzC"}

View File

@@ -0,0 +1,328 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc2) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc2 = __getOwnPropDesc(from, key)) || desc2.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var relations_exports = {};
__export(relations_exports, {
Many: () => Many,
One: () => One,
Relation: () => Relation,
Relations: () => Relations,
createMany: () => createMany,
createOne: () => createOne,
createTableRelationsHelpers: () => createTableRelationsHelpers,
extractTablesRelationalConfig: () => extractTablesRelationalConfig,
getOperators: () => getOperators,
getOrderByOperators: () => getOrderByOperators,
mapRelationalRow: () => mapRelationalRow,
normalizeRelation: () => normalizeRelation,
relations: () => relations
});
module.exports = __toCommonJS(relations_exports);
var import_table = require("./table.cjs");
var import_column = require("./column.cjs");
var import_entity = require("./entity.cjs");
var import_primary_keys = require("./pg-core/primary-keys.cjs");
var import_expressions = require("./sql/expressions/index.cjs");
var import_sql = require("./sql/sql.cjs");
class Relation {
constructor(sourceTable, referencedTable, relationName) {
this.sourceTable = sourceTable;
this.referencedTable = referencedTable;
this.relationName = relationName;
this.referencedTableName = referencedTable[import_table.Table.Symbol.Name];
}
static [import_entity.entityKind] = "Relation";
referencedTableName;
fieldName;
}
class Relations {
constructor(table, config) {
this.table = table;
this.config = config;
}
static [import_entity.entityKind] = "Relations";
}
class One extends Relation {
constructor(sourceTable, referencedTable, config, isNullable) {
super(sourceTable, referencedTable, config?.relationName);
this.config = config;
this.isNullable = isNullable;
}
static [import_entity.entityKind] = "One";
withFieldName(fieldName) {
const relation = new One(
this.sourceTable,
this.referencedTable,
this.config,
this.isNullable
);
relation.fieldName = fieldName;
return relation;
}
}
class Many extends Relation {
constructor(sourceTable, referencedTable, config) {
super(sourceTable, referencedTable, config?.relationName);
this.config = config;
}
static [import_entity.entityKind] = "Many";
withFieldName(fieldName) {
const relation = new Many(
this.sourceTable,
this.referencedTable,
this.config
);
relation.fieldName = fieldName;
return relation;
}
}
function getOperators() {
return {
and: import_expressions.and,
between: import_expressions.between,
eq: import_expressions.eq,
exists: import_expressions.exists,
gt: import_expressions.gt,
gte: import_expressions.gte,
ilike: import_expressions.ilike,
inArray: import_expressions.inArray,
isNull: import_expressions.isNull,
isNotNull: import_expressions.isNotNull,
like: import_expressions.like,
lt: import_expressions.lt,
lte: import_expressions.lte,
ne: import_expressions.ne,
not: import_expressions.not,
notBetween: import_expressions.notBetween,
notExists: import_expressions.notExists,
notLike: import_expressions.notLike,
notIlike: import_expressions.notIlike,
notInArray: import_expressions.notInArray,
or: import_expressions.or,
sql: import_sql.sql
};
}
function getOrderByOperators() {
return {
sql: import_sql.sql,
asc: import_expressions.asc,
desc: import_expressions.desc
};
}
function extractTablesRelationalConfig(schema, configHelpers) {
if (Object.keys(schema).length === 1 && "default" in schema && !(0, import_entity.is)(schema["default"], import_table.Table)) {
schema = schema["default"];
}
const tableNamesMap = {};
const relationsBuffer = {};
const tablesConfig = {};
for (const [key, value] of Object.entries(schema)) {
if ((0, import_entity.is)(value, import_table.Table)) {
const dbName = (0, import_table.getTableUniqueName)(value);
const bufferedRelations = relationsBuffer[dbName];
tableNamesMap[dbName] = key;
tablesConfig[key] = {
tsName: key,
dbName: value[import_table.Table.Symbol.Name],
schema: value[import_table.Table.Symbol.Schema],
columns: value[import_table.Table.Symbol.Columns],
relations: bufferedRelations?.relations ?? {},
primaryKey: bufferedRelations?.primaryKey ?? []
};
for (const column of Object.values(
value[import_table.Table.Symbol.Columns]
)) {
if (column.primary) {
tablesConfig[key].primaryKey.push(column);
}
}
const extraConfig = value[import_table.Table.Symbol.ExtraConfigBuilder]?.(value[import_table.Table.Symbol.ExtraConfigColumns]);
if (extraConfig) {
for (const configEntry of Object.values(extraConfig)) {
if ((0, import_entity.is)(configEntry, import_primary_keys.PrimaryKeyBuilder)) {
tablesConfig[key].primaryKey.push(...configEntry.columns);
}
}
}
} else if ((0, import_entity.is)(value, Relations)) {
const dbName = (0, import_table.getTableUniqueName)(value.table);
const tableName = tableNamesMap[dbName];
const relations2 = value.config(
configHelpers(value.table)
);
let primaryKey;
for (const [relationName, relation] of Object.entries(relations2)) {
if (tableName) {
const tableConfig = tablesConfig[tableName];
tableConfig.relations[relationName] = relation;
if (primaryKey) {
tableConfig.primaryKey.push(...primaryKey);
}
} else {
if (!(dbName in relationsBuffer)) {
relationsBuffer[dbName] = {
relations: {},
primaryKey
};
}
relationsBuffer[dbName].relations[relationName] = relation;
}
}
}
}
return { tables: tablesConfig, tableNamesMap };
}
function relations(table, relations2) {
return new Relations(
table,
(helpers) => Object.fromEntries(
Object.entries(relations2(helpers)).map(([key, value]) => [
key,
value.withFieldName(key)
])
)
);
}
function createOne(sourceTable) {
return function one(table, config) {
return new One(
sourceTable,
table,
config,
config?.fields.reduce((res, f) => res && f.notNull, true) ?? false
);
};
}
function createMany(sourceTable) {
return function many(referencedTable, config) {
return new Many(sourceTable, referencedTable, config);
};
}
function normalizeRelation(schema, tableNamesMap, relation) {
if ((0, import_entity.is)(relation, One) && relation.config) {
return {
fields: relation.config.fields,
references: relation.config.references
};
}
const referencedTableTsName = tableNamesMap[(0, import_table.getTableUniqueName)(relation.referencedTable)];
if (!referencedTableTsName) {
throw new Error(
`Table "${relation.referencedTable[import_table.Table.Symbol.Name]}" not found in schema`
);
}
const referencedTableConfig = schema[referencedTableTsName];
if (!referencedTableConfig) {
throw new Error(`Table "${referencedTableTsName}" not found in schema`);
}
const sourceTable = relation.sourceTable;
const sourceTableTsName = tableNamesMap[(0, import_table.getTableUniqueName)(sourceTable)];
if (!sourceTableTsName) {
throw new Error(
`Table "${sourceTable[import_table.Table.Symbol.Name]}" not found in schema`
);
}
const reverseRelations = [];
for (const referencedTableRelation of Object.values(
referencedTableConfig.relations
)) {
if (relation.relationName && relation !== referencedTableRelation && referencedTableRelation.relationName === relation.relationName || !relation.relationName && referencedTableRelation.referencedTable === relation.sourceTable) {
reverseRelations.push(referencedTableRelation);
}
}
if (reverseRelations.length > 1) {
throw relation.relationName ? new Error(
`There are multiple relations with name "${relation.relationName}" in table "${referencedTableTsName}"`
) : new Error(
`There are multiple relations between "${referencedTableTsName}" and "${relation.sourceTable[import_table.Table.Symbol.Name]}". Please specify relation name`
);
}
if (reverseRelations[0] && (0, import_entity.is)(reverseRelations[0], One) && reverseRelations[0].config) {
return {
fields: reverseRelations[0].config.references,
references: reverseRelations[0].config.fields
};
}
throw new Error(
`There is not enough information to infer relation "${sourceTableTsName}.${relation.fieldName}"`
);
}
function createTableRelationsHelpers(sourceTable) {
return {
one: createOne(sourceTable),
many: createMany(sourceTable)
};
}
function mapRelationalRow(tablesConfig, tableConfig, row, buildQueryResultSelection, mapColumnValue = (value) => value) {
const result = {};
for (const [
selectionItemIndex,
selectionItem
] of buildQueryResultSelection.entries()) {
if (selectionItem.isJson) {
const relation = tableConfig.relations[selectionItem.tsKey];
const rawSubRows = row[selectionItemIndex];
const subRows = typeof rawSubRows === "string" ? JSON.parse(rawSubRows) : rawSubRows;
result[selectionItem.tsKey] = (0, import_entity.is)(relation, One) ? subRows && mapRelationalRow(
tablesConfig,
tablesConfig[selectionItem.relationTableTsKey],
subRows,
selectionItem.selection,
mapColumnValue
) : subRows.map(
(subRow) => mapRelationalRow(
tablesConfig,
tablesConfig[selectionItem.relationTableTsKey],
subRow,
selectionItem.selection,
mapColumnValue
)
);
} else {
const value = mapColumnValue(row[selectionItemIndex]);
const field = selectionItem.field;
let decoder;
if ((0, import_entity.is)(field, import_column.Column)) {
decoder = field;
} else if ((0, import_entity.is)(field, import_sql.SQL)) {
decoder = field.decoder;
} else {
decoder = field.sql.decoder;
}
result[selectionItem.tsKey] = value === null ? null : decoder.mapFromDriverValue(value);
}
}
return result;
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
Many,
One,
Relation,
Relations,
createMany,
createOne,
createTableRelationsHelpers,
extractTablesRelationalConfig,
getOperators,
getOrderByOperators,
mapRelationalRow,
normalizeRelation,
relations
});
//# sourceMappingURL=relations.cjs.map

View File

@@ -0,0 +1,103 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const core = require('@sentry/core');
const debugBuild = require('../debug-build.js');
const instrument = require('./instrument.js');
const utils = require('./utils.js');
/**
* Starts tracking the Largest Contentful Paint on the current page and collects the value once
*
* - the page visibility is hidden
* - a navigation span is started (to stop LCP measurement for SPA soft navigations)
*
* Once either of these events triggers, the LCP value is sent as a standalone span and we stop
* measuring LCP for subsequent routes.
*/
function trackLcpAsStandaloneSpan(client) {
let standaloneLcpValue = 0;
let standaloneLcpEntry;
if (!utils.supportsWebVital('largest-contentful-paint')) {
return;
}
const cleanupLcpHandler = instrument.addLcpInstrumentationHandler(({ metric }) => {
const entry = metric.entries[metric.entries.length - 1] ;
if (!entry) {
return;
}
standaloneLcpValue = metric.value;
standaloneLcpEntry = entry;
}, true);
utils.listenForWebVitalReportEvents(client, (reportEvent, pageloadSpanId) => {
_sendStandaloneLcpSpan(standaloneLcpValue, standaloneLcpEntry, pageloadSpanId, reportEvent);
cleanupLcpHandler();
});
}
/**
* Exported only for testing!
*/
function _sendStandaloneLcpSpan(
lcpValue,
entry,
pageloadSpanId,
reportEvent,
) {
debugBuild.DEBUG_BUILD && core.debug.log(`Sending LCP span (${lcpValue})`);
const startTime = utils.msToSec((core.browserPerformanceTimeOrigin() || 0) + (entry?.startTime || 0));
const routeName = core.getCurrentScope().getScopeData().transactionName;
const name = entry ? core.htmlTreeAsString(entry.element) : 'Largest contentful paint';
const attributes = {
[core.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.browser.lcp',
[core.SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'ui.webvital.lcp',
[core.SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME]: 0, // LCP is a point-in-time metric
// attach the pageload span id to the LCP span so that we can link them in the UI
'sentry.pageload.span_id': pageloadSpanId,
// describes what triggered the web vital to be reported
'sentry.report_event': reportEvent,
};
if (entry) {
entry.element && (attributes['lcp.element'] = core.htmlTreeAsString(entry.element));
entry.id && (attributes['lcp.id'] = entry.id);
entry.url && (attributes['lcp.url'] = entry.url);
// loadTime is the time of LCP that's related to receiving the LCP element response..
entry.loadTime != null && (attributes['lcp.loadTime'] = entry.loadTime);
// renderTime is loadTime + rendering time
// it's 0 if the LCP element is loaded from a 3rd party origin that doesn't send the
// `Timing-Allow-Origin` header.
entry.renderTime != null && (attributes['lcp.renderTime'] = entry.renderTime);
entry.size != null && (attributes['lcp.size'] = entry.size);
}
const span = utils.startStandaloneWebVitalSpan({
name,
transaction: routeName,
attributes,
startTime,
});
if (span) {
span.addEvent('lcp', {
[core.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT]: 'millisecond',
[core.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE]: lcpValue,
});
// LCP is a point-in-time metric, so we end the span immediately
span.end(startTime);
}
}
exports._sendStandaloneLcpSpan = _sendStandaloneLcpSpan;
exports.trackLcpAsStandaloneSpan = trackLcpAsStandaloneSpan;
//# sourceMappingURL=lcp.js.map

View File

@@ -0,0 +1,34 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
/** @typedef {import("ajv").default} Ajv */
/** @typedef {import("ajv").SchemaValidateFunction} SchemaValidateFunction */
/** @typedef {import("ajv").AnySchemaObject} AnySchemaObject */
/** @typedef {import("ajv").ValidateFunction} ValidateFunction */
/**
* @param {Ajv} ajv ajv
* @returns {Ajv} configured ajv
*/
function addUndefinedAsNullKeyword(ajv) {
ajv.addKeyword({
keyword: "undefinedAsNull",
before: "enum",
modifying: true,
/** @type {SchemaValidateFunction} */
validate(kwVal, data, metadata, dataCxt) {
if (kwVal && dataCxt && metadata && typeof metadata.enum !== "undefined") {
const idx = dataCxt.parentDataProperty;
if (typeof dataCxt.parentData[idx] === "undefined") {
dataCxt.parentData[dataCxt.parentDataProperty] = null;
}
}
return true;
}
});
return ajv;
}
var _default = exports.default = addUndefinedAsNullKeyword;

View File

@@ -0,0 +1,137 @@
"use strict";
exports.match = void 0;
var _index = require("../../_lib/buildMatchFn.cjs");
var _index2 = require("../../_lib/buildMatchPatternFn.cjs");
const matchOrdinalNumberPattern = /^(\d+)(\.)/i;
const parseOrdinalNumberPattern = /\d+/i;
const matchEraPatterns = {
narrow: /^(e|j)/i,
abbreviated: /^(eaa.|jaa.)/i,
wide: /^(ennen ajanlaskun alkua|jälkeen ajanlaskun alun)/i,
};
const parseEraPatterns = {
any: [/^e/i, /^j/i],
};
const matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^q[1234]/i,
wide: /^[1234]\.? kvartaali/i,
};
const parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i],
};
const matchMonthPatterns = {
narrow: /^[thmkeslj]/i,
abbreviated:
/^(tammi|helmi|maalis|huhti|touko|kesä|heinä|elo|syys|loka|marras|joulu)/i,
wide: /^(tammikuu|helmikuu|maaliskuu|huhtikuu|toukokuu|kesäkuu|heinäkuu|elokuu|syyskuu|lokakuu|marraskuu|joulukuu)(ta)?/i,
};
const parseMonthPatterns = {
narrow: [
/^t/i,
/^h/i,
/^m/i,
/^h/i,
/^t/i,
/^k/i,
/^h/i,
/^e/i,
/^s/i,
/^l/i,
/^m/i,
/^j/i,
],
any: [
/^ta/i,
/^hel/i,
/^maa/i,
/^hu/i,
/^to/i,
/^k/i,
/^hei/i,
/^e/i,
/^s/i,
/^l/i,
/^mar/i,
/^j/i,
],
};
const matchDayPatterns = {
narrow: /^[smtkpl]/i,
short: /^(su|ma|ti|ke|to|pe|la)/i,
abbreviated: /^(sunn.|maan.|tiis.|kesk.|torst.|perj.|la)/i,
wide: /^(sunnuntai|maanantai|tiistai|keskiviikko|torstai|perjantai|lauantai)(na)?/i,
};
const parseDayPatterns = {
narrow: [/^s/i, /^m/i, /^t/i, /^k/i, /^t/i, /^p/i, /^l/i],
any: [/^s/i, /^m/i, /^ti/i, /^k/i, /^to/i, /^p/i, /^l/i],
};
const matchDayPeriodPatterns = {
narrow:
/^(ap|ip|keskiyö|keskipäivä|aamupäivällä|iltapäivällä|illalla|yöllä)/i,
any: /^(ap|ip|keskiyöllä|keskipäivällä|aamupäivällä|iltapäivällä|illalla|yöllä)/i,
};
const parseDayPeriodPatterns = {
any: {
am: /^ap/i,
pm: /^ip/i,
midnight: /^keskiyö/i,
noon: /^keskipäivä/i,
morning: /aamupäivällä/i,
afternoon: /iltapäivällä/i,
evening: /illalla/i,
night: /yöllä/i,
},
};
const match = (exports.match = {
ordinalNumber: (0, _index2.buildMatchPatternFn)({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: (value) => parseInt(value, 10),
}),
era: (0, _index.buildMatchFn)({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any",
}),
quarter: (0, _index.buildMatchFn)({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: (index) => index + 1,
}),
month: (0, _index.buildMatchFn)({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any",
}),
day: (0, _index.buildMatchFn)({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any",
}),
dayPeriod: (0, _index.buildMatchFn)({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any",
}),
});

View File

@@ -0,0 +1,153 @@
import { bit, boolean, foreignKey, halfvec, index, integer, jsonb, numeric, serial, sparsevec, text, timestamp, uniqueIndex, uuid, varchar, vector } from 'drizzle-orm/pg-core';
import { geometryColumn } from './geometryColumn.js';
const rawColumnBuilderMap = {
boolean,
geometry: geometryColumn,
integer,
jsonb,
numeric,
serial,
text,
uuid,
varchar
};
export const buildDrizzleTable = ({ adapter, rawTable })=>{
const columns = {};
for (const [key, column] of Object.entries(rawTable.columns)){
switch(column.type){
case 'bit':
{
const builder = bit(column.name, {
dimensions: column.dimensions
});
columns[key] = builder;
break;
}
case 'enum':
if ('locale' in column) {
columns[key] = adapter.enums.enum__locales(column.name);
} else {
adapter.enums[column.enumName] = adapter.pgSchema.enum(column.enumName, column.options);
columns[key] = adapter.enums[column.enumName](column.name);
}
break;
case 'halfvec':
{
const builder = halfvec(column.name, {
dimensions: column.dimensions
});
columns[key] = builder;
break;
}
case 'numeric':
{
columns[key] = numeric(column.name, {
mode: 'number'
});
break;
}
case 'sparsevec':
{
const builder = sparsevec(column.name, {
dimensions: column.dimensions
});
columns[key] = builder;
break;
}
case 'timestamp':
{
let builder = timestamp(column.name, {
mode: column.mode,
precision: column.precision,
withTimezone: column.withTimezone
});
if (column.defaultNow) {
builder = builder.defaultNow();
}
columns[key] = builder;
break;
}
case 'uuid':
{
let builder = uuid(column.name);
if (column.defaultRandom) {
builder = builder.defaultRandom();
}
columns[key] = builder;
break;
}
case 'vector':
{
const builder = vector(column.name, {
dimensions: column.dimensions
});
columns[key] = builder;
break;
}
default:
columns[key] = rawColumnBuilderMap[column.type](column.name);
break;
}
if (column.reference) {
columns[key].references(()=>adapter.tables[column.reference.table][column.reference.name], {
onDelete: column.reference.onDelete
});
}
if (column.primaryKey) {
columns[key].primaryKey();
}
if (column.notNull) {
columns[key].notNull();
}
if (typeof column.default !== 'undefined') {
let sanitizedDefault = column.default;
if (column.type === 'geometry' && Array.isArray(column.default)) {
sanitizedDefault = `SRID=4326;POINT(${column.default[0]} ${column.default[1]})`;
}
columns[key].default(sanitizedDefault);
}
if (column.type === 'geometry') {
if (!adapter.extensions.postgis) {
adapter.extensions.postgis = true;
}
}
}
const extraConfig = (cols)=>{
const config = {};
if (rawTable.indexes) {
for (const [key, rawIndex] of Object.entries(rawTable.indexes)){
let fn = index;
if (rawIndex.unique) {
fn = uniqueIndex;
}
if (Array.isArray(rawIndex.on)) {
if (rawIndex.on.length) {
config[key] = fn(rawIndex.name).on(...rawIndex.on.map((colName)=>cols[colName]));
}
} else {
config[key] = fn(rawIndex.name).on(cols[rawIndex.on]);
}
}
}
if (rawTable.foreignKeys) {
for (const [key, rawForeignKey] of Object.entries(rawTable.foreignKeys)){
let builder = foreignKey({
name: rawForeignKey.name,
columns: rawForeignKey.columns.map((colName)=>cols[colName]),
foreignColumns: rawForeignKey.foreignColumns.map((column)=>adapter.tables[column.table][column.name])
});
if (rawForeignKey.onDelete) {
builder = builder.onDelete(rawForeignKey.onDelete);
}
if (rawForeignKey.onUpdate) {
builder = builder.onDelete(rawForeignKey.onUpdate);
}
config[key] = builder;
}
}
return config;
};
adapter.tables[rawTable.name] = adapter.pgSchema.table(rawTable.name, columns, extraConfig);
};
//# sourceMappingURL=buildDrizzleTable.js.map

View File

@@ -0,0 +1,128 @@
# foreground-child
Run a child as if it's the foreground process. Give it stdio. Exit
when it exits.
Mostly this module is here to support some use cases around
wrapping child processes for test coverage and such. But it's
also generally useful any time you want one program to execute
another as if it's the "main" process, for example, if a program
takes a `--cmd` argument to execute in some way.
## USAGE
```js
import { foregroundChild } from 'foreground-child'
// hybrid module, this also works:
// const { foregroundChild } = require('foreground-child')
// cats out this file
const child = foregroundChild('cat', [__filename])
// At this point, it's best to just do nothing else.
// return or whatever.
// If the child gets a signal, or just exits, then this
// parent process will exit in the same way.
```
You can provide custom spawn options by passing an object after
the program and arguments:
```js
const child = foregroundChild(`cat ${__filename}`, { shell: true })
```
A callback can optionally be provided, if you want to perform an
action before your foreground-child exits:
```js
const child = foregroundChild('cat', [__filename], spawnOptions, () => {
doSomeActions()
})
```
The callback can return a Promise in order to perform
asynchronous actions. If the callback does not return a promise,
then it must complete its actions within a single JavaScript
tick.
```js
const child = foregroundChild('cat', [__filename], async () => {
await doSomeAsyncActions()
})
```
If the callback throws or rejects, then it will be unhandled, and
node will exit in error.
If the callback returns a string value, then that will be used as
the signal to exit the parent process. If it returns a number,
then that number will be used as the parent exit status code. If
it returns boolean `false`, then the parent process will not be
terminated. If it returns `undefined`, then it will exit with the
same signal/code as the child process.
## Caveats
The "normal" standard IO file descriptors (0, 1, and 2 for stdin,
stdout, and stderr respectively) are shared with the child process.
Additionally, if there is an IPC channel set up in the parent, then
messages are proxied to the child on file descriptor 3.
In Node, it's possible to also map arbitrary file descriptors
into a child process. In these cases, foreground-child will not
map the file descriptors into the child. If file descriptors 0,
1, or 2 are used for the IPC channel, then strange behavior may
happen (like printing IPC messages to stderr, for example).
Note that a SIGKILL will always kill the parent process, but
will not proxy the signal to the child process, because SIGKILL
cannot be caught. In order to address this, a special "watchdog"
child process is spawned which will send a SIGKILL to the child
process if it does not terminate within half a second after the
watchdog receives a SIGHUP due to its parent terminating.
On Windows, issuing a `process.kill(process.pid, signal)` with a
fatal termination signal may cause the process to exit with a `1`
status code rather than reporting the signal properly. This
module tries to do the right thing, but on Windows systems, you
may see that incorrect result. There is as far as I'm aware no
workaround for this.
## util: `foreground-child/proxy-signals`
If you just want to proxy the signals to a child process that the
main process receives, you can use the `proxy-signals` export
from this package.
```js
import { proxySignals } from 'foreground-child/proxy-signals'
const childProcess = spawn('command', ['some', 'args'])
proxySignals(childProcess)
```
Now, any fatal signal received by the current process will be
proxied to the child process.
It doesn't go in the other direction; ie, signals sent to the
child process will not affect the parent. For that, listen to the
child `exit` or `close` events, and handle them appropriately.
## util: `foreground-child/watchdog`
If you are spawning a child process, and want to ensure that it
isn't left dangling if the parent process exits, you can use the
watchdog utility exported by this module.
```js
import { watchdog } from 'foreground-child/watchdog'
const childProcess = spawn('command', ['some', 'args'])
const watchdogProcess = watchdog(childProcess)
// watchdogProcess is a reference to the process monitoring the
// parent and child. There's usually no reason to do anything
// with it, as it's silent and will terminate
// automatically when it's no longer needed.
```

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"constants.js","sources":["../../../../src/tracing/langgraph/constants.ts"],"sourcesContent":["export const LANGGRAPH_INTEGRATION_NAME = 'LangGraph';\nexport const LANGGRAPH_ORIGIN = 'auto.ai.langgraph';\n"],"names":[],"mappings":";;AAAO,MAAM,0BAAA,GAA6B;AACnC,MAAM,gBAAA,GAAmB;;;;;"}

View File

@@ -0,0 +1,23 @@
import type { ColumnBuilderBaseConfig } from "../../column-builder.cjs";
import type { ColumnBaseConfig } from "../../column.cjs";
import { entityKind } from "../../entity.cjs";
import { GelColumn, GelColumnBuilder } from "./common.cjs";
export type GelDoublePrecisionBuilderInitial<TName extends string> = GelDoublePrecisionBuilder<{
name: TName;
dataType: 'number';
columnType: 'GelDoublePrecision';
data: number;
driverParam: number;
enumValues: undefined;
}>;
export declare class GelDoublePrecisionBuilder<T extends ColumnBuilderBaseConfig<'number', 'GelDoublePrecision'>> extends GelColumnBuilder<T> {
static readonly [entityKind]: string;
constructor(name: T['name']);
}
export declare class GelDoublePrecision<T extends ColumnBaseConfig<'number', 'GelDoublePrecision'>> extends GelColumn<T> {
static readonly [entityKind]: string;
getSQLType(): string;
mapFromDriverValue(value: string | number): number;
}
export declare function doublePrecision(): GelDoublePrecisionBuilderInitial<''>;
export declare function doublePrecision<TName extends string>(name: TName): GelDoublePrecisionBuilderInitial<TName>;

View File

@@ -0,0 +1 @@
{"version":3,"file":"file-bar-chart.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}

View File

@@ -0,0 +1,23 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const PhoneIncoming = createLucideIcon("PhoneIncoming", [
["polyline", { points: "16 2 16 8 22 8", key: "1ygljm" }],
["line", { x1: "22", x2: "16", y1: "2", y2: "8", key: "1xzwqn" }],
[
"path",
{
d: "M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",
key: "foiqr5"
}
]
]);
export { PhoneIncoming as default };
//# sourceMappingURL=phone-incoming.js.map

View File

@@ -0,0 +1,134 @@
import { buildMatchFn } from "../../_lib/buildMatchFn.mjs";
import { buildMatchPatternFn } from "../../_lib/buildMatchPatternFn.mjs";
const matchOrdinalNumberPattern = /^(\d+)\.?/i;
const parseOrdinalNumberPattern = /\d+/i;
const matchEraPatterns = {
narrow: /^(p[řr](\.|ed) Kr\.|p[řr](\.|ed) n\. l\.|po Kr\.|n\. l\.)/i,
abbreviated: /^(p[řr](\.|ed) Kr\.|p[řr](\.|ed) n\. l\.|po Kr\.|n\. l\.)/i,
wide: /^(p[řr](\.|ed) Kristem|p[řr](\.|ed) na[šs][íi]m letopo[čc]tem|po Kristu|na[šs]eho letopo[čc]tu)/i,
};
const parseEraPatterns = {
any: [/^p[řr]/i, /^(po|n)/i],
};
const matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^[1234]\. [čc]tvrtlet[íi]/i,
wide: /^[1234]\. [čc]tvrtlet[íi]/i,
};
const parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i],
};
const matchMonthPatterns = {
narrow: /^[lúubdkčcszřrlp]/i,
abbreviated:
/^(led|[úu]no|b[řr]e|dub|kv[ěe]|[čc]vn|[čc]vc|srp|z[áa][řr]|[řr][íi]j|lis|pro)/i,
wide: /^(leden|ledna|[úu]nora?|b[řr]ezen|b[řr]ezna|duben|dubna|kv[ěe]ten|kv[ěe]tna|[čc]erven(ec|ce)?|[čc]ervna|srpen|srpna|z[áa][řr][íi]|[řr][íi]jen|[řr][íi]jna|listopad(a|u)?|prosinec|prosince)/i,
};
const parseMonthPatterns = {
narrow: [
/^l/i,
/^[úu]/i,
/^b/i,
/^d/i,
/^k/i,
/^[čc]/i,
/^[čc]/i,
/^s/i,
/^z/i,
/^[řr]/i,
/^l/i,
/^p/i,
],
any: [
/^led/i,
/^[úu]n/i,
/^b[řr]e/i,
/^dub/i,
/^kv[ěe]/i,
/^[čc]vn|[čc]erven(?!\w)|[čc]ervna/i,
/^[čc]vc|[čc]erven(ec|ce)/i,
/^srp/i,
/^z[áa][řr]/i,
/^[řr][íi]j/i,
/^lis/i,
/^pro/i,
],
};
const matchDayPatterns = {
narrow: /^[npuúsčps]/i,
short: /^(ne|po|[úu]t|st|[čc]t|p[áa]|so)/i,
abbreviated: /^(ned|pon|[úu]te|st[rř]|[čc]tv|p[áa]t|sob)/i,
wide: /^(ned[ěe]le|pond[ěe]l[íi]|[úu]ter[ýy]|st[řr]eda|[čc]tvrtek|p[áa]tek|sobota)/i,
};
const parseDayPatterns = {
narrow: [/^n/i, /^p/i, /^[úu]/i, /^s/i, /^[čc]/i, /^p/i, /^s/i],
any: [/^ne/i, /^po/i, /^[úu]t/i, /^st/i, /^[čc]t/i, /^p[áa]/i, /^so/i],
};
const matchDayPeriodPatterns = {
any: /^dopoledne|dop\.?|odpoledne|odp\.?|p[ůu]lnoc|poledne|r[áa]no|odpoledne|ve[čc]er|(v )?noci?/i,
};
const parseDayPeriodPatterns = {
any: {
am: /^dop/i,
pm: /^odp/i,
midnight: /^p[ůu]lnoc/i,
noon: /^poledne/i,
morning: /r[áa]no/i,
afternoon: /odpoledne/i,
evening: /ve[čc]er/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,19 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const PocketKnife = createLucideIcon("PocketKnife", [
["path", { d: "M3 2v1c0 1 2 1 2 2S3 6 3 7s2 1 2 2-2 1-2 2 2 1 2 2", key: "19w3oe" }],
["path", { d: "M18 6h.01", key: "1v4wsw" }],
["path", { d: "M6 18h.01", key: "uhywen" }],
["path", { d: "M20.83 8.83a4 4 0 0 0-5.66-5.66l-12 12a4 4 0 1 0 5.66 5.66Z", key: "6fykxj" }],
["path", { d: "M18 11.66V22a4 4 0 0 0 4-4V6", key: "1utzek" }]
]);
export { PocketKnife as default };
//# sourceMappingURL=pocket-knife.js.map

View File

@@ -0,0 +1,25 @@
{
"name": "@rollup/rollup-linux-arm64-gnu",
"version": "4.58.0",
"os": [
"linux"
],
"cpu": [
"arm64"
],
"files": [
"rollup.linux-arm64-gnu.node"
],
"description": "Native bindings for Rollup",
"author": "Lukas Taegert-Atkinson",
"homepage": "https://rollupjs.org/",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/rollup/rollup.git"
},
"libc": [
"glibc"
],
"main": "./rollup.linux-arm64-gnu.node"
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"createRelationMap.js","names":["createRelationMap","hasMany","relationTo","value","relationMap","reduce","map","current","add","relation","id","push","forEach","val"],"sources":["../../../src/fields/Relationship/createRelationMap.ts"],"sourcesContent":["'use client'\nimport type { HasManyValueUnion } from './types.js'\n\ntype RelationMap = {\n [relation: string]: (number | string)[]\n}\n\ntype CreateRelationMap = (\n args: {\n relationTo: string[]\n } & HasManyValueUnion,\n) => RelationMap\n\nexport const createRelationMap: CreateRelationMap = ({ hasMany, relationTo, value }) => {\n const relationMap: RelationMap = relationTo.reduce((map, current) => {\n return { ...map, [current]: [] }\n }, {})\n\n if (value === null) {\n return relationMap\n }\n\n if (value) {\n const add = (relation: string, id: number | string) => {\n if ((typeof id === 'string' || typeof id === 'number') && typeof relation === 'string') {\n if (relationMap[relation]) {\n relationMap[relation].push(id)\n } else {\n relationMap[relation] = [id]\n }\n }\n }\n if (hasMany === true) {\n value.forEach((val) => {\n if (val) {\n add(val.relationTo, val.value)\n }\n })\n } else {\n add(value.relationTo, value.value)\n }\n }\n\n return relationMap\n}\n"],"mappings":"AAAA;;AAaA,OAAO,MAAMA,iBAAA,GAAuCA,CAAC;EAAEC,OAAO;EAAEC,UAAU;EAAEC;AAAK,CAAE;EACjF,MAAMC,WAAA,GAA2BF,UAAA,CAAWG,MAAM,CAAC,CAACC,GAAA,EAAKC,OAAA;IACvD,OAAO;MAAE,GAAGD,GAAG;MAAE,CAACC,OAAA,GAAU;IAAG;EACjC,GAAG,CAAC;EAEJ,IAAIJ,KAAA,KAAU,MAAM;IAClB,OAAOC,WAAA;EACT;EAEA,IAAID,KAAA,EAAO;IACT,MAAMK,GAAA,GAAMA,CAACC,QAAA,EAAkBC,EAAA;MAC7B,IAAI,CAAC,OAAOA,EAAA,KAAO,YAAY,OAAOA,EAAA,KAAO,QAAO,KAAM,OAAOD,QAAA,KAAa,UAAU;QACtF,IAAIL,WAAW,CAACK,QAAA,CAAS,EAAE;UACzBL,WAAW,CAACK,QAAA,CAAS,CAACE,IAAI,CAACD,EAAA;QAC7B,OAAO;UACLN,WAAW,CAACK,QAAA,CAAS,GAAG,CAACC,EAAA,CAAG;QAC9B;MACF;IACF;IACA,IAAIT,OAAA,KAAY,MAAM;MACpBE,KAAA,CAAMS,OAAO,CAAEC,GAAA;QACb,IAAIA,GAAA,EAAK;UACPL,GAAA,CAAIK,GAAA,CAAIX,UAAU,EAAEW,GAAA,CAAIV,KAAK;QAC/B;MACF;IACF,OAAO;MACLK,GAAA,CAAIL,KAAA,CAAMD,UAAU,EAAEC,KAAA,CAAMA,KAAK;IACnC;EACF;EAEA,OAAOC,WAAA;AACT","ignoreList":[]}

View File

@@ -0,0 +1,24 @@
import { SerializedTraceData } from '../types-hoist/tracing';
/**
* Returns a string of meta tags that represent the current trace data.
*
* You can use this to propagate a trace from your server-side rendered Html to the browser.
* This function returns up to two meta tags, `sentry-trace` and `baggage`, depending on the
* current trace data state.
*
* @example
* Usage example:
*
* ```js
* function renderHtml() {
* return `
* <head>
* ${getTraceMetaTags()}
* </head>
* `;
* }
* ```
*
*/
export declare function getTraceMetaTags(traceData?: SerializedTraceData): string;
//# sourceMappingURL=meta.d.ts.map

View File

@@ -0,0 +1,35 @@
/*
* 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.
*/
// Updates to this file should also be replicated to @opentelemetry/core too.
/**
* - globalThis (New standard)
* - self (Will return the current window instance for supported browsers)
* - window (fallback for older browser implementations)
* - global (NodeJS implementation)
* - <object> (When all else fails)
*/
/** only globals that common to node and browsers are allowed */
// eslint-disable-next-line node/no-unsupported-features/es-builtins, no-undef
export const _globalThis = typeof globalThis === 'object'
? globalThis
: typeof self === 'object'
? self
: typeof window === 'object'
? window
: typeof global === 'object'
? global
: {};
//# sourceMappingURL=globalThis.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"defaultBeforeSchedule.d.ts","sourceRoot":"","sources":["../../../../src/queues/operations/handleSchedules/defaultBeforeSchedule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAInE,eAAO,MAAM,qBAAqB,EAAE,gBAenC,CAAA"}

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/templates/Default/NavHamburger/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAGhC,CAAA"}

View File

@@ -0,0 +1,14 @@
import type { Sampled, Session, SessionOptions } from '../types';
/**
* Get the sampled status for a session based on sample rates & current sampled status.
*/
export declare function getSessionSampleType(sessionSampleRate: number, allowBuffering: boolean): Sampled;
/**
* Create a new session, which in its current implementation is a Sentry event
* that all replays will be saved to as attachments. Currently, we only expect
* one of these Sentry events per "replay session".
*/
export declare function createSession({ sessionSampleRate, allowBuffering, stickySession }: SessionOptions, { previousSessionId }?: {
previousSessionId?: string;
}): Session;
//# sourceMappingURL=createSession.d.ts.map

View File

@@ -0,0 +1,2 @@
export declare function useClickOutside(ref: React.RefObject<HTMLElement>, handler: () => void, enabled?: boolean): void;
//# sourceMappingURL=useClickOutside.d.ts.map

View File

@@ -0,0 +1,678 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const asyncLib = require("neo-async");
const { MultiHook, SyncHook } = require("tapable");
const ConcurrentCompilationError = require("./ConcurrentCompilationError");
const MultiStats = require("./MultiStats");
const MultiWatching = require("./MultiWatching");
const WebpackError = require("./WebpackError");
const ArrayQueue = require("./util/ArrayQueue");
/**
* @template T
* @typedef {import("tapable").AsyncSeriesHook<T>} AsyncSeriesHook<T>
*/
/**
* @template T
* @template R
* @typedef {import("tapable").SyncBailHook<T, R>} SyncBailHook<T, R>
*/
/** @typedef {import("../declarations/WebpackOptions").WebpackOptions} WebpackOptions */
/** @typedef {import("../declarations/WebpackOptions").WatchOptions} WatchOptions */
/** @typedef {import("./Compiler")} Compiler */
/**
* @template T
* @template [R=void]
* @typedef {import("./webpack").Callback<T, R>} Callback
*/
/** @typedef {import("./webpack").ErrorCallback} ErrorCallback */
/** @typedef {import("./Stats")} Stats */
/** @typedef {import("./logging/Logger").Logger} Logger */
/** @typedef {import("./util/fs").InputFileSystem} InputFileSystem */
/** @typedef {import("./util/fs").IntermediateFileSystem} IntermediateFileSystem */
/** @typedef {import("./util/fs").OutputFileSystem} OutputFileSystem */
/** @typedef {import("./util/fs").WatchFileSystem} WatchFileSystem */
/**
* @callback RunWithDependenciesHandler
* @param {Compiler} compiler
* @param {Callback<MultiStats>} callback
* @returns {void}
*/
/**
* @typedef {object} MultiCompilerOptions
* @property {number=} parallelism how many Compilers are allows to run at the same time in parallel
*/
/** @typedef {ReadonlyArray<WebpackOptions> & MultiCompilerOptions} MultiWebpackOptions */
const CLASS_NAME = "MultiCompiler";
module.exports = class MultiCompiler {
/**
* @param {Compiler[] | Record<string, Compiler>} compilers child compilers
* @param {MultiCompilerOptions} options options
*/
constructor(compilers, options) {
if (!Array.isArray(compilers)) {
/** @type {Compiler[]} */
compilers = Object.keys(compilers).map((name) => {
/** @type {Record<string, Compiler>} */
(compilers)[name].name = name;
return /** @type {Record<string, Compiler>} */ (compilers)[name];
});
}
this.hooks = Object.freeze({
/** @type {SyncHook<[MultiStats]>} */
done: new SyncHook(["stats"]),
/** @type {MultiHook<SyncHook<[string | null, number]>>} */
invalid: new MultiHook(compilers.map((c) => c.hooks.invalid)),
/** @type {MultiHook<AsyncSeriesHook<[Compiler]>>} */
run: new MultiHook(compilers.map((c) => c.hooks.run)),
/** @type {SyncHook<[]>} */
watchClose: new SyncHook([]),
/** @type {MultiHook<AsyncSeriesHook<[Compiler]>>} */
watchRun: new MultiHook(compilers.map((c) => c.hooks.watchRun)),
/** @type {MultiHook<SyncBailHook<[string, string, EXPECTED_ANY[] | undefined], true | void>>} */
infrastructureLog: new MultiHook(
compilers.map((c) => c.hooks.infrastructureLog)
)
});
this.compilers = compilers;
/** @type {MultiCompilerOptions} */
this._options = {
parallelism: options.parallelism || Infinity
};
/** @type {WeakMap<Compiler, string[]>} */
this.dependencies = new WeakMap();
this.running = false;
/** @type {(Stats | null)[]} */
const compilerStats = this.compilers.map(() => null);
let doneCompilers = 0;
for (let index = 0; index < this.compilers.length; index++) {
const compiler = this.compilers[index];
const compilerIndex = index;
let compilerDone = false;
// eslint-disable-next-line no-loop-func
compiler.hooks.done.tap(CLASS_NAME, (stats) => {
if (!compilerDone) {
compilerDone = true;
doneCompilers++;
}
compilerStats[compilerIndex] = stats;
if (doneCompilers === this.compilers.length) {
this.hooks.done.call(
new MultiStats(/** @type {Stats[]} */ (compilerStats))
);
}
});
// eslint-disable-next-line no-loop-func
compiler.hooks.invalid.tap(CLASS_NAME, () => {
if (compilerDone) {
compilerDone = false;
doneCompilers--;
}
});
}
this._validateCompilersOptions();
}
_validateCompilersOptions() {
if (this.compilers.length < 2) return;
/**
* @param {Compiler} compiler compiler
* @param {WebpackError} warning warning
*/
const addWarning = (compiler, warning) => {
compiler.hooks.thisCompilation.tap(CLASS_NAME, (compilation) => {
compilation.warnings.push(warning);
});
};
/** @type {Set<string>} */
const cacheNames = new Set();
for (const compiler of this.compilers) {
if (compiler.options.cache && "name" in compiler.options.cache) {
const name = /** @type {string} */ (compiler.options.cache.name);
if (cacheNames.has(name)) {
addWarning(
compiler,
new WebpackError(
`${
compiler.name
? `Compiler with name "${compiler.name}" doesn't use unique cache name. `
: ""
}Please set unique "cache.name" option. Name "${name}" already used.`
)
);
} else {
cacheNames.add(name);
}
}
}
}
get options() {
return Object.assign(
this.compilers.map((c) => c.options),
this._options
);
}
get outputPath() {
let commonPath = this.compilers[0].outputPath;
for (const compiler of this.compilers) {
while (
compiler.outputPath.indexOf(commonPath) !== 0 &&
/[/\\]/.test(commonPath)
) {
commonPath = commonPath.replace(/[/\\][^/\\]*$/, "");
}
}
if (!commonPath && this.compilers[0].outputPath[0] === "/") return "/";
return commonPath;
}
get inputFileSystem() {
throw new Error("Cannot read inputFileSystem of a MultiCompiler");
}
/**
* @param {InputFileSystem} value the new input file system
*/
set inputFileSystem(value) {
for (const compiler of this.compilers) {
compiler.inputFileSystem = value;
}
}
get outputFileSystem() {
throw new Error("Cannot read outputFileSystem of a MultiCompiler");
}
/**
* @param {OutputFileSystem} value the new output file system
*/
set outputFileSystem(value) {
for (const compiler of this.compilers) {
compiler.outputFileSystem = value;
}
}
get watchFileSystem() {
throw new Error("Cannot read watchFileSystem of a MultiCompiler");
}
/**
* @param {WatchFileSystem} value the new watch file system
*/
set watchFileSystem(value) {
for (const compiler of this.compilers) {
compiler.watchFileSystem = value;
}
}
/**
* @param {IntermediateFileSystem} value the new intermediate file system
*/
set intermediateFileSystem(value) {
for (const compiler of this.compilers) {
compiler.intermediateFileSystem = value;
}
}
get intermediateFileSystem() {
throw new Error("Cannot read outputFileSystem of a MultiCompiler");
}
/**
* @param {string | (() => string)} name name of the logger, or function called once to get the logger name
* @returns {Logger} a logger with that name
*/
getInfrastructureLogger(name) {
return this.compilers[0].getInfrastructureLogger(name);
}
/**
* @param {Compiler} compiler the child compiler
* @param {string[]} dependencies its dependencies
* @returns {void}
*/
setDependencies(compiler, dependencies) {
this.dependencies.set(compiler, dependencies);
}
/**
* @param {Callback<MultiStats>} callback signals when the validation is complete
* @returns {boolean} true if the dependencies are valid
*/
validateDependencies(callback) {
/** @type {Set<{ source: Compiler, target: Compiler }>} */
const edges = new Set();
/** @type {string[]} */
const missing = [];
/**
* @param {Compiler} compiler compiler
* @returns {boolean} target was found
*/
const targetFound = (compiler) => {
for (const edge of edges) {
if (edge.target === compiler) {
return true;
}
}
return false;
};
/**
* @param {{ source: Compiler, target: Compiler }} e1 edge 1
* @param {{ source: Compiler, target: Compiler }} e2 edge 2
* @returns {number} result
*/
const sortEdges = (e1, e2) =>
/** @type {string} */
(e1.source.name).localeCompare(/** @type {string} */ (e2.source.name)) ||
/** @type {string} */
(e1.target.name).localeCompare(/** @type {string} */ (e2.target.name));
for (const source of this.compilers) {
const dependencies = this.dependencies.get(source);
if (dependencies) {
for (const dep of dependencies) {
const target = this.compilers.find((c) => c.name === dep);
if (!target) {
missing.push(dep);
} else {
edges.add({
source,
target
});
}
}
}
}
/** @type {string[]} */
const errors = missing.map(
(m) => `Compiler dependency \`${m}\` not found.`
);
const stack = this.compilers.filter((c) => !targetFound(c));
while (stack.length > 0) {
const current = stack.pop();
for (const edge of edges) {
if (edge.source === current) {
edges.delete(edge);
const target = edge.target;
if (!targetFound(target)) {
stack.push(target);
}
}
}
}
if (edges.size > 0) {
/** @type {string[]} */
const lines = [...edges]
.sort(sortEdges)
.map((edge) => `${edge.source.name} -> ${edge.target.name}`);
lines.unshift("Circular dependency found in compiler dependencies.");
errors.unshift(lines.join("\n"));
}
if (errors.length > 0) {
const message = errors.join("\n");
callback(new Error(message));
return false;
}
return true;
}
// TODO webpack 6 remove
/**
* @deprecated This method should have been private
* @param {Compiler[]} compilers the child compilers
* @param {RunWithDependenciesHandler} fn a handler to run for each compiler
* @param {Callback<Stats[]>} callback the compiler's handler
* @returns {void}
*/
runWithDependencies(compilers, fn, callback) {
/** @type {Set<string>} */
const fulfilledNames = new Set();
let remainingCompilers = compilers;
/**
* @param {string} d dependency
* @returns {boolean} when dependency was fulfilled
*/
const isDependencyFulfilled = (d) => fulfilledNames.has(d);
/**
* @returns {Compiler[]} compilers
*/
const getReadyCompilers = () => {
/** @type {Compiler[]} */
const readyCompilers = [];
const list = remainingCompilers;
remainingCompilers = [];
for (const c of list) {
const dependencies = this.dependencies.get(c);
const ready =
!dependencies || dependencies.every(isDependencyFulfilled);
if (ready) {
readyCompilers.push(c);
} else {
remainingCompilers.push(c);
}
}
return readyCompilers;
};
/**
* @param {Callback<Stats[]>} callback callback
* @returns {void}
*/
const runCompilers = (callback) => {
if (remainingCompilers.length === 0) return callback(null);
asyncLib.map(
getReadyCompilers(),
(compiler, callback) => {
fn(compiler, (err) => {
if (err) return callback(err);
fulfilledNames.add(/** @type {string} */ (compiler.name));
runCompilers(callback);
});
},
(err, results) => {
callback(/** @type {Error | null} */ (err), results);
}
);
};
runCompilers(callback);
}
/**
* @template SetupResult
* @param {(compiler: Compiler, index: number, doneCallback: Callback<Stats>, isBlocked: () => boolean, setChanged: () => void, setInvalid: () => void) => SetupResult} setup setup a single compiler
* @param {(compiler: Compiler, setupResult: SetupResult, callback: Callback<Stats>) => void} run run/continue a single compiler
* @param {Callback<MultiStats>} callback callback when all compilers are done, result includes Stats of all changed compilers
* @returns {SetupResult[]} result of setup
*/
_runGraph(setup, run, callback) {
/** @typedef {{ compiler: Compiler, setupResult: undefined | SetupResult, result: undefined | Stats, state: "pending" | "blocked" | "queued" | "starting" | "running" | "running-outdated" | "done", children: Node[], parents: Node[] }} Node */
// State transitions for nodes:
// -> blocked (initial)
// blocked -> starting [running++] (when all parents done)
// queued -> starting [running++] (when processing the queue)
// starting -> running (when run has been called)
// running -> done [running--] (when compilation is done)
// done -> pending (when invalidated from file change)
// pending -> blocked [add to queue] (when invalidated from aggregated changes)
// done -> blocked [add to queue] (when invalidated, from parent invalidation)
// running -> running-outdated (when invalidated, either from change or parent invalidation)
// running-outdated -> blocked [running--] (when compilation is done)
/** @type {Node[]} */
const nodes = this.compilers.map((compiler) => ({
compiler,
setupResult: undefined,
result: undefined,
state: "blocked",
children: [],
parents: []
}));
/** @type {Map<string, Node>} */
const compilerToNode = new Map();
for (const node of nodes) {
compilerToNode.set(/** @type {string} */ (node.compiler.name), node);
}
for (const node of nodes) {
const dependencies = this.dependencies.get(node.compiler);
if (!dependencies) continue;
for (const dep of dependencies) {
const parent = /** @type {Node} */ (compilerToNode.get(dep));
node.parents.push(parent);
parent.children.push(node);
}
}
/** @type {ArrayQueue<Node>} */
const queue = new ArrayQueue();
for (const node of nodes) {
if (node.parents.length === 0) {
node.state = "queued";
queue.enqueue(node);
}
}
let errored = false;
let running = 0;
const parallelism = /** @type {number} */ (this._options.parallelism);
/**
* @param {Node} node node
* @param {(Error | null)=} err error
* @param {Stats=} stats result
* @returns {void}
*/
const nodeDone = (node, err, stats) => {
if (errored) return;
if (err) {
errored = true;
return asyncLib.each(
nodes,
(node, callback) => {
if (node.compiler.watching) {
node.compiler.watching.close(callback);
} else {
callback();
}
},
() => callback(err)
);
}
node.result = stats;
running--;
if (node.state === "running") {
node.state = "done";
for (const child of node.children) {
if (child.state === "blocked") queue.enqueue(child);
}
} else if (node.state === "running-outdated") {
node.state = "blocked";
queue.enqueue(node);
}
processQueue();
};
/**
* @param {Node} node node
* @returns {void}
*/
const nodeInvalidFromParent = (node) => {
if (node.state === "done") {
node.state = "blocked";
} else if (node.state === "running") {
node.state = "running-outdated";
}
for (const child of node.children) {
nodeInvalidFromParent(child);
}
};
/**
* @param {Node} node node
* @returns {void}
*/
const nodeInvalid = (node) => {
if (node.state === "done") {
node.state = "pending";
} else if (node.state === "running") {
node.state = "running-outdated";
}
for (const child of node.children) {
nodeInvalidFromParent(child);
}
};
/**
* @param {Node} node node
* @returns {void}
*/
const nodeChange = (node) => {
nodeInvalid(node);
if (node.state === "pending") {
node.state = "blocked";
}
if (node.state === "blocked") {
queue.enqueue(node);
processQueue();
}
};
/** @type {SetupResult[]} */
const setupResults = [];
for (const [i, node] of nodes.entries()) {
setupResults.push(
(node.setupResult = setup(
node.compiler,
i,
nodeDone.bind(null, node),
() => node.state !== "starting" && node.state !== "running",
() => nodeChange(node),
() => nodeInvalid(node)
))
);
}
let processing = true;
const processQueue = () => {
if (processing) return;
processing = true;
process.nextTick(processQueueWorker);
};
const processQueueWorker = () => {
// eslint-disable-next-line no-unmodified-loop-condition
while (running < parallelism && queue.length > 0 && !errored) {
const node = /** @type {Node} */ (queue.dequeue());
if (
node.state === "queued" ||
(node.state === "blocked" &&
node.parents.every((p) => p.state === "done"))
) {
running++;
node.state = "starting";
run(
node.compiler,
/** @type {SetupResult} */ (node.setupResult),
nodeDone.bind(null, node)
);
node.state = "running";
}
}
processing = false;
if (
!errored &&
running === 0 &&
nodes.every((node) => node.state === "done")
) {
/** @type {Stats[]} */
const stats = [];
for (const node of nodes) {
const result = node.result;
if (result) {
node.result = undefined;
stats.push(result);
}
}
if (stats.length > 0) {
callback(null, new MultiStats(stats));
}
}
};
processQueueWorker();
return setupResults;
}
/**
* @param {WatchOptions | WatchOptions[]} watchOptions the watcher's options
* @param {Callback<MultiStats>} handler signals when the call finishes
* @returns {MultiWatching | undefined} a compiler watcher
*/
watch(watchOptions, handler) {
if (this.running) {
handler(new ConcurrentCompilationError());
return;
}
this.running = true;
if (this.validateDependencies(handler)) {
const watchings = this._runGraph(
(compiler, idx, callback, isBlocked, setChanged, setInvalid) => {
const watching = compiler.watch(
Array.isArray(watchOptions) ? watchOptions[idx] : watchOptions,
callback
);
if (watching) {
watching._onInvalid = setInvalid;
watching._onChange = setChanged;
watching._isBlocked = isBlocked;
}
return watching;
},
(compiler, watching, _callback) => {
if (compiler.watching !== watching) return;
if (!watching.running) watching.invalidate();
},
handler
);
return new MultiWatching(watchings, this);
}
return new MultiWatching([], this);
}
/**
* @param {Callback<MultiStats>} callback signals when the call finishes
* @returns {void}
*/
run(callback) {
if (this.running) {
callback(new ConcurrentCompilationError());
return;
}
this.running = true;
if (this.validateDependencies(callback)) {
this._runGraph(
() => {},
(compiler, setupResult, callback) => compiler.run(callback),
(err, stats) => {
this.running = false;
if (callback !== undefined) {
return callback(err, stats);
}
}
);
}
}
purgeInputFileSystem() {
for (const compiler of this.compilers) {
if (compiler.inputFileSystem && compiler.inputFileSystem.purge) {
compiler.inputFileSystem.purge();
}
}
}
/**
* @param {ErrorCallback} callback signals when the compiler closes
* @returns {void}
*/
close(callback) {
asyncLib.each(
this.compilers,
(compiler, callback) => {
compiler.close(callback);
},
(error) => {
callback(/** @type {Error | null} */ (error));
}
);
}
};

View File

@@ -0,0 +1,24 @@
// https://go.dev/ref/mod#go-mod-file-module
Prism.languages['go-mod'] = Prism.languages['go-module'] = {
'comment': {
pattern: /\/\/.*/,
greedy: true
},
'version': {
pattern: /(^|[\s()[\],])v\d+\.\d+\.\d+(?:[+-][-+.\w]*)?(?![^\s()[\],])/,
lookbehind: true,
alias: 'number'
},
'go-version': {
pattern: /((?:^|\s)go\s+)\d+(?:\.\d+){1,2}/,
lookbehind: true,
alias: 'number'
},
'keyword': {
pattern: /^([ \t]*)(?:exclude|go|module|replace|require|retract)\b/m,
lookbehind: true
},
'operator': /=>/,
'punctuation': /[()[\],]/
};

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/gel-core/index.ts"],"sourcesContent":["export * from './alias.ts';\nexport * from './checks.ts';\nexport * from './columns/index.ts';\nexport * from './db.ts';\nexport * from './dialect.ts';\nexport * from './foreign-keys.ts';\nexport * from './indexes.ts';\nexport * from './policies.ts';\nexport * from './primary-keys.ts';\nexport * from './query-builders/index.ts';\nexport * from './roles.ts';\nexport * from './schema.ts';\nexport * from './sequence.ts';\nexport * from './session.ts';\nexport * from './subquery.ts';\nexport * from './table.ts';\nexport * from './unique-constraint.ts';\nexport * from './utils.ts';\nexport * from './view-common.ts';\nexport * from './view.ts';\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,6BAAc,uBAAd;AACA,6BAAc,wBADd;AAEA,6BAAc,+BAFd;AAGA,6BAAc,oBAHd;AAIA,6BAAc,yBAJd;AAKA,6BAAc,8BALd;AAMA,6BAAc,yBANd;AAOA,6BAAc,0BAPd;AAQA,6BAAc,8BARd;AASA,6BAAc,sCATd;AAUA,6BAAc,uBAVd;AAWA,6BAAc,wBAXd;AAYA,6BAAc,0BAZd;AAaA,6BAAc,yBAbd;AAcA,6BAAc,0BAdd;AAeA,6BAAc,uBAfd;AAgBA,6BAAc,mCAhBd;AAiBA,6BAAc,uBAjBd;AAkBA,6BAAc,6BAlBd;AAmBA,6BAAc,sBAnBd;","names":[]}

View File

@@ -0,0 +1,30 @@
import { addISOWeekYears } from "./addISOWeekYears.mjs";
/**
* @name subISOWeekYears
* @category ISO Week-Numbering Year Helpers
* @summary Subtract the specified number of ISO week-numbering years from the given date.
*
* @description
* Subtract the specified number of ISO week-numbering years from the given date.
*
* ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param date - The date to be changed
* @param amount - The amount of ISO week-numbering years to be subtracted.
*
* @returns The new date with the ISO week-numbering years subtracted
*
* @example
* // Subtract 5 ISO week-numbering years from 1 September 2014:
* const result = subISOWeekYears(new Date(2014, 8, 1), 5)
* //=> Mon Aug 31 2009 00:00:00
*/
export function subISOWeekYears(date, amount) {
return addISOWeekYears(date, -amount);
}
// Fallback for modularized imports:
export default subISOWeekYears;

View File

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

View File

@@ -0,0 +1,3 @@
'use strict';
module.exports = require('./async').someSeries;

View File

@@ -0,0 +1,139 @@
const formatDistanceLocale = {
lessThanXSeconds: {
one: "секунд хүрэхгүй",
other: "{{count}} секунд хүрэхгүй",
},
xSeconds: {
one: "1 секунд",
other: "{{count}} секунд",
},
halfAMinute: "хагас минут",
lessThanXMinutes: {
one: "минут хүрэхгүй",
other: "{{count}} минут хүрэхгүй",
},
xMinutes: {
one: "1 минут",
other: "{{count}} минут",
},
aboutXHours: {
one: "ойролцоогоор 1 цаг",
other: "ойролцоогоор {{count}} цаг",
},
xHours: {
one: "1 цаг",
other: "{{count}} цаг",
},
xDays: {
one: "1 өдөр",
other: "{{count}} өдөр",
},
aboutXWeeks: {
one: "ойролцоогоор 1 долоо хоног",
other: "ойролцоогоор {{count}} долоо хоног",
},
xWeeks: {
one: "1 долоо хоног",
other: "{{count}} долоо хоног",
},
aboutXMonths: {
one: "ойролцоогоор 1 сар",
other: "ойролцоогоор {{count}} сар",
},
xMonths: {
one: "1 сар",
other: "{{count}} сар",
},
aboutXYears: {
one: "ойролцоогоор 1 жил",
other: "ойролцоогоор {{count}} жил",
},
xYears: {
one: "1 жил",
other: "{{count}} жил",
},
overXYears: {
one: "1 жил гаран",
other: "{{count}} жил гаран",
},
almostXYears: {
one: "бараг 1 жил",
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 {
result = tokenValue.other.replace("{{count}}", String(count));
}
if (options?.addSuffix) {
/**
* Append genitive case
*/
const words = result.split(" ");
const lastword = words.pop();
result = words.join(" ");
switch (lastword) {
case "секунд":
result += " секундийн";
break;
case "минут":
result += " минутын";
break;
case "цаг":
result += " цагийн";
break;
case "өдөр":
result += " өдрийн";
break;
case "сар":
result += " сарын";
break;
case "жил":
result += " жилийн";
break;
case "хоног":
result += " хоногийн";
break;
case "гаран":
result += " гараны";
break;
case "хүрэхгүй":
result += " хүрэхгүй хугацааны";
break;
default:
result += lastword + "-н";
}
if (options.comparison && options.comparison > 0) {
return result + " дараа";
} else {
return result + " өмнө";
}
}
return result;
};

View File

@@ -0,0 +1,76 @@
import { Event, EventHint } from '../types-hoist/event';
interface ZodErrorsOptions {
key?: string;
/**
* Limits the number of Zod errors inlined in each Sentry event.
*
* @default 10
*/
limit?: number;
/**
* Save full list of Zod issues as an attachment in Sentry
*
* @default false
*/
saveZodIssuesAsAttachment?: boolean;
}
/**
* Simplified ZodIssue type definition
*/
interface ZodIssue {
path: (string | number)[];
message?: string;
expected?: unknown;
received?: unknown;
unionErrors?: unknown[];
keys?: unknown[];
invalid_literal?: unknown;
}
interface ZodError extends Error {
issues: ZodIssue[];
}
type SingleLevelZodIssue<T extends ZodIssue> = {
[P in keyof T]: T[P] extends string | number | undefined ? T[P] : T[P] extends unknown[] ? string | undefined : unknown;
};
/**
* Formats child objects or arrays to a string
* that is preserved when sent to Sentry.
*
* Without this, we end up with something like this in Sentry:
*
* [
* [Object],
* [Object],
* [Object],
* [Object]
* ]
*/
export declare function flattenIssue(issue: ZodIssue): SingleLevelZodIssue<ZodIssue>;
/**
* Takes ZodError issue path array and returns a flattened version as a string.
* This makes it easier to display paths within a Sentry error message.
*
* Array indexes are normalized to reduce duplicate entries
*
* @param path ZodError issue path
* @returns flattened path
*
* @example
* flattenIssuePath([0, 'foo', 1, 'bar']) // -> '<array>.foo.<array>.bar'
*/
export declare function flattenIssuePath(path: Array<string | number>): string;
/**
* Zod error message is a stringified version of ZodError.issues
* This doesn't display well in the Sentry UI. Replace it with something shorter.
*/
export declare function formatIssueMessage(zodError: ZodError): string;
/**
* Applies ZodError issues to an event extra and replaces the error message
*/
export declare function applyZodErrorsToEvent(limit: number, saveZodIssuesAsAttachment: boolean | undefined, event: Event, hint: EventHint): Event;
/**
* Sentry integration to process Zod errors, making them easier to work with in Sentry.
*/
export declare const zodErrorsIntegration: (options?: ZodErrorsOptions | undefined) => import("../types-hoist/integration").Integration;
export {};
//# sourceMappingURL=zoderrors.d.ts.map

View File

@@ -0,0 +1,18 @@
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeMax = Math.max,
nativeMin = Math.min;
/**
* The base implementation of `_.inRange` which doesn't coerce arguments.
*
* @private
* @param {number} number The number to check.
* @param {number} start The start of the range.
* @param {number} end The end of the range.
* @returns {boolean} Returns `true` if `number` is in the range, else `false`.
*/
function baseInRange(number, start, end) {
return number >= nativeMin(start, end) && number < nativeMax(start, end);
}
module.exports = baseInRange;

View File

@@ -0,0 +1,2 @@
import { lastIndexOf } from "./index";
export = lastIndexOf;

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