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

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"nextSpanAttributes.d.ts","sourceRoot":"","sources":["../../../src/common/nextSpanAttributes.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,mBAAmB,CAAC;AACpD,eAAO,MAAM,mBAAmB,mBAAmB,CAAC;AACpD,eAAO,MAAM,eAAe,eAAe,CAAC;AAC5C,eAAO,MAAM,0BAA0B,0BAA0B,CAAC;AAClE,eAAO,MAAM,iBAAiB,iBAAiB,CAAC"}

View File

@@ -0,0 +1,26 @@
import { getNavigationEntry } from './getNavigationEntry.js';
/*
* Copyright 2022 Google LLC
*
* 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.
*/
const getActivationStart = () => {
const navEntry = getNavigationEntry();
return navEntry?.activationStart ?? 0;
};
export { getActivationStart };
//# sourceMappingURL=getActivationStart.js.map

View File

@@ -0,0 +1,30 @@
import { entityKind } from "../entity.cjs";
import type { AnyMySqlColumn, MySqlColumn } from "./columns/index.cjs";
import { MySqlTable } from "./table.cjs";
export declare function primaryKey<TTableName extends string, TColumn extends AnyMySqlColumn<{
tableName: TTableName;
}>, TColumns extends AnyMySqlColumn<{
tableName: TTableName;
}>[]>(config: {
name?: string;
columns: [TColumn, ...TColumns];
}): PrimaryKeyBuilder;
/**
* @deprecated: Please use primaryKey({ columns: [] }) instead of this function
* @param columns
*/
export declare function primaryKey<TTableName extends string, TColumns extends AnyMySqlColumn<{
tableName: TTableName;
}>[]>(...columns: TColumns): PrimaryKeyBuilder;
export declare class PrimaryKeyBuilder {
static readonly [entityKind]: string;
constructor(columns: MySqlColumn[], name?: string);
}
export declare class PrimaryKey {
readonly table: MySqlTable;
static readonly [entityKind]: string;
readonly columns: MySqlColumn[];
readonly name?: string;
constructor(table: MySqlTable, columns: MySqlColumn[], name?: string);
getName(): string;
}

View File

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

View File

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

View File

@@ -0,0 +1,211 @@
// note: no implementation for weeks
const formatDistanceLocale = {
lessThanXSeconds: {
one: {
default: "1 ಸೆಕೆಂಡ್‌ಗಿಂತ ಕಡಿಮೆ",
future: "1 ಸೆಕೆಂಡ್‌ಗಿಂತ ಕಡಿಮೆ",
past: "1 ಸೆಕೆಂಡ್‌ಗಿಂತ ಕಡಿಮೆ",
},
other: {
default: "{{count}} ಸೆಕೆಂಡ್‌ಗಿಂತ ಕಡಿಮೆ",
future: "{{count}} ಸೆಕೆಂಡ್‌ಗಿಂತ ಕಡಿಮೆ",
past: "{{count}} ಸೆಕೆಂಡ್‌ಗಿಂತ ಕಡಿಮೆ",
},
},
xSeconds: {
one: {
default: "1 ಸೆಕೆಂಡ್",
future: "1 ಸೆಕೆಂಡ್‌ನಲ್ಲಿ",
past: "1 ಸೆಕೆಂಡ್ ಹಿಂದೆ",
},
other: {
default: "{{count}} ಸೆಕೆಂಡುಗಳು",
future: "{{count}} ಸೆಕೆಂಡ್‌ಗಳಲ್ಲಿ",
past: "{{count}} ಸೆಕೆಂಡ್ ಹಿಂದೆ",
},
},
halfAMinute: {
other: {
default: "ಅರ್ಧ ನಿಮಿಷ",
future: "ಅರ್ಧ ನಿಮಿಷದಲ್ಲಿ",
past: "ಅರ್ಧ ನಿಮಿಷದ ಹಿಂದೆ",
},
},
lessThanXMinutes: {
one: {
default: "1 ನಿಮಿಷಕ್ಕಿಂತ ಕಡಿಮೆ",
future: "1 ನಿಮಿಷಕ್ಕಿಂತ ಕಡಿಮೆ",
past: "1 ನಿಮಿಷಕ್ಕಿಂತ ಕಡಿಮೆ",
},
other: {
default: "{{count}} ನಿಮಿಷಕ್ಕಿಂತ ಕಡಿಮೆ",
future: "{{count}} ನಿಮಿಷಕ್ಕಿಂತ ಕಡಿಮೆ",
past: "{{count}} ನಿಮಿಷಕ್ಕಿಂತ ಕಡಿಮೆ",
},
},
xMinutes: {
one: {
default: "1 ನಿಮಿಷ",
future: "1 ನಿಮಿಷದಲ್ಲಿ",
past: "1 ನಿಮಿಷದ ಹಿಂದೆ",
},
other: {
default: "{{count}} ನಿಮಿಷಗಳು",
future: "{{count}} ನಿಮಿಷಗಳಲ್ಲಿ",
past: "{{count}} ನಿಮಿಷಗಳ ಹಿಂದೆ",
},
},
aboutXHours: {
one: {
default: "ಸುಮಾರು 1 ಗಂಟೆ",
future: "ಸುಮಾರು 1 ಗಂಟೆಯಲ್ಲಿ",
past: "ಸುಮಾರು 1 ಗಂಟೆ ಹಿಂದೆ",
},
other: {
default: "ಸುಮಾರು {{count}} ಗಂಟೆಗಳು",
future: "ಸುಮಾರು {{count}} ಗಂಟೆಗಳಲ್ಲಿ",
past: "ಸುಮಾರು {{count}} ಗಂಟೆಗಳ ಹಿಂದೆ",
},
},
xHours: {
one: {
default: "1 ಗಂಟೆ",
future: "1 ಗಂಟೆಯಲ್ಲಿ",
past: "1 ಗಂಟೆ ಹಿಂದೆ",
},
other: {
default: "{{count}} ಗಂಟೆಗಳು",
future: "{{count}} ಗಂಟೆಗಳಲ್ಲಿ",
past: "{{count}} ಗಂಟೆಗಳ ಹಿಂದೆ",
},
},
xDays: {
one: {
default: "1 ದಿನ",
future: "1 ದಿನದಲ್ಲಿ",
past: "1 ದಿನದ ಹಿಂದೆ",
},
other: {
default: "{{count}} ದಿನಗಳು",
future: "{{count}} ದಿನಗಳಲ್ಲಿ",
past: "{{count}} ದಿನಗಳ ಹಿಂದೆ",
},
},
// TODO
// aboutXWeeks: {},
// TODO
// xWeeks: {},
aboutXMonths: {
one: {
default: "ಸುಮಾರು 1 ತಿಂಗಳು",
future: "ಸುಮಾರು 1 ತಿಂಗಳಲ್ಲಿ",
past: "ಸುಮಾರು 1 ತಿಂಗಳ ಹಿಂದೆ",
},
other: {
default: "ಸುಮಾರು {{count}} ತಿಂಗಳು",
future: "ಸುಮಾರು {{count}} ತಿಂಗಳುಗಳಲ್ಲಿ",
past: "ಸುಮಾರು {{count}} ತಿಂಗಳುಗಳ ಹಿಂದೆ",
},
},
xMonths: {
one: {
default: "1 ತಿಂಗಳು",
future: "1 ತಿಂಗಳಲ್ಲಿ",
past: "1 ತಿಂಗಳ ಹಿಂದೆ",
},
other: {
default: "{{count}} ತಿಂಗಳು",
future: "{{count}} ತಿಂಗಳುಗಳಲ್ಲಿ",
past: "{{count}} ತಿಂಗಳುಗಳ ಹಿಂದೆ",
},
},
aboutXYears: {
one: {
default: "ಸುಮಾರು 1 ವರ್ಷ",
future: "ಸುಮಾರು 1 ವರ್ಷದಲ್ಲಿ",
past: "ಸುಮಾರು 1 ವರ್ಷದ ಹಿಂದೆ",
},
other: {
default: "ಸುಮಾರು {{count}} ವರ್ಷಗಳು",
future: "ಸುಮಾರು {{count}} ವರ್ಷಗಳಲ್ಲಿ",
past: "ಸುಮಾರು {{count}} ವರ್ಷಗಳ ಹಿಂದೆ",
},
},
xYears: {
one: {
default: "1 ವರ್ಷ",
future: "1 ವರ್ಷದಲ್ಲಿ",
past: "1 ವರ್ಷದ ಹಿಂದೆ",
},
other: {
default: "{{count}} ವರ್ಷಗಳು",
future: "{{count}} ವರ್ಷಗಳಲ್ಲಿ",
past: "{{count}} ವರ್ಷಗಳ ಹಿಂದೆ",
},
},
overXYears: {
one: {
default: "1 ವರ್ಷದ ಮೇಲೆ",
future: "1 ವರ್ಷದ ಮೇಲೆ",
past: "1 ವರ್ಷದ ಮೇಲೆ",
},
other: {
default: "{{count}} ವರ್ಷಗಳ ಮೇಲೆ",
future: "{{count}} ವರ್ಷಗಳ ಮೇಲೆ",
past: "{{count}} ವರ್ಷಗಳ ಮೇಲೆ",
},
},
almostXYears: {
one: {
default: "ಬಹುತೇಕ 1 ವರ್ಷದಲ್ಲಿ",
future: "ಬಹುತೇಕ 1 ವರ್ಷದಲ್ಲಿ",
past: "ಬಹುತೇಕ 1 ವರ್ಷದಲ್ಲಿ",
},
other: {
default: "ಬಹುತೇಕ {{count}} ವರ್ಷಗಳಲ್ಲಿ",
future: "ಬಹುತೇಕ {{count}} ವರ್ಷಗಳಲ್ಲಿ",
past: "ಬಹುತೇಕ {{count}} ವರ್ಷಗಳಲ್ಲಿ",
},
},
};
function getResultByTense(parentToken, options) {
if (options?.addSuffix) {
if (options.comparison && options.comparison > 0) {
return parentToken.future;
} else {
return parentToken.past;
}
}
return parentToken.default;
}
export const formatDistance = (token, count, options) => {
let result;
const tokenValue = formatDistanceLocale[token];
if (tokenValue.one && count === 1) {
result = getResultByTense(tokenValue.one, options);
} else {
result = getResultByTense(tokenValue.other, options);
}
return result.replace("{{count}}", String(count));
};

View File

@@ -0,0 +1 @@
{"version":3,"file":"indent-increase.js","sources":["../../../src/icons/indent-increase.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name IndentIncrease\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cG9seWxpbmUgcG9pbnRzPSIzIDggNyAxMiAzIDE2IiAvPgogIDxsaW5lIHgxPSIyMSIgeDI9IjExIiB5MT0iMTIiIHkyPSIxMiIgLz4KICA8bGluZSB4MT0iMjEiIHgyPSIxMSIgeTE9IjYiIHkyPSI2IiAvPgogIDxsaW5lIHgxPSIyMSIgeDI9IjExIiB5MT0iMTgiIHkyPSIxOCIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/indent-increase\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 IndentIncrease = createLucideIcon('IndentIncrease', [\n ['polyline', { points: '3 8 7 12 3 16', key: 'f3rxhf' }],\n ['line', { x1: '21', x2: '11', y1: '12', y2: '12', key: '1fxxak' }],\n ['line', { x1: '21', x2: '11', y1: '6', y2: '6', key: 'asgu94' }],\n ['line', { x1: '21', x2: '11', y1: '18', y2: '18', key: '13dsj7' }],\n]);\n\nexport default IndentIncrease;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAiB,iBAAiB,gBAAkB,CAAA,CAAA,CAAA;AAAA,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,CAAA,CAAA,CAAA,CAAE,QAAQ,CAAiB,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,CACvD,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAClE,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAChE,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACpE,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,8 @@
/**
* Decides if the supplied variable is variant label
*/
function isVariantLabel(v) {
return typeof v === "string" || Array.isArray(v);
}
export { isVariantLabel };

View File

@@ -0,0 +1,2 @@
import { LinkedJSONSchema } from './types/JSONSchema';
export declare function validate(schema: LinkedJSONSchema, filename: string): string[];

View File

@@ -0,0 +1,23 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const BookCopy = createLucideIcon("BookCopy", [
["path", { d: "M2 16V4a2 2 0 0 1 2-2h11", key: "spzkk5" }],
[
"path",
{
d: "M22 18H11a2 2 0 1 0 0 4h10.5a.5.5 0 0 0 .5-.5v-15a.5.5 0 0 0-.5-.5H11a2 2 0 0 0-2 2v12",
key: "1wz07i"
}
],
["path", { d: "M5 14H4a2 2 0 1 0 0 4h1", key: "16gqf9" }]
]);
export { BookCopy as default };
//# sourceMappingURL=book-copy.js.map

View File

@@ -0,0 +1,23 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _crypto = _interopRequireDefault(require("crypto"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function md5(bytes) {
if (Array.isArray(bytes)) {
bytes = Buffer.from(bytes);
} else if (typeof bytes === 'string') {
bytes = Buffer.from(bytes, 'utf8');
}
return _crypto.default.createHash('md5').update(bytes).digest();
}
var _default = md5;
exports.default = _default;

View File

@@ -0,0 +1 @@
export { _ as default } from "../esm/_non_iterable_spread.js";

View File

@@ -0,0 +1,40 @@
import type { ColumnBuilderBaseConfig } from "../../column-builder.cjs";
import type { ColumnBaseConfig } from "../../column.cjs";
import { entityKind } from "../../entity.cjs";
import type { AnyPgTable } from "../table.cjs";
import { PgColumn } from "./common.cjs";
import { PgDateColumnBaseBuilder } from "./date.common.cjs";
import type { Precision } from "./timestamp.cjs";
export type PgTimeBuilderInitial<TName extends string> = PgTimeBuilder<{
name: TName;
dataType: 'string';
columnType: 'PgTime';
data: string;
driverParam: string;
enumValues: undefined;
}>;
export declare class PgTimeBuilder<T extends ColumnBuilderBaseConfig<'string', 'PgTime'>> extends PgDateColumnBaseBuilder<T, {
withTimezone: boolean;
precision: number | undefined;
}> {
readonly withTimezone: boolean;
readonly precision: number | undefined;
static readonly [entityKind]: string;
constructor(name: T['name'], withTimezone: boolean, precision: number | undefined);
}
export declare class PgTime<T extends ColumnBaseConfig<'string', 'PgTime'>> extends PgColumn<T> {
static readonly [entityKind]: string;
readonly withTimezone: boolean;
readonly precision: number | undefined;
constructor(table: AnyPgTable<{
name: T['tableName'];
}>, config: PgTimeBuilder<T>['config']);
getSQLType(): string;
}
export interface TimeConfig {
precision?: Precision;
withTimezone?: boolean;
}
export declare function time(): PgTimeBuilderInitial<''>;
export declare function time(config?: TimeConfig): PgTimeBuilderInitial<''>;
export declare function time<TName extends string>(name: TName, config?: TimeConfig): PgTimeBuilderInitial<TName>;

View File

@@ -0,0 +1,4 @@
import { Actions } from './actions';
import type { State } from './types';
export declare function getInitialState(): State;
export declare function reducer(state: State, action: Actions): State;

View File

@@ -0,0 +1,117 @@
import * as util from "../core/util.js";
const error = () => {
const Sizable = {
string: { unit: "caractères", verb: "avoir" },
file: { unit: "octets", verb: "avoir" },
array: { unit: "éléments", verb: "avoir" },
set: { unit: "éléments", verb: "avoir" },
};
function getSizing(origin) {
return Sizable[origin] ?? null;
}
const parsedType = (data) => {
const t = typeof data;
switch (t) {
case "number": {
return Number.isNaN(data) ? "NaN" : "number";
}
case "object": {
if (Array.isArray(data)) {
return "array";
}
if (data === null) {
return "null";
}
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
return data.constructor.name;
}
}
}
return t;
};
const Nouns = {
regex: "entrée",
email: "adresse courriel",
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: "date-heure ISO",
date: "date ISO",
time: "heure ISO",
duration: "durée ISO",
ipv4: "adresse IPv4",
ipv6: "adresse IPv6",
cidrv4: "plage IPv4",
cidrv6: "plage IPv6",
base64: "chaîne encodée en base64",
base64url: "chaîne encodée en base64url",
json_string: "chaîne JSON",
e164: "numéro E.164",
jwt: "JWT",
template_literal: "entrée",
};
return (issue) => {
switch (issue.code) {
case "invalid_type":
return `Entrée invalide : attendu ${issue.expected}, reçu ${parsedType(issue.input)}`;
case "invalid_value":
if (issue.values.length === 1)
return `Entrée invalide : attendu ${util.stringifyPrimitive(issue.values[0])}`;
return `Option invalide : attendu l'une des valeurs suivantes ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "≤" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return `Trop grand : attendu que ${issue.origin ?? "la valeur"} ait ${adj}${issue.maximum.toString()} ${sizing.unit}`;
return `Trop grand : attendu que ${issue.origin ?? "la valeur"} soit ${adj}${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? "≥" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
return `Trop petit : attendu que ${issue.origin} ait ${adj}${issue.minimum.toString()} ${sizing.unit}`;
}
return `Trop petit : attendu que ${issue.origin} soit ${adj}${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue;
if (_issue.format === "starts_with") {
return `Chaîne invalide : doit commencer par "${_issue.prefix}"`;
}
if (_issue.format === "ends_with")
return `Chaîne invalide : doit se terminer par "${_issue.suffix}"`;
if (_issue.format === "includes")
return `Chaîne invalide : doit inclure "${_issue.includes}"`;
if (_issue.format === "regex")
return `Chaîne invalide : doit correspondre au motif ${_issue.pattern}`;
return `${Nouns[_issue.format] ?? issue.format} invalide`;
}
case "not_multiple_of":
return `Nombre invalide : doit être un multiple de ${issue.divisor}`;
case "unrecognized_keys":
return `Clé${issue.keys.length > 1 ? "s" : ""} non reconnue${issue.keys.length > 1 ? "s" : ""} : ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `Clé invalide dans ${issue.origin}`;
case "invalid_union":
return "Entrée invalide";
case "invalid_element":
return `Valeur invalide dans ${issue.origin}`;
default:
return `Entrée invalide`;
}
};
};
export default function () {
return {
localeError: error(),
};
}

View File

@@ -0,0 +1,87 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const path = require('path');
const util = require('../util.js');
/**
* Generate the value injection rules for client and server in turbopack config.
*/
function generateValueInjectionRules({
routeManifest,
nextJsVersion,
tunnelPath,
vercelCronsConfig,
}
) {
const rules = [];
const isomorphicValues = {};
let clientValues = {};
let serverValues = {};
if (nextJsVersion) {
// This is used to determine version-based dev-symbolication behavior
isomorphicValues._sentryNextJsVersion = nextJsVersion;
}
if (routeManifest) {
clientValues._sentryRouteManifest = JSON.stringify(routeManifest);
}
// Inject tunnel route path for both client and server
if (tunnelPath) {
isomorphicValues._sentryRewritesTunnelPath = tunnelPath;
}
// Inject Vercel crons config for server-side cron auto-instrumentation
if (vercelCronsConfig) {
serverValues._sentryVercelCronsConfig = JSON.stringify(vercelCronsConfig);
}
// Inject server modules (matching webpack's __SENTRY_SERVER_MODULES__ behavior)
// Use process.cwd() to get the project directory at build time
serverValues.__SENTRY_SERVER_MODULES__ = util.getPackageModules(process.cwd());
if (Object.keys(isomorphicValues).length > 0) {
clientValues = { ...clientValues, ...isomorphicValues };
serverValues = { ...serverValues, ...isomorphicValues };
}
// Client value injection
if (Object.keys(clientValues).length > 0) {
rules.push({
matcher: '**/instrumentation-client.*',
rule: {
loaders: [
{
loader: path.resolve(__dirname, '..', 'loaders', 'valueInjectionLoader.js'),
options: {
values: clientValues,
},
},
],
},
});
}
// Server value injection
if (Object.keys(serverValues).length > 0) {
rules.push({
matcher: '**/instrumentation.*',
rule: {
loaders: [
{
loader: path.resolve(__dirname, '..', 'loaders', 'valueInjectionLoader.js'),
options: {
values: serverValues,
},
},
],
},
});
}
return rules;
}
exports.generateValueInjectionRules = generateValueInjectionRules;
//# sourceMappingURL=generateValueInjectionRules.js.map

View File

@@ -0,0 +1 @@
var m=Object.defineProperty;var a=(r,t)=>m(r,"name",{value:t,configurable:!0});import{r as o}from"./get-pipe-path-BHW2eJdv.mjs";import{r as n}from"./register-CFH5oNdT.mjs";let e;const s=a((r,t)=>(e||(e=n({namespace:Date.now().toString()})),e.require(r,t)),"tsxRequire"),i=a((r,t,c)=>(e||(e=n({namespace:Date.now().toString()})),e.resolve(r,t,c)),"resolve");i.paths=o.resolve.paths,s.resolve=i,s.main=o.main,s.extensions=o.extensions,s.cache=o.cache;export{s as t};

View File

@@ -0,0 +1,19 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const ListPlus = createLucideIcon("ListPlus", [
["path", { d: "M11 12H3", key: "51ecnj" }],
["path", { d: "M16 6H3", key: "1wxfjs" }],
["path", { d: "M16 18H3", key: "12xzn7" }],
["path", { d: "M18 9v6", key: "1twb98" }],
["path", { d: "M21 12h-6", key: "bt1uis" }]
]);
export { ListPlus as default };
//# sourceMappingURL=list-plus.js.map

View File

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

View File

@@ -0,0 +1,8 @@
"use strict";
function _assert_this_initialized(self) {
if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return self;
}
exports._ = _assert_this_initialized;

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.client.d.ts","sourceRoot":"","sources":["../../../src/views/API/index.client.tsx"],"names":[],"mappings":"AAkBA,OAAO,cAAc,CAAA;AAGrB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAO9B,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EA+LjC,CAAA"}

View File

@@ -0,0 +1,23 @@
function notTranspiledError(name) {
throw new Error(
'styled-jsx/css: if you are getting this error it means that your `' +
name +
'` tagged template literals were not transpiled.'
)
}
function css() {
notTranspiledError('css')
}
css.global = function() {
notTranspiledError('global')
}
css.resolve = function() {
notTranspiledError('resolve')
}
module.exports = css
module.exports.global = css.global
module.exports.resolve = css.resolve

View File

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

View File

@@ -0,0 +1,9 @@
import { entityKind } from "../entity.cjs";
import { BaseSQLiteDatabase } from "../sqlite-core/db.cjs";
import type { DrizzleConfig } from "../utils.cjs";
export declare class DrizzleSqliteDODatabase<TSchema extends Record<string, unknown> = Record<string, never>> extends BaseSQLiteDatabase<'sync', SqlStorageCursor<Record<string, SqlStorageValue>>, TSchema> {
static readonly [entityKind]: string;
}
export declare function drizzle<TSchema extends Record<string, unknown> = Record<string, never>, TClient extends DurableObjectStorage = DurableObjectStorage>(client: TClient, config?: DrizzleConfig<TSchema>): DrizzleSqliteDODatabase<TSchema> & {
$client: TClient;
};

View File

@@ -0,0 +1,117 @@
import * as util from "../core/util.js";
const error = () => {
const Sizable = {
string: { unit: "តួអក្សរ", verb: "គួរមាន" },
file: { unit: "បៃ", verb: "គួរមាន" },
array: { unit: "ធាតុ", verb: "គួរមាន" },
set: { unit: "ធាតុ", verb: "គួរមាន" },
};
function getSizing(origin) {
return Sizable[origin] ?? null;
}
const parsedType = (data) => {
const t = typeof data;
switch (t) {
case "number": {
return Number.isNaN(data) ? "មិនមែនជាលេខ (NaN)" : "លេខ";
}
case "object": {
if (Array.isArray(data)) {
return "អារេ (Array)";
}
if (data === null) {
return "គ្មានតម្លៃ (null)";
}
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
return data.constructor.name;
}
}
}
return t;
};
const Nouns = {
regex: "ទិន្នន័យបញ្ចូល",
email: "អាសយដ្ឋានអ៊ីមែល",
url: "URL",
emoji: "សញ្ញាអារម្មណ៍",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "កាលបរិច្ឆេទ និងម៉ោង ISO",
date: "កាលបរិច្ឆេទ ISO",
time: "ម៉ោង ISO",
duration: "រយៈពេល ISO",
ipv4: "អាសយដ្ឋាន IPv4",
ipv6: "អាសយដ្ឋាន IPv6",
cidrv4: "ដែនអាសយដ្ឋាន IPv4",
cidrv6: "ដែនអាសយដ្ឋាន IPv6",
base64: "ខ្សែអក្សរអ៊ិកូដ base64",
base64url: "ខ្សែអក្សរអ៊ិកូដ base64url",
json_string: "ខ្សែអក្សរ JSON",
e164: "លេខ E.164",
jwt: "JWT",
template_literal: "ទិន្នន័យបញ្ចូល",
};
return (issue) => {
switch (issue.code) {
case "invalid_type":
return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${issue.expected} ប៉ុន្តែទទួលបាន ${parsedType(issue.input)}`;
case "invalid_value":
if (issue.values.length === 1)
return `ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${util.stringifyPrimitive(issue.values[0])}`;
return `ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return `ធំពេក៖ ត្រូវការ ${issue.origin ?? "តម្លៃ"} ${adj} ${issue.maximum.toString()} ${sizing.unit ?? "ធាតុ"}`;
return `ធំពេក៖ ត្រូវការ ${issue.origin ?? "តម្លៃ"} ${adj} ${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
return `តូចពេក៖ ត្រូវការ ${issue.origin} ${adj} ${issue.minimum.toString()} ${sizing.unit}`;
}
return `តូចពេក៖ ត្រូវការ ${issue.origin} ${adj} ${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue;
if (_issue.format === "starts_with") {
return `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${_issue.prefix}"`;
}
if (_issue.format === "ends_with")
return `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${_issue.suffix}"`;
if (_issue.format === "includes")
return `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${_issue.includes}"`;
if (_issue.format === "regex")
return `ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${_issue.pattern}`;
return `មិនត្រឹមត្រូវ៖ ${Nouns[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${issue.divisor}`;
case "unrecognized_keys":
return `រកឃើញសោមិនស្គាល់៖ ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `សោមិនត្រឹមត្រូវនៅក្នុង ${issue.origin}`;
case "invalid_union":
return `ទិន្នន័យមិនត្រឹមត្រូវ`;
case "invalid_element":
return `ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${issue.origin}`;
default:
return `ទិន្នន័យមិនត្រឹមត្រូវ`;
}
};
};
export default function () {
return {
localeError: error(),
};
}

View File

@@ -0,0 +1,192 @@
import { executeAccess } from '../../auth/executeAccess.js';
import { NotFound } from '../../errors/NotFound.js';
import { afterRead } from '../../fields/hooks/afterRead/index.js';
import { lockedDocumentsCollectionSlug } from '../../locked-documents/config.js';
import { getSelectMode } from '../../utilities/getSelectMode.js';
import { hasDraftsEnabled } from '../../utilities/getVersionsConfig.js';
import { killTransaction } from '../../utilities/killTransaction.js';
import { sanitizeSelect } from '../../utilities/sanitizeSelect.js';
import { replaceWithDraftIfAvailable } from '../../versions/drafts/replaceWithDraftIfAvailable.js';
export const findOneOperation = async (args)=>{
const { slug, depth, draft: replaceWithVersion = false, flattenLocales, globalConfig, includeLockStatus: includeLockStatusFromArgs, overrideAccess = false, populate, req: { fallbackLocale, locale }, req, select: incomingSelect, showHiddenFields } = args;
const includeLockStatus = includeLockStatusFromArgs && req.payload.collections?.[lockedDocumentsCollectionSlug];
try {
// /////////////////////////////////////
// beforeOperation - Global
// /////////////////////////////////////
if (globalConfig.hooks?.beforeOperation?.length) {
for (const hook of globalConfig.hooks.beforeOperation){
args = await hook({
args,
context: args.req.context,
global: globalConfig,
operation: 'read',
overrideAccess,
req: args.req
}) || args;
}
}
// /////////////////////////////////////
// Retrieve and execute access
// /////////////////////////////////////
let accessResult;
if (!overrideAccess) {
accessResult = await executeAccess({
req
}, globalConfig.access.read);
}
if (accessResult === false) {
throw new NotFound(req.t);
}
const select = sanitizeSelect({
fields: globalConfig.flattenedFields,
forceSelect: globalConfig.forceSelect,
select: incomingSelect
});
// /////////////////////////////////////
// Perform database operation
// /////////////////////////////////////
let dbSelect = select;
if (globalConfig.versions?.drafts && replaceWithVersion && select && getSelectMode(select) === 'include') {
dbSelect = {
...select,
createdAt: true,
updatedAt: true
};
}
const docFromDB = await req.payload.db.findGlobal({
slug,
locale: locale,
req,
select: dbSelect,
where: overrideAccess ? undefined : accessResult
});
// Check if no document was returned (Postgres returns {} instead of null)
const hasDoc = docFromDB && Object.keys(docFromDB).length > 0;
if (!hasDoc && !args.data && !overrideAccess && accessResult !== true) {
return {};
}
let doc = args.data ?? (hasDoc ? docFromDB : null) ?? {};
// /////////////////////////////////////
// Include Lock Status if required
// /////////////////////////////////////
if (includeLockStatus && slug) {
let lockStatus = null;
try {
const lockDocumentsProp = globalConfig?.lockDocuments;
const lockDurationDefault = 300 // Default 5 minutes in seconds
;
const lockDuration = typeof lockDocumentsProp === 'object' ? lockDocumentsProp.duration : lockDurationDefault;
const lockDurationInMilliseconds = lockDuration * 1000;
const lockedDocument = await req.payload.find({
collection: lockedDocumentsCollectionSlug,
depth: 1,
limit: 1,
overrideAccess: false,
pagination: false,
req,
where: {
and: [
{
globalSlug: {
equals: slug
}
},
{
updatedAt: {
greater_than: new Date(new Date().getTime() - lockDurationInMilliseconds)
}
}
]
}
});
if (lockedDocument && lockedDocument.docs.length > 0) {
lockStatus = lockedDocument.docs[0];
}
} catch {
// swallow error
}
doc._isLocked = !!lockStatus;
doc._userEditing = lockStatus?.user?.value ?? null;
}
// /////////////////////////////////////
// Replace document with draft if available
// /////////////////////////////////////
if (replaceWithVersion && hasDraftsEnabled(globalConfig)) {
doc = await replaceWithDraftIfAvailable({
accessResult,
doc,
entity: globalConfig,
entityType: 'global',
overrideAccess,
req,
select
});
}
// /////////////////////////////////////
// Execute before global hook
// /////////////////////////////////////
if (globalConfig.hooks?.beforeRead?.length) {
for (const hook of globalConfig.hooks.beforeRead){
doc = await hook({
context: req.context,
doc,
global: globalConfig,
overrideAccess,
req
}) || doc;
}
}
// /////////////////////////////////////
// Execute globalType field if not selected
// /////////////////////////////////////
if (select && doc.globalType) {
const selectMode = getSelectMode(select);
if (selectMode === 'include' && !select['globalType'] || selectMode === 'exclude' && select['globalType'] === false) {
delete doc['globalType'];
}
}
// /////////////////////////////////////
// Execute field-level hooks and access
// /////////////////////////////////////
doc = await afterRead({
collection: null,
context: req.context,
depth: depth,
doc,
draft: replaceWithVersion,
fallbackLocale: fallbackLocale,
flattenLocales,
global: globalConfig,
locale: locale,
overrideAccess,
populate,
req,
select,
showHiddenFields: showHiddenFields
});
// /////////////////////////////////////
// Execute after global hook
// /////////////////////////////////////
if (globalConfig.hooks?.afterRead?.length) {
for (const hook of globalConfig.hooks.afterRead){
doc = await hook({
context: req.context,
doc,
global: globalConfig,
overrideAccess,
req
}) || doc;
}
}
// /////////////////////////////////////
// Return results
// /////////////////////////////////////
return doc;
} catch (error) {
await killTransaction(req);
throw error;
}
};
//# sourceMappingURL=findOne.js.map

View File

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

View File

@@ -0,0 +1,22 @@
import { DirectusUser } from "./user.cjs";
import { DirectusOperation } from "./operation.cjs";
import { MergeCoreCollection } from "../types/schema.cjs";
//#region src/schema/flow.d.ts
type DirectusFlow<Schema = any> = MergeCoreCollection<Schema, 'directus_flows', {
id: string;
name: string;
icon: string | null;
color: string | null;
description: string | null;
status: string;
trigger: string | null;
accountability: string | null;
options: Record<string, any> | null;
operation: DirectusOperation<Schema> | string | null;
date_created: 'datetime' | null;
user_created: DirectusUser<Schema> | string | null;
}>;
//#endregion
export { DirectusFlow };
//# sourceMappingURL=flow.d.cts.map

View File

@@ -0,0 +1,75 @@
'use strict'
const bench = require('fastbench')
const pino = require('../../')
const base = pino(pino.destination('/dev/null'))
const child = base.child({})
const childChild = child.child({})
const childChildChild = childChild.child({})
const childChildChildChild = childChildChild.child({})
const child2 = base.child({})
const baseSerializers = pino(pino.destination('/dev/null'))
const baseSerializersChild = baseSerializers.child({})
const baseSerializersChildSerializers = baseSerializers.child({})
const max = 100
const run = bench([
function benchPinoBase (cb) {
for (var i = 0; i < max; i++) {
base.info({ hello: 'world' })
}
setImmediate(cb)
},
function benchPinoChild (cb) {
for (var i = 0; i < max; i++) {
child.info({ hello: 'world' })
}
setImmediate(cb)
},
function benchPinoChildChild (cb) {
for (var i = 0; i < max; i++) {
childChild.info({ hello: 'world' })
}
setImmediate(cb)
},
function benchPinoChildChildChild (cb) {
for (var i = 0; i < max; i++) {
childChildChild.info({ hello: 'world' })
}
setImmediate(cb)
},
function benchPinoChildChildChildChild (cb) {
for (var i = 0; i < max; i++) {
childChildChildChild.info({ hello: 'world' })
}
setImmediate(cb)
},
function benchPinoChild2 (cb) {
for (var i = 0; i < max; i++) {
child2.info({ hello: 'world' })
}
setImmediate(cb)
},
function benchPinoBaseSerializers (cb) {
for (var i = 0; i < max; i++) {
baseSerializers.info({ hello: 'world' })
}
setImmediate(cb)
},
function benchPinoBaseSerializersChild (cb) {
for (var i = 0; i < max; i++) {
baseSerializersChild.info({ hello: 'world' })
}
setImmediate(cb)
},
function benchPinoBaseSerializersChildSerializers (cb) {
for (var i = 0; i < max; i++) {
baseSerializersChildSerializers.info({ hello: 'world' })
}
setImmediate(cb)
}
], 10000)
run(run)

View File

@@ -0,0 +1,29 @@
import { toDate } from "./toDate.mjs";
/**
* @name getTime
* @category Timestamp Helpers
* @summary Get the milliseconds timestamp of the given date.
*
* @description
* Get the milliseconds timestamp of the given date.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param date - The given date
*
* @returns The timestamp
*
* @example
* // Get the timestamp of 29 February 2012 11:45:05.123:
* const result = getTime(new Date(2012, 1, 29, 11, 45, 5, 123))
* //=> 1330515905123
*/
export function getTime(date) {
const _date = toDate(date);
const timestamp = _date.getTime();
return timestamp;
}
// Fallback for modularized imports:
export default getTime;

View File

@@ -0,0 +1,11 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _nonIterableSpread;
function _nonIterableSpread() {
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
//# sourceMappingURL=nonIterableSpread.js.map

View File

@@ -0,0 +1 @@
module.exports={C:{"46":0.00474,"53":0.00237,"55":0.00237,"58":0.00237,"70":0.01184,"75":0.00237,"82":0.00237,"84":0.00237,"95":0.00474,"106":0.00237,"110":0.00237,"113":0.01658,"115":0.04736,"116":0.00237,"120":0.00237,"127":0.00237,"128":0.0071,"138":0.00947,"140":0.01421,"143":0.00237,"144":0.0071,"145":0.20128,"146":0.31968,_:"2 3 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 47 48 49 50 51 52 54 56 57 59 60 61 62 63 64 65 66 67 68 69 71 72 73 74 76 77 78 79 80 81 83 85 86 87 88 89 90 91 92 93 94 96 97 98 99 100 101 102 103 104 105 107 108 109 111 112 114 117 118 119 121 122 123 124 125 126 129 130 131 132 133 134 135 136 137 139 141 142 147 148 149 3.5 3.6"},D:{"65":0.00474,"67":0.00474,"70":0.00237,"71":0.00474,"75":0.00237,"80":0.0071,"86":0.0071,"87":0.00237,"88":0.00237,"90":0.00237,"93":0.00237,"97":0.00237,"98":0.00237,"99":0.00237,"103":0.0071,"105":0.00237,"106":0.00237,"108":0.00237,"109":0.04736,"110":0.06157,"111":0.00237,"112":0.00237,"114":0.00237,"116":0.03789,"117":0.00947,"119":0.01184,"120":0.00237,"121":0.01421,"122":0.00474,"123":0.0071,"125":0.0071,"126":0.04262,"128":0.00237,"130":0.00947,"131":0.02605,"132":0.00474,"133":0.0071,"134":0.01658,"135":0.01894,"136":0.01184,"137":0.0071,"138":0.02368,"139":0.07578,"140":0.03552,"141":0.10419,"142":1.1177,"143":4.25293,_:"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 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 66 68 69 72 73 74 76 77 78 79 81 83 84 85 89 91 92 94 95 96 100 101 102 104 107 113 115 118 124 127 129 144 145 146"},F:{"79":0.00237,"88":0.00474,"89":0.01184,"90":0.00237,"92":0.00947,"93":0.20365,"95":0.00237,"112":0.00474,"122":0.00237,"124":0.13971,"125":0.10419,_:"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 80 81 82 83 84 85 86 87 91 94 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 113 114 115 116 117 118 119 120 121 123 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"14":0.00237,"16":0.0071,"18":0.02131,"85":0.00237,"89":0.01894,"90":0.00474,"92":0.02368,"100":0.00237,"120":0.00237,"122":0.00237,"128":0.00237,"130":0.00474,"131":0.00237,"133":0.00237,"134":0.00474,"136":0.00237,"137":0.00237,"138":0.00237,"139":0.01421,"140":0.00947,"141":0.01184,"142":0.33862,"143":0.8809,_:"12 13 15 17 79 80 81 83 84 86 87 88 91 93 94 95 96 97 98 99 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 121 123 124 125 126 127 129 132 135"},E:{_:"0 4 5 6 7 8 9 10 11 12 13 14 15 3.1 3.2 6.1 7.1 9.1 10.1 11.1 14.1 15.2-15.3 15.4 15.5 16.0 16.1 16.2 16.3 16.4 16.5 17.0 17.1 17.2 17.3 17.4 17.5 18.0 18.2 18.3 26.3","5.1":0.00237,"12.1":0.00237,"13.1":0.00474,"15.1":0.0071,"15.6":0.00947,"16.6":0.00237,"17.6":0.01658,"18.1":0.00474,"18.4":0.00237,"18.5-18.6":0.00237,"26.0":0.01184,"26.1":0.05446,"26.2":0.0071},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00049,"5.0-5.1":0,"6.0-6.1":0.00099,"7.0-7.1":0.00074,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.00197,"10.0-10.2":0.00025,"10.3":0.00345,"11.0-11.2":0.0424,"11.3-11.4":0.00123,"12.0-12.1":0.00099,"12.2-12.5":0.01109,"13.0-13.1":0.00025,"13.2":0.00173,"13.3":0.00049,"13.4-13.7":0.00173,"14.0-14.4":0.00345,"14.5-14.8":0.0037,"15.0-15.1":0.00394,"15.2-15.3":0.00296,"15.4":0.0032,"15.5":0.00345,"15.6-15.8":0.05349,"16.0":0.00616,"16.1":0.01183,"16.2":0.00616,"16.3":0.01109,"16.4":0.00271,"16.5":0.00468,"16.6-16.7":0.06952,"17.0":0.00394,"17.1":0.00641,"17.2":0.00468,"17.3":0.00715,"17.4":0.01208,"17.5":0.02367,"17.6-17.7":0.05473,"18.0":0.01233,"18.1":0.02564,"18.2":0.01356,"18.3":0.04413,"18.4":0.02268,"18.5-18.7":1.62847,"26.0":0.0318,"26.1":0.26451,"26.2":0.05029,"26.3":0.00222},P:{"20":0.01016,"21":0.02033,"22":0.02033,"23":0.05082,"24":0.21343,"25":0.15245,"26":0.08131,"27":0.60981,"28":0.78259,"29":2.09368,_:"4 5.0-5.4 6.2-6.4 8.2 9.2 10.1 12.0 13.0 14.0 15.0 17.0","7.2-7.4":0.06098,"11.1-11.2":0.01016,"16.0":0.01016,"18.0":0.01016,"19.0":0.01016},I:{"0":0.32003,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0.00006,"4.4":0,"4.4.3-4.4.4":0.00026},A:{_:"6 7 8 9 10 11 5.5"},K:{"0":1.53904,_:"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":0.11448},O:{"0":0.11448},H:{"0":0.14},L:{"0":80.88763},R:{_:"0"},M:{"0":0.3587}};

View File

@@ -0,0 +1,173 @@
"use strict";
exports.localize = void 0;
var _index = require("../../_lib/buildLocalizeFn.cjs");
// Reference: https://www.unicode.org/cldr/charts/32/summary/kn.html
const eraValues = {
narrow: ["ಕ್ರಿ.ಪೂ", "ಕ್ರಿ.ಶ"],
abbreviated: ["ಕ್ರಿ.ಪೂ", "ಕ್ರಿ.ಶ"], // CLDR #1618, #1620
wide: ["ಕ್ರಿಸ್ತ ಪೂರ್ವ", "ಕ್ರಿಸ್ತ ಶಕ"], // CLDR #1614, #1616
};
const quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["ತ್ರೈ 1", "ತ್ರೈ 2", "ತ್ರೈ 3", "ತ್ರೈ 4"], // CLDR #1630 - #1638
wide: ["1ನೇ ತ್ರೈಮಾಸಿಕ", "2ನೇ ತ್ರೈಮಾಸಿಕ", "3ನೇ ತ್ರೈಮಾಸಿಕ", "4ನೇ ತ್ರೈಮಾಸಿಕ"],
// CLDR #1622 - #1629
};
// CLDR #1646 - #1717
const monthValues = {
narrow: ["ಜ", "ಫೆ", "ಮಾ", "ಏ", "ಮೇ", "ಜೂ", "ಜು", "ಆ", "ಸೆ", "ಅ", "ನ", "ಡಿ"],
abbreviated: [
"ಜನ",
"ಫೆಬ್ರ",
"ಮಾರ್ಚ್",
"ಏಪ್ರಿ",
"ಮೇ",
"ಜೂನ್",
"ಜುಲೈ",
"ಆಗ",
"ಸೆಪ್ಟೆಂ",
"ಅಕ್ಟೋ",
"ನವೆಂ",
"ಡಿಸೆಂ",
],
wide: [
"ಜನವರಿ",
"ಫೆಬ್ರವರಿ",
"ಮಾರ್ಚ್",
"ಏಪ್ರಿಲ್",
"ಮೇ",
"ಜೂನ್",
"ಜುಲೈ",
"ಆಗಸ್ಟ್",
"ಸೆಪ್ಟೆಂಬರ್",
"ಅಕ್ಟೋಬರ್",
"ನವೆಂಬರ್",
"ಡಿಸೆಂಬರ್",
],
};
// CLDR #1718 - #1773
const dayValues = {
narrow: ["ಭಾ", "ಸೋ", "ಮಂ", "ಬು", "ಗು", "ಶು", "ಶ"],
short: ["ಭಾನು", "ಸೋಮ", "ಮಂಗಳ", "ಬುಧ", "ಗುರು", "ಶುಕ್ರ", "ಶನಿ"],
abbreviated: ["ಭಾನು", "ಸೋಮ", "ಮಂಗಳ", "ಬುಧ", "ಗುರು", "ಶುಕ್ರ", "ಶನಿ"],
wide: [
"ಭಾನುವಾರ",
"ಸೋಮವಾರ",
"ಮಂಗಳವಾರ",
"ಬುಧವಾರ",
"ಗುರುವಾರ",
"ಶುಕ್ರವಾರ",
"ಶನಿವಾರ",
],
};
// CLDR #1774 - #1815
const dayPeriodValues = {
narrow: {
am: "ಪೂರ್ವಾಹ್ನ",
pm: "ಅಪರಾಹ್ನ",
midnight: "ಮಧ್ಯರಾತ್ರಿ",
noon: "ಮಧ್ಯಾಹ್ನ",
morning: "ಬೆಳಗ್ಗೆ",
afternoon: "ಮಧ್ಯಾಹ್ನ",
evening: "ಸಂಜೆ",
night: "ರಾತ್ರಿ",
},
abbreviated: {
am: "ಪೂರ್ವಾಹ್ನ",
pm: "ಅಪರಾಹ್ನ",
midnight: "ಮಧ್ಯರಾತ್ರಿ",
noon: "ಮಧ್ಯಾನ್ಹ",
morning: "ಬೆಳಗ್ಗೆ",
afternoon: "ಮಧ್ಯಾನ್ಹ",
evening: "ಸಂಜೆ",
night: "ರಾತ್ರಿ",
},
wide: {
am: "ಪೂರ್ವಾಹ್ನ",
pm: "ಅಪರಾಹ್ನ",
midnight: "ಮಧ್ಯರಾತ್ರಿ",
noon: "ಮಧ್ಯಾನ್ಹ",
morning: "ಬೆಳಗ್ಗೆ",
afternoon: "ಮಧ್ಯಾನ್ಹ",
evening: "ಸಂಜೆ",
night: "ರಾತ್ರಿ",
},
};
const formattingDayPeriodValues = {
narrow: {
am: "ಪೂ",
pm: "ಅ",
midnight: "ಮಧ್ಯರಾತ್ರಿ",
noon: "ಮಧ್ಯಾನ್ಹ",
morning: "ಬೆಳಗ್ಗೆ",
afternoon: "ಮಧ್ಯಾನ್ಹ",
evening: "ಸಂಜೆ",
night: "ರಾತ್ರಿ",
},
abbreviated: {
am: "ಪೂರ್ವಾಹ್ನ",
pm: "ಅಪರಾಹ್ನ",
midnight: "ಮಧ್ಯ ರಾತ್ರಿ",
noon: "ಮಧ್ಯಾನ್ಹ",
morning: "ಬೆಳಗ್ಗೆ",
afternoon: "ಮಧ್ಯಾನ್ಹ",
evening: "ಸಂಜೆ",
night: "ರಾತ್ರಿ",
},
wide: {
am: "ಪೂರ್ವಾಹ್ನ",
pm: "ಅಪರಾಹ್ನ",
midnight: "ಮಧ್ಯ ರಾತ್ರಿ",
noon: "ಮಧ್ಯಾನ್ಹ",
morning: "ಬೆಳಗ್ಗೆ",
afternoon: "ಮಧ್ಯಾನ್ಹ",
evening: "ಸಂಜೆ",
night: "ರಾತ್ರಿ",
},
};
const ordinalNumber = (dirtyNumber, _options) => {
const number = Number(dirtyNumber);
return number + "ನೇ";
};
const localize = (exports.localize = {
ordinalNumber,
era: (0, _index.buildLocalizeFn)({
values: eraValues,
defaultWidth: "wide",
}),
quarter: (0, _index.buildLocalizeFn)({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: (quarter) => quarter - 1,
}),
month: (0, _index.buildLocalizeFn)({
values: monthValues,
defaultWidth: "wide",
}),
day: (0, _index.buildLocalizeFn)({
values: dayValues,
defaultWidth: "wide",
}),
dayPeriod: (0, _index.buildLocalizeFn)({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide",
}),
});

View File

@@ -0,0 +1,405 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const node_fs = require('node:fs');
const node_readline = require('node:readline');
const core = require('@sentry/core');
const debugBuild = require('../debug-build.js');
const LRU_FILE_CONTENTS_CACHE = new core.LRUMap(10);
const LRU_FILE_CONTENTS_FS_READ_FAILED = new core.LRUMap(20);
const DEFAULT_LINES_OF_CONTEXT = 7;
const INTEGRATION_NAME = 'ContextLines';
// Determines the upper bound of lineno/colno that we will attempt to read. Large colno values are likely to be
// minified code while large lineno values are likely to be bundled code.
// Exported for testing purposes.
const MAX_CONTEXTLINES_COLNO = 1000;
const MAX_CONTEXTLINES_LINENO = 10000;
/**
* Get or init map value
*/
function emplace(map, key, contents) {
const value = map.get(key);
if (value === undefined) {
map.set(key, contents);
return contents;
}
return value;
}
/**
* Determines if context lines should be skipped for a file.
* - .min.(mjs|cjs|js) files are and not useful since they dont point to the original source
* - node: prefixed modules are part of the runtime and cannot be resolved to a file
* - data: skip json, wasm and inline js https://nodejs.org/api/esm.html#data-imports
*/
function shouldSkipContextLinesForFile(path) {
// Test the most common prefix and extension first. These are the ones we
// are most likely to see in user applications and are the ones we can break out of first.
if (path.startsWith('node:')) return true;
if (path.endsWith('.min.js')) return true;
if (path.endsWith('.min.cjs')) return true;
if (path.endsWith('.min.mjs')) return true;
if (path.startsWith('data:')) return true;
return false;
}
/**
* Determines if we should skip contextlines based off the max lineno and colno values.
*/
function shouldSkipContextLinesForFrame(frame) {
if (frame.lineno !== undefined && frame.lineno > MAX_CONTEXTLINES_LINENO) return true;
if (frame.colno !== undefined && frame.colno > MAX_CONTEXTLINES_COLNO) return true;
return false;
}
/**
* Checks if we have all the contents that we need in the cache.
*/
function rangeExistsInContentCache(file, range) {
const contents = LRU_FILE_CONTENTS_CACHE.get(file);
if (contents === undefined) return false;
for (let i = range[0]; i <= range[1]; i++) {
if (contents[i] === undefined) {
return false;
}
}
return true;
}
/**
* Creates contiguous ranges of lines to read from a file. In the case where context lines overlap,
* the ranges are merged to create a single range.
*/
function makeLineReaderRanges(lines, linecontext) {
if (!lines.length) {
return [];
}
let i = 0;
const line = lines[0];
if (typeof line !== 'number') {
return [];
}
let current = makeContextRange(line, linecontext);
const out = [];
// eslint-disable-next-line no-constant-condition
while (true) {
if (i === lines.length - 1) {
out.push(current);
break;
}
// If the next line falls into the current range, extend the current range to lineno + linecontext.
const next = lines[i + 1];
if (typeof next !== 'number') {
break;
}
if (next <= current[1]) {
current[1] = next + linecontext;
} else {
out.push(current);
current = makeContextRange(next, linecontext);
}
i++;
}
return out;
}
/**
* Extracts lines from a file and stores them in a cache.
*/
function getContextLinesFromFile(path, ranges, output) {
return new Promise((resolve, _reject) => {
// It is important *not* to have any async code between createInterface and the 'line' event listener
// as it will cause the 'line' event to
// be emitted before the listener is attached.
const stream = node_fs.createReadStream(path);
const lineReaded = node_readline.createInterface({
input: stream,
});
// We need to explicitly destroy the stream to prevent memory leaks,
// removing the listeners on the readline interface is not enough.
// See: https://github.com/nodejs/node/issues/9002 and https://github.com/getsentry/sentry-javascript/issues/14892
function destroyStreamAndResolve() {
stream.destroy();
resolve();
}
// Init at zero and increment at the start of the loop because lines are 1 indexed.
let lineNumber = 0;
let currentRangeIndex = 0;
const range = ranges[currentRangeIndex];
if (range === undefined) {
// We should never reach this point, but if we do, we should resolve the promise to prevent it from hanging.
destroyStreamAndResolve();
return;
}
let rangeStart = range[0];
let rangeEnd = range[1];
// We use this inside Promise.all, so we need to resolve the promise even if there is an error
// to prevent Promise.all from short circuiting the rest.
function onStreamError(e) {
// Mark file path as failed to read and prevent multiple read attempts.
LRU_FILE_CONTENTS_FS_READ_FAILED.set(path, 1);
debugBuild.DEBUG_BUILD && core.debug.error(`Failed to read file: ${path}. Error: ${e}`);
lineReaded.close();
lineReaded.removeAllListeners();
destroyStreamAndResolve();
}
// We need to handle the error event to prevent the process from crashing in < Node 16
// https://github.com/nodejs/node/pull/31603
stream.on('error', onStreamError);
lineReaded.on('error', onStreamError);
lineReaded.on('close', destroyStreamAndResolve);
lineReaded.on('line', line => {
lineNumber++;
if (lineNumber < rangeStart) return;
// !Warning: This mutates the cache by storing the snipped line into the cache.
output[lineNumber] = core.snipLine(line, 0);
if (lineNumber >= rangeEnd) {
if (currentRangeIndex === ranges.length - 1) {
// We need to close the file stream and remove listeners, else the reader will continue to run our listener;
lineReaded.close();
lineReaded.removeAllListeners();
return;
}
currentRangeIndex++;
const range = ranges[currentRangeIndex];
if (range === undefined) {
// This should never happen as it means we have a bug in the context.
lineReaded.close();
lineReaded.removeAllListeners();
return;
}
rangeStart = range[0];
rangeEnd = range[1];
}
});
});
}
/**
* Adds surrounding (context) lines of the line that an exception occurred on to the event.
* This is done by reading the file line by line and extracting the lines. The extracted lines are stored in
* a cache to prevent multiple reads of the same file. Failures to read a file are similarly cached to prevent multiple
* failing reads from happening.
*/
/* eslint-disable complexity */
async function addSourceContext(event, contextLines) {
// keep a lookup map of which files we've already enqueued to read,
// so we don't enqueue the same file multiple times which would cause multiple i/o reads
const filesToLines = {};
if (contextLines > 0 && event.exception?.values) {
for (const exception of event.exception.values) {
if (!exception.stacktrace?.frames?.length) {
continue;
}
// Maps preserve insertion order, so we iterate in reverse, starting at the
// outermost frame and closer to where the exception has occurred (poor mans priority)
for (let i = exception.stacktrace.frames.length - 1; i >= 0; i--) {
const frame = exception.stacktrace.frames[i];
const filename = frame?.filename;
if (
!frame ||
typeof filename !== 'string' ||
typeof frame.lineno !== 'number' ||
shouldSkipContextLinesForFile(filename) ||
shouldSkipContextLinesForFrame(frame)
) {
continue;
}
const filesToLinesOutput = filesToLines[filename];
if (!filesToLinesOutput) filesToLines[filename] = [];
// @ts-expect-error this is defined above
filesToLines[filename].push(frame.lineno);
}
}
}
const files = Object.keys(filesToLines);
if (files.length == 0) {
return event;
}
const readlinePromises = [];
for (const file of files) {
// If we failed to read this before, dont try reading it again.
if (LRU_FILE_CONTENTS_FS_READ_FAILED.get(file)) {
continue;
}
const filesToLineRanges = filesToLines[file];
if (!filesToLineRanges) {
continue;
}
// Sort ranges so that they are sorted by line increasing order and match how the file is read.
filesToLineRanges.sort((a, b) => a - b);
// Check if the contents are already in the cache and if we can avoid reading the file again.
const ranges = makeLineReaderRanges(filesToLineRanges, contextLines);
if (ranges.every(r => rangeExistsInContentCache(file, r))) {
continue;
}
const cache = emplace(LRU_FILE_CONTENTS_CACHE, file, {});
readlinePromises.push(getContextLinesFromFile(file, ranges, cache));
}
// The promise rejections are caught in order to prevent them from short circuiting Promise.all
await Promise.all(readlinePromises).catch(() => {
debugBuild.DEBUG_BUILD && core.debug.log('Failed to read one or more source files and resolve context lines');
});
// Perform the same loop as above, but this time we can assume all files are in the cache
// and attempt to add source context to frames.
if (contextLines > 0 && event.exception?.values) {
for (const exception of event.exception.values) {
if (exception.stacktrace?.frames && exception.stacktrace.frames.length > 0) {
addSourceContextToFrames(exception.stacktrace.frames, contextLines, LRU_FILE_CONTENTS_CACHE);
}
}
}
return event;
}
/* eslint-enable complexity */
/** Adds context lines to frames */
function addSourceContextToFrames(
frames,
contextLines,
cache,
) {
for (const frame of frames) {
// Only add context if we have a filename and it hasn't already been added
if (frame.filename && frame.context_line === undefined && typeof frame.lineno === 'number') {
const contents = cache.get(frame.filename);
if (contents === undefined) {
continue;
}
addContextToFrame(frame.lineno, frame, contextLines, contents);
}
}
}
/**
* Clears the context lines from a frame, used to reset a frame to its original state
* if we fail to resolve all context lines for it.
*/
function clearLineContext(frame) {
delete frame.pre_context;
delete frame.context_line;
delete frame.post_context;
}
/**
* Resolves context lines before and after the given line number and appends them to the frame;
*/
function addContextToFrame(
lineno,
frame,
contextLines,
contents,
) {
// When there is no line number in the frame, attaching context is nonsensical and will even break grouping.
// We already check for lineno before calling this, but since StackFrame lineno ism optional, we check it again.
if (frame.lineno === undefined || contents === undefined) {
debugBuild.DEBUG_BUILD && core.debug.error('Cannot resolve context for frame with no lineno or file contents');
return;
}
frame.pre_context = [];
for (let i = makeRangeStart(lineno, contextLines); i < lineno; i++) {
// We always expect the start context as line numbers cannot be negative. If we dont find a line, then
// something went wrong somewhere. Clear the context and return without adding any linecontext.
const line = contents[i];
if (line === undefined) {
clearLineContext(frame);
debugBuild.DEBUG_BUILD && core.debug.error(`Could not find line ${i} in file ${frame.filename}`);
return;
}
frame.pre_context.push(line);
}
// We should always have the context line. If we dont, something went wrong, so we clear the context and return
// without adding any linecontext.
if (contents[lineno] === undefined) {
clearLineContext(frame);
debugBuild.DEBUG_BUILD && core.debug.error(`Could not find line ${lineno} in file ${frame.filename}`);
return;
}
frame.context_line = contents[lineno];
const end = makeRangeEnd(lineno, contextLines);
frame.post_context = [];
for (let i = lineno + 1; i <= end; i++) {
// Since we dont track when the file ends, we cant clear the context if we dont find a line as it could
// just be that we reached the end of the file.
const line = contents[i];
if (line === undefined) {
break;
}
frame.post_context.push(line);
}
}
// Helper functions for generating line context ranges. They take a line number and the number of lines of context to
// include before and after the line and generate an inclusive range of indices.
// Compute inclusive end context range
function makeRangeStart(line, linecontext) {
return Math.max(1, line - linecontext);
}
// Compute inclusive start context range
function makeRangeEnd(line, linecontext) {
return line + linecontext;
}
// Determine start and end indices for context range (inclusive);
function makeContextRange(line, linecontext) {
return [makeRangeStart(line, linecontext), makeRangeEnd(line, linecontext)];
}
/** Exported only for tests, as a type-safe variant. */
const _contextLinesIntegration = ((options = {}) => {
const contextLines = options.frameContextLines !== undefined ? options.frameContextLines : DEFAULT_LINES_OF_CONTEXT;
return {
name: INTEGRATION_NAME,
processEvent(event) {
return addSourceContext(event, contextLines);
},
};
}) ;
/**
* Capture the lines before and after the frame's context.
*/
const contextLinesIntegration = core.defineIntegration(_contextLinesIntegration);
exports.MAX_CONTEXTLINES_COLNO = MAX_CONTEXTLINES_COLNO;
exports.MAX_CONTEXTLINES_LINENO = MAX_CONTEXTLINES_LINENO;
exports._contextLinesIntegration = _contextLinesIntegration;
exports.addContextToFrame = addContextToFrame;
exports.contextLinesIntegration = contextLinesIntegration;
//# sourceMappingURL=contextlines.js.map

View File

@@ -0,0 +1,18 @@
/**
* @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 FileX2 = createLucideIcon("FileX2", [
["path", { d: "M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4", key: "1pf5j1" }],
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
["path", { d: "m8 12.5-5 5", key: "b853mi" }],
["path", { d: "m3 12.5 5 5", key: "1qls4r" }]
]);
export { FileX2 as default };
//# sourceMappingURL=file-x-2.js.map

View File

@@ -0,0 +1,36 @@
'use strict'
const { join } = require('node:path')
const { execSync } = require('node:child_process')
const run = (type) => {
process.stderr.write(`benchmarking ${type}\n`)
return execSync(`node ${join(__dirname, 'runbench')} ${type} -q`)
}
console.log(`
# Benchmarks
\`pino.info('hello world')\`:
\`\`\`
${run('basic')}
\`\`\`
\`pino.info({'hello': 'world'})\`:
\`\`\`
${run('object')}
\`\`\`
\`pino.info(aBigDeeplyNestedObject)\`:
\`\`\`
${run('deep-object')}
\`\`\`
\`pino.info('hello %s %j %d', 'world', {obj: true}, 4, {another: 'obj'})\`:
For a fair comparison, [LogLevel](http://npm.im/loglevel) was extended
to include a timestamp and [bole](http://npm.im/bole) had
\`fastTime\` mode switched on.
`)

View File

@@ -0,0 +1,55 @@
/**
* 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 { DecoratorNode } from 'lexical';
/**
* 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.
*
*/
class DecoratorBlockNode extends DecoratorNode {
constructor(format, key) {
super(key);
this.__format = format || '';
}
exportJSON() {
return {
...super.exportJSON(),
format: this.__format || ''
};
}
updateFromJSON(serializedNode) {
return super.updateFromJSON(serializedNode).setFormat(serializedNode.format || '');
}
canIndent() {
return false;
}
createDOM() {
return document.createElement('div');
}
updateDOM() {
return false;
}
setFormat(format) {
const self = this.getWritable();
self.__format = format;
return self;
}
isInline() {
return false;
}
}
function $isDecoratorBlockNode(node) {
return node instanceof DecoratorBlockNode;
}
export { $isDecoratorBlockNode, DecoratorBlockNode };

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/pg-core/query-builders/index.ts"],"sourcesContent":["export * from './delete.ts';\nexport * from './insert.ts';\nexport * from './query-builder.ts';\nexport * from './refresh-materialized-view.ts';\nexport * from './select.ts';\nexport * from './select.types.ts';\nexport * from './update.ts';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}

View File

@@ -0,0 +1,3 @@
import React from 'react';
export declare const GravatarAccountIcon: React.FC;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,108 @@
/**
* Recursive version of readdir. Exposes a streaming API and promise API.
* Streaming API allows to use a small amount of RAM.
*
* @module
* @example
```js
import readdirp from 'readdirp';
for await (const entry of readdirp('.')) {
const {path} = entry;
console.log(`${JSON.stringify({path})}`);
}
```
*/
/*! readdirp - MIT License (c) 2012-2019 Thorsten Lorenz, Paul Miller (https://paulmillr.com) */
import type { Stats, Dirent } from 'node:fs';
import { Readable } from 'node:stream';
/** Path in file system. */
export type Path = string;
/** Emitted entry. Contains relative & absolute path, basename, and either stats or dirent. */
export interface EntryInfo {
path: string;
fullPath: string;
stats?: Stats;
dirent?: Dirent;
basename: string;
}
/** Path or dir entries (files) */
export type PathOrDirent = Dirent | Path;
/** Filterer for files */
export type Tester = (entryInfo: EntryInfo) => boolean;
export type Predicate = string[] | string | Tester;
export declare const EntryTypes: {
readonly FILE_TYPE: "files";
readonly DIR_TYPE: "directories";
readonly FILE_DIR_TYPE: "files_directories";
readonly EVERYTHING_TYPE: "all";
};
export type EntryType = (typeof EntryTypes)[keyof typeof EntryTypes];
/**
* Options for readdirp.
* * type: files, directories, or both
* * lstat: whether to use symlink-friendly stat
* * depth: max depth
* * alwaysStat: whether to use stat (more resources) or dirent
* * highWaterMark: streaming param, specifies max amount of resources per entry
*/
export type ReaddirpOptions = {
root: string;
fileFilter?: Predicate;
directoryFilter?: Predicate;
type?: EntryType;
lstat?: boolean;
depth?: number;
alwaysStat?: boolean;
highWaterMark?: number;
};
/** Directory entry. Contains path, depth count, and files. */
export interface DirEntry {
files: PathOrDirent[];
depth: number;
path: Path;
}
/** Readable readdir stream, emitting new files as they're being listed. */
export declare class ReaddirpStream extends Readable {
parents: any[];
reading: boolean;
parent?: DirEntry;
_stat: Function;
_maxDepth: number;
_wantsDir: boolean;
_wantsFile: boolean;
_wantsEverything: boolean;
_root: Path;
_isDirent: boolean;
_statsProp: 'dirent' | 'stats';
_rdOptions: {
encoding: 'utf8';
withFileTypes: boolean;
};
_fileFilter: Tester;
_directoryFilter: Tester;
constructor(options?: Partial<ReaddirpOptions>);
_read(batch: number): Promise<void>;
_exploreDir(path: Path, depth: number): Promise<{
files: string[] | undefined;
depth: number;
path: string;
}>;
_formatEntry(dirent: PathOrDirent, path: Path): Promise<EntryInfo | undefined>;
_onError(err: Error): void;
_getEntryType(entry: EntryInfo): Promise<void | '' | 'file' | 'directory'>;
_includeAsFile(entry: EntryInfo): boolean | undefined;
}
/**
* Streaming version: Reads all files and directories in given root recursively.
* Consumes ~constant small amount of RAM.
* @param root Root directory
* @param options Options to specify root (start directory), filters and recursion depth
*/
export declare function readdirp(root: Path, options?: Partial<ReaddirpOptions>): ReaddirpStream;
/**
* Promise version: Reads all files and directories in given root recursively.
* Compared to streaming version, will consume a lot of RAM e.g. when 1 million files are listed.
* @returns array of paths and their entry infos
*/
export declare function readdirpPromise(root: Path, options?: Partial<ReaddirpOptions>): Promise<EntryInfo[]>;
export default readdirp;

View File

@@ -0,0 +1,14 @@
export declare const eachDayOfInterval: import("./types.js").FPFn1<
import("../eachDayOfInterval.js").EachDayOfIntervalResult<
import("../fp.js").Interval<
import("../fp.js").DateArg<Date>,
import("../fp.js").DateArg<Date>
>,
| import("../eachDayOfInterval.js").EachDayOfIntervalOptions<Date>
| undefined
>,
import("../fp.js").Interval<
import("../fp.js").DateArg<Date>,
import("../fp.js").DateArg<Date>
>
>;

View File

@@ -0,0 +1,16 @@
import type { Block } from '../fields/config/types.js';
import type { SelectMode, SelectType } from '../types/index.js';
/**
* This is used for the Select API to determine the select level of a block.
* It will ensure that `id` and `blockType` are always included in the select object.
* @returns { blockSelect: boolean | SelectType, blockSelectMode: SelectMode }
*/
export declare const getBlockSelect: ({ block, select, selectMode, }: {
block: Block;
select: SelectType[string];
selectMode: SelectMode;
}) => {
blockSelect: boolean | SelectType;
blockSelectMode: SelectMode;
};
//# sourceMappingURL=getBlockSelect.d.ts.map

View File

@@ -0,0 +1,56 @@
1.2.1 / 2019-05-10
==================
* Improve error when `str` is not a string
1.2.0 / 2016-06-01
==================
* Add `combine` option to combine overlapping ranges
1.1.0 / 2016-05-13
==================
* Fix incorrectly returning -1 when there is at least one valid range
* perf: remove internal function
1.0.3 / 2015-10-29
==================
* perf: enable strict mode
1.0.2 / 2014-09-08
==================
* Support Node.js 0.6
1.0.1 / 2014-09-07
==================
* Move repository to jshttp
1.0.0 / 2013-12-11
==================
* Add repository to package.json
* Add MIT license
0.0.4 / 2012-06-17
==================
* Change ret -1 for unsatisfiable and -2 when invalid
0.0.3 / 2012-06-17
==================
* Fix last-byte-pos default to len - 1
0.0.2 / 2012-06-14
==================
* Add `.type`
0.0.1 / 2012-06-11
==================
* Initial release

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/vercel-postgres/index.ts"],"sourcesContent":["export * from './driver.ts';\nexport * from './session.ts';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;","names":[]}

View File

@@ -0,0 +1,113 @@
import { Column } from "./column.js";
import { entityKind, is } from "./entity.js";
import { SQL, sql } from "./sql/sql.js";
import { Table } from "./table.js";
import { ViewBaseConfig } from "./view-common.js";
class ColumnAliasProxyHandler {
constructor(table) {
this.table = table;
}
static [entityKind] = "ColumnAliasProxyHandler";
get(columnObj, prop) {
if (prop === "table") {
return this.table;
}
return columnObj[prop];
}
}
class TableAliasProxyHandler {
constructor(alias, replaceOriginalName) {
this.alias = alias;
this.replaceOriginalName = replaceOriginalName;
}
static [entityKind] = "TableAliasProxyHandler";
get(target, prop) {
if (prop === Table.Symbol.IsAlias) {
return true;
}
if (prop === Table.Symbol.Name) {
return this.alias;
}
if (this.replaceOriginalName && prop === Table.Symbol.OriginalName) {
return this.alias;
}
if (prop === ViewBaseConfig) {
return {
...target[ViewBaseConfig],
name: this.alias,
isAlias: true
};
}
if (prop === Table.Symbol.Columns) {
const columns = target[Table.Symbol.Columns];
if (!columns) {
return columns;
}
const proxiedColumns = {};
Object.keys(columns).map((key) => {
proxiedColumns[key] = new Proxy(
columns[key],
new ColumnAliasProxyHandler(new Proxy(target, this))
);
});
return proxiedColumns;
}
const value = target[prop];
if (is(value, Column)) {
return new Proxy(value, new ColumnAliasProxyHandler(new Proxy(target, this)));
}
return value;
}
}
class RelationTableAliasProxyHandler {
constructor(alias) {
this.alias = alias;
}
static [entityKind] = "RelationTableAliasProxyHandler";
get(target, prop) {
if (prop === "sourceTable") {
return aliasedTable(target.sourceTable, this.alias);
}
return target[prop];
}
}
function aliasedTable(table, tableAlias) {
return new Proxy(table, new TableAliasProxyHandler(tableAlias, false));
}
function aliasedRelation(relation, tableAlias) {
return new Proxy(relation, new RelationTableAliasProxyHandler(tableAlias));
}
function aliasedTableColumn(column, tableAlias) {
return new Proxy(
column,
new ColumnAliasProxyHandler(new Proxy(column.table, new TableAliasProxyHandler(tableAlias, false)))
);
}
function mapColumnsInAliasedSQLToAlias(query, alias) {
return new SQL.Aliased(mapColumnsInSQLToAlias(query.sql, alias), query.fieldAlias);
}
function mapColumnsInSQLToAlias(query, alias) {
return sql.join(query.queryChunks.map((c) => {
if (is(c, Column)) {
return aliasedTableColumn(c, alias);
}
if (is(c, SQL)) {
return mapColumnsInSQLToAlias(c, alias);
}
if (is(c, SQL.Aliased)) {
return mapColumnsInAliasedSQLToAlias(c, alias);
}
return c;
}));
}
export {
ColumnAliasProxyHandler,
RelationTableAliasProxyHandler,
TableAliasProxyHandler,
aliasedRelation,
aliasedTable,
aliasedTableColumn,
mapColumnsInAliasedSQLToAlias,
mapColumnsInSQLToAlias
};
//# sourceMappingURL=alias.js.map

View File

@@ -0,0 +1,40 @@
/**
* @license React
* react-jsx-dev-runtime.react-server.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
"use strict";
var React = require("react"),
REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
if (!React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE)
throw Error(
'The "react" package in this environment is not configured correctly. The "react-server" condition must be enabled in any environment that runs React Server Components.'
);
function jsxProd(type, config, maybeKey) {
var key = null;
void 0 !== maybeKey && (key = "" + maybeKey);
void 0 !== config.key && (key = "" + config.key);
if ("key" in config) {
maybeKey = {};
for (var propName in config)
"key" !== propName && (maybeKey[propName] = config[propName]);
} else maybeKey = config;
config = maybeKey.ref;
return {
$$typeof: REACT_ELEMENT_TYPE,
type: type,
key: key,
ref: void 0 !== config ? config : null,
props: maybeKey
};
}
exports.Fragment = REACT_FRAGMENT_TYPE;
exports.jsx = jsxProd;
exports.jsxDEV = void 0;
exports.jsxs = jsxProd;

View File

@@ -0,0 +1,918 @@
<div align="center">
<br />
<h3>graphql-http</h3>
<h6>Simple, pluggable, zero-dependency, <a href="https://graphql.github.io/graphql-over-http">GraphQL over HTTP spec</a> compliant server, client and audit suite.</h6>
[![Continuous integration](https://github.com/graphql/graphql-http/workflows/Continuous%20integration/badge.svg)](https://github.com/graphql/graphql-http/actions?query=workflow%3A%22Continuous+integration%22) [![graphql-http](https://img.shields.io/npm/v/graphql-http.svg?label=graphql-http&logo=npm)](https://www.npmjs.com/package/graphql-http)
<i>Quickly check for compliance? Visit <b>[graphql-http.com](https://graphql-http.com)</b>!</i>
<i>Want a full-featured server? See the <b>[servers section](#servers)</b>!</i>
<i>Need subscriptions? Try <b>[graphql-ws](https://github.com/enisdenjo/graphql-ws)</b> or <b>[graphql-sse](https://github.com/enisdenjo/graphql-sse)</b> instead!</i>
<br />
</div>
## Getting started
#### Install
```shell
yarn add graphql-http
```
#### Create a GraphQL schema
```js
import { GraphQLSchema, GraphQLObjectType, GraphQLString } from 'graphql';
/**
* Construct a GraphQL schema and define the necessary resolvers.
*
* type Query {
* hello: String
* }
*/
const schema = new GraphQLSchema({
query: new GraphQLObjectType({
name: 'Query',
fields: {
hello: {
type: GraphQLString,
resolve: () => 'world',
},
},
}),
});
```
#### Start the server
##### With [`http`](https://nodejs.org/api/http.html)
```js
import http from 'http';
import { createHandler } from 'graphql-http/lib/use/http';
import { schema } from './previous-step';
// Create the GraphQL over HTTP Node request handler
const handler = createHandler({ schema });
// Create a HTTP server using the listener on `/graphql`
const server = http.createServer((req, res) => {
if (req.url.startsWith('/graphql')) {
handler(req, res);
} else {
res.writeHead(404).end();
}
});
server.listen(4000);
console.log('Listening to port 4000');
```
##### With [`http2`](https://nodejs.org/api/http2.html)
_Browsers might complain about self-signed SSL/TLS certificates. [Help can be found on StackOverflow.](https://stackoverflow.com/questions/7580508/getting-chrome-to-accept-self-signed-localhost-certificate)_
```shell
$ openssl req -x509 -newkey rsa:2048 -nodes -sha256 -subj '/CN=localhost' \
-keyout localhost-privkey.pem -out localhost-cert.pem
```
```js
import fs from 'fs';
import http2 from 'http2';
import { createHandler } from 'graphql-http/lib/use/http2';
import { schema } from './previous-step';
// Create the GraphQL over HTTP Node request handler
const handler = createHandler({ schema });
// Create a HTTP/2 server using the handler on `/graphql`
const server = http2.createSecureServer(
{
key: fs.readFileSync('localhost-privkey.pem'),
cert: fs.readFileSync('localhost-cert.pem'),
},
(req, res) => {
if (req.url.startsWith('/graphql')) {
handler(req, res);
} else {
res.writeHead(404).end();
}
},
);
server.listen(4000);
console.log('Listening to port 4000');
```
##### With [`express`](https://expressjs.com/)
```js
import express from 'express'; // yarn add express
import { createHandler } from 'graphql-http/lib/use/express';
import { schema } from './previous-step';
// Create an express instance serving all methods on `/graphql`
// where the GraphQL over HTTP express request handler is
const app = express();
app.all('/graphql', createHandler({ schema }));
app.listen({ port: 4000 });
console.log('Listening to port 4000');
```
##### With [`fastify`](https://www.fastify.io/)
```js
import Fastify from 'fastify'; // yarn add fastify
import { createHandler } from 'graphql-http/lib/use/fastify';
import { schema } from './previous-step';
// Create a fastify instance serving all methods on `/graphql`
// where the GraphQL over HTTP fastify request handler is
const fastify = Fastify();
fastify.all('/graphql', createHandler({ schema }));
fastify.listen({ port: 4000 });
console.log('Listening to port 4000');
```
##### With [`Koa`](https://koajs.com/)
```js
import Koa from 'koa'; // yarn add koa
import mount from 'koa-mount'; // yarn add koa-mount
import { createHandler } from 'graphql-http/lib/use/koa';
import { schema } from './previous-step';
const app = new Koa();
app.use(mount('/graphql', createHandler({ schema })));
app.listen({ port: 4000 });
console.log('Listening to port 4000');
```
##### With [`uWebSockets.js`](https://github.com/uNetworking/uWebSockets.js)
```js
import uWS from 'uWebSockets.js'; // yarn add uWebSockets.js@uNetworking/uWebSockets.js#<version>
import { createHandler } from 'graphql-http/lib/use/uWebSockets';
import { schema } from './previous-step';
uWS
.App()
.any('/graphql', createHandler({ schema }))
.listen(4000, () => {
console.log('Listening to port 4000');
});
```
##### With [`Deno`](https://deno.land/)
```ts
import { serve } from 'https://deno.land/std@0.151.0/http/server.ts';
import { createHandler } from 'https://esm.sh/graphql-http/lib/use/fetch';
import { schema } from './previous-step';
// Create the GraphQL over HTTP native fetch handler
const handler = createHandler({ schema });
// Start serving on `/graphql` using the handler
await serve(
(req: Request) => {
const [path, _search] = req.url.split('?');
if (path.endsWith('/graphql')) {
return handler(req);
} else {
return new Response(null, { status: 404 });
}
},
{
port: 4000, // Listening to port 4000
},
);
```
##### With [`Bun`](https://bun.sh/)
```js
import { createHandler } from 'graphql-http/lib/use/fetch'; // bun install graphql-http
import { schema } from './previous-step';
// Create the GraphQL over HTTP native fetch handler
const handler = createHandler({ schema });
// Start serving on `/graphql` using the handler
export default {
port: 4000, // Listening to port 4000
fetch(req) {
const [path, _search] = req.url.split('?');
if (path.endsWith('/graphql')) {
return handler(req);
} else {
return new Response(null, { status: 404 });
}
},
};
```
##### With [`Netlify Functions`](https://docs.netlify.com/functions/overview/)
```js
import { createHandler } from 'graphql-http/lib/use/@netlify/functions'; // yarn add @netlify/functions
import { schema } from './previous-step';
// Create the GraphQL over HTTP native fetch handler
export const handler = createHandler({ schema });
```
#### Use the client
```js
import { createClient } from 'graphql-http';
const client = createClient({
url: 'http://localhost:4000/graphql',
});
(async () => {
let cancel = () => {
/* abort the request if it is in-flight */
};
const result = await new Promise((resolve, reject) => {
let result;
cancel = client.subscribe(
{
query: '{ hello }',
},
{
next: (data) => (result = data),
error: reject,
complete: () => resolve(result),
},
);
});
expect(result).toEqual({ hello: 'world' });
})();
```
#### Serve [GraphiQL](https://github.com/graphql/graphiql)
Thanks to [`ruru`](https://github.com/graphile/crystal/tree/main/grafast/ruru), serving GraphiQL is as easy as running:
```sh
npx ruru -SP -p 4001 -e http://localhost:4000/graphql
```
Open [http://localhost:4001](http://localhost:4001) in the browser to use it.
## Recipes
<details id="promise">
<summary><a href="#promise">🔗</a> Client usage with Promise</summary>
```ts
import { ExecutionResult } from 'graphql';
import { createClient, RequestParams } from 'graphql-http';
import { getSession } from './my-auth';
const client = createClient({
url: 'http://hey.there:4000/graphql',
headers: async () => {
const session = await getSession();
if (session) {
return {
Authorization: `Bearer ${session.token}`,
};
}
},
});
function execute<Data, Extensions>(
params: RequestParams,
): [request: Promise<ExecutionResult<Data, Extensions>>, cancel: () => void] {
let cancel!: () => void;
const request = new Promise<ExecutionResult<Data, Extensions>>(
(resolve, reject) => {
let result: ExecutionResult<Data, Extensions>;
cancel = client.subscribe<Data, Extensions>(params, {
next: (data) => (result = data),
error: reject,
complete: () => resolve(result),
});
},
);
return [request, cancel];
}
(async () => {
const [request, cancel] = execute({
query: '{ hello }',
});
// just an example, not a real function
onUserLeavePage(() => {
cancel();
});
const result = await request;
expect(result).toBe({ data: { hello: 'world' } });
})();
```
</details>
</details>
<details id="observable">
<summary><a href="#observable">🔗</a> Client usage with <a href="https://github.com/tc39/proposal-observable">Observable</a></summary>
```js
import { Observable } from 'relay-runtime';
// or
import { Observable } from '@apollo/client/core';
// or
import { Observable } from 'rxjs';
// or
import Observable from 'zen-observable';
// or any other lib which implements Observables as per the ECMAScript proposal: https://github.com/tc39/proposal-observable
import { createClient } from 'graphql-http';
import { getSession } from './my-auth';
const client = createClient({
url: 'http://graphql.loves:4000/observables',
headers: async () => {
const session = await getSession();
if (session) {
return {
Authorization: `Bearer ${session.token}`,
};
}
},
});
const observable = new Observable((observer) =>
client.subscribe({ query: '{ hello }' }, observer),
);
const subscription = observable.subscribe({
next: (result) => {
expect(result).toBe({ data: { hello: 'world' } });
},
});
// unsubscribe will cancel the request if it is pending
subscription.unsubscribe();
```
</details>
<details id="relay">
<summary><a href="#relay">🔗</a> Client usage with <a href="https://relay.dev">Relay</a></summary>
```ts
import { GraphQLError } from 'graphql';
import {
Network,
Observable,
RequestParameters,
Variables,
} from 'relay-runtime';
import { createClient } from 'graphql-http';
import { getSession } from './my-auth';
const client = createClient({
url: 'http://i.love:4000/graphql',
headers: async () => {
const session = await getSession();
if (session) {
return {
Authorization: `Bearer ${session.token}`,
};
}
},
});
function fetch(operation: RequestParameters, variables: Variables) {
return Observable.create((sink) => {
if (!operation.text) {
return sink.error(new Error('Operation text cannot be empty'));
}
return client.subscribe(
{
operationName: operation.name,
query: operation.text,
variables,
},
sink,
);
});
}
export const network = Network.create(fetch);
```
</details>
<details id="apollo-client">
<summary><a href="#apollo-client">🔗</a> Client usage with <a href="https://www.apollographql.com">Apollo</a></summary>
```ts
import {
ApolloLink,
Operation,
FetchResult,
Observable,
} from '@apollo/client/core';
import { print, GraphQLError } from 'graphql';
import { createClient, ClientOptions, Client } from 'graphql-http';
import { getSession } from './my-auth';
class HTTPLink extends ApolloLink {
private client: Client;
constructor(options: ClientOptions) {
super();
this.client = createClient(options);
}
public request(operation: Operation): Observable<FetchResult> {
return new Observable((sink) => {
return this.client.subscribe<FetchResult>(
{ ...operation, query: print(operation.query) },
{
next: sink.next.bind(sink),
complete: sink.complete.bind(sink),
error: sink.error.bind(sink),
},
);
});
}
}
const link = new HTTPLink({
url: 'http://where.is:4000/graphql',
headers: async () => {
const session = await getSession();
if (session) {
return {
Authorization: `Bearer ${session.token}`,
};
}
},
});
```
</details>
<details id="request-retries">
<summary><a href="#request-retries">🔗</a> Client usage with request retries</summary>
```ts
import { createClient, NetworkError } from 'graphql-http';
const client = createClient({
url: 'http://unstable.service:4000/graphql',
shouldRetry: async (err: NetworkError, retries: number) => {
if (retries > 3) {
// max 3 retries and then report service down
return false;
}
// try again when service unavailable, could be temporary
if (err.response?.status === 503) {
// wait one second (you can alternatively time the promise resolution to your preference)
await new Promise((resolve) => setTimeout(resolve, 1000));
return true;
}
// otherwise report error immediately
return false;
},
});
```
</details>
<details id="browser">
<summary><a href="#browser">🔗</a> Client usage in browser</summary>
```html
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>GraphQL over HTTP</title>
<script
type="text/javascript"
src="https://unpkg.com/graphql-http/umd/graphql-http.min.js"
></script>
</head>
<body>
<script type="text/javascript">
const client = graphqlHttp.createClient({
url: 'http://umdfor.the:4000/win/graphql',
});
// consider other recipes for usage inspiration
</script>
</body>
</html>
```
</details>
<details id="node-client">
<summary><a href="#node-client">🔗</a> Client usage in Node</summary>
```js
const fetch = require('node-fetch'); // yarn add node-fetch
const { AbortController } = require('node-abort-controller'); // (node < v15) yarn add node-abort-controller
const { createClient } = require('graphql-http');
const client = createClient({
url: 'http://no.browser:4000/graphql',
fetchFn: fetch,
abortControllerImpl: AbortController, // node < v15
});
// consider other recipes for usage inspiration
```
</details>
<details id="deno-client">
<summary><a href="#deno-client">🔗</a> Client usage in Deno</summary>
```js
import { createClient } from 'https://esm.sh/graphql-http';
const client = createClient({
url: 'http://deno.earth:4000/graphql',
});
// consider other recipes for usage inspiration
```
</details>
<details id="bun-client">
<summary><a href="#bun-client">🔗</a> Client usage in Bun</summary>
```js
import { createClient } from 'graphql-http'; // bun install graphql-http
const client = createClient({
url: 'http://bun.bread:4000/graphql',
});
// consider other recipes for usage inspiration
```
</details>
<details id="migrating-express-graphql">
<summary><a href="#migrating-express-graphql">🔗</a> Server handler migration from <a href="https://github.com/graphql/express-graphql">express-graphql</a></summary>
```diff
import express from 'express';
import { schema } from './my-graphql-schema';
-import { graphqlHTTP } from 'express-graphql';
+import { createHandler } from 'graphql-http/lib/use/express';
const app = express();
app.use(
'/graphql',
- graphqlHTTP({ schema }),
+ createHandler({ schema }),
);
app.listen(4000);
```
</details>
<details id="auth">
<summary><a href="#auth">🔗</a> Server handler usage with authentication</summary>
Authenticate the user within `graphql-http` during GraphQL execution context assembly. This is a approach is less safe compared to early authentication ([see early authentication in Node](#auth-node-early)) because some GraphQL preparations or operations are executed even if the user is not unauthorized.
```js
import { createHandler } from 'graphql-http';
import {
schema,
getUserFromCookies,
getUserFromAuthorizationHeader,
} from './my-graphql';
const handler = createHandler({
schema,
context: async (req) => {
// process token, authenticate user and attach it to your graphql context
const userId = await getUserFromCookies(req.headers.cookie);
// or
const userId = await getUserFromAuthorizationHeader(
req.headers.authorization,
);
// respond with 401 if the user was not authenticated
if (!userId) {
return [null, { status: 401, statusText: 'Unauthorized' }];
}
// otherwise attach the user to the graphql context
return { userId };
},
});
```
</details>
<details id="context">
<summary><a href="#context">🔗</a> Server handler usage with custom context value</summary>
```js
import { createHandler } from 'graphql-http';
import { schema, getDynamicContext } from './my-graphql';
const handler = createHandler({
schema,
context: async (req, args) => {
return getDynamicContext(req, args);
},
// or static context by supplying the value directly
});
```
</details>
<details id="custom-exec">
<summary><a href="#custom-exec">🔗</a> Server handler usage with custom execution arguments</summary>
```js
import { parse } from 'graphql';
import { createHandler } from 'graphql-http';
import { getSchemaForRequest, myValidationRules } from './my-graphql';
const handler = createHandler({
onSubscribe: async (req, params) => {
const schema = await getSchemaForRequest(req);
const args = {
schema,
operationName: params.operationName,
document: parse(params.query),
variableValues: params.variables,
};
return args;
},
});
```
</details>
<details id="auth-node-early">
<summary><a href="#auth-node-early">🔗</a> Server handler usage in Node with early authentication (recommended)</summary>
Authenticate the user early, before reaching `graphql-http`. This is the recommended approach because no GraphQL preparations or operations are executed if the user is not authorized.
```js
import { createHandler } from 'graphql-http';
import {
schema,
getUserFromCookies,
getUserFromAuthorizationHeader,
} from './my-graphql';
const handler = createHandler({
schema,
context: async (req) => {
// user is authenticated early (see below), simply attach it to the graphql context
return { userId: req.raw.userId };
},
});
const server = http.createServer(async (req, res) => {
if (!req.url.startsWith('/graphql')) {
return res.writeHead(404).end();
}
try {
// process token, authenticate user and attach it to the request
req.userId = await getUserFromCookies(req.headers.cookie);
// or
req.userId = await getUserFromAuthorizationHeader(
req.headers.authorization,
);
// respond with 401 if the user was not authenticated
if (!req.userId) {
return res.writeHead(401, 'Unauthorized').end();
}
const [body, init] = await handler({
url: req.url,
method: req.method,
headers: req.headers,
body: () =>
new Promise((resolve) => {
let body = '';
req.on('data', (chunk) => (body += chunk));
req.on('end', () => resolve(body));
}),
raw: req,
});
res.writeHead(init.status, init.statusText, init.headers).end(body);
} catch (err) {
res.writeHead(500).end(err.message);
}
});
server.listen(4000);
console.log('Listening to port 4000');
```
</details>
<details id="graphql-upload-http">
<summary><a href="#graphql-upload-http">🔗</a> Server handler usage with <a href="https://github.com/jaydenseric/graphql-upload">graphql-upload</a> and <a href="https://nodejs.org/api/http.html">http</a></summary>
```js
import http from 'http';
import { createHandler } from 'graphql-http/lib/use/http';
import processRequest from 'graphql-upload/processRequest.mjs'; // yarn add graphql-upload
import { schema } from './my-graphql';
const handler = createHandler({
schema,
async parseRequestParams(req) {
const params = await processRequest(req.raw, req.context.res);
if (Array.isArray(params)) {
throw new Error('Batching is not supported');
}
return {
...params,
// variables must be an object as per the GraphQL over HTTP spec
variables: Object(params.variables),
};
},
});
const server = http.createServer((req, res) => {
if (req.url.startsWith('/graphql')) {
handler(req, res);
} else {
res.writeHead(404).end();
}
});
server.listen(4000);
console.log('Listening to port 4000');
```
</details>
<details id="graphql-upload-express">
<summary><a href="#graphql-upload-express">🔗</a> Server handler usage with <a href="https://github.com/jaydenseric/graphql-upload">graphql-upload</a> and <a href="https://expressjs.com/">express</a></summary>
```js
import express from 'express'; // yarn add express
import { createHandler } from 'graphql-http/lib/use/express';
import processRequest from 'graphql-upload/processRequest.mjs'; // yarn add graphql-upload
import { schema } from './my-graphql';
const app = express();
app.all(
'/graphql',
createHandler({
schema,
async parseRequestParams(req) {
const params = await processRequest(req.raw, req.context.res);
if (Array.isArray(params)) {
throw new Error('Batching is not supported');
}
return {
...params,
// variables must be an object as per the GraphQL over HTTP spec
variables: Object(params.variables),
};
},
}),
);
app.listen({ port: 4000 });
console.log('Listening to port 4000');
```
</details>
<details id="audit-jest">
<summary><a href="#audit-jest">🔗</a> Audit for servers usage in <a href="https://jestjs.io">Jest</a> environment</summary>
```js
import { fetch } from '@whatwg-node/fetch';
import { serverAudits } from 'graphql-http';
for (const audit of serverAudits({
url: 'http://localhost:4000/graphql',
fetchFn: fetch,
})) {
test(audit.name, async () => {
const result = await audit.fn();
if (result.status === 'error') {
throw result.reason;
}
if (result.status === 'warn') {
console.warn(result.reason); // or throw if you want full compliance (warnings are not requirements)
}
// result.status === 'ok'
});
}
```
</details>
<details id="audit-deno">
<summary><a href="#audit-deno">🔗</a> Audit for servers usage in <a href="https://deno.land">Deno</a> environment</summary>
```ts
import { serverAudits } from 'npm:graphql-http';
for (const audit of serverAudits({
url: 'http://localhost:4000/graphql',
fetchFn: fetch,
})) {
Deno.test(audit.name, async () => {
const result = await audit.fn();
if (result.status === 'error') {
throw result.reason;
}
if (result.status === 'warn') {
console.warn(result.reason); // or throw if you want full compliance (warnings are not requirements)
}
// Avoid leaking resources
if ('body' in result && result.body instanceof ReadableStream) {
await result.body.cancel();
}
});
}
```
Put the above contents in a file and run it with `deno test --allow-net`.
</details>
## Only [GraphQL over HTTP](https://graphql.github.io/graphql-over-http/)
This is the official [GraphQL over HTTP spec](https://graphql.github.io/graphql-over-http/) reference implementation and as such follows the specification strictly without any additional features (like playgrounds or GUIs, file uploads, @stream/@defer directives and subscriptions).
Having said this, graphql-http is mostly aimed for library authors and simple server setups, where the requirements are exact to what the aforementioned spec offers.
## [Servers](/implementations)
If you want a feature-full server with bleeding edge technologies, you're recommended to use one of the following servers.
Their compliance with the [GraphQL over HTTP spec](https://graphql.github.io/graphql-over-http) is checked automatically and updated regularly.
<!-- <ServersTable> -->
<!-- prettier-ignore-start -->
| Name | Audit |
|------|-------|
| [apollo-server](https://www.apollographql.com/docs/apollo-server) | [✅ Compliant](/implementations/apollo-server/README.md) |
| [deno](https://deno.com/blog/build-a-graphql-server-with-deno) | [✅ Compliant](/implementations/deno/README.md) |
| [graph-client](https://github.com/graphprotocol/graph-client) | [✅ Compliant](/implementations/graph-client/README.md) |
| [graphql-helix](https://www.graphql-helix.com) | [✅ Compliant](/implementations/graphql-helix/README.md) |
| [graphql-yoga](https://www.the-guild.dev/graphql/yoga-server) | [✅ Compliant](/implementations/graphql-yoga/README.md) |
| [hotchocolate](https://chillicream.com/docs/hotchocolate) | [✅ Compliant](/implementations/hotchocolate/README.md) |
| [lighthouse](https://lighthouse-php.com) | [✅ Compliant](/implementations/lighthouse/README.md) |
| [pioneer](https://pioneer.dexclaimation.com) | [✅ Compliant](/implementations/pioneer/README.md) |
| [postgraphile](https://www.graphile.org/postgraphile) | [✅ Compliant](/implementations/postgraphile/README.md) |
<!-- prettier-ignore-end -->
<!-- </ServersTable> -->
## [Documentation](docs/)
Check the [docs folder](docs/) out for [TypeDoc](https://typedoc.org) generated documentation.
## [Audits](implementations/)
Inspect audits of other implementations in the [implementations folder](implementations).
Adding your implementation is very welcome, [see how](CONTRIBUTING.md#adding-implementations)!
## Want to help?
File a bug, contribute with code, or improve documentation? [Read more in CONTRIBUTING.md](CONTRIBUTING.md).
If your company benefits from GraphQL and you would like to provide essential financial support for the systems and people that power our community, please also consider membership in the [GraphQL Foundation](https://foundation.graphql.org/join).

View File

@@ -0,0 +1,32 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.CanvasElementContainer = void 0;
var element_container_1 = require("../element-container");
var CanvasElementContainer = /** @class */ (function (_super) {
__extends(CanvasElementContainer, _super);
function CanvasElementContainer(context, canvas) {
var _this = _super.call(this, context, canvas) || this;
_this.canvas = canvas;
_this.intrinsicWidth = canvas.width;
_this.intrinsicHeight = canvas.height;
return _this;
}
return CanvasElementContainer;
}(element_container_1.ElementContainer));
exports.CanvasElementContainer = CanvasElementContainer;
//# sourceMappingURL=canvas-element-container.js.map

View File

@@ -0,0 +1,61 @@
import type {Vocabulary, KeywordDefinition, ErrorNoParams} from "ajv"
import type {DefinitionOptions, GetDefinition} from "./_types"
import typeofDef from "./typeof"
import instanceofDef from "./instanceof"
import range from "./range"
import exclusiveRange from "./exclusiveRange"
import regexp from "./regexp"
import transform from "./transform"
import uniqueItemProperties from "./uniqueItemProperties"
import allRequired from "./allRequired"
import anyRequired from "./anyRequired"
import oneRequired from "./oneRequired"
import patternRequired, {PatternRequiredError} from "./patternRequired"
import prohibited from "./prohibited"
import deepProperties from "./deepProperties"
import deepRequired from "./deepRequired"
import dynamicDefaults from "./dynamicDefaults"
import selectDef, {SelectError} from "./select"
const definitions: GetDefinition<KeywordDefinition>[] = [
typeofDef,
instanceofDef,
range,
exclusiveRange,
regexp,
transform,
uniqueItemProperties,
allRequired,
anyRequired,
oneRequired,
patternRequired,
prohibited,
deepProperties,
deepRequired,
dynamicDefaults,
]
export default function ajvKeywords(opts?: DefinitionOptions): Vocabulary {
return definitions.map((d) => d(opts)).concat(selectDef(opts))
}
export type AjvKeywordsError =
| PatternRequiredError
| SelectError
| ErrorNoParams<
| "range"
| "exclusiveRange"
| "anyRequired"
| "oneRequired"
| "allRequired"
| "deepProperties"
| "deepRequired"
| "dynamicDefaults"
| "instanceof"
| "prohibited"
| "regexp"
| "transform"
| "uniqueItemProperties"
>
module.exports = ajvKeywords

View File

@@ -0,0 +1,66 @@
import { expect, expectTypeOf, test } from "vitest";
import * as z from "zod/v4";
test("z.stringbool", () => {
const a = z.stringbool();
type a = z.infer<typeof a>;
expectTypeOf<a>().toEqualTypeOf<boolean>();
type a_in = z.input<typeof a>;
expectTypeOf<a_in>().toEqualTypeOf<string>();
expect(z.parse(a, "true")).toEqual(true);
expect(z.parse(a, "yes")).toEqual(true);
expect(z.parse(a, "1")).toEqual(true);
expect(z.parse(a, "on")).toEqual(true);
expect(z.parse(a, "y")).toEqual(true);
expect(z.parse(a, "enabled")).toEqual(true);
expect(z.parse(a, "TRUE")).toEqual(true);
expect(z.parse(a, "false")).toEqual(false);
expect(z.parse(a, "no")).toEqual(false);
expect(z.parse(a, "0")).toEqual(false);
expect(z.parse(a, "off")).toEqual(false);
expect(z.parse(a, "n")).toEqual(false);
expect(z.parse(a, "disabled")).toEqual(false);
expect(z.parse(a, "FALSE")).toEqual(false);
expect(z.safeParse(a, "other")).toMatchObject({ success: false });
expect(z.safeParse(a, "")).toMatchObject({ success: false });
expect(z.safeParse(a, undefined)).toMatchObject({ success: false });
expect(z.safeParse(a, {})).toMatchObject({ success: false });
expect(z.safeParse(a, true)).toMatchObject({ success: false });
expect(z.safeParse(a, false)).toMatchObject({ success: false });
});
test("custom values", () => {
const b = z.stringbool({
truthy: ["y"],
falsy: ["N"],
});
expect(z.parse(b, "y")).toEqual(true);
expect(z.parse(b, "Y")).toEqual(true);
expect(z.parse(b, "n")).toEqual(false);
expect(z.parse(b, "N")).toEqual(false);
expect(z.safeParse(b, "true")).toMatchObject({ success: false });
expect(z.safeParse(b, "false")).toMatchObject({ success: false });
});
test("custom values - case sensitive", () => {
const c = z.stringbool({
truthy: ["y"],
falsy: ["N"],
case: "sensitive",
});
expect(z.parse(c, "y")).toEqual(true);
expect(z.safeParse(c, "Y")).toMatchObject({ success: false });
expect(z.parse(c, "N")).toEqual(false);
expect(z.safeParse(c, "n")).toMatchObject({ success: false });
expect(z.safeParse(c, "TRUE")).toMatchObject({ success: false });
});
// test custom error messages
test("z.stringbool with custom error messages", () => {
const a = z.stringbool("wrong!");
expect(() => a.parse("")).toThrowError("wrong!");
});

View File

@@ -0,0 +1,25 @@
import { generateMetadata } from '../../utilities/meta.js';
export const generateCustomViewMetadata = async args => {
const {
config,
// i18n: { t },
viewConfig
} = args;
if (!viewConfig) {
return null;
}
return generateMetadata({
description: `Payload`,
keywords: `Payload`,
serverURL: config.serverURL,
title: 'Payload',
...(config.admin.meta || {}),
...(viewConfig.meta || {}),
openGraph: {
title: 'Payload',
...(config.admin.meta?.openGraph || {}),
...(viewConfig.meta?.openGraph || {})
}
});
};
//# sourceMappingURL=generateCustomViewMetadata.js.map

View File

@@ -0,0 +1,64 @@
{
"name": "debug",
"version": "4.4.3",
"repository": {
"type": "git",
"url": "git://github.com/debug-js/debug.git"
},
"description": "Lightweight debugging utility for Node.js and the browser",
"keywords": [
"debug",
"log",
"debugger"
],
"files": [
"src",
"LICENSE",
"README.md"
],
"author": "Josh Junon (https://github.com/qix-)",
"contributors": [
"TJ Holowaychuk <tj@vision-media.ca>",
"Nathan Rajlich <nathan@tootallnate.net> (http://n8.io)",
"Andrew Rhyne <rhyneandrew@gmail.com>"
],
"license": "MIT",
"scripts": {
"lint": "xo",
"test": "npm run test:node && npm run test:browser && npm run lint",
"test:node": "mocha test.js test.node.js",
"test:browser": "karma start --single-run",
"test:coverage": "cat ./coverage/lcov.info | coveralls"
},
"dependencies": {
"ms": "^2.1.3"
},
"devDependencies": {
"brfs": "^2.0.1",
"browserify": "^16.2.3",
"coveralls": "^3.0.2",
"karma": "^3.1.4",
"karma-browserify": "^6.0.0",
"karma-chrome-launcher": "^2.2.0",
"karma-mocha": "^1.3.0",
"mocha": "^5.2.0",
"mocha-lcov-reporter": "^1.2.0",
"sinon": "^14.0.0",
"xo": "^0.23.0"
},
"peerDependenciesMeta": {
"supports-color": {
"optional": true
}
},
"main": "./src/index.js",
"browser": "./src/browser.js",
"engines": {
"node": ">=6.0"
},
"xo": {
"rules": {
"import/extensions": "off"
}
}
}

View File

@@ -0,0 +1,18 @@
import type { Span } from '@sentry/core';
import type { Location, RouteObject } from '../types';
/**
* Creates a proxy wrapper for an async handler function.
* Captures both the location and the active span at invocation time to ensure
* the correct span is updated when the handler resolves.
*/
export declare function createAsyncHandlerProxy(originalFunction: (...args: unknown[]) => unknown, route: RouteObject, handlerKey: string, processResolvedRoutes: (resolvedRoutes: RouteObject[], parentRoute?: RouteObject, currentLocation?: Location, capturedSpan?: Span) => void): (...args: unknown[]) => unknown;
/**
* Handles the result of an async handler function call.
* Passes the captured span through to ensure the correct span is updated.
*/
export declare function handleAsyncHandlerResult(result: unknown, route: RouteObject, handlerKey: string, processResolvedRoutes: (resolvedRoutes: RouteObject[], parentRoute?: RouteObject, currentLocation?: Location, capturedSpan?: Span) => void, currentLocation: Location | null, capturedSpan: Span | undefined): void;
/**
* Recursively checks a route for async handlers and sets up Proxies to add discovered child routes to allRoutes when called.
*/
export declare function checkRouteForAsyncHandler(route: RouteObject, processResolvedRoutes: (resolvedRoutes: RouteObject[], parentRoute?: RouteObject, currentLocation?: Location, capturedSpan?: Span) => void): void;
//# sourceMappingURL=lazy-routes.d.ts.map

View File

@@ -0,0 +1,10 @@
sentry-cli-Darwin-arm64=3f5065e7177188f9c193c66ca788eb956ef95a864845876552c51f5aa577ed30
sentry-cli-Darwin-universal=5a1c1121b45c48504d2ae58af11c743c5663ea8979db3258961838a16cf90c08
sentry-cli-Darwin-x86_64=87149438e1c4becdb54a8302832cacc9429638eadefd09d370b4806bec20a078
sentry-cli-Linux-aarch64=672cb986b0c5d84ef724f39b3aa189be802bceb8bc7dc8c5776a0ca90fcf41bd
sentry-cli-Linux-armv7=e8df469ae35f6d8cd788fe2967c5420633bb09348ad09953d5176615cf1bead0
sentry-cli-Linux-i686=1b05efec7bc2ebf4dca8f3e6ededa8ffedf8ee2dd49e23d434a20885bc9a50cf
sentry-cli-Linux-x86_64=a4932b4315b192b3d037678a16eb2a5a8731609f671fc4008e643b85c3c74cb6
sentry-cli-Windows-aarch64.exe=4e18e8d293366096d26573e31d03544ea16d9310f12450db1618ba55acfef8c4
sentry-cli-Windows-i686.exe=e7314b4b95b969378a46be45b087dfe8cc5c017aceb43a5bbcab3d5e7d6730ea
sentry-cli-Windows-x86_64.exe=6183f8ef1d4823290ba95656654714a3c5c216914229b3914acd99a8b4be812d

View File

@@ -0,0 +1,217 @@
import {
Pool,
types
} from "@neondatabase/serverless";
import { NoopCache } from "../cache/core/cache.js";
import { entityKind } from "../entity.js";
import { NoopLogger } from "../logger.js";
import { PgTransaction } from "../pg-core/index.js";
import { PgPreparedQuery, PgSession } from "../pg-core/session.js";
import { fillPlaceholders, sql } from "../sql/sql.js";
import { mapResultRow } from "../utils.js";
class NeonPreparedQuery extends PgPreparedQuery {
constructor(client, queryString, params, logger, cache, queryMetadata, cacheConfig, fields, name, _isResponseInArrayMode, customResultMapper) {
super({ sql: queryString, params }, cache, queryMetadata, cacheConfig);
this.client = client;
this.params = params;
this.logger = logger;
this.fields = fields;
this._isResponseInArrayMode = _isResponseInArrayMode;
this.customResultMapper = customResultMapper;
this.rawQueryConfig = {
name,
text: queryString,
types: {
// @ts-ignore
getTypeParser: (typeId, format) => {
if (typeId === types.builtins.TIMESTAMPTZ) {
return (val) => val;
}
if (typeId === types.builtins.TIMESTAMP) {
return (val) => val;
}
if (typeId === types.builtins.DATE) {
return (val) => val;
}
if (typeId === types.builtins.INTERVAL) {
return (val) => val;
}
if (typeId === 1231) {
return (val) => val;
}
if (typeId === 1115) {
return (val) => val;
}
if (typeId === 1185) {
return (val) => val;
}
if (typeId === 1187) {
return (val) => val;
}
if (typeId === 1182) {
return (val) => val;
}
return types.getTypeParser(typeId, format);
}
}
};
this.queryConfig = {
name,
text: queryString,
rowMode: "array",
types: {
// @ts-ignore
getTypeParser: (typeId, format) => {
if (typeId === types.builtins.TIMESTAMPTZ) {
return (val) => val;
}
if (typeId === types.builtins.TIMESTAMP) {
return (val) => val;
}
if (typeId === types.builtins.DATE) {
return (val) => val;
}
if (typeId === types.builtins.INTERVAL) {
return (val) => val;
}
if (typeId === 1231) {
return (val) => val;
}
if (typeId === 1115) {
return (val) => val;
}
if (typeId === 1185) {
return (val) => val;
}
if (typeId === 1187) {
return (val) => val;
}
if (typeId === 1182) {
return (val) => val;
}
return types.getTypeParser(typeId, format);
}
}
};
}
static [entityKind] = "NeonPreparedQuery";
rawQueryConfig;
queryConfig;
async execute(placeholderValues = {}) {
const params = fillPlaceholders(this.params, placeholderValues);
this.logger.logQuery(this.rawQueryConfig.text, params);
const { fields, client, rawQueryConfig: rawQuery, queryConfig: query, joinsNotNullableMap, customResultMapper } = this;
if (!fields && !customResultMapper) {
return await this.queryWithCache(rawQuery.text, params, async () => {
return await client.query(rawQuery, params);
});
}
const result = await this.queryWithCache(query.text, params, async () => {
return await client.query(query, params);
});
return customResultMapper ? customResultMapper(result.rows) : result.rows.map((row) => mapResultRow(fields, row, joinsNotNullableMap));
}
all(placeholderValues = {}) {
const params = fillPlaceholders(this.params, placeholderValues);
this.logger.logQuery(this.rawQueryConfig.text, params);
return this.queryWithCache(this.rawQueryConfig.text, params, async () => {
return await this.client.query(this.rawQueryConfig, params);
}).then((result) => result.rows);
}
values(placeholderValues = {}) {
const params = fillPlaceholders(this.params, placeholderValues);
this.logger.logQuery(this.rawQueryConfig.text, params);
return this.queryWithCache(this.queryConfig.text, params, async () => {
return await this.client.query(this.queryConfig, params);
}).then((result) => result.rows);
}
/** @internal */
isResponseInArrayMode() {
return this._isResponseInArrayMode;
}
}
class NeonSession extends PgSession {
constructor(client, dialect, schema, options = {}) {
super(dialect);
this.client = client;
this.schema = schema;
this.options = options;
this.logger = options.logger ?? new NoopLogger();
this.cache = options.cache ?? new NoopCache();
}
static [entityKind] = "NeonSession";
logger;
cache;
prepareQuery(query, fields, name, isResponseInArrayMode, customResultMapper, queryMetadata, cacheConfig) {
return new NeonPreparedQuery(
this.client,
query.sql,
query.params,
this.logger,
this.cache,
queryMetadata,
cacheConfig,
fields,
name,
isResponseInArrayMode,
customResultMapper
);
}
async query(query, params) {
this.logger.logQuery(query, params);
const result = await this.client.query({
rowMode: "array",
text: query,
values: params
});
return result;
}
async queryObjects(query, params) {
return this.client.query(query, params);
}
async count(sql2) {
const res = await this.execute(sql2);
return Number(
res["rows"][0]["count"]
);
}
async transaction(transaction, config = {}) {
const session = this.client instanceof Pool ? new NeonSession(await this.client.connect(), this.dialect, this.schema, this.options) : this;
const tx = new NeonTransaction(this.dialect, session, this.schema);
await tx.execute(sql`begin ${tx.getTransactionConfigSQL(config)}`);
try {
const result = await transaction(tx);
await tx.execute(sql`commit`);
return result;
} catch (error) {
await tx.execute(sql`rollback`);
throw error;
} finally {
if (this.client instanceof Pool) {
session.client.release();
}
}
}
}
class NeonTransaction extends PgTransaction {
static [entityKind] = "NeonTransaction";
async transaction(transaction) {
const savepointName = `sp${this.nestedIndex + 1}`;
const tx = new NeonTransaction(this.dialect, this.session, this.schema, this.nestedIndex + 1);
await tx.execute(sql.raw(`savepoint ${savepointName}`));
try {
const result = await transaction(tx);
await tx.execute(sql.raw(`release savepoint ${savepointName}`));
return result;
} catch (e) {
await tx.execute(sql.raw(`rollback to savepoint ${savepointName}`));
throw e;
}
}
}
export {
NeonPreparedQuery,
NeonSession,
NeonTransaction
};
//# sourceMappingURL=session.js.map

View File

@@ -0,0 +1,16 @@
Prism.languages.gcode = {
'comment': /;.*|\B\(.*?\)\B/,
'string': {
pattern: /"(?:""|[^"])*"/,
greedy: true
},
'keyword': /\b[GM]\d+(?:\.\d+)?\b/,
'property': /\b[A-Z]/,
'checksum': {
pattern: /(\*)\d+/,
lookbehind: true,
alias: 'number'
},
// T0:0:0
'punctuation': /[:*]/
};

View File

@@ -0,0 +1 @@
{"version":3,"file":"useDelay.d.ts","sourceRoot":"","sources":["../../src/hooks/useDelay.ts"],"names":[],"mappings":"AAGA,KAAK,MAAM,GAAG,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC,CAAA;AACnC,eAAO,MAAM,QAAQ,UAAW,MAAM,+BAA2B,MAuBhE,CAAA"}

View File

@@ -0,0 +1,87 @@
import { ReportDialogOptions } from '@sentry/browser';
import { Scope } from '@sentry/core';
import * as React from 'react';
export declare const UNKNOWN_COMPONENT = "unknown";
export type FallbackRender = (errorData: {
error: unknown;
componentStack: string;
eventId: string;
resetError(): void;
}) => React.ReactElement;
type OnUnmountType = {
(error: null, componentStack: null, eventId: null): void;
(error: unknown, componentStack: string, eventId: string): void;
};
export type ErrorBoundaryProps = {
children?: React.ReactNode | (() => React.ReactNode);
/** If a Sentry report dialog should be rendered on error */
showDialog?: boolean | undefined;
/**
* Options to be passed into the Sentry report dialog.
* No-op if {@link showDialog} is false.
*/
dialogOptions?: ReportDialogOptions | undefined;
/**
* A fallback component that gets rendered when the error boundary encounters an error.
*
* Can either provide a React Component, or a function that returns React Component as
* a valid fallback prop. If a function is provided, the function will be called with
* the error, the component stack, and an function that resets the error boundary on error.
*
*/
fallback?: React.ReactElement | FallbackRender | undefined;
/**
* If set to `true` or `false`, the error `handled` property will be set to the given value.
* If unset, the default behaviour is to rely on the presence of the `fallback` prop to determine
* if the error was handled or not.
*/
handled?: boolean | undefined;
/** Called when the error boundary encounters an error */
onError?: ((error: unknown, componentStack: string, eventId: string) => void) | undefined;
/** Called on componentDidMount() */
onMount?: (() => void) | undefined;
/**
* Called when the error boundary resets due to a reset call from the
* fallback render props function.
*/
onReset?: ((error: unknown, componentStack: string, eventId: string) => void) | undefined;
/**
* Called on componentWillUnmount() with the error, componentStack, and eventId.
*
* If the error boundary never encountered an error, the error
* componentStack, and eventId will be null.
*/
onUnmount?: OnUnmountType | undefined;
/** Called before the error is captured by Sentry, allows for you to add tags or context using the scope */
beforeCapture?: ((scope: Scope, error: unknown, componentStack: string) => void) | undefined;
};
type ErrorBoundaryState = {
componentStack: null;
error: null;
eventId: null;
} | {
componentStack: React.ErrorInfo['componentStack'];
error: unknown;
eventId: string;
};
/**
* A ErrorBoundary component that logs errors to Sentry.
* NOTE: If you are a Sentry user, and you are seeing this stack frame, it means the
* Sentry React SDK ErrorBoundary caught an error invoking your application code. This
* is expected behavior and NOT indicative of a bug with the Sentry React SDK.
*/
declare class ErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBoundaryState> {
state: ErrorBoundaryState;
private readonly _openFallbackReportDialog;
private _lastEventId?;
private _cleanupHook?;
constructor(props: ErrorBoundaryProps);
componentDidCatch(error: unknown, errorInfo: React.ErrorInfo): void;
componentDidMount(): void;
componentWillUnmount(): void;
resetErrorBoundary(): void;
render(): React.ReactNode;
}
declare function withErrorBoundary<P extends Record<string, any>>(WrappedComponent: React.ComponentType<P>, errorBoundaryOptions: ErrorBoundaryProps): React.FC<P>;
export { ErrorBoundary, withErrorBoundary };
//# sourceMappingURL=errorboundary.d.ts.map

View File

@@ -0,0 +1,13 @@
import { instrumentCron } from './cron.js';
import { instrumentNodeCron } from './node-cron.js';
import { instrumentNodeSchedule } from './node-schedule.js';
/** Methods to instrument cron libraries for Sentry check-ins */
const cron = {
instrumentCron,
instrumentNodeCron,
instrumentNodeSchedule,
};
export { cron };
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,4 @@
import type { DefaultTranslationsObject, Language } from '../types.js';
export declare const zhTwTranslations: DefaultTranslationsObject;
export declare const zhTw: Language;
//# sourceMappingURL=zhTw.d.ts.map

View File

@@ -0,0 +1,4 @@
{
"main": "../../cjs/_ts_generator.cjs",
"module": "../../esm/_ts_generator.js"
}

View File

@@ -0,0 +1,24 @@
import type { SanitizedCollectionConfig } from '../collections/config/types.js';
import type { JoinQuery, PayloadRequest } from '../types/index.js';
type Args = {
collectionConfig: SanitizedCollectionConfig;
joins?: JoinQuery;
overrideAccess: boolean;
req: PayloadRequest;
};
/**
* * Validates `where` for each join
* * Combines the access result for joined collection
* * Combines the default join's `where`
*/
export declare const sanitizeJoinQuery: ({ collectionConfig, joins: joinsQuery, overrideAccess, req, }: Args) => Promise<false | Partial<{
[x: string]: false | {
count?: boolean;
limit?: number;
page?: number;
sort?: string;
where?: import("../types/index.js").Where;
};
}>>;
export {};
//# sourceMappingURL=sanitizeJoinQuery.d.ts.map

View File

@@ -0,0 +1,72 @@
import { normalizeInterval } from "./_lib/normalizeInterval.js";
import { constructFrom } from "./constructFrom.js";
/**
* The {@link eachDayOfInterval} function options.
*/
/**
* The {@link eachDayOfInterval} function result type. It resolves the proper data type.
* It uses the first argument date object type, starting from the date argument,
* then the start interval date, and finally the end interval date. If
* a context function is passed, it uses the context function return type.
*/
/**
* @name eachDayOfInterval
* @category Interval Helpers
* @summary Return the array of dates within the specified time interval.
*
* @description
* Return the array of dates within the specified time interval.
*
* @typeParam IntervalType - Interval type.
* @typeParam Options - Options type.
*
* @param interval - The interval.
* @param options - An object with options.
*
* @returns The array with starts of days from the day of the interval start to the day of the interval end
*
* @example
* // Each day between 6 October 2014 and 10 October 2014:
* const result = eachDayOfInterval({
* start: new Date(2014, 9, 6),
* end: new Date(2014, 9, 10)
* })
* //=> [
* // Mon Oct 06 2014 00:00:00,
* // Tue Oct 07 2014 00:00:00,
* // Wed Oct 08 2014 00:00:00,
* // Thu Oct 09 2014 00:00:00,
* // Fri Oct 10 2014 00:00:00
* // ]
*/
export function eachDayOfInterval(interval, options) {
const { start, end } = normalizeInterval(options?.in, interval);
let reversed = +start > +end;
const endTime = reversed ? +start : +end;
const date = reversed ? end : start;
date.setHours(0, 0, 0, 0);
let step = options?.step ?? 1;
if (!step) return [];
if (step < 0) {
step = -step;
reversed = !reversed;
}
const dates = [];
while (+date <= endTime) {
dates.push(constructFrom(start, date));
date.setDate(date.getDate() + step);
date.setHours(0, 0, 0, 0);
}
return reversed ? dates.reverse() : dates;
}
// Fallback for modularized imports:
export default eachDayOfInterval;

View File

@@ -0,0 +1,105 @@
"use strict";
exports.formatDistance = void 0;
const formatDistanceLocale = {
lessThanXSeconds: {
one: "menos de um segundo",
other: "menos de {{count}} segundos",
},
xSeconds: {
one: "1 segundo",
other: "{{count}} segundos",
},
halfAMinute: "meio minuto",
lessThanXMinutes: {
one: "menos de um minuto",
other: "menos de {{count}} minutos",
},
xMinutes: {
one: "1 minuto",
other: "{{count}} minutos",
},
aboutXHours: {
one: "cerca de 1 hora",
other: "cerca de {{count}} horas",
},
xHours: {
one: "1 hora",
other: "{{count}} horas",
},
xDays: {
one: "1 dia",
other: "{{count}} dias",
},
aboutXWeeks: {
one: "cerca de 1 semana",
other: "cerca de {{count}} semanas",
},
xWeeks: {
one: "1 semana",
other: "{{count}} semanas",
},
aboutXMonths: {
one: "cerca de 1 mês",
other: "cerca de {{count}} meses",
},
xMonths: {
one: "1 mês",
other: "{{count}} meses",
},
aboutXYears: {
one: "cerca de 1 ano",
other: "cerca de {{count}} anos",
},
xYears: {
one: "1 ano",
other: "{{count}} anos",
},
overXYears: {
one: "mais de 1 ano",
other: "mais de {{count}} anos",
},
almostXYears: {
one: "quase 1 ano",
other: "quase {{count}} anos",
},
};
const formatDistance = (token, count, options) => {
let result;
const tokenValue = formatDistanceLocale[token];
if (typeof tokenValue === "string") {
result = tokenValue;
} else if (count === 1) {
result = tokenValue.one;
} else {
result = tokenValue.other.replace("{{count}}", String(count));
}
if (options?.addSuffix) {
if (options.comparison && options.comparison > 0) {
return "em " + result;
} else {
return "há " + result;
}
}
return result;
};
exports.formatDistance = formatDistance;

View File

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

View File

@@ -0,0 +1,32 @@
import { entityKind } from "../../entity.js";
import { getColumnNameAndConfig } from "../../utils.js";
import { MySqlColumn, MySqlColumnBuilder } from "./common.js";
class MySqlTimeBuilder extends MySqlColumnBuilder {
static [entityKind] = "MySqlTimeBuilder";
constructor(name, config) {
super(name, "string", "MySqlTime");
this.config.fsp = config?.fsp;
}
/** @internal */
build(table) {
return new MySqlTime(table, this.config);
}
}
class MySqlTime extends MySqlColumn {
static [entityKind] = "MySqlTime";
fsp = this.config.fsp;
getSQLType() {
const precision = this.fsp === void 0 ? "" : `(${this.fsp})`;
return `time${precision}`;
}
}
function time(a, b) {
const { name, config } = getColumnNameAndConfig(a, b);
return new MySqlTimeBuilder(name, config);
}
export {
MySqlTime,
MySqlTimeBuilder,
time
};
//# sourceMappingURL=time.js.map

View File

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

View File

@@ -0,0 +1,65 @@
import { isBuild } from '../utils/isBuild.js';
import { withTracedServerSideDataFetcher, withErrorInstrumentation } from '../utils/wrapperUtils.js';
/**
* Create a wrapped version of the user's exported `getInitialProps` function in
* a custom error page ("_error.js").
*
* @param origErrorGetInitialProps The user's `getInitialProps` function
* @param parameterizedRoute The page's parameterized route
* @returns A wrapped version of the function
*/
function wrapErrorGetInitialPropsWithSentry(
origErrorGetInitialProps,
) {
return new Proxy(origErrorGetInitialProps, {
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: '/_error',
requestedRouteName: context.pathname,
dataFetchingMethodName: 'getInitialProps',
});
const {
data: errorGetInitialProps,
baggage,
sentryTrace,
}
= await tracedGetInitialProps.apply(thisArg, args);
if (typeof errorGetInitialProps === 'object' && errorGetInitialProps !== null) {
if (sentryTrace) {
// The Next.js serializer throws on undefined values so we need to guard for it (#12102)
(errorGetInitialProps )._sentryTraceData = sentryTrace;
}
// The Next.js serializer throws on undefined values so we need to guard for it (#12102)
if (baggage) {
(errorGetInitialProps )._sentryBaggage = baggage;
}
}
return errorGetInitialProps;
} else {
return errorWrappedGetInitialProps.apply(thisArg, args);
}
},
});
}
export { wrapErrorGetInitialPropsWithSentry };
//# sourceMappingURL=wrapErrorGetInitialPropsWithSentry.js.map

View File

@@ -0,0 +1,18 @@
import { frame, cancelFrame } from '../../../frameloop/frame.mjs';
function observeTimeline(update, timeline) {
let prevProgress;
const onFrame = () => {
const { currentTime } = timeline;
const percentage = currentTime === null ? 0 : currentTime.value;
const progress = percentage / 100;
if (prevProgress !== progress) {
update(progress);
}
prevProgress = progress;
};
frame.update(onFrame, true);
return () => cancelFrame(onFrame);
}
export { observeTimeline };

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/supabase/index.ts"],"sourcesContent":["export * from './rls.ts';\n"],"mappings":"AAAA,cAAc;","names":[]}

View File

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

View File

@@ -0,0 +1,4 @@
import React from 'react';
import './index.scss';
export declare const LinkIcon: React.FC;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"logging-error-handler.js","sourceRoot":"","sources":["../../../src/common/logging-error-handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,IAAI,EAAa,MAAM,oBAAoB,CAAC;AAGrD;;;GAGG;AACH,MAAM,UAAU,mBAAmB;IACjC,OAAO,CAAC,EAAa,EAAE,EAAE;QACvB,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC,EAAE,CAAC,CAAC,CAAC;IACrC,CAAC,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,SAAS,kBAAkB,CAAC,EAAsB;IAChD,IAAI,OAAO,EAAE,KAAK,QAAQ,EAAE;QAC1B,OAAO,EAAE,CAAC;KACX;SAAM;QACL,OAAO,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC,EAAE,CAAC,CAAC,CAAC;KAC7C;AACH,CAAC;AAED;;;;GAIG;AACH,SAAS,gBAAgB,CAAC,EAAa;IACrC,MAAM,MAAM,GAAG,EAA4B,CAAC;IAC5C,IAAI,OAAO,GAAG,EAAE,CAAC;IAEjB,OAAO,OAAO,KAAK,IAAI,EAAE;QACvB,MAAM,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE;YACzD,IAAI,MAAM,CAAC,YAAY,CAAC;gBAAE,OAAO;YACjC,MAAM,KAAK,GAAG,OAAO,CAAC,YAAoC,CAAC,CAAC;YAC5D,IAAI,KAAK,EAAE;gBACT,MAAM,CAAC,YAAY,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;aACtC;QACH,CAAC,CAAC,CAAC;QACH,OAAO,GAAG,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;KAC1C;IAED,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { diag, Exception } from '@opentelemetry/api';\nimport { ErrorHandler } from './types';\n\n/**\n * Returns a function that logs an error using the provided logger, or a\n * console logger if one was not provided.\n */\nexport function loggingErrorHandler(): ErrorHandler {\n return (ex: Exception) => {\n diag.error(stringifyException(ex));\n };\n}\n\n/**\n * Converts an exception into a string representation\n * @param {Exception} ex\n */\nfunction stringifyException(ex: Exception | string): string {\n if (typeof ex === 'string') {\n return ex;\n } else {\n return JSON.stringify(flattenException(ex));\n }\n}\n\n/**\n * Flattens an exception into key-value pairs by traversing the prototype chain\n * and coercing values to strings. Duplicate properties will not be overwritten;\n * the first insert wins.\n */\nfunction flattenException(ex: Exception): Record<string, string> {\n const result = {} as Record<string, string>;\n let current = ex;\n\n while (current !== null) {\n Object.getOwnPropertyNames(current).forEach(propertyName => {\n if (result[propertyName]) return;\n const value = current[propertyName as keyof typeof current];\n if (value) {\n result[propertyName] = String(value);\n }\n });\n current = Object.getPrototypeOf(current);\n }\n\n return result;\n}\n"]}

View File

@@ -0,0 +1,46 @@
import { ParserError } from "../util/errors.js";
import type { FileInfo } from "../types/index.js";
import type { Plugin } from "../types/index.js";
const TEXT_REGEXP = /\.(txt|htm|html|md|xml|js|min|map|css|scss|less|svg)$/i;
export default {
/**
* The order that this parser will run, in relation to other parsers.
*/
order: 300,
/**
* Whether to allow "empty" files (zero bytes).
*/
allowEmpty: true,
/**
* The encoding that the text is expected to be in.
*/
encoding: "utf8" as BufferEncoding,
/**
* Determines whether this parser can parse a given file reference.
* Parsers that return true will be tried, in order, until one successfully parses the file.
* Parsers that return false will be skipped, UNLESS all parsers returned false, in which case
* every parser will be tried.
*/
canParse(file: FileInfo) {
// Use this parser if the file is a string or Buffer, and has a known text-based extension
return (typeof file.data === "string" || Buffer.isBuffer(file.data)) && TEXT_REGEXP.test(file.url);
},
/**
* Parses the given file as text
*/
parse(file: FileInfo) {
if (typeof file.data === "string") {
return file.data;
} else if (Buffer.isBuffer(file.data)) {
return file.data.toString(this.encoding);
} else {
throw new ParserError("data is not text", file.url);
}
},
} as Plugin;

View File

@@ -0,0 +1,7 @@
import React from 'react';
import { IScrollInfoContext } from '../ScrollInfoProvider/context.js';
export type ChildFunction = (context: IScrollInfoContext) => React.ReactNode;
export type ScrollInfoProps = {
children?: React.ReactNode | ChildFunction;
};
export declare const ScrollInfo: React.FC<ScrollInfoProps>;

View File

@@ -0,0 +1,57 @@
{
"name": "@react-email/heading",
"version": "0.0.15",
"description": "A block of heading text",
"sideEffects": false,
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"files": [
"dist/**"
],
"exports": {
".": {
"import": {
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
},
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
}
},
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/resend/react-email.git",
"directory": "packages/heading"
},
"keywords": [
"react",
"email"
],
"engines": {
"node": ">=18.0.0"
},
"peerDependencies": {
"react": "^18.0 || ^19.0 || ^19.0.0-rc"
},
"devDependencies": {
"typescript": "5.1.6",
"@react-email/render": "1.0.3",
"tsconfig": "0.0.0",
"eslint-config-custom": "0.0.0"
},
"publishConfig": {
"access": "public"
},
"scripts": {
"build": "tsup src/index.ts --format esm,cjs --dts --external react",
"clean": "rm -rf dist",
"dev": "tsup src/index.ts --format esm,cjs --dts --external react --watch",
"lint": "eslint .",
"test:watch": "vitest",
"test": "vitest run"
}
}

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/supabase/rls.ts"],"sourcesContent":["import { bigserial, pgSchema, text, timestamp, uuid, varchar } from '~/pg-core/index.ts';\nimport { pgRole } from '~/pg-core/roles.ts';\nimport { sql } from '~/sql/sql.ts';\n\nexport const anonRole = pgRole('anon').existing();\nexport const authenticatedRole = pgRole('authenticated').existing();\nexport const serviceRole = pgRole('service_role').existing();\nexport const postgresRole = pgRole('postgres_role').existing();\nexport const supabaseAuthAdminRole = pgRole('supabase_auth_admin').existing();\n\n/* ------------------------------ auth schema; ------------------------------ */\nconst auth = pgSchema('auth');\n\nexport const authUsers = auth.table('users', {\n\tid: uuid().primaryKey().notNull(),\n\temail: varchar({ length: 255 }),\n\tphone: text().unique(),\n\temailConfirmedAt: timestamp('email_confirmed_at', { withTimezone: true }),\n\tphoneConfirmedAt: timestamp('phone_confirmed_at', { withTimezone: true }),\n\tlastSignInAt: timestamp('last_sign_in_at', { withTimezone: true }),\n\tcreatedAt: timestamp('created_at', { withTimezone: true }),\n\tupdatedAt: timestamp('updated_at', { withTimezone: true }),\n});\n\n/* ------------------------------ realtime schema; ------------------------------- */\nconst realtime = pgSchema('realtime');\n\nexport const realtimeMessages = realtime.table(\n\t'messages',\n\t{\n\t\tid: bigserial({ mode: 'bigint' }).primaryKey(),\n\t\ttopic: text().notNull(),\n\t\textension: text({\n\t\t\tenum: ['presence', 'broadcast', 'postgres_changes'],\n\t\t}).notNull(),\n\t},\n);\n\nexport const authUid = sql`(select auth.uid())`;\nexport const realtimeTopic = sql`realtime.topic()`;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAoE;AACpE,mBAAuB;AACvB,iBAAoB;AAEb,MAAM,eAAW,qBAAO,MAAM,EAAE,SAAS;AACzC,MAAM,wBAAoB,qBAAO,eAAe,EAAE,SAAS;AAC3D,MAAM,kBAAc,qBAAO,cAAc,EAAE,SAAS;AACpD,MAAM,mBAAe,qBAAO,eAAe,EAAE,SAAS;AACtD,MAAM,4BAAwB,qBAAO,qBAAqB,EAAE,SAAS;AAG5E,MAAM,WAAO,yBAAS,MAAM;AAErB,MAAM,YAAY,KAAK,MAAM,SAAS;AAAA,EAC5C,QAAI,qBAAK,EAAE,WAAW,EAAE,QAAQ;AAAA,EAChC,WAAO,wBAAQ,EAAE,QAAQ,IAAI,CAAC;AAAA,EAC9B,WAAO,qBAAK,EAAE,OAAO;AAAA,EACrB,sBAAkB,0BAAU,sBAAsB,EAAE,cAAc,KAAK,CAAC;AAAA,EACxE,sBAAkB,0BAAU,sBAAsB,EAAE,cAAc,KAAK,CAAC;AAAA,EACxE,kBAAc,0BAAU,mBAAmB,EAAE,cAAc,KAAK,CAAC;AAAA,EACjE,eAAW,0BAAU,cAAc,EAAE,cAAc,KAAK,CAAC;AAAA,EACzD,eAAW,0BAAU,cAAc,EAAE,cAAc,KAAK,CAAC;AAC1D,CAAC;AAGD,MAAM,eAAW,yBAAS,UAAU;AAE7B,MAAM,mBAAmB,SAAS;AAAA,EACxC;AAAA,EACA;AAAA,IACC,QAAI,0BAAU,EAAE,MAAM,SAAS,CAAC,EAAE,WAAW;AAAA,IAC7C,WAAO,qBAAK,EAAE,QAAQ;AAAA,IACtB,eAAW,qBAAK;AAAA,MACf,MAAM,CAAC,YAAY,aAAa,kBAAkB;AAAA,IACnD,CAAC,EAAE,QAAQ;AAAA,EACZ;AACD;AAEO,MAAM,UAAU;AAChB,MAAM,gBAAgB;","names":[]}

View File

@@ -0,0 +1,118 @@
# Class: RetryHandler
Extends: `undici.DispatcherHandlers`
A handler class that implements the retry logic for a request.
## `new RetryHandler(dispatchOptions, retryHandlers, [retryOptions])`
Arguments:
- **options** `Dispatch.DispatchOptions & RetryOptions` (required) - It is an intersection of `Dispatcher.DispatchOptions` and `RetryOptions`.
- **retryHandlers** `RetryHandlers` (required) - Object containing the `dispatch` to be used on every retry, and `handler` for handling the `dispatch` lifecycle.
Returns: `retryHandler`
### Parameter: `Dispatch.DispatchOptions & RetryOptions`
Extends: [`Dispatch.DispatchOptions`](/docs/docs/api/Dispatcher.md#parameter-dispatchoptions).
#### `RetryOptions`
- **throwOnError** `boolean` (optional) - Disable to prevent throwing error on last retry attept, useful if you need the body on errors from server or if you have custom error handler.
- **retry** `(err: Error, context: RetryContext, callback: (err?: Error | null) => void) => number | null` (optional) - Function to be called after every retry. It should pass error if no more retries should be performed.
- **maxRetries** `number` (optional) - Maximum number of retries. Default: `5`
- **maxTimeout** `number` (optional) - Maximum number of milliseconds to wait before retrying. Default: `30000` (30 seconds)
- **minTimeout** `number` (optional) - Minimum number of milliseconds to wait before retrying. Default: `500` (half a second)
- **timeoutFactor** `number` (optional) - Factor to multiply the timeout by for each retry attempt. Default: `2`
- **retryAfter** `boolean` (optional) - It enables automatic retry after the `Retry-After` header is received. Default: `true`
-
- **methods** `string[]` (optional) - Array of HTTP methods to retry. Default: `['GET', 'PUT', 'HEAD', 'OPTIONS', 'DELETE']`
- **statusCodes** `number[]` (optional) - Array of HTTP status codes to retry. Default: `[429, 500, 502, 503, 504]`
- **errorCodes** `string[]` (optional) - Array of Error codes to retry. Default: `['ECONNRESET', 'ECONNREFUSED', 'ENOTFOUND', 'ENETDOWN','ENETUNREACH', 'EHOSTDOWN', 'UND_ERR_SOCKET']`
**`RetryContext`**
- `state`: `RetryState` - Current retry state. It can be mutated.
- `opts`: `Dispatch.DispatchOptions & RetryOptions` - Options passed to the retry handler.
**`RetryState`**
It represents the retry state for a given request.
- `counter`: `number` - Current retry attempt.
### Parameter `RetryHandlers`
- **dispatch** `(options: Dispatch.DispatchOptions, handlers: Dispatch.DispatchHandler) => Promise<Dispatch.DispatchResponse>` (required) - Dispatch function to be called after every retry.
- **handler** Extends [`Dispatch.DispatchHandler`](/docs/docs/api/Dispatcher.md#dispatcherdispatchoptions-handler) (required) - Handler function to be called after the request is successful or the retries are exhausted.
>__Note__: The `RetryHandler` does not retry over stateful bodies (e.g. streams, AsyncIterable) as those, once consumed, are left in a state that cannot be reutilized. For these situations the `RetryHandler` will identify
>the body as stateful and will not retry the request rejecting with the error `UND_ERR_REQ_RETRY`.
Examples:
```js
const client = new Client(`http://localhost:${server.address().port}`);
const chunks = [];
const handler = new RetryHandler(
{
...dispatchOptions,
retryOptions: {
// custom retry function
retry: function (err, state, callback) {
counter++;
if (err.code && err.code === "UND_ERR_DESTROYED") {
callback(err);
return;
}
if (err.statusCode === 206) {
callback(err);
return;
}
setTimeout(() => callback(null), 1000);
},
},
},
{
dispatch: (...args) => {
return client.dispatch(...args);
},
handler: {
onConnect() {},
onBodySent() {},
onHeaders(status, _rawHeaders, resume, _statusMessage) {
// do something with headers
},
onData(chunk) {
chunks.push(chunk);
return true;
},
onComplete() {},
onError() {
// handle error properly
},
},
}
);
```
#### Example - Basic RetryHandler with defaults
```js
const client = new Client(`http://localhost:${server.address().port}`);
const handler = new RetryHandler(dispatchOptions, {
dispatch: client.dispatch.bind(client),
handler: {
onConnect() {},
onBodySent() {},
onHeaders(status, _rawHeaders, resume, _statusMessage) {},
onData(chunk) {},
onComplete() {},
onError(err) {},
},
});
```

View File

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

View File

@@ -0,0 +1,139 @@
"use strict";
exports.match = void 0;
var _index = require("../../_lib/buildMatchFn.cjs");
var _index2 = require("../../_lib/buildMatchPatternFn.cjs");
const matchOrdinalNumberPattern = /^(\d+)\./i;
const parseOrdinalNumberPattern = /\d+/i;
const matchEraPatterns = {
narrow: /^(p\.m\.ē|m\.ē)/i,
abbreviated: /^(p\. m\. ē\.|m\. ē\.)/i,
wide: /^(pirms mūsu ēras|mūsu ērā)/i,
};
const parseEraPatterns = {
any: [/^p/i, /^m/i],
};
const matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^[1234](\. cet\.)/i,
wide: /^(pirma(is|jā)|otra(is|jā)|treša(is|jā)|ceturta(is|jā)) ceturksn(is|ī)/i,
};
const parseQuarterPatterns = {
narrow: [/^1/i, /^2/i, /^3/i, /^4/i],
abbreviated: [/^1/i, /^2/i, /^3/i, /^4/i],
wide: [/^p/i, /^o/i, /^t/i, /^c/i],
};
const matchMonthPatterns = {
narrow: /^[jfmasond]/i,
abbreviated:
/^(janv\.|febr\.|marts|apr\.|maijs|jūn\.|jūl\.|aug\.|sept\.|okt\.|nov\.|dec\.)/i,
wide: /^(janvār(is|ī)|februār(is|ī)|mart[sā]|aprīl(is|ī)|maij[sā]|jūnij[sā]|jūlij[sā]|august[sā]|septembr(is|ī)|oktobr(is|ī)|novembr(is|ī)|decembr(is|ī))/i,
};
const parseMonthPatterns = {
narrow: [
/^j/i,
/^f/i,
/^m/i,
/^a/i,
/^m/i,
/^j/i,
/^j/i,
/^a/i,
/^s/i,
/^o/i,
/^n/i,
/^d/i,
],
any: [
/^ja/i,
/^f/i,
/^mar/i,
/^ap/i,
/^mai/i,
/^jūn/i,
/^jūl/i,
/^au/i,
/^s/i,
/^o/i,
/^n/i,
/^d/i,
],
};
const matchDayPatterns = {
narrow: /^[spotc]/i,
short: /^(sv|pi|o|t|c|pk|s)/i,
abbreviated: /^(svētd\.|pirmd\.|otrd.\|trešd\.|ceturtd\.|piektd\.|sestd\.)/i,
wide: /^(svētdien(a|ā)|pirmdien(a|ā)|otrdien(a|ā)|trešdien(a|ā)|ceturtdien(a|ā)|piektdien(a|ā)|sestdien(a|ā))/i,
};
const parseDayPatterns = {
narrow: [/^s/i, /^p/i, /^o/i, /^t/i, /^c/i, /^p/i, /^s/i],
any: [/^sv/i, /^pi/i, /^o/i, /^t/i, /^c/i, /^p/i, /^se/i],
};
const matchDayPeriodPatterns = {
narrow: /^(am|pm|pusn\.|pusd\.|rīt(s|ā)|dien(a|ā)|vakar(s|ā)|nakt(s|ī))/,
abbreviated: /^(am|pm|pusn\.|pusd\.|rīt(s|ā)|pēcpusd\.|vakar(s|ā)|nakt(s|ī))/,
wide: /^(am|pm|pusnakt(s|ī)|pusdienlaik(s|ā)|rīt(s|ā)|pēcpusdien(a|ā)|vakar(s|ā)|nakt(s|ī))/i,
};
const parseDayPeriodPatterns = {
any: {
am: /^am/i,
pm: /^pm/i,
midnight: /^pusn/i,
noon: /^pusd/i,
morning: /^r/i,
afternoon: /^(d|pēc)/i,
evening: /^v/i,
night: /^n/i,
},
};
const match = (exports.match = {
ordinalNumber: (0, _index2.buildMatchPatternFn)({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: (value) => parseInt(value, 10),
}),
era: (0, _index.buildMatchFn)({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any",
}),
quarter: (0, _index.buildMatchFn)({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "wide",
valueCallback: (index) => index + 1,
}),
month: (0, _index.buildMatchFn)({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any",
}),
day: (0, _index.buildMatchFn)({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any",
}),
dayPeriod: (0, _index.buildMatchFn)({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any",
}),
});

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 './circle-user-round.js';
//# sourceMappingURL=user-circle-2.js.map

View File

@@ -0,0 +1,3 @@
export * from './firebaseInstrumentation';
export * from './types';
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,146 @@
"use strict";
exports.match = void 0;
var _index = require("../../_lib/buildMatchFn.cjs");
var _index2 = require("../../_lib/buildMatchPatternFn.cjs");
const matchOrdinalNumberPattern = /^(\d+)(af|ail|ydd|ed|fed|eg|ain)?/i;
const parseOrdinalNumberPattern = /\d+/i;
const matchEraPatterns = {
narrow: /^(c|o)/i,
abbreviated: /^(c\.?\s?c\.?|o\.?\s?c\.?)/i,
wide: /^(cyn christ|ar ôl crist|ar ol crist)/i,
};
const parseEraPatterns = {
wide: [/^c/i, /^(ar ôl crist|ar ol crist)/i],
any: [/^c/i, /^o/i],
};
const matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^ch[1234]/i,
wide: /^(chwarter 1af)|([234](ail|ydd)? chwarter)/i,
};
const parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i],
};
const matchMonthPatterns = {
narrow: /^(i|ch|m|e|g|a|h|t|rh)/i,
abbreviated: /^(ion|chwe|maw|ebr|mai|meh|gor|aws|med|hyd|tach|rhag)/i,
wide: /^(ionawr|chwefror|mawrth|ebrill|mai|mehefin|gorffennaf|awst|medi|hydref|tachwedd|rhagfyr)/i,
};
const parseMonthPatterns = {
narrow: [
/^i/i,
/^ch/i,
/^m/i,
/^e/i,
/^m/i,
/^m/i,
/^g/i,
/^a/i,
/^m/i,
/^h/i,
/^t/i,
/^rh/i,
],
any: [
/^io/i,
/^ch/i,
/^maw/i,
/^e/i,
/^mai/i,
/^meh/i,
/^g/i,
/^a/i,
/^med/i,
/^h/i,
/^t/i,
/^rh/i,
],
};
const matchDayPatterns = {
narrow: /^(s|ll|m|i|g)/i,
short: /^(su|ll|ma|me|ia|gw|sa)/i,
abbreviated: /^(sul|llun|maw|mer|iau|gwe|sad)/i,
wide: /^dydd (sul|llun|mawrth|mercher|iau|gwener|sadwrn)/i,
};
const parseDayPatterns = {
narrow: [/^s/i, /^ll/i, /^m/i, /^m/i, /^i/i, /^g/i, /^s/i],
wide: [
/^dydd su/i,
/^dydd ll/i,
/^dydd ma/i,
/^dydd me/i,
/^dydd i/i,
/^dydd g/i,
/^dydd sa/i,
],
any: [/^su/i, /^ll/i, /^ma/i, /^me/i, /^i/i, /^g/i, /^sa/i],
};
const matchDayPeriodPatterns = {
narrow: /^(b|h|hn|hd|(yn y|y|yr|gyda'r) (bore|prynhawn|nos|hwyr))/i,
any: /^(y\.?\s?[bh]\.?|hanner nos|hanner dydd|(yn y|y|yr|gyda'r) (bore|prynhawn|nos|hwyr))/i,
};
const parseDayPeriodPatterns = {
any: {
am: /^b|(y\.?\s?b\.?)/i,
pm: /^h|(y\.?\s?h\.?)|(yr hwyr)/i,
midnight: /^hn|hanner nos/i,
noon: /^hd|hanner dydd/i,
morning: /bore/i,
afternoon: /prynhawn/i,
evening: /^gyda'r nos$/i,
night: /blah/i,
},
};
const match = (exports.match = {
ordinalNumber: (0, _index2.buildMatchPatternFn)({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: (value) => parseInt(value, 10),
}),
era: (0, _index.buildMatchFn)({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any",
}),
quarter: (0, _index.buildMatchFn)({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: (index) => index + 1,
}),
month: (0, _index.buildMatchFn)({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any",
}),
day: (0, _index.buildMatchFn)({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any",
}),
dayPeriod: (0, _index.buildMatchFn)({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any",
}),
});

View File

@@ -0,0 +1 @@
{"version":3,"file":"megaphone.js","sources":["../../../src/icons/megaphone.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Megaphone\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtMyAxMSAxOC01djEyTDMgMTR2LTN6IiAvPgogIDxwYXRoIGQ9Ik0xMS42IDE2LjhhMyAzIDAgMSAxLTUuOC0xLjYiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/megaphone\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 Megaphone = createLucideIcon('Megaphone', [\n ['path', { d: 'm3 11 18-5v12L3 14v-3z', key: 'n962bs' }],\n ['path', { d: 'M11.6 16.8a3 3 0 1 1-5.8-1.6', key: '1yl0tm' }],\n]);\n\nexport default Megaphone;\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,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,CAAgC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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;AAC/D,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,24 @@
import { HtmlToTextOptions, SelectorDefinition } from 'html-to-text';
type Options = {
pretty?: boolean;
} & ({
plainText?: false;
} | {
plainText?: true;
/**
* These are options you can pass down directly to the library we use for
* converting the rendered email's HTML into plain text.
*
* @see https://github.com/html-to-text/node-html-to-text
*/
htmlToTextOptions?: HtmlToTextOptions;
});
declare const render: (element: React.ReactElement, options?: Options) => Promise<string>;
declare const renderAsync: (element: React.ReactElement, options?: Options) => Promise<string>;
declare const plainTextSelectors: SelectorDefinition[];
export { Options, plainTextSelectors, render, renderAsync };

View File

@@ -0,0 +1 @@
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { ResourceDetector } from './types';\n\n/**\n * ResourceDetectionConfig provides an interface for configuring resource auto-detection.\n */\nexport interface ResourceDetectionConfig {\n detectors?: Array<ResourceDetector>;\n}\n"]}

View File

@@ -0,0 +1,39 @@
import { Span } from '@sentry/core';
/**
* Sets an inactive span active on the current scope.
*
* This is useful in browser applications, if you want to create a span that cannot be finished
* within its callback. Any spans started while the given span is active, will be children of the span.
*
* If there already was an active span on the scope prior to calling this function, it is replaced
* with the given span and restored after the span ended. Otherwise, the span will simply be
* removed, resulting in no active span on the scope.
*
* IMPORTANT: This function can ONLY be used in the browser! Calling this function in a server
* environment (for example in a server-side rendered component) will result in undefined behaviour
* and is not supported.
* You MUST call `span.end()` manually, otherwise the span will never be finished.
*
* @example
* ```js
* let checkoutSpan;
*
* on('checkoutStarted', () => {
* checkoutSpan = Sentry.startInactiveSpan({ name: 'checkout-flow' });
* Sentry.setActiveSpanInBrowser(checkoutSpan);
* })
*
* // during this time, any spans started will be children of `checkoutSpan`:
* Sentry.startSpan({ name: 'checkout-step-1' }, () => {
* // ... `
* })
*
* on('checkoutCompleted', () => {
* checkoutSpan?.end();
* })
* ```
*
* @param span - the span to set active
*/
export declare function setActiveSpanInBrowser(span: Span): void;
//# sourceMappingURL=setActiveSpan.d.ts.map

View File

@@ -0,0 +1,38 @@
var lodash = require('./wrapperLodash');
/**
* Creates a `lodash` wrapper instance that wraps `value` with explicit method
* chain sequences enabled. The result of such sequences must be unwrapped
* with `_#value`.
*
* @static
* @memberOf _
* @since 1.3.0
* @category Seq
* @param {*} value The value to wrap.
* @returns {Object} Returns the new `lodash` wrapper instance.
* @example
*
* var users = [
* { 'user': 'barney', 'age': 36 },
* { 'user': 'fred', 'age': 40 },
* { 'user': 'pebbles', 'age': 1 }
* ];
*
* var youngest = _
* .chain(users)
* .sortBy('age')
* .map(function(o) {
* return o.user + ' is ' + o.age;
* })
* .head()
* .value();
* // => 'pebbles is 1'
*/
function chain(value) {
var result = lodash(value);
result.__chain__ = true;
return result;
}
module.exports = chain;

View File

@@ -0,0 +1,55 @@
import { PgTable } from "./table.cjs";
import { SQL } from "../sql/sql.cjs";
import { Subquery } from "../subquery.cjs";
import { type Check } from "./checks.cjs";
import type { AnyPgColumn } from "./columns/index.cjs";
import { type ForeignKey } from "./foreign-keys.cjs";
import type { Index } from "./indexes.cjs";
import { PgPolicy } from "./policies.cjs";
import { type PrimaryKey } from "./primary-keys.cjs";
import { type UniqueConstraint } from "./unique-constraint.cjs";
import type { PgViewBase } from "./view-base.cjs";
import { type PgMaterializedView, type PgView } from "./view.cjs";
export declare function getTableConfig<TTable extends PgTable>(table: TTable): {
columns: import("./index.ts").PgColumn<import("../column.ts").ColumnBaseConfig<import("../column-builder.ts").ColumnDataType, string>, {}, {}>[];
indexes: Index[];
foreignKeys: ForeignKey[];
checks: Check[];
primaryKeys: PrimaryKey[];
uniqueConstraints: UniqueConstraint[];
name: string;
schema: string | undefined;
policies: PgPolicy[];
enableRLS: boolean;
};
export declare function extractUsedTable(table: PgTable | Subquery | PgViewBase | SQL): string[];
export declare function getViewConfig<TName extends string = string, TExisting extends boolean = boolean>(view: PgView<TName, TExisting>): {
with?: import("./view.ts").ViewWithConfig;
name: TName;
originalName: TName;
schema: string | undefined;
selectedFields: import("../sql/sql.ts").ColumnsSelection;
isExisting: TExisting;
query: TExisting extends true ? undefined : SQL<unknown>;
isAlias: boolean;
};
export declare function getMaterializedViewConfig<TName extends string = string, TExisting extends boolean = boolean>(view: PgMaterializedView<TName, TExisting>): {
with?: import("./view.ts").PgMaterializedViewWithConfig;
using?: string;
tablespace?: string;
withNoData?: boolean;
name: TName;
originalName: TName;
schema: string | undefined;
selectedFields: import("../sql/sql.ts").ColumnsSelection;
isExisting: TExisting;
query: TExisting extends true ? undefined : SQL<unknown>;
isAlias: boolean;
};
export type ColumnsWithTable<TTableName extends string, TForeignTableName extends string, TColumns extends AnyPgColumn<{
tableName: TTableName;
}>[]> = {
[Key in keyof TColumns]: AnyPgColumn<{
tableName: TForeignTableName;
}>;
};

View File

@@ -0,0 +1,20 @@
import type { FindOptions } from '../../collections/operations/local/find.js';
import type { PaginatedDocs } from '../../database/types.js';
import type { PayloadRequest, PopulateType, SelectType, Sort, Where } from '../../types/index.js';
import type { TypeWithVersion } from '../../versions/types.js';
import type { SanitizedGlobalConfig } from '../config/types.js';
export type Arguments = {
depth?: number;
globalConfig: SanitizedGlobalConfig;
limit?: number;
overrideAccess?: boolean;
page?: number;
pagination?: boolean;
populate?: PopulateType;
req?: PayloadRequest;
showHiddenFields?: boolean;
sort?: Sort;
where?: Where;
} & Pick<FindOptions<string, SelectType>, 'select'>;
export declare const findVersionsOperation: <T extends TypeWithVersion<T>>(args: Arguments) => Promise<PaginatedDocs<T>>;
//# sourceMappingURL=findVersions.d.ts.map

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