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

View File

@@ -0,0 +1,96 @@
import { Token } from './ast';
import type { Source } from './source';
import { TokenKind } from './tokenKind';
/**
* A Lexer interface which provides common properties and methods required for
* lexing GraphQL source.
*
* @internal
*/
export interface LexerInterface {
source: Source;
lastToken: Token;
token: Token;
line: number;
lineStart: number;
advance: () => Token;
lookahead: () => Token;
}
/**
* Given a Source object, creates a Lexer for that source.
* A Lexer is a stateful stream generator in that every time
* it is advanced, it returns the next token in the Source. Assuming the
* source lexes, the final Token emitted by the lexer will be of kind
* EOF, after which the lexer will repeatedly return the same EOF token
* whenever called.
*/
export declare class Lexer implements LexerInterface {
source: Source;
/**
* The previously focused non-ignored token.
*/
lastToken: Token;
/**
* The currently focused non-ignored token.
*/
token: Token;
/**
* The (1-indexed) line containing the current token.
*/
line: number;
/**
* The character offset at which the current line begins.
*/
lineStart: number;
constructor(source: Source);
get [Symbol.toStringTag](): string;
/**
* Advances the token stream to the next non-ignored token.
*/
advance(): Token;
/**
* Looks ahead and returns the next non-ignored token, but does not change
* the state of Lexer.
*/
lookahead(): Token;
}
/**
* @internal
*/
export declare function isPunctuatorTokenKind(kind: TokenKind): boolean;
/**
* Prints the code point (or end of file reference) at a given location in a
* source for use in error messages.
*
* Printable ASCII is printed quoted, while other points are printed in Unicode
* code point form (ie. U+1234).
*
* @internal
*/
export declare function printCodePointAt(
lexer: LexerInterface,
location: number,
): string;
/**
* Create a token with line and column location information.
*
* @internal
*/
export declare function createToken(
lexer: LexerInterface,
kind: TokenKind,
start: number,
end: number,
value?: string,
): Token;
/**
* Reads an alphanumeric + underscore name from the source.
*
* ```
* Name ::
* - NameStart NameContinue* [lookahead != NameContinue]
* ```
*
* @internal
*/
export declare function readName(lexer: LexerInterface, start: number): Token;

View File

@@ -0,0 +1 @@
{"version":3,"file":"is.d.ts","sourceRoot":"","sources":["../../../src/exports/i18n/is.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,uCAAuC,CAAA"}

View File

@@ -0,0 +1,42 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GraphQLLCCSubclass = exports.GraphQLLCCSubclassConfig = void 0;
const graphql_1 = require("graphql");
const error_js_1 = require("../../error.js");
//Regex for the various letter subclasses of the Library of Congress Classification
//As defined in the pdfs available by clicking on the letters at this link
//https://www.loc.gov/catdir/cpso/lcco/
const LCC_SUBCLASS_PREFIX = /^((AC|AE|AG|AI|AM|AN|AP|AS|AY|AZ)|[B][CDFHJLMPQRSTVX]{0,1}|[C][BCDEJNRST]{0,1}|[D][AWBCDEFGH]{0,1}|[E]|[F]|[G][ABCEFNRTV]{0,1}|[H][ABCDEFGJMNQSTVX]{0,1}|[J][ACFJKLNQSVXZ]{0,1}|(K|KB[M,P,R,U]|KD[C,E,G,K,Z]{0,1}|KE[ABMNOPQSYZ]{0,1}|KF[ACDFGHIKLMNOPRSTUVWXZ]{0,1}|KG[ABCDEFGHJKLMNPQRSTUVWXYZ]{0,1}|KH[ACDFHKLMNPQSUW]{0,1}|KJ[ACEGHJKMNPRSTVW]{0,1}|KK[ABEFGHIJKLMNPQRSTVWXYZ]{0,1}|KL[ABDEFHMNPQRSTVW]{0,1}|KM[CEFGHJKLMNPQSTUVXY]{0,1}|KN[CEFGHKLMNPQRSTUVWXY]{0,1}|KP[ACEFGHJKLMPSTVW]{0,1}|KQ[CEGHJKMPTVWX]{0,1}|KR[BCEGKLMNPRSUVWXY]{0,1}|KS[ACEGHKLNPRSTUVWXYZ]{0,1}|KT[ACDEFGHJKLNQRTUVWXYZ]{0,1}|KU[ABCDEFGHNQ]{0,1}|KV[BCEHLMNPQRSUW]{0,1}|KW[ACEGHLPQRTWX]{0,1}|KZ[AD]{0,1})|[L][ABCDEFGHJT]{0,1}|[M][LT]{0,1}|[N][ABCDEKX]{0,1}|[P][ABCDEFGHJKLMNQRSTZ]{0,1}|[Q][ABCDEHKLMPR]{0,1}|[R][ABCDEFGJKLMSTVXZ]{0,1}|[S][BDFHK]{0,1}|[T][ACDEFGHJKLNPRSTX]{0,1}|[U][ABCDEFGH]{0,1}|[V][ABCDEFGKM]{0,1}|[Z][A]{0,1})$/;
const validate = (value, ast) => {
if (typeof value !== 'string') {
throw (0, error_js_1.createGraphQLError)(`Value is not string: ${value}`, { nodes: ast });
}
if (!LCC_SUBCLASS_PREFIX.test(value)) {
throw (0, error_js_1.createGraphQLError)(`Value is not a valid LCC Subclass: ${value}`, { nodes: ast });
}
return value;
};
const specifiedByURL = 'https://www.loc.gov/catdir/cpso/lcco/';
exports.GraphQLLCCSubclassConfig = {
name: 'LCCSubclass',
description: `A field whose value conforms to the Library of Congress Subclass Format ttps://www.loc.gov/catdir/cpso/lcco/`,
serialize: validate,
parseValue: validate,
parseLiteral(ast) {
if (ast.kind !== graphql_1.Kind.STRING) {
throw (0, error_js_1.createGraphQLError)(`Can only validate strings as LCC Subclasses but got a: ${ast.kind}`, { nodes: ast });
}
return validate(ast.value, ast);
},
specifiedByURL,
specifiedByUrl: specifiedByURL,
extensions: {
codegenScalarType: 'string',
jsonSchema: {
title: 'DeweyDecimal',
type: 'string',
pattern: LCC_SUBCLASS_PREFIX.source,
},
},
};
exports.GraphQLLCCSubclass = new graphql_1.GraphQLScalarType(exports.GraphQLLCCSubclassConfig);

View File

@@ -0,0 +1 @@
{"version":3,"file":"dessert.js","sources":["../../../src/icons/dessert.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Dessert\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjQiIHI9IjIiIC8+CiAgPHBhdGggZD0iTTEwLjIgMy4yQzUuNSA0IDIgOC4xIDIgMTNhMiAyIDAgMCAwIDQgMHYtMWEyIDIgMCAwIDEgNCAwdjRhMiAyIDAgMCAwIDQgMHYtNGEyIDIgMCAwIDEgNCAwdjFhMiAyIDAgMCAwIDQgMGMwLTQuOS0zLjUtOS04LjItOS44IiAvPgogIDxwYXRoIGQ9Ik0zLjIgMTQuOGE5IDkgMCAwIDAgMTcuNiAwIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/dessert\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 Dessert = createLucideIcon('Dessert', [\n ['circle', { cx: '12', cy: '4', r: '2', key: 'muu5ef' }],\n [\n 'path',\n {\n d: 'M10.2 3.2C5.5 4 2 8.1 2 13a2 2 0 0 0 4 0v-1a2 2 0 0 1 4 0v4a2 2 0 0 0 4 0v-4a2 2 0 0 1 4 0v1a2 2 0 0 0 4 0c0-4.9-3.5-9-8.2-9.8',\n key: 'lfo06j',\n },\n ],\n ['path', { d: 'M3.2 14.8a9 9 0 0 0 17.6 0', key: '12xarc' }],\n]);\n\nexport default Dessert;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,iBAAiB,SAAW,CAAA,CAAA,CAAA;AAAA,CAC1C,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,GAAA,CAAK,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CACvD,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA,CAAA;AAAA,CAAA,CACA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA8B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC7D,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,166 @@
"use strict";
exports.match = void 0;
var _index = require("../../_lib/buildMatchFn.js");
var _index2 = require("../../_lib/buildMatchPatternFn.js");
const matchOrdinalNumberPattern = /^(\d+)(è|r|n|r|t)?/i;
const parseOrdinalNumberPattern = /\d+/i;
const matchEraPatterns = {
narrow: /^(aC|dC)/i,
abbreviated: /^(a. de C.|d. de C.)/i,
wide: /^(abans de Crist|despr[eé]s de Crist)/i,
};
const parseEraPatterns = {
narrow: [/^aC/i, /^dC/i],
abbreviated: [/^(a. de C.)/i, /^(d. de C.)/i],
wide: [/^(abans de Crist)/i, /^(despr[eé]s de Crist)/i],
};
const matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^T[1234]/i,
wide: /^[1234](è|r|n|r|t)? trimestre/i,
};
const parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i],
};
const matchMonthPatterns = {
narrow: /^(GN|FB|MÇ|AB|MG|JN|JL|AG|ST|OC|NV|DS)/i,
abbreviated:
/^(gen.|febr.|març|abr.|maig|juny|jul.|ag.|set.|oct.|nov.|des.)/i,
wide: /^(gener|febrer|març|abril|maig|juny|juliol|agost|setembre|octubre|novembre|desembre)/i,
};
const parseMonthPatterns = {
narrow: [
/^GN/i,
/^FB/i,
/^MÇ/i,
/^AB/i,
/^MG/i,
/^JN/i,
/^JL/i,
/^AG/i,
/^ST/i,
/^OC/i,
/^NV/i,
/^DS/i,
],
abbreviated: [
/^gen./i,
/^febr./i,
/^març/i,
/^abr./i,
/^maig/i,
/^juny/i,
/^jul./i,
/^ag./i,
/^set./i,
/^oct./i,
/^nov./i,
/^des./i,
],
wide: [
/^gener/i,
/^febrer/i,
/^març/i,
/^abril/i,
/^maig/i,
/^juny/i,
/^juliol/i,
/^agost/i,
/^setembre/i,
/^octubre/i,
/^novembre/i,
/^desembre/i,
],
};
const matchDayPatterns = {
narrow: /^(dg\.|dl\.|dt\.|dm\.|dj\.|dv\.|ds\.)/i,
short: /^(dg\.|dl\.|dt\.|dm\.|dj\.|dv\.|ds\.)/i,
abbreviated: /^(dg\.|dl\.|dt\.|dm\.|dj\.|dv\.|ds\.)/i,
wide: /^(diumenge|dilluns|dimarts|dimecres|dijous|divendres|dissabte)/i,
};
const parseDayPatterns = {
narrow: [/^dg./i, /^dl./i, /^dt./i, /^dm./i, /^dj./i, /^dv./i, /^ds./i],
abbreviated: [/^dg./i, /^dl./i, /^dt./i, /^dm./i, /^dj./i, /^dv./i, /^ds./i],
wide: [
/^diumenge/i,
/^dilluns/i,
/^dimarts/i,
/^dimecres/i,
/^dijous/i,
/^divendres/i,
/^disssabte/i,
],
};
const matchDayPeriodPatterns = {
narrow: /^(a|p|mn|md|(del|de la) (matí|tarda|vespre|nit))/i,
abbreviated:
/^([ap]\.?\s?m\.?|mitjanit|migdia|(del|de la) (matí|tarda|vespre|nit))/i,
wide: /^(ante meridiem|post meridiem|mitjanit|migdia|(del|de la) (matí|tarda|vespre|nit))/i,
};
const parseDayPeriodPatterns = {
any: {
am: /^a/i,
pm: /^p/i,
midnight: /^mitjanit/i,
noon: /^migdia/i,
morning: /matí/i,
afternoon: /tarda/i,
evening: /vespre/i,
night: /nit/i,
},
};
const match = (exports.match = {
ordinalNumber: (0, _index2.buildMatchPatternFn)({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: (value) => parseInt(value, 10),
}),
era: (0, _index.buildMatchFn)({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "wide",
}),
quarter: (0, _index.buildMatchFn)({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: (index) => index + 1,
}),
month: (0, _index.buildMatchFn)({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "wide",
}),
day: (0, _index.buildMatchFn)({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "wide",
}),
dayPeriod: (0, _index.buildMatchFn)({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any",
}),
});

View File

@@ -0,0 +1,127 @@
{
"name": "ajv",
"version": "8.18.0",
"description": "Another JSON Schema Validator",
"main": "dist/ajv.js",
"types": "dist/ajv.d.ts",
"files": [
"lib/",
"dist/",
".runkit_example.js"
],
"sideEffects": false,
"scripts": {
"eslint": "eslint \"lib/**/*.ts\" \"spec/**/*.*s\" --ignore-pattern spec/JSON-Schema-Test-Suite",
"prettier:write": "prettier --write \"./**/*.{json,yaml,js,ts}\"",
"prettier:check": "prettier --list-different \"./**/*.{json,yaml,js,ts}\"",
"test-spec": "cross-env TS_NODE_PROJECT=spec/tsconfig.json mocha -r ts-node/register \"spec/**/*.spec.{ts,js}\" -R dot",
"test-codegen": "nyc cross-env TS_NODE_PROJECT=spec/tsconfig.json mocha -r ts-node/register 'spec/codegen.spec.ts' -R spec",
"test-debug": "npm run test-spec -- --inspect-brk",
"test-cov": "nyc npm run test-spec",
"rollup": "rm -rf bundle && rollup -c",
"bundle": "rm -rf bundle && node ./scripts/bundle.js ajv ajv7 ajv7 && node ./scripts/bundle.js 2019 ajv2019 ajv2019 && node ./scripts/bundle.js 2020 ajv2020 ajv2020 && node ./scripts/bundle.js jtd ajvJTD ajvJTD",
"build": "rm -rf dist && tsc && cp -r lib/refs dist && rm dist/refs/json-schema-2019-09/index.ts && rm dist/refs/json-schema-2020-12/index.ts && rm dist/refs/jtd-schema.ts",
"json-tests": "rm -rf spec/_json/*.js && node scripts/jsontests",
"test-karma": "karma start",
"test-browser": "rm -rf .browser && npm run bundle && scripts/prepare-tests && karma start",
"test-all": "npm run test-cov && if-node-version 12 npm run test-browser",
"test": "npm run json-tests && npm run prettier:check && npm run eslint && npm link && npm link --legacy-peer-deps ajv && npm run test-cov",
"test-ci": "AJV_FULL_TEST=true npm test",
"prepublish": "npm run build",
"benchmark": "npm i && npm run build && npm link && cd ./benchmark && npm link --legacy-peer-deps ajv && npm i && node ./jtd",
"docs:dev": "./scripts/prepare-site && vuepress dev docs",
"docs:build": "./scripts/prepare-site && vuepress build docs"
},
"nyc": {
"exclude": [
"**/spec/**",
"node_modules"
],
"reporter": [
"lcov",
"text-summary"
]
},
"repository": "ajv-validator/ajv",
"keywords": [
"JSON",
"schema",
"validator",
"validation",
"jsonschema",
"json-schema",
"json-schema-validator",
"json-schema-validation"
],
"author": "Evgeny Poberezkin",
"license": "MIT",
"bugs": "https://github.com/ajv-validator/ajv/issues",
"homepage": "https://ajv.js.org",
"runkitExampleFilename": ".runkit_example.js",
"dependencies": {
"fast-deep-equal": "^3.1.3",
"fast-uri": "^3.0.1",
"json-schema-traverse": "^1.0.0",
"require-from-string": "^2.0.2"
},
"devDependencies": {
"@ajv-validator/config": "^0.5.0",
"@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-typescript": "^11.1.6",
"@types/chai": "^4.3.11",
"@types/mocha": "^10.0.6",
"@types/node": "^20.11.30",
"@types/require-from-string": "^1.2.3",
"@typescript-eslint/eslint-plugin": "^7.3.1",
"@typescript-eslint/parser": "^7.3.1",
"ajv-formats": "^3.0.1",
"browserify": "^17.0.0",
"chai": "^4.4.1",
"cross-env": "^7.0.3",
"dayjs": "^1.11.10",
"dayjs-plugin-utc": "^0.1.2",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"glob": "^10.3.10",
"husky": "^9.0.11",
"if-node-version": "^1.1.1",
"jimp": "^0.22.10",
"js-beautify": "^1.15.1",
"json-schema-test": "^2.0.0",
"karma": "^6.4.2",
"karma-chrome-launcher": "^3.2.0",
"karma-mocha": "^2.0.1",
"lint-staged": "^15.2.2",
"mocha": "^10.3.0",
"module-from-string": "^3.3.0",
"node-fetch": "^3.3.2",
"nyc": "^15.1.0",
"prettier": "3.0.3",
"re2": "^1.20.9",
"rollup": "^2.79.1",
"rollup-plugin-terser": "^7.0.2",
"ts-node": "^10.9.2",
"tsify": "^5.0.4",
"typescript": "5.3.3",
"uri-js": "^4.4.1"
},
"collective": {
"type": "opencollective",
"url": "https://opencollective.com/ajv"
},
"funding": {
"type": "github",
"url": "https://github.com/sponsors/epoberezkin"
},
"prettier": "@ajv-validator/config/prettierrc.json",
"husky": {
"hooks": {
"pre-commit": "lint-staged && npm test"
}
},
"lint-staged": {
"*.{json,yaml,js,ts}": "prettier --write"
}
}

View File

@@ -0,0 +1,6 @@
{
"name": "react-transition-group/CSSTransition",
"private": true,
"main": "../cjs/CSSTransition.js",
"module": "../esm/CSSTransition.js"
}

View File

@@ -0,0 +1,109 @@
import type {
CodeKeywordDefinition,
KeywordErrorDefinition,
ErrorObject,
AnySchema,
} from "../../types"
import type {KeywordCxt} from "../../compile/validate"
import {_, str, Name} from "../../compile/codegen"
import {alwaysValidSchema, checkStrictMode, Type} from "../../compile/util"
export type ContainsError = ErrorObject<
"contains",
{minContains: number; maxContains?: number},
AnySchema
>
const error: KeywordErrorDefinition = {
message: ({params: {min, max}}) =>
max === undefined
? str`must contain at least ${min} valid item(s)`
: str`must contain at least ${min} and no more than ${max} valid item(s)`,
params: ({params: {min, max}}) =>
max === undefined ? _`{minContains: ${min}}` : _`{minContains: ${min}, maxContains: ${max}}`,
}
const def: CodeKeywordDefinition = {
keyword: "contains",
type: "array",
schemaType: ["object", "boolean"],
before: "uniqueItems",
trackErrors: true,
error,
code(cxt: KeywordCxt) {
const {gen, schema, parentSchema, data, it} = cxt
let min: number
let max: number | undefined
const {minContains, maxContains} = parentSchema
if (it.opts.next) {
min = minContains === undefined ? 1 : minContains
max = maxContains
} else {
min = 1
}
const len = gen.const("len", _`${data}.length`)
cxt.setParams({min, max})
if (max === undefined && min === 0) {
checkStrictMode(it, `"minContains" == 0 without "maxContains": "contains" keyword ignored`)
return
}
if (max !== undefined && min > max) {
checkStrictMode(it, `"minContains" > "maxContains" is always invalid`)
cxt.fail()
return
}
if (alwaysValidSchema(it, schema)) {
let cond = _`${len} >= ${min}`
if (max !== undefined) cond = _`${cond} && ${len} <= ${max}`
cxt.pass(cond)
return
}
it.items = true
const valid = gen.name("valid")
if (max === undefined && min === 1) {
validateItems(valid, () => gen.if(valid, () => gen.break()))
} else if (min === 0) {
gen.let(valid, true)
if (max !== undefined) gen.if(_`${data}.length > 0`, validateItemsWithCount)
} else {
gen.let(valid, false)
validateItemsWithCount()
}
cxt.result(valid, () => cxt.reset())
function validateItemsWithCount(): void {
const schValid = gen.name("_valid")
const count = gen.let("count", 0)
validateItems(schValid, () => gen.if(schValid, () => checkLimits(count)))
}
function validateItems(_valid: Name, block: () => void): void {
gen.forRange("i", 0, len, (i) => {
cxt.subschema(
{
keyword: "contains",
dataProp: i,
dataPropType: Type.Num,
compositeRule: true,
},
_valid
)
block()
})
}
function checkLimits(count: Name): void {
gen.code(_`${count}++`)
if (max === undefined) {
gen.if(_`${count} >= ${min}`, () => gen.assign(valid, true).break())
} else {
gen.if(_`${count} > ${max}`, () => gen.assign(valid, false).break())
if (min === 1) gen.assign(valid, true)
else gen.if(_`${count} >= ${min}`, () => gen.assign(valid, true))
}
}
},
}
export default def

View File

@@ -0,0 +1,117 @@
import * as util from "../core/util.js";
const error = () => {
const Sizable = {
string: { unit: "harf", verb: "olmalıdır" },
file: { unit: "bayt", verb: "olmalıdır" },
array: { unit: "unsur", verb: "olmalıdır" },
set: { unit: "unsur", verb: "olmalıdır" },
};
function getSizing(origin) {
return Sizable[origin] ?? null;
}
const parsedType = (data) => {
const t = typeof data;
switch (t) {
case "number": {
return Number.isNaN(data) ? "NaN" : "numara";
}
case "object": {
if (Array.isArray(data)) {
return "saf";
}
if (data === null) {
return "gayb";
}
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
return data.constructor.name;
}
}
}
return t;
};
const Nouns = {
regex: "giren",
email: "epostagâh",
url: "URL",
emoji: "emoji",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "ISO hengâmı",
date: "ISO tarihi",
time: "ISO zamanı",
duration: "ISO müddeti",
ipv4: "IPv4 nişânı",
ipv6: "IPv6 nişânı",
cidrv4: "IPv4 menzili",
cidrv6: "IPv6 menzili",
base64: "base64-şifreli metin",
base64url: "base64url-şifreli metin",
json_string: "JSON metin",
e164: "E.164 sayısı",
jwt: "JWT",
template_literal: "giren",
};
return (issue) => {
switch (issue.code) {
case "invalid_type":
return `Fâsit giren: umulan ${issue.expected}, alınan ${parsedType(issue.input)}`;
// return `Fâsit giren: umulan ${issue.expected}, alınan ${util.getParsedType(issue.input)}`;
case "invalid_value":
if (issue.values.length === 1)
return `Fâsit giren: umulan ${util.stringifyPrimitive(issue.values[0])}`;
return `Fâsit tercih: mûteberler ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return `Fazla büyük: ${issue.origin ?? "value"}, ${adj}${issue.maximum.toString()} ${sizing.unit ?? "elements"} sahip olmalıydı.`;
return `Fazla büyük: ${issue.origin ?? "value"}, ${adj}${issue.maximum.toString()} olmalıydı.`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
return `Fazla küçük: ${issue.origin}, ${adj}${issue.minimum.toString()} ${sizing.unit} sahip olmalıydı.`;
}
return `Fazla küçük: ${issue.origin}, ${adj}${issue.minimum.toString()} olmalıydı.`;
}
case "invalid_format": {
const _issue = issue;
if (_issue.format === "starts_with")
return `Fâsit metin: "${_issue.prefix}" ile başlamalı.`;
if (_issue.format === "ends_with")
return `Fâsit metin: "${_issue.suffix}" ile bitmeli.`;
if (_issue.format === "includes")
return `Fâsit metin: "${_issue.includes}" ihtivâ etmeli.`;
if (_issue.format === "regex")
return `Fâsit metin: ${_issue.pattern} nakşına uymalı.`;
return `Fâsit ${Nouns[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `Fâsit sayı: ${issue.divisor} katı olmalıydı.`;
case "unrecognized_keys":
return `Tanınmayan anahtar ${issue.keys.length > 1 ? "s" : ""}: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `${issue.origin} için tanınmayan anahtar var.`;
case "invalid_union":
return "Giren tanınamadı.";
case "invalid_element":
return `${issue.origin} için tanınmayan kıymet var.`;
default:
return `Kıymet tanınamadı.`;
}
};
};
export default function () {
return {
localeError: error(),
};
}

View File

@@ -0,0 +1,12 @@
import { GraphQLNonNull } from 'graphql';
export const withNullableType = ({ type, field, forceNullable, parentIsLocalized })=>{
const hasReadAccessControl = field.access && field.access.read;
const condition = field.admin && field.admin.condition;
const isTimestamp = field.name === 'createdAt' || field.name === 'updatedAt';
if (!forceNullable && 'required' in field && field.required && (!field.localized || parentIsLocalized) && !condition && !hasReadAccessControl && !isTimestamp) {
return new GraphQLNonNull(type);
}
return type;
};
//# sourceMappingURL=withNullableType.js.map

View File

@@ -0,0 +1,24 @@
/**
* @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 CalendarHeart = createLucideIcon("CalendarHeart", [
["path", { d: "M3 10h18V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h7", key: "136lmk" }],
["path", { d: "M8 2v4", key: "1cmpym" }],
["path", { d: "M16 2v4", key: "4m81vk" }],
[
"path",
{
d: "M21.29 14.7a2.43 2.43 0 0 0-2.65-.52c-.3.12-.57.3-.8.53l-.34.34-.35-.34a2.43 2.43 0 0 0-2.65-.53c-.3.12-.56.3-.79.53-.95.94-1 2.53.2 3.74L17.5 22l3.6-3.55c1.2-1.21 1.14-2.8.19-3.74Z",
key: "1t7hil"
}
]
]);
export { CalendarHeart as default };
//# sourceMappingURL=calendar-heart.js.map

View File

@@ -0,0 +1,47 @@
import { GraphQLScalarType, Kind } from 'graphql';
import { createGraphQLError } from '../error.js';
import { IPV4_REGEX } from './IPv4.js';
import { IPV6_REGEX } from './IPv6.js';
const validate = (value, ast) => {
if (typeof value !== 'string') {
throw createGraphQLError(`Value is not string: ${value}`, ast ? { nodes: ast } : undefined);
}
if (!IPV4_REGEX.test(value) && !IPV6_REGEX.test(value)) {
throw createGraphQLError(`Value is not a valid IPv4 or IPv6 address: ${value}`, ast ? { nodes: ast } : undefined);
}
return value;
};
export const GraphQLIP = /*#__PURE__*/ new GraphQLScalarType({
name: `IP`,
description: `A field whose value is either an IPv4 or IPv6 address: https://en.wikipedia.org/wiki/IP_address.`,
serialize(value) {
return validate(value);
},
parseValue(value) {
return validate(value);
},
parseLiteral(ast) {
if (ast.kind !== Kind.STRING) {
throw createGraphQLError(`Can only validate strings as IP addresses but got a: ${ast.kind}`, {
nodes: ast,
});
}
return validate(ast.value, ast);
},
extensions: {
codegenScalarType: 'string',
jsonSchema: {
title: 'IP',
oneOf: [
{
type: 'string',
format: 'ipv4',
},
{
type: 'string',
format: 'ipv6',
},
],
},
},
});

View File

@@ -0,0 +1,95 @@
// lib/types/utils.ts
var decoder = new TextDecoder();
var toUTF8String = (input, start = 0, end = input.length) => decoder.decode(input.slice(start, end));
// lib/types/svg.ts
var svgReg = /<svg\s([^>"']|"[^"]*"|'[^']*')*>/;
var extractorRegExps = {
height: /\sheight=(['"])([^%]+?)\1/,
root: svgReg,
viewbox: /\sviewBox=(['"])(.+?)\1/i,
width: /\swidth=(['"])([^%]+?)\1/
};
var INCH_CM = 2.54;
var units = {
in: 96,
cm: 96 / INCH_CM,
em: 16,
ex: 8,
m: 96 / INCH_CM * 100,
mm: 96 / INCH_CM / 10,
pc: 96 / 72 / 12,
pt: 96 / 72,
px: 1
};
var unitsReg = new RegExp(
`^([0-9.]+(?:e\\d+)?)(${Object.keys(units).join("|")})?$`
);
function parseLength(len) {
const m = unitsReg.exec(len);
if (!m) {
return void 0;
}
return Math.round(Number(m[1]) * (units[m[2]] || 1));
}
function parseViewbox(viewbox) {
const bounds = viewbox.split(" ");
return {
height: parseLength(bounds[3]),
width: parseLength(bounds[2])
};
}
function parseAttributes(root) {
const width = root.match(extractorRegExps.width);
const height = root.match(extractorRegExps.height);
const viewbox = root.match(extractorRegExps.viewbox);
return {
height: height && parseLength(height[2]),
viewbox: viewbox && parseViewbox(viewbox[2]),
width: width && parseLength(width[2])
};
}
function calculateByDimensions(attrs) {
return {
height: attrs.height,
width: attrs.width
};
}
function calculateByViewbox(attrs, viewbox) {
const ratio = viewbox.width / viewbox.height;
if (attrs.width) {
return {
height: Math.floor(attrs.width / ratio),
width: attrs.width
};
}
if (attrs.height) {
return {
height: attrs.height,
width: Math.floor(attrs.height * ratio)
};
}
return {
height: viewbox.height,
width: viewbox.width
};
}
var SVG = {
// Scan only the first kilo-byte to speed up the check on larger files
validate: (input) => svgReg.test(toUTF8String(input, 0, 1e3)),
calculate(input) {
const root = toUTF8String(input).match(extractorRegExps.root);
if (root) {
const attrs = parseAttributes(root[0]);
if (attrs.width && attrs.height) {
return calculateByDimensions(attrs);
}
if (attrs.viewbox) {
return calculateByViewbox(attrs, attrs.viewbox);
}
}
throw new TypeError("Invalid SVG");
}
};
export { SVG };

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAIH,+CAAmD;AAA1C,2GAAA,cAAc,OAAA;AAIvB,2CAAuD;AAA9C,yGAAA,WAAW,OAAA;AAAE,wGAAA,UAAU,OAAA;AAChC,2DAAgF;AAAvE,0HAAA,oBAAoB,OAAA;AAAE,wHAAA,kBAAkB,OAAA;AACjD,6CAA4C;AAAnC,0GAAA,WAAW,OAAA;AACpB,6DAA4D;AAAnD,0HAAA,mBAAmB,OAAA;AAE5B,qCAAqC;AACxB,QAAA,IAAI,GAAG,cAAO,CAAC,WAAW,EAAE,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport type { Logger } from './types/Logger';\nexport type { LoggerProvider } from './types/LoggerProvider';\nexport { SeverityNumber } from './types/LogRecord';\nexport type { LogAttributes, LogBody, LogRecord } from './types/LogRecord';\nexport type { LoggerOptions } from './types/LoggerOptions';\nexport type { AnyValue, AnyValueMap } from './types/AnyValue';\nexport { NOOP_LOGGER, NoopLogger } from './NoopLogger';\nexport { NOOP_LOGGER_PROVIDER, NoopLoggerProvider } from './NoopLoggerProvider';\nexport { ProxyLogger } from './ProxyLogger';\nexport { ProxyLoggerProvider } from './ProxyLoggerProvider';\n\nimport { LogsAPI } from './api/logs';\nexport const logs = LogsAPI.getInstance();\n"]}

View File

@@ -0,0 +1,6 @@
export * from './performance';
export * from './replay';
export * from './replayFrame';
export * from './request';
export * from './rrweb';
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,2 @@
import { Options } from './';
export declare function format(code: string, options: Options): Promise<string>;

View File

@@ -0,0 +1,44 @@
/**
* Transforms various forms of columns into `ColumnPreference[]` which is what is stored in the user's preferences table
* In React state, for example, columns are stored in in their entirety, including React components: `[{ accessor: 'title', active: true, Label: React.ReactNode, ... }]`
* In the URL, they are stored as an array of strings: `['title', '-slug']`, where the `-` prefix is used to indicate that the column is inactive
* However in the database, columns must be in this exact shape: `[{ accessor: 'title', active: true }, { accessor: 'slug', active: false }]`
* This means that when handling columns, they need to be consistently transformed back and forth
*/ export const transformColumnsToPreferences = (columns)=>{
if (!columns) {
return undefined;
}
let columnsToTransform = columns;
// Columns that originate from the URL are a stringified JSON array and need to be parsed first
if (typeof columns === 'string') {
try {
columnsToTransform = JSON.parse(columns);
} catch (e) {
console.error('Error parsing columns', columns, e); // eslint-disable-line no-console
}
}
if (columnsToTransform && Array.isArray(columnsToTransform)) {
return columnsToTransform.map((col)=>{
if (typeof col === 'string') {
const active = col[0] !== '-';
return {
accessor: active ? col : col.slice(1),
active
};
}
return {
accessor: col.accessor,
active: col.active
};
});
}
};
/**
* Does the opposite of `transformColumnsToPreferences`, where `ColumnPreference[]` and `Column[]` are transformed into `ColumnsFromURL`
* This is useful for storing the columns in the URL, where it appears as a simple comma delimited array of strings
* The `-` prefix is used to indicate that the column is inactive
*/ export const transformColumnsToSearchParams = (columns)=>{
return columns?.map((col)=>col.active ? col.accessor : `-${col.accessor}`);
};
//# sourceMappingURL=transformColumnPreferences.js.map

View File

@@ -0,0 +1,96 @@
import { setDay } from "../../../setDay.js";
import { Parser } from "../Parser.js";
import { mapValue, parseNDigits } from "../utils.js";
// Stand-alone local day of week
export class StandAloneLocalDayParser extends Parser {
priority = 90;
parse(dateString, token, match, options) {
const valueCallback = (value) => {
// We want here floor instead of trunc, so we get -7 for value 0 instead of 0
const wholeWeekDays = Math.floor((value - 1) / 7) * 7;
return ((value + options.weekStartsOn + 6) % 7) + wholeWeekDays;
};
switch (token) {
// 3
case "c":
case "cc": // 03
return mapValue(parseNDigits(token.length, dateString), valueCallback);
// 3rd
case "co":
return mapValue(
match.ordinalNumber(dateString, {
unit: "day",
}),
valueCallback,
);
// Tue
case "ccc":
return (
match.day(dateString, {
width: "abbreviated",
context: "standalone",
}) ||
match.day(dateString, { width: "short", context: "standalone" }) ||
match.day(dateString, { width: "narrow", context: "standalone" })
);
// T
case "ccccc":
return match.day(dateString, {
width: "narrow",
context: "standalone",
});
// Tu
case "cccccc":
return (
match.day(dateString, { width: "short", context: "standalone" }) ||
match.day(dateString, { width: "narrow", context: "standalone" })
);
// Tuesday
case "cccc":
default:
return (
match.day(dateString, { width: "wide", context: "standalone" }) ||
match.day(dateString, {
width: "abbreviated",
context: "standalone",
}) ||
match.day(dateString, { width: "short", context: "standalone" }) ||
match.day(dateString, { width: "narrow", context: "standalone" })
);
}
}
validate(_date, value) {
return value >= 0 && value <= 6;
}
set(date, _flags, value, options) {
date = setDay(date, value, options);
date.setHours(0, 0, 0, 0);
return date;
}
incompatibleTokens = [
"y",
"R",
"u",
"q",
"Q",
"M",
"L",
"I",
"d",
"D",
"E",
"i",
"e",
"t",
"T",
];
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"randomSafeContext.d.ts","sourceRoot":"","sources":["../../../src/utils/randomSafeContext.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;AAKlE;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC,CAgBvD;AAED;;;GAGG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAED;;;GAGG;AACH,wBAAgB,WAAW,IAAI,MAAM,CAEpC"}

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"userfeedback.js","sources":["../../../../src/userfeedback.ts"],"sourcesContent":["import type { DsnComponents, EventEnvelope, SdkMetadata, UserFeedback, UserFeedbackItem } from '@sentry/core';\nimport { createEnvelope, dsnToString } from '@sentry/core';\n\n/**\n * Creates an envelope from a user feedback.\n */\nexport function createUserFeedbackEnvelope(\n feedback: UserFeedback,\n {\n metadata,\n tunnel,\n dsn,\n }: {\n metadata: SdkMetadata | undefined;\n tunnel: string | undefined;\n dsn: DsnComponents | undefined;\n },\n): EventEnvelope {\n const headers: EventEnvelope[0] = {\n event_id: feedback.event_id,\n sent_at: new Date().toISOString(),\n ...(metadata?.sdk && {\n sdk: {\n name: metadata.sdk.name,\n version: metadata.sdk.version,\n },\n }),\n ...(!!tunnel && !!dsn && { dsn: dsnToString(dsn) }),\n };\n const item = createUserFeedbackEnvelopeItem(feedback);\n\n return createEnvelope(headers, [item]);\n}\n\nfunction createUserFeedbackEnvelopeItem(feedback: UserFeedback): UserFeedbackItem {\n const feedbackHeaders: UserFeedbackItem[0] = {\n type: 'user_report',\n };\n return [feedbackHeaders, feedback];\n}\n"],"names":[],"mappings":";;AAGA;AACA;AACA;AACO,SAAS,0BAA0B;AAC1C,EAAE,QAAQ;AACV,EAAE;AACF,IAAI,QAAQ;AACZ,IAAI,MAAM;AACV,IAAI,GAAG;AACP;;AAIE;AACF,EAAiB;AACjB,EAAE,MAAM,OAAO,GAAqB;AACpC,IAAI,QAAQ,EAAE,QAAQ,CAAC,QAAQ;AAC/B,IAAI,OAAO,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;AACrC,IAAI,IAAI,QAAQ,EAAE,OAAO;AACzB,MAAM,GAAG,EAAE;AACX,QAAQ,IAAI,EAAE,QAAQ,CAAC,GAAG,CAAC,IAAI;AAC/B,QAAQ,OAAO,EAAE,QAAQ,CAAC,GAAG,CAAC,OAAO;AACrC,OAAO;AACP,KAAK,CAAC;AACN,IAAI,IAAI,CAAC,CAAC,MAAA,IAAU,CAAC,CAAC,GAAA,IAAO,EAAE,GAAG,EAAE,WAAW,CAAC,GAAG,CAAA,EAAG,CAAC;AACvD,GAAG;AACH,EAAE,MAAM,IAAA,GAAO,8BAA8B,CAAC,QAAQ,CAAC;;AAEvD,EAAE,OAAO,cAAc,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,CAAC;AACxC;;AAEA,SAAS,8BAA8B,CAAC,QAAQ,EAAkC;AAClF,EAAE,MAAM,eAAe,GAAwB;AAC/C,IAAI,IAAI,EAAE,aAAa;AACvB,GAAG;AACH,EAAE,OAAO,CAAC,eAAe,EAAE,QAAQ,CAAC;AACpC;;;;"}

View File

@@ -0,0 +1,31 @@
/**
*
* common
*
*/
/**
* Parameters for GraphQL's request for execution.
*
* Reference: https://graphql.github.io/graphql-over-http/draft/#sec-Request-Parameters
*
* @category Common
*/
export interface RequestParams {
operationName?: string | null | undefined;
query: string;
variables?: Record<string, unknown> | null | undefined;
extensions?: Record<string, unknown> | null | undefined;
}
/**
* A representation of any set of values over any amount of time.
*
* @category Common
*/
export interface Sink<T = unknown> {
/** Next value arriving. */
next(value: T): void;
/** An error that has occurred. This function "closes" the sink. */
error(error: unknown): void;
/** The sink has completed. This function "closes" the sink. */
complete(): void;
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"scaling.js","sources":["../../../src/icons/scaling.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Scaling\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTIgM0g1YTIgMiAwIDAgMC0yIDJ2MTRhMiAyIDAgMCAwIDIgMmgxNGEyIDIgMCAwIDAgMi0ydi03IiAvPgogIDxwYXRoIGQ9Ik0xNCAxNUg5di01IiAvPgogIDxwYXRoIGQ9Ik0xNiAzaDV2NSIgLz4KICA8cGF0aCBkPSJNMjEgMyA5IDE1IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/scaling\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 Scaling = createLucideIcon('Scaling', [\n ['path', { d: 'M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7', key: '1m0v6g' }],\n ['path', { d: 'M14 15H9v-5', key: 'pi4jk9' }],\n ['path', { d: 'M16 3h5v5', key: '1806ms' }],\n ['path', { d: 'M21 3 9 15', key: '15kdhq' }],\n]);\n\nexport default Scaling;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,iBAAiB,SAAW,CAAA,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA8D,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC3F,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,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,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,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC7C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,74 @@
import { InstrumentationBase, InstrumentationNodeModuleDefinition, InstrumentationNodeModuleFile } from '@opentelemetry/instrumentation';
import { SDK_VERSION, getClient, instrumentStateGraphCompile } from '@sentry/core';
const supportedVersions = ['>=0.0.0 <2.0.0'];
/**
* Sentry LangGraph instrumentation using OpenTelemetry.
*/
class SentryLangGraphInstrumentation extends InstrumentationBase {
constructor(config = {}) {
super('@sentry/instrumentation-langgraph', SDK_VERSION, config);
}
/**
* Initializes the instrumentation by defining the modules to be patched.
*/
init() {
const module = new InstrumentationNodeModuleDefinition(
'@langchain/langgraph',
supportedVersions,
this._patch.bind(this),
exports$1 => exports$1,
[
new InstrumentationNodeModuleFile(
/**
* In CJS, LangGraph packages re-export from dist/index.cjs files.
* Patching only the root module sometimes misses the real implementation or
* gets overwritten when that file is loaded. We add a file-level patch so that
* _patch runs again on the concrete implementation
*/
'@langchain/langgraph/dist/index.cjs',
supportedVersions,
this._patch.bind(this),
exports$1 => exports$1,
),
],
);
return module;
}
/**
* Core patch logic applying instrumentation to the LangGraph module.
*/
_patch(exports$1) {
const client = getClient();
const defaultPii = Boolean(client?.getOptions().sendDefaultPii);
const config = this.getConfig();
const recordInputs = config.recordInputs ?? defaultPii;
const recordOutputs = config.recordOutputs ?? defaultPii;
const options = {
recordInputs,
recordOutputs,
};
// Patch StateGraph.compile to instrument both compile() and invoke()
if (exports$1.StateGraph && typeof exports$1.StateGraph === 'function') {
const StateGraph = exports$1.StateGraph
;
StateGraph.prototype.compile = instrumentStateGraphCompile(
StateGraph.prototype.compile ,
options,
);
}
return exports$1;
}
}
export { SentryLangGraphInstrumentation };
//# sourceMappingURL=instrumentation.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../src/config/util.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,GAAG,SAAS,CAcrD;AAUD;;;;;;GAMG;AACH,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CA4BtE;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAiC/D;AAED;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CA6CpE;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,IAAI,WAAW,GAAG,SAAS,CAW7D;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAgB5E"}

View File

@@ -0,0 +1,36 @@
import { DirectusDashboard } from "../../../schema/dashboard.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/update/dashboards.d.ts
type UpdateDashboardOutput<Schema, TQuery extends Query<Schema, Item>, Item extends object = DirectusDashboard<Schema>> = ApplyQueryFields<Schema, Item, TQuery['fields']>;
/**
* Update multiple existing dashboards.
* @param keys
* @param item
* @param query
* @returns Returns the dashboard objects for the updated dashboards.
* @throws Will throw if keys is empty
*/
declare const updateDashboards: <Schema, const TQuery extends Query<Schema, DirectusDashboard<Schema>>>(keys: DirectusDashboard<Schema>["id"][], item: NestedPartial<DirectusDashboard<Schema>>, query?: TQuery) => RestCommand<UpdateDashboardOutput<Schema, TQuery>[], Schema>;
/**
* Update multiple dashboards as batch.
* @param items
* @param query
* @returns Returns the dashboard objects for the updated dashboards.
*/
declare const updateDashboardsBatch: <Schema, const TQuery extends Query<Schema, DirectusDashboard<Schema>>>(items: NestedPartial<DirectusDashboard<Schema>>[], query?: TQuery) => RestCommand<UpdateDashboardOutput<Schema, TQuery>[], Schema>;
/**
* Update an existing dashboard.
* @param key
* @param item
* @param query
* @returns Returns the dashboard object for the updated dashboard.
* @throws Will throw if key is empty
*/
declare const updateDashboard: <Schema, const TQuery extends Query<Schema, DirectusDashboard<Schema>>>(key: DirectusDashboard<Schema>["id"], item: NestedPartial<DirectusDashboard<Schema>>, query?: TQuery) => RestCommand<UpdateDashboardOutput<Schema, TQuery>, Schema>;
//#endregion
export { UpdateDashboardOutput, updateDashboard, updateDashboards, updateDashboardsBatch };
//# sourceMappingURL=dashboards.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"extractID.d.ts","sourceRoot":"","sources":["../../src/utilities/extractID.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,GAAI,MAAM,SAAS,MAAM,GAAG,MAAM,cAC1C;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,KAClC,MAMF,CAAA"}

View File

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

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 PenLine = createLucideIcon("PenLine", [
["path", { d: "M12 20h9", key: "t2du7b" }],
[
"path",
{
d: "M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",
key: "1ykcvy"
}
]
]);
export { PenLine as default };
//# sourceMappingURL=pen-line.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/find/chainMethods.ts"],"sourcesContent":["/**\n * @deprecated - will be removed in 4.0. Use query + $dynamic() instead: https://orm.drizzle.team/docs/dynamic-query-building\n */\nexport type ChainedMethods = {\n args: unknown[]\n method: string\n}[]\n\n/**\n * Call and returning methods that would normally be chained together but cannot be because of control logic\n * @param methods\n * @param query\n *\n * @deprecated - will be removed in 4.0. Use query + $dynamic() instead: https://orm.drizzle.team/docs/dynamic-query-building\n */\nconst chainMethods = <T>({ methods, query }: { methods: ChainedMethods; query: T }): T => {\n return methods.reduce((query, { args, method }) => {\n return query[method](...args)\n }, query)\n}\n\nexport { chainMethods }\n"],"names":["chainMethods","methods","query","reduce","args","method"],"mappings":"AAAA;;CAEC,GAMD;;;;;;CAMC,GACD,MAAMA,eAAe,CAAI,EAAEC,OAAO,EAAEC,KAAK,EAAyC;IAChF,OAAOD,QAAQE,MAAM,CAAC,CAACD,OAAO,EAAEE,IAAI,EAAEC,MAAM,EAAE;QAC5C,OAAOH,KAAK,CAACG,OAAO,IAAID;IAC1B,GAAGF;AACL;AAEA,SAASF,YAAY,GAAE"}

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/exports/i18n/pt.ts"],"sourcesContent":["export { pt } from '@payloadcms/translations/languages/pt'\n"],"names":["pt"],"mappings":"AAAA,SAASA,EAAE,QAAQ,wCAAuC"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/elements/CopyLocaleData/index.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAsB,MAAM,OAAO,CAAA;AAgB1C,OAAO,cAAc,CAAA;AAKrB,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAiMlC,CAAA"}

View File

@@ -0,0 +1,28 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var logger_1 = require("../logger");
describe('logger', function () {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
var infoSpy;
beforeEach(function () {
infoSpy = jest.spyOn(console, 'info').mockImplementation(function () {
// do nothing
});
});
afterEach(function () {
infoSpy.mockRestore();
});
it('should call console.info when logger enabled', function () {
var id = Math.random().toString();
var logger = new logger_1.Logger({ id: id, enabled: true });
logger.info('testing');
expect(infoSpy).toHaveBeenLastCalledWith(id, expect.stringMatching(/\d+ms/), 'testing');
});
it("shouldn't call console.info when logger disabled", function () {
var id = Math.random().toString();
var logger = new logger_1.Logger({ id: id, enabled: false });
logger.info('testing');
expect(infoSpy).not.toHaveBeenCalled();
});
});
//# sourceMappingURL=logger.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["_readOnlyError","name","TypeError"],"sources":["../../src/helpers/readOnlyError.ts"],"sourcesContent":["/* @minVersion 7.0.0-beta.0 */\n\nexport default function _readOnlyError(name: string) {\n throw new TypeError('\"' + name + '\" is read-only');\n}\n"],"mappings":";;;;;;AAEe,SAASA,cAAcA,CAACC,IAAY,EAAE;EACnD,MAAM,IAAIC,SAAS,CAAC,GAAG,GAAGD,IAAI,GAAG,gBAAgB,CAAC;AACpD","ignoreList":[]}

View File

@@ -0,0 +1,8 @@
import type { InitializedIntlConfig } from '../core/IntlConfig.js';
import type { Formatters, IntlCache } from '../core/formatters.js';
export type IntlContextValue = InitializedIntlConfig & {
formatters: Formatters;
cache: IntlCache;
};
declare const IntlContext: import("react").Context<IntlContextValue | undefined>;
export default IntlContext;

View File

@@ -0,0 +1,19 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _objectWithoutPropertiesLoose;
function _objectWithoutPropertiesLoose(source, excluded) {
if (source == null) return {};
var target = {};
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
if (excluded.indexOf(key) !== -1) continue;
target[key] = source[key];
}
}
return target;
}
//# sourceMappingURL=objectWithoutPropertiesLoose.js.map

View File

@@ -0,0 +1,62 @@
import { isBuild } from '../utils/isBuild.js';
import { withTracedServerSideDataFetcher, withErrorInstrumentation } from '../utils/wrapperUtils.js';
/**
* Create a wrapped version of the user's exported `getInitialProps` function
*
* @param origGetInitialProps The user's `getInitialProps` function
* @param parameterizedRoute The page's parameterized route
* @returns A wrapped version of the function
*/
function wrapGetInitialPropsWithSentry(origGetInitialProps) {
return new Proxy(origGetInitialProps, {
apply: async (wrappingTarget, thisArg, args) => {
if (isBuild()) {
return wrappingTarget.apply(thisArg, args);
}
const [context] = args;
const { req, res } = context;
const errorWrappedGetInitialProps = withErrorInstrumentation(wrappingTarget);
// Generally we can assume that `req` and `res` are always defined on the server:
// https://nextjs.org/docs/api-reference/data-fetching/get-initial-props#context-object
// This does not seem to be the case in dev mode. Because we have no clean way of associating the the data fetcher
// span with each other when there are no req or res objects, we simply do not trace them at all here.
if (req && res) {
const tracedGetInitialProps = withTracedServerSideDataFetcher(errorWrappedGetInitialProps, req, res, {
dataFetcherRouteName: context.pathname,
requestedRouteName: context.pathname,
dataFetchingMethodName: 'getInitialProps',
});
const {
data: initialProps,
baggage,
sentryTrace,
}
= (await tracedGetInitialProps.apply(thisArg, args)) ?? {}; // Next.js allows undefined to be returned from a getInitialPropsFunction.
if (typeof initialProps === 'object' && initialProps !== null) {
// The Next.js serializer throws on undefined values so we need to guard for it (#12102)
if (sentryTrace) {
(initialProps )._sentryTraceData = sentryTrace;
}
// The Next.js serializer throws on undefined values so we need to guard for it (#12102)
if (baggage) {
(initialProps )._sentryBaggage = baggage;
}
}
return initialProps;
} else {
return errorWrappedGetInitialProps.apply(thisArg, args);
}
},
});
}
export { wrapGetInitialPropsWithSentry };
//# sourceMappingURL=wrapGetInitialPropsWithSentry.js.map

View File

@@ -0,0 +1,26 @@
import { promise } from './promise.js';
export const traverseFields = async ({ id, blockData, collection, context, doc, fields, overrideAccess, parentIndexPath, parentIsLocalized, parentPath, parentSchemaPath, req, siblingDoc })=>{
const promises = [];
fields.forEach((field, fieldIndex)=>{
promises.push(promise({
id,
blockData,
collection,
context,
doc,
field,
fieldIndex,
overrideAccess,
parentIndexPath,
parentIsLocalized,
parentPath,
parentSchemaPath,
req,
siblingDoc,
siblingFields: fields
}));
});
await Promise.all(promises);
};
//# sourceMappingURL=traverseFields.js.map

View File

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

View File

@@ -0,0 +1,20 @@
import { JOSENotSupported } from '../util/errors.js';
import random from '../runtime/random.js';
export function bitLength(alg) {
switch (alg) {
case 'A128GCM':
return 128;
case 'A192GCM':
return 192;
case 'A256GCM':
case 'A128CBC-HS256':
return 256;
case 'A192CBC-HS384':
return 384;
case 'A256CBC-HS512':
return 512;
default:
throw new JOSENotSupported(`Unsupported JWE Algorithm: ${alg}`);
}
}
export default (alg) => random(new Uint8Array(bitLength(alg) >> 3));

View File

@@ -0,0 +1,78 @@
import { constructFrom } from "./constructFrom.mjs";
import { startOfWeek } from "./startOfWeek.mjs";
import { toDate } from "./toDate.mjs";
import { getDefaultOptions } from "./_lib/defaultOptions.mjs";
/**
* The {@link getWeekYear} function options.
*/
/**
* @name getWeekYear
* @category Week-Numbering Year Helpers
* @summary Get the local week-numbering year of the given date.
*
* @description
* Get the local week-numbering year of the given date.
* The exact calculation depends on the values of
* `options.weekStartsOn` (which is the index of the first day of the week)
* and `options.firstWeekContainsDate` (which is the day of January, which is always in
* the first week of the week-numbering year)
*
* Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system
*
* @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 - An object with options.
*
* @returns The local week-numbering year
*
* @example
* // Which week numbering year is 26 December 2004 with the default settings?
* const result = getWeekYear(new Date(2004, 11, 26))
* //=> 2005
*
* @example
* // Which week numbering year is 26 December 2004 if week starts on Saturday?
* const result = getWeekYear(new Date(2004, 11, 26), { weekStartsOn: 6 })
* //=> 2004
*
* @example
* // Which week numbering year is 26 December 2004 if the first week contains 4 January?
* const result = getWeekYear(new Date(2004, 11, 26), { firstWeekContainsDate: 4 })
* //=> 2004
*/
export function getWeekYear(date, options) {
const _date = toDate(date);
const year = _date.getFullYear();
const defaultOptions = getDefaultOptions();
const firstWeekContainsDate =
options?.firstWeekContainsDate ??
options?.locale?.options?.firstWeekContainsDate ??
defaultOptions.firstWeekContainsDate ??
defaultOptions.locale?.options?.firstWeekContainsDate ??
1;
const firstWeekOfNextYear = constructFrom(date, 0);
firstWeekOfNextYear.setFullYear(year + 1, 0, firstWeekContainsDate);
firstWeekOfNextYear.setHours(0, 0, 0, 0);
const startOfNextYear = startOfWeek(firstWeekOfNextYear, options);
const firstWeekOfThisYear = constructFrom(date, 0);
firstWeekOfThisYear.setFullYear(year, 0, firstWeekContainsDate);
firstWeekOfThisYear.setHours(0, 0, 0, 0);
const startOfThisYear = startOfWeek(firstWeekOfThisYear, options);
if (_date.getTime() >= startOfNextYear.getTime()) {
return year + 1;
} else if (_date.getTime() >= startOfThisYear.getTime()) {
return year;
} else {
return year - 1;
}
}
// Fallback for modularized imports:
export default getWeekYear;

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","names":["React","components","SelectComponents","Input","props","_jsx","Fragment","undefined"],"sources":["../../../../src/elements/ReactSelect/Input/index.tsx"],"sourcesContent":["'use client'\nimport type { InputProps } from 'react-select'\n\nimport React from 'react'\nimport { components as SelectComponents } from 'react-select'\n\nimport type { Option } from '../types.js'\n\nexport const Input: React.FC<InputProps<Option, any>> = (props) => {\n return (\n <React.Fragment>\n <SelectComponents.Input\n {...props}\n /**\n * Adding `aria-activedescendant` fixes hydration error\n * source: https://github.com/JedWatson/react-select/issues/5459#issuecomment-1878037196\n */\n aria-activedescendant={undefined}\n />\n </React.Fragment>\n )\n}\n"],"mappings":"AAAA;;;AAGA,OAAOA,KAAA,MAAW;AAClB,SAASC,UAAA,IAAcC,gBAAgB,QAAQ;AAI/C,OAAO,MAAMC,KAAA,GAA4CC,KAAA;EACvD,oBACEC,IAAA,CAACL,KAAA,CAAMM,QAAQ;cACb,aAAAD,IAAA,CAACH,gBAAA,CAAiBC,KAAK;MACpB,GAAGC,KAAK;MACT;;;;MAIA,yBAAuBG;;;AAI/B","ignoreList":[]}

View File

@@ -0,0 +1,2 @@
export { spotlightBrowserIntegration } from '../integrations/spotlight';
//# sourceMappingURL=index.spotlight.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"mergeHeaders.d.ts","sourceRoot":"","sources":["../../src/utilities/mergeHeaders.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,kBAAmB,OAAO,sBAAsB,OAAO,KAAG,OAUlF,CAAA"}

View File

@@ -0,0 +1,24 @@
/**
* @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 SprayCan = createLucideIcon("SprayCan", [
["path", { d: "M3 3h.01", key: "159qn6" }],
["path", { d: "M7 5h.01", key: "1hq22a" }],
["path", { d: "M11 7h.01", key: "1osv80" }],
["path", { d: "M3 7h.01", key: "1xzrh3" }],
["path", { d: "M7 9h.01", key: "19b3jx" }],
["path", { d: "M3 11h.01", key: "1eifu7" }],
["rect", { width: "4", height: "4", x: "15", y: "5", key: "mri9e4" }],
["path", { d: "m19 9 2 2v10c0 .6-.4 1-1 1h-6c-.6 0-1-.4-1-1V11l2-2", key: "aib6hk" }],
["path", { d: "m13 14 8-2", key: "1d7bmk" }],
["path", { d: "m13 19 8-2", key: "1y2vml" }]
]);
export { SprayCan as default };
//# sourceMappingURL=spray-can.js.map

View File

@@ -0,0 +1,3 @@
export declare const MODULE_NAME = "knex";
export declare const SUPPORTED_VERSIONS: string[];
//# sourceMappingURL=constants.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"timeout.js","sourceRoot":"","sources":["../../../src/utils/timeout.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH;;GAEG;AACH,MAAa,YAAa,SAAQ,KAAK;IACrC,YAAY,OAAgB;QAC1B,KAAK,CAAC,OAAO,CAAC,CAAC;QAEf,0FAA0F;QAC1F,6IAA6I;QAC7I,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC;IACtD,CAAC;CACF;AARD,oCAQC;AAED;;;;;;;;GAQG;AACH,SAAgB,eAAe,CAC7B,OAAmB,EACnB,OAAe;IAEf,IAAI,aAA4C,CAAC;IAEjD,MAAM,cAAc,GAAG,IAAI,OAAO,CAAQ,SAAS,eAAe,CAChE,QAAQ,EACR,MAAM;QAEN,aAAa,GAAG,UAAU,CAAC,SAAS,cAAc;YAChD,MAAM,CAAC,IAAI,YAAY,CAAC,sBAAsB,CAAC,CAAC,CAAC;QACnD,CAAC,EAAE,OAAO,CAAC,CAAC;IACd,CAAC,CAAC,CAAC;IAEH,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC,IAAI,CACjD,MAAM,CAAC,EAAE;QACP,YAAY,CAAC,aAAa,CAAC,CAAC;QAC5B,OAAO,MAAM,CAAC;IAChB,CAAC,EACD,MAAM,CAAC,EAAE;QACP,YAAY,CAAC,aAAa,CAAC,CAAC;QAC5B,MAAM,MAAM,CAAC;IACf,CAAC,CACF,CAAC;AACJ,CAAC;AAzBD,0CAyBC","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\n/**\n * Error that is thrown on timeouts.\n */\nexport class TimeoutError extends Error {\n constructor(message?: string) {\n super(message);\n\n // manually adjust prototype to retain `instanceof` functionality when targeting ES5, see:\n // https://github.com/Microsoft/TypeScript-wiki/blob/main/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work\n Object.setPrototypeOf(this, TimeoutError.prototype);\n }\n}\n\n/**\n * Adds a timeout to a promise and rejects if the specified timeout has elapsed. Also rejects if the specified promise\n * rejects, and resolves if the specified promise resolves.\n *\n * <p> NOTE: this operation will continue even after it throws a {@link TimeoutError}.\n *\n * @param promise promise to use with timeout.\n * @param timeout the timeout in milliseconds until the returned promise is rejected.\n */\nexport function callWithTimeout<T>(\n promise: Promise<T>,\n timeout: number\n): Promise<T> {\n let timeoutHandle: ReturnType<typeof setTimeout>;\n\n const timeoutPromise = new Promise<never>(function timeoutFunction(\n _resolve,\n reject\n ) {\n timeoutHandle = setTimeout(function timeoutHandler() {\n reject(new TimeoutError('Operation timed out.'));\n }, timeout);\n });\n\n return Promise.race([promise, timeoutPromise]).then(\n result => {\n clearTimeout(timeoutHandle);\n return result;\n },\n reason => {\n clearTimeout(timeoutHandle);\n throw reason;\n }\n );\n}\n"]}

View File

@@ -0,0 +1,390 @@
const { test } = require('node:test')
const { strict: assert } = require('node:assert')
const slowRedact = require('../index.js')
const fastRedact = require('fast-redact')
test('integration: basic path redaction matches fast-redact', () => {
const obj = {
headers: {
cookie: 'secret-cookie',
authorization: 'Bearer token'
},
body: { message: 'hello' }
}
const slowResult = slowRedact({ paths: ['headers.cookie'] })(obj)
const fastResult = fastRedact({ paths: ['headers.cookie'] })(obj)
assert.strictEqual(slowResult, fastResult)
})
test('integration: multiple paths match fast-redact', () => {
const obj = {
user: { name: 'john', password: 'secret' },
session: { token: 'abc123' }
}
const paths = ['user.password', 'session.token']
const slowResult = slowRedact({ paths })(obj)
const fastResult = fastRedact({ paths })(obj)
assert.strictEqual(slowResult, fastResult)
})
test('integration: custom censor value matches fast-redact', () => {
const obj = { secret: 'hidden' }
const options = { paths: ['secret'], censor: '***' }
const slowResult = slowRedact(options)(obj)
const fastResult = fastRedact(options)(obj)
assert.strictEqual(slowResult, fastResult)
})
test('integration: bracket notation matches fast-redact', () => {
const obj = {
'weird-key': { 'another-weird': 'secret' },
normal: 'public'
}
const options = { paths: ['["weird-key"]["another-weird"]'] }
const slowResult = slowRedact(options)(obj)
const fastResult = fastRedact(options)(obj)
assert.strictEqual(slowResult, fastResult)
})
test('integration: array paths match fast-redact', () => {
const obj = {
users: [
{ name: 'john', password: 'secret1' },
{ name: 'jane', password: 'secret2' }
]
}
const options = { paths: ['users[0].password', 'users[1].password'] }
const slowResult = slowRedact(options)(obj)
const fastResult = fastRedact(options)(obj)
assert.strictEqual(slowResult, fastResult)
})
test('integration: wildcard at end matches fast-redact', () => {
const obj = {
secrets: {
key1: 'secret1',
key2: 'secret2'
},
public: 'data'
}
const options = { paths: ['secrets.*'] }
const slowResult = slowRedact(options)(obj)
const fastResult = fastRedact(options)(obj)
assert.strictEqual(slowResult, fastResult)
})
test('integration: wildcard with arrays matches fast-redact', () => {
const obj = {
items: ['secret1', 'secret2', 'secret3']
}
const options = { paths: ['items.*'] }
const slowResult = slowRedact(options)(obj)
const fastResult = fastRedact(options)(obj)
assert.strictEqual(slowResult, fastResult)
})
test('integration: intermediate wildcard matches fast-redact', () => {
const obj = {
users: {
user1: { password: 'secret1' },
user2: { password: 'secret2' }
}
}
const options = { paths: ['users.*.password'] }
const slowResult = slowRedact(options)(obj)
const fastResult = fastRedact(options)(obj)
assert.strictEqual(slowResult, fastResult)
})
test('integration: custom serialize function matches fast-redact', () => {
const obj = { secret: 'hidden', public: 'data' }
const options = {
paths: ['secret'],
serialize: (obj) => `custom:${JSON.stringify(obj)}`
}
const slowResult = slowRedact(options)(obj)
const fastResult = fastRedact(options)(obj)
assert.strictEqual(slowResult, fastResult)
})
test('integration: nested paths match fast-redact', () => {
const obj = {
level1: {
level2: {
level3: {
secret: 'hidden'
}
}
}
}
const options = { paths: ['level1.level2.level3.secret'] }
const slowResult = slowRedact(options)(obj)
const fastResult = fastRedact(options)(obj)
assert.strictEqual(slowResult, fastResult)
})
test('integration: non-existent paths match fast-redact', () => {
const obj = { existing: 'value' }
const options = { paths: ['nonexistent.path'] }
const slowResult = slowRedact(options)(obj)
const fastResult = fastRedact(options)(obj)
assert.strictEqual(slowResult, fastResult)
})
test('integration: null and undefined handling - legitimate difference', () => {
const obj = {
nullValue: null,
undefinedValue: undefined,
nested: {
nullValue: null
}
}
const options = { paths: ['nullValue', 'nested.nullValue'] }
const slowResult = slowRedact(options)(obj)
const fastResult = fastRedact(options)(obj)
// This is a legitimate behavioral difference:
// @pinojs/redact redacts null values, fast-redact doesn't
const slowParsed = JSON.parse(slowResult)
const fastParsed = JSON.parse(fastResult)
// @pinojs/redact redacts nulls
assert.strictEqual(slowParsed.nullValue, '[REDACTED]')
assert.strictEqual(slowParsed.nested.nullValue, '[REDACTED]')
// fast-redact preserves nulls
assert.strictEqual(fastParsed.nullValue, null)
assert.strictEqual(fastParsed.nested.nullValue, null)
})
test('integration: strict mode with primitives - different error handling', () => {
const options = { paths: ['test'], strict: true }
const slowRedactFn = slowRedact(options)
const fastRedactFn = fastRedact(options)
// @pinojs/redact handles primitives gracefully
const stringSlowResult = slowRedactFn('primitive')
assert.strictEqual(stringSlowResult, '"primitive"')
const numberSlowResult = slowRedactFn(42)
assert.strictEqual(numberSlowResult, '42')
// fast-redact throws an error for primitives in strict mode
assert.throws(() => {
fastRedactFn('primitive')
}, /primitives cannot be redacted/)
assert.throws(() => {
fastRedactFn(42)
}, /primitives cannot be redacted/)
})
test('integration: serialize false behavior difference', () => {
const slowObj = { secret: 'hidden' }
const fastObj = { secret: 'hidden' }
const options = { paths: ['secret'], serialize: false }
const slowResult = slowRedact(options)(slowObj)
const fastResult = fastRedact(options)(fastObj)
// Both should redact the secret
assert.strictEqual(slowResult.secret, '[REDACTED]')
assert.strictEqual(fastResult.secret, '[REDACTED]')
// @pinojs/redact always has restore method
assert.strictEqual(typeof slowResult.restore, 'function')
// @pinojs/redact should restore to original value
assert.strictEqual(slowResult.restore().secret, 'hidden')
// Key difference: original object state
// fast-redact mutates the original, @pinojs/redact doesn't
assert.strictEqual(slowObj.secret, 'hidden') // @pinojs/redact preserves original
assert.strictEqual(fastObj.secret, '[REDACTED]') // fast-redact mutates original
})
test('integration: censor function behavior', () => {
const obj = { secret: 'hidden' }
const options = {
paths: ['secret'],
censor: (value, path) => `REDACTED:${path}`
}
const slowResult = slowRedact(options)(obj)
const fastResult = fastRedact(options)(obj)
assert.strictEqual(slowResult, fastResult)
})
test('integration: complex object with mixed patterns', () => {
const obj = {
users: [
{
id: 1,
name: 'john',
credentials: { password: 'secret1', apiKey: 'key1' }
},
{
id: 2,
name: 'jane',
credentials: { password: 'secret2', apiKey: 'key2' }
}
],
config: {
database: { password: 'db-secret' },
api: { keys: ['key1', 'key2', 'key3'] }
}
}
const options = {
paths: [
'users.*.credentials.password',
'users.*.credentials.apiKey',
'config.database.password',
'config.api.keys.*'
]
}
const slowResult = slowRedact(options)(obj)
const fastResult = fastRedact(options)(obj)
assert.strictEqual(slowResult, fastResult)
})
// Remove option integration tests - comparing with fast-redact
test('integration: remove option basic comparison with fast-redact', () => {
const obj = { username: 'john', password: 'secret123' }
const options = { paths: ['password'], remove: true }
const slowResult = slowRedact(options)(obj)
const fastResult = fastRedact(options)(obj)
assert.strictEqual(slowResult, fastResult)
// Verify the key is actually removed
const parsed = JSON.parse(slowResult)
assert.strictEqual(parsed.username, 'john')
assert.strictEqual('password' in parsed, false)
})
test('integration: remove option multiple paths comparison with fast-redact', () => {
const obj = {
user: { name: 'john', password: 'secret' },
session: { token: 'abc123', id: 'session1' }
}
const options = {
paths: ['user.password', 'session.token'],
remove: true
}
const slowResult = slowRedact(options)(obj)
const fastResult = fastRedact(options)(obj)
assert.strictEqual(slowResult, fastResult)
})
test('integration: remove option wildcard comparison with fast-redact', () => {
const obj = {
secrets: {
key1: 'secret1',
key2: 'secret2'
},
public: 'data'
}
const options = {
paths: ['secrets.*'],
remove: true
}
const slowResult = slowRedact(options)(obj)
const fastResult = fastRedact(options)(obj)
assert.strictEqual(slowResult, fastResult)
})
test('integration: remove option intermediate wildcard comparison with fast-redact', () => {
const obj = {
users: {
user1: { password: 'secret1', name: 'john' },
user2: { password: 'secret2', name: 'jane' }
}
}
const options = {
paths: ['users.*.password'],
remove: true
}
const slowResult = slowRedact(options)(obj)
const fastResult = fastRedact(options)(obj)
assert.strictEqual(slowResult, fastResult)
})
test('integration: remove option with custom censor comparison with fast-redact', () => {
const obj = { secret: 'hidden', public: 'data' }
const options = {
paths: ['secret'],
censor: '***',
remove: true
}
const slowResult = slowRedact(options)(obj)
const fastResult = fastRedact(options)(obj)
assert.strictEqual(slowResult, fastResult)
// With remove: true, censor value should be ignored
const parsed = JSON.parse(slowResult)
assert.strictEqual('secret' in parsed, false)
assert.strictEqual(parsed.public, 'data')
})
test('integration: remove option serialize false behavior - @pinojs/redact only', () => {
// fast-redact doesn't support remove option with serialize: false
// so we test @pinojs/redact's behavior only
const obj = { secret: 'hidden', public: 'data' }
const options = { paths: ['secret'], remove: true, serialize: false }
const result = slowRedact(options)(obj)
// Should have the key removed
assert.strictEqual('secret' in result, false)
assert.strictEqual(result.public, 'data')
// Should have restore method
assert.strictEqual(typeof result.restore, 'function')
// Original object should be preserved
assert.strictEqual(obj.secret, 'hidden')
// Restore should bring back the removed key
const restored = result.restore()
assert.strictEqual(restored.secret, 'hidden')
})

View File

@@ -0,0 +1,203 @@
"use strict";
exports.formatDistance = void 0;
// 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}} సంవత్సరాల",
},
},
};
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;
};
exports.formatDistance = formatDistance;

View File

@@ -0,0 +1,35 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const core = require('@sentry/core');
const helpers = require('../helpers.js');
/**
* Collects information about HTTP request headers and
* attaches them to the event.
*/
const httpContextIntegration = core.defineIntegration(() => {
return {
name: 'HttpContext',
preprocessEvent(event) {
// if none of the information we want exists, don't bother
if (!helpers.WINDOW.navigator && !helpers.WINDOW.location && !helpers.WINDOW.document) {
return;
}
const reqData = helpers.getHttpRequestData();
const headers = {
...reqData.headers,
...event.request?.headers,
};
event.request = {
...reqData,
...event.request,
headers,
};
},
};
});
exports.httpContextIntegration = httpContextIntegration;
//# sourceMappingURL=httpcontext.js.map

View File

@@ -0,0 +1,17 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const JapaneseYen = createLucideIcon("JapaneseYen", [
["path", { d: "M12 9.5V21m0-11.5L6 3m6 6.5L18 3", key: "2ej80x" }],
["path", { d: "M6 15h12", key: "1hwgt5" }],
["path", { d: "M6 11h12", key: "wf4gp6" }]
]);
export { JapaneseYen as default };
//# sourceMappingURL=japanese-yen.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"gem.js","sources":["../../../src/icons/gem.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Gem\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNiAzaDEybDQgNi0xMCAxM0wyIDlaIiAvPgogIDxwYXRoIGQ9Ik0xMSAzIDggOWw0IDEzIDQtMTMtMy02IiAvPgogIDxwYXRoIGQ9Ik0yIDloMjAiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/gem\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 Gem = createLucideIcon('Gem', [\n ['path', { d: 'M6 3h12l4 6-10 13L2 9Z', key: '1pcd5k' }],\n ['path', { d: 'M11 3 8 9l4 13 4-13-3-6', key: '1fcu3u' }],\n ['path', { d: 'M2 9h20', key: '16fsjt' }],\n]);\n\nexport default Gem;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,iBAAiB,KAAO,CAAA,CAAA,CAAA;AAAA,CAAA,CAClC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA0B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACvD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA2B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC1C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,39 @@
import { buildFormatLongFn } from "../../_lib/buildFormatLongFn.mjs";
const dateFormats = {
full: "EEEE, MMMM do, y",
long: "MMMM do, y",
medium: "MMM d, y",
short: "MM/dd/yyyy",
};
const timeFormats = {
full: "h:mm:ss a zzzz",
long: "h:mm:ss a z",
medium: "h:mm:ss a",
short: "h:mm a",
};
const dateTimeFormats = {
full: "{{date}} 'کاتژمێر' {{time}}",
long: "{{date}} 'کاتژمێر' {{time}}",
medium: "{{date}}, {{time}}",
short: "{{date}}, {{time}}",
};
export const formatLong = {
date: buildFormatLongFn({
formats: dateFormats,
defaultWidth: "full",
}),
time: buildFormatLongFn({
formats: timeFormats,
defaultWidth: "full",
}),
dateTime: buildFormatLongFn({
formats: dateTimeFormats,
defaultWidth: "full",
}),
};

View File

@@ -0,0 +1,8 @@
import { entityKind } from "../entity.cjs";
import { type ColumnsSelection, View } from "../sql/sql.cjs";
export declare abstract class PgViewBase<TName extends string = string, TExisting extends boolean = boolean, TSelectedFields extends ColumnsSelection = ColumnsSelection> extends View<TName, TExisting, TSelectedFields> {
static readonly [entityKind]: string;
readonly _: View<TName, TExisting, TSelectedFields>['_'] & {
readonly viewBrand: 'PgViewBase';
};
}

View File

@@ -0,0 +1,12 @@
import { makeUseVisualState } from '../../motion/utils/use-visual-state.mjs';
import { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.mjs';
import { createHtmlRenderState } from './utils/create-render-state.mjs';
const htmlMotionConfig = {
useVisualState: makeUseVisualState({
scrapeMotionValuesFromProps,
createRenderState: createHtmlRenderState,
}),
};
export { htmlMotionConfig };

View File

@@ -0,0 +1,301 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const { STAGE_ADVANCED } = require("../OptimizationStages");
const LazyBucketSortedSet = require("../util/LazyBucketSortedSet");
const { compareChunks } = require("../util/comparators");
const createSchemaValidation = require("../util/create-schema-validation");
/** @typedef {import("../../declarations/plugins/optimize/LimitChunkCountPlugin").LimitChunkCountPluginOptions} LimitChunkCountPluginOptions */
/** @typedef {import("../Chunk")} Chunk */
/** @typedef {import("../Compiler")} Compiler */
const validate = createSchemaValidation(
require("../../schemas/plugins/optimize/LimitChunkCountPlugin.check"),
() => require("../../schemas/plugins/optimize/LimitChunkCountPlugin.json"),
{
name: "Limit Chunk Count Plugin",
baseDataPath: "options"
}
);
/**
* @typedef {object} ChunkCombination
* @property {boolean} deleted this is set to true when combination was removed
* @property {number} sizeDiff
* @property {number} integratedSize
* @property {Chunk} a
* @property {Chunk} b
* @property {number} aIdx
* @property {number} bIdx
* @property {number} aSize
* @property {number} bSize
*/
/**
* @template K, V
* @param {Map<K, Set<V>>} map map
* @param {K} key key
* @param {V} value value
*/
const addToSetMap = (map, key, value) => {
const set = map.get(key);
if (set === undefined) {
map.set(key, new Set([value]));
} else {
set.add(value);
}
};
const PLUGIN_NAME = "LimitChunkCountPlugin";
class LimitChunkCountPlugin {
/**
* @param {LimitChunkCountPluginOptions=} options options object
*/
constructor(options) {
validate(options);
this.options = /** @type {LimitChunkCountPluginOptions} */ (options);
}
/**
* @param {Compiler} compiler the webpack compiler
* @returns {void}
*/
apply(compiler) {
const options = this.options;
compiler.hooks.compilation.tap(PLUGIN_NAME, (compilation) => {
compilation.hooks.optimizeChunks.tap(
{
name: PLUGIN_NAME,
stage: STAGE_ADVANCED
},
(chunks) => {
const chunkGraph = compilation.chunkGraph;
const maxChunks = options.maxChunks;
if (!maxChunks) return;
if (maxChunks < 1) return;
if (compilation.chunks.size <= maxChunks) return;
let remainingChunksToMerge = compilation.chunks.size - maxChunks;
// order chunks in a deterministic way
const compareChunksWithGraph = compareChunks(chunkGraph);
/** @type {Chunk[]} */
const orderedChunks = [...chunks].sort(compareChunksWithGraph);
// create a lazy sorted data structure to keep all combinations
// this is large. Size = chunks * (chunks - 1) / 2
// It uses a multi layer bucket sort plus normal sort in the last layer
// It's also lazy so only accessed buckets are sorted
/** @type {LazyBucketSortedSet<ChunkCombination, number>} */
const combinations = new LazyBucketSortedSet(
// Layer 1: ordered by largest size benefit
(c) => c.sizeDiff,
(a, b) => b - a,
// Layer 2: ordered by smallest combined size
/**
* @param {ChunkCombination} c combination
* @returns {number} integrated size
*/
(c) => c.integratedSize,
/**
* @param {number} a a
* @param {number} b b
* @returns {number} result
*/
(a, b) => a - b,
// Layer 3: ordered by position difference in orderedChunk (-> to be deterministic)
/**
* @param {ChunkCombination} c combination
* @returns {number} position difference
*/
(c) => c.bIdx - c.aIdx,
/**
* @param {number} a a
* @param {number} b b
* @returns {number} result
*/
(a, b) => a - b,
// Layer 4: ordered by position in orderedChunk (-> to be deterministic)
/**
* @param {ChunkCombination} a a
* @param {ChunkCombination} b b
* @returns {number} result
*/
(a, b) => a.bIdx - b.bIdx
);
// we keep a mapping from chunk to all combinations
// but this mapping is not kept up-to-date with deletions
// so `deleted` flag need to be considered when iterating this
/** @type {Map<Chunk, Set<ChunkCombination>>} */
const combinationsByChunk = new Map();
for (const [bIdx, b] of orderedChunks.entries()) {
// create combination pairs with size and integrated size
for (let aIdx = 0; aIdx < bIdx; aIdx++) {
const a = orderedChunks[aIdx];
// filter pairs that can not be integrated!
if (!chunkGraph.canChunksBeIntegrated(a, b)) continue;
const integratedSize = chunkGraph.getIntegratedChunksSize(
a,
b,
options
);
const aSize = chunkGraph.getChunkSize(a, options);
const bSize = chunkGraph.getChunkSize(b, options);
/** @type {ChunkCombination} */
const c = {
deleted: false,
sizeDiff: aSize + bSize - integratedSize,
integratedSize,
a,
b,
aIdx,
bIdx,
aSize,
bSize
};
combinations.add(c);
addToSetMap(combinationsByChunk, a, c);
addToSetMap(combinationsByChunk, b, c);
}
}
// list of modified chunks during this run
// combinations affected by this change are skipped to allow
// further optimizations
/** @type {Set<Chunk>} */
const modifiedChunks = new Set();
let changed = false;
loop: while (true) {
const combination = combinations.popFirst();
if (combination === undefined) break;
combination.deleted = true;
const { a, b, integratedSize } = combination;
// skip over pair when
// one of the already merged chunks is a parent of one of the chunks
if (modifiedChunks.size > 0) {
const queue = new Set(a.groupsIterable);
for (const group of b.groupsIterable) {
queue.add(group);
}
for (const group of queue) {
for (const mChunk of modifiedChunks) {
if (mChunk !== a && mChunk !== b && mChunk.isInGroup(group)) {
// This is a potential pair which needs recalculation
// We can't do that now, but it merge before following pairs
// so we leave space for it, and consider chunks as modified
// just for the worse case
remainingChunksToMerge--;
if (remainingChunksToMerge <= 0) break loop;
modifiedChunks.add(a);
modifiedChunks.add(b);
continue loop;
}
}
for (const parent of group.parentsIterable) {
queue.add(parent);
}
}
}
// merge the chunks
if (chunkGraph.canChunksBeIntegrated(a, b)) {
chunkGraph.integrateChunks(a, b);
compilation.chunks.delete(b);
// flag chunk a as modified as further optimization are possible for all children here
modifiedChunks.add(a);
changed = true;
remainingChunksToMerge--;
if (remainingChunksToMerge <= 0) break;
// Update all affected combinations
// delete all combination with the removed chunk
// we will use combinations with the kept chunk instead
for (const combination of /** @type {Set<ChunkCombination>} */ (
combinationsByChunk.get(a)
)) {
if (combination.deleted) continue;
combination.deleted = true;
combinations.delete(combination);
}
// Update combinations with the kept chunk with new sizes
for (const combination of /** @type {Set<ChunkCombination>} */ (
combinationsByChunk.get(b)
)) {
if (combination.deleted) continue;
if (combination.a === b) {
if (!chunkGraph.canChunksBeIntegrated(a, combination.b)) {
combination.deleted = true;
combinations.delete(combination);
continue;
}
// Update size
const newIntegratedSize = chunkGraph.getIntegratedChunksSize(
a,
combination.b,
options
);
const finishUpdate = combinations.startUpdate(combination);
combination.a = a;
combination.integratedSize = newIntegratedSize;
combination.aSize = integratedSize;
combination.sizeDiff =
combination.bSize + integratedSize - newIntegratedSize;
finishUpdate();
} else if (combination.b === b) {
if (!chunkGraph.canChunksBeIntegrated(combination.a, a)) {
combination.deleted = true;
combinations.delete(combination);
continue;
}
// Update size
const newIntegratedSize = chunkGraph.getIntegratedChunksSize(
combination.a,
a,
options
);
const finishUpdate = combinations.startUpdate(combination);
combination.b = a;
combination.integratedSize = newIntegratedSize;
combination.bSize = integratedSize;
combination.sizeDiff =
integratedSize + combination.aSize - newIntegratedSize;
finishUpdate();
}
}
combinationsByChunk.set(
a,
/** @type {Set<ChunkCombination>} */ (
combinationsByChunk.get(b)
)
);
combinationsByChunk.delete(b);
}
}
if (changed) return true;
}
);
});
}
}
module.exports = LimitChunkCountPlugin;

View File

@@ -0,0 +1,37 @@
{
"name": "@types/busboy",
"version": "1.5.4",
"description": "TypeScript definitions for busboy",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/busboy",
"license": "MIT",
"contributors": [
{
"name": "Jacob Baskin",
"githubUsername": "jacobbaskin",
"url": "https://github.com/jacobbaskin"
},
{
"name": "BendingBender",
"githubUsername": "BendingBender",
"url": "https://github.com/BendingBender"
},
{
"name": "Martin Badin",
"githubUsername": "martin-badin",
"url": "https://github.com/martin-badin"
}
],
"main": "",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/busboy"
},
"scripts": {},
"dependencies": {
"@types/node": "*"
},
"typesPublisherContentHash": "e34617ab53940552fc62c2d9ae92f2eed87380fc1ed114a6540023ca95d09651",
"typeScriptVersion": "4.7"
}

View File

@@ -0,0 +1,18 @@
import * as React from 'react';
import { ComponentType, ReactNode } from 'react';
import { ExitHandler } from 'react-transition-group/Transition';
declare type FadeProps<ComponentProps> = {
component: ComponentType<ComponentProps>;
in?: boolean;
onExited?: ExitHandler<undefined | HTMLElement>;
duration?: number;
} & ComponentProps;
export declare const Fade: <ComponentProps extends {}>({ component: Tag, duration, in: inProp, onExited, ...props }: FadeProps<ComponentProps>) => React.JSX.Element;
export declare const collapseDuration = 260;
interface CollapseProps {
children: ReactNode;
in?: boolean;
onExited?: ExitHandler<undefined | HTMLElement>;
}
export declare const Collapse: ({ children, in: _in, onExited }: CollapseProps) => React.JSX.Element;
export {};

View File

@@ -0,0 +1,88 @@
// lib/types/utils.ts
var decoder = new TextDecoder();
var toUTF8String = (input, start = 0, end = input.length) => decoder.decode(input.slice(start, end));
var getView = (input, offset) => new DataView(input.buffer, input.byteOffset + offset);
var readUInt32BE = (input, offset = 0) => getView(input, offset).getUint32(0, false);
// lib/types/icns.ts
var SIZE_HEADER = 4 + 4;
var FILE_LENGTH_OFFSET = 4;
var ENTRY_LENGTH_OFFSET = 4;
var ICON_TYPE_SIZE = {
ICON: 32,
"ICN#": 32,
// m => 16 x 16
"icm#": 16,
icm4: 16,
icm8: 16,
// s => 16 x 16
"ics#": 16,
ics4: 16,
ics8: 16,
is32: 16,
s8mk: 16,
icp4: 16,
// l => 32 x 32
icl4: 32,
icl8: 32,
il32: 32,
l8mk: 32,
icp5: 32,
ic11: 32,
// h => 48 x 48
ich4: 48,
ich8: 48,
ih32: 48,
h8mk: 48,
// . => 64 x 64
icp6: 64,
ic12: 32,
// t => 128 x 128
it32: 128,
t8mk: 128,
ic07: 128,
// . => 256 x 256
ic08: 256,
ic13: 256,
// . => 512 x 512
ic09: 512,
ic14: 512,
// . => 1024 x 1024
ic10: 1024
};
function readImageHeader(input, imageOffset) {
const imageLengthOffset = imageOffset + ENTRY_LENGTH_OFFSET;
return [
toUTF8String(input, imageOffset, imageLengthOffset),
readUInt32BE(input, imageLengthOffset)
];
}
function getImageSize(type) {
const size = ICON_TYPE_SIZE[type];
return { width: size, height: size, type };
}
var ICNS = {
validate: (input) => toUTF8String(input, 0, 4) === "icns",
calculate(input) {
const inputLength = input.length;
const fileLength = readUInt32BE(input, FILE_LENGTH_OFFSET);
let imageOffset = SIZE_HEADER;
const images = [];
while (imageOffset < fileLength && imageOffset < inputLength) {
const imageHeader = readImageHeader(input, imageOffset);
const imageSize = getImageSize(imageHeader[0]);
images.push(imageSize);
imageOffset += imageHeader[1];
}
if (images.length === 0) {
throw new TypeError("Invalid ICNS, no sizes found");
}
return {
width: images[0].width,
height: images[0].height,
...images.length > 1 ? { images } : {}
};
}
};
export { ICNS };

View File

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

View File

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

View File

@@ -0,0 +1,14 @@
import { IdGenerator } from '../../IdGenerator';
export declare class RandomIdGenerator implements IdGenerator {
/**
* Returns a random 16-byte trace ID formatted/encoded as a 32 lowercase hex
* characters corresponding to 128 bits.
*/
generateTraceId: () => string;
/**
* Returns a random 8-byte span ID formatted/encoded as a 16 lowercase hex
* characters corresponding to 64 bits.
*/
generateSpanId: () => string;
}
//# sourceMappingURL=RandomIdGenerator.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/kysely/index.ts"],"sourcesContent":["import type { ColumnType } from 'kysely';\nimport type { InferInsertModel, InferSelectModel, MapColumnName, Table } from '~/table.ts';\nimport type { Simplify } from '~/utils.ts';\n\nexport type Kyselify<T extends Table> = Simplify<\n\t{\n\t\t[Key in keyof T['_']['columns'] & string as MapColumnName<Key, T['_']['columns'][Key], true>]: ColumnType<\n\t\t\t// select\n\t\t\tInferSelectModel<T, { dbColumnNames: true }>[MapColumnName<Key, T['_']['columns'][Key], true>],\n\t\t\t// insert\n\t\t\tMapColumnName<Key, T['_']['columns'][Key], true> extends keyof InferInsertModel<\n\t\t\t\tT,\n\t\t\t\t{ dbColumnNames: true }\n\t\t\t> ? InferInsertModel<T, { dbColumnNames: true }>[MapColumnName<Key, T['_']['columns'][Key], true>]\n\t\t\t\t: never,\n\t\t\t// update\n\t\t\tMapColumnName<Key, T['_']['columns'][Key], true> extends keyof InferInsertModel<\n\t\t\t\tT,\n\t\t\t\t{ dbColumnNames: true }\n\t\t\t> ? InferInsertModel<T, { dbColumnNames: true }>[MapColumnName<Key, T['_']['columns'][Key], true>]\n\t\t\t\t: never\n\t\t>;\n\t}\n>;\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}

View File

@@ -0,0 +1,31 @@
"use strict";
exports.ja = void 0;
var _index = require("./ja/_lib/formatDistance.cjs");
var _index2 = require("./ja/_lib/formatLong.cjs");
var _index3 = require("./ja/_lib/formatRelative.cjs");
var _index4 = require("./ja/_lib/localize.cjs");
var _index5 = require("./ja/_lib/match.cjs");
/**
* @category Locales
* @summary Japanese locale.
* @language Japanese
* @iso-639-2 jpn
* @author Thomas Eilmsteiner [@DeMuu](https://github.com/DeMuu)
* @author Yamagishi Kazutoshi [@ykzts](https://github.com/ykzts)
* @author Luca Ban [@mesqueeb](https://github.com/mesqueeb)
* @author Terrence Lam [@skyuplam](https://github.com/skyuplam)
* @author Taiki IKeda [@so99ynoodles](https://github.com/so99ynoodles)
*/
const ja = (exports.ja = {
code: "ja",
formatDistance: _index.formatDistance,
formatLong: _index2.formatLong,
formatRelative: _index3.formatRelative,
localize: _index4.localize,
match: _index5.match,
options: {
weekStartsOn: 0 /* Sunday */,
firstWeekContainsDate: 1,
},
});

View File

@@ -0,0 +1,31 @@
[![Build Status](https://travis-ci.org/samccone/chrome-trace-event.svg?branch=master)](https://travis-ci.org/samccone/chrome-trace-event)
chrome-trace-event: A node library for creating trace event logs of program
execution according to [Google's Trace Event
format](https://docs.google.com/document/d/1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU).
These logs can then be visualized with
[trace-viewer](https://github.com/google/trace-viewer) or chrome devtools to grok one's programs.
# Install
npm install chrome-trace-event
# Usage
```javascript
const Trace = require("chrome-trace-event").Tracer;
const trace = new Trace({
noStream: true
});
trace.pipe(fs.createWriteStream(outPath));
trace.flush();
```
# Links
* https://github.com/google/trace-viewer/wiki
* https://docs.google.com/document/d/1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU
# License
MIT. See LICENSE.txt.

View File

@@ -0,0 +1,16 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
import type { CodeHighlightNode } from './CodeHighlightNode';
import type { LineBreakNode, TabNode } from 'lexical';
export declare function $getFirstCodeNodeOfLine(anchor: CodeHighlightNode | TabNode | LineBreakNode): CodeHighlightNode | TabNode | LineBreakNode;
export declare function $getLastCodeNodeOfLine(anchor: CodeHighlightNode | TabNode | LineBreakNode): CodeHighlightNode | TabNode | LineBreakNode;
export declare function $getStartOfCodeInLine(anchor: CodeHighlightNode | TabNode, offset: number): null | {
node: CodeHighlightNode | TabNode | LineBreakNode;
offset: number;
};
export declare function $getEndOfCodeInLine(anchor: CodeHighlightNode | TabNode): CodeHighlightNode | TabNode;

View File

@@ -0,0 +1,50 @@
import { AbstractTokenizer } from './AbstractTokenizer.js';
import { EndOfStreamError } from 'peek-readable';
import { open as fsOpen } from 'node:fs/promises';
export class FileTokenizer extends AbstractTokenizer {
constructor(fileHandle, options) {
super(options);
this.fileHandle = fileHandle;
}
/**
* Read buffer from file
* @param uint8Array - Uint8Array to write result to
* @param options - Read behaviour options
* @returns Promise number of bytes read
*/
async readBuffer(uint8Array, options) {
const normOptions = this.normalizeOptions(uint8Array, options);
this.position = normOptions.position;
if (normOptions.length === 0)
return 0;
const res = await this.fileHandle.read(uint8Array, normOptions.offset, normOptions.length, normOptions.position);
this.position += res.bytesRead;
if (res.bytesRead < normOptions.length && (!options || !options.mayBeLess)) {
throw new EndOfStreamError();
}
return res.bytesRead;
}
/**
* Peek buffer from file
* @param uint8Array - Uint8Array (or Buffer) to write data to
* @param options - Read behaviour options
* @returns Promise number of bytes read
*/
async peekBuffer(uint8Array, options) {
const normOptions = this.normalizeOptions(uint8Array, options);
const res = await this.fileHandle.read(uint8Array, normOptions.offset, normOptions.length, normOptions.position);
if ((!normOptions.mayBeLess) && res.bytesRead < normOptions.length) {
throw new EndOfStreamError();
}
return res.bytesRead;
}
async close() {
await this.fileHandle.close();
return super.close();
}
}
export async function fromFile(sourceFilePath) {
const fileHandle = await fsOpen(sourceFilePath, 'r');
const stat = await fileHandle.stat();
return new FileTokenizer(fileHandle, { fileInfo: { path: sourceFilePath, size: stat.size } });
}

View File

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

View File

@@ -0,0 +1,28 @@
# `import-in-the-middle` Project Governance
## Collaborators
`import-in-the-middle` core collaborators maintain the
[nodejs/import-in-the-middle](https://github.com/nodejs/import-in-the-middle)
GitHub repository.
The GitHub team for `import-in-the-middle` core collaborators is
[@nodejs/import-in-the-middle-maintainers](https://github.com/orgs/nodejs/teams/import-in-the-middle-maintainers).
Collaborators have commit access to the
[nodejs/import-in-the-middle](https://github.com/nodejs/import-in-the-middle)
repository.
Both collaborators and non-collaborators may propose changes to the `import-in-the-middle`
source code. The mechanism to propose such a change is a GitHub pull request.
Collaborators review and merge (_land_) pull requests.
## PR Approval
Two collaborators must approve a pull request before the pull request can land.
Approving a pull request indicates that the collaborator accepts responsibility
for the change. Approval must be from collaborators who are not authors of the
change and at least one approval must be from a collaborator outside the authors
direct team.
If a collaborator opposes a proposed change, then the change cannot land. Often,
discussions or further changes result in collaborators removing their
opposition.

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/database/migrations/getMigrations.ts"],"sourcesContent":["import type { Payload } from '../../index.js'\nimport type { MigrationData } from '../types.js'\n\n/**\n * Gets all existing migrations from the database, excluding the dev migration\n */\nexport async function getMigrations({\n payload,\n}: {\n payload: Payload\n}): Promise<{ existingMigrations: MigrationData[]; latestBatch: number }> {\n const migrationQuery = await payload.find({\n collection: 'payload-migrations',\n limit: 0,\n sort: ['-batch', '-name'],\n where: {\n batch: {\n not_equals: -1,\n },\n },\n })\n\n const existingMigrations = migrationQuery.docs as unknown as MigrationData[]\n\n // Get the highest batch number from existing migrations\n const latestBatch = Number(existingMigrations?.[0]?.batch) || 0\n\n return {\n existingMigrations,\n latestBatch,\n }\n}\n"],"names":["getMigrations","payload","migrationQuery","find","collection","limit","sort","where","batch","not_equals","existingMigrations","docs","latestBatch","Number"],"mappings":"AAGA;;CAEC,GACD,OAAO,eAAeA,cAAc,EAClCC,OAAO,EAGR;IACC,MAAMC,iBAAiB,MAAMD,QAAQE,IAAI,CAAC;QACxCC,YAAY;QACZC,OAAO;QACPC,MAAM;YAAC;YAAU;SAAQ;QACzBC,OAAO;YACLC,OAAO;gBACLC,YAAY,CAAC;YACf;QACF;IACF;IAEA,MAAMC,qBAAqBR,eAAeS,IAAI;IAE9C,wDAAwD;IACxD,MAAMC,cAAcC,OAAOH,oBAAoB,CAAC,EAAE,EAAEF,UAAU;IAE9D,OAAO;QACLE;QACAE;IACF;AACF"}

View File

@@ -0,0 +1,77 @@
import { getAsyncContextStrategy } from '../asyncContext/index.js';
import { getMainCarrier } from '../carrier.js';
import { getClient, getCurrentScope } from '../currentScopes.js';
import { isEnabled } from '../exports.js';
import { debug } from './debug-logger.js';
import { getActiveSpan, spanToTraceHeader, spanToTraceparentHeader } from './spanUtils.js';
import { getDynamicSamplingContextFromSpan, getDynamicSamplingContextFromScope } from '../tracing/dynamicSamplingContext.js';
import { dynamicSamplingContextToSentryBaggageHeader } from './baggage.js';
import { TRACEPARENT_REGEXP, generateSentryTraceHeader, generateTraceparentHeader } from './tracing.js';
/**
* Extracts trace propagation data from the current span or from the client's scope (via transaction or propagation
* context) and serializes it to `sentry-trace` and `baggage` values. These values can be used to propagate
* a trace via our tracing Http headers or Html `<meta>` tags.
*
* This function also applies some validation to the generated sentry-trace and baggage values to ensure that
* only valid strings are returned.
*
* If (@param options.propagateTraceparent) is `true`, the function will also generate a `traceparent` value,
* following the W3C traceparent header format.
*
* @returns an object with the tracing data values. The object keys are the name of the tracing key to be used as header
* or meta tag name.
*/
function getTraceData(
options = {},
) {
const client = options.client || getClient();
if (!isEnabled() || !client) {
return {};
}
const carrier = getMainCarrier();
const acs = getAsyncContextStrategy(carrier);
if (acs.getTraceData) {
return acs.getTraceData(options);
}
const scope = options.scope || getCurrentScope();
const span = options.span || getActiveSpan();
const sentryTrace = span ? spanToTraceHeader(span) : scopeToTraceHeader(scope);
const dsc = span ? getDynamicSamplingContextFromSpan(span) : getDynamicSamplingContextFromScope(client, scope);
const baggage = dynamicSamplingContextToSentryBaggageHeader(dsc);
const isValidSentryTraceHeader = TRACEPARENT_REGEXP.test(sentryTrace);
if (!isValidSentryTraceHeader) {
debug.warn('Invalid sentry-trace data. Cannot generate trace data');
return {};
}
const traceData = {
'sentry-trace': sentryTrace,
baggage,
};
if (options.propagateTraceparent) {
traceData.traceparent = span ? spanToTraceparentHeader(span) : scopeToTraceparentHeader(scope);
}
return traceData;
}
/**
* Get a sentry-trace header value for the given scope.
*/
function scopeToTraceHeader(scope) {
const { traceId, sampled, propagationSpanId } = scope.getPropagationContext();
return generateSentryTraceHeader(traceId, propagationSpanId, sampled);
}
function scopeToTraceparentHeader(scope) {
const { traceId, sampled, propagationSpanId } = scope.getPropagationContext();
return generateTraceparentHeader(traceId, propagationSpanId, sampled);
}
export { getTraceData };
//# sourceMappingURL=traceData.js.map

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"test-tubes.js","sources":["../../../src/icons/test-tubes.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name TestTubes\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNOSAydjE3LjVBMi41IDIuNSAwIDAgMSA2LjUgMjJBMi41IDIuNSAwIDAgMSA0IDE5LjVWMiIgLz4KICA8cGF0aCBkPSJNMjAgMnYxNy41YTIuNSAyLjUgMCAwIDEtMi41IDIuNWEyLjUgMi41IDAgMCAxLTIuNS0yLjVWMiIgLz4KICA8cGF0aCBkPSJNMyAyaDciIC8+CiAgPHBhdGggZD0iTTE0IDJoNyIgLz4KICA8cGF0aCBkPSJNOSAxNkg0IiAvPgogIDxwYXRoIGQ9Ik0yMCAxNmgtNSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/test-tubes\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 TestTubes = createLucideIcon('TestTubes', [\n ['path', { d: 'M9 2v17.5A2.5 2.5 0 0 1 6.5 22A2.5 2.5 0 0 1 4 19.5V2', key: '1hjrqt' }],\n ['path', { d: 'M20 2v17.5a2.5 2.5 0 0 1-2.5 2.5a2.5 2.5 0 0 1-2.5-2.5V2', key: '16lc8n' }],\n ['path', { d: 'M3 2h7', key: '7s29d5' }],\n ['path', { d: 'M14 2h7', key: '7sicin' }],\n ['path', { d: 'M9 16H4', key: '1bfye3' }],\n ['path', { d: 'M20 16h-5', key: 'ddnjpe' }],\n]);\n\nexport default TestTubes;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,iBAAiB,WAAa,CAAA,CAAA,CAAA;AAAA,CAAA,CAC9C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAyD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACtF,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,CAAA;AAAA,CAAA,CACzF,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACvC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC5C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,42 @@
import { entityKind } from "../entity.js";
import { DefaultLogger } from "../logger.js";
import {
createTableRelationsHelpers,
extractTablesRelationalConfig
} from "../relations.js";
import { BaseSQLiteDatabase } from "../sqlite-core/db.js";
import { SQLiteSyncDialect } from "../sqlite-core/dialect.js";
import { ExpoSQLiteSession } from "./session.js";
class ExpoSQLiteDatabase extends BaseSQLiteDatabase {
static [entityKind] = "ExpoSQLiteDatabase";
}
function drizzle(client, config = {}) {
const dialect = new SQLiteSyncDialect({ casing: config.casing });
let logger;
if (config.logger === true) {
logger = new DefaultLogger();
} else if (config.logger !== false) {
logger = config.logger;
}
let schema;
if (config.schema) {
const tablesConfig = extractTablesRelationalConfig(
config.schema,
createTableRelationsHelpers
);
schema = {
fullSchema: config.schema,
schema: tablesConfig.tables,
tableNamesMap: tablesConfig.tableNamesMap
};
}
const session = new ExpoSQLiteSession(client, dialect, schema, { logger });
const db = new ExpoSQLiteDatabase("sync", dialect, session, schema);
db.$client = client;
return db;
}
export {
ExpoSQLiteDatabase,
drizzle
};
//# sourceMappingURL=driver.js.map

View File

@@ -0,0 +1,162 @@
import { buildLocalizeFn } from "../../_lib/buildLocalizeFn.js";
const eraValues = {
narrow: ["ق", "ب"],
abbreviated: ["ق.م.", "ب.م."],
wide: ["قبل الميلاد", "بعد الميلاد"],
};
const quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["ر1", "ر2", "ر3", "ر4"],
wide: ["الربع الأول", "الربع الثاني", "الربع الثالث", "الربع الرابع"],
};
const monthValues = {
narrow: ["ي", "ف", "م", "أ", "م", "ي", "ي", "غ", "ش", "أ", "ن", "د"],
abbreviated: [
"ينا",
"فبر",
"مارس",
"أبريل",
"ماي",
"يونـ",
"يولـ",
"غشت",
"شتنـ",
"أكتـ",
"نونـ",
"دجنـ",
],
wide: [
"يناير",
"فبراير",
"مارس",
"أبريل",
"ماي",
"يونيو",
"يوليوز",
"غشت",
"شتنبر",
"أكتوبر",
"نونبر",
"دجنبر",
],
};
const dayValues = {
narrow: ["ح", "ن", "ث", "ر", "خ", "ج", "س"],
short: ["أحد", "اثنين", "ثلاثاء", "أربعاء", "خميس", "جمعة", "سبت"],
abbreviated: ["أحد", "اثنـ", "ثلا", "أربـ", "خميـ", "جمعة", "سبت"],
wide: [
"الأحد",
"الإثنين",
"الثلاثاء",
"الأربعاء",
"الخميس",
"الجمعة",
"السبت",
],
};
const dayPeriodValues = {
narrow: {
am: "ص",
pm: "م",
midnight: "ن",
noon: "ظ",
morning: "صباحاً",
afternoon: "بعد الظهر",
evening: "مساءاً",
night: "ليلاً",
},
abbreviated: {
am: "ص",
pm: "م",
midnight: "نصف الليل",
noon: "ظهر",
morning: "صباحاً",
afternoon: "بعد الظهر",
evening: "مساءاً",
night: "ليلاً",
},
wide: {
am: "ص",
pm: "م",
midnight: "نصف الليل",
noon: "ظهر",
morning: "صباحاً",
afternoon: "بعد الظهر",
evening: "مساءاً",
night: "ليلاً",
},
};
const formattingDayPeriodValues = {
narrow: {
am: "ص",
pm: "م",
midnight: "ن",
noon: "ظ",
morning: "في الصباح",
afternoon: "بعد الظـهر",
evening: "في المساء",
night: "في الليل",
},
abbreviated: {
am: "ص",
pm: "م",
midnight: "نصف الليل",
noon: "ظهر",
morning: "في الصباح",
afternoon: "بعد الظهر",
evening: "في المساء",
night: "في الليل",
},
wide: {
am: "ص",
pm: "م",
midnight: "نصف الليل",
noon: "ظهر",
morning: "صباحاً",
afternoon: "بعد الظـهر",
evening: "في المساء",
night: "في الليل",
},
};
const ordinalNumber = (dirtyNumber) => {
return String(dirtyNumber);
};
export const localize = {
ordinalNumber: ordinalNumber,
era: buildLocalizeFn({
values: eraValues,
defaultWidth: "wide",
}),
quarter: buildLocalizeFn({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: (quarter) => Number(quarter) - 1,
}),
month: buildLocalizeFn({
values: monthValues,
defaultWidth: "wide",
}),
day: buildLocalizeFn({
values: dayValues,
defaultWidth: "wide",
}),
dayPeriod: buildLocalizeFn({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide",
}),
};

View File

@@ -0,0 +1,351 @@
"use strict";
const p = require('path');
const resolve = require('resolve'); // const printAST = require('ast-pretty-print')
const macrosRegex = /[./]macro(\.c?js)?$/;
const testMacrosRegex = v => macrosRegex.test(v); // https://stackoverflow.com/a/32749533/971592
class MacroError extends Error {
constructor(message) {
super(message);
this.name = 'MacroError';
/* istanbul ignore else */
if (typeof Error.captureStackTrace === 'function') {
Error.captureStackTrace(this, this.constructor);
} else if (!this.stack) {
this.stack = new Error(message).stack;
}
}
}
let _configExplorer = null;
function getConfigExplorer() {
return _configExplorer = _configExplorer || // Lazy load cosmiconfig since it is a relatively large bundle
require('cosmiconfig').cosmiconfigSync('babel-plugin-macros', {
searchPlaces: ['package.json', '.babel-plugin-macrosrc', '.babel-plugin-macrosrc.json', '.babel-plugin-macrosrc.yaml', '.babel-plugin-macrosrc.yml', '.babel-plugin-macrosrc.js', 'babel-plugin-macros.config.js'],
packageProp: 'babelMacros'
});
}
function createMacro(macro, options = {}) {
if (options.configName === 'options') {
throw new Error(`You cannot use the configName "options". It is reserved for babel-plugin-macros.`);
}
macroWrapper.isBabelMacro = true;
macroWrapper.options = options;
return macroWrapper;
function macroWrapper(args) {
const {
source,
isBabelMacrosCall
} = args;
if (!isBabelMacrosCall) {
throw new MacroError(`The macro you imported from "${source}" is being executed outside the context of compilation with babel-plugin-macros. ` + `This indicates that you don't have the babel plugin "babel-plugin-macros" configured correctly. ` + `Please see the documentation for how to configure babel-plugin-macros properly: ` + 'https://github.com/kentcdodds/babel-plugin-macros/blob/master/other/docs/user.md');
}
return macro(args);
}
}
function nodeResolvePath(source, basedir) {
return resolve.sync(source, {
basedir,
extensions: ['.js', '.ts', '.tsx', '.mjs', '.cjs', '.jsx'],
// This is here to support the package being globally installed
// read more: https://github.com/kentcdodds/babel-plugin-macros/pull/138
paths: [p.resolve(__dirname, '../../')]
});
}
function macrosPlugin(babel, // istanbul doesn't like the default of an object for the plugin options
// but I think older versions of babel didn't always pass options
// istanbul ignore next
{
require: _require = require,
resolvePath = nodeResolvePath,
isMacrosName = testMacrosRegex,
...options
} = {}) {
function interopRequire(path) {
// eslint-disable-next-line import/no-dynamic-require
const o = _require(path);
return o && o.__esModule && o.default ? o.default : o;
}
return {
name: 'macros',
visitor: {
Program(progPath, state) {
progPath.traverse({
ImportDeclaration(path) {
const isMacros = looksLike(path, {
node: {
source: {
value: v => isMacrosName(v)
}
}
});
if (!isMacros) {
return;
}
const imports = path.node.specifiers.map(s => ({
localName: s.local.name,
importedName: s.type === 'ImportDefaultSpecifier' ? 'default' : s.imported.name
}));
const source = path.node.source.value;
const result = applyMacros({
path,
imports,
source,
state,
babel,
interopRequire,
resolvePath,
options
});
if (!result || !result.keepImports) {
path.remove();
}
},
VariableDeclaration(path) {
const isMacros = child => looksLike(child, {
node: {
init: {
callee: {
type: 'Identifier',
name: 'require'
},
arguments: args => args.length === 1 && isMacrosName(args[0].value)
}
}
});
path.get('declarations').filter(isMacros).forEach(child => {
const imports = child.node.id.name ? [{
localName: child.node.id.name,
importedName: 'default'
}] : child.node.id.properties.map(property => ({
localName: property.value.name,
importedName: property.key.name
}));
const call = child.get('init');
const source = call.node.arguments[0].value;
const result = applyMacros({
path: call,
imports,
source,
state,
babel,
interopRequire,
resolvePath,
options
});
if (!result || !result.keepImports) {
child.remove();
}
});
}
});
}
}
};
} // eslint-disable-next-line complexity
function applyMacros({
path,
imports,
source,
state,
babel,
interopRequire,
resolvePath,
options
}) {
/* istanbul ignore next (pretty much only useful for astexplorer I think) */
const {
file: {
opts: {
filename = ''
}
}
} = state;
let hasReferences = false;
const referencePathsByImportName = imports.reduce((byName, {
importedName,
localName
}) => {
const binding = path.scope.getBinding(localName);
byName[importedName] = binding.referencePaths;
hasReferences = hasReferences || Boolean(byName[importedName].length);
return byName;
}, {});
const isRelative = source.indexOf('.') === 0;
const requirePath = resolvePath(source, p.dirname(getFullFilename(filename)));
const macro = interopRequire(requirePath);
if (!macro.isBabelMacro) {
throw new Error(`The macro imported from "${source}" must be wrapped in "createMacro" ` + `which you can get from "babel-plugin-macros". ` + `Please refer to the documentation to see how to do this properly: https://github.com/kentcdodds/babel-plugin-macros/blob/master/other/docs/author.md#writing-a-macro`);
}
const config = getConfig(macro, filename, source, options);
let result;
try {
/**
* Other plugins that run before babel-plugin-macros might use path.replace, where a path is
* put into its own replacement. Apparently babel does not update the scope after such
* an operation. As a remedy, the whole scope is traversed again with an empty "Identifier"
* visitor - this makes the problem go away.
*
* See: https://github.com/kentcdodds/import-all.macro/issues/7
*/
state.file.scope.path.traverse({
Identifier() {}
});
result = macro({
references: referencePathsByImportName,
source,
state,
babel,
config,
isBabelMacrosCall: true
});
} catch (error) {
if (error.name === 'MacroError') {
throw error;
}
error.message = `${source}: ${error.message}`;
if (!isRelative) {
error.message = `${error.message} Learn more: https://www.npmjs.com/package/${source.replace( // remove everything after package name
// @org/package/macro -> @org/package
// package/macro -> package
/^((?:@[^/]+\/)?[^/]+).*/, '$1')}`;
}
throw error;
}
return result;
}
function getConfigFromFile(configName, filename) {
try {
const loaded = getConfigExplorer().search(filename);
if (loaded) {
return {
options: loaded.config[configName],
path: loaded.filepath
};
}
} catch (e) {
return {
error: e
};
}
return {};
}
function getConfigFromOptions(configName, options) {
if (options.hasOwnProperty(configName)) {
if (options[configName] && typeof options[configName] !== 'object') {
// eslint-disable-next-line no-console
console.error(`The macro plugin options' ${configName} property was not an object or null.`);
} else {
return {
options: options[configName]
};
}
}
return {};
}
function getConfig(macro, filename, source, options) {
const {
configName
} = macro.options;
if (configName) {
const fileConfig = getConfigFromFile(configName, filename);
const optionsConfig = getConfigFromOptions(configName, options);
if (optionsConfig.options === undefined && fileConfig.options === undefined && fileConfig.error !== undefined) {
// eslint-disable-next-line no-console
console.error(`There was an error trying to load the config "${configName}" ` + `for the macro imported from "${source}. ` + `Please see the error thrown for more information.`);
throw fileConfig.error;
}
if (fileConfig.options !== undefined && optionsConfig.options !== undefined && typeof fileConfig.options !== 'object') {
throw new Error(`${fileConfig.path} specified a ${configName} config of type ` + `${typeof optionsConfig.options}, but the the macros plugin's ` + `options.${configName} did contain an object. Both configs must ` + `contain objects for their options to be mergeable.`);
}
return { ...optionsConfig.options,
...fileConfig.options
};
}
return undefined;
}
/*
istanbul ignore next
because this is hard to test
and not worth it...
*/
function getFullFilename(filename) {
if (p.isAbsolute(filename)) {
return filename;
}
return p.join(process.cwd(), filename);
}
function looksLike(a, b) {
return a && b && Object.keys(b).every(bKey => {
const bVal = b[bKey];
const aVal = a[bKey];
if (typeof bVal === 'function') {
return bVal(aVal);
}
return isPrimitive(bVal) ? bVal === aVal : looksLike(aVal, bVal);
});
}
function isPrimitive(val) {
// eslint-disable-next-line
return val == null || /^[sbn]/.test(typeof val);
}
module.exports = macrosPlugin;
Object.assign(module.exports, {
createMacro,
MacroError
});

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/utilities/getEntityPermissions/entityDocExists.ts"],"sourcesContent":["import {\n type AllOperations,\n combineQueries,\n type DefaultDocumentIDType,\n type PayloadRequest,\n type Where,\n} from '../../index.js'\n\n/**\n * Returns whether or not the entity doc exists based on the where query.\n */\nexport async function entityDocExists({\n id,\n slug,\n entityType,\n locale,\n operation,\n req,\n where,\n}: {\n entityType: 'collection' | 'global'\n id?: DefaultDocumentIDType\n locale?: string\n operation?: AllOperations\n req: PayloadRequest\n slug: string\n where: Where\n}): Promise<boolean> {\n if (entityType === 'global') {\n const global = await req.payload.db.findGlobal({\n slug,\n locale,\n req,\n select: {},\n where,\n })\n\n const hasGlobalDoc = Boolean(global && Object.keys(global).length > 0)\n\n return hasGlobalDoc\n }\n\n if (entityType === 'collection' && id) {\n if (operation === 'readVersions') {\n const count = await req.payload.db.countVersions({\n collection: slug,\n locale,\n req,\n where: combineQueries(where, { parent: { equals: id } }),\n })\n return count.totalDocs > 0\n }\n\n const count = await req.payload.db.count({\n collection: slug,\n locale,\n req,\n where: combineQueries(where, { id: { equals: id } }),\n })\n\n return count.totalDocs > 0\n }\n\n return false\n}\n"],"names":["combineQueries","entityDocExists","id","slug","entityType","locale","operation","req","where","global","payload","db","findGlobal","select","hasGlobalDoc","Boolean","Object","keys","length","count","countVersions","collection","parent","equals","totalDocs"],"mappings":"AAAA,SAEEA,cAAc,QAIT,iBAAgB;AAEvB;;CAEC,GACD,OAAO,eAAeC,gBAAgB,EACpCC,EAAE,EACFC,IAAI,EACJC,UAAU,EACVC,MAAM,EACNC,SAAS,EACTC,GAAG,EACHC,KAAK,EASN;IACC,IAAIJ,eAAe,UAAU;QAC3B,MAAMK,SAAS,MAAMF,IAAIG,OAAO,CAACC,EAAE,CAACC,UAAU,CAAC;YAC7CT;YACAE;YACAE;YACAM,QAAQ,CAAC;YACTL;QACF;QAEA,MAAMM,eAAeC,QAAQN,UAAUO,OAAOC,IAAI,CAACR,QAAQS,MAAM,GAAG;QAEpE,OAAOJ;IACT;IAEA,IAAIV,eAAe,gBAAgBF,IAAI;QACrC,IAAII,cAAc,gBAAgB;YAChC,MAAMa,QAAQ,MAAMZ,IAAIG,OAAO,CAACC,EAAE,CAACS,aAAa,CAAC;gBAC/CC,YAAYlB;gBACZE;gBACAE;gBACAC,OAAOR,eAAeQ,OAAO;oBAAEc,QAAQ;wBAAEC,QAAQrB;oBAAG;gBAAE;YACxD;YACA,OAAOiB,MAAMK,SAAS,GAAG;QAC3B;QAEA,MAAML,QAAQ,MAAMZ,IAAIG,OAAO,CAACC,EAAE,CAACQ,KAAK,CAAC;YACvCE,YAAYlB;YACZE;YACAE;YACAC,OAAOR,eAAeQ,OAAO;gBAAEN,IAAI;oBAAEqB,QAAQrB;gBAAG;YAAE;QACpD;QAEA,OAAOiB,MAAMK,SAAS,GAAG;IAC3B;IAEA,OAAO;AACT"}

View File

@@ -0,0 +1,17 @@
import type { FeedbackInternalOptions } from '@sentry/core';
/**
* Partial configuration that overrides default configuration values
*
* This is the config that gets passed into the integration constructor
*/
export interface OptionalFeedbackConfiguration extends Omit<Partial<FeedbackInternalOptions>, 'themeLight' | 'themeDark'> {
themeLight?: Partial<FeedbackInternalOptions['themeLight']>;
themeDark?: Partial<FeedbackInternalOptions['themeLight']>;
}
/**
* Partial configuration that overrides default configuration values
*
* This is the config that gets passed into the integration constructor
*/
export type OverrideFeedbackConfiguration = Omit<Partial<FeedbackInternalOptions>, 'themeLight' | 'themeDark'>;
//# sourceMappingURL=types.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"getDocumentView.d.ts","sourceRoot":"","sources":["../../../src/views/Document/getDocumentView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,yBAAyB,EACzB,6BAA6B,EAC7B,eAAe,EACf,qBAAqB,EACrB,yBAAyB,EAC1B,MAAM,SAAS,CAAA;AAChB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAU9C,MAAM,MAAM,cAAc,CAAC,MAAM,SAAS,MAAM,IAAI;IAClD,SAAS,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,CAAC,CAAA;IAC5B,eAAe,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAA;CAC3C,CAAA;AAED,eAAO,MAAM,eAAe,+EAMzB;IACD,gBAAgB,CAAC,EAAE,yBAAyB,CAAA;IAC5C,MAAM,EAAE,eAAe,CAAA;IACvB,cAAc,EAAE,6BAA6B,GAAG,yBAAyB,CAAA;IACzE,YAAY,CAAC,EAAE,qBAAqB,CAAA;IACpC,aAAa,EAAE,MAAM,EAAE,CAAA;CACxB,KAAG;IACF,IAAI,EAAE,YAAY,CAAA;IAClB,OAAO,EAAE,MAAM,CAAA;CAChB,GAAG,IAgWH,CAAA"}

View File

@@ -0,0 +1,15 @@
export const formatRelationshipTitle = data => {
if (Array.isArray(data)) {
return data.map(item => {
if (typeof item === 'object' && item !== null) {
return item.id;
}
return String(item);
}).filter(Boolean).join(', ');
}
if (typeof data === 'object' && data !== null) {
return data.id || '';
}
return String(data);
};
//# sourceMappingURL=formatRelationshipTitle.js.map

View File

@@ -0,0 +1,47 @@
import type { DefaultOptions } from "./_lib/defaultOptions.js";
/**
* @name setDefaultOptions
* @category Common Helpers
* @summary Set default options including locale.
* @pure false
*
* @description
* Sets the defaults for
* `options.locale`, `options.weekStartsOn` and `options.firstWeekContainsDate`
* arguments for all functions.
*
* @param options - An object with options
*
* @example
* // Set global locale:
* import { es } from 'date-fns/locale'
* setDefaultOptions({ locale: es })
* const result = format(new Date(2014, 8, 2), 'PPPP')
* //=> 'martes, 2 de septiembre de 2014'
*
* @example
* // Start of the week for 2 September 2014:
* const result = startOfWeek(new Date(2014, 8, 2))
* //=> Sun Aug 31 2014 00:00:00
*
* @example
* // Start of the week for 2 September 2014,
* // when we set that week starts on Monday by default:
* setDefaultOptions({ weekStartsOn: 1 })
* const result = startOfWeek(new Date(2014, 8, 2))
* //=> Mon Sep 01 2014 00:00:00
*
* @example
* // Manually set options take priority over default options:
* setDefaultOptions({ weekStartsOn: 1 })
* const result = startOfWeek(new Date(2014, 8, 2), { weekStartsOn: 0 })
* //=> Sun Aug 31 2014 00:00:00
*
* @example
* // Remove the option by setting it to `undefined`:
* setDefaultOptions({ weekStartsOn: 1 })
* setDefaultOptions({ weekStartsOn: undefined })
* const result = startOfWeek(new Date(2014, 8, 2))
* //=> Sun Aug 31 2014 00:00:00
*/
export declare function setDefaultOptions(options: DefaultOptions): void;

View File

@@ -0,0 +1,95 @@
# Child loggers
Let's assume we want to have `"module":"foo"` added to every log within a
module `foo.js`.
To accomplish this, simply use a child logger:
```js
'use strict'
// imports a pino logger instance of `require('pino')()`
const parentLogger = require('./lib/logger')
const log = parentLogger.child({module: 'foo'})
function doSomething () {
log.info('doSomething invoked')
}
module.exports = {
doSomething
}
```
## Cost of child logging
Child logger creation is fast:
```
benchBunyanCreation*10000: 564.514ms
benchBoleCreation*10000: 283.276ms
benchPinoCreation*10000: 258.745ms
benchPinoExtremeCreation*10000: 150.506ms
```
Logging through a child logger has little performance penalty:
```
benchBunyanChild*10000: 556.275ms
benchBoleChild*10000: 288.124ms
benchPinoChild*10000: 231.695ms
benchPinoExtremeChild*10000: 122.117ms
```
Logging via the child logger of a child logger also has negligible overhead:
```
benchBunyanChildChild*10000: 559.082ms
benchPinoChildChild*10000: 229.264ms
benchPinoExtremeChildChild*10000: 127.753ms
```
## Duplicate keys caveat
Naming conflicts can arise between child loggers and
children of child loggers.
This isn't as bad as it sounds, even if the same keys between
parent and child loggers are used, Pino resolves the conflict in the sanest way.
For example, consider the following:
```js
const pino = require('pino')
pino(pino.destination('./my-log'))
.child({a: 'property'})
.child({a: 'prop'})
.info('howdy')
```
```sh
$ cat my-log
{"pid":95469,"hostname":"MacBook-Pro-3.home","level":30,"msg":"howdy","time":1459534114473,"a":"property","a":"prop"}
```
Notice how there are two keys named `a` in the JSON output. The sub-child's properties
appear after the parent child properties.
At some point, the logs will most likely be processed (for instance with a [transport](transports.md)),
and this generally involves parsing. `JSON.parse` will return an object where the conflicting
namespace holds the final value assigned to it:
```sh
$ cat my-log | node -e "process.stdin.once('data', (line) => console.log(JSON.stringify(JSON.parse(line))))"
{"pid":95469,"hostname":"MacBook-Pro-3.home","level":30,"msg":"howdy","time":"2016-04-01T18:08:34.473Z","a":"prop"}
```
Ultimately the conflict is resolved by taking the last value, which aligns with Bunyan's child logging
behavior.
There may be cases where this edge case becomes problematic if a JSON parser with alternative behavior
is used to process the logs. It's recommended to be conscious of namespace conflicts with child loggers,
in light of an expected log processing approach.
One of Pino's performance tricks is to avoid building objects and stringifying
them, so we're building strings instead. This is why duplicate keys between
parents and children will end up in the log output.

View File

@@ -0,0 +1 @@
module.exports={C:{"3":0.00526,"4":0.01052,"5":0.0263,"52":0.01052,"78":0.00526,"115":0.09994,"120":0.00526,"128":0.01052,"134":0.00526,"136":0.00526,"138":0.01052,"139":0.00526,"140":0.03156,"141":0.00526,"142":0.01052,"143":0.00526,"144":0.0263,"145":0.4734,"146":0.69958,"147":0.00526,_:"2 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 116 117 118 119 121 122 123 124 125 126 127 129 130 131 132 133 135 137 148 149 3.5 3.6"},D:{"49":0.00526,"52":0.01052,"53":0.00526,"56":0.00526,"69":0.0263,"76":0.03156,"79":0.01578,"80":0.00526,"87":0.02104,"88":0.00526,"90":0.00526,"91":0.00526,"93":0.00526,"97":0.01052,"99":0.00526,"102":0.00526,"103":0.19988,"104":0.1578,"105":0.15254,"106":0.15254,"107":0.15254,"108":0.1578,"109":0.9205,"110":0.15254,"111":0.24196,"112":8.22138,"114":0.05786,"116":0.38924,"117":0.15254,"118":0.00526,"119":0.01052,"120":0.16832,"121":0.01052,"122":0.1052,"123":0.01578,"124":0.17884,"125":0.43658,"126":2.40908,"127":0.0263,"128":0.12624,"129":0.04734,"130":0.04734,"131":0.38398,"132":0.08942,"133":0.33138,"134":0.0263,"135":0.06838,"136":0.0263,"137":0.04208,"138":0.19988,"139":0.12624,"140":0.16832,"141":0.24722,"142":6.8906,"143":12.14534,"144":0.01052,"145":0.00526,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 50 51 54 55 57 58 59 60 61 62 63 64 65 66 67 68 70 71 72 73 74 75 77 78 81 83 84 85 86 89 92 94 95 96 98 100 101 113 115 146"},F:{"93":0.04208,"95":0.03156,"120":0.00526,"122":0.00526,"123":0.02104,"124":1.02044,"125":0.31034,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 94 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 121 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"18":0.00526,"92":0.01052,"109":0.03156,"114":0.00526,"120":0.00526,"122":0.00526,"130":0.00526,"131":0.00526,"133":0.00526,"134":0.01052,"135":0.01578,"136":0.00526,"137":0.00526,"138":0.01578,"139":0.01052,"140":0.02104,"141":0.24196,"142":1.30974,"143":3.3401,_:"12 13 14 15 16 17 79 80 81 83 84 85 86 87 88 89 90 91 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 110 111 112 113 115 116 117 118 119 121 123 124 125 126 127 128 129 132"},E:{"4":0.00526,"14":0.00526,_:"0 5 6 7 8 9 10 11 12 13 15 3.1 3.2 6.1 7.1 9.1 10.1 11.1 15.1 16.0 16.4","5.1":0.00526,"12.1":0.00526,"13.1":0.01052,"14.1":0.01578,"15.2-15.3":0.00526,"15.4":0.00526,"15.5":0.00526,"15.6":0.06838,"16.1":0.01052,"16.2":0.00526,"16.3":0.02104,"16.5":0.01052,"16.6":0.07364,"17.0":0.00526,"17.1":0.04734,"17.2":0.02104,"17.3":0.01052,"17.4":0.01578,"17.5":0.0263,"17.6":0.11572,"18.0":0.00526,"18.1":0.02104,"18.2":0.01052,"18.3":0.0263,"18.4":0.01578,"18.5-18.6":0.07364,"26.0":0.06838,"26.1":0.35768,"26.2":0.0789,"26.3":0.00526},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.0026,"5.0-5.1":0,"6.0-6.1":0.00519,"7.0-7.1":0.00389,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.01039,"10.0-10.2":0.0013,"10.3":0.01818,"11.0-11.2":0.22331,"11.3-11.4":0.00649,"12.0-12.1":0.00519,"12.2-12.5":0.05842,"13.0-13.1":0.0013,"13.2":0.00909,"13.3":0.0026,"13.4-13.7":0.00909,"14.0-14.4":0.01818,"14.5-14.8":0.01947,"15.0-15.1":0.02077,"15.2-15.3":0.01558,"15.4":0.01688,"15.5":0.01818,"15.6-15.8":0.28173,"16.0":0.03246,"16.1":0.06232,"16.2":0.03246,"16.3":0.05842,"16.4":0.01428,"16.5":0.02467,"16.6-16.7":0.36612,"17.0":0.02077,"17.1":0.03376,"17.2":0.02467,"17.3":0.03765,"17.4":0.06362,"17.5":0.12464,"17.6-17.7":0.28822,"18.0":0.06491,"18.1":0.13502,"18.2":0.07141,"18.3":0.23239,"18.4":0.11944,"18.5-18.7":8.57648,"26.0":0.16748,"26.1":1.39306,"26.2":0.26485,"26.3":0.01168},P:{"4":0.01073,"23":0.01073,"26":0.02147,"27":0.01073,"28":0.04294,"29":0.61188,_:"20 21 22 24 25 5.0-5.4 6.2-6.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0","7.2-7.4":0.02147},I:{"0":0.03786,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0.00001,"4.4":0,"4.4.3-4.4.4":0.00003},A:{"8":0.01349,"10":0.00674,"11":0.50577,_:"6 7 9 5.5"},K:{"0":0.16116,_:"10 11 12 11.1 11.5 12.1"},N:{_:"10 11"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},Q:{_:"14.9"},O:{"0":0.01896},H:{"0":0},L:{"0":38.34616},R:{_:"0"},M:{"0":0.24648}};

View File

@@ -0,0 +1 @@
{"version":3,"file":"heading-2.js","sources":["../../../src/icons/heading-2.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Heading2\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNCAxMmg4IiAvPgogIDxwYXRoIGQ9Ik00IDE4VjYiIC8+CiAgPHBhdGggZD0iTTEyIDE4VjYiIC8+CiAgPHBhdGggZD0iTTIxIDE4aC00YzAtNCA0LTMgNC02IDAtMS41LTItMi41LTQtMSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/heading-2\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Heading2 = createLucideIcon('Heading2', [\n ['path', { d: 'M4 12h8', key: '17cfdx' }],\n ['path', { d: 'M4 18V6', key: '1rz3zl' }],\n ['path', { d: 'M12 18V6', key: 'zqpxq5' }],\n ['path', { d: 'M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1', key: '9jr5yi' }],\n]);\n\nexport default Heading2;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,iBAAiB,UAAY,CAAA,CAAA,CAAA;AAAA,CAAA,CAC5C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAyC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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;AACxE,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/views/Login/LoginField/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAmB,MAAM,SAAS,CAAA;AAIxD,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAC3B,QAAQ,CAAC,IAAI,EAAE,OAAO,GAAG,iBAAiB,GAAG,UAAU,CAAA;IACvD,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAA;CAC7B,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA6DhD,CAAA"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"propagationContext.js","sources":["../../../src/utils/propagationContext.ts"],"sourcesContent":["import { uuid4 } from './misc';\n\n/**\n * Generate a random, valid trace ID.\n */\nexport function generateTraceId(): string {\n return uuid4();\n}\n\n/**\n * Generate a random, valid span ID.\n */\nexport function generateSpanId(): string {\n return uuid4().substring(16);\n}\n"],"names":[],"mappings":";;AAEA;AACA;AACA;AACO,SAAS,eAAe,GAAW;AAC1C,EAAE,OAAO,KAAK,EAAE;AAChB;;AAEA;AACA;AACA;AACO,SAAS,cAAc,GAAW;AACzC,EAAE,OAAO,KAAK,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC;AAC9B;;;;"}

View File

@@ -0,0 +1,10 @@
import { ClientOptions } from '../types-hoist/options';
/**
* Takes the SDK metadata and adds the user-agent header to the transport options.
* This ensures that the SDK sends the user-agent header with SDK name and version to
* all requests made by the transport.
*
* @see https://develop.sentry.dev/sdk/overview/#user-agent
*/
export declare function addUserAgentToTransportHeaders(options: ClientOptions): void;
//# sourceMappingURL=userAgent.d.ts.map

View File

@@ -0,0 +1,10 @@
import React from 'react';
import type { WhereBuilderProps } from './types.js';
import './index.scss';
export { WhereBuilderProps };
/**
* The WhereBuilder component is used to render the filter controls for a collection's list view.
* It is part of the {@link ListControls} component which is used to render the controls (search, filter, where).
*/
export declare const WhereBuilder: React.FC<WhereBuilderProps>;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,64 @@
{
"name": "@opentelemetry/instrumentation-express",
"version": "0.59.0",
"description": "OpenTelemetry instrumentation for `express` http web application framework",
"main": "build/src/index.js",
"types": "build/src/index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/open-telemetry/opentelemetry-js-contrib.git",
"directory": "packages/instrumentation-express"
},
"scripts": {
"clean": "rimraf build/*",
"compile": "tsc -p .",
"compile:with-dependencies": "nx run-many -t compile -p @opentelemetry/instrumentation-express",
"lint:readme": "node ../../scripts/lint-readme.js",
"prepublishOnly": "npm run compile",
"tdd": "yarn test -- --watch-extensions ts --watch",
"test": "nyc --no-clean mocha 'test/**/*.test.ts'",
"test-all-versions": "tav",
"version:update": "node ../../scripts/version-update.js",
"watch": "tsc -w"
},
"keywords": [
"express",
"instrumentation",
"nodejs",
"opentelemetry",
"profiling",
"tracing"
],
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
"engines": {
"node": "^18.19.0 || >=20.6.0"
},
"files": [
"build/src/**/*.js",
"build/src/**/*.js.map",
"build/src/**/*.d.ts"
],
"publishConfig": {
"access": "public"
},
"peerDependencies": {
"@opentelemetry/api": "^1.3.0"
},
"devDependencies": {
"@opentelemetry/api": "^1.3.0",
"@opentelemetry/context-async-hooks": "^2.0.0",
"@opentelemetry/contrib-test-utils": "^0.58.0",
"@opentelemetry/sdk-trace-base": "^2.0.0",
"@opentelemetry/sdk-trace-node": "^2.0.0",
"@types/express": "^5.0.5",
"express": "^5.1.0"
},
"dependencies": {
"@opentelemetry/core": "^2.0.0",
"@opentelemetry/instrumentation": "^0.211.0",
"@opentelemetry/semantic-conventions": "^1.27.0"
},
"homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/packages/instrumentation-express#readme",
"gitHead": "7a5f3c0a09b6a2d32c712b2962b95137c906a016"
}

View File

@@ -0,0 +1,36 @@
import { startOfHour } from "./startOfHour.mjs";
/**
* @name isSameHour
* @category Hour Helpers
* @summary Are the given dates in the same hour (and same day)?
*
* @description
* Are the given dates in the same hour (and same day)?
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param dateLeft - The first date to check
* @param dateRight - The second date to check
*
* @returns The dates are in the same hour (and same day)
*
* @example
* // Are 4 September 2014 06:00:00 and 4 September 06:30:00 in the same hour?
* const result = isSameHour(new Date(2014, 8, 4, 6, 0), new Date(2014, 8, 4, 6, 30))
* //=> true
*
* @example
* // Are 4 September 2014 06:00:00 and 5 September 06:00:00 in the same hour?
* const result = isSameHour(new Date(2014, 8, 4, 6, 0), new Date(2014, 8, 5, 6, 0))
* //=> false
*/
export function isSameHour(dateLeft, dateRight) {
const dateLeftStartOfHour = startOfHour(dateLeft);
const dateRightStartOfHour = startOfHour(dateRight);
return +dateLeftStartOfHour === +dateRightStartOfHour;
}
// Fallback for modularized imports:
export default isSameHour;

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