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

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"timer-off.js","sources":["../../../src/icons/timer-off.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name TimerOff\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTAgMmg0IiAvPgogIDxwYXRoIGQ9Ik00LjYgMTFhOCA4IDAgMCAwIDEuNyA4LjcgOCA4IDAgMCAwIDguNyAxLjciIC8+CiAgPHBhdGggZD0iTTcuNCA3LjRhOCA4IDAgMCAxIDEwLjMgMSA4IDggMCAwIDEgLjkgMTAuMiIgLz4KICA8cGF0aCBkPSJtMiAyIDIwIDIwIiAvPgogIDxwYXRoIGQ9Ik0xMiAxMnYtMiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/timer-off\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 TimerOff = createLucideIcon('TimerOff', [\n ['path', { d: 'M10 2h4', key: 'n1abiw' }],\n ['path', { d: 'M4.6 11a8 8 0 0 0 1.7 8.7 8 8 0 0 0 8.7 1.7', key: '10he05' }],\n ['path', { d: 'M7.4 7.4a8 8 0 0 1 10.3 1 8 8 0 0 1 .9 10.2', key: '15f7sh' }],\n ['path', { d: 'm2 2 20 20', key: '1ooewy' }],\n ['path', { d: 'M12 12v-2', key: 'fwoke6' }],\n]);\n\nexport default TimerOff;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,iBAAiB,UAAY,CAAA,CAAA,CAAA;AAAA,CAAA,CAC5C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA+C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAC5E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA+C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAC5E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC3C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC5C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,15 @@
import { Baggage, BaggageEntry, BaggageEntryMetadata } from './types';
/**
* Create a new Baggage with optional entries
*
* @param entries An array of baggage entries the new baggage should contain
*/
export declare function createBaggage(entries?: Record<string, BaggageEntry>): Baggage;
/**
* 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.
*
*/
export declare function baggageEntryMetadataFromString(str: string): BaggageEntryMetadata;
//# sourceMappingURL=utils.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"attachViewActions.js","names":["getViewActions","editConfig","viewKey","actions","getSubViewActions","collectionOrGlobal","viewKeyArg","admin","components","views","edit"],"sources":["../../../src/views/Root/attachViewActions.ts"],"sourcesContent":["import type {\n CustomComponent,\n EditConfig,\n SanitizedCollectionConfig,\n SanitizedGlobalConfig,\n} from 'payload'\n\nexport function getViewActions({\n editConfig,\n viewKey,\n}: {\n editConfig: EditConfig\n viewKey: keyof EditConfig\n}): CustomComponent[] {\n if (editConfig && viewKey in editConfig && 'actions' in editConfig[viewKey]) {\n return editConfig[viewKey].actions ?? []\n }\n\n return []\n}\n\nexport function getSubViewActions({\n collectionOrGlobal,\n viewKeyArg,\n}: {\n collectionOrGlobal: SanitizedCollectionConfig | SanitizedGlobalConfig\n viewKeyArg?: keyof EditConfig\n}): CustomComponent[] {\n if (collectionOrGlobal?.admin?.components?.views?.edit) {\n let viewKey = viewKeyArg || 'default'\n if ('root' in collectionOrGlobal.admin.components.views.edit) {\n viewKey = 'root'\n }\n\n const actions = getViewActions({\n editConfig: collectionOrGlobal.admin?.components?.views?.edit,\n viewKey,\n })\n\n return actions\n }\n\n return []\n}\n"],"mappings":"AAOA,OAAO,SAASA,eAAe;EAC7BC,UAAU;EACVC;AAAO,CAIR;EACC,IAAID,UAAA,IAAcC,OAAA,IAAWD,UAAA,IAAc,aAAaA,UAAU,CAACC,OAAA,CAAQ,EAAE;IAC3E,OAAOD,UAAU,CAACC,OAAA,CAAQ,CAACC,OAAO,IAAI,EAAE;EAC1C;EAEA,OAAO,EAAE;AACX;AAEA,OAAO,SAASC,kBAAkB;EAChCC,kBAAkB;EAClBC;AAAU,CAIX;EACC,IAAID,kBAAA,EAAoBE,KAAA,EAAOC,UAAA,EAAYC,KAAA,EAAOC,IAAA,EAAM;IACtD,IAAIR,OAAA,GAAUI,UAAA,IAAc;IAC5B,IAAI,UAAUD,kBAAA,CAAmBE,KAAK,CAACC,UAAU,CAACC,KAAK,CAACC,IAAI,EAAE;MAC5DR,OAAA,GAAU;IACZ;IAEA,MAAMC,OAAA,GAAUH,cAAA,CAAe;MAC7BC,UAAA,EAAYI,kBAAA,CAAmBE,KAAK,EAAEC,UAAA,EAAYC,KAAA,EAAOC,IAAA;MACzDR;IACF;IAEA,OAAOC,OAAA;EACT;EAEA,OAAO,EAAE;AACX","ignoreList":[]}

View File

@@ -0,0 +1,119 @@
import { bindReporter } from './lib/bindReporter.js';
import { getActivationStart } from './lib/getActivationStart.js';
import { getVisibilityWatcher } from './lib/getVisibilityWatcher.js';
import { addPageListener, removePageListener } from './lib/globalListeners.js';
import { initMetric } from './lib/initMetric.js';
import { initUnique } from './lib/initUnique.js';
import { LCPEntryManager } from './lib/LCPEntryManager.js';
import { observe } from './lib/observe.js';
import { runOnce } from './lib/runOnce.js';
import { whenActivated } from './lib/whenActivated.js';
import { whenIdleOrHidden } from './lib/whenIdleOrHidden.js';
/*
* Copyright 2020 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.
*/
/** Thresholds for LCP. See https://web.dev/articles/lcp#what_is_a_good_lcp_score */
const LCPThresholds = [2500, 4000];
/**
* Calculates the [LCP](https://web.dev/articles/lcp) value for the current page and
* calls the `callback` function once the value is ready (along with the
* relevant `largest-contentful-paint` performance entry used to determine the
* value). The reported value is a `DOMHighResTimeStamp`.
*
* If the `reportAllChanges` configuration option is set to `true`, the
* `callback` function will be called any time a new `largest-contentful-paint`
* performance entry is dispatched, or once the final value of the metric has
* been determined.
*/
const onLCP = (onReport, opts = {}) => {
whenActivated(() => {
const visibilityWatcher = getVisibilityWatcher();
const metric = initMetric('LCP');
let report;
const lcpEntryManager = initUnique(opts, LCPEntryManager);
const handleEntries = (entries) => {
// If reportAllChanges is set then call this function for each entry,
// otherwise only consider the last one.
if (!opts.reportAllChanges) {
// eslint-disable-next-line no-param-reassign
entries = entries.slice(-1);
}
for (const entry of entries) {
lcpEntryManager._processEntry(entry);
// Only report if the page wasn't hidden prior to LCP.
if (entry.startTime < visibilityWatcher.firstHiddenTime) {
// The startTime attribute returns the value of the renderTime if it is
// not 0, and the value of the loadTime otherwise. The activationStart
// reference is used because LCP should be relative to page activation
// rather than navigation start if the page was prerendered. But in cases
// where `activationStart` occurs after the LCP, this time should be
// clamped at 0.
metric.value = Math.max(entry.startTime - getActivationStart(), 0);
metric.entries = [entry];
report();
}
}
};
const po = observe('largest-contentful-paint', handleEntries);
if (po) {
report = bindReporter(onReport, metric, LCPThresholds, opts.reportAllChanges);
// Ensure this logic only runs once, since it can be triggered from
// any of three different event listeners below.
const stopListening = runOnce(() => {
handleEntries(po.takeRecords() );
po.disconnect();
report(true);
});
// Need a separate wrapper to ensure the `runOnce` function above is
// common for all three functions
const stopListeningWrapper = (event) => {
if (event.isTrusted) {
// Wrap the listener in an idle callback so it's run in a separate
// task to reduce potential INP impact.
// https://github.com/GoogleChrome/web-vitals/issues/383
whenIdleOrHidden(stopListening);
removePageListener(event.type, stopListeningWrapper, {
capture: true,
});
}
};
// Stop listening after input or visibilitychange.
// Note: while scrolling is an input that stops LCP observation, it's
// unreliable since it can be programmatically generated.
// See: https://github.com/GoogleChrome/web-vitals/issues/75
for (const type of ['keydown', 'click', 'visibilitychange']) {
addPageListener(type, stopListeningWrapper, {
capture: true,
});
}
}
});
};
export { LCPThresholds, onLCP };
//# sourceMappingURL=getLCP.js.map

View File

@@ -0,0 +1,80 @@
import { createClient } from "gel";
import { entityKind } from "../entity.js";
import { GelDatabase } from "../gel-core/db.js";
import { GelDialect } from "../gel-core/dialect.js";
import { DefaultLogger } from "../logger.js";
import {
createTableRelationsHelpers,
extractTablesRelationalConfig
} from "../relations.js";
import { isConfig } from "../utils.js";
import { GelDbSession } from "./session.js";
class GelDriver {
constructor(client, dialect, options = {}) {
this.client = client;
this.dialect = dialect;
this.options = options;
}
static [entityKind] = "GelDriver";
createSession(schema) {
return new GelDbSession(this.client, this.dialect, schema, {
logger: this.options.logger,
cache: this.options.cache
});
}
}
class GelJsDatabase extends GelDatabase {
static [entityKind] = "GelJsDatabase";
}
function construct(client, config = {}) {
const dialect = new GelDialect({ casing: config.casing });
let logger;
if (config.logger === true) {
logger = new DefaultLogger();
} else if (config.logger !== false) {
logger = config.logger;
}
let schema;
if (config.schema) {
const tablesConfig = extractTablesRelationalConfig(config.schema, createTableRelationsHelpers);
schema = {
fullSchema: config.schema,
schema: tablesConfig.tables,
tableNamesMap: tablesConfig.tableNamesMap
};
}
const driver = new GelDriver(client, dialect, { logger, cache: config.cache });
const session = driver.createSession(schema);
const db = new GelJsDatabase(dialect, session, schema);
db.$client = client;
db.$cache = config.cache;
if (db.$cache) {
db.$cache["invalidate"] = config.cache?.onMutate;
}
return db;
}
function drizzle(...params) {
if (typeof params[0] === "string") {
const instance = createClient({ dsn: params[0] });
return construct(instance, params[1]);
}
if (isConfig(params[0])) {
const { connection, client, ...drizzleConfig } = params[0];
if (client) return construct(client, drizzleConfig);
const instance = createClient(connection);
return construct(instance, drizzleConfig);
}
return construct(params[0], params[1]);
}
((drizzle2) => {
function mock(config) {
return construct({}, config);
}
drizzle2.mock = mock;
})(drizzle || (drizzle = {}));
export {
GelDriver,
GelJsDatabase,
drizzle
};
//# sourceMappingURL=driver.js.map

View File

@@ -0,0 +1,24 @@
'use strict'
const { register, unregister } = require('../..')
const assert = require('assert')
function setup () {
const obj = { foo: 'bar' }
register(obj, shutdown)
setImmediate(function () {
unregister(obj)
unregister(obj) // twice, this should not throw
})
}
let shutdownCalled = false
function shutdown (obj) {
shutdownCalled = true
}
setup()
process.on('exit', function () {
assert.strictEqual(shutdownCalled, false)
})

View File

@@ -0,0 +1 @@
{"version":3,"file":"transform.js","sourceRoot":"","sources":["../../src/keywords/transform.ts"],"names":[],"mappings":";;;;;AACA,yEAA6C;AAE7C,MAAM,SAAS,GAAsB,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,UAAU,CAAC,IAAA,mBAAM,GAAE,CAAC,CAAA;AAEtE,kBAAe,SAAS,CAAA;AACxB,MAAM,CAAC,OAAO,GAAG,SAAS,CAAA"}

View File

@@ -0,0 +1,6 @@
var regenerator = require("./regenerator.js");
var regeneratorAsyncIterator = require("./regeneratorAsyncIterator.js");
function _regeneratorAsyncGen(r, e, t, o, n) {
return new regeneratorAsyncIterator(regenerator().w(r, e, t, o), n || Promise);
}
module.exports = _regeneratorAsyncGen, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -0,0 +1,58 @@
import { daysInYear } from "./constants.js";
/**
* @name milliseconds
* @category Millisecond Helpers
* @summary
* Returns the number of milliseconds in the specified, years, months, weeks, days, hours, minutes and seconds.
*
* @description
* Returns the number of milliseconds in the specified, years, months, weeks, days, hours, minutes and seconds.
*
* One years equals 365.2425 days according to the formula:
*
* > Leap year occurs every 4 years, except for years that are divisible by 100 and not divisible by 400.
* > 1 mean year = (365+1/4-1/100+1/400) days = 365.2425 days
*
* One month is a year divided by 12.
*
* @param duration - The object with years, months, weeks, days, hours, minutes and seconds to be added.
*
* @returns The milliseconds
*
* @example
* // 1 year in milliseconds
* milliseconds({ years: 1 })
* //=> 31556952000
*
* // 3 months in milliseconds
* milliseconds({ months: 3 })
* //=> 7889238000
*/
export function milliseconds({
years,
months,
weeks,
days,
hours,
minutes,
seconds,
}) {
let totalDays = 0;
if (years) totalDays += years * daysInYear;
if (months) totalDays += months * (daysInYear / 12);
if (weeks) totalDays += weeks * 7;
if (days) totalDays += days;
let totalSeconds = totalDays * 24 * 60 * 60;
if (hours) totalSeconds += hours * 60 * 60;
if (minutes) totalSeconds += minutes * 60;
if (seconds) totalSeconds += seconds;
return Math.trunc(totalSeconds * 1000);
}
// Fallback for modularized imports:
export default milliseconds;

View File

@@ -0,0 +1,180 @@
function checkAndSanitizeFieldsPermssions(data) {
let allFieldPermissionsTrue = true;
for(const key in data){
if (typeof data[key] === 'object') {
if (!checkAndSanitizePermissions(data[key])) {
allFieldPermissionsTrue = false;
} else {
;
data[key] = true;
}
} else if (data[key] !== true) {
allFieldPermissionsTrue = false;
}
}
// If all values are true or it's an empty object, return true
return allFieldPermissionsTrue;
}
/**
* Check if all permissions in a FieldPermissions, CollectionPermission or GlobalPermission object are true.
* If nested fields or blocks are present, the function will recursively check those as well.
*/ function checkAndSanitizePermissions(_data) {
const data = _data;
/**
* Check blocks permissions
*/ let blocksPermissions = true;
if ('blocks' in data && data.blocks) {
for(const blockSlug in data.blocks){
if (typeof data.blocks[blockSlug] === 'object') {
for(const key in data.blocks[blockSlug]){
/**
* Check fields in nested blocks
*/ if (key === 'fields') {
if (data.blocks[blockSlug].fields) {
if (!checkAndSanitizeFieldsPermssions(data.blocks[blockSlug].fields)) {
blocksPermissions = false;
} else {
;
data.blocks[blockSlug].fields = true;
}
}
} else {
if (typeof data.blocks[blockSlug][key] === 'object') {
/**
* Check Permissions in nested blocks
*/ if (isPermissionObject(data.blocks[blockSlug][key])) {
if (data.blocks[blockSlug][key]['permission'] === true && !('where' in data.blocks[blockSlug][key])) {
// If the permission is true and there is no where clause, set the key to true
data.blocks[blockSlug][key] = true;
continue;
} else if (data.blocks[blockSlug][key]['permission'] === true && 'where' in data.blocks[blockSlug][key]) {
// otherwise do nothing so we can keep the where clause
blocksPermissions = false;
} else {
blocksPermissions = false;
data.blocks[blockSlug][key] = false;
delete data.blocks[blockSlug][key];
continue;
}
} else {
throw new Error('Unexpected object in block permissions');
}
}
}
}
} else if (data.blocks[blockSlug] !== true) {
// If any value is not true, return false
blocksPermissions = false;
delete data.blocks[blockSlug];
}
}
if (blocksPermissions) {
;
data.blocks = true;
}
}
/**
* Check nested Fields permissions
*/ let fieldsPermissions = true;
if (data.fields) {
if (!checkAndSanitizeFieldsPermssions(data.fields)) {
fieldsPermissions = false;
} else {
;
data.fields = true;
}
}
/**
* Check other Permissions objects (e.g. read, write)
*/ let otherPermissions = true;
for(const key in data){
if (key === 'fields' || key === 'blocks') {
continue;
}
if (typeof data[key] === 'object') {
if (isPermissionObject(data[key])) {
if (data[key]['permission'] === true && !('where' in data[key])) {
// If the permission is true and there is no where clause, set the key to true
data[key] = true;
continue;
} else if (data[key]['permission'] === true && 'where' in data[key]) {
// otherwise do nothing so we can keep the where clause
otherPermissions = false;
} else {
otherPermissions = false;
data[key] = false;
delete data[key];
continue;
}
} else {
// eslint-disable-next-line no-console
console.error('Unexpected object in fields permissions', data, 'key:', key);
throw new Error('Unexpected object in fields permissions');
}
} else if (data[key] !== true) {
// If any value is not true, return false
otherPermissions = false;
}
}
// If all values are true or it's an empty object, return true
return fieldsPermissions && blocksPermissions && otherPermissions;
}
/**
* Check if an object is a permission object.
*/ function isPermissionObject(data) {
return typeof data === 'object' && 'permission' in data && typeof data['permission'] === 'boolean';
}
/**
* Recursively remove empty objects from an object.
*/ function cleanEmptyObjects(obj) {
Object.keys(obj).forEach((key)=>{
if (typeof obj[key] === 'object' && obj[key] !== null) {
// Recursive call
cleanEmptyObjects(obj[key]);
if (Object.keys(obj[key]).length === 0) {
// Delete the key if the object is empty
delete obj[key];
}
} else if (obj[key] === null || obj[key] === undefined) {
delete obj[key];
}
});
}
export function recursivelySanitizeCollections(obj) {
if (typeof obj !== 'object') {
return;
}
const collectionPermissions = Object.values(obj);
for (const collectionPermission of collectionPermissions){
checkAndSanitizePermissions(collectionPermission);
}
}
export function recursivelySanitizeGlobals(obj) {
if (typeof obj !== 'object') {
return;
}
const globalPermissions = Object.values(obj);
for (const globalPermission of globalPermissions){
checkAndSanitizePermissions(globalPermission);
}
}
/**
* Recursively remove empty objects and false values from an object.
*
* @internal
*/ export function sanitizePermissions(data) {
if (data.canAccessAdmin === false) {
delete data.canAccessAdmin;
}
if (data.collections) {
recursivelySanitizeCollections(data.collections);
}
if (data.globals) {
recursivelySanitizeGlobals(data.globals);
}
// Run clean up of empty objects at the end
cleanEmptyObjects(data);
return data;
}
//# sourceMappingURL=sanitizePermissions.js.map

View File

@@ -0,0 +1,100 @@
export declare type DiagLogFunction = (message: string, ...args: unknown[]) => void;
/**
* Defines an internal diagnostic logger interface which is used to log internal diagnostic
* messages, you can set the default diagnostic logger via the {@link DiagAPI} setLogger function.
* API provided implementations include :-
* - a No-Op {@link createNoopDiagLogger}
* - a {@link DiagLogLevel} filtering wrapper {@link createLogLevelDiagLogger}
* - a general Console {@link DiagConsoleLogger} version.
*/
export interface DiagLogger {
/** Log an error scenario that was not expected and caused the requested operation to fail. */
error: DiagLogFunction;
/**
* Log a warning scenario to inform the developer of an issues that should be investigated.
* The requested operation may or may not have succeeded or completed.
*/
warn: DiagLogFunction;
/**
* Log a general informational message, this should not affect functionality.
* This is also the default logging level so this should NOT be used for logging
* debugging level information.
*/
info: DiagLogFunction;
/**
* Log a general debug message that can be useful for identifying a failure.
* Information logged at this level may include diagnostic details that would
* help identify a failure scenario.
* For example: Logging the order of execution of async operations.
*/
debug: DiagLogFunction;
/**
* Log a detailed (verbose) trace level logging that can be used to identify failures
* where debug level logging would be insufficient, this level of tracing can include
* input and output parameters and as such may include PII information passing through
* the API. As such it is recommended that this level of tracing should not be enabled
* in a production environment.
*/
verbose: DiagLogFunction;
}
/**
* Defines the available internal logging levels for the diagnostic logger, the numeric values
* of the levels are defined to match the original values from the initial LogLevel to avoid
* compatibility/migration issues for any implementation that assume the numeric ordering.
*/
export declare enum DiagLogLevel {
/** Diagnostic Logging level setting to disable all logging (except and forced logs) */
NONE = 0,
/** Identifies an error scenario */
ERROR = 30,
/** Identifies a warning scenario */
WARN = 50,
/** General informational log message */
INFO = 60,
/** General debug log message */
DEBUG = 70,
/**
* Detailed trace level logging should only be used for development, should only be set
* in a development environment.
*/
VERBOSE = 80,
/** Used to set the logging level to include all logging */
ALL = 9999
}
/**
* Defines options for ComponentLogger
*/
export interface ComponentLoggerOptions {
namespace: string;
}
export interface DiagLoggerOptions {
/**
* The {@link DiagLogLevel} used to filter logs sent to the logger.
*
* @defaultValue DiagLogLevel.INFO
*/
logLevel?: DiagLogLevel;
/**
* Setting this value to `true` will suppress the warning message normally emitted when registering a logger when another logger is already registered.
*/
suppressOverrideMessage?: boolean;
}
export interface DiagLoggerApi {
/**
* Set the global DiagLogger and DiagLogLevel.
* If a global diag logger is already set, this will override it.
*
* @param logger - The {@link DiagLogger} instance to set as the default logger.
* @param options - A {@link DiagLoggerOptions} object. If not provided, default values will be set.
* @returns `true` if the logger was successfully registered, else `false`
*/
setLogger(logger: DiagLogger, options?: DiagLoggerOptions): boolean;
/**
*
* @param logger - The {@link DiagLogger} instance to set as the default logger.
* @param logLevel - The {@link DiagLogLevel} used to filter logs sent to the logger. If not provided it will default to {@link DiagLogLevel.INFO}.
* @returns `true` if the logger was successfully registered, else `false`
*/
setLogger(logger: DiagLogger, logLevel?: DiagLogLevel): boolean;
}
//# sourceMappingURL=types.d.ts.map

View File

@@ -0,0 +1,15 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
import * as modDev from './LexicalAutoEmbedPlugin.dev.mjs';
import * as modProd from './LexicalAutoEmbedPlugin.prod.mjs';
const mod = process.env.NODE_ENV !== 'production' ? modDev : modProd;
export const AutoEmbedOption = mod.AutoEmbedOption;
export const INSERT_EMBED_COMMAND = mod.INSERT_EMBED_COMMAND;
export const LexicalAutoEmbedPlugin = mod.LexicalAutoEmbedPlugin;
export const URL_MATCHER = mod.URL_MATCHER;

View File

@@ -0,0 +1,29 @@
import { formatDistance } from "./ar-MA/_lib/formatDistance.js";
import { formatLong } from "./ar-MA/_lib/formatLong.js";
import { formatRelative } from "./ar-MA/_lib/formatRelative.js";
import { localize } from "./ar-MA/_lib/localize.js";
import { match } from "./ar-MA/_lib/match.js";
/**
* @category Locales
* @summary Arabic locale (Moroccan Arabic).
* @language Moroccan Arabic
* @iso-639-2 ara
* @author Achraf Rrami [@rramiachraf](https://github.com/rramiachraf)
*/
export const arMA = {
code: "ar-MA",
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
options: {
// Monday is 1
weekStartsOn: 1,
firstWeekContainsDate: 1,
},
};
// Fallback for modularized imports:
export default arMA;

View File

@@ -0,0 +1,9 @@
import type { Event } from '@sentry/core';
import type { ReplayContainer } from '../../types';
/**
* Determine if event should be sampled (only applies in buffer mode).
* When an event is captured by `handleGlobalEvent`, when in buffer mode
* we determine if we want to sample the error or not.
*/
export declare function shouldSampleForBufferEvent(replay: ReplayContainer, event: Event): boolean;
//# sourceMappingURL=shouldSampleForBufferEvent.d.ts.map

View File

@@ -0,0 +1,116 @@
import { TracerProvider, MeterProvider, Span } from '@opentelemetry/api';
import { LoggerProvider } from '@opentelemetry/api-logs';
/** Interface Instrumentation to apply patch. */
export interface Instrumentation<ConfigType extends InstrumentationConfig = InstrumentationConfig> {
/** Instrumentation Name */
instrumentationName: string;
/** Instrumentation Version */
instrumentationVersion: string;
/** Method to disable the instrumentation */
disable(): void;
/** Method to enable the instrumentation */
enable(): void;
/** Method to set tracer provider */
setTracerProvider(tracerProvider: TracerProvider): void;
/** Method to set meter provider */
setMeterProvider(meterProvider: MeterProvider): void;
/** Method to set logger provider */
setLoggerProvider?(loggerProvider: LoggerProvider): void;
/** Method to set instrumentation config */
setConfig(config: ConfigType): void;
/** Method to get instrumentation config */
getConfig(): ConfigType;
}
/**
* Base interface for configuration options common to all instrumentations.
* This interface can be extended by individual instrumentations to include
* additional configuration options specific to that instrumentation.
* All configuration options must be optional.
*/
export interface InstrumentationConfig {
/**
* Whether to enable the plugin.
* @default true
*/
enabled?: boolean;
}
/**
* This interface defines the params that are be added to the wrapped function
* using the "shimmer.wrap"
*/
export interface ShimWrapped extends Function {
__wrapped: boolean;
__unwrap: Function;
__original: Function;
}
export interface InstrumentationModuleFile {
/** Name of file to be patched with relative path */
name: string;
moduleExports?: unknown;
/** Supported versions for the file.
*
* A module version is supported if one of the supportedVersions in the array satisfies the module version.
* The syntax of the version is checked with a function compatible
* with [node-semver's `satisfies()` function](https://github.com/npm/node-semver#ranges-1).
* If the version is not supported, we won't apply instrumentation patch.
* If omitted, all versions of the module will be patched.
*
* It is recommended to always specify a range that is bound to a major version, to avoid breaking changes.
* New major versions should be reviewed and tested before being added to the supportedVersions array.
*
* Example: ['>=1.2.3 <3']
*/
supportedVersions: string[];
/** Method to patch the instrumentation */
patch(moduleExports: unknown, moduleVersion?: string): unknown;
/** Method to unpatch the instrumentation */
unpatch(moduleExports?: unknown, moduleVersion?: string): void;
}
export interface InstrumentationModuleDefinition {
/** Module name or path */
name: string;
moduleExports?: any;
/** Instrumented module version */
moduleVersion?: string;
/** Supported version of module.
*
* A module version is supported if one of the supportedVersions in the array satisfies the module version.
* The syntax of the version is checked with the `satisfies` function of
* "The [semantic versioner](https://semver.org) for npm".
* If the version is not supported, we won't apply instrumentation patch (see `enable` method).
* If omitted, all versions of the module will be patched.
*
* It is recommended to always specify a range that is bound to a major version, to avoid breaking changes.
* New major versions should be reviewed and tested before being added to the supportedVersions array.
*
* Example: ['>=1.2.3 <3']
*/
supportedVersions: string[];
/** Module internal files to be patched */
files: InstrumentationModuleFile[];
/** If set to true, the includePrerelease check will be included when calling semver.satisfies */
includePrerelease?: boolean;
/** Method to patch the instrumentation */
patch?: // eslint-disable-next-line @typescript-eslint/no-explicit-any
((moduleExports: any, moduleVersion?: string | undefined) => any) | undefined;
/** Method to unpatch the instrumentation */
unpatch?: ((moduleExports: any, moduleVersion?: string | undefined) => void) | undefined;
}
/**
* SpanCustomizationHook is a common way for instrumentations to expose extension points
* where users can add custom behavior to a span based on info object passed to the hook at different times of the span lifecycle.
* This is an advanced feature, commonly used to add additional or non-spec-compliant attributes to the span,
* capture payloads, modify the span in some way, or carry some other side effect.
*
* The hook is registered with the instrumentation specific config by implementing an handler function with this signature,
* and if the hook is present, it will be called with the span and the event information
* when the event is emitted.
*
* When and under what conditions the hook is called and what data is passed
* in the info argument, is specific to each instrumentation and life-cycle event
* and should be documented where it is used.
*
* Instrumentation may define multiple hooks, for different spans, or different span life-cycle events.
*/
export type SpanCustomizationHook<SpanCustomizationInfoType> = (span: Span, info: SpanCustomizationInfoType) => void;
//# sourceMappingURL=types.d.ts.map

View File

@@ -0,0 +1,179 @@
"use strict";
exports.localize = void 0;
var _index = require("../../_lib/buildLocalizeFn.cjs");
const eraValues = {
narrow: ["e.m.a", "m.a.j"],
abbreviated: ["e.m.a", "m.a.j"],
wide: ["enne meie ajaarvamist", "meie ajaarvamise järgi"],
};
const quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["K1", "K2", "K3", "K4"],
wide: ["1. kvartal", "2. kvartal", "3. kvartal", "4. kvartal"],
};
const monthValues = {
narrow: ["J", "V", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
abbreviated: [
"jaan",
"veebr",
"märts",
"apr",
"mai",
"juuni",
"juuli",
"aug",
"sept",
"okt",
"nov",
"dets",
],
wide: [
"jaanuar",
"veebruar",
"märts",
"aprill",
"mai",
"juuni",
"juuli",
"august",
"september",
"oktoober",
"november",
"detsember",
],
};
const dayValues = {
narrow: ["P", "E", "T", "K", "N", "R", "L"],
short: ["P", "E", "T", "K", "N", "R", "L"],
abbreviated: [
"pühap.",
"esmasp.",
"teisip.",
"kolmap.",
"neljap.",
"reede.",
"laup.",
],
wide: [
"pühapäev",
"esmaspäev",
"teisipäev",
"kolmapäev",
"neljapäev",
"reede",
"laupäev",
],
};
const dayPeriodValues = {
narrow: {
am: "AM",
pm: "PM",
midnight: "kesköö",
noon: "keskpäev",
morning: "hommik",
afternoon: "pärastlõuna",
evening: "õhtu",
night: "öö",
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "kesköö",
noon: "keskpäev",
morning: "hommik",
afternoon: "pärastlõuna",
evening: "õhtu",
night: "öö",
},
wide: {
am: "AM",
pm: "PM",
midnight: "kesköö",
noon: "keskpäev",
morning: "hommik",
afternoon: "pärastlõuna",
evening: "õhtu",
night: "öö",
},
};
const formattingDayPeriodValues = {
narrow: {
am: "AM",
pm: "PM",
midnight: "keskööl",
noon: "keskpäeval",
morning: "hommikul",
afternoon: "pärastlõunal",
evening: "õhtul",
night: "öösel",
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "keskööl",
noon: "keskpäeval",
morning: "hommikul",
afternoon: "pärastlõunal",
evening: "õhtul",
night: "öösel",
},
wide: {
am: "AM",
pm: "PM",
midnight: "keskööl",
noon: "keskpäeval",
morning: "hommikul",
afternoon: "pärastlõunal",
evening: "õhtul",
night: "öösel",
},
};
const ordinalNumber = (dirtyNumber, _options) => {
const number = Number(dirtyNumber);
return number + ".";
};
const localize = (exports.localize = {
ordinalNumber,
era: (0, _index.buildLocalizeFn)({
values: eraValues,
defaultWidth: "wide",
}),
quarter: (0, _index.buildLocalizeFn)({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: (quarter) => quarter - 1,
}),
month: (0, _index.buildLocalizeFn)({
values: monthValues,
defaultWidth: "wide",
formattingValues: monthValues,
defaultFormattingWidth: "wide",
}),
day: (0, _index.buildLocalizeFn)({
values: dayValues,
defaultWidth: "wide",
formattingValues: dayValues,
defaultFormattingWidth: "wide",
}),
dayPeriod: (0, _index.buildLocalizeFn)({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide",
}),
});

View File

@@ -0,0 +1,17 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _possibleConstructorReturn;
var _assertThisInitialized = require("./assertThisInitialized.js");
function _possibleConstructorReturn(self, value) {
if (value && (typeof value === "object" || typeof value === "function")) {
return value;
} else if (value !== void 0) {
throw new TypeError("Derived constructors may only return object or undefined");
}
return (0, _assertThisInitialized.default)(self);
}
//# sourceMappingURL=possibleConstructorReturn.js.map

View File

@@ -0,0 +1,43 @@
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true,
});
exports.introspectionFromSchema = introspectionFromSchema;
var _invariant = require('../jsutils/invariant.js');
var _parser = require('../language/parser.js');
var _execute = require('../execution/execute.js');
var _getIntrospectionQuery = require('./getIntrospectionQuery.js');
/**
* Build an IntrospectionQuery from a GraphQLSchema
*
* IntrospectionQuery is useful for utilities that care about type and field
* relationships, but do not need to traverse through those relationships.
*
* This is the inverse of buildClientSchema. The primary use case is outside
* of the server context, for instance when doing schema comparisons.
*/
function introspectionFromSchema(schema, options) {
const optionsWithDefaults = {
specifiedByUrl: true,
directiveIsRepeatable: true,
schemaDescription: true,
inputValueDeprecation: true,
oneOf: true,
...options,
};
const document = (0, _parser.parse)(
(0, _getIntrospectionQuery.getIntrospectionQuery)(optionsWithDefaults),
);
const result = (0, _execute.executeSync)({
schema,
document,
});
(!result.errors && result.data) || (0, _invariant.invariant)(false);
return result.data;
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../../src/core/__tests__/logger.ts"],"names":[],"mappings":";;AAAA,oCAAiC;AAEjC,QAAQ,CAAC,QAAQ,EAAE;IACf,8DAA8D;IAC9D,IAAI,OAAY,CAAC;IAEjB,UAAU,CAAC;QACP,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,kBAAkB,CAAC;YACrD,aAAa;QACjB,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IAEH,SAAS,CAAC;QACN,OAAO,CAAC,WAAW,EAAE,CAAC;IAC1B,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,8CAA8C,EAAE;QAC/C,IAAM,EAAE,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC;QACpC,IAAM,MAAM,GAAG,IAAI,eAAM,CAAC,EAAC,EAAE,IAAA,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC,CAAC;QAC/C,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACvB,MAAM,CAAC,OAAO,CAAC,CAAC,wBAAwB,CAAC,EAAE,EAAE,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC,CAAC;IAC5F,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,kDAAkD,EAAE;QACnD,IAAM,EAAE,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC;QACpC,IAAM,MAAM,GAAG,IAAI,eAAM,CAAC,EAAC,EAAE,IAAA,EAAE,OAAO,EAAE,KAAK,EAAC,CAAC,CAAC;QAChD,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACvB,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAC;IAC3C,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}

View File

@@ -0,0 +1,41 @@
"use strict";
exports.formatLong = void 0;
var _index = require("../../_lib/buildFormatLongFn.js");
const dateFormats = {
full: "EEEE, MMMM do, y",
long: "MMMM do, y",
medium: "MMM d, y",
short: "MM/dd/yyyy",
};
const timeFormats = {
full: "h:mm:ss a zzzz",
long: "h:mm:ss a z",
medium: "h:mm:ss a",
short: "h:mm a",
};
const dateTimeFormats = {
full: "{{date}} 'دە' {{time}}",
long: "{{date}} 'دە' {{time}}",
medium: "{{date}}, {{time}}",
short: "{{date}}, {{time}}",
};
const formatLong = (exports.formatLong = {
date: (0, _index.buildFormatLongFn)({
formats: dateFormats,
defaultWidth: "full",
}),
time: (0, _index.buildFormatLongFn)({
formats: timeFormats,
defaultWidth: "full",
}),
dateTime: (0, _index.buildFormatLongFn)({
formats: dateTimeFormats,
defaultWidth: "full",
}),
});

View File

@@ -0,0 +1,55 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const core = require('@sentry/core');
/**
* Sentry integration for capturing feature flag evaluations from LaunchDarkly.
*
* See the [feature flag documentation](https://develop.sentry.dev/sdk/expected-features/#feature-flags) for more information.
*
* @example
* ```
* import * as Sentry from '@sentry/browser';
* import {launchDarklyIntegration, buildLaunchDarklyFlagUsedInspector} from '@sentry/browser';
* import * as LaunchDarkly from 'launchdarkly-js-client-sdk';
*
* Sentry.init(..., integrations: [launchDarklyIntegration()])
* const ldClient = LaunchDarkly.initialize(..., {inspectors: [buildLaunchDarklyFlagUsedHandler()]});
* ```
*/
const launchDarklyIntegration = core.defineIntegration(() => {
return {
name: 'LaunchDarkly',
processEvent(event, _hint, _client) {
return core._INTERNAL_copyFlagsFromScopeToEvent(event);
},
};
}) ;
/**
* LaunchDarkly hook to listen for and buffer flag evaluations. This needs to
* be registered as an 'inspector' in LaunchDarkly initialize() options,
* separately from `launchDarklyIntegration`. Both the hook and the integration
* are needed to capture LaunchDarkly flags.
*/
function buildLaunchDarklyFlagUsedHandler() {
return {
name: 'sentry-flag-auditor',
type: 'flag-used',
synchronous: true,
/**
* Handle a flag evaluation by storing its name and value on the current scope.
*/
method: (flagKey, flagDetail, _context) => {
core._INTERNAL_insertFlagToScope(flagKey, flagDetail.value);
core._INTERNAL_addFeatureFlagToActiveSpan(flagKey, flagDetail.value);
},
};
}
exports.buildLaunchDarklyFlagUsedHandler = buildLaunchDarklyFlagUsedHandler;
exports.launchDarklyIntegration = launchDarklyIntegration;
//# sourceMappingURL=integration.js.map

View File

@@ -0,0 +1,9 @@
import getScrollAccessor from './getScrollAccessor';
/**
* Gets or sets the scroll top position of a given element.
*
* @param node the element
* @param val the position to set
*/
export default getScrollAccessor('pageYOffset');

View File

@@ -0,0 +1,27 @@
/**
* @name differenceInCalendarYears
* @category Year Helpers
* @summary Get the number of calendar years between the given dates.
*
* @description
* Get the number of calendar years between the given dates.
*
* @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 later date
* @param dateRight - The earlier date
* @returns The number of calendar years
*
* @example
* // How many calendar years are between 31 December 2013 and 11 February 2015?
* const result = differenceInCalendarYears(
* new Date(2015, 1, 11),
* new Date(2013, 11, 31)
* )
* //=> 2
*/
export declare function differenceInCalendarYears<DateType extends Date>(
dateLeft: DateType | number | string,
dateRight: DateType | number | string,
): number;

View File

@@ -0,0 +1 @@
{"version":3,"file":"ExplorerBase.d.ts","sourceRoot":"","sources":["../src/ExplorerBase.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,KAAK,EACL,iBAAiB,EAClB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEjC,cAAM,YAAY,CAAC,CAAC,SAAS,eAAe,GAAG,mBAAmB;IAChE,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,KAAK,CAAC;IACrC,SAAS,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,KAAK,CAAC;IACvC,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;gBAEV,OAAO,EAAE,CAAC;IAUtB,cAAc,IAAI,IAAI;IAMtB,gBAAgB,IAAI,IAAI;IAMxB,WAAW,IAAI,IAAI;IAK1B,OAAO,CAAC,cAAc;IAwBtB,SAAS,CAAC,0BAA0B,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO;IAMxE,SAAS,CAAC,qBAAqB,CAC7B,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,iBAAiB,GAC/B,MAAM,GAAG,IAAI;IAWhB,OAAO,CAAC,eAAe;IASvB,SAAS,CAAC,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM;IAmBzD,SAAS,CAAC,gCAAgC,CACxC,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,iBAAiB,GAC/B,iBAAiB;IAUpB,SAAS,CAAC,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;CAKnD;AAMD,iBAAS,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAGzD;AAED,OAAO,EAAE,YAAY,EAAE,uBAAuB,EAAE,CAAC"}

View File

@@ -0,0 +1,31 @@
export { isDragActive } from 'motion-dom';
export { invariant, noop, progress } from 'motion-utils';
export { animate, createScopedAnimate } from './animation/animate/index.mjs';
export { animateMini } from './animation/animators/waapi/animate-style.mjs';
export { scroll } from './render/dom/scroll/index.mjs';
export { scrollInfo } from './render/dom/scroll/track.mjs';
export { inView } from './render/dom/viewport/index.mjs';
export { MotionValue, motionValue } from './value/index.mjs';
export { anticipate } from './easing/anticipate.mjs';
export { backIn, backInOut, backOut } from './easing/back.mjs';
export { circIn, circInOut, circOut } from './easing/circ.mjs';
export { cubicBezier } from './easing/cubic-bezier.mjs';
export { easeIn, easeInOut, easeOut } from './easing/ease.mjs';
export { mirrorEasing } from './easing/modifiers/mirror.mjs';
export { reverseEasing } from './easing/modifiers/reverse.mjs';
export { steps } from './easing/steps.mjs';
export { inertia } from './animation/generators/inertia.mjs';
export { keyframes } from './animation/generators/keyframes.mjs';
export { spring } from './animation/generators/spring/index.mjs';
export { stagger } from './animation/utils/stagger.mjs';
export { time } from './frameloop/sync-time.mjs';
export { clamp } from './utils/clamp.mjs';
export { delayInSeconds as delay } from './utils/delay.mjs';
export { distance, distance2D } from './utils/distance.mjs';
export { interpolate } from './utils/interpolate.mjs';
export { mix } from './utils/mix/index.mjs';
export { pipe } from './utils/pipe.mjs';
export { transform } from './utils/transform.mjs';
export { wrap } from './utils/wrap.mjs';
export { cancelSync, sync } from './frameloop/index-legacy.mjs';
export { cancelFrame, frame, frameData, frameSteps } from './frameloop/frame.mjs';

View File

@@ -0,0 +1 @@
{"version":3,"file":"align-vertical-distribute-center.js","sources":["../../../src/icons/align-vertical-distribute-center.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name AlignVerticalDistributeCenter\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMjIgMTdoLTMiIC8+CiAgPHBhdGggZD0iTTIyIDdoLTUiIC8+CiAgPHBhdGggZD0iTTUgMTdIMiIgLz4KICA8cGF0aCBkPSJNNyA3SDIiIC8+CiAgPHJlY3QgeD0iNSIgeT0iMTQiIHdpZHRoPSIxNCIgaGVpZ2h0PSI2IiByeD0iMiIgLz4KICA8cmVjdCB4PSI3IiB5PSI0IiB3aWR0aD0iMTAiIGhlaWdodD0iNiIgcng9IjIiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/align-vertical-distribute-center\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 AlignVerticalDistributeCenter = createLucideIcon('AlignVerticalDistributeCenter', [\n ['path', { d: 'M22 17h-3', key: '1lwga1' }],\n ['path', { d: 'M22 7h-5', key: 'o2endc' }],\n ['path', { d: 'M5 17H2', key: '1gx9xc' }],\n ['path', { d: 'M7 7H2', key: '6bq26l' }],\n ['rect', { x: '5', y: '14', width: '14', height: '6', rx: '2', key: '1qrzuf' }],\n ['rect', { x: '7', y: '4', width: '10', height: '6', rx: '2', key: 'we8e9z' }],\n]);\n\nexport default AlignVerticalDistributeCenter;\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,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAgC,iBAAiB,+BAAiC,CAAA,CAAA,CAAA;AAAA,CAAA,CACtF,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,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,CAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACvC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAG,KAAK,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,QAAQ,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC9E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAG,KAAK,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,QAAQ,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC/E,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,22 @@
import createSharedNavigationFns from '../shared/createSharedNavigationFns.js';
import getServerLocale from './getServerLocale.js';
function createNavigation(routing) {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const {
config,
...fns
} = createSharedNavigationFns(getServerLocale, routing);
function notSupported(hookName) {
return () => {
throw new Error(`\`${hookName}\` is not supported in Server Components. You can use this hook if you convert the calling component to a Client Component.`);
};
}
return {
...fns,
usePathname: notSupported('usePathname'),
useRouter: notSupported('useRouter')
};
}
export { createNavigation as default };

View File

@@ -0,0 +1 @@
{"version":3,"file":"cloneDataFromOriginalDoc.d.ts","sourceRoot":"","sources":["../../../../src/fields/hooks/beforeChange/cloneDataFromOriginalDoc.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAEpE,eAAO,MAAM,wBAAwB,oBAClB,SAAS,GAAG,UAAU,KACtC,SAAS,GAAG,UAkBd,CAAA"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"policies.js","names":[],"sources":["../../../../src/rest/commands/read/policies.ts"],"sourcesContent":["import type { DirectusPolicy } from '../../../schema/policy.js';\nimport type { ApplyQueryFields, Query } from '../../../types/index.js';\nimport type { RestCommand } from '../../types.js';\nimport { throwIfEmpty } from '../../utils/index.js';\n\nexport type ReadPolicyOutput<\n\tSchema,\n\tTQuery extends Query<Schema, Item>,\n\tItem extends object = DirectusPolicy<Schema>,\n> = ApplyQueryFields<Schema, Item, TQuery['fields']>;\n\nexport type ReadPolicyGlobalsOutput = {\n\tapp_access: boolean;\n\tadmin_access: boolean;\n\tenforce_tfa: boolean;\n};\n\n/**\n * List all policies that exist in the project.\n * @param query The query parameters\n * @returns An array of up to limit Policy objects. If no items are available, data will be an empty array.\n */\nexport const readPolicies =\n\t<Schema, const TQuery extends Query<Schema, DirectusPolicy<Schema>>>(\n\t\tquery?: TQuery,\n\t): RestCommand<ReadPolicyOutput<Schema, TQuery>[], Schema> =>\n\t() => ({\n\t\tpath: `/policies`,\n\t\tparams: query ?? {},\n\t\tmethod: 'GET',\n\t});\n\n/**\n * Read a specific policy.\n * @param key The primary key of the permission\n * @param query The query parameters\n * @returns Returns a Policy object if a valid primary key was provided.\n * @throws Will throw if key is empty\n */\nexport const readPolicy =\n\t<Schema, const TQuery extends Query<Schema, DirectusPolicy<Schema>>>(\n\t\tkey: DirectusPolicy<Schema>['id'],\n\t\tquery?: TQuery,\n\t): RestCommand<ReadPolicyOutput<Schema, TQuery>, Schema> =>\n\t() => {\n\t\tthrowIfEmpty(String(key), 'Key cannot be empty');\n\n\t\treturn {\n\t\t\tpath: `/policies/${key}`,\n\t\t\tparams: query ?? {},\n\t\t\tmethod: 'GET',\n\t\t};\n\t};\n\n/**\n * Check the current user's policy globals.\n */\nexport const readPolicyGlobals =\n\t<Schema>(): RestCommand<ReadPolicyGlobalsOutput, Schema> =>\n\t() => ({\n\t\tpath: `/policies/me/globals`,\n\t\tmethod: 'GET',\n\t});\n"],"mappings":"6DAsBA,MAAa,EAEX,QAEM,CACN,KAAM,YACN,OAAQ,GAAS,EAAE,CACnB,OAAQ,MACR,EASW,GAEX,EACA,SAGA,EAAa,OAAO,EAAI,CAAE,sBAAsB,CAEzC,CACN,KAAM,aAAa,IACnB,OAAQ,GAAS,EAAE,CACnB,OAAQ,MACR,EAMU,WAEL,CACN,KAAM,uBACN,OAAQ,MACR"}

View File

@@ -0,0 +1,205 @@
export type { ClientClass as SentryCoreCurrentScopes } from './sdk';
export type { AsyncContextStrategy } from './asyncContext/types';
export type { Carrier } from './carrier';
export type { OfflineStore, OfflineTransportOptions } from './transports/offline';
export type { ServerRuntimeClientOptions } from './server-runtime-client';
export type { IntegrationIndex } from './integration';
export * from './tracing';
export * from './semanticAttributes';
export { createEventEnvelope, createSessionEnvelope, createSpanEnvelope } from './envelope';
export { captureCheckIn, withMonitor, captureException, captureEvent, captureMessage, lastEventId, close, flush, setContext, setExtra, setExtras, setTag, setTags, setUser, setConversationId, isInitialized, isEnabled, startSession, endSession, captureSession, addEventProcessor, } from './exports';
export { getCurrentScope, getIsolationScope, getGlobalScope, withScope, withIsolationScope, getClient, getTraceContextFromScope, } from './currentScopes';
export { getDefaultCurrentScope, getDefaultIsolationScope } from './defaultScopes';
export { setAsyncContextStrategy } from './asyncContext';
export { getGlobalSingleton, getMainCarrier } from './carrier';
export { makeSession, closeSession, updateSession } from './session';
export { Scope } from './scope';
export type { CaptureContext, ScopeContext, ScopeData } from './scope';
export { notifyEventProcessors } from './eventProcessors';
export { getEnvelopeEndpointWithUrlEncodedAuth, getReportDialogEndpoint } from './api';
export { Client } from './client';
export { ServerRuntimeClient } from './server-runtime-client';
export { initAndBind, setCurrentClient } from './sdk';
export { createTransport } from './transports/base';
export { makeOfflineTransport } from './transports/offline';
export { makeMultiplexedTransport, MULTIPLEXED_TRANSPORT_EXTRA_KEY } from './transports/multiplexed';
export { getIntegrationsToSetup, addIntegration, defineIntegration, installedIntegrations } from './integration';
export { _INTERNAL_skipAiProviderWrapping, _INTERNAL_shouldSkipAiProviderWrapping, _INTERNAL_clearAiProviderSkips, } from './utils/ai/providerSkip';
export { envToBool } from './utils/envToBool';
export { applyScopeDataToEvent, mergeScopeData, getCombinedScopeData } from './utils/scopeData';
export { prepareEvent } from './utils/prepareEvent';
export type { ExclusiveEventHintOrCaptureContext } from './utils/prepareEvent';
export { createCheckInEnvelope } from './checkin';
export { hasSpansEnabled } from './utils/hasSpansEnabled';
export { isSentryRequestUrl } from './utils/isSentryRequestUrl';
export { handleCallbackErrors } from './utils/handleCallbackErrors';
export { parameterize, fmt } from './utils/parameterize';
export { addAutoIpAddressToSession } from './utils/ipAddress';
export { addAutoIpAddressToUser } from './utils/ipAddress';
export { convertSpanLinksForEnvelope, spanToTraceHeader, spanToJSON, spanIsSampled, spanToTraceContext, getSpanDescendants, getStatusMessage, getRootSpan, getActiveSpan, addChildSpanToSpan, spanTimeInputToSeconds, updateSpanName, } from './utils/spanUtils';
export { _setSpanForScope as _INTERNAL_setSpanForScope } from './utils/spanOnScope';
export { parseSampleRate } from './utils/parseSampleRate';
export { applySdkMetadata } from './utils/sdkMetadata';
export { getTraceData } from './utils/traceData';
export { shouldPropagateTraceForUrl } from './utils/tracePropagationTargets';
export { getTraceMetaTags } from './utils/meta';
export { debounce } from './utils/debounce';
export { winterCGHeadersToDict, winterCGRequestToRequestData, httpRequestToRequestData, extractQueryParamsFromUrl, headersToDict, httpHeadersToSpanAttributes, } from './utils/request';
export { DEFAULT_ENVIRONMENT, DEV_ENVIRONMENT } from './constants';
export { addBreadcrumb } from './breadcrumbs';
export { functionToStringIntegration } from './integrations/functiontostring';
export { inboundFiltersIntegration } from './integrations/eventFilters';
export { eventFiltersIntegration } from './integrations/eventFilters';
export { linkedErrorsIntegration } from './integrations/linkederrors';
export { moduleMetadataIntegration } from './integrations/moduleMetadata';
export { requestDataIntegration } from './integrations/requestdata';
export { captureConsoleIntegration } from './integrations/captureconsole';
export { dedupeIntegration } from './integrations/dedupe';
export { extraErrorDataIntegration } from './integrations/extraerrordata';
export { rewriteFramesIntegration } from './integrations/rewriteframes';
export { supabaseIntegration, instrumentSupabaseClient } from './integrations/supabase';
export { zodErrorsIntegration } from './integrations/zoderrors';
export { thirdPartyErrorFilterIntegration } from './integrations/third-party-errors-filter';
export { consoleIntegration } from './integrations/console';
export { featureFlagsIntegration, type FeatureFlagsIntegration } from './integrations/featureFlags';
export { growthbookIntegration } from './integrations/featureFlags';
export { conversationIdIntegration } from './integrations/conversationId';
export { profiler } from './profiling';
export { instrumentFetchRequest } from './fetch';
export { trpcMiddleware } from './trpc';
export { wrapMcpServerWithSentry } from './integrations/mcp-server';
export { captureFeedback } from './feedback';
export type { ReportDialogOptions } from './report-dialog';
export { _INTERNAL_captureLog, _INTERNAL_flushLogsBuffer, _INTERNAL_captureSerializedLog } from './logs/internal';
export * as logger from './logs/public-api';
export { consoleLoggingIntegration } from './logs/console-integration';
export { _INTERNAL_captureMetric, _INTERNAL_flushMetricsBuffer, _INTERNAL_captureSerializedMetric, } from './metrics/internal';
export * as metrics from './metrics/public-api';
export type { MetricOptions } from './metrics/public-api';
export { createConsolaReporter } from './integrations/consola';
export { addVercelAiProcessors } from './tracing/vercel-ai';
export { _INTERNAL_getSpanForToolCallId, _INTERNAL_cleanupToolCallSpan } from './tracing/vercel-ai/utils';
export { instrumentOpenAiClient } from './tracing/openai';
export { OPENAI_INTEGRATION_NAME } from './tracing/openai/constants';
export { instrumentAnthropicAiClient } from './tracing/anthropic-ai';
export { ANTHROPIC_AI_INTEGRATION_NAME } from './tracing/anthropic-ai/constants';
export { instrumentGoogleGenAIClient } from './tracing/google-genai';
export { GOOGLE_GENAI_INTEGRATION_NAME } from './tracing/google-genai/constants';
export type { GoogleGenAIResponse } from './tracing/google-genai/types';
export { createLangChainCallbackHandler } from './tracing/langchain';
export { LANGCHAIN_INTEGRATION_NAME } from './tracing/langchain/constants';
export type { LangChainOptions, LangChainIntegration } from './tracing/langchain/types';
export { instrumentStateGraphCompile, instrumentLangGraph } from './tracing/langgraph';
export { LANGGRAPH_INTEGRATION_NAME } from './tracing/langgraph/constants';
export type { LangGraphOptions, LangGraphIntegration, CompiledGraph } from './tracing/langgraph/types';
export type { OpenAiClient, OpenAiOptions, InstrumentedMethod } from './tracing/openai/types';
export type { AnthropicAiClient, AnthropicAiOptions, AnthropicAiInstrumentedMethod, AnthropicAiResponse, } from './tracing/anthropic-ai/types';
export type { GoogleGenAIClient, GoogleGenAIChat, GoogleGenAIOptions, GoogleGenAIIstrumentedMethod, } from './tracing/google-genai/types';
export type { FeatureFlag } from './utils/featureFlags';
export { _INTERNAL_copyFlagsFromScopeToEvent, _INTERNAL_insertFlagToScope, _INTERNAL_addFeatureFlagToActiveSpan, _INTERNAL_FLAG_BUFFER_SIZE, _INTERNAL_MAX_FLAGS_PER_SPAN, } from './utils/featureFlags';
export { applyAggregateErrorsToEvent } from './utils/aggregate-errors';
export { getBreadcrumbLogLevelFromHttpStatusCode } from './utils/breadcrumb-log-level';
export { getComponentName, getLocationHref, htmlTreeAsString } from './utils/browser';
export { dsnFromString, dsnToString, makeDsn } from './utils/dsn';
export { SentryError } from './utils/error';
export { GLOBAL_OBJ } from './utils/worldwide';
export type { InternalGlobal } from './utils/worldwide';
export { addConsoleInstrumentationHandler } from './instrument/console';
export { addFetchEndInstrumentationHandler, addFetchInstrumentationHandler } from './instrument/fetch';
export { addGlobalErrorInstrumentationHandler } from './instrument/globalError';
export { addGlobalUnhandledRejectionInstrumentationHandler } from './instrument/globalUnhandledRejection';
export { addHandler, maybeInstrument, resetInstrumentationHandlers, triggerHandlers } from './instrument/handlers';
export { isDOMError, isDOMException, isElement, isError, isErrorEvent, isEvent, isInstanceOf, isParameterizedString, isPlainObject, isPrimitive, isRegExp, isString, isSyntheticEvent, isThenable, isVueViewModel, } from './utils/is';
export { isBrowser } from './utils/isBrowser';
export { CONSOLE_LEVELS, consoleSandbox, debug, originalConsoleMethods } from './utils/debug-logger';
export type { SentryDebugLogger } from './utils/debug-logger';
export { addContextToFrame, addExceptionMechanism, addExceptionTypeValue, checkOrSetAlreadyCaught, getEventDescription, parseSemver, uuid4, } from './utils/misc';
export { isNodeEnv, loadModule } from './utils/node';
export { normalize, normalizeToSize, normalizeUrlToBase } from './utils/normalize';
export { addNonEnumerableProperty, convertToPlainObject, dropUndefinedKeys, extractExceptionKeysForMessage, fill, getOriginalFunction, markFunctionWrapped, objectify, } from './utils/object';
export { basename, dirname, isAbsolute, join, normalizePath, relative, resolve } from './utils/path';
export { makePromiseBuffer, SENTRY_BUFFER_FULL_ERROR } from './utils/promisebuffer';
export type { PromiseBuffer } from './utils/promisebuffer';
export { severityLevelFromString } from './utils/severity';
export { replaceExports } from './utils/exports';
export { UNKNOWN_FUNCTION, createStackParser, getFramesFromEvent, getFunctionName, stackParserFromStackParserOptions, stripSentryFramesAndReverse, } from './utils/stacktrace';
export { filenameIsInApp, node, nodeStackLineParser } from './utils/node-stack-trace';
export { isMatchingPattern, safeJoin, snipLine, stringMatchesSomePattern, truncate } from './utils/string';
export { isNativeFunction, supportsDOMError, supportsDOMException, supportsErrorEvent, supportsFetch, supportsHistory, supportsNativeFetch, supportsReferrerPolicy, supportsReportingObserver, } from './utils/supports';
export { SyncPromise, rejectedSyncPromise, resolvedSyncPromise } from './utils/syncpromise';
export { browserPerformanceTimeOrigin, dateTimestampInSeconds, timestampInSeconds } from './utils/time';
export { TRACEPARENT_REGEXP, extractTraceparentData, generateSentryTraceHeader, propagationContextFromHeaders, shouldContinueTrace, generateTraceparentHeader, } from './utils/tracing';
export { getSDKSource, isBrowserBundle } from './utils/env';
export type { SdkSource } from './utils/env';
export { addItemToEnvelope, createAttachmentEnvelopeItem, createEnvelope, createEventEnvelopeHeaders, createSpanEnvelopeItem, envelopeContainsItemType, envelopeItemTypeToDataCategory, forEachEnvelopeItem, getSdkMetadataForEnvelopeHeader, parseEnvelope, serializeEnvelope, } from './utils/envelope';
export { createClientReportEnvelope } from './utils/clientreport';
export { DEFAULT_RETRY_AFTER, disabledUntil, isRateLimited, parseRetryAfterHeader, updateRateLimits, } from './utils/ratelimit';
export type { RateLimits } from './utils/ratelimit';
export { MAX_BAGGAGE_STRING_LENGTH, SENTRY_BAGGAGE_KEY_PREFIX, SENTRY_BAGGAGE_KEY_PREFIX_REGEX, baggageHeaderToDynamicSamplingContext, dynamicSamplingContextToSentryBaggageHeader, parseBaggageHeader, objectToBaggageHeader, } from './utils/baggage';
export { getSanitizedUrlString, parseUrl, stripUrlQueryAndFragment, parseStringToURLObject, getHttpSpanDetailsFromUrlObject, isURLObjectRelative, getSanitizedUrlStringFromUrlObject, stripDataUrlContent, } from './utils/url';
export { eventFromMessage, eventFromUnknownInput, exceptionFromError, parseStackFrames, _enhanceErrorWithSentryInfo as _INTERNAL_enhanceErrorWithSentryInfo, } from './utils/eventbuilder';
export { callFrameToStackFrame, watchdogTimer } from './utils/anr';
export { LRUMap } from './utils/lru';
export { generateTraceId, generateSpanId } from './utils/propagationContext';
export { vercelWaitUntil } from './utils/vercelWaitUntil';
export { flushIfServerless } from './utils/flushIfServerless';
export { SDK_VERSION } from './utils/version';
export { getDebugImagesForResources, getFilenameToDebugIdMap } from './utils/debug-ids';
export { getFilenameToMetadataMap } from './metadata';
export { escapeStringForRegex } from './vendor/escapeStringForRegex';
export type { Attachment } from './types-hoist/attachment';
export type { Breadcrumb, BreadcrumbHint, FetchBreadcrumbData, XhrBreadcrumbData, FetchBreadcrumbHint, XhrBreadcrumbHint, } from './types-hoist/breadcrumb';
export type { ClientReport, Outcome, EventDropReason } from './types-hoist/clientreport';
export type { Context, Contexts, DeviceContext, OsContext, AppContext, CultureContext, TraceContext, CloudResourceContext, MissingInstrumentationContext, } from './types-hoist/context';
export type { DataCategory } from './types-hoist/datacategory';
export type { DsnComponents, DsnLike, DsnProtocol } from './types-hoist/dsn';
export type { DebugImage, DebugMeta } from './types-hoist/debugMeta';
export type { AttachmentItem, BaseEnvelopeHeaders, BaseEnvelopeItemHeaders, ClientReportEnvelope, ClientReportItem, DynamicSamplingContext, Envelope, EnvelopeItemType, EnvelopeItem, EventEnvelope, EventEnvelopeHeaders, EventItem, ReplayEnvelope, FeedbackItem, SessionEnvelope, SessionItem, UserFeedbackItem, CheckInItem, CheckInEnvelope, RawSecurityEnvelope, RawSecurityItem, ProfileItem, ProfileChunkEnvelope, ProfileChunkItem, SpanEnvelope, SpanItem, LogEnvelope, MetricEnvelope, } from './types-hoist/envelope';
export type { ExtendedError } from './types-hoist/error';
export type { Event, EventHint, EventType, ErrorEvent, TransactionEvent } from './types-hoist/event';
export type { EventProcessor } from './types-hoist/eventprocessor';
export type { Exception } from './types-hoist/exception';
export type { Extra, Extras } from './types-hoist/extra';
export type { Integration, IntegrationFn } from './types-hoist/integration';
export type { Mechanism } from './types-hoist/mechanism';
export type { ExtractedNodeRequestData, HttpHeaderValue, Primitive, WorkerLocation } from './types-hoist/misc';
export type { ClientOptions, CoreOptions as Options, ServerRuntimeOptions } from './types-hoist/options';
export type { Package } from './types-hoist/package';
export type { PolymorphicEvent, PolymorphicRequest } from './types-hoist/polymorphics';
export type { ThreadId, FrameId, StackId, ThreadCpuSample, ThreadCpuStack, ThreadCpuFrame, ThreadCpuProfile, ContinuousThreadCpuProfile, Profile, ProfileChunk, } from './types-hoist/profiling';
export type { ReplayEvent, ReplayRecordingData, ReplayRecordingMode } from './types-hoist/replay';
export type { FeedbackEvent, FeedbackFormData, FeedbackInternalOptions, FeedbackModalIntegration, FeedbackScreenshotIntegration, SendFeedback, SendFeedbackParams, UserFeedback, } from './types-hoist/feedback';
export type { QueryParams, RequestEventData, RequestHookInfo, ResponseHookInfo, SanitizedRequestData, } from './types-hoist/request';
export type { Runtime } from './types-hoist/runtime';
export type { SdkInfo } from './types-hoist/sdkinfo';
export type { SdkMetadata } from './types-hoist/sdkmetadata';
export type { SessionAggregates, AggregationCounts, Session, SessionContext, SessionStatus, SerializedSession, } from './types-hoist/session';
export type { SeverityLevel } from './types-hoist/severity';
export type { Span, SentrySpanArguments, SpanOrigin, SpanAttributeValue, SpanAttributes, SpanTimeInput, SpanJSON, SpanContextData, TraceFlag, } from './types-hoist/span';
export type { SpanStatus } from './types-hoist/spanStatus';
export type { Log, LogSeverityLevel } from './types-hoist/log';
export type { Metric, MetricType, SerializedMetric, SerializedMetricContainer, SerializedMetricAttributeValue, } from './types-hoist/metric';
export type { TimedEvent } from './types-hoist/timedEvent';
export type { StackFrame } from './types-hoist/stackframe';
export type { Stacktrace, StackParser, StackLineParser, StackLineParserFn } from './types-hoist/stacktrace';
export type { PropagationContext, TracePropagationTargets, SerializedTraceData } from './types-hoist/tracing';
export type { StartSpanOptions } from './types-hoist/startSpanOptions';
export type { TraceparentData, TransactionSource } from './types-hoist/transaction';
export type { TracesSamplerSamplingContext, CustomSamplingContext, SamplingContext, } from './types-hoist/samplingcontext';
export type { DurationUnit, InformationUnit, FractionUnit, MeasurementUnit, NoneUnit, Measurements, } from './types-hoist/measurement';
export type { Thread } from './types-hoist/thread';
export type { Transport, TransportRequest, TransportMakeRequestResponse, InternalBaseTransportOptions, BaseTransportOptions, TransportRequestExecutor, } from './types-hoist/transport';
export type { User } from './types-hoist/user';
export type { WebFetchHeaders, WebFetchRequest } from './types-hoist/webfetchapi';
export type { WrappedFunction } from './types-hoist/wrappedfunction';
export type { HandlerDataFetch, HandlerDataXhr, HandlerDataDom, HandlerDataConsole, HandlerDataHistory, HandlerDataError, HandlerDataUnhandledRejection, ConsoleLevel, SentryXhrData, SentryWrappedXMLHttpRequest, } from './types-hoist/instrument';
export type { BrowserClientReplayOptions, BrowserClientProfilingOptions } from './types-hoist/browseroptions';
export type { CheckIn, MonitorConfig, FinishedCheckIn, InProgressCheckIn, SerializedCheckIn, } from './types-hoist/checkin';
export type { ParameterizedString } from './types-hoist/parameterize';
export type { ContinuousProfiler, ProfilingIntegration, Profiler } from './types-hoist/profiling';
export type { ViewHierarchyData, ViewHierarchyWindow } from './types-hoist/view-hierarchy';
export type { LegacyCSPReport } from './types-hoist/csp';
export type { SerializedLog, SerializedLogContainer } from './types-hoist/log';
export type { BuildTimeOptionsBase, UnstableVitePluginOptions, UnstableRollupPluginOptions, UnstableWebpackPluginOptions, } from './build-time-plugins/buildTimeOptionsBase';
export { withRandomSafeContext as _INTERNAL_withRandomSafeContext, type RandomSafeContextRunner as _INTERNAL_RandomSafeContextRunner, safeMathRandom as _INTERNAL_safeMathRandom, safeDateNow as _INTERNAL_safeDateNow, } from './utils/randomSafeContext';
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,76 @@
/**
* Original by Scott Helme.
*
* Reference: https://scotthelme.co.uk/csp-cheat-sheet/
*
* Supports the following:
* - https://www.w3.org/TR/CSP1/
* - https://www.w3.org/TR/CSP2/
* - https://www.w3.org/TR/CSP3/
*/
(function (Prism) {
/**
* @param {string} source
* @returns {RegExp}
*/
function value(source) {
return RegExp(/([ \t])/.source + '(?:' + source + ')' + /(?=[\s;]|$)/.source, 'i');
}
Prism.languages.csp = {
'directive': {
pattern: /(^|[\s;])(?:base-uri|block-all-mixed-content|(?:child|connect|default|font|frame|img|manifest|media|object|prefetch|script|style|worker)-src|disown-opener|form-action|frame-(?:ancestors|options)|input-protection(?:-(?:clip|selectors))?|navigate-to|plugin-types|policy-uri|referrer|reflected-xss|report-(?:to|uri)|require-sri-for|sandbox|(?:script|style)-src-(?:attr|elem)|upgrade-insecure-requests)(?=[\s;]|$)/i,
lookbehind: true,
alias: 'property'
},
'scheme': {
pattern: value(/[a-z][a-z0-9.+-]*:/.source),
lookbehind: true
},
'none': {
pattern: value(/'none'/.source),
lookbehind: true,
alias: 'keyword'
},
'nonce': {
pattern: value(/'nonce-[-+/\w=]+'/.source),
lookbehind: true,
alias: 'number'
},
'hash': {
pattern: value(/'sha(?:256|384|512)-[-+/\w=]+'/.source),
lookbehind: true,
alias: 'number'
},
'host': {
pattern: value(
/[a-z][a-z0-9.+-]*:\/\/[^\s;,']*/.source +
'|' +
/\*[^\s;,']*/.source +
'|' +
/[a-z0-9-]+(?:\.[a-z0-9-]+)+(?::[\d*]+)?(?:\/[^\s;,']*)?/.source
),
lookbehind: true,
alias: 'url',
inside: {
'important': /\*/
}
},
'keyword': [
{
pattern: value(/'unsafe-[a-z-]+'/.source),
lookbehind: true,
alias: 'unsafe'
},
{
pattern: value(/'[a-z-]+'/.source),
lookbehind: true,
alias: 'safe'
},
],
'punctuation': /;/
};
}(Prism));

View File

@@ -0,0 +1,16 @@
import type { CoreOptions } from '../types-hoist/options';
/**
* A builder for the SDK metadata in the options for the SDK initialization.
*
* Note: This function is identical to `buildMetadata` in Remix and NextJS and SvelteKit.
* We don't extract it for bundle size reasons.
* @see https://github.com/getsentry/sentry-javascript/pull/7404
* @see https://github.com/getsentry/sentry-javascript/pull/4196
*
* If you make changes to this function consider updating the others as well.
*
* @param options SDK options object that gets mutated
* @param names list of package names
*/
export declare function applySdkMetadata(options: CoreOptions, name: string, names?: string[], source?: string): void;
//# sourceMappingURL=sdkMetadata.d.ts.map

View File

@@ -0,0 +1,34 @@
/*
* 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.
*/
/**
* No-op implementations of {@link TextMapPropagator}.
*/
var NoopTextMapPropagator = /** @class */ (function () {
function NoopTextMapPropagator() {
}
/** Noop inject function does nothing */
NoopTextMapPropagator.prototype.inject = function (_context, _carrier) { };
/** Noop extract function does nothing and returns the input context */
NoopTextMapPropagator.prototype.extract = function (context, _carrier) {
return context;
};
NoopTextMapPropagator.prototype.fields = function () {
return [];
};
return NoopTextMapPropagator;
}());
export { NoopTextMapPropagator };
//# sourceMappingURL=NoopTextMapPropagator.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"shirt.js","sources":["../../../src/icons/shirt.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Shirt\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMjAuMzggMy40NiAxNiAyYTQgNCAwIDAgMS04IDBMMy42MiAzLjQ2YTIgMiAwIDAgMC0xLjM0IDIuMjNsLjU4IDMuNDdhMSAxIDAgMCAwIC45OS44NEg2djEwYzAgMS4xLjkgMiAyIDJoOGEyIDIgMCAwIDAgMi0yVjEwaDIuMTVhMSAxIDAgMCAwIC45OS0uODRsLjU4LTMuNDdhMiAyIDAgMCAwLTEuMzQtMi4yM3oiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/shirt\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 Shirt = createLucideIcon('Shirt', [\n [\n 'path',\n {\n d: 'M20.38 3.46 16 2a4 4 0 0 1-8 0L3.62 3.46a2 2 0 0 0-1.34 2.23l.58 3.47a1 1 0 0 0 .99.84H6v10c0 1.1.9 2 2 2h8a2 2 0 0 0 2-2V10h2.15a1 1 0 0 0 .99-.84l.58-3.47a2 2 0 0 0-1.34-2.23z',\n key: '1wgbhj',\n },\n ],\n]);\n\nexport default Shirt;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,iBAAiB,OAAS,CAAA,CAAA,CAAA;AAAA,CACtC,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;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,17 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = inheritsComments;
var _inheritTrailingComments = require("./inheritTrailingComments.js");
var _inheritLeadingComments = require("./inheritLeadingComments.js");
var _inheritInnerComments = require("./inheritInnerComments.js");
function inheritsComments(child, parent) {
(0, _inheritTrailingComments.default)(child, parent);
(0, _inheritLeadingComments.default)(child, parent);
(0, _inheritInnerComments.default)(child, parent);
return child;
}
//# sourceMappingURL=inheritsComments.js.map

View File

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

View File

@@ -0,0 +1,40 @@
import { buildFormatLongFn } from "../../_lib/buildFormatLongFn.mjs";
//Source: https://www.unicode.org/cldr/charts/32/summary/gu.html
const dateFormats = {
full: "EEEE, d MMMM, y", // CLDR #1825
long: "d MMMM, y", // CLDR #1826
medium: "d MMM, y", // CLDR #1827
short: "d/M/yy", // CLDR #1828
};
const timeFormats = {
full: "hh:mm:ss a zzzz", // CLDR #1829
long: "hh:mm:ss a z", // CLDR #1830
medium: "hh:mm:ss a", // CLDR #1831
short: "hh:mm a", // CLDR #1832
};
const dateTimeFormats = {
full: "{{date}} {{time}}", // CLDR #1833
long: "{{date}} {{time}}", // CLDR #1834
medium: "{{date}} {{time}}", // CLDR #1835
short: "{{date}} {{time}}", // CLDR #1836
};
export const formatLong = {
date: buildFormatLongFn({
formats: dateFormats,
defaultWidth: "full",
}),
time: buildFormatLongFn({
formats: timeFormats,
defaultWidth: "full",
}),
dateTime: buildFormatLongFn({
formats: dateTimeFormats,
defaultWidth: "full",
}),
};

View File

@@ -0,0 +1 @@
{"version":3,"names":["_taggedTemplateLiteral","strings","raw","slice","Object","freeze","defineProperties","value"],"sources":["../../src/helpers/taggedTemplateLiteral.ts"],"sourcesContent":["/* @minVersion 7.0.0-beta.0 */\n\nexport default function _taggedTemplateLiteral(\n strings: readonly string[],\n raw?: readonly string[],\n): TemplateStringsArray {\n if (!raw) {\n raw = strings.slice(0);\n }\n return Object.freeze(\n Object.defineProperties<TemplateStringsArray>(strings as any, {\n raw: { value: Object.freeze(raw) },\n }),\n );\n}\n"],"mappings":";;;;;;AAEe,SAASA,sBAAsBA,CAC5CC,OAA0B,EAC1BC,GAAuB,EACD;EACtB,IAAI,CAACA,GAAG,EAAE;IACRA,GAAG,GAAGD,OAAO,CAACE,KAAK,CAAC,CAAC,CAAC;EACxB;EACA,OAAOC,MAAM,CAACC,MAAM,CAClBD,MAAM,CAACE,gBAAgB,CAAuBL,OAAO,EAAS;IAC5DC,GAAG,EAAE;MAAEK,KAAK,EAAEH,MAAM,CAACC,MAAM,CAACH,GAAG;IAAE;EACnC,CAAC,CACH,CAAC;AACH","ignoreList":[]}

View File

@@ -0,0 +1 @@
{"version":3,"file":"case-upper.js","sources":["../../../src/icons/case-upper.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name CaseUpper\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtMyAxNSA0LTggNCA4IiAvPgogIDxwYXRoIGQ9Ik00IDEzaDYiIC8+CiAgPHBhdGggZD0iTTE1IDExaDQuNWEyIDIgMCAwIDEgMCA0SDE1VjdoNGEyIDIgMCAwIDEgMCA0IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/case-upper\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 CaseUpper = createLucideIcon('CaseUpper', [\n ['path', { d: 'm3 15 4-8 4 8', key: '1vwr6u' }],\n ['path', { d: 'M4 13h6', key: '1r9ots' }],\n ['path', { d: 'M15 11h4.5a2 2 0 0 1 0 4H15V7h4a2 2 0 0 1 0 4', key: '1sqfas' }],\n]);\n\nexport default CaseUpper;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,iBAAiB,WAAa,CAAA,CAAA,CAAA;AAAA,CAAA,CAC9C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAiB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC9C,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,CAAiD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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;AAChF,CAAC,CAAA,CAAA;;"}

View File

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

View File

@@ -0,0 +1,3 @@
{
"$ref": "../../WebpackOptions.json#/definitions/AssetParserOptions"
}

View File

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

View File

@@ -0,0 +1,38 @@
export declare enum AllowedOperationTypes {
QUERY = "query",
MUTATION = "mutation",
SUBSCRIPTION = "subscription"
}
export declare enum TokenKind {
SOF = "<SOF>",
EOF = "<EOF>",
BANG = "!",
DOLLAR = "$",
AMP = "&",
PAREN_L = "(",
PAREN_R = ")",
SPREAD = "...",
COLON = ":",
EQUALS = "=",
AT = "@",
BRACKET_L = "[",
BRACKET_R = "]",
BRACE_L = "{",
PIPE = "|",
BRACE_R = "}",
NAME = "Name",
INT = "Int",
FLOAT = "Float",
STRING = "String",
BLOCK_STRING = "BlockString",
COMMENT = "Comment"
}
export declare enum SpanNames {
EXECUTE = "graphql.execute",
PARSE = "graphql.parse",
RESOLVE = "graphql.resolve",
VALIDATE = "graphql.validate",
SCHEMA_VALIDATE = "graphql.validateSchema",
SCHEMA_PARSE = "graphql.parseSchema"
}
//# sourceMappingURL=enum.d.ts.map

View File

@@ -0,0 +1,216 @@
'use strict';
const stringWidth = require('string-width');
const stripAnsi = require('strip-ansi');
const ansiStyles = require('ansi-styles');
const ESCAPES = new Set([
'\u001B',
'\u009B'
]);
const END_CODE = 39;
const ANSI_ESCAPE_BELL = '\u0007';
const ANSI_CSI = '[';
const ANSI_OSC = ']';
const ANSI_SGR_TERMINATOR = 'm';
const ANSI_ESCAPE_LINK = `${ANSI_OSC}8;;`;
const wrapAnsi = code => `${ESCAPES.values().next().value}${ANSI_CSI}${code}${ANSI_SGR_TERMINATOR}`;
const wrapAnsiHyperlink = uri => `${ESCAPES.values().next().value}${ANSI_ESCAPE_LINK}${uri}${ANSI_ESCAPE_BELL}`;
// Calculate the length of words split on ' ', ignoring
// the extra characters added by ansi escape codes
const wordLengths = string => string.split(' ').map(character => stringWidth(character));
// Wrap a long word across multiple rows
// Ansi escape codes do not count towards length
const wrapWord = (rows, word, columns) => {
const characters = [...word];
let isInsideEscape = false;
let isInsideLinkEscape = false;
let visible = stringWidth(stripAnsi(rows[rows.length - 1]));
for (const [index, character] of characters.entries()) {
const characterLength = stringWidth(character);
if (visible + characterLength <= columns) {
rows[rows.length - 1] += character;
} else {
rows.push(character);
visible = 0;
}
if (ESCAPES.has(character)) {
isInsideEscape = true;
isInsideLinkEscape = characters.slice(index + 1).join('').startsWith(ANSI_ESCAPE_LINK);
}
if (isInsideEscape) {
if (isInsideLinkEscape) {
if (character === ANSI_ESCAPE_BELL) {
isInsideEscape = false;
isInsideLinkEscape = false;
}
} else if (character === ANSI_SGR_TERMINATOR) {
isInsideEscape = false;
}
continue;
}
visible += characterLength;
if (visible === columns && index < characters.length - 1) {
rows.push('');
visible = 0;
}
}
// It's possible that the last row we copy over is only
// ansi escape characters, handle this edge-case
if (!visible && rows[rows.length - 1].length > 0 && rows.length > 1) {
rows[rows.length - 2] += rows.pop();
}
};
// Trims spaces from a string ignoring invisible sequences
const stringVisibleTrimSpacesRight = string => {
const words = string.split(' ');
let last = words.length;
while (last > 0) {
if (stringWidth(words[last - 1]) > 0) {
break;
}
last--;
}
if (last === words.length) {
return string;
}
return words.slice(0, last).join(' ') + words.slice(last).join('');
};
// The wrap-ansi module can be invoked in either 'hard' or 'soft' wrap mode
//
// 'hard' will never allow a string to take up more than columns characters
//
// 'soft' allows long words to expand past the column length
const exec = (string, columns, options = {}) => {
if (options.trim !== false && string.trim() === '') {
return '';
}
let returnValue = '';
let escapeCode;
let escapeUrl;
const lengths = wordLengths(string);
let rows = [''];
for (const [index, word] of string.split(' ').entries()) {
if (options.trim !== false) {
rows[rows.length - 1] = rows[rows.length - 1].trimStart();
}
let rowLength = stringWidth(rows[rows.length - 1]);
if (index !== 0) {
if (rowLength >= columns && (options.wordWrap === false || options.trim === false)) {
// If we start with a new word but the current row length equals the length of the columns, add a new row
rows.push('');
rowLength = 0;
}
if (rowLength > 0 || options.trim === false) {
rows[rows.length - 1] += ' ';
rowLength++;
}
}
// In 'hard' wrap mode, the length of a line is never allowed to extend past 'columns'
if (options.hard && lengths[index] > columns) {
const remainingColumns = (columns - rowLength);
const breaksStartingThisLine = 1 + Math.floor((lengths[index] - remainingColumns - 1) / columns);
const breaksStartingNextLine = Math.floor((lengths[index] - 1) / columns);
if (breaksStartingNextLine < breaksStartingThisLine) {
rows.push('');
}
wrapWord(rows, word, columns);
continue;
}
if (rowLength + lengths[index] > columns && rowLength > 0 && lengths[index] > 0) {
if (options.wordWrap === false && rowLength < columns) {
wrapWord(rows, word, columns);
continue;
}
rows.push('');
}
if (rowLength + lengths[index] > columns && options.wordWrap === false) {
wrapWord(rows, word, columns);
continue;
}
rows[rows.length - 1] += word;
}
if (options.trim !== false) {
rows = rows.map(stringVisibleTrimSpacesRight);
}
const pre = [...rows.join('\n')];
for (const [index, character] of pre.entries()) {
returnValue += character;
if (ESCAPES.has(character)) {
const {groups} = new RegExp(`(?:\\${ANSI_CSI}(?<code>\\d+)m|\\${ANSI_ESCAPE_LINK}(?<uri>.*)${ANSI_ESCAPE_BELL})`).exec(pre.slice(index).join('')) || {groups: {}};
if (groups.code !== undefined) {
const code = Number.parseFloat(groups.code);
escapeCode = code === END_CODE ? undefined : code;
} else if (groups.uri !== undefined) {
escapeUrl = groups.uri.length === 0 ? undefined : groups.uri;
}
}
const code = ansiStyles.codes.get(Number(escapeCode));
if (pre[index + 1] === '\n') {
if (escapeUrl) {
returnValue += wrapAnsiHyperlink('');
}
if (escapeCode && code) {
returnValue += wrapAnsi(code);
}
} else if (character === '\n') {
if (escapeCode && code) {
returnValue += wrapAnsi(escapeCode);
}
if (escapeUrl) {
returnValue += wrapAnsiHyperlink(escapeUrl);
}
}
}
return returnValue;
};
// For each newline, invoke the method separately
module.exports = (string, columns, options) => {
return String(string)
.normalize()
.replace(/\r\n/g, '\n')
.split('\n')
.map(line => exec(line, columns, options))
.join('\n');
};

View File

@@ -0,0 +1,45 @@
import type { Duration } from "./types.js";
/**
* @name add
* @category Common Helpers
* @summary Add the specified years, months, weeks, days, hours, minutes and seconds to the given date.
*
* @description
* Add the specified years, months, weeks, days, hours, minutes and seconds to the given date.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param date - The date to be changed
* @param duration - The object with years, months, weeks, days, hours, minutes and seconds to be added.
*
* | Key | Description |
* |----------------|------------------------------------|
* | years | Amount of years to be added |
* | months | Amount of months to be added |
* | weeks | Amount of weeks to be added |
* | days | Amount of days to be added |
* | hours | Amount of hours to be added |
* | minutes | Amount of minutes to be added |
* | seconds | Amount of seconds to be added |
*
* All values default to 0
*
* @returns The new date with the seconds added
*
* @example
* // Add the following duration to 1 September 2014, 10:19:50
* const result = add(new Date(2014, 8, 1, 10, 19, 50), {
* years: 2,
* months: 9,
* weeks: 1,
* days: 7,
* hours: 5,\\-7
* minutes: 9,
* seconds: 30,
* })
* //=> Thu Jun 15 2017 15:29:20
*/
export declare function add<DateType extends Date>(
date: DateType | number | string,
duration: Duration,
): DateType;

View File

@@ -0,0 +1,76 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const SAFE_IDENTIFIER = /^[_a-z$][_a-z$0-9]*$/i;
const RESERVED_IDENTIFIER = new Set([
"break",
"case",
"catch",
"class",
"const",
"continue",
"debugger",
"default",
"delete",
"do",
"else",
"export",
"extends",
"finally",
"for",
"function",
"if",
"import",
"in",
"instanceof",
"new",
"return",
"super",
"switch",
"this",
"throw",
"try",
"typeof",
"var",
"void",
"while",
"with",
"enum",
// strict mode
"implements",
"interface",
"let",
"package",
"private",
"protected",
"public",
"static",
"yield",
// module code
"await",
// skip future reserved keywords defined under ES1 till ES3
// additional
"null",
"true",
"false"
]);
/**
* @summary Returns a valid JS property name for the given property.
* Certain strings like "default", "null", and names with whitespace are not
* valid JS property names, so they are returned as strings.
* @param {string} prop property name to analyze
* @returns {string} valid JS property name
*/
const propertyName = (prop) => {
if (SAFE_IDENTIFIER.test(prop) && !RESERVED_IDENTIFIER.has(prop)) {
return prop;
}
return JSON.stringify(prop);
};
module.exports = { RESERVED_IDENTIFIER, SAFE_IDENTIFIER, propertyName };

View File

@@ -0,0 +1,474 @@
'use strict'
const { isIP } = require('node:net')
const { lookup } = require('node:dns')
const DecoratorHandler = require('../handler/decorator-handler')
const { InvalidArgumentError, InformationalError } = require('../core/errors')
const maxInt = Math.pow(2, 31) - 1
class DNSStorage {
#maxItems = 0
#records = new Map()
constructor (opts) {
this.#maxItems = opts.maxItems
}
get size () {
return this.#records.size
}
get (hostname) {
return this.#records.get(hostname) ?? null
}
set (hostname, records) {
this.#records.set(hostname, records)
}
delete (hostname) {
this.#records.delete(hostname)
}
// Delegate to storage decide can we do more lookups or not
full () {
return this.size >= this.#maxItems
}
}
class DNSInstance {
#maxTTL = 0
#maxItems = 0
dualStack = true
affinity = null
lookup = null
pick = null
storage = null
constructor (opts) {
this.#maxTTL = opts.maxTTL
this.#maxItems = opts.maxItems
this.dualStack = opts.dualStack
this.affinity = opts.affinity
this.lookup = opts.lookup ?? this.#defaultLookup
this.pick = opts.pick ?? this.#defaultPick
this.storage = opts.storage ?? new DNSStorage(opts)
}
runLookup (origin, opts, cb) {
const ips = this.storage.get(origin.hostname)
// If full, we just return the origin
if (ips == null && this.storage.full()) {
cb(null, origin)
return
}
const newOpts = {
affinity: this.affinity,
dualStack: this.dualStack,
lookup: this.lookup,
pick: this.pick,
...opts.dns,
maxTTL: this.#maxTTL,
maxItems: this.#maxItems
}
// If no IPs we lookup
if (ips == null) {
this.lookup(origin, newOpts, (err, addresses) => {
if (err || addresses == null || addresses.length === 0) {
cb(err ?? new InformationalError('No DNS entries found'))
return
}
this.setRecords(origin, addresses)
const records = this.storage.get(origin.hostname)
const ip = this.pick(
origin,
records,
newOpts.affinity
)
let port
if (typeof ip.port === 'number') {
port = `:${ip.port}`
} else if (origin.port !== '') {
port = `:${origin.port}`
} else {
port = ''
}
cb(
null,
new URL(`${origin.protocol}//${
ip.family === 6 ? `[${ip.address}]` : ip.address
}${port}`)
)
})
} else {
// If there's IPs we pick
const ip = this.pick(
origin,
ips,
newOpts.affinity
)
// If no IPs we lookup - deleting old records
if (ip == null) {
this.storage.delete(origin.hostname)
this.runLookup(origin, opts, cb)
return
}
let port
if (typeof ip.port === 'number') {
port = `:${ip.port}`
} else if (origin.port !== '') {
port = `:${origin.port}`
} else {
port = ''
}
cb(
null,
new URL(`${origin.protocol}//${
ip.family === 6 ? `[${ip.address}]` : ip.address
}${port}`)
)
}
}
#defaultLookup (origin, opts, cb) {
lookup(
origin.hostname,
{
all: true,
family: this.dualStack === false ? this.affinity : 0,
order: 'ipv4first'
},
(err, addresses) => {
if (err) {
return cb(err)
}
const results = new Map()
for (const addr of addresses) {
// On linux we found duplicates, we attempt to remove them with
// the latest record
results.set(`${addr.address}:${addr.family}`, addr)
}
cb(null, results.values())
}
)
}
#defaultPick (origin, hostnameRecords, affinity) {
let ip = null
const { records, offset } = hostnameRecords
let family
if (this.dualStack) {
if (affinity == null) {
// Balance between ip families
if (offset == null || offset === maxInt) {
hostnameRecords.offset = 0
affinity = 4
} else {
hostnameRecords.offset++
affinity = (hostnameRecords.offset & 1) === 1 ? 6 : 4
}
}
if (records[affinity] != null && records[affinity].ips.length > 0) {
family = records[affinity]
} else {
family = records[affinity === 4 ? 6 : 4]
}
} else {
family = records[affinity]
}
// If no IPs we return null
if (family == null || family.ips.length === 0) {
return ip
}
if (family.offset == null || family.offset === maxInt) {
family.offset = 0
} else {
family.offset++
}
const position = family.offset % family.ips.length
ip = family.ips[position] ?? null
if (ip == null) {
return ip
}
if (Date.now() - ip.timestamp > ip.ttl) { // record TTL is already in ms
// We delete expired records
// It is possible that they have different TTL, so we manage them individually
family.ips.splice(position, 1)
return this.pick(origin, hostnameRecords, affinity)
}
return ip
}
pickFamily (origin, ipFamily) {
const records = this.storage.get(origin.hostname)?.records
if (!records) {
return null
}
const family = records[ipFamily]
if (!family) {
return null
}
if (family.offset == null || family.offset === maxInt) {
family.offset = 0
} else {
family.offset++
}
const position = family.offset % family.ips.length
const ip = family.ips[position] ?? null
if (ip == null) {
return ip
}
if (Date.now() - ip.timestamp > ip.ttl) { // record TTL is already in ms
// We delete expired records
// It is possible that they have different TTL, so we manage them individually
family.ips.splice(position, 1)
}
return ip
}
setRecords (origin, addresses) {
const timestamp = Date.now()
const records = { records: { 4: null, 6: null } }
let minTTL = this.#maxTTL
for (const record of addresses) {
record.timestamp = timestamp
if (typeof record.ttl === 'number') {
// The record TTL is expected to be in ms
record.ttl = Math.min(record.ttl, this.#maxTTL)
minTTL = Math.min(minTTL, record.ttl)
} else {
record.ttl = this.#maxTTL
}
const familyRecords = records.records[record.family] ?? { ips: [] }
familyRecords.ips.push(record)
records.records[record.family] = familyRecords
}
// We provide a default TTL if external storage will be used without TTL per record-level support
this.storage.set(origin.hostname, records, { ttl: minTTL })
}
deleteRecords (origin) {
this.storage.delete(origin.hostname)
}
getHandler (meta, opts) {
return new DNSDispatchHandler(this, meta, opts)
}
}
class DNSDispatchHandler extends DecoratorHandler {
#state = null
#opts = null
#dispatch = null
#origin = null
#controller = null
#newOrigin = null
#firstTry = true
constructor (state, { origin, handler, dispatch, newOrigin }, opts) {
super(handler)
this.#origin = origin
this.#newOrigin = newOrigin
this.#opts = { ...opts }
this.#state = state
this.#dispatch = dispatch
}
onResponseError (controller, err) {
switch (err.code) {
case 'ETIMEDOUT':
case 'ECONNREFUSED': {
if (this.#state.dualStack) {
if (!this.#firstTry) {
super.onResponseError(controller, err)
return
}
this.#firstTry = false
// Pick an ip address from the other family
const otherFamily = this.#newOrigin.hostname[0] === '[' ? 4 : 6
const ip = this.#state.pickFamily(this.#origin, otherFamily)
if (ip == null) {
super.onResponseError(controller, err)
return
}
let port
if (typeof ip.port === 'number') {
port = `:${ip.port}`
} else if (this.#origin.port !== '') {
port = `:${this.#origin.port}`
} else {
port = ''
}
const dispatchOpts = {
...this.#opts,
origin: `${this.#origin.protocol}//${
ip.family === 6 ? `[${ip.address}]` : ip.address
}${port}`
}
this.#dispatch(dispatchOpts, this)
return
}
// if dual-stack disabled, we error out
super.onResponseError(controller, err)
break
}
case 'ENOTFOUND':
this.#state.deleteRecords(this.#origin)
super.onResponseError(controller, err)
break
default:
super.onResponseError(controller, err)
break
}
}
}
module.exports = interceptorOpts => {
if (
interceptorOpts?.maxTTL != null &&
(typeof interceptorOpts?.maxTTL !== 'number' || interceptorOpts?.maxTTL < 0)
) {
throw new InvalidArgumentError('Invalid maxTTL. Must be a positive number')
}
if (
interceptorOpts?.maxItems != null &&
(typeof interceptorOpts?.maxItems !== 'number' ||
interceptorOpts?.maxItems < 1)
) {
throw new InvalidArgumentError(
'Invalid maxItems. Must be a positive number and greater than zero'
)
}
if (
interceptorOpts?.affinity != null &&
interceptorOpts?.affinity !== 4 &&
interceptorOpts?.affinity !== 6
) {
throw new InvalidArgumentError('Invalid affinity. Must be either 4 or 6')
}
if (
interceptorOpts?.dualStack != null &&
typeof interceptorOpts?.dualStack !== 'boolean'
) {
throw new InvalidArgumentError('Invalid dualStack. Must be a boolean')
}
if (
interceptorOpts?.lookup != null &&
typeof interceptorOpts?.lookup !== 'function'
) {
throw new InvalidArgumentError('Invalid lookup. Must be a function')
}
if (
interceptorOpts?.pick != null &&
typeof interceptorOpts?.pick !== 'function'
) {
throw new InvalidArgumentError('Invalid pick. Must be a function')
}
if (
interceptorOpts?.storage != null &&
(typeof interceptorOpts?.storage?.get !== 'function' ||
typeof interceptorOpts?.storage?.set !== 'function' ||
typeof interceptorOpts?.storage?.full !== 'function' ||
typeof interceptorOpts?.storage?.delete !== 'function'
)
) {
throw new InvalidArgumentError('Invalid storage. Must be a object with methods: { get, set, full, delete }')
}
const dualStack = interceptorOpts?.dualStack ?? true
let affinity
if (dualStack) {
affinity = interceptorOpts?.affinity ?? null
} else {
affinity = interceptorOpts?.affinity ?? 4
}
const opts = {
maxTTL: interceptorOpts?.maxTTL ?? 10e3, // Expressed in ms
lookup: interceptorOpts?.lookup ?? null,
pick: interceptorOpts?.pick ?? null,
dualStack,
affinity,
maxItems: interceptorOpts?.maxItems ?? Infinity,
storage: interceptorOpts?.storage
}
const instance = new DNSInstance(opts)
return dispatch => {
return function dnsInterceptor (origDispatchOpts, handler) {
const origin =
origDispatchOpts.origin.constructor === URL
? origDispatchOpts.origin
: new URL(origDispatchOpts.origin)
if (isIP(origin.hostname) !== 0) {
return dispatch(origDispatchOpts, handler)
}
instance.runLookup(origin, origDispatchOpts, (err, newOrigin) => {
if (err) {
return handler.onResponseError(null, err)
}
const dispatchOpts = {
...origDispatchOpts,
servername: origin.hostname, // For SNI on TLS
origin: newOrigin.origin,
headers: {
host: origin.host,
...origDispatchOpts.headers
}
}
dispatch(
dispatchOpts,
instance.getHandler(
{ origin, dispatch, handler, newOrigin },
origDispatchOpts
)
)
})
return true
}
}
}

View File

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

View File

@@ -0,0 +1,19 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Snail = createLucideIcon("Snail", [
["path", { d: "M2 13a6 6 0 1 0 12 0 4 4 0 1 0-8 0 2 2 0 0 0 4 0", key: "hneq2s" }],
["circle", { cx: "10", cy: "13", r: "8", key: "194lz3" }],
["path", { d: "M2 21h12c4.4 0 8-3.6 8-8V7a2 2 0 1 0-4 0v6", key: "ixqyt7" }],
["path", { d: "M18 3 19.1 5.2", key: "9tjm43" }],
["path", { d: "M22 3 20.9 5.2", key: "j3odrs" }]
]);
export { Snail as default };
//# sourceMappingURL=snail.js.map

View File

@@ -0,0 +1,58 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var _extends = require('@babel/runtime/helpers/extends');
var React = require('react');
var Select = require('../../dist/Select-7eb2ef56.cjs.dev.js');
var useStateManager = require('../../dist/useStateManager-7748b351.cjs.dev.js');
var useAsync = require('../../dist/useAsync-6b7b2aae.cjs.dev.js');
require('@babel/runtime/helpers/objectSpread2');
require('@babel/runtime/helpers/classCallCheck');
require('@babel/runtime/helpers/createClass');
require('@babel/runtime/helpers/inherits');
require('@babel/runtime/helpers/createSuper');
require('@babel/runtime/helpers/toConsumableArray');
require('../../dist/index-42b266b1.cjs.dev.js');
require('@emotion/react');
require('@babel/runtime/helpers/slicedToArray');
require('@babel/runtime/helpers/objectWithoutProperties');
require('@babel/runtime/helpers/typeof');
require('@babel/runtime/helpers/taggedTemplateLiteral');
require('@babel/runtime/helpers/defineProperty');
require('react-dom');
require('@floating-ui/dom');
require('use-isomorphic-layout-effect');
require('memoize-one');
function _interopNamespace(e) {
if (e && e.__esModule) return e;
var n = Object.create(null);
if (e) {
Object.keys(e).forEach(function (k) {
if (k !== 'default') {
var d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: function () { return e[k]; }
});
}
});
}
n["default"] = e;
return Object.freeze(n);
}
var React__namespace = /*#__PURE__*/_interopNamespace(React);
var AsyncSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
var stateManagedProps = useAsync.useAsync(props);
var selectProps = useStateManager.useStateManager(stateManagedProps);
return /*#__PURE__*/React__namespace.createElement(Select.Select, _extends({
ref: ref
}, selectProps));
});
var AsyncSelect$1 = AsyncSelect;
exports.useAsync = useAsync.useAsync;
exports["default"] = AsyncSelect$1;

View File

@@ -0,0 +1,6 @@
import type { TFunction } from '@payloadcms/translations';
import { APIError } from './APIError.js';
export declare class FileRetrievalError extends APIError {
constructor(t?: TFunction, message?: string);
}
//# sourceMappingURL=FileRetrievalError.d.ts.map

View File

@@ -0,0 +1,20 @@
/**
* @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 GitPullRequestClosed = createLucideIcon("GitPullRequestClosed", [
["circle", { cx: "6", cy: "6", r: "3", key: "1lh9wr" }],
["path", { d: "M6 9v12", key: "1sc30k" }],
["path", { d: "m21 3-6 6", key: "16nqsk" }],
["path", { d: "m21 9-6-6", key: "9j17rh" }],
["path", { d: "M18 11.5V15", key: "65xf6f" }],
["circle", { cx: "18", cy: "18", r: "3", key: "1xkwt0" }]
]);
export { GitPullRequestClosed as default };
//# sourceMappingURL=git-pull-request-closed.js.map

View File

@@ -0,0 +1,7 @@
import type { SpanAttributes, SpanTimeInput } from './span';
export interface TimedEvent {
name: string;
time: SpanTimeInput;
attributes?: SpanAttributes;
}
//# sourceMappingURL=timedEvent.d.ts.map

View File

@@ -0,0 +1,9 @@
import type { AppRouterInstance } from 'next/dist/shared/lib/app-router-context.shared-runtime.js';
type BackToDashboardProps = {
adminRoute: string;
router: AppRouterInstance;
serverURL?: string;
};
export declare const handleBackToDashboard: ({ adminRoute, router, serverURL }: BackToDashboardProps) => void;
export {};
//# sourceMappingURL=handleBackToDashboard.d.ts.map

View File

@@ -0,0 +1,61 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.MissingRefError = exports.ValidationError = exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = exports.Ajv2019 = void 0;
const core_1 = require("./core");
const draft7_1 = require("./vocabularies/draft7");
const dynamic_1 = require("./vocabularies/dynamic");
const next_1 = require("./vocabularies/next");
const unevaluated_1 = require("./vocabularies/unevaluated");
const discriminator_1 = require("./vocabularies/discriminator");
const json_schema_2019_09_1 = require("./refs/json-schema-2019-09");
const META_SCHEMA_ID = "https://json-schema.org/draft/2019-09/schema";
class Ajv2019 extends core_1.default {
constructor(opts = {}) {
super({
...opts,
dynamicRef: true,
next: true,
unevaluated: true,
});
}
_addVocabularies() {
super._addVocabularies();
this.addVocabulary(dynamic_1.default);
draft7_1.default.forEach((v) => this.addVocabulary(v));
this.addVocabulary(next_1.default);
this.addVocabulary(unevaluated_1.default);
if (this.opts.discriminator)
this.addKeyword(discriminator_1.default);
}
_addDefaultMetaSchema() {
super._addDefaultMetaSchema();
const { $data, meta } = this.opts;
if (!meta)
return;
json_schema_2019_09_1.default.call(this, $data);
this.refs["http://json-schema.org/schema"] = META_SCHEMA_ID;
}
defaultMeta() {
return (this.opts.defaultMeta =
super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : undefined));
}
}
exports.Ajv2019 = Ajv2019;
module.exports = exports = Ajv2019;
module.exports.Ajv2019 = Ajv2019;
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = Ajv2019;
var validate_1 = require("./compile/validate");
Object.defineProperty(exports, "KeywordCxt", { enumerable: true, get: function () { return validate_1.KeywordCxt; } });
var codegen_1 = require("./compile/codegen");
Object.defineProperty(exports, "_", { enumerable: true, get: function () { return codegen_1._; } });
Object.defineProperty(exports, "str", { enumerable: true, get: function () { return codegen_1.str; } });
Object.defineProperty(exports, "stringify", { enumerable: true, get: function () { return codegen_1.stringify; } });
Object.defineProperty(exports, "nil", { enumerable: true, get: function () { return codegen_1.nil; } });
Object.defineProperty(exports, "Name", { enumerable: true, get: function () { return codegen_1.Name; } });
Object.defineProperty(exports, "CodeGen", { enumerable: true, get: function () { return codegen_1.CodeGen; } });
var validation_error_1 = require("./runtime/validation_error");
Object.defineProperty(exports, "ValidationError", { enumerable: true, get: function () { return validation_error_1.default; } });
var ref_error_1 = require("./compile/ref_error");
Object.defineProperty(exports, "MissingRefError", { enumerable: true, get: function () { return ref_error_1.default; } });
//# sourceMappingURL=2019.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"instanceof.js","sourceRoot":"","sources":["../../src/keywords/instanceof.ts"],"names":[],"mappings":";;;;;AACA,2EAA8C;AAE9C,MAAM,gBAAgB,GAAsB,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,UAAU,CAAC,IAAA,oBAAM,GAAE,CAAC,CAAA;AAE7E,kBAAe,gBAAgB,CAAA;AAC/B,MAAM,CAAC,OAAO,GAAG,gBAAgB,CAAA"}

View File

@@ -0,0 +1,11 @@
import React from 'react';
export type RouteCacheContext = {
cachingEnabled: boolean;
clearRouteCache: () => void;
};
export declare const RouteCache: React.FC<{
cachingEnabled?: boolean;
children: React.ReactNode;
}>;
export declare const useRouteCache: () => RouteCacheContext;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/tracing/anthropic-ai/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,6BAA6B,iBAAiB,CAAC;AAI5D,eAAO,MAAM,iCAAiC,wJAQpC,CAAC"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"relationships.d.ts","sourceRoot":"","sources":["../../../src/transform/write/relationships.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAI7D,KAAK,IAAI,GAAG;IACV,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAChC,IAAI,EAAE,OAAO,CAAA;IACb,KAAK,EAAE,iBAAiB,GAAG,WAAW,CAAA;IACtC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;CACzC,CAAA;AAED,eAAO,MAAM,qBAAqB,4CAA6C,IAAI,SAqBlF,CAAA"}

View File

@@ -0,0 +1,222 @@
import _typeof from "./typeof.js";
import checkInRHS from "./checkInRHS.js";
import setFunctionName from "./setFunctionName.js";
import toPropertyKey from "./toPropertyKey.js";
function applyDecs2301Factory() {
function createAddInitializerMethod(e, t) {
return function (r) {
!function (e) {
if (e.v) throw Error("attempted to call addInitializer after decoration was finished");
}(t), assertCallable(r, "An initializer"), e.push(r);
};
}
function assertInstanceIfPrivate(e, t) {
if (!e(t)) throw new TypeError("Attempted to access private element on non-instance");
}
function memberDec(e, t, r, n, a, i, s, o, c) {
var u;
switch (a) {
case 1:
u = "accessor";
break;
case 2:
u = "method";
break;
case 3:
u = "getter";
break;
case 4:
u = "setter";
break;
default:
u = "field";
}
var l,
f,
p = {
kind: u,
name: s ? "#" + t : toPropertyKey(t),
"static": i,
"private": s
},
d = {
v: !1
};
if (0 !== a && (p.addInitializer = createAddInitializerMethod(n, d)), s || 0 !== a && 2 !== a) {
if (2 === a) l = function l(e) {
return assertInstanceIfPrivate(c, e), r.value;
};else {
var h = 0 === a || 1 === a;
(h || 3 === a) && (l = s ? function (e) {
return assertInstanceIfPrivate(c, e), r.get.call(e);
} : function (e) {
return r.get.call(e);
}), (h || 4 === a) && (f = s ? function (e, t) {
assertInstanceIfPrivate(c, e), r.set.call(e, t);
} : function (e, t) {
r.set.call(e, t);
});
}
} else l = function l(e) {
return e[t];
}, 0 === a && (f = function f(e, r) {
e[t] = r;
});
var v = s ? c.bind() : function (e) {
return t in e;
};
p.access = l && f ? {
get: l,
set: f,
has: v
} : l ? {
get: l,
has: v
} : {
set: f,
has: v
};
try {
return e(o, p);
} finally {
d.v = !0;
}
}
function assertCallable(e, t) {
if ("function" != typeof e) throw new TypeError(t + " must be a function");
}
function assertValidReturnValue(e, t) {
var r = _typeof(t);
if (1 === e) {
if ("object" !== r || null === t) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
void 0 !== t.get && assertCallable(t.get, "accessor.get"), void 0 !== t.set && assertCallable(t.set, "accessor.set"), void 0 !== t.init && assertCallable(t.init, "accessor.init");
} else if ("function" !== r) throw new TypeError((0 === e ? "field" : 10 === e ? "class" : "method") + " decorators must return a function or void 0");
}
function curryThis2(e) {
return function (t) {
e(this, t);
};
}
function applyMemberDec(e, t, r, n, a, i, s, o, c) {
var u,
l,
f,
p,
d,
h,
v,
y,
g = r[0];
if (s ? (0 === a || 1 === a ? (u = {
get: (d = r[3], function () {
return d(this);
}),
set: curryThis2(r[4])
}, f = "get") : 3 === a ? (u = {
get: r[3]
}, f = "get") : 4 === a ? (u = {
set: r[3]
}, f = "set") : u = {
value: r[3]
}, 0 !== a && (1 === a && setFunctionName(u.set, "#" + n, "set"), setFunctionName(u[f || "value"], "#" + n, f))) : 0 !== a && (u = Object.getOwnPropertyDescriptor(t, n)), 1 === a ? p = {
get: u.get,
set: u.set
} : 2 === a ? p = u.value : 3 === a ? p = u.get : 4 === a && (p = u.set), "function" == typeof g) void 0 !== (h = memberDec(g, n, u, o, a, i, s, p, c)) && (assertValidReturnValue(a, h), 0 === a ? l = h : 1 === a ? (l = h.init, v = h.get || p.get, y = h.set || p.set, p = {
get: v,
set: y
}) : p = h);else for (var m = g.length - 1; m >= 0; m--) {
var b;
void 0 !== (h = memberDec(g[m], n, u, o, a, i, s, p, c)) && (assertValidReturnValue(a, h), 0 === a ? b = h : 1 === a ? (b = h.init, v = h.get || p.get, y = h.set || p.set, p = {
get: v,
set: y
}) : p = h, void 0 !== b && (void 0 === l ? l = b : "function" == typeof l ? l = [l, b] : l.push(b)));
}
if (0 === a || 1 === a) {
if (void 0 === l) l = function l(e, t) {
return t;
};else if ("function" != typeof l) {
var I = l;
l = function l(e, t) {
for (var r = t, n = 0; n < I.length; n++) r = I[n].call(e, r);
return r;
};
} else {
var w = l;
l = function l(e, t) {
return w.call(e, t);
};
}
e.push(l);
}
0 !== a && (1 === a ? (u.get = p.get, u.set = p.set) : 2 === a ? u.value = p : 3 === a ? u.get = p : 4 === a && (u.set = p), s ? 1 === a ? (e.push(function (e, t) {
return p.get.call(e, t);
}), e.push(function (e, t) {
return p.set.call(e, t);
})) : 2 === a ? e.push(p) : e.push(function (e, t) {
return p.call(e, t);
}) : Object.defineProperty(t, n, u));
}
function applyMemberDecs(e, t, r) {
for (var n, a, i, s = [], o = new Map(), c = new Map(), u = 0; u < t.length; u++) {
var l = t[u];
if (Array.isArray(l)) {
var f,
p,
d = l[1],
h = l[2],
v = l.length > 3,
y = d >= 5,
g = r;
if (y ? (f = e, 0 != (d -= 5) && (p = a = a || []), v && !i && (i = function i(t) {
return checkInRHS(t) === e;
}), g = i) : (f = e.prototype, 0 !== d && (p = n = n || [])), 0 !== d && !v) {
var m = y ? c : o,
b = m.get(h) || 0;
if (!0 === b || 3 === b && 4 !== d || 4 === b && 3 !== d) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + h);
!b && d > 2 ? m.set(h, d) : m.set(h, !0);
}
applyMemberDec(s, f, l, h, d, y, v, p, g);
}
}
return pushInitializers(s, n), pushInitializers(s, a), s;
}
function pushInitializers(e, t) {
t && e.push(function (e) {
for (var r = 0; r < t.length; r++) t[r].call(e);
return e;
});
}
return function (e, t, r, n) {
return {
e: applyMemberDecs(e, t, n),
get c() {
return function (e, t) {
if (t.length > 0) {
for (var r = [], n = e, a = e.name, i = t.length - 1; i >= 0; i--) {
var s = {
v: !1
};
try {
var o = t[i](n, {
kind: "class",
name: a,
addInitializer: createAddInitializerMethod(r, s)
});
} finally {
s.v = !0;
}
void 0 !== o && (assertValidReturnValue(10, o), n = o);
}
return [n, function () {
for (var e = 0; e < r.length; e++) r[e].call(n);
}];
}
}(e, r);
}
};
};
}
function applyDecs2301(e, t, r, n) {
return (applyDecs2301 = applyDecs2301Factory())(e, t, r, n);
}
export { applyDecs2301 as default };

View File

@@ -0,0 +1,19 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const FileVolume2 = createLucideIcon("FileVolume2", [
["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
["path", { d: "M8 15h.01", key: "a7atzg" }],
["path", { d: "M11.5 13.5a2.5 2.5 0 0 1 0 3", key: "1fccat" }],
["path", { d: "M15 12a5 5 0 0 1 0 6", key: "ps46cm" }]
]);
export { FileVolume2 as default };
//# sourceMappingURL=file-volume-2.js.map

View File

@@ -0,0 +1,16 @@
'use strict'
const { join } = require('path')
const ThreadStream = require('..')
const stream = new ThreadStream({
filename: join(__dirname, 'to-file.js'),
workerData: { dest: process.argv[2] },
sync: true
})
stream.write('hello')
stream.write(' ')
stream.write('world\n')
stream.flushSync()
stream.unref()

View File

@@ -0,0 +1,554 @@
/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "^Duplex$", "caughtErrors": "none" }] */
'use strict';
const EventEmitter = require('events');
const http = require('http');
const { Duplex } = require('stream');
const { createHash } = require('crypto');
const extension = require('./extension');
const PerMessageDeflate = require('./permessage-deflate');
const subprotocol = require('./subprotocol');
const WebSocket = require('./websocket');
const { CLOSE_TIMEOUT, GUID, kWebSocket } = require('./constants');
const keyRegex = /^[+/0-9A-Za-z]{22}==$/;
const RUNNING = 0;
const CLOSING = 1;
const CLOSED = 2;
/**
* Class representing a WebSocket server.
*
* @extends EventEmitter
*/
class WebSocketServer extends EventEmitter {
/**
* Create a `WebSocketServer` instance.
*
* @param {Object} options Configuration options
* @param {Boolean} [options.allowSynchronousEvents=true] Specifies whether
* any of the `'message'`, `'ping'`, and `'pong'` events can be emitted
* multiple times in the same tick
* @param {Boolean} [options.autoPong=true] Specifies whether or not to
* automatically send a pong in response to a ping
* @param {Number} [options.backlog=511] The maximum length of the queue of
* pending connections
* @param {Boolean} [options.clientTracking=true] Specifies whether or not to
* track clients
* @param {Number} [options.closeTimeout=30000] Duration in milliseconds to
* wait for the closing handshake to finish after `websocket.close()` is
* called
* @param {Function} [options.handleProtocols] A hook to handle protocols
* @param {String} [options.host] The hostname where to bind the server
* @param {Number} [options.maxPayload=104857600] The maximum allowed message
* size
* @param {Boolean} [options.noServer=false] Enable no server mode
* @param {String} [options.path] Accept only connections matching this path
* @param {(Boolean|Object)} [options.perMessageDeflate=false] Enable/disable
* permessage-deflate
* @param {Number} [options.port] The port where to bind the server
* @param {(http.Server|https.Server)} [options.server] A pre-created HTTP/S
* server to use
* @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or
* not to skip UTF-8 validation for text and close messages
* @param {Function} [options.verifyClient] A hook to reject connections
* @param {Function} [options.WebSocket=WebSocket] Specifies the `WebSocket`
* class to use. It must be the `WebSocket` class or class that extends it
* @param {Function} [callback] A listener for the `listening` event
*/
constructor(options, callback) {
super();
options = {
allowSynchronousEvents: true,
autoPong: true,
maxPayload: 100 * 1024 * 1024,
skipUTF8Validation: false,
perMessageDeflate: false,
handleProtocols: null,
clientTracking: true,
closeTimeout: CLOSE_TIMEOUT,
verifyClient: null,
noServer: false,
backlog: null, // use default (511 as implemented in net.js)
server: null,
host: null,
path: null,
port: null,
WebSocket,
...options
};
if (
(options.port == null && !options.server && !options.noServer) ||
(options.port != null && (options.server || options.noServer)) ||
(options.server && options.noServer)
) {
throw new TypeError(
'One and only one of the "port", "server", or "noServer" options ' +
'must be specified'
);
}
if (options.port != null) {
this._server = http.createServer((req, res) => {
const body = http.STATUS_CODES[426];
res.writeHead(426, {
'Content-Length': body.length,
'Content-Type': 'text/plain'
});
res.end(body);
});
this._server.listen(
options.port,
options.host,
options.backlog,
callback
);
} else if (options.server) {
this._server = options.server;
}
if (this._server) {
const emitConnection = this.emit.bind(this, 'connection');
this._removeListeners = addListeners(this._server, {
listening: this.emit.bind(this, 'listening'),
error: this.emit.bind(this, 'error'),
upgrade: (req, socket, head) => {
this.handleUpgrade(req, socket, head, emitConnection);
}
});
}
if (options.perMessageDeflate === true) options.perMessageDeflate = {};
if (options.clientTracking) {
this.clients = new Set();
this._shouldEmitClose = false;
}
this.options = options;
this._state = RUNNING;
}
/**
* Returns the bound address, the address family name, and port of the server
* as reported by the operating system if listening on an IP socket.
* If the server is listening on a pipe or UNIX domain socket, the name is
* returned as a string.
*
* @return {(Object|String|null)} The address of the server
* @public
*/
address() {
if (this.options.noServer) {
throw new Error('The server is operating in "noServer" mode');
}
if (!this._server) return null;
return this._server.address();
}
/**
* Stop the server from accepting new connections and emit the `'close'` event
* when all existing connections are closed.
*
* @param {Function} [cb] A one-time listener for the `'close'` event
* @public
*/
close(cb) {
if (this._state === CLOSED) {
if (cb) {
this.once('close', () => {
cb(new Error('The server is not running'));
});
}
process.nextTick(emitClose, this);
return;
}
if (cb) this.once('close', cb);
if (this._state === CLOSING) return;
this._state = CLOSING;
if (this.options.noServer || this.options.server) {
if (this._server) {
this._removeListeners();
this._removeListeners = this._server = null;
}
if (this.clients) {
if (!this.clients.size) {
process.nextTick(emitClose, this);
} else {
this._shouldEmitClose = true;
}
} else {
process.nextTick(emitClose, this);
}
} else {
const server = this._server;
this._removeListeners();
this._removeListeners = this._server = null;
//
// The HTTP/S server was created internally. Close it, and rely on its
// `'close'` event.
//
server.close(() => {
emitClose(this);
});
}
}
/**
* See if a given request should be handled by this server instance.
*
* @param {http.IncomingMessage} req Request object to inspect
* @return {Boolean} `true` if the request is valid, else `false`
* @public
*/
shouldHandle(req) {
if (this.options.path) {
const index = req.url.indexOf('?');
const pathname = index !== -1 ? req.url.slice(0, index) : req.url;
if (pathname !== this.options.path) return false;
}
return true;
}
/**
* Handle a HTTP Upgrade request.
*
* @param {http.IncomingMessage} req The request object
* @param {Duplex} socket The network socket between the server and client
* @param {Buffer} head The first packet of the upgraded stream
* @param {Function} cb Callback
* @public
*/
handleUpgrade(req, socket, head, cb) {
socket.on('error', socketOnError);
const key = req.headers['sec-websocket-key'];
const upgrade = req.headers.upgrade;
const version = +req.headers['sec-websocket-version'];
if (req.method !== 'GET') {
const message = 'Invalid HTTP method';
abortHandshakeOrEmitwsClientError(this, req, socket, 405, message);
return;
}
if (upgrade === undefined || upgrade.toLowerCase() !== 'websocket') {
const message = 'Invalid Upgrade header';
abortHandshakeOrEmitwsClientError(this, req, socket, 400, message);
return;
}
if (key === undefined || !keyRegex.test(key)) {
const message = 'Missing or invalid Sec-WebSocket-Key header';
abortHandshakeOrEmitwsClientError(this, req, socket, 400, message);
return;
}
if (version !== 13 && version !== 8) {
const message = 'Missing or invalid Sec-WebSocket-Version header';
abortHandshakeOrEmitwsClientError(this, req, socket, 400, message, {
'Sec-WebSocket-Version': '13, 8'
});
return;
}
if (!this.shouldHandle(req)) {
abortHandshake(socket, 400);
return;
}
const secWebSocketProtocol = req.headers['sec-websocket-protocol'];
let protocols = new Set();
if (secWebSocketProtocol !== undefined) {
try {
protocols = subprotocol.parse(secWebSocketProtocol);
} catch (err) {
const message = 'Invalid Sec-WebSocket-Protocol header';
abortHandshakeOrEmitwsClientError(this, req, socket, 400, message);
return;
}
}
const secWebSocketExtensions = req.headers['sec-websocket-extensions'];
const extensions = {};
if (
this.options.perMessageDeflate &&
secWebSocketExtensions !== undefined
) {
const perMessageDeflate = new PerMessageDeflate(
this.options.perMessageDeflate,
true,
this.options.maxPayload
);
try {
const offers = extension.parse(secWebSocketExtensions);
if (offers[PerMessageDeflate.extensionName]) {
perMessageDeflate.accept(offers[PerMessageDeflate.extensionName]);
extensions[PerMessageDeflate.extensionName] = perMessageDeflate;
}
} catch (err) {
const message =
'Invalid or unacceptable Sec-WebSocket-Extensions header';
abortHandshakeOrEmitwsClientError(this, req, socket, 400, message);
return;
}
}
//
// Optionally call external client verification handler.
//
if (this.options.verifyClient) {
const info = {
origin:
req.headers[`${version === 8 ? 'sec-websocket-origin' : 'origin'}`],
secure: !!(req.socket.authorized || req.socket.encrypted),
req
};
if (this.options.verifyClient.length === 2) {
this.options.verifyClient(info, (verified, code, message, headers) => {
if (!verified) {
return abortHandshake(socket, code || 401, message, headers);
}
this.completeUpgrade(
extensions,
key,
protocols,
req,
socket,
head,
cb
);
});
return;
}
if (!this.options.verifyClient(info)) return abortHandshake(socket, 401);
}
this.completeUpgrade(extensions, key, protocols, req, socket, head, cb);
}
/**
* Upgrade the connection to WebSocket.
*
* @param {Object} extensions The accepted extensions
* @param {String} key The value of the `Sec-WebSocket-Key` header
* @param {Set} protocols The subprotocols
* @param {http.IncomingMessage} req The request object
* @param {Duplex} socket The network socket between the server and client
* @param {Buffer} head The first packet of the upgraded stream
* @param {Function} cb Callback
* @throws {Error} If called more than once with the same socket
* @private
*/
completeUpgrade(extensions, key, protocols, req, socket, head, cb) {
//
// Destroy the socket if the client has already sent a FIN packet.
//
if (!socket.readable || !socket.writable) return socket.destroy();
if (socket[kWebSocket]) {
throw new Error(
'server.handleUpgrade() was called more than once with the same ' +
'socket, possibly due to a misconfiguration'
);
}
if (this._state > RUNNING) return abortHandshake(socket, 503);
const digest = createHash('sha1')
.update(key + GUID)
.digest('base64');
const headers = [
'HTTP/1.1 101 Switching Protocols',
'Upgrade: websocket',
'Connection: Upgrade',
`Sec-WebSocket-Accept: ${digest}`
];
const ws = new this.options.WebSocket(null, undefined, this.options);
if (protocols.size) {
//
// Optionally call external protocol selection handler.
//
const protocol = this.options.handleProtocols
? this.options.handleProtocols(protocols, req)
: protocols.values().next().value;
if (protocol) {
headers.push(`Sec-WebSocket-Protocol: ${protocol}`);
ws._protocol = protocol;
}
}
if (extensions[PerMessageDeflate.extensionName]) {
const params = extensions[PerMessageDeflate.extensionName].params;
const value = extension.format({
[PerMessageDeflate.extensionName]: [params]
});
headers.push(`Sec-WebSocket-Extensions: ${value}`);
ws._extensions = extensions;
}
//
// Allow external modification/inspection of handshake headers.
//
this.emit('headers', headers, req);
socket.write(headers.concat('\r\n').join('\r\n'));
socket.removeListener('error', socketOnError);
ws.setSocket(socket, head, {
allowSynchronousEvents: this.options.allowSynchronousEvents,
maxPayload: this.options.maxPayload,
skipUTF8Validation: this.options.skipUTF8Validation
});
if (this.clients) {
this.clients.add(ws);
ws.on('close', () => {
this.clients.delete(ws);
if (this._shouldEmitClose && !this.clients.size) {
process.nextTick(emitClose, this);
}
});
}
cb(ws, req);
}
}
module.exports = WebSocketServer;
/**
* Add event listeners on an `EventEmitter` using a map of <event, listener>
* pairs.
*
* @param {EventEmitter} server The event emitter
* @param {Object.<String, Function>} map The listeners to add
* @return {Function} A function that will remove the added listeners when
* called
* @private
*/
function addListeners(server, map) {
for (const event of Object.keys(map)) server.on(event, map[event]);
return function removeListeners() {
for (const event of Object.keys(map)) {
server.removeListener(event, map[event]);
}
};
}
/**
* Emit a `'close'` event on an `EventEmitter`.
*
* @param {EventEmitter} server The event emitter
* @private
*/
function emitClose(server) {
server._state = CLOSED;
server.emit('close');
}
/**
* Handle socket errors.
*
* @private
*/
function socketOnError() {
this.destroy();
}
/**
* Close the connection when preconditions are not fulfilled.
*
* @param {Duplex} socket The socket of the upgrade request
* @param {Number} code The HTTP response status code
* @param {String} [message] The HTTP response body
* @param {Object} [headers] Additional HTTP response headers
* @private
*/
function abortHandshake(socket, code, message, headers) {
//
// The socket is writable unless the user destroyed or ended it before calling
// `server.handleUpgrade()` or in the `verifyClient` function, which is a user
// error. Handling this does not make much sense as the worst that can happen
// is that some of the data written by the user might be discarded due to the
// call to `socket.end()` below, which triggers an `'error'` event that in
// turn causes the socket to be destroyed.
//
message = message || http.STATUS_CODES[code];
headers = {
Connection: 'close',
'Content-Type': 'text/html',
'Content-Length': Buffer.byteLength(message),
...headers
};
socket.once('finish', socket.destroy);
socket.end(
`HTTP/1.1 ${code} ${http.STATUS_CODES[code]}\r\n` +
Object.keys(headers)
.map((h) => `${h}: ${headers[h]}`)
.join('\r\n') +
'\r\n\r\n' +
message
);
}
/**
* Emit a `'wsClientError'` event on a `WebSocketServer` if there is at least
* one listener for it, otherwise call `abortHandshake()`.
*
* @param {WebSocketServer} server The WebSocket server
* @param {http.IncomingMessage} req The request object
* @param {Duplex} socket The socket of the upgrade request
* @param {Number} code The HTTP response status code
* @param {String} message The HTTP response body
* @param {Object} [headers] The HTTP response headers
* @private
*/
function abortHandshakeOrEmitwsClientError(
server,
req,
socket,
code,
message,
headers
) {
if (server.listenerCount('wsClientError')) {
const err = new Error(message);
Error.captureStackTrace(err, abortHandshakeOrEmitwsClientError);
server.emit('wsClientError', err, socket, req);
} else {
abortHandshake(socket, code, message, headers);
}
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fields/shared/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,2BAA2B,EAAE,MAAM,SAAS,CAAA;AAElE,eAAO,MAAM,cAAc,eAAe,CAAA;AAE1C;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,EACzB,cAAc,EACd,QAAQ,EACR,MAAM,EACN,kBAAkB,GACnB,EAAE;IACD,cAAc,EAAE,OAAO,CAAA;IACvB,QAAQ,EAAE,OAAO,CAAA;IACjB,MAAM,EAAE,MAAM,CAAA;IACd,kBAAkB,CAAC,EAAE,2BAA2B,CAAA;CACjD,WAiBA"}

View File

@@ -0,0 +1,50 @@
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { HydrateAuthProvider, SetStepNav } from '@payloadcms/ui';
import { RenderServerComponent } from '@payloadcms/ui/elements/RenderServerComponent';
import { getGlobalData, getNavGroups } from '@payloadcms/ui/shared';
import React, { Fragment } from 'react';
import { DefaultDashboard } from './Default/index.js';
export async function DashboardView(props) {
const {
locale,
permissions,
req: {
i18n,
payload: {
config
},
payload,
user
},
req,
visibleEntities
} = props.initPageResult;
const globalData = await getGlobalData(req);
const navGroups = getNavGroups(permissions, visibleEntities, config, i18n);
return /*#__PURE__*/_jsxs(Fragment, {
children: [/*#__PURE__*/_jsx(HydrateAuthProvider, {
permissions: permissions
}), /*#__PURE__*/_jsx(SetStepNav, {
nav: []
}), RenderServerComponent({
clientProps: {
locale
},
Component: config.admin?.components?.views?.dashboard?.Component,
Fallback: DefaultDashboard,
importMap: payload.importMap,
serverProps: {
...props,
globalData,
i18n,
locale,
navGroups,
payload,
permissions,
user,
visibleEntities
}
})]
});
}
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,33 @@
import { previousDay } from "./previousDay.js";
/**
* The {@link previousSaturday} function options.
*/
/**
* @name previousSaturday
* @category Weekday Helpers
* @summary When is the previous Saturday?
*
* @description
* When is the previous Saturday?
*
* @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).
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
*
* @param date - The date to start counting from
* @param options - The options
*
* @returns The previous Saturday
*
* @example
* // When is the previous Saturday before Jun, 20, 2021?
* const result = previousSaturday(new Date(2021, 5, 20))
* //=> Sat June 19 2021 00:00:00
*/
export function previousSaturday(date, options) {
return previousDay(date, 6, options);
}
// Fallback for modularized imports:
export default previousSaturday;

View File

@@ -0,0 +1,131 @@
import { entityKind } from "../../entity.js";
import { getColumnNameAndConfig } from "../../utils.js";
import { SingleStoreColumnBuilderWithAutoIncrement, SingleStoreColumnWithAutoIncrement } from "./common.js";
class SingleStoreDecimalBuilder extends SingleStoreColumnBuilderWithAutoIncrement {
static [entityKind] = "SingleStoreDecimalBuilder";
constructor(name, config) {
super(name, "string", "SingleStoreDecimal");
this.config.precision = config?.precision;
this.config.scale = config?.scale;
this.config.unsigned = config?.unsigned;
}
/** @internal */
build(table) {
return new SingleStoreDecimal(
table,
this.config
);
}
}
class SingleStoreDecimal extends SingleStoreColumnWithAutoIncrement {
static [entityKind] = "SingleStoreDecimal";
precision = this.config.precision;
scale = this.config.scale;
unsigned = this.config.unsigned;
mapFromDriverValue(value) {
if (typeof value === "string") return value;
return String(value);
}
getSQLType() {
let type = "";
if (this.precision !== void 0 && this.scale !== void 0) {
type += `decimal(${this.precision},${this.scale})`;
} else if (this.precision === void 0) {
type += "decimal";
} else {
type += `decimal(${this.precision})`;
}
type = type === "decimal(10,0)" || type === "decimal(10)" ? "decimal" : type;
return this.unsigned ? `${type} unsigned` : type;
}
}
class SingleStoreDecimalNumberBuilder extends SingleStoreColumnBuilderWithAutoIncrement {
static [entityKind] = "SingleStoreDecimalNumberBuilder";
constructor(name, config) {
super(name, "number", "SingleStoreDecimalNumber");
this.config.precision = config?.precision;
this.config.scale = config?.scale;
this.config.unsigned = config?.unsigned;
}
/** @internal */
build(table) {
return new SingleStoreDecimalNumber(
table,
this.config
);
}
}
class SingleStoreDecimalNumber extends SingleStoreColumnWithAutoIncrement {
static [entityKind] = "SingleStoreDecimalNumber";
precision = this.config.precision;
scale = this.config.scale;
unsigned = this.config.unsigned;
mapFromDriverValue(value) {
if (typeof value === "number") return value;
return Number(value);
}
mapToDriverValue = String;
getSQLType() {
let type = "";
if (this.precision !== void 0 && this.scale !== void 0) {
type += `decimal(${this.precision},${this.scale})`;
} else if (this.precision === void 0) {
type += "decimal";
} else {
type += `decimal(${this.precision})`;
}
type = type === "decimal(10,0)" || type === "decimal(10)" ? "decimal" : type;
return this.unsigned ? `${type} unsigned` : type;
}
}
class SingleStoreDecimalBigIntBuilder extends SingleStoreColumnBuilderWithAutoIncrement {
static [entityKind] = "SingleStoreDecimalBigIntBuilder";
constructor(name, config) {
super(name, "bigint", "SingleStoreDecimalBigInt");
this.config.precision = config?.precision;
this.config.scale = config?.scale;
this.config.unsigned = config?.unsigned;
}
/** @internal */
build(table) {
return new SingleStoreDecimalBigInt(
table,
this.config
);
}
}
class SingleStoreDecimalBigInt extends SingleStoreColumnWithAutoIncrement {
static [entityKind] = "SingleStoreDecimalBigInt";
precision = this.config.precision;
scale = this.config.scale;
unsigned = this.config.unsigned;
mapFromDriverValue = BigInt;
mapToDriverValue = String;
getSQLType() {
let type = "";
if (this.precision !== void 0 && this.scale !== void 0) {
type += `decimal(${this.precision},${this.scale})`;
} else if (this.precision === void 0) {
type += "decimal";
} else {
type += `decimal(${this.precision})`;
}
type = type === "decimal(10,0)" || type === "decimal(10)" ? "decimal" : type;
return this.unsigned ? `${type} unsigned` : type;
}
}
function decimal(a, b = {}) {
const { name, config } = getColumnNameAndConfig(a, b);
const mode = config?.mode;
return mode === "number" ? new SingleStoreDecimalNumberBuilder(name, config) : mode === "bigint" ? new SingleStoreDecimalBigIntBuilder(name, config) : new SingleStoreDecimalBuilder(name, config);
}
export {
SingleStoreDecimal,
SingleStoreDecimalBigInt,
SingleStoreDecimalBigIntBuilder,
SingleStoreDecimalBuilder,
SingleStoreDecimalNumber,
SingleStoreDecimalNumberBuilder,
decimal
};
//# sourceMappingURL=decimal.js.map

View File

@@ -0,0 +1,6 @@
export declare const subMonthsWithOptions: import("./types.js").FPFn3<
Date,
import("../subMonths.js").SubMonthsOptions<Date> | undefined,
number,
import("../fp.js").DateArg<Date>
>;

View File

@@ -0,0 +1,31 @@
'use strict'
module.exports = {
kAgent: Symbol('agent'),
kOptions: Symbol('options'),
kFactory: Symbol('factory'),
kDispatches: Symbol('dispatches'),
kDispatchKey: Symbol('dispatch key'),
kDefaultHeaders: Symbol('default headers'),
kDefaultTrailers: Symbol('default trailers'),
kContentLength: Symbol('content length'),
kMockAgent: Symbol('mock agent'),
kMockAgentSet: Symbol('mock agent set'),
kMockAgentGet: Symbol('mock agent get'),
kMockDispatch: Symbol('mock dispatch'),
kClose: Symbol('close'),
kOriginalClose: Symbol('original agent close'),
kOriginalDispatch: Symbol('original dispatch'),
kOrigin: Symbol('origin'),
kIsMockActive: Symbol('is mock active'),
kNetConnect: Symbol('net connect'),
kGetNetConnect: Symbol('get net connect'),
kConnected: Symbol('connected'),
kIgnoreTrailingSlash: Symbol('ignore trailing slash'),
kMockAgentMockCallHistoryInstance: Symbol('mock agent mock call history name'),
kMockAgentRegisterCallHistory: Symbol('mock agent register mock call history'),
kMockAgentAddCallHistoryLog: Symbol('mock agent add call history log'),
kMockAgentIsCallHistoryEnabled: Symbol('mock agent is call history enabled'),
kMockAgentAcceptsNonStandardSearchParameters: Symbol('mock agent accepts non standard search parameters'),
kMockCallHistoryAddLog: Symbol('mock call history add log')
}

View File

@@ -0,0 +1,54 @@
import type {
ContextOptions,
DateArg,
LocalizedOptions,
WeekOptions,
} from "./types.js";
/**
* The {@link formatRelative} function options.
*/
export interface FormatRelativeOptions
extends LocalizedOptions<
"options" | "localize" | "formatLong" | "formatRelative"
>,
WeekOptions,
ContextOptions<Date> {}
/**
* @name formatRelative
* @category Common Helpers
* @summary Represent the date in words relative to the given base date.
*
* @description
* Represent the date in words relative to the given base date.
*
* | Distance to the base date | Result |
* |---------------------------|---------------------------|
* | Previous 6 days | last Sunday at 04:30 AM |
* | Last day | yesterday at 04:30 AM |
* | Same day | today at 04:30 AM |
* | Next day | tomorrow at 04:30 AM |
* | Next 6 days | Sunday at 04:30 AM |
* | Other | 12/31/2017 |
*
* @param date - The date to format
* @param baseDate - The date to compare with
* @param options - An object with options
*
* @returns The date in words
*
* @throws `date` must not be Invalid Date
* @throws `baseDate` must not be Invalid Date
* @throws `options.locale` must contain `localize` property
* @throws `options.locale` must contain `formatLong` property
* @throws `options.locale` must contain `formatRelative` property
*
* @example
* // Represent the date of 6 days ago in words relative to the given base date. In this example, today is Wednesday
* const result = formatRelative(subDays(new Date(), 6), new Date())
* //=> "last Thursday at 12:45 AM"
*/
export declare function formatRelative(
date: DateArg<Date> & {},
baseDate: DateArg<Date> & {},
options?: FormatRelativeOptions,
): string;

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B zC"},B:{"1":"0 1 2 3 4 5 6 7 8 Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I","2":"C L M G N O P"},C:{"1":"0 1 2 3 4 5 6 7 8 EC FC GC HC IC JC KC LC MC NC Q H R YC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I ZC aC OC 1C 2C 3C","2":"9 0C VC J bB K D E F A B C L M G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B WC 6B XC 7B 8B 9B AC BC CC DC 4C 5C"},D:{"1":"0 1 2 3 4 5 6 7 8 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 tB uB vB"},E:{"1":"B 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 6C bC 7C 8C 9C AD cC"},F:{"1":"0 1 2 3 4 5 6 7 8 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 gB hB iB 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","16":"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":"7D","2":"6D"}},B:1,C:"unhandledrejection/rejectionhandled events",D:true};

View File

@@ -0,0 +1 @@
{"version":3,"file":"constants.js","sources":["../../../../src/tracing/openai/constants.ts"],"sourcesContent":["export const OPENAI_INTEGRATION_NAME = 'OpenAI';\n\n// https://platform.openai.com/docs/quickstart?api-mode=responses\n// https://platform.openai.com/docs/quickstart?api-mode=chat\n// https://platform.openai.com/docs/api-reference/conversations\nexport const INSTRUMENTED_METHODS = [\n 'responses.create',\n 'chat.completions.create',\n 'embeddings.create',\n // Conversations API - for conversation state management\n // https://platform.openai.com/docs/guides/conversation-state\n 'conversations.create',\n] as const;\nexport const RESPONSES_TOOL_CALL_EVENT_TYPES = [\n 'response.output_item.added',\n 'response.function_call_arguments.delta',\n 'response.function_call_arguments.done',\n 'response.output_item.done',\n] as const;\nexport const RESPONSE_EVENT_TYPES = [\n 'response.created',\n 'response.in_progress',\n 'response.failed',\n 'response.completed',\n 'response.incomplete',\n 'response.queued',\n 'response.output_text.delta',\n ...RESPONSES_TOOL_CALL_EVENT_TYPES,\n] as const;\n"],"names":[],"mappings":";;AAAO,MAAM,uBAAA,GAA0B;;AAEvC;AACA;AACA;AACO,MAAM,uBAAuB;AACpC,EAAE,kBAAkB;AACpB,EAAE,yBAAyB;AAC3B,EAAE,mBAAmB;AACrB;AACA;AACA,EAAE,sBAAsB;AACxB,CAAA;AACO,MAAM,kCAAkC;AAC/C,EAAE,4BAA4B;AAC9B,EAAE,wCAAwC;AAC1C,EAAE,uCAAuC;AACzC,EAAE,2BAA2B;AAC7B,CAAA;AACO,MAAM,uBAAuB;AACpC,EAAE,kBAAkB;AACpB,EAAE,sBAAsB;AACxB,EAAE,iBAAiB;AACnB,EAAE,oBAAoB;AACtB,EAAE,qBAAqB;AACvB,EAAE,iBAAiB;AACnB,EAAE,4BAA4B;AAC9B,EAAE,GAAG,+BAA+B;AACpC,CAAA;;;;;;;"}

View File

@@ -0,0 +1,146 @@
import { ElementType } from "domelementtype";
import { Element, Text, Comment, CDATA, Document, ProcessingInstruction, } from "./node.js";
export * from "./node.js";
// Default options
const defaultOpts = {
withStartIndices: false,
withEndIndices: false,
xmlMode: false,
};
export class DomHandler {
/**
* @param callback Called once parsing has completed.
* @param options Settings for the handler.
* @param elementCB Callback whenever a tag is closed.
*/
constructor(callback, options, elementCB) {
/** The elements of the DOM */
this.dom = [];
/** The root element for the DOM */
this.root = new Document(this.dom);
/** Indicated whether parsing has been completed. */
this.done = false;
/** Stack of open tags. */
this.tagStack = [this.root];
/** A data node that is still being written to. */
this.lastNode = null;
/** Reference to the parser instance. Used for location information. */
this.parser = null;
// Make it possible to skip arguments, for backwards-compatibility
if (typeof options === "function") {
elementCB = options;
options = defaultOpts;
}
if (typeof callback === "object") {
options = callback;
callback = undefined;
}
this.callback = callback !== null && callback !== void 0 ? callback : null;
this.options = options !== null && options !== void 0 ? options : defaultOpts;
this.elementCB = elementCB !== null && elementCB !== void 0 ? elementCB : null;
}
onparserinit(parser) {
this.parser = parser;
}
// Resets the handler back to starting state
onreset() {
this.dom = [];
this.root = new Document(this.dom);
this.done = false;
this.tagStack = [this.root];
this.lastNode = null;
this.parser = null;
}
// Signals the handler that parsing is done
onend() {
if (this.done)
return;
this.done = true;
this.parser = null;
this.handleCallback(null);
}
onerror(error) {
this.handleCallback(error);
}
onclosetag() {
this.lastNode = null;
const elem = this.tagStack.pop();
if (this.options.withEndIndices) {
elem.endIndex = this.parser.endIndex;
}
if (this.elementCB)
this.elementCB(elem);
}
onopentag(name, attribs) {
const type = this.options.xmlMode ? ElementType.Tag : undefined;
const element = new Element(name, attribs, undefined, type);
this.addNode(element);
this.tagStack.push(element);
}
ontext(data) {
const { lastNode } = this;
if (lastNode && lastNode.type === ElementType.Text) {
lastNode.data += data;
if (this.options.withEndIndices) {
lastNode.endIndex = this.parser.endIndex;
}
}
else {
const node = new Text(data);
this.addNode(node);
this.lastNode = node;
}
}
oncomment(data) {
if (this.lastNode && this.lastNode.type === ElementType.Comment) {
this.lastNode.data += data;
return;
}
const node = new Comment(data);
this.addNode(node);
this.lastNode = node;
}
oncommentend() {
this.lastNode = null;
}
oncdatastart() {
const text = new Text("");
const node = new CDATA([text]);
this.addNode(node);
text.parent = node;
this.lastNode = text;
}
oncdataend() {
this.lastNode = null;
}
onprocessinginstruction(name, data) {
const node = new ProcessingInstruction(name, data);
this.addNode(node);
}
handleCallback(error) {
if (typeof this.callback === "function") {
this.callback(error, this.dom);
}
else if (error) {
throw error;
}
}
addNode(node) {
const parent = this.tagStack[this.tagStack.length - 1];
const previousSibling = parent.children[parent.children.length - 1];
if (this.options.withStartIndices) {
node.startIndex = this.parser.startIndex;
}
if (this.options.withEndIndices) {
node.endIndex = this.parser.endIndex;
}
parent.children.push(node);
if (previousSibling) {
node.prev = previousSibling;
previousSibling.next = node;
}
node.parent = parent;
this.lastNode = null;
}
}
export default DomHandler;

View File

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

View File

@@ -0,0 +1,151 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://json-schema.org/draft-07/schema#",
"title": "Core schema meta-schema",
"definitions": {
"schemaArray": {
"type": "array",
"minItems": 1,
"items": {"$ref": "#"}
},
"nonNegativeInteger": {
"type": "integer",
"minimum": 0
},
"nonNegativeIntegerDefault0": {
"allOf": [{"$ref": "#/definitions/nonNegativeInteger"}, {"default": 0}]
},
"simpleTypes": {
"enum": ["array", "boolean", "integer", "null", "number", "object", "string"]
},
"stringArray": {
"type": "array",
"items": {"type": "string"},
"uniqueItems": true,
"default": []
}
},
"type": ["object", "boolean"],
"properties": {
"$id": {
"type": "string",
"format": "uri-reference"
},
"$schema": {
"type": "string",
"format": "uri"
},
"$ref": {
"type": "string",
"format": "uri-reference"
},
"$comment": {
"type": "string"
},
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"default": true,
"readOnly": {
"type": "boolean",
"default": false
},
"examples": {
"type": "array",
"items": true
},
"multipleOf": {
"type": "number",
"exclusiveMinimum": 0
},
"maximum": {
"type": "number"
},
"exclusiveMaximum": {
"type": "number"
},
"minimum": {
"type": "number"
},
"exclusiveMinimum": {
"type": "number"
},
"maxLength": {"$ref": "#/definitions/nonNegativeInteger"},
"minLength": {"$ref": "#/definitions/nonNegativeIntegerDefault0"},
"pattern": {
"type": "string",
"format": "regex"
},
"additionalItems": {"$ref": "#"},
"items": {
"anyOf": [{"$ref": "#"}, {"$ref": "#/definitions/schemaArray"}],
"default": true
},
"maxItems": {"$ref": "#/definitions/nonNegativeInteger"},
"minItems": {"$ref": "#/definitions/nonNegativeIntegerDefault0"},
"uniqueItems": {
"type": "boolean",
"default": false
},
"contains": {"$ref": "#"},
"maxProperties": {"$ref": "#/definitions/nonNegativeInteger"},
"minProperties": {"$ref": "#/definitions/nonNegativeIntegerDefault0"},
"required": {"$ref": "#/definitions/stringArray"},
"additionalProperties": {"$ref": "#"},
"definitions": {
"type": "object",
"additionalProperties": {"$ref": "#"},
"default": {}
},
"properties": {
"type": "object",
"additionalProperties": {"$ref": "#"},
"default": {}
},
"patternProperties": {
"type": "object",
"additionalProperties": {"$ref": "#"},
"propertyNames": {"format": "regex"},
"default": {}
},
"dependencies": {
"type": "object",
"additionalProperties": {
"anyOf": [{"$ref": "#"}, {"$ref": "#/definitions/stringArray"}]
}
},
"propertyNames": {"$ref": "#"},
"const": true,
"enum": {
"type": "array",
"items": true,
"minItems": 1,
"uniqueItems": true
},
"type": {
"anyOf": [
{"$ref": "#/definitions/simpleTypes"},
{
"type": "array",
"items": {"$ref": "#/definitions/simpleTypes"},
"minItems": 1,
"uniqueItems": true
}
]
},
"format": {"type": "string"},
"contentMediaType": {"type": "string"},
"contentEncoding": {"type": "string"},
"if": {"$ref": "#"},
"then": {"$ref": "#"},
"else": {"$ref": "#"},
"allOf": {"$ref": "#/definitions/schemaArray"},
"anyOf": {"$ref": "#/definitions/schemaArray"},
"oneOf": {"$ref": "#/definitions/schemaArray"},
"not": {"$ref": "#"}
},
"default": true
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"piiFiltering.js","sources":["../../../../src/integrations/mcp-server/piiFiltering.ts"],"sourcesContent":["/**\n * PII filtering for MCP server spans\n *\n * Removes network-level sensitive data when sendDefaultPii is false.\n * Input/output data (request arguments, tool/prompt results) is controlled\n * separately via recordInputs/recordOutputs options.\n */\nimport type { SpanAttributeValue } from '../../types-hoist/span';\nimport { CLIENT_ADDRESS_ATTRIBUTE, CLIENT_PORT_ATTRIBUTE, MCP_RESOURCE_URI_ATTRIBUTE } from './attributes';\n\n/**\n * Network PII attributes that should be removed when sendDefaultPii is false\n * @internal\n */\nconst NETWORK_PII_ATTRIBUTES = new Set([CLIENT_ADDRESS_ATTRIBUTE, CLIENT_PORT_ATTRIBUTE, MCP_RESOURCE_URI_ATTRIBUTE]);\n\n/**\n * Checks if an attribute key should be considered network PII.\n *\n * Returns true for:\n * - client.address (IP address)\n * - client.port (port number)\n * - mcp.resource.uri (potentially sensitive URIs)\n *\n * @param key - Attribute key to evaluate\n * @returns true if the attribute should be filtered out (is network PII), false if it should be preserved\n * @internal\n */\nfunction isNetworkPiiAttribute(key: string): boolean {\n return NETWORK_PII_ATTRIBUTES.has(key);\n}\n\n/**\n * Removes network PII attributes from span data when sendDefaultPii is false\n * @param spanData - Raw span attributes\n * @param sendDefaultPii - Whether to include PII data\n * @returns Filtered span attributes\n */\nexport function filterMcpPiiFromSpanData(\n spanData: Record<string, unknown>,\n sendDefaultPii: boolean,\n): Record<string, SpanAttributeValue> {\n if (sendDefaultPii) {\n return spanData as Record<string, SpanAttributeValue>;\n }\n\n return Object.entries(spanData).reduce(\n (acc, [key, value]) => {\n if (!isNetworkPiiAttribute(key)) {\n acc[key] = value as SpanAttributeValue;\n }\n return acc;\n },\n {} as Record<string, SpanAttributeValue>,\n );\n}\n"],"names":[],"mappings":";;AAUA;AACA;AACA;AACA;AACA,MAAM,sBAAA,GAAyB,IAAI,GAAG,CAAC,CAAC,wBAAwB,EAAE,qBAAqB,EAAE,0BAA0B,CAAC,CAAC;;AAErH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,qBAAqB,CAAC,GAAG,EAAmB;AACrD,EAAE,OAAO,sBAAsB,CAAC,GAAG,CAAC,GAAG,CAAC;AACxC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,wBAAwB;AACxC,EAAE,QAAQ;AACV,EAAE,cAAc;AAChB,EAAsC;AACtC,EAAE,IAAI,cAAc,EAAE;AACtB,IAAI,OAAO,QAAA;AACX,EAAE;;AAEF,EAAE,OAAO,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,MAAM;AACxC,IAAI,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK;AAC3B,MAAM,IAAI,CAAC,qBAAqB,CAAC,GAAG,CAAC,EAAE;AACvC,QAAQ,GAAG,CAAC,GAAG,CAAA,GAAI,KAAA;AACnB,MAAM;AACN,MAAM,OAAO,GAAG;AAChB,IAAI,CAAC;AACL,IAAI,EAAC;AACL,GAAG;AACH;;;;"}

View File

@@ -0,0 +1,163 @@
import { expect, expectTypeOf, test } from "vitest";
import * as z from "zod/v4";
test("successful validation", () => {
const testTuple = z.tuple([z.string(), z.number()]);
expectTypeOf<typeof testTuple._output>().toEqualTypeOf<[string, number]>();
const val = testTuple.parse(["asdf", 1234]);
expect(val).toEqual(val);
const r1 = testTuple.safeParse(["asdf", "asdf"]);
expect(r1.success).toEqual(false);
expect(r1.error!).toMatchInlineSnapshot(`
[ZodError: [
{
"expected": "number",
"code": "invalid_type",
"path": [
1
],
"message": "Invalid input: expected number, received string"
}
]]
`);
const r2 = testTuple.safeParse(["asdf", 1234, true]);
expect(r2.success).toEqual(false);
expect(r2.error!).toMatchInlineSnapshot(`
[ZodError: [
{
"origin": "array",
"code": "too_big",
"maximum": 2,
"path": [],
"message": "Too big: expected array to have <2 items"
}
]]
`);
const r3 = testTuple.safeParse({});
expect(r3.success).toEqual(false);
expect(r3.error!).toMatchInlineSnapshot(`
[ZodError: [
{
"expected": "tuple",
"code": "invalid_type",
"path": [],
"message": "Invalid input: expected tuple, received object"
}
]]
`);
});
test("async validation", async () => {
const testTuple = z
.tuple([z.string().refine(async () => true), z.number().refine(async () => true)])
.refine(async () => true);
expectTypeOf<typeof testTuple._output>().toEqualTypeOf<[string, number]>();
const val = await testTuple.parseAsync(["asdf", 1234]);
expect(val).toEqual(val);
const r1 = await testTuple.safeParseAsync(["asdf", "asdf"]);
expect(r1.success).toEqual(false);
expect(r1.error!).toMatchInlineSnapshot(`
[ZodError: [
{
"expected": "number",
"code": "invalid_type",
"path": [
1
],
"message": "Invalid input: expected number, received string"
}
]]
`);
const r2 = await testTuple.safeParseAsync(["asdf", 1234, true]);
expect(r2.success).toEqual(false);
expect(r2.error!).toMatchInlineSnapshot(`
[ZodError: [
{
"origin": "array",
"code": "too_big",
"maximum": 2,
"path": [],
"message": "Too big: expected array to have <2 items"
}
]]
`);
const r3 = await testTuple.safeParseAsync({});
expect(r3.success).toEqual(false);
expect(r3.error!).toMatchInlineSnapshot(`
[ZodError: [
{
"expected": "tuple",
"code": "invalid_type",
"path": [],
"message": "Invalid input: expected tuple, received object"
}
]]
`);
});
test("tuple with optional elements", () => {
const myTuple = z.tuple([z.string(), z.number().optional(), z.string().optional()]).rest(z.boolean());
expectTypeOf<typeof myTuple._output>().toEqualTypeOf<[string, number?, string?, ...boolean[]]>();
const goodData = [["asdf"], ["asdf", 1234], ["asdf", 1234, "asdf"], ["asdf", 1234, "asdf", true, false, true]];
for (const data of goodData) {
expect(myTuple.parse(data)).toEqual(data);
}
const badData = [
["asdf", "asdf"],
["asdf", 1234, "asdf", "asdf"],
["asdf", 1234, "asdf", true, false, "asdf"],
];
for (const data of badData) {
expect(() => myTuple.parse(data)).toThrow();
}
});
test("tuple with optional elements followed by required", () => {
const myTuple = z.tuple([z.string(), z.number().optional(), z.string()]).rest(z.boolean());
expectTypeOf<typeof myTuple._output>().toEqualTypeOf<[string, number | undefined, string, ...boolean[]]>();
const goodData = [
["asdf", 1234, "asdf"],
["asdf", 1234, "asdf", true, false, true],
];
for (const data of goodData) {
expect(myTuple.parse(data)).toEqual(data);
}
const badData = [
["asdf"],
["asdf", 1234],
["asdf", 1234, "asdf", "asdf"],
["asdf", 1234, "asdf", true, false, "asdf"],
];
for (const data of badData) {
expect(() => myTuple.parse(data)).toThrow();
}
});
test("tuple with rest schema", () => {
const myTuple = z.tuple([z.string(), z.number()]).rest(z.boolean());
expect(myTuple.parse(["asdf", 1234, true, false, true])).toEqual(["asdf", 1234, true, false, true]);
expect(myTuple.parse(["asdf", 1234])).toEqual(["asdf", 1234]);
expect(() => myTuple.parse(["asdf", 1234, "asdf"])).toThrow();
type t1 = z.output<typeof myTuple>;
expectTypeOf<t1>().toEqualTypeOf<[string, number, ...boolean[]]>();
});
test("sparse array input", () => {
const schema = z.tuple([z.string(), z.number()]);
expect(() => schema.parse(new Array(2))).toThrow();
});

View File

@@ -0,0 +1,7 @@
import type { OpenAiOptions } from './types';
/**
* Instrument an OpenAI client with Sentry tracing
* Can be used across Node.js, Cloudflare Workers, and Vercel Edge
*/
export declare function instrumentOpenAiClient<T extends object>(client: T, options?: OpenAiOptions): T;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"diagnose-sdk.d.ts","sourceRoot":"","sources":["../../../src/diagnose-sdk.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH,wBAAsB,uBAAuB,IAAI,OAAO,CACtD,kBAAkB,GAAG,oBAAoB,GAAG,mBAAmB,GAAG,IAAI,CACvE,CAqCA"}

View File

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

View File

@@ -0,0 +1 @@
!function(e){function n(e){return RegExp("(\\()(?:"+e+")(?=[\\s\\)])")}function a(e){return RegExp("([\\s([])(?:"+e+")(?=[\\s)])")}var t="(?!\\d)[-+*/~!@$%^=<>{}\\w]+",r="(\\()",i="(?:[^()]|\\((?:[^()]|\\((?:[^()]|\\((?:[^()]|\\((?:[^()]|\\([^()]*\\))*\\))*\\))*\\))*\\))*",s={heading:{pattern:/;;;.*/,alias:["comment","title"]},comment:/;.*/,string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0,inside:{argument:/[-A-Z]+(?=[.,\s])/,symbol:RegExp("`"+t+"'")}},"quoted-symbol":{pattern:RegExp("#?'"+t),alias:["variable","symbol"]},"lisp-property":{pattern:RegExp(":"+t),alias:"property"},splice:{pattern:RegExp(",@?"+t),alias:["symbol","variable"]},keyword:[{pattern:RegExp("(\\()(?:and|(?:cl-)?letf|cl-loop|cond|cons|error|if|(?:lexical-)?let\\*?|message|not|null|or|provide|require|setq|unless|use-package|when|while)(?=\\s)"),lookbehind:!0},{pattern:RegExp("(\\()(?:append|by|collect|concat|do|finally|for|in|return)(?=\\s)"),lookbehind:!0}],declare:{pattern:n("declare"),lookbehind:!0,alias:"keyword"},interactive:{pattern:n("interactive"),lookbehind:!0,alias:"keyword"},boolean:{pattern:a("nil|t"),lookbehind:!0},number:{pattern:a("[-+]?\\d+(?:\\.\\d*)?"),lookbehind:!0},defvar:{pattern:RegExp("(\\()def(?:const|custom|group|var)\\s+"+t),lookbehind:!0,inside:{keyword:/^def[a-z]+/,variable:RegExp(t)}},defun:{pattern:RegExp("(\\()(?:cl-)?(?:defmacro|defun\\*?)\\s+"+t+"\\s+\\("+i+"\\)"),lookbehind:!0,greedy:!0,inside:{keyword:/^(?:cl-)?def\S+/,arguments:null,function:{pattern:RegExp("(^\\s)"+t),lookbehind:!0},punctuation:/[()]/}},lambda:{pattern:RegExp("(\\()lambda\\s+\\(\\s*(?:&?"+t+"(?:\\s+&?"+t+")*\\s*)?\\)"),lookbehind:!0,greedy:!0,inside:{keyword:/^lambda/,arguments:null,punctuation:/[()]/}},car:{pattern:RegExp(r+t),lookbehind:!0},punctuation:[/(?:['`,]?\(|[)\[\]])/,{pattern:/(\s)\.(?=\s)/,lookbehind:!0}]},l={"lisp-marker":RegExp("&(?!\\d)[-+*/~!@$%^=<>{}\\w]+"),varform:{pattern:RegExp("\\("+t+"\\s+(?=\\S)"+i+"\\)"),inside:s},argument:{pattern:RegExp("(^|[\\s(])"+t),lookbehind:!0,alias:"variable"},rest:s},o="\\S+(?:\\s+\\S+)*",p={pattern:RegExp(r+i+"(?=\\))"),lookbehind:!0,inside:{"rest-vars":{pattern:RegExp("&(?:body|rest)\\s+"+o),inside:l},"other-marker-vars":{pattern:RegExp("&(?:aux|optional)\\s+"+o),inside:l},keys:{pattern:RegExp("&key\\s+"+o+"(?:\\s+&allow-other-keys)?"),inside:l},argument:{pattern:RegExp(t),alias:"variable"},punctuation:/[()]/}};s.lambda.inside.arguments=p,s.defun.inside.arguments=e.util.clone(p),s.defun.inside.arguments.inside.sublist=p,e.languages.lisp=s,e.languages.elisp=s,e.languages.emacs=s,e.languages["emacs-lisp"]=s}(Prism);

View File

@@ -0,0 +1,22 @@
Prism.languages.vbnet = Prism.languages.extend('basic', {
'comment': [
{
pattern: /(?:!|REM\b).+/i,
inside: {
'keyword': /^REM/i
}
},
{
pattern: /(^|[^\\:])'.*/,
lookbehind: true,
greedy: true
}
],
'string': {
pattern: /(^|[^"])"(?:""|[^"])*"(?!")/,
lookbehind: true,
greedy: true
},
'keyword': /(?:\b(?:ADDHANDLER|ADDRESSOF|ALIAS|AND|ANDALSO|AS|BEEP|BLOAD|BOOLEAN|BSAVE|BYREF|BYTE|BYVAL|CALL(?: ABSOLUTE)?|CASE|CATCH|CBOOL|CBYTE|CCHAR|CDATE|CDBL|CDEC|CHAIN|CHAR|CHDIR|CINT|CLASS|CLEAR|CLNG|CLOSE|CLS|COBJ|COM|COMMON|CONST|CONTINUE|CSBYTE|CSHORT|CSNG|CSTR|CTYPE|CUINT|CULNG|CUSHORT|DATA|DATE|DECIMAL|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DEFAULT|DELEGATE|DIM|DIRECTCAST|DO|DOUBLE|ELSE|ELSEIF|END|ENUM|ENVIRON|ERASE|ERROR|EVENT|EXIT|FALSE|FIELD|FILES|FINALLY|FOR(?: EACH)?|FRIEND|FUNCTION|GET|GETTYPE|GETXMLNAMESPACE|GLOBAL|GOSUB|GOTO|HANDLES|IF|IMPLEMENTS|IMPORTS|IN|INHERITS|INPUT|INTEGER|INTERFACE|IOCTL|IS|ISNOT|KEY|KILL|LET|LIB|LIKE|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|ME|MKDIR|MOD|MODULE|MUSTINHERIT|MUSTOVERRIDE|MYBASE|MYCLASS|NAME|NAMESPACE|NARROWING|NEW|NEXT|NOT|NOTHING|NOTINHERITABLE|NOTOVERRIDABLE|OBJECT|OF|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPERATOR|OPTION(?: BASE)?|OPTIONAL|OR|ORELSE|OUT|OVERLOADS|OVERRIDABLE|OVERRIDES|PARAMARRAY|PARTIAL|POKE|PRIVATE|PROPERTY|PROTECTED|PUBLIC|PUT|RAISEEVENT|READ|READONLY|REDIM|REM|REMOVEHANDLER|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SBYTE|SELECT(?: CASE)?|SET|SHADOWS|SHARED|SHELL|SHORT|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|STRUCTURE|SUB|SWAP|SYNCLOCK|SYSTEM|THEN|THROW|TIMER|TO|TROFF|TRON|TRUE|TRY|TRYCAST|TYPE|TYPEOF|UINTEGER|ULONG|UNLOCK|UNTIL|USHORT|USING|VIEW PRINT|WAIT|WEND|WHEN|WHILE|WIDENING|WITH|WITHEVENTS|WRITE|WRITEONLY|XOR)|\B(?:#CONST|#ELSE|#ELSEIF|#END|#IF))(?:\$|\b)/i,
'punctuation': /[,;:(){}]/
});

View File

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

View File

@@ -0,0 +1,39 @@
import { buildFormatLongFn } from "../../_lib/buildFormatLongFn.js";
const dateFormats = {
full: "EEEE, do MMMM, y", // CLDR #1787
long: "do MMMM, y", // CLDR #1788
medium: "d MMM, y", // CLDR #1789
short: "dd/MM/yyyy", // CLDR #1790
};
const timeFormats = {
full: "h:mm:ss a zzzz", // CLDR #1791
long: "h:mm:ss a z", // CLDR #1792
medium: "h:mm:ss a", // CLDR #1793
short: "h:mm a", // CLDR #1794
};
const dateTimeFormats = {
full: "{{date}} 'को' {{time}}", // CLDR #1795
long: "{{date}} 'को' {{time}}", // CLDR #1796
medium: "{{date}}, {{time}}", // CLDR #1797
short: "{{date}}, {{time}}", // CLDR #1798
};
export const formatLong = {
date: buildFormatLongFn({
formats: dateFormats,
defaultWidth: "full",
}),
time: buildFormatLongFn({
formats: timeFormats,
defaultWidth: "full",
}),
dateTime: buildFormatLongFn({
formats: dateTimeFormats,
defaultWidth: "full",
}),
};

View File

@@ -0,0 +1,30 @@
import { toDate } from "./toDate.js";
/**
* The {@link isSunday} function options.
*/
/**
* @name isSunday
* @category Weekday Helpers
* @summary Is the given date Sunday?
*
* @description
* Is the given date Sunday?
*
* @param date - The date to check
* @param options - The options object
*
* @returns The date is Sunday
*
* @example
* // Is 21 September 2014 Sunday?
* const result = isSunday(new Date(2014, 8, 21))
* //=> true
*/
export function isSunday(date, options) {
return toDate(date, options?.in).getDay() === 0;
}
// Fallback for modularized imports:
export default isSunday;

View File

@@ -0,0 +1,64 @@
"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 driver_exports = {};
__export(driver_exports, {
ExpoSQLiteDatabase: () => ExpoSQLiteDatabase,
drizzle: () => drizzle
});
module.exports = __toCommonJS(driver_exports);
var import_entity = require("../entity.cjs");
var import_logger = require("../logger.cjs");
var import_relations = require("../relations.cjs");
var import_db = require("../sqlite-core/db.cjs");
var import_dialect = require("../sqlite-core/dialect.cjs");
var import_session = require("./session.cjs");
class ExpoSQLiteDatabase extends import_db.BaseSQLiteDatabase {
static [import_entity.entityKind] = "ExpoSQLiteDatabase";
}
function drizzle(client, config = {}) {
const dialect = new import_dialect.SQLiteSyncDialect({ casing: config.casing });
let logger;
if (config.logger === true) {
logger = new import_logger.DefaultLogger();
} else if (config.logger !== false) {
logger = config.logger;
}
let schema;
if (config.schema) {
const tablesConfig = (0, import_relations.extractTablesRelationalConfig)(
config.schema,
import_relations.createTableRelationsHelpers
);
schema = {
fullSchema: config.schema,
schema: tablesConfig.tables,
tableNamesMap: tablesConfig.tableNamesMap
};
}
const session = new import_session.ExpoSQLiteSession(client, dialect, schema, { logger });
const db = new ExpoSQLiteDatabase("sync", dialect, session, schema);
db.$client = client;
return db;
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
ExpoSQLiteDatabase,
drizzle
});
//# sourceMappingURL=driver.cjs.map

View File

@@ -0,0 +1,5 @@
# `@lexical/utils`
[![See API Documentation](https://lexical.dev/img/see-api-documentation.svg)](https://lexical.dev/docs/api/modules/lexical_utils)
This package contains misc utilities for Lexical.

View File

@@ -0,0 +1 @@
{"version":3,"file":"chart-bar-increasing.js","sources":["../../../src/icons/chart-bar-increasing.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ChartBarIncreasing\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMyAzdjE2YTIgMiAwIDAgMCAyIDJoMTYiIC8+CiAgPHBhdGggZD0iTTcgMTFoOCIgLz4KICA8cGF0aCBkPSJNNyAxNmgxMiIgLz4KICA8cGF0aCBkPSJNNyA2aDMiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/chart-bar-increasing\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 ChartBarIncreasing = createLucideIcon('ChartBarIncreasing', [\n ['path', { d: 'M3 3v16a2 2 0 0 0 2 2h16', key: 'c24i48' }],\n ['path', { d: 'M7 11h8', key: '1feolt' }],\n ['path', { d: 'M7 16h12', key: 'wsnu98' }],\n ['path', { d: 'M7 6h3', key: 'w9rmul' }],\n]);\n\nexport default ChartBarIncreasing;\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,CAAA,CAAA,CAAA,CAAA,CAAqB,iBAAiB,oBAAsB,CAAA,CAAA,CAAA;AAAA,CAAA,CAChE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA4B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CACzD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACzC,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,25 @@
/**
* @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 Dna = createLucideIcon("Dna", [
["path", { d: "m10 16 1.5 1.5", key: "11lckj" }],
["path", { d: "m14 8-1.5-1.5", key: "1ohn8i" }],
["path", { d: "M15 2c-1.798 1.998-2.518 3.995-2.807 5.993", key: "80uv8i" }],
["path", { d: "m16.5 10.5 1 1", key: "696xn5" }],
["path", { d: "m17 6-2.891-2.891", key: "xu6p2f" }],
["path", { d: "M2 15c6.667-6 13.333 0 20-6", key: "1pyr53" }],
["path", { d: "m20 9 .891.891", key: "3xwk7g" }],
["path", { d: "M3.109 14.109 4 15", key: "q76aoh" }],
["path", { d: "m6.5 12.5 1 1", key: "cs35ky" }],
["path", { d: "m7 18 2.891 2.891", key: "1sisit" }],
["path", { d: "M9 22c1.798-1.998 2.518-3.995 2.807-5.993", key: "q3hbxp" }]
]);
export { Dna as default };
//# sourceMappingURL=dna.js.map

View File

@@ -0,0 +1,21 @@
/* eslint-disable @typescript-eslint/ban-types */
import { GraphQLScalarType } from 'graphql';
import { ensureObject, parseObject } from './utils.js';
const specifiedByURL = 'http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf';
export const GraphQLJSONObjectConfig = /*#__PURE__*/ {
name: 'JSONObject',
description: 'The `JSONObject` scalar type represents JSON objects as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf).',
serialize: ensureObject,
parseValue: ensureObject,
parseLiteral: parseObject,
specifiedByURL,
specifiedByUrl: specifiedByURL,
extensions: {
codegenScalarType: 'Record<string, any>',
jsonSchema: {
type: 'object',
additionalProperties: true,
},
},
};
export const GraphQLJSONObject = /*#__PURE__*/ new GraphQLScalarType(GraphQLJSONObjectConfig);

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