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,24 @@
import { DirectusOperation } from "../../../schema/operation.js";
import { ApplyQueryFields } from "../../../types/output.js";
import { Query } from "../../../types/query.js";
import { RestCommand } from "../../types.js";
//#region src/rest/commands/read/operations.d.ts
type ReadOperationOutput<Schema, TQuery extends Query<Schema, Item>, Item extends object = DirectusOperation<Schema>> = ApplyQueryFields<Schema, Item, TQuery['fields']>;
/**
* List all operations that exist in Directus.
* @param query The query parameters
* @returns An array of up to limit operation objects. If no items are available, data will be an empty array.
*/
declare const readOperations: <Schema, const TQuery extends Query<Schema, DirectusOperation<Schema>>>(query?: TQuery) => RestCommand<ReadOperationOutput<Schema, TQuery>[], Schema>;
/**
* List all Operations that exist in Directus.
* @param key The primary key of the dashboard
* @param query The query parameters
* @returns Returns a Operation object if a valid primary key was provided.
* @throws Will throw if key is empty
*/
declare const readOperation: <Schema, const TQuery extends Query<Schema, DirectusOperation<Schema>>>(key: DirectusOperation<Schema>["id"], query?: TQuery) => RestCommand<ReadOperationOutput<Schema, TQuery>, Schema>;
//#endregion
export { ReadOperationOutput, readOperation, readOperations };
//# sourceMappingURL=operations.d.ts.map

View File

@@ -0,0 +1 @@
Prism.languages.t4 = Prism.languages['t4-cs'] = Prism.languages['t4-templating'].createT4('csharp');

View File

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

View File

@@ -0,0 +1,9 @@
import type { Locale } from "./types.js";
/**
* @category Locales
* @summary Albanian locale.
* @language Shqip
* @iso-639-2 sqi
* @author Ardit Dine [@arditdine](https://github.com/arditdine)
*/
export declare const sq: Locale;

View File

@@ -0,0 +1,5 @@
export { AnimationManager } from './AnimationManager';
export type { Animation } from './AnimationManager';
export { NullifiedContextProvider } from './NullifiedContextProvider';
export { PositionedOverlay } from './PositionedOverlay';
export type { PositionedOverlayProps } from './PositionedOverlay';

View File

@@ -0,0 +1,117 @@
'use client';
import { jsx as _jsx } from "react/jsx-runtime";
import { useWindowInfo } from '@faceless-ui/window-info';
import { usePathname } from 'next/navigation.js';
import { PREFERENCE_KEYS } from 'payload/shared';
import React, { useEffect, useRef } from 'react';
import { usePreferences } from '../../providers/Preferences/index.js';
/**
* @internal
*/
export const NavContext = /*#__PURE__*/React.createContext({
hydrated: false,
navOpen: true,
navRef: null,
setNavOpen: () => {},
shouldAnimate: false
});
export const useNav = () => React.use(NavContext);
const getNavPreference = async getPreference => {
const navPrefs = await getPreference(PREFERENCE_KEYS.NAV);
const preferredState = navPrefs?.open;
if (typeof preferredState === 'boolean') {
return preferredState;
} else {
return true;
}
};
/**
* @internal
*/
export const NavProvider = ({
children,
initialIsOpen
}) => {
const {
breakpoints: {
l: largeBreak,
m: midBreak,
s: smallBreak
}
} = useWindowInfo();
const pathname = usePathname();
const {
getPreference
} = usePreferences();
const navRef = useRef(null);
// initialize the nav to be closed
// this is because getting the preference is async
// so instead of closing it after the preference is loaded
// we will open it after the preference is loaded
const [navOpen, setNavOpen] = React.useState(initialIsOpen);
const [shouldAnimate, setShouldAnimate] = React.useState(false);
const [hydrated, setHydrated] = React.useState(false);
// on load check the user's preference and set "initial" state
useEffect(() => {
if (largeBreak === false) {
const setNavFromPreferences = async () => {
const preferredState = await getNavPreference(getPreference);
setNavOpen(preferredState);
};
void setNavFromPreferences();
}
}, [largeBreak, getPreference, setNavOpen]);
// on smaller screens where the nav is a modal
// close the nav when the user navigates away
useEffect(() => {
if (smallBreak === true) {
setNavOpen(false);
}
}, [pathname]);
// on open and close, lock the body scroll
// do not do this on desktop, the sidebar is not a modal
useEffect(() => {
if (navRef.current) {
if (navOpen && midBreak) {
navRef.current.style.overscrollBehavior = 'contain';
} else {
navRef.current.style.overscrollBehavior = 'auto';
}
}
}, [navOpen, midBreak]);
// on smaller screens where the nav is a modal
// close the nav when the user resizes down to mobile
// the sidebar is a modal on mobile
useEffect(() => {
if (largeBreak === true || midBreak === true || smallBreak === true) {
setNavOpen(false);
}
setHydrated(true);
const timeout = setTimeout(() => {
setShouldAnimate(true);
}, 100);
return () => {
clearTimeout(timeout);
};
}, [largeBreak, midBreak, smallBreak]);
// when the component unmounts, clear all body scroll locks
useEffect(() => {
return () => {
if (navRef.current) {
navRef.current.style.overscrollBehavior = 'auto';
}
};
}, []);
return /*#__PURE__*/_jsx(NavContext, {
value: {
hydrated,
navOpen,
navRef,
setNavOpen,
shouldAnimate
},
children: children
});
};
//# sourceMappingURL=context.js.map

View File

@@ -0,0 +1,8 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
// This is a magic string replaced by rollup
const SDK_VERSION = "10.39.0" ;
exports.SDK_VERSION = SDK_VERSION;
//# sourceMappingURL=version.js.map

View File

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

View File

@@ -0,0 +1,9 @@
import arrayLikeToArray from "./arrayLikeToArray.js";
function _unsupportedIterableToArray(r, a) {
if (r) {
if ("string" == typeof r) return arrayLikeToArray(r, a);
var t = {}.toString.call(r).slice(8, -1);
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? arrayLikeToArray(r, a) : void 0;
}
}
export { _unsupportedIterableToArray as default };

View File

@@ -0,0 +1,68 @@
"use strict";
exports.formatRelative = void 0;
var _index = require("../../../isSameWeek.cjs");
const adjectivesLastWeek = {
masculine: "ostatni",
feminine: "ostatnia",
};
const adjectivesThisWeek = {
masculine: "ten",
feminine: "ta",
};
const adjectivesNextWeek = {
masculine: "następny",
feminine: "następna",
};
const dayGrammaticalGender = {
0: "feminine",
1: "masculine",
2: "masculine",
3: "feminine",
4: "masculine",
5: "masculine",
6: "feminine",
};
function dayAndTimeWithAdjective(token, date, baseDate, options) {
let adjectives;
if ((0, _index.isSameWeek)(date, baseDate, options)) {
adjectives = adjectivesThisWeek;
} else if (token === "lastWeek") {
adjectives = adjectivesLastWeek;
} else if (token === "nextWeek") {
adjectives = adjectivesNextWeek;
} else {
throw new Error(`Cannot determine adjectives for token ${token}`);
}
const day = date.getDay();
const grammaticalGender = dayGrammaticalGender[day];
const adjective = adjectives[grammaticalGender];
return `'${adjective}' eeee 'o' p`;
}
const formatRelativeLocale = {
lastWeek: dayAndTimeWithAdjective,
yesterday: "'wczoraj o' p",
today: "'dzisiaj o' p",
tomorrow: "'jutro o' p",
nextWeek: dayAndTimeWithAdjective,
other: "P",
};
const formatRelative = (token, date, baseDate, options) => {
const format = formatRelativeLocale[token];
if (typeof format === "function") {
return format(token, date, baseDate, options);
}
return format;
};
exports.formatRelative = formatRelative;

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/gel-core/columns/date.common.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnDataType } from '~/column-builder.ts';\nimport { entityKind } from '~/entity.ts';\nimport { sql } from '~/sql/sql.ts';\nimport { GelColumnBuilder } from './common.ts';\n\nexport abstract class GelLocalDateColumnBaseBuilder<\n\tT extends ColumnBuilderBaseConfig<ColumnDataType, string>,\n\tTRuntimeConfig extends object = object,\n> extends GelColumnBuilder<T, TRuntimeConfig> {\n\tstatic override readonly [entityKind]: string = 'GelLocalDateColumnBaseBuilder';\n\n\tdefaultNow() {\n\t\treturn this.default(sql`now()`);\n\t}\n}\n"],"mappings":"AACA,SAAS,kBAAkB;AAC3B,SAAS,WAAW;AACpB,SAAS,wBAAwB;AAE1B,MAAe,sCAGZ,iBAAoC;AAAA,EAC7C,QAA0B,UAAU,IAAY;AAAA,EAEhD,aAAa;AACZ,WAAO,KAAK,QAAQ,UAAU;AAAA,EAC/B;AACD;","names":[]}

View File

@@ -0,0 +1,99 @@
/* eslint-disable no-console */ import nodemailer from 'nodemailer';
import { InvalidConfiguration } from 'payload';
/**
* Creates an email adapter using nodemailer
*
* If no email configuration is provided, an ethereal email test account is returned
*/ export const nodemailerAdapter = async (args)=>{
const { defaultFromAddress, defaultFromName, transport } = await buildEmail(args);
const adapter = ()=>({
name: 'nodemailer',
defaultFromAddress,
defaultFromName,
sendEmail: async (message)=>{
return await transport.sendMail({
from: `${defaultFromName} <${defaultFromAddress}>`,
...message
});
}
});
return adapter;
};
async function buildEmail(emailConfig) {
if (!emailConfig) {
const transport = await createMockAccount(emailConfig);
if (!transport) {
throw new InvalidConfiguration('Unable to create Nodemailer test account.');
}
return {
defaultFromAddress: 'info@payloadcms.com',
defaultFromName: 'Payload',
transport
};
}
// Create or extract transport
let transport;
if ('transport' in emailConfig && emailConfig.transport) {
;
({ transport } = emailConfig);
} else if ('transportOptions' in emailConfig && emailConfig.transportOptions) {
transport = nodemailer.createTransport(emailConfig.transportOptions);
} else {
transport = await createMockAccount(emailConfig);
}
if (!emailConfig.skipVerify) {
await verifyTransport(transport);
}
return {
defaultFromAddress: emailConfig.defaultFromAddress,
defaultFromName: emailConfig.defaultFromName,
transport
};
}
async function verifyTransport(transport) {
try {
await transport.verify();
} catch (err) {
console.error({
err,
msg: 'Error verifying Nodemailer transport.'
});
}
}
/**
* Use ethereal.email to create a mock email account
*/ async function createMockAccount(emailConfig) {
try {
const etherealAccount = await nodemailer.createTestAccount();
const smtpOptions = {
...emailConfig || {},
auth: {
pass: etherealAccount.pass,
user: etherealAccount.user
},
fromAddress: emailConfig?.defaultFromAddress,
fromName: emailConfig?.defaultFromName,
host: 'smtp.ethereal.email',
port: 587,
secure: false
};
const transport = nodemailer.createTransport(smtpOptions);
const { pass, user, web } = etherealAccount;
console.info('E-mail configured with ethereal.email test account. ');
console.info(`Log into mock email provider at ${web}`);
console.info(`Mock email account username: ${user}`);
console.info(`Mock email account password: ${pass}`);
return transport;
} catch (err) {
if (err instanceof Error) {
console.error({
err,
msg: 'There was a problem setting up the mock email handler'
});
throw new InvalidConfiguration(`Unable to create Nodemailer test account. Error: ${err.message}`);
}
throw new InvalidConfiguration('Unable to create Nodemailer test account.');
}
}
//# sourceMappingURL=index.js.map

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"font-style.js","sourceRoot":"","sources":["../../../../src/css/property-descriptors/font-style.ts"],"names":[],"mappings":";;;AAQa,QAAA,SAAS,GAA8C;IAChE,IAAI,EAAE,YAAY;IAClB,YAAY,EAAE,QAAQ;IACtB,MAAM,EAAE,KAAK;IACb,IAAI,qBAA2C;IAC/C,KAAK,EAAE,UAAC,QAAiB,EAAE,QAAgB;QACvC,QAAQ,QAAQ,EAAE;YACd,KAAK,SAAS;gBACV,+BAA0B;YAC9B,KAAK,QAAQ;gBACT,6BAAyB;YAC7B,KAAK,QAAQ,CAAC;YACd;gBACI,6BAAyB;SAChC;IACL,CAAC;CACJ,CAAC"}

View File

@@ -0,0 +1,60 @@
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.InMemorySpanExporter = void 0;
const core_1 = require("@opentelemetry/core");
/**
* This class can be used for testing purposes. It stores the exported spans
* in a list in memory that can be retrieved using the `getFinishedSpans()`
* method.
*/
class InMemorySpanExporter {
_finishedSpans = [];
/**
* Indicates if the exporter has been "shutdown."
* When false, exported spans will not be stored in-memory.
*/
_stopped = false;
export(spans, resultCallback) {
if (this._stopped)
return resultCallback({
code: core_1.ExportResultCode.FAILED,
error: new Error('Exporter has been stopped'),
});
this._finishedSpans.push(...spans);
setTimeout(() => resultCallback({ code: core_1.ExportResultCode.SUCCESS }), 0);
}
shutdown() {
this._stopped = true;
this._finishedSpans = [];
return this.forceFlush();
}
/**
* Exports any pending spans in the exporter
*/
forceFlush() {
return Promise.resolve();
}
reset() {
this._finishedSpans = [];
}
getFinishedSpans() {
return this._finishedSpans;
}
}
exports.InMemorySpanExporter = InMemorySpanExporter;
//# sourceMappingURL=InMemorySpanExporter.js.map

View File

@@ -0,0 +1,36 @@
"use strict";
exports.previousDay = previousDay;
var _index = require("./getDay.js");
var _index2 = require("./subDays.js");
/**
* @name previousDay
* @category Weekday Helpers
* @summary When is the previous day of the week?
*
* @description
* When is the previous day of the week? 0-6 the day of the week, 0 represents Sunday.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param date - The date to check
* @param day - The day of the week
*
* @returns The date is the previous day of week
*
* @example
* // When is the previous Monday before Mar, 20, 2020?
* const result = previousDay(new Date(2020, 2, 20), 1)
* //=> Mon Mar 16 2020 00:00:00
*
* @example
* // When is the previous Tuesday before Mar, 21, 2020?
* const result = previousDay(new Date(2020, 2, 21), 2)
* //=> Tue Mar 17 2020 00:00:00
*/
function previousDay(date, day) {
let delta = (0, _index.getDay)(date) - day;
if (delta <= 0) delta += 7;
return (0, _index2.subDays)(date, delta);
}

View File

@@ -0,0 +1,65 @@
import type { FetchAPIFileUploadOptions } from '../../config/types.js';
/**
* Logs message to console if options.debug option set to true.
*/
export declare const debugLog: (options: FetchAPIFileUploadOptions, msg: string) => boolean;
/**
* Generates unique temporary file name. e.g. tmp-5000-156788789789.
*/
export declare const getTempFilename: (prefix?: string) => string;
type FuncType = (...args: any[]) => any;
export declare const isFunc: (value: any) => value is FuncType;
/**
* Return a callback function for promise resole/reject args.
* Ensures that callback is called only once.
*/
type PromiseCallback = (resolve: () => void, reject: (err: Error) => void) => (err: Error) => void;
export declare const promiseCallback: PromiseCallback;
/**
* Determines whether a key insertion into an object could result in a prototype pollution
*/
type IsSafeFromPollution = (base: any, key: string) => boolean;
export declare const isSafeFromPollution: IsSafeFromPollution;
/**
* Build request field/file objects to return
*/
type BuildFields = (instance: any, field: string, value: any) => any;
export declare const buildFields: BuildFields;
/**
* Creates a folder if it does not exist
* for file specified in the path variable
*/
type CheckAndMakeDir = (fileUploadOptions: FetchAPIFileUploadOptions, filePath: string) => boolean;
export declare const checkAndMakeDir: CheckAndMakeDir;
/**
* Delete a file.
*/
type DeleteFile = (filePath: string, callback: (args: any) => void) => void;
export declare const deleteFile: DeleteFile;
/**
* moveFile: moves the file from src to dst.
* Firstly trying to rename the file if no luck copying it to dst and then deleting src.
*/
type MoveFile = (src: string, dst: string, callback: (err: Error, renamed?: boolean) => void) => void;
export declare const moveFile: MoveFile;
/**
* Save buffer data to a file.
* @param {Buffer} buffer - buffer to save to a file.
* @param {string} filePath - path to a file.
*/
export declare const saveBufferToFile: (buffer: Buffer, filePath: string, callback: (err?: Error) => void) => void;
/**
* Parses filename and extension and returns object {name, extension}.
*/
type ParseFileNameExtension = (preserveExtension: boolean | number, fileName: string) => {
extension: string;
name: string;
};
export declare const parseFileNameExtension: ParseFileNameExtension;
/**
* Parse file name and extension.
*/
type ParseFileName = (opts: FetchAPIFileUploadOptions, fileName: string) => string;
export declare const parseFileName: ParseFileName;
export {};
//# sourceMappingURL=utilities.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"timer.js","sources":["../../../src/utils/timer.ts"],"sourcesContent":["/**\n * Calls `unref` on a timer, if the method is available on @param timer.\n *\n * `unref()` is used to allow processes to exit immediately, even if the timer\n * is still running and hasn't resolved yet.\n *\n * Use this in places where code can run on browser or server, since browsers\n * do not support `unref`.\n */\nexport function safeUnref(timer: ReturnType<typeof setTimeout>): ReturnType<typeof setTimeout> {\n if (typeof timer === 'object' && typeof timer.unref === 'function') {\n timer.unref();\n }\n return timer;\n}\n"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,SAAS,CAAC,KAAK,EAAgE;AAC/F,EAAE,IAAI,OAAO,KAAA,KAAU,QAAA,IAAY,OAAO,KAAK,CAAC,KAAA,KAAU,UAAU,EAAE;AACtE,IAAI,KAAK,CAAC,KAAK,EAAE;AACjB,EAAE;AACF,EAAE,OAAO,KAAK;AACd;;;;"}

View File

@@ -0,0 +1,26 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TraceFlags = void 0;
/*
* 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.
*/
var TraceFlags;
(function (TraceFlags) {
/** Represents no flag set. */
TraceFlags[TraceFlags["NONE"] = 0] = "NONE";
/** Bit to represent whether trace is sampled in trace flags. */
TraceFlags[TraceFlags["SAMPLED"] = 1] = "SAMPLED";
})(TraceFlags = exports.TraceFlags || (exports.TraceFlags = {}));
//# sourceMappingURL=trace_flags.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fields/Checkbox/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,wBAAwB,EACxB,uBAAuB,EACxB,MAAM,SAAS,CAAA;AAGhB,OAAO,KAA+B,MAAM,OAAO,CAAA;AAEnD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAapD,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAC1C,OAAO,cAAc,CAAA;AAIrB,OAAO,EAAE,wBAAwB,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,CAAA;AA4G3E,eAAO,MAAM,aAAa;;;;;;;;;;+EAAwC,CAAA"}

View File

@@ -0,0 +1,17 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const MoveVertical = createLucideIcon("MoveVertical", [
["polyline", { points: "8 18 12 22 16 18", key: "1uutw3" }],
["polyline", { points: "8 6 12 2 16 6", key: "d60sxy" }],
["line", { x1: "12", x2: "12", y1: "2", y2: "22", key: "7eqyqh" }]
]);
export { MoveVertical as default };
//# sourceMappingURL=move-vertical.js.map

View File

@@ -0,0 +1,62 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const errors_js_1 = require("../util/errors.js");
exports.default = {
/**
* The order that this parser will run, in relation to other parsers.
*/
order: 100,
/**
* Whether to allow "empty" files. This includes zero-byte files, as well as empty JSON objects.
*/
allowEmpty: true,
/**
* Determines whether this parser can parse a given file reference.
* Parsers that match will be tried, in order, until one successfully parses the file.
* Parsers that don't match will be skipped, UNLESS none of the parsers match, in which case
* every parser will be tried.
*/
canParse: ".json",
/**
* Allow JSON files with byte order marks (BOM)
*/
allowBOM: true,
/**
* Parses the given file as JSON
*/
async parse(file) {
let data = file.data;
if (Buffer.isBuffer(data)) {
data = data.toString();
}
if (typeof data === "string") {
if (data.trim().length === 0) {
return; // This mirrors the YAML behavior
}
else {
try {
return JSON.parse(data);
}
catch (e) {
if (this.allowBOM) {
try {
// find the first curly brace
const firstCurlyBrace = data.indexOf("{");
// remove any characters before the first curly brace
data = data.slice(firstCurlyBrace);
return JSON.parse(data);
}
catch (e) {
throw new errors_js_1.ParserError(e.message, file.url);
}
}
throw new errors_js_1.ParserError(e.message, file.url);
}
}
}
else {
// data is already a JavaScript value (object, array, number, null, NaN, etc.)
return data;
}
},
};

View File

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

View File

@@ -0,0 +1,154 @@
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.METRIC_MESSAGING_PROCESS_DURATION = exports.METRIC_MESSAGING_CLIENT_SENT_MESSAGES = exports.METRIC_MESSAGING_CLIENT_OPERATION_DURATION = exports.METRIC_MESSAGING_CLIENT_CONSUMED_MESSAGES = exports.MESSAGING_SYSTEM_VALUE_KAFKA = exports.MESSAGING_OPERATION_TYPE_VALUE_SEND = exports.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE = exports.MESSAGING_OPERATION_TYPE_VALUE_PROCESS = exports.ATTR_MESSAGING_SYSTEM = exports.ATTR_MESSAGING_OPERATION_TYPE = exports.ATTR_MESSAGING_OPERATION_NAME = exports.ATTR_MESSAGING_KAFKA_OFFSET = exports.ATTR_MESSAGING_KAFKA_MESSAGE_TOMBSTONE = exports.ATTR_MESSAGING_KAFKA_MESSAGE_KEY = exports.ATTR_MESSAGING_DESTINATION_PARTITION_ID = exports.ATTR_MESSAGING_DESTINATION_NAME = exports.ATTR_MESSAGING_BATCH_MESSAGE_COUNT = void 0;
/*
* This file contains a copy of unstable semantic convention definitions
* used by this package.
* @see https://github.com/open-telemetry/opentelemetry-js/tree/main/semantic-conventions#unstable-semconv
*/
/**
* The number of messages sent, received, or processed in the scope of the batching operation.
*
* @example 0
* @example 1
* @example 2
*
* @note Instrumentations **SHOULD NOT** set `messaging.batch.message_count` on spans that operate with a single message. When a messaging client library supports both batch and single-message API for the same operation, instrumentations **SHOULD** use `messaging.batch.message_count` for batching APIs and **SHOULD NOT** use it for single-message APIs.
*
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*/
exports.ATTR_MESSAGING_BATCH_MESSAGE_COUNT = 'messaging.batch.message_count';
/**
* The message destination name
*
* @example MyQueue
* @example MyTopic
*
* @note Destination name **SHOULD** uniquely identify a specific queue, topic or other entity within the broker. If
* the broker doesn't have such notion, the destination name **SHOULD** uniquely identify the broker.
*
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*/
exports.ATTR_MESSAGING_DESTINATION_NAME = 'messaging.destination.name';
/**
* The identifier of the partition messages are sent to or received from, unique within the `messaging.destination.name`.
*
* @example "1"
*
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*/
exports.ATTR_MESSAGING_DESTINATION_PARTITION_ID = 'messaging.destination.partition.id';
/**
* Message keys in Kafka are used for grouping alike messages to ensure they're processed on the same partition. They differ from `messaging.message.id` in that they're not unique. If the key is `null`, the attribute **MUST NOT** be set.
*
* @example "myKey"
*
* @note If the key type is not string, it's string representation has to be supplied for the attribute. If the key has no unambiguous, canonical string form, don't include its value.
*
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*/
exports.ATTR_MESSAGING_KAFKA_MESSAGE_KEY = 'messaging.kafka.message.key';
/**
* A boolean that is true if the message is a tombstone.
*
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*/
exports.ATTR_MESSAGING_KAFKA_MESSAGE_TOMBSTONE = 'messaging.kafka.message.tombstone';
/**
* The offset of a record in the corresponding Kafka partition.
*
* @example 42
*
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*/
exports.ATTR_MESSAGING_KAFKA_OFFSET = 'messaging.kafka.offset';
/**
* The system-specific name of the messaging operation.
*
* @example ack
* @example nack
* @example send
*
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*/
exports.ATTR_MESSAGING_OPERATION_NAME = 'messaging.operation.name';
/**
* A string identifying the type of the messaging operation.
*
* @note If a custom value is used, it **MUST** be of low cardinality.
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*/
exports.ATTR_MESSAGING_OPERATION_TYPE = 'messaging.operation.type';
/**
* The messaging system as identified by the client instrumentation.
*
* @note The actual messaging system may differ from the one known by the client. For example, when using Kafka client libraries to communicate with Azure Event Hubs, the `messaging.system` is set to `kafka` based on the instrumentation's best knowledge.
*
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*/
exports.ATTR_MESSAGING_SYSTEM = 'messaging.system';
/**
* Enum value "process" for attribute {@link ATTR_MESSAGING_OPERATION_TYPE}.
*/
exports.MESSAGING_OPERATION_TYPE_VALUE_PROCESS = 'process';
/**
* Enum value "receive" for attribute {@link ATTR_MESSAGING_OPERATION_TYPE}.
*/
exports.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE = 'receive';
/**
* Enum value "send" for attribute {@link ATTR_MESSAGING_OPERATION_TYPE}.
*/
exports.MESSAGING_OPERATION_TYPE_VALUE_SEND = 'send';
/**
* Enum value "kafka" for attribute {@link ATTR_MESSAGING_SYSTEM}.
*/
exports.MESSAGING_SYSTEM_VALUE_KAFKA = 'kafka';
/**
* Number of messages that were delivered to the application.
*
* @note Records the number of messages pulled from the broker or number of messages dispatched to the application in push-based scenarios.
* The metric **SHOULD** be reported once per message delivery. For example, if receiving and processing operations are both instrumented for a single message delivery, this counter is incremented when the message is received and not reported when it is processed.
*
* @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*/
exports.METRIC_MESSAGING_CLIENT_CONSUMED_MESSAGES = 'messaging.client.consumed.messages';
/**
* Duration of messaging operation initiated by a producer or consumer client.
*
* @note This metric **SHOULD NOT** be used to report processing duration - processing duration is reported in `messaging.process.duration` metric.
*
* @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*/
exports.METRIC_MESSAGING_CLIENT_OPERATION_DURATION = 'messaging.client.operation.duration';
/**
* Number of messages producer attempted to send to the broker.
*
* @note This metric **MUST NOT** count messages that were created but haven't yet been sent.
*
* @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*/
exports.METRIC_MESSAGING_CLIENT_SENT_MESSAGES = 'messaging.client.sent.messages';
/**
* Duration of processing operation.
*
* @note This metric **MUST** be reported for operations with `messaging.operation.type` that matches `process`.
*
* @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*/
exports.METRIC_MESSAGING_PROCESS_DURATION = 'messaging.process.duration';
//# sourceMappingURL=semconv.js.map

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"switch-camera.js","sources":["../../../src/icons/switch-camera.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name SwitchCamera\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTEgMTlINGEyIDIgMCAwIDEtMi0yVjdhMiAyIDAgMCAxIDItMmg1IiAvPgogIDxwYXRoIGQ9Ik0xMyA1aDdhMiAyIDAgMCAxIDIgMnYxMGEyIDIgMCAwIDEtMiAyaC01IiAvPgogIDxjaXJjbGUgY3g9IjEyIiBjeT0iMTIiIHI9IjMiIC8+CiAgPHBhdGggZD0ibTE4IDIyLTMtMyAzLTMiIC8+CiAgPHBhdGggZD0ibTYgMiAzIDMtMyAzIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/switch-camera\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 SwitchCamera = createLucideIcon('SwitchCamera', [\n ['path', { d: 'M11 19H4a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h5', key: 'mtk2lu' }],\n ['path', { d: 'M13 5h7a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-5', key: '120jsl' }],\n ['circle', { cx: '12', cy: '12', r: '3', key: '1v7zrd' }],\n ['path', { d: 'm18 22-3-3 3-3', key: 'kgdoj7' }],\n ['path', { d: 'm6 2 3 3-3 3', key: '1fnbkv' }],\n]);\n\nexport default SwitchCamera;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAe,iBAAiB,cAAgB,CAAA,CAAA,CAAA;AAAA,CAAA,CACpD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA4C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CACzE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA6C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAC1E,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAkB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC/C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAgB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC/C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"phone-forwarded.js","sources":["../../../src/icons/phone-forwarded.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name PhoneForwarded\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cG9seWxpbmUgcG9pbnRzPSIxOCAyIDIyIDYgMTggMTAiIC8+CiAgPGxpbmUgeDE9IjE0IiB4Mj0iMjIiIHkxPSI2IiB5Mj0iNiIgLz4KICA8cGF0aCBkPSJNMjIgMTYuOTJ2M2EyIDIgMCAwIDEtMi4xOCAyIDE5Ljc5IDE5Ljc5IDAgMCAxLTguNjMtMy4wNyAxOS41IDE5LjUgMCAwIDEtNi02IDE5Ljc5IDE5Ljc5IDAgMCAxLTMuMDctOC42N0EyIDIgMCAwIDEgNC4xMSAyaDNhMiAyIDAgMCAxIDIgMS43MiAxMi44NCAxMi44NCAwIDAgMCAuNyAyLjgxIDIgMiAwIDAgMS0uNDUgMi4xMUw4LjA5IDkuOTFhMTYgMTYgMCAwIDAgNiA2bDEuMjctMS4yN2EyIDIgMCAwIDEgMi4xMS0uNDUgMTIuODQgMTIuODQgMCAwIDAgMi44MS43QTIgMiAwIDAgMSAyMiAxNi45MnoiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/phone-forwarded\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 PhoneForwarded = createLucideIcon('PhoneForwarded', [\n ['polyline', { points: '18 2 22 6 18 10', key: '6vjanh' }],\n ['line', { x1: '14', x2: '22', y1: '6', y2: '6', key: '1jsywh' }],\n [\n 'path',\n {\n d: 'M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z',\n key: 'foiqr5',\n },\n ],\n]);\n\nexport default PhoneForwarded;\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,CAAmB,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,CACzD,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,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA;AACF,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,66 @@
Prism.languages.haskell = {
'comment': {
pattern: /(^|[^-!#$%*+=?&@|~.:<>^\\\/])(?:--(?:(?=.)[^-!#$%*+=?&@|~.:<>^\\\/].*|$)|\{-[\s\S]*?-\})/m,
lookbehind: true
},
'char': {
pattern: /'(?:[^\\']|\\(?:[abfnrtv\\"'&]|\^[A-Z@[\]^_]|ACK|BEL|BS|CAN|CR|DC1|DC2|DC3|DC4|DEL|DLE|EM|ENQ|EOT|ESC|ETB|ETX|FF|FS|GS|HT|LF|NAK|NUL|RS|SI|SO|SOH|SP|STX|SUB|SYN|US|VT|\d+|o[0-7]+|x[0-9a-fA-F]+))'/,
alias: 'string'
},
'string': {
pattern: /"(?:[^\\"]|\\(?:\S|\s+\\))*"/,
greedy: true
},
'keyword': /\b(?:case|class|data|deriving|do|else|if|in|infixl|infixr|instance|let|module|newtype|of|primitive|then|type|where)\b/,
'import-statement': {
// The imported or hidden names are not included in this import
// statement. This is because we want to highlight those exactly like
// we do for the names in the program.
pattern: /(^[\t ]*)import\s+(?:qualified\s+)?(?:[A-Z][\w']*)(?:\.[A-Z][\w']*)*(?:\s+as\s+(?:[A-Z][\w']*)(?:\.[A-Z][\w']*)*)?(?:\s+hiding\b)?/m,
lookbehind: true,
inside: {
'keyword': /\b(?:as|hiding|import|qualified)\b/,
'punctuation': /\./
}
},
// These are builtin variables only. Constructors are highlighted later as a constant.
'builtin': /\b(?:abs|acos|acosh|all|and|any|appendFile|approxRational|asTypeOf|asin|asinh|atan|atan2|atanh|basicIORun|break|catch|ceiling|chr|compare|concat|concatMap|const|cos|cosh|curry|cycle|decodeFloat|denominator|digitToInt|div|divMod|drop|dropWhile|either|elem|encodeFloat|enumFrom|enumFromThen|enumFromThenTo|enumFromTo|error|even|exp|exponent|fail|filter|flip|floatDigits|floatRadix|floatRange|floor|fmap|foldl|foldl1|foldr|foldr1|fromDouble|fromEnum|fromInt|fromInteger|fromIntegral|fromRational|fst|gcd|getChar|getContents|getLine|group|head|id|inRange|index|init|intToDigit|interact|ioError|isAlpha|isAlphaNum|isAscii|isControl|isDenormalized|isDigit|isHexDigit|isIEEE|isInfinite|isLower|isNaN|isNegativeZero|isOctDigit|isPrint|isSpace|isUpper|iterate|last|lcm|length|lex|lexDigits|lexLitChar|lines|log|logBase|lookup|map|mapM|mapM_|max|maxBound|maximum|maybe|min|minBound|minimum|mod|negate|not|notElem|null|numerator|odd|or|ord|otherwise|pack|pi|pred|primExitWith|print|product|properFraction|putChar|putStr|putStrLn|quot|quotRem|range|rangeSize|read|readDec|readFile|readFloat|readHex|readIO|readInt|readList|readLitChar|readLn|readOct|readParen|readSigned|reads|readsPrec|realToFrac|recip|rem|repeat|replicate|return|reverse|round|scaleFloat|scanl|scanl1|scanr|scanr1|seq|sequence|sequence_|show|showChar|showInt|showList|showLitChar|showParen|showSigned|showString|shows|showsPrec|significand|signum|sin|sinh|snd|sort|span|splitAt|sqrt|subtract|succ|sum|tail|take|takeWhile|tan|tanh|threadToIOResult|toEnum|toInt|toInteger|toLower|toRational|toUpper|truncate|uncurry|undefined|unlines|until|unwords|unzip|unzip3|userError|words|writeFile|zip|zip3|zipWith|zipWith3)\b/,
// decimal integers and floating point numbers | octal integers | hexadecimal integers
'number': /\b(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?|0o[0-7]+|0x[0-9a-f]+)\b/i,
'operator': [
{
// infix operator
pattern: /`(?:[A-Z][\w']*\.)*[_a-z][\w']*`/,
greedy: true
},
{
// function composition
pattern: /(\s)\.(?=\s)/,
lookbehind: true
},
// Most of this is needed because of the meaning of a single '.'.
// If it stands alone freely, it is the function composition.
// It may also be a separator between a module name and an identifier => no
// operator. If it comes together with other special characters it is an
// operator too.
//
// This regex means: /[-!#$%*+=?&@|~.:<>^\\\/]+/ without /\./.
/[-!#$%*+=?&@|~:<>^\\\/][-!#$%*+=?&@|~.:<>^\\\/]*|\.[-!#$%*+=?&@|~.:<>^\\\/]+/,
],
// In Haskell, nearly everything is a variable, do not highlight these.
'hvariable': {
pattern: /\b(?:[A-Z][\w']*\.)*[_a-z][\w']*/,
inside: {
'punctuation': /\./
}
},
'constant': {
pattern: /\b(?:[A-Z][\w']*\.)*[A-Z][\w']*/,
inside: {
'punctuation': /\./
}
},
'punctuation': /[{}[\];(),.:]/
};
Prism.languages.hs = Prism.languages.haskell;

View File

@@ -0,0 +1 @@
{"version":3,"file":"promise.d.ts","sourceRoot":"","sources":["../../../../src/fields/hooks/beforeValidate/promise.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,yBAAyB,EAAc,MAAM,sCAAsC,CAAA;AACjG,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAA;AAC7E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACvD,OAAO,KAAK,EAAE,UAAU,EAAa,cAAc,EAAE,MAAM,yBAAyB,CAAA;AACpF,OAAO,KAAK,EAAS,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AASrE,KAAK,IAAI,CAAC,CAAC,IAAI;IACb;;OAEG;IACH,SAAS,CAAC,EAAE,UAAU,CAAA;IACtB,UAAU,EAAE,IAAI,GAAG,yBAAyB,CAAA;IAC5C,OAAO,EAAE,cAAc,CAAA;IACvB,IAAI,EAAE,CAAC,CAAA;IACP;;OAEG;IACH,GAAG,EAAE,CAAC,CAAA;IACN,KAAK,EAAE,KAAK,GAAG,UAAU,CAAA;IACzB,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,IAAI,GAAG,qBAAqB,CAAA;IACpC,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACpB,SAAS,EAAE,QAAQ,GAAG,QAAQ,CAAA;IAC9B,cAAc,EAAE,OAAO,CAAA;IACvB,eAAe,EAAE,MAAM,CAAA;IACvB,iBAAiB,EAAE,OAAO,CAAA;IAC1B,UAAU,EAAE,MAAM,CAAA;IAClB,gBAAgB,EAAE,MAAM,CAAA;IACxB,GAAG,EAAE,cAAc,CAAA;IACnB,WAAW,EAAE,UAAU,CAAA;IACvB;;OAEG;IACH,UAAU,EAAE,UAAU,CAAA;IACtB,aAAa,CAAC,EAAE,CAAC,KAAK,GAAG,UAAU,CAAC,EAAE,CAAA;CACvC,CAAA;AASD,eAAO,MAAM,OAAO,GAAU,CAAC,2NAoB5B,IAAI,CAAC,CAAC,CAAC,KAAG,OAAO,CAAC,IAAI,CA0hBxB,CAAA"}

View File

@@ -0,0 +1,353 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const index = require('../asyncContext/index.js');
const carrier = require('../carrier.js');
const currentScopes = require('../currentScopes.js');
const semanticAttributes = require('../semanticAttributes.js');
const spanstatus = require('../tracing/spanstatus.js');
const utils = require('../tracing/utils.js');
const object = require('./object.js');
const propagationContext = require('./propagationContext.js');
const time = require('./time.js');
const tracing = require('./tracing.js');
const debugLogger = require('./debug-logger.js');
const spanOnScope = require('./spanOnScope.js');
// These are aligned with OpenTelemetry trace flags
const TRACE_FLAG_NONE = 0x0;
const TRACE_FLAG_SAMPLED = 0x1;
let hasShownSpanDropWarning = false;
/**
* Convert a span to a trace context, which can be sent as the `trace` context in an event.
* By default, this will only include trace_id, span_id & parent_span_id.
* If `includeAllData` is true, it will also include data, op, status & origin.
*/
function spanToTransactionTraceContext(span) {
const { spanId: span_id, traceId: trace_id } = span.spanContext();
const { data, op, parent_span_id, status, origin, links } = spanToJSON(span);
return {
parent_span_id,
span_id,
trace_id,
data,
op,
status,
origin,
links,
};
}
/**
* Convert a span to a trace context, which can be sent as the `trace` context in a non-transaction event.
*/
function spanToTraceContext(span) {
const { spanId, traceId: trace_id, isRemote } = span.spanContext();
// If the span is remote, we use a random/virtual span as span_id to the trace context,
// and the remote span as parent_span_id
const parent_span_id = isRemote ? spanId : spanToJSON(span).parent_span_id;
const scope = utils.getCapturedScopesOnSpan(span).scope;
const span_id = isRemote ? scope?.getPropagationContext().propagationSpanId || propagationContext.generateSpanId() : spanId;
return {
parent_span_id,
span_id,
trace_id,
};
}
/**
* Convert a Span to a Sentry trace header.
*/
function spanToTraceHeader(span) {
const { traceId, spanId } = span.spanContext();
const sampled = spanIsSampled(span);
return tracing.generateSentryTraceHeader(traceId, spanId, sampled);
}
/**
* Convert a Span to a W3C traceparent header.
*/
function spanToTraceparentHeader(span) {
const { traceId, spanId } = span.spanContext();
const sampled = spanIsSampled(span);
return tracing.generateTraceparentHeader(traceId, spanId, sampled);
}
/**
* Converts the span links array to a flattened version to be sent within an envelope.
*
* If the links array is empty, it returns `undefined` so the empty value can be dropped before it's sent.
*/
function convertSpanLinksForEnvelope(links) {
if (links && links.length > 0) {
return links.map(({ context: { spanId, traceId, traceFlags, ...restContext }, attributes }) => ({
span_id: spanId,
trace_id: traceId,
sampled: traceFlags === TRACE_FLAG_SAMPLED,
attributes,
...restContext,
}));
} else {
return undefined;
}
}
/**
* Convert a span time input into a timestamp in seconds.
*/
function spanTimeInputToSeconds(input) {
if (typeof input === 'number') {
return ensureTimestampInSeconds(input);
}
if (Array.isArray(input)) {
// See {@link HrTime} for the array-based time format
return input[0] + input[1] / 1e9;
}
if (input instanceof Date) {
return ensureTimestampInSeconds(input.getTime());
}
return time.timestampInSeconds();
}
/**
* Converts a timestamp to second, if it was in milliseconds, or keeps it as second.
*/
function ensureTimestampInSeconds(timestamp) {
const isMs = timestamp > 9999999999;
return isMs ? timestamp / 1000 : timestamp;
}
/**
* Convert a span to a JSON representation.
*/
// Note: Because of this, we currently have a circular type dependency (which we opted out of in package.json).
// This is not avoidable as we need `spanToJSON` in `spanUtils.ts`, which in turn is needed by `span.ts` for backwards compatibility.
// And `spanToJSON` needs the Span class from `span.ts` to check here.
function spanToJSON(span) {
if (spanIsSentrySpan(span)) {
return span.getSpanJSON();
}
const { spanId: span_id, traceId: trace_id } = span.spanContext();
// Handle a span from @opentelemetry/sdk-base-trace's `Span` class
if (spanIsOpenTelemetrySdkTraceBaseSpan(span)) {
const { attributes, startTime, name, endTime, status, links } = span;
// In preparation for the next major of OpenTelemetry, we want to support
// looking up the parent span id according to the new API
// In OTel v1, the parent span id is accessed as `parentSpanId`
// In OTel v2, the parent span id is accessed as `spanId` on the `parentSpanContext`
const parentSpanId =
'parentSpanId' in span
? span.parentSpanId
: 'parentSpanContext' in span
? (span.parentSpanContext )?.spanId
: undefined;
return {
span_id,
trace_id,
data: attributes,
description: name,
parent_span_id: parentSpanId,
start_timestamp: spanTimeInputToSeconds(startTime),
// This is [0,0] by default in OTEL, in which case we want to interpret this as no end time
timestamp: spanTimeInputToSeconds(endTime) || undefined,
status: getStatusMessage(status),
op: attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_OP],
origin: attributes[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN] ,
links: convertSpanLinksForEnvelope(links),
};
}
// Finally, at least we have `spanContext()`....
// This should not actually happen in reality, but we need to handle it for type safety.
return {
span_id,
trace_id,
start_timestamp: 0,
data: {},
};
}
function spanIsOpenTelemetrySdkTraceBaseSpan(span) {
const castSpan = span ;
return !!castSpan.attributes && !!castSpan.startTime && !!castSpan.name && !!castSpan.endTime && !!castSpan.status;
}
/** Exported only for tests. */
/**
* Sadly, due to circular dependency checks we cannot actually import the Span class here and check for instanceof.
* :( So instead we approximate this by checking if it has the `getSpanJSON` method.
*/
function spanIsSentrySpan(span) {
return typeof (span ).getSpanJSON === 'function';
}
/**
* Returns true if a span is sampled.
* In most cases, you should just use `span.isRecording()` instead.
* However, this has a slightly different semantic, as it also returns false if the span is finished.
* So in the case where this distinction is important, use this method.
*/
function spanIsSampled(span) {
// We align our trace flags with the ones OpenTelemetry use
// So we also check for sampled the same way they do.
const { traceFlags } = span.spanContext();
return traceFlags === TRACE_FLAG_SAMPLED;
}
/** Get the status message to use for a JSON representation of a span. */
function getStatusMessage(status) {
if (!status || status.code === spanstatus.SPAN_STATUS_UNSET) {
return undefined;
}
if (status.code === spanstatus.SPAN_STATUS_OK) {
return 'ok';
}
return status.message || 'internal_error';
}
const CHILD_SPANS_FIELD = '_sentryChildSpans';
const ROOT_SPAN_FIELD = '_sentryRootSpan';
/**
* Adds an opaque child span reference to a span.
*/
function addChildSpanToSpan(span, childSpan) {
// We store the root span reference on the child span
// We need this for `getRootSpan()` to work
const rootSpan = span[ROOT_SPAN_FIELD] || span;
object.addNonEnumerableProperty(childSpan , ROOT_SPAN_FIELD, rootSpan);
// We store a list of child spans on the parent span
// We need this for `getSpanDescendants()` to work
if (span[CHILD_SPANS_FIELD]) {
span[CHILD_SPANS_FIELD].add(childSpan);
} else {
object.addNonEnumerableProperty(span, CHILD_SPANS_FIELD, new Set([childSpan]));
}
}
/** This is only used internally by Idle Spans. */
function removeChildSpanFromSpan(span, childSpan) {
if (span[CHILD_SPANS_FIELD]) {
span[CHILD_SPANS_FIELD].delete(childSpan);
}
}
/**
* Returns an array of the given span and all of its descendants.
*/
function getSpanDescendants(span) {
const resultSet = new Set();
function addSpanChildren(span) {
// This exit condition is required to not infinitely loop in case of a circular dependency.
if (resultSet.has(span)) {
return;
// We want to ignore unsampled spans (e.g. non recording spans)
} else if (spanIsSampled(span)) {
resultSet.add(span);
const childSpans = span[CHILD_SPANS_FIELD] ? Array.from(span[CHILD_SPANS_FIELD]) : [];
for (const childSpan of childSpans) {
addSpanChildren(childSpan);
}
}
}
addSpanChildren(span);
return Array.from(resultSet);
}
/**
* Returns the root span of a given span.
*/
function getRootSpan(span) {
return span[ROOT_SPAN_FIELD] || span;
}
/**
* Returns the currently active span.
*/
function getActiveSpan() {
const carrier$1 = carrier.getMainCarrier();
const acs = index.getAsyncContextStrategy(carrier$1);
if (acs.getActiveSpan) {
return acs.getActiveSpan();
}
return spanOnScope._getSpanForScope(currentScopes.getCurrentScope());
}
/**
* Logs a warning once if `beforeSendSpan` is used to drop spans.
*/
function showSpanDropWarning() {
if (!hasShownSpanDropWarning) {
debugLogger.consoleSandbox(() => {
// eslint-disable-next-line no-console
console.warn(
'[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.',
);
});
hasShownSpanDropWarning = true;
}
}
/**
* Updates the name of the given span and ensures that the span name is not
* overwritten by the Sentry SDK.
*
* Use this function instead of `span.updateName()` if you want to make sure that
* your name is kept. For some spans, for example root `http.server` spans the
* Sentry SDK would otherwise overwrite the span name with a high-quality name
* it infers when the span ends.
*
* Use this function in server code or when your span is started on the server
* and on the client (browser). If you only update a span name on the client,
* you can also use `span.updateName()` the SDK does not overwrite the name.
*
* @param span - The span to update the name of.
* @param name - The name to set on the span.
*/
function updateSpanName(span, name) {
span.updateName(name);
span.setAttributes({
[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'custom',
[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME]: name,
});
}
exports.TRACE_FLAG_NONE = TRACE_FLAG_NONE;
exports.TRACE_FLAG_SAMPLED = TRACE_FLAG_SAMPLED;
exports.addChildSpanToSpan = addChildSpanToSpan;
exports.convertSpanLinksForEnvelope = convertSpanLinksForEnvelope;
exports.getActiveSpan = getActiveSpan;
exports.getRootSpan = getRootSpan;
exports.getSpanDescendants = getSpanDescendants;
exports.getStatusMessage = getStatusMessage;
exports.removeChildSpanFromSpan = removeChildSpanFromSpan;
exports.showSpanDropWarning = showSpanDropWarning;
exports.spanIsSampled = spanIsSampled;
exports.spanTimeInputToSeconds = spanTimeInputToSeconds;
exports.spanToJSON = spanToJSON;
exports.spanToTraceContext = spanToTraceContext;
exports.spanToTraceHeader = spanToTraceHeader;
exports.spanToTraceparentHeader = spanToTraceparentHeader;
exports.spanToTransactionTraceContext = spanToTransactionTraceContext;
exports.updateSpanName = updateSpanName;
//# sourceMappingURL=spanUtils.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"apiKey.d.ts","sourceRoot":"","sources":["../../../src/auth/strategies/apiKey.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAA;AAGlF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAEvD,eAAO,MAAM,oBAAoB,qBACZ,yBAAyB,KAAG,oBAqE9C,CAAA"}

View File

@@ -0,0 +1,28 @@
// src/font.tsx
import { jsx } from "react/jsx-runtime";
var Font = ({
fontFamily,
fallbackFontFamily,
webFont,
fontStyle = "normal",
fontWeight = 400
}) => {
const src = webFont ? `src: url(${webFont.url}) format('${webFont.format}');` : "";
const style = `
@font-face {
font-family: '${fontFamily}';
font-style: ${fontStyle};
font-weight: ${fontWeight};
mso-font-alt: '${Array.isArray(fallbackFontFamily) ? fallbackFontFamily[0] : fallbackFontFamily}';
${src}
}
* {
font-family: '${fontFamily}', ${Array.isArray(fallbackFontFamily) ? fallbackFontFamily.join(", ") : fallbackFontFamily};
}
`;
return /* @__PURE__ */ jsx("style", { dangerouslySetInnerHTML: { __html: style } });
};
export {
Font
};

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,4 @@
function _classStaticPrivateMethodSet() {
throw new TypeError("attempted to set read only static private field");
}
export { _classStaticPrivateMethodSet as default };

View File

@@ -0,0 +1,55 @@
import { toDate } from "./toDate.mjs";
/**
* @name isWithinInterval
* @category Interval Helpers
* @summary Is the given date within the interval?
*
* @description
* Is the given date within the interval? (Including start and end.)
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param date - The date to check
* @param interval - The interval to check
*
* @returns The date is within the interval
*
* @example
* // For the date within the interval:
* isWithinInterval(new Date(2014, 0, 3), {
* start: new Date(2014, 0, 1),
* end: new Date(2014, 0, 7)
* })
* //=> true
*
* @example
* // For the date outside of the interval:
* isWithinInterval(new Date(2014, 0, 10), {
* start: new Date(2014, 0, 1),
* end: new Date(2014, 0, 7)
* })
* //=> false
*
* @example
* // For date equal to interval start:
* isWithinInterval(date, { start, end: date })
* // => true
*
* @example
* // For date equal to interval end:
* isWithinInterval(date, { start: date, end })
* // => true
*/
export function isWithinInterval(date, interval) {
const time = +toDate(date);
const [startTime, endTime] = [
+toDate(interval.start),
+toDate(interval.end),
].sort((a, b) => a - b);
return time >= startTime && time <= endTime;
}
// Fallback for modularized imports:
export default isWithinInterval;

View File

@@ -0,0 +1 @@
{"version":3,"file":"spotlight.js","sources":["../../../../../src/integrations/spotlight.ts"],"sourcesContent":["import type { Client, Envelope, Event, IntegrationFn } from '@sentry/core';\nimport { debug, defineIntegration, serializeEnvelope } from '@sentry/core';\nimport { getNativeImplementation } from '@sentry-internal/browser-utils';\nimport { DEBUG_BUILD } from '../debug-build';\nimport type { WINDOW } from '../helpers';\n\nexport type SpotlightConnectionOptions = {\n /**\n * Set this if the Spotlight Sidecar is not running on localhost:8969\n * By default, the Url is set to http://localhost:8969/stream\n */\n sidecarUrl?: string;\n};\n\nexport const INTEGRATION_NAME = 'SpotlightBrowser';\n\nconst _spotlightIntegration = ((options: Partial<SpotlightConnectionOptions> = {}) => {\n const sidecarUrl = options.sidecarUrl || 'http://localhost:8969/stream';\n\n return {\n name: INTEGRATION_NAME,\n setup: () => {\n DEBUG_BUILD && debug.log('Using Sidecar URL', sidecarUrl);\n },\n // We don't want to send interaction transactions/root spans created from\n // clicks within Spotlight to Sentry. Neither do we want them to be sent to\n // spotlight.\n processEvent: event => (isSpotlightInteraction(event) ? null : event),\n afterAllSetup: (client: Client) => {\n setupSidecarForwarding(client, sidecarUrl);\n },\n };\n}) satisfies IntegrationFn;\n\nfunction setupSidecarForwarding(client: Client, sidecarUrl: string): void {\n const makeFetch: typeof WINDOW.fetch | undefined = getNativeImplementation('fetch');\n let failCount = 0;\n\n client.on('beforeEnvelope', (envelope: Envelope) => {\n if (failCount > 3) {\n debug.warn('[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests:', failCount);\n return;\n }\n\n makeFetch(sidecarUrl, {\n method: 'POST',\n body: serializeEnvelope(envelope),\n headers: {\n 'Content-Type': 'application/x-sentry-envelope',\n },\n mode: 'cors',\n }).then(\n res => {\n if (res.status >= 200 && res.status < 400) {\n // Reset failed requests counter on success\n failCount = 0;\n }\n },\n err => {\n failCount++;\n debug.error(\n \"Sentry SDK can't connect to Sidecar is it running? See: https://spotlightjs.com/sidecar/npx/\",\n err,\n );\n },\n );\n });\n}\n\n/**\n * Use this integration to send errors and transactions to Spotlight.\n *\n * Learn more about spotlight at https://spotlightjs.com\n */\nexport const spotlightBrowserIntegration = defineIntegration(_spotlightIntegration);\n\n/**\n * Flags if the event is a transaction created from an interaction with the spotlight UI.\n */\nexport function isSpotlightInteraction(event: Event): boolean {\n return Boolean(\n event.type === 'transaction' &&\n event.spans &&\n event.contexts?.trace &&\n event.contexts.trace.op === 'ui.action.click' &&\n event.spans.some(({ description }) => description?.includes('#sentry-spotlight')),\n );\n}\n"],"names":["DEBUG_BUILD","debug","getNativeImplementation","serializeEnvelope","defineIntegration"],"mappings":";;;;;;AAcO,MAAM,gBAAA,GAAmB;;AAEhC,MAAM,qBAAA,IAAyB,CAAC,OAAO,GAAwC,EAAE,KAAK;AACtF,EAAE,MAAM,UAAA,GAAa,OAAO,CAAC,UAAA,IAAc,8BAA8B;;AAEzE,EAAE,OAAO;AACT,IAAI,IAAI,EAAE,gBAAgB;AAC1B,IAAI,KAAK,EAAE,MAAM;AACjB,MAAMA,sBAAA,IAAeC,UAAK,CAAC,GAAG,CAAC,mBAAmB,EAAE,UAAU,CAAC;AAC/D,IAAI,CAAC;AACL;AACA;AACA;AACA,IAAI,YAAY,EAAE,KAAA,KAAU,sBAAsB,CAAC,KAAK,CAAA,GAAI,IAAA,GAAO,KAAK,CAAC;AACzE,IAAI,aAAa,EAAE,CAAC,MAAM,KAAa;AACvC,MAAM,sBAAsB,CAAC,MAAM,EAAE,UAAU,CAAC;AAChD,IAAI,CAAC;AACL,GAAG;AACH,CAAC,CAAA;;AAED,SAAS,sBAAsB,CAAC,MAAM,EAAU,UAAU,EAAgB;AAC1E,EAAE,MAAM,SAAS,GAAoCC,oCAAuB,CAAC,OAAO,CAAC;AACrF,EAAE,IAAI,SAAA,GAAY,CAAC;;AAEnB,EAAE,MAAM,CAAC,EAAE,CAAC,gBAAgB,EAAE,CAAC,QAAQ,KAAe;AACtD,IAAI,IAAI,SAAA,GAAY,CAAC,EAAE;AACvB,MAAMD,UAAK,CAAC,IAAI,CAAC,uFAAuF,EAAE,SAAS,CAAC;AACpH,MAAM;AACN,IAAI;;AAEJ,IAAI,SAAS,CAAC,UAAU,EAAE;AAC1B,MAAM,MAAM,EAAE,MAAM;AACpB,MAAM,IAAI,EAAEE,sBAAiB,CAAC,QAAQ,CAAC;AACvC,MAAM,OAAO,EAAE;AACf,QAAQ,cAAc,EAAE,+BAA+B;AACvD,OAAO;AACP,MAAM,IAAI,EAAE,MAAM;AAClB,KAAK,CAAC,CAAC,IAAI;AACX,MAAM,OAAO;AACb,QAAQ,IAAI,GAAG,CAAC,MAAA,IAAU,GAAA,IAAO,GAAG,CAAC,MAAA,GAAS,GAAG,EAAE;AACnD;AACA,UAAU,SAAA,GAAY,CAAC;AACvB,QAAQ;AACR,MAAM,CAAC;AACP,MAAM,OAAO;AACb,QAAQ,SAAS,EAAE;AACnB,QAAQF,UAAK,CAAC,KAAK;AACnB,UAAU,8FAA8F;AACxG,UAAU,GAAG;AACb,SAAS;AACT,MAAM,CAAC;AACP,KAAK;AACL,EAAE,CAAC,CAAC;AACJ;;AAEA;AACA;AACA;AACA;AACA;MACa,2BAAA,GAA8BG,sBAAiB,CAAC,qBAAqB;;AAElF;AACA;AACA;AACO,SAAS,sBAAsB,CAAC,KAAK,EAAkB;AAC9D,EAAE,OAAO,OAAO;AAChB,IAAI,KAAK,CAAC,IAAA,KAAS,aAAA;AACnB,IAAI,KAAK,CAAC,KAAA;AACV,IAAI,KAAK,CAAC,QAAQ,EAAE,KAAA;AACpB,IAAI,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAA,KAAO,iBAAA;AAChC,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,EAAE,WAAA,EAAa,KAAK,WAAW,EAAE,QAAQ,CAAC,mBAAmB,CAAC,CAAC;AACrF,GAAG;AACH;;;;;;"}

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/admin/forms/Error.ts"],"sourcesContent":["import type { Field } from '../../fields/config/types.js'\nimport type { ClientFieldWithOptionalType, ServerComponentProps } from './Field.js'\n\nexport type GenericErrorProps = {\n readonly alignCaret?: 'center' | 'left' | 'right'\n readonly message?: string\n readonly path?: string\n readonly showError?: boolean\n}\n\nexport type FieldErrorClientProps<\n TFieldClient extends ClientFieldWithOptionalType = ClientFieldWithOptionalType,\n> = {\n field: TFieldClient\n} & GenericErrorProps\n\nexport type FieldErrorServerProps<\n TFieldServer extends Field,\n TFieldClient extends ClientFieldWithOptionalType = ClientFieldWithOptionalType,\n> = {\n clientField: TFieldClient\n readonly field: TFieldServer\n} & GenericErrorProps &\n ServerComponentProps\n\nexport type FieldErrorClientComponent<\n TFieldClient extends ClientFieldWithOptionalType = ClientFieldWithOptionalType,\n> = React.ComponentType<FieldErrorClientProps<TFieldClient>>\n\nexport type FieldErrorServerComponent<\n TFieldServer extends Field = Field,\n TFieldClient extends ClientFieldWithOptionalType = ClientFieldWithOptionalType,\n> = React.ComponentType<FieldErrorServerProps<TFieldServer, TFieldClient>>\n"],"names":[],"mappings":"AA6BA,WAG0E"}

View File

@@ -0,0 +1,340 @@
import {
createElement,
createContext as createContextOrig,
useContext as useContextOrig,
useEffect,
useLayoutEffect,
useReducer,
useRef,
useState,
} from 'react';
import type {
ComponentType,
Context as ContextOrig,
MutableRefObject,
Provider,
ReactNode,
} from 'react';
import {
unstable_NormalPriority as NormalPriority,
unstable_runWithPriority as runWithPriority,
} from 'scheduler';
const CONTEXT_VALUE = Symbol();
const ORIGINAL_PROVIDER = Symbol();
const isSSR =
typeof window === 'undefined' ||
/ServerSideRendering/.test(window.navigator && window.navigator.userAgent);
const useIsomorphicLayoutEffect = isSSR ? useEffect : useLayoutEffect;
// for preact that doesn't have runWithPriority
const runWithNormalPriority = runWithPriority
? (fn: () => void) => {
try {
runWithPriority(NormalPriority, fn);
} catch (e) {
if ((e as { message: unknown }).message === 'Not implemented.') {
fn();
} else {
throw e;
}
}
}
: (fn: () => void) => fn();
type Version = number;
type Listener<Value> = (action: {
n: Version;
p?: Promise<Value>;
v?: Value;
}) => void;
type ContextValue<Value> = {
[CONTEXT_VALUE]: {
/* "v"alue */ v: MutableRefObject<Value>;
/* versio"n" */ n: MutableRefObject<Version>;
/* "l"isteners */ l: Set<Listener<Value>>;
/* "u"pdate */ u: (
fn: () => void,
options?: { suspense: boolean },
) => void;
};
};
export interface Context<Value> {
Provider: ComponentType<{ value: Value; children: ReactNode }>;
displayName?: string;
}
const createProvider = <Value>(ProviderOrig: Provider<ContextValue<Value>>) => {
const ContextProvider = ({
value,
children,
}: {
value: Value;
children: ReactNode;
}) => {
const valueRef = useRef(value);
const versionRef = useRef(0);
const [resolve, setResolve] = useState<((v: Value) => void) | null>(null);
if (resolve) {
resolve(value);
setResolve(null);
}
const contextValue = useRef<ContextValue<Value>>();
if (!contextValue.current) {
const listeners = new Set<Listener<Value>>();
const update = (fn: () => void, options?: { suspense: boolean }) => {
versionRef.current += 1;
const action: Parameters<Listener<Value>>[0] = {
n: versionRef.current,
};
if (options?.suspense) {
action.n *= -1; // this is intentional to make it temporary version
action.p = new Promise<Value>((r) => {
setResolve(() => (v: Value) => {
action.v = v;
delete action.p;
r(v);
});
});
}
listeners.forEach((listener) => listener(action));
fn();
};
contextValue.current = {
[CONTEXT_VALUE]: {
/* "v"alue */ v: valueRef,
/* versio"n" */ n: versionRef,
/* "l"isteners */ l: listeners,
/* "u"pdate */ u: update,
},
};
}
useIsomorphicLayoutEffect(() => {
valueRef.current = value;
versionRef.current += 1;
runWithNormalPriority(() => {
(contextValue.current as ContextValue<Value>)[CONTEXT_VALUE].l.forEach(
(listener) => {
listener({ n: versionRef.current, v: value });
},
);
});
}, [value]);
return createElement(
ProviderOrig,
{ value: contextValue.current },
children,
);
};
return ContextProvider;
};
const identity = <T>(x: T) => x;
/**
* This creates a special context for `useContextSelector`.
*
* @example
* import { createContext } from 'use-context-selector';
*
* const PersonContext = createContext({ firstName: '', familyName: '' });
*/
export function createContext<Value>(defaultValue: Value) {
const context = createContextOrig<ContextValue<Value>>({
[CONTEXT_VALUE]: {
/* "v"alue */ v: { current: defaultValue },
/* versio"n" */ n: { current: -1 },
/* "l"isteners */ l: new Set(),
/* "u"pdate */ u: (f) => f(),
},
});
(
context as unknown as {
[ORIGINAL_PROVIDER]: Provider<ContextValue<Value>>;
}
)[ORIGINAL_PROVIDER] = context.Provider;
(context as unknown as Context<Value>).Provider = createProvider(
context.Provider,
);
delete (context as { Consumer: unknown }).Consumer; // no support for Consumer
return context as unknown as Context<Value>;
}
/**
* This hook returns context selected value by selector.
*
* It will only accept context created by `createContext`.
* It will trigger re-render if only the selected value is referentially changed.
*
* The selector should return referentially equal result for same input for better performance.
*
* @example
* import { useContextSelector } from 'use-context-selector';
*
* const firstName = useContextSelector(PersonContext, (state) => state.firstName);
*/
export function useContextSelector<Value, Selected>(
context: Context<Value>,
selector: (value: Value) => Selected,
) {
const contextValue = useContextOrig(
context as unknown as ContextOrig<ContextValue<Value>>,
)[CONTEXT_VALUE];
if (typeof process === 'object' && process.env.NODE_ENV !== 'production') {
if (!contextValue) {
throw new Error('useContextSelector requires special context');
}
}
const {
/* "v"alue */ v: { current: value },
/* versio"n" */ n: { current: version },
/* "l"isteners */ l: listeners,
} = contextValue;
const selected = selector(value);
const [state, dispatch] = useReducer(
(
prev: readonly [Value, Selected],
action?: Parameters<Listener<Value>>[0],
) => {
if (!action) {
// case for `dispatch()` below
return [value, selected] as const;
}
if ('p' in action) {
throw action.p;
}
if (action.n === version) {
if (Object.is(prev[1], selected)) {
return prev; // bail out
}
return [value, selected] as const;
}
try {
if ('v' in action) {
if (Object.is(prev[0], action.v)) {
return prev; // do not update
}
const nextSelected = selector(action.v);
if (Object.is(prev[1], nextSelected)) {
return prev; // do not update
}
return [action.v, nextSelected] as const;
}
} catch (_e) {
// ignored (stale props or some other reason)
}
return [...prev] as const; // schedule update
},
[value, selected] as const,
);
if (!Object.is(state[1], selected)) {
// schedule re-render
// this is safe because it's self contained
dispatch();
}
useIsomorphicLayoutEffect(() => {
listeners.add(dispatch);
return () => {
listeners.delete(dispatch);
};
}, [listeners]);
return state[1];
}
/**
* This hook returns the entire context value.
* Use this instead of React.useContext for consistent behavior.
*
* @example
* import { useContext } from 'use-context-selector';
*
* const person = useContext(PersonContext);
*/
export function useContext<Value>(context: Context<Value>) {
return useContextSelector(context, identity);
}
/**
* This hook returns an update function to wrap an updating function
*
* Use this for a function that will change a value in
* concurrent rendering in React 18.
* Otherwise, there's no need to use this hook.
*
* @example
* import { useContextUpdate } from 'use-context-selector';
*
* const update = useContextUpdate();
*
* // Wrap set state function
* update(() => setState(...));
*
* // Experimental suspense mode
* update(() => setState(...), { suspense: true });
*/
export function useContextUpdate<Value>(context: Context<Value>) {
const contextValue = useContextOrig(
context as unknown as ContextOrig<ContextValue<Value>>,
)[CONTEXT_VALUE];
if (typeof process === 'object' && process.env.NODE_ENV !== 'production') {
if (!contextValue) {
throw new Error('useContextUpdate requires special context');
}
}
const { u: update } = contextValue;
return update;
}
/* eslint-disable @typescript-eslint/no-explicit-any */
/**
* This is a Provider component for bridging multiple react roots
*
* @example
* const valueToBridge = useBridgeValue(PersonContext);
* return (
* <Renderer>
* <BridgeProvider context={PersonContext} value={valueToBridge}>
* {children}
* </BridgeProvider>
* </Renderer>
* );
*/
export const BridgeProvider = ({
context,
value,
children,
}: {
context: Context<any>;
value: unknown;
children: ReactNode;
}) => {
const { [ORIGINAL_PROVIDER]: ProviderOrig } = context as unknown as {
[ORIGINAL_PROVIDER]: Provider<unknown>;
};
if (typeof process === 'object' && process.env.NODE_ENV !== 'production') {
if (!ProviderOrig) {
throw new Error('BridgeProvider requires special context');
}
}
return createElement(ProviderOrig, { value }, children);
};
/**
* This hook return a value for BridgeProvider
*/
export const useBridgeValue = (context: Context<any>) => {
const bridgeValue = useContextOrig(
context as unknown as ContextOrig<ContextValue<unknown>>,
);
if (typeof process === 'object' && process.env.NODE_ENV !== 'production') {
if (!bridgeValue[CONTEXT_VALUE]) {
throw new Error('useBridgeValue requires special context');
}
}
return bridgeValue as any;
};

View File

@@ -0,0 +1,79 @@
import { entityKind, is } from "../../entity.js";
import { SelectionProxyHandler } from "../../selection-proxy.js";
import { SingleStoreDialect } from "../dialect.js";
import { WithSubquery } from "../../subquery.js";
import { SingleStoreSelectBuilder } from "./select.js";
class QueryBuilder {
static [entityKind] = "SingleStoreQueryBuilder";
dialect;
dialectConfig;
constructor(dialect) {
this.dialect = is(dialect, SingleStoreDialect) ? dialect : void 0;
this.dialectConfig = is(dialect, SingleStoreDialect) ? void 0 : dialect;
}
$with = (alias, selection) => {
const queryBuilder = this;
const as = (qb) => {
if (typeof qb === "function") {
qb = qb(queryBuilder);
}
return new Proxy(
new WithSubquery(
qb.getSQL(),
selection ?? ("getSelectedFields" in qb ? qb.getSelectedFields() ?? {} : {}),
alias,
true
),
new SelectionProxyHandler({ alias, sqlAliasedBehavior: "alias", sqlBehavior: "error" })
);
};
return { as };
};
with(...queries) {
const self = this;
function select(fields) {
return new SingleStoreSelectBuilder({
fields: fields ?? void 0,
session: void 0,
dialect: self.getDialect(),
withList: queries
});
}
function selectDistinct(fields) {
return new SingleStoreSelectBuilder({
fields: fields ?? void 0,
session: void 0,
dialect: self.getDialect(),
withList: queries,
distinct: true
});
}
return { select, selectDistinct };
}
select(fields) {
return new SingleStoreSelectBuilder({
fields: fields ?? void 0,
session: void 0,
dialect: this.getDialect()
});
}
selectDistinct(fields) {
return new SingleStoreSelectBuilder({
fields: fields ?? void 0,
session: void 0,
dialect: this.getDialect(),
distinct: true
});
}
// Lazy load dialect to avoid circular dependency
getDialect() {
if (!this.dialect) {
this.dialect = new SingleStoreDialect(this.dialectConfig);
}
return this.dialect;
}
}
export {
QueryBuilder
};
//# sourceMappingURL=query-builder.js.map

View File

@@ -0,0 +1,3 @@
import type { ServerFunctionHandler } from 'payload';
export declare const handleServerFunctions: ServerFunctionHandler;
//# sourceMappingURL=handleServerFunctions.d.ts.map

View File

@@ -0,0 +1,24 @@
import { startOfDay } from "./startOfDay.mjs";
/**
* @name startOfToday
* @category Day Helpers
* @summary Return the start of today.
* @pure false
*
* @description
* Return the start of today.
*
* @returns The start of today
*
* @example
* // If today is 6 October 2014:
* const result = startOfToday()
* //=> Mon Oct 6 2014 00:00:00
*/
export function startOfToday() {
return startOfDay(Date.now());
}
// Fallback for modularized imports:
export default startOfToday;

View File

@@ -0,0 +1,19 @@
import React from 'react';
import type { AddCondition, ReducedField, RemoveCondition, UpdateCondition, Value } from '../types.js';
export type Props = {
readonly addCondition: AddCondition;
readonly andIndex: number;
readonly fieldPath: string;
readonly filterOptions: ResolvedFilterOptions;
readonly operator: Operator;
readonly orIndex: number;
readonly reducedFields: ReducedField[];
readonly removeCondition: RemoveCondition;
readonly RenderedFilter: React.ReactNode;
readonly updateCondition: UpdateCondition;
readonly value: Value;
};
import type { Operator, ResolvedFilterOptions } from 'payload';
import './index.scss';
export declare const Condition: React.FC<Props>;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,86 @@
import { Document } from './index'
import { CST } from './parse-cst'
import { AST, Pair, Scalar, Schema } from './types'
export function findPair(items: any[], key: Scalar | any): Pair | undefined
export function parseMap(doc: Document, cst: CST.Map): AST.BlockMap
export function parseMap(doc: Document, cst: CST.FlowMap): AST.FlowMap
export function parseSeq(doc: Document, cst: CST.Seq): AST.BlockSeq
export function parseSeq(doc: Document, cst: CST.FlowSeq): AST.FlowSeq
export function stringifyNumber(item: Scalar): string
export function stringifyString(
item: Scalar,
ctx: Schema.StringifyContext,
onComment?: () => void,
onChompKeep?: () => void
): string
export function toJSON(
value: any,
arg?: any,
ctx?: Schema.CreateNodeContext
): any
export enum Type {
ALIAS = 'ALIAS',
BLANK_LINE = 'BLANK_LINE',
BLOCK_FOLDED = 'BLOCK_FOLDED',
BLOCK_LITERAL = 'BLOCK_LITERAL',
COMMENT = 'COMMENT',
DIRECTIVE = 'DIRECTIVE',
DOCUMENT = 'DOCUMENT',
FLOW_MAP = 'FLOW_MAP',
FLOW_SEQ = 'FLOW_SEQ',
MAP = 'MAP',
MAP_KEY = 'MAP_KEY',
MAP_VALUE = 'MAP_VALUE',
PLAIN = 'PLAIN',
QUOTE_DOUBLE = 'QUOTE_DOUBLE',
QUOTE_SINGLE = 'QUOTE_SINGLE',
SEQ = 'SEQ',
SEQ_ITEM = 'SEQ_ITEM'
}
interface LinePos {
line: number
col: number
}
export class YAMLError extends Error {
name:
| 'YAMLReferenceError'
| 'YAMLSemanticError'
| 'YAMLSyntaxError'
| 'YAMLWarning'
message: string
source?: CST.Node
nodeType?: Type
range?: CST.Range
linePos?: { start: LinePos; end: LinePos }
/**
* Drops `source` and adds `nodeType`, `range` and `linePos`, as well as
* adding details to `message`. Run automatically for document errors if
* the `prettyErrors` option is set.
*/
makePretty(): void
}
export class YAMLReferenceError extends YAMLError {
name: 'YAMLReferenceError'
}
export class YAMLSemanticError extends YAMLError {
name: 'YAMLSemanticError'
}
export class YAMLSyntaxError extends YAMLError {
name: 'YAMLSyntaxError'
}
export class YAMLWarning extends YAMLError {
name: 'YAMLWarning'
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"getFieldsForRowComparison.d.ts","sourceRoot":"","sources":["../../../../../src/views/Version/RenderFieldsToDiff/utilities/getFieldsForRowComparison.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EAEjB,YAAY,EACZ,WAAW,EACX,YAAY,EACb,MAAM,SAAS,CAAA;AAIhB;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,EACxC,gBAAgB,EAChB,MAAM,EACN,KAAK,EACL,GAAG,EACH,YAAY,EACZ,UAAU,GACX,EAAE;IACD,gBAAgB,EAAE,gBAAgB,CAAA;IAClC,MAAM,EAAE,YAAY,CAAA;IACpB,KAAK,EAAE,gBAAgB,GAAG,iBAAiB,CAAA;IAC3C,GAAG,EAAE,MAAM,CAAA;IACX,YAAY,EAAE,GAAG,CAAA;IACjB,UAAU,EAAE,GAAG,CAAA;CAChB,GAAG;IAAE,MAAM,EAAE,WAAW,EAAE,CAAC;IAAC,aAAa,EAAE,YAAY,EAAE,CAAA;CAAE,CAwD3D"}

View File

@@ -0,0 +1,45 @@
/**
* Builds breadcrumbs up from child folder
* all the way up to root folder
*/ export const getFolderBreadcrumbs = async ({ breadcrumbs = [], folderID, req })=>{
const { payload, user } = req;
if (folderID && payload.config.folders) {
const folderFieldName = payload.config.folders.fieldName;
const folderQuery = await payload.find({
collection: payload.config.folders.slug,
depth: 0,
limit: 1,
overrideAccess: false,
req,
select: {
name: true,
[folderFieldName]: true,
folderType: true
},
user,
where: {
id: {
equals: folderID
}
}
});
const folder = folderQuery.docs[0];
if (folder) {
breadcrumbs.push({
id: folder.id,
name: folder.name,
folderType: folder.folderType
});
if (folder[folderFieldName]) {
return getFolderBreadcrumbs({
breadcrumbs,
folderID: typeof folder[folderFieldName] === 'number' || typeof folder[folderFieldName] === 'string' ? folder[folderFieldName] : folder[folderFieldName].id,
req
});
}
}
}
return breadcrumbs.reverse();
};
//# sourceMappingURL=getFolderBreadcrumbs.js.map

View File

@@ -0,0 +1,35 @@
# @emotion/weak-memoize
> A memoization function that uses a WeakMap
## Install
```bash
yarn add @emotion/weak-memoize
```
## Usage
Because @emotion/weak-memoize uses a WeakMap the argument must be a non primitive type, e.g. objects, functions, arrays and etc. The function passed to `weakMemoize` must also only accept a single argument.
```jsx
import weakMemoize from '@emotion/weak-memoize'
let doThing = weakMemoize(({ someProperty }) => {
return { newName: someProperty }
})
let obj = { someProperty: true }
let firstResult = doThing(obj)
let secondResult = doThing(obj)
firstResult === secondResult // true
let newObj = { someProperty: true }
let thirdResult = doThing(newObj)
thirdResult === firstResult // false
```

View File

@@ -0,0 +1,61 @@
// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2.0 License.
//
// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2021 Datadog, Inc.
const importHooks = [] // TODO should this be a Set?
const setters = new WeakMap()
const getters = new WeakMap()
const specifiers = new Map()
const toHook = []
const proxyHandler = {
set (target, name, value) {
const set = setters.get(target)
const setter = set && set[name]
if (typeof setter === 'function') {
return setter(value)
}
// If a module doesn't export the property being assigned (e.g. no default
// export), there is no setter to call. Don't crash userland code.
return true
},
get (target, name) {
if (name === Symbol.toStringTag) {
return 'Module'
}
const getter = getters.get(target)[name]
if (typeof getter === 'function') {
return getter()
}
},
defineProperty (target, property, descriptor) {
if ((!('value' in descriptor))) {
throw new Error('Getters/setters are not supported for exports property descriptors.')
}
const set = setters.get(target)
const setter = set && set[property]
if (typeof setter === 'function') {
return setter(descriptor.value)
}
return true
}
}
function register (name, namespace, set, get, specifier) {
specifiers.set(name, specifier)
setters.set(namespace, set)
getters.set(namespace, get)
const proxy = new Proxy(namespace, proxyHandler)
importHooks.forEach(hook => hook(name, proxy, specifier))
toHook.push([name, proxy, specifier])
}
exports.register = register
exports.importHooks = importHooks
exports.specifiers = specifiers
exports.toHook = toHook

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/utilities/canAccessAdmin.ts"],"sourcesContent":["import type { PayloadRequest } from '../types/index.js'\n\nimport { UnauthorizedError } from '../errors/UnauthorizedError.js'\n\n/**\n * Protects admin-only routes, server functions, etc.\n * The requesting user must either:\n * a. pass the `access.admin` function on the `users` collection, if defined\n * b. match the `config.admin.user` property on the Payload config\n * c. if no user is present, and there are no users in the system, allow access (for first user creation)\n * @throws {Error} Throws an `Unauthorized` error if access is denied that can be explicitly caught\n */\nexport const canAccessAdmin = async ({ req }: { req: PayloadRequest }) => {\n const incomingUserSlug = req.user?.collection\n const adminUserSlug = req.payload.config.admin.user\n\n if (incomingUserSlug) {\n const adminAccessFn = req.payload.collections[incomingUserSlug]?.config.access?.admin\n\n if (adminAccessFn) {\n const canAccess = await adminAccessFn({ req })\n\n if (!canAccess) {\n throw new UnauthorizedError()\n }\n // Match the user collection to the global admin config\n } else if (adminUserSlug !== incomingUserSlug) {\n throw new UnauthorizedError()\n }\n } else {\n const hasUsers = await req.payload.find({\n collection: adminUserSlug,\n depth: 0,\n limit: 1,\n pagination: false,\n })\n\n // If there are users, we should not allow access because of `/create-first-user`\n if (hasUsers.docs.length) {\n throw new UnauthorizedError()\n }\n }\n}\n"],"names":["UnauthorizedError","canAccessAdmin","req","incomingUserSlug","user","collection","adminUserSlug","payload","config","admin","adminAccessFn","collections","access","canAccess","hasUsers","find","depth","limit","pagination","docs","length"],"mappings":"AAEA,SAASA,iBAAiB,QAAQ,iCAAgC;AAElE;;;;;;;CAOC,GACD,OAAO,MAAMC,iBAAiB,OAAO,EAAEC,GAAG,EAA2B;IACnE,MAAMC,mBAAmBD,IAAIE,IAAI,EAAEC;IACnC,MAAMC,gBAAgBJ,IAAIK,OAAO,CAACC,MAAM,CAACC,KAAK,CAACL,IAAI;IAEnD,IAAID,kBAAkB;QACpB,MAAMO,gBAAgBR,IAAIK,OAAO,CAACI,WAAW,CAACR,iBAAiB,EAAEK,OAAOI,QAAQH;QAEhF,IAAIC,eAAe;YACjB,MAAMG,YAAY,MAAMH,cAAc;gBAAER;YAAI;YAE5C,IAAI,CAACW,WAAW;gBACd,MAAM,IAAIb;YACZ;QACA,uDAAuD;QACzD,OAAO,IAAIM,kBAAkBH,kBAAkB;YAC7C,MAAM,IAAIH;QACZ;IACF,OAAO;QACL,MAAMc,WAAW,MAAMZ,IAAIK,OAAO,CAACQ,IAAI,CAAC;YACtCV,YAAYC;YACZU,OAAO;YACPC,OAAO;YACPC,YAAY;QACd;QAEA,iFAAiF;QACjF,IAAIJ,SAASK,IAAI,CAACC,MAAM,EAAE;YACxB,MAAM,IAAIpB;QACZ;IACF;AACF,EAAC"}

View File

@@ -0,0 +1,49 @@
"use strict";
exports.isSameSecond = isSameSecond;
var _index = require("./startOfSecond.js");
/**
* @name isSameSecond
* @category Second Helpers
* @summary Are the given dates in the same second (and hour and day)?
*
* @description
* Are the given dates in the same second (and hour and day)?
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param dateLeft - The first date to check
* @param dateRight - The second date to check
*
* @returns The dates are in the same second (and hour and day)
*
* @example
* // Are 4 September 2014 06:30:15.000 and 4 September 2014 06:30.15.500 in the same second?
* const result = isSameSecond(
* new Date(2014, 8, 4, 6, 30, 15),
* new Date(2014, 8, 4, 6, 30, 15, 500)
* )
* //=> true
*
* @example
* // Are 4 September 2014 06:00:15.000 and 4 September 2014 06:01.15.000 in the same second?
* const result = isSameSecond(
* new Date(2014, 8, 4, 6, 0, 15),
* new Date(2014, 8, 4, 6, 1, 15)
* )
* //=> false
*
* @example
* // Are 4 September 2014 06:00:15.000 and 5 September 2014 06:00.15.000 in the same second?
* const result = isSameSecond(
* new Date(2014, 8, 4, 6, 0, 15),
* new Date(2014, 8, 5, 6, 0, 15)
* )
* //=> false
*/
function isSameSecond(dateLeft, dateRight) {
const dateLeftStartOfSecond = (0, _index.startOfSecond)(dateLeft);
const dateRightStartOfSecond = (0, _index.startOfSecond)(dateRight);
return +dateLeftStartOfSecond === +dateRightStartOfSecond;
}

View File

@@ -0,0 +1,493 @@
function _typeof(o) {"@babel/helpers - typeof";return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {return typeof o;} : function (o) {return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;}, _typeof(o);}function ownKeys(e, r) {var t = Object.keys(e);if (Object.getOwnPropertySymbols) {var o = Object.getOwnPropertySymbols(e);r && (o = o.filter(function (r) {return Object.getOwnPropertyDescriptor(e, r).enumerable;})), t.push.apply(t, o);}return t;}function _objectSpread(e) {for (var r = 1; r < arguments.length; r++) {var t = null != arguments[r] ? arguments[r] : {};r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {_defineProperty(e, r, t[r]);}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));});}return e;}function _defineProperty(obj, key, value) {key = _toPropertyKey(key);if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}function _toPropertyKey(t) {var i = _toPrimitive(t, "string");return "symbol" == _typeof(i) ? i : String(i);}function _toPrimitive(t, r) {if ("object" != _typeof(t) || !t) return t;var e = t[Symbol.toPrimitive];if (void 0 !== e) {var i = e.call(t, r || "default");if ("object" != _typeof(i)) return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return ("string" === r ? String : Number)(t);}(function (_window$dateFns) {var __defProp = Object.defineProperty;
var __export = function __export(target, all) {
for (var name in all)
__defProp(target, name, {
get: all[name],
enumerable: true,
configurable: true,
set: function set(newValue) {return all[name] = function () {return newValue;};}
});
};
// lib/locale/eo/_lib/formatDistance.mjs
var formatDistanceLocale = {
lessThanXSeconds: {
one: "malpli ol sekundo",
other: "malpli ol {{count}} sekundoj"
},
xSeconds: {
one: "1 sekundo",
other: "{{count}} sekundoj"
},
halfAMinute: "duonminuto",
lessThanXMinutes: {
one: "malpli ol minuto",
other: "malpli ol {{count}} minutoj"
},
xMinutes: {
one: "1 minuto",
other: "{{count}} minutoj"
},
aboutXHours: {
one: "proksimume 1 horo",
other: "proksimume {{count}} horoj"
},
xHours: {
one: "1 horo",
other: "{{count}} horoj"
},
xDays: {
one: "1 tago",
other: "{{count}} tagoj"
},
aboutXMonths: {
one: "proksimume 1 monato",
other: "proksimume {{count}} monatoj"
},
xWeeks: {
one: "1 semajno",
other: "{{count}} semajnoj"
},
aboutXWeeks: {
one: "proksimume 1 semajno",
other: "proksimume {{count}} semajnoj"
},
xMonths: {
one: "1 monato",
other: "{{count}} monatoj"
},
aboutXYears: {
one: "proksimume 1 jaro",
other: "proksimume {{count}} jaroj"
},
xYears: {
one: "1 jaro",
other: "{{count}} jaroj"
},
overXYears: {
one: "pli ol 1 jaro",
other: "pli ol {{count}} jaroj"
},
almostXYears: {
one: "preska\u016D 1 jaro",
other: "preska\u016D {{count}} jaroj"
}
};
var formatDistance = function formatDistance(token, count, options) {
var result;
var 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 !== null && options !== void 0 && options.addSuffix) {
if (options !== null && options !== void 0 && options.comparison && options.comparison > 0) {
return "post " + result;
} else {
return "anta\u016D " + result;
}
}
return result;
};
// lib/locale/_lib/buildFormatLongFn.mjs
function buildFormatLongFn(args) {
return function () {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var width = options.width ? String(options.width) : args.defaultWidth;
var format = args.formats[width] || args.formats[args.defaultWidth];
return format;
};
}
// lib/locale/eo/_lib/formatLong.mjs
var dateFormats = {
full: "EEEE, do 'de' MMMM y",
long: "y-MMMM-dd",
medium: "y-MMM-dd",
short: "yyyy-MM-dd"
};
var timeFormats = {
full: "Ho 'horo kaj' m:ss zzzz",
long: "HH:mm:ss z",
medium: "HH:mm:ss",
short: "HH:mm"
};
var dateTimeFormats = {
any: "{{date}} {{time}}"
};
var formatLong = {
date: buildFormatLongFn({
formats: dateFormats,
defaultWidth: "full"
}),
time: buildFormatLongFn({
formats: timeFormats,
defaultWidth: "full"
}),
dateTime: buildFormatLongFn({
formats: dateTimeFormats,
defaultWidth: "any"
})
};
// lib/locale/eo/_lib/formatRelative.mjs
var formatRelativeLocale = {
lastWeek: "'pasinta' eeee 'je' p",
yesterday: "'hiera\u016D je' p",
today: "'hodia\u016D je' p",
tomorrow: "'morga\u016D je' p",
nextWeek: "eeee 'je' p",
other: "P"
};
var formatRelative = function formatRelative(token, _date, _baseDate, _options) {return formatRelativeLocale[token];};
// lib/locale/_lib/buildLocalizeFn.mjs
function buildLocalizeFn(args) {
return function (value, options) {
var context = options !== null && options !== void 0 && options.context ? String(options.context) : "standalone";
var valuesArray;
if (context === "formatting" && args.formattingValues) {
var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;
valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
} else {
var _defaultWidth = args.defaultWidth;
var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;
valuesArray = args.values[_width] || args.values[_defaultWidth];
}
var index = args.argumentCallback ? args.argumentCallback(value) : value;
return valuesArray[index];
};
}
// lib/locale/eo/_lib/localize.mjs
var eraValues = {
narrow: ["aK", "pK"],
abbreviated: ["a.K.E.", "p.K.E."],
wide: ["anta\u016D Komuna Erao", "Komuna Erao"]
};
var quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["K1", "K2", "K3", "K4"],
wide: [
"1-a kvaronjaro",
"2-a kvaronjaro",
"3-a kvaronjaro",
"4-a kvaronjaro"]
};
var monthValues = {
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
abbreviated: [
"jan",
"feb",
"mar",
"apr",
"maj",
"jun",
"jul",
"a\u016Dg",
"sep",
"okt",
"nov",
"dec"],
wide: [
"januaro",
"februaro",
"marto",
"aprilo",
"majo",
"junio",
"julio",
"a\u016Dgusto",
"septembro",
"oktobro",
"novembro",
"decembro"]
};
var dayValues = {
narrow: ["D", "L", "M", "M", "\u0134", "V", "S"],
short: ["di", "lu", "ma", "me", "\u0135a", "ve", "sa"],
abbreviated: ["dim", "lun", "mar", "mer", "\u0135a\u016D", "ven", "sab"],
wide: [
"diman\u0109o",
"lundo",
"mardo",
"merkredo",
"\u0135a\u016Ddo",
"vendredo",
"sabato"]
};
var dayPeriodValues = {
narrow: {
am: "a",
pm: "p",
midnight: "noktomezo",
noon: "tagmezo",
morning: "matene",
afternoon: "posttagmeze",
evening: "vespere",
night: "nokte"
},
abbreviated: {
am: "a.t.m.",
pm: "p.t.m.",
midnight: "noktomezo",
noon: "tagmezo",
morning: "matene",
afternoon: "posttagmeze",
evening: "vespere",
night: "nokte"
},
wide: {
am: "anta\u016Dtagmeze",
pm: "posttagmeze",
midnight: "noktomezo",
noon: "tagmezo",
morning: "matene",
afternoon: "posttagmeze",
evening: "vespere",
night: "nokte"
}
};
var ordinalNumber = function ordinalNumber(dirtyNumber) {
var number = Number(dirtyNumber);
return number + "-a";
};
var localize = {
ordinalNumber: ordinalNumber,
era: buildLocalizeFn({
values: eraValues,
defaultWidth: "wide"
}),
quarter: buildLocalizeFn({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: function argumentCallback(quarter) {
return Number(quarter) - 1;
}
}),
month: buildLocalizeFn({
values: monthValues,
defaultWidth: "wide"
}),
day: buildLocalizeFn({
values: dayValues,
defaultWidth: "wide"
}),
dayPeriod: buildLocalizeFn({
values: dayPeriodValues,
defaultWidth: "wide"
})
};
// lib/locale/_lib/buildMatchPatternFn.mjs
function buildMatchPatternFn(args) {
return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var matchResult = string.match(args.matchPattern);
if (!matchResult)
return null;
var matchedString = matchResult[0];
var parseResult = string.match(args.parsePattern);
if (!parseResult)
return null;
var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
value = options.valueCallback ? options.valueCallback(value) : value;
var rest = string.slice(matchedString.length);
return { value: value, rest: rest };
};
}
// lib/locale/_lib/buildMatchFn.mjs
function buildMatchFn(args) {
return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var width = options.width;
var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
var matchResult = string.match(matchPattern);
if (!matchResult) {
return null;
}
var matchedString = matchResult[0];
var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) {return pattern.test(matchedString);}) : findKey(parsePatterns, function (pattern) {return pattern.test(matchedString);});
var value;
value = args.valueCallback ? args.valueCallback(key) : key;
value = options.valueCallback ? options.valueCallback(value) : value;
var rest = string.slice(matchedString.length);
return { value: value, rest: rest };
};
}
var findKey = function findKey(object, predicate) {
for (var key in object) {
if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) {
return key;
}
}
return;
};
var findIndex = function findIndex(array, predicate) {
for (var key = 0; key < array.length; key++) {
if (predicate(array[key])) {
return key;
}
}
return;
};
// lib/locale/eo/_lib/match.mjs
var matchOrdinalNumberPattern = /^(\d+)(-?a)?/i;
var parseOrdinalNumberPattern = /\d+/i;
var matchEraPatterns = {
narrow: /^([ap]k)/i,
abbreviated: /^([ap]\.?\s?k\.?\s?e\.?)/i,
wide: /^((antaǔ |post )?komuna erao)/i
};
var parseEraPatterns = {
any: [/^a/i, /^[kp]/i]
};
var matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^k[1234]/i,
wide: /^[1234](-?a)? kvaronjaro/i
};
var parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i]
};
var matchMonthPatterns = {
narrow: /^[jfmasond]/i,
abbreviated: /^(jan|feb|mar|apr|maj|jun|jul|a(ŭ|ux|uh|u)g|sep|okt|nov|dec)/i,
wide: /^(januaro|februaro|marto|aprilo|majo|junio|julio|a(ŭ|ux|uh|u)gusto|septembro|oktobro|novembro|decembro)/i
};
var 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,
/^maj/i,
/^jun/i,
/^jul/i,
/^a(u|ŭ)/i,
/^s/i,
/^o/i,
/^n/i,
/^d/i]
};
var matchDayPatterns = {
narrow: /^[dlmĵjvs]/i,
short: /^(di|lu|ma|me|(ĵ|jx|jh|j)a|ve|sa)/i,
abbreviated: /^(dim|lun|mar|mer|(ĵ|jx|jh|j)a(ŭ|ux|uh|u)|ven|sab)/i,
wide: /^(diman(ĉ|cx|ch|c)o|lundo|mardo|merkredo|(ĵ|jx|jh|j)a(ŭ|ux|uh|u)do|vendredo|sabato)/i
};
var parseDayPatterns = {
narrow: [/^d/i, /^l/i, /^m/i, /^m/i, /^(j|ĵ)/i, /^v/i, /^s/i],
any: [/^d/i, /^l/i, /^ma/i, /^me/i, /^(j|ĵ)/i, /^v/i, /^s/i]
};
var matchDayPeriodPatterns = {
narrow: /^([ap]|(posttagmez|noktomez|tagmez|maten|vesper|nokt)[eo])/i,
abbreviated: /^([ap][.\s]?t[.\s]?m[.\s]?|(posttagmez|noktomez|tagmez|maten|vesper|nokt)[eo])/i,
wide: /^(anta(ŭ|ux)tagmez|posttagmez|noktomez|tagmez|maten|vesper|nokt)[eo]/i
};
var parseDayPeriodPatterns = {
any: {
am: /^a/i,
pm: /^p/i,
midnight: /^noktom/i,
noon: /^t/i,
morning: /^m/i,
afternoon: /^posttagmeze/i,
evening: /^v/i,
night: /^n/i
}
};
var match = {
ordinalNumber: buildMatchPatternFn({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: function valueCallback(value) {
return parseInt(value, 10);
}
}),
era: buildMatchFn({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any"
}),
quarter: buildMatchFn({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: function valueCallback(index) {
return index + 1;
}
}),
month: buildMatchFn({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any"
}),
day: buildMatchFn({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any"
}),
dayPeriod: buildMatchFn({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any"
})
};
// lib/locale/eo.mjs
var eo = {
code: "eo",
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
options: {
weekStartsOn: 1,
firstWeekContainsDate: 4
}
};
// lib/locale/eo/cdn.js
window.dateFns = _objectSpread(_objectSpread({},
window.dateFns), {}, {
locale: _objectSpread(_objectSpread({}, (_window$dateFns =
window.dateFns) === null || _window$dateFns === void 0 ? void 0 : _window$dateFns.locale), {}, {
eo: eo }) });
//# debugId=79416AE07680D12F64756e2164756e21
})();
//# sourceMappingURL=cdn.js.map

View File

@@ -0,0 +1,51 @@
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.baggageEntryMetadataFromString = exports.createBaggage = void 0;
const diag_1 = require("../api/diag");
const baggage_impl_1 = require("./internal/baggage-impl");
const symbol_1 = require("./internal/symbol");
const diag = diag_1.DiagAPI.instance();
/**
* Create a new Baggage with optional entries
*
* @param entries An array of baggage entries the new baggage should contain
*/
function createBaggage(entries = {}) {
return new baggage_impl_1.BaggageImpl(new Map(Object.entries(entries)));
}
exports.createBaggage = createBaggage;
/**
* Create a serializable BaggageEntryMetadata object from a string.
*
* @param str string metadata. Format is currently not defined by the spec and has no special meaning.
*
*/
function baggageEntryMetadataFromString(str) {
if (typeof str !== 'string') {
diag.error(`Cannot create baggage metadata from unknown type: ${typeof str}`);
str = '';
}
return {
__TYPE__: symbol_1.baggageEntryMetadataSymbol,
toString() {
return str;
},
};
}
exports.baggageEntryMetadataFromString = baggageEntryMetadataFromString;
//# sourceMappingURL=utils.js.map

View File

@@ -0,0 +1,6 @@
function _object_destructuring_empty(o) {
if (o === null || o === void 0) throw new TypeError("Cannot destructure " + o);
return o;
}
export { _object_destructuring_empty as _ };

View File

@@ -0,0 +1,23 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.statements = exports.statement = exports.smart = exports.program = exports.expression = exports.default = void 0;
var formatters = require("./formatters.js");
var _builder = require("./builder.js");
const smart = exports.smart = (0, _builder.default)(formatters.smart);
const statement = exports.statement = (0, _builder.default)(formatters.statement);
const statements = exports.statements = (0, _builder.default)(formatters.statements);
const expression = exports.expression = (0, _builder.default)(formatters.expression);
const program = exports.program = (0, _builder.default)(formatters.program);
var _default = exports.default = Object.assign(smart.bind(undefined), {
smart,
statement,
statements,
expression,
program,
ast: smart.ast
});
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
!function(f){"object"==typeof exports&&"undefined"!=typeof module?module.exports=f():"function"==typeof define&&define.amd?define([],f):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).PropTypes=f()}(function(){return function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var p="function"==typeof require&&require;if(!f&&p)return p(i,!0);if(u)return u(i,!0);throw(p=new Error("Cannot find module '"+i+"'")).code="MODULE_NOT_FOUND",p}p=n[i]={exports:{}},e[i][0].call(p.exports,function(r){return o(e[i][1][r]||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}({1:[function(require,module,exports){"use strict";var ReactPropTypesSecret=require(3);function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction,module.exports=function(){function e(e,t,n,r,o,c){if(c!==ReactPropTypesSecret){c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}var n={array:e.isRequired=e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return n.PropTypes=n}},{3:3}],2:[function(require,module,exports){module.exports=require(1)()},{1:1}],3:[function(require,module,exports){"use strict";module.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},{}]},{},[2])(2)});

View File

@@ -0,0 +1,45 @@
type ComponentRouteParams = Record<string, string> | undefined;
type HeadersDict = Record<string, string> | undefined;
/**
* Replaces route parameters in a path template with their values
* @param path - The path template containing parameters in [paramName] format
* @param params - Optional route parameters to replace in the template
* @returns The path with parameters replaced
*/
export declare function substituteRouteParams(path: string, params?: ComponentRouteParams): string;
/**
* Normalizes a path by removing route groups
* @param path - The path to normalize
* @returns The normalized path
*/
export declare function sanitizeRoutePath(path: string): string;
/**
* Constructs a full URL from the component route, parameters, and headers.
*
* @param componentRoute - The route template to construct the URL from
* @param params - Optional route parameters to replace in the template
* @param headersDict - Optional headers containing protocol and host information
* @param pathname - Optional pathname coming from parent span "http.target"
* @returns A sanitized URL string
*/
export declare function buildUrlFromComponentRoute(componentRoute: string, params?: ComponentRouteParams, headersDict?: HeadersDict, pathname?: string): string;
/**
* Returns a sanitized URL string from the referer header if it exists and is valid.
*
* @param headersDict - Optional headers containing the referer
* @returns A sanitized URL string or undefined if referer is missing/invalid
*/
export declare function extractSanitizedUrlFromRefererHeader(headersDict?: HeadersDict): string | undefined;
/**
* Returns a sanitized URL string using the referer header if available,
* otherwise constructs the URL from the component route, params, and headers.
*
* @param componentRoute - The route template to construct the URL from
* @param params - Optional route parameters to replace in the template
* @param headersDict - Optional headers containing protocol, host, and referer
* @param pathname - Optional pathname coming from root span "http.target"
* @returns A sanitized URL string
*/
export declare function getSanitizedRequestUrl(componentRoute: string, params?: ComponentRouteParams, headersDict?: HeadersDict, pathname?: string): string;
export {};
//# sourceMappingURL=urls.d.ts.map

View File

@@ -0,0 +1,43 @@
'use strict';
const stream = require('stream');
const Transform = stream.Transform;
/**
* Ensures that only <LF> is used for linebreaks
*
* @param {Object} options Stream options
*/
class LeWindows extends Transform {
constructor(options) {
super(options);
// init Transform
this.options = options || {};
}
/**
* Escapes dots
*/
_transform(chunk, encoding, done) {
let buf;
let lastPos = 0;
for (let i = 0, len = chunk.length; i < len; i++) {
if (chunk[i] === 0x0d) {
// \n
buf = chunk.slice(lastPos, i);
lastPos = i + 1;
this.push(buf);
}
}
if (lastPos && lastPos < chunk.length) {
buf = chunk.slice(lastPos);
this.push(buf);
} else if (!lastPos) {
this.push(chunk);
}
done();
}
}
module.exports = LeWindows;

View File

@@ -0,0 +1,14 @@
import type { Match } from "../../../locale/types.js";
import { Parser } from "../Parser.js";
import type { ParseFlags, ParseResult } from "../types.js";
export declare class Hour0to23Parser extends Parser<number> {
priority: number;
parse(dateString: string, token: string, match: Match): ParseResult<number>;
validate<DateType extends Date>(_date: DateType, value: number): boolean;
set<DateType extends Date>(
date: DateType,
_flags: ParseFlags,
value: number,
): DateType;
incompatibleTokens: string[];
}

View File

@@ -0,0 +1,98 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var enum_exports = {};
__export(enum_exports, {
MySqlEnumColumn: () => MySqlEnumColumn,
MySqlEnumColumnBuilder: () => MySqlEnumColumnBuilder,
MySqlEnumObjectColumn: () => MySqlEnumObjectColumn,
MySqlEnumObjectColumnBuilder: () => MySqlEnumObjectColumnBuilder,
mysqlEnum: () => mysqlEnum
});
module.exports = __toCommonJS(enum_exports);
var import_entity = require("../../entity.cjs");
var import_common = require("./common.cjs");
class MySqlEnumColumnBuilder extends import_common.MySqlColumnBuilder {
static [import_entity.entityKind] = "MySqlEnumColumnBuilder";
constructor(name, values) {
super(name, "string", "MySqlEnumColumn");
this.config.enumValues = values;
}
/** @internal */
build(table) {
return new MySqlEnumColumn(
table,
this.config
);
}
}
class MySqlEnumColumn extends import_common.MySqlColumn {
static [import_entity.entityKind] = "MySqlEnumColumn";
enumValues = this.config.enumValues;
getSQLType() {
return `enum(${this.enumValues.map((value) => `'${value}'`).join(",")})`;
}
}
class MySqlEnumObjectColumnBuilder extends import_common.MySqlColumnBuilder {
static [import_entity.entityKind] = "MySqlEnumObjectColumnBuilder";
constructor(name, values) {
super(name, "string", "MySqlEnumObjectColumn");
this.config.enumValues = values;
}
/** @internal */
build(table) {
return new MySqlEnumObjectColumn(
table,
this.config
);
}
}
class MySqlEnumObjectColumn extends import_common.MySqlColumn {
static [import_entity.entityKind] = "MySqlEnumObjectColumn";
enumValues = this.config.enumValues;
getSQLType() {
return `enum(${this.enumValues.map((value) => `'${value}'`).join(",")})`;
}
}
function mysqlEnum(a, b) {
if (typeof a === "string" && Array.isArray(b) || Array.isArray(a)) {
const name = typeof a === "string" && a.length > 0 ? a : "";
const values = (typeof a === "string" ? b : a) ?? [];
if (values.length === 0) {
throw new Error(`You have an empty array for "${name}" enum values`);
}
return new MySqlEnumColumnBuilder(name, values);
}
if (typeof a === "string" && typeof b === "object" || typeof a === "object") {
const name = typeof a === "object" ? "" : a;
const values = typeof a === "object" ? Object.values(a) : typeof b === "object" ? Object.values(b) : [];
if (values.length === 0) {
throw new Error(`You have an empty array for "${name}" enum values`);
}
return new MySqlEnumObjectColumnBuilder(name, values);
}
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
MySqlEnumColumn,
MySqlEnumColumnBuilder,
MySqlEnumObjectColumn,
MySqlEnumObjectColumnBuilder,
mysqlEnum
});
//# sourceMappingURL=enum.cjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"browserTracingIntegration.d.ts","sourceRoot":"","sources":["../../../src/client/browserTracingIntegration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,yBAAyB,IAAI,iCAAiC,EAAE,MAAM,eAAe,CAAC;AAG/F;;GAEG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,GAAE,UAAU,CAAC,OAAO,iCAAiC,CAAC,CAAC,CAAC,CAAM,GACpE,WAAW,CAqCb"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"spell-check.js","sources":["../../../src/icons/spell-check.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name SpellCheck\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtNiAxNiA2LTEyIDYgMTIiIC8+CiAgPHBhdGggZD0iTTggMTJoOCIgLz4KICA8cGF0aCBkPSJtMTYgMjAgMiAyIDQtNCIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/spell-check\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 SpellCheck = createLucideIcon('SpellCheck', [\n ['path', { d: 'm6 16 6-12 6 12', key: '1b4byz' }],\n ['path', { d: 'M8 12h8', key: '1wcyev' }],\n ['path', { d: 'm16 20 2 2 4-4', key: '13tcca' }],\n]);\n\nexport default SpellCheck;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAa,iBAAiB,YAAc,CAAA,CAAA,CAAA;AAAA,CAAA,CAChD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAmB,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,CAChD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAkB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACjD,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fields/Code/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAoD,MAAM,OAAO,CAAA;AAWxE,OAAO,cAAc,CAAA;AAoIrB,eAAO,MAAM,SAAS;;;;;;;+EAAoC,CAAA"}

View File

@@ -0,0 +1,9 @@
import type { DocumentViewClientProps } from 'payload';
import React from 'react';
import './index.scss';
export type OnSaveContext = {
getDocPermissions?: boolean;
incrementVersionCount?: boolean;
};
export declare function DefaultEditView({ BeforeDocumentControls, Description, EditMenuItems, LivePreview: CustomLivePreview, PreviewButton, PublishButton, SaveButton, SaveDraftButton, Status, UnpublishButton, Upload: CustomUpload, UploadControls, }: DocumentViewClientProps): React.JSX.Element;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,4 @@
import type { JsonObject, TypeWithVersion, UpdateVersionArgs } from 'payload';
import type { DrizzleAdapter } from './types.js';
export declare function updateVersion<T extends JsonObject = JsonObject>(this: DrizzleAdapter, { id, collection, locale, req, returning, select, versionData, where: whereArg, }: UpdateVersionArgs<T>): Promise<TypeWithVersion<T>>;
//# sourceMappingURL=updateVersion.d.ts.map

View File

@@ -0,0 +1,27 @@
Prism.languages.roboconf = {
'comment': /#.*/,
'keyword': {
'pattern': /(^|\s)(?:(?:external|import)\b|(?:facet|instance of)(?=[ \t]+[\w-]+[ \t]*\{))/,
lookbehind: true
},
'component': {
pattern: /[\w-]+(?=[ \t]*\{)/,
alias: 'variable'
},
'property': /[\w.-]+(?=[ \t]*:)/,
'value': {
pattern: /(=[ \t]*(?![ \t]))[^,;]+/,
lookbehind: true,
alias: 'attr-value'
},
'optional': {
pattern: /\(optional\)/,
alias: 'builtin'
},
'wildcard': {
pattern: /(\.)\*/,
lookbehind: true,
alias: 'operator'
},
'punctuation': /[{},.;:=]/
};

View File

@@ -0,0 +1,68 @@
{
"name": "package-json-from-dist",
"version": "1.0.1",
"description": "Load the local package.json from either src or dist folder",
"main": "./dist/commonjs/index.js",
"exports": {
"./package.json": "./package.json",
".": {
"import": {
"types": "./dist/esm/index.d.ts",
"default": "./dist/esm/index.js"
},
"require": {
"types": "./dist/commonjs/index.d.ts",
"default": "./dist/commonjs/index.js"
}
}
},
"files": [
"dist"
],
"scripts": {
"preversion": "npm test",
"postversion": "npm publish",
"prepublishOnly": "git push origin --follow-tags",
"prepare": "tshy",
"pretest": "npm run prepare",
"presnap": "npm run prepare",
"test": "tap",
"snap": "tap",
"format": "prettier --write . --log-level warn",
"typedoc": "typedoc"
},
"author": "Isaac Z. Schlueter <i@izs.me> (https://izs.me)",
"license": "BlueOak-1.0.0",
"repository": {
"type": "git",
"url": "git+https://github.com/isaacs/package-json-from-dist.git"
},
"devDependencies": {
"@types/node": "^20.12.12",
"prettier": "^3.2.5",
"tap": "^18.5.3",
"typedoc": "^0.24.8",
"typescript": "^5.1.6",
"tshy": "^1.14.0"
},
"prettier": {
"semi": false,
"printWidth": 70,
"tabWidth": 2,
"useTabs": false,
"singleQuote": true,
"jsxSingleQuote": false,
"bracketSameLine": true,
"arrowParens": "avoid",
"endOfLine": "lf",
"experimentalTernaries": true
},
"tshy": {
"exports": {
"./package.json": "./package.json",
".": "./src/index.ts"
}
},
"types": "./dist/commonjs/index.d.ts",
"type": "module"
}

View File

@@ -0,0 +1,50 @@
// GitHub: https://github.com/apache/avro
// Docs: https://avro.apache.org/docs/current/idl.html
Prism.languages['avro-idl'] = {
'comment': {
pattern: /\/\/.*|\/\*[\s\S]*?\*\//,
greedy: true
},
'string': {
pattern: /(^|[^\\])"(?:[^\r\n"\\]|\\.)*"/,
lookbehind: true,
greedy: true
},
'annotation': {
pattern: /@(?:[$\w.-]|`[^\r\n`]+`)+/,
greedy: true,
alias: 'function'
},
'function-identifier': {
pattern: /`[^\r\n`]+`(?=\s*\()/,
greedy: true,
alias: 'function'
},
'identifier': {
pattern: /`[^\r\n`]+`/,
greedy: true
},
'class-name': {
pattern: /(\b(?:enum|error|protocol|record|throws)\b\s+)[$\w]+/,
lookbehind: true,
greedy: true
},
'keyword': /\b(?:array|boolean|bytes|date|decimal|double|enum|error|false|fixed|float|idl|import|int|local_timestamp_ms|long|map|null|oneway|protocol|record|schema|string|throws|time_ms|timestamp_ms|true|union|uuid|void)\b/,
'function': /\b[a-z_]\w*(?=\s*\()/i,
'number': [
{
pattern: /(^|[^\w.])-?(?:(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|0x(?:[a-f0-9]+(?:\.[a-f0-9]*)?|\.[a-f0-9]+)(?:p[+-]?\d+)?)[dfl]?(?![\w.])/i,
lookbehind: true
},
/-?\b(?:Infinity|NaN)\b/
],
'operator': /=/,
'punctuation': /[()\[\]{}<>.:,;-]/
};
Prism.languages.avdl = Prism.languages['avro-idl'];

View File

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

View File

@@ -0,0 +1,17 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const ChartNoAxesColumnDecreasing = createLucideIcon("ChartNoAxesColumnDecreasing", [
["path", { d: "M12 20V10", key: "g8npz5" }],
["path", { d: "M18 20v-4", key: "8uic4z" }],
["path", { d: "M6 20V4", key: "1w1bmo" }]
]);
export { ChartNoAxesColumnDecreasing as default };
//# sourceMappingURL=chart-no-axes-column-decreasing.js.map

View File

@@ -0,0 +1,8 @@
import { JWEInvalid } from '../util/errors.js';
import { bitLength } from './iv.js';
const checkIvLength = (enc, iv) => {
if (iv.length << 3 !== bitLength(enc)) {
throw new JWEInvalid('Invalid Initialization Vector length');
}
};
export default checkIvLength;

View File

@@ -0,0 +1 @@
{"version":3,"file":"rrweb.d.ts","sourceRoot":"","sources":["../../../../src/util/rrweb.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,WAAW,GAAG,IAAI,CAY1E"}

View File

@@ -0,0 +1,28 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const getNavigationEntry = require('./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.getNavigationEntry();
return navEntry?.activationStart ?? 0;
};
exports.getActivationStart = getActivationStart;
//# sourceMappingURL=getActivationStart.js.map

View File

@@ -0,0 +1,23 @@
import { DirectusUser } from "./user.js";
import { DirectusFlow } from "./flow.js";
import { MergeCoreCollection } from "../types/schema.js";
//#region src/schema/operation.d.ts
type DirectusOperation<Schema = any> = MergeCoreCollection<Schema, 'directus_operations', {
id: string;
name: string | null;
key: string;
type: string;
position_x: number;
position_y: number;
timestamp: string;
options: Record<string, any> | null;
resolve: DirectusOperation<Schema> | string | null;
reject: DirectusOperation<Schema> | string | null;
flow: DirectusFlow<Schema> | string;
date_created: 'datetime' | null;
user_created: DirectusUser<Schema> | string | null;
}>;
//#endregion
export { DirectusOperation };
//# sourceMappingURL=operation.d.ts.map

View File

@@ -0,0 +1,6 @@
import { getTableName } from 'drizzle-orm';
export const getNameFromDrizzleTable = (table)=>{
return getTableName(table);
};
//# sourceMappingURL=getNameFromDrizzleTable.js.map

View File

@@ -0,0 +1,31 @@
import type { AnyColumn } from "./column.cjs";
import { Column } from "./column.cjs";
import { entityKind } from "./entity.cjs";
import type { Relation } from "./relations.cjs";
import type { View } from "./sql/sql.cjs";
import { SQL } from "./sql/sql.cjs";
import { Table } from "./table.cjs";
export declare class ColumnAliasProxyHandler<TColumn extends Column> implements ProxyHandler<TColumn> {
private table;
static readonly [entityKind]: string;
constructor(table: Table | View);
get(columnObj: TColumn, prop: string | symbol): any;
}
export declare class TableAliasProxyHandler<T extends Table | View> implements ProxyHandler<T> {
private alias;
private replaceOriginalName;
static readonly [entityKind]: string;
constructor(alias: string, replaceOriginalName: boolean);
get(target: T, prop: string | symbol): any;
}
export declare class RelationTableAliasProxyHandler<T extends Relation> implements ProxyHandler<T> {
private alias;
static readonly [entityKind]: string;
constructor(alias: string);
get(target: T, prop: string | symbol): any;
}
export declare function aliasedTable<T extends Table | View>(table: T, tableAlias: string): T;
export declare function aliasedRelation<T extends Relation>(relation: T, tableAlias: string): T;
export declare function aliasedTableColumn<T extends AnyColumn>(column: T, tableAlias: string): T;
export declare function mapColumnsInAliasedSQLToAlias(query: SQL.Aliased, alias: string): SQL.Aliased;
export declare function mapColumnsInSQLToAlias(query: SQL, alias: string): SQL;

View File

@@ -0,0 +1,17 @@
type ModuleInfo = Record<string, string>;
/**
* Add node modules / packages to the event.
* For this, multiple sources are used:
* - They can be injected at build time into the __SENTRY_SERVER_MODULES__ variable (e.g. in Next.js)
* - They are extracted from the dependencies & devDependencies in the package.json file
* - They are extracted from the require.cache (CJS only)
*/
export declare const modulesIntegration: () => {
name: string;
processEvent(event: import("@sentry/core").Event): import("@sentry/core").Event;
getModules: typeof _getModules;
};
/** Fetches the list of modules and the versions loaded by the entry file for your node.js app. */
declare function _getModules(): ModuleInfo;
export {};
//# sourceMappingURL=modules.d.ts.map

View File

@@ -0,0 +1,139 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var query_exports = {};
__export(query_exports, {
GelRelationalQuery: () => GelRelationalQuery,
RelationalQueryBuilder: () => RelationalQueryBuilder
});
module.exports = __toCommonJS(query_exports);
var import_entity = require("../../entity.cjs");
var import_query_promise = require("../../query-promise.cjs");
var import_relations = require("../../relations.cjs");
var import_tracing = require("../../tracing.cjs");
class RelationalQueryBuilder {
constructor(fullSchema, schema, tableNamesMap, table, tableConfig, dialect, session) {
this.fullSchema = fullSchema;
this.schema = schema;
this.tableNamesMap = tableNamesMap;
this.table = table;
this.tableConfig = tableConfig;
this.dialect = dialect;
this.session = session;
}
static [import_entity.entityKind] = "GelRelationalQueryBuilder";
findMany(config) {
return new GelRelationalQuery(
this.fullSchema,
this.schema,
this.tableNamesMap,
this.table,
this.tableConfig,
this.dialect,
this.session,
config ? config : {},
"many"
);
}
findFirst(config) {
return new GelRelationalQuery(
this.fullSchema,
this.schema,
this.tableNamesMap,
this.table,
this.tableConfig,
this.dialect,
this.session,
config ? { ...config, limit: 1 } : { limit: 1 },
"first"
);
}
}
class GelRelationalQuery extends import_query_promise.QueryPromise {
constructor(fullSchema, schema, tableNamesMap, table, tableConfig, dialect, session, config, mode) {
super();
this.fullSchema = fullSchema;
this.schema = schema;
this.tableNamesMap = tableNamesMap;
this.table = table;
this.tableConfig = tableConfig;
this.dialect = dialect;
this.session = session;
this.config = config;
this.mode = mode;
}
static [import_entity.entityKind] = "GelRelationalQuery";
/** @internal */
_prepare(name) {
return import_tracing.tracer.startActiveSpan("drizzle.prepareQuery", () => {
const { query, builtQuery } = this._toSQL();
return this.session.prepareQuery(
builtQuery,
void 0,
name,
true,
(rawRows, mapColumnValue) => {
const rows = rawRows.map(
(row) => (0, import_relations.mapRelationalRow)(this.schema, this.tableConfig, row, query.selection, mapColumnValue)
);
if (this.mode === "first") {
return rows[0];
}
return rows;
}
);
});
}
prepare(name) {
return this._prepare(name);
}
_getQuery() {
return this.dialect.buildRelationalQueryWithoutPK({
fullSchema: this.fullSchema,
schema: this.schema,
tableNamesMap: this.tableNamesMap,
table: this.table,
tableConfig: this.tableConfig,
queryConfig: this.config,
tableAlias: this.tableConfig.tsName
});
}
/** @internal */
getSQL() {
return this._getQuery().sql;
}
_toSQL() {
const query = this._getQuery();
const builtQuery = this.dialect.sqlToQuery(query.sql);
return { query, builtQuery };
}
toSQL() {
return this._toSQL().builtQuery;
}
execute() {
return import_tracing.tracer.startActiveSpan("drizzle.operation", () => {
return this._prepare().execute(void 0);
});
}
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
GelRelationalQuery,
RelationalQueryBuilder
});
//# sourceMappingURL=query.cjs.map

View File

@@ -0,0 +1,43 @@
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports._clearDefaultServiceNameCache = exports.defaultServiceName = void 0;
let serviceName;
/**
* Returns the default service name for OpenTelemetry resources.
* In Node.js environments, returns "unknown_service:<process.argv0>".
* In browser/edge environments, returns "unknown_service".
*/
function defaultServiceName() {
if (serviceName === undefined) {
try {
const argv0 = globalThis.process.argv0;
serviceName = argv0 ? `unknown_service:${argv0}` : 'unknown_service';
}
catch {
serviceName = 'unknown_service';
}
}
return serviceName;
}
exports.defaultServiceName = defaultServiceName;
/** @internal For testing purposes only */
function _clearDefaultServiceNameCache() {
serviceName = undefined;
}
exports._clearDefaultServiceNameCache = _clearDefaultServiceNameCache;
//# sourceMappingURL=default-service-name.js.map

View File

@@ -0,0 +1,150 @@
import { sql } from 'drizzle-orm';
import { foreignKey, index, integer, numeric, sqliteTable, text, uniqueIndex } from 'drizzle-orm/sqlite-core';
import { v4 as uuidv4 } from 'uuid';
const rawColumnBuilderMap = {
integer,
numeric,
text
};
export const buildDrizzleTable = ({ adapter, locales, rawTable })=>{
const columns = {};
for (const [key, column] of Object.entries(rawTable.columns)){
switch(column.type){
case 'boolean':
{
columns[key] = integer(column.name, {
mode: 'boolean'
});
break;
}
case 'enum':
if ('locale' in column) {
columns[key] = text(column.name, {
enum: locales
});
} else {
columns[key] = text(column.name, {
enum: column.options
});
}
break;
case 'geometry':
case 'jsonb':
{
columns[key] = text(column.name, {
mode: 'json'
});
break;
}
case 'numeric':
{
columns[key] = numeric(column.name, {
mode: 'number'
});
break;
}
case 'serial':
{
columns[key] = integer(column.name);
break;
}
case 'timestamp':
{
let builder = text(column.name);
if (column.defaultNow) {
builder = builder.default(sql`(strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))`);
}
columns[key] = builder;
break;
}
case 'uuid':
{
let builder = text(column.name, {
length: 36
});
if (column.defaultRandom) {
builder = builder.$defaultFn(()=>uuidv4());
}
columns[key] = builder;
break;
}
case 'varchar':
{
columns[key] = text(column.name);
break;
}
default:
columns[key] = rawColumnBuilderMap[column.type](column.name);
break;
}
if (column.reference) {
const ref = column.reference;
columns[key].references(()=>adapter.tables[ref.table][ref.name], {
onDelete: ref.onDelete
});
}
if (column.primaryKey) {
let args = undefined;
if (column.type === 'integer' && column.autoIncrement) {
args = {
autoIncrement: true
};
}
columns[key].primaryKey(args);
}
if (column.notNull) {
columns[key].notNull();
}
if (typeof column.default !== 'undefined') {
let sanitizedDefault = column.default;
if (column.type === 'geometry' && Array.isArray(column.default)) {
sanitizedDefault = JSON.stringify({
type: 'Point',
coordinates: [
column.default[0],
column.default[1]
]
});
}
columns[key].default(sanitizedDefault);
}
}
const extraConfig = (cols)=>{
const config = {};
if (rawTable.indexes) {
for (const [key, rawIndex] of Object.entries(rawTable.indexes)){
let fn = index;
if (rawIndex.unique) {
fn = uniqueIndex;
}
if (Array.isArray(rawIndex.on)) {
if (rawIndex.on.length) {
config[key] = fn(rawIndex.name).on(...rawIndex.on.map((colName)=>cols[colName]));
}
} else {
config[key] = fn(rawIndex.name).on(cols[rawIndex.on]);
}
}
}
if (rawTable.foreignKeys) {
for (const [key, rawForeignKey] of Object.entries(rawTable.foreignKeys)){
let builder = foreignKey({
name: rawForeignKey.name,
columns: rawForeignKey.columns.map((colName)=>cols[colName]),
foreignColumns: rawForeignKey.foreignColumns.map((column)=>adapter.tables[column.table][column.name])
});
if (rawForeignKey.onDelete) {
builder = builder.onDelete(rawForeignKey.onDelete);
}
if (rawForeignKey.onUpdate) {
builder = builder.onDelete(rawForeignKey.onUpdate);
}
config[key] = builder;
}
}
return config;
};
adapter.tables[rawTable.name] = sqliteTable(rawTable.name, columns, extraConfig);
};
//# sourceMappingURL=buildDrizzleTable.js.map

View File

@@ -0,0 +1,2 @@
const e=e=>{let t=(e,n=[])=>{if(typeof e==`object`){let r=[];for(let i in e){let a=e[i]??[];if(Array.isArray(a))for(let e of a)r.push(t(e,[...n,i]));else if(typeof a==`object`)for(let e of Object.keys(a)){let o=a[e];for(let a of o)r.push(t(a,[...n,`${i}:${e}`]))}}return r.flatMap(e=>e)}return[...n,String(e)].join(`.`)};return e.flatMap(e=>t(e))};export{e as formatFields};
//# sourceMappingURL=format-fields.js.map

View File

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

View File

@@ -0,0 +1,156 @@
import { debug } from '@sentry/core';
import { DEBUG_BUILD } from '../debug-build.js';
import { captureLog } from '../logs/capture.js';
const DEFAULT_CAPTURED_LEVELS = ['trace', 'debug', 'info', 'warn', 'error', 'fatal'];
// See: https://github.com/winstonjs/triple-beam
const LEVEL_SYMBOL = Symbol.for('level');
const MESSAGE_SYMBOL = Symbol.for('message');
const SPLAT_SYMBOL = Symbol.for('splat');
/**
* Options for the Sentry Winston transport.
*/
/**
* Creates a new Sentry Winston transport that fowards logs to Sentry. Requires the `enableLogs` option to be enabled.
*
* Supports Winston 3.x.x.
*
* @param TransportClass - The Winston transport class to extend.
* @returns The extended transport class.
*
* @example
* ```ts
* const winston = require('winston');
* const Transport = require('winston-transport');
*
* const SentryWinstonTransport = Sentry.createSentryWinstonTransport(Transport);
*
* const logger = winston.createLogger({
* transports: [new SentryWinstonTransport()],
* });
* ```
*/
function createSentryWinstonTransport(
// eslint-disable-next-line @typescript-eslint/no-explicit-any
TransportClass,
sentryWinstonOptions,
) {
// @ts-ignore - We know this is safe because SentryWinstonTransport extends TransportClass
class SentryWinstonTransport extends TransportClass {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
constructor(options) {
super(options);
this._levels = new Set(sentryWinstonOptions?.levels ?? DEFAULT_CAPTURED_LEVELS);
}
/**
* Forwards a winston log to the Sentry SDK.
*/
log(info, callback) {
try {
setImmediate(() => {
// @ts-ignore - We know this is safe because SentryWinstonTransport extends TransportClass
this.emit('logged', info);
});
if (!isObject(info)) {
return;
}
const levelFromSymbol = info[LEVEL_SYMBOL];
// See: https://github.com/winstonjs/winston?tab=readme-ov-file#streams-objectmode-and-info-objects
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { level, message, timestamp, ...attributes } = info;
// Remove all symbols from the remaining attributes
attributes[LEVEL_SYMBOL] = undefined;
attributes[MESSAGE_SYMBOL] = undefined;
attributes[SPLAT_SYMBOL] = undefined;
const customLevel = sentryWinstonOptions?.customLevelMap?.[levelFromSymbol ];
const winstonLogLevel = WINSTON_LEVEL_TO_LOG_SEVERITY_LEVEL_MAP[levelFromSymbol ];
const logSeverityLevel = customLevel ?? winstonLogLevel ?? 'info';
if (this._levels.has(logSeverityLevel)) {
captureLog(logSeverityLevel, message , {
...attributes,
'sentry.origin': 'auto.log.winston',
});
} else if (!customLevel && !winstonLogLevel) {
DEBUG_BUILD &&
debug.log(
`Winston log level ${levelFromSymbol} is not captured by Sentry. Please add ${levelFromSymbol} to the "customLevelMap" option of the Sentry Winston transport.`,
);
}
} catch {
// do nothing
}
if (callback) {
callback();
}
}
}
return SentryWinstonTransport ;
}
function isObject(anything) {
return typeof anything === 'object' && anything != null;
}
// npm
// {
// error: 0,
// warn: 1,
// info: 2,
// http: 3,
// verbose: 4,
// debug: 5,
// silly: 6
// }
//
// syslog
// {
// emerg: 0,
// alert: 1,
// crit: 2,
// error: 3,
// warning: 4,
// notice: 5,
// info: 6,
// debug: 7,
// }
const WINSTON_LEVEL_TO_LOG_SEVERITY_LEVEL_MAP = {
// npm
silly: 'trace',
// npm and syslog
debug: 'debug',
// npm
verbose: 'debug',
// npm
http: 'debug',
// npm and syslog
info: 'info',
// syslog
notice: 'info',
// npm
warn: 'warn',
// syslog
warning: 'warn',
// npm and syslog
error: 'error',
// syslog
emerg: 'fatal',
// syslog
alert: 'fatal',
// syslog
crit: 'fatal',
};
export { createSentryWinstonTransport };
//# sourceMappingURL=winston.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/sqlite-core/columns/all.ts"],"sourcesContent":["import { blob } from './blob.ts';\nimport { customType } from './custom.ts';\nimport { integer } from './integer.ts';\nimport { numeric } from './numeric.ts';\nimport { real } from './real.ts';\nimport { text } from './text.ts';\n\nexport function getSQLiteColumnBuilders() {\n\treturn {\n\t\tblob,\n\t\tcustomType,\n\t\tinteger,\n\t\tnumeric,\n\t\treal,\n\t\ttext,\n\t};\n}\n\nexport type SQLiteColumnBuilders = ReturnType<typeof getSQLiteColumnBuilders>;\n"],"mappings":"AAAA,SAAS,YAAY;AACrB,SAAS,kBAAkB;AAC3B,SAAS,eAAe;AACxB,SAAS,eAAe;AACxB,SAAS,YAAY;AACrB,SAAS,YAAY;AAEd,SAAS,0BAA0B;AACzC,SAAO;AAAA,IACN;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD;AACD;","names":[]}

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