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,9 @@
// This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
import { isSaturday as fn } from "../isSaturday.js";
import { convertToFP } from "./_lib/convertToFP.js";
export const isSaturday = convertToFP(fn, 1);
// Fallback for modularized imports:
export default isSaturday;

View File

@@ -0,0 +1,6 @@
function _class_private_method_get(receiver, privateSet, fn) {
if (!privateSet.has(receiver)) throw new TypeError("attempted to get private field on non-instance");
return fn;
}
export { _class_private_method_get as _ };

View File

@@ -0,0 +1,80 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const t = require("@webassemblyjs/ast");
const { decode } = require("@webassemblyjs/wasm-parser");
const EnvironmentNotSupportAsyncWarning = require("../EnvironmentNotSupportAsyncWarning");
const Parser = require("../Parser");
const StaticExportsDependency = require("../dependencies/StaticExportsDependency");
const WebAssemblyImportDependency = require("../dependencies/WebAssemblyImportDependency");
/** @typedef {import("../Module").BuildInfo} BuildInfo */
/** @typedef {import("../Module").BuildMeta} BuildMeta */
/** @typedef {import("../Parser").ParserState} ParserState */
/** @typedef {import("../Parser").PreparsedAst} PreparsedAst */
const decoderOpts = {
ignoreCodeSection: true,
ignoreDataSection: true,
// this will avoid having to lookup with identifiers in the ModuleContext
ignoreCustomNameSection: true
};
class WebAssemblyParser extends Parser {
/**
* @param {string | Buffer | PreparsedAst} source the source to parse
* @param {ParserState} state the parser state
* @returns {ParserState} the parser state
*/
parse(source, state) {
if (!Buffer.isBuffer(source)) {
throw new Error("WebAssemblyParser input must be a Buffer");
}
// flag it as async module
const buildInfo = /** @type {BuildInfo} */ (state.module.buildInfo);
buildInfo.strict = true;
const BuildMeta = /** @type {BuildMeta} */ (state.module.buildMeta);
BuildMeta.exportsType = "namespace";
BuildMeta.async = true;
EnvironmentNotSupportAsyncWarning.check(
state.module,
state.compilation.runtimeTemplate,
"asyncWebAssembly"
);
// parse it
const program = decode(source, decoderOpts);
const module = program.body[0];
/** @type {string[]} */
const exports = [];
t.traverse(module, {
ModuleExport({ node }) {
exports.push(node.name);
},
ModuleImport({ node }) {
const dep = new WebAssemblyImportDependency(
node.module,
node.name,
node.descr,
false
);
state.module.addDependency(dep);
}
});
state.module.addDependency(new StaticExportsDependency(exports, false));
return state;
}
}
module.exports = WebAssemblyParser;

View File

@@ -0,0 +1,90 @@
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true,
});
exports.MaxIntrospectionDepthRule = MaxIntrospectionDepthRule;
var _GraphQLError = require('../../error/GraphQLError.js');
var _kinds = require('../../language/kinds.js');
const MAX_LISTS_DEPTH = 3;
function MaxIntrospectionDepthRule(context) {
/**
* Counts the depth of list fields in "__Type" recursively and
* returns `true` if the limit has been reached.
*/
function checkDepth(node, visitedFragments = Object.create(null), depth = 0) {
if (node.kind === _kinds.Kind.FRAGMENT_SPREAD) {
const fragmentName = node.name.value;
if (visitedFragments[fragmentName] === true) {
// Fragment cycles are handled by `NoFragmentCyclesRule`.
return false;
}
const fragment = context.getFragment(fragmentName);
if (!fragment) {
// Missing fragments checks are handled by `KnownFragmentNamesRule`.
return false;
} // Rather than following an immutable programming pattern which has
// significant memory and garbage collection overhead, we've opted to
// take a mutable approach for efficiency's sake. Importantly visiting a
// fragment twice is fine, so long as you don't do one visit inside the
// other.
try {
visitedFragments[fragmentName] = true;
return checkDepth(fragment, visitedFragments, depth);
} finally {
visitedFragments[fragmentName] = undefined;
}
}
if (
node.kind === _kinds.Kind.FIELD && // check all introspection lists
(node.name.value === 'fields' ||
node.name.value === 'interfaces' ||
node.name.value === 'possibleTypes' ||
node.name.value === 'inputFields')
) {
// eslint-disable-next-line no-param-reassign
depth++;
if (depth >= MAX_LISTS_DEPTH) {
return true;
}
} // handles fields and inline fragments
if ('selectionSet' in node && node.selectionSet) {
for (const child of node.selectionSet.selections) {
if (checkDepth(child, visitedFragments, depth)) {
return true;
}
}
}
return false;
}
return {
Field(node) {
if (node.name.value === '__schema' || node.name.value === '__type') {
if (checkDepth(node)) {
context.reportError(
new _GraphQLError.GraphQLError(
'Maximum introspection depth exceeded',
{
nodes: [node],
},
),
);
return false;
}
}
},
};
}

View File

@@ -0,0 +1,21 @@
The MIT License
Copyright (c) 2018-2019 Chris Kaczor (github.com/krzkaczor)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View File

@@ -0,0 +1 @@
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/elements/SearchFilter/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAA;AAEtC,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;IACvC;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,QAAQ,CAAA;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;IAChC;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"stringify.js","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/0ab8bcf1ecfc70dfc93291a4cb2496578ac25e9c/src/","sources":["stringify.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,EACL,OAAO,EACP,MAAM,EACN,WAAW,EAEX,SAAS,GACZ,MAAM,YAAY,CAAC;AACpB,OAAO,UAAoC,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;;;;;GAMG;AACH,MAAM,UAAU,YAAY,CACxB,IAAkC,EAClC,OAA8B;IAE9B,OAAO,UAAU,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AACrC,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,YAAY,CACxB,IAAa,EACb,OAA8B;IAE9B,OAAO,WAAW,CAAC,IAAI,CAAC;QACpB,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;QACnE,CAAC,CAAC,EAAE,CAAC;AACb,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,OAAO,CAAC,IAAyB;IAC7C,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC3D,IAAI,KAAK,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC3E,IAAI,OAAO,CAAC,IAAI,CAAC;QAAE,OAAO,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACjD,IAAI,MAAM,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC,IAAI,CAAC;IACnC,OAAO,EAAE,CAAC;AACd,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,WAAW,CAAC,IAAyB;IACjD,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC/D,IAAI,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC;QACxC,OAAO,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACtC,CAAC;IACD,IAAI,MAAM,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC,IAAI,CAAC;IACnC,OAAO,EAAE,CAAC;AACd,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,SAAS,CAAC,IAAyB;IAC/C,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC7D,IAAI,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,WAAW,CAAC,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;QACxE,OAAO,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACpC,CAAC;IACD,IAAI,MAAM,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC,IAAI,CAAC;IACnC,OAAO,EAAE,CAAC;AACd,CAAC"}

View File

@@ -0,0 +1,101 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const debugBuild = require('../debug-build.js');
const debugLogger = require('../utils/debug-logger.js');
const hasSpansEnabled = require('../utils/hasSpansEnabled.js');
const parseSampleRate = require('../utils/parseSampleRate.js');
/**
* Makes a sampling decision for the given options.
*
* Called every time a root span is created. Only root spans which emerge with a `sampled` value of `true` will be
* sent to Sentry.
*/
function sampleSpan(
options,
samplingContext,
sampleRand,
) {
// nothing to do if span recording is not enabled
if (!hasSpansEnabled.hasSpansEnabled(options)) {
return [false];
}
let localSampleRateWasApplied = undefined;
// we would have bailed already if neither `tracesSampler` nor `tracesSampleRate` were defined, so one of these should
// work; prefer the hook if so
let sampleRate;
if (typeof options.tracesSampler === 'function') {
sampleRate = options.tracesSampler({
...samplingContext,
inheritOrSampleWith: fallbackSampleRate => {
// If we have an incoming parent sample rate, we'll just use that one.
// The sampling decision will be inherited because of the sample_rand that was generated when the trace reached the incoming boundaries of the SDK.
if (typeof samplingContext.parentSampleRate === 'number') {
return samplingContext.parentSampleRate;
}
// Fallback if parent sample rate is not on the incoming trace (e.g. if there is no baggage)
// This is to provide backwards compatibility if there are incoming traces from older SDKs that don't send a parent sample rate or a sample rand. In these cases we just want to force either a sampling decision on the downstream traces via the sample rate.
if (typeof samplingContext.parentSampled === 'boolean') {
return Number(samplingContext.parentSampled);
}
return fallbackSampleRate;
},
});
localSampleRateWasApplied = true;
} else if (samplingContext.parentSampled !== undefined) {
sampleRate = samplingContext.parentSampled;
} else if (typeof options.tracesSampleRate !== 'undefined') {
sampleRate = options.tracesSampleRate;
localSampleRateWasApplied = true;
}
// Since this is coming from the user (or from a function provided by the user), who knows what we might get.
// (The only valid values are booleans or numbers between 0 and 1.)
const parsedSampleRate = parseSampleRate.parseSampleRate(sampleRate);
if (parsedSampleRate === undefined) {
debugBuild.DEBUG_BUILD &&
debugLogger.debug.warn(
`[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(
sampleRate,
)} of type ${JSON.stringify(typeof sampleRate)}.`,
);
return [false];
}
// if the function returned 0 (or false), or if `tracesSampleRate` is 0, it's a sign the transaction should be dropped
if (!parsedSampleRate) {
debugBuild.DEBUG_BUILD &&
debugLogger.debug.log(
`[Tracing] Discarding transaction because ${
typeof options.tracesSampler === 'function'
? 'tracesSampler returned 0 or false'
: 'a negative sampling decision was inherited or tracesSampleRate is set to 0'
}`,
);
return [false, parsedSampleRate, localSampleRateWasApplied];
}
// We always compare the sample rand for the current execution context against the chosen sample rate.
// Read more: https://develop.sentry.dev/sdk/telemetry/traces/#propagated-random-value
const shouldSample = sampleRand < parsedSampleRate;
// if we're not going to keep it, we're done
if (!shouldSample) {
debugBuild.DEBUG_BUILD &&
debugLogger.debug.log(
`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(
sampleRate,
)})`,
);
}
return [shouldSample, parsedSampleRate, localSampleRateWasApplied];
}
exports.sampleSpan = sampleSpan;
//# sourceMappingURL=sampling.js.map

View File

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

View File

@@ -0,0 +1,131 @@
import type { $ZodStringFormats } from "../core/checks.js";
import type * as errors from "../core/errors.js";
import * as util from "../core/util.js";
const error: () => errors.$ZodErrorMap = () => {
const Sizable: Record<string, { unit: string; subject: string }> = {
string: { unit: "merkkiä", subject: "merkkijonon" },
file: { unit: "tavua", subject: "tiedoston" },
array: { unit: "alkiota", subject: "listan" },
set: { unit: "alkiota", subject: "joukon" },
number: { unit: "", subject: "luvun" },
bigint: { unit: "", subject: "suuren kokonaisluvun" },
int: { unit: "", subject: "kokonaisluvun" },
date: { unit: "", subject: "päivämäärän" },
};
function getSizing(origin: string): { unit: string; subject: string } | null {
return Sizable[origin] ?? null;
}
const parsedType = (data: any): string => {
const t = typeof data;
switch (t) {
case "number": {
return Number.isNaN(data) ? "NaN" : "number";
}
case "object": {
if (Array.isArray(data)) {
return "array";
}
if (data === null) {
return "null";
}
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
return data.constructor.name;
}
}
}
return t;
};
const Nouns: {
[k in $ZodStringFormats | (string & {})]?: string;
} = {
regex: "säännöllinen lauseke",
email: "sähköpostiosoite",
url: "URL-osoite",
emoji: "emoji",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "ISO-aikaleima",
date: "ISO-päivämäärä",
time: "ISO-aika",
duration: "ISO-kesto",
ipv4: "IPv4-osoite",
ipv6: "IPv6-osoite",
cidrv4: "IPv4-alue",
cidrv6: "IPv6-alue",
base64: "base64-koodattu merkkijono",
base64url: "base64url-koodattu merkkijono",
json_string: "JSON-merkkijono",
e164: "E.164-luku",
jwt: "JWT",
template_literal: "templaattimerkkijono",
};
return (issue) => {
switch (issue.code) {
case "invalid_type":
return `Virheellinen tyyppi: odotettiin ${issue.expected}, oli ${parsedType(issue.input)}`;
case "invalid_value":
if (issue.values.length === 1)
return `Virheellinen syöte: täytyy olla ${util.stringifyPrimitive(issue.values[0])}`;
return `Virheellinen valinta: täytyy olla yksi seuraavista: ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing) {
return `Liian suuri: ${sizing.subject} täytyy olla ${adj}${issue.maximum.toString()} ${sizing.unit}`.trim();
}
return `Liian suuri: arvon täytyy olla ${adj}${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
return `Liian pieni: ${sizing.subject} täytyy olla ${adj}${issue.minimum.toString()} ${sizing.unit}`.trim();
}
return `Liian pieni: arvon täytyy olla ${adj}${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue as errors.$ZodStringFormatIssues;
if (_issue.format === "starts_with") return `Virheellinen syöte: täytyy alkaa "${_issue.prefix}"`;
if (_issue.format === "ends_with") return `Virheellinen syöte: täytyy loppua "${_issue.suffix}"`;
if (_issue.format === "includes") return `Virheellinen syöte: täytyy sisältää "${_issue.includes}"`;
if (_issue.format === "regex") {
return `Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${_issue.pattern}`;
}
return `Virheellinen ${Nouns[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `Virheellinen luku: täytyy olla luvun ${issue.divisor} monikerta`;
case "unrecognized_keys":
return `${issue.keys.length > 1 ? "Tuntemattomat avaimet" : "Tuntematon avain"}: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return "Virheellinen avain tietueessa";
case "invalid_union":
return "Virheellinen unioni";
case "invalid_element":
return "Virheellinen arvo joukossa";
default:
return `Virheellinen syöte`;
}
};
};
export default function (): { localeError: errors.$ZodErrorMap } {
return {
localeError: error(),
};
}

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/admin/forms/Description.ts"],"sourcesContent":["import type { I18nClient, TFunction } from '@payloadcms/translations'\n\nimport type { Field } from '../../fields/config/types.js'\nimport type { ClientFieldWithOptionalType, ServerComponentProps } from './Field.js'\n\nexport type DescriptionFunction = (args: { i18n: I18nClient; t: TFunction }) => string\n\nexport type FieldDescriptionClientComponent<\n TFieldClient extends ClientFieldWithOptionalType = ClientFieldWithOptionalType,\n> = React.ComponentType<FieldDescriptionClientProps<TFieldClient>>\n\nexport type FieldDescriptionServerComponent<\n TFieldServer extends Field = Field,\n TFieldClient extends ClientFieldWithOptionalType = ClientFieldWithOptionalType,\n> = React.ComponentType<FieldDescriptionServerProps<TFieldServer, TFieldClient>>\n\nexport type StaticDescription = Record<string, string> | string\n\nexport type Description = DescriptionFunction | StaticDescription\n\nexport type GenericDescriptionProps = {\n readonly className?: string\n readonly description?: StaticDescription\n readonly marginPlacement?: 'bottom' | 'top'\n readonly path: string\n}\n\nexport type FieldDescriptionServerProps<\n TFieldServer extends Field = Field,\n TFieldClient extends ClientFieldWithOptionalType = ClientFieldWithOptionalType,\n> = {\n clientField: TFieldClient\n readonly field: TFieldServer\n} & GenericDescriptionProps &\n ServerComponentProps\n\nexport type FieldDescriptionClientProps<\n TFieldClient extends ClientFieldWithOptionalType = ClientFieldWithOptionalType,\n> = {\n field: TFieldClient\n} & GenericDescriptionProps\n"],"names":[],"mappings":"AAoCA,WAI2B"}

View File

@@ -0,0 +1,185 @@
import { buildLocalizeFn } from "../../_lib/buildLocalizeFn.mjs";
const eraValues = {
narrow: ["BC", "AC"],
abbreviated: ["きげんぜん", "せいれき"],
wide: ["きげんぜん", "せいれき"],
};
const quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
wide: ["だい1しはんき", "だい2しはんき", "だい3しはんき", "だい4しはんき"],
};
const monthValues = {
narrow: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"],
abbreviated: [
"1がつ",
"2がつ",
"3がつ",
"4がつ",
"5がつ",
"6がつ",
"7がつ",
"8がつ",
"9がつ",
"10がつ",
"11がつ",
"12がつ",
],
wide: [
"1がつ",
"2がつ",
"3がつ",
"4がつ",
"5がつ",
"6がつ",
"7がつ",
"8がつ",
"9がつ",
"10がつ",
"11がつ",
"12がつ",
],
};
const dayValues = {
narrow: ["にち", "げつ", "か", "すい", "もく", "きん", "ど"],
short: ["にち", "げつ", "か", "すい", "もく", "きん", "ど"],
abbreviated: ["にち", "げつ", "か", "すい", "もく", "きん", "ど"],
wide: [
"にちようび",
"げつようび",
"かようび",
"すいようび",
"もくようび",
"きんようび",
"どようび",
],
};
const dayPeriodValues = {
narrow: {
am: "ごぜん",
pm: "ごご",
midnight: "しんや",
noon: "しょうご",
morning: "あさ",
afternoon: "ごご",
evening: "よる",
night: "しんや",
},
abbreviated: {
am: "ごぜん",
pm: "ごご",
midnight: "しんや",
noon: "しょうご",
morning: "あさ",
afternoon: "ごご",
evening: "よる",
night: "しんや",
},
wide: {
am: "ごぜん",
pm: "ごご",
midnight: "しんや",
noon: "しょうご",
morning: "あさ",
afternoon: "ごご",
evening: "よる",
night: "しんや",
},
};
const formattingDayPeriodValues = {
narrow: {
am: "ごぜん",
pm: "ごご",
midnight: "しんや",
noon: "しょうご",
morning: "あさ",
afternoon: "ごご",
evening: "よる",
night: "しんや",
},
abbreviated: {
am: "ごぜん",
pm: "ごご",
midnight: "しんや",
noon: "しょうご",
morning: "あさ",
afternoon: "ごご",
evening: "よる",
night: "しんや",
},
wide: {
am: "ごぜん",
pm: "ごご",
midnight: "しんや",
noon: "しょうご",
morning: "あさ",
afternoon: "ごご",
evening: "よる",
night: "しんや",
},
};
const ordinalNumber = (dirtyNumber, options) => {
const number = Number(dirtyNumber);
const unit = String(options?.unit);
switch (unit) {
case "year":
return `${number}ねん`;
case "quarter":
return `だい${number}しはんき`;
case "month":
return `${number}がつ`;
case "week":
return `だい${number}しゅう`;
case "date":
return `${number}にち`;
case "hour":
return `${number}じ`;
case "minute":
return `${number}ふん`;
case "second":
return `${number}びょう`;
default:
return `${number}`;
}
};
export const localize = {
ordinalNumber: ordinalNumber,
era: buildLocalizeFn({
values: eraValues,
defaultWidth: "wide",
}),
quarter: buildLocalizeFn({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: (quarter) => Number(quarter) - 1,
}),
month: buildLocalizeFn({
values: monthValues,
defaultWidth: "wide",
}),
day: buildLocalizeFn({
values: dayValues,
defaultWidth: "wide",
}),
dayPeriod: buildLocalizeFn({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide",
}),
};

View File

@@ -0,0 +1,212 @@
/*!
Copyright 2013 Lovell Fuller and others.
SPDX-License-Identifier: Apache-2.0
*/
const is = require('./is');
/**
* Blend modes.
* @member
* @private
*/
const blend = {
clear: 'clear',
source: 'source',
over: 'over',
in: 'in',
out: 'out',
atop: 'atop',
dest: 'dest',
'dest-over': 'dest-over',
'dest-in': 'dest-in',
'dest-out': 'dest-out',
'dest-atop': 'dest-atop',
xor: 'xor',
add: 'add',
saturate: 'saturate',
multiply: 'multiply',
screen: 'screen',
overlay: 'overlay',
darken: 'darken',
lighten: 'lighten',
'colour-dodge': 'colour-dodge',
'color-dodge': 'colour-dodge',
'colour-burn': 'colour-burn',
'color-burn': 'colour-burn',
'hard-light': 'hard-light',
'soft-light': 'soft-light',
difference: 'difference',
exclusion: 'exclusion'
};
/**
* Composite image(s) over the processed (resized, extracted etc.) image.
*
* The images to composite must be the same size or smaller than the processed image.
* If both `top` and `left` options are provided, they take precedence over `gravity`.
*
* Other operations in the same processing pipeline (e.g. resize, rotate, flip,
* flop, extract) will always be applied to the input image before composition.
*
* The `blend` option can be one of `clear`, `source`, `over`, `in`, `out`, `atop`,
* `dest`, `dest-over`, `dest-in`, `dest-out`, `dest-atop`,
* `xor`, `add`, `saturate`, `multiply`, `screen`, `overlay`, `darken`, `lighten`,
* `colour-dodge`, `color-dodge`, `colour-burn`,`color-burn`,
* `hard-light`, `soft-light`, `difference`, `exclusion`.
*
* More information about blend modes can be found at
* https://www.libvips.org/API/current/enum.BlendMode.html
* and https://www.cairographics.org/operators/
*
* @since 0.22.0
*
* @example
* await sharp(background)
* .composite([
* { input: layer1, gravity: 'northwest' },
* { input: layer2, gravity: 'southeast' },
* ])
* .toFile('combined.png');
*
* @example
* const output = await sharp('input.gif', { animated: true })
* .composite([
* { input: 'overlay.png', tile: true, blend: 'saturate' }
* ])
* .toBuffer();
*
* @example
* sharp('input.png')
* .rotate(180)
* .resize(300)
* .flatten( { background: '#ff6600' } )
* .composite([{ input: 'overlay.png', gravity: 'southeast' }])
* .sharpen()
* .withMetadata()
* .webp( { quality: 90 } )
* .toBuffer()
* .then(function(outputBuffer) {
* // outputBuffer contains upside down, 300px wide, alpha channel flattened
* // onto orange background, composited with overlay.png with SE gravity,
* // sharpened, with metadata, 90% quality WebP image data. Phew!
* });
*
* @param {Object[]} images - Ordered list of images to composite
* @param {Buffer|String} [images[].input] - Buffer containing image data, String containing the path to an image file, or Create object (see below)
* @param {Object} [images[].input.create] - describes a blank overlay to be created.
* @param {Number} [images[].input.create.width]
* @param {Number} [images[].input.create.height]
* @param {Number} [images[].input.create.channels] - 3-4
* @param {String|Object} [images[].input.create.background] - parsed by the [color](https://www.npmjs.org/package/color) module to extract values for red, green, blue and alpha.
* @param {Object} [images[].input.text] - describes a new text image to be created.
* @param {string} [images[].input.text.text] - text to render as a UTF-8 string. It can contain Pango markup, for example `<i>Le</i>Monde`.
* @param {string} [images[].input.text.font] - font name to render with.
* @param {string} [images[].input.text.fontfile] - absolute filesystem path to a font file that can be used by `font`.
* @param {number} [images[].input.text.width=0] - integral number of pixels to word-wrap at. Lines of text wider than this will be broken at word boundaries.
* @param {number} [images[].input.text.height=0] - integral number of pixels high. When defined, `dpi` will be ignored and the text will automatically fit the pixel resolution defined by `width` and `height`. Will be ignored if `width` is not specified or set to 0.
* @param {string} [images[].input.text.align='left'] - text alignment (`'left'`, `'centre'`, `'center'`, `'right'`).
* @param {boolean} [images[].input.text.justify=false] - set this to true to apply justification to the text.
* @param {number} [images[].input.text.dpi=72] - the resolution (size) at which to render the text. Does not take effect if `height` is specified.
* @param {boolean} [images[].input.text.rgba=false] - set this to true to enable RGBA output. This is useful for colour emoji rendering, or support for Pango markup features like `<span foreground="red">Red!</span>`.
* @param {number} [images[].input.text.spacing=0] - text line height in points. Will use the font line height if none is specified.
* @param {Boolean} [images[].autoOrient=false] - set to true to use EXIF orientation data, if present, to orient the image.
* @param {String} [images[].blend='over'] - how to blend this image with the image below.
* @param {String} [images[].gravity='centre'] - gravity at which to place the overlay.
* @param {Number} [images[].top] - the pixel offset from the top edge.
* @param {Number} [images[].left] - the pixel offset from the left edge.
* @param {Boolean} [images[].tile=false] - set to true to repeat the overlay image across the entire image with the given `gravity`.
* @param {Boolean} [images[].premultiplied=false] - set to true to avoid premultiplying the image below. Equivalent to the `--premultiplied` vips option.
* @param {Number} [images[].density=72] - number representing the DPI for vector overlay image.
* @param {Object} [images[].raw] - describes overlay when using raw pixel data.
* @param {Number} [images[].raw.width]
* @param {Number} [images[].raw.height]
* @param {Number} [images[].raw.channels]
* @param {boolean} [images[].animated=false] - Set to `true` to read all frames/pages of an animated image.
* @param {string} [images[].failOn='warning'] - @see {@link /api-constructor/ constructor parameters}
* @param {number|boolean} [images[].limitInputPixels=268402689] - @see {@link /api-constructor/ constructor parameters}
* @returns {Sharp}
* @throws {Error} Invalid parameters
*/
function composite (images) {
if (!Array.isArray(images)) {
throw is.invalidParameterError('images to composite', 'array', images);
}
this.options.composite = images.map(image => {
if (!is.object(image)) {
throw is.invalidParameterError('image to composite', 'object', image);
}
const inputOptions = this._inputOptionsFromObject(image);
const composite = {
input: this._createInputDescriptor(image.input, inputOptions, { allowStream: false }),
blend: 'over',
tile: false,
left: 0,
top: 0,
hasOffset: false,
gravity: 0,
premultiplied: false
};
if (is.defined(image.blend)) {
if (is.string(blend[image.blend])) {
composite.blend = blend[image.blend];
} else {
throw is.invalidParameterError('blend', 'valid blend name', image.blend);
}
}
if (is.defined(image.tile)) {
if (is.bool(image.tile)) {
composite.tile = image.tile;
} else {
throw is.invalidParameterError('tile', 'boolean', image.tile);
}
}
if (is.defined(image.left)) {
if (is.integer(image.left)) {
composite.left = image.left;
} else {
throw is.invalidParameterError('left', 'integer', image.left);
}
}
if (is.defined(image.top)) {
if (is.integer(image.top)) {
composite.top = image.top;
} else {
throw is.invalidParameterError('top', 'integer', image.top);
}
}
if (is.defined(image.top) !== is.defined(image.left)) {
throw new Error('Expected both left and top to be set');
} else {
composite.hasOffset = is.integer(image.top) && is.integer(image.left);
}
if (is.defined(image.gravity)) {
if (is.integer(image.gravity) && is.inRange(image.gravity, 0, 8)) {
composite.gravity = image.gravity;
} else if (is.string(image.gravity) && is.integer(this.constructor.gravity[image.gravity])) {
composite.gravity = this.constructor.gravity[image.gravity];
} else {
throw is.invalidParameterError('gravity', 'valid gravity', image.gravity);
}
}
if (is.defined(image.premultiplied)) {
if (is.bool(image.premultiplied)) {
composite.premultiplied = image.premultiplied;
} else {
throw is.invalidParameterError('premultiplied', 'boolean', image.premultiplied);
}
}
return composite;
});
return this;
}
/**
* Decorate the Sharp prototype with composite-related functions.
* @module Sharp
* @private
*/
module.exports = (Sharp) => {
Sharp.prototype.composite = composite;
Sharp.blend = blend;
};

View File

@@ -0,0 +1 @@
export type NonUndefinable<Type> = Type extends undefined ? never : Type;

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sources":["../../../../../src/integrations/tracing/vercelai/index.ts"],"sourcesContent":["import type { Client, IntegrationFn } from '@sentry/core';\nimport { addVercelAiProcessors, defineIntegration } from '@sentry/core';\nimport { generateInstrumentOnce, type modulesIntegration } from '@sentry/node-core';\nimport { INTEGRATION_NAME } from './constants';\nimport { SentryVercelAiInstrumentation } from './instrumentation';\nimport type { VercelAiOptions } from './types';\n\nexport const instrumentVercelAi = generateInstrumentOnce(INTEGRATION_NAME, () => new SentryVercelAiInstrumentation({}));\n\n/**\n * Determines if the integration should be forced based on environment and package availability.\n * Returns true if the 'ai' package is available.\n */\nfunction shouldForceIntegration(client: Client): boolean {\n const modules = client.getIntegrationByName<ReturnType<typeof modulesIntegration>>('Modules');\n return !!modules?.getModules?.()?.ai;\n}\n\nconst _vercelAIIntegration = ((options: VercelAiOptions = {}) => {\n let instrumentation: undefined | SentryVercelAiInstrumentation;\n\n return {\n name: INTEGRATION_NAME,\n options,\n setupOnce() {\n instrumentation = instrumentVercelAi();\n },\n afterAllSetup(client) {\n // Auto-detect if we should force the integration when running with 'ai' package available\n // Note that this can only be detected if the 'Modules' integration is available, and running in CJS mode\n const shouldForce = options.force ?? shouldForceIntegration(client);\n\n if (shouldForce) {\n addVercelAiProcessors(client);\n } else {\n instrumentation?.callWhenPatched(() => addVercelAiProcessors(client));\n }\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Adds Sentry tracing instrumentation for the [ai](https://www.npmjs.com/package/ai) library.\n * This integration is not enabled by default, you need to manually add it.\n *\n * For more information, see the [`ai` documentation](https://sdk.vercel.ai/docs/ai-sdk-core/telemetry).\n *\n * @example\n * ```javascript\n * const Sentry = require('@sentry/node');\n *\n * Sentry.init({\n * integrations: [Sentry.vercelAIIntegration()],\n * });\n * ```\n *\n * This integration adds tracing support to all `ai` function calls.\n * You need to opt-in to collecting spans for a specific call,\n * you can do so by setting `experimental_telemetry.isEnabled` to `true` in the first argument of the function call.\n *\n * ```javascript\n * const result = await generateText({\n * model: openai('gpt-4-turbo'),\n * experimental_telemetry: { isEnabled: true },\n * });\n * ```\n *\n * If you want to collect inputs and outputs for a specific call, you must specifically opt-in to each\n * function call by setting `experimental_telemetry.recordInputs` and `experimental_telemetry.recordOutputs`\n * to `true`.\n *\n * ```javascript\n * const result = await generateText({\n * model: openai('gpt-4-turbo'),\n * experimental_telemetry: { isEnabled: true, recordInputs: true, recordOutputs: true },\n * });\n */\nexport const vercelAIIntegration = defineIntegration(_vercelAIIntegration);\n"],"names":["generateInstrumentOnce","INTEGRATION_NAME","SentryVercelAiInstrumentation","addVercelAiProcessors","defineIntegration"],"mappings":";;;;;;;MAOa,kBAAA,GAAqBA,+BAAsB,CAACC,0BAAgB,EAAE,MAAM,IAAIC,6CAA6B,CAAC,EAAE,CAAC;;AAEtH;AACA;AACA;AACA;AACA,SAAS,sBAAsB,CAAC,MAAM,EAAmB;AACzD,EAAE,MAAM,UAAU,MAAM,CAAC,oBAAoB,CAAwC,SAAS,CAAC;AAC/F,EAAE,OAAO,CAAC,CAAC,OAAO,EAAE,UAAU,IAAI,EAAE,EAAE;AACtC;;AAEA,MAAM,oBAAA,IAAwB,CAAC,OAAO,GAAoB,EAAE,KAAK;AACjE,EAAE,IAAI,eAAe;;AAErB,EAAE,OAAO;AACT,IAAI,IAAI,EAAED,0BAAgB;AAC1B,IAAI,OAAO;AACX,IAAI,SAAS,GAAG;AAChB,MAAM,eAAA,GAAkB,kBAAkB,EAAE;AAC5C,IAAI,CAAC;AACL,IAAI,aAAa,CAAC,MAAM,EAAE;AAC1B;AACA;AACA,MAAM,MAAM,WAAA,GAAc,OAAO,CAAC,SAAS,sBAAsB,CAAC,MAAM,CAAC;;AAEzE,MAAM,IAAI,WAAW,EAAE;AACvB,QAAQE,0BAAqB,CAAC,MAAM,CAAC;AACrC,MAAM,OAAO;AACb,QAAQ,eAAe,EAAE,eAAe,CAAC,MAAMA,0BAAqB,CAAC,MAAM,CAAC,CAAC;AAC7E,MAAM;AACN,IAAI,CAAC;AACL,GAAG;AACH,CAAC,CAAA;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;MACa,mBAAA,GAAsBC,sBAAiB,CAAC,oBAAoB;;;;;"}

View File

@@ -0,0 +1,131 @@
"use strict";
exports.localize = void 0;
var _index = require("../../_lib/buildLocalizeFn.js");
const eraValues = {
narrow: ["o.Kr.", "m.Kr."],
abbreviated: ["o.Kr.", "m.Kr."],
wide: ["ovdal Kristusa", "maŋŋel Kristusa"],
};
const quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
wide: ["1. kvartála", "2. kvartála", "3. kvartála", "4. kvartála"],
};
const monthValues = {
narrow: ["O", "G", "N", "C", "M", "G", "S", "B", "Č", "G", "S", "J"],
abbreviated: [
"ođđa",
"guov",
"njuk",
"cuo",
"mies",
"geas",
"suoi",
"borg",
"čakč",
"golg",
"skáb",
"juov",
],
wide: [
"ođđajagemánnu",
"guovvamánnu",
"njukčamánnu",
"cuoŋománnu",
"miessemánnu",
"geassemánnu",
"suoidnemánnu",
"borgemánnu",
"čakčamánnu",
"golggotmánnu",
"skábmamánnu",
"juovlamánnu",
],
};
const dayValues = {
narrow: ["S", "V", "M", "G", "D", "B", "L"],
short: ["sotn", "vuos", "maŋ", "gask", "duor", "bear", "láv"],
abbreviated: ["sotn", "vuos", "maŋ", "gask", "duor", "bear", "láv"],
wide: [
"sotnabeaivi",
"vuossárga",
"maŋŋebárga",
"gaskavahkku",
"duorastat",
"bearjadat",
"lávvardat",
],
};
const dayPeriodValues = {
narrow: {
am: "a",
pm: "p",
midnight: "gaskaidja",
noon: "gaskabeaivi",
morning: "iđđes",
afternoon: "maŋŋel gaska.",
evening: "eahkes",
night: "ihkku",
},
abbreviated: {
am: "a.m.",
pm: "p.m.",
midnight: "gaskaidja",
noon: "gaskabeaivvi",
morning: "iđđes",
afternoon: "maŋŋel gaskabea.",
evening: "eahkes",
night: "ihkku",
},
wide: {
am: "a.m.",
pm: "p.m.",
midnight: "gaskaidja",
noon: "gaskabeavvi",
morning: "iđđes",
afternoon: "maŋŋel gaskabeaivvi",
evening: "eahkes",
night: "ihkku",
},
};
const ordinalNumber = (dirtyNumber, _options) => {
const number = Number(dirtyNumber);
return number + ".";
};
const localize = (exports.localize = {
ordinalNumber,
era: (0, _index.buildLocalizeFn)({
values: eraValues,
defaultWidth: "wide",
}),
quarter: (0, _index.buildLocalizeFn)({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: (quarter) => quarter - 1,
}),
month: (0, _index.buildLocalizeFn)({
values: monthValues,
defaultWidth: "wide",
}),
day: (0, _index.buildLocalizeFn)({
values: dayValues,
defaultWidth: "wide",
}),
dayPeriod: (0, _index.buildLocalizeFn)({
values: dayPeriodValues,
defaultWidth: "wide",
}),
});

View File

@@ -0,0 +1,29 @@
"use strict";
exports.enCA = void 0;
var _index = require("./en-US/_lib/formatRelative.cjs");
var _index2 = require("./en-US/_lib/localize.cjs");
var _index3 = require("./en-US/_lib/match.cjs");
var _index4 = require("./en-CA/_lib/formatDistance.cjs");
var _index5 = require("./en-CA/_lib/formatLong.cjs");
/**
* @category Locales
* @summary English locale (Canada).
* @language English
* @iso-639-2 eng
* @author Mark Owsiak [@markowsiak](https://github.com/markowsiak)
* @author Marco Imperatore [@mimperatore](https://github.com/mimperatore)
*/
const enCA = (exports.enCA = {
code: "en-CA",
formatDistance: _index4.formatDistance,
formatLong: _index5.formatLong,
formatRelative: _index.formatRelative,
localize: _index2.localize,
match: _index3.match,
options: {
weekStartsOn: 0 /* Sunday */,
firstWeekContainsDate: 1,
},
});

View File

@@ -0,0 +1,190 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getFeed = getFeed;
var stringify_js_1 = require("./stringify.js");
var legacy_js_1 = require("./legacy.js");
/**
* Get the feed object from the root of a DOM tree.
*
* @category Feeds
* @param doc - The DOM to to extract the feed from.
* @returns The feed.
*/
function getFeed(doc) {
var feedRoot = getOneElement(isValidFeed, doc);
return !feedRoot
? null
: feedRoot.name === "feed"
? getAtomFeed(feedRoot)
: getRssFeed(feedRoot);
}
/**
* Parse an Atom feed.
*
* @param feedRoot The root of the feed.
* @returns The parsed feed.
*/
function getAtomFeed(feedRoot) {
var _a;
var childs = feedRoot.children;
var feed = {
type: "atom",
items: (0, legacy_js_1.getElementsByTagName)("entry", childs).map(function (item) {
var _a;
var children = item.children;
var entry = { media: getMediaElements(children) };
addConditionally(entry, "id", "id", children);
addConditionally(entry, "title", "title", children);
var href = (_a = getOneElement("link", children)) === null || _a === void 0 ? void 0 : _a.attribs["href"];
if (href) {
entry.link = href;
}
var description = fetch("summary", children) || fetch("content", children);
if (description) {
entry.description = description;
}
var pubDate = fetch("updated", children);
if (pubDate) {
entry.pubDate = new Date(pubDate);
}
return entry;
}),
};
addConditionally(feed, "id", "id", childs);
addConditionally(feed, "title", "title", childs);
var href = (_a = getOneElement("link", childs)) === null || _a === void 0 ? void 0 : _a.attribs["href"];
if (href) {
feed.link = href;
}
addConditionally(feed, "description", "subtitle", childs);
var updated = fetch("updated", childs);
if (updated) {
feed.updated = new Date(updated);
}
addConditionally(feed, "author", "email", childs, true);
return feed;
}
/**
* Parse a RSS feed.
*
* @param feedRoot The root of the feed.
* @returns The parsed feed.
*/
function getRssFeed(feedRoot) {
var _a, _b;
var childs = (_b = (_a = getOneElement("channel", feedRoot.children)) === null || _a === void 0 ? void 0 : _a.children) !== null && _b !== void 0 ? _b : [];
var feed = {
type: feedRoot.name.substr(0, 3),
id: "",
items: (0, legacy_js_1.getElementsByTagName)("item", feedRoot.children).map(function (item) {
var children = item.children;
var entry = { media: getMediaElements(children) };
addConditionally(entry, "id", "guid", children);
addConditionally(entry, "title", "title", children);
addConditionally(entry, "link", "link", children);
addConditionally(entry, "description", "description", children);
var pubDate = fetch("pubDate", children) || fetch("dc:date", children);
if (pubDate)
entry.pubDate = new Date(pubDate);
return entry;
}),
};
addConditionally(feed, "title", "title", childs);
addConditionally(feed, "link", "link", childs);
addConditionally(feed, "description", "description", childs);
var updated = fetch("lastBuildDate", childs);
if (updated) {
feed.updated = new Date(updated);
}
addConditionally(feed, "author", "managingEditor", childs, true);
return feed;
}
var MEDIA_KEYS_STRING = ["url", "type", "lang"];
var MEDIA_KEYS_INT = [
"fileSize",
"bitrate",
"framerate",
"samplingrate",
"channels",
"duration",
"height",
"width",
];
/**
* Get all media elements of a feed item.
*
* @param where Nodes to search in.
* @returns Media elements.
*/
function getMediaElements(where) {
return (0, legacy_js_1.getElementsByTagName)("media:content", where).map(function (elem) {
var attribs = elem.attribs;
var media = {
medium: attribs["medium"],
isDefault: !!attribs["isDefault"],
};
for (var _i = 0, MEDIA_KEYS_STRING_1 = MEDIA_KEYS_STRING; _i < MEDIA_KEYS_STRING_1.length; _i++) {
var attrib = MEDIA_KEYS_STRING_1[_i];
if (attribs[attrib]) {
media[attrib] = attribs[attrib];
}
}
for (var _a = 0, MEDIA_KEYS_INT_1 = MEDIA_KEYS_INT; _a < MEDIA_KEYS_INT_1.length; _a++) {
var attrib = MEDIA_KEYS_INT_1[_a];
if (attribs[attrib]) {
media[attrib] = parseInt(attribs[attrib], 10);
}
}
if (attribs["expression"]) {
media.expression = attribs["expression"];
}
return media;
});
}
/**
* Get one element by tag name.
*
* @param tagName Tag name to look for
* @param node Node to search in
* @returns The element or null
*/
function getOneElement(tagName, node) {
return (0, legacy_js_1.getElementsByTagName)(tagName, node, true, 1)[0];
}
/**
* Get the text content of an element with a certain tag name.
*
* @param tagName Tag name to look for.
* @param where Node to search in.
* @param recurse Whether to recurse into child nodes.
* @returns The text content of the element.
*/
function fetch(tagName, where, recurse) {
if (recurse === void 0) { recurse = false; }
return (0, stringify_js_1.textContent)((0, legacy_js_1.getElementsByTagName)(tagName, where, recurse, 1)).trim();
}
/**
* Adds a property to an object if it has a value.
*
* @param obj Object to be extended
* @param prop Property name
* @param tagName Tag name that contains the conditionally added property
* @param where Element to search for the property
* @param recurse Whether to recurse into child nodes.
*/
function addConditionally(obj, prop, tagName, where, recurse) {
if (recurse === void 0) { recurse = false; }
var val = fetch(tagName, where, recurse);
if (val)
obj[prop] = val;
}
/**
* Checks if an element is a feed root node.
*
* @param value The name of the element to check.
* @returns Whether an element is a feed root node.
*/
function isValidFeed(value) {
return value === "rss" || value === "feed" || value === "rdf:RDF";
}
//# sourceMappingURL=feeds.js.map

View File

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

View File

@@ -0,0 +1,40 @@
"use strict";
exports.interval = interval;
var _index = require("./toDate.js");
/**
* The {@link interval} function options.
*/
/**
* @name interval
* @category Interval Helpers
* @summary Creates an interval object and validates its values.
*
* @description
* Creates a normalized interval object and validates its values. If the interval is invalid, an exception is thrown.
*
* @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 start - The start of the interval.
* @param end - The end of the interval.
* @param options - The options object.
*
* @throws `Start date is invalid` when `start` is invalid.
* @throws `End date is invalid` when `end` is invalid.
* @throws `End date must be after start date` when end is before `start` and `options.assertPositive` is true.
*
* @returns The normalized and validated interval object.
*/
function interval(start, end, options) {
const _start = (0, _index.toDate)(start);
if (isNaN(+_start)) throw new TypeError("Start date is invalid");
const _end = (0, _index.toDate)(end);
if (isNaN(+_end)) throw new TypeError("End date is invalid");
if (options?.assertPositive && +_start > +_end)
throw new TypeError("End date must be after start date");
return { start: _start, end: _end };
}

View File

@@ -0,0 +1,283 @@
import { executeAccess } from '../../auth/executeAccess.js';
import { combineQueries } from '../../database/combineQueries.js';
import { validateQueryPaths } from '../../database/queryValidation/validateQueryPaths.js';
import { sanitizeJoinQuery } from '../../database/sanitizeJoinQuery.js';
import { sanitizeWhereQuery } from '../../database/sanitizeWhereQuery.js';
import { afterRead } from '../../fields/hooks/afterRead/index.js';
import { lockedDocumentsCollectionSlug } from '../../locked-documents/config.js';
import { appendNonTrashedFilter } from '../../utilities/appendNonTrashedFilter.js';
import { hasDraftsEnabled } from '../../utilities/getVersionsConfig.js';
import { killTransaction } from '../../utilities/killTransaction.js';
import { sanitizeSelect } from '../../utilities/sanitizeSelect.js';
import { buildVersionCollectionFields } from '../../versions/buildCollectionFields.js';
import { appendVersionToQueryKey } from '../../versions/drafts/appendVersionToQueryKey.js';
import { getQueryDraftsSelect } from '../../versions/drafts/getQueryDraftsSelect.js';
import { getQueryDraftsSort } from '../../versions/drafts/getQueryDraftsSort.js';
import { buildAfterOperation } from './utilities/buildAfterOperation.js';
import { buildBeforeOperation } from './utilities/buildBeforeOperation.js';
import { sanitizeSortQuery } from './utilities/sanitizeSortQuery.js';
const lockDurationDefault = 300 // Default 5 minutes in seconds
;
export const findOperation = async (incomingArgs)=>{
let args = incomingArgs;
try {
// /////////////////////////////////////
// beforeOperation - Collection
// /////////////////////////////////////
args = await buildBeforeOperation({
args,
collection: args.collection.config,
operation: 'read',
overrideAccess: args.overrideAccess
});
const { collection: { config: collectionConfig }, collection, currentDepth, depth, disableErrors, draft: draftsEnabled, includeLockStatus: includeLockStatusFromArgs, joins, limit, overrideAccess, page, pagination = true, populate, select: incomingSelect, showHiddenFields, sort: incomingSort, trash = false, where } = args;
const req = args.req;
const includeLockStatus = includeLockStatusFromArgs && req.payload.collections?.[lockedDocumentsCollectionSlug];
const { fallbackLocale, locale, payload } = req;
const select = sanitizeSelect({
fields: collectionConfig.flattenedFields,
forceSelect: collectionConfig.forceSelect,
select: incomingSelect
});
// /////////////////////////////////////
// Access
// /////////////////////////////////////
let accessResult;
if (!overrideAccess) {
accessResult = await executeAccess({
disableErrors,
req
}, collectionConfig.access.read);
// If errors are disabled, and access returns false, return empty results
if (accessResult === false) {
return {
docs: [],
hasNextPage: false,
hasPrevPage: false,
limit: limit,
nextPage: null,
page: 1,
pagingCounter: 1,
prevPage: null,
totalDocs: 0,
totalPages: 1
};
}
}
// /////////////////////////////////////
// Find
// /////////////////////////////////////
const usePagination = pagination && limit !== 0;
const sanitizedLimit = limit ?? (usePagination ? 10 : 0);
const sanitizedPage = page || 1;
let result;
let fullWhere = combineQueries(where, accessResult);
sanitizeWhereQuery({
fields: collectionConfig.flattenedFields,
payload,
where: fullWhere
});
// Exclude trashed documents when trash: false
fullWhere = appendNonTrashedFilter({
enableTrash: collectionConfig.trash,
trash,
where: fullWhere
});
const sort = sanitizeSortQuery({
fields: collection.config.flattenedFields,
sort: incomingSort
});
const sanitizedJoins = await sanitizeJoinQuery({
collectionConfig,
joins,
overrideAccess: overrideAccess,
req
});
if (hasDraftsEnabled(collectionConfig) && draftsEnabled) {
fullWhere = appendVersionToQueryKey(fullWhere);
await validateQueryPaths({
collectionConfig: collection.config,
overrideAccess: overrideAccess,
req,
versionFields: buildVersionCollectionFields(payload.config, collection.config, true),
where: appendVersionToQueryKey(where)
});
result = await payload.db.queryDrafts({
collection: collectionConfig.slug,
joins: req.payloadAPI === 'GraphQL' ? false : sanitizedJoins,
limit: sanitizedLimit,
locale: locale,
page: sanitizedPage,
pagination: usePagination,
req,
select: getQueryDraftsSelect({
select
}),
sort: getQueryDraftsSort({
collectionConfig,
sort
}),
where: fullWhere
});
} else {
await validateQueryPaths({
collectionConfig,
overrideAccess: overrideAccess,
req,
where: where
});
result = await payload.db.find({
collection: collectionConfig.slug,
draftsEnabled,
joins: req.payloadAPI === 'GraphQL' ? false : sanitizedJoins,
limit: sanitizedLimit,
locale: locale,
page: sanitizedPage,
pagination,
req,
select,
sort,
where: fullWhere
});
}
// /////////////////////////////////////
// Add collection property for auth collections
// /////////////////////////////////////
if (collectionConfig.auth) {
result.docs = result.docs.map((doc)=>({
...doc,
collection: collectionConfig.slug
}));
}
if (includeLockStatus) {
try {
const lockDocumentsProp = collectionConfig?.lockDocuments;
const lockDuration = typeof lockDocumentsProp === 'object' ? lockDocumentsProp.duration : lockDurationDefault;
const lockDurationInMilliseconds = lockDuration * 1000;
const now = new Date().getTime();
const lockedDocuments = await payload.find({
collection: lockedDocumentsCollectionSlug,
depth: 1,
limit: sanitizedLimit,
overrideAccess: false,
pagination: false,
req,
where: {
and: [
{
'document.relationTo': {
equals: collectionConfig.slug
}
},
{
'document.value': {
in: result.docs.map((doc)=>doc.id)
}
},
// Query where the lock is newer than the current time minus lock time
{
updatedAt: {
greater_than: new Date(now - lockDurationInMilliseconds)
}
}
]
}
});
const lockedDocs = Array.isArray(lockedDocuments?.docs) ? lockedDocuments.docs : [];
// Filter out stale locks
const validLockedDocs = lockedDocs.filter((lock)=>{
const lastEditedAt = new Date(lock?.updatedAt).getTime();
return lastEditedAt + lockDurationInMilliseconds > now;
});
for (const doc of result.docs){
const lockedDoc = validLockedDocs.find((lock)=>lock?.document?.value === doc.id);
doc._isLocked = !!lockedDoc;
doc._userEditing = lockedDoc ? lockedDoc?.user?.value : null;
}
} catch (_err) {
for (const doc of result.docs){
doc._isLocked = false;
doc._userEditing = null;
}
}
}
// /////////////////////////////////////
// beforeRead - Collection
// /////////////////////////////////////
if (collectionConfig?.hooks?.beforeRead?.length) {
result.docs = await Promise.all(result.docs.map(async (doc)=>{
let docRef = doc;
for (const hook of collectionConfig.hooks.beforeRead){
docRef = await hook({
collection: collectionConfig,
context: req.context,
doc: docRef,
overrideAccess: overrideAccess,
query: fullWhere,
req
}) || docRef;
}
return docRef;
}));
}
// /////////////////////////////////////
// afterRead - Fields
// /////////////////////////////////////
result.docs = await Promise.all(result.docs.map(async (doc)=>afterRead({
collection: collectionConfig,
context: req.context,
currentDepth,
depth: depth,
doc,
draft: draftsEnabled,
fallbackLocale: fallbackLocale,
findMany: true,
global: null,
locale: locale,
overrideAccess: overrideAccess,
populate,
req,
select,
showHiddenFields: showHiddenFields
})));
// /////////////////////////////////////
// afterRead - Collection
// /////////////////////////////////////
if (collectionConfig?.hooks?.afterRead?.length) {
result.docs = await Promise.all(result.docs.map(async (doc)=>{
let docRef = doc;
for (const hook of collectionConfig.hooks.afterRead){
docRef = await hook({
collection: collectionConfig,
context: req.context,
doc: docRef,
findMany: true,
overrideAccess: overrideAccess,
query: fullWhere,
req
}) || docRef;
}
return docRef;
}));
}
// /////////////////////////////////////
// afterOperation - Collection
// /////////////////////////////////////
result = await buildAfterOperation({
args,
collection: collectionConfig,
operation: 'find',
overrideAccess: overrideAccess,
result
});
// /////////////////////////////////////
// Return results
// /////////////////////////////////////
return result;
} catch (error) {
await killTransaction(args.req);
throw error;
}
};
//# sourceMappingURL=find.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tracing/anthropic-ai/index.ts"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAEV,kBAAkB,EAInB,MAAM,SAAS,CAAC;AAqTjB;;;;;;;;GAQG;AACH,wBAAgB,2BAA2B,CAAC,CAAC,SAAS,MAAM,EAAE,iBAAiB,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,kBAAkB,GAAG,CAAC,CASnH"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"color.js","sourceRoot":"","sources":["../../../../src/css/property-descriptors/color.ts"],"names":[],"mappings":";;;AAEa,QAAA,KAAK,GAAiC;IAC/C,IAAI,EAAE,OAAO;IACb,YAAY,EAAE,aAAa;IAC3B,MAAM,EAAE,KAAK;IACb,IAAI,oBAA0C;IAC9C,MAAM,EAAE,OAAO;CAClB,CAAC"}

View File

@@ -0,0 +1,29 @@
import { formatDistance } from "./bg/_lib/formatDistance.mjs";
import { formatLong } from "./bg/_lib/formatLong.mjs";
import { formatRelative } from "./bg/_lib/formatRelative.mjs";
import { localize } from "./bg/_lib/localize.mjs";
import { match } from "./bg/_lib/match.mjs";
/**
* @category Locales
* @summary Bulgarian locale.
* @language Bulgarian
* @iso-639-2 bul
* @author Nikolay Stoynov [@arvigeus](https://github.com/arvigeus)
* @author Tsvetan Ovedenski [@fintara](https://github.com/fintara)
*/
export const bg = {
code: "bg",
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
options: {
weekStartsOn: 1 /* Monday */,
firstWeekContainsDate: 1,
},
};
// Fallback for modularized imports:
export default bg;

View File

@@ -0,0 +1,67 @@
"use strict";
var test = require("tape");
var getLength = require("./index");
var browserGetLength = require("./browser");
function repeat(string, times) {
return new Array(times + 1).join(string);
}
// Test writing files to the fs
//
try {
var blns = require("./vendor/big-list-of-naughty-strings/blns.json");
}
catch (err) {
console.error("Error: Cannot load file './vendor/big-list-of-naughty-strings/blns.json'");
console.error();
console.error("Make sure you've initialized git submodules by running");
console.error();
console.error(" git submodule update --init");
console.error();
process.exit(1);
}
// 8-byte, 4-character string
var THUMB = "👍🏽";
// Tests run against both implementations
[getLength, browserGetLength].forEach(function(getLength) {
// Strings with known lengths
[
["", 0],
["a", 1],
["☃", 3],
["a☃", 4],
[repeat("a", 250) + '\uD800\uDC00', 254],
[repeat("a", 251) + '\uD800\uDC00', 255],
[repeat("a", 252) + '\uD800\uDC00', 256],
[THUMB, 8],
[THUMB[0], 3],
[THUMB[1], 3],
[THUMB[2], 3],
[THUMB[3], 3],
[THUMB.slice(0, 2), 4],
[THUMB.slice(2, 4), 4],
[THUMB.slice(1, 3), 6],
].forEach(function(desc) {
var string = desc[0];
var length = desc[1];
test(JSON.stringify(string) + "=" + length, function(t) {
t.equal(getLength(string), length);
t.end();
});
});
// Make sure result matches Buffer.byteLength for various strings
blns.forEach(function(str) {
test(JSON.stringify(str), function(t) {
t.equal(getLength(str), Buffer.byteLength(str));
t.end();
});
});
});

View File

@@ -0,0 +1 @@
{"version":3,"names":["_traverseFast","require","_removeProperties","removePropertiesDeep","tree","opts","traverseFast","removeProperties"],"sources":["../../src/modifications/removePropertiesDeep.ts"],"sourcesContent":["import traverseFast from \"../traverse/traverseFast.ts\";\nimport removeProperties from \"./removeProperties.ts\";\nimport type * as t from \"../index.ts\";\n\nexport default function removePropertiesDeep<T extends t.Node>(\n tree: T,\n opts?: { preserveComments: boolean } | null,\n): T {\n traverseFast(tree, removeProperties, opts);\n\n return tree;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AAGe,SAASE,oBAAoBA,CAC1CC,IAAO,EACPC,IAA2C,EACxC;EACH,IAAAC,qBAAY,EAACF,IAAI,EAAEG,yBAAgB,EAAEF,IAAI,CAAC;EAE1C,OAAOD,IAAI;AACb","ignoreList":[]}

View File

@@ -0,0 +1,5 @@
var assertClassBrand = require("./assertClassBrand.js");
function _classPrivateGetter(s, r, a) {
return a(assertClassBrand(s, r));
}
module.exports = _classPrivateGetter, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -0,0 +1,93 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const instrumentationMongodb = require('@opentelemetry/instrumentation-mongodb');
const core = require('@sentry/core');
const nodeCore = require('@sentry/node-core');
const INTEGRATION_NAME = 'Mongo';
const instrumentMongo = nodeCore.generateInstrumentOnce(
INTEGRATION_NAME,
() =>
new instrumentationMongodb.MongoDBInstrumentation({
dbStatementSerializer: _defaultDbStatementSerializer,
responseHook(span) {
nodeCore.addOriginToSpan(span, 'auto.db.otel.mongo');
},
}),
);
/**
* Replaces values in document with '?', hiding PII and helping grouping.
*/
function _defaultDbStatementSerializer(commandObj) {
const resultObj = _scrubStatement(commandObj);
return JSON.stringify(resultObj);
}
function _scrubStatement(value) {
if (Array.isArray(value)) {
return value.map(element => _scrubStatement(element));
}
if (isCommandObj(value)) {
const initial = {};
return Object.entries(value)
.map(([key, element]) => [key, _scrubStatement(element)])
.reduce((prev, current) => {
if (isCommandEntry(current)) {
prev[current[0]] = current[1];
}
return prev;
}, initial);
}
// A value like string or number, possible contains PII, scrub it
return '?';
}
function isCommandObj(value) {
return typeof value === 'object' && value !== null && !isBuffer(value);
}
function isBuffer(value) {
let isBuffer = false;
if (typeof Buffer !== 'undefined') {
isBuffer = Buffer.isBuffer(value);
}
return isBuffer;
}
function isCommandEntry(value) {
return Array.isArray(value);
}
const _mongoIntegration = (() => {
return {
name: INTEGRATION_NAME,
setupOnce() {
instrumentMongo();
},
};
}) ;
/**
* Adds Sentry tracing instrumentation for the [mongodb](https://www.npmjs.com/package/mongodb) library.
*
* For more information, see the [`mongoIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/mongo/).
*
* @example
* ```javascript
* const Sentry = require('@sentry/node');
*
* Sentry.init({
* integrations: [Sentry.mongoIntegration()],
* });
* ```
*/
const mongoIntegration = core.defineIntegration(_mongoIntegration);
exports._defaultDbStatementSerializer = _defaultDbStatementSerializer;
exports.instrumentMongo = instrumentMongo;
exports.mongoIntegration = mongoIntegration;
//# sourceMappingURL=mongo.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"merge.d.ts","sourceRoot":"","sources":["../../../src/utils/merge.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,SAAI,GAAG,CAAC,CAuBlE"}

View File

@@ -0,0 +1,44 @@
import { AuthenticationData, AuthenticationMode } from "../../../auth/types.cjs";
import { RestCommand } from "../../types.cjs";
//#region src/rest/commands/utils/shares.d.ts
/**
* Authenticate as a share user.
*
* @param share The ID of the share.
* @param password Password for the share, if one is configured.
* @param mode Whether to retrieve the refresh token in the JSON response, or in a httpOnly cookie. One of `json`, `cookie` or `session`. Defaults to `cookie`.
*
* @returns Authentication data.
*/
declare const authenticateShare: <Schema>(share: string, password?: string, mode?: AuthenticationMode) => RestCommand<AuthenticationData, Schema>;
/**
* Sends an email to the provided email addresses with a link to the share.
*
* @param share Primary key of the share you're inviting people to.
* @param emails Array of email strings to send the share link to.
*
* @returns Nothing
*/
declare const inviteShare: <Schema>(share: string, emails: string[]) => RestCommand<void, Schema>;
/**
* Allows unauthenticated users to retrieve information about the share.
*
* @param id Primary key of the share you're viewing.
*
* @returns The share objects for the given UUID, if it's still valid.
*/
declare const readShareInfo: <Schema>(id: string) => RestCommand<{
id: string;
collection: string;
item: string;
password: string | null;
date_start: string | null;
date_end: string | null;
times_used: number | null;
max_uses: number | null;
}, Schema>;
//#endregion
export { authenticateShare, inviteShare, readShareInfo };
//# sourceMappingURL=shares.d.cts.map

View File

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

View File

@@ -0,0 +1,4 @@
export declare const endOfISOWeekYear: import("./types.js").FPFn1<
Date,
import("../fp.js").DateArg<Date>
>;

View File

@@ -0,0 +1,23 @@
/**
* This is a shim for the OpenFeature integration.
* We need this in order to not throw runtime errors when accidentally importing this on the server through a meta framework like Next.js.
*/
export declare const openFeatureIntegrationShim: (_options?: unknown) => import("@sentry/core").Integration;
/**
* This is a shim for the OpenFeature integration hook.
*/
export declare class OpenFeatureIntegrationHookShim {
/**
*
*/
constructor();
/**
*
*/
after(): void;
/**
*
*/
error(): void;
}
//# sourceMappingURL=openFeature.d.ts.map

View File

@@ -0,0 +1,74 @@
import type { BuildFormStateArgs, ClientFieldSchemaMap, Data, DocumentPreferences, Field, FieldSchemaMap, FormState, FormStateWithoutComponents, PayloadRequest, SanitizedFieldsPermissions, SelectMode, SelectType, TabAsField } from 'payload';
import type { RenderFieldMethod } from './types.js';
export type AddFieldStatePromiseArgs = {
addErrorPathToParent: (fieldPath: string) => void;
/**
* if all parents are localized, then the field is localized
*/
anyParentLocalized?: boolean;
/**
* Data of the nearest parent block, or undefined
*/
blockData: Data | undefined;
clientFieldSchemaMap?: ClientFieldSchemaMap;
collectionSlug?: string;
data: Data;
field: Field | TabAsField;
fieldIndex: number;
fieldSchemaMap: FieldSchemaMap;
/**
* You can use this to filter down to only `localized` fields that require translation (type: text, textarea, etc.). Another plugin might want to look for only `point` type fields to do some GIS function. With the filter function you can go in like a surgeon.
*/
filter?: (args: AddFieldStatePromiseArgs) => boolean;
/**
* Force the value of fields like arrays or blocks to be the full value instead of the length @default false
*/
forceFullValue?: boolean;
fullData: Data;
id: number | string;
/**
* Whether the field schema should be included in the state
*/
includeSchema?: boolean;
indexPath: string;
mockRSCs?: BuildFormStateArgs['mockRSCs'];
/**
* Whether to omit parent fields in the state. @default false
*/
omitParents?: boolean;
operation: 'create' | 'update';
parentIndexPath: string;
parentPath: string;
parentPermissions: SanitizedFieldsPermissions;
parentSchemaPath: string;
passesCondition: boolean;
path: string;
preferences: DocumentPreferences;
previousFormState: FormState;
readOnly?: boolean;
renderAllFields: boolean;
renderFieldFn: RenderFieldMethod;
/**
* Req is used for validation and defaultValue calculation. If you don't need validation,
* just create your own req and pass in the locale and the user
*/
req: PayloadRequest;
schemaPath: string;
select?: SelectType;
selectMode?: SelectMode;
/**
* Whether to skip checking the field's condition. @default false
*/
skipConditionChecks?: boolean;
/**
* Whether to skip validating the field. @default false
*/
skipValidation?: boolean;
state: FormStateWithoutComponents;
};
/**
* Flattens the fields schema and fields data.
* The output is the field path (e.g. array.0.name) mapped to a FormField object.
*/
export declare const addFieldStatePromise: (args: AddFieldStatePromiseArgs) => Promise<void>;
//# sourceMappingURL=addFieldStatePromise.d.ts.map

View File

@@ -0,0 +1,33 @@
'use strict'
// Run this to see how colouring works
const _prettyFactory = require('../../')
const pino = require('pino')
const { Writable } = require('node:stream')
function prettyFactory () {
return _prettyFactory({
colorize: true
})
}
const pretty = prettyFactory()
const formatted = pretty('this is not json\nit\'s just regular output\n')
console.log(formatted)
const opts = {
base: {
hostname: 'localhost',
pid: process.pid
}
}
const log = pino(opts, new Writable({
write (chunk, enc, cb) {
const formatted = pretty(chunk.toString())
console.log(formatted)
cb()
}
}))
log.info('foobar')

View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) Hiroki Osame <hiroki.osame@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -0,0 +1 @@
{"version":3,"file":"status.js","sourceRoot":"","sources":["../../../src/trace/status.ts"],"names":[],"mappings":";;;AAsBA;;GAEG;AACH,IAAY,cAcX;AAdD,WAAY,cAAc;IACxB;;OAEG;IACH,qDAAS,CAAA;IACT;;;OAGG;IACH,+CAAM,CAAA;IACN;;OAEG;IACH,qDAAS,CAAA;AACX,CAAC,EAdW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAczB","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport interface SpanStatus {\n /** The status code of this message. */\n code: SpanStatusCode;\n /** A developer-facing error message. */\n message?: string;\n}\n\n/**\n * An enumeration of status codes.\n */\nexport enum SpanStatusCode {\n /**\n * The default status.\n */\n UNSET = 0,\n /**\n * The operation has been validated by an Application developer or\n * Operator to have completed successfully.\n */\n OK = 1,\n /**\n * The operation contains an error.\n */\n ERROR = 2,\n}\n"]}

View File

@@ -0,0 +1,5 @@
import { browserTracingIntegrationShim, consoleLoggingIntegrationShim, feedbackIntegrationShim, loggerShim, replayIntegrationShim } from '@sentry-internal/integration-shims';
export * from './index.bundle.base';
export { consoleLoggingIntegrationShim as consoleLoggingIntegration, loggerShim as logger };
export { browserTracingIntegrationShim as browserTracingIntegration, feedbackIntegrationShim as feedbackAsyncIntegration, feedbackIntegrationShim as feedbackIntegration, replayIntegrationShim as replayIntegration, };
//# sourceMappingURL=index.bundle.d.ts.map

View File

@@ -0,0 +1,118 @@
# sharp
<img src="https://sharp.pixelplumbing.com/sharp-logo.svg" width="160" height="160" alt="sharp logo" align="right">
The typical use case for this high speed Node-API module
is to convert large images in common formats to
smaller, web-friendly JPEG, PNG, WebP, GIF and AVIF images of varying dimensions.
It can be used with all JavaScript runtimes
that provide support for Node-API v9, including
Node.js (^18.17.0 or >= 20.3.0), Deno and Bun.
Resizing an image is typically 4x-5x faster than using the
quickest ImageMagick and GraphicsMagick settings
due to its use of [libvips](https://github.com/libvips/libvips).
Colour spaces, embedded ICC profiles and alpha transparency channels are all handled correctly.
Lanczos resampling ensures quality is not sacrificed for speed.
As well as image resizing, operations such as
rotation, extraction, compositing and gamma correction are available.
Most modern macOS, Windows and Linux systems
do not require any additional install or runtime dependencies.
## Documentation
Visit [sharp.pixelplumbing.com](https://sharp.pixelplumbing.com/) for complete
[installation instructions](https://sharp.pixelplumbing.com/install),
[API documentation](https://sharp.pixelplumbing.com/api-constructor),
[benchmark tests](https://sharp.pixelplumbing.com/performance) and
[changelog](https://sharp.pixelplumbing.com/changelog).
## Examples
```sh
npm install sharp
```
```javascript
const sharp = require('sharp');
```
### Callback
```javascript
sharp(inputBuffer)
.resize(320, 240)
.toFile('output.webp', (err, info) => { ... });
```
### Promise
```javascript
sharp('input.jpg')
.rotate()
.resize(200)
.jpeg({ mozjpeg: true })
.toBuffer()
.then( data => { ... })
.catch( err => { ... });
```
### Async/await
```javascript
const semiTransparentRedPng = await sharp({
create: {
width: 48,
height: 48,
channels: 4,
background: { r: 255, g: 0, b: 0, alpha: 0.5 }
}
})
.png()
.toBuffer();
```
### Stream
```javascript
const roundedCorners = Buffer.from(
'<svg><rect x="0" y="0" width="200" height="200" rx="50" ry="50"/></svg>'
);
const roundedCornerResizer =
sharp()
.resize(200, 200)
.composite([{
input: roundedCorners,
blend: 'dest-in'
}])
.png();
readableStream
.pipe(roundedCornerResizer)
.pipe(writableStream);
```
## Contributing
A [guide for contributors](https://github.com/lovell/sharp/blob/main/.github/CONTRIBUTING.md)
covers reporting bugs, requesting features and submitting code changes.
## Licensing
Copyright 2013 Lovell Fuller and others.
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](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.

View File

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

View File

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

View File

@@ -0,0 +1,12 @@
const formatRelativeLocale = {
lastWeek: "先週のeeeeのp",
yesterday: "昨日のp",
today: "今日のp",
tomorrow: "明日のp",
nextWeek: "翌週のeeeeのp",
other: "P",
};
export const formatRelative = (token, _date, _baseDate, _options) => {
return formatRelativeLocale[token];
};

View File

@@ -0,0 +1 @@
{"version":3,"file":"usePreventLeave.d.ts","sourceRoot":"","sources":["../../../src/elements/LeaveWithoutSaving/usePreventLeave.tsx"],"names":[],"mappings":"AA4BA,eAAO,MAAM,eAAe,aAAa,CAAC,MAAM,OAAO,CAAC,GAAG,OAAO,YAAmB,MAAM,SA6B1F,CAAA;AAED,eAAO,MAAM,eAAe,4DAMzB;IACD,WAAW,EAAE,OAAO,CAAA;IAEpB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IAErB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;IACtB,OAAO,EAAE,OAAO,CAAA;CACjB,SA8FA,CAAA"}

View File

@@ -0,0 +1,7 @@
export * from './src/Enum.js'
export * from './src/Utility.js'
export * from './src/Parser.js'
export * from './src/Prefixer.js'
export * from './src/Tokenizer.js'
export * from './src/Serializer.js'
export * from './src/Middleware.js'

View File

@@ -0,0 +1,58 @@
import { ConnectionOptions } from "tls";
import { ConnectionConfig } from "..";
interface ConnectionParametersConfig extends
Pick<
ConnectionConfig,
| "user"
| "database"
| "password"
| "port"
| "host"
| "options"
| "ssl"
| "application_name"
| "statement_timeout"
| "idle_in_transaction_session_timeout"
| "query_timeout"
>
{
binary?: unknown;
client_encoding?: unknown;
replication?: unknown;
isDomainSocket?: unknown;
fallback_application_name?: unknown;
lock_timeout?: unknown;
connect_timeout?: unknown;
keepalives?: unknown;
keepalives_idle?: unknown;
}
export = ConnectionParameters;
declare class ConnectionParameters implements ConnectionParametersConfig {
user?: string | undefined;
database?: string | undefined;
password?: string | (() => string | Promise<string>) | undefined;
port?: number | undefined;
host?: string | undefined;
statement_timeout?: false | number | undefined;
ssl?: boolean | ConnectionOptions | undefined;
query_timeout?: number | undefined;
idle_in_transaction_session_timeout?: number | undefined;
application_name?: string | undefined;
options?: string | undefined;
binary?: unknown;
client_encoding?: unknown;
replication?: unknown;
isDomainSocket?: unknown;
fallback_application_name?: unknown;
lock_timeout?: unknown;
connect_timeout?: unknown;
keepalives?: unknown;
keepalives_idle?: unknown;
constructor(config?: string | ConnectionParametersConfig);
getLibpqConnectionString<TResult>(cb: (err: Error | null, params: string | null) => TResult): TResult;
}

View File

@@ -0,0 +1,12 @@
/**
* Formats an array of options for use in a select input.
*/export const formatOptions = options => options.map(option => {
if (typeof option === 'object' && (option.value || option.value === '')) {
return option;
}
return {
label: option,
value: option
};
});
//# sourceMappingURL=formatOptions.js.map

View File

@@ -0,0 +1,33 @@
var isObject = require('./isObject'),
isPrototype = require('./_isPrototype'),
nativeKeysIn = require('./_nativeKeysIn');
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names.
*/
function baseKeysIn(object) {
if (!isObject(object)) {
return nativeKeysIn(object);
}
var isProto = isPrototype(object),
result = [];
for (var key in object) {
if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
result.push(key);
}
}
return result;
}
module.exports = baseKeysIn;

View File

@@ -0,0 +1,33 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const ModuleDependency = require("../dependencies/ModuleDependency");
const makeSerializable = require("../util/makeSerializable");
class FallbackItemDependency extends ModuleDependency {
/**
* @param {string} request request
*/
constructor(request) {
super(request);
}
get type() {
return "fallback item";
}
get category() {
return "esm";
}
}
makeSerializable(
FallbackItemDependency,
"webpack/lib/container/FallbackItemDependency"
);
module.exports = FallbackItemDependency;

View File

@@ -0,0 +1,11 @@
import pino from '../../..'
const transport = pino.transport({
target: 'pino/file'
})
const logger = pino(transport)
transport.on('ready', function () {
logger.info('Hello')
process.exit(0)
})

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/featureFlags/growthbook/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC"}

View File

@@ -0,0 +1,16 @@
import type { SanitizedCollectionConfig, TypeWithID } from '../../collections/config/types.js';
import type { AccessResult } from '../../config/types.js';
import type { SanitizedGlobalConfig } from '../../globals/config/types.js';
import type { PayloadRequest, SelectType } from '../../types/index.js';
type Arguments<T> = {
accessResult: AccessResult;
doc: T;
entity: SanitizedCollectionConfig | SanitizedGlobalConfig;
entityType: 'collection' | 'global';
overrideAccess: boolean;
req: PayloadRequest;
select?: SelectType;
};
export declare const replaceWithDraftIfAvailable: <T extends TypeWithID>({ accessResult, doc, entity, entityType, req, select, }: Arguments<T>) => Promise<T>;
export {};
//# sourceMappingURL=replaceWithDraftIfAvailable.d.ts.map

View File

@@ -0,0 +1,14 @@
function compareByTime(a, b) {
if (a.at === b.at) {
if (a.value === null)
return 1;
if (b.value === null)
return -1;
return 0;
}
else {
return a.at - b.at;
}
}
export { compareByTime };

View File

@@ -0,0 +1,171 @@
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true,
});
exports.SchemaCoordinateLexer = void 0;
var _syntaxError = require('../error/syntaxError.js');
var _ast = require('./ast.js');
var _characterClasses = require('./characterClasses.js');
var _lexer = require('./lexer.js');
var _tokenKind = require('./tokenKind.js');
/**
* Given a Source schema coordinate, creates a Lexer for that source.
* A SchemaCoordinateLexer is a stateful stream generator in that every time
* it is advanced, it returns the next token in the Source. Assuming the
* source lexes, the final Token emitted by the lexer will be of kind
* EOF, after which the lexer will repeatedly return the same EOF token
* whenever called.
*/
class SchemaCoordinateLexer {
/**
* The previously focused non-ignored token.
*/
/**
* The currently focused non-ignored token.
*/
/**
* The (1-indexed) line containing the current token.
* Since a schema coordinate may not contain newline, this value is always 1.
*/
line = 1;
/**
* The character offset at which the current line begins.
* Since a schema coordinate may not contain newline, this value is always 0.
*/
lineStart = 0;
constructor(source) {
const startOfFileToken = new _ast.Token(
_tokenKind.TokenKind.SOF,
0,
0,
0,
0,
);
this.source = source;
this.lastToken = startOfFileToken;
this.token = startOfFileToken;
}
get [Symbol.toStringTag]() {
return 'SchemaCoordinateLexer';
}
/**
* Advances the token stream to the next non-ignored token.
*/
advance() {
this.lastToken = this.token;
const token = (this.token = this.lookahead());
return token;
}
/**
* Looks ahead and returns the next non-ignored token, but does not change
* the current Lexer token.
*/
lookahead() {
let token = this.token;
if (token.kind !== _tokenKind.TokenKind.EOF) {
// Read the next token and form a link in the token linked-list.
const nextToken = readNextToken(this, token.end); // @ts-expect-error next is only mutable during parsing.
token.next = nextToken; // @ts-expect-error prev is only mutable during parsing.
nextToken.prev = token;
token = nextToken;
}
return token;
}
}
/**
* Gets the next token from the source starting at the given position.
*/
exports.SchemaCoordinateLexer = SchemaCoordinateLexer;
function readNextToken(lexer, start) {
const body = lexer.source.body;
const bodyLength = body.length;
const position = start;
if (position < bodyLength) {
const code = body.charCodeAt(position);
switch (code) {
case 0x002e:
// .
return (0, _lexer.createToken)(
lexer,
_tokenKind.TokenKind.DOT,
position,
position + 1,
);
case 0x0028:
// (
return (0, _lexer.createToken)(
lexer,
_tokenKind.TokenKind.PAREN_L,
position,
position + 1,
);
case 0x0029:
// )
return (0, _lexer.createToken)(
lexer,
_tokenKind.TokenKind.PAREN_R,
position,
position + 1,
);
case 0x003a:
// :
return (0, _lexer.createToken)(
lexer,
_tokenKind.TokenKind.COLON,
position,
position + 1,
);
case 0x0040:
// @
return (0, _lexer.createToken)(
lexer,
_tokenKind.TokenKind.AT,
position,
position + 1,
);
} // Name
if ((0, _characterClasses.isNameStart)(code)) {
return (0, _lexer.readName)(lexer, position);
}
throw (0, _syntaxError.syntaxError)(
lexer.source,
position,
`Invalid character: ${(0, _lexer.printCodePointAt)(lexer, position)}.`,
);
}
return (0, _lexer.createToken)(
lexer,
_tokenKind.TokenKind.EOF,
bodyLength,
bodyLength,
);
}

View File

@@ -0,0 +1,8 @@
{
"extends": [
"standard"
],
"rules": {
"no-var": "off"
}
}

View File

@@ -0,0 +1,212 @@
'use strict'
const crypto = require('./utils')
const { signatureAlgorithmHashFromCertificate } = require('./cert-signatures')
function startSession(mechanisms, stream) {
const candidates = ['SCRAM-SHA-256']
if (stream) candidates.unshift('SCRAM-SHA-256-PLUS') // higher-priority, so placed first
const mechanism = candidates.find((candidate) => mechanisms.includes(candidate))
if (!mechanism) {
throw new Error('SASL: Only mechanism(s) ' + candidates.join(' and ') + ' are supported')
}
if (mechanism === 'SCRAM-SHA-256-PLUS' && typeof stream.getPeerCertificate !== 'function') {
// this should never happen if we are really talking to a Postgres server
throw new Error('SASL: Mechanism SCRAM-SHA-256-PLUS requires a certificate')
}
const clientNonce = crypto.randomBytes(18).toString('base64')
const gs2Header = mechanism === 'SCRAM-SHA-256-PLUS' ? 'p=tls-server-end-point' : stream ? 'y' : 'n'
return {
mechanism,
clientNonce,
response: gs2Header + ',,n=*,r=' + clientNonce,
message: 'SASLInitialResponse',
}
}
async function continueSession(session, password, serverData, stream) {
if (session.message !== 'SASLInitialResponse') {
throw new Error('SASL: Last message was not SASLInitialResponse')
}
if (typeof password !== 'string') {
throw new Error('SASL: SCRAM-SERVER-FIRST-MESSAGE: client password must be a string')
}
if (password === '') {
throw new Error('SASL: SCRAM-SERVER-FIRST-MESSAGE: client password must be a non-empty string')
}
if (typeof serverData !== 'string') {
throw new Error('SASL: SCRAM-SERVER-FIRST-MESSAGE: serverData must be a string')
}
const sv = parseServerFirstMessage(serverData)
if (!sv.nonce.startsWith(session.clientNonce)) {
throw new Error('SASL: SCRAM-SERVER-FIRST-MESSAGE: server nonce does not start with client nonce')
} else if (sv.nonce.length === session.clientNonce.length) {
throw new Error('SASL: SCRAM-SERVER-FIRST-MESSAGE: server nonce is too short')
}
const clientFirstMessageBare = 'n=*,r=' + session.clientNonce
const serverFirstMessage = 'r=' + sv.nonce + ',s=' + sv.salt + ',i=' + sv.iteration
// without channel binding:
let channelBinding = stream ? 'eSws' : 'biws' // 'y,,' or 'n,,', base64-encoded
// override if channel binding is in use:
if (session.mechanism === 'SCRAM-SHA-256-PLUS') {
const peerCert = stream.getPeerCertificate().raw
let hashName = signatureAlgorithmHashFromCertificate(peerCert)
if (hashName === 'MD5' || hashName === 'SHA-1') hashName = 'SHA-256'
const certHash = await crypto.hashByName(hashName, peerCert)
const bindingData = Buffer.concat([Buffer.from('p=tls-server-end-point,,'), Buffer.from(certHash)])
channelBinding = bindingData.toString('base64')
}
const clientFinalMessageWithoutProof = 'c=' + channelBinding + ',r=' + sv.nonce
const authMessage = clientFirstMessageBare + ',' + serverFirstMessage + ',' + clientFinalMessageWithoutProof
const saltBytes = Buffer.from(sv.salt, 'base64')
const saltedPassword = await crypto.deriveKey(password, saltBytes, sv.iteration)
const clientKey = await crypto.hmacSha256(saltedPassword, 'Client Key')
const storedKey = await crypto.sha256(clientKey)
const clientSignature = await crypto.hmacSha256(storedKey, authMessage)
const clientProof = xorBuffers(Buffer.from(clientKey), Buffer.from(clientSignature)).toString('base64')
const serverKey = await crypto.hmacSha256(saltedPassword, 'Server Key')
const serverSignatureBytes = await crypto.hmacSha256(serverKey, authMessage)
session.message = 'SASLResponse'
session.serverSignature = Buffer.from(serverSignatureBytes).toString('base64')
session.response = clientFinalMessageWithoutProof + ',p=' + clientProof
}
function finalizeSession(session, serverData) {
if (session.message !== 'SASLResponse') {
throw new Error('SASL: Last message was not SASLResponse')
}
if (typeof serverData !== 'string') {
throw new Error('SASL: SCRAM-SERVER-FINAL-MESSAGE: serverData must be a string')
}
const { serverSignature } = parseServerFinalMessage(serverData)
if (serverSignature !== session.serverSignature) {
throw new Error('SASL: SCRAM-SERVER-FINAL-MESSAGE: server signature does not match')
}
}
/**
* printable = %x21-2B / %x2D-7E
* ;; Printable ASCII except ",".
* ;; Note that any "printable" is also
* ;; a valid "value".
*/
function isPrintableChars(text) {
if (typeof text !== 'string') {
throw new TypeError('SASL: text must be a string')
}
return text
.split('')
.map((_, i) => text.charCodeAt(i))
.every((c) => (c >= 0x21 && c <= 0x2b) || (c >= 0x2d && c <= 0x7e))
}
/**
* base64-char = ALPHA / DIGIT / "/" / "+"
*
* base64-4 = 4base64-char
*
* base64-3 = 3base64-char "="
*
* base64-2 = 2base64-char "=="
*
* base64 = *base64-4 [base64-3 / base64-2]
*/
function isBase64(text) {
return /^(?:[a-zA-Z0-9+/]{4})*(?:[a-zA-Z0-9+/]{2}==|[a-zA-Z0-9+/]{3}=)?$/.test(text)
}
function parseAttributePairs(text) {
if (typeof text !== 'string') {
throw new TypeError('SASL: attribute pairs text must be a string')
}
return new Map(
text.split(',').map((attrValue) => {
if (!/^.=/.test(attrValue)) {
throw new Error('SASL: Invalid attribute pair entry')
}
const name = attrValue[0]
const value = attrValue.substring(2)
return [name, value]
})
)
}
function parseServerFirstMessage(data) {
const attrPairs = parseAttributePairs(data)
const nonce = attrPairs.get('r')
if (!nonce) {
throw new Error('SASL: SCRAM-SERVER-FIRST-MESSAGE: nonce missing')
} else if (!isPrintableChars(nonce)) {
throw new Error('SASL: SCRAM-SERVER-FIRST-MESSAGE: nonce must only contain printable characters')
}
const salt = attrPairs.get('s')
if (!salt) {
throw new Error('SASL: SCRAM-SERVER-FIRST-MESSAGE: salt missing')
} else if (!isBase64(salt)) {
throw new Error('SASL: SCRAM-SERVER-FIRST-MESSAGE: salt must be base64')
}
const iterationText = attrPairs.get('i')
if (!iterationText) {
throw new Error('SASL: SCRAM-SERVER-FIRST-MESSAGE: iteration missing')
} else if (!/^[1-9][0-9]*$/.test(iterationText)) {
throw new Error('SASL: SCRAM-SERVER-FIRST-MESSAGE: invalid iteration count')
}
const iteration = parseInt(iterationText, 10)
return {
nonce,
salt,
iteration,
}
}
function parseServerFinalMessage(serverData) {
const attrPairs = parseAttributePairs(serverData)
const serverSignature = attrPairs.get('v')
if (!serverSignature) {
throw new Error('SASL: SCRAM-SERVER-FINAL-MESSAGE: server signature is missing')
} else if (!isBase64(serverSignature)) {
throw new Error('SASL: SCRAM-SERVER-FINAL-MESSAGE: server signature must be base64')
}
return {
serverSignature,
}
}
function xorBuffers(a, b) {
if (!Buffer.isBuffer(a)) {
throw new TypeError('first argument must be a Buffer')
}
if (!Buffer.isBuffer(b)) {
throw new TypeError('second argument must be a Buffer')
}
if (a.length !== b.length) {
throw new Error('Buffer lengths must match')
}
if (a.length === 0) {
throw new Error('Buffers cannot be empty')
}
return Buffer.from(a.map((_, i) => a[i] ^ b[i]))
}
module.exports = {
startSession,
continueSession,
finalizeSession,
}

View File

@@ -0,0 +1,39 @@
import type { ContextOptions, DateArg } from "./types.js";
/**
* The {@link formatRFC3339} function options.
*/
export interface FormatRFC3339Options extends ContextOptions<Date> {
/** The number of digits after the decimal point after seconds, defaults to 0 */
fractionDigits?: 0 | 1 | 2 | 3;
}
/**
* @name formatRFC3339
* @category Common Helpers
* @summary Format the date according to the RFC 3339 standard (https://tools.ietf.org/html/rfc3339#section-5.6).
*
* @description
* Return the formatted date string in RFC 3339 format. Options may be passed to control the parts and notations of the date.
*
* @param date - The original date
* @param options - An object with options.
*
* @returns The formatted date string
*
* @throws `date` must not be Invalid Date
*
* @example
* // Represent 18 September 2019 in RFC 3339 format:
* formatRFC3339(new Date(2019, 8, 18, 19, 0, 52))
* //=> '2019-09-18T19:00:52Z'
*
* @example
* // Represent 18 September 2019 in RFC 3339 format, 3 digits of second fraction
* formatRFC3339(new Date(2019, 8, 18, 19, 0, 52, 234), {
* fractionDigits: 3
* })
* //=> '2019-09-18T19:00:52.234Z'
*/
export declare function formatRFC3339(
date: DateArg<Date> & {},
options?: FormatRFC3339Options,
): string;

View File

@@ -0,0 +1,59 @@
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { _globalThis } from '../platform';
import { VERSION } from '../version';
import { isCompatible } from './semver';
var major = VERSION.split('.')[0];
var GLOBAL_OPENTELEMETRY_API_KEY = Symbol.for("opentelemetry.js.api." + major);
var _global = _globalThis;
export function registerGlobal(type, instance, diag, allowOverride) {
var _a;
if (allowOverride === void 0) { allowOverride = false; }
var api = (_global[GLOBAL_OPENTELEMETRY_API_KEY] = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _a !== void 0 ? _a : {
version: VERSION,
});
if (!allowOverride && api[type]) {
// already registered an API of this type
var err = new Error("@opentelemetry/api: Attempted duplicate registration of API: " + type);
diag.error(err.stack || err.message);
return false;
}
if (api.version !== VERSION) {
// All registered APIs must be of the same version exactly
var err = new Error("@opentelemetry/api: Registration of version v" + api.version + " for " + type + " does not match previously registered API v" + VERSION);
diag.error(err.stack || err.message);
return false;
}
api[type] = instance;
diag.debug("@opentelemetry/api: Registered a global for " + type + " v" + VERSION + ".");
return true;
}
export function getGlobal(type) {
var _a, _b;
var globalVersion = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _a === void 0 ? void 0 : _a.version;
if (!globalVersion || !isCompatible(globalVersion)) {
return;
}
return (_b = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _b === void 0 ? void 0 : _b[type];
}
export function unregisterGlobal(type, diag) {
diag.debug("@opentelemetry/api: Unregistering a global for " + type + " v" + VERSION + ".");
var api = _global[GLOBAL_OPENTELEMETRY_API_KEY];
if (api) {
delete api[type];
}
}
//# sourceMappingURL=global-utils.js.map

View File

@@ -0,0 +1,184 @@
# @jridgewell/source-map
> Packages `@jridgewell/trace-mapping` and `@jridgewell/gen-mapping` into the familiar source-map API
This isn't the full API, but it's the core functionality. This wraps
[@jridgewell/trace-mapping][trace-mapping] and [@jridgewell/gen-mapping][gen-mapping]
implementations.
## Installation
```sh
npm install @jridgewell/source-map
```
## Usage
TODO
### SourceMapConsumer
```typescript
import { SourceMapConsumer } from '@jridgewell/source-map';
const smc = new SourceMapConsumer({
version: 3,
names: ['foo'],
sources: ['input.js'],
mappings: 'AAAAA',
});
```
#### SourceMapConsumer.fromSourceMap(mapGenerator[, mapUrl])
Transforms a `SourceMapGenerator` into a `SourceMapConsumer`.
```typescript
const smg = new SourceMapGenerator();
const smc = SourceMapConsumer.fromSourceMap(map);
smc.originalPositionFor({ line: 1, column: 0 });
```
#### SourceMapConsumer.prototype.originalPositionFor(generatedPosition)
```typescript
const smc = new SourceMapConsumer(map);
smc.originalPositionFor({ line: 1, column: 0 });
```
#### SourceMapConsumer.prototype.mappings
```typescript
const smc = new SourceMapConsumer(map);
smc.mappings; // AAAA
```
#### SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition)
```typescript
const smc = new SourceMapConsumer(map);
smc.allGeneratedpositionsfor({ line: 1, column: 5, source: "baz.ts" });
// [
// { line: 2, column: 8 }
// ]
```
#### SourceMapConsumer.prototype.eachMapping(callback[, context[, order]])
> This implementation currently does not support the "order" parameter.
> This function can only iterate in Generated order.
```typescript
const smc = new SourceMapConsumer(map);
smc.eachMapping((mapping) => {
// { source: 'baz.ts',
// generatedLine: 4,
// generatedColumn: 5,
// originalLine: 4,
// originalColumn: 5,
// name: null }
});
```
#### SourceMapConsumer.prototype.generatedPositionFor(originalPosition)
```typescript
const smc = new SourceMapConsumer(map);
smc.generatedPositionFor({ line: 1, column: 5, source: "baz.ts" });
// { line: 2, column: 8 }
```
#### SourceMapConsumer.prototype.hasContentsOfAllSources()
```typescript
const smc = new SourceMapConsumer(map);
smc.hasContentsOfAllSources();
// true
```
#### SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing])
```typescript
const smc = new SourceMapConsumer(map);
smc.generatedPositionFor("baz.ts");
// "export default ..."
```
#### SourceMapConsumer.prototype.version
Returns the source map's version
### SourceMapGenerator
```typescript
import { SourceMapGenerator } from '@jridgewell/source-map';
const smg = new SourceMapGenerator({
file: 'output.js',
sourceRoot: 'https://example.com/',
});
```
#### SourceMapGenerator.fromSourceMap(map)
Transform a `SourceMapConsumer` into a `SourceMapGenerator`.
```typescript
const smc = new SourceMapConsumer();
const smg = SourceMapGenerator.fromSourceMap(smc);
```
#### SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]])
> This method is not implemented yet
#### SourceMapGenerator.prototype.addMapping(mapping)
```typescript
const smg = new SourceMapGenerator();
smg.addMapping({
generated: { line: 1, column: 0 },
source: 'input.js',
original: { line: 1, column: 0 },
name: 'foo',
});
```
#### SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent)
```typescript
const smg = new SourceMapGenerator();
smg.setSourceContent('input.js', 'foobar');
```
#### SourceMapGenerator.prototype.toJSON()
```typescript
const smg = new SourceMapGenerator();
smg.toJSON(); // { version: 3, names: [], sources: [], mappings: '' }
```
#### SourceMapGenerator.prototype.toString()
```typescript
const smg = new SourceMapGenerator();
smg.toJSON(); // "{version:3,names:[],sources:[],mappings:''}"
```
#### SourceMapGenerator.prototype.toDecodedMap()
```typescript
const smg = new SourceMapGenerator();
smg.toDecodedMap(); // { version: 3, names: [], sources: [], mappings: [] }
```
## Known differences with other implementations
This implementation has some differences with `source-map` and `source-map-js`.
- `SourceMapConsumer.prototype.eachMapping()`
- Does not support the `order` argument
- `SourceMapGenerator.prototype.applySourceMap()`
- Not implemented
[trace-mapping]: https://github.com/jridgewell/sourcemaps/tree/main/packages/trace-mapping/
[gen-mapping]: https://github.com/jridgewell/sourcemaps/tree/main/packages/gen-mapping/

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/elements/DocumentControls/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,UAAU,EACV,IAAI,EACJ,yBAAyB,EACzB,6BAA6B,EAC7B,yBAAyB,EAC1B,MAAM,SAAS,CAAA;AAIhB,OAAO,KAA8B,MAAM,OAAO,CAAA;AAElD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAA;AAwB9E,OAAO,cAAc,CAAA;AAOrB,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC;IACtC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,sBAAsB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACjD,QAAQ,CAAC,gBAAgB,CAAC,EAAE;QAC1B,QAAQ,CAAC,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;QACxC,QAAQ,CAAC,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;QACxC,QAAQ,CAAC,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;QACrC,QAAQ,CAAC,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;QAC1C,QAAQ,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;QACjC,QAAQ,CAAC,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;KAC3C,CAAA;IACD,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,CAAA;IACpB,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAA;IACjC,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,CAAA;IAChC,QAAQ,CAAC,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACxC,QAAQ,CAAC,oBAAoB,CAAC,EAAE,OAAO,CAAA;IACvC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAA;IACpC,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC7B,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,CAAA;IAChC,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAA;IAC5B,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAA;IAC7B,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAA;IAC5B,QAAQ,CAAC,QAAQ,CAAC,EAAE,yBAAyB,CAAC,UAAU,CAAC,CAAA;IACzD,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAA;IAEvC,QAAQ,CAAC,WAAW,CAAC,EAAE,yBAAyB,CAAC,aAAa,CAAC,CAAA;IAC/D,QAAQ,CAAC,SAAS,CAAC,EAAE,yBAAyB,CAAC,WAAW,CAAC,CAAA;IAC3D,QAAQ,CAAC,MAAM,CAAC,EAAE,yBAAyB,CAAC,QAAQ,CAAC,CAAA;IACrD,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,IAAI,CAAA;IAChC,QAAQ,CAAC,WAAW,EAAE,IAAI,GAAG,6BAA6B,GAAG,yBAAyB,CAAA;IACtF,QAAQ,CAAC,uBAAuB,CAAC,EAAE,OAAO,CAAA;IAC1C,QAAQ,CAAC,mBAAmB,CAAC,EAAE,OAAO,CAAA;IACtC,QAAQ,CAAC,sBAAsB,CAAC,EAAE,OAAO,CAAA;IACzC,QAAQ,CAAC,oBAAoB,CAAC,EAAE,OAAO,CAAA;IACvC,QAAQ,CAAC,IAAI,EAAE,yBAAyB,CAAC,MAAM,CAAC,CAAA;IAChD,QAAQ,CAAC,IAAI,CAAC,EAAE,UAAU,CAAA;CAC3B,CA8UA,CAAA"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"collections.cjs","names":[],"sources":["../../../../src/rest/commands/read/collections.ts"],"sourcesContent":["import type { DirectusCollection } from '../../../schema/collection.js';\nimport type { ApplyQueryFields } from '../../../types/index.js';\nimport type { RestCommand } from '../../types.js';\nimport { throwIfEmpty } from '../../utils/index.js';\n\nexport type ReadCollectionOutput<Schema, Item extends object = DirectusCollection<Schema>> = ApplyQueryFields<\n\tSchema,\n\tItem,\n\t'*'\n>;\n\n/**\n * List the available collections.\n * @returns An array of collection objects.\n */\nexport const readCollections =\n\t<Schema>(): RestCommand<ReadCollectionOutput<Schema>[], Schema> =>\n\t() => ({\n\t\tpath: `/collections`,\n\t\tmethod: 'GET',\n\t});\n\n/**\n * Retrieve a single collection by table name.\n * @param collection The collection name\n * @returns A collection object.\n * @throws Will throw if collection is empty\n */\nexport const readCollection =\n\t<Schema>(collection: DirectusCollection<Schema>['collection']): RestCommand<ReadCollectionOutput<Schema>, Schema> =>\n\t() => {\n\t\tthrowIfEmpty(collection, 'Collection cannot be empty');\n\n\t\treturn {\n\t\t\tpath: `/collections/${collection}`,\n\t\t\tmethod: 'GET',\n\t\t};\n\t};\n"],"mappings":"kDAea,WAEL,CACN,KAAM,eACN,OAAQ,MACR,EAQW,EACH,QAER,EAAA,aAAa,EAAY,6BAA6B,CAE/C,CACN,KAAM,gBAAgB,IACtB,OAAQ,MACR"}

View File

@@ -0,0 +1,21 @@
import { extendDrizzleTable } from './extendDrizzleTable.js';
export const executeSchemaHooks = async ({ type, adapter })=>{
for (const hook of adapter[type]){
const result = await hook({
adapter: adapter,
extendTable: extendDrizzleTable,
schema: {
enums: adapter.enums,
relations: adapter.relations,
tables: adapter.tables
}
});
if (result.enums) {
adapter.enums = result.enums;
}
adapter.tables = result.tables;
adapter.relations = result.relations;
}
};
//# sourceMappingURL=executeSchemaHooks.js.map

View File

@@ -0,0 +1,15 @@
export interface ResolveLocaleResult {
locale: string;
dataLocale: string;
[k: string]: any;
}
/**
* https://tc39.es/ecma402/#sec-resolvelocale
*/
export declare function ResolveLocale<
K extends string,
D extends { [k in K] : any }
>(availableLocales: Set<string> | readonly string[], requestedLocales: readonly string[], options: {
localeMatcher: string;
[k: string]: string;
}, relevantExtensionKeys: K[], localeData: Record<string, D | undefined>, getDefaultLocale: () => string): ResolveLocaleResult;

View File

@@ -0,0 +1,31 @@
"use strict";
function _iterable_to_array_limit(arr, i) {
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
if (_i == null) return;
var _arr = [];
var _n = true;
var _d = false;
var _s, _e;
try {
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
_arr.push(_s.value);
if (i && _arr.length === i) break;
}
} catch (err) {
_d = true;
_e = err;
} finally {
try {
if (!_n && _i["return"] != null) _i["return"]();
} finally {
if (_d) throw _e;
}
}
return _arr;
}
exports._ = _iterable_to_array_limit;

View File

@@ -0,0 +1,41 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const makeSerializable = require("../util/makeSerializable");
const ModuleDependency = require("./ModuleDependency");
const ModuleDependencyTemplateAsRequireId = require("./ModuleDependencyTemplateAsRequireId");
/** @typedef {import("../javascript/JavascriptParser").Range} Range */
class AMDRequireItemDependency extends ModuleDependency {
/**
* @param {string} request the request string
* @param {Range=} range location in source code
*/
constructor(request, range) {
super(request);
this.range = range;
}
get type() {
return "amd require";
}
get category() {
return "amd";
}
}
makeSerializable(
AMDRequireItemDependency,
"webpack/lib/dependencies/AMDRequireItemDependency"
);
AMDRequireItemDependency.Template = ModuleDependencyTemplateAsRequireId;
module.exports = AMDRequireItemDependency;

View File

@@ -0,0 +1,14 @@
/**
* A list of values that can be hardware-accelerated.
*/
const acceleratedValues = new Set([
"opacity",
"clipPath",
"filter",
"transform",
// TODO: Can be accelerated but currently disabled until https://issues.chromium.org/issues/41491098 is resolved
// or until we implement support for linear() easing.
// "background-color"
]);
export { acceleratedValues };

View File

@@ -0,0 +1 @@
{"version":3,"file":"mongoose.js","sources":["../../../../src/integrations/tracing/mongoose.ts"],"sourcesContent":["import { MongooseInstrumentation } from '@opentelemetry/instrumentation-mongoose';\nimport type { IntegrationFn } from '@sentry/core';\nimport { defineIntegration } from '@sentry/core';\nimport { addOriginToSpan, generateInstrumentOnce } from '@sentry/node-core';\n\nconst INTEGRATION_NAME = 'Mongoose';\n\nexport const instrumentMongoose = generateInstrumentOnce(\n INTEGRATION_NAME,\n () =>\n new MongooseInstrumentation({\n responseHook(span) {\n addOriginToSpan(span, 'auto.db.otel.mongoose');\n },\n }),\n);\n\nconst _mongooseIntegration = (() => {\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n instrumentMongoose();\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Adds Sentry tracing instrumentation for the [mongoose](https://www.npmjs.com/package/mongoose) library.\n *\n * For more information, see the [`mongooseIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/mongoose/).\n *\n * @example\n * ```javascript\n * const Sentry = require('@sentry/node');\n *\n * Sentry.init({\n * integrations: [Sentry.mongooseIntegration()],\n * });\n * ```\n */\nexport const mongooseIntegration = defineIntegration(_mongooseIntegration);\n"],"names":["generateInstrumentOnce","MongooseInstrumentation","addOriginToSpan","defineIntegration"],"mappings":";;;;;;AAKA,MAAM,gBAAA,GAAmB,UAAU;;AAE5B,MAAM,kBAAA,GAAqBA,+BAAsB;AACxD,EAAE,gBAAgB;AAClB,EAAE;AACF,IAAI,IAAIC,+CAAuB,CAAC;AAChC,MAAM,YAAY,CAAC,IAAI,EAAE;AACzB,QAAQC,wBAAe,CAAC,IAAI,EAAE,uBAAuB,CAAC;AACtD,MAAM,CAAC;AACP,KAAK,CAAC;AACN;;AAEA,MAAM,oBAAA,IAAwB,MAAM;AACpC,EAAE,OAAO;AACT,IAAI,IAAI,EAAE,gBAAgB;AAC1B,IAAI,SAAS,GAAG;AAChB,MAAM,kBAAkB,EAAE;AAC1B,IAAI,CAAC;AACL,GAAG;AACH,CAAC,CAAA;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;MACa,mBAAA,GAAsBC,sBAAiB,CAAC,oBAAoB;;;;;"}

View File

@@ -0,0 +1,15 @@
import { compactVerify } from '../jws/compact/verify.js';
import jwtPayload from '../lib/jwt_claims_set.js';
import { JWTInvalid } from '../util/errors.js';
export async function jwtVerify(jwt, key, options) {
const verified = await compactVerify(jwt, key, options);
if (verified.protectedHeader.crit?.includes('b64') && verified.protectedHeader.b64 === false) {
throw new JWTInvalid('JWTs MUST NOT use unencoded payload');
}
const payload = jwtPayload(verified.protectedHeader, verified.payload, options);
const result = { payload, protectedHeader: verified.protectedHeader };
if (typeof key === 'function') {
return { ...result, key: verified.key };
}
return result;
}

View File

@@ -0,0 +1,3 @@
export type NonNever<Type extends {}> = Pick<Type, {
[Key in keyof Type]: Type[Key] extends never ? never : Key;
}[keyof Type]>;

View File

@@ -0,0 +1 @@
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/integrations/node-fetch/types.ts"],"names":[],"mappings":"AAgBA;;GAEG;AAEH,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC3B;;OAEG;IACH,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACjD,YAAY,EAAE,OAAO,CAAC;IACtB,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,IAAI,EAAE,OAAO,CAAC;CACf;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB"}

View File

@@ -0,0 +1,156 @@
import { buildLocalizeFn } from "../../_lib/buildLocalizeFn.js";
const eraValues = {
narrow: ["AC", "DC"],
abbreviated: ["AC", "DC"],
wide: ["antes de cristo", "despois de cristo"],
};
const quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["T1", "T2", "T3", "T4"],
wide: ["1º trimestre", "2º trimestre", "3º trimestre", "4º trimestre"],
};
const monthValues = {
narrow: ["e", "f", "m", "a", "m", "j", "j", "a", "s", "o", "n", "d"],
abbreviated: [
"xan",
"feb",
"mar",
"abr",
"mai",
"xun",
"xul",
"ago",
"set",
"out",
"nov",
"dec",
],
wide: [
"xaneiro",
"febreiro",
"marzo",
"abril",
"maio",
"xuño",
"xullo",
"agosto",
"setembro",
"outubro",
"novembro",
"decembro",
],
};
const dayValues = {
narrow: ["d", "l", "m", "m", "j", "v", "s"],
short: ["do", "lu", "ma", "me", "xo", "ve", "sa"],
abbreviated: ["dom", "lun", "mar", "mer", "xov", "ven", "sab"],
wide: ["domingo", "luns", "martes", "mércores", "xoves", "venres", "sábado"],
};
const dayPeriodValues = {
narrow: {
am: "a",
pm: "p",
midnight: "mn",
noon: "md",
morning: "mañá",
afternoon: "tarde",
evening: "tarde",
night: "noite",
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "medianoite",
noon: "mediodía",
morning: "mañá",
afternoon: "tarde",
evening: "tardiña",
night: "noite",
},
wide: {
am: "a.m.",
pm: "p.m.",
midnight: "medianoite",
noon: "mediodía",
morning: "mañá",
afternoon: "tarde",
evening: "tardiña",
night: "noite",
},
};
const formattingDayPeriodValues = {
narrow: {
am: "a",
pm: "p",
midnight: "mn",
noon: "md",
morning: "da mañá",
afternoon: "da tarde",
evening: "da tardiña",
night: "da noite",
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "medianoite",
noon: "mediodía",
morning: "da mañá",
afternoon: "da tarde",
evening: "da tardiña",
night: "da noite",
},
wide: {
am: "a.m.",
pm: "p.m.",
midnight: "medianoite",
noon: "mediodía",
morning: "da mañá",
afternoon: "da tarde",
evening: "da tardiña",
night: "da noite",
},
};
const ordinalNumber = (dirtyNumber, _options) => {
const number = Number(dirtyNumber);
return number + "º";
};
export const localize = {
ordinalNumber,
era: buildLocalizeFn({
values: eraValues,
defaultWidth: "wide",
}),
quarter: buildLocalizeFn({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: (quarter) => quarter - 1,
}),
month: buildLocalizeFn({
values: monthValues,
defaultWidth: "wide",
}),
day: buildLocalizeFn({
values: dayValues,
defaultWidth: "wide",
}),
dayPeriod: buildLocalizeFn({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide",
}),
};

View File

@@ -0,0 +1,21 @@
"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.RedisInstrumentation = void 0;
var redis_1 = require("./redis");
Object.defineProperty(exports, "RedisInstrumentation", { enumerable: true, get: function () { return redis_1.RedisInstrumentation; } });
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"WritableStream.js","sourceRoot":"https://raw.githubusercontent.com/fb55/htmlparser2/c123610e003a1eaebc61febed01cabb6e41eb658/src/","sources":["WritableStream.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,yCAA6D;AAC7D;;;GAGG;AACH,2CAAuC;AACvC,2DAAoD;AAEpD,2GAA2G;AAC3G,SAAS,QAAQ,CAAC,MAAuB,EAAE,QAAgB;IACvD,OAAO,QAAQ,KAAK,QAAQ,CAAC;AACjC,CAAC;AAED;;;;GAIG;AACH;IAAoC,kCAAQ;IAIxC,wBAAY,GAAqB,EAAE,OAAuB;QAA1D,YACI,kBAAM,EAAE,aAAa,EAAE,KAAK,EAAE,CAAC,SAElC;QALgB,cAAQ,GAAG,IAAI,mCAAa,EAAE,CAAC;QAI5C,KAAI,CAAC,OAAO,GAAG,IAAI,kBAAM,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;;IAC5C,CAAC;IAEQ,+BAAM,GAAf,UACI,KAAsB,EACtB,QAAgB,EAChB,QAAoB;QAEpB,IAAI,CAAC,OAAO,CAAC,KAAK,CACd,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CACjE,CAAC;QACF,QAAQ,EAAE,CAAC;IACf,CAAC;IAEQ,+BAAM,GAAf,UAAgB,QAAoB;QAChC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,CAAC;QACtC,QAAQ,EAAE,CAAC;IACf,CAAC;IACL,qBAAC;AAAD,CAAC,AAxBD,CAAoC,sBAAQ,GAwB3C;AAxBY,wCAAc"}

View File

@@ -0,0 +1,17 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Spline = createLucideIcon("Spline", [
["circle", { cx: "19", cy: "5", r: "2", key: "mhkx31" }],
["circle", { cx: "5", cy: "19", r: "2", key: "v8kfzx" }],
["path", { d: "M5 17A12 12 0 0 1 17 5", key: "1okkup" }]
]);
export { Spline as default };
//# sourceMappingURL=spline.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"decode-data-html.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["generated/decode-data-html.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAE9C,eAAe,IAAI,WAAW;AAC1B,kBAAkB;AAClB,268CAA268C;KACt68C,KAAK,CAAC,EAAE,CAAC;KACT,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CACnC,CAAC"}

View File

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

View File

@@ -0,0 +1,35 @@
export interface FeedbackTheme {
/**
* Foreground color (i.e. text color)
*/
foreground?: string;
/**
* Background color for surfaces
*/
background?: string;
/**
* Foreground color for accented elements
*/
accentForeground?: string;
/**
* Background color for accented elements
*/
accentBackground?: string;
/**
* Success color
*/
successColor?: string;
/**
* Error color
*/
errorColor?: string;
/**
* Box shadow for floating elements
*/
boxShadow?: string;
/**
* Styles for focused interactive components
*/
outline?: string;
}
//# sourceMappingURL=theme.d.ts.map

View File

@@ -0,0 +1,132 @@
(function (Prism) {
/**
* Replaces all placeholders "<<n>>" of given pattern with the n-th replacement (zero based).
*
* Note: This is a simple text based replacement. Be careful when using backreferences!
*
* @param {string} pattern the given pattern.
* @param {string[]} replacements a list of replacement which can be inserted into the given pattern.
* @returns {string} the pattern with all placeholders replaced with their corresponding replacements.
* @example replace(/a<<0>>a/.source, [/b+/.source]) === /a(?:b+)a/.source
*/
function replace(pattern, replacements) {
return pattern.replace(/<<(\d+)>>/g, function (m, index) {
return '(?:' + replacements[+index] + ')';
});
}
/**
* @param {string} pattern
* @param {string[]} replacements
* @param {string} [flags]
* @returns {RegExp}
*/
function re(pattern, replacements, flags) {
return RegExp(replace(pattern, replacements), flags || '');
}
/**
* Creates a nested pattern where all occurrences of the string `<<self>>` are replaced with the pattern itself.
*
* @param {string} pattern
* @param {number} depthLog2
* @returns {string}
*/
function nested(pattern, depthLog2) {
for (var i = 0; i < depthLog2; i++) {
pattern = pattern.replace(/<<self>>/g, function () { return '(?:' + pattern + ')'; });
}
return pattern.replace(/<<self>>/g, '[^\\s\\S]');
}
// https://docs.microsoft.com/en-us/azure/quantum/user-guide/language/typesystem/
// https://github.com/microsoft/qsharp-language/tree/main/Specifications/Language/5_Grammar
var keywordKinds = {
// keywords which represent a return or variable type
type: 'Adj BigInt Bool Ctl Double false Int One Pauli PauliI PauliX PauliY PauliZ Qubit Range Result String true Unit Zero',
// all other keywords
other: 'Adjoint adjoint apply as auto body borrow borrowing Controlled controlled distribute elif else fail fixup for function if in internal intrinsic invert is let mutable namespace new newtype open operation repeat return self set until use using while within'
};
// keywords
function keywordsToPattern(words) {
return '\\b(?:' + words.trim().replace(/ /g, '|') + ')\\b';
}
var keywords = RegExp(keywordsToPattern(keywordKinds.type + ' ' + keywordKinds.other));
// types
var identifier = /\b[A-Za-z_]\w*\b/.source;
var qualifiedName = replace(/<<0>>(?:\s*\.\s*<<0>>)*/.source, [identifier]);
var typeInside = {
'keyword': keywords,
'punctuation': /[<>()?,.:[\]]/
};
// strings
var regularString = /"(?:\\.|[^\\"])*"/.source;
Prism.languages.qsharp = Prism.languages.extend('clike', {
'comment': /\/\/.*/,
'string': [
{
pattern: re(/(^|[^$\\])<<0>>/.source, [regularString]),
lookbehind: true,
greedy: true
}
],
'class-name': [
{
// open Microsoft.Quantum.Canon;
// open Microsoft.Quantum.Canon as CN;
pattern: re(/(\b(?:as|open)\s+)<<0>>(?=\s*(?:;|as\b))/.source, [qualifiedName]),
lookbehind: true,
inside: typeInside
},
{
// namespace Quantum.App1;
pattern: re(/(\bnamespace\s+)<<0>>(?=\s*\{)/.source, [qualifiedName]),
lookbehind: true,
inside: typeInside
},
],
'keyword': keywords,
'number': /(?:\b0(?:x[\da-f]+|b[01]+|o[0-7]+)|(?:\B\.\d+|\b\d+(?:\.\d*)?)(?:e[-+]?\d+)?)l?\b/i,
'operator': /\band=|\bor=|\band\b|\bnot\b|\bor\b|<[-=]|[-=]>|>>>=?|<<<=?|\^\^\^=?|\|\|\|=?|&&&=?|w\/=?|~~~|[*\/+\-^=!%]=?/,
'punctuation': /::|[{}[\];(),.:]/
});
Prism.languages.insertBefore('qsharp', 'number', {
'range': {
pattern: /\.\./,
alias: 'operator'
}
});
// single line
var interpolationExpr = nested(replace(/\{(?:[^"{}]|<<0>>|<<self>>)*\}/.source, [regularString]), 2);
Prism.languages.insertBefore('qsharp', 'string', {
'interpolation-string': {
pattern: re(/\$"(?:\\.|<<0>>|[^\\"{])*"/.source, [interpolationExpr]),
greedy: true,
inside: {
'interpolation': {
pattern: re(/((?:^|[^\\])(?:\\\\)*)<<0>>/.source, [interpolationExpr]),
lookbehind: true,
inside: {
'punctuation': /^\{|\}$/,
'expression': {
pattern: /[\s\S]+/,
alias: 'language-qsharp',
inside: Prism.languages.qsharp
}
}
},
'string': /[\s\S]+/
}
}
});
}(Prism));
Prism.languages.qs = Prism.languages.qsharp;

View File

@@ -0,0 +1,2 @@
export { instrumentGoogleGenAIClient } from '@sentry/core';
//# sourceMappingURL=index.instrumentgooglegenaiclient.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"relations.cjs","names":[],"sources":["../../../../src/rest/commands/read/relations.ts"],"sourcesContent":["import type { DirectusRelation } from '../../../schema/relation.js';\nimport type { ApplyQueryFields } from '../../../types/index.js';\nimport type { RestCommand } from '../../types.js';\nimport { throwIfEmpty } from '../../utils/index.js';\n\nexport type ReadRelationOutput<Schema> = ApplyQueryFields<Schema, DirectusRelation<Schema>, '*'>;\n\n/**\n * List all Relations that exist in Directus.\n * @returns An array of Relation objects. If no items are available, data will be an empty array.\n */\nexport const readRelations =\n\t<Schema>(): RestCommand<ReadRelationOutput<Schema>[], Schema> =>\n\t() => ({\n\t\tpath: `/relations`,\n\t\tmethod: 'GET',\n\t});\n\n/**\n * List all Relations of a collection.\n * @param collection The collection\n * @returns Returns an array of Relation objects if a valid collection name was provided.\n */\nexport const readRelationByCollection =\n\t<Schema>(collection: DirectusRelation<Schema>['collection']): RestCommand<ReadRelationOutput<Schema>[], Schema> =>\n\t() => ({\n\t\tpath: `/relations/${collection}`,\n\t\tmethod: 'GET',\n\t});\n\n/**\n * List an existing Relation by collection and field name.\n * @param collection The collection\n * @param field The field\n * @returns Returns a Relation object if a valid collection and field name was provided.\n * @throws Will throw if collection is empty\n * @throws Will throw if field is empty\n */\nexport const readRelation =\n\t<Schema>(\n\t\tcollection: DirectusRelation<Schema>['collection'],\n\t\tfield: DirectusRelation<Schema>['field'],\n\t): RestCommand<ReadRelationOutput<Schema>, Schema> =>\n\t() => {\n\t\tthrowIfEmpty(collection, 'Collection cannot be empty');\n\t\tthrowIfEmpty(field, 'Field cannot be empty');\n\n\t\treturn {\n\t\t\tpath: `/relations/${collection}/${field}`,\n\t\t\tmethod: 'GET',\n\t\t};\n\t};\n"],"mappings":"kDAWa,WAEL,CACN,KAAM,aACN,OAAQ,MACR,EAOW,EACH,QACF,CACN,KAAM,cAAc,IACpB,OAAQ,MACR,EAUW,GAEX,EACA,SAGA,EAAA,aAAa,EAAY,6BAA6B,CACtD,EAAA,aAAa,EAAO,wBAAwB,CAErC,CACN,KAAM,cAAc,EAAW,GAAG,IAClC,OAAQ,MACR"}

View File

@@ -0,0 +1,2 @@
export declare function copyFile(source: string, destination: string): void;
//# sourceMappingURL=copyFile.d.ts.map

View File

@@ -0,0 +1,7 @@
import type { FlattenedField } from '../../fields/config/types.js';
import type { CompoundIndex, SanitizedCompoundIndex } from './types.js';
export declare const sanitizeCompoundIndexes: ({ fields, indexes, }: {
fields: FlattenedField[];
indexes: CompoundIndex[];
}) => SanitizedCompoundIndex[];
//# sourceMappingURL=sanitizeCompoundIndexes.d.ts.map

View File

@@ -0,0 +1,15 @@
import type { ColumnBuilderBaseConfig, ColumnDataType, GeneratedIdentityConfig, IsIdentity } from "../../column-builder.js";
import { entityKind } from "../../entity.js";
import type { GelSequenceOptions } from "../sequence.js";
import { GelColumnBuilder } from "./common.js";
export declare abstract class GelIntColumnBaseBuilder<T extends ColumnBuilderBaseConfig<ColumnDataType, string>> extends GelColumnBuilder<T, {
generatedIdentity: GeneratedIdentityConfig;
}> {
static readonly [entityKind]: string;
generatedAlwaysAsIdentity(sequence?: GelSequenceOptions & {
name?: string;
}): IsIdentity<this, 'always'>;
generatedByDefaultAsIdentity(sequence?: GelSequenceOptions & {
name?: string;
}): IsIdentity<this, 'byDefault'>;
}

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