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

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

View File

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

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 Ham = createLucideIcon("Ham", [
["path", { d: "M13.144 21.144A7.274 10.445 45 1 0 2.856 10.856", key: "1k1t7q" }],
[
"path",
{
d: "M13.144 21.144A7.274 4.365 45 0 0 2.856 10.856a7.274 4.365 45 0 0 10.288 10.288",
key: "153t1g"
}
],
[
"path",
{
d: "M16.565 10.435 18.6 8.4a2.501 2.501 0 1 0 1.65-4.65 2.5 2.5 0 1 0-4.66 1.66l-2.024 2.025",
key: "gzrt0n"
}
],
["path", { d: "m8.5 16.5-1-1", key: "otr954" }]
]);
export { Ham as default };
//# sourceMappingURL=ham.js.map

View File

@@ -0,0 +1,8 @@
import type { CodeKeywordDefinition, ErrorObject } from "../../types";
export type PatternError = ErrorObject<"pattern", {
pattern: string;
}, string | {
$data: string;
}>;
declare const def: CodeKeywordDefinition;
export default def;

View File

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

View File

@@ -0,0 +1,18 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Cast = createLucideIcon("Cast", [
["path", { d: "M2 8V6a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-6", key: "3zrzxg" }],
["path", { d: "M2 12a9 9 0 0 1 8 8", key: "g6cvee" }],
["path", { d: "M2 16a5 5 0 0 1 4 4", key: "1y1dii" }],
["line", { x1: "2", x2: "2.01", y1: "20", y2: "20", key: "xu2jvo" }]
]);
export { Cast as default };
//# sourceMappingURL=cast.js.map

View File

@@ -0,0 +1,11 @@
{
"bracketSpacing": false,
"endOfLine": "lf",
"parser": "typescript",
"printWidth": 120,
"semi": false,
"singleQuote": true,
"trailingComma": "all",
"useTabs": false,
"arrowParens": "avoid"
}

View File

@@ -0,0 +1,104 @@
# Time zones
Starting from v4, date-fns has first-class support for time zones. It is provided via [`@date-fns/tz`] and [`@date-fns/utc`] packages. Visit the links to learn more about corresponding packages.
Just like with everything else in date-fns, the time zones support has a minimal bundle size footprint with `UTCDateMini` and `TZDateMini` being `239 B` and `761 B`, respectively.
If you're looking for time zone support prior to date-fns v4, see the third-party [`date-fns-tz`](https://github.com/marnusw/date-fns-tz) package.
[See the announcement blog post](https://blog.date-fns.org/v40-with-time-zone-support/) for details about the motivation and implementation and [the change log entry for the list of changes in v4.0](https://date-fns.org/v4.0.0/docs/Change-Log#v4.0.0-2024-09-16).
## Working with time zones
There are two ways to start working with time zones:
- [Using the `Date` extensions `TZDate` and `UTCDate`](#using-tzdate-utcdate)
- [Using the date-fns functions' `in` option](#using-in-option)
### Using `TZDate` & `UTCDate`
One way is to use [`TZDate`](https://github.com/date-fns/tz) or [`UTCDate`](https://github.com/date-fns/tz) `Date` extensions,with regular date-fns functions:
```ts
import { TZDate } from "@date-fns/tz";
import { addHours } from "date-fns";
// Given that the system time zone is America/Los_Angeles
// where DST happens on Sunday, 13 March 2022, 02:00:00
// Using the system time zone will produce 03:00 instead of 02:00 because of DST:
const date = new Date(2022, 2, 13);
addHours(date, 2).toString();
//=> 'Sun Mar 13 2022 03:00:00 GMT-0700 (Pacific Daylight Time)'
// Using Asia/Singapore will provide the expected 02:00:
const tzDate = new TZDate(2022, 2, 13, "Asia/Singapore");
addHours(tzDate, 2).toString();
//=> 'Sun Mar 13 2022 02:00:00 GMT+0800 (Singapore Standard Time)'
```
You can safely mix and match regular `Date` instances, as well as `UTCDate` or `TZDate` in different time zones and primitive values (timestamps and strings). date-fns will normalize the arguments, taking the first object argument (`Date` or a `Date` extension instance) as the reference and return the result in the reference type:
```ts
import { TZDate } from "@date-fns/tz";
import { differenceInBusinessDays } from "date-fns";
const laterDate = new TZDate(2025, 0, 1, "Asia/Singapore");
const earlierDate = new TZDate(2024, 0, 1, "America/New_York");
// Will calculate in Asia/Singapore
differenceInBusinessDays(laterDate, earlierDate);
//=> 262
// Will calculate in America/New_York
differenceInBusinessDays(earlierDate, laterDate);
//=> -261
```
In the given example, the one-day difference comes from the fact that in New York (UTC-5), the `earlierDate` will be `Dec 31` rather than `Jan 1`:
```ts
laterDate.withTimeZone("Asia/Singapore").toString();
//=> 'Wed Jan 01 2025 00:00:00 GMT+0800 (Singapore Standard Time)'
earlierDate.withTimeZone("Asia/Singapore").toString();
//=> 'Mon Jan 01 2024 13:00:00 GMT+0800 (Singapore Standard Time)'
laterDate.withTimeZone("America/New_York").toString();
//=> 'Tue Dec 31 2024 11:00:00 GMT-0500 (Eastern Standard Time)'
earlierDate.withTimeZone("America/New_York").toString();
//=> 'Mon Jan 01 2024 00:00:00 GMT-0500 (Eastern Standard Time)'
```
This is essential to understand and consider when making calculations.
### Using `in` option
When it is important to get the value in a specific time zone or when you are unsure about the type of arguments, use the function context `in` option.
Each function, where the calculation might be affected by the time zone, like with `differenceInBusinessDays`, accepts the `in` option that provides the context for the arguments and the result, so you can explicitly say what time zone to use:
```ts
import { tz } from "@date-fns/tz";
// Will calculate in Asia/Singapore
differenceInBusinessDays(laterDate, earlierDate);
//=> 262
// Will normalize to America/Los_Angeles
differenceInBusinessDays(laterDate, earlierDate, {
in: tz("America/Los_Angeles"),
});
//=> 261
```
In the example, we forced `differenceInBusinessDays` to use the Los Angeles time zone.
## Further reading
Read more about the time zone packages visiting their READMEs:
- [`@date-fns/tz`]
- [`@date-fns/utc`]
[`@date-fns/tz`]: https://github.com/date-fns/tz
[`@date-fns/utc`]: https://github.com/date-fns/utc

View File

@@ -0,0 +1,2 @@
export declare function getMachineId(): Promise<string | undefined>;
//# sourceMappingURL=getMachineId-darwin.d.ts.map

View File

@@ -0,0 +1 @@
.ReactCrop{position:relative;display:inline-block;cursor:crosshair;overflow:hidden;max-width:100%}.ReactCrop *,.ReactCrop *:before,.ReactCrop *:after{box-sizing:border-box}.ReactCrop--disabled,.ReactCrop--locked{cursor:inherit}.ReactCrop__child-wrapper{max-height:inherit}.ReactCrop__child-wrapper>img,.ReactCrop__child-wrapper>video{display:block;max-width:100%;max-height:inherit}.ReactCrop:not(.ReactCrop--disabled) .ReactCrop__child-wrapper>img,.ReactCrop:not(.ReactCrop--disabled) .ReactCrop__child-wrapper>video{touch-action:none}.ReactCrop:not(.ReactCrop--disabled) .ReactCrop__crop-selection{touch-action:none}.ReactCrop__crop-selection{position:absolute;top:0;left:0;transform:translateZ(0);cursor:move;box-shadow:0 0 0 9999em #00000080}.ReactCrop--disabled .ReactCrop__crop-selection{cursor:inherit}.ReactCrop--circular-crop .ReactCrop__crop-selection{border-radius:50%}.ReactCrop--no-animate .ReactCrop__crop-selection{outline:1px dashed white}.ReactCrop__crop-selection:not(.ReactCrop--no-animate .ReactCrop__crop-selection){animation:marching-ants 1s;background-image:linear-gradient(to right,#fff 50%,#444 50%),linear-gradient(to right,#fff 50%,#444 50%),linear-gradient(to bottom,#fff 50%,#444 50%),linear-gradient(to bottom,#fff 50%,#444 50%);background-size:10px 1px,10px 1px,1px 10px,1px 10px;background-position:0 0,0 100%,0 0,100% 0;background-repeat:repeat-x,repeat-x,repeat-y,repeat-y;color:#fff;animation-play-state:running;animation-timing-function:linear;animation-iteration-count:infinite}@keyframes marching-ants{0%{background-position:0 0,0 100%,0 0,100% 0}to{background-position:20px 0,-20px 100%,0 -20px,100% 20px}}.ReactCrop__crop-selection:focus{outline:none;border-color:#00f;border-style:solid}.ReactCrop--invisible-crop .ReactCrop__crop-selection{display:none}.ReactCrop__rule-of-thirds-vt:before,.ReactCrop__rule-of-thirds-vt:after,.ReactCrop__rule-of-thirds-hz:before,.ReactCrop__rule-of-thirds-hz:after{content:"";display:block;position:absolute;background-color:#fff6}.ReactCrop__rule-of-thirds-vt:before,.ReactCrop__rule-of-thirds-vt:after{width:1px;height:100%}.ReactCrop__rule-of-thirds-vt:before{left:33.3333333333%}.ReactCrop__rule-of-thirds-vt:after{left:66.6666666667%}.ReactCrop__rule-of-thirds-hz:before,.ReactCrop__rule-of-thirds-hz:after{width:100%;height:1px}.ReactCrop__rule-of-thirds-hz:before{top:33.3333333333%}.ReactCrop__rule-of-thirds-hz:after{top:66.6666666667%}.ReactCrop__drag-handle{position:absolute}.ReactCrop__drag-handle:after{position:absolute;content:"";display:block;width:10px;height:10px;background-color:#0003;border:1px solid rgba(255,255,255,.7);outline:1px solid transparent}.ReactCrop__drag-handle:focus:after{border-color:#00f;background:#2dbfff}.ReactCrop .ord-nw{top:0;left:0;margin-top:-5px;margin-left:-5px;cursor:nw-resize}.ReactCrop .ord-nw:after{top:0;left:0}.ReactCrop .ord-n{top:0;left:50%;margin-top:-5px;margin-left:-5px;cursor:n-resize}.ReactCrop .ord-n:after{top:0}.ReactCrop .ord-ne{top:0;right:0;margin-top:-5px;margin-right:-5px;cursor:ne-resize}.ReactCrop .ord-ne:after{top:0;right:0}.ReactCrop .ord-e{top:50%;right:0;margin-top:-5px;margin-right:-5px;cursor:e-resize}.ReactCrop .ord-e:after{right:0}.ReactCrop .ord-se{bottom:0;right:0;margin-bottom:-5px;margin-right:-5px;cursor:se-resize}.ReactCrop .ord-se:after{bottom:0;right:0}.ReactCrop .ord-s{bottom:0;left:50%;margin-bottom:-5px;margin-left:-5px;cursor:s-resize}.ReactCrop .ord-s:after{bottom:0}.ReactCrop .ord-sw{bottom:0;left:0;margin-bottom:-5px;margin-left:-5px;cursor:sw-resize}.ReactCrop .ord-sw:after{bottom:0;left:0}.ReactCrop .ord-w{top:50%;left:0;margin-top:-5px;margin-left:-5px;cursor:w-resize}.ReactCrop .ord-w:after{left:0}.ReactCrop__disabled .ReactCrop__drag-handle{cursor:inherit}.ReactCrop__drag-bar{position:absolute}.ReactCrop__drag-bar.ord-n{top:0;left:0;width:100%;height:6px;margin-top:-3px}.ReactCrop__drag-bar.ord-e{right:0;top:0;width:6px;height:100%;margin-right:-3px}.ReactCrop__drag-bar.ord-s{bottom:0;left:0;width:100%;height:6px;margin-bottom:-3px}.ReactCrop__drag-bar.ord-w{top:0;left:0;width:6px;height:100%;margin-left:-3px}.ReactCrop--new-crop .ReactCrop__drag-bar,.ReactCrop--new-crop .ReactCrop__drag-handle,.ReactCrop--fixed-aspect .ReactCrop__drag-bar,.ReactCrop--fixed-aspect .ReactCrop__drag-handle.ord-n,.ReactCrop--fixed-aspect .ReactCrop__drag-handle.ord-e,.ReactCrop--fixed-aspect .ReactCrop__drag-handle.ord-s,.ReactCrop--fixed-aspect .ReactCrop__drag-handle.ord-w{display:none}@media (pointer: coarse){.ReactCrop .ord-n,.ReactCrop .ord-e,.ReactCrop .ord-s,.ReactCrop .ord-w{display:none}.ReactCrop__drag-handle{width:24px;height:24px}}

View File

@@ -0,0 +1,68 @@
'use strict'
const { promisify } = require('node:util')
const Pool = require('../dispatcher/pool')
const { buildMockDispatch } = require('./mock-utils')
const {
kDispatches,
kMockAgent,
kClose,
kOriginalClose,
kOrigin,
kOriginalDispatch,
kConnected,
kIgnoreTrailingSlash
} = require('./mock-symbols')
const { MockInterceptor } = require('./mock-interceptor')
const Symbols = require('../core/symbols')
const { InvalidArgumentError } = require('../core/errors')
/**
* MockPool provides an API that extends the Pool to influence the mockDispatches.
*/
class MockPool extends Pool {
constructor (origin, opts) {
if (!opts || !opts.agent || typeof opts.agent.dispatch !== 'function') {
throw new InvalidArgumentError('Argument opts.agent must implement Agent')
}
super(origin, opts)
this[kMockAgent] = opts.agent
this[kOrigin] = origin
this[kIgnoreTrailingSlash] = opts.ignoreTrailingSlash ?? false
this[kDispatches] = []
this[kConnected] = 1
this[kOriginalDispatch] = this.dispatch
this[kOriginalClose] = this.close.bind(this)
this.dispatch = buildMockDispatch.call(this)
this.close = this[kClose]
}
get [Symbols.kConnected] () {
return this[kConnected]
}
/**
* Sets up the base interceptor for mocking replies from undici.
*/
intercept (opts) {
return new MockInterceptor(
opts && { ignoreTrailingSlash: this[kIgnoreTrailingSlash], ...opts },
this[kDispatches]
)
}
cleanMocks () {
this[kDispatches] = []
}
async [kClose] () {
await promisify(this[kOriginalClose])()
this[kConnected] = 0
this[kMockAgent][Symbols.kClients].delete(this[kOrigin])
}
}
module.exports = MockPool

View File

@@ -0,0 +1,69 @@
'use strict';
var hasOwn = require('hasown');
function specifierIncluded(current, specifier) {
var nodeParts = current.split('.');
var parts = specifier.split(' ');
var op = parts.length > 1 ? parts[0] : '=';
var versionParts = (parts.length > 1 ? parts[1] : parts[0]).split('.');
for (var i = 0; i < 3; ++i) {
var cur = parseInt(nodeParts[i] || 0, 10);
var ver = parseInt(versionParts[i] || 0, 10);
if (cur === ver) {
continue; // eslint-disable-line no-restricted-syntax, no-continue
}
if (op === '<') {
return cur < ver;
}
if (op === '>=') {
return cur >= ver;
}
return false;
}
return op === '>=';
}
function matchesRange(current, range) {
var specifiers = range.split(/ ?&& ?/);
if (specifiers.length === 0) {
return false;
}
for (var i = 0; i < specifiers.length; ++i) {
if (!specifierIncluded(current, specifiers[i])) {
return false;
}
}
return true;
}
function versionIncluded(nodeVersion, specifierValue) {
if (typeof specifierValue === 'boolean') {
return specifierValue;
}
var current = typeof nodeVersion === 'undefined'
? process.versions && process.versions.node
: nodeVersion;
if (typeof current !== 'string') {
throw new TypeError(typeof nodeVersion === 'undefined' ? 'Unable to determine current node version' : 'If provided, a valid node version is required');
}
if (specifierValue && typeof specifierValue === 'object') {
for (var i = 0; i < specifierValue.length; ++i) {
if (matchesRange(current, specifierValue[i])) {
return true;
}
}
return false;
}
return matchesRange(current, specifierValue);
}
var data = require('./core.json');
module.exports = function isCore(x, nodeVersion) {
return hasOwn(data, x) && versionIncluded(nodeVersion, data[x]);
};

View File

@@ -0,0 +1,16 @@
//#region src/types/request.d.ts
type HttpMethod = 'GET' | 'SEARCH' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
interface RequestOptions {
path: string;
method?: HttpMethod;
params?: Record<string, any>;
headers?: Record<string, string>;
body?: string | FormData;
onRequest?: RequestTransformer;
onResponse?: ResponseTransformer;
}
type RequestTransformer = (options: RequestInit) => RequestInit | Promise<RequestInit>;
type ResponseTransformer<Output = any> = (data: any, request: RequestInit) => Output | Promise<Output>;
//#endregion
export { HttpMethod, RequestOptions, RequestTransformer, ResponseTransformer };
//# sourceMappingURL=request.d.ts.map

View File

@@ -0,0 +1,29 @@
import { DirectusTranslation } from "../../../schema/translation.js";
import { NestedPartial } from "../../../types/utils.js";
import { ApplyQueryFields } from "../../../types/output.js";
import { Query } from "../../../types/query.js";
import { RestCommand } from "../../types.js";
//#region src/rest/commands/create/translations.d.ts
type CreateTranslationOutput<Schema, TQuery extends Query<Schema, Item>, Item extends object = DirectusTranslation<Schema>> = ApplyQueryFields<Schema, Item, TQuery['fields']>;
/**
* Create multiple new translation.
*
* @param items The translations to create
* @param query Optional return data query
*
* @returns Returns the translation object for the created translation.
*/
declare const createTranslations: <Schema, const TQuery extends Query<Schema, DirectusTranslation<Schema>>>(items: NestedPartial<DirectusTranslation<Schema>>[], query?: TQuery) => RestCommand<CreateTranslationOutput<Schema, TQuery>[], Schema>;
/**
* Create a new translation.
*
* @param item The translation to create
* @param query Optional return data query
*
* @returns Returns the translation object for the created translation.
*/
declare const createTranslation: <Schema, const TQuery extends Query<Schema, DirectusTranslation<Schema>>>(item: NestedPartial<DirectusTranslation<Schema>>, query?: TQuery) => RestCommand<CreateTranslationOutput<Schema, TQuery>, Schema>;
//#endregion
export { CreateTranslationOutput, createTranslation, createTranslations };
//# sourceMappingURL=translations.d.ts.map

View File

@@ -0,0 +1,6 @@
export declare enum SpanNames {
QUERY_PREFIX = "pg.query",
CONNECT = "pg.connect",
POOL_CONNECT = "pg-pool.connect"
}
//# sourceMappingURL=SpanNames.d.ts.map

View File

@@ -0,0 +1,24 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const ZapOff = createLucideIcon("ZapOff", [
["path", { d: "M10.513 4.856 13.12 2.17a.5.5 0 0 1 .86.46l-1.377 4.317", key: "193nxd" }],
["path", { d: "M15.656 10H20a1 1 0 0 1 .78 1.63l-1.72 1.773", key: "27a7lr" }],
[
"path",
{
d: "M16.273 16.273 10.88 21.83a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14H4a1 1 0 0 1-.78-1.63l4.507-4.643",
key: "1e0qe9"
}
],
["path", { d: "m2 2 20 20", key: "1ooewy" }]
]);
export { ZapOff as default };
//# sourceMappingURL=zap-off.js.map

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

View File

@@ -0,0 +1,20 @@
import type ExtractorCodec from '../format/ExtractorCodec.js';
import type { ExtractorMessage, Locale } from '../types.js';
export default class CatalogPersister {
private messagesPath;
private codec;
private extension;
constructor(params: {
messagesPath: string;
codec: ExtractorCodec;
extension: string;
});
private getFileName;
private getFilePath;
read(locale: Locale): Promise<Array<ExtractorMessage>>;
write(messages: Array<ExtractorMessage>, context: {
locale: Locale;
sourceMessagesById: Map<string, ExtractorMessage>;
}): Promise<void>;
getLastModified(locale: Locale): Promise<Date | undefined>;
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"constraints.d.ts","sourceRoot":"","sources":["../../src/query-presets/constraints.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAChD,OAAO,KAAK,EAAE,KAAK,EAAU,MAAM,2BAA2B,CAAA;AAuB9D,eAAO,MAAM,cAAc,WAAY,MAAM,KAAG,KA2F9C,CAAA"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"usePatchAnimateHeight.d.ts","sourceRoot":"","sources":["../../../src/elements/AnimateHeight/usePatchAnimateHeight.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,qBAAqB,kDAK/B;IACD,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAA;IAC7C,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAA;IAC3C,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,OAAO,CAAA;CACd,KAAG;IAAE,+BAA+B,EAAE,OAAO,CAAA;CAoF7C,CAAA"}

View File

@@ -0,0 +1,184 @@
import { buildLocalizeFn } from "../../_lib/buildLocalizeFn.mjs";
// Ref: https://www.unicode.org/cldr/charts/32/summary/ta.html
const eraValues = {
narrow: ["கி.மு.", "கி.பி."],
abbreviated: ["கி.மு.", "கி.பி."], // CLDR #1624, #1626
wide: ["கிறிஸ்துவுக்கு முன்", "அன்னோ டோமினி"], // CLDR #1620, #1622
};
const quarterValues = {
// CLDR #1644 - #1647
narrow: ["1", "2", "3", "4"],
// CLDR #1636 - #1639
abbreviated: ["காலா.1", "காலா.2", "காலா.3", "காலா.4"],
// CLDR #1628 - #1631
wide: [
"ஒன்றாம் காலாண்டு",
"இரண்டாம் காலாண்டு",
"மூன்றாம் காலாண்டு",
"நான்காம் காலாண்டு",
],
};
const monthValues = {
// CLDR #700 - #711
narrow: ["ஜ", "பி", "மா", "ஏ", "மே", "ஜூ", "ஜூ", "ஆ", "செ", "அ", "ந", "டி"],
// CLDR #1676 - #1687
abbreviated: [
"ஜன.",
"பிப்.",
"மார்.",
"ஏப்.",
"மே",
"ஜூன்",
"ஜூலை",
"ஆக.",
"செப்.",
"அக்.",
"நவ.",
"டிச.",
],
// CLDR #1652 - #1663
wide: [
"ஜனவரி", // January
"பிப்ரவரி", // February
"மார்ச்", // March
"ஏப்ரல்", // April
"மே", // May
"ஜூன்", // June
"ஜூலை", // July
"ஆகஸ்ட்", // August
"செப்டம்பர்", // September
"அக்டோபர்", // October
"நவம்பர்", // November
"டிசம்பர்", // December
],
};
const dayValues = {
// CLDR #1766 - #1772
narrow: ["ஞா", "தி", "செ", "பு", "வி", "வெ", "ச"],
// CLDR #1752 - #1758
short: ["ஞா", "தி", "செ", "பு", "வி", "வெ", "ச"],
// CLDR #1738 - #1744
abbreviated: ["ஞாயி.", "திங்.", "செவ்.", "புத.", "வியா.", "வெள்.", "சனி"],
// CLDR #1724 - #1730
wide: [
"ஞாயிறு", // Sunday
"திங்கள்", // Monday
"செவ்வாய்", // Tuesday
"புதன்", // Wednesday
"வியாழன்", // Thursday
"வெள்ளி", // Friday
"சனி", // Saturday
],
};
// CLDR #1780 - #1845
const dayPeriodValues = {
narrow: {
am: "மு.ப",
pm: "பி.ப",
midnight: "நள்.",
noon: "நண்.",
morning: "கா.",
afternoon: "மதி.",
evening: "மா.",
night: "இர.",
},
abbreviated: {
am: "முற்பகல்",
pm: "பிற்பகல்",
midnight: "நள்ளிரவு",
noon: "நண்பகல்",
morning: "காலை",
afternoon: "மதியம்",
evening: "மாலை",
night: "இரவு",
},
wide: {
am: "முற்பகல்",
pm: "பிற்பகல்",
midnight: "நள்ளிரவு",
noon: "நண்பகல்",
morning: "காலை",
afternoon: "மதியம்",
evening: "மாலை",
night: "இரவு",
},
};
// CLDR #1780 - #1845
const formattingDayPeriodValues = {
narrow: {
am: "மு.ப",
pm: "பி.ப",
midnight: "நள்.",
noon: "நண்.",
morning: "கா.",
afternoon: "மதி.",
evening: "மா.",
night: "இர.",
},
abbreviated: {
am: "முற்பகல்",
pm: "பிற்பகல்",
midnight: "நள்ளிரவு",
noon: "நண்பகல்",
morning: "காலை",
afternoon: "மதியம்",
evening: "மாலை",
night: "இரவு",
},
wide: {
am: "முற்பகல்",
pm: "பிற்பகல்",
midnight: "நள்ளிரவு",
noon: "நண்பகல்",
morning: "காலை",
afternoon: "மதியம்",
evening: "மாலை",
night: "இரவு",
},
};
const ordinalNumber = (dirtyNumber, _options) => {
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",
}),
day: buildLocalizeFn({
values: dayValues,
defaultWidth: "wide",
}),
dayPeriod: buildLocalizeFn({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide",
}),
};

View File

@@ -0,0 +1,39 @@
import { buildFormatLongFn } from "../../_lib/buildFormatLongFn.js";
const dateFormats = {
full: "EEEE, d MMMM yyyy",
long: "d MMMM yyyy",
medium: "d MMM yyyy",
short: "dd.MM.yyyy",
};
const timeFormats = {
full: "HH:mm:ss zzzz",
long: "HH:mm:ss z",
medium: "HH:mm:ss",
short: "HH:mm",
};
const dateTimeFormats = {
full: "{{date}} 'la' {{time}}",
long: "{{date}} 'la' {{time}}",
medium: "{{date}}, {{time}}",
short: "{{date}}, {{time}}",
};
export const formatLong = {
date: buildFormatLongFn({
formats: dateFormats,
defaultWidth: "full",
}),
time: buildFormatLongFn({
formats: timeFormats,
defaultWidth: "full",
}),
dateTime: buildFormatLongFn({
formats: dateTimeFormats,
defaultWidth: "full",
}),
};

View File

@@ -0,0 +1,21 @@
let cachedDebuggerEnabled;
/**
* Was the debugger enabled when this function was first called?
*/
async function isDebuggerEnabled() {
if (cachedDebuggerEnabled === undefined) {
try {
// Node can be built without inspector support
const inspector = await import('node:inspector');
cachedDebuggerEnabled = !!inspector.url();
} catch {
cachedDebuggerEnabled = false;
}
}
return cachedDebuggerEnabled;
}
export { isDebuggerEnabled };
//# sourceMappingURL=debug.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/fields/Text/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAC7D,OAAO,KAAK,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAC7C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,EAAE,MAAM,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAA;AAE1F,MAAM,MAAM,oBAAoB,GAC5B;IACE,QAAQ,CAAC,OAAO,CAAC,EAAE,KAAK,CAAA;IACxB,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAA;CAC/D,GACD;IACE,QAAQ,CAAC,OAAO,CAAC,EAAE,IAAI,CAAA;IACvB,QAAQ,CAAC,QAAQ,CAAC,EAAE,uBAAuB,CAAC,UAAU,CAAC,CAAA;CACxD,CAAA;AAEL,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,CAAC,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACrC,QAAQ,CAAC,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtC,QAAQ,CAAC,WAAW,CAAC,EAAE,iBAAiB,CAAA;IACxC,QAAQ,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAChC,QAAQ,CAAC,cAAc,CAAC,EAAE;QACxB,YAAY,CAAC,EAAE,GAAG,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC,cAAc,CAAC,CAAA;KAC9D,CAAA;IACD,QAAQ,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAA;IACrD,QAAQ,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAChC,QAAQ,CAAC,KAAK,CAAC,EAAE,WAAW,CAAA;IAC5B,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAA;IAC5B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,SAAS,CAAC,EAAE,KAAK,CAAC,oBAAoB,CAAC,gBAAgB,CAAC,CAAA;IACjE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAAA;IACtD,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAC3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAC3B,QAAQ,CAAC,GAAG,CAAC,EAAE,OAAO,CAAA;IACtB,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAA;IAC5B,QAAQ,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;IACpC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,EAAE,CAAA;CAClC,GAAG,oBAAoB,CAAA"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"createExtensions.d.ts","sourceRoot":"","sources":["../../src/postgres/createExtensions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AAErD,eAAO,MAAM,gBAAgB,SAAyB,mBAAmB,KAAG,OAAO,CAAC,IAAI,CAUvF,CAAA"}

View File

@@ -0,0 +1,18 @@
import { type LocaleData } from "./core.js";
export type ListPatternLocaleData = LocaleData<ListPatternFieldsData>;
export interface ListPatternFieldsData {
conjunction?: ListPatternData;
disjunction?: ListPatternData;
unit?: ListPatternData;
}
export interface ListPattern {
start: string;
middle: string;
end: string;
pair: string;
}
export interface ListPatternData {
long: ListPattern;
short?: ListPattern;
narrow?: ListPattern;
}

View File

@@ -0,0 +1,15 @@
import type { MapSource as MapSourceType } from './source-map-tree.mts';
import type { SourceMapInput, SourceMapLoader } from './types.mts';
/**
* Recursively builds a tree structure out of sourcemap files, with each node
* being either an `OriginalSource` "leaf" or a `SourceMapTree` composed of
* `OriginalSource`s and `SourceMapTree`s.
*
* Every sourcemap is composed of a collection of source files and mappings
* into locations of those source files. When we generate a `SourceMapTree` for
* the sourcemap, we attempt to load each source file's own sourcemap. If it
* does not have an associated sourcemap, it is considered an original,
* unmodified source file.
*/
export default function buildSourceMapTree(input: SourceMapInput | SourceMapInput[], loader: SourceMapLoader): MapSourceType;
//# sourceMappingURL=build-source-map-tree.d.ts.map

View File

@@ -0,0 +1,21 @@
/**
* @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 FolderOpen = createLucideIcon("FolderOpen", [
[
"path",
{
d: "m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",
key: "usdka0"
}
]
]);
export { FolderOpen as default };
//# sourceMappingURL=folder-open.js.map

View File

@@ -0,0 +1,6 @@
global.process = { __proto__: process, pid: 123456 }
Date.now = function () { return 1459875739796 }
require('node:os').hostname = function () { return 'abcdefghijklmnopqr' }
const pino = require(require.resolve('./../../'))
const asyncLogger = pino(pino.destination({ minLength: 4096, sync: false }))
asyncLogger.info('h')

View File

@@ -0,0 +1,16 @@
/**
* @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 RussianRuble = createLucideIcon("RussianRuble", [
["path", { d: "M6 11h8a4 4 0 0 0 0-8H9v18", key: "18ai8t" }],
["path", { d: "M6 15h8", key: "1y8f6l" }]
]);
export { RussianRuble as default };
//# sourceMappingURL=russian-ruble.js.map

View File

@@ -0,0 +1 @@
import{a as t}from"./chunk-CUNVWAK5.js";var r={...Object.fromEntries(Object.entries(t).filter(([e])=>e!=="extra")),...t.extra.iis},s=r;export{s as default,r as status};

View File

@@ -0,0 +1,12 @@
import type { ClientOptions } from '../types-hoist/options';
import type { SpanJSON } from '../types-hoist/span';
/**
* Check if a span should be ignored based on the ignoreSpans configuration.
*/
export declare function shouldIgnoreSpan(span: Pick<SpanJSON, 'description' | 'op'>, ignoreSpans: Required<ClientOptions>['ignoreSpans']): boolean;
/**
* Takes a list of spans, and a span that was dropped, and re-parents the child spans of the dropped span to the parent of the dropped span, if possible.
* This mutates the spans array in place!
*/
export declare function reparentChildSpans(spans: SpanJSON[], dropSpan: SpanJSON): void;
//# sourceMappingURL=should-ignore-span.d.ts.map

View File

@@ -0,0 +1,121 @@
import { SQL } from "../sql/sql.js";
import { entityKind, is } from "../entity.js";
import { IndexedColumn } from "./columns/index.js";
class IndexBuilderOn {
constructor(unique, name) {
this.unique = unique;
this.name = name;
}
static [entityKind] = "GelIndexBuilderOn";
on(...columns) {
return new IndexBuilder(
columns.map((it) => {
if (is(it, SQL)) {
return it;
}
it = it;
const clonedIndexedColumn = new IndexedColumn(it.name, !!it.keyAsName, it.columnType, it.indexConfig);
it.indexConfig = JSON.parse(JSON.stringify(it.defaultConfig));
return clonedIndexedColumn;
}),
this.unique,
false,
this.name
);
}
onOnly(...columns) {
return new IndexBuilder(
columns.map((it) => {
if (is(it, SQL)) {
return it;
}
it = it;
const clonedIndexedColumn = new IndexedColumn(it.name, !!it.keyAsName, it.columnType, it.indexConfig);
it.indexConfig = it.defaultConfig;
return clonedIndexedColumn;
}),
this.unique,
true,
this.name
);
}
/**
* Specify what index method to use. Choices are `btree`, `hash`, `gist`, `sGelist`, `gin`, `brin`, or user-installed access methods like `bloom`. The default method is `btree.
*
* If you have the `Gel_vector` extension installed in your database, you can use the `hnsw` and `ivfflat` options, which are predefined types.
*
* **You can always specify any string you want in the method, in case Drizzle doesn't have it natively in its types**
*
* @param method The name of the index method to be used
* @param columns
* @returns
*/
using(method, ...columns) {
return new IndexBuilder(
columns.map((it) => {
if (is(it, SQL)) {
return it;
}
it = it;
const clonedIndexedColumn = new IndexedColumn(it.name, !!it.keyAsName, it.columnType, it.indexConfig);
it.indexConfig = JSON.parse(JSON.stringify(it.defaultConfig));
return clonedIndexedColumn;
}),
this.unique,
true,
this.name,
method
);
}
}
class IndexBuilder {
static [entityKind] = "GelIndexBuilder";
/** @internal */
config;
constructor(columns, unique, only, name, method = "btree") {
this.config = {
name,
columns,
unique,
only,
method
};
}
concurrently() {
this.config.concurrently = true;
return this;
}
with(obj) {
this.config.with = obj;
return this;
}
where(condition) {
this.config.where = condition;
return this;
}
/** @internal */
build(table) {
return new Index(this.config, table);
}
}
class Index {
static [entityKind] = "GelIndex";
config;
constructor(config, table) {
this.config = { ...config, table };
}
}
function index(name) {
return new IndexBuilderOn(false, name);
}
function uniqueIndex(name) {
return new IndexBuilderOn(true, name);
}
export {
Index,
IndexBuilder,
IndexBuilderOn,
index,
uniqueIndex
};
//# sourceMappingURL=indexes.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/cache/upstash/index.ts"],"sourcesContent":["export * from './cache.ts';\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,4BAAc,uBAAd;","names":[]}

View File

@@ -0,0 +1,137 @@
'use client';
import { c as _c } from "react/compiler-runtime";
import { jsx as _jsx } from "react/jsx-runtime";
import React from 'react';
import { components as SelectComponents } from 'react-select';
import { useDraggableSortable } from '../../DraggableSortable/useDraggableSortable/index.js';
import './index.scss';
const baseClass = 'multi-value';
export function generateMultiValueDraggableID(optionData, valueFunction) {
return typeof valueFunction === 'function' ? valueFunction(optionData) : optionData?.value;
}
export const MultiValue = props => {
const $ = _c(26);
const {
className,
data,
innerProps,
isDisabled,
selectProps: t0
} = props;
let t1;
if ($[0] !== t0) {
t1 = t0 === undefined ? {} : t0;
$[0] = t0;
$[1] = t1;
} else {
t1 = $[1];
}
const {
customProps: t2,
getOptionValue,
isSortable
} = t1;
let t3;
if ($[2] !== t2) {
t3 = t2 === undefined ? {} : t2;
$[2] = t2;
$[3] = t3;
} else {
t3 = $[3];
}
const {
disableMouseDown
} = t3;
let t4;
if ($[4] !== data || $[5] !== getOptionValue) {
t4 = generateMultiValueDraggableID(data, getOptionValue);
$[4] = data;
$[5] = getOptionValue;
$[6] = t4;
} else {
t4 = $[6];
}
const id = t4;
const t5 = !isSortable;
let t6;
if ($[7] !== id || $[8] !== t5) {
t6 = {
id,
disabled: t5
};
$[7] = id;
$[8] = t5;
$[9] = t6;
} else {
t6 = $[9];
}
const {
attributes,
isDragging,
listeners,
setNodeRef,
transform
} = useDraggableSortable(t6);
const t7 = !isDisabled && isSortable && "draggable";
const t8 = isDragging && `${baseClass}--is-dragging`;
let t9;
if ($[10] !== className || $[11] !== t7 || $[12] !== t8) {
t9 = [baseClass, className, t7, t8].filter(Boolean);
$[10] = className;
$[11] = t7;
$[12] = t8;
$[13] = t9;
} else {
t9 = $[13];
}
const classes = t9.join(" ");
let t10;
if ($[14] !== attributes || $[15] !== classes || $[16] !== disableMouseDown || $[17] !== innerProps || $[18] !== isSortable || $[19] !== listeners || $[20] !== props || $[21] !== setNodeRef || $[22] !== transform) {
let t11;
if ($[24] !== disableMouseDown) {
t11 = e => {
if (!disableMouseDown) {
e.stopPropagation();
}
};
$[24] = disableMouseDown;
$[25] = t11;
} else {
t11 = $[25];
}
t10 = _jsx(React.Fragment, {
children: _jsx(SelectComponents.MultiValue, {
...props,
className: classes,
innerProps: {
...(isSortable ? {
...attributes,
...listeners
} : {}),
...innerProps,
onMouseDown: t11,
ref: setNodeRef,
style: isSortable ? {
transform,
...attributes?.style
} : {}
}
})
});
$[14] = attributes;
$[15] = classes;
$[16] = disableMouseDown;
$[17] = innerProps;
$[18] = isSortable;
$[19] = listeners;
$[20] = props;
$[21] = setNodeRef;
$[22] = transform;
$[23] = t10;
} else {
t10 = $[23];
}
return t10;
};
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,40 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [v2.0.2](https://github.com/inspect-js/hasOwn/compare/v2.0.1...v2.0.2) - 2024-03-10
### Commits
- [types] use shared config [`68e9d4d`](https://github.com/inspect-js/hasOwn/commit/68e9d4dab6facb4f05f02c6baea94a3f2a4e44b2)
- [actions] remove redundant finisher; use reusable workflow [`241a68e`](https://github.com/inspect-js/hasOwn/commit/241a68e13ea1fe52bec5ba7f74144befc31fae7b)
- [Tests] increase coverage [`4125c0d`](https://github.com/inspect-js/hasOwn/commit/4125c0d6121db56ae30e38346dfb0c000b04f0a7)
- [Tests] skip `npm ls` in old node due to TS [`01b9282`](https://github.com/inspect-js/hasOwn/commit/01b92822f9971dea031eafdd14767df41d61c202)
- [types] improve predicate type [`d340f85`](https://github.com/inspect-js/hasOwn/commit/d340f85ce02e286ef61096cbbb6697081d40a12b)
- [Dev Deps] update `tape` [`70089fc`](https://github.com/inspect-js/hasOwn/commit/70089fcf544e64acc024cbe60f5a9b00acad86de)
- [Tests] use `@arethetypeswrong/cli` [`50b272c`](https://github.com/inspect-js/hasOwn/commit/50b272c829f40d053a3dd91c9796e0ac0b2af084)
## [v2.0.1](https://github.com/inspect-js/hasOwn/compare/v2.0.0...v2.0.1) - 2024-02-10
### Commits
- [types] use a handwritten d.ts file; fix exported type [`012b989`](https://github.com/inspect-js/hasOwn/commit/012b9898ccf91dc441e2ebf594ff70270a5fda58)
- [Dev Deps] update `@types/function-bind`, `@types/mock-property`, `@types/tape`, `aud`, `mock-property`, `npmignore`, `tape`, `typescript` [`977a56f`](https://github.com/inspect-js/hasOwn/commit/977a56f51a1f8b20566f3c471612137894644025)
- [meta] add `sideEffects` flag [`3a60b7b`](https://github.com/inspect-js/hasOwn/commit/3a60b7bf42fccd8c605e5f145a6fcc83b13cb46f)
## [v2.0.0](https://github.com/inspect-js/hasOwn/compare/v1.0.1...v2.0.0) - 2023-10-19
### Commits
- revamped implementation, tests, readme [`72bf8b3`](https://github.com/inspect-js/hasOwn/commit/72bf8b338e77a638f0a290c63ffaed18339c36b4)
- [meta] revamp package.json [`079775f`](https://github.com/inspect-js/hasOwn/commit/079775fb1ec72c1c6334069593617a0be3847458)
- Only apps should have lockfiles [`6640e23`](https://github.com/inspect-js/hasOwn/commit/6640e233d1bb8b65260880f90787637db157d215)
## v1.0.1 - 2023-10-10
### Commits
- Initial commit [`8dbfde6`](https://github.com/inspect-js/hasOwn/commit/8dbfde6e8fb0ebb076fab38d138f2984eb340a62)

View File

@@ -0,0 +1,32 @@
/*
* 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.
*/
import { context } from '@opentelemetry/api';
import { suppressTracing } from '../trace/suppress-tracing';
/**
* @internal
* Shared functionality used by Exporters while exporting data, including suppression of Traces.
*/
export function _export(exporter, arg) {
return new Promise(resolve => {
// prevent downstream exporter calls from generating spans
context.with(suppressTracing(context.active()), () => {
exporter.export(arg, (result) => {
resolve(result);
});
});
});
}
//# sourceMappingURL=exporter.js.map

View File

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

View File

@@ -0,0 +1,24 @@
var isBuffer = require('../')
var test = require('tape')
test('is-buffer', function (t) {
t.equal(isBuffer(Buffer.alloc(4)), true, 'new Buffer(4)')
t.equal(isBuffer(Buffer.allocUnsafeSlow(100)), true, 'SlowBuffer(100)')
t.equal(isBuffer(undefined), false, 'undefined')
t.equal(isBuffer(null), false, 'null')
t.equal(isBuffer(''), false, 'empty string')
t.equal(isBuffer(true), false, 'true')
t.equal(isBuffer(false), false, 'false')
t.equal(isBuffer(0), false, '0')
t.equal(isBuffer(1), false, '1')
t.equal(isBuffer(1.0), false, '1.0')
t.equal(isBuffer('string'), false, 'string')
t.equal(isBuffer({}), false, '{}')
t.equal(isBuffer([]), false, '[]')
t.equal(isBuffer(function foo () {}), false, 'function foo () {}')
t.equal(isBuffer({ isBuffer: null }), false, '{ isBuffer: null }')
t.equal(isBuffer({ isBuffer: function () { throw new Error() } }), false, '{ isBuffer: function () { throw new Error() } }')
t.end()
})

View File

@@ -0,0 +1,6 @@
/**
* Collects all child nodes of an element.
*
* @param node the node
*/
export default function childNodes(node: Element | null): Node[];

View File

@@ -0,0 +1,12 @@
import type { ParserOptions } from "./options.js";
import type { JSONSchema } from "./types";
import type $RefParser from "./index";
export default dereference;
/**
* Crawls the JSON schema, finds all JSON references, and dereferences them.
* This method mutates the JSON schema object, replacing JSON references with their resolved value.
*
* @param parser
* @param options
*/
declare function dereference<S extends object = JSONSchema, O extends ParserOptions<S> = ParserOptions<S>>(parser: $RefParser<S, O>, options: O): void;

View File

@@ -0,0 +1,29 @@
"use strict";
exports.isThisHour = isThisHour;
var _index = require("./constructNow.js");
var _index2 = require("./isSameHour.js");
/**
* @name isThisHour
* @category Hour Helpers
* @summary Is the given date in the same hour as the current date?
* @pure false
*
* @description
* Is the given date in the same hour as the current date?
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param date - The date to check
*
* @returns The date is in this hour
*
* @example
* // If now is 25 September 2014 18:30:15.500,
* // is 25 September 2014 18:00:00 in this hour?
* const result = isThisHour(new Date(2014, 8, 25, 18))
* //=> true
*/
function isThisHour(date) {
return (0, _index2.isSameHour)(date, (0, _index.constructNow)(date));
}

View File

@@ -0,0 +1,560 @@
function _typeof(o) {"@babel/helpers - typeof";return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {return typeof o;} : function (o) {return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;}, _typeof(o);}function ownKeys(e, r) {var t = Object.keys(e);if (Object.getOwnPropertySymbols) {var o = Object.getOwnPropertySymbols(e);r && (o = o.filter(function (r) {return Object.getOwnPropertyDescriptor(e, r).enumerable;})), t.push.apply(t, o);}return t;}function _objectSpread(e) {for (var r = 1; r < arguments.length; r++) {var t = null != arguments[r] ? arguments[r] : {};r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {_defineProperty(e, r, t[r]);}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));});}return e;}function _defineProperty(obj, key, value) {key = _toPropertyKey(key);if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}function _toPropertyKey(t) {var i = _toPrimitive(t, "string");return "symbol" == _typeof(i) ? i : String(i);}function _toPrimitive(t, r) {if ("object" != _typeof(t) || !t) return t;var e = t[Symbol.toPrimitive];if (void 0 !== e) {var i = e.call(t, r || "default");if ("object" != _typeof(i)) return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return ("string" === r ? String : Number)(t);}(function (_window$dateFns) {var __defProp = Object.defineProperty;
var __export = function __export(target, all) {
for (var name in all)
__defProp(target, name, {
get: all[name],
enumerable: true,
configurable: true,
set: function set(newValue) {return all[name] = function () {return newValue;};}
});
};
// lib/locale/ar-SA/_lib/formatDistance.mjs
var formatDistanceLocale = {
lessThanXSeconds: {
one: "\u0623\u0642\u0644 \u0645\u0646 \u062B\u0627\u0646\u064A\u0629 \u0648\u0627\u062D\u062F\u0629",
two: "\u0623\u0642\u0644 \u0645\u0646 \u062B\u0627\u0646\u062A\u064A\u0646",
threeToTen: "\u0623\u0642\u0644 \u0645\u0646 {{count}} \u062B\u0648\u0627\u0646\u064A",
other: "\u0623\u0642\u0644 \u0645\u0646 {{count}} \u062B\u0627\u0646\u064A\u0629"
},
xSeconds: {
one: "\u062B\u0627\u0646\u064A\u0629 \u0648\u0627\u062D\u062F\u0629",
two: "\u062B\u0627\u0646\u062A\u064A\u0646",
threeToTen: "{{count}} \u062B\u0648\u0627\u0646\u064A",
other: "{{count}} \u062B\u0627\u0646\u064A\u0629"
},
halfAMinute: "\u0646\u0635\u0641 \u062F\u0642\u064A\u0642\u0629",
lessThanXMinutes: {
one: "\u0623\u0642\u0644 \u0645\u0646 \u062F\u0642\u064A\u0642\u0629",
two: "\u0623\u0642\u0644 \u0645\u0646 \u062F\u0642\u064A\u0642\u062A\u064A\u0646",
threeToTen: "\u0623\u0642\u0644 \u0645\u0646 {{count}} \u062F\u0642\u0627\u0626\u0642",
other: "\u0623\u0642\u0644 \u0645\u0646 {{count}} \u062F\u0642\u064A\u0642\u0629"
},
xMinutes: {
one: "\u062F\u0642\u064A\u0642\u0629 \u0648\u0627\u062D\u062F\u0629",
two: "\u062F\u0642\u064A\u0642\u062A\u064A\u0646",
threeToTen: "{{count}} \u062F\u0642\u0627\u0626\u0642",
other: "{{count}} \u062F\u0642\u064A\u0642\u0629"
},
aboutXHours: {
one: "\u0633\u0627\u0639\u0629 \u0648\u0627\u062D\u062F\u0629 \u062A\u0642\u0631\u064A\u0628\u0627\u064B",
two: "\u0633\u0627\u0639\u062A\u064A\u0646 \u062A\u0642\u0631\u064A\u0628\u0627\u064B",
threeToTen: "{{count}} \u0633\u0627\u0639\u0627\u062A \u062A\u0642\u0631\u064A\u0628\u0627\u064B",
other: "{{count}} \u0633\u0627\u0639\u0629 \u062A\u0642\u0631\u064A\u0628\u0627\u064B"
},
xHours: {
one: "\u0633\u0627\u0639\u0629 \u0648\u0627\u062D\u062F\u0629",
two: "\u0633\u0627\u0639\u062A\u064A\u0646",
threeToTen: "{{count}} \u0633\u0627\u0639\u0627\u062A",
other: "{{count}} \u0633\u0627\u0639\u0629"
},
xDays: {
one: "\u064A\u0648\u0645 \u0648\u0627\u062D\u062F",
two: "\u064A\u0648\u0645\u064A\u0646",
threeToTen: "{{count}} \u0623\u064A\u0627\u0645",
other: "{{count}} \u064A\u0648\u0645"
},
aboutXWeeks: {
one: "\u0623\u0633\u0628\u0648\u0639 \u0648\u0627\u062D\u062F \u062A\u0642\u0631\u064A\u0628\u0627\u064B",
two: "\u0623\u0633\u0628\u0648\u0639\u064A\u0646 \u062A\u0642\u0631\u064A\u0628\u0627\u064B",
threeToTen: "{{count}} \u0623\u0633\u0627\u0628\u064A\u0639 \u062A\u0642\u0631\u064A\u0628\u0627\u064B",
other: "{{count}} \u0623\u0633\u0628\u0648\u0639 \u062A\u0642\u0631\u064A\u0628\u0627\u064B"
},
xWeeks: {
one: "\u0623\u0633\u0628\u0648\u0639 \u0648\u0627\u062D\u062F",
two: "\u0623\u0633\u0628\u0648\u0639\u064A\u0646",
threeToTen: "{{count}} \u0623\u0633\u0627\u0628\u064A\u0639",
other: "{{count}} \u0623\u0633\u0628\u0648\u0639"
},
aboutXMonths: {
one: "\u0634\u0647\u0631 \u0648\u0627\u062D\u062F \u062A\u0642\u0631\u064A\u0628\u0627\u064B",
two: "\u0634\u0647\u0631\u064A\u0646 \u062A\u0642\u0631\u064A\u0628\u0627\u064B",
threeToTen: "{{count}} \u0623\u0634\u0647\u0631 \u062A\u0642\u0631\u064A\u0628\u0627\u064B",
other: "{{count}} \u0634\u0647\u0631 \u062A\u0642\u0631\u064A\u0628\u0627\u064B"
},
xMonths: {
one: "\u0634\u0647\u0631 \u0648\u0627\u062D\u062F",
two: "\u0634\u0647\u0631\u064A\u0646",
threeToTen: "{{count}} \u0623\u0634\u0647\u0631",
other: "{{count}} \u0634\u0647\u0631"
},
aboutXYears: {
one: "\u0639\u0627\u0645 \u0648\u0627\u062D\u062F \u062A\u0642\u0631\u064A\u0628\u0627\u064B",
two: "\u0639\u0627\u0645\u064A\u0646 \u062A\u0642\u0631\u064A\u0628\u0627\u064B",
threeToTen: "{{count}} \u0623\u0639\u0648\u0627\u0645 \u062A\u0642\u0631\u064A\u0628\u0627\u064B",
other: "{{count}} \u0639\u0627\u0645 \u062A\u0642\u0631\u064A\u0628\u0627\u064B"
},
xYears: {
one: "\u0639\u0627\u0645 \u0648\u0627\u062D\u062F",
two: "\u0639\u0627\u0645\u064A\u0646",
threeToTen: "{{count}} \u0623\u0639\u0648\u0627\u0645",
other: "{{count}} \u0639\u0627\u0645"
},
overXYears: {
one: "\u0623\u0643\u062B\u0631 \u0645\u0646 \u0639\u0627\u0645",
two: "\u0623\u0643\u062B\u0631 \u0645\u0646 \u0639\u0627\u0645\u064A\u0646",
threeToTen: "\u0623\u0643\u062B\u0631 \u0645\u0646 {{count}} \u0623\u0639\u0648\u0627\u0645",
other: "\u0623\u0643\u062B\u0631 \u0645\u0646 {{count}} \u0639\u0627\u0645"
},
almostXYears: {
one: "\u0639\u0627\u0645 \u0648\u0627\u062D\u062F \u062A\u0642\u0631\u064A\u0628\u0627\u064B",
two: "\u0639\u0627\u0645\u064A\u0646 \u062A\u0642\u0631\u064A\u0628\u0627\u064B",
threeToTen: "{{count}} \u0623\u0639\u0648\u0627\u0645 \u062A\u0642\u0631\u064A\u0628\u0627\u064B",
other: "{{count}} \u0639\u0627\u0645 \u062A\u0642\u0631\u064A\u0628\u0627\u064B"
}
};
var formatDistance = function formatDistance(token, count, options) {
var result;
var tokenValue = formatDistanceLocale[token];
if (typeof tokenValue === "string") {
result = tokenValue;
} else if (count === 1) {
result = tokenValue.one;
} else if (count === 2) {
result = tokenValue.two;
} else if (count <= 10) {
result = tokenValue.threeToTen.replace("{{count}}", String(count));
} else {
result = tokenValue.other.replace("{{count}}", String(count));
}
if (options !== null && options !== void 0 && options.addSuffix) {
if (options.comparison && options.comparison > 0) {
return "\u0641\u064A \u062E\u0644\u0627\u0644 " + result;
} else {
return "\u0645\u0646\u0630 " + result;
}
}
return result;
};
// lib/locale/_lib/buildFormatLongFn.mjs
function buildFormatLongFn(args) {
return function () {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var width = options.width ? String(options.width) : args.defaultWidth;
var format = args.formats[width] || args.formats[args.defaultWidth];
return format;
};
}
// lib/locale/ar-SA/_lib/formatLong.mjs
var dateFormats = {
full: "EEEE, MMMM do, y",
long: "MMMM do, y",
medium: "MMM d, y",
short: "MM/dd/yyyy"
};
var timeFormats = {
full: "h:mm:ss a zzzz",
long: "h:mm:ss a z",
medium: "h:mm:ss a",
short: "h:mm a"
};
var dateTimeFormats = {
full: "{{date}} '\u0639\u0646\u062F' {{time}}",
long: "{{date}} '\u0639\u0646\u062F' {{time}}",
medium: "{{date}}, {{time}}",
short: "{{date}}, {{time}}"
};
var formatLong = {
date: buildFormatLongFn({
formats: dateFormats,
defaultWidth: "full"
}),
time: buildFormatLongFn({
formats: timeFormats,
defaultWidth: "full"
}),
dateTime: buildFormatLongFn({
formats: dateTimeFormats,
defaultWidth: "full"
})
};
// lib/locale/ar-SA/_lib/formatRelative.mjs
var formatRelativeLocale = {
lastWeek: "'\u0623\u062E\u0631' eeee '\u0639\u0646\u062F' p",
yesterday: "'\u0623\u0645\u0633 \u0639\u0646\u062F' p",
today: "'\u0627\u0644\u064A\u0648\u0645 \u0639\u0646\u062F' p",
tomorrow: "'\u063A\u062F\u0627\u064B \u0639\u0646\u062F' p",
nextWeek: "eeee '\u0639\u0646\u062F' p",
other: "P"
};
var formatRelative = function formatRelative(token, _date, _baseDate, _options) {return formatRelativeLocale[token];};
// lib/locale/_lib/buildLocalizeFn.mjs
function buildLocalizeFn(args) {
return function (value, options) {
var context = options !== null && options !== void 0 && options.context ? String(options.context) : "standalone";
var valuesArray;
if (context === "formatting" && args.formattingValues) {
var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;
valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
} else {
var _defaultWidth = args.defaultWidth;
var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;
valuesArray = args.values[_width] || args.values[_defaultWidth];
}
var index = args.argumentCallback ? args.argumentCallback(value) : value;
return valuesArray[index];
};
}
// lib/locale/ar-SA/_lib/localize.mjs
var eraValues = {
narrow: ["\u0642", "\u0628"],
abbreviated: ["\u0642.\u0645.", "\u0628.\u0645."],
wide: ["\u0642\u0628\u0644 \u0627\u0644\u0645\u064A\u0644\u0627\u062F", "\u0628\u0639\u062F \u0627\u0644\u0645\u064A\u0644\u0627\u062F"]
};
var quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["\u06311", "\u06312", "\u06313", "\u06314"],
wide: ["\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u0623\u0648\u0644", "\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u062B\u0627\u0646\u064A", "\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u062B\u0627\u0644\u062B", "\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u0631\u0627\u0628\u0639"]
};
var monthValues = {
narrow: ["\u064A", "\u0641", "\u0645", "\u0623", "\u0645", "\u064A", "\u064A", "\u0623", "\u0633", "\u0623", "\u0646", "\u062F"],
abbreviated: [
"\u064A\u0646\u0627",
"\u0641\u0628\u0631",
"\u0645\u0627\u0631\u0633",
"\u0623\u0628\u0631\u064A\u0644",
"\u0645\u0627\u064A\u0648",
"\u064A\u0648\u0646\u0640",
"\u064A\u0648\u0644\u0640",
"\u0623\u063A\u0633\u0640",
"\u0633\u0628\u062A\u0640",
"\u0623\u0643\u062A\u0640",
"\u0646\u0648\u0641\u0640",
"\u062F\u064A\u0633\u0640"],
wide: [
"\u064A\u0646\u0627\u064A\u0631",
"\u0641\u0628\u0631\u0627\u064A\u0631",
"\u0645\u0627\u0631\u0633",
"\u0623\u0628\u0631\u064A\u0644",
"\u0645\u0627\u064A\u0648",
"\u064A\u0648\u0646\u064A\u0648",
"\u064A\u0648\u0644\u064A\u0648",
"\u0623\u063A\u0633\u0637\u0633",
"\u0633\u0628\u062A\u0645\u0628\u0631",
"\u0623\u0643\u062A\u0648\u0628\u0631",
"\u0646\u0648\u0641\u0645\u0628\u0631",
"\u062F\u064A\u0633\u0645\u0628\u0631"]
};
var dayValues = {
narrow: ["\u062D", "\u0646", "\u062B", "\u0631", "\u062E", "\u062C", "\u0633"],
short: ["\u0623\u062D\u062F", "\u0627\u062B\u0646\u064A\u0646", "\u062B\u0644\u0627\u062B\u0627\u0621", "\u0623\u0631\u0628\u0639\u0627\u0621", "\u062E\u0645\u064A\u0633", "\u062C\u0645\u0639\u0629", "\u0633\u0628\u062A"],
abbreviated: ["\u0623\u062D\u062F", "\u0627\u062B\u0646\u0640", "\u062B\u0644\u0627", "\u0623\u0631\u0628\u0640", "\u062E\u0645\u064A\u0640", "\u062C\u0645\u0639\u0629", "\u0633\u0628\u062A"],
wide: [
"\u0627\u0644\u0623\u062D\u062F",
"\u0627\u0644\u0627\u062B\u0646\u064A\u0646",
"\u0627\u0644\u062B\u0644\u0627\u062B\u0627\u0621",
"\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
"\u0627\u0644\u062E\u0645\u064A\u0633",
"\u0627\u0644\u062C\u0645\u0639\u0629",
"\u0627\u0644\u0633\u0628\u062A"]
};
var dayPeriodValues = {
narrow: {
am: "\u0635",
pm: "\u0645",
midnight: "\u0646",
noon: "\u0638",
morning: "\u0635\u0628\u0627\u062D\u0627\u064B",
afternoon: "\u0628\u0639\u062F \u0627\u0644\u0638\u0647\u0631",
evening: "\u0645\u0633\u0627\u0621\u0627\u064B",
night: "\u0644\u064A\u0644\u0627\u064B"
},
abbreviated: {
am: "\u0635",
pm: "\u0645",
midnight: "\u0646\u0635\u0641 \u0627\u0644\u0644\u064A\u0644",
noon: "\u0638\u0647\u0631",
morning: "\u0635\u0628\u0627\u062D\u0627\u064B",
afternoon: "\u0628\u0639\u062F \u0627\u0644\u0638\u0647\u0631",
evening: "\u0645\u0633\u0627\u0621\u0627\u064B",
night: "\u0644\u064A\u0644\u0627\u064B"
},
wide: {
am: "\u0635",
pm: "\u0645",
midnight: "\u0646\u0635\u0641 \u0627\u0644\u0644\u064A\u0644",
noon: "\u0638\u0647\u0631",
morning: "\u0635\u0628\u0627\u062D\u0627\u064B",
afternoon: "\u0628\u0639\u062F \u0627\u0644\u0638\u0647\u0631",
evening: "\u0645\u0633\u0627\u0621\u0627\u064B",
night: "\u0644\u064A\u0644\u0627\u064B"
}
};
var formattingDayPeriodValues = {
narrow: {
am: "\u0635",
pm: "\u0645",
midnight: "\u0646",
noon: "\u0638",
morning: "\u0641\u064A \u0627\u0644\u0635\u0628\u0627\u062D",
afternoon: "\u0628\u0639\u062F \u0627\u0644\u0638\u0640\u0647\u0631",
evening: "\u0641\u064A \u0627\u0644\u0645\u0633\u0627\u0621",
night: "\u0641\u064A \u0627\u0644\u0644\u064A\u0644"
},
abbreviated: {
am: "\u0635",
pm: "\u0645",
midnight: "\u0646\u0635\u0641 \u0627\u0644\u0644\u064A\u0644",
noon: "\u0638\u0647\u0631",
morning: "\u0641\u064A \u0627\u0644\u0635\u0628\u0627\u062D",
afternoon: "\u0628\u0639\u062F \u0627\u0644\u0638\u0647\u0631",
evening: "\u0641\u064A \u0627\u0644\u0645\u0633\u0627\u0621",
night: "\u0641\u064A \u0627\u0644\u0644\u064A\u0644"
},
wide: {
am: "\u0635",
pm: "\u0645",
midnight: "\u0646\u0635\u0641 \u0627\u0644\u0644\u064A\u0644",
noon: "\u0638\u0647\u0631",
morning: "\u0635\u0628\u0627\u062D\u0627\u064B",
afternoon: "\u0628\u0639\u062F \u0627\u0644\u0638\u0640\u0647\u0631",
evening: "\u0641\u064A \u0627\u0644\u0645\u0633\u0627\u0621",
night: "\u0641\u064A \u0627\u0644\u0644\u064A\u0644"
}
};
var ordinalNumber = function ordinalNumber(dirtyNumber) {
return String(dirtyNumber);
};
var localize = {
ordinalNumber: ordinalNumber,
era: buildLocalizeFn({
values: eraValues,
defaultWidth: "wide"
}),
quarter: buildLocalizeFn({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: function argumentCallback(quarter) {return quarter - 1;}
}),
month: buildLocalizeFn({
values: monthValues,
defaultWidth: "wide"
}),
day: buildLocalizeFn({
values: dayValues,
defaultWidth: "wide"
}),
dayPeriod: buildLocalizeFn({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide"
})
};
// lib/locale/_lib/buildMatchFn.mjs
function buildMatchFn(args) {
return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var width = options.width;
var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
var matchResult = string.match(matchPattern);
if (!matchResult) {
return null;
}
var matchedString = matchResult[0];
var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) {return pattern.test(matchedString);}) : findKey(parsePatterns, function (pattern) {return pattern.test(matchedString);});
var value;
value = args.valueCallback ? args.valueCallback(key) : key;
value = options.valueCallback ? options.valueCallback(value) : value;
var rest = string.slice(matchedString.length);
return { value: value, rest: rest };
};
}
var findKey = function findKey(object, predicate) {
for (var key in object) {
if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) {
return key;
}
}
return;
};
var findIndex = function findIndex(array, predicate) {
for (var key = 0; key < array.length; key++) {
if (predicate(array[key])) {
return key;
}
}
return;
};
// lib/locale/_lib/buildMatchPatternFn.mjs
function buildMatchPatternFn(args) {
return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var matchResult = string.match(args.matchPattern);
if (!matchResult)
return null;
var matchedString = matchResult[0];
var parseResult = string.match(args.parsePattern);
if (!parseResult)
return null;
var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
value = options.valueCallback ? options.valueCallback(value) : value;
var rest = string.slice(matchedString.length);
return { value: value, rest: rest };
};
}
// lib/locale/ar-SA/_lib/match.mjs
var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
var parseOrdinalNumberPattern = /\d+/i;
var matchEraPatterns = {
narrow: /^(ق|ب)/i,
abbreviated: /^(ق\.?\s?م\.?|ق\.?\s?م\.?\s?|a\.?\s?d\.?|c\.?\s?)/i,
wide: /^(قبل الميلاد|قبل الميلاد|بعد الميلاد|بعد الميلاد)/i
};
var parseEraPatterns = {
any: [/^قبل/i, /^بعد/i]
};
var matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^ر[1234]/i,
wide: /^الربع [1234]/i
};
var parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i]
};
var matchMonthPatterns = {
narrow: /^[يفمأمسند]/i,
abbreviated: /^(ين|ف|مار|أب|ماي|يون|يول|أغ|س|أك|ن|د)/i,
wide: /^(ين|ف|مار|أب|ماي|يون|يول|أغ|س|أك|ن|د)/i
};
var parseMonthPatterns = {
narrow: [
/^ي/i,
/^ف/i,
/^م/i,
/^أ/i,
/^م/i,
/^ي/i,
/^ي/i,
/^أ/i,
/^س/i,
/^أ/i,
/^ن/i,
/^د/i],
any: [
/^ين/i,
/^ف/i,
/^مار/i,
/^أب/i,
/^ماي/i,
/^يون/i,
/^يول/i,
/^أغ/i,
/^س/i,
/^أك/i,
/^ن/i,
/^د/i]
};
var matchDayPatterns = {
narrow: /^[حنثرخجس]/i,
short: /^(أحد|اثنين|ثلاثاء|أربعاء|خميس|جمعة|سبت)/i,
abbreviated: /^(أحد|اثن|ثلا|أرب|خمي|جمعة|سبت)/i,
wide: /^(الأحد|الاثنين|الثلاثاء|الأربعاء|الخميس|الجمعة|السبت)/i
};
var parseDayPatterns = {
narrow: [/^ح/i, /^ن/i, /^ث/i, /^ر/i, /^خ/i, /^ج/i, /^س/i],
wide: [
/^الأحد/i,
/^الاثنين/i,
/^الثلاثاء/i,
/^الأربعاء/i,
/^الخميس/i,
/^الجمعة/i,
/^السبت/i],
any: [/^أح/i, /^اث/i, /^ث/i, /^أر/i, /^خ/i, /^ج/i, /^س/i]
};
var matchDayPeriodPatterns = {
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
};
var parseDayPeriodPatterns = {
any: {
am: /^a/i,
pm: /^p/i,
midnight: /^mi/i,
noon: /^no/i,
morning: /morning/i,
afternoon: /afternoon/i,
evening: /evening/i,
night: /night/i
}
};
var match = {
ordinalNumber: buildMatchPatternFn({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: function valueCallback(value) {return parseInt(value, 10);}
}),
era: buildMatchFn({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any"
}),
quarter: buildMatchFn({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: function valueCallback(index) {return index + 1;}
}),
month: buildMatchFn({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any"
}),
day: buildMatchFn({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any"
}),
dayPeriod: buildMatchFn({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any"
})
};
// lib/locale/ar-SA.mjs
var arSA = {
code: "ar-SA",
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
options: {
weekStartsOn: 0,
firstWeekContainsDate: 1
}
};
// lib/locale/ar-SA/cdn.js
window.dateFns = _objectSpread(_objectSpread({},
window.dateFns), {}, {
locale: _objectSpread(_objectSpread({}, (_window$dateFns =
window.dateFns) === null || _window$dateFns === void 0 ? void 0 : _window$dateFns.locale), {}, {
arSA: arSA }) });
//# debugId=0544FE8CA470F8BC64756e2164756e21
})();
//# sourceMappingURL=cdn.js.map

View File

@@ -0,0 +1,20 @@
/*
* 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.
*/
export { detectResources } from './detect-resources';
export { envDetector, hostDetector, osDetector, processDetector, serviceInstanceIdDetector, } from './detectors';
export { resourceFromAttributes, defaultResource, emptyResource, } from './ResourceImpl';
export { defaultServiceName } from './default-service-name';
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,9 @@
import type { Field } from 'payload';
export declare const hasLocalesTable: ({ fields, parentIsLocalized, }: {
fields: Field[];
/**
* @todo make required in v4.0. Usually you'd wanna pass this in
*/
parentIsLocalized?: boolean;
}) => boolean;
//# sourceMappingURL=hasLocalesTable.d.ts.map

View File

@@ -0,0 +1,69 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var json_exports = {};
__export(json_exports, {
PgJson: () => PgJson,
PgJsonBuilder: () => PgJsonBuilder,
json: () => json
});
module.exports = __toCommonJS(json_exports);
var import_entity = require("../../entity.cjs");
var import_common = require("./common.cjs");
class PgJsonBuilder extends import_common.PgColumnBuilder {
static [import_entity.entityKind] = "PgJsonBuilder";
constructor(name) {
super(name, "json", "PgJson");
}
/** @internal */
build(table) {
return new PgJson(table, this.config);
}
}
class PgJson extends import_common.PgColumn {
static [import_entity.entityKind] = "PgJson";
constructor(table, config) {
super(table, config);
}
getSQLType() {
return "json";
}
mapToDriverValue(value) {
return JSON.stringify(value);
}
mapFromDriverValue(value) {
if (typeof value === "string") {
try {
return JSON.parse(value);
} catch {
return value;
}
}
return value;
}
}
function json(name) {
return new PgJsonBuilder(name ?? "");
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
PgJson,
PgJsonBuilder,
json
});
//# sourceMappingURL=json.cjs.map

View File

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

View File

@@ -0,0 +1,30 @@
const TYPE_POUND = 0;
const TYPE_SELECT = 1;
const TYPE_PLURAL = 2;
const TYPE_SELECTORDINAL = 3;
const TYPE_NUMBER = 4;
const TYPE_DATE = 5;
const TYPE_TIME = 6;
// Plain text literal
// Simple argument reference: ["name"]
// Pound sign (#) - represents the number in plural contexts
// Select: ["name", TYPE_SELECT, {options}]
// Plural: ["name", TYPE_PLURAL, {options}]
// Select ordinal: ["name", TYPE_SELECTORDINAL, {options}]
// Number format: ["name", TYPE_NUMBER, style?]
// Date format: ["name", TYPE_DATE, style?]
// Time format: ["name", TYPE_TIME, style?]
// Tags have no type constant - detected at runtime by
// format: ["tagName", child1, child2, ...]
export { TYPE_POUND as T, TYPE_NUMBER as a, TYPE_DATE as b, TYPE_TIME as c, TYPE_SELECT as d, TYPE_SELECTORDINAL as e, TYPE_PLURAL as f };

View File

@@ -0,0 +1 @@
export default function offsetParent(node: HTMLElement): HTMLElement;

View File

@@ -0,0 +1,72 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const instrumentationDataloader = require('@opentelemetry/instrumentation-dataloader');
const core = require('@sentry/core');
const nodeCore = require('@sentry/node-core');
const INTEGRATION_NAME = 'Dataloader';
const instrumentDataloader = nodeCore.generateInstrumentOnce(
INTEGRATION_NAME,
() =>
new instrumentationDataloader.DataloaderInstrumentation({
requireParentSpan: true,
}),
);
const _dataloaderIntegration = (() => {
let instrumentationWrappedCallback;
return {
name: INTEGRATION_NAME,
setupOnce() {
const instrumentation = instrumentDataloader();
instrumentationWrappedCallback = nodeCore.instrumentWhenWrapped(instrumentation);
},
setup(client) {
// This is called either immediately or when the instrumentation is wrapped
instrumentationWrappedCallback?.(() => {
client.on('spanStart', span => {
const spanJSON = core.spanToJSON(span);
if (spanJSON.description?.startsWith('dataloader')) {
span.setAttribute(core.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, 'auto.db.otel.dataloader');
}
// These are all possible dataloader span descriptions
// Still checking for the future versions
// in case they add support for `clear` and `prime`
if (
spanJSON.description === 'dataloader.load' ||
spanJSON.description === 'dataloader.loadMany' ||
spanJSON.description === 'dataloader.batch'
) {
span.setAttribute(core.SEMANTIC_ATTRIBUTE_SENTRY_OP, 'cache.get');
// TODO: We can try adding `key` to the `data` attribute upstream.
// Or alternatively, we can add `requestHook` to the dataloader instrumentation.
}
});
});
},
};
}) ;
/**
* Adds Sentry tracing instrumentation for the [dataloader](https://www.npmjs.com/package/dataloader) library.
*
* For more information, see the [`dataloaderIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/dataloader/).
*
* @example
* ```javascript
* const Sentry = require('@sentry/node');
*
* Sentry.init({
* integrations: [Sentry.dataloaderIntegration()],
* });
* ```
*/
const dataloaderIntegration = core.defineIntegration(_dataloaderIntegration);
exports.dataloaderIntegration = dataloaderIntegration;
exports.instrumentDataloader = instrumentDataloader;
//# sourceMappingURL=dataloader.js.map

View File

@@ -0,0 +1,42 @@
{
"name": "pg-types",
"version": "2.2.0",
"description": "Query result type converters for node-postgres",
"main": "index.js",
"scripts": {
"test": "tape test/*.js | tap-spec && npm run test-ts",
"test-ts": "if-node-version '>= 8' tsd"
},
"repository": {
"type": "git",
"url": "git://github.com/brianc/node-pg-types.git"
},
"keywords": [
"postgres",
"PostgreSQL",
"pg"
],
"author": "Brian M. Carlson",
"license": "MIT",
"bugs": {
"url": "https://github.com/brianc/node-pg-types/issues"
},
"homepage": "https://github.com/brianc/node-pg-types",
"devDependencies": {
"if-node-version": "^1.1.1",
"pff": "^1.0.0",
"tap-spec": "^4.0.0",
"tape": "^4.0.0",
"tsd": "^0.7.4"
},
"dependencies": {
"pg-int8": "1.0.1",
"postgres-array": "~2.0.0",
"postgres-bytea": "~1.0.0",
"postgres-date": "~1.0.4",
"postgres-interval": "^1.1.0"
},
"engines": {
"node": ">=4"
}
}

View File

@@ -0,0 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _classPrivateMethodGet;
var _assertClassBrand = require("assertClassBrand");
function _classPrivateMethodGet(receiver, privateSet, fn) {
_assertClassBrand(privateSet, receiver);
return fn;
}
//# sourceMappingURL=classPrivateMethodGet.js.map

View File

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

View File

@@ -0,0 +1,166 @@
import { createClientFields } from 'payload';
import { fieldAffectsData, getFieldPaths, tabHasName } from 'payload/shared';
export const traverseFields = ({
clientSchemaMap,
config,
fields,
i18n,
parentIndexPath,
parentSchemaPath,
payload,
schemaMap
}) => {
for (const [index, field] of fields.entries()) {
const {
indexPath,
schemaPath
} = getFieldPaths({
field,
index,
parentIndexPath,
parentSchemaPath
});
clientSchemaMap.set(schemaPath, field);
switch (field.type) {
case 'array':
{
traverseFields({
clientSchemaMap,
config,
fields: field.fields,
i18n,
parentIndexPath: '',
parentSchemaPath: schemaPath,
payload,
schemaMap
});
break;
}
case 'blocks':
;
(field.blockReferences ?? field.blocks).map(_block => {
const block = typeof _block === 'string' ? config.blocksMap ? config.blocksMap[_block] : config.blocks.find(block => typeof block !== 'string' && block.slug === _block) : _block;
const blockSchemaPath = `${schemaPath}.${block.slug}`;
clientSchemaMap.set(blockSchemaPath, block);
traverseFields({
clientSchemaMap,
config,
fields: block.fields,
i18n,
parentIndexPath: '',
parentSchemaPath: schemaPath + '.' + block.slug,
payload,
schemaMap
});
});
break;
case 'collapsible':
case 'row':
{
traverseFields({
clientSchemaMap,
config,
fields: field.fields,
i18n,
parentIndexPath: indexPath,
parentSchemaPath: schemaPath,
payload,
schemaMap
});
break;
}
case 'group':
{
if (fieldAffectsData(field)) {
traverseFields({
clientSchemaMap,
config,
fields: field.fields,
i18n,
parentIndexPath: '',
parentSchemaPath: schemaPath,
payload,
schemaMap
});
} else {
traverseFields({
clientSchemaMap,
config,
fields: field.fields,
i18n,
parentIndexPath: indexPath,
parentSchemaPath: schemaPath,
payload,
schemaMap
});
}
break;
}
case 'richText':
{
// richText sub-fields are not part of the ClientConfig or the Config.
// They only exist in the field schema map.
// Thus, we need to
// 1. get them from the field schema map
// 2. convert them to client fields
// 3. add them to the client schema map
// So these would basically be all fields that are not part of the client config already
const richTextFieldSchemaMap = new Map();
for (const [path, subField] of schemaMap.entries()) {
if (path.startsWith(`${schemaPath}.`)) {
richTextFieldSchemaMap.set(path, subField);
}
}
// Now loop through them, convert each entry to a client field and add it to the client schema map
for (const [path, subField] of richTextFieldSchemaMap.entries()) {
// check if fields is the only key in the subField object
const isFieldsOnly = Object.keys(subField).length === 1 && 'fields' in subField;
const clientFields = createClientFields({
defaultIDType: payload.config.db.defaultIDType,
disableAddingID: true,
fields: isFieldsOnly ? subField.fields : [subField],
i18n,
importMap: payload.importMap
});
clientSchemaMap.set(path, isFieldsOnly ? {
fields: clientFields
} : clientFields[0]);
}
break;
}
case 'tab':
{
const isNamedTab = tabHasName(field);
traverseFields({
clientSchemaMap,
config,
fields: field.fields,
i18n,
parentIndexPath: isNamedTab ? '' : indexPath,
parentSchemaPath: schemaPath,
payload,
schemaMap
});
break;
}
case 'tabs':
{
traverseFields({
clientSchemaMap,
config,
fields: field.tabs.map(tab => ({
...tab,
type: 'tab'
})),
i18n,
parentIndexPath: indexPath,
parentSchemaPath: schemaPath,
payload,
schemaMap
});
break;
}
}
}
};
//# sourceMappingURL=traverseFields.js.map

View File

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

View File

@@ -0,0 +1,24 @@
import { DirectusShare } from "../../../schema/share.js";
import { ApplyQueryFields } from "../../../types/output.js";
import { Query } from "../../../types/query.js";
import { RestCommand } from "../../types.js";
//#region src/rest/commands/read/shares.d.ts
type ReadShareOutput<Schema, TQuery extends Query<Schema, Item>, Item extends object = DirectusShare<Schema>> = ApplyQueryFields<Schema, Item, TQuery['fields']>;
/**
* List all Shares that exist in Directus.
* @param query The query parameters
* @returns An array of up to limit Share objects. If no items are available, data will be an empty array.
*/
declare const readShares: <Schema, const TQuery extends Query<Schema, DirectusShare<Schema>>>(query?: TQuery) => RestCommand<ReadShareOutput<Schema, TQuery>[], Schema>;
/**
* List an existing Share by primary key.
* @param key The primary key of the dashboard
* @param query The query parameters
* @returns Returns a Share object if a valid primary key was provided.
* @throws Will throw if key is empty
*/
declare const readShare: <Schema, TQuery extends Query<Schema, DirectusShare<Schema>>>(key: DirectusShare<Schema>["id"], query?: TQuery) => RestCommand<ReadShareOutput<Schema, TQuery>, Schema>;
//#endregion
export { ReadShareOutput, readShare, readShares };
//# sourceMappingURL=shares.d.ts.map

View File

@@ -0,0 +1,97 @@
import { devAssert } from '../jsutils/devAssert.mjs';
import { Kind } from '../language/kinds.mjs';
import { parse } from '../language/parser.mjs';
import { specifiedDirectives } from '../type/directives.mjs';
import { GraphQLSchema } from '../type/schema.mjs';
import { assertValidSDL } from '../validation/validate.mjs';
import { extendSchemaImpl } from './extendSchema.mjs';
/**
* This takes the ast of a schema document produced by the parse function in
* src/language/parser.js.
*
* If no schema definition is provided, then it will look for types named Query,
* Mutation and Subscription.
*
* Given that AST it constructs a GraphQLSchema. The resulting schema
* has no resolve methods, so execution will use default resolvers.
*/
export function buildASTSchema(documentAST, options) {
(documentAST != null && documentAST.kind === Kind.DOCUMENT) ||
devAssert(false, 'Must provide valid Document AST.');
if (
(options === null || options === void 0 ? void 0 : options.assumeValid) !==
true &&
(options === null || options === void 0
? void 0
: options.assumeValidSDL) !== true
) {
assertValidSDL(documentAST);
}
const emptySchemaConfig = {
description: undefined,
types: [],
directives: [],
extensions: Object.create(null),
extensionASTNodes: [],
assumeValid: false,
};
const config = extendSchemaImpl(emptySchemaConfig, documentAST, options);
if (config.astNode == null) {
for (const type of config.types) {
switch (type.name) {
// Note: While this could make early assertions to get the correctly
// typed values below, that would throw immediately while type system
// validation with validateSchema() will produce more actionable results.
case 'Query':
// @ts-expect-error validated in `validateSchema`
config.query = type;
break;
case 'Mutation':
// @ts-expect-error validated in `validateSchema`
config.mutation = type;
break;
case 'Subscription':
// @ts-expect-error validated in `validateSchema`
config.subscription = type;
break;
}
}
}
const directives = [
...config.directives, // If specified directives were not explicitly declared, add them.
...specifiedDirectives.filter((stdDirective) =>
config.directives.every(
(directive) => directive.name !== stdDirective.name,
),
),
];
return new GraphQLSchema({ ...config, directives });
}
/**
* A helper function to build a GraphQLSchema directly from a source
* document.
*/
export function buildSchema(source, options) {
const document = parse(source, {
noLocation:
options === null || options === void 0 ? void 0 : options.noLocation,
allowLegacyFragmentVariables:
options === null || options === void 0
? void 0
: options.allowLegacyFragmentVariables,
});
return buildASTSchema(document, {
assumeValidSDL:
options === null || options === void 0 ? void 0 : options.assumeValidSDL,
assumeValid:
options === null || options === void 0 ? void 0 : options.assumeValid,
});
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"dashboards.cjs","names":[],"sources":["../../../../src/rest/commands/delete/dashboards.ts"],"sourcesContent":["import type { DirectusDashboard } from '../../../schema/dashboard.js';\nimport type { RestCommand } from '../../types.js';\nimport { throwIfEmpty } from '../../utils/index.js';\n\n/**\n * Delete multiple existing dashboards.\n * @param keysOrQuery\n * @returns\n * @throws Will throw if keys is empty\n */\nexport const deleteDashboards =\n\t<Schema>(keys: DirectusDashboard<Schema>['id'][]): RestCommand<void, Schema> =>\n\t() => {\n\t\tthrowIfEmpty(keys, 'Keys cannot be empty');\n\n\t\treturn {\n\t\t\tpath: `/dashboards`,\n\t\t\tbody: JSON.stringify(keys),\n\t\t\tmethod: 'DELETE',\n\t\t};\n\t};\n\n/**\n * Delete an existing dashboard.\n * @param key\n * @returns\n * @throws Will throw if key is empty\n */\nexport const deleteDashboard =\n\t<Schema>(key: DirectusDashboard<Schema>['id']): RestCommand<void, Schema> =>\n\t() => {\n\t\tthrowIfEmpty(key, 'Key cannot be empty');\n\n\t\treturn {\n\t\t\tpath: `/dashboards/${key}`,\n\t\t\tmethod: 'DELETE',\n\t\t};\n\t};\n"],"mappings":"kDAUa,EACH,QAER,EAAA,aAAa,EAAM,uBAAuB,CAEnC,CACN,KAAM,cACN,KAAM,KAAK,UAAU,EAAK,CAC1B,OAAQ,SACR,EASU,EACH,QAER,EAAA,aAAa,EAAK,sBAAsB,CAEjC,CACN,KAAM,eAAe,IACrB,OAAQ,SACR"}

View File

@@ -0,0 +1,221 @@
import type { Field, Job, MaybePromise, PayloadRequest, StringKeyOf, TypedJobs } from '../../../index.js';
import type { ScheduleConfig } from './index.js';
import type { ConcurrencyConfig, SingleTaskStatus } from './workflowTypes.js';
export type TaskInputOutput = {
input: object;
output: object;
};
export type TaskHandlerResult<TTaskSlugOrInputOutput extends keyof TypedJobs['tasks'] | TaskInputOutput> = {
/**
* @deprecated Returning `state: 'failed'` is deprecated. Throw an error instead.
*/
errorMessage?: string;
/**
* @deprecated Returning `state: 'failed'` is deprecated. Throw an error instead.
*/
state: 'failed';
} | {
output: TTaskSlugOrInputOutput extends keyof TypedJobs['tasks'] ? TypedJobs['tasks'][TTaskSlugOrInputOutput]['output'] : TTaskSlugOrInputOutput extends TaskInputOutput ? TTaskSlugOrInputOutput['output'] : never;
state?: 'succeeded';
};
export type TaskHandlerArgs<TTaskSlugOrInputOutput extends keyof TypedJobs['tasks'] | TaskInputOutput, TWorkflowSlug extends keyof TypedJobs['workflows'] = string> = {
/**
* Use this function to run a sub-task from within another task.
*/
inlineTask: RunInlineTaskFunction;
input: TTaskSlugOrInputOutput extends keyof TypedJobs['tasks'] ? TypedJobs['tasks'][TTaskSlugOrInputOutput]['input'] : TTaskSlugOrInputOutput extends TaskInputOutput ? TTaskSlugOrInputOutput['input'] : never;
job: Job<TWorkflowSlug>;
req: PayloadRequest;
tasks: RunTaskFunctions;
};
/**
* Inline tasks in JSON workflows have no input, as they can just get the input from job.taskStatus
*/
export type TaskHandlerArgsNoInput<TWorkflowInput extends false | object = false> = {
job: Job<TWorkflowInput>;
req: PayloadRequest;
};
export type TaskHandler<TTaskSlugOrInputOutput extends keyof TypedJobs['tasks'] | TaskInputOutput, TWorkflowSlug extends keyof TypedJobs['workflows'] = string> = (args: TaskHandlerArgs<TTaskSlugOrInputOutput, TWorkflowSlug>) => MaybePromise<TaskHandlerResult<TTaskSlugOrInputOutput>>;
/**
* @todo rename to TaskSlug in 4.0, similar to CollectionSlug
*/
export type TaskType = StringKeyOf<TypedJobs['tasks']>;
export type TaskInput<T extends keyof TypedJobs['tasks']> = TypedJobs['tasks'][T]['input'];
export type TaskOutput<T extends keyof TypedJobs['tasks']> = TypedJobs['tasks'][T]['output'];
export type TaskHandlerResults = {
[TTaskSlug in keyof TypedJobs['tasks']]: {
[id: string]: TaskHandlerResult<TTaskSlug>;
};
};
export type RunTaskFunctionArgs<TTaskSlug extends keyof TypedJobs['tasks']> = {
input?: TaskInput<TTaskSlug>;
/**
* Specify the number of times that this task should be retried if it fails for any reason.
* If this is undefined, the task will either inherit the retries from the workflow or have no retries.
* If this is 0, the task will not be retried.
*
* @default By default, tasks are not retried and `retries` is `undefined`.
*/
retries?: number | RetryConfig | undefined;
};
export type RunTaskFunction<TTaskSlug extends keyof TypedJobs['tasks']> = (taskID: string, taskArgs?: RunTaskFunctionArgs<TTaskSlug>) => Promise<TaskOutput<TTaskSlug>>;
export type RunTaskFunctions = {
[TTaskSlug in keyof TypedJobs['tasks']]: RunTaskFunction<TTaskSlug>;
};
export type RunInlineTaskFunction = <TTaskInput extends object, TTaskOutput extends object>(taskID: string, taskArgs: {
input?: TTaskInput;
/**
* Specify the number of times that this task should be retried if it fails for any reason.
* If this is undefined, the task will either inherit the retries from the workflow or have no retries.
* If this is 0, the task will not be retried.
*
* @default By default, tasks are not retried and `retries` is `undefined`.
*/
retries?: number | RetryConfig | undefined;
task: (args: {
inlineTask: RunInlineTaskFunction;
input: TTaskInput;
job: Job<any>;
req: PayloadRequest;
tasks: RunTaskFunctions;
}) => MaybePromise<{
/**
* @deprecated Returning `state: 'failed'` is deprecated. Throw an error instead.
*/
errorMessage?: string;
/**
* @deprecated Returning `state: 'failed'` is deprecated. Throw an error instead.
*/
state: 'failed';
} | {
output: TTaskOutput;
state?: 'succeeded';
}>;
}) => Promise<TTaskOutput>;
export type TaskCallbackArgs = {
/**
* Input data passed to the task
*/
input?: object;
job: Job;
req: PayloadRequest;
taskStatus: null | SingleTaskStatus<string>;
};
export type ShouldRestoreFn = (args: {
taskStatus: SingleTaskStatus<string>;
} & Omit<TaskCallbackArgs, 'taskStatus'>) => MaybePromise<boolean>;
export type TaskCallbackFn = (args: TaskCallbackArgs) => MaybePromise<void>;
export type RetryConfig = {
/**
* This controls how many times the task should be retried if it fails.
*
* @default undefined - attempts are either inherited from the workflow retry config or set to 0.
*/
attempts?: number;
/**
* The backoff strategy to use when retrying the task. This determines how long to wait before retrying the task.
*
* If this is set on a single task, the longest backoff time of a task will determine the time until the entire workflow is retried.
*/
backoff?: {
/**
* Base delay between running jobs in ms
*/
delay?: number;
/**
* @default fixed
*
* The backoff strategy to use when retrying the task. This determines how long to wait before retrying the task.
* If fixed (default) is used, the delay will be the same between each retry.
*
* If exponential is used, the delay will increase exponentially with each retry.
*
* @example
* delay = 1000
* attempts = 3
* type = 'fixed'
*
* The task will be retried 3 times with a delay of 1000ms between each retry.
*
* @example
* delay = 1000
* attempts = 3
* type = 'exponential'
*
* The task will be retried 3 times with a delay of 1000ms, 2000ms, and 4000ms between each retry.
*/
type: 'exponential' | 'fixed';
};
/**
* This controls whether the task output should be restored if the task previously succeeded and the workflow is being retried.
*
* If this is set to false, the task will be re-run even if it previously succeeded, ignoring the maximum number of retries.
*
* If this is set to true, the task will only be re-run if it previously failed.
*
* If this is a function, the return value of the function will determine whether the task should be re-run. This can be used for more complex restore logic,
* e.g you may want to re-run a task up until a certain point and then restore it, or only re-run a task if the input has changed.
*
* @default true - the task output will be restored if the task previously succeeded.
*/
shouldRestore?: boolean | ShouldRestoreFn;
};
export type TaskConfig<TTaskSlugOrInputOutput extends keyof TypedJobs['tasks'] | TaskInputOutput = TaskType> = {
/**
* Job concurrency controls for preventing race conditions.
*
* Can be an object with full options, or a shorthand function that just returns the key
* (in which case exclusive defaults to true).
*/
concurrency?: ConcurrencyConfig<TTaskSlugOrInputOutput extends keyof TypedJobs['tasks'] ? TypedJobs['tasks'][TTaskSlugOrInputOutput]['input'] : TTaskSlugOrInputOutput extends TaskInputOutput ? TTaskSlugOrInputOutput['input'] : object>;
/**
* The function that should be responsible for running the job.
* You can either pass a string-based path to the job function file, or the job function itself.
*
* If you are using large dependencies within your job, you might prefer to pass the string path
* because that will avoid bundling large dependencies in your Next.js app. Passing a string path is an advanced feature
* that may require a sophisticated build pipeline in order to work.
*/
handler: string | TaskHandler<TTaskSlugOrInputOutput>;
/**
* Define the input field schema - payload will generate a type for this schema.
*/
inputSchema?: Field[];
/**
* You can use interfaceName to change the name of the interface that is generated for this task. By default, this is "Task" + the capitalized task slug.
*/
interfaceName?: string;
/**
* Define a human-friendly label for this task.
*/
label?: string;
/**
* Function to be executed if the task fails.
*/
onFail?: TaskCallbackFn;
/**
* Function to be executed if the task succeeds.
*/
onSuccess?: TaskCallbackFn;
/**
* Define the output field schema - payload will generate a type for this schema.
*/
outputSchema?: Field[];
/**
* Specify the number of times that this step should be retried if it fails.
* If this is undefined, the task will either inherit the retries from the workflow or have no retries.
* If this is 0, the task will not be retried.
*
* @default By default, tasks are not retried and `retries` is `undefined`.
*/
retries?: number | RetryConfig | undefined;
/**
* Allows automatically scheduling this task to run regularly at a specified interval.
*/
schedule?: ScheduleConfig[];
/**
* Define a slug-based name for this job. This slug needs to be unique among both tasks and workflows.
*/
slug: TTaskSlugOrInputOutput extends keyof TypedJobs['tasks'] ? TTaskSlugOrInputOutput : string;
};
//# sourceMappingURL=taskTypes.d.ts.map

View File

@@ -0,0 +1,43 @@
import type { ColumnBuilderBaseConfig, HasDefault, NotNull } from "../../column-builder.cjs";
import type { ColumnBaseConfig } from "../../column.cjs";
import { entityKind } from "../../entity.cjs";
import { PgColumn, PgColumnBuilder } from "./common.cjs";
export type PgBigSerial53BuilderInitial<TName extends string> = NotNull<HasDefault<PgBigSerial53Builder<{
name: TName;
dataType: 'number';
columnType: 'PgBigSerial53';
data: number;
driverParam: number;
enumValues: undefined;
}>>>;
export declare class PgBigSerial53Builder<T extends ColumnBuilderBaseConfig<'number', 'PgBigSerial53'>> extends PgColumnBuilder<T> {
static readonly [entityKind]: string;
constructor(name: string);
}
export declare class PgBigSerial53<T extends ColumnBaseConfig<'number', 'PgBigSerial53'>> extends PgColumn<T> {
static readonly [entityKind]: string;
getSQLType(): string;
mapFromDriverValue(value: number): number;
}
export type PgBigSerial64BuilderInitial<TName extends string> = NotNull<HasDefault<PgBigSerial64Builder<{
name: TName;
dataType: 'bigint';
columnType: 'PgBigSerial64';
data: bigint;
driverParam: string;
enumValues: undefined;
}>>>;
export declare class PgBigSerial64Builder<T extends ColumnBuilderBaseConfig<'bigint', 'PgBigSerial64'>> extends PgColumnBuilder<T> {
static readonly [entityKind]: string;
constructor(name: string);
}
export declare class PgBigSerial64<T extends ColumnBaseConfig<'bigint', 'PgBigSerial64'>> extends PgColumn<T> {
static readonly [entityKind]: string;
getSQLType(): string;
mapFromDriverValue(value: string): bigint;
}
export interface PgBigSerialConfig<T extends 'number' | 'bigint' = 'number' | 'bigint'> {
mode: T;
}
export declare function bigserial<TMode extends PgBigSerialConfig['mode']>(config: PgBigSerialConfig<TMode>): TMode extends 'number' ? PgBigSerial53BuilderInitial<''> : PgBigSerial64BuilderInitial<''>;
export declare function bigserial<TName extends string, TMode extends PgBigSerialConfig['mode']>(name: TName, config: PgBigSerialConfig<TMode>): TMode extends 'number' ? PgBigSerial53BuilderInitial<TName> : PgBigSerial64BuilderInitial<TName>;

View File

@@ -0,0 +1,16 @@
import type { ASTVisitor } from '../../language/visitor';
import type {
SDLValidationContext,
ValidationContext,
} from '../ValidationContext';
/**
* Known directives
*
* A GraphQL document is only valid if all `@directives` are known by the
* schema and legally positioned.
*
* See https://spec.graphql.org/draft/#sec-Directives-Are-Defined
*/
export declare function KnownDirectivesRule(
context: ValidationContext | SDLValidationContext,
): ASTVisitor;

View File

@@ -0,0 +1,3 @@
export type Prettify<Type> = Type extends Function ? Type : {
[Key in keyof Type]: Type[Key];
} & {};

View File

@@ -0,0 +1,125 @@
'use strict'
var extend = require('xtend/mutable')
module.exports = PostgresInterval
function PostgresInterval (raw) {
if (!(this instanceof PostgresInterval)) {
return new PostgresInterval(raw)
}
extend(this, parse(raw))
}
var properties = ['seconds', 'minutes', 'hours', 'days', 'months', 'years']
PostgresInterval.prototype.toPostgres = function () {
var filtered = properties.filter(this.hasOwnProperty, this)
// In addition to `properties`, we need to account for fractions of seconds.
if (this.milliseconds && filtered.indexOf('seconds') < 0) {
filtered.push('seconds')
}
if (filtered.length === 0) return '0'
return filtered
.map(function (property) {
var value = this[property] || 0
// Account for fractional part of seconds,
// remove trailing zeroes.
if (property === 'seconds' && this.milliseconds) {
value = (value + this.milliseconds / 1000).toFixed(6).replace(/\.?0+$/, '')
}
return value + ' ' + property
}, this)
.join(' ')
}
var propertiesISOEquivalent = {
years: 'Y',
months: 'M',
days: 'D',
hours: 'H',
minutes: 'M',
seconds: 'S'
}
var dateProperties = ['years', 'months', 'days']
var timeProperties = ['hours', 'minutes', 'seconds']
// according to ISO 8601
PostgresInterval.prototype.toISOString = PostgresInterval.prototype.toISO = function () {
var datePart = dateProperties
.map(buildProperty, this)
.join('')
var timePart = timeProperties
.map(buildProperty, this)
.join('')
return 'P' + datePart + 'T' + timePart
function buildProperty (property) {
var value = this[property] || 0
// Account for fractional part of seconds,
// remove trailing zeroes.
if (property === 'seconds' && this.milliseconds) {
value = (value + this.milliseconds / 1000).toFixed(6).replace(/0+$/, '')
}
return value + propertiesISOEquivalent[property]
}
}
var NUMBER = '([+-]?\\d+)'
var YEAR = NUMBER + '\\s+years?'
var MONTH = NUMBER + '\\s+mons?'
var DAY = NUMBER + '\\s+days?'
var TIME = '([+-])?([\\d]*):(\\d\\d):(\\d\\d)\\.?(\\d{1,6})?'
var INTERVAL = new RegExp([YEAR, MONTH, DAY, TIME].map(function (regexString) {
return '(' + regexString + ')?'
})
.join('\\s*'))
// Positions of values in regex match
var positions = {
years: 2,
months: 4,
days: 6,
hours: 9,
minutes: 10,
seconds: 11,
milliseconds: 12
}
// We can use negative time
var negatives = ['hours', 'minutes', 'seconds', 'milliseconds']
function parseMilliseconds (fraction) {
// add omitted zeroes
var microseconds = fraction + '000000'.slice(fraction.length)
return parseInt(microseconds, 10) / 1000
}
function parse (interval) {
if (!interval) return {}
var matches = INTERVAL.exec(interval)
var isNegative = matches[8] === '-'
return Object.keys(positions)
.reduce(function (parsed, property) {
var position = positions[property]
var value = matches[position]
// no empty string
if (!value) return parsed
// milliseconds are actually microseconds (up to 6 digits)
// with omitted trailing zeroes.
value = property === 'milliseconds'
? parseMilliseconds(value)
: parseInt(value, 10)
// no zeros
if (!value) return parsed
if (isNegative && ~negatives.indexOf(property)) {
value *= -1
}
parsed[property] = value
return parsed
}, {})
}

View File

@@ -0,0 +1,25 @@
import { entityKind } from "../entity.js";
import type { GelColumn } from "./columns/index.js";
import type { GelTable } from "./table.js";
export declare function unique(name?: string): UniqueOnConstraintBuilder;
export declare function uniqueKeyName(table: GelTable, columns: string[]): string;
export declare class UniqueConstraintBuilder {
private name?;
static readonly [entityKind]: string;
constructor(columns: GelColumn[], name?: string | undefined);
nullsNotDistinct(): this;
}
export declare class UniqueOnConstraintBuilder {
static readonly [entityKind]: string;
constructor(name?: string);
on(...columns: [GelColumn, ...GelColumn[]]): UniqueConstraintBuilder;
}
export declare class UniqueConstraint {
readonly table: GelTable;
static readonly [entityKind]: string;
readonly columns: GelColumn[];
readonly name?: string;
readonly nullsNotDistinct: boolean;
constructor(table: GelTable, columns: GelColumn[], nullsNotDistinct: boolean, name?: string);
getName(): string | undefined;
}

View File

@@ -0,0 +1,25 @@
var baseIteratee = require('./_baseIteratee'),
isArrayLike = require('./isArrayLike'),
keys = require('./keys');
/**
* Creates a `_.find` or `_.findLast` function.
*
* @private
* @param {Function} findIndexFunc The function to find the collection index.
* @returns {Function} Returns the new find function.
*/
function createFind(findIndexFunc) {
return function(collection, predicate, fromIndex) {
var iterable = Object(collection);
if (!isArrayLike(collection)) {
var iteratee = baseIteratee(predicate, 3);
collection = keys(collection);
predicate = function(key) { return iteratee(iterable[key], key, iterable); };
}
var index = findIndexFunc(collection, predicate, fromIndex);
return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
};
}
module.exports = createFind;

View File

@@ -0,0 +1 @@
module.exports={C:{"5":0.01962,"78":0.00654,"111":0.00327,"115":0.01635,"125":0.01308,"128":0.00654,"131":0.04578,"140":0.06867,"142":0.00981,"144":0.00654,"145":0.15696,"146":0.40548,_:"2 3 4 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 112 113 114 116 117 118 119 120 121 122 123 124 126 127 129 130 132 133 134 135 136 137 138 139 141 143 147 148 149 3.5 3.6"},D:{"50":0.00981,"65":0.00654,"67":0.00327,"69":0.04578,"70":0.00327,"73":0.00327,"74":0.00327,"77":0.01962,"84":0.02616,"87":0.00327,"89":0.00981,"91":0.00981,"94":0.00327,"96":0.00654,"97":0.00654,"98":0.19947,"99":0.05559,"103":0.03924,"105":0.00327,"106":0.00327,"107":0.00327,"109":0.33027,"111":0.02943,"116":0.05232,"120":0.00654,"122":0.00327,"123":0.02289,"124":0.00981,"125":0.28449,"126":0.02616,"127":0.09483,"128":0.02616,"129":0.00654,"130":0.00327,"131":0.03597,"132":0.03924,"133":0.01962,"134":0.04905,"135":0.00981,"136":0.00327,"137":0.00654,"138":0.14061,"139":0.05559,"140":0.08829,"141":0.18639,"142":5.94159,"143":7.81203,"144":0.01308,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 51 52 53 54 55 56 57 58 59 60 61 62 63 64 66 68 71 72 75 76 78 79 80 81 83 85 86 88 90 92 93 95 100 101 102 104 108 110 112 113 114 115 117 118 119 121 145 146"},F:{"83":0.00654,"84":0.00327,"93":0.01635,"94":0.03597,"95":0.01308,"122":0.00327,"124":0.14388,"125":0.03597,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 85 86 87 88 89 90 91 92 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 123 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"12":0.00654,"18":0.01962,"91":0.00327,"92":0.01308,"97":0.00327,"98":0.01635,"99":0.00327,"109":0.00654,"112":0.00327,"122":0.00327,"133":0.00327,"138":0.00981,"139":0.00654,"140":0.01635,"141":0.01635,"142":0.62784,"143":1.33089,_:"13 14 15 16 17 79 80 81 83 84 85 86 87 88 89 90 93 94 95 96 100 101 102 103 104 105 106 107 108 110 111 113 114 115 116 117 118 119 120 121 123 124 125 126 127 128 129 130 131 132 134 135 136 137"},E:{_:"0 4 5 6 7 8 9 10 11 12 13 14 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 12.1 15.1 15.2-15.3 15.4 16.0 16.2 17.0 17.1 17.2 17.3 18.0 18.2 26.3","13.1":0.00654,"14.1":0.01635,"15.5":0.00981,"15.6":0.07848,"16.1":0.03597,"16.3":0.00654,"16.4":0.00654,"16.5":0.00981,"16.6":0.00981,"17.4":0.00327,"17.5":0.00654,"17.6":0.0327,"18.1":0.05559,"18.3":0.02943,"18.4":0.00327,"18.5-18.6":0.10791,"26.0":0.05232,"26.1":0.33027,"26.2":0.0981},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00142,"5.0-5.1":0,"6.0-6.1":0.00284,"7.0-7.1":0.00213,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.00568,"10.0-10.2":0.00071,"10.3":0.00994,"11.0-11.2":0.12212,"11.3-11.4":0.00355,"12.0-12.1":0.00284,"12.2-12.5":0.03195,"13.0-13.1":0.00071,"13.2":0.00497,"13.3":0.00142,"13.4-13.7":0.00497,"14.0-14.4":0.00994,"14.5-14.8":0.01065,"15.0-15.1":0.01136,"15.2-15.3":0.00852,"15.4":0.00923,"15.5":0.00994,"15.6-15.8":0.15407,"16.0":0.01775,"16.1":0.03408,"16.2":0.01775,"16.3":0.03195,"16.4":0.00781,"16.5":0.01349,"16.6-16.7":0.20022,"17.0":0.01136,"17.1":0.01846,"17.2":0.01349,"17.3":0.02059,"17.4":0.03479,"17.5":0.06816,"17.6-17.7":0.15762,"18.0":0.0355,"18.1":0.07384,"18.2":0.03905,"18.3":0.12709,"18.4":0.06532,"18.5-18.7":4.69036,"26.0":0.09159,"26.1":0.76185,"26.2":0.14484,"26.3":0.00639},P:{"4":0.03096,"23":0.01032,"24":0.01032,"25":0.02064,"26":0.01032,"27":0.03096,"28":0.14447,"29":0.51597,_:"20 21 22 5.0-5.4 6.2-6.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 16.0 17.0 19.0","7.2-7.4":0.14447,"18.0":0.01032},I:{"0":0.02016,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0.00002},A:{"11":0.05886,_:"6 7 8 9 10 5.5"},K:{"0":0.44418,_:"10 11 12 11.1 11.5 12.1"},N:{_:"10 11"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},Q:{_:"14.9"},O:{"0":0.30285},H:{"0":0},L:{"0":70.14943},R:{_:"0"},M:{"0":0.03365}};

View File

@@ -0,0 +1,89 @@
'use strict';
// This file is a proxy of the original file located at:
// https://github.com/nodejs/node/blob/main/lib/internal/validators.js
// Every addition or modification to this file must be evaluated
// during the PR review.
const {
ArrayIsArray,
ArrayPrototypeIncludes,
ArrayPrototypeJoin,
} = require('./primordials');
const {
codes: {
ERR_INVALID_ARG_TYPE
}
} = require('./errors');
function validateString(value, name) {
if (typeof value !== 'string') {
throw new ERR_INVALID_ARG_TYPE(name, 'String', value);
}
}
function validateUnion(value, name, union) {
if (!ArrayPrototypeIncludes(union, value)) {
throw new ERR_INVALID_ARG_TYPE(name, `('${ArrayPrototypeJoin(union, '|')}')`, value);
}
}
function validateBoolean(value, name) {
if (typeof value !== 'boolean') {
throw new ERR_INVALID_ARG_TYPE(name, 'Boolean', value);
}
}
function validateArray(value, name) {
if (!ArrayIsArray(value)) {
throw new ERR_INVALID_ARG_TYPE(name, 'Array', value);
}
}
function validateStringArray(value, name) {
validateArray(value, name);
for (let i = 0; i < value.length; i++) {
validateString(value[i], `${name}[${i}]`);
}
}
function validateBooleanArray(value, name) {
validateArray(value, name);
for (let i = 0; i < value.length; i++) {
validateBoolean(value[i], `${name}[${i}]`);
}
}
/**
* @param {unknown} value
* @param {string} name
* @param {{
* allowArray?: boolean,
* allowFunction?: boolean,
* nullable?: boolean
* }} [options]
*/
function validateObject(value, name, options) {
const useDefaultOptions = options == null;
const allowArray = useDefaultOptions ? false : options.allowArray;
const allowFunction = useDefaultOptions ? false : options.allowFunction;
const nullable = useDefaultOptions ? false : options.nullable;
if ((!nullable && value === null) ||
(!allowArray && ArrayIsArray(value)) ||
(typeof value !== 'object' && (
!allowFunction || typeof value !== 'function'
))) {
throw new ERR_INVALID_ARG_TYPE(name, 'Object', value);
}
}
module.exports = {
validateArray,
validateObject,
validateString,
validateStringArray,
validateUnion,
validateBoolean,
validateBooleanArray,
};

View File

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

View File

@@ -0,0 +1,155 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const { groupBy } = require("./util/ArrayHelpers");
const createSchemaValidation = require("./util/create-schema-validation");
/** @typedef {import("watchpack").TimeInfoEntries} TimeInfoEntries */
/** @typedef {import("../declarations/plugins/WatchIgnorePlugin").WatchIgnorePluginOptions} WatchIgnorePluginOptions */
/** @typedef {import("./Compiler")} Compiler */
/** @typedef {import("./util/fs").WatchFileSystem} WatchFileSystem */
/** @typedef {import("./util/fs").WatchMethod} WatchMethod */
/** @typedef {import("./util/fs").Watcher} Watcher */
const validate = createSchemaValidation(
require("../schemas/plugins/WatchIgnorePlugin.check"),
() => require("../schemas/plugins/WatchIgnorePlugin.json"),
{
name: "Watch Ignore Plugin",
baseDataPath: "options"
}
);
const IGNORE_TIME_ENTRY = "ignore";
class IgnoringWatchFileSystem {
/**
* @param {WatchFileSystem} wfs original file system
* @param {WatchIgnorePluginOptions["paths"]} paths ignored paths
*/
constructor(wfs, paths) {
this.wfs = wfs;
this.paths = paths;
}
/** @type {WatchMethod} */
watch(files, dirs, missing, startTime, options, callback, callbackUndelayed) {
files = [...files];
dirs = [...dirs];
/**
* @param {string} path path to check
* @returns {boolean} true, if path is ignored
*/
const ignored = (path) =>
this.paths.some((p) =>
p instanceof RegExp ? p.test(path) : path.indexOf(p) === 0
);
const [ignoredFiles, notIgnoredFiles] = groupBy(
/** @type {string[]} */
(files),
ignored
);
const [ignoredDirs, notIgnoredDirs] = groupBy(
/** @type {string[]} */
(dirs),
ignored
);
const watcher = this.wfs.watch(
notIgnoredFiles,
notIgnoredDirs,
missing,
startTime,
options,
(err, fileTimestamps, dirTimestamps, changedFiles, removedFiles) => {
if (err) return callback(err);
for (const path of ignoredFiles) {
/** @type {TimeInfoEntries} */
(fileTimestamps).set(path, IGNORE_TIME_ENTRY);
}
for (const path of ignoredDirs) {
/** @type {TimeInfoEntries} */
(dirTimestamps).set(path, IGNORE_TIME_ENTRY);
}
callback(
null,
fileTimestamps,
dirTimestamps,
changedFiles,
removedFiles
);
},
callbackUndelayed
);
return {
close: () => watcher.close(),
pause: () => watcher.pause(),
getContextTimeInfoEntries: () => {
const dirTimestamps = watcher.getContextTimeInfoEntries();
for (const path of ignoredDirs) {
dirTimestamps.set(path, IGNORE_TIME_ENTRY);
}
return dirTimestamps;
},
getFileTimeInfoEntries: () => {
const fileTimestamps = watcher.getFileTimeInfoEntries();
for (const path of ignoredFiles) {
fileTimestamps.set(path, IGNORE_TIME_ENTRY);
}
return fileTimestamps;
},
getInfo:
watcher.getInfo &&
(() => {
const info =
/** @type {NonNullable<Watcher["getInfo"]>} */
(watcher.getInfo)();
const { fileTimeInfoEntries, contextTimeInfoEntries } = info;
for (const path of ignoredFiles) {
fileTimeInfoEntries.set(path, IGNORE_TIME_ENTRY);
}
for (const path of ignoredDirs) {
contextTimeInfoEntries.set(path, IGNORE_TIME_ENTRY);
}
return info;
})
};
}
}
const PLUGIN_NAME = "WatchIgnorePlugin";
class WatchIgnorePlugin {
/**
* @param {WatchIgnorePluginOptions} options options
*/
constructor(options) {
validate(options);
this.paths = options.paths;
}
/**
* Apply the plugin
* @param {Compiler} compiler the compiler instance
* @returns {void}
*/
apply(compiler) {
compiler.hooks.afterEnvironment.tap(PLUGIN_NAME, () => {
compiler.watchFileSystem = new IgnoringWatchFileSystem(
/** @type {WatchFileSystem} */
(compiler.watchFileSystem),
this.paths
);
});
}
}
module.exports = WatchIgnorePlugin;

View File

@@ -0,0 +1 @@
{"version":3,"file":"activity.cjs","names":[],"sources":["../../../../src/rest/commands/read/activity.ts"],"sourcesContent":["import type { DirectusActivity } from '../../../schema/activity.js';\nimport type { ApplyQueryFields, Query } from '../../../types/index.js';\nimport type { RestCommand } from '../../types.js';\nimport { throwIfEmpty } from '../../utils/index.js';\n\nexport type ReadActivityOutput<\n\tSchema,\n\tTQuery extends Query<Schema, Item>,\n\tItem extends object = DirectusActivity<Schema>,\n> = ApplyQueryFields<Schema, Item, TQuery['fields']>;\n\n/**\n * Returns a list of activity actions.\n * @param query The query parameters\n * @returns An array of up to limit activity objects. If no items are available, data will be an empty array.\n */\nexport const readActivities =\n\t<Schema, const TQuery extends Query<Schema, DirectusActivity<Schema>>>(\n\t\tquery?: TQuery,\n\t): RestCommand<ReadActivityOutput<Schema, TQuery>[], Schema> =>\n\t() => ({\n\t\tpath: `/activity`,\n\t\tparams: query ?? {},\n\t\tmethod: 'GET',\n\t});\n\n/**\n * Returns a single activity action by primary key.\n * @param key The primary key of the activity\n * @param query The query parameters\n * @returns Returns an activity object if a valid identifier was provided.\n * @throws Will throw if key is empty\n */\nexport const readActivity =\n\t<Schema, const TQuery extends Query<Schema, DirectusActivity<Schema>>>(\n\t\tkey: DirectusActivity<Schema>['id'],\n\t\tquery?: TQuery,\n\t): RestCommand<ReadActivityOutput<Schema, TQuery>, Schema> =>\n\t() => {\n\t\tthrowIfEmpty(String(key), 'Key cannot be empty');\n\n\t\treturn {\n\t\t\tpath: `/activity/${key}`,\n\t\t\tparams: query ?? {},\n\t\t\tmethod: 'GET',\n\t\t};\n\t};\n"],"mappings":"kDAgBa,EAEX,QAEM,CACN,KAAM,YACN,OAAQ,GAAS,EAAE,CACnB,OAAQ,MACR,EASW,GAEX,EACA,SAGA,EAAA,aAAa,OAAO,EAAI,CAAE,sBAAsB,CAEzC,CACN,KAAM,aAAa,IACnB,OAAQ,GAAS,EAAE,CACnB,OAAQ,MACR"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","names":["React","TextareaCell","cellData","textToShow","length","substring","_jsx"],"sources":["../../../../../../src/elements/Table/DefaultCell/fields/Textarea/index.tsx"],"sourcesContent":["'use client'\nimport type { DefaultCellComponentProps, TextareaFieldClient } from 'payload'\n\nimport React from 'react'\n\nexport const TextareaCell: React.FC<DefaultCellComponentProps<TextareaFieldClient>> = ({\n cellData,\n}) => {\n const textToShow = cellData?.length > 100 ? `${cellData.substring(0, 100)}\\u2026` : cellData\n return <span>{textToShow}</span>\n}\n"],"mappings":"AAAA;;;AAGA,OAAOA,KAAA,MAAW;AAElB,OAAO,MAAMC,YAAA,GAAyEA,CAAC;EACrFC;AAAQ,CACT;EACC,MAAMC,UAAA,GAAaD,QAAA,EAAUE,MAAA,GAAS,MAAM,GAAGF,QAAA,CAASG,SAAS,CAAC,GAAG,YAAY,GAAGH,QAAA;EACpF,oBAAOI,IAAA,CAAC;cAAMH;;AAChB","ignoreList":[]}

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"1":"K D zC","129":"E F A B"},B:{"1":"0 1 2 3 4 5 6 7 8 C L M G N O P 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"},C:{"1":"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":"0 1 2 3 4 5 6 7 8 9 0C VC J bB K D E F A B C L M G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B WC 6B XC 7B 8B 9B AC BC CC DC 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 4C 5C"},D:{"1":"0 1 2 3 4 5 6 7 8 9 J bB K D E F A B C L M G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B WC 6B XC 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC 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"},E:{"1":"J bB K D E F A B C L M G 7C 8C 9C AD cC PC QC BD CD DD dC eC RC ED SC fC gC hC iC jC FD TC kC lC mC nC oC GD UC pC qC rC sC HD tC uC vC wC ID","2":"6C bC"},F:{"1":"0 1 2 3 4 5 6 7 8 9 G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 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":"F B C JD KD LD MD PC xC ND QC"},G:{"1":"E OD yC PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD eD fD gD hD dC eC RC iD SC fC gC hC iC jC jD TC kC lC mC nC oC kD UC pC qC rC sC lD tC uC vC wC","2":"bC"},H:{"2":"mD"},I:{"1":"VC J I nD oD pD qD yC rD sD"},J:{"1":"D A"},K:{"1":"H","2":"A B C PC xC QC"},L:{"1":"I"},M:{"1":"OC"},N:{"129":"A B"},O:{"1":"RC"},P:{"1":"9 J AB BB CB DB EB FB GB HB IB tD uD vD wD xD cC yD zD 0D 1D 2D SC TC UC 3D"},Q:{"1":"4D"},R:{"1":"5D"},S:{"2":"6D 7D"}},B:5,C:"CSS zoom",D:true};

View File

@@ -0,0 +1,49 @@
{
"name": "acorn-import-attributes",
"version": "1.9.5",
"description": "Support for import attributes in acorn",
"main": "lib/index.js",
"module": "src/index.js",
"exports": {
".": {
"import": "./lib/index.mjs",
"require": "./lib/index.js"
},
"./package.json": "./package.json",
"./": "./"
},
"scripts": {
"build": "babel ./src --out-dir ./lib && node post-build.js",
"prepublishOnly": "npm run build",
"test": "mocha ./test/index.js",
"test:test262": "node run_test262.js",
"watch": "babel ./src --out-dir ./lib --watch"
},
"author": "Sven Sauleau <sven@sauleau.com>",
"license": "MIT",
"devDependencies": {
"@babel/cli": "^7.14.8",
"@babel/core": "^7.15.0",
"@babel/preset-env": "^7.15.0",
"@babel/register": "^7.15.3",
"acorn": "^8.4.1",
"chai": "^4.3.4",
"mocha": "^9.1.0",
"test262": "https://github.com/tc39/test262#47ab262658cd97ae35c9a537808cac18fa4ab567",
"test262-parser-runner": "^0.5.0"
},
"peerDependencies": {
"acorn": "^8"
},
"repository": {
"type": "git",
"url": "https://github.com/xtuc/acorn-import-attributes"
},
"browserslist": [
"maintained node versions"
],
"files": [
"lib",
"src"
]
}

View File

@@ -0,0 +1,139 @@
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true,
});
exports.suggestionList = suggestionList;
var _naturalCompare = require('./naturalCompare.js');
/**
* Given an invalid input string and a list of valid options, returns a filtered
* list of valid options sorted based on their similarity with the input.
*/
function suggestionList(input, options) {
const optionsByDistance = Object.create(null);
const lexicalDistance = new LexicalDistance(input);
const threshold = Math.floor(input.length * 0.4) + 1;
for (const option of options) {
const distance = lexicalDistance.measure(option, threshold);
if (distance !== undefined) {
optionsByDistance[option] = distance;
}
}
return Object.keys(optionsByDistance).sort((a, b) => {
const distanceDiff = optionsByDistance[a] - optionsByDistance[b];
return distanceDiff !== 0
? distanceDiff
: (0, _naturalCompare.naturalCompare)(a, b);
});
}
/**
* Computes the lexical distance between strings A and B.
*
* The "distance" between two strings is given by counting the minimum number
* of edits needed to transform string A into string B. An edit can be an
* insertion, deletion, or substitution of a single character, or a swap of two
* adjacent characters.
*
* Includes a custom alteration from Damerau-Levenshtein to treat case changes
* as a single edit which helps identify mis-cased values with an edit distance
* of 1.
*
* This distance can be useful for detecting typos in input or sorting
*/
class LexicalDistance {
constructor(input) {
this._input = input;
this._inputLowerCase = input.toLowerCase();
this._inputArray = stringToArray(this._inputLowerCase);
this._rows = [
new Array(input.length + 1).fill(0),
new Array(input.length + 1).fill(0),
new Array(input.length + 1).fill(0),
];
}
measure(option, threshold) {
if (this._input === option) {
return 0;
}
const optionLowerCase = option.toLowerCase(); // Any case change counts as a single edit
if (this._inputLowerCase === optionLowerCase) {
return 1;
}
let a = stringToArray(optionLowerCase);
let b = this._inputArray;
if (a.length < b.length) {
const tmp = a;
a = b;
b = tmp;
}
const aLength = a.length;
const bLength = b.length;
if (aLength - bLength > threshold) {
return undefined;
}
const rows = this._rows;
for (let j = 0; j <= bLength; j++) {
rows[0][j] = j;
}
for (let i = 1; i <= aLength; i++) {
const upRow = rows[(i - 1) % 3];
const currentRow = rows[i % 3];
let smallestCell = (currentRow[0] = i);
for (let j = 1; j <= bLength; j++) {
const cost = a[i - 1] === b[j - 1] ? 0 : 1;
let currentCell = Math.min(
upRow[j] + 1, // delete
currentRow[j - 1] + 1, // insert
upRow[j - 1] + cost, // substitute
);
if (i > 1 && j > 1 && a[i - 1] === b[j - 2] && a[i - 2] === b[j - 1]) {
// transposition
const doubleDiagonalCell = rows[(i - 2) % 3][j - 2];
currentCell = Math.min(currentCell, doubleDiagonalCell + 1);
}
if (currentCell < smallestCell) {
smallestCell = currentCell;
}
currentRow[j] = currentCell;
} // Early exit, since distance can't go smaller than smallest element of the previous row.
if (smallestCell > threshold) {
return undefined;
}
}
const distance = rows[aLength % 3][bLength];
return distance <= threshold ? distance : undefined;
}
}
function stringToArray(str) {
const strLength = str.length;
const array = new Array(strLength);
for (let i = 0; i < strLength; ++i) {
array[i] = str.charCodeAt(i);
}
return array;
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"isCustomAdminView.js","names":["getRouteWithoutAdmin","isCustomAdminView","adminRoute","config","route","admin","components","views","isPublicAdminRoute","Object","entries","some","_","view","routeWithoutAdmin","exact","path","startsWith"],"sources":["../../src/utilities/isCustomAdminView.ts"],"sourcesContent":["import type { SanitizedConfig } from 'payload'\n\nimport { getRouteWithoutAdmin } from './getRouteWithoutAdmin.js'\n\n/**\n * Returns an array of views marked with 'public: true' in the config\n */\nexport const isCustomAdminView = ({\n adminRoute,\n config,\n route,\n}: {\n adminRoute: string\n config: SanitizedConfig\n route: string\n}): boolean => {\n if (config.admin?.components?.views) {\n const isPublicAdminRoute = Object.entries(config.admin.components.views).some(([_, view]) => {\n const routeWithoutAdmin = getRouteWithoutAdmin({ adminRoute, route })\n\n if (view.exact) {\n if (routeWithoutAdmin === view.path) {\n return true\n }\n } else {\n if (routeWithoutAdmin.startsWith(view.path)) {\n return true\n }\n }\n return false\n })\n return isPublicAdminRoute\n }\n return false\n}\n"],"mappings":"AAEA,SAASA,oBAAoB,QAAQ;AAErC;;;AAGA,OAAO,MAAMC,iBAAA,GAAoBA,CAAC;EAChCC,UAAU;EACVC,MAAM;EACNC;AAAK,CAKN;EACC,IAAID,MAAA,CAAOE,KAAK,EAAEC,UAAA,EAAYC,KAAA,EAAO;IACnC,MAAMC,kBAAA,GAAqBC,MAAA,CAAOC,OAAO,CAACP,MAAA,CAAOE,KAAK,CAACC,UAAU,CAACC,KAAK,EAAEI,IAAI,CAAC,CAAC,CAACC,CAAA,EAAGC,IAAA,CAAK;MACtF,MAAMC,iBAAA,GAAoBd,oBAAA,CAAqB;QAAEE,UAAA;QAAYE;MAAM;MAEnE,IAAIS,IAAA,CAAKE,KAAK,EAAE;QACd,IAAID,iBAAA,KAAsBD,IAAA,CAAKG,IAAI,EAAE;UACnC,OAAO;QACT;MACF,OAAO;QACL,IAAIF,iBAAA,CAAkBG,UAAU,CAACJ,IAAA,CAAKG,IAAI,GAAG;UAC3C,OAAO;QACT;MACF;MACA,OAAO;IACT;IACA,OAAOR,kBAAA;EACT;EACA,OAAO;AACT","ignoreList":[]}

View File

@@ -0,0 +1,16 @@
export interface ObjMap<T> {
[key: string]: T;
}
export declare type ObjMapLike<T> =
| ObjMap<T>
| {
[key: string]: T;
};
export interface ReadOnlyObjMap<T> {
readonly [key: string]: T;
}
export declare type ReadOnlyObjMapLike<T> =
| ReadOnlyObjMap<T>
| {
readonly [key: string]: T;
};

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fields/Relationship/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAA+B,MAAM,OAAO,CAAA;AAOnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,cAAc,CAAA;AAErB,OAAO,EAAE,iBAAiB,EAAE,CAAA;AA6N5B,eAAO,MAAM,iBAAiB;;;;;+EAA4C,CAAA"}

View File

@@ -0,0 +1,8 @@
/**
* Ensures the provided URL is absolute. If not, it converts it to an absolute URL based
* on the current window location.
* Note: This MUST be called within the client environment as it relies on the `window` object
* to determine the absolute URL.
*/
export declare const formatAbsoluteURL: (incomingURL: string) => any;
//# sourceMappingURL=formatAbsoluteURL.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"envelope.d.ts","sourceRoot":"","sources":["../../src/envelope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,KAAK,EAEV,aAAa,EAEb,mBAAmB,EAEnB,eAAe,EAEf,YAAY,EAEb,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,KAAK,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAYxE;;;;;IAKI;AACJ,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,KAAK,EAAE,UAAU,CAAC,EAAE,OAAO,GAAG,KAAK,CAuBlF;AAED,yCAAyC;AACzC,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,OAAO,GAAG,iBAAiB,EACpC,GAAG,CAAC,EAAE,aAAa,EACnB,QAAQ,CAAC,EAAE,WAAW,EACtB,MAAM,CAAC,EAAE,MAAM,GACd,eAAe,CAYjB;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,KAAK,EACZ,GAAG,CAAC,EAAE,aAAa,EACnB,QAAQ,CAAC,EAAE,WAAW,EACtB,MAAM,CAAC,EAAE,MAAM,GACd,aAAa,CAwBf;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,CAAC,UAAU,EAAE,GAAG,UAAU,EAAE,CAAC,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,YAAY,CAqDtG;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,eAAe,EACvB,GAAG,EAAE,aAAa,EAClB,MAAM,CAAC,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,MAAM,EAChB,WAAW,CAAC,EAAE,MAAM,GACnB,mBAAmB,CAYrB"}

View File

@@ -0,0 +1 @@
{"version":3,"names":["TargetNames","exports","node","deno","chrome","opera","edge","firefox","safari","ie","ios","android","electron","samsung","rhino","opera_mobile"],"sources":["../src/options.ts"],"sourcesContent":["export const TargetNames = {\n node: \"node\",\n deno: \"deno\",\n chrome: \"chrome\",\n opera: \"opera\",\n edge: \"edge\",\n firefox: \"firefox\",\n safari: \"safari\",\n ie: \"ie\",\n ios: \"ios\",\n android: \"android\",\n electron: \"electron\",\n samsung: \"samsung\",\n rhino: \"rhino\",\n opera_mobile: \"opera_mobile\",\n};\n"],"mappings":";;;;;;AAAO,MAAMA,WAAW,GAAAC,OAAA,CAAAD,WAAA,GAAG;EACzBE,IAAI,EAAE,MAAM;EACZC,IAAI,EAAE,MAAM;EACZC,MAAM,EAAE,QAAQ;EAChBC,KAAK,EAAE,OAAO;EACdC,IAAI,EAAE,MAAM;EACZC,OAAO,EAAE,SAAS;EAClBC,MAAM,EAAE,QAAQ;EAChBC,EAAE,EAAE,IAAI;EACRC,GAAG,EAAE,KAAK;EACVC,OAAO,EAAE,SAAS;EAClBC,QAAQ,EAAE,UAAU;EACpBC,OAAO,EAAE,SAAS;EAClBC,KAAK,EAAE,OAAO;EACdC,YAAY,EAAE;AAChB,CAAC","ignoreList":[]}

View File

@@ -0,0 +1 @@
{"version":3,"names":["_isNativeReflectConstruct","result","Boolean","prototype","valueOf","call","Reflect","construct","_","exports","default"],"sources":["../../src/helpers/isNativeReflectConstruct.ts"],"sourcesContent":["/* @minVersion 7.9.0 */\n\nexport default function _isNativeReflectConstruct() {\n // Since Reflect.construct can't be properly polyfilled, some\n // implementations (e.g. core-js@2) don't set the correct internal slots.\n // Those polyfills don't allow us to subclass built-ins, so we need to\n // use our fallback implementation.\n try {\n // If the internal slots aren't set, this throws an error similar to\n // TypeError: this is not a Boolean object.\n var result = !Boolean.prototype.valueOf.call(\n Reflect.construct(Boolean, [], function () {}),\n );\n } catch (_) {}\n // @ts-expect-error assign to function\n return (_isNativeReflectConstruct = function () {\n return !!result;\n })();\n}\n"],"mappings":";;;;;;AAEe,SAASA,yBAAyBA,CAAA,EAAG;EAKlD,IAAI;IAGF,IAAIC,MAAM,GAAG,CAACC,OAAO,CAACC,SAAS,CAACC,OAAO,CAACC,IAAI,CAC1CC,OAAO,CAACC,SAAS,CAACL,OAAO,EAAE,EAAE,EAAE,YAAY,CAAC,CAAC,CAC/C,CAAC;EACH,CAAC,CAAC,OAAOM,CAAC,EAAE,CAAC;EAEb,OAAO,CAAAC,OAAA,CAAAC,OAAA,GAACV,yBAAyB,GAAG,SAAAA,CAAA,EAAY;IAC9C,OAAO,CAAC,CAACC,MAAM;EACjB,CAAC,EAAE,CAAC;AACN","ignoreList":[]}

View File

@@ -0,0 +1,43 @@
import { getDay } from "./getDay.js";
import { subDays } from "./subDays.js";
/**
* The {@link previousDay} function options.
*/
/**
* @name previousDay
* @category Weekday Helpers
* @summary When is the previous day of the week?
*
* @description
* When is the previous day of the week? 0-6 the day of the week, 0 represents Sunday.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
* @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 check
* @param day - The day of the week
* @param options - An object with options
*
* @returns The date is the previous day of week
*
* @example
* // When is the previous Monday before Mar, 20, 2020?
* const result = previousDay(new Date(2020, 2, 20), 1)
* //=> Mon Mar 16 2020 00:00:00
*
* @example
* // When is the previous Tuesday before Mar, 21, 2020?
* const result = previousDay(new Date(2020, 2, 21), 2)
* //=> Tue Mar 17 2020 00:00:00
*/
export function previousDay(date, day, options) {
let delta = getDay(date, options) - day;
if (delta <= 0) delta += 7;
return subDays(date, delta, options);
}
// Fallback for modularized imports:
export default previousDay;

View File

@@ -0,0 +1,17 @@
/// <reference types="node" />
/// <reference types="node" />
import { Handler, ParserOptions } from "./Parser.js";
import { Writable } from "node:stream";
/**
* WritableStream makes the `Parser` interface available as a NodeJS stream.
*
* @see Parser
*/
export declare class WritableStream extends Writable {
private readonly _parser;
private readonly _decoder;
constructor(cbs: Partial<Handler>, options?: ParserOptions);
_write(chunk: string | Buffer, encoding: string, callback: () => void): void;
_final(callback: () => void): void;
}
//# sourceMappingURL=WritableStream.d.ts.map

View File

@@ -0,0 +1,28 @@
import { ErrorLike } from "./types";
/**
* The Property Descriptor of a lazily-computed `stack` property.
*/
interface LazyStack {
configurable: true;
/**
* Lazily computes the error's stack trace.
*/
get(): string | undefined;
}
/**
* Is the property lazily computed?
*/
export declare function isLazyStack(stackProp: PropertyDescriptor | undefined): stackProp is LazyStack;
/**
* Is the stack property writable?
*/
export declare function isWritableStack(stackProp: PropertyDescriptor | undefined): boolean;
/**
* Appends the original `Error.stack` property to the new Error's stack.
*/
export declare function joinStacks(newError: ErrorLike, originalError?: ErrorLike): string | undefined;
/**
* Calls `joinStacks` lazily, when the `Error.stack` property is accessed.
*/
export declare function lazyJoinStacks(lazyStack: LazyStack, newError: ErrorLike, originalError?: ErrorLike): void;
export {};

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/singlestore-core/columns/tinyint.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnySingleStoreTable } from '~/singlestore-core/table.ts';\nimport { getColumnNameAndConfig } from '~/utils.ts';\nimport { SingleStoreColumnBuilderWithAutoIncrement, SingleStoreColumnWithAutoIncrement } from './common.ts';\nimport type { SingleStoreIntConfig } from './int.ts';\n\nexport type SingleStoreTinyIntBuilderInitial<TName extends string> = SingleStoreTinyIntBuilder<{\n\tname: TName;\n\tdataType: 'number';\n\tcolumnType: 'SingleStoreTinyInt';\n\tdata: number;\n\tdriverParam: number | string;\n\tenumValues: undefined;\n\tgenerated: undefined;\n}>;\n\nexport class SingleStoreTinyIntBuilder<T extends ColumnBuilderBaseConfig<'number', 'SingleStoreTinyInt'>>\n\textends SingleStoreColumnBuilderWithAutoIncrement<T, SingleStoreIntConfig>\n{\n\tstatic override readonly [entityKind]: string = 'SingleStoreTinyIntBuilder';\n\n\tconstructor(name: T['name'], config?: SingleStoreIntConfig) {\n\t\tsuper(name, 'number', 'SingleStoreTinyInt');\n\t\tthis.config.unsigned = config ? config.unsigned : false;\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnySingleStoreTable<{ name: TTableName }>,\n\t): SingleStoreTinyInt<MakeColumnConfig<T, TTableName>> {\n\t\treturn new SingleStoreTinyInt<MakeColumnConfig<T, TTableName>>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig<any, any>,\n\t\t);\n\t}\n}\n\nexport class SingleStoreTinyInt<T extends ColumnBaseConfig<'number', 'SingleStoreTinyInt'>>\n\textends SingleStoreColumnWithAutoIncrement<T, SingleStoreIntConfig>\n{\n\tstatic override readonly [entityKind]: string = 'SingleStoreTinyInt';\n\n\tgetSQLType(): string {\n\t\treturn `tinyint${this.config.unsigned ? ' unsigned' : ''}`;\n\t}\n\n\toverride mapFromDriverValue(value: number | string): number {\n\t\tif (typeof value === 'string') {\n\t\t\treturn Number(value);\n\t\t}\n\t\treturn value;\n\t}\n}\n\nexport function tinyint(): SingleStoreTinyIntBuilderInitial<''>;\nexport function tinyint(\n\tconfig?: SingleStoreIntConfig,\n): SingleStoreTinyIntBuilderInitial<''>;\nexport function tinyint<TName extends string>(\n\tname: TName,\n\tconfig?: SingleStoreIntConfig,\n): SingleStoreTinyIntBuilderInitial<TName>;\nexport function tinyint(a?: string | SingleStoreIntConfig, b?: SingleStoreIntConfig) {\n\tconst { name, config } = getColumnNameAndConfig<SingleStoreIntConfig>(a, b);\n\treturn new SingleStoreTinyIntBuilder(name, config);\n}\n"],"mappings":"AAEA,SAAS,kBAAkB;AAE3B,SAAS,8BAA8B;AACvC,SAAS,2CAA2C,0CAA0C;AAavF,MAAM,kCACJ,0CACT;AAAA,EACC,QAA0B,UAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB,QAA+B;AAC3D,UAAM,MAAM,UAAU,oBAAoB;AAC1C,SAAK,OAAO,WAAW,SAAS,OAAO,WAAW;AAAA,EACnD;AAAA;AAAA,EAGS,MACR,OACsD;AACtD,WAAO,IAAI;AAAA,MACV;AAAA,MACA,KAAK;AAAA,IACN;AAAA,EACD;AACD;AAEO,MAAM,2BACJ,mCACT;AAAA,EACC,QAA0B,UAAU,IAAY;AAAA,EAEhD,aAAqB;AACpB,WAAO,UAAU,KAAK,OAAO,WAAW,cAAc,EAAE;AAAA,EACzD;AAAA,EAES,mBAAmB,OAAgC;AAC3D,QAAI,OAAO,UAAU,UAAU;AAC9B,aAAO,OAAO,KAAK;AAAA,IACpB;AACA,WAAO;AAAA,EACR;AACD;AAUO,SAAS,QAAQ,GAAmC,GAA0B;AACpF,QAAM,EAAE,MAAM,OAAO,IAAI,uBAA6C,GAAG,CAAC;AAC1E,SAAO,IAAI,0BAA0B,MAAM,MAAM;AAClD;","names":[]}

View File

@@ -0,0 +1,39 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const NormalModule = require("./NormalModule");
/** @typedef {import("./Compiler")} Compiler */
const PLUGIN_NAME = "LoaderTargetPlugin";
class LoaderTargetPlugin {
/**
* @param {string} target the target
*/
constructor(target) {
this.target = target;
}
/**
* Apply the plugin
* @param {Compiler} compiler the compiler instance
* @returns {void}
*/
apply(compiler) {
compiler.hooks.compilation.tap(PLUGIN_NAME, (compilation) => {
NormalModule.getCompilationHooks(compilation).loader.tap(
PLUGIN_NAME,
(loaderContext) => {
loaderContext.target = this.target;
}
);
});
}
}
module.exports = LoaderTargetPlugin;

View File

@@ -0,0 +1,71 @@
// Cached regex patterns for performance
const OFFSET_TIMEZONE_PREFIX_REGEX = /^[+-]/;
const OFFSET_TIMEZONE_FORMAT_REGEX = /^([+-])(\d{2})(?::?(\d{2}))?(?::?(\d{2}))?(?:\.(\d{1,9}))?$/;
/**
* IsTimeZoneOffsetString ( offsetString )
* https://tc39.es/ecma262/#sec-istimezoneoffsetstring
*
* Validates whether a string represents a valid UTC offset timezone.
* Supports formats: ±HH, ±HHMM, ±HH:MM, ±HH:MM:SS, ±HH:MM:SS.sss
*
* @param offsetString - The string to validate as a timezone offset
* @returns true if offsetString is a valid UTC offset format
*/
function IsTimeZoneOffsetString(offsetString) {
// 1. If offsetString does not start with '+' or '-', return false
if (!OFFSET_TIMEZONE_PREFIX_REGEX.test(offsetString)) {
return false;
}
// 2. Let parseResult be ParseText(offsetString, UTCOffset)
const match = OFFSET_TIMEZONE_FORMAT_REGEX.exec(offsetString);
// 3. If parseResult is a List of errors, return false
if (!match) {
return false;
}
// 4. Validate component ranges per ECMA-262 grammar
// Hour must be 0-23, Minute must be 0-59, Second must be 0-59
const hours = parseInt(match[2], 10);
const minutes = match[3] ? parseInt(match[3], 10) : 0;
const seconds = match[4] ? parseInt(match[4], 10) : 0;
if (hours > 23 || minutes > 59 || seconds > 59) {
return false;
}
// 5. Return true
return true;
}
/**
* IsValidTimeZoneName ( timeZone )
* https://tc39.es/ecma402/#sec-isvalidtimezonename
*
* Extended to support UTC offset time zones per ECMA-402 PR #788 (ES2026).
* The abstract operation validates both:
* 1. UTC offset identifiers (e.g., "+01:00", "-05:30")
* 2. Available named time zone identifiers from IANA Time Zone Database
*
* @param tz - The timezone identifier to validate
* @param implDetails - Implementation details containing timezone data
* @returns true if timeZone is a valid identifier
*/
export function IsValidTimeZoneName(tz, { zoneNamesFromData, uppercaseLinks }) {
// 1. If IsTimeZoneOffsetString(timeZone) is true, return true
// Per ECMA-402 PR #788, UTC offset identifiers are valid
if (IsTimeZoneOffsetString(tz)) {
return true;
}
// 2. Let timeZones be AvailableNamedTimeZoneIdentifiers()
// 3. If timeZones contains an element equal to timeZone, return true
// NOTE: Implementation uses case-insensitive comparison per spec note
const uppercasedTz = tz.toUpperCase();
const zoneNames = new Set();
const linkNames = new Set();
zoneNamesFromData.map((z) => z.toUpperCase()).forEach((z) => zoneNames.add(z));
Object.keys(uppercaseLinks).forEach((linkName) => {
linkNames.add(linkName.toUpperCase());
zoneNames.add(uppercaseLinks[linkName].toUpperCase());
});
if (zoneNames.has(uppercasedTz) || linkNames.has(uppercasedTz)) {
return true;
}
// 4. Return false
return false;
}

View File

@@ -0,0 +1,3 @@
export { GRAPHQL_PLAYGROUND_GET, GRAPHQL_POST } from '../routes/graphql/index.js';
export { DELETE as REST_DELETE, GET as REST_GET, OPTIONS as REST_OPTIONS, PATCH as REST_PATCH, POST as REST_POST, PUT as REST_PUT, } from '../routes/rest/index.js';
//# sourceMappingURL=routes.d.ts.map

View File

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

View File

@@ -0,0 +1,68 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var primary_keys_exports = {};
__export(primary_keys_exports, {
PrimaryKey: () => PrimaryKey,
PrimaryKeyBuilder: () => PrimaryKeyBuilder,
primaryKey: () => primaryKey
});
module.exports = __toCommonJS(primary_keys_exports);
var import_entity = require("../entity.cjs");
var import_table = require("./table.cjs");
function primaryKey(...config) {
if (config[0].columns) {
return new PrimaryKeyBuilder(config[0].columns, config[0].name);
}
return new PrimaryKeyBuilder(config);
}
class PrimaryKeyBuilder {
static [import_entity.entityKind] = "SQLitePrimaryKeyBuilder";
/** @internal */
columns;
/** @internal */
name;
constructor(columns, name) {
this.columns = columns;
this.name = name;
}
/** @internal */
build(table) {
return new PrimaryKey(table, this.columns, this.name);
}
}
class PrimaryKey {
constructor(table, columns, name) {
this.table = table;
this.columns = columns;
this.name = name;
}
static [import_entity.entityKind] = "SQLitePrimaryKey";
columns;
name;
getName() {
return this.name ?? `${this.table[import_table.SQLiteTable.Symbol.Name]}_${this.columns.map((column) => column.name).join("_")}_pk`;
}
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
PrimaryKey,
PrimaryKeyBuilder,
primaryKey
});
//# sourceMappingURL=primary-keys.cjs.map

View File

@@ -0,0 +1,18 @@
'use strict'
const { parentPort } = require('worker_threads')
const { Writable } = require('stream')
function run () {
parentPort.once('message', function ({ text, takeThisPortPlease }) {
takeThisPortPlease.postMessage(`received: ${text}`)
})
return new Writable({
autoDestroy: true,
write (chunk, enc, cb) {
cb()
}
})
}
module.exports = run

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