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,22 @@
Copyright (c) 2012 Niklas von Hertzen
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,75 @@
'use client';
import { c as _c } from "react/compiler-runtime";
import { jsx as _jsx } from "react/jsx-runtime";
import { FieldDiffContainer, getHTMLDiffComponents, useConfig, useTranslation } from '@payloadcms/ui';
import { formatDate } from '@payloadcms/ui/shared';
import React from 'react';
const baseClass = 'date-diff';
export const DateDiffComponent = t0 => {
const $ = _c(7);
const {
comparisonValue: valueFrom,
field,
locale,
nestingLevel,
versionValue: valueTo
} = t0;
const {
i18n
} = useTranslation();
const {
config: t1
} = useConfig();
const {
admin: t2
} = t1;
const {
dateFormat
} = t2;
const formattedFromDate = valueFrom ? formatDate({
date: typeof valueFrom === "string" ? new Date(valueFrom) : valueFrom,
i18n,
pattern: dateFormat
}) : "";
const formattedToDate = valueTo ? formatDate({
date: typeof valueTo === "string" ? new Date(valueTo) : valueTo,
i18n,
pattern: dateFormat
}) : "";
const t3 = `<div class="${baseClass}" data-enable-match="true" data-date="${formattedFromDate}"><p>` + formattedFromDate + "</p></div>";
const t4 = `<div class="${baseClass}" data-enable-match="true" data-date="${formattedToDate}"><p>` + formattedToDate + "</p></div>";
let t5;
if ($[0] !== field.label || $[1] !== i18n || $[2] !== locale || $[3] !== nestingLevel || $[4] !== t3 || $[5] !== t4) {
const {
From,
To
} = getHTMLDiffComponents({
fromHTML: t3,
toHTML: t4,
tokenizeByCharacter: false
});
t5 = _jsx(FieldDiffContainer, {
className: baseClass,
From,
i18n,
label: {
label: field.label,
locale
},
nestingLevel,
To
});
$[0] = field.label;
$[1] = i18n;
$[2] = locale;
$[3] = nestingLevel;
$[4] = t3;
$[5] = t4;
$[6] = t5;
} else {
t5 = $[6];
}
return t5;
};
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,17 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const FileLock = createLucideIcon("FileLock", [
["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
["rect", { width: "8", height: "6", x: "8", y: "12", rx: "1", key: "3yr8at" }],
["path", { d: "M10 12v-2a2 2 0 1 1 4 0v2", key: "j4i8d" }]
]);
export { FileLock as default };
//# sourceMappingURL=file-lock.js.map

View File

@@ -0,0 +1,83 @@
@import '../../scss/styles.scss';
@layer payload-default {
.popup {
position: relative;
&__trigger-wrap {
display: flex;
align-items: stretch;
height: 100%;
cursor: pointer;
}
&__on-hover-watch {
display: contents;
}
}
.popup__hidden-content {
display: none;
}
.popup__content {
--popup-caret-size: 8px;
--popup-button-highlight: var(--theme-elevation-150);
position: absolute;
z-index: var(--z-popup);
background: var(--theme-input-bg);
color: var(--theme-text);
border-radius: 4px;
padding: calc(var(--base) * 0.5);
min-width: 150px;
max-width: calc(100vw - var(--base));
@include shadow-lg;
&.popup--size-xsmall {
min-width: 80px;
}
&.popup--size-small {
min-width: 100px;
}
&.popup--size-large {
min-width: 200px;
}
&.popup--size-fit-content {
min-width: fit-content;
}
}
.popup__scroll-container {
overflow-y: auto;
max-height: calc(var(--base) * 10);
&:not(.popup__scroll-container--show-scrollbar) {
scrollbar-width: none; // Firefox
-ms-overflow-style: none; // IE/Edge
&::-webkit-scrollbar {
display: none; // Chrome/Safari/Opera
}
}
}
.popup__caret {
position: absolute;
width: 0;
height: 0;
border: var(--popup-caret-size) solid transparent;
left: var(--caret-left, 16px);
transform: translateX(-50%);
.popup--v-bottom & {
top: calc(var(--popup-caret-size) * -2);
border-bottom-color: var(--theme-input-bg);
}
.popup--v-top & {
bottom: calc(var(--popup-caret-size) * -2);
border-top-color: var(--theme-input-bg);
}
}
}

View File

@@ -0,0 +1,7 @@
import type { PublicContextDescriptor } from '../../store';
import type { ClientRect } from '../../types';
interface Arguments {
measure(element: HTMLElement): ClientRect;
}
export declare function useDragOverlayMeasuring({ measure, }: Arguments): PublicContextDescriptor['dragOverlay'];
export {};

View File

@@ -0,0 +1,27 @@
"use strict";
exports.__esModule = true;
exports.default = removeClass;
function replaceClassName(origClass, classToRemove) {
return origClass.replace(new RegExp("(^|\\s)" + classToRemove + "(?:\\s|$)", 'g'), '$1').replace(/\s+/g, ' ').replace(/^\s*|\s*$/g, '');
}
/**
* Removes a CSS class from a given element.
*
* @param element the element
* @param className the CSS class name
*/
function removeClass(element, className) {
if (element.classList) {
element.classList.remove(className);
} else if (typeof element.className === 'string') {
element.className = replaceClassName(element.className, className);
} else {
element.setAttribute('class', replaceClassName(element.className && element.className.baseVal || '', className));
}
}
module.exports = exports["default"];

View File

@@ -0,0 +1,7 @@
import { FeedbackEvent } from '@sentry/core';
import { ReplayContainer } from '../../types';
/**
* Add a feedback breadcrumb event to replay.
*/
export declare function addFeedbackBreadcrumb(replay: ReplayContainer, event: FeedbackEvent): void;
//# sourceMappingURL=addFeedbackBreadcrumb.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"plus.js","sources":["../../../src/icons/plus.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Plus\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNSAxMmgxNCIgLz4KICA8cGF0aCBkPSJNMTIgNXYxNCIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/plus\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 Plus = createLucideIcon('Plus', [\n ['path', { d: 'M5 12h14', key: '1ays0h' }],\n ['path', { d: 'M12 5v14', key: 's699le' }],\n]);\n\nexport default Plus;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,iBAAiB,MAAQ,CAAA,CAAA,CAAA;AAAA,CAAA,CACpC,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,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,11 @@
import { isReactComponentOrFunction } from './isReactComponent.js';
export function isPlainObject(o) {
// Is this a React component?
if (isReactComponentOrFunction(o)) {
return false;
}
// from https://github.com/fastify/deepmerge/blob/master/index.js#L77
return typeof o === 'object' && o !== null && !(o instanceof RegExp) && !(o instanceof Date);
}
//# sourceMappingURL=isPlainObject.js.map

View File

@@ -0,0 +1,115 @@
import Container, { ContainerProps } from './container.js'
declare namespace AtRule {
export interface AtRuleRaws extends Record<string, unknown> {
/**
* The space symbols after the last child of the node to the end of the node.
*/
after?: string
/**
* The space between the at-rule name and its parameters.
*/
afterName?: string
/**
* The space symbols before the node. It also stores `*`
* and `_` symbols before the declaration (IE hack).
*/
before?: string
/**
* The symbols between the last parameter and `{` for rules.
*/
between?: string
/**
* The rules selector with comments.
*/
params?: {
raw: string
value: string
}
/**
* Contains `true` if the last child has an (optional) semicolon.
*/
semicolon?: boolean
}
export interface AtRuleProps extends ContainerProps {
/** Name of the at-rule. */
name: string
/** Parameters following the name of the at-rule. */
params?: number | string
/** Information used to generate byte-to-byte equal node string as it was in the origin input. */
raws?: AtRuleRaws
}
// eslint-disable-next-line @typescript-eslint/no-use-before-define
export { AtRule_ as default }
}
/**
* Represents an at-rule.
*
* ```js
* Once (root, { AtRule }) {
* let media = new AtRule({ name: 'media', params: 'print' })
* media.append(…)
* root.append(media)
* }
* ```
*
* If its followed in the CSS by a `{}` block, this node will have
* a nodes property representing its children.
*
* ```js
* const root = postcss.parse('@charset "UTF-8"; @media print {}')
*
* const charset = root.first
* charset.type //=> 'atrule'
* charset.nodes //=> undefined
*
* const media = root.last
* media.nodes //=> []
* ```
*/
declare class AtRule_ extends Container {
/**
* The at-rules name immediately follows the `@`.
*
* ```js
* const root = postcss.parse('@media print {}')
* media.name //=> 'media'
* const media = root.first
* ```
*/
name: string
/**
* The at-rules parameters, the values that follow the at-rules name
* but precede any `{}` block.
*
* ```js
* const root = postcss.parse('@media print, screen {}')
* const media = root.first
* media.params //=> 'print, screen'
* ```
*/
params: string
parent: Container | undefined
raws: AtRule.AtRuleRaws
type: 'atrule'
constructor(defaults?: AtRule.AtRuleProps)
assign(overrides: AtRule.AtRuleProps | object): this
clone(overrides?: Partial<AtRule.AtRuleProps>): AtRule
cloneAfter(overrides?: Partial<AtRule.AtRuleProps>): AtRule
cloneBefore(overrides?: Partial<AtRule.AtRuleProps>): AtRule
}
declare class AtRule extends AtRule_ {}
export = AtRule

View File

@@ -0,0 +1,227 @@
import { buildLocalizeFn } from "../../_lib/buildLocalizeFn.mjs";
const eraValues = {
narrow: ["pr.n.e.", "AD"],
abbreviated: ["pr. Hr.", "po. Hr."],
wide: ["Pre Hrista", "Posle Hrista"],
};
const quarterValues = {
narrow: ["1.", "2.", "3.", "4."],
abbreviated: ["1. kv.", "2. kv.", "3. kv.", "4. kv."],
wide: ["1. kvartal", "2. kvartal", "3. kvartal", "4. kvartal"],
};
const monthValues = {
narrow: [
"1.",
"2.",
"3.",
"4.",
"5.",
"6.",
"7.",
"8.",
"9.",
"10.",
"11.",
"12.",
],
abbreviated: [
"jan",
"feb",
"mar",
"apr",
"maj",
"jun",
"jul",
"avg",
"sep",
"okt",
"nov",
"dec",
],
wide: [
"januar",
"februar",
"mart",
"april",
"maj",
"jun",
"jul",
"avgust",
"septembar",
"oktobar",
"novembar",
"decembar",
],
};
const formattingMonthValues = {
narrow: [
"1.",
"2.",
"3.",
"4.",
"5.",
"6.",
"7.",
"8.",
"9.",
"10.",
"11.",
"12.",
],
abbreviated: [
"jan",
"feb",
"mar",
"apr",
"maj",
"jun",
"jul",
"avg",
"sep",
"okt",
"nov",
"dec",
],
wide: [
"januar",
"februar",
"mart",
"april",
"maj",
"jun",
"jul",
"avgust",
"septembar",
"oktobar",
"novembar",
"decembar",
],
};
const dayValues = {
narrow: ["N", "P", "U", "S", "Č", "P", "S"],
short: ["ned", "pon", "uto", "sre", "čet", "pet", "sub"],
abbreviated: ["ned", "pon", "uto", "sre", "čet", "pet", "sub"],
wide: [
"nedelja",
"ponedeljak",
"utorak",
"sreda",
"četvrtak",
"petak",
"subota",
],
};
const formattingDayPeriodValues = {
narrow: {
am: "AM",
pm: "PM",
midnight: "ponoć",
noon: "podne",
morning: "ujutru",
afternoon: "popodne",
evening: "uveče",
night: "noću",
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "ponoć",
noon: "podne",
morning: "ujutru",
afternoon: "popodne",
evening: "uveče",
night: "noću",
},
wide: {
am: "AM",
pm: "PM",
midnight: "ponoć",
noon: "podne",
morning: "ujutru",
afternoon: "posle podne",
evening: "uveče",
night: "noću",
},
};
const dayPeriodValues = {
narrow: {
am: "AM",
pm: "PM",
midnight: "ponoć",
noon: "podne",
morning: "ujutru",
afternoon: "popodne",
evening: "uveče",
night: "noću",
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "ponoć",
noon: "podne",
morning: "ujutru",
afternoon: "popodne",
evening: "uveče",
night: "noću",
},
wide: {
am: "AM",
pm: "PM",
midnight: "ponoć",
noon: "podne",
morning: "ujutru",
afternoon: "posle podne",
evening: "uveče",
night: "noću",
},
};
const ordinalNumber = (dirtyNumber, _options) => {
const number = Number(dirtyNumber);
return number + ".";
};
export const localize = {
ordinalNumber,
era: buildLocalizeFn({
values: eraValues,
defaultWidth: "wide",
}),
quarter: buildLocalizeFn({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: (quarter) => quarter - 1,
}),
month: buildLocalizeFn({
values: monthValues,
defaultWidth: "wide",
formattingValues: formattingMonthValues,
defaultFormattingWidth: "wide",
}),
day: buildLocalizeFn({
values: dayValues,
defaultWidth: "wide",
}),
dayPeriod: buildLocalizeFn({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide",
}),
};

View File

@@ -0,0 +1,107 @@
import { entityKind } from "../../entity.js";
import { QueryPromise } from "../../query-promise.js";
import { SelectionProxyHandler } from "../../selection-proxy.js";
import { Table } from "../../table.js";
import { extractUsedTable } from "../utils.js";
class MySqlDeleteBase extends QueryPromise {
constructor(table, session, dialect, withList) {
super();
this.table = table;
this.session = session;
this.dialect = dialect;
this.config = { table, withList };
}
static [entityKind] = "MySqlDelete";
config;
/**
* Adds a `where` clause to the query.
*
* Calling this method will delete only those rows that fulfill a specified condition.
*
* See docs: {@link https://orm.drizzle.team/docs/delete}
*
* @param where the `where` clause.
*
* @example
* You can use conditional operators and `sql function` to filter the rows to be deleted.
*
* ```ts
* // Delete all cars with green color
* db.delete(cars).where(eq(cars.color, 'green'));
* // or
* db.delete(cars).where(sql`${cars.color} = 'green'`)
* ```
*
* You can logically combine conditional operators with `and()` and `or()` operators:
*
* ```ts
* // Delete all BMW cars with a green color
* db.delete(cars).where(and(eq(cars.color, 'green'), eq(cars.brand, 'BMW')));
*
* // Delete all cars with the green or blue color
* db.delete(cars).where(or(eq(cars.color, 'green'), eq(cars.color, 'blue')));
* ```
*/
where(where) {
this.config.where = where;
return this;
}
orderBy(...columns) {
if (typeof columns[0] === "function") {
const orderBy = columns[0](
new Proxy(
this.config.table[Table.Symbol.Columns],
new SelectionProxyHandler({ sqlAliasedBehavior: "alias", sqlBehavior: "sql" })
)
);
const orderByArray = Array.isArray(orderBy) ? orderBy : [orderBy];
this.config.orderBy = orderByArray;
} else {
const orderByArray = columns;
this.config.orderBy = orderByArray;
}
return this;
}
limit(limit) {
this.config.limit = limit;
return this;
}
/** @internal */
getSQL() {
return this.dialect.buildDeleteQuery(this.config);
}
toSQL() {
const { typings: _typings, ...rest } = this.dialect.sqlToQuery(this.getSQL());
return rest;
}
prepare() {
return this.session.prepareQuery(
this.dialect.sqlToQuery(this.getSQL()),
this.config.returning,
void 0,
void 0,
void 0,
{
type: "delete",
tables: extractUsedTable(this.config.table)
}
);
}
execute = (placeholderValues) => {
return this.prepare().execute(placeholderValues);
};
createIterator = () => {
const self = this;
return async function* (placeholderValues) {
yield* self.prepare().iterator(placeholderValues);
};
};
iterator = this.createIterator();
$dynamic() {
return this;
}
}
export {
MySqlDeleteBase
};
//# sourceMappingURL=delete.js.map

View File

@@ -0,0 +1,152 @@
import { subscribe, unsubscribe } from 'node:diagnostics_channel';
import { context } from '@opentelemetry/api';
import { isTracingSuppressed } from '@opentelemetry/core';
import { InstrumentationBase, InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation';
import { SDK_VERSION, LRUMap, debug } from '@sentry/core';
import { DEBUG_BUILD } from '../../debug-build.js';
import { getRequestUrl } from '../../utils/getRequestUrl.js';
import { INSTRUMENTATION_NAME } from './constants.js';
import { addRequestBreadcrumb, addTracePropagationHeadersToOutgoingRequest, getRequestOptions } from '../../utils/outgoingHttpRequest.js';
/**
* This custom HTTP instrumentation is used to isolate incoming requests and annotate them with additional information.
* It does not emit any spans.
*
* The reason this is isolated from the OpenTelemetry instrumentation is that users may overwrite this,
* which would lead to Sentry not working as expected.
*
* Important note: Contrary to other OTEL instrumentation, this one cannot be unwrapped.
* It only does minimal things though and does not emit any spans.
*
* This is heavily inspired & adapted from:
* https://github.com/open-telemetry/opentelemetry-js/blob/f8ab5592ddea5cba0a3b33bf8d74f27872c0367f/experimental/packages/opentelemetry-instrumentation-http/src/http.ts
*/
class SentryHttpInstrumentation extends InstrumentationBase {
constructor(config = {}) {
super(INSTRUMENTATION_NAME, SDK_VERSION, config);
this._propagationDecisionMap = new LRUMap(100);
this._ignoreOutgoingRequestsMap = new WeakMap();
}
/** @inheritdoc */
init() {
// We register handlers when either http or https is instrumented
// but we only want to register them once, whichever is loaded first
let hasRegisteredHandlers = false;
const onHttpClientResponseFinish = ((_data) => {
const data = _data ;
this._onOutgoingRequestFinish(data.request, data.response);
}) ;
const onHttpClientRequestError = ((_data) => {
const data = _data ;
this._onOutgoingRequestFinish(data.request, undefined);
}) ;
const onHttpClientRequestCreated = ((_data) => {
const data = _data ;
this._onOutgoingRequestCreated(data.request);
}) ;
const wrap = (moduleExports) => {
if (hasRegisteredHandlers) {
return moduleExports;
}
hasRegisteredHandlers = true;
subscribe('http.client.response.finish', onHttpClientResponseFinish);
// When an error happens, we still want to have a breadcrumb
// In this case, `http.client.response.finish` is not triggered
subscribe('http.client.request.error', onHttpClientRequestError);
// NOTE: This channel only exist since Node 22
// Before that, outgoing requests are not patched
// and trace headers are not propagated, sadly.
if (this.getConfig().propagateTraceInOutgoingRequests) {
subscribe('http.client.request.created', onHttpClientRequestCreated);
}
return moduleExports;
};
const unwrap = () => {
unsubscribe('http.client.response.finish', onHttpClientResponseFinish);
unsubscribe('http.client.request.error', onHttpClientRequestError);
unsubscribe('http.client.request.created', onHttpClientRequestCreated);
};
/**
* You may be wondering why we register these diagnostics-channel listeners
* in such a convoluted way (as InstrumentationNodeModuleDefinition...)˝,
* instead of simply subscribing to the events once in here.
* The reason for this is timing semantics: These functions are called once the http or https module is loaded.
* If we'd subscribe before that, there seem to be conflicts with the OTEL native instrumentation in some scenarios,
* especially the "import-on-top" pattern of setting up ESM applications.
*/
return [
new InstrumentationNodeModuleDefinition('http', ['*'], wrap, unwrap),
new InstrumentationNodeModuleDefinition('https', ['*'], wrap, unwrap),
];
}
/**
* This is triggered when an outgoing request finishes.
* It has access to the final request and response objects.
*/
_onOutgoingRequestFinish(request, response) {
DEBUG_BUILD && debug.log(INSTRUMENTATION_NAME, 'Handling finished outgoing request');
const _breadcrumbs = this.getConfig().breadcrumbs;
const breadCrumbsEnabled = typeof _breadcrumbs === 'undefined' ? true : _breadcrumbs;
// Note: We cannot rely on the map being set by `_onOutgoingRequestCreated`, because that is not run in Node <22
const shouldIgnore = this._ignoreOutgoingRequestsMap.get(request) ?? this._shouldIgnoreOutgoingRequest(request);
this._ignoreOutgoingRequestsMap.set(request, shouldIgnore);
if (breadCrumbsEnabled && !shouldIgnore) {
addRequestBreadcrumb(request, response);
}
}
/**
* This is triggered when an outgoing request is created.
* It has access to the request object, and can mutate it before the request is sent.
*/
_onOutgoingRequestCreated(request) {
const shouldIgnore = this._ignoreOutgoingRequestsMap.get(request) ?? this._shouldIgnoreOutgoingRequest(request);
this._ignoreOutgoingRequestsMap.set(request, shouldIgnore);
if (shouldIgnore) {
return;
}
addTracePropagationHeadersToOutgoingRequest(request, this._propagationDecisionMap);
}
/**
* Check if the given outgoing request should be ignored.
*/
_shouldIgnoreOutgoingRequest(request) {
if (isTracingSuppressed(context.active())) {
return true;
}
const ignoreOutgoingRequests = this.getConfig().ignoreOutgoingRequests;
if (!ignoreOutgoingRequests) {
return false;
}
const options = getRequestOptions(request);
const url = getRequestUrl(request);
return ignoreOutgoingRequests(url, options);
}
}
export { SentryHttpInstrumentation };
//# sourceMappingURL=SentryHttpInstrumentation.js.map

View File

@@ -0,0 +1,11 @@
import { ErrorLike, ErrorPOJO } from "./types";
/**
* Custom JSON serializer for Error objects.
* Returns all built-in error properties, as well as extended properties.
*/
export declare function toJSON<E extends ErrorLike>(this: E): ErrorPOJO & E;
/**
* Returns own, inherited, enumerable, non-enumerable, string, and symbol keys of `obj`.
* Does NOT return members of the base Object prototype, or the specified omitted keys.
*/
export declare function getDeepKeys(obj: object, omit?: Array<string | symbol>): Set<string | symbol>;

View File

@@ -0,0 +1,8 @@
'use strict'
const parse = require('./parse')
const prerelease = (version, options) => {
const parsed = parse(version, options)
return (parsed && parsed.prerelease.length) ? parsed.prerelease : null
}
module.exports = prerelease

View File

@@ -0,0 +1,126 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const core = require('@sentry/core');
const client = require('./client.js');
const breadcrumbs = require('./integrations/breadcrumbs.js');
const browserapierrors = require('./integrations/browserapierrors.js');
const browsersession = require('./integrations/browsersession.js');
const culturecontext = require('./integrations/culturecontext.js');
const globalhandlers = require('./integrations/globalhandlers.js');
const httpcontext = require('./integrations/httpcontext.js');
const linkederrors = require('./integrations/linkederrors.js');
const spotlight = require('./integrations/spotlight.js');
const stackParsers = require('./stack-parsers.js');
const fetch = require('./transports/fetch.js');
const detectBrowserExtension = require('./utils/detectBrowserExtension.js');
/** Get the default integrations for the browser SDK. */
function getDefaultIntegrations(_options) {
/**
* Note: Please make sure this stays in sync with Angular SDK, which re-exports
* `getDefaultIntegrations` but with an adjusted set of integrations.
*/
return [
// TODO(v11): Replace with `eventFiltersIntegration` once we remove the deprecated `inboundFiltersIntegration`
// eslint-disable-next-line deprecation/deprecation
core.inboundFiltersIntegration(),
core.functionToStringIntegration(),
core.conversationIdIntegration(),
browserapierrors.browserApiErrorsIntegration(),
breadcrumbs.breadcrumbsIntegration(),
globalhandlers.globalHandlersIntegration(),
linkederrors.linkedErrorsIntegration(),
core.dedupeIntegration(),
httpcontext.httpContextIntegration(),
culturecontext.cultureContextIntegration(),
browsersession.browserSessionIntegration(),
];
}
/**
* The Sentry Browser SDK Client.
*
* To use this SDK, call the {@link init} function as early as possible when
* loading the web page. To set context information or send manual events, use
* the provided methods.
*
* @example
*
* ```
*
* import { init } from '@sentry/browser';
*
* init({
* dsn: '__DSN__',
* // ...
* });
* ```
*
* @example
* ```
*
* import { addBreadcrumb } from '@sentry/browser';
* addBreadcrumb({
* message: 'My Breadcrumb',
* // ...
* });
* ```
*
* @example
*
* ```
*
* import * as Sentry from '@sentry/browser';
* Sentry.captureMessage('Hello, world!');
* Sentry.captureException(new Error('Good bye'));
* Sentry.captureEvent({
* message: 'Manual',
* stacktrace: [
* // ...
* ],
* });
* ```
*
* @see {@link BrowserOptions} for documentation on configuration options.
*/
function init(options = {}) {
const shouldDisableBecauseIsBrowserExtenstion =
!options.skipBrowserExtensionCheck && detectBrowserExtension.checkAndWarnIfIsEmbeddedBrowserExtension();
let defaultIntegrations =
options.defaultIntegrations == null ? getDefaultIntegrations() : options.defaultIntegrations;
const clientOptions = {
...options,
enabled: shouldDisableBecauseIsBrowserExtenstion ? false : options.enabled,
stackParser: core.stackParserFromStackParserOptions(options.stackParser || stackParsers.defaultStackParser),
integrations: core.getIntegrationsToSetup({
integrations: options.integrations,
defaultIntegrations,
}),
transport: options.transport || fetch.makeFetchTransport,
};
return core.initAndBind(client.BrowserClient, clientOptions);
}
/**
* This function is here to be API compatible with the loader.
* @hidden
*/
function forceLoad() {
// Noop
}
/**
* This function is here to be API compatible with the loader.
* @hidden
*/
function onLoad(callback) {
callback();
}
exports.forceLoad = forceLoad;
exports.getDefaultIntegrations = getDefaultIntegrations;
exports.init = init;
exports.onLoad = onLoad;
//# sourceMappingURL=sdk.js.map

View File

@@ -0,0 +1,6 @@
import type { AcceptedLanguages } from '@payloadcms/translations';
export type LanguageOptions = {
label: string;
value: AcceptedLanguages;
}[];
//# sourceMappingURL=LanguageOptions.d.ts.map

View File

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

View File

@@ -0,0 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _classPrivateFieldInitSpec;
var _checkPrivateRedeclaration = require("./checkPrivateRedeclaration.js");
function _classPrivateFieldInitSpec(obj, privateMap, value) {
(0, _checkPrivateRedeclaration.default)(obj, privateMap);
privateMap.set(obj, value);
}
//# sourceMappingURL=classPrivateFieldInitSpec.js.map

View File

@@ -0,0 +1,33 @@
import { quartersInYear } from "./constants.mjs";
/**
* @name quartersToYears
* @category Conversion Helpers
* @summary Convert number of quarters to years.
*
* @description
* Convert a number of quarters to a full number of years.
*
* @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 quarters - The number of quarters to be converted
*
* @returns The number of quarters converted in years
*
* @example
* // Convert 8 quarters to years
* const result = quartersToYears(8)
* //=> 2
*
* @example
* // It uses floor rounding:
* const result = quartersToYears(11)
* //=> 2
*/
export function quartersToYears(quarters) {
const years = quarters / quartersInYear;
return Math.trunc(years);
}
// Fallback for modularized imports:
export default quartersToYears;

View File

@@ -0,0 +1,131 @@
import { buildMatchFn } from "../../_lib/buildMatchFn.js";
import { buildMatchPatternFn } from "../../_lib/buildMatchPatternFn.js";
const matchOrdinalNumberPattern = /^(\d+)\./i;
const parseOrdinalNumberPattern = /\d+/i;
const matchEraPatterns = {
narrow: /^(pr\.n\.e\.|AD)/i,
abbreviated: /^(pr\.\s?Hr\.|po\.\s?Hr\.)/i,
wide: /^(Prije Hrista|prije nove ere|Poslije Hrista|nova era)/i,
};
const parseEraPatterns = {
any: [/^pr/i, /^(po|nova)/i],
};
const matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^[1234]\.\s?kv\.?/i,
wide: /^[1234]\. kvartal/i,
};
const parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i],
};
const matchMonthPatterns = {
narrow: /^(10|11|12|[123456789])\./i,
abbreviated: /^(jan|feb|mar|apr|maj|jun|jul|avg|sep|okt|nov|dec)/i,
wide: /^((januar|januara)|(februar|februara)|(mart|marta)|(april|aprila)|(maj|maja)|(juni|juna)|(juli|jula)|(avgust|avgusta)|(septembar|septembra)|(oktobar|oktobra)|(novembar|novembra)|(decembar|decembra))/i,
};
const parseMonthPatterns = {
narrow: [
/^1/i,
/^2/i,
/^3/i,
/^4/i,
/^5/i,
/^6/i,
/^7/i,
/^8/i,
/^9/i,
/^10/i,
/^11/i,
/^12/i,
],
any: [
/^ja/i,
/^f/i,
/^mar/i,
/^ap/i,
/^maj/i,
/^jun/i,
/^jul/i,
/^avg/i,
/^s/i,
/^o/i,
/^n/i,
/^d/i,
],
};
const matchDayPatterns = {
narrow: /^[npusčc]/i,
short: /^(ned|pon|uto|sre|(čet|cet)|pet|sub)/i,
abbreviated: /^(ned|pon|uto|sre|(čet|cet)|pet|sub)/i,
wide: /^(nedjelja|ponedjeljak|utorak|srijeda|(četvrtak|cetvrtak)|petak|subota)/i,
};
const parseDayPatterns = {
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i],
};
const matchDayPeriodPatterns = {
any: /^(am|pm|ponoc|ponoć|(po)?podne|uvece|uveče|noću|poslije podne|ujutru)/i,
};
const parseDayPeriodPatterns = {
any: {
am: /^a/i,
pm: /^p/i,
midnight: /^pono/i,
noon: /^pod/i,
morning: /jutro/i,
afternoon: /(poslije\s|po)+podne/i,
evening: /(uvece|uveče)/i,
night: /(nocu|noću)/i,
},
};
export const match = {
ordinalNumber: buildMatchPatternFn({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: (value) => parseInt(value, 10),
}),
era: buildMatchFn({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any",
}),
quarter: buildMatchFn({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: (index) => index + 1,
}),
month: buildMatchFn({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any",
}),
day: buildMatchFn({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any",
}),
dayPeriod: buildMatchFn({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any",
}),
};

View File

@@ -0,0 +1,17 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://json-schema.org/draft/2020-12/meta/content",
"$vocabulary": {
"https://json-schema.org/draft/2020-12/vocab/content": true
},
"$dynamicAnchor": "meta",
"title": "Content vocabulary meta-schema",
"type": ["object", "boolean"],
"properties": {
"contentEncoding": {"type": "string"},
"contentMediaType": {"type": "string"},
"contentSchema": {"$dynamicRef": "#meta"}
}
}

View File

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

View File

@@ -0,0 +1,23 @@
import type { RelativeDuration } from 'gel';
import type { ColumnBuilderBaseConfig } from "../../column-builder.js";
import type { ColumnBaseConfig } from "../../column.js";
import { entityKind } from "../../entity.js";
import { GelColumn, GelColumnBuilder } from "./common.js";
export type GelRelDurationBuilderInitial<TName extends string> = GelRelDurationBuilder<{
name: TName;
dataType: 'relDuration';
columnType: 'GelRelDuration';
data: RelativeDuration;
driverParam: RelativeDuration;
enumValues: undefined;
}>;
export declare class GelRelDurationBuilder<T extends ColumnBuilderBaseConfig<'relDuration', 'GelRelDuration'>> extends GelColumnBuilder<T> {
static readonly [entityKind]: string;
constructor(name: T['name']);
}
export declare class GelRelDuration<T extends ColumnBaseConfig<'relDuration', 'GelRelDuration'>> extends GelColumn<T> {
static readonly [entityKind]: string;
getSQLType(): string;
}
export declare function relDuration(): GelRelDurationBuilderInitial<''>;
export declare function relDuration<TName extends string>(name: TName): GelRelDurationBuilderInitial<TName>;

View File

@@ -0,0 +1,32 @@
export {
_lt as lt,
_lte as lte,
_lte as maximum,
_gt as gt,
_gte as gte,
_gte as minimum,
_positive as positive,
_negative as negative,
_nonpositive as nonpositive,
_nonnegative as nonnegative,
_multipleOf as multipleOf,
_maxSize as maxSize,
_minSize as minSize,
_size as size,
_maxLength as maxLength,
_minLength as minLength,
_length as length,
_regex as regex,
_lowercase as lowercase,
_uppercase as uppercase,
_includes as includes,
_startsWith as startsWith,
_endsWith as endsWith,
_property as property,
_mime as mime,
_overwrite as overwrite,
_normalize as normalize,
_trim as trim,
_toLowerCase as toLowerCase,
_toUpperCase as toUpperCase,
} from "../core/index.js";

View File

@@ -0,0 +1,110 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createHandler = exports.parseRequestParams = void 0;
const handler_1 = require("../handler");
/**
* The GraphQL over HTTP spec compliant request parser for an incoming GraphQL request.
*
* If the HTTP request _is not_ a [well-formatted GraphQL over HTTP request](https://graphql.github.io/graphql-over-http/draft/#sec-Request), the function will respond
* on the `Response` argument and return `null`.
*
* If the HTTP request _is_ a [well-formatted GraphQL over HTTP request](https://graphql.github.io/graphql-over-http/draft/#sec-Request), but is invalid or malformed,
* the function will throw an error and it is up to the user to handle and respond as they see fit.
*
* ```js
* import express from 'express'; // yarn add express
* import { parseRequestParams } from 'graphql-http/lib/use/express';
*
* const app = express();
* app.all('/graphql', async (req, res) => {
* try {
* const maybeParams = await parseRequestParams(req, res);
* if (!maybeParams) {
* // not a well-formatted GraphQL over HTTP request,
* // parser responded and there's nothing else to do
* return;
* }
*
* // well-formatted GraphQL over HTTP request,
* // with valid parameters
* res.writeHead(200).end(JSON.stringify(maybeParams, null, ' '));
* } catch (err) {
* // well-formatted GraphQL over HTTP request,
* // but with invalid parameters
* res.writeHead(400).end(err.message);
* }
* });
*
* app.listen({ port: 4000 });
* console.log('Listening to port 4000');
* ```
*
* @category Server/express
*/
async function parseRequestParams(req, res) {
const rawReq = toRequest(req, res);
const paramsOrRes = await (0, handler_1.parseRequestParams)(rawReq);
if (!('query' in paramsOrRes)) {
const [body, init] = paramsOrRes;
res.writeHead(init.status, init.statusText, init.headers).end(body);
return null;
}
return paramsOrRes;
}
exports.parseRequestParams = parseRequestParams;
/**
* Create a GraphQL over HTTP spec compliant request handler for
* the express framework.
*
* ```js
* import express from 'express'; // yarn add express
* import { createHandler } from 'graphql-http/lib/use/express';
* import { schema } from './my-graphql-schema';
*
* const app = express();
* app.all('/graphql', createHandler({ schema }));
*
* app.listen({ port: 4000 });
* console.log('Listening to port 4000');
* ```
*
* @category Server/express
*/
function createHandler(options) {
const handle = (0, handler_1.createHandler)(options);
return async function requestListener(req, res) {
try {
const [body, init] = await handle(toRequest(req, res));
res.writeHead(init.status, init.statusText, init.headers).end(body);
}
catch (err) {
// The handler shouldnt throw errors.
// If you wish to handle them differently, consider implementing your own request handler.
console.error('Internal error occurred during request handling. ' +
'Please check your implementation.', err);
res.writeHead(500).end();
}
};
}
exports.createHandler = createHandler;
function toRequest(req, res) {
return {
url: req.url,
method: req.method,
headers: req.headers,
body: () => {
if (req.body) {
// in case express has a body parser
return req.body;
}
return new Promise((resolve) => {
let body = '';
req.setEncoding('utf-8');
req.on('data', (chunk) => (body += chunk));
req.on('end', () => resolve(body));
});
},
raw: req,
context: { res },
};
}

View File

@@ -0,0 +1,13 @@
// Source: https://www.unicode.org/cldr/charts/32/summary/te.html
const formatRelativeLocale = {
lastWeek: "'గత' eeee p", // CLDR #1384
yesterday: "'నిన్న' p", // CLDR #1393
today: "'ఈ రోజు' p", // CLDR #1394
tomorrow: "'రేపు' p", // CLDR #1395
nextWeek: "'తదుపరి' eeee p", // CLDR #1386
other: "P",
};
export const formatRelative = (token, _date, _baseDate, _options) =>
formatRelativeLocale[token];

View File

@@ -0,0 +1 @@
{"version":3,"file":"createDatabaseAdapter.d.ts","sourceRoot":"","sources":["../../src/database/createDatabaseAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAEjD,OAAO,KAAK,EACV,mBAAmB,EAIpB,MAAM,YAAY,CAAA;AAgBnB,wBAAgB,qBAAqB,CAAC,CAAC,SAAS,mBAAmB,EACjE,IAAI,EAAE,YAAY,CAChB,CAAC,EACC,iBAAiB,GACjB,iCAAiC,GACjC,iBAAiB,GACjB,SAAS,GACT,aAAa,GACb,cAAc,GACd,gBAAgB,GAChB,cAAc,GACd,eAAe,GACf,cAAc,GACd,YAAY,CACf,GACA,CAAC,CAwBH"}

View File

@@ -0,0 +1,26 @@
import { toDate } from "./toDate.js";
/**
* @name isAfter
* @category Common Helpers
* @summary Is the first date after the second one?
*
* @description
* Is the first date after the second one?
*
* @param date - The date that should be after the other one to return true
* @param dateToCompare - The date to compare with
*
* @returns The first date is after the second date
*
* @example
* // Is 10 July 1989 after 11 February 1987?
* const result = isAfter(new Date(1989, 6, 10), new Date(1987, 1, 11))
* //=> true
*/
export function isAfter(date, dateToCompare) {
return +toDate(date) > +toDate(dateToCompare);
}
// Fallback for modularized imports:
export default isAfter;

View File

@@ -0,0 +1 @@
{"version":3,"names":["_toSetter","fn","args","thisArg","l","length","Object","defineProperty","set","v","apply"],"sources":["../../src/helpers/toSetter.ts"],"sourcesContent":["/* @minVersion 7.24.0 */\n\nexport default function _toSetter(fn: Function, args: any[], thisArg: any) {\n if (!args) args = [];\n var l = args.length++;\n return Object.defineProperty({}, \"_\", {\n set: function (v) {\n args[l] = v;\n fn.apply(thisArg, args);\n },\n });\n}\n"],"mappings":";;;;;;AAEe,SAASA,SAASA,CAACC,EAAY,EAAEC,IAAW,EAAEC,OAAY,EAAE;EACzE,IAAI,CAACD,IAAI,EAAEA,IAAI,GAAG,EAAE;EACpB,IAAIE,CAAC,GAAGF,IAAI,CAACG,MAAM,EAAE;EACrB,OAAOC,MAAM,CAACC,cAAc,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE;IACpCC,GAAG,EAAE,SAAAA,CAAUC,CAAC,EAAE;MAChBP,IAAI,CAACE,CAAC,CAAC,GAAGK,CAAC;MACXR,EAAE,CAACS,KAAK,CAACP,OAAO,EAAED,IAAI,CAAC;IACzB;EACF,CAAC,CAAC;AACJ","ignoreList":[]}

View File

@@ -0,0 +1,8 @@
/**
* 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.
*
*/
export { $generateJSONFromSelectedNodes, $generateNodesFromSerializedNodes, $getClipboardDataFromSelection, $getHtmlContent, $getLexicalContent, $insertDataTransferForPlainText, $insertDataTransferForRichText, $insertGeneratedNodes, copyToClipboard, type LexicalClipboardData, setLexicalClipboardDataTransfer, } from './clipboard';

View File

@@ -0,0 +1,117 @@
import * as util from "../core/util.js";
const error = () => {
const Sizable = {
string: { unit: "karakter", verb: "legyen" },
file: { unit: "byte", verb: "legyen" },
array: { unit: "elem", verb: "legyen" },
set: { unit: "elem", verb: "legyen" },
};
function getSizing(origin) {
return Sizable[origin] ?? null;
}
const parsedType = (data) => {
const t = typeof data;
switch (t) {
case "number": {
return Number.isNaN(data) ? "NaN" : "szám";
}
case "object": {
if (Array.isArray(data)) {
return "tömb";
}
if (data === null) {
return "null";
}
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
return data.constructor.name;
}
}
}
return t;
};
const Nouns = {
regex: "bemenet",
email: "email cím",
url: "URL",
emoji: "emoji",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "ISO időbélyeg",
date: "ISO dátum",
time: "ISO idő",
duration: "ISO időintervallum",
ipv4: "IPv4 cím",
ipv6: "IPv6 cím",
cidrv4: "IPv4 tartomány",
cidrv6: "IPv6 tartomány",
base64: "base64-kódolt string",
base64url: "base64url-kódolt string",
json_string: "JSON string",
e164: "E.164 szám",
jwt: "JWT",
template_literal: "bemenet",
};
return (issue) => {
switch (issue.code) {
case "invalid_type":
return `Érvénytelen bemenet: a várt érték ${issue.expected}, a kapott érték ${parsedType(issue.input)}`;
// return `Invalid input: expected ${issue.expected}, received ${util.getParsedType(issue.input)}`;
case "invalid_value":
if (issue.values.length === 1)
return `Érvénytelen bemenet: a várt érték ${util.stringifyPrimitive(issue.values[0])}`;
return `Érvénytelen opció: valamelyik érték várt ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return `Túl nagy: ${issue.origin ?? "érték"} mérete túl nagy ${adj}${issue.maximum.toString()} ${sizing.unit ?? "elem"}`;
return `Túl nagy: a bemeneti érték ${issue.origin ?? "érték"} túl nagy: ${adj}${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
return `Túl kicsi: a bemeneti érték ${issue.origin} mérete túl kicsi ${adj}${issue.minimum.toString()} ${sizing.unit}`;
}
return `Túl kicsi: a bemeneti érték ${issue.origin} túl kicsi ${adj}${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue;
if (_issue.format === "starts_with")
return `Érvénytelen string: "${_issue.prefix}" értékkel kell kezdődnie`;
if (_issue.format === "ends_with")
return `Érvénytelen string: "${_issue.suffix}" értékkel kell végződnie`;
if (_issue.format === "includes")
return `Érvénytelen string: "${_issue.includes}" értéket kell tartalmaznia`;
if (_issue.format === "regex")
return `Érvénytelen string: ${_issue.pattern} mintának kell megfelelnie`;
return `Érvénytelen ${Nouns[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `Érvénytelen szám: ${issue.divisor} többszörösének kell lennie`;
case "unrecognized_keys":
return `Ismeretlen kulcs${issue.keys.length > 1 ? "s" : ""}: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `Érvénytelen kulcs ${issue.origin}`;
case "invalid_union":
return "Érvénytelen bemenet";
case "invalid_element":
return `Érvénytelen érték: ${issue.origin}`;
default:
return `Érvénytelen bemenet`;
}
};
};
export default function () {
return {
localeError: error(),
};
}

View File

@@ -0,0 +1,2 @@
import { differenceBy } from "../fp";
export = differenceBy;

View File

@@ -0,0 +1 @@
{"version":3,"names":["shallowEqual","actual","expected","keys","Object","key"],"sources":["../../src/utils/shallowEqual.ts"],"sourcesContent":["export default function shallowEqual<T extends object>(\n actual: object,\n expected: T,\n): actual is T {\n const keys = Object.keys(expected) as (keyof T)[];\n\n for (const key of keys) {\n if (\n // @ts-expect-error maybe we should check whether key exists first\n actual[key] !== expected[key]\n ) {\n return false;\n }\n }\n\n return true;\n}\n"],"mappings":";;;;;;AAAe,SAASA,YAAYA,CAClCC,MAAc,EACdC,QAAW,EACE;EACb,MAAMC,IAAI,GAAGC,MAAM,CAACD,IAAI,CAACD,QAAQ,CAAgB;EAEjD,KAAK,MAAMG,GAAG,IAAIF,IAAI,EAAE;IACtB,IAEEF,MAAM,CAACI,GAAG,CAAC,KAAKH,QAAQ,CAACG,GAAG,CAAC,EAC7B;MACA,OAAO,KAAK;IACd;EACF;EAEA,OAAO,IAAI;AACb","ignoreList":[]}

View File

@@ -0,0 +1,25 @@
import { entityKind } from "../../entity.js";
import { SQL, type SQLWrapper } from "../../sql/sql.js";
import type { GelSession } from "../session.js";
import type { GelTable } from "../table.js";
export declare class GelCountBuilder<TSession extends GelSession<any, any, any>> extends SQL<number> implements Promise<number>, SQLWrapper {
readonly params: {
source: GelTable | SQL | SQLWrapper;
filters?: SQL<unknown>;
session: TSession;
};
private sql;
static readonly [entityKind] = "GelCountBuilder";
[Symbol.toStringTag]: string;
private session;
private static buildEmbeddedCount;
private static buildCount;
constructor(params: {
source: GelTable | SQL | SQLWrapper;
filters?: SQL<unknown>;
session: TSession;
});
then<TResult1 = number, TResult2 = never>(onfulfilled?: ((value: number) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined): Promise<TResult1 | TResult2>;
catch(onRejected?: ((reason: any) => any) | null | undefined): Promise<number>;
finally(onFinally?: (() => void) | null | undefined): Promise<number>;
}

View File

@@ -0,0 +1,45 @@
import { decode as decodeBase64URL } from '../runtime/base64url.js';
import { fromSPKI, fromPKCS8, fromX509 } from '../runtime/asn1.js';
import asKeyObject from '../runtime/jwk_to_key.js';
import { JOSENotSupported } from '../util/errors.js';
import isObject from '../lib/is_object.js';
export async function importSPKI(spki, alg, options) {
if (typeof spki !== 'string' || spki.indexOf('-----BEGIN PUBLIC KEY-----') !== 0) {
throw new TypeError('"spki" must be SPKI formatted string');
}
return fromSPKI(spki, alg, options);
}
export async function importX509(x509, alg, options) {
if (typeof x509 !== 'string' || x509.indexOf('-----BEGIN CERTIFICATE-----') !== 0) {
throw new TypeError('"x509" must be X.509 formatted string');
}
return fromX509(x509, alg, options);
}
export async function importPKCS8(pkcs8, alg, options) {
if (typeof pkcs8 !== 'string' || pkcs8.indexOf('-----BEGIN PRIVATE KEY-----') !== 0) {
throw new TypeError('"pkcs8" must be PKCS#8 formatted string');
}
return fromPKCS8(pkcs8, alg, options);
}
export async function importJWK(jwk, alg) {
if (!isObject(jwk)) {
throw new TypeError('JWK must be an object');
}
alg || (alg = jwk.alg);
switch (jwk.kty) {
case 'oct':
if (typeof jwk.k !== 'string' || !jwk.k) {
throw new TypeError('missing "k" (Key Value) Parameter value');
}
return decodeBase64URL(jwk.k);
case 'RSA':
if (jwk.oth !== undefined) {
throw new JOSENotSupported('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');
}
case 'EC':
case 'OKP':
return asKeyObject({ ...jwk, alg });
default:
throw new JOSENotSupported('Unsupported "kty" (Key Type) Parameter value');
}
}

View File

@@ -0,0 +1,23 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const TicketX = createLucideIcon("TicketX", [
[
"path",
{
d: "M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z",
key: "qn84l0"
}
],
["path", { d: "m9.5 14.5 5-5", key: "qviqfa" }],
["path", { d: "m9.5 9.5 5 5", key: "18nt4w" }]
]);
export { TicketX as default };
//# sourceMappingURL=ticket-x.js.map

View File

@@ -0,0 +1,11 @@
"use strict";
var _array_with_holes = require("./_array_with_holes.cjs");
var _iterable_to_array_limit = require("./_iterable_to_array_limit.cjs");
var _non_iterable_rest = require("./_non_iterable_rest.cjs");
var _unsupported_iterable_to_array = require("./_unsupported_iterable_to_array.cjs");
function _sliced_to_array(arr, i) {
return _array_with_holes._(arr) || _iterable_to_array_limit._(arr, i) || _unsupported_iterable_to_array._(arr, i) || _non_iterable_rest._();
}
exports._ = _sliced_to_array;

View File

@@ -0,0 +1,163 @@
import type { ReactElement } from 'react';
export type Action = 'PUSH' | 'REPLACE' | 'POP';
export type Location = {
pathname: string;
action?: Action;
} & Record<string, any>;
export interface NonIndexRouteObject {
caseSensitive?: boolean;
children?: RouteObject[];
handle?: Record<string, any>;
element?: React.ReactNode | null;
errorElement?: React.ReactNode | null;
index?: any;
path?: string;
}
export interface IndexRouteObject {
caseSensitive?: boolean;
children?: undefined;
handle?: Record<string, any>;
element?: React.ReactNode | null;
errorElement?: React.ReactNode | null;
index: any;
path?: string;
}
export type RouteObject = (IndexRouteObject | NonIndexRouteObject) & Record<string, any>;
export type Params<Key extends string = string> = {
readonly [key in Key]: string | undefined;
};
export type UseRoutes = (routes: RouteObject[], locationArg?: Partial<Location> | string) => React.ReactElement | null;
export interface RouteMatch<ParamKey extends string = string> {
/**
* The names and values of dynamic parameters in the URL.
*/
params: Params<ParamKey>;
/**
* The portion of the URL pathname that was matched.
*/
pathname: string;
/**
* The portion of the URL pathname that was matched before child routes.
*/
pathnameBase: string;
/**
* The route object that was used to match.
*/
route: RouteObject;
}
export type UseEffect = (cb: () => void, deps: unknown[]) => void;
export type UseLocation = () => Location;
export type UseNavigationType = () => Action;
export type RouteObjectArrayAlias = any;
export type RouteMatchAlias = any;
export type CreateRoutesFromChildren = (children: ReactElement[]) => RouteObjectArrayAlias;
export type MatchRoutes = (routes: RouteObjectArrayAlias, location: Location, basename?: string) => RouteMatchAlias[] | null;
export type ShouldRevalidateFunction = (args: any) => boolean;
interface DataFunctionArgs {
request: Request;
params: Params;
}
type LoaderFunctionArgs = DataFunctionArgs;
type ActionFunctionArgs = DataFunctionArgs;
export interface LoaderFunction {
(args: LoaderFunctionArgs): Promise<Response> | Response | Promise<any> | any;
}
export interface ActionFunction {
(args: ActionFunctionArgs): Promise<Response> | Response | Promise<any> | any;
}
declare type AgnosticBaseRouteObject = {
caseSensitive?: boolean;
path?: string;
id?: string;
loader?: LoaderFunction;
action?: ActionFunction;
hasErrorBoundary?: boolean;
shouldRevalidate?: ShouldRevalidateFunction;
handle?: any;
};
export declare type AgnosticIndexRouteObject = AgnosticBaseRouteObject & Record<string, any>;
export declare type AgnosticNonIndexRouteObject = AgnosticBaseRouteObject & Record<string, any>;
export declare type AgnosticDataIndexRouteObject = AgnosticIndexRouteObject & {
id: string;
};
export declare type AgnosticDataNonIndexRouteObject = AgnosticNonIndexRouteObject & {
children?: AgnosticDataRouteObject[];
id: string;
};
export interface AgnosticRouteMatch<ParamKey extends string = string, RouteObjectType extends AgnosticRouteObject = AgnosticRouteObject> {
params: Params<ParamKey>;
pathname: string;
pathnameBase: string;
route: RouteObjectType;
}
export type AgnosticDataRouteMatch = AgnosticRouteMatch<string, AgnosticDataRouteObject>;
interface UseMatchesMatch {
id: string;
pathname: string;
params: AgnosticRouteMatch['params'];
data: unknown;
handle: unknown;
}
export interface GetScrollRestorationKeyFunction {
(location: Location, matches: UseMatchesMatch[]): string | null;
}
export interface Path {
pathname: string;
search: string;
hash: string;
}
export interface RouterSubscriber<TState extends RouterState = RouterState> {
(state: TState): void;
}
export interface GetScrollPositionFunction {
(): number;
}
declare type LinkNavigateOptions = {
replace?: boolean;
state?: any;
preventScrollReset?: boolean;
};
export declare type AgnosticDataRouteObject = AgnosticDataIndexRouteObject | AgnosticDataNonIndexRouteObject;
export declare type To = string | Partial<Path>;
export declare type HydrationState = any;
export declare type FormMethod = 'get' | 'post' | 'put' | 'patch' | 'delete';
export declare type FormEncType = 'application/x-www-form-urlencoded' | 'multipart/form-data';
export declare type RouterNavigateOptions = LinkNavigateOptions | SubmissionNavigateOptions;
export declare type AgnosticRouteObject = AgnosticIndexRouteObject | AgnosticNonIndexRouteObject;
declare type SubmissionNavigateOptions = {
replace?: boolean;
state?: any;
formMethod?: FormMethod;
formEncType?: FormEncType;
formData: FormData;
};
export interface RouterInit {
basename: string;
routes: AgnosticRouteObject[];
history: History;
hydrationData?: HydrationState;
}
export type NavigationState = {
state: 'idle' | 'loading' | 'submitting';
};
export type NavigationStates = {
Idle: NavigationState;
Loading: NavigationState;
Submitting: NavigationState;
};
export type Navigation = NavigationStates[keyof NavigationStates];
export type RouteData = any;
export type Fetcher = any;
type HistoryAction = 'POP' | 'PUSH' | 'REPLACE';
export interface RouterState {
historyAction: Action | HistoryAction | any;
location: Location;
navigation: Navigation;
}
export interface Router<TState extends RouterState = RouterState> {
state: TState;
subscribe(fn: RouterSubscriber<TState>): () => void;
}
export type CreateRouterFunction<TState extends RouterState = RouterState, TRouter extends Router<TState> = Router<TState>> = (routes: RouteObject[], opts?: any) => TRouter;
export {};
//# sourceMappingURL=types.d.ts.map

View File

@@ -0,0 +1,9 @@
/**
* 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{HashtagNode as t,$createHashtagNode as e}from"@lexical/hashtag";import{useLexicalComposerContext as r}from"@lexical/react/LexicalComposerContext";import{useLexicalTextEntity as n}from"@lexical/react/useLexicalTextEntity";import{useEffect as o,useCallback as a}from"react";const i=new RegExp(function(){const{alpha:t,alphanumeric:e,hashChars:r}=function(){const t=String.fromCharCode,e="A-Za-zªµºÀ-ÖØ-öø-Ɂɐ-ˁˆ-ˑˠ-ˤˮͺΆΈ-ΊΌΎ-ΡΣ-ώϐ-ϵϷ-ҁҊ-ӎӐ-ӹԀ-ԏԱ-Ֆՙա-ևא-תװ-ײء-غـ-يٮ-ٯٱ-ۓەۥ-ۦۮ-ۯۺ-ۼۿܐܒ-ܯݍ-ݭހ-ޥޱऄ-हऽॐक़-ॡॽঅ-ঌএ-ঐও-নপ-রলশ-হঽৎড়-ঢ়য়-ৡৰ-ৱਅ-ਊਏ-ਐਓ-ਨਪ-ਰਲ-ਲ਼ਵ-ਸ਼ਸ-ਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલ-ળવ-હઽૐૠ-ૡଅ-ଌଏ-ଐଓ-ନପ-ରଲ-ଳଵ-ହଽଡ଼-ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கங-சஜஞ-டண-தந-பம-ஹఅ-ఌఎ-ఐఒ-నప-ళవ-హౠ-ౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠ-ೡഅ-ഌഎ-ഐഒ-നപ-ഹൠ-ൡඅ-ඖක-නඳ-රලව-ෆก-ะา-ำเ-ๆກ-ຂຄງ-ຈຊຍດ-ທນ-ຟມ-ຣລວສ-ຫອ-ະາ-ຳຽເ-ໄໆໜ-ໝༀཀ-ཇཉ-ཪྈ-ྋက-အဣ-ဧဩ-ဪၐ-ၕႠ-Ⴥა-ჺჼᄀ-ᅙᅟ-ᆢᆨ-ᇹሀ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙶᚁ-ᚚᚠ-ᛪᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦩᧁ-ᧇᨀ-ᨖᴀ-ᶿḀ-ẛẠ-ỹἀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₔℂℇℊ--ℝℤΩℨK---ℹℼ-ℿⅅ-ⅉⰀ-Ⱞⰰ-ⱞⲀ-ⳤⴀ-ⴥⴰ-ⵥⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〆〱-〵〻-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄬㄱ-ㆎㆠ-ㆷㇰ-ㇿ㐀-䶵一-龻ꀀ-ꒌꠀ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢ가-힣豈-鶴侮-頻並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּ-סּףּ-פּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA--zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵÀ-ÖØ-öø-ÿĀ-ɏɓ-ɔɖ-ɗəɛɣɨɯɲʉʋʻ̀-ͯḀ-ỿЀ-ӿԀ-ԧⷠ-ⷿꙀ-֑ꚟ-ֿׁ-ׂׄ-ׇׅא-תװ-״﬒-ﬨשׁ-זּטּ-לּמּנּ-סּףּ-פּצּ-ﭏؐ-ؚؠ-ٟٮ-ۓە-ۜ۞-۪ۨ-ۯۺ-ۼۿݐ-ݿࢠࢢ-ࢬࣤ-ࣾﭐ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼ‌-‌ก-ฺเ-๎ᄀ-ᇿ㄰-ㆅꥠ-꥿가-힯ힰ-퟿ᄀ-ᅵァ-ヺー-ヾヲ-゚0---zぁ-ゖ゙-ゞ㐀-䶿一-鿿"+t(173824)+"-"+t(177983)+t(177984)+"-"+t(178207)+t(194560)+"-"+t(195103)+"〃々〻";return{alpha:e,alphanumeric:e+"̀-ͯ҃-֑҆-ֹֻ-ֽֿׁ-ׂׄ-ׇׅؐ-ًؕ-ٰٞۖ-ۜ۟-ۤۧ-۪ۨ-ܑۭܰ-݊ަ-ްँ-ः़ा-्॑-॔ॢ-ॣঁ-ঃ়া-ৄে-ৈো-্ৗৢ-ৣਁ-ਃ਼ਾ-ੂੇ-ੈੋ-੍ੰ-ੱઁ-ઃ઼ા-ૅે-ૉો-્ૢ-ૣଁ-ଃ଼ା-ୃେ-ୈୋ-୍ୖ-ୗஂா-ூெ-ைொ-்ௗఁ-ఃా-ౄె-ైొ-్ౕ-ౖಂ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕ-ೖം-ഃാ-ൃെ-ൈൊ-്ൗං-ඃ්ා-ුූෘ-ෟෲ-ෳัิ-ฺ็-๎ັິ-ູົ-ຼ່-ໍ༘-༹༙༵༷༾-༿ཱ-྄྆-྇ྐ-ྗྙ-ྼ࿆ာ-ဲံ-္ၖ-ၙ፟ᜒ-᜔ᜲ-᜴ᝒ-ᝓᝲ-ᝳា-៓៝᠋-᠍ᢩᤠ-ᤫᤰ-᤻ᦰ-ᧀᧈ-ᧉᨗ-ᨛ᷀-᷃⃐-⃥⃜⃡-⃫〪-゙〯-゚ꠂ꠆ꠋꠣ-ꠧﬞ︀-️︠-︣0-9٠-٩۰-۹०-९০-৯੦-੯૦-૯୦-୯௦-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩၀-၉០-៩᠐-᠙᥆-᥏᧐-᧙0-_",hashChars:"#\\uFF03"}}(),n="["+e+"]";return"("+("^|$|[^&/"+e+"]")+")("+("["+r+"]")+")("+n+"*"+("["+t+"]")+n+"*)"}(),"i");function c(){const[c]=r();o((()=>{if(!c.hasNodes([t]))throw new Error("HashtagPlugin: HashtagNode not registered on editor")}),[c]);const l=a((t=>e(t.getTextContent())),[]),s=a((t=>{const e=i.exec(t);if(null===e)return null;const r=e[3].length+1,n=e.index+e[1].length;return{end:n+r,start:n}}),[]);return n(s,t,l),null}export{c as HashtagPlugin};

View File

@@ -0,0 +1 @@
{"version":3,"file":"list-style-type.js","sourceRoot":"","sources":["../../../../src/css/property-descriptors/list-style-type.ts"],"names":[],"mappings":";;;AA2Da,QAAA,aAAa,GAAmD;IACzE,IAAI,EAAE,iBAAiB;IACvB,YAAY,EAAE,MAAM;IACpB,MAAM,EAAE,KAAK;IACb,IAAI,qBAA2C;IAC/C,KAAK,EAAE,UAAC,QAAiB,EAAE,IAAY;QACnC,QAAQ,IAAI,EAAE;YACV,KAAK,MAAM;gBACP,oBAA4B;YAChC,KAAK,QAAQ;gBACT,sBAA8B;YAClC,KAAK,QAAQ;gBACT,sBAA8B;YAClC,KAAK,SAAS;gBACV,uBAA+B;YACnC,KAAK,aAAa;gBACd,2BAAmC;YACvC,KAAK,sBAAsB;gBACvB,oCAA4C;YAChD,KAAK,aAAa;gBACd,2BAAmC;YACvC,KAAK,aAAa;gBACd,2BAAmC;YACvC,KAAK,aAAa;gBACd,2BAAmC;YACvC,KAAK,aAAa;gBACd,2BAAmC;YACvC,KAAK,aAAa;gBACd,4BAAmC;YACvC,KAAK,cAAc;gBACf,6BAAoC;YACxC,KAAK,UAAU;gBACX,yBAAgC;YACpC,KAAK,SAAS;gBACV,wBAA+B;YACnC,KAAK,WAAW;gBACZ,0BAAiC;YACrC,KAAK,oBAAoB;gBACrB,mCAA0C;YAC9C,KAAK,mBAAmB;gBACpB,kCAAyC;YAC7C,KAAK,iBAAiB;gBAClB,gCAAuC;YAC3C,KAAK,YAAY;gBACb,2BAAkC;YACtC,KAAK,kBAAkB;gBACnB,iCAAwC;YAC5C,KAAK,UAAU;gBACX,yBAAgC;YACpC,KAAK,UAAU;gBACX,yBAAgC;YACpC,KAAK,UAAU;gBACX,yBAAgC;YACpC,KAAK,QAAQ;gBACT,uBAA8B;YAClC,KAAK,UAAU;gBACX,yBAAgC;YACpC,KAAK,gBAAgB;gBACjB,+BAAsC;YAC1C,KAAK,iBAAiB;gBAClB,gCAAuC;YAC3C,KAAK,mBAAmB;gBACpB,kCAAyC;YAC7C,KAAK,SAAS;gBACV,wBAA+B;YACnC,KAAK,UAAU;gBACX,yBAAgC;YACpC,KAAK,gBAAgB;gBACjB,+BAAsC;YAC1C,KAAK,OAAO;gBACR,sBAA6B;YACjC,KAAK,sBAAsB;gBACvB,qCAA4C;YAChD,KAAK,qBAAqB;gBACtB,oCAA2C;YAC/C,KAAK,uBAAuB;gBACxB,sCAA6C;YACjD,KAAK,KAAK;gBACN,oBAA2B;YAC/B,KAAK,gBAAgB;gBACjB,+BAAsC;YAC1C,KAAK,WAAW;gBACZ,0BAAiC;YACrC,KAAK,WAAW;gBACZ,0BAAiC;YACrC,KAAK,SAAS;gBACV,wBAA+B;YACnC,KAAK,OAAO;gBACR,sBAA6B;YACjC,KAAK,SAAS;gBACV,wBAA+B;YACnC,KAAK,qBAAqB;gBACtB,oCAA2C;YAC/C,KAAK,uBAAuB;gBACxB,sCAA6C;YACjD,KAAK,OAAO;gBACR,sBAA6B;YACjC,KAAK,QAAQ;gBACT,uBAA8B;YAClC,KAAK,MAAM;gBACP,qBAA4B;YAChC,KAAK,SAAS;gBACV,wBAA+B;YACnC,KAAK,qBAAqB;gBACtB,oCAA2C;YAC/C,KAAK,uBAAuB;gBACxB,sCAA6C;YACjD,KAAK,gBAAgB;gBACjB,+BAAsC;YAC1C,KAAK,iBAAiB;gBAClB,gCAAuC;YAC3C,KAAK,mBAAmB;gBACpB,kCAAyC;YAC7C,KAAK,MAAM,CAAC;YACZ;gBACI,qBAA4B;SACnC;IACL,CAAC;CACJ,CAAC"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/elements/WhereBuilder/Condition/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAA2C,MAAM,OAAO,CAAA;AAE/D,OAAO,KAAK,EACV,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,eAAe,EACf,KAAK,EACN,MAAM,aAAa,CAAA;AAEpB,MAAM,MAAM,KAAK,GAAG;IAClB,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAA;IACnC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,aAAa,EAAE,qBAAqB,CAAA;IAC7C,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAA;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,aAAa,EAAE,YAAY,EAAE,CAAA;IACtC,QAAQ,CAAC,eAAe,EAAE,eAAe,CAAA;IACzC,QAAQ,CAAC,cAAc,EAAE,KAAK,CAAC,SAAS,CAAA;IACxC,QAAQ,CAAC,eAAe,EAAE,eAAe,CAAA;IACzC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAA;CACtB,CAAA;AAED,OAAO,KAAK,EAAE,QAAQ,EAA2B,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAWvF,OAAO,cAAc,CAAA;AAIrB,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAoLrC,CAAA"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"NoopContextManager.js","sourceRoot":"","sources":["../../../src/context/NoopContextManager.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,uCAAyC;AAGzC,MAAa,kBAAkB;IAC7B,MAAM;QACJ,OAAO,sBAAY,CAAC;IACtB,CAAC;IAED,IAAI,CACF,QAAuB,EACvB,EAAK,EACL,OAA8B,EAC9B,GAAG,IAAO;QAEV,OAAO,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;IACnC,CAAC;IAED,IAAI,CAAI,QAAuB,EAAE,MAAS;QACxC,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO;QACL,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAzBD,gDAyBC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ROOT_CONTEXT } from './context';\nimport * as types from './types';\n\nexport class NoopContextManager implements types.ContextManager {\n active(): types.Context {\n return ROOT_CONTEXT;\n }\n\n with<A extends unknown[], F extends (...args: A) => ReturnType<F>>(\n _context: types.Context,\n fn: F,\n thisArg?: ThisParameterType<F>,\n ...args: A\n ): ReturnType<F> {\n return fn.call(thisArg, ...args);\n }\n\n bind<T>(_context: types.Context, target: T): T {\n return target;\n }\n\n enable(): this {\n return this;\n }\n\n disable(): this {\n return this;\n }\n}\n"]}

View File

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

View File

@@ -0,0 +1,47 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
/** @typedef {import("./Resolver")} Resolver */
/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */
/** @typedef {string | string[] | false} Alias */
/** @typedef {{ alias: Alias, name: string, onlyModule?: boolean }} AliasOption */
const { aliasResolveHandler } = require("./AliasUtils");
module.exports = class AliasPlugin {
/**
* @param {string | ResolveStepHook} source source
* @param {AliasOption | AliasOption[]} options options
* @param {string | ResolveStepHook} target target
*/
constructor(source, options, target) {
this.source = source;
this.options = Array.isArray(options) ? options : [options];
this.target = target;
}
/**
* @param {Resolver} resolver the resolver
* @returns {void}
*/
apply(resolver) {
const target = resolver.ensureHook(this.target);
resolver
.getHook(this.source)
.tapAsync("AliasPlugin", (request, resolveContext, callback) => {
aliasResolveHandler(
resolver,
this.options,
target,
request,
resolveContext,
callback,
);
});
}
};

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/utilities/traverseFields.spec.ts"],"sourcesContent":["import { describe, it, expect } from 'vitest'\nimport { traverseFields } from './traverseFields.js'\nimport { Field } from '../fields/config/types.js'\n\ndescribe('traverseFields', () => {\n const tabsField: Field = {\n type: 'tabs',\n tabs: [\n {\n label: 'Tab 1',\n name: 'tab1',\n fields: [\n {\n type: 'tabs',\n tabs: [\n {\n label: 'Ui Only Tab',\n fields: [\n {\n type: 'group',\n name: 'group1',\n label: 'Group 1',\n fields: [\n {\n type: 'text',\n name: 'text1',\n label: 'Text 1',\n },\n ],\n },\n ],\n },\n ],\n },\n ],\n },\n ],\n }\n\n describe('tabs traversal', () => {\n it('should return correct dot notation in parentPath', () => {\n traverseFields({\n fields: [tabsField],\n callback: ({ field, parentPath }) => {\n if (field.type === 'text' && field.name === 'text1') {\n expect(parentPath).toEqual('tab1.group1.')\n }\n },\n })\n })\n })\n})\n"],"names":["describe","it","expect","traverseFields","tabsField","type","tabs","label","name","fields","callback","field","parentPath","toEqual"],"mappings":"AAAA,SAASA,QAAQ,EAAEC,EAAE,EAAEC,MAAM,QAAQ,SAAQ;AAC7C,SAASC,cAAc,QAAQ,sBAAqB;AAGpDH,SAAS,kBAAkB;IACzB,MAAMI,YAAmB;QACvBC,MAAM;QACNC,MAAM;YACJ;gBACEC,OAAO;gBACPC,MAAM;gBACNC,QAAQ;oBACN;wBACEJ,MAAM;wBACNC,MAAM;4BACJ;gCACEC,OAAO;gCACPE,QAAQ;oCACN;wCACEJ,MAAM;wCACNG,MAAM;wCACND,OAAO;wCACPE,QAAQ;4CACN;gDACEJ,MAAM;gDACNG,MAAM;gDACND,OAAO;4CACT;yCACD;oCACH;iCACD;4BACH;yBACD;oBACH;iBACD;YACH;SACD;IACH;IAEAP,SAAS,kBAAkB;QACzBC,GAAG,oDAAoD;YACrDE,eAAe;gBACbM,QAAQ;oBAACL;iBAAU;gBACnBM,UAAU,CAAC,EAAEC,KAAK,EAAEC,UAAU,EAAE;oBAC9B,IAAID,MAAMN,IAAI,KAAK,UAAUM,MAAMH,IAAI,KAAK,SAAS;wBACnDN,OAAOU,YAAYC,OAAO,CAAC;oBAC7B;gBACF;YACF;QACF;IACF;AACF"}

View File

@@ -0,0 +1,67 @@
'use client';
import { RowLabel } from '../forms/RowLabel/index.js';
import { ArrayField } from './Array/index.js';
import { BlocksField } from './Blocks/index.js';
import { CheckboxField } from './Checkbox/index.js';
import { CodeField } from './Code/index.js';
import { CollapsibleField } from './Collapsible/index.js';
import { ConfirmPasswordField } from './ConfirmPassword/index.js';
import { DateTimeField } from './DateTime/index.js';
import { EmailField } from './Email/index.js';
import { FieldDescription } from './FieldDescription/index.js';
import { FieldError } from './FieldError/index.js';
import { FieldLabel } from './FieldLabel/index.js';
import { GroupField } from './Group/index.js';
import { HiddenField } from './Hidden/index.js';
import { JoinField } from './Join/index.js';
import { JSONField } from './JSON/index.js';
import { NumberField } from './Number/index.js';
import { PasswordField } from './Password/index.js';
import { PointField } from './Point/index.js';
import { RadioGroupField } from './RadioGroup/index.js';
import { RelationshipField } from './Relationship/index.js';
import { RichTextField } from './RichText/index.js';
import { RowField } from './Row/index.js';
import { SelectField } from './Select/index.js';
import { TabsField } from './Tabs/index.js';
import { TextField } from './Text/index.js';
import { TextareaField } from './Textarea/index.js';
import { UIField } from './UI/index.js';
import { UploadField } from './Upload/index.js';
export * from './shared/index.js';
export const fieldComponents = {
array: ArrayField,
blocks: BlocksField,
checkbox: CheckboxField,
code: CodeField,
collapsible: CollapsibleField,
confirmPassword: ConfirmPasswordField,
date: DateTimeField,
email: EmailField,
group: GroupField,
hidden: HiddenField,
join: JoinField,
json: JSONField,
number: NumberField,
password: PasswordField,
point: PointField,
radio: RadioGroupField,
relationship: RelationshipField,
richText: RichTextField,
row: RowField,
select: SelectField,
tabs: TabsField,
text: TextField,
textarea: TextareaField,
ui: UIField,
upload: UploadField
};
export const allFieldComponents = {
...fieldComponents,
Description: FieldDescription,
Error: FieldError,
Label: FieldLabel,
RowLabel
};
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,8 @@
import { browserTracingIntegrationShim, consoleLoggingIntegrationShim, loggerShim } from '@sentry-internal/integration-shims';
import { feedbackAsyncIntegration } from './feedbackAsync';
export * from './index.bundle.base';
export { consoleLoggingIntegrationShim as consoleLoggingIntegration, loggerShim as logger };
export { getFeedback, sendFeedback } from '@sentry-internal/feedback';
export { browserTracingIntegrationShim as browserTracingIntegration, feedbackAsyncIntegration as feedbackAsyncIntegration, feedbackAsyncIntegration as feedbackIntegration, };
export { replayIntegration, getReplay } from '@sentry-internal/replay';
//# sourceMappingURL=index.bundle.replay.feedback.d.ts.map

View File

@@ -0,0 +1,30 @@
/**
* @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 MapPinHouse = createLucideIcon("MapPinHouse", [
[
"path",
{
d: "M15 22a1 1 0 0 1-1-1v-4a1 1 0 0 1 .445-.832l3-2a1 1 0 0 1 1.11 0l3 2A1 1 0 0 1 22 17v4a1 1 0 0 1-1 1z",
key: "1p1rcz"
}
],
[
"path",
{
d: "M18 10a8 8 0 0 0-16 0c0 4.993 5.539 10.193 7.399 11.799a1 1 0 0 0 .601.2",
key: "mcbcs9"
}
],
["path", { d: "M18 22v-3", key: "1t1ugv" }],
["circle", { cx: "10", cy: "10", r: "3", key: "1ns7v1" }]
]);
export { MapPinHouse as default };
//# sourceMappingURL=map-pin-house.js.map

View File

@@ -0,0 +1,27 @@
import { FlattenedEncrypt } from '../flattened/encrypt.js';
export class CompactEncrypt {
_flattened;
constructor(plaintext) {
this._flattened = new FlattenedEncrypt(plaintext);
}
setContentEncryptionKey(cek) {
this._flattened.setContentEncryptionKey(cek);
return this;
}
setInitializationVector(iv) {
this._flattened.setInitializationVector(iv);
return this;
}
setProtectedHeader(protectedHeader) {
this._flattened.setProtectedHeader(protectedHeader);
return this;
}
setKeyManagementParameters(parameters) {
this._flattened.setKeyManagementParameters(parameters);
return this;
}
async encrypt(key, options) {
const jwe = await this._flattened.encrypt(key, options);
return [jwe.protected, jwe.encrypted_key, jwe.iv, jwe.ciphertext, jwe.tag].join('.');
}
}

View File

@@ -0,0 +1,30 @@
"use strict";
exports.millisecondsToSeconds = millisecondsToSeconds;
var _index = require("./constants.cjs");
/**
* @name millisecondsToSeconds
* @category Conversion Helpers
* @summary Convert milliseconds to seconds.
*
* @description
* Convert a number of milliseconds to a full number of seconds.
*
* @param milliseconds - The number of milliseconds to be converted
*
* @returns The number of milliseconds converted in seconds
*
* @example
* // Convert 1000 milliseconds to seconds:
* const result = millisecondsToSeconds(1000)
* //=> 1
*
* @example
* // It uses floor rounding:
* const result = millisecondsToSeconds(1999)
* //=> 1
*/
function millisecondsToSeconds(milliseconds) {
const seconds = milliseconds / _index.millisecondsInSecond;
return Math.trunc(seconds);
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/baggage/types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { baggageEntryMetadataSymbol } from './internal/symbol';\n\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport interface BaggageEntry {\n /** `String` value of the `BaggageEntry`. */\n value: string;\n /**\n * Metadata is an optional string property defined by the W3C baggage specification.\n * It currently has no special meaning defined by the specification.\n */\n metadata?: BaggageEntryMetadata;\n}\n\n/**\n * Serializable Metadata defined by the W3C baggage specification.\n * It currently has no special meaning defined by the OpenTelemetry or W3C.\n */\nexport type BaggageEntryMetadata = { toString(): string } & {\n __TYPE__: typeof baggageEntryMetadataSymbol;\n};\n\n/**\n * Baggage represents collection of key-value pairs with optional metadata.\n * Each key of Baggage is associated with exactly one value.\n * Baggage may be used to annotate and enrich telemetry data.\n */\nexport interface Baggage {\n /**\n * Get an entry from Baggage if it exists\n *\n * @param key The key which identifies the BaggageEntry\n */\n getEntry(key: string): BaggageEntry | undefined;\n\n /**\n * Get a list of all entries in the Baggage\n */\n getAllEntries(): [string, BaggageEntry][];\n\n /**\n * Returns a new baggage with the entries from the current bag and the specified entry\n *\n * @param key string which identifies the baggage entry\n * @param entry BaggageEntry for the given key\n */\n setEntry(key: string, entry: BaggageEntry): Baggage;\n\n /**\n * Returns a new baggage with the entries from the current bag except the removed entry\n *\n * @param key key identifying the entry to be removed\n */\n removeEntry(key: string): Baggage;\n\n /**\n * Returns a new baggage with the entries from the current bag except the removed entries\n *\n * @param key keys identifying the entries to be removed\n */\n removeEntries(...key: string[]): Baggage;\n\n /**\n * Returns a new baggage with no entries\n */\n clear(): Baggage;\n}\n"]}

View File

@@ -0,0 +1,7 @@
import React from 'react';
import './index.scss';
export declare const LocalizerLabel: React.FC<{
ariaLabel?: string;
className?: string;
}>;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"getDocPreferences.js","names":["sanitizeID","getDocPreferences","id","collectionSlug","globalSlug","payload","user","preferencesKey","preferencesResult","find","collection","depth","limit","where","and","key","equals","docs","value","fields"],"sources":["../../../src/views/Document/getDocPreferences.ts"],"sourcesContent":["import type { DocumentPreferences, Payload, TypedUser } from 'payload'\n\nimport { sanitizeID } from '@payloadcms/ui/shared'\n\ntype Args = {\n collectionSlug?: string\n globalSlug?: string\n id?: number | string\n payload: Payload\n user: TypedUser\n}\n\nexport const getDocPreferences = async ({\n id,\n collectionSlug,\n globalSlug,\n payload,\n user,\n}: Args): Promise<DocumentPreferences> => {\n let preferencesKey\n\n if (collectionSlug && id) {\n preferencesKey = `collection-${collectionSlug}-${id}`\n }\n\n if (globalSlug) {\n preferencesKey = `global-${globalSlug}`\n }\n\n if (preferencesKey) {\n const preferencesResult = (await payload.find({\n collection: 'payload-preferences',\n depth: 0,\n limit: 1,\n where: {\n and: [\n {\n key: {\n equals: preferencesKey,\n },\n },\n {\n 'user.relationTo': {\n equals: user.collection,\n },\n },\n {\n 'user.value': {\n equals: sanitizeID(user.id),\n },\n },\n ],\n },\n })) as unknown as { docs: { value: DocumentPreferences }[] }\n\n if (preferencesResult?.docs?.[0]?.value) {\n return preferencesResult.docs[0].value\n }\n }\n\n return { fields: {} }\n}\n"],"mappings":"AAEA,SAASA,UAAU,QAAQ;AAU3B,OAAO,MAAMC,iBAAA,GAAoB,MAAAA,CAAO;EACtCC,EAAE;EACFC,cAAc;EACdC,UAAU;EACVC,OAAO;EACPC;AAAI,CACC;EACL,IAAIC,cAAA;EAEJ,IAAIJ,cAAA,IAAkBD,EAAA,EAAI;IACxBK,cAAA,GAAiB,cAAcJ,cAAA,IAAkBD,EAAA,EAAI;EACvD;EAEA,IAAIE,UAAA,EAAY;IACdG,cAAA,GAAiB,UAAUH,UAAA,EAAY;EACzC;EAEA,IAAIG,cAAA,EAAgB;IAClB,MAAMC,iBAAA,GAAqB,MAAMH,OAAA,CAAQI,IAAI,CAAC;MAC5CC,UAAA,EAAY;MACZC,KAAA,EAAO;MACPC,KAAA,EAAO;MACPC,KAAA,EAAO;QACLC,GAAA,EAAK,CACH;UACEC,GAAA,EAAK;YACHC,MAAA,EAAQT;UACV;QACF,GACA;UACE,mBAAmB;YACjBS,MAAA,EAAQV,IAAA,CAAKI;UACf;QACF,GACA;UACE,cAAc;YACZM,MAAA,EAAQhB,UAAA,CAAWM,IAAA,CAAKJ,EAAE;UAC5B;QACF;MAEJ;IACF;IAEA,IAAIM,iBAAA,EAAmBS,IAAA,GAAO,EAAE,EAAEC,KAAA,EAAO;MACvC,OAAOV,iBAAA,CAAkBS,IAAI,CAAC,EAAE,CAACC,KAAK;IACxC;EACF;EAEA,OAAO;IAAEC,MAAA,EAAQ,CAAC;EAAE;AACtB","ignoreList":[]}

View File

@@ -0,0 +1,35 @@
"use strict";
exports.startOfSecond = startOfSecond;
var _index = require("./toDate.cjs");
/**
* The {@link startOfSecond} function options.
*/
/**
* @name startOfSecond
* @category Second Helpers
* @summary Return the start of a second for the given date.
*
* @description
* Return the start of a second for the given date.
* The result will be in the local timezone.
*
* @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 original date
* @param options - The options
*
* @returns The start of a second
*
* @example
* // The start of a second for 1 December 2014 22:15:45.400:
* const result = startOfSecond(new Date(2014, 11, 1, 22, 15, 45, 400))
* //=> Mon Dec 01 2014 22:15:45.000
*/
function startOfSecond(date, options) {
const date_ = (0, _index.toDate)(date, options?.in);
date_.setMilliseconds(0);
return date_;
}

View File

@@ -0,0 +1,17 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const FileQuestion = createLucideIcon("FileQuestion", [
["path", { d: "M12 17h.01", key: "p32p05" }],
["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z", key: "1mlx9k" }],
["path", { d: "M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3", key: "mhlwft" }]
]);
export { FileQuestion as default };
//# sourceMappingURL=file-question.js.map

View File

@@ -0,0 +1,30 @@
import { complex } from '../../value/types/complex/index.mjs';
/**
* Check if a value is animatable. Examples:
*
* ✅: 100, "100px", "#fff"
* ❌: "block", "url(2.jpg)"
* @param value
*
* @internal
*/
const isAnimatable = (value, name) => {
// If the list of keys tat might be non-animatable grows, replace with Set
if (name === "zIndex")
return false;
// If it's a number or a keyframes array, we can animate it. We might at some point
// need to do a deep isAnimatable check of keyframes, or let Popmotion handle this,
// but for now lets leave it like this for performance reasons
if (typeof value === "number" || Array.isArray(value))
return true;
if (typeof value === "string" && // It's animatable if we have a string
(complex.test(value) || value === "0") && // And it contains numbers and/or colors
!value.startsWith("url(") // Unless it starts with "url("
) {
return true;
}
return false;
};
export { isAnimatable };

View File

@@ -0,0 +1,35 @@
import type { Job } from '../../index.js';
import type { PayloadRequest, Sort, Where } from '../../types/index.js';
type BaseArgs = {
data: Partial<Job>;
depth?: number;
disableTransaction?: boolean;
limit?: number;
req: PayloadRequest;
returning?: boolean;
};
type ArgsByID = {
id: number | string;
limit?: never;
sort?: never;
where?: never;
};
type ArgsWhere = {
id?: never;
limit?: number;
sort?: Sort;
where: Where;
};
type RunJobsArgs = (ArgsByID | ArgsWhere) & BaseArgs;
/**
* Convenience method for updateJobs by id
*/
export declare function updateJob(args: ArgsByID & BaseArgs): Promise<Job | undefined>;
/**
* Helper for updating jobs in the most performant way possible.
* Handles deciding whether it can used direct db methods or not, and if so,
* manually runs the afterRead hook that populates the `taskStatus` property.
*/
export declare function updateJobs({ id, data, depth, disableTransaction, limit: limitArg, req, returning, sort, where: whereArg, }: RunJobsArgs): Promise<Job[] | null>;
export {};
//# sourceMappingURL=updateJob.d.ts.map

View File

@@ -0,0 +1,67 @@
import { getRoundingMethod } from "./_lib/getRoundingMethod.js";
import { constructFrom } from "./constructFrom.js";
import { toDate } from "./toDate.js";
/**
* The {@link roundToNearestMinutes} function options.
*/
/**
* @name roundToNearestMinutes
* @category Minute Helpers
* @summary Rounds the given date to the nearest minute
*
* @description
* Rounds the given date to the nearest minute (or number of minutes).
* Rounds up when the given date is exactly between the nearest round minutes.
*
* @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 round
* @param options - An object with options.
*
* @returns The new date rounded to the closest minute
*
* @example
* // Round 10 July 2014 12:12:34 to nearest minute:
* const result = roundToNearestMinutes(new Date(2014, 6, 10, 12, 12, 34))
* //=> Thu Jul 10 2014 12:13:00
*
* @example
* // Round 10 July 2014 12:12:34 to nearest quarter hour:
* const result = roundToNearestMinutes(new Date(2014, 6, 10, 12, 12, 34), { nearestTo: 15 })
* //=> Thu Jul 10 2014 12:15:00
*
* @example
* // Floor (rounds down) 10 July 2014 12:12:34 to nearest minute:
* const result = roundToNearestMinutes(new Date(2014, 6, 10, 12, 12, 34), { roundingMethod: 'floor' })
* //=> Thu Jul 10 2014 12:12:00
*
* @example
* // Ceil (rounds up) 10 July 2014 12:12:34 to nearest half hour:
* const result = roundToNearestMinutes(new Date(2014, 6, 10, 12, 12, 34), { roundingMethod: 'ceil', nearestTo: 30 })
* //=> Thu Jul 10 2014 12:30:00
*/
export function roundToNearestMinutes(date, options) {
const nearestTo = options?.nearestTo ?? 1;
if (nearestTo < 1 || nearestTo > 30) return constructFrom(date, NaN);
const date_ = toDate(date, options?.in);
const fractionalSeconds = date_.getSeconds() / 60;
const fractionalMilliseconds = date_.getMilliseconds() / 1000 / 60;
const minutes =
date_.getMinutes() + fractionalSeconds + fractionalMilliseconds;
const method = options?.roundingMethod ?? "round";
const roundingMethod = getRoundingMethod(method);
const roundedMinutes = roundingMethod(minutes / nearestTo) * nearestTo;
date_.setMinutes(roundedMinutes, 0, 0);
return date_;
}
// Fallback for modularized imports:
export default roundToNearestMinutes;

View File

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

View File

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

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

View File

@@ -0,0 +1,33 @@
var baseRepeat = require('./_baseRepeat'),
baseToString = require('./_baseToString'),
castSlice = require('./_castSlice'),
hasUnicode = require('./_hasUnicode'),
stringSize = require('./_stringSize'),
stringToArray = require('./_stringToArray');
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeCeil = Math.ceil;
/**
* Creates the padding for `string` based on `length`. The `chars` string
* is truncated if the number of characters exceeds `length`.
*
* @private
* @param {number} length The padding length.
* @param {string} [chars=' '] The string used as padding.
* @returns {string} Returns the padding for `string`.
*/
function createPadding(length, chars) {
chars = chars === undefined ? ' ' : baseToString(chars);
var charsLength = chars.length;
if (charsLength < 2) {
return charsLength ? baseRepeat(chars, length) : chars;
}
var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
return hasUnicode(chars)
? castSlice(stringToArray(result), 0, length).join('')
: result.slice(0, length);
}
module.exports = createPadding;

View File

@@ -0,0 +1,37 @@
import type { TFunction } from '@payloadcms/translations';
import type { Pill } from '@payloadcms/ui';
type Args = {
currentLocale?: string;
currentlyPublishedVersion?: {
id: number | string;
publishedLocale?: string;
updatedAt: string;
version: {
updatedAt: string;
};
};
latestDraftVersion?: {
id: number | string;
updatedAt: string;
};
t: TFunction;
version: {
id: number | string;
publishedLocale?: string;
version: {
_status?: 'draft' | 'published';
updatedAt: string;
};
};
};
/**
* Gets the appropriate version label and version pill styling
* given existing versions and the current version status.
*/
export declare function getVersionLabel({ currentLocale, currentlyPublishedVersion, latestDraftVersion, t, version, }: Args): {
label: string;
name: 'currentDraft' | 'currentlyPublished' | 'draft' | 'previouslyPublished' | 'published';
pillStyle: Parameters<typeof Pill>[0]['pillStyle'];
};
export {};
//# sourceMappingURL=getVersionLabel.d.ts.map

View File

@@ -0,0 +1,2 @@
import { isSafeInteger } from "./index";
export = isSafeInteger;

View File

@@ -0,0 +1,37 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ono = void 0;
const constructor_1 = require("./constructor");
const singleton = ono;
exports.ono = singleton;
ono.error = new constructor_1.Ono(Error);
ono.eval = new constructor_1.Ono(EvalError);
ono.range = new constructor_1.Ono(RangeError);
ono.reference = new constructor_1.Ono(ReferenceError);
ono.syntax = new constructor_1.Ono(SyntaxError);
ono.type = new constructor_1.Ono(TypeError);
ono.uri = new constructor_1.Ono(URIError);
const onoMap = ono;
/**
* Creates a new error with the specified message, properties, and/or inner error.
* If an inner error is provided, then the new error will match its type, if possible.
*/
function ono(...args) {
let originalError = args[0];
// Is the first argument an Error-like object?
if (typeof originalError === "object" && typeof originalError.name === "string") {
// Try to find an Ono singleton method that matches this error type
for (let typedOno of Object.values(onoMap)) {
if (typeof typedOno === "function" && typedOno.name === "ono") {
let species = typedOno[Symbol.species];
if (species && species !== Error && (originalError instanceof species || originalError.name === species.name)) {
// Create an error of the same type
return typedOno.apply(undefined, args);
}
}
}
}
// By default, create a base Error object
return ono.error.apply(undefined, args);
}
//# sourceMappingURL=singleton.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"handleCallbackErrors.js","sources":["../../../src/utils/handleCallbackErrors.ts"],"sourcesContent":["import { isThenable } from '../utils/is';\n\n/* eslint-disable */\n// Vendor \"Awaited\" in to be TS 3.8 compatible\ntype AwaitedPromise<T> = T extends null | undefined\n ? T // special case for `null | undefined` when not in `--strictNullChecks` mode\n : T extends object & { then(onfulfilled: infer F, ...args: infer _): any } // `await` only unwraps object types with a callable `then`. Non-object types are not unwrapped\n ? F extends (value: infer V, ...args: infer _) => any // if the argument to `then` is callable, extracts the first argument\n ? V // normally this would recursively unwrap, but this is not possible in TS3.8\n : never // the argument to `then` was not callable\n : T; // non-object or non-thenable\n/* eslint-enable */\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function handleCallbackErrors<Fn extends () => Promise<any>, PromiseValue = AwaitedPromise<ReturnType<Fn>>>(\n fn: Fn,\n onError: (error: unknown) => void,\n onFinally?: () => void,\n onSuccess?: (result: PromiseValue) => void,\n): ReturnType<Fn>;\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function handleCallbackErrors<Fn extends () => any>(\n fn: Fn,\n onError: (error: unknown) => void,\n onFinally?: () => void,\n onSuccess?: (result: ReturnType<Fn>) => void,\n): ReturnType<Fn>;\n/**\n * Wrap a callback function with error handling.\n * If an error is thrown, it will be passed to the `onError` callback and re-thrown.\n *\n * If the return value of the function is a promise, it will be handled with `maybeHandlePromiseRejection`.\n *\n * If an `onFinally` callback is provided, this will be called when the callback has finished\n * - so if it returns a promise, once the promise resolved/rejected,\n * else once the callback has finished executing.\n * The `onFinally` callback will _always_ be called, no matter if an error was thrown or not.\n */\nexport function handleCallbackErrors<\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Fn extends () => any,\n ValueType = ReturnType<Fn>,\n>(\n fn: Fn,\n onError: (error: unknown) => void,\n onFinally: () => void = () => {},\n onSuccess: (result: ValueType | AwaitedPromise<ValueType>) => void = () => {},\n): ValueType {\n let maybePromiseResult: ReturnType<Fn>;\n try {\n maybePromiseResult = fn();\n } catch (e) {\n onError(e);\n onFinally();\n throw e;\n }\n\n return maybeHandlePromiseRejection(maybePromiseResult, onError, onFinally, onSuccess);\n}\n\n/**\n * Maybe handle a promise rejection.\n * This expects to be given a value that _may_ be a promise, or any other value.\n * If it is a promise, and it rejects, it will call the `onError` callback.\n * Other than this, it will generally return the given value as-is.\n */\nfunction maybeHandlePromiseRejection<MaybePromise>(\n value: MaybePromise,\n onError: (error: unknown) => void,\n onFinally: () => void,\n onSuccess: (result: MaybePromise | AwaitedPromise<MaybePromise>) => void,\n): MaybePromise {\n if (isThenable(value)) {\n // @ts-expect-error - the isThenable check returns the \"wrong\" type here\n return value.then(\n res => {\n onFinally();\n onSuccess(res);\n return res;\n },\n e => {\n onError(e);\n onFinally();\n throw e;\n },\n );\n }\n\n onFinally();\n onSuccess(value);\n return value;\n}\n"],"names":["isThenable"],"mappings":";;;;AAEA;AACA;;AAwBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS;;AAIhB;AACA,EAAE,EAAE;AACJ,EAAE,OAAO;AACT,EAAE,SAAS,GAAe,MAAM,CAAC,CAAC;AAClC,EAAE,SAAS,GAA4D,MAAM,CAAC,CAAC;AAC/E,EAAa;AACb,EAAE,IAAI,kBAAkB;AACxB,EAAE,IAAI;AACN,IAAI,kBAAA,GAAqB,EAAE,EAAE;AAC7B,EAAE,CAAA,CAAE,OAAO,CAAC,EAAE;AACd,IAAI,OAAO,CAAC,CAAC,CAAC;AACd,IAAI,SAAS,EAAE;AACf,IAAI,MAAM,CAAC;AACX,EAAE;;AAEF,EAAE,OAAO,2BAA2B,CAAC,kBAAkB,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,CAAC;AACvF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,2BAA2B;AACpC,EAAE,KAAK;AACP,EAAE,OAAO;AACT,EAAE,SAAS;AACX,EAAE,SAAS;AACX,EAAgB;AAChB,EAAE,IAAIA,aAAU,CAAC,KAAK,CAAC,EAAE;AACzB;AACA,IAAI,OAAO,KAAK,CAAC,IAAI;AACrB,MAAM,OAAO;AACb,QAAQ,SAAS,EAAE;AACnB,QAAQ,SAAS,CAAC,GAAG,CAAC;AACtB,QAAQ,OAAO,GAAG;AAClB,MAAM,CAAC;AACP,MAAM,KAAK;AACX,QAAQ,OAAO,CAAC,CAAC,CAAC;AAClB,QAAQ,SAAS,EAAE;AACnB,QAAQ,MAAM,CAAC;AACf,MAAM,CAAC;AACP,KAAK;AACL,EAAE;;AAEF,EAAE,SAAS,EAAE;AACb,EAAE,SAAS,CAAC,KAAK,CAAC;AAClB,EAAE,OAAO,KAAK;AACd;;;;"}

View File

@@ -0,0 +1,248 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra and Zackary Jackson @ScriptedAlchemy
*/
"use strict";
const WebpackError = require("../WebpackError");
const { parseOptions } = require("../container/options");
const createSchemaValidation = require("../util/create-schema-validation");
const ProvideForSharedDependency = require("./ProvideForSharedDependency");
const ProvideSharedDependency = require("./ProvideSharedDependency");
const ProvideSharedModuleFactory = require("./ProvideSharedModuleFactory");
/** @typedef {import("../../declarations/plugins/sharing/ProvideSharedPlugin").ProvideSharedPluginOptions} ProvideSharedPluginOptions */
/** @typedef {import("../Compilation")} Compilation */
/** @typedef {import("../Compiler")} Compiler */
/** @typedef {import("../NormalModuleFactory").NormalModuleCreateData} NormalModuleCreateData */
const validate = createSchemaValidation(
require("../../schemas/plugins/sharing/ProvideSharedPlugin.check"),
() => require("../../schemas/plugins/sharing/ProvideSharedPlugin.json"),
{
name: "Provide Shared Plugin",
baseDataPath: "options"
}
);
/**
* @typedef {object} ProvideOptions
* @property {string} shareKey
* @property {string} shareScope
* @property {string | undefined | false} version
* @property {boolean} eager
*/
/** @typedef {Map<string, { config: ProvideOptions, version: string | undefined | false }>} ResolvedProvideMap */
const PLUGIN_NAME = "ProvideSharedPlugin";
class ProvideSharedPlugin {
/**
* @param {ProvideSharedPluginOptions} options options
*/
constructor(options) {
validate(options);
/** @type {[string, ProvideOptions][]} */
this._provides = parseOptions(
options.provides,
(item) => {
if (Array.isArray(item)) {
throw new Error("Unexpected array of provides");
}
/** @type {ProvideOptions} */
const result = {
shareKey: item,
version: undefined,
shareScope: options.shareScope || "default",
eager: false
};
return result;
},
(item) => ({
shareKey: /** @type {string} */ (item.shareKey),
version: item.version,
shareScope: item.shareScope || options.shareScope || "default",
eager: Boolean(item.eager)
})
);
this._provides.sort(([a], [b]) => {
if (a < b) return -1;
if (b < a) return 1;
return 0;
});
}
/**
* Apply the plugin
* @param {Compiler} compiler the compiler instance
* @returns {void}
*/
apply(compiler) {
/** @type {WeakMap<Compilation, ResolvedProvideMap>} */
const compilationData = new WeakMap();
compiler.hooks.compilation.tap(
PLUGIN_NAME,
(compilation, { normalModuleFactory }) => {
/** @type {ResolvedProvideMap} */
const resolvedProvideMap = new Map();
/** @type {Map<string, ProvideOptions>} */
const matchProvides = new Map();
/** @type {Map<string, ProvideOptions>} */
const prefixMatchProvides = new Map();
for (const [request, config] of this._provides) {
if (/^(?:\/|[A-Z]:\\|\\\\|\.\.?(?:\/|$))/i.test(request)) {
// relative request
resolvedProvideMap.set(request, {
config,
version: config.version
});
} else if (/^(?:\/|[A-Z]:\\|\\\\)/i.test(request)) {
// absolute path
resolvedProvideMap.set(request, {
config,
version: config.version
});
} else if (request.endsWith("/")) {
// module request prefix
prefixMatchProvides.set(request, config);
} else {
// module request
matchProvides.set(request, config);
}
}
compilationData.set(compilation, resolvedProvideMap);
/**
* @param {string} key key
* @param {ProvideOptions} config config
* @param {NormalModuleCreateData["resource"]} resource resource
* @param {NormalModuleCreateData["resourceResolveData"]} resourceResolveData resource resolve data
*/
const provideSharedModule = (
key,
config,
resource,
resourceResolveData
) => {
let version = config.version;
if (version === undefined) {
let details = "";
if (!resourceResolveData) {
details = "No resolve data provided from resolver.";
} else {
const descriptionFileData =
resourceResolveData.descriptionFileData;
if (!descriptionFileData) {
details =
"No description file (usually package.json) found. Add description file with name and version, or manually specify version in shared config.";
} else if (!descriptionFileData.version) {
details = `No version in description file (usually package.json). Add version to description file ${resourceResolveData.descriptionFilePath}, or manually specify version in shared config.`;
} else {
version = /** @type {string | false | undefined} */ (
descriptionFileData.version
);
}
}
if (!version) {
const error = new WebpackError(
`No version specified and unable to automatically determine one. ${details}`
);
error.file = `shared module ${key} -> ${resource}`;
compilation.warnings.push(error);
}
}
resolvedProvideMap.set(resource, {
config,
version
});
};
normalModuleFactory.hooks.module.tap(
PLUGIN_NAME,
(module, { resource, resourceResolveData }, resolveData) => {
if (resolvedProvideMap.has(/** @type {string} */ (resource))) {
return module;
}
const { request } = resolveData;
{
const config = matchProvides.get(request);
if (config !== undefined) {
provideSharedModule(
request,
config,
/** @type {string} */ (resource),
resourceResolveData
);
resolveData.cacheable = false;
}
}
for (const [prefix, config] of prefixMatchProvides) {
if (request.startsWith(prefix)) {
const remainder = request.slice(prefix.length);
provideSharedModule(
/** @type {string} */ (resource),
{
...config,
shareKey: config.shareKey + remainder
},
/** @type {string} */ (resource),
resourceResolveData
);
resolveData.cacheable = false;
}
}
return module;
}
);
}
);
compiler.hooks.finishMake.tapPromise(PLUGIN_NAME, (compilation) => {
const resolvedProvideMap = compilationData.get(compilation);
if (!resolvedProvideMap) return Promise.resolve();
return Promise.all(
Array.from(
resolvedProvideMap,
([resource, { config, version }]) =>
new Promise((resolve, reject) => {
compilation.addInclude(
compiler.context,
new ProvideSharedDependency(
config.shareScope,
config.shareKey,
version || false,
resource,
config.eager
),
{
name: undefined
},
(err) => {
if (err) return reject(err);
resolve(null);
}
);
})
)
).then(() => {});
});
compiler.hooks.compilation.tap(
PLUGIN_NAME,
(compilation, { normalModuleFactory }) => {
compilation.dependencyFactories.set(
ProvideForSharedDependency,
normalModuleFactory
);
compilation.dependencyFactories.set(
ProvideSharedDependency,
new ProvideSharedModuleFactory()
);
}
);
}
}
module.exports = ProvideSharedPlugin;

View File

@@ -0,0 +1,35 @@
import { MySQLInstrumentation } from '@opentelemetry/instrumentation-mysql';
import { defineIntegration } from '@sentry/core';
import { generateInstrumentOnce } from '@sentry/node-core';
const INTEGRATION_NAME = 'Mysql';
const instrumentMysql = generateInstrumentOnce(INTEGRATION_NAME, () => new MySQLInstrumentation({}));
const _mysqlIntegration = (() => {
return {
name: INTEGRATION_NAME,
setupOnce() {
instrumentMysql();
},
};
}) ;
/**
* Adds Sentry tracing instrumentation for the [mysql](https://www.npmjs.com/package/mysql) library.
*
* For more information, see the [`mysqlIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/mysql/).
*
* @example
* ```javascript
* const Sentry = require('@sentry/node');
*
* Sentry.init({
* integrations: [Sentry.mysqlIntegration()],
* });
* ```
*/
const mysqlIntegration = defineIntegration(_mysqlIntegration);
export { instrumentMysql, mysqlIntegration };
//# sourceMappingURL=mysql.js.map

View File

@@ -0,0 +1,213 @@
import { buildLocalizeFn } from "../../_lib/buildLocalizeFn.js";
const eraValues = {
narrow: ["p.n.e.", "n.e."],
abbreviated: ["p.n.e.", "n.e."],
wide: ["przed naszą erą", "naszej ery"],
};
const quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["I kw.", "II kw.", "III kw.", "IV kw."],
wide: ["I kwartał", "II kwartał", "III kwartał", "IV kwartał"],
};
const monthValues = {
narrow: ["S", "L", "M", "K", "M", "C", "L", "S", "W", "P", "L", "G"],
abbreviated: [
"sty",
"lut",
"mar",
"kwi",
"maj",
"cze",
"lip",
"sie",
"wrz",
"paź",
"lis",
"gru",
],
wide: [
"styczeń",
"luty",
"marzec",
"kwiecień",
"maj",
"czerwiec",
"lipiec",
"sierpień",
"wrzesień",
"październik",
"listopad",
"grudzień",
],
};
const monthFormattingValues = {
narrow: ["s", "l", "m", "k", "m", "c", "l", "s", "w", "p", "l", "g"],
abbreviated: [
"sty",
"lut",
"mar",
"kwi",
"maj",
"cze",
"lip",
"sie",
"wrz",
"paź",
"lis",
"gru",
],
wide: [
"stycznia",
"lutego",
"marca",
"kwietnia",
"maja",
"czerwca",
"lipca",
"sierpnia",
"września",
"października",
"listopada",
"grudnia",
],
};
const dayValues = {
narrow: ["N", "P", "W", "Ś", "C", "P", "S"],
short: ["nie", "pon", "wto", "śro", "czw", "pią", "sob"],
abbreviated: ["niedz.", "pon.", "wt.", "śr.", "czw.", "pt.", "sob."],
wide: [
"niedziela",
"poniedziałek",
"wtorek",
"środa",
"czwartek",
"piątek",
"sobota",
],
};
const dayFormattingValues = {
narrow: ["n", "p", "w", "ś", "c", "p", "s"],
short: ["nie", "pon", "wto", "śro", "czw", "pią", "sob"],
abbreviated: ["niedz.", "pon.", "wt.", "śr.", "czw.", "pt.", "sob."],
wide: [
"niedziela",
"poniedziałek",
"wtorek",
"środa",
"czwartek",
"piątek",
"sobota",
],
};
const dayPeriodValues = {
narrow: {
am: "a",
pm: "p",
midnight: "półn.",
noon: "poł",
morning: "rano",
afternoon: "popoł.",
evening: "wiecz.",
night: "noc",
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "północ",
noon: "południe",
morning: "rano",
afternoon: "popołudnie",
evening: "wieczór",
night: "noc",
},
wide: {
am: "AM",
pm: "PM",
midnight: "północ",
noon: "południe",
morning: "rano",
afternoon: "popołudnie",
evening: "wieczór",
night: "noc",
},
};
const dayPeriodFormattingValues = {
narrow: {
am: "a",
pm: "p",
midnight: "o półn.",
noon: "w poł.",
morning: "rano",
afternoon: "po poł.",
evening: "wiecz.",
night: "w nocy",
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "o północy",
noon: "w południe",
morning: "rano",
afternoon: "po południu",
evening: "wieczorem",
night: "w nocy",
},
wide: {
am: "AM",
pm: "PM",
midnight: "o północy",
noon: "w południe",
morning: "rano",
afternoon: "po południu",
evening: "wieczorem",
night: "w nocy",
},
};
const ordinalNumber = (dirtyNumber, _options) => {
return String(dirtyNumber);
};
export const localize = {
ordinalNumber,
era: buildLocalizeFn({
values: eraValues,
defaultWidth: "wide",
}),
quarter: buildLocalizeFn({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: (quarter) => quarter - 1,
}),
month: buildLocalizeFn({
values: monthValues,
defaultWidth: "wide",
formattingValues: monthFormattingValues,
defaultFormattingWidth: "wide",
}),
day: buildLocalizeFn({
values: dayValues,
defaultWidth: "wide",
formattingValues: dayFormattingValues,
defaultFormattingWidth: "wide",
}),
dayPeriod: buildLocalizeFn({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: dayPeriodFormattingValues,
defaultFormattingWidth: "wide",
}),
};

View File

@@ -0,0 +1,110 @@
// @ts-ignore TS6133
import { expect, test } from "vitest";
import * as z from "zod/v3";
import { ZodIssueCode } from "zod/v3";
import { util } from "../helpers/util.js";
const stringMap = z.map(z.string(), z.string());
type stringMap = z.infer<typeof stringMap>;
test("type inference", () => {
util.assertEqual<stringMap, Map<string, string>>(true);
});
test("valid parse", () => {
const result = stringMap.safeParse(
new Map([
["first", "foo"],
["second", "bar"],
])
);
expect(result.success).toEqual(true);
if (result.success) {
expect(result.data.has("first")).toEqual(true);
expect(result.data.has("second")).toEqual(true);
expect(result.data.get("first")).toEqual("foo");
expect(result.data.get("second")).toEqual("bar");
}
});
test("valid parse async", async () => {
const result = await stringMap.spa(
new Map([
["first", "foo"],
["second", "bar"],
])
);
expect(result.success).toEqual(true);
if (result.success) {
expect(result.data.has("first")).toEqual(true);
expect(result.data.has("second")).toEqual(true);
expect(result.data.get("first")).toEqual("foo");
expect(result.data.get("second")).toEqual("bar");
}
});
test("throws when a Set is given", () => {
const result = stringMap.safeParse(new Set([]));
expect(result.success).toEqual(false);
if (result.success === false) {
expect(result.error.issues.length).toEqual(1);
expect(result.error.issues[0].code).toEqual(ZodIssueCode.invalid_type);
}
});
test("throws when the given map has invalid key and invalid input", () => {
const result = stringMap.safeParse(new Map([[42, Symbol()]]));
expect(result.success).toEqual(false);
if (result.success === false) {
expect(result.error.issues.length).toEqual(2);
expect(result.error.issues[0].code).toEqual(ZodIssueCode.invalid_type);
expect(result.error.issues[0].path).toEqual([0, "key"]);
expect(result.error.issues[1].code).toEqual(ZodIssueCode.invalid_type);
expect(result.error.issues[1].path).toEqual([0, "value"]);
}
});
test("throws when the given map has multiple invalid entries", () => {
// const result = stringMap.safeParse(new Map([[42, Symbol()]]));
const result = stringMap.safeParse(
new Map([
[1, "foo"],
["bar", 2],
] as [any, any][]) as Map<any, any>
);
// const result = stringMap.safeParse(new Map([[42, Symbol()]]));
expect(result.success).toEqual(false);
if (result.success === false) {
expect(result.error.issues.length).toEqual(2);
expect(result.error.issues[0].code).toEqual(ZodIssueCode.invalid_type);
expect(result.error.issues[0].path).toEqual([0, "key"]);
expect(result.error.issues[1].code).toEqual(ZodIssueCode.invalid_type);
expect(result.error.issues[1].path).toEqual([1, "value"]);
}
});
test("dirty", async () => {
const map = z.map(
z.string().refine((val) => val === val.toUpperCase(), {
message: "Keys must be uppercase",
}),
z.string()
);
const result = await map.spa(
new Map([
["first", "foo"],
["second", "bar"],
])
);
expect(result.success).toEqual(false);
if (!result.success) {
expect(result.error.issues.length).toEqual(2);
expect(result.error.issues[0].code).toEqual(z.ZodIssueCode.custom);
expect(result.error.issues[0].message).toEqual("Keys must be uppercase");
expect(result.error.issues[1].code).toEqual(z.ZodIssueCode.custom);
expect(result.error.issues[1].message).toEqual("Keys must be uppercase");
}
});

View File

@@ -0,0 +1,12 @@
import { RestCommand } from "../../types.js";
//#region src/rest/commands/utils/cache.d.ts
/**
* Resets both the data and schema cache of Directus. This endpoint is only available to admin users.
* @returns Nothing
*/
declare const clearCache: <Schema>() => RestCommand<void, Schema>;
//#endregion
export { clearCache };
//# sourceMappingURL=cache.d.ts.map

View File

@@ -0,0 +1,14 @@
import { createLocalReq } from '../../../utilities/createLocalReq.js';
import { auth as authOperation } from '../auth.js';
export const authLocal = async (payload, options)=>{
const { headers, req } = options;
return await authOperation({
canSetHeaders: Boolean(options.canSetHeaders),
headers,
req: await createLocalReq({
req
}, payload)
});
};
//# sourceMappingURL=auth.js.map

View File

@@ -0,0 +1,47 @@
"use strict";
exports.formatLong = void 0;
var _index = require("../../_lib/buildFormatLongFn.cjs");
const dateFormats = {
// thứ Sáu, ngày 25 tháng 08 năm 2017
full: "EEEE, 'ngày' d MMMM 'năm' y",
// ngày 25 tháng 08 năm 2017
long: "'ngày' d MMMM 'năm' y",
// 25 thg 08 năm 2017
medium: "d MMM 'năm' y",
// 25/08/2017
short: "dd/MM/y",
};
const timeFormats = {
full: "HH:mm:ss zzzz",
long: "HH:mm:ss z",
medium: "HH:mm:ss",
short: "HH:mm",
};
const dateTimeFormats = {
// thứ Sáu, ngày 25 tháng 08 năm 2017 23:25:59
full: "{{date}} {{time}}",
// ngày 25 tháng 08 năm 2017 23:25
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,7 @@
export const isEntityHidden = ({ hidden, user })=>{
return typeof hidden === 'function' ? hidden({
user: user
}) : hidden === true;
};
//# sourceMappingURL=isEntityHidden.js.map

View File

@@ -0,0 +1,154 @@
# clsx [![CI](https://github.com/lukeed/clsx/workflows/CI/badge.svg)](https://github.com/lukeed/clsx/actions?query=workflow%3ACI) [![codecov](https://badgen.net/codecov/c/github/lukeed/clsx)](https://codecov.io/gh/lukeed/clsx) [![licenses](https://licenses.dev/b/npm/clsx)](https://licenses.dev/npm/clsx)
> A tiny (239B) utility for constructing `className` strings conditionally.<Br>Also serves as a [faster](bench) & smaller drop-in replacement for the `classnames` module.
This module is available in three formats:
* **ES Module**: `dist/clsx.mjs`
* **CommonJS**: `dist/clsx.js`
* **UMD**: `dist/clsx.min.js`
## Install
```
$ npm install --save clsx
```
## Usage
```js
import clsx from 'clsx';
// or
import { clsx } from 'clsx';
// Strings (variadic)
clsx('foo', true && 'bar', 'baz');
//=> 'foo bar baz'
// Objects
clsx({ foo:true, bar:false, baz:isTrue() });
//=> 'foo baz'
// Objects (variadic)
clsx({ foo:true }, { bar:false }, null, { '--foobar':'hello' });
//=> 'foo --foobar'
// Arrays
clsx(['foo', 0, false, 'bar']);
//=> 'foo bar'
// Arrays (variadic)
clsx(['foo'], ['', 0, false, 'bar'], [['baz', [['hello'], 'there']]]);
//=> 'foo bar baz hello there'
// Kitchen sink (with nesting)
clsx('foo', [1 && 'bar', { baz:false, bat:null }, ['hello', ['world']]], 'cya');
//=> 'foo bar hello world cya'
```
## API
### clsx(...input)
Returns: `String`
#### input
Type: `Mixed`
The `clsx` function can take ***any*** number of arguments, each of which can be an Object, Array, Boolean, or String.
> **Important:** _Any_ falsey values are discarded!<br>Standalone Boolean values are discarded as well.
```js
clsx(true, false, '', null, undefined, 0, NaN);
//=> ''
```
## Modes
There are multiple "versions" of `clsx` available, which allows you to bring only the functionality you need!
#### `clsx`
> **Size (gzip):** 239 bytes<br>
> **Availability:** CommonJS, ES Module, UMD
The default `clsx` module; see [API](#API) for info.
```js
import { clsx } from 'clsx';
// or
import clsx from 'clsx';
```
#### `clsx/lite`
> **Size (gzip):** 140 bytes<br>
> **Availability:** CommonJS, ES Module<br>
> **CAUTION:** Accepts **ONLY** string arguments!
Ideal for applications that ***only*** use the string-builder pattern.
Any non-string arguments are ignored!
```js
import { clsx } from 'clsx/lite';
// or
import clsx from 'clsx/lite';
// string
clsx('hello', true && 'foo', false && 'bar');
// => "hello foo"
// NOTE: Any non-string input(s) ignored
clsx({ foo: true });
//=> ""
```
## Benchmarks
For snapshots of cross-browser results, check out the [`bench`](bench) directory~!
## Support
All versions of Node.js are supported.
All browsers that support [`Array.isArray`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray#Browser_compatibility) are supported (IE9+).
>**Note:** For IE8 support and older, please install `clsx@1.0.x` and beware of [#17](https://github.com/lukeed/clsx/issues/17).
## Tailwind Support
Here some additional (optional) steps to enable classes autocompletion using `clsx` with Tailwind CSS.
<details>
<summary>
Visual Studio Code
</summary>
1. [Install the "Tailwind CSS IntelliSense" Visual Studio Code extension](https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss)
2. Add the following to your [`settings.json`](https://code.visualstudio.com/docs/getstarted/settings):
```json
{
"tailwindCSS.experimental.classRegex": [
["clsx\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)"]
]
}
```
</details>
You may find the [`clsx/lite`](#clsxlite) module useful within Tailwind contexts. This is especially true if/when your application **only** composes classes in this pattern:
```js
clsx('text-base', props.active && 'text-primary', props.className);
```
## Related
- [obj-str](https://github.com/lukeed/obj-str) - A smaller (96B) and similiar utility that only works with Objects.
## License
MIT © [Luke Edwards](https://lukeed.com)

View File

@@ -0,0 +1 @@
{"version":3,"file":"updateByID.d.ts","sourceRoot":"","sources":["../../../src/collections/operations/updateByID.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAKhD,OAAO,KAAK,EACV,cAAc,EACd,YAAY,EACZ,UAAU,EACV,6BAA6B,EAC9B,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EACV,UAAU,EACV,8BAA8B,EAC9B,wBAAwB,EAEzB,MAAM,oBAAoB,CAAA;AAM3B,OAAO,EAAE,KAAK,cAAc,EAAwB,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAa5F,MAAM,MAAM,SAAS,CAAC,KAAK,SAAS,cAAc,IAAI;IACpD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,EAAE,UAAU,CAAA;IACtB,IAAI,EAAE,WAAW,CAAC,8BAA8B,CAAC,KAAK,CAAC,CAAC,CAAA;IACxD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,wBAAwB,CAAC,EAAE,OAAO,CAAA;IAClC,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;IACnB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,sBAAsB,CAAC,EAAE,OAAO,CAAA;IAChC,QAAQ,CAAC,EAAE,YAAY,CAAA;IACvB,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,GAAG,EAAE,cAAc,CAAA;IACnB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,mBAAmB,CAAC,EAAE,OAAO,CAAA;CAC9B,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,UAAU,CAAC,EAAE,QAAQ,CAAC,CAAA;AAElD,eAAO,MAAM,mBAAmB,GAC9B,KAAK,SAAS,cAAc,EAC5B,OAAO,SAAS,wBAAwB,CAAC,KAAK,CAAC,6BAEjC,SAAS,CAAC,KAAK,CAAC,KAC7B,OAAO,CAAC,6BAA6B,CAAC,KAAK,EAAE,OAAO,CAAC,CA2MvD,CAAA"}

View File

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

View File

@@ -0,0 +1,60 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const codegen_1 = require("../../compile/codegen");
const util_1 = require("../../compile/util");
const error = {
message: "must match exactly one schema in oneOf",
params: ({ params }) => (0, codegen_1._) `{passingSchemas: ${params.passing}}`,
};
const def = {
keyword: "oneOf",
schemaType: "array",
trackErrors: true,
error,
code(cxt) {
const { gen, schema, parentSchema, it } = cxt;
/* istanbul ignore if */
if (!Array.isArray(schema))
throw new Error("ajv implementation error");
if (it.opts.discriminator && parentSchema.discriminator)
return;
const schArr = schema;
const valid = gen.let("valid", false);
const passing = gen.let("passing", null);
const schValid = gen.name("_valid");
cxt.setParams({ passing });
// TODO possibly fail straight away (with warning or exception) if there are two empty always valid schemas
gen.block(validateOneOf);
cxt.result(valid, () => cxt.reset(), () => cxt.error(true));
function validateOneOf() {
schArr.forEach((sch, i) => {
let schCxt;
if ((0, util_1.alwaysValidSchema)(it, sch)) {
gen.var(schValid, true);
}
else {
schCxt = cxt.subschema({
keyword: "oneOf",
schemaProp: i,
compositeRule: true,
}, schValid);
}
if (i > 0) {
gen
.if((0, codegen_1._) `${schValid} && ${valid}`)
.assign(valid, false)
.assign(passing, (0, codegen_1._) `[${passing}, ${i}]`)
.else();
}
gen.if(schValid, () => {
gen.assign(valid, true);
gen.assign(passing, i);
if (schCxt)
cxt.mergeEvaluated(schCxt, codegen_1.Name);
});
});
}
},
};
exports.default = def;
//# sourceMappingURL=oneOf.js.map

View File

@@ -0,0 +1,163 @@
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.EVENT_SESSION_START = exports.EVENT_SESSION_END = exports.EVENT_RPC_MESSAGE = exports.EVENT_GEN_AI_USER_MESSAGE = exports.EVENT_GEN_AI_TOOL_MESSAGE = exports.EVENT_GEN_AI_SYSTEM_MESSAGE = exports.EVENT_GEN_AI_EVALUATION_RESULT = exports.EVENT_GEN_AI_CLIENT_INFERENCE_OPERATION_DETAILS = exports.EVENT_GEN_AI_CHOICE = exports.EVENT_GEN_AI_ASSISTANT_MESSAGE = exports.EVENT_FEATURE_FLAG_EVALUATION = exports.EVENT_DEVICE_APP_LIFECYCLE = exports.EVENT_BROWSER_WEB_VITAL = exports.EVENT_AZURE_RESOURCE_LOG = exports.EVENT_AZ_RESOURCE_LOG = exports.EVENT_APP_WIDGET_CLICK = exports.EVENT_APP_SCREEN_CLICK = exports.EVENT_APP_JANK = void 0;
//-----------------------------------------------------------------------------------------------------------------
// DO NOT EDIT, this is an Auto-generated file from scripts/semconv/templates/registry/ts-experimental/events.ts.j2
//-----------------------------------------------------------------------------------------------------------------
/**
* This event indicates that the application has detected substandard UI rendering performance.
*
* @note Jank happens when the UI is rendered slowly enough for the user to experience some disruption or sluggishness.
*
* @experimental This event is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*/
exports.EVENT_APP_JANK = 'app.jank';
/**
* This event represents an instantaneous click on the screen of an application.
*
* @note The `app.screen.click` event can be used to indicate that a user has clicked or tapped on the screen portion of an application. Clicks outside of an application's active area **SHOULD NOT** generate this event. This event does not differentiate between touch/mouse down and touch/mouse up. Implementations **SHOULD** give preference to generating this event at the time the click is complete, typically on touch release or mouse up. The location of the click event **MUST** be provided in absolute screen pixels.
*
* @experimental This event is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*/
exports.EVENT_APP_SCREEN_CLICK = 'app.screen.click';
/**
* This event indicates that an application widget has been clicked.
*
* @note Use this event to indicate that visual application component has been clicked, typically through a user's manual interaction.
*
* @experimental This event is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*/
exports.EVENT_APP_WIDGET_CLICK = 'app.widget.click';
/**
* Deprecated. Use `azure.resource.log` instead.
*
* @experimental This event is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*
* @deprecated Replaced by `azure.resource.log`.
*/
exports.EVENT_AZ_RESOURCE_LOG = 'az.resource.log';
/**
* Describes Azure Resource Log event, see [Azure Resource Log Top-level Schema](https://learn.microsoft.com/azure/azure-monitor/essentials/resource-logs-schema#top-level-common-schema) for more details.
*
* @experimental This event is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*/
exports.EVENT_AZURE_RESOURCE_LOG = 'azure.resource.log';
/**
* This event describes the website performance metrics introduced by Google, See [web vitals](https://web.dev/vitals).
*
* @experimental This event is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*/
exports.EVENT_BROWSER_WEB_VITAL = 'browser.web_vital';
/**
* This event represents an occurrence of a lifecycle transition on Android or iOS platform.
*
* @note The event body fields **MUST** be used to describe the state of the application at the time of the event.
* This event is meant to be used in conjunction with `os.name` [resource semantic convention](/docs/resource/os.md) to identify the mobile operating system (e.g. Android, iOS).
* The `android.app.state` and `ios.app.state` fields are mutually exclusive and **MUST NOT** be used together, each field **MUST** be used with its corresponding `os.name` value.
*
* @experimental This event is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*/
exports.EVENT_DEVICE_APP_LIFECYCLE = 'device.app.lifecycle';
/**
* Defines feature flag evaluation as an event.
*
* @note A `feature_flag.evaluation` event **SHOULD** be emitted whenever a feature flag value is evaluated, which may happen many times over the course of an application lifecycle. For example, a website A/B testing different animations may evaluate a flag each time a button is clicked. A `feature_flag.evaluation` event is emitted on each evaluation even if the result is the same.
*
* @experimental This event is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*/
exports.EVENT_FEATURE_FLAG_EVALUATION = 'feature_flag.evaluation';
/**
* This event describes the assistant message passed to GenAI system.
*
* @experimental This event is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*
* @deprecated Chat history is reported on `gen_ai.input.messages` attribute on spans or `gen_ai.client.inference.operation.details` event.
*/
exports.EVENT_GEN_AI_ASSISTANT_MESSAGE = 'gen_ai.assistant.message';
/**
* This event describes the Gen AI response message.
*
* @experimental This event is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*
* @deprecated Chat history is reported on `gen_ai.output.messages` attribute on spans or `gen_ai.client.inference.operation.details` event.
*/
exports.EVENT_GEN_AI_CHOICE = 'gen_ai.choice';
/**
* Describes the details of a GenAI completion request including chat history and parameters.
*
* @note This event is opt-in and could be used to store input and output details independently from traces.
*
* @experimental This event is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*/
exports.EVENT_GEN_AI_CLIENT_INFERENCE_OPERATION_DETAILS = 'gen_ai.client.inference.operation.details';
/**
* This event captures the result of evaluating GenAI output for quality, accuracy, or other characteristics. This event **SHOULD** be parented to GenAI operation span being evaluated when possible or set `gen_ai.response.id` when span id is not available.
*
* @experimental This event is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*/
exports.EVENT_GEN_AI_EVALUATION_RESULT = 'gen_ai.evaluation.result';
/**
* This event describes the system instructions passed to the GenAI model.
*
* @experimental This event is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*
* @deprecated Chat history is reported on `gen_ai.system_instructions` attribute on spans or `gen_ai.client.inference.operation.details` event.
*/
exports.EVENT_GEN_AI_SYSTEM_MESSAGE = 'gen_ai.system.message';
/**
* This event describes the response from a tool or function call passed to the GenAI model.
*
* @experimental This event is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*
* @deprecated Chat history is reported on `gen_ai.input.messages` attribute on spans or `gen_ai.client.inference.operation.details` event.
*/
exports.EVENT_GEN_AI_TOOL_MESSAGE = 'gen_ai.tool.message';
/**
* This event describes the user message passed to the GenAI model.
*
* @experimental This event is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*
* @deprecated Chat history is reported on `gen_ai.input.messages` attribute on spans or `gen_ai.client.inference.operation.details` event.
*/
exports.EVENT_GEN_AI_USER_MESSAGE = 'gen_ai.user.message';
/**
* Describes a message sent or received within the context of an RPC call.
*
* @note In the lifetime of an RPC stream, an event for each message sent/received on client and server spans **SHOULD** be created. In case of unary calls message events **SHOULD NOT** be recorded.
*
* @experimental This event is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*/
exports.EVENT_RPC_MESSAGE = 'rpc.message';
/**
* Indicates that a session has ended.
*
* @note For instrumentation that tracks user behavior during user sessions, a `session.end` event **SHOULD** be emitted every time a session ends. When a session ends and continues as a new session, this event **SHOULD** be emitted prior to the `session.start` event.
*
* @experimental This event is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*/
exports.EVENT_SESSION_END = 'session.end';
/**
* Indicates that a new session has been started, optionally linking to the prior session.
*
* @note For instrumentation that tracks user behavior during user sessions, a `session.start` event **MUST** be emitted every time a session is created. When a new session is created as a continuation of a prior session, the `session.previous_id` **SHOULD** be included in the event. The values of `session.id` and `session.previous_id` **MUST** be different.
* When the `session.start` event contains both `session.id` and `session.previous_id` fields, the event indicates that the previous session has ended. If the session ID in `session.previous_id` has not yet ended via explicit `session.end` event, then the consumer **SHOULD** treat this continuation event as semantically equivalent to `session.end(session.previous_id)` and `session.start(session.id)`.
*
* @experimental This event is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*/
exports.EVENT_SESSION_START = 'session.start';
//# sourceMappingURL=experimental_events.js.map

View File

@@ -0,0 +1,2 @@
const e=require(`../../utils/throw-if-empty.cjs`),t=t=>()=>{let n={};return Array.isArray(t)?(e.throwIfEmpty(t,`keysOrQuery cannot be empty`),n={keys:t}):(e.throwIfEmpty(Object.keys(t),`keysOrQuery cannot be empty`),n={query:t}),{path:`/comments`,body:JSON.stringify(n),method:`DELETE`}},n=t=>()=>(e.throwIfEmpty(String(t),`Key cannot be empty`),{path:`/comments/${t}`,method:`DELETE`});exports.deleteComment=n,exports.deleteComments=t;
//# sourceMappingURL=comments.cjs.map

View File

@@ -0,0 +1,28 @@
"use strict";
exports.gl = void 0;
var _index = require("./gl/_lib/formatDistance.cjs");
var _index2 = require("./gl/_lib/formatLong.cjs");
var _index3 = require("./gl/_lib/formatRelative.cjs");
var _index4 = require("./gl/_lib/localize.cjs");
var _index5 = require("./gl/_lib/match.cjs");
/**
* @category Locales
* @summary Galician locale.
* @language Galician
* @iso-639-2 glg
* @author Alberto Doval - Cocodin Technology[@cocodinTech](https://github.com/cocodinTech)
* @author Fidel Pita [@fidelpita](https://github.com/fidelpita)
*/
const gl = (exports.gl = {
code: "gl",
formatDistance: _index.formatDistance,
formatLong: _index2.formatLong,
formatRelative: _index3.formatRelative,
localize: _index4.localize,
match: _index5.match,
options: {
weekStartsOn: 1 /* Monday */,
firstWeekContainsDate: 1,
},
});

View File

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

View File

@@ -0,0 +1,85 @@
import { warning, secondsToMilliseconds, millisecondsToSeconds } from 'motion-utils';
import { clamp } from '../../../utils/clamp.mjs';
import { springDefaults } from './defaults.mjs';
const safeMin = 0.001;
function findSpring({ duration = springDefaults.duration, bounce = springDefaults.bounce, velocity = springDefaults.velocity, mass = springDefaults.mass, }) {
let envelope;
let derivative;
warning(duration <= secondsToMilliseconds(springDefaults.maxDuration), "Spring duration must be 10 seconds or less");
let dampingRatio = 1 - bounce;
/**
* Restrict dampingRatio and duration to within acceptable ranges.
*/
dampingRatio = clamp(springDefaults.minDamping, springDefaults.maxDamping, dampingRatio);
duration = clamp(springDefaults.minDuration, springDefaults.maxDuration, millisecondsToSeconds(duration));
if (dampingRatio < 1) {
/**
* Underdamped spring
*/
envelope = (undampedFreq) => {
const exponentialDecay = undampedFreq * dampingRatio;
const delta = exponentialDecay * duration;
const a = exponentialDecay - velocity;
const b = calcAngularFreq(undampedFreq, dampingRatio);
const c = Math.exp(-delta);
return safeMin - (a / b) * c;
};
derivative = (undampedFreq) => {
const exponentialDecay = undampedFreq * dampingRatio;
const delta = exponentialDecay * duration;
const d = delta * velocity + velocity;
const e = Math.pow(dampingRatio, 2) * Math.pow(undampedFreq, 2) * duration;
const f = Math.exp(-delta);
const g = calcAngularFreq(Math.pow(undampedFreq, 2), dampingRatio);
const factor = -envelope(undampedFreq) + safeMin > 0 ? -1 : 1;
return (factor * ((d - e) * f)) / g;
};
}
else {
/**
* Critically-damped spring
*/
envelope = (undampedFreq) => {
const a = Math.exp(-undampedFreq * duration);
const b = (undampedFreq - velocity) * duration + 1;
return -safeMin + a * b;
};
derivative = (undampedFreq) => {
const a = Math.exp(-undampedFreq * duration);
const b = (velocity - undampedFreq) * (duration * duration);
return a * b;
};
}
const initialGuess = 5 / duration;
const undampedFreq = approximateRoot(envelope, derivative, initialGuess);
duration = secondsToMilliseconds(duration);
if (isNaN(undampedFreq)) {
return {
stiffness: springDefaults.stiffness,
damping: springDefaults.damping,
duration,
};
}
else {
const stiffness = Math.pow(undampedFreq, 2) * mass;
return {
stiffness,
damping: dampingRatio * 2 * Math.sqrt(mass * stiffness),
duration,
};
}
}
const rootIterations = 12;
function approximateRoot(envelope, derivative, initialGuess) {
let result = initialGuess;
for (let i = 1; i < rootIterations; i++) {
result = result - envelope(result) / derivative(result);
}
return result;
}
function calcAngularFreq(undampedFreq, dampingRatio) {
return undampedFreq * Math.sqrt(1 - dampingRatio * dampingRatio);
}
export { calcAngularFreq, findSpring };

View File

@@ -0,0 +1 @@
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,4CAA0D;AAEnD,MAAM,OAAO,GAAG,CACrB,IAAU,EACV,GAA6C,EAC7C,EAAE;IACF,IAAI,GAAG,EAAE;QACP,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC;QAC1B,IAAI,CAAC,SAAS,CAAC;YACb,IAAI,EAAE,oBAAc,CAAC,KAAK;YAC1B,OAAO,EAAE,GAAG,CAAC,OAAO;SACrB,CAAC,CAAC;KACJ;IACD,IAAI,CAAC,GAAG,EAAE,CAAC;AACb,CAAC,CAAC;AAZW,QAAA,OAAO,WAYlB","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Span, SpanStatusCode } from '@opentelemetry/api';\n\nexport const endSpan = (\n span: Span,\n err: NodeJS.ErrnoException | null | undefined\n) => {\n if (err) {\n span.recordException(err);\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: err.message,\n });\n }\n span.end();\n};\n"]}

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"https://raw.githubusercontent.com/fb55/htmlparser2/c123610e003a1eaebc61febed01cabb6e41eb658/src/","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAiB,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,MAAM,EAAsB,MAAM,aAAa,CAAC;AAEzD,OAAO,EACH,UAAU,GAKb,MAAM,YAAY,CAAC;AAEpB,OAAO,EACH,UAAU;AACV,0BAA0B;AAC1B,UAAU,IAAI,cAAc,GAE/B,MAAM,YAAY,CAAC;AAIpB,iBAAiB;AAEjB;;;;;GAKG;AACH,MAAM,UAAU,aAAa,CAAC,IAAY,EAAE,OAAiB;IACzD,MAAM,OAAO,GAAG,IAAI,UAAU,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IACnD,IAAI,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACvC,OAAO,OAAO,CAAC,IAAI,CAAC;AACxB,CAAC;AACD;;;;;;;;;GASG;AACH,MAAM,UAAU,QAAQ,CAAC,IAAY,EAAE,OAAiB;IACpD,OAAO,aAAa,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC;AACjD,CAAC;AACD;;;;;;GAMG;AACH,MAAM,UAAU,eAAe,CAC3B,QAAyD,EACzD,OAAiB,EACjB,eAA4C;IAE5C,MAAM,OAAO,GAAG,IAAI,UAAU,CAAC,QAAQ,EAAE,OAAO,EAAE,eAAe,CAAC,CAAC;IACnE,OAAO,IAAI,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AACxC,CAAC;AAED,OAAO,EACH,OAAO,IAAI,SAAS,GAEvB,MAAM,gBAAgB,CAAC;AAExB;;;GAGG;AACH,OAAO,KAAK,WAAW,MAAM,gBAAgB,CAAC;AAE9C,OAAO,EAAE,OAAO,EAAQ,MAAM,UAAU,CAAC;AAEzC,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAEnC,MAAM,uBAAuB,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAElD;;;;;GAKG;AACH,MAAM,UAAU,SAAS,CACrB,IAAY,EACZ,UAAmB,uBAAuB;IAE1C,OAAO,OAAO,CAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;AAC5C,CAAC;AAED,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC"}

View File

@@ -0,0 +1,42 @@
import type { DeepPartial } from 'ts-essentials';
import type { CollectionSlug, FileToSave, SanitizedConfig, TypedFallbackLocale } from '../../../index.js';
import type { JsonObject, Payload, PayloadRequest, PopulateType, SelectType, TransformCollectionWithSelect } from '../../../types/index.js';
import type { DataFromCollectionSlug, SanitizedCollectionConfig, SelectFromCollectionSlug, TypeWithID } from '../../config/types.js';
export type SharedUpdateDocumentArgs<TSlug extends CollectionSlug> = {
autosave: boolean;
collectionConfig: SanitizedCollectionConfig;
config: SanitizedConfig;
data: DeepPartial<DataFromCollectionSlug<TSlug>>;
depth: number;
docWithLocales: JsonObject & TypeWithID;
draftArg: boolean;
fallbackLocale: TypedFallbackLocale;
filesToUpload: FileToSave[];
id: number | string;
locale: string;
overrideAccess: boolean;
overrideLock: boolean;
payload: Payload;
populate?: PopulateType;
publishAllLocales?: boolean;
publishSpecificLocale?: string;
req: PayloadRequest;
select: SelectType;
showHiddenFields: boolean;
unpublishAllLocales?: boolean;
};
/**
* This function is used to update a document in the DB and return the result.
*
* It runs the following hooks in order:
* - beforeValidate - Fields
* - beforeValidate - Collection
* - beforeChange - Collection
* - beforeChange - Fields
* - afterRead - Fields
* - afterRead - Collection
* - afterChange - Fields
* - afterChange - Collection
*/
export declare const updateDocument: <TSlug extends CollectionSlug, TSelect extends SelectFromCollectionSlug<TSlug> = SelectType>({ id, autosave, collectionConfig, config, data, depth, docWithLocales, draftArg, fallbackLocale, filesToUpload, locale, overrideAccess, overrideLock, payload, populate, publishAllLocales: publishAllLocalesArg, publishSpecificLocale, req, select, showHiddenFields, unpublishAllLocales: unpublishAllLocalesArg, }: SharedUpdateDocumentArgs<TSlug>) => Promise<TransformCollectionWithSelect<TSlug, TSelect>>;
//# sourceMappingURL=update.d.ts.map

View File

@@ -0,0 +1,21 @@
var basePropertyOf = require('./_basePropertyOf');
/** Used to map HTML entities to characters. */
var htmlUnescapes = {
'&amp;': '&',
'&lt;': '<',
'&gt;': '>',
'&quot;': '"',
'&#39;': "'"
};
/**
* Used by `_.unescape` to convert HTML entities to characters.
*
* @private
* @param {string} chr The matched character to unescape.
* @returns {string} Returns the unescaped character.
*/
var unescapeHtmlChar = basePropertyOf(htmlUnescapes);
module.exports = unescapeHtmlChar;

View File

@@ -0,0 +1,123 @@
// @ts-ignore TS6133
import { expect, expectTypeOf, test } from "vitest";
import * as z from "zod/v4";
test(".optional()", () => {
const schema = z.string().optional();
expect(schema.parse("adsf")).toEqual("adsf");
expect(schema.parse(undefined)).toEqual(undefined);
expect(schema.safeParse(null).success).toEqual(false);
expectTypeOf<typeof schema._output>().toEqualTypeOf<string | undefined>();
});
test("unwrap", () => {
const unwrapped = z.string().optional().unwrap();
expect(unwrapped).toBeInstanceOf(z.ZodString);
});
test("optionality", () => {
const a = z.string();
expect(a._zod.optin).toEqual(undefined);
expect(a._zod.optout).toEqual(undefined);
const b = z.string().optional();
expect(b._zod.optin).toEqual("optional");
expect(b._zod.optout).toEqual("optional");
const c = z.string().default("asdf");
expect(c._zod.optin).toEqual("optional");
expect(c._zod.optout).toEqual(undefined);
const d = z.string().optional().nullable();
expect(d._zod.optin).toEqual("optional");
expect(d._zod.optout).toEqual("optional");
const e = z.string().default("asdf").nullable();
expect(e._zod.optin).toEqual("optional");
expect(e._zod.optout).toEqual(undefined);
// z.undefined should NOT be optional
const f = z.undefined();
expect(f._zod.optin).toEqual("optional");
expect(f._zod.optout).toEqual("optional");
expectTypeOf<typeof f._zod.optin>().toEqualTypeOf<"optional" | undefined>();
expectTypeOf<typeof f._zod.optout>().toEqualTypeOf<"optional" | undefined>();
// z.union should be optional if any of the types are optional
const g = z.union([z.string(), z.undefined()]);
expect(g._zod.optin).toEqual("optional");
expect(g._zod.optout).toEqual("optional");
expectTypeOf<typeof g._zod.optin>().toEqualTypeOf<"optional" | undefined>();
expectTypeOf<typeof g._zod.optout>().toEqualTypeOf<"optional" | undefined>();
const h = z.union([z.string(), z.optional(z.string())]);
expect(h._zod.optin).toEqual("optional");
expect(h._zod.optout).toEqual("optional");
expectTypeOf<typeof h._zod.optin>().toEqualTypeOf<"optional">();
expectTypeOf<typeof h._zod.optout>().toEqualTypeOf<"optional">();
});
test("pipe optionality", () => {
z.string().optional()._zod.optin;
const a = z.string().optional().pipe(z.string());
expect(a._zod.optin).toEqual("optional");
expect(a._zod.optout).toEqual(undefined);
expectTypeOf<typeof a._zod.optin>().toEqualTypeOf<"optional">();
expectTypeOf<typeof a._zod.optout>().toEqualTypeOf<"optional" | undefined>();
const b = z
.string()
.transform((val) => (Math.random() ? val : undefined))
.pipe(z.string().optional());
expect(b._zod.optin).toEqual(undefined);
expect(b._zod.optout).toEqual("optional");
expectTypeOf<typeof b._zod.optin>().toEqualTypeOf<"optional" | undefined>();
expectTypeOf<typeof b._zod.optout>().toEqualTypeOf<"optional">();
const c = z.string().default("asdf").pipe(z.string());
expect(c._zod.optin).toEqual("optional");
expect(c._zod.optout).toEqual(undefined);
const d = z
.string()
.transform((val) => (Math.random() ? val : undefined))
.pipe(z.string().default("asdf"));
expect(d._zod.optin).toEqual(undefined);
expect(d._zod.optout).toEqual(undefined);
});
test("pipe optionality inside objects", () => {
const schema = z.object({
a: z.string().optional(),
b: z.string().optional().pipe(z.string()),
c: z.string().default("asdf").pipe(z.string()),
d: z
.string()
.transform((val) => (Math.random() ? val : undefined))
.pipe(z.string().optional()),
e: z
.string()
.transform((val) => (Math.random() ? val : undefined))
.pipe(z.string().default("asdf")),
});
type SchemaIn = z.input<typeof schema>;
expectTypeOf<SchemaIn>().toEqualTypeOf<{
a?: string | undefined;
b?: string | undefined;
c?: string | undefined;
d: string;
e: string;
}>();
type SchemaOut = z.output<typeof schema>;
expectTypeOf<SchemaOut>().toEqualTypeOf<{
a?: string | undefined;
b: string;
c: string;
d?: string | undefined;
e: string;
}>();
});

View File

@@ -0,0 +1 @@
{"version":3,"file":"docAccess.d.ts","sourceRoot":"","sources":["../../../src/collections/endpoints/docAccess.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAM3D,eAAO,MAAM,gBAAgB,EAAE,cAiB9B,CAAA"}

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