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,125 @@
Prism.languages.nevod = {
'comment': /\/\/.*|(?:\/\*[\s\S]*?(?:\*\/|$))/,
'string': {
pattern: /(?:"(?:""|[^"])*"(?!")|'(?:''|[^'])*'(?!'))!?\*?/,
greedy: true,
inside: {
'string-attrs': /!$|!\*$|\*$/,
},
},
'namespace': {
pattern: /(@namespace\s+)[a-zA-Z0-9\-.]+(?=\s*\{)/,
lookbehind: true,
},
'pattern': {
pattern: /(@pattern\s+)?#?[a-zA-Z0-9\-.]+(?:\s*\(\s*(?:~\s*)?[a-zA-Z0-9\-.]+\s*(?:,\s*(?:~\s*)?[a-zA-Z0-9\-.]*)*\))?(?=\s*=)/,
lookbehind: true,
inside: {
'pattern-name': {
pattern: /^#?[a-zA-Z0-9\-.]+/,
alias: 'class-name',
},
'fields': {
pattern: /\(.*\)/,
inside: {
'field-name': {
pattern: /[a-zA-Z0-9\-.]+/,
alias: 'variable',
},
'punctuation': /[,()]/,
'operator': {
pattern: /~/,
alias: 'field-hidden-mark',
},
},
},
},
},
'search': {
pattern: /(@search\s+|#)[a-zA-Z0-9\-.]+(?:\.\*)?(?=\s*;)/,
alias: 'function',
lookbehind: true,
},
'keyword': /@(?:having|inside|namespace|outside|pattern|require|search|where)\b/,
'standard-pattern': {
pattern: /\b(?:Alpha|AlphaNum|Any|Blank|End|LineBreak|Num|NumAlpha|Punct|Space|Start|Symbol|Word|WordBreak)\b(?:\([a-zA-Z0-9\-.,\s+]*\))?/,
inside: {
'standard-pattern-name': {
pattern: /^[a-zA-Z0-9\-.]+/,
alias: 'builtin',
},
'quantifier': {
pattern: /\b\d+(?:\s*\+|\s*-\s*\d+)?(?!\w)/,
alias: 'number',
},
'standard-pattern-attr': {
pattern: /[a-zA-Z0-9\-.]+/,
alias: 'builtin',
},
'punctuation': /[,()]/,
},
},
'quantifier': {
pattern: /\b\d+(?:\s*\+|\s*-\s*\d+)?(?!\w)/,
alias: 'number',
},
'operator': [
{
pattern: /=/,
alias: 'pattern-def',
},
{
pattern: /&/,
alias: 'conjunction',
},
{
pattern: /~/,
alias: 'exception',
},
{
pattern: /\?/,
alias: 'optionality',
},
{
pattern: /[[\]]/,
alias: 'repetition',
},
{
pattern: /[{}]/,
alias: 'variation',
},
{
pattern: /[+_]/,
alias: 'sequence',
},
{
pattern: /\.{2,3}/,
alias: 'span',
},
],
'field-capture': [
{
pattern: /([a-zA-Z0-9\-.]+\s*\()\s*[a-zA-Z0-9\-.]+\s*:\s*[a-zA-Z0-9\-.]+(?:\s*,\s*[a-zA-Z0-9\-.]+\s*:\s*[a-zA-Z0-9\-.]+)*(?=\s*\))/,
lookbehind: true,
inside: {
'field-name': {
pattern: /[a-zA-Z0-9\-.]+/,
alias: 'variable',
},
'colon': /:/,
},
},
{
pattern: /[a-zA-Z0-9\-.]+\s*:/,
inside: {
'field-name': {
pattern: /[a-zA-Z0-9\-.]+/,
alias: 'variable',
},
'colon': /:/,
},
},
],
'punctuation': /[:;,()]/,
'name': /[a-zA-Z0-9\-.]+/
};

View File

@@ -0,0 +1,26 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _createClass;
var _toPropertyKey = require("./toPropertyKey.js");
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true;
if ("value" in descriptor) descriptor.writable = true;
Object.defineProperty(target, (0, _toPropertyKey.default)(descriptor.key), descriptor);
}
}
function _createClass(Constructor, protoProps, staticProps) {
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
if (staticProps) _defineProperties(Constructor, staticProps);
Object.defineProperty(Constructor, "prototype", {
writable: false
});
return Constructor;
}
//# sourceMappingURL=createClass.js.map

View File

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

View File

@@ -0,0 +1,30 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
*/
"use strict";
const RuntimeGlobals = require("../RuntimeGlobals");
const RuntimeModule = require("../RuntimeModule");
/** @typedef {import("../Compilation")} Compilation */
class GetFullHashRuntimeModule extends RuntimeModule {
constructor() {
super("getFullHash");
this.fullHash = true;
}
/**
* @returns {string | null} runtime code
*/
generate() {
const compilation = /** @type {Compilation} */ (this.compilation);
const { runtimeTemplate } = compilation;
return `${RuntimeGlobals.getFullHash} = ${runtimeTemplate.returningFunction(
JSON.stringify(compilation.hash || "XXXX")
)}`;
}
}
module.exports = GetFullHashRuntimeModule;

View File

@@ -0,0 +1,10 @@
"use strict";
var _class_apply_descriptor_get = require("./_class_apply_descriptor_get.cjs");
var _class_extract_field_descriptor = require("./_class_extract_field_descriptor.cjs");
function _class_private_field_get(receiver, privateMap) {
var descriptor = _class_extract_field_descriptor._(receiver, privateMap, "get");
return _class_apply_descriptor_get._(receiver, descriptor);
}
exports._ = _class_private_field_get;

View File

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

View File

@@ -0,0 +1,198 @@
"use strict";
exports.localize = void 0;
var _index = require("../../_lib/buildLocalizeFn.js");
const eraValues = {
narrow: ["НТӨ", "НТ"],
abbreviated: ["НТӨ", "НТ"],
wide: ["нийтийн тооллын өмнөх", "нийтийн тооллын"],
};
const quarterValues = {
narrow: ["I", "II", "III", "IV"],
abbreviated: ["I улирал", "II улирал", "III улирал", "IV улирал"],
wide: ["1-р улирал", "2-р улирал", "3-р улирал", "4-р улирал"],
};
// Note: in English, the names of days of the week and months are capitalized.
// If you are making a new locale based on this one, check if the same is true for the language you're working on.
// Generally, formatted dates should look like they are in the middle of a sentence,
// e.g. in Spanish language the weekdays and months should be in the lowercase.
const monthValues = {
narrow: [
"I",
"II",
"III",
"IV",
"V",
"VI",
"VII",
"VIII",
"IX",
"X",
"XI",
"XII",
],
abbreviated: [
"1-р сар",
"2-р сар",
"3-р сар",
"4-р сар",
"5-р сар",
"6-р сар",
"7-р сар",
"8-р сар",
"9-р сар",
"10-р сар",
"11-р сар",
"12-р сар",
],
wide: [
"Нэгдүгээр сар",
"Хоёрдугаар сар",
"Гуравдугаар сар",
"Дөрөвдүгээр сар",
"Тавдугаар сар",
"Зургаадугаар сар",
"Долоодугаар сар",
"Наймдугаар сар",
"Есдүгээр сар",
"Аравдугаар сар",
"Арваннэгдүгээр сар",
"Арван хоёрдугаар сар",
],
};
const formattingMonthValues = {
narrow: [
"I",
"II",
"III",
"IV",
"V",
"VI",
"VII",
"VIII",
"IX",
"X",
"XI",
"XII",
],
abbreviated: [
"1-р сар",
"2-р сар",
"3-р сар",
"4-р сар",
"5-р сар",
"6-р сар",
"7-р сар",
"8-р сар",
"9-р сар",
"10-р сар",
"11-р сар",
"12-р сар",
],
wide: [
"нэгдүгээр сар",
"хоёрдугаар сар",
"гуравдугаар сар",
"дөрөвдүгээр сар",
"тавдугаар сар",
"зургаадугаар сар",
"долоодугаар сар",
"наймдугаар сар",
"есдүгээр сар",
"аравдугаар сар",
"арваннэгдүгээр сар",
"арван хоёрдугаар сар",
],
};
const dayValues = {
narrow: ["Н", "Д", "М", "Л", "П", "Б", "Б"],
short: ["Ня", "Да", "Мя", "Лх", "Пү", "Ба", "Бя"],
abbreviated: ["Ням", "Дав", "Мяг", "Лха", "Пүр", "Баа", "Бям"],
wide: ["Ням", "Даваа", "Мягмар", "Лхагва", "Пүрэв", "Баасан", "Бямба"],
};
const formattingDayValues = {
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 ordinalNumber = (dirtyNumber, _options) => {
return String(dirtyNumber);
};
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",
formattingValues: formattingMonthValues,
defaultFormattingWidth: "wide",
}),
day: (0, _index.buildLocalizeFn)({
values: dayValues,
defaultWidth: "wide",
formattingValues: formattingDayValues,
defaultFormattingWidth: "wide",
}),
dayPeriod: (0, _index.buildLocalizeFn)({
values: dayPeriodValues,
defaultWidth: "wide",
}),
});

View File

@@ -0,0 +1,116 @@
'use strict'
import { Parser } from 'acorn'
import { importAttributesOrAssertions } from 'acorn-import-attributes'
const acornOpts = {
ecmaVersion: 'latest',
sourceType: 'module'
}
const parser = Parser.extend(importAttributesOrAssertions)
function warn (txt) {
process.emitWarning(txt, 'get-esm-exports')
}
/**
* Utilizes an AST parser to interpret ESM source code and build a list of
* exported identifiers. In the baseline case, the list of identifiers will be
* the simple identifier names as written in the source code of the module.
* However, there is a special case:
*
* When an `export * from './foo.js'` line is encountered it is rewritten
* as `* from ./foo.js`. This allows the interpreting code to recognize a
* transitive export and recursively parse the indicated module. The returned
* identifier list will have "* from ./foo.js" as an item.
*
* @param {object} params
* @param {string} params.moduleSource The source code of the module to parse
* and interpret.
*
* @returns {Set<string>} The identifiers exported by the module along with any
* custom directives.
*/
export default function getEsmExports (moduleSource) {
const exportedNames = new Set()
const tree = parser.parse(moduleSource, acornOpts)
for (const node of tree.body) {
if (!node.type.startsWith('Export')) continue
switch (node.type) {
case 'ExportNamedDeclaration':
if (node.declaration) {
parseDeclaration(node, exportedNames)
} else {
parseSpecifiers(node, exportedNames)
}
break
case 'ExportDefaultDeclaration': {
exportedNames.add('default')
break
}
case 'ExportAllDeclaration':
if (node.exported) {
exportedNames.add(node.exported.name)
} else {
exportedNames.add(`* from ${node.source.value}`)
}
break
default:
warn('unrecognized export type: ' + node.type)
}
}
return exportedNames
}
function parseDeclaration (node, exportedNames) {
switch (node.declaration.type) {
case 'FunctionDeclaration':
exportedNames.add(node.declaration.id.name)
break
case 'VariableDeclaration':
for (const varDecl of node.declaration.declarations) {
parseVariableDeclaration(varDecl, exportedNames)
}
break
case 'ClassDeclaration':
exportedNames.add(node.declaration.id.name)
break
default:
warn('unknown declaration type: ' + node.delcaration.type)
}
}
function parseVariableDeclaration (node, exportedNames) {
switch (node.id.type) {
case 'Identifier':
exportedNames.add(node.id.name)
break
case 'ObjectPattern':
for (const prop of node.id.properties) {
exportedNames.add(prop.value.name)
}
break
case 'ArrayPattern':
for (const elem of node.id.elements) {
exportedNames.add(elem.name)
}
break
default:
warn('unknown variable declaration type: ' + node.id.type)
}
}
function parseSpecifiers (node, exportedNames) {
for (const specifier of node.specifiers) {
if (specifier.exported.type === 'Identifier') {
exportedNames.add(specifier.exported.name)
} else if (specifier.exported.type === 'Literal') {
exportedNames.add(specifier.exported.value)
} else {
warn('unrecognized specifier type: ' + specifier.exported.type)
}
}
}

View File

@@ -0,0 +1,31 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.counterIncrement = void 0;
var parser_1 = require("../syntax/parser");
exports.counterIncrement = {
name: 'counter-increment',
initialValue: 'none',
prefix: true,
type: 1 /* LIST */,
parse: function (_context, tokens) {
if (tokens.length === 0) {
return null;
}
var first = tokens[0];
if (first.type === 20 /* IDENT_TOKEN */ && first.value === 'none') {
return null;
}
var increments = [];
var filtered = tokens.filter(parser_1.nonWhiteSpace);
for (var i = 0; i < filtered.length; i++) {
var counter = filtered[i];
var next = filtered[i + 1];
if (counter.type === 20 /* IDENT_TOKEN */) {
var increment = next && parser_1.isNumberToken(next) ? next.number : 1;
increments.push({ counter: counter.value, increment: increment });
}
}
return increments;
}
};
//# sourceMappingURL=counter-increment.js.map

View File

@@ -0,0 +1,22 @@
import { entityKind } from "../../entity.js";
import { QueryPromise } from "../../query-promise.js";
import type { RunnableQuery } from "../../runnable-query.js";
import type { PreparedQuery } from "../../session.js";
import type { Query, SQL, SQLWrapper } from "../../sql/sql.js";
export interface PgRaw<TResult> extends QueryPromise<TResult>, RunnableQuery<TResult, 'pg'>, SQLWrapper {
}
export declare class PgRaw<TResult> extends QueryPromise<TResult> implements RunnableQuery<TResult, 'pg'>, SQLWrapper, PreparedQuery {
execute: () => Promise<TResult>;
private sql;
private query;
private mapBatchResult;
static readonly [entityKind]: string;
readonly _: {
readonly dialect: 'pg';
readonly result: TResult;
};
constructor(execute: () => Promise<TResult>, sql: SQL, query: Query, mapBatchResult: (result: unknown) => unknown);
getQuery(): Query;
mapResult(result: unknown, isFromBatch?: boolean): unknown;
_prepare(): PreparedQuery;
}

View File

@@ -0,0 +1,144 @@
"use strict";
exports.match = void 0;
var _index = require("../../_lib/buildMatchPatternFn.js");
var _index2 = require("../../_lib/buildMatchFn.js");
const matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
const parseOrdinalNumberPattern = /\d+/i;
const matchEraPatterns = {
narrow: /^(ق|ب)/i,
abbreviated: /^(ق\.?\s?م\.?|ق\.?\s?م\.?\s?|a\.?\s?d\.?|c\.?\s?)/i,
wide: /^(قبل الميلاد|قبل الميلاد|بعد الميلاد|بعد الميلاد)/i,
};
const parseEraPatterns = {
any: [/^قبل/i, /^بعد/i],
};
const matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^ر[1234]/i,
wide: /^الربع [1234]/i,
};
const parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i],
};
const matchMonthPatterns = {
narrow: /^[يفمأمسند]/i,
abbreviated: /^(ين|ف|مار|أب|ماي|يون|يول|غش|شت|أك|ن|د)/i,
wide: /^(ين|ف|مار|أب|ماي|يون|يول|غش|شت|أك|ن|د)/i,
};
const parseMonthPatterns = {
narrow: [
/^ي/i,
/^ف/i,
/^م/i,
/^أ/i,
/^م/i,
/^ي/i,
/^ي/i,
/^غ/i,
/^ش/i,
/^أ/i,
/^ن/i,
/^د/i,
],
any: [
/^ين/i,
/^فب/i,
/^مار/i,
/^أب/i,
/^ماي/i,
/^يون/i,
/^يول/i,
/^غشت/i,
/^ش/i,
/^أك/i,
/^ن/i,
/^د/i,
],
};
const matchDayPatterns = {
narrow: /^[حنثرخجس]/i,
short: /^(أحد|إثنين|ثلاثاء|أربعاء|خميس|جمعة|سبت)/i,
abbreviated: /^(أحد|إثن|ثلا|أرب|خمي|جمعة|سبت)/i,
wide: /^(الأحد|الإثنين|الثلاثاء|الأربعاء|الخميس|الجمعة|السبت)/i,
};
const parseDayPatterns = {
narrow: [/^ح/i, /^ن/i, /^ث/i, /^ر/i, /^خ/i, /^ج/i, /^س/i],
wide: [
/^الأحد/i,
/^الإثنين/i,
/^الثلاثاء/i,
/^الأربعاء/i,
/^الخميس/i,
/^الجمعة/i,
/^السبت/i,
],
any: [/^أح/i, /^إث/i, /^ث/i, /^أر/i, /^خ/i, /^ج/i, /^س/i],
};
const matchDayPeriodPatterns = {
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i,
};
const parseDayPeriodPatterns = {
any: {
am: /^a/i,
pm: /^p/i,
midnight: /^mi/i,
noon: /^no/i,
morning: /morning/i,
afternoon: /afternoon/i,
evening: /evening/i,
night: /night/i,
},
};
const match = (exports.match = {
ordinalNumber: (0, _index.buildMatchPatternFn)({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: (value) => parseInt(value, 10),
}),
era: (0, _index2.buildMatchFn)({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any",
}),
quarter: (0, _index2.buildMatchFn)({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: (index) => Number(index) + 1,
}),
month: (0, _index2.buildMatchFn)({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any",
}),
day: (0, _index2.buildMatchFn)({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any",
}),
dayPeriod: (0, _index2.buildMatchFn)({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any",
}),
});

View File

@@ -0,0 +1,134 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const debugBuild = require('../debug-build.js');
const integration = require('../integration.js');
const debugLogger = require('../utils/debug-logger.js');
const is = require('../utils/is.js');
const normalize = require('../utils/normalize.js');
const object = require('../utils/object.js');
const string = require('../utils/string.js');
const INTEGRATION_NAME = 'ExtraErrorData';
/**
* Extract additional data for from original exceptions.
*/
const _extraErrorDataIntegration = ((options = {}) => {
const { depth = 3, captureErrorCause = true } = options;
return {
name: INTEGRATION_NAME,
processEvent(event, hint, client) {
const { maxValueLength } = client.getOptions();
return _enhanceEventWithErrorData(event, hint, depth, captureErrorCause, maxValueLength);
},
};
}) ;
const extraErrorDataIntegration = integration.defineIntegration(_extraErrorDataIntegration);
function _enhanceEventWithErrorData(
event,
hint = {},
depth,
captureErrorCause,
maxValueLength,
) {
if (!hint.originalException || !is.isError(hint.originalException)) {
return event;
}
const exceptionName = (hint.originalException ).name || hint.originalException.constructor.name;
const errorData = _extractErrorData(hint.originalException , captureErrorCause, maxValueLength);
if (errorData) {
const contexts = {
...event.contexts,
};
const normalizedErrorData = normalize.normalize(errorData, depth);
if (is.isPlainObject(normalizedErrorData)) {
// We mark the error data as "already normalized" here, because we don't want other normalization procedures to
// potentially truncate the data we just already normalized, with a certain depth setting.
object.addNonEnumerableProperty(normalizedErrorData, '__sentry_skip_normalization__', true);
contexts[exceptionName] = normalizedErrorData;
}
return {
...event,
contexts,
};
}
return event;
}
/**
* Extract extra information from the Error object
*/
function _extractErrorData(
error,
captureErrorCause,
maxValueLength,
) {
// We are trying to enhance already existing event, so no harm done if it won't succeed
try {
const nativeKeys = [
'name',
'message',
'stack',
'line',
'column',
'fileName',
'lineNumber',
'columnNumber',
'toJSON',
];
const extraErrorInfo = {};
// We want only enumerable properties, thus `getOwnPropertyNames` is redundant here, as we filter keys anyway.
for (const key of Object.keys(error)) {
if (nativeKeys.indexOf(key) !== -1) {
continue;
}
const value = error[key];
extraErrorInfo[key] =
is.isError(value) || typeof value === 'string'
? maxValueLength
? string.truncate(`${value}`, maxValueLength)
: `${value}`
: value;
}
// Error.cause is a standard property that is non enumerable, we therefore need to access it separately.
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause
if (captureErrorCause && error.cause !== undefined) {
if (is.isError(error.cause)) {
const errorName = error.cause.name || error.cause.constructor.name;
extraErrorInfo.cause = { [errorName]: _extractErrorData(error.cause , false, maxValueLength) };
} else {
extraErrorInfo.cause = error.cause;
}
}
// Check if someone attached `toJSON` method to grab even more properties (eg. axios is doing that)
if (typeof error.toJSON === 'function') {
const serializedError = error.toJSON() ;
for (const key of Object.keys(serializedError)) {
const value = serializedError[key];
extraErrorInfo[key] = is.isError(value) ? value.toString() : value;
}
}
return extraErrorInfo;
} catch (oO) {
debugBuild.DEBUG_BUILD && debugLogger.debug.error('Unable to extract extra data from the Error object:', oO);
}
return null;
}
exports.extraErrorDataIntegration = extraErrorDataIntegration;
//# sourceMappingURL=extraerrordata.js.map

View File

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

View File

@@ -0,0 +1,8 @@
import type { NumberFieldClient } from 'payload';
import type { DefaultFilterProps } from '../types.js';
export type NumberFilterProps = {
readonly field: NumberFieldClient;
readonly onChange: (e: string) => void;
readonly value: number | number[];
} & DefaultFilterProps;
//# sourceMappingURL=types.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/sqlite/insert.ts"],"sourcesContent":["import type { BaseSQLiteAdapter, Insert } from './types.js'\n\nexport const insert: Insert = async function (\n // Here 'this' is not a parameter. See:\n // https://www.typescriptlang.org/docs/handbook/2/classes.html#this-parameters\n this: BaseSQLiteAdapter,\n { db, onConflictDoUpdate, tableName, values },\n): Promise<Record<string, unknown>[]> {\n const table = this.tables[tableName]\n\n // Batch insert if limitedBoundParameters: true\n if (this.limitedBoundParameters && Array.isArray(values)) {\n const results: Record<string, unknown>[] = []\n const colsPerRow = Object.keys(values[0]).length\n const maxParams = 100\n const maxRowsPerBatch = Math.max(1, Math.floor(maxParams / colsPerRow))\n\n for (let i = 0; i < values.length; i += maxRowsPerBatch) {\n const batch = values.slice(i, i + maxRowsPerBatch)\n\n const batchResult = onConflictDoUpdate\n ? await db.insert(table).values(batch).onConflictDoUpdate(onConflictDoUpdate).returning()\n : await db.insert(table).values(batch).returning()\n\n results.push(...(batchResult as Record<string, unknown>[]))\n }\n\n return results\n }\n\n const result = onConflictDoUpdate\n ? await db.insert(table).values(values).onConflictDoUpdate(onConflictDoUpdate).returning()\n : await db.insert(table).values(values).returning()\n\n // See https://github.com/payloadcms/payload/pull/11831#discussion_r2010431908\n return result as Record<string, unknown>[]\n}\n"],"names":["insert","db","onConflictDoUpdate","tableName","values","table","tables","limitedBoundParameters","Array","isArray","results","colsPerRow","Object","keys","length","maxParams","maxRowsPerBatch","Math","max","floor","i","batch","slice","batchResult","returning","push","result"],"mappings":"AAEA,OAAO,MAAMA,SAAiB,eAI5B,EAAEC,EAAE,EAAEC,kBAAkB,EAAEC,SAAS,EAAEC,MAAM,EAAE;IAE7C,MAAMC,QAAQ,IAAI,CAACC,MAAM,CAACH,UAAU;IAEpC,+CAA+C;IAC/C,IAAI,IAAI,CAACI,sBAAsB,IAAIC,MAAMC,OAAO,CAACL,SAAS;QACxD,MAAMM,UAAqC,EAAE;QAC7C,MAAMC,aAAaC,OAAOC,IAAI,CAACT,MAAM,CAAC,EAAE,EAAEU,MAAM;QAChD,MAAMC,YAAY;QAClB,MAAMC,kBAAkBC,KAAKC,GAAG,CAAC,GAAGD,KAAKE,KAAK,CAACJ,YAAYJ;QAE3D,IAAK,IAAIS,IAAI,GAAGA,IAAIhB,OAAOU,MAAM,EAAEM,KAAKJ,gBAAiB;YACvD,MAAMK,QAAQjB,OAAOkB,KAAK,CAACF,GAAGA,IAAIJ;YAElC,MAAMO,cAAcrB,qBAChB,MAAMD,GAAGD,MAAM,CAACK,OAAOD,MAAM,CAACiB,OAAOnB,kBAAkB,CAACA,oBAAoBsB,SAAS,KACrF,MAAMvB,GAAGD,MAAM,CAACK,OAAOD,MAAM,CAACiB,OAAOG,SAAS;YAElDd,QAAQe,IAAI,IAAKF;QACnB;QAEA,OAAOb;IACT;IAEA,MAAMgB,SAASxB,qBACX,MAAMD,GAAGD,MAAM,CAACK,OAAOD,MAAM,CAACA,QAAQF,kBAAkB,CAACA,oBAAoBsB,SAAS,KACtF,MAAMvB,GAAGD,MAAM,CAACK,OAAOD,MAAM,CAACA,QAAQoB,SAAS;IAEnD,8EAA8E;IAC9E,OAAOE;AACT,EAAC"}

View File

@@ -0,0 +1,105 @@
"use strict";
exports.formatDistance = void 0;
const formatDistanceLocale = {
lessThanXSeconds: {
one: "kurang dari 1 detik",
other: "kurang dari {{count}} detik",
},
xSeconds: {
one: "1 detik",
other: "{{count}} detik",
},
halfAMinute: "setengah menit",
lessThanXMinutes: {
one: "kurang dari 1 menit",
other: "kurang dari {{count}} menit",
},
xMinutes: {
one: "1 menit",
other: "{{count}} menit",
},
aboutXHours: {
one: "sekitar 1 jam",
other: "sekitar {{count}} jam",
},
xHours: {
one: "1 jam",
other: "{{count}} jam",
},
xDays: {
one: "1 hari",
other: "{{count}} hari",
},
aboutXWeeks: {
one: "sekitar 1 minggu",
other: "sekitar {{count}} minggu",
},
xWeeks: {
one: "1 minggu",
other: "{{count}} minggu",
},
aboutXMonths: {
one: "sekitar 1 bulan",
other: "sekitar {{count}} bulan",
},
xMonths: {
one: "1 bulan",
other: "{{count}} bulan",
},
aboutXYears: {
one: "sekitar 1 tahun",
other: "sekitar {{count}} tahun",
},
xYears: {
one: "1 tahun",
other: "{{count}} tahun",
},
overXYears: {
one: "lebih dari 1 tahun",
other: "lebih dari {{count}} tahun",
},
almostXYears: {
one: "hampir 1 tahun",
other: "hampir {{count}} tahun",
},
};
const formatDistance = (token, count, options) => {
let result;
const tokenValue = formatDistanceLocale[token];
if (typeof tokenValue === "string") {
result = tokenValue;
} else if (count === 1) {
result = tokenValue.one;
} else {
result = tokenValue.other.replace("{{count}}", count.toString());
}
if (options?.addSuffix) {
if (options.comparison && options.comparison > 0) {
return "dalam waktu " + result;
} else {
return result + " yang lalu";
}
}
return result;
};
exports.formatDistance = formatDistance;

View File

@@ -0,0 +1,5 @@
function _identity(x) {
return x;
}
export { _identity as _ };

View File

@@ -0,0 +1,199 @@
// Source: https://www.unicode.org/cldr/charts/32/summary/te.html
const formatDistanceLocale = {
lessThanXSeconds: {
standalone: {
one: "సెకను కన్నా తక్కువ",
other: "{{count}} సెకన్ల కన్నా తక్కువ",
},
withPreposition: {
one: "సెకను",
other: "{{count}} సెకన్ల",
},
},
xSeconds: {
standalone: {
one: "ఒక సెకను", // CLDR #1314
other: "{{count}} సెకన్ల",
},
withPreposition: {
one: "ఒక సెకను",
other: "{{count}} సెకన్ల",
},
},
halfAMinute: {
standalone: "అర నిమిషం",
withPreposition: "అర నిమిషం",
},
lessThanXMinutes: {
standalone: {
one: "ఒక నిమిషం కన్నా తక్కువ",
other: "{{count}} నిమిషాల కన్నా తక్కువ",
},
withPreposition: {
one: "ఒక నిమిషం",
other: "{{count}} నిమిషాల",
},
},
xMinutes: {
standalone: {
one: "ఒక నిమిషం", // CLDR #1311
other: "{{count}} నిమిషాలు",
},
withPreposition: {
one: "ఒక నిమిషం", // CLDR #1311
other: "{{count}} నిమిషాల",
},
},
aboutXHours: {
standalone: {
one: "సుమారు ఒక గంట",
other: "సుమారు {{count}} గంటలు",
},
withPreposition: {
one: "సుమారు ఒక గంట",
other: "సుమారు {{count}} గంటల",
},
},
xHours: {
standalone: {
one: "ఒక గంట", // CLDR #1308
other: "{{count}} గంటలు",
},
withPreposition: {
one: "ఒక గంట",
other: "{{count}} గంటల",
},
},
xDays: {
standalone: {
one: "ఒక రోజు", // CLDR #1292
other: "{{count}} రోజులు",
},
withPreposition: {
one: "ఒక రోజు",
other: "{{count}} రోజుల",
},
},
aboutXWeeks: {
standalone: {
one: "సుమారు ఒక వారం",
other: "సుమారు {{count}} వారాలు",
},
withPreposition: {
one: "సుమారు ఒక వారం",
other: "సుమారు {{count}} వారాలల",
},
},
xWeeks: {
standalone: {
one: "ఒక వారం",
other: "{{count}} వారాలు",
},
withPreposition: {
one: "ఒక వారం",
other: "{{count}} వారాలల",
},
},
aboutXMonths: {
standalone: {
one: "సుమారు ఒక నెల",
other: "సుమారు {{count}} నెలలు",
},
withPreposition: {
one: "సుమారు ఒక నెల",
other: "సుమారు {{count}} నెలల",
},
},
xMonths: {
standalone: {
one: "ఒక నెల", // CLDR #1281
other: "{{count}} నెలలు",
},
withPreposition: {
one: "ఒక నెల",
other: "{{count}} నెలల",
},
},
aboutXYears: {
standalone: {
one: "సుమారు ఒక సంవత్సరం",
other: "సుమారు {{count}} సంవత్సరాలు",
},
withPreposition: {
one: "సుమారు ఒక సంవత్సరం",
other: "సుమారు {{count}} సంవత్సరాల",
},
},
xYears: {
standalone: {
one: "ఒక సంవత్సరం", // CLDR #1275
other: "{{count}} సంవత్సరాలు",
},
withPreposition: {
one: "ఒక సంవత్సరం",
other: "{{count}} సంవత్సరాల",
},
},
overXYears: {
standalone: {
one: "ఒక సంవత్సరం పైగా",
other: "{{count}} సంవత్సరాలకు పైగా",
},
withPreposition: {
one: "ఒక సంవత్సరం",
other: "{{count}} సంవత్సరాల",
},
},
almostXYears: {
standalone: {
one: "దాదాపు ఒక సంవత్సరం",
other: "దాదాపు {{count}} సంవత్సరాలు",
},
withPreposition: {
one: "దాదాపు ఒక సంవత్సరం",
other: "దాదాపు {{count}} సంవత్సరాల",
},
},
};
export const formatDistance = (token, count, options) => {
let result;
const tokenValue = options?.addSuffix
? formatDistanceLocale[token].withPreposition
: formatDistanceLocale[token].standalone;
if (typeof tokenValue === "string") {
result = tokenValue;
} else if (count === 1) {
result = tokenValue.one;
} else {
result = tokenValue.other.replace("{{count}}", String(count));
}
if (options?.addSuffix) {
if (options.comparison && options.comparison > 0) {
return result + "లో";
} else {
return result + " క్రితం";
}
}
return result;
};

View File

@@ -0,0 +1,26 @@
"use strict";
exports.previousMonday = previousMonday;
var _index = require("./previousDay.js");
/**
* @name previousMonday
* @category Weekday Helpers
* @summary When is the previous Monday?
*
* @description
* When is the previous Monday?
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param date - The date to start counting from
*
* @returns The previous Monday
*
* @example
* // When is the previous Monday before Jun, 18, 2021?
* const result = previousMonday(new Date(2021, 5, 18))
* //=> Mon June 14 2021 00:00:00
*/
function previousMonday(date) {
return (0, _index.previousDay)(date, 1);
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"sanitizeQuery.d.ts","sourceRoot":"","sources":["../../../src/providers/ListQuery/sanitizeQuery.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAS,MAAM,SAAS,CAAA;AAE/C;;;;GAIG;AACH,eAAO,MAAM,aAAa,eAAgB,SAAS,KAAG,SAmCrD,CAAA"}

View File

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

View File

@@ -0,0 +1,52 @@
import { buildHTMLStyles } from '../../html/utils/build-styles.mjs';
import { buildSVGPath } from './path.mjs';
import { calcSVGTransformOrigin } from './transform-origin.mjs';
/**
* Build SVG visual attrbutes, like cx and style.transform
*/
function buildSVGAttrs(state, { attrX, attrY, attrScale, originX, originY, pathLength, pathSpacing = 1, pathOffset = 0,
// This is object creation, which we try to avoid per-frame.
...latest }, isSVGTag, transformTemplate) {
buildHTMLStyles(state, latest, transformTemplate);
/**
* For svg tags we just want to make sure viewBox is animatable and treat all the styles
* as normal HTML tags.
*/
if (isSVGTag) {
if (state.style.viewBox) {
state.attrs.viewBox = state.style.viewBox;
}
return;
}
state.attrs = state.style;
state.style = {};
const { attrs, style, dimensions } = state;
/**
* However, we apply transforms as CSS transforms. So if we detect a transform we take it from attrs
* and copy it into style.
*/
if (attrs.transform) {
if (dimensions)
style.transform = attrs.transform;
delete attrs.transform;
}
// Parse transformOrigin
if (dimensions &&
(originX !== undefined || originY !== undefined || style.transform)) {
style.transformOrigin = calcSVGTransformOrigin(dimensions, originX !== undefined ? originX : 0.5, originY !== undefined ? originY : 0.5);
}
// Render attrX/attrY/attrScale as attributes
if (attrX !== undefined)
attrs.x = attrX;
if (attrY !== undefined)
attrs.y = attrY;
if (attrScale !== undefined)
attrs.scale = attrScale;
// Build SVG path if one has been defined
if (pathLength !== undefined) {
buildSVGPath(attrs, pathLength, pathSpacing, pathOffset, false);
}
}
export { buildSVGAttrs };

View File

@@ -0,0 +1,100 @@
"use strict";
exports.formatDistanceToNow = formatDistanceToNow;
var _index = require("./constructNow.js");
var _index2 = require("./formatDistance.js");
/**
* The {@link formatDistanceToNow} function options.
*/
/**
* @name formatDistanceToNow
* @category Common Helpers
* @summary Return the distance between the given date and now in words.
* @pure false
*
* @description
* Return the distance between the given date and now in words.
*
* | Distance to now | Result |
* |-------------------------------------------------------------------|---------------------|
* | 0 ... 30 secs | less than a minute |
* | 30 secs ... 1 min 30 secs | 1 minute |
* | 1 min 30 secs ... 44 mins 30 secs | [2..44] minutes |
* | 44 mins ... 30 secs ... 89 mins 30 secs | about 1 hour |
* | 89 mins 30 secs ... 23 hrs 59 mins 30 secs | about [2..24] hours |
* | 23 hrs 59 mins 30 secs ... 41 hrs 59 mins 30 secs | 1 day |
* | 41 hrs 59 mins 30 secs ... 29 days 23 hrs 59 mins 30 secs | [2..30] days |
* | 29 days 23 hrs 59 mins 30 secs ... 44 days 23 hrs 59 mins 30 secs | about 1 month |
* | 44 days 23 hrs 59 mins 30 secs ... 59 days 23 hrs 59 mins 30 secs | about 2 months |
* | 59 days 23 hrs 59 mins 30 secs ... 1 yr | [2..12] months |
* | 1 yr ... 1 yr 3 months | about 1 year |
* | 1 yr 3 months ... 1 yr 9 month s | over 1 year |
* | 1 yr 9 months ... 2 yrs | almost 2 years |
* | N yrs ... N yrs 3 months | about N years |
* | N yrs 3 months ... N yrs 9 months | over N years |
* | N yrs 9 months ... N+1 yrs | almost N+1 years |
*
* With `options.includeSeconds == true`:
* | Distance to now | Result |
* |---------------------|----------------------|
* | 0 secs ... 5 secs | less than 5 seconds |
* | 5 secs ... 10 secs | less than 10 seconds |
* | 10 secs ... 20 secs | less than 20 seconds |
* | 20 secs ... 40 secs | half a minute |
* | 40 secs ... 60 secs | less than a minute |
* | 60 secs ... 90 secs | 1 minute |
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param date - The given date
* @param options - The object with options
*
* @returns The distance in words
*
* @throws `date` must not be Invalid Date
* @throws `options.locale` must contain `formatDistance` property
*
* @example
* // If today is 1 January 2015, what is the distance to 2 July 2014?
* const result = formatDistanceToNow(
* new Date(2014, 6, 2)
* )
* //=> '6 months'
*
* @example
* // If now is 1 January 2015 00:00:00,
* // what is the distance to 1 January 2015 00:00:15, including seconds?
* const result = formatDistanceToNow(
* new Date(2015, 0, 1, 0, 0, 15),
* {includeSeconds: true}
* )
* //=> 'less than 20 seconds'
*
* @example
* // If today is 1 January 2015,
* // what is the distance to 1 January 2016, with a suffix?
* const result = formatDistanceToNow(
* new Date(2016, 0, 1),
* {addSuffix: true}
* )
* //=> 'in about 1 year'
*
* @example
* // If today is 1 January 2015,
* // what is the distance to 1 August 2016 in Esperanto?
* const eoLocale = require('date-fns/locale/eo')
* const result = formatDistanceToNow(
* new Date(2016, 7, 1),
* {locale: eoLocale}
* )
* //=> 'pli ol 1 jaro'
*/
function formatDistanceToNow(date, options) {
return (0, _index2.formatDistance)(
date,
(0, _index.constructNow)(date),
options,
);
}

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/gel-core/columns/all.ts"],"sourcesContent":["import { bigint } from './bigint.ts';\nimport { bigintT } from './bigintT.ts';\nimport { boolean } from './boolean.ts';\nimport { bytes } from './bytes.ts';\nimport { customType } from './custom.ts';\nimport { dateDuration } from './date-duration.ts';\nimport { decimal } from './decimal.ts';\nimport { doublePrecision } from './double-precision.ts';\nimport { duration } from './duration.ts';\nimport { integer } from './integer.ts';\nimport { json } from './json.ts';\nimport { localDate } from './localdate.ts';\nimport { localTime } from './localtime.ts';\nimport { real } from './real.ts';\nimport { relDuration } from './relative-duration.ts';\nimport { smallint } from './smallint.ts';\nimport { text } from './text.ts';\nimport { timestamp } from './timestamp.ts';\nimport { timestamptz } from './timestamptz.ts';\nimport { uuid } from './uuid.ts';\n\n// TODO add\nexport function getGelColumnBuilders() {\n\treturn {\n\t\tlocalDate,\n\t\tlocalTime,\n\t\tdecimal,\n\t\tdateDuration,\n\t\tbigintT,\n\t\tduration,\n\t\trelDuration,\n\t\tbytes,\n\t\tcustomType,\n\t\tbigint,\n\t\tboolean,\n\t\tdoublePrecision,\n\t\tinteger,\n\t\tjson,\n\t\treal,\n\t\tsmallint,\n\t\ttext,\n\t\ttimestamptz,\n\t\tuuid,\n\t\ttimestamp,\n\t};\n}\n\nexport type GelColumnsBuilders = ReturnType<typeof getGelColumnBuilders>;\n"],"mappings":"AAAA,SAAS,cAAc;AACvB,SAAS,eAAe;AACxB,SAAS,eAAe;AACxB,SAAS,aAAa;AACtB,SAAS,kBAAkB;AAC3B,SAAS,oBAAoB;AAC7B,SAAS,eAAe;AACxB,SAAS,uBAAuB;AAChC,SAAS,gBAAgB;AACzB,SAAS,eAAe;AACxB,SAAS,YAAY;AACrB,SAAS,iBAAiB;AAC1B,SAAS,iBAAiB;AAC1B,SAAS,YAAY;AACrB,SAAS,mBAAmB;AAC5B,SAAS,gBAAgB;AACzB,SAAS,YAAY;AACrB,SAAS,iBAAiB;AAC1B,SAAS,mBAAmB;AAC5B,SAAS,YAAY;AAGd,SAAS,uBAAuB;AACtC,SAAO;AAAA,IACN;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD;AACD;","names":[]}

View File

@@ -0,0 +1,2 @@
export * from "./conditions.cjs";
export * from "./select.cjs";

View File

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

View File

@@ -0,0 +1,137 @@
import type { SelectedFields as SelectedFieldsBase, SelectedFieldsFlat as SelectedFieldsFlatBase, SelectedFieldsOrdered as SelectedFieldsOrderedBase } from "../../operations.cjs";
import type { TypedQueryBuilder } from "../../query-builders/query-builder.cjs";
import type { AppendToNullabilityMap, AppendToResult, BuildSubquerySelection, GetSelectTableName, JoinNullability, JoinType, MapColumnsToTableAlias, SelectMode, SelectResult, SetOperator } from "../../query-builders/select.types.cjs";
import type { SingleStoreColumn } from "../columns/index.cjs";
import type { SingleStoreTable, SingleStoreTableWithColumns } from "../table.cjs";
import type { ColumnsSelection, Placeholder, SQL, View } from "../../sql/sql.cjs";
import type { Subquery } from "../../subquery.cjs";
import type { Table, UpdateTableConfig } from "../../table.cjs";
import type { Assume, ValidateShape } from "../../utils.cjs";
import type { PreparedQueryHKTBase, PreparedQueryKind, SingleStorePreparedQueryConfig } from "../session.cjs";
import type { SingleStoreSelectBase, SingleStoreSelectQueryBuilderBase } from "./select.cjs";
export interface SingleStoreSelectJoinConfig {
on: SQL | undefined;
table: SingleStoreTable | Subquery | SQL;
alias: string | undefined;
joinType: JoinType;
lateral?: boolean;
}
export type BuildAliasTable<TTable extends SingleStoreTable | View, TAlias extends string> = TTable extends Table ? SingleStoreTableWithColumns<UpdateTableConfig<TTable['_']['config'], {
name: TAlias;
columns: MapColumnsToTableAlias<TTable['_']['columns'], TAlias, 'singlestore'>;
}>> : never;
export interface SingleStoreSelectConfig {
withList?: Subquery[];
fields: Record<string, unknown>;
fieldsFlat?: SelectedFieldsOrdered;
where?: SQL;
having?: SQL;
table: SingleStoreTable | Subquery | SQL;
limit?: number | Placeholder;
offset?: number | Placeholder;
joins?: SingleStoreSelectJoinConfig[];
orderBy?: (SingleStoreColumn | SQL | SQL.Aliased)[];
groupBy?: (SingleStoreColumn | SQL | SQL.Aliased)[];
lockingClause?: {
strength: LockStrength;
config: LockConfig;
};
distinct?: boolean;
setOperators: {
rightSelect: TypedQueryBuilder<any, any>;
type: SetOperator;
isAll: boolean;
orderBy?: (SingleStoreColumn | SQL | SQL.Aliased)[];
limit?: number | Placeholder;
offset?: number | Placeholder;
}[];
}
export type SingleStoreJoin<T extends AnySingleStoreSelectQueryBuilder, TDynamic extends boolean, TJoinType extends JoinType, TJoinedTable extends SingleStoreTable | Subquery | SQL, // | SingleStoreViewBase
TJoinedName extends GetSelectTableName<TJoinedTable> = GetSelectTableName<TJoinedTable>> = T extends any ? SingleStoreSelectWithout<SingleStoreSelectKind<T['_']['hkt'], T['_']['tableName'], AppendToResult<T['_']['tableName'], T['_']['selection'], TJoinedName, TJoinedTable extends SingleStoreTable ? TJoinedTable['_']['columns'] : TJoinedTable extends Subquery ? Assume<TJoinedTable['_']['selectedFields'], SelectedFields> : never, T['_']['selectMode']>, T['_']['selectMode'] extends 'partial' ? T['_']['selectMode'] : 'multiple', T['_']['preparedQueryHKT'], AppendToNullabilityMap<T['_']['nullabilityMap'], TJoinedName, TJoinType>, TDynamic, T['_']['excludedMethods']>, TDynamic, T['_']['excludedMethods']> : never;
export type SingleStoreJoinFn<T extends AnySingleStoreSelectQueryBuilder, TDynamic extends boolean, TJoinType extends JoinType, TIsLateral extends boolean> = <TJoinedTable extends (TIsLateral extends true ? Subquery | SQL : SingleStoreTable | Subquery | SQL), TJoinedName extends GetSelectTableName<TJoinedTable> = GetSelectTableName<TJoinedTable>>(table: TJoinedTable, on: ((aliases: T['_']['selection']) => SQL | undefined) | SQL | undefined) => SingleStoreJoin<T, TDynamic, TJoinType, TJoinedTable, TJoinedName>;
export type SingleStoreCrossJoinFn<T extends AnySingleStoreSelectQueryBuilder, TDynamic extends boolean, TIsLateral extends boolean> = <TJoinedTable extends (TIsLateral extends true ? Subquery | SQL : SingleStoreTable | Subquery | SQL), TJoinedName extends GetSelectTableName<TJoinedTable> = GetSelectTableName<TJoinedTable>>(table: TJoinedTable) => SingleStoreJoin<T, TDynamic, 'cross', TJoinedTable, TJoinedName>;
export type SelectedFieldsFlat = SelectedFieldsFlatBase<SingleStoreColumn>;
export type SelectedFields = SelectedFieldsBase<SingleStoreColumn, SingleStoreTable>;
export type SelectedFieldsOrdered = SelectedFieldsOrderedBase<SingleStoreColumn>;
export type LockStrength = 'update' | 'share';
export type LockConfig = {
noWait: true;
skipLocked?: undefined;
} | {
noWait?: undefined;
skipLocked: true;
} | {
noWait?: undefined;
skipLocked?: undefined;
};
export interface SingleStoreSelectHKTBase {
tableName: string | undefined;
selection: unknown;
selectMode: SelectMode;
preparedQueryHKT: unknown;
nullabilityMap: unknown;
dynamic: boolean;
excludedMethods: string;
result: unknown;
selectedFields: unknown;
_type: unknown;
}
export type SingleStoreSelectKind<T extends SingleStoreSelectHKTBase, TTableName extends string | undefined, TSelection extends ColumnsSelection, TSelectMode extends SelectMode, TPreparedQueryHKT extends PreparedQueryHKTBase, TNullabilityMap extends Record<string, JoinNullability>, TDynamic extends boolean, TExcludedMethods extends string, TResult = SelectResult<TSelection, TSelectMode, TNullabilityMap>[], TSelectedFields = BuildSubquerySelection<TSelection, TNullabilityMap>> = (T & {
tableName: TTableName;
selection: TSelection;
selectMode: TSelectMode;
preparedQueryHKT: TPreparedQueryHKT;
nullabilityMap: TNullabilityMap;
dynamic: TDynamic;
excludedMethods: TExcludedMethods;
result: TResult;
selectedFields: TSelectedFields;
})['_type'];
export interface SingleStoreSelectQueryBuilderHKT extends SingleStoreSelectHKTBase {
_type: SingleStoreSelectQueryBuilderBase<SingleStoreSelectQueryBuilderHKT, this['tableName'], Assume<this['selection'], ColumnsSelection>, this['selectMode'], Assume<this['preparedQueryHKT'], PreparedQueryHKTBase>, Assume<this['nullabilityMap'], Record<string, JoinNullability>>, this['dynamic'], this['excludedMethods'], Assume<this['result'], any[]>, Assume<this['selectedFields'], ColumnsSelection>>;
}
export interface SingleStoreSelectHKT extends SingleStoreSelectHKTBase {
_type: SingleStoreSelectBase<this['tableName'], Assume<this['selection'], ColumnsSelection>, this['selectMode'], Assume<this['preparedQueryHKT'], PreparedQueryHKTBase>, Assume<this['nullabilityMap'], Record<string, JoinNullability>>, this['dynamic'], this['excludedMethods'], Assume<this['result'], any[]>, Assume<this['selectedFields'], ColumnsSelection>>;
}
export type SingleStoreSetOperatorExcludedMethods = 'where' | 'having' | 'groupBy' | 'session' | 'leftJoin' | 'rightJoin' | 'innerJoin' | 'fullJoin' | 'for';
export type SingleStoreSelectWithout<T extends AnySingleStoreSelectQueryBuilder, TDynamic extends boolean, K extends keyof T & string, TResetExcluded extends boolean = false> = TDynamic extends true ? T : Omit<SingleStoreSelectKind<T['_']['hkt'], T['_']['tableName'], T['_']['selection'], T['_']['selectMode'], T['_']['preparedQueryHKT'], T['_']['nullabilityMap'], TDynamic, TResetExcluded extends true ? K : T['_']['excludedMethods'] | K, T['_']['result'], T['_']['selectedFields']>, TResetExcluded extends true ? K : T['_']['excludedMethods'] | K>;
export type SingleStoreSelectPrepare<T extends AnySingleStoreSelect> = PreparedQueryKind<T['_']['preparedQueryHKT'], SingleStorePreparedQueryConfig & {
execute: T['_']['result'];
iterator: T['_']['result'][number];
}, true>;
export type SingleStoreSelectDynamic<T extends AnySingleStoreSelectQueryBuilder> = SingleStoreSelectKind<T['_']['hkt'], T['_']['tableName'], T['_']['selection'], T['_']['selectMode'], T['_']['preparedQueryHKT'], T['_']['nullabilityMap'], true, never, T['_']['result'], T['_']['selectedFields']>;
export type CreateSingleStoreSelectFromBuilderMode<TBuilderMode extends 'db' | 'qb', TTableName extends string | undefined, TSelection extends ColumnsSelection, TSelectMode extends SelectMode, TPreparedQueryHKT extends PreparedQueryHKTBase> = TBuilderMode extends 'db' ? SingleStoreSelectBase<TTableName, TSelection, TSelectMode, TPreparedQueryHKT> : SingleStoreSelectQueryBuilderBase<SingleStoreSelectQueryBuilderHKT, TTableName, TSelection, TSelectMode, TPreparedQueryHKT>;
export type SingleStoreSelectQueryBuilder<THKT extends SingleStoreSelectHKTBase = SingleStoreSelectQueryBuilderHKT, TTableName extends string | undefined = string | undefined, TSelection extends ColumnsSelection = ColumnsSelection, TSelectMode extends SelectMode = SelectMode, TPreparedQueryHKT extends PreparedQueryHKTBase = PreparedQueryHKTBase, TNullabilityMap extends Record<string, JoinNullability> = Record<string, JoinNullability>, TResult extends any[] = unknown[], TSelectedFields extends ColumnsSelection = ColumnsSelection> = SingleStoreSelectQueryBuilderBase<THKT, TTableName, TSelection, TSelectMode, TPreparedQueryHKT, TNullabilityMap, true, never, TResult, TSelectedFields>;
export type AnySingleStoreSelectQueryBuilder = SingleStoreSelectQueryBuilderBase<any, any, any, any, any, any, any, any, any>;
export type AnySingleStoreSetOperatorInterface = SingleStoreSetOperatorInterface<any, any, any, any, any, any, any, any, any>;
export interface SingleStoreSetOperatorInterface<TTableName extends string | undefined, TSelection extends ColumnsSelection, TSelectMode extends SelectMode, TPreparedQueryHKT extends PreparedQueryHKTBase = PreparedQueryHKTBase, TNullabilityMap extends Record<string, JoinNullability> = TTableName extends string ? Record<TTableName, 'not-null'> : {}, TDynamic extends boolean = false, TExcludedMethods extends string = never, TResult extends any[] = SelectResult<TSelection, TSelectMode, TNullabilityMap>[], TSelectedFields extends ColumnsSelection = BuildSubquerySelection<TSelection, TNullabilityMap>> {
_: {
readonly hkt: SingleStoreSelectHKT;
readonly tableName: TTableName;
readonly selection: TSelection;
readonly selectMode: TSelectMode;
readonly preparedQueryHKT: TPreparedQueryHKT;
readonly nullabilityMap: TNullabilityMap;
readonly dynamic: TDynamic;
readonly excludedMethods: TExcludedMethods;
readonly result: TResult;
readonly selectedFields: TSelectedFields;
};
}
export type SingleStoreSetOperatorWithResult<TResult extends any[]> = SingleStoreSetOperatorInterface<any, any, any, any, any, any, any, TResult, any>;
export type SingleStoreSelect<TTableName extends string | undefined = string | undefined, TSelection extends ColumnsSelection = Record<string, any>, TSelectMode extends SelectMode = SelectMode, TNullabilityMap extends Record<string, JoinNullability> = Record<string, JoinNullability>> = SingleStoreSelectBase<TTableName, TSelection, TSelectMode, PreparedQueryHKTBase, TNullabilityMap, true, never>;
export type AnySingleStoreSelect = SingleStoreSelectBase<any, any, any, any, any, any, any, any>;
export type SingleStoreSetOperator<TTableName extends string | undefined = string | undefined, TSelection extends ColumnsSelection = Record<string, any>, TSelectMode extends SelectMode = SelectMode, TPreparedQueryHKT extends PreparedQueryHKTBase = PreparedQueryHKTBase, TNullabilityMap extends Record<string, JoinNullability> = Record<string, JoinNullability>> = SingleStoreSelectBase<TTableName, TSelection, TSelectMode, TPreparedQueryHKT, TNullabilityMap, true, SingleStoreSetOperatorExcludedMethods>;
export type SetOperatorRightSelect<TValue extends SingleStoreSetOperatorWithResult<TResult>, TResult extends any[]> = TValue extends SingleStoreSetOperatorInterface<any, any, any, any, any, any, any, infer TValueResult, any> ? ValidateShape<TValueResult[number], TResult[number], TypedQueryBuilder<any, TValueResult>> : TValue;
export type SetOperatorRestSelect<TValue extends readonly SingleStoreSetOperatorWithResult<TResult>[], TResult extends any[]> = TValue extends [infer First, ...infer Rest] ? First extends SingleStoreSetOperatorInterface<any, any, any, any, any, any, any, infer TValueResult, any> ? Rest extends AnySingleStoreSetOperatorInterface[] ? [
ValidateShape<TValueResult[number], TResult[number], TypedQueryBuilder<any, TValueResult>>,
...SetOperatorRestSelect<Rest, TResult>
] : ValidateShape<TValueResult[number], TResult[number], TypedQueryBuilder<any, TValueResult>[]> : never : TValue;
export type SingleStoreCreateSetOperatorFn = <TTableName extends string | undefined, TSelection extends ColumnsSelection, TSelectMode extends SelectMode, TValue extends SingleStoreSetOperatorWithResult<TResult>, TRest extends SingleStoreSetOperatorWithResult<TResult>[], TPreparedQueryHKT extends PreparedQueryHKTBase = PreparedQueryHKTBase, TNullabilityMap extends Record<string, JoinNullability> = TTableName extends string ? Record<TTableName, 'not-null'> : {}, TDynamic extends boolean = false, TExcludedMethods extends string = never, TResult extends any[] = SelectResult<TSelection, TSelectMode, TNullabilityMap>[], TSelectedFields extends ColumnsSelection = BuildSubquerySelection<TSelection, TNullabilityMap>>(leftSelect: SingleStoreSetOperatorInterface<TTableName, TSelection, TSelectMode, TPreparedQueryHKT, TNullabilityMap, TDynamic, TExcludedMethods, TResult, TSelectedFields>, rightSelect: SetOperatorRightSelect<TValue, TResult>, ...restSelects: SetOperatorRestSelect<TRest, TResult>) => SingleStoreSelectWithout<SingleStoreSelectBase<TTableName, TSelection, TSelectMode, TPreparedQueryHKT, TNullabilityMap, TDynamic, TExcludedMethods, TResult, TSelectedFields>, false, SingleStoreSetOperatorExcludedMethods, true>;
export type GetSingleStoreSetOperators = {
union: SingleStoreCreateSetOperatorFn;
intersect: SingleStoreCreateSetOperatorFn;
except: SingleStoreCreateSetOperatorFn;
unionAll: SingleStoreCreateSetOperatorFn;
minus: SingleStoreCreateSetOperatorFn;
};

View File

@@ -0,0 +1,69 @@
"use strict";
exports.formatRelative = void 0;
var _index = require("../../../isSameWeek.js");
const weekdays = [
"domenica",
"lunedì",
"martedì",
"mercoledì",
"giovedì",
"venerdì",
"sabato",
];
function lastWeek(day) {
switch (day) {
case 0:
return "'domenica scorsa alle' p";
default:
return "'" + weekdays[day] + " scorso alle' p";
}
}
function thisWeek(day) {
return "'" + weekdays[day] + " alle' p";
}
function nextWeek(day) {
switch (day) {
case 0:
return "'domenica prossima alle' p";
default:
return "'" + weekdays[day] + " prossimo alle' p";
}
}
const formatRelativeLocale = {
lastWeek: (date, baseDate, options) => {
const day = date.getDay();
if ((0, _index.isSameWeek)(date, baseDate, options)) {
return thisWeek(day);
} else {
return lastWeek(day);
}
},
yesterday: "'ieri alle' p",
today: "'oggi alle' p",
tomorrow: "'domani alle' p",
nextWeek: (date, baseDate, options) => {
const day = date.getDay();
if ((0, _index.isSameWeek)(date, baseDate, options)) {
return thisWeek(day);
} else {
return nextWeek(day);
}
},
other: "P",
};
const formatRelative = (token, date, baseDate, options) => {
const format = formatRelativeLocale[token];
if (typeof format === "function") {
return format(date, baseDate, options);
}
return format;
};
exports.formatRelative = formatRelative;

View File

@@ -0,0 +1,29 @@
var baseClone = require('./_baseClone');
/** Used to compose bitmasks for cloning. */
var CLONE_DEEP_FLAG = 1,
CLONE_SYMBOLS_FLAG = 4;
/**
* This method is like `_.clone` except that it recursively clones `value`.
*
* @static
* @memberOf _
* @since 1.0.0
* @category Lang
* @param {*} value The value to recursively clone.
* @returns {*} Returns the deep cloned value.
* @see _.clone
* @example
*
* var objects = [{ 'a': 1 }, { 'b': 2 }];
*
* var deep = _.cloneDeep(objects);
* console.log(deep[0] === objects[0]);
* // => false
*/
function cloneDeep(value) {
return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
}
module.exports = cloneDeep;

View File

@@ -0,0 +1,39 @@
import { UnauthorizedError } from '../errors/UnauthorizedError.js';
/**
* Protects admin-only routes, server functions, etc.
* The requesting user must either:
* a. pass the `access.admin` function on the `users` collection, if defined
* b. match the `config.admin.user` property on the Payload config
* c. if no user is present, and there are no users in the system, allow access (for first user creation)
* @throws {Error} Throws an `Unauthorized` error if access is denied that can be explicitly caught
*/ export const canAccessAdmin = async ({ req })=>{
const incomingUserSlug = req.user?.collection;
const adminUserSlug = req.payload.config.admin.user;
if (incomingUserSlug) {
const adminAccessFn = req.payload.collections[incomingUserSlug]?.config.access?.admin;
if (adminAccessFn) {
const canAccess = await adminAccessFn({
req
});
if (!canAccess) {
throw new UnauthorizedError();
}
// Match the user collection to the global admin config
} else if (adminUserSlug !== incomingUserSlug) {
throw new UnauthorizedError();
}
} else {
const hasUsers = await req.payload.find({
collection: adminUserSlug,
depth: 0,
limit: 1,
pagination: false
});
// If there are users, we should not allow access because of `/create-first-user`
if (hasUsers.docs.length) {
throw new UnauthorizedError();
}
}
};
//# sourceMappingURL=canAccessAdmin.js.map

View File

@@ -0,0 +1,54 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
*/
"use strict";
const RuntimeGlobals = require("../RuntimeGlobals");
const RuntimeModule = require("../RuntimeModule");
const Template = require("../Template");
/** @typedef {import("../Chunk")} Chunk */
/** @typedef {import("../Compilation")} Compilation */
class ChunkPrefetchStartupRuntimeModule extends RuntimeModule {
/**
* @param {{ onChunks: Chunk[], chunks: Set<Chunk> }[]} startupChunks chunk ids to trigger when chunks are loaded
*/
constructor(startupChunks) {
super("startup prefetch", RuntimeModule.STAGE_TRIGGER);
this.startupChunks = startupChunks;
}
/**
* @returns {string | null} runtime code
*/
generate() {
const { startupChunks } = this;
const compilation = /** @type {Compilation} */ (this.compilation);
const chunk = /** @type {Chunk} */ (this.chunk);
const { runtimeTemplate } = compilation;
return Template.asString(
startupChunks.map(
({ onChunks, chunks }) =>
`${RuntimeGlobals.onChunksLoaded}(0, ${JSON.stringify(
// This need to include itself to delay execution after this chunk has been fully loaded
onChunks.filter((c) => c === chunk).map((c) => c.id)
)}, ${runtimeTemplate.basicFunction(
"",
chunks.size < 3
? Array.from(
chunks,
(c) =>
`${RuntimeGlobals.prefetchChunk}(${JSON.stringify(c.id)});`
)
: `${JSON.stringify(Array.from(chunks, (c) => c.id))}.map(${
RuntimeGlobals.prefetchChunk
});`
)}, 5);`
)
);
}
}
module.exports = ChunkPrefetchStartupRuntimeModule;

View File

@@ -0,0 +1 @@
{"version":3,"file":"format-fields.js","names":["fields"],"sources":["../../src/utils/format-fields.ts"],"sourcesContent":["export const formatFields = (fields: (string | Record<string, any>)[]) => {\n\ttype FieldItem = (typeof fields)[number];\n\n\tconst walkFields = (value: FieldItem, chain: string[] = []): string | string[] => {\n\t\tif (typeof value === 'object') {\n\t\t\tconst result = [];\n\n\t\t\tfor (const key in value) {\n\t\t\t\tconst nestedField = value[key as keyof typeof value] ?? [];\n\n\t\t\t\tif (Array.isArray(nestedField)) {\n\t\t\t\t\t// regular nested fields\n\t\t\t\t\tfor (const item of nestedField) {\n\t\t\t\t\t\tresult.push(walkFields(item as FieldItem, [...chain, key]));\n\t\t\t\t\t}\n\t\t\t\t} else if (typeof nestedField === 'object') {\n\t\t\t\t\t// many to any nested\n\t\t\t\t\tfor (const scope of Object.keys(nestedField)) {\n\t\t\t\t\t\tconst fields = (nestedField as Record<string, FieldItem[]>)[scope]!;\n\n\t\t\t\t\t\tfor (const item of fields) {\n\t\t\t\t\t\t\tresult.push(walkFields(item as FieldItem, [...chain, `${key}:${scope}`]));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn result.flatMap((items) => items);\n\t\t}\n\n\t\treturn [...chain, String(value)].join('.');\n\t};\n\n\treturn fields.flatMap((value) => walkFields(value));\n};\n"],"mappings":"AAAA,MAAa,EAAgB,GAA6C,CAGzE,IAAM,GAAc,EAAkB,EAAkB,EAAE,GAAwB,CACjF,GAAI,OAAO,GAAU,SAAU,CAC9B,IAAM,EAAS,EAAE,CAEjB,IAAK,IAAM,KAAO,EAAO,CACxB,IAAM,EAAc,EAAM,IAA8B,EAAE,CAE1D,GAAI,MAAM,QAAQ,EAAY,CAE7B,IAAK,IAAM,KAAQ,EAClB,EAAO,KAAK,EAAW,EAAmB,CAAC,GAAG,EAAO,EAAI,CAAC,CAAC,SAElD,OAAO,GAAgB,SAEjC,IAAK,IAAM,KAAS,OAAO,KAAK,EAAY,CAAE,CAC7C,IAAMA,EAAU,EAA4C,GAE5D,IAAK,IAAM,KAAQA,EAClB,EAAO,KAAK,EAAW,EAAmB,CAAC,GAAG,EAAO,GAAG,EAAI,GAAG,IAAQ,CAAC,CAAC,EAM7E,OAAO,EAAO,QAAS,GAAU,EAAM,CAGxC,MAAO,CAAC,GAAG,EAAO,OAAO,EAAM,CAAC,CAAC,KAAK,IAAI,EAG3C,OAAO,EAAO,QAAS,GAAU,EAAW,EAAM,CAAC"}

View File

@@ -0,0 +1,21 @@
/**
* @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 Fence = createLucideIcon("Fence", [
["path", { d: "M4 3 2 5v15c0 .6.4 1 1 1h2c.6 0 1-.4 1-1V5Z", key: "1n2rgs" }],
["path", { d: "M6 8h4", key: "utf9t1" }],
["path", { d: "M6 18h4", key: "12yh4b" }],
["path", { d: "m12 3-2 2v15c0 .6.4 1 1 1h2c.6 0 1-.4 1-1V5Z", key: "3ha7mj" }],
["path", { d: "M14 8h4", key: "1r8wg2" }],
["path", { d: "M14 18h4", key: "1t3kbu" }],
["path", { d: "m20 3-2 2v15c0 .6.4 1 1 1h2c.6 0 1-.4 1-1V5Z", key: "dfd4e2" }]
]);
export { Fence as default };
//# sourceMappingURL=fence.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"trace-info.js","sources":["../../../src/utils/trace-info.ts"],"sourcesContent":["import type { Client } from '../client';\nimport { getTraceContextFromScope, withScope } from '../currentScopes';\nimport type { Scope } from '../scope';\nimport {\n getDynamicSamplingContextFromScope,\n getDynamicSamplingContextFromSpan,\n} from '../tracing/dynamicSamplingContext';\nimport type { TraceContext } from '../types-hoist/context';\nimport type { DynamicSamplingContext } from '../types-hoist/envelope';\nimport { getActiveSpan, spanToTraceContext } from './spanUtils';\n\n/** Extract trace information from scope */\nexport function _getTraceInfoFromScope(\n client: Client,\n scope: Scope | undefined,\n): [dynamicSamplingContext: Partial<DynamicSamplingContext> | undefined, traceContext: TraceContext | undefined] {\n if (!scope) {\n return [undefined, undefined];\n }\n\n return withScope(scope, () => {\n const span = getActiveSpan();\n const traceContext = span ? spanToTraceContext(span) : getTraceContextFromScope(scope);\n const dynamicSamplingContext = span\n ? getDynamicSamplingContextFromSpan(span)\n : getDynamicSamplingContextFromScope(client, scope);\n return [dynamicSamplingContext, traceContext];\n });\n}\n"],"names":[],"mappings":";;;;AAWA;AACO,SAAS,sBAAsB;AACtC,EAAE,MAAM;AACR,EAAE,KAAK;AACP,EAAiH;AACjH,EAAE,IAAI,CAAC,KAAK,EAAE;AACd,IAAI,OAAO,CAAC,SAAS,EAAE,SAAS,CAAC;AACjC,EAAE;;AAEF,EAAE,OAAO,SAAS,CAAC,KAAK,EAAE,MAAM;AAChC,IAAI,MAAM,IAAA,GAAO,aAAa,EAAE;AAChC,IAAI,MAAM,YAAA,GAAe,IAAA,GAAO,kBAAkB,CAAC,IAAI,CAAA,GAAI,wBAAwB,CAAC,KAAK,CAAC;AAC1F,IAAI,MAAM,yBAAyB;AACnC,QAAQ,iCAAiC,CAAC,IAAI;AAC9C,QAAQ,kCAAkC,CAAC,MAAM,EAAE,KAAK,CAAC;AACzD,IAAI,OAAO,CAAC,sBAAsB,EAAE,YAAY,CAAC;AACjD,EAAE,CAAC,CAAC;AACJ;;;;"}

View File

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

View File

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

View File

@@ -0,0 +1,37 @@
{
"name": "estree-walker",
"description": "Traverse an ESTree-compliant AST",
"version": "2.0.2",
"private": false,
"author": "Rich Harris",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/Rich-Harris/estree-walker"
},
"type": "commonjs",
"main": "./dist/umd/estree-walker.js",
"module": "./dist/esm/estree-walker.js",
"exports": {
"require": "./dist/umd/estree-walker.js",
"import": "./dist/esm/estree-walker.js"
},
"types": "types/index.d.ts",
"scripts": {
"prepublishOnly": "npm run build && npm test",
"build": "tsc && rollup -c",
"test": "uvu test"
},
"devDependencies": {
"@types/estree": "0.0.42",
"rollup": "^2.10.9",
"typescript": "^3.7.5",
"uvu": "^0.5.1"
},
"files": [
"src",
"dist",
"types",
"README.md"
]
}

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/postgres/dropDatabase.ts"],"sourcesContent":["import type { DropDatabase } from './types.js'\n\nexport const dropDatabase: DropDatabase = async function dropDatabase({ adapter }) {\n await adapter.execute({\n drizzle: adapter.drizzle,\n raw: `drop schema if exists ${this.schemaName || 'public'} cascade;\n create schema ${this.schemaName || 'public'};`,\n })\n}\n"],"names":["dropDatabase","adapter","execute","drizzle","raw","schemaName"],"mappings":"AAEA,OAAO,MAAMA,eAA6B,eAAeA,aAAa,EAAEC,OAAO,EAAE;IAC/E,MAAMA,QAAQC,OAAO,CAAC;QACpBC,SAASF,QAAQE,OAAO;QACxBC,KAAK,CAAC,sBAAsB,EAAE,IAAI,CAACC,UAAU,IAAI,SAAS;kBAC5C,EAAE,IAAI,CAACA,UAAU,IAAI,SAAS,CAAC,CAAC;IAChD;AACF,EAAC"}

View File

@@ -0,0 +1,13 @@
import type { SanitizedCollectionConfig } from '../../../collections/config/types.js';
import type { PayloadRequest } from '../../../types/index.js';
type Args = {
collection: SanitizedCollectionConfig;
password: string;
req: PayloadRequest;
};
export declare const generatePasswordSaltHash: ({ collection, password: passwordToSet, req, }: Args) => Promise<{
hash: string;
salt: string;
}>;
export {};
//# sourceMappingURL=generatePasswordSaltHash.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"chevron-left.js","sources":["../../../src/icons/chevron-left.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ChevronLeft\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtMTUgMTgtNi02IDYtNiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/chevron-left\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst ChevronLeft = createLucideIcon('ChevronLeft', [\n ['path', { d: 'm15 18-6-6 6-6', key: '1wnfg3' }],\n]);\n\nexport default ChevronLeft;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAc,iBAAiB,aAAe,CAAA,CAAA,CAAA;AAAA,CAAA,CAClD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAkB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACjD,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,8 @@
import type {MacroKeywordDefinition} from "ajv"
import type {GetDefinition} from "./_types"
import getRangeDef from "./_range"
const getDef: GetDefinition<MacroKeywordDefinition> = getRangeDef("range")
export default getDef
module.exports = getDef

View File

@@ -0,0 +1,21 @@
'use strict'
const { test } = require('tap')
const { join } = require('path')
const ThreadStream = require('..')
const { version } = require('../package.json')
require('why-is-node-running')
test('get context', (t) => {
const stream = new ThreadStream({
filename: join(__dirname, 'get-context.js'),
workerData: {},
sync: true
})
t.on('end', () => stream.end())
stream.on('context', (ctx) => {
t.same(ctx.threadStreamVersion, version)
t.end()
})
stream.write('hello')
})

View File

@@ -0,0 +1,26 @@
/*
* 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 { VERSION } from '../../version';
import { ATTR_TELEMETRY_SDK_NAME, ATTR_TELEMETRY_SDK_LANGUAGE, TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS, ATTR_TELEMETRY_SDK_VERSION, } from '@opentelemetry/semantic-conventions';
import { ATTR_PROCESS_RUNTIME_NAME } from '../../semconv';
/** Constants describing the SDK in use */
export const SDK_INFO = {
[ATTR_TELEMETRY_SDK_NAME]: 'opentelemetry',
[ATTR_PROCESS_RUNTIME_NAME]: 'node',
[ATTR_TELEMETRY_SDK_LANGUAGE]: TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS,
[ATTR_TELEMETRY_SDK_VERSION]: VERSION,
};
//# sourceMappingURL=sdk-info.js.map

View File

@@ -0,0 +1,16 @@
var baseGet = require('./_baseGet');
/**
* A specialized version of `baseProperty` which supports deep paths.
*
* @private
* @param {Array|string} path The path of the property to get.
* @returns {Function} Returns the new accessor function.
*/
function basePropertyDeep(path) {
return function(object) {
return baseGet(object, path);
};
}
module.exports = basePropertyDeep;

View File

@@ -0,0 +1,26 @@
/**
* Checks if `value` is classified as an `Array` object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
* @example
*
* _.isArray([1, 2, 3]);
* // => true
*
* _.isArray(document.body.children);
* // => false
*
* _.isArray('abc');
* // => false
*
* _.isArray(_.noop);
* // => false
*/
var isArray = Array.isArray;
module.exports = isArray;

View File

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

View File

@@ -0,0 +1,10 @@
const index = require('./sdk/index.js');
/**
* The @sentry/node/init export can be used with the node --import and --require args to initialize the SDK entirely via
* environment variables.
*
* > SENTRY_DSN=https://examplePublicKey@o0.ingest.sentry.io/0 SENTRY_TRACES_SAMPLE_RATE=1.0 node --import=@sentry/node/init app.mjs
*/
index.init();
//# sourceMappingURL=init.js.map

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"generateTransitionClasses.js","sourceRoot":"","sources":["../../src/ModalProvider/generateTransitionClasses.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,SAAiB,EAA2B,EAAE;IACtF,IAAI,SAAS,EAAE,CAAC;QACd,OAAO,CAAC;YACN,MAAM,EAAE,GAAG,SAAS,UAAU;YAC9B,YAAY,EAAE,GAAG,SAAS,gBAAgB;YAC1C,UAAU,EAAE,GAAG,SAAS,cAAc;YACtC,KAAK,EAAE,GAAG,SAAS,SAAS;YAC5B,WAAW,EAAE,GAAG,SAAS,eAAe;YACxC,SAAS,EAAE,GAAG,SAAS,aAAa;YACpC,IAAI,EAAE,GAAG,SAAS,QAAQ;YAC1B,UAAU,EAAE,GAAG,SAAS,cAAc;YACtC,QAAQ,EAAE,GAAG,SAAS,YAAY;SACnC,CAAC,CAAC;IACL,CAAC;IACD,OAAO,EAAE,CAAC;AACZ,CAAC,CAAC"}

View File

@@ -0,0 +1,90 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.forwardAsync = forwardAsync;
exports.isAsync = void 0;
exports.isThenable = isThenable;
exports.maybeAsync = maybeAsync;
exports.waitFor = exports.onFirstPause = void 0;
function _gensync() {
const data = require("gensync");
_gensync = function () {
return data;
};
return data;
}
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
const runGenerator = _gensync()(function* (item) {
return yield* item;
});
const isAsync = exports.isAsync = _gensync()({
sync: () => false,
errback: cb => cb(null, true)
});
function maybeAsync(fn, message) {
return _gensync()({
sync(...args) {
const result = fn.apply(this, args);
if (isThenable(result)) throw new Error(message);
return result;
},
async(...args) {
return Promise.resolve(fn.apply(this, args));
}
});
}
const withKind = _gensync()({
sync: cb => cb("sync"),
async: function () {
var _ref = _asyncToGenerator(function* (cb) {
return cb("async");
});
return function async(_x) {
return _ref.apply(this, arguments);
};
}()
});
function forwardAsync(action, cb) {
const g = _gensync()(action);
return withKind(kind => {
const adapted = g[kind];
return cb(adapted);
});
}
const onFirstPause = exports.onFirstPause = _gensync()({
name: "onFirstPause",
arity: 2,
sync: function (item) {
return runGenerator.sync(item);
},
errback: function (item, firstPause, cb) {
let completed = false;
runGenerator.errback(item, (err, value) => {
completed = true;
cb(err, value);
});
if (!completed) {
firstPause();
}
}
});
const waitFor = exports.waitFor = _gensync()({
sync: x => x,
async: function () {
var _ref2 = _asyncToGenerator(function* (x) {
return x;
});
return function async(_x2) {
return _ref2.apply(this, arguments);
};
}()
});
function isThenable(val) {
return !!val && (typeof val === "object" || typeof val === "function") && !!val.then && typeof val.then === "function";
}
0 && 0;
//# sourceMappingURL=async.js.map

View File

@@ -0,0 +1,920 @@
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
import { isAnonymous, isInstruction } from "@webassemblyjs/ast";
import Long from "@xtuc/long";
var compact = false;
var space = " ";
var quote = function quote(str) {
return "\"".concat(str, "\"");
};
function indent(nb) {
return Array(nb).fill(space + space).join("");
} // TODO(sven): allow arbitrary ast nodes
export function print(n) {
if (n.type === "Program") {
return printProgram(n, 0);
} else {
throw new Error("Unsupported node in print of type: " + String(n.type));
}
}
function printProgram(n, depth) {
return n.body.reduce(function (acc, child) {
if (child.type === "Module") {
acc += printModule(child, depth + 1);
}
if (child.type === "Func") {
acc += printFunc(child, depth + 1);
}
if (child.type === "BlockComment") {
acc += printBlockComment(child);
}
if (child.type === "LeadingComment") {
acc += printLeadingComment(child);
}
if (compact === false) {
acc += "\n";
}
return acc;
}, "");
}
function printTypeInstruction(n) {
var out = "";
out += "(";
out += "type";
out += space;
if (n.id != null) {
out += printIndex(n.id);
out += space;
}
out += "(";
out += "func";
n.functype.params.forEach(function (param) {
out += space;
out += "(";
out += "param";
out += space;
out += printFuncParam(param);
out += ")";
});
n.functype.results.forEach(function (result) {
out += space;
out += "(";
out += "result";
out += space;
out += result;
out += ")";
});
out += ")"; // func
out += ")";
return out;
}
function printModule(n, depth) {
var out = "(";
out += "module";
if (typeof n.id === "string") {
out += space;
out += n.id;
}
if (compact === false) {
out += "\n";
} else {
out += space;
}
n.fields.forEach(function (field) {
if (compact === false) {
out += indent(depth);
}
switch (field.type) {
case "Func":
{
out += printFunc(field, depth + 1);
break;
}
case "TypeInstruction":
{
out += printTypeInstruction(field);
break;
}
case "Table":
{
out += printTable(field);
break;
}
case "Global":
{
out += printGlobal(field, depth + 1);
break;
}
case "ModuleExport":
{
out += printModuleExport(field);
break;
}
case "ModuleImport":
{
out += printModuleImport(field);
break;
}
case "Memory":
{
out += printMemory(field);
break;
}
case "BlockComment":
{
out += printBlockComment(field);
break;
}
case "LeadingComment":
{
out += printLeadingComment(field);
break;
}
case "Start":
{
out += printStart(field);
break;
}
case "Elem":
{
out += printElem(field, depth);
break;
}
case "Data":
{
out += printData(field, depth);
break;
}
default:
throw new Error("Unsupported node in printModule: " + String(field.type));
}
if (compact === false) {
out += "\n";
}
});
out += ")";
return out;
}
function printData(n, depth) {
var out = "";
out += "(";
out += "data";
out += space;
out += printIndex(n.memoryIndex);
out += space;
out += printInstruction(n.offset, depth);
out += space;
out += '"';
n.init.values.forEach(function (_byte) {
// Avoid non-displayable characters
if (_byte <= 31 || _byte == 34 || _byte == 92 || _byte >= 127) {
out += "\\";
out += ("00" + _byte.toString(16)).substr(-2);
} else if (_byte > 255) {
throw new Error("Unsupported byte in data segment: " + _byte);
} else {
out += String.fromCharCode(_byte);
}
});
out += '"';
out += ")";
return out;
}
function printElem(n, depth) {
var out = "";
out += "(";
out += "elem";
out += space;
out += printIndex(n.table);
var _n$offset = _slicedToArray(n.offset, 1),
firstOffset = _n$offset[0];
out += space;
out += "(";
out += "offset";
out += space;
out += printInstruction(firstOffset, depth);
out += ")";
n.funcs.forEach(function (func) {
out += space;
out += printIndex(func);
});
out += ")";
return out;
}
function printStart(n) {
var out = "";
out += "(";
out += "start";
out += space;
out += printIndex(n.index);
out += ")";
return out;
}
function printLeadingComment(n) {
// Don't print leading comments in compact mode
if (compact === true) {
return "";
}
var out = "";
out += ";;";
out += n.value;
out += "\n";
return out;
}
function printBlockComment(n) {
// Don't print block comments in compact mode
if (compact === true) {
return "";
}
var out = "";
out += "(;";
out += n.value;
out += ";)";
out += "\n";
return out;
}
function printSignature(n) {
var out = "";
n.params.forEach(function (param) {
out += space;
out += "(";
out += "param";
out += space;
out += printFuncParam(param);
out += ")";
});
n.results.forEach(function (result) {
out += space;
out += "(";
out += "result";
out += space;
out += result;
out += ")";
});
return out;
}
function printModuleImportDescr(n) {
var out = "";
if (n.type === "FuncImportDescr") {
out += "(";
out += "func";
if (isAnonymous(n.id) === false) {
out += space;
out += printIdentifier(n.id);
}
out += printSignature(n.signature);
out += ")";
}
if (n.type === "GlobalType") {
out += "(";
out += "global";
out += space;
out += printGlobalType(n);
out += ")";
}
if (n.type === "Table") {
out += printTable(n);
}
return out;
}
function printModuleImport(n) {
var out = "";
out += "(";
out += "import";
out += space;
out += quote(n.module);
out += space;
out += quote(n.name);
out += space;
out += printModuleImportDescr(n.descr);
out += ")";
return out;
}
function printGlobalType(n) {
var out = "";
if (n.mutability === "var") {
out += "(";
out += "mut";
out += space;
out += n.valtype;
out += ")";
} else {
out += n.valtype;
}
return out;
}
function printGlobal(n, depth) {
var out = "";
out += "(";
out += "global";
out += space;
if (n.name != null && isAnonymous(n.name) === false) {
out += printIdentifier(n.name);
out += space;
}
out += printGlobalType(n.globalType);
out += space;
n.init.forEach(function (i) {
out += printInstruction(i, depth + 1);
});
out += ")";
return out;
}
function printTable(n) {
var out = "";
out += "(";
out += "table";
out += space;
if (n.name != null && isAnonymous(n.name) === false) {
out += printIdentifier(n.name);
out += space;
}
out += printLimit(n.limits);
out += space;
out += n.elementType;
out += ")";
return out;
}
function printFuncParam(n) {
var out = "";
if (typeof n.id === "string") {
out += "$" + n.id;
out += space;
}
out += n.valtype;
return out;
}
function printFunc(n, depth) {
var out = "";
out += "(";
out += "func";
if (n.name != null) {
if (n.name.type === "Identifier" && isAnonymous(n.name) === false) {
out += space;
out += printIdentifier(n.name);
}
}
if (n.signature.type === "Signature") {
out += printSignature(n.signature);
} else {
var index = n.signature;
out += space;
out += "(";
out += "type";
out += space;
out += printIndex(index);
out += ")";
}
if (n.body.length > 0) {
// func is empty since we ignore the default end instruction
if (n.body.length === 1 && n.body[0].id === "end") {
out += ")";
return out;
}
if (compact === false) {
out += "\n";
}
n.body.forEach(function (i) {
if (i.id !== "end") {
out += indent(depth);
out += printInstruction(i, depth);
if (compact === false) {
out += "\n";
}
}
});
out += indent(depth - 1) + ")";
} else {
out += ")";
}
return out;
}
function printInstruction(n, depth) {
switch (n.type) {
case "Instr":
// $FlowIgnore
return printGenericInstruction(n, depth + 1);
case "BlockInstruction":
// $FlowIgnore
return printBlockInstruction(n, depth + 1);
case "IfInstruction":
// $FlowIgnore
return printIfInstruction(n, depth + 1);
case "CallInstruction":
// $FlowIgnore
return printCallInstruction(n, depth + 1);
case "CallIndirectInstruction":
// $FlowIgnore
return printCallIndirectIntruction(n, depth + 1);
case "LoopInstruction":
// $FlowIgnore
return printLoopInstruction(n, depth + 1);
default:
throw new Error("Unsupported instruction: " + JSON.stringify(n.type));
}
}
function printCallIndirectIntruction(n, depth) {
var out = "";
out += "(";
out += "call_indirect";
if (n.signature.type === "Signature") {
out += printSignature(n.signature);
} else if (n.signature.type === "Identifier") {
out += space;
out += "(";
out += "type";
out += space;
out += printIdentifier(n.signature);
out += ")";
} else {
throw new Error("CallIndirectInstruction: unsupported signature " + JSON.stringify(n.signature.type));
}
out += space;
if (n.intrs != null) {
// $FlowIgnore
n.intrs.forEach(function (i, index) {
// $FlowIgnore
out += printInstruction(i, depth + 1); // $FlowIgnore
if (index !== n.intrs.length - 1) {
out += space;
}
});
}
out += ")";
return out;
}
function printLoopInstruction(n, depth) {
var out = "";
out += "(";
out += "loop";
if (n.label != null && isAnonymous(n.label) === false) {
out += space;
out += printIdentifier(n.label);
}
if (typeof n.resulttype === "string") {
out += space;
out += "(";
out += "result";
out += space;
out += n.resulttype;
out += ")";
}
if (n.instr.length > 0) {
n.instr.forEach(function (e) {
if (compact === false) {
out += "\n";
}
out += indent(depth);
out += printInstruction(e, depth + 1);
});
if (compact === false) {
out += "\n";
out += indent(depth - 1);
}
}
out += ")";
return out;
}
function printCallInstruction(n, depth) {
var out = "";
out += "(";
out += "call";
out += space;
out += printIndex(n.index);
if (_typeof(n.instrArgs) === "object") {
// $FlowIgnore
n.instrArgs.forEach(function (arg) {
out += space;
out += printFuncInstructionArg(arg, depth + 1);
});
}
out += ")";
return out;
}
function printIfInstruction(n, depth) {
var out = "";
out += "(";
out += "if";
if (n.testLabel != null && isAnonymous(n.testLabel) === false) {
out += space;
out += printIdentifier(n.testLabel);
}
if (typeof n.result === "string") {
out += space;
out += "(";
out += "result";
out += space;
out += n.result;
out += ")";
}
if (n.test.length > 0) {
out += space;
n.test.forEach(function (i) {
out += printInstruction(i, depth + 1);
});
}
if (n.consequent.length > 0) {
if (compact === false) {
out += "\n";
}
out += indent(depth);
out += "(";
out += "then";
depth++;
n.consequent.forEach(function (i) {
if (compact === false) {
out += "\n";
}
out += indent(depth);
out += printInstruction(i, depth + 1);
});
depth--;
if (compact === false) {
out += "\n";
out += indent(depth);
}
out += ")";
} else {
if (compact === false) {
out += "\n";
out += indent(depth);
}
out += "(";
out += "then";
out += ")";
}
if (n.alternate.length > 0) {
if (compact === false) {
out += "\n";
}
out += indent(depth);
out += "(";
out += "else";
depth++;
n.alternate.forEach(function (i) {
if (compact === false) {
out += "\n";
}
out += indent(depth);
out += printInstruction(i, depth + 1);
});
depth--;
if (compact === false) {
out += "\n";
out += indent(depth);
}
out += ")";
} else {
if (compact === false) {
out += "\n";
out += indent(depth);
}
out += "(";
out += "else";
out += ")";
}
if (compact === false) {
out += "\n";
out += indent(depth - 1);
}
out += ")";
return out;
}
function printBlockInstruction(n, depth) {
var out = "";
out += "(";
out += "block";
if (n.label != null && isAnonymous(n.label) === false) {
out += space;
out += printIdentifier(n.label);
}
if (typeof n.result === "string") {
out += space;
out += "(";
out += "result";
out += space;
out += n.result;
out += ")";
}
if (n.instr.length > 0) {
n.instr.forEach(function (i) {
if (compact === false) {
out += "\n";
}
out += indent(depth);
out += printInstruction(i, depth + 1);
});
if (compact === false) {
out += "\n";
}
out += indent(depth - 1);
out += ")";
} else {
out += ")";
}
return out;
}
function printGenericInstruction(n, depth) {
var out = "";
out += "(";
if (typeof n.object === "string") {
out += n.object;
out += ".";
}
out += n.id;
n.args.forEach(function (arg) {
out += space;
out += printFuncInstructionArg(arg, depth + 1);
});
if (n.namedArgs !== undefined) {
for (var key in n.namedArgs) {
out += space + key + "=";
out += printFuncInstructionArg(n.namedArgs[key], depth + 1);
}
}
out += ")";
return out;
}
function printLongNumberLiteral(n) {
if (typeof n.raw === "string") {
return n.raw;
}
var _n$value = n.value,
low = _n$value.low,
high = _n$value.high;
var v = new Long(low, high);
return v.toString();
}
function printFloatLiteral(n) {
if (typeof n.raw === "string") {
return n.raw;
}
return String(n.value);
}
function printFuncInstructionArg(n, depth) {
var out = "";
if (n.type === "NumberLiteral") {
out += printNumberLiteral(n);
}
if (n.type === "LongNumberLiteral") {
out += printLongNumberLiteral(n);
}
if (n.type === "Identifier" && isAnonymous(n) === false) {
out += printIdentifier(n);
}
if (n.type === "ValtypeLiteral") {
out += n.name;
}
if (n.type === "FloatLiteral") {
out += printFloatLiteral(n);
}
if (isInstruction(n)) {
out += printInstruction(n, depth + 1);
}
return out;
}
function printNumberLiteral(n) {
if (typeof n.raw === "string") {
return n.raw;
}
return String(n.value);
}
function printModuleExport(n) {
var out = "";
out += "(";
out += "export";
out += space;
out += quote(n.name);
if (n.descr.exportType === "Func") {
out += space;
out += "(";
out += "func";
out += space;
out += printIndex(n.descr.id);
out += ")";
} else if (n.descr.exportType === "Global") {
out += space;
out += "(";
out += "global";
out += space;
out += printIndex(n.descr.id);
out += ")";
} else if (n.descr.exportType === "Memory") {
out += space;
out += "(";
out += "memory";
out += space;
out += printIndex(n.descr.id);
out += ")";
} else if (n.descr.exportType === "Table") {
out += space;
out += "(";
out += "table";
out += space;
out += printIndex(n.descr.id);
out += ")";
} else {
throw new Error("printModuleExport: unknown type: " + n.descr.exportType);
}
out += ")";
return out;
}
function printIdentifier(n) {
return "$" + n.value;
}
function printIndex(n) {
if (n.type === "Identifier") {
return printIdentifier(n);
} else if (n.type === "NumberLiteral") {
return printNumberLiteral(n);
} else {
throw new Error("Unsupported index: " + n.type);
}
}
function printMemory(n) {
var out = "";
out += "(";
out += "memory";
if (n.id != null) {
out += space;
out += printIndex(n.id);
out += space;
}
out += printLimit(n.limits);
out += ")";
return out;
}
function printLimit(n) {
var out = "";
out += n.min + "";
if (n.max != null) {
out += space;
out += String(n.max);
if (n.shared === true) {
out += " shared";
}
}
return out;
}

View File

@@ -0,0 +1,5 @@
import { GraphQLScalarType, GraphQLScalarTypeConfig } from 'graphql';
export type ISO8601Duration = string;
export declare const GraphQLDurationConfig: GraphQLScalarTypeConfig<string, string>;
export declare const GraphQLISO8601Duration: GraphQLScalarType<string, string>;
export declare const GraphQLDuration: GraphQLScalarType<string, string>;

View File

@@ -0,0 +1,21 @@
/**
* @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 Bitcoin = createLucideIcon("Bitcoin", [
[
"path",
{
d: "M11.767 19.089c4.924.868 6.14-6.025 1.216-6.894m-1.216 6.894L5.86 18.047m5.908 1.042-.347 1.97m1.563-8.864c4.924.869 6.14-6.025 1.215-6.893m-1.215 6.893-3.94-.694m5.155-6.2L8.29 4.26m5.908 1.042.348-1.97M7.48 20.364l3.126-17.727",
key: "yr8idg"
}
]
]);
export { Bitcoin as default };
//# sourceMappingURL=bitcoin.js.map

View File

@@ -0,0 +1,29 @@
import { formatDistance } from "./pt/_lib/formatDistance.mjs";
import { formatLong } from "./pt/_lib/formatLong.mjs";
import { formatRelative } from "./pt/_lib/formatRelative.mjs";
import { localize } from "./pt/_lib/localize.mjs";
import { match } from "./pt/_lib/match.mjs";
/**
* @category Locales
* @summary Portuguese locale.
* @language Portuguese
* @iso-639-2 por
* @author Dário Freire [@dfreire](https://github.com/dfreire)
* @author Adrián de la Rosa [@adrm](https://github.com/adrm)
*/
export const pt = {
code: "pt",
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
options: {
weekStartsOn: 1 /* Monday */,
firstWeekContainsDate: 4,
},
};
// Fallback for modularized imports:
export default pt;

View File

@@ -0,0 +1,364 @@
import { devAssert } from '../jsutils/devAssert.mjs';
import { inspect } from '../jsutils/inspect.mjs';
import { isObjectLike } from '../jsutils/isObjectLike.mjs';
import { keyValMap } from '../jsutils/keyValMap.mjs';
import { parseValue } from '../language/parser.mjs';
import {
assertInterfaceType,
assertNullableType,
assertObjectType,
GraphQLEnumType,
GraphQLInputObjectType,
GraphQLInterfaceType,
GraphQLList,
GraphQLNonNull,
GraphQLObjectType,
GraphQLScalarType,
GraphQLUnionType,
isInputType,
isOutputType,
} from '../type/definition.mjs';
import { GraphQLDirective } from '../type/directives.mjs';
import { introspectionTypes, TypeKind } from '../type/introspection.mjs';
import { specifiedScalarTypes } from '../type/scalars.mjs';
import { GraphQLSchema } from '../type/schema.mjs';
import { valueFromAST } from './valueFromAST.mjs';
/**
* Build a GraphQLSchema for use by client tools.
*
* Given the result of a client running the introspection query, creates and
* returns a GraphQLSchema instance which can be then used with all graphql-js
* tools, but cannot be used to execute a query, as introspection does not
* represent the "resolver", "parse" or "serialize" functions or any other
* server-internal mechanisms.
*
* This function expects a complete introspection result. Don't forget to check
* the "errors" field of a server response before calling this function.
*/
export function buildClientSchema(introspection, options) {
(isObjectLike(introspection) && isObjectLike(introspection.__schema)) ||
devAssert(
false,
`Invalid or incomplete introspection result. Ensure that you are passing "data" property of introspection response and no "errors" was returned alongside: ${inspect(
introspection,
)}.`,
); // Get the schema from the introspection result.
const schemaIntrospection = introspection.__schema; // Iterate through all types, getting the type definition for each.
const typeMap = keyValMap(
schemaIntrospection.types,
(typeIntrospection) => typeIntrospection.name,
(typeIntrospection) => buildType(typeIntrospection),
); // Include standard types only if they are used.
for (const stdType of [...specifiedScalarTypes, ...introspectionTypes]) {
if (typeMap[stdType.name]) {
typeMap[stdType.name] = stdType;
}
} // Get the root Query, Mutation, and Subscription types.
const queryType = schemaIntrospection.queryType
? getObjectType(schemaIntrospection.queryType)
: null;
const mutationType = schemaIntrospection.mutationType
? getObjectType(schemaIntrospection.mutationType)
: null;
const subscriptionType = schemaIntrospection.subscriptionType
? getObjectType(schemaIntrospection.subscriptionType)
: null; // Get the directives supported by Introspection, assuming empty-set if
// directives were not queried for.
const directives = schemaIntrospection.directives
? schemaIntrospection.directives.map(buildDirective)
: []; // Then produce and return a Schema with these types.
return new GraphQLSchema({
description: schemaIntrospection.description,
query: queryType,
mutation: mutationType,
subscription: subscriptionType,
types: Object.values(typeMap),
directives,
assumeValid:
options === null || options === void 0 ? void 0 : options.assumeValid,
}); // Given a type reference in introspection, return the GraphQLType instance.
// preferring cached instances before building new instances.
function getType(typeRef) {
if (typeRef.kind === TypeKind.LIST) {
const itemRef = typeRef.ofType;
if (!itemRef) {
throw new Error('Decorated type deeper than introspection query.');
}
return new GraphQLList(getType(itemRef));
}
if (typeRef.kind === TypeKind.NON_NULL) {
const nullableRef = typeRef.ofType;
if (!nullableRef) {
throw new Error('Decorated type deeper than introspection query.');
}
const nullableType = getType(nullableRef);
return new GraphQLNonNull(assertNullableType(nullableType));
}
return getNamedType(typeRef);
}
function getNamedType(typeRef) {
const typeName = typeRef.name;
if (!typeName) {
throw new Error(`Unknown type reference: ${inspect(typeRef)}.`);
}
const type = typeMap[typeName];
if (!type) {
throw new Error(
`Invalid or incomplete schema, unknown type: ${typeName}. Ensure that a full introspection query is used in order to build a client schema.`,
);
}
return type;
}
function getObjectType(typeRef) {
return assertObjectType(getNamedType(typeRef));
}
function getInterfaceType(typeRef) {
return assertInterfaceType(getNamedType(typeRef));
} // Given a type's introspection result, construct the correct
// GraphQLType instance.
function buildType(type) {
// eslint-disable-next-line @typescript-eslint/prefer-optional-chain
if (type != null && type.name != null && type.kind != null) {
// FIXME: Properly type IntrospectionType, it's a breaking change so fix in v17
// eslint-disable-next-line @typescript-eslint/switch-exhaustiveness-check
switch (type.kind) {
case TypeKind.SCALAR:
return buildScalarDef(type);
case TypeKind.OBJECT:
return buildObjectDef(type);
case TypeKind.INTERFACE:
return buildInterfaceDef(type);
case TypeKind.UNION:
return buildUnionDef(type);
case TypeKind.ENUM:
return buildEnumDef(type);
case TypeKind.INPUT_OBJECT:
return buildInputObjectDef(type);
}
}
const typeStr = inspect(type);
throw new Error(
`Invalid or incomplete introspection result. Ensure that a full introspection query is used in order to build a client schema: ${typeStr}.`,
);
}
function buildScalarDef(scalarIntrospection) {
return new GraphQLScalarType({
name: scalarIntrospection.name,
description: scalarIntrospection.description,
specifiedByURL: scalarIntrospection.specifiedByURL,
});
}
function buildImplementationsList(implementingIntrospection) {
// TODO: Temporary workaround until GraphQL ecosystem will fully support
// 'interfaces' on interface types.
if (
implementingIntrospection.interfaces === null &&
implementingIntrospection.kind === TypeKind.INTERFACE
) {
return [];
}
if (!implementingIntrospection.interfaces) {
const implementingIntrospectionStr = inspect(implementingIntrospection);
throw new Error(
`Introspection result missing interfaces: ${implementingIntrospectionStr}.`,
);
}
return implementingIntrospection.interfaces.map(getInterfaceType);
}
function buildObjectDef(objectIntrospection) {
return new GraphQLObjectType({
name: objectIntrospection.name,
description: objectIntrospection.description,
interfaces: () => buildImplementationsList(objectIntrospection),
fields: () => buildFieldDefMap(objectIntrospection),
});
}
function buildInterfaceDef(interfaceIntrospection) {
return new GraphQLInterfaceType({
name: interfaceIntrospection.name,
description: interfaceIntrospection.description,
interfaces: () => buildImplementationsList(interfaceIntrospection),
fields: () => buildFieldDefMap(interfaceIntrospection),
});
}
function buildUnionDef(unionIntrospection) {
if (!unionIntrospection.possibleTypes) {
const unionIntrospectionStr = inspect(unionIntrospection);
throw new Error(
`Introspection result missing possibleTypes: ${unionIntrospectionStr}.`,
);
}
return new GraphQLUnionType({
name: unionIntrospection.name,
description: unionIntrospection.description,
types: () => unionIntrospection.possibleTypes.map(getObjectType),
});
}
function buildEnumDef(enumIntrospection) {
if (!enumIntrospection.enumValues) {
const enumIntrospectionStr = inspect(enumIntrospection);
throw new Error(
`Introspection result missing enumValues: ${enumIntrospectionStr}.`,
);
}
return new GraphQLEnumType({
name: enumIntrospection.name,
description: enumIntrospection.description,
values: keyValMap(
enumIntrospection.enumValues,
(valueIntrospection) => valueIntrospection.name,
(valueIntrospection) => ({
description: valueIntrospection.description,
deprecationReason: valueIntrospection.deprecationReason,
}),
),
});
}
function buildInputObjectDef(inputObjectIntrospection) {
if (!inputObjectIntrospection.inputFields) {
const inputObjectIntrospectionStr = inspect(inputObjectIntrospection);
throw new Error(
`Introspection result missing inputFields: ${inputObjectIntrospectionStr}.`,
);
}
return new GraphQLInputObjectType({
name: inputObjectIntrospection.name,
description: inputObjectIntrospection.description,
fields: () => buildInputValueDefMap(inputObjectIntrospection.inputFields),
isOneOf: inputObjectIntrospection.isOneOf,
});
}
function buildFieldDefMap(typeIntrospection) {
if (!typeIntrospection.fields) {
throw new Error(
`Introspection result missing fields: ${inspect(typeIntrospection)}.`,
);
}
return keyValMap(
typeIntrospection.fields,
(fieldIntrospection) => fieldIntrospection.name,
buildField,
);
}
function buildField(fieldIntrospection) {
const type = getType(fieldIntrospection.type);
if (!isOutputType(type)) {
const typeStr = inspect(type);
throw new Error(
`Introspection must provide output type for fields, but received: ${typeStr}.`,
);
}
if (!fieldIntrospection.args) {
const fieldIntrospectionStr = inspect(fieldIntrospection);
throw new Error(
`Introspection result missing field args: ${fieldIntrospectionStr}.`,
);
}
return {
description: fieldIntrospection.description,
deprecationReason: fieldIntrospection.deprecationReason,
type,
args: buildInputValueDefMap(fieldIntrospection.args),
};
}
function buildInputValueDefMap(inputValueIntrospections) {
return keyValMap(
inputValueIntrospections,
(inputValue) => inputValue.name,
buildInputValue,
);
}
function buildInputValue(inputValueIntrospection) {
const type = getType(inputValueIntrospection.type);
if (!isInputType(type)) {
const typeStr = inspect(type);
throw new Error(
`Introspection must provide input type for arguments, but received: ${typeStr}.`,
);
}
const defaultValue =
inputValueIntrospection.defaultValue != null
? valueFromAST(parseValue(inputValueIntrospection.defaultValue), type)
: undefined;
return {
description: inputValueIntrospection.description,
type,
defaultValue,
deprecationReason: inputValueIntrospection.deprecationReason,
};
}
function buildDirective(directiveIntrospection) {
if (!directiveIntrospection.args) {
const directiveIntrospectionStr = inspect(directiveIntrospection);
throw new Error(
`Introspection result missing directive args: ${directiveIntrospectionStr}.`,
);
}
if (!directiveIntrospection.locations) {
const directiveIntrospectionStr = inspect(directiveIntrospection);
throw new Error(
`Introspection result missing directive locations: ${directiveIntrospectionStr}.`,
);
}
return new GraphQLDirective({
name: directiveIntrospection.name,
description: directiveIntrospection.description,
isRepeatable: directiveIntrospection.isRepeatable,
locations: directiveIntrospection.locations.slice(),
args: buildInputValueDefMap(directiveIntrospection.args),
});
}
}

View File

@@ -0,0 +1,237 @@
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true,
});
exports.Token =
exports.QueryDocumentKeys =
exports.OperationTypeNode =
exports.Location =
void 0;
exports.isNode = isNode;
/**
* Contains a range of UTF-8 character offsets and token references that
* identify the region of the source from which the AST derived.
*/
class Location {
/**
* The character offset at which this Node begins.
*/
/**
* The character offset at which this Node ends.
*/
/**
* The Token at which this Node begins.
*/
/**
* The Token at which this Node ends.
*/
/**
* The Source document the AST represents.
*/
constructor(startToken, endToken, source) {
this.start = startToken.start;
this.end = endToken.end;
this.startToken = startToken;
this.endToken = endToken;
this.source = source;
}
get [Symbol.toStringTag]() {
return 'Location';
}
toJSON() {
return {
start: this.start,
end: this.end,
};
}
}
/**
* Represents a range of characters represented by a lexical token
* within a Source.
*/
exports.Location = Location;
class Token {
/**
* The kind of Token.
*/
/**
* The character offset at which this Node begins.
*/
/**
* The character offset at which this Node ends.
*/
/**
* The 1-indexed line number on which this Token appears.
*/
/**
* The 1-indexed column number at which this Token begins.
*/
/**
* For non-punctuation tokens, represents the interpreted value of the token.
*
* Note: is undefined for punctuation tokens, but typed as string for
* convenience in the parser.
*/
/**
* Tokens exist as nodes in a double-linked-list amongst all tokens
* including ignored tokens. <SOF> is always the first node and <EOF>
* the last.
*/
constructor(kind, start, end, line, column, value) {
this.kind = kind;
this.start = start;
this.end = end;
this.line = line;
this.column = column; // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
this.value = value;
this.prev = null;
this.next = null;
}
get [Symbol.toStringTag]() {
return 'Token';
}
toJSON() {
return {
kind: this.kind,
value: this.value,
line: this.line,
column: this.column,
};
}
}
/**
* The list of all possible AST node types.
*/
exports.Token = Token;
/**
* @internal
*/
const QueryDocumentKeys = {
Name: [],
Document: ['definitions'],
OperationDefinition: [
'description',
'name',
'variableDefinitions',
'directives',
'selectionSet',
],
VariableDefinition: [
'description',
'variable',
'type',
'defaultValue',
'directives',
],
Variable: ['name'],
SelectionSet: ['selections'],
Field: ['alias', 'name', 'arguments', 'directives', 'selectionSet'],
Argument: ['name', 'value'],
FragmentSpread: ['name', 'directives'],
InlineFragment: ['typeCondition', 'directives', 'selectionSet'],
FragmentDefinition: [
'description',
'name', // Note: fragment variable definitions are deprecated and will removed in v17.0.0
'variableDefinitions',
'typeCondition',
'directives',
'selectionSet',
],
IntValue: [],
FloatValue: [],
StringValue: [],
BooleanValue: [],
NullValue: [],
EnumValue: [],
ListValue: ['values'],
ObjectValue: ['fields'],
ObjectField: ['name', 'value'],
Directive: ['name', 'arguments'],
NamedType: ['name'],
ListType: ['type'],
NonNullType: ['type'],
SchemaDefinition: ['description', 'directives', 'operationTypes'],
OperationTypeDefinition: ['type'],
ScalarTypeDefinition: ['description', 'name', 'directives'],
ObjectTypeDefinition: [
'description',
'name',
'interfaces',
'directives',
'fields',
],
FieldDefinition: ['description', 'name', 'arguments', 'type', 'directives'],
InputValueDefinition: [
'description',
'name',
'type',
'defaultValue',
'directives',
],
InterfaceTypeDefinition: [
'description',
'name',
'interfaces',
'directives',
'fields',
],
UnionTypeDefinition: ['description', 'name', 'directives', 'types'],
EnumTypeDefinition: ['description', 'name', 'directives', 'values'],
EnumValueDefinition: ['description', 'name', 'directives'],
InputObjectTypeDefinition: ['description', 'name', 'directives', 'fields'],
DirectiveDefinition: ['description', 'name', 'arguments', 'locations'],
SchemaExtension: ['directives', 'operationTypes'],
ScalarTypeExtension: ['name', 'directives'],
ObjectTypeExtension: ['name', 'interfaces', 'directives', 'fields'],
InterfaceTypeExtension: ['name', 'interfaces', 'directives', 'fields'],
UnionTypeExtension: ['name', 'directives', 'types'],
EnumTypeExtension: ['name', 'directives', 'values'],
InputObjectTypeExtension: ['name', 'directives', 'fields'],
TypeCoordinate: ['name'],
MemberCoordinate: ['name', 'memberName'],
ArgumentCoordinate: ['name', 'fieldName', 'argumentName'],
DirectiveCoordinate: ['name'],
DirectiveArgumentCoordinate: ['name', 'argumentName'],
};
exports.QueryDocumentKeys = QueryDocumentKeys;
const kindValues = new Set(Object.keys(QueryDocumentKeys));
/**
* @internal
*/
function isNode(maybeNode) {
const maybeKind =
maybeNode === null || maybeNode === void 0 ? void 0 : maybeNode.kind;
return typeof maybeKind === 'string' && kindValues.has(maybeKind);
}
/** Name */
var OperationTypeNode;
exports.OperationTypeNode = OperationTypeNode;
(function (OperationTypeNode) {
OperationTypeNode['QUERY'] = 'query';
OperationTypeNode['MUTATION'] = 'mutation';
OperationTypeNode['SUBSCRIPTION'] = 'subscription';
})(OperationTypeNode || (exports.OperationTypeNode = OperationTypeNode = {}));

View File

@@ -0,0 +1 @@
{"version":3,"file":"external-link.js","sources":["../../../src/icons/external-link.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ExternalLink\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTUgM2g2djYiIC8+CiAgPHBhdGggZD0iTTEwIDE0IDIxIDMiIC8+CiAgPHBhdGggZD0iTTE4IDEzdjZhMiAyIDAgMCAxLTIgMkg1YTIgMiAwIDAgMS0yLTJWOGEyIDIgMCAwIDEgMi0yaDYiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/external-link\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst ExternalLink = createLucideIcon('ExternalLink', [\n ['path', { d: 'M15 3h6v6', key: '1q9fwt' }],\n ['path', { d: 'M10 14 21 3', key: 'gplh6r' }],\n ['path', { d: 'M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6', key: 'a6xqqp' }],\n]);\n\nexport default ExternalLink;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAe,iBAAiB,cAAgB,CAAA,CAAA,CAAA;AAAA,CAAA,CACpD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAe,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC5C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA4D,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3F,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,19 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Stethoscope = createLucideIcon("Stethoscope", [
["path", { d: "M11 2v2", key: "1539x4" }],
["path", { d: "M5 2v2", key: "1yf1q8" }],
["path", { d: "M5 3H4a2 2 0 0 0-2 2v4a6 6 0 0 0 12 0V5a2 2 0 0 0-2-2h-1", key: "rb5t3r" }],
["path", { d: "M8 15a6 6 0 0 0 12 0v-3", key: "x18d4x" }],
["circle", { cx: "20", cy: "10", r: "2", key: "ts1r5v" }]
]);
export { Stethoscope as default };
//# sourceMappingURL=stethoscope.js.map

View File

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

View File

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

View File

@@ -0,0 +1,22 @@
/**
* @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 ShieldMinus = createLucideIcon("ShieldMinus", [
[
"path",
{
d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",
key: "oel41y"
}
],
["path", { d: "M9 12h6", key: "1c52cq" }]
]);
export { ShieldMinus as default };
//# sourceMappingURL=shield-minus.js.map

View File

@@ -0,0 +1,29 @@
import { DirectusFolder } from "../../../schema/folder.js";
import { NestedPartial } from "../../../types/utils.js";
import { ApplyQueryFields } from "../../../types/output.js";
import { Query } from "../../../types/query.js";
import { RestCommand } from "../../types.js";
//#region src/rest/commands/create/folders.d.ts
type CreateFolderOutput<Schema, TQuery extends Query<Schema, Item>, Item extends object = DirectusFolder<Schema>> = ApplyQueryFields<Schema, Item, TQuery['fields']>;
/**
* Create multiple new (virtual) folders.
*
* @param item The folder to create
* @param query Optional return data query
*
* @returns Returns the folder object of the folder that was created.
*/
declare const createFolders: <Schema, const TQuery extends Query<Schema, DirectusFolder<Schema>>>(items: NestedPartial<DirectusFolder<Schema>>[], query?: TQuery) => RestCommand<CreateFolderOutput<Schema, TQuery>[], Schema>;
/**
* Create a new (virtual) folder.
*
* @param item The folder to create
* @param query Optional return data query
*
* @returns Returns the folder object of the folder that was created.
*/
declare const createFolder: <Schema, const TQuery extends Query<Schema, DirectusFolder<Schema>>>(item: NestedPartial<DirectusFolder<Schema>>, query?: TQuery) => RestCommand<CreateFolderOutput<Schema, TQuery>, Schema>;
//#endregion
export { CreateFolderOutput, createFolder, createFolders };
//# sourceMappingURL=folders.d.ts.map

View File

@@ -0,0 +1,45 @@
import type { ColumnBuilderBaseConfig } from "../../column-builder.cjs";
import type { ColumnBaseConfig } from "../../column.cjs";
import { entityKind } from "../../entity.cjs";
import { type Writable } from "../../utils.cjs";
import { PgColumn, PgColumnBuilder } from "./common.cjs";
export type PgVarcharBuilderInitial<TName extends string, TEnum extends [string, ...string[]], TLength extends number | undefined> = PgVarcharBuilder<{
name: TName;
dataType: 'string';
columnType: 'PgVarchar';
data: TEnum[number];
driverParam: string;
enumValues: TEnum;
length: TLength;
}>;
export declare class PgVarcharBuilder<T extends ColumnBuilderBaseConfig<'string', 'PgVarchar'> & {
length?: number | undefined;
}> extends PgColumnBuilder<T, {
length: T['length'];
enumValues: T['enumValues'];
}, {
length: T['length'];
}> {
static readonly [entityKind]: string;
constructor(name: T['name'], config: PgVarcharConfig<T['enumValues'], T['length']>);
}
export declare class PgVarchar<T extends ColumnBaseConfig<'string', 'PgVarchar'> & {
length?: number | undefined;
}> extends PgColumn<T, {
length: T['length'];
enumValues: T['enumValues'];
}, {
length: T['length'];
}> {
static readonly [entityKind]: string;
readonly length: T["length"];
readonly enumValues: T["enumValues"];
getSQLType(): string;
}
export interface PgVarcharConfig<TEnum extends readonly string[] | string[] | undefined = readonly string[] | string[] | undefined, TLength extends number | undefined = number | undefined> {
enum?: TEnum;
length?: TLength;
}
export declare function varchar(): PgVarcharBuilderInitial<'', [string, ...string[]], undefined>;
export declare function varchar<U extends string, T extends Readonly<[U, ...U[]]>, L extends number | undefined>(config?: PgVarcharConfig<T | Writable<T>, L>): PgVarcharBuilderInitial<'', Writable<T>, L>;
export declare function varchar<TName extends string, U extends string, T extends Readonly<[U, ...U[]]>, L extends number | undefined>(name: TName, config?: PgVarcharConfig<T | Writable<T>, L>): PgVarcharBuilderInitial<TName, Writable<T>, L>;

View File

@@ -0,0 +1,21 @@
export declare const classes: {
[key: string]: number;
};
export declare const toCodePoints: (str: string) => number[];
export declare const fromCodePoint: (...codePoints: number[]) => string;
export declare const UnicodeTrie: import("utrie").Trie;
export declare const BREAK_NOT_ALLOWED = "\u00D7";
export declare const BREAK_ALLOWED = "\u00F7";
export declare type BREAK_OPPORTUNITIES = typeof BREAK_NOT_ALLOWED | typeof BREAK_ALLOWED;
export declare const codePointToClass: (codePoint: number) => number;
export declare const graphemeBreakAtIndex: (codePoints: number[], index: number) => BREAK_OPPORTUNITIES;
export declare const GraphemeBreaker: (str: string) => {
next: () => {
done: boolean;
value: null;
} | {
value: string;
done: boolean;
};
};
export declare const splitGraphemes: (str: string) => string[];

View File

@@ -0,0 +1,47 @@
import { Breadcrumb } from '@sentry/core';
import { RecordingEvent, ReplayClickDetector, ReplayContainer, SlowClickConfig } from '../types';
import { addBreadcrumbEvent } from './util/addBreadcrumbEvent';
/** Handle a click. */
export declare function handleClick(clickDetector: ReplayClickDetector, clickBreadcrumb: Breadcrumb, node: HTMLElement): void;
/** A click detector class that can be used to detect slow or rage clicks on elements. */
export declare class ClickDetector implements ReplayClickDetector {
protected _lastMutation: number;
protected _lastScroll: number;
private _clicks;
private _teardown;
private _threshold;
private _scrollTimeout;
private _timeout;
private _ignoreSelector;
private _replay;
private _checkClickTimeout?;
private _addBreadcrumbEvent;
constructor(replay: ReplayContainer, slowClickConfig: SlowClickConfig, _addBreadcrumbEvent?: typeof addBreadcrumbEvent);
/** Register click detection handlers on mutation or scroll. */
addListeners(): void;
/** Clean up listeners. */
removeListeners(): void;
/** @inheritDoc */
handleClick(breadcrumb: Breadcrumb, node: HTMLElement): void;
/** @inheritDoc */
registerMutation(timestamp?: number): void;
/** @inheritDoc */
registerScroll(timestamp?: number): void;
/** @inheritDoc */
registerClick(element: HTMLElement): void;
/** Count multiple clicks on elements. */
private _handleMultiClick;
/** Get all pending clicks for a given node. */
private _getClicks;
/** Check the clicks that happened. */
private _checkClicks;
/** Generate matching breadcrumb(s) for the click. */
private _generateBreadcrumbs;
/** Schedule to check current clicks. */
private _scheduleCheckClicks;
}
/** exported for tests only */
export declare function ignoreElement(node: HTMLElement, ignoreSelector: string): boolean;
/** Update the click detector based on a recording event of rrweb. */
export declare function updateClickDetectorForRecordingEvent(clickDetector: ReplayClickDetector, event: RecordingEvent): void;
//# sourceMappingURL=handleClick.d.ts.map

View File

@@ -0,0 +1,37 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.transform = void 0;
exports.transform = {
name: 'transform',
initialValue: 'none',
prefix: true,
type: 0 /* VALUE */,
parse: function (_context, token) {
if (token.type === 20 /* IDENT_TOKEN */ && token.value === 'none') {
return null;
}
if (token.type === 18 /* FUNCTION */) {
var transformFunction = SUPPORTED_TRANSFORM_FUNCTIONS[token.name];
if (typeof transformFunction === 'undefined') {
throw new Error("Attempting to parse an unsupported transform function \"" + token.name + "\"");
}
return transformFunction(token.values);
}
return null;
}
};
var matrix = function (args) {
var values = args.filter(function (arg) { return arg.type === 17 /* NUMBER_TOKEN */; }).map(function (arg) { return arg.number; });
return values.length === 6 ? values : null;
};
// doesn't support 3D transforms at the moment
var matrix3d = function (args) {
var values = args.filter(function (arg) { return arg.type === 17 /* NUMBER_TOKEN */; }).map(function (arg) { return arg.number; });
var a1 = values[0], b1 = values[1], _a = values[2], _b = values[3], a2 = values[4], b2 = values[5], _c = values[6], _d = values[7], _e = values[8], _f = values[9], _g = values[10], _h = values[11], a4 = values[12], b4 = values[13], _j = values[14], _k = values[15];
return values.length === 16 ? [a1, b1, a2, b2, a4, b4] : null;
};
var SUPPORTED_TRANSFORM_FUNCTIONS = {
matrix: matrix,
matrix3d: matrix3d
};
//# sourceMappingURL=transform.js.map

View File

@@ -0,0 +1,213 @@
import { Kind } from '../language/kinds.mjs';
import { isAbstractType } from '../type/definition.mjs';
import {
GraphQLIncludeDirective,
GraphQLSkipDirective,
} from '../type/directives.mjs';
import { typeFromAST } from '../utilities/typeFromAST.mjs';
import { getDirectiveValues } from './values.mjs';
/**
* Given a selectionSet, collects all of the fields and returns them.
*
* CollectFields requires the "runtime type" of an object. For a field that
* returns an Interface or Union type, the "runtime type" will be the actual
* object type returned by that field.
*
* @internal
*/
export function collectFields(
schema,
fragments,
variableValues,
runtimeType,
selectionSet,
) {
const fields = new Map();
collectFieldsImpl(
schema,
fragments,
variableValues,
runtimeType,
selectionSet,
fields,
new Set(),
);
return fields;
}
/**
* Given an array of field nodes, collects all of the subfields of the passed
* in fields, and returns them at the end.
*
* CollectSubFields requires the "return type" of an object. For a field that
* returns an Interface or Union type, the "return type" will be the actual
* object type returned by that field.
*
* @internal
*/
export function collectSubfields(
schema,
fragments,
variableValues,
returnType,
fieldNodes,
) {
const subFieldNodes = new Map();
const visitedFragmentNames = new Set();
for (const node of fieldNodes) {
if (node.selectionSet) {
collectFieldsImpl(
schema,
fragments,
variableValues,
returnType,
node.selectionSet,
subFieldNodes,
visitedFragmentNames,
);
}
}
return subFieldNodes;
}
function collectFieldsImpl(
schema,
fragments,
variableValues,
runtimeType,
selectionSet,
fields,
visitedFragmentNames,
) {
for (const selection of selectionSet.selections) {
switch (selection.kind) {
case Kind.FIELD: {
if (!shouldIncludeNode(variableValues, selection)) {
continue;
}
const name = getFieldEntryKey(selection);
const fieldList = fields.get(name);
if (fieldList !== undefined) {
fieldList.push(selection);
} else {
fields.set(name, [selection]);
}
break;
}
case Kind.INLINE_FRAGMENT: {
if (
!shouldIncludeNode(variableValues, selection) ||
!doesFragmentConditionMatch(schema, selection, runtimeType)
) {
continue;
}
collectFieldsImpl(
schema,
fragments,
variableValues,
runtimeType,
selection.selectionSet,
fields,
visitedFragmentNames,
);
break;
}
case Kind.FRAGMENT_SPREAD: {
const fragName = selection.name.value;
if (
visitedFragmentNames.has(fragName) ||
!shouldIncludeNode(variableValues, selection)
) {
continue;
}
visitedFragmentNames.add(fragName);
const fragment = fragments[fragName];
if (
!fragment ||
!doesFragmentConditionMatch(schema, fragment, runtimeType)
) {
continue;
}
collectFieldsImpl(
schema,
fragments,
variableValues,
runtimeType,
fragment.selectionSet,
fields,
visitedFragmentNames,
);
break;
}
}
}
}
/**
* Determines if a field should be included based on the `@include` and `@skip`
* directives, where `@skip` has higher precedence than `@include`.
*/
function shouldIncludeNode(variableValues, node) {
const skip = getDirectiveValues(GraphQLSkipDirective, node, variableValues);
if ((skip === null || skip === void 0 ? void 0 : skip.if) === true) {
return false;
}
const include = getDirectiveValues(
GraphQLIncludeDirective,
node,
variableValues,
);
if (
(include === null || include === void 0 ? void 0 : include.if) === false
) {
return false;
}
return true;
}
/**
* Determines if a fragment is applicable to the given type.
*/
function doesFragmentConditionMatch(schema, fragment, type) {
const typeConditionNode = fragment.typeCondition;
if (!typeConditionNode) {
return true;
}
const conditionalType = typeFromAST(schema, typeConditionNode);
if (conditionalType === type) {
return true;
}
if (isAbstractType(conditionalType)) {
return schema.isSubType(conditionalType, type);
}
return false;
}
/**
* Implements the logic to compute the key of a given field's entry
*/
function getFieldEntryKey(node) {
return node.alias ? node.alias.value : node.name.value;
}

View File

@@ -0,0 +1,8 @@
//#region src/realtime/utils/generate-uid.d.ts
/**
* Fallback generator function to get increment id's for subscriptions
*/
declare function generateUid(): Generator<string, string, unknown>;
//#endregion
export { generateUid };
//# sourceMappingURL=generate-uid.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"uniqueItemProperties.js","sourceRoot":"","sources":["../../src/definitions/uniqueItemProperties.ts"],"names":[],"mappings":";;AACA,yCAAyC;AAEzC,MAAM,YAAY,GAAG,CAAC,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,CAAC,CAAA;AAEvE,SAAwB,MAAM;IAC5B,OAAO;QACL,OAAO,EAAE,sBAAsB;QAC/B,IAAI,EAAE,OAAO;QACb,UAAU,EAAE,OAAO;QACnB,OAAO,CAAC,IAAc,EAAE,YAA6B;YACnD,MAAM,MAAM,GAAG,aAAa,CAAC,IAAI,EAAE,YAAY,CAAC,CAAA;YAEhD,OAAO,CAAC,IAAI,EAAE,EAAE;gBACd,IAAI,IAAI,CAAC,MAAM,IAAI,CAAC;oBAAE,OAAO,IAAI,CAAA;gBACjC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;oBACpC,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAA;oBACnB,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE;wBACb,MAAM,IAAI,GAAwB,EAAE,CAAA;wBACpC,KAAK,MAAM,CAAC,IAAI,IAAI,EAAE;4BACpB,IAAI,CAAC,CAAC,IAAI,OAAO,CAAC,IAAI,QAAQ;gCAAE,SAAQ;4BACxC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAA;4BACd,IAAI,CAAC,IAAI,OAAO,CAAC,IAAI,QAAQ;gCAAE,SAAQ;4BACvC,IAAI,OAAO,CAAC,IAAI,QAAQ;gCAAE,CAAC,GAAG,GAAG,GAAG,CAAC,CAAA;4BACrC,IAAI,IAAI,CAAC,CAAC,CAAC;gCAAE,OAAO,KAAK,CAAA;4BACzB,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAA;yBACf;qBACF;yBAAM;wBACL,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,GAAI;4BAC/B,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAA;4BACjB,IAAI,CAAC,CAAC,IAAI,OAAO,CAAC,IAAI,QAAQ;gCAAE,SAAQ;4BACxC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,GAAI;gCACrB,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAA;gCACjB,IAAI,CAAC,IAAI,OAAO,CAAC,IAAI,QAAQ,IAAI,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC;oCAAE,OAAO,KAAK,CAAA;6BACrE;yBACF;qBACF;iBACF;gBACD,OAAO,IAAI,CAAA;YACb,CAAC,CAAA;QACH,CAAC;QACD,UAAU,EAAE;YACV,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,EAAC,IAAI,EAAE,QAAQ,EAAC;SACxB;KACF,CAAA;AACH,CAAC;AAzCD,yBAyCC;AAED,SAAS,aAAa,CAAC,IAAc,EAAE,MAAuB;IAC5D,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;;QACtB,MAAM,CAAC,GAAG,MAAA,MAAA,MAAA,MAAM,CAAC,KAAK,0CAAE,UAAU,0CAAG,GAAG,CAAC,0CAAE,IAAI,CAAA;QAC/C,OAAO,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;YACrB,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC;YAC/C,CAAC,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAA;IAC9B,CAAC,CAAC,CAAA;AACJ,CAAC;AAED,MAAM,CAAC,OAAO,GAAG,MAAM,CAAA"}

View File

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

View File

@@ -0,0 +1,84 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var indexes_exports = {};
__export(indexes_exports, {
Index: () => Index,
IndexBuilder: () => IndexBuilder,
IndexBuilderOn: () => IndexBuilderOn,
index: () => index,
uniqueIndex: () => uniqueIndex
});
module.exports = __toCommonJS(indexes_exports);
var import_entity = require("../entity.cjs");
class IndexBuilderOn {
constructor(name, unique) {
this.name = name;
this.unique = unique;
}
static [import_entity.entityKind] = "SQLiteIndexBuilderOn";
on(...columns) {
return new IndexBuilder(this.name, columns, this.unique);
}
}
class IndexBuilder {
static [import_entity.entityKind] = "SQLiteIndexBuilder";
/** @internal */
config;
constructor(name, columns, unique) {
this.config = {
name,
columns,
unique,
where: void 0
};
}
/**
* Condition for partial index.
*/
where(condition) {
this.config.where = condition;
return this;
}
/** @internal */
build(table) {
return new Index(this.config, table);
}
}
class Index {
static [import_entity.entityKind] = "SQLiteIndex";
config;
constructor(config, table) {
this.config = { ...config, table };
}
}
function index(name) {
return new IndexBuilderOn(name, false);
}
function uniqueIndex(name) {
return new IndexBuilderOn(name, true);
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
Index,
IndexBuilder,
IndexBuilderOn,
index,
uniqueIndex
});
//# sourceMappingURL=indexes.cjs.map

View File

@@ -0,0 +1,17 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.exportSPKI = exportSPKI;
exports.exportPKCS8 = exportPKCS8;
exports.exportJWK = exportJWK;
const asn1_js_1 = require("../runtime/asn1.js");
const asn1_js_2 = require("../runtime/asn1.js");
const key_to_jwk_js_1 = require("../runtime/key_to_jwk.js");
async function exportSPKI(key) {
return (0, asn1_js_1.toSPKI)(key);
}
async function exportPKCS8(key) {
return (0, asn1_js_2.toPKCS8)(key);
}
async function exportJWK(key) {
return (0, key_to_jwk_js_1.default)(key);
}

View File

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

View File

@@ -0,0 +1,50 @@
import type { Event, EventHint } from '../event';
import type { Primitive } from '../misc';
import type { User } from '../user';
/**
* Crash report feedback object
*/
export interface UserFeedback {
event_id: string;
email: User['email'];
name: string;
comments: string;
}
interface FeedbackContext extends Record<string, unknown> {
message: string;
contact_email?: string;
name?: string;
replay_id?: string;
url?: string;
associated_event_id?: string;
source?: string;
}
/**
* NOTE: These types are still considered Alpha and subject to change.
* @hidden
*/
export interface FeedbackEvent extends Event {
type: 'feedback';
contexts: Event['contexts'] & {
feedback: FeedbackContext;
};
}
export interface SendFeedbackParams {
message: string;
name?: string;
email?: string;
url?: string;
source?: string;
associatedEventId?: string;
/**
* Set an object that will be merged sent as tags data with the event.
*/
tags?: {
[key: string]: Primitive;
};
}
export type SendFeedback = (params: SendFeedbackParams, hint?: EventHint & {
includeReplay?: boolean;
}) => Promise<string>;
export {};
//# sourceMappingURL=sendFeedback.d.ts.map

View File

@@ -0,0 +1,5 @@
import type { CodeKeywordDefinition } from "../../types";
import type { KeywordCxt } from "../../compile/validate";
declare const def: CodeKeywordDefinition;
export declare function dynamicAnchor(cxt: KeywordCxt, anchor: string): void;
export default def;

View File

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

View File

@@ -0,0 +1,109 @@
import { ZodIssueCode } from "../ZodError.js";
import { util, ZodParsedType } from "../helpers/util.js";
const errorMap = (issue, _ctx) => {
let message;
switch (issue.code) {
case ZodIssueCode.invalid_type:
if (issue.received === ZodParsedType.undefined) {
message = "Required";
}
else {
message = `Expected ${issue.expected}, received ${issue.received}`;
}
break;
case ZodIssueCode.invalid_literal:
message = `Invalid literal value, expected ${JSON.stringify(issue.expected, util.jsonStringifyReplacer)}`;
break;
case ZodIssueCode.unrecognized_keys:
message = `Unrecognized key(s) in object: ${util.joinValues(issue.keys, ", ")}`;
break;
case ZodIssueCode.invalid_union:
message = `Invalid input`;
break;
case ZodIssueCode.invalid_union_discriminator:
message = `Invalid discriminator value. Expected ${util.joinValues(issue.options)}`;
break;
case ZodIssueCode.invalid_enum_value:
message = `Invalid enum value. Expected ${util.joinValues(issue.options)}, received '${issue.received}'`;
break;
case ZodIssueCode.invalid_arguments:
message = `Invalid function arguments`;
break;
case ZodIssueCode.invalid_return_type:
message = `Invalid function return type`;
break;
case ZodIssueCode.invalid_date:
message = `Invalid date`;
break;
case ZodIssueCode.invalid_string:
if (typeof issue.validation === "object") {
if ("includes" in issue.validation) {
message = `Invalid input: must include "${issue.validation.includes}"`;
if (typeof issue.validation.position === "number") {
message = `${message} at one or more positions greater than or equal to ${issue.validation.position}`;
}
}
else if ("startsWith" in issue.validation) {
message = `Invalid input: must start with "${issue.validation.startsWith}"`;
}
else if ("endsWith" in issue.validation) {
message = `Invalid input: must end with "${issue.validation.endsWith}"`;
}
else {
util.assertNever(issue.validation);
}
}
else if (issue.validation !== "regex") {
message = `Invalid ${issue.validation}`;
}
else {
message = "Invalid";
}
break;
case ZodIssueCode.too_small:
if (issue.type === "array")
message = `Array must contain ${issue.exact ? "exactly" : issue.inclusive ? `at least` : `more than`} ${issue.minimum} element(s)`;
else if (issue.type === "string")
message = `String must contain ${issue.exact ? "exactly" : issue.inclusive ? `at least` : `over`} ${issue.minimum} character(s)`;
else if (issue.type === "number")
message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`;
else if (issue.type === "bigint")
message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`;
else if (issue.type === "date")
message = `Date must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(issue.minimum))}`;
else
message = "Invalid input";
break;
case ZodIssueCode.too_big:
if (issue.type === "array")
message = `Array must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `less than`} ${issue.maximum} element(s)`;
else if (issue.type === "string")
message = `String must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `under`} ${issue.maximum} character(s)`;
else if (issue.type === "number")
message = `Number must be ${issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`} ${issue.maximum}`;
else if (issue.type === "bigint")
message = `BigInt must be ${issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`} ${issue.maximum}`;
else if (issue.type === "date")
message = `Date must be ${issue.exact ? `exactly` : issue.inclusive ? `smaller than or equal to` : `smaller than`} ${new Date(Number(issue.maximum))}`;
else
message = "Invalid input";
break;
case ZodIssueCode.custom:
message = `Invalid input`;
break;
case ZodIssueCode.invalid_intersection_types:
message = `Intersection results could not be merged`;
break;
case ZodIssueCode.not_multiple_of:
message = `Number must be a multiple of ${issue.multipleOf}`;
break;
case ZodIssueCode.not_finite:
message = "Number must be finite";
break;
default:
message = _ctx.defaultError;
util.assertNever(issue);
}
return { message };
};
export default errorMap;

View File

@@ -0,0 +1,25 @@
import { quartersInYear } from "./constants.js";
/**
* @name yearsToQuarters
* @category Conversion Helpers
* @summary Convert years to quarters.
*
* @description
* Convert a number of years to a full number of quarters.
*
* @param years - The number of years to be converted
*
* @returns The number of years converted in quarters
*
* @example
* // Convert 2 years to quarters
* const result = yearsToQuarters(2)
* //=> 8
*/
export function yearsToQuarters(years) {
return Math.trunc(years * quartersInYear);
}
// Fallback for modularized imports:
export default yearsToQuarters;

View File

@@ -0,0 +1 @@
{"version":3,"file":"span_context.js","sourceRoot":"","sources":["../../../src/trace/span_context.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { TraceState } from './trace_state';\n\n/**\n * A SpanContext represents the portion of a {@link Span} which must be\n * serialized and propagated along side of a {@link Baggage}.\n */\nexport interface SpanContext {\n /**\n * The ID of the trace that this span belongs to. It is worldwide unique\n * with practically sufficient probability by being made as 16 randomly\n * generated bytes, encoded as a 32 lowercase hex characters corresponding to\n * 128 bits.\n */\n traceId: string;\n /**\n * The ID of the Span. It is globally unique with practically sufficient\n * probability by being made as 8 randomly generated bytes, encoded as a 16\n * lowercase hex characters corresponding to 64 bits.\n */\n spanId: string;\n /**\n * Only true if the SpanContext was propagated from a remote parent.\n */\n isRemote?: boolean;\n /**\n * Trace flags to propagate.\n *\n * It is represented as 1 byte (bitmap). Bit to represent whether trace is\n * sampled or not. When set, the least significant bit documents that the\n * caller may have recorded trace data. A caller who does not record trace\n * data out-of-band leaves this flag unset.\n *\n * see {@link TraceFlags} for valid flag values.\n */\n traceFlags: number;\n /**\n * Tracing-system-specific info to propagate.\n *\n * The tracestate field value is a `list` as defined below. The `list` is a\n * series of `list-members` separated by commas `,`, and a list-member is a\n * key/value pair separated by an equals sign `=`. Spaces and horizontal tabs\n * surrounding `list-members` are ignored. There can be a maximum of 32\n * `list-members` in a `list`.\n * More Info: https://www.w3.org/TR/trace-context/#tracestate-field\n *\n * Examples:\n * Single tracing system (generic format):\n * tracestate: rojo=00f067aa0ba902b7\n * Multiple tracing systems (with different formatting):\n * tracestate: rojo=00f067aa0ba902b7,congo=t61rcWkgMzE\n */\n traceState?: TraceState;\n}\n"]}

View File

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

View File

@@ -0,0 +1,164 @@
{
"definitions": {
"Rule": {
"description": "Filtering rule as regex or string.",
"anyOf": [
{
"instanceof": "RegExp",
"tsType": "RegExp"
},
{
"type": "string",
"minLength": 1
}
]
},
"Rules": {
"description": "Filtering rules.",
"anyOf": [
{
"type": "array",
"items": {
"description": "A rule condition.",
"oneOf": [
{
"$ref": "#/definitions/Rule"
}
]
}
},
{
"$ref": "#/definitions/Rule"
}
]
}
},
"title": "TerserPluginOptions",
"type": "object",
"additionalProperties": false,
"properties": {
"test": {
"description": "Include all modules that pass test assertion.",
"link": "https://github.com/webpack/terser-webpack-plugin#test",
"oneOf": [
{
"$ref": "#/definitions/Rules"
}
]
},
"include": {
"description": "Include all modules matching any of these conditions.",
"link": "https://github.com/webpack/terser-webpack-plugin#include",
"oneOf": [
{
"$ref": "#/definitions/Rules"
}
]
},
"exclude": {
"description": "Exclude all modules matching any of these conditions.",
"link": "https://github.com/webpack/terser-webpack-plugin#exclude",
"oneOf": [
{
"$ref": "#/definitions/Rules"
}
]
},
"terserOptions": {
"description": "Options for `terser` (by default) or custom `minify` function.",
"link": "https://github.com/webpack/terser-webpack-plugin#terseroptions",
"additionalProperties": true,
"type": "object"
},
"extractComments": {
"description": "Whether comments shall be extracted to a separate file.",
"link": "https://github.com/webpack/terser-webpack-plugin#extractcomments",
"anyOf": [
{
"type": "boolean"
},
{
"type": "string",
"minLength": 1
},
{
"instanceof": "RegExp"
},
{
"instanceof": "Function"
},
{
"additionalProperties": false,
"properties": {
"condition": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string",
"minLength": 1
},
{
"instanceof": "RegExp"
},
{
"instanceof": "Function"
}
],
"description": "Condition what comments you need extract.",
"link": "https://github.com/webpack/terser-webpack-plugin#condition"
},
"filename": {
"anyOf": [
{
"type": "string",
"minLength": 1
},
{
"instanceof": "Function"
}
],
"description": "The file where the extracted comments will be stored. Default is to append the suffix .LICENSE.txt to the original filename.",
"link": "https://github.com/webpack/terser-webpack-plugin#filename"
},
"banner": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string",
"minLength": 1
},
{
"instanceof": "Function"
}
],
"description": "The banner text that points to the extracted file and will be added on top of the original file",
"link": "https://github.com/webpack/terser-webpack-plugin#banner"
}
},
"type": "object"
}
]
},
"parallel": {
"description": "Use multi-process parallel running to improve the build speed.",
"link": "https://github.com/webpack/terser-webpack-plugin#parallel",
"anyOf": [
{
"type": "boolean"
},
{
"type": "integer"
}
]
},
"minify": {
"description": "Allows you to override default minify function.",
"link": "https://github.com/webpack/terser-webpack-plugin#number",
"instanceof": "Function"
}
}
}

View File

@@ -0,0 +1,11 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.types = void 0;
const webcrypto_js_1 = require("./webcrypto.js");
const is_key_object_js_1 = require("./is_key_object.js");
exports.default = (key) => (0, is_key_object_js_1.default)(key) || (0, webcrypto_js_1.isCryptoKey)(key);
const types = ['KeyObject'];
exports.types = types;
if (globalThis.CryptoKey || webcrypto_js_1.default?.CryptoKey) {
types.push('CryptoKey');
}

View File

@@ -0,0 +1,15 @@
import type { CollectionSlug } from '../../index.js';
import type { PayloadRequest, Where } from '../../types/index.js';
import type { Collection } from '../config/types.js';
export type Arguments = {
collection: Collection;
disableErrors?: boolean;
overrideAccess?: boolean;
req?: PayloadRequest;
trash?: boolean;
where?: Where;
};
export declare const countOperation: <TSlug extends CollectionSlug>(incomingArgs: Arguments) => Promise<{
totalDocs: number;
}>;
//# sourceMappingURL=count.d.ts.map

View File

@@ -0,0 +1,108 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const core = require('@sentry/core');
const helpers = require('../helpers.js');
// This is a map of integration function method to bundle file name.
const LazyLoadableIntegrations = {
replayIntegration: 'replay',
replayCanvasIntegration: 'replay-canvas',
feedbackIntegration: 'feedback',
feedbackModalIntegration: 'feedback-modal',
feedbackScreenshotIntegration: 'feedback-screenshot',
captureConsoleIntegration: 'captureconsole',
contextLinesIntegration: 'contextlines',
linkedErrorsIntegration: 'linkederrors',
dedupeIntegration: 'dedupe',
extraErrorDataIntegration: 'extraerrordata',
graphqlClientIntegration: 'graphqlclient',
httpClientIntegration: 'httpclient',
reportingObserverIntegration: 'reportingobserver',
rewriteFramesIntegration: 'rewriteframes',
browserProfilingIntegration: 'browserprofiling',
moduleMetadataIntegration: 'modulemetadata',
instrumentAnthropicAiClient: 'instrumentanthropicaiclient',
instrumentOpenAiClient: 'instrumentopenaiclient',
instrumentGoogleGenAIClient: 'instrumentgooglegenaiclient',
instrumentLangGraph: 'instrumentlanggraph',
createLangChainCallbackHandler: 'createlangchaincallbackhandler',
} ;
const WindowWithMaybeIntegration = helpers.WINDOW
;
/**
* Lazy load an integration from the CDN.
* Rejects if the integration cannot be loaded.
*/
async function lazyLoadIntegration(
name,
scriptNonce,
) {
const bundle = LazyLoadableIntegrations[name];
// `window.Sentry` is only set when using a CDN bundle, but this method can also be used via the NPM package
const sentryOnWindow = (WindowWithMaybeIntegration.Sentry = WindowWithMaybeIntegration.Sentry || {});
if (!bundle) {
throw new Error(`Cannot lazy load integration: ${name}`);
}
// Bail if the integration already exists
const existing = sentryOnWindow[name];
// The `feedbackIntegration` is loaded by default in the CDN bundles,
// so we need to differentiate between the real integration and the shim.
// if only the shim exists, we still want to lazy load the real integration.
if (typeof existing === 'function' && !('_isShim' in existing)) {
return existing;
}
const url = getScriptURL(bundle);
const script = helpers.WINDOW.document.createElement('script');
script.src = url;
script.crossOrigin = 'anonymous';
script.referrerPolicy = 'strict-origin';
if (scriptNonce) {
script.setAttribute('nonce', scriptNonce);
}
const waitForLoad = new Promise((resolve, reject) => {
script.addEventListener('load', () => resolve());
script.addEventListener('error', reject);
});
const currentScript = helpers.WINDOW.document.currentScript;
const parent = helpers.WINDOW.document.body || helpers.WINDOW.document.head || currentScript?.parentElement;
if (parent) {
parent.appendChild(script);
} else {
throw new Error(`Could not find parent element to insert lazy-loaded ${name} script`);
}
try {
await waitForLoad;
} catch {
throw new Error(`Error when loading integration: ${name}`);
}
const integrationFn = sentryOnWindow[name];
if (typeof integrationFn !== 'function') {
throw new Error(`Could not load integration: ${name}`);
}
return integrationFn;
}
function getScriptURL(bundle) {
const client = core.getClient();
const baseURL = client?.getOptions()?.cdnBaseUrl || 'https://browser.sentry-cdn.com';
return new URL(`/${core.SDK_VERSION}/${bundle}.min.js`, baseURL).toString();
}
exports.lazyLoadIntegration = lazyLoadIntegration;
//# sourceMappingURL=lazyLoadIntegration.js.map

View File

@@ -0,0 +1,17 @@
export declare const ipHeaderNames: string[];
/**
* Get the IP address of the client sending a request.
*
* It receives a Request headers object and use it to get the
* IP address from one of the following headers in order.
*
* If the IP address is valid, it will be returned. Otherwise, null will be
* returned.
*
* If the header values contains more than one IP address, the first valid one
* will be returned.
*/
export declare function getClientIPAddress(headers: {
[key: string]: string | string[] | undefined;
}): string | null;
//# sourceMappingURL=getIpAddress.d.ts.map

View File

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

View File

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

View File

@@ -0,0 +1,11 @@
import { GraphQLScalarType } from 'graphql';
import * as mocks from './mocks.js';
import { GraphQLAccountNumber, GraphQLBigInt, GraphQLByte, GraphQLCountryCode, GraphQLCuid, GraphQLCurrency, GraphQLDate, GraphQLDateTime, GraphQLDateTimeISO, GraphQLDeweyDecimal, GraphQLDID, GraphQLDuration, GraphQLEmailAddress, GraphQLGUID, GraphQLHexadecimal, GraphQLHexColorCode, GraphQLHSL, GraphQLHSLA, GraphQLIBAN, GraphQLIP, GraphQLIPCPatent, GraphQLIPv4, GraphQLIPv6, GraphQLISBN, GraphQLISO8601Duration, GraphQLJSON, GraphQLJSONObject, GraphQLJWT, GraphQLLatitude, GraphQLLCCSubclass, GraphQLLocalDate, GraphQLLocalDateTime, GraphQLLocale, GraphQLLocalEndTime, GraphQLLocalTime, GraphQLLong, GraphQLLongitude, GraphQLMAC, GraphQLNegativeFloat, GraphQLNegativeInt, GraphQLNonEmptyString, GraphQLNonNegativeFloat, GraphQLNonNegativeInt, GraphQLNonPositiveFloat, GraphQLNonPositiveInt, GraphQLObjectID, GraphQLPhoneNumber, GraphQLPort, GraphQLPositiveFloat, GraphQLPositiveInt, GraphQLPostalCode, GraphQLRGB, GraphQLRGBA, GraphQLRoutingNumber, GraphQLSafeInt, GraphQLSemVer, GraphQLTime, GraphQLTimestamp, GraphQLTimeZone, GraphQLUnsignedFloat, GraphQLUnsignedInt, GraphQLURL, GraphQLUSCurrency, GraphQLUtcOffset, GraphQLUUID, GraphQLVoid } from './scalars/index.js';
export { Date as DateTypeDefinition, Time as TimeTypeDefinition, DateTime as DateTimeTypeDefinition, DateTimeISO as DateTimeISOTypeDefinition, Timestamp as TimestampTypeDefinition, TimeZone as TimeZoneTypeDefinition, UtcOffset as UtcOffsetTypeDefinition, LocalDate as LocalDateTypeDefinition, LocalTime as LocalTimeTypeDefinition, LocalDateTime as LocalDateTimeTypeDefinition, LocalEndTime as LocalEndTimeTypeDefinition, EmailAddress as EmailAddressTypeDefinition, NegativeFloat as NegativeFloatTypeDefinition, NegativeInt as NegativeIntTypeDefinition, NonEmptyString as NonEmptyStringTypeDefinition, NonNegativeFloat as NonNegativeFloatTypeDefinition, NonNegativeInt as NonNegativeIntTypeDefinition, NonPositiveFloat as NonPositiveFloatTypeDefinition, NonPositiveInt as NonPositiveIntTypeDefinition, PhoneNumber as PhoneNumberTypeDefinition, PositiveFloat as PositiveFloatTypeDefinition, PositiveInt as PositiveIntTypeDefinition, PostalCode as PostalCodeTypeDefinition, UnsignedFloat as UnsignedFloatTypeDefinition, UnsignedInt as UnsignedIntTypeDefinition, URL as URLTypeDefinition, BigInt as BigIntTypeDefinition, Byte as ByteTypeDefinition, Long as LongTypeDefinition, SafeInt as SafeIntDefinition, UUID as UUIDDefinition, GUID as GUIDDefinition, Hexadecimal as HexadecimalTypeDefinition, HexColorCode as HexColorCodeDefinition, HSL as HSLDefinition, HSLA as HSLADefinition, IP as IPDefinition, IPv4 as IPv4Definition, IPv6 as IPv6Definition, ISBN as ISBNDefinition, JWT as JWTDefinition, Latitude as LatitudeDefinition, Longitude as LongitudeDefinition, MAC as MACDefinition, Port as PortDefinition, RGB as RGBDefinition, RGBA as RGBADefinition, USCurrency as USCurrencyDefinition, Currency as CurrencyDefinition, JSON as JSONDefinition, JSONObject as JSONObjectDefinition, IBAN as IBANTypeDefinition, ObjectID as ObjectIDTypeDefinition, Void as VoidTypeDefinition, DID as DIDDefinition, Duration as DurationTypeDefinition, CountryCode as CountryCodeDefinition, Locale as LocaleDefinition, RoutingNumber as RoutingNumberDefinition, AccountNumber as AccountNumberDefinition, Cuid as CuidDefinition, SemVer as SemVerDefinition, DeweyDecimal as DeweyDecimalDefinition, LCCSubclass as LCCSubclassDefinition, IPCPatent as IPCPatentDefinition, } from './typeDefs.js';
export { typeDefs } from './typeDefs.js';
export { GraphQLDate as DateResolver, GraphQLTime as TimeResolver, GraphQLDateTime as DateTimeResolver, GraphQLDateTimeISO as DateTimeISOResolver, GraphQLTimestamp as TimestampResolver, GraphQLTimeZone as TimeZoneResolver, GraphQLUtcOffset as UtcOffsetResolver, GraphQLDuration as DurationResolver, GraphQLISO8601Duration as ISO8601DurationResolver, GraphQLLocalDate as LocalDateResolver, GraphQLLocalTime as LocalTimeResolver, GraphQLLocalDateTime as LocalDateTimeResolver, GraphQLLocalEndTime as LocalEndTimeResolver, GraphQLEmailAddress as EmailAddressResolver, GraphQLNegativeFloat as NegativeFloatResolver, GraphQLNegativeInt as NegativeIntResolver, GraphQLNonEmptyString as NonEmptyStringResolver, GraphQLNonNegativeFloat as NonNegativeFloatResolver, GraphQLNonNegativeInt as NonNegativeIntResolver, GraphQLNonPositiveFloat as NonPositiveFloatResolver, GraphQLNonPositiveInt as NonPositiveIntResolver, GraphQLPhoneNumber as PhoneNumberResolver, GraphQLPositiveFloat as PositiveFloatResolver, GraphQLPositiveInt as PositiveIntResolver, GraphQLPostalCode as PostalCodeResolver, GraphQLUnsignedFloat as UnsignedFloatResolver, GraphQLUnsignedInt as UnsignedIntResolver, GraphQLURL as URLResolver, GraphQLBigInt as BigIntResolver, GraphQLByte as ByteResolver, GraphQLLong as LongResolver, GraphQLSafeInt as SafeIntResolver, GraphQLUUID as UUIDResolver, GraphQLGUID as GUIDResolver, GraphQLHexadecimal as HexadecimalResolver, GraphQLHexColorCode as HexColorCodeResolver, GraphQLHSL as HSLResolver, GraphQLHSLA as HSLAResolver, GraphQLIP as IPResolver, GraphQLIPv4 as IPv4Resolver, GraphQLIPv6 as IPv6Resolver, GraphQLISBN as ISBNResolver, GraphQLJWT as JWTResolver, GraphQLLatitude as LatitudeResolver, GraphQLLongitude as LongitudeResolver, GraphQLMAC as MACResolver, GraphQLPort as PortResolver, GraphQLRGB as RGBResolver, GraphQLRGBA as RGBAResolver, GraphQLUSCurrency as USCurrencyResolver, GraphQLCurrency as CurrencyResolver, GraphQLJSON as JSONResolver, GraphQLJSONObject as JSONObjectResolver, GraphQLIBAN as IBANResolver, GraphQLObjectID as ObjectIDResolver, GraphQLVoid as VoidResolver, GraphQLDID as DIDResolver, GraphQLCountryCode as CountryCodeResolver, GraphQLLocale as LocaleResolver, GraphQLRoutingNumber as RoutingNumberResolver, GraphQLAccountNumber as AccountNumberResolver, GraphQLCuid as CuidResolver, GraphQLSemVer as SemVerResolver, GraphQLDeweyDecimal as GraphQLDeweyDecimalResolver, GraphQLIPCPatent as GraphQLIPCPatentResolver, };
export declare const resolvers: Record<string, GraphQLScalarType>;
export { Date as DateMock, Time as TimeMock, DateTime as DateTimeMock, DateTimeISO as DateTimeISOMock, Duration as DurationMock, ISO8601Duration as ISO8601DurationMock, Timestamp as TimestampMock, TimeZone as TimeZoneMock, UtcOffset as UtcOffsetMock, LocalDate as LocalDateMock, LocalTime as LocalTimeMock, LocalDateTime as LocalDateTimeMock, LocalEndTime as LocalEndTimeMock, EmailAddress as EmailAddressMock, NegativeFloat as NegativeFloatMock, NegativeInt as NegativeIntMock, NonEmptyString as NonEmptyStringMock, NonNegativeFloat as NonNegativeFloatMock, NonNegativeInt as NonNegativeIntMock, NonPositiveFloat as NonPositiveFloatMock, NonPositiveInt as NonPositiveIntMock, PhoneNumber as PhoneNumberMock, PositiveFloat as PositiveFloatMock, PositiveInt as PositiveIntMock, PostalCode as PostalCodeMock, UnsignedFloat as UnsignedFloatMock, UnsignedInt as UnsignedIntMock, URL as URLMock, BigInt as BigIntMock, Byte as ByteMock, Long as LongMock, SafeInt as SafeIntMock, UUID as UUIDMock, GUID as GUIDMock, Hexadecimal as HexadecimalMock, HexColorCode as HexColorCodeMock, HSL as HSLMock, HSLA as HSLAMock, IP as IPMock, IPv4 as IPv4Mock, IPv6 as IPv6Mock, ISBN as ISBNMock, JWT as JWTMock, Latitude as LatitudeMock, Longitude as LongitudeMock, MAC as MACMock, Port as PortMock, RGB as RGBMock, RGBA as RGBAMock, USCurrency as USCurrencyMock, Currency as CurrencyMock, JSON as JSONMock, JSONObject as JSONObjectMock, IBAN as IBANMock, ObjectID as ObjectIDMock, Void as VoidMock, DID as DIDMock, CountryCode as CountryCodeMock, Locale as LocaleMock, RoutingNumber as RoutingNumberMock, AccountNumber as AccountNumberMock, Cuid as CuidMock, SemVer as SemVerMock, DeweyDecimal as DeweyDecimalMock, LCCSubclass as LCCSubclassMock, IPCPatent as IPCPatentMock, } from './mocks.js';
export { mocks };
export { RegularExpression, RegularExpressionOptions, RegularExpressionErrorMessageFn, } from './RegularExpression.js';
export { GraphQLDate, GraphQLTime, GraphQLDateTime, GraphQLDateTimeISO, GraphQLTimestamp, GraphQLTimeZone, GraphQLUtcOffset, GraphQLDuration, GraphQLISO8601Duration, GraphQLLocalDate, GraphQLLocalTime, GraphQLLocalDateTime, GraphQLLocalEndTime, GraphQLEmailAddress, GraphQLNegativeFloat, GraphQLNegativeInt, GraphQLNonEmptyString, GraphQLNonNegativeFloat, GraphQLNonNegativeInt, GraphQLNonPositiveFloat, GraphQLNonPositiveInt, GraphQLPhoneNumber, GraphQLPositiveFloat, GraphQLPositiveInt, GraphQLPostalCode, GraphQLUnsignedFloat, GraphQLUnsignedInt, GraphQLURL, GraphQLBigInt, GraphQLByte, GraphQLLong, GraphQLSafeInt, GraphQLUUID, GraphQLGUID, GraphQLHexadecimal, GraphQLHexColorCode, GraphQLHSL, GraphQLHSLA, GraphQLIP, GraphQLIPv4, GraphQLIPv6, GraphQLISBN, GraphQLJWT, GraphQLLatitude, GraphQLLongitude, GraphQLMAC, GraphQLPort, GraphQLRGB, GraphQLRGBA, GraphQLUSCurrency, GraphQLCurrency, GraphQLJSON, GraphQLJSONObject, GraphQLIBAN, GraphQLObjectID, GraphQLVoid, GraphQLDID, GraphQLCountryCode, GraphQLLocale, GraphQLRoutingNumber, GraphQLAccountNumber, GraphQLCuid, GraphQLSemVer, GraphQLDeweyDecimal, GraphQLLCCSubclass, GraphQLIPCPatent, };

View File

@@ -0,0 +1,287 @@
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
// lib/npm/node-platform.ts
var fs = require("fs");
var os = require("os");
var path = require("path");
var ESBUILD_BINARY_PATH = process.env.ESBUILD_BINARY_PATH || ESBUILD_BINARY_PATH;
var isValidBinaryPath = (x) => !!x && x !== "/usr/bin/esbuild";
var knownWindowsPackages = {
"win32 arm64 LE": "@esbuild/win32-arm64",
"win32 ia32 LE": "@esbuild/win32-ia32",
"win32 x64 LE": "@esbuild/win32-x64"
};
var knownUnixlikePackages = {
"android arm64 LE": "@esbuild/android-arm64",
"darwin arm64 LE": "@esbuild/darwin-arm64",
"darwin x64 LE": "@esbuild/darwin-x64",
"freebsd arm64 LE": "@esbuild/freebsd-arm64",
"freebsd x64 LE": "@esbuild/freebsd-x64",
"linux arm LE": "@esbuild/linux-arm",
"linux arm64 LE": "@esbuild/linux-arm64",
"linux ia32 LE": "@esbuild/linux-ia32",
"linux mips64el LE": "@esbuild/linux-mips64el",
"linux ppc64 LE": "@esbuild/linux-ppc64",
"linux riscv64 LE": "@esbuild/linux-riscv64",
"linux s390x BE": "@esbuild/linux-s390x",
"linux x64 LE": "@esbuild/linux-x64",
"linux loong64 LE": "@esbuild/linux-loong64",
"netbsd x64 LE": "@esbuild/netbsd-x64",
"openbsd x64 LE": "@esbuild/openbsd-x64",
"sunos x64 LE": "@esbuild/sunos-x64"
};
var knownWebAssemblyFallbackPackages = {
"android arm LE": "@esbuild/android-arm",
"android x64 LE": "@esbuild/android-x64"
};
function pkgAndSubpathForCurrentPlatform() {
let pkg;
let subpath;
let isWASM = false;
let platformKey = `${process.platform} ${os.arch()} ${os.endianness()}`;
if (platformKey in knownWindowsPackages) {
pkg = knownWindowsPackages[platformKey];
subpath = "esbuild.exe";
} else if (platformKey in knownUnixlikePackages) {
pkg = knownUnixlikePackages[platformKey];
subpath = "bin/esbuild";
} else if (platformKey in knownWebAssemblyFallbackPackages) {
pkg = knownWebAssemblyFallbackPackages[platformKey];
subpath = "bin/esbuild";
isWASM = true;
} else {
throw new Error(`Unsupported platform: ${platformKey}`);
}
return { pkg, subpath, isWASM };
}
function downloadedBinPath(pkg, subpath) {
const esbuildLibDir = path.dirname(require.resolve("esbuild"));
return path.join(esbuildLibDir, `downloaded-${pkg.replace("/", "-")}-${path.basename(subpath)}`);
}
// lib/npm/node-install.ts
var fs2 = require("fs");
var os2 = require("os");
var path2 = require("path");
var zlib = require("zlib");
var https = require("https");
var child_process = require("child_process");
var versionFromPackageJSON = require(path2.join(__dirname, "package.json")).version;
var toPath = path2.join(__dirname, "bin", "esbuild");
var isToPathJS = true;
function validateBinaryVersion(...command) {
command.push("--version");
let stdout;
try {
stdout = child_process.execFileSync(command.shift(), command, {
// Without this, this install script strangely crashes with the error
// "EACCES: permission denied, write" but only on Ubuntu Linux when node is
// installed from the Snap Store. This is not a problem when you download
// the official version of node. The problem appears to be that stderr
// (i.e. file descriptor 2) isn't writable?
//
// More info:
// - https://snapcraft.io/ (what the Snap Store is)
// - https://nodejs.org/dist/ (download the official version of node)
// - https://github.com/evanw/esbuild/issues/1711#issuecomment-1027554035
//
stdio: "pipe"
}).toString().trim();
} catch (err) {
if (os2.platform() === "darwin" && /_SecTrustEvaluateWithError/.test(err + "")) {
let os3 = "this version of macOS";
try {
os3 = "macOS " + child_process.execFileSync("sw_vers", ["-productVersion"]).toString().trim();
} catch {
}
throw new Error(`The "esbuild" package cannot be installed because ${os3} is too outdated.
The Go compiler (which esbuild relies on) no longer supports ${os3},
which means the "esbuild" binary executable can't be run. You can either:
* Update your version of macOS to one that the Go compiler supports
* Use the "esbuild-wasm" package instead of the "esbuild" package
* Build esbuild yourself using an older version of the Go compiler
`);
}
throw err;
}
if (stdout !== versionFromPackageJSON) {
throw new Error(`Expected ${JSON.stringify(versionFromPackageJSON)} but got ${JSON.stringify(stdout)}`);
}
}
function isYarn() {
const { npm_config_user_agent } = process.env;
if (npm_config_user_agent) {
return /\byarn\//.test(npm_config_user_agent);
}
return false;
}
function fetch(url) {
return new Promise((resolve, reject) => {
https.get(url, (res) => {
if ((res.statusCode === 301 || res.statusCode === 302) && res.headers.location)
return fetch(res.headers.location).then(resolve, reject);
if (res.statusCode !== 200)
return reject(new Error(`Server responded with ${res.statusCode}`));
let chunks = [];
res.on("data", (chunk) => chunks.push(chunk));
res.on("end", () => resolve(Buffer.concat(chunks)));
}).on("error", reject);
});
}
function extractFileFromTarGzip(buffer, subpath) {
try {
buffer = zlib.unzipSync(buffer);
} catch (err) {
throw new Error(`Invalid gzip data in archive: ${err && err.message || err}`);
}
let str = (i, n) => String.fromCharCode(...buffer.subarray(i, i + n)).replace(/\0.*$/, "");
let offset = 0;
subpath = `package/${subpath}`;
while (offset < buffer.length) {
let name = str(offset, 100);
let size = parseInt(str(offset + 124, 12), 8);
offset += 512;
if (!isNaN(size)) {
if (name === subpath)
return buffer.subarray(offset, offset + size);
offset += size + 511 & ~511;
}
}
throw new Error(`Could not find ${JSON.stringify(subpath)} in archive`);
}
function installUsingNPM(pkg, subpath, binPath) {
const env = { ...process.env, npm_config_global: void 0 };
const esbuildLibDir = path2.dirname(require.resolve("esbuild"));
const installDir = path2.join(esbuildLibDir, "npm-install");
fs2.mkdirSync(installDir);
try {
fs2.writeFileSync(path2.join(installDir, "package.json"), "{}");
child_process.execSync(
`npm install --loglevel=error --prefer-offline --no-audit --progress=false ${pkg}@${versionFromPackageJSON}`,
{ cwd: installDir, stdio: "pipe", env }
);
const installedBinPath = path2.join(installDir, "node_modules", pkg, subpath);
fs2.renameSync(installedBinPath, binPath);
} finally {
try {
removeRecursive(installDir);
} catch {
}
}
}
function removeRecursive(dir) {
for (const entry of fs2.readdirSync(dir)) {
const entryPath = path2.join(dir, entry);
let stats;
try {
stats = fs2.lstatSync(entryPath);
} catch {
continue;
}
if (stats.isDirectory())
removeRecursive(entryPath);
else
fs2.unlinkSync(entryPath);
}
fs2.rmdirSync(dir);
}
function applyManualBinaryPathOverride(overridePath) {
const pathString = JSON.stringify(overridePath);
fs2.writeFileSync(toPath, `#!/usr/bin/env node
require('child_process').execFileSync(${pathString}, process.argv.slice(2), { stdio: 'inherit' });
`);
const libMain = path2.join(__dirname, "lib", "main.js");
const code = fs2.readFileSync(libMain, "utf8");
fs2.writeFileSync(libMain, `var ESBUILD_BINARY_PATH = ${pathString};
${code}`);
}
function maybeOptimizePackage(binPath) {
if (os2.platform() !== "win32" && !isYarn()) {
const tempPath = path2.join(__dirname, "bin-esbuild");
try {
fs2.linkSync(binPath, tempPath);
fs2.renameSync(tempPath, toPath);
isToPathJS = false;
fs2.unlinkSync(tempPath);
} catch {
}
}
}
async function downloadDirectlyFromNPM(pkg, subpath, binPath) {
const url = `https://registry.npmjs.org/${pkg}/-/${pkg.replace("@esbuild/", "")}-${versionFromPackageJSON}.tgz`;
console.error(`[esbuild] Trying to download ${JSON.stringify(url)}`);
try {
fs2.writeFileSync(binPath, extractFileFromTarGzip(await fetch(url), subpath));
fs2.chmodSync(binPath, 493);
} catch (e) {
console.error(`[esbuild] Failed to download ${JSON.stringify(url)}: ${e && e.message || e}`);
throw e;
}
}
async function checkAndPreparePackage() {
if (isValidBinaryPath(ESBUILD_BINARY_PATH)) {
if (!fs2.existsSync(ESBUILD_BINARY_PATH)) {
console.warn(`[esbuild] Ignoring bad configuration: ESBUILD_BINARY_PATH=${ESBUILD_BINARY_PATH}`);
} else {
applyManualBinaryPathOverride(ESBUILD_BINARY_PATH);
return;
}
}
const { pkg, subpath } = pkgAndSubpathForCurrentPlatform();
let binPath;
try {
binPath = require.resolve(`${pkg}/${subpath}`);
} catch (e) {
console.error(`[esbuild] Failed to find package "${pkg}" on the file system
This can happen if you use the "--no-optional" flag. The "optionalDependencies"
package.json feature is used by esbuild to install the correct binary executable
for your current platform. This install script will now attempt to work around
this. If that fails, you need to remove the "--no-optional" flag to use esbuild.
`);
binPath = downloadedBinPath(pkg, subpath);
try {
console.error(`[esbuild] Trying to install package "${pkg}" using npm`);
installUsingNPM(pkg, subpath, binPath);
} catch (e2) {
console.error(`[esbuild] Failed to install package "${pkg}" using npm: ${e2 && e2.message || e2}`);
try {
await downloadDirectlyFromNPM(pkg, subpath, binPath);
} catch (e3) {
throw new Error(`Failed to install package "${pkg}"`);
}
}
}
maybeOptimizePackage(binPath);
}
checkAndPreparePackage().then(() => {
if (isToPathJS) {
validateBinaryVersion(process.execPath, toPath);
} else {
validateBinaryVersion(toPath);
}
});

View File

@@ -0,0 +1,97 @@
'use strict';
var common = require('../common');
var Type = require('../type');
var YAML_FLOAT_PATTERN = new RegExp(
// 2.5e4, 2.5 and integers
'^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?' +
// .2e4, .2
// special case, seems not from spec
'|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?' +
// .inf
'|[-+]?\\.(?:inf|Inf|INF)' +
// .nan
'|\\.(?:nan|NaN|NAN))$');
function resolveYamlFloat(data) {
if (data === null) return false;
if (!YAML_FLOAT_PATTERN.test(data) ||
// Quick hack to not allow integers end with `_`
// Probably should update regexp & check speed
data[data.length - 1] === '_') {
return false;
}
return true;
}
function constructYamlFloat(data) {
var value, sign;
value = data.replace(/_/g, '').toLowerCase();
sign = value[0] === '-' ? -1 : 1;
if ('+-'.indexOf(value[0]) >= 0) {
value = value.slice(1);
}
if (value === '.inf') {
return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;
} else if (value === '.nan') {
return NaN;
}
return sign * parseFloat(value, 10);
}
var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/;
function representYamlFloat(object, style) {
var res;
if (isNaN(object)) {
switch (style) {
case 'lowercase': return '.nan';
case 'uppercase': return '.NAN';
case 'camelcase': return '.NaN';
}
} else if (Number.POSITIVE_INFINITY === object) {
switch (style) {
case 'lowercase': return '.inf';
case 'uppercase': return '.INF';
case 'camelcase': return '.Inf';
}
} else if (Number.NEGATIVE_INFINITY === object) {
switch (style) {
case 'lowercase': return '-.inf';
case 'uppercase': return '-.INF';
case 'camelcase': return '-.Inf';
}
} else if (common.isNegativeZero(object)) {
return '-0.0';
}
res = object.toString(10);
// JS stringifier can build scientific format without dots: 5e-100,
// while YAML requres dot: 5.e-100. Fix it with simple hack
return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res;
}
function isFloat(object) {
return (Object.prototype.toString.call(object) === '[object Number]') &&
(object % 1 !== 0 || common.isNegativeZero(object));
}
module.exports = new Type('tag:yaml.org,2002:float', {
kind: 'scalar',
resolve: resolveYamlFloat,
construct: constructYamlFloat,
predicate: isFloat,
represent: representYamlFloat,
defaultStyle: 'lowercase'
});

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