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":"types.d.ts","sourceRoot":"","sources":["../../../src/fields/Textarea/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAC7D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,OAAO,CAAA;AAExC,MAAM,MAAM,kBAAkB,GAAG;IAC/B,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,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,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,WAAW,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAA;IACjE,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,CAAA;IAC7B,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAC3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAC3B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;IACtB,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,CAAA;CAChC,CAAA"}

View File

@@ -0,0 +1,4 @@
function _arrayWithHoles(r) {
if (Array.isArray(r)) return r;
}
module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -0,0 +1,30 @@
import type { SQLOptions } from 'bun';
import { SQL } from 'bun';
import { entityKind } from "../entity.cjs";
import { PgDatabase } from "../pg-core/db.cjs";
import { type DrizzleConfig } from "../utils.cjs";
import type { BunSQLQueryResultHKT } from "./session.cjs";
export declare class BunSQLDatabase<TSchema extends Record<string, unknown> = Record<string, never>> extends PgDatabase<BunSQLQueryResultHKT, TSchema> {
static readonly [entityKind]: string;
}
export declare function drizzle<TSchema extends Record<string, unknown> = Record<string, never>, TClient extends SQL = SQL>(...params: [
TClient | string
] | [
TClient | string,
DrizzleConfig<TSchema>
] | [
(DrizzleConfig<TSchema> & ({
connection: string | ({
url?: string;
} & SQLOptions);
} | {
client: TClient;
}))
]): BunSQLDatabase<TSchema> & {
$client: TClient;
};
export declare namespace drizzle {
function mock<TSchema extends Record<string, unknown> = Record<string, never>>(config?: DrizzleConfig<TSchema>): BunSQLDatabase<TSchema> & {
$client: '$client is not available on drizzle.mock()';
};
}

View File

@@ -0,0 +1,153 @@
"use strict";
exports.match = void 0;
var _index = require("../../_lib/buildMatchFn.js");
var _index2 = require("../../_lib/buildMatchPatternFn.js");
const matchOrdinalNumberPattern = /^(\d+)(\.)?/i;
const parseOrdinalNumberPattern = /\d+/i;
const matchEraPatterns = {
narrow: /^(mö|ms)/i,
abbreviated: /^(mö|ms)/i,
wide: /^(milattan önce|milattan sonra)/i,
};
const parseEraPatterns = {
any: [/(^mö|^milattan önce)/i, /(^ms|^milattan sonra)/i],
};
const matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^[1234]ç/i,
wide: /^((i|İ)lk|(i|İ)kinci|üçüncü|son) çeyrek/i,
};
const parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i],
abbreviated: [/1ç/i, /2ç/i, /3ç/i, /4ç/i],
wide: [
/^(i|İ)lk çeyrek/i,
/(i|İ)kinci çeyrek/i,
/üçüncü çeyrek/i,
/son çeyrek/i,
],
};
const matchMonthPatterns = {
narrow: /^[oşmnhtaek]/i,
abbreviated: /^(oca|şub|mar|nis|may|haz|tem|ağu|eyl|eki|kas|ara)/i,
wide: /^(ocak|şubat|mart|nisan|mayıs|haziran|temmuz|ağustos|eylül|ekim|kasım|aralık)/i,
};
const parseMonthPatterns = {
narrow: [
/^o/i,
/^ş/i,
/^m/i,
/^n/i,
/^m/i,
/^h/i,
/^t/i,
/^a/i,
/^e/i,
/^e/i,
/^k/i,
/^a/i,
],
any: [
/^o/i,
/^ş/i,
/^mar/i,
/^n/i,
/^may/i,
/^h/i,
/^t/i,
/^ağ/i,
/^ey/i,
/^ek/i,
/^k/i,
/^ar/i,
],
};
const matchDayPatterns = {
narrow: /^[psçc]/i,
short: /^(pz|pt|sa|ça|pe|cu|ct)/i,
abbreviated: /^(paz|pzt|sal|çar|per|cum|cts)/i,
wide: /^(pazar(?!tesi)|pazartesi|salı|çarşamba|perşembe|cuma(?!rtesi)|cumartesi)/i,
};
const parseDayPatterns = {
narrow: [/^p/i, /^p/i, /^s/i, /^ç/i, /^p/i, /^c/i, /^c/i],
any: [/^pz/i, /^pt/i, /^sa/i, /^ça/i, /^pe/i, /^cu/i, /^ct/i],
wide: [
/^pazar(?!tesi)/i,
/^pazartesi/i,
/^salı/i,
/^çarşamba/i,
/^perşembe/i,
/^cuma(?!rtesi)/i,
/^cumartesi/i,
],
};
const matchDayPeriodPatterns = {
narrow: /^(öö|ös|gy|ö|sa|ös|ak|ge)/i,
any: /^(ö\.?\s?[ös]\.?|öğleden sonra|gece yarısı|öğle|(sabah|öğ|akşam|gece)(leyin))/i,
};
const parseDayPeriodPatterns = {
any: {
am: /^ö\.?ö\.?/i,
pm: /^ö\.?s\.?/i,
midnight: /^(gy|gece yarısı)/i,
noon: /^öğ/i,
morning: /^sa/i,
afternoon: /^öğleden sonra/i,
evening: /^ak/i,
night: /^ge/i,
},
};
const match = (exports.match = {
ordinalNumber: (0, _index2.buildMatchPatternFn)({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: function (value) {
return parseInt(value, 10);
},
}),
era: (0, _index.buildMatchFn)({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any",
}),
quarter: (0, _index.buildMatchFn)({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: (index) => index + 1,
}),
month: (0, _index.buildMatchFn)({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any",
}),
day: (0, _index.buildMatchFn)({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any",
}),
dayPeriod: (0, _index.buildMatchFn)({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any",
}),
});

View File

@@ -0,0 +1,74 @@
import { entityKind } from "../entity.js";
import { TableName } from "../table.utils.js";
class ForeignKeyBuilder {
static [entityKind] = "PgForeignKeyBuilder";
/** @internal */
reference;
/** @internal */
_onUpdate = "no action";
/** @internal */
_onDelete = "no action";
constructor(config, actions) {
this.reference = () => {
const { name, columns, foreignColumns } = config();
return { name, columns, foreignTable: foreignColumns[0].table, foreignColumns };
};
if (actions) {
this._onUpdate = actions.onUpdate;
this._onDelete = actions.onDelete;
}
}
onUpdate(action) {
this._onUpdate = action === void 0 ? "no action" : action;
return this;
}
onDelete(action) {
this._onDelete = action === void 0 ? "no action" : action;
return this;
}
/** @internal */
build(table) {
return new ForeignKey(table, this);
}
}
class ForeignKey {
constructor(table, builder) {
this.table = table;
this.reference = builder.reference;
this.onUpdate = builder._onUpdate;
this.onDelete = builder._onDelete;
}
static [entityKind] = "PgForeignKey";
reference;
onUpdate;
onDelete;
getName() {
const { name, columns, foreignColumns } = this.reference();
const columnNames = columns.map((column) => column.name);
const foreignColumnNames = foreignColumns.map((column) => column.name);
const chunks = [
this.table[TableName],
...columnNames,
foreignColumns[0].table[TableName],
...foreignColumnNames
];
return name ?? `${chunks.join("_")}_fk`;
}
}
function foreignKey(config) {
function mappedConfig() {
const { name, columns, foreignColumns } = config;
return {
name,
columns,
foreignColumns
};
}
return new ForeignKeyBuilder(mappedConfig);
}
export {
ForeignKey,
ForeignKeyBuilder,
foreignKey
};
//# sourceMappingURL=foreign-keys.js.map

View File

@@ -0,0 +1,11 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
'use strict'
const LexicalComposerContext = process.env.NODE_ENV !== 'production' ? require('./LexicalComposerContext.dev.js') : require('./LexicalComposerContext.prod.js');
module.exports = LexicalComposerContext;

View File

@@ -0,0 +1,174 @@
import type { WithCacheConfig } from "../../cache/core/types.js";
import type { GetColumnData } from "../../column.js";
import { entityKind } from "../../entity.js";
import type { PgDialect } from "../dialect.js";
import type { PgPreparedQuery, PgQueryResultHKT, PgQueryResultKind, PgSession, PreparedQueryConfig } from "../session.js";
import { PgTable } from "../table.js";
import type { TypedQueryBuilder } from "../../query-builders/query-builder.js";
import type { AppendToNullabilityMap, AppendToResult, GetSelectTableName, GetSelectTableSelection, JoinNullability, JoinType, SelectMode, SelectResult } from "../../query-builders/select.types.js";
import { QueryPromise } from "../../query-promise.js";
import type { RunnableQuery } from "../../runnable-query.js";
import { type ColumnsSelection, type Query, SQL, type SQLWrapper } from "../../sql/sql.js";
import { Subquery } from "../../subquery.js";
import { Table } from "../../table.js";
import { type Assume, type DrizzleTypeError, type Equal, type NeonAuthToken, type Simplify, type UpdateSet } from "../../utils.js";
import type { PgColumn } from "../columns/common.js";
import type { PgViewBase } from "../view-base.js";
import type { PgSelectJoinConfig, SelectedFields, SelectedFieldsOrdered, TableLikeHasEmptySelection } from "./select.types.js";
export interface PgUpdateConfig {
where?: SQL | undefined;
set: UpdateSet;
table: PgTable;
from?: PgTable | Subquery | PgViewBase | SQL;
joins: PgSelectJoinConfig[];
returningFields?: SelectedFields;
returning?: SelectedFieldsOrdered;
withList?: Subquery[];
}
export type PgUpdateSetSource<TTable extends PgTable> = {
[Key in keyof TTable['$inferInsert']]?: GetColumnData<TTable['_']['columns'][Key]> | SQL | PgColumn | undefined;
} & {};
export declare class PgUpdateBuilder<TTable extends PgTable, TQueryResult extends PgQueryResultHKT> {
private table;
private session;
private dialect;
private withList?;
static readonly [entityKind]: string;
readonly _: {
readonly table: TTable;
};
constructor(table: TTable, session: PgSession, dialect: PgDialect, withList?: Subquery[] | undefined);
private authToken?;
setToken(token: NeonAuthToken): this;
set(values: PgUpdateSetSource<TTable>): PgUpdateWithout<PgUpdateBase<TTable, TQueryResult>, false, 'leftJoin' | 'rightJoin' | 'innerJoin' | 'fullJoin'>;
}
export type PgUpdateWithout<T extends AnyPgUpdate, TDynamic extends boolean, K extends keyof T & string> = TDynamic extends true ? T : Omit<PgUpdateBase<T['_']['table'], T['_']['queryResult'], T['_']['from'], T['_']['selectedFields'], T['_']['returning'], T['_']['nullabilityMap'], T['_']['joins'], TDynamic, T['_']['excludedMethods'] | K>, T['_']['excludedMethods'] | K>;
export type PgUpdateWithJoins<T extends AnyPgUpdate, TDynamic extends boolean, TFrom extends PgTable | Subquery | PgViewBase | SQL> = TDynamic extends true ? T : Omit<PgUpdateBase<T['_']['table'], T['_']['queryResult'], TFrom, T['_']['selectedFields'], T['_']['returning'], AppendToNullabilityMap<T['_']['nullabilityMap'], GetSelectTableName<TFrom>, 'inner'>, [
...T['_']['joins'],
{
name: GetSelectTableName<TFrom>;
joinType: 'inner';
table: TFrom;
}
], TDynamic, Exclude<T['_']['excludedMethods'] | 'from', 'leftJoin' | 'rightJoin' | 'innerJoin' | 'fullJoin'>>, Exclude<T['_']['excludedMethods'] | 'from', 'leftJoin' | 'rightJoin' | 'innerJoin' | 'fullJoin'>>;
export type PgUpdateJoinFn<T extends AnyPgUpdate, TDynamic extends boolean, TJoinType extends JoinType> = <TJoinedTable extends PgTable | Subquery | PgViewBase | SQL>(table: TableLikeHasEmptySelection<TJoinedTable> extends true ? DrizzleTypeError<"Cannot reference a data-modifying statement subquery if it doesn't contain a `returning` clause"> : TJoinedTable, on: ((updateTable: T['_']['table']['_']['columns'], from: T['_']['from'] extends PgTable ? T['_']['from']['_']['columns'] : T['_']['from'] extends Subquery | PgViewBase ? T['_']['from']['_']['selectedFields'] : never) => SQL | undefined) | SQL | undefined) => PgUpdateJoin<T, TDynamic, TJoinType, TJoinedTable>;
export type PgUpdateJoin<T extends AnyPgUpdate, TDynamic extends boolean, TJoinType extends JoinType, TJoinedTable extends PgTable | Subquery | PgViewBase | SQL> = TDynamic extends true ? T : PgUpdateBase<T['_']['table'], T['_']['queryResult'], T['_']['from'], T['_']['selectedFields'], T['_']['returning'], AppendToNullabilityMap<T['_']['nullabilityMap'], GetSelectTableName<TJoinedTable>, TJoinType>, [
...T['_']['joins'],
{
name: GetSelectTableName<TJoinedTable>;
joinType: TJoinType;
table: TJoinedTable;
}
], TDynamic, T['_']['excludedMethods']>;
type Join = {
name: string | undefined;
joinType: JoinType;
table: PgTable | Subquery | PgViewBase | SQL;
};
type AccumulateToResult<T extends AnyPgUpdate, TSelectMode extends SelectMode, TJoins extends Join[], TSelectedFields extends ColumnsSelection> = TJoins extends [infer TJoin extends Join, ...infer TRest extends Join[]] ? AccumulateToResult<T, TSelectMode extends 'partial' ? TSelectMode : 'multiple', TRest, AppendToResult<T['_']['table']['_']['name'], TSelectedFields, TJoin['name'], TJoin['table'] extends Table ? TJoin['table']['_']['columns'] : TJoin['table'] extends Subquery ? Assume<TJoin['table']['_']['selectedFields'], SelectedFields> : never, TSelectMode extends 'partial' ? TSelectMode : 'multiple'>> : TSelectedFields;
export type PgUpdateReturningAll<T extends AnyPgUpdate, TDynamic extends boolean> = PgUpdateWithout<PgUpdateBase<T['_']['table'], T['_']['queryResult'], T['_']['from'], Equal<T['_']['joins'], []> extends true ? T['_']['table']['_']['columns'] : Simplify<Record<T['_']['table']['_']['name'], T['_']['table']['_']['columns']> & {
[K in keyof T['_']['joins'] as T['_']['joins'][K]['table']['_']['name']]: T['_']['joins'][K]['table']['_']['columns'];
}>, SelectResult<AccumulateToResult<T, 'single', T['_']['joins'], GetSelectTableSelection<T['_']['table']>>, 'partial', T['_']['nullabilityMap']>, T['_']['nullabilityMap'], T['_']['joins'], TDynamic, T['_']['excludedMethods']>, TDynamic, 'returning'>;
export type PgUpdateReturning<T extends AnyPgUpdate, TDynamic extends boolean, TSelectedFields extends SelectedFields> = PgUpdateWithout<PgUpdateBase<T['_']['table'], T['_']['queryResult'], T['_']['from'], TSelectedFields, SelectResult<AccumulateToResult<T, 'partial', T['_']['joins'], TSelectedFields>, 'partial', T['_']['nullabilityMap']>, T['_']['nullabilityMap'], T['_']['joins'], TDynamic, T['_']['excludedMethods']>, TDynamic, 'returning'>;
export type PgUpdatePrepare<T extends AnyPgUpdate> = PgPreparedQuery<PreparedQueryConfig & {
execute: T['_']['returning'] extends undefined ? PgQueryResultKind<T['_']['queryResult'], never> : T['_']['returning'][];
}>;
export type PgUpdateDynamic<T extends AnyPgUpdate> = PgUpdate<T['_']['table'], T['_']['queryResult'], T['_']['from'], T['_']['returning'], T['_']['nullabilityMap']>;
export type PgUpdate<TTable extends PgTable = PgTable, TQueryResult extends PgQueryResultHKT = PgQueryResultHKT, TFrom extends PgTable | Subquery | PgViewBase | SQL | undefined = undefined, TSelectedFields extends ColumnsSelection | undefined = undefined, TReturning extends Record<string, unknown> | undefined = Record<string, unknown> | undefined, TNullabilityMap extends Record<string, JoinNullability> = Record<TTable['_']['name'], 'not-null'>, TJoins extends Join[] = []> = PgUpdateBase<TTable, TQueryResult, TFrom, TSelectedFields, TReturning, TNullabilityMap, TJoins, true, never>;
export type AnyPgUpdate = PgUpdateBase<any, any, any, any, any, any, any, any, any>;
export interface PgUpdateBase<TTable extends PgTable, TQueryResult extends PgQueryResultHKT, TFrom extends PgTable | Subquery | PgViewBase | SQL | undefined = undefined, TSelectedFields extends ColumnsSelection | undefined = undefined, TReturning extends Record<string, unknown> | undefined = undefined, TNullabilityMap extends Record<string, JoinNullability> = Record<TTable['_']['name'], 'not-null'>, TJoins extends Join[] = [], TDynamic extends boolean = false, TExcludedMethods extends string = never> extends TypedQueryBuilder<TSelectedFields, TReturning extends undefined ? PgQueryResultKind<TQueryResult, never> : TReturning[]>, QueryPromise<TReturning extends undefined ? PgQueryResultKind<TQueryResult, never> : TReturning[]>, RunnableQuery<TReturning extends undefined ? PgQueryResultKind<TQueryResult, never> : TReturning[], 'pg'>, SQLWrapper {
readonly _: {
readonly dialect: 'pg';
readonly table: TTable;
readonly joins: TJoins;
readonly nullabilityMap: TNullabilityMap;
readonly queryResult: TQueryResult;
readonly from: TFrom;
readonly selectedFields: TSelectedFields;
readonly returning: TReturning;
readonly dynamic: TDynamic;
readonly excludedMethods: TExcludedMethods;
readonly result: TReturning extends undefined ? PgQueryResultKind<TQueryResult, never> : TReturning[];
};
}
export declare class PgUpdateBase<TTable extends PgTable, TQueryResult extends PgQueryResultHKT, TFrom extends PgTable | Subquery | PgViewBase | SQL | undefined = undefined, TSelectedFields extends ColumnsSelection | undefined = undefined, TReturning extends Record<string, unknown> | undefined = undefined, TNullabilityMap extends Record<string, JoinNullability> = Record<TTable['_']['name'], 'not-null'>, TJoins extends Join[] = [], TDynamic extends boolean = false, TExcludedMethods extends string = never> extends QueryPromise<TReturning extends undefined ? PgQueryResultKind<TQueryResult, never> : TReturning[]> implements RunnableQuery<TReturning extends undefined ? PgQueryResultKind<TQueryResult, never> : TReturning[], 'pg'>, SQLWrapper {
private session;
private dialect;
static readonly [entityKind]: string;
private config;
private tableName;
private joinsNotNullableMap;
protected cacheConfig?: WithCacheConfig;
constructor(table: TTable, set: UpdateSet, session: PgSession, dialect: PgDialect, withList?: Subquery[]);
from<TFrom extends PgTable | Subquery | PgViewBase | SQL>(source: TableLikeHasEmptySelection<TFrom> extends true ? DrizzleTypeError<"Cannot reference a data-modifying statement subquery if it doesn't contain a `returning` clause"> : TFrom): PgUpdateWithJoins<this, TDynamic, TFrom>;
private getTableLikeFields;
private createJoin;
leftJoin: PgUpdateJoinFn<this, TDynamic, "left">;
rightJoin: PgUpdateJoinFn<this, TDynamic, "right">;
innerJoin: PgUpdateJoinFn<this, TDynamic, "inner">;
fullJoin: PgUpdateJoinFn<this, TDynamic, "full">;
/**
* Adds a 'where' clause to the query.
*
* Calling this method will update only those rows that fulfill a specified condition.
*
* See docs: {@link https://orm.drizzle.team/docs/update}
*
* @param where the 'where' clause.
*
* @example
* You can use conditional operators and `sql function` to filter the rows to be updated.
*
* ```ts
* // Update all cars with green color
* await db.update(cars).set({ color: 'red' })
* .where(eq(cars.color, 'green'));
* // or
* await db.update(cars).set({ color: 'red' })
* .where(sql`${cars.color} = 'green'`)
* ```
*
* You can logically combine conditional operators with `and()` and `or()` operators:
*
* ```ts
* // Update all BMW cars with a green color
* await db.update(cars).set({ color: 'red' })
* .where(and(eq(cars.color, 'green'), eq(cars.brand, 'BMW')));
*
* // Update all cars with the green or blue color
* await db.update(cars).set({ color: 'red' })
* .where(or(eq(cars.color, 'green'), eq(cars.color, 'blue')));
* ```
*/
where(where: SQL | undefined): PgUpdateWithout<this, TDynamic, 'where'>;
/**
* Adds a `returning` clause to the query.
*
* Calling this method will return the specified fields of the updated rows. If no fields are specified, all fields will be returned.
*
* See docs: {@link https://orm.drizzle.team/docs/update#update-with-returning}
*
* @example
* ```ts
* // Update all cars with the green color and return all fields
* const updatedCars: Car[] = await db.update(cars)
* .set({ color: 'red' })
* .where(eq(cars.color, 'green'))
* .returning();
*
* // Update all cars with the green color and return only their id and brand fields
* const updatedCarsIdsAndBrands: { id: number, brand: string }[] = await db.update(cars)
* .set({ color: 'red' })
* .where(eq(cars.color, 'green'))
* .returning({ id: cars.id, brand: cars.brand });
* ```
*/
returning(): PgUpdateReturningAll<this, TDynamic>;
returning<TSelectedFields extends SelectedFields>(fields: TSelectedFields): PgUpdateReturning<this, TDynamic, TSelectedFields>;
toSQL(): Query;
prepare(name: string): PgUpdatePrepare<this>;
private authToken?;
execute: ReturnType<this['prepare']>['execute'];
$dynamic(): PgUpdateDynamic<this>;
}
export {};

View File

@@ -0,0 +1,7 @@
function _skipFirstGeneratorNext(t) {
return function () {
var r = t.apply(this, arguments);
return r.next(), r;
};
}
export { _skipFirstGeneratorNext as default };

View File

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

View File

@@ -0,0 +1,17 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const GitMerge = createLucideIcon("GitMerge", [
["circle", { cx: "18", cy: "18", r: "3", key: "1xkwt0" }],
["circle", { cx: "6", cy: "6", r: "3", key: "1lh9wr" }],
["path", { d: "M6 21V9a9 9 0 0 0 9 9", key: "7kw0sc" }]
]);
export { GitMerge as default };
//# sourceMappingURL=git-merge.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/neon-http/index.ts"],"sourcesContent":["export * from './driver.ts';\nexport * from './session.ts';\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,8BAAc,wBAAd;AACA,8BAAc,yBADd;","names":[]}

View File

@@ -0,0 +1,104 @@
'use strict';
var parse = require('../');
var test = require('tape');
test('boolean and alias is not unknown', function (t) {
var unknown = [];
function unknownFn(arg) {
unknown.push(arg);
return false;
}
var aliased = ['-h', 'true', '--derp', 'true'];
var regular = ['--herp', 'true', '-d', 'true'];
var opts = {
alias: { h: 'herp' },
boolean: 'h',
unknown: unknownFn,
};
parse(aliased, opts);
parse(regular, opts);
t.same(unknown, ['--derp', '-d']);
t.end();
});
test('flag boolean true any double hyphen argument is not unknown', function (t) {
var unknown = [];
function unknownFn(arg) {
unknown.push(arg);
return false;
}
var argv = parse(['--honk', '--tacos=good', 'cow', '-p', '55'], {
boolean: true,
unknown: unknownFn,
});
t.same(unknown, ['--tacos=good', 'cow', '-p']);
t.same(argv, {
honk: true,
_: [],
});
t.end();
});
test('string and alias is not unknown', function (t) {
var unknown = [];
function unknownFn(arg) {
unknown.push(arg);
return false;
}
var aliased = ['-h', 'hello', '--derp', 'goodbye'];
var regular = ['--herp', 'hello', '-d', 'moon'];
var opts = {
alias: { h: 'herp' },
string: 'h',
unknown: unknownFn,
};
parse(aliased, opts);
parse(regular, opts);
t.same(unknown, ['--derp', '-d']);
t.end();
});
test('default and alias is not unknown', function (t) {
var unknown = [];
function unknownFn(arg) {
unknown.push(arg);
return false;
}
var aliased = ['-h', 'hello'];
var regular = ['--herp', 'hello'];
var opts = {
default: { h: 'bar' },
alias: { h: 'herp' },
unknown: unknownFn,
};
parse(aliased, opts);
parse(regular, opts);
t.same(unknown, []);
t.end();
unknownFn(); // exercise fn for 100% coverage
});
test('value following -- is not unknown', function (t) {
var unknown = [];
function unknownFn(arg) {
unknown.push(arg);
return false;
}
var aliased = ['--bad', '--', 'good', 'arg'];
var opts = {
'--': true,
unknown: unknownFn,
};
var argv = parse(aliased, opts);
t.same(unknown, ['--bad']);
t.same(argv, {
'--': ['good', 'arg'],
_: [],
});
t.end();
});

View File

@@ -0,0 +1,24 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const ModuleFactory = require("./ModuleFactory");
/** @typedef {import("./ModuleFactory").ModuleFactoryCallback} ModuleFactoryCallback */
/** @typedef {import("./ModuleFactory").ModuleFactoryCreateData} ModuleFactoryCreateData */
class NullFactory extends ModuleFactory {
/**
* @param {ModuleFactoryCreateData} data data object
* @param {ModuleFactoryCallback} callback callback
* @returns {void}
*/
create(data, callback) {
return callback();
}
}
module.exports = NullFactory;

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/elements/FolderView/MoveDocToFolder/index.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,gBAAgB,EAAkB,MAAM,gBAAgB,CAAA;AACtE,OAAO,KAAgB,MAAM,OAAO,CAAA;AAGpC,OAAO,KAAK,EAAE,KAAK,IAAI,WAAW,EAAE,MAAM,uBAAuB,CAAA;AASjE,OAAO,cAAc,CAAA;AAKrB;;GAEG;AACH,wBAAgB,eAAe,CAAC,EAC9B,WAAW,EACX,SAAc,EACd,oBAAoB,EACpB,eAAe,GAChB,EAAE;IACD,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAA;IAC3C,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAA;IACrC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAA;CACjC,qBA2DA;AAED,KAAK,0BAA0B,GAAG;IAChC,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAA;IAC3C,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAA;IAC/B,QAAQ,CAAC,OAAO,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAA;IAC3C,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;IAC/B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,oBAAoB,EAAE,MAAM,CAAA;IACrC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAA;IAChC,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACvC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAA;IAC/B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE;QAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAA;IAC1F,QAAQ,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAA;CACpC,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,qBAAqB,uLAc/B,0BAA0B,sBA0E5B,CAAA"}

View File

@@ -0,0 +1,100 @@
"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 foreign_keys_exports = {};
__export(foreign_keys_exports, {
ForeignKey: () => ForeignKey,
ForeignKeyBuilder: () => ForeignKeyBuilder,
foreignKey: () => foreignKey
});
module.exports = __toCommonJS(foreign_keys_exports);
var import_entity = require("../entity.cjs");
var import_table_utils = require("../table.utils.cjs");
class ForeignKeyBuilder {
static [import_entity.entityKind] = "GelForeignKeyBuilder";
/** @internal */
reference;
/** @internal */
_onUpdate = "no action";
/** @internal */
_onDelete = "no action";
constructor(config, actions) {
this.reference = () => {
const { name, columns, foreignColumns } = config();
return { name, columns, foreignTable: foreignColumns[0].table, foreignColumns };
};
if (actions) {
this._onUpdate = actions.onUpdate;
this._onDelete = actions.onDelete;
}
}
onUpdate(action) {
this._onUpdate = action === void 0 ? "no action" : action;
return this;
}
onDelete(action) {
this._onDelete = action === void 0 ? "no action" : action;
return this;
}
/** @internal */
build(table) {
return new ForeignKey(table, this);
}
}
class ForeignKey {
constructor(table, builder) {
this.table = table;
this.reference = builder.reference;
this.onUpdate = builder._onUpdate;
this.onDelete = builder._onDelete;
}
static [import_entity.entityKind] = "GelForeignKey";
reference;
onUpdate;
onDelete;
getName() {
const { name, columns, foreignColumns } = this.reference();
const columnNames = columns.map((column) => column.name);
const foreignColumnNames = foreignColumns.map((column) => column.name);
const chunks = [
this.table[import_table_utils.TableName],
...columnNames,
foreignColumns[0].table[import_table_utils.TableName],
...foreignColumnNames
];
return name ?? `${chunks.join("_")}_fk`;
}
}
function foreignKey(config) {
function mappedConfig() {
const { name, columns, foreignColumns } = config;
return {
name,
columns,
foreignColumns
};
}
return new ForeignKeyBuilder(mappedConfig);
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
ForeignKey,
ForeignKeyBuilder,
foreignKey
});
//# sourceMappingURL=foreign-keys.cjs.map

View File

@@ -0,0 +1,24 @@
import type { DsnComponents } from '../types-hoist/dsn';
import type { LogContainerItem, LogEnvelope } from '../types-hoist/envelope';
import type { SerializedLog } from '../types-hoist/log';
import type { SdkMetadata } from '../types-hoist/sdkmetadata';
/**
* Creates a log container envelope item for a list of logs.
*
* @param items - The logs to include in the envelope.
* @returns The created log container envelope item.
*/
export declare function createLogContainerEnvelopeItem(items: Array<SerializedLog>): LogContainerItem;
/**
* Creates an envelope for a list of logs.
*
* Logs from multiple traces can be included in the same envelope.
*
* @param logs - The logs to include in the envelope.
* @param metadata - The metadata to include in the envelope.
* @param tunnel - The tunnel to include in the envelope.
* @param dsn - The DSN to include in the envelope.
* @returns The created envelope.
*/
export declare function createLogEnvelope(logs: Array<SerializedLog>, metadata?: SdkMetadata, tunnel?: string, dsn?: DsnComponents): LogEnvelope;
//# sourceMappingURL=envelope.d.ts.map

View File

@@ -0,0 +1,39 @@
import { buildFormatLongFn } from "../../_lib/buildFormatLongFn.js";
const dateFormats = {
full: "yねんMがつdにちEEEE",
long: "yねんMがつdにち",
medium: "y/MM/dd",
short: "y/MM/dd",
};
const timeFormats = {
full: "Hじmmふんssびょう zzzz",
long: "H:mm:ss z",
medium: "H:mm:ss",
short: "H:mm",
};
const dateTimeFormats = {
full: "{{date}} {{time}}",
long: "{{date}} {{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,44 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
import type { CodeNode } from './CodeNode';
import type { LexicalEditor, LexicalNode, NodeKey } from 'lexical';
import type { Token } from 'prismjs';
import 'prismjs';
import 'prismjs/components/prism-clike';
import 'prismjs/components/prism-diff';
import 'prismjs/components/prism-javascript';
import 'prismjs/components/prism-markup';
import 'prismjs/components/prism-markdown';
import 'prismjs/components/prism-c';
import 'prismjs/components/prism-css';
import 'prismjs/components/prism-objectivec';
import 'prismjs/components/prism-sql';
import 'prismjs/components/prism-powershell';
import 'prismjs/components/prism-python';
import 'prismjs/components/prism-rust';
import 'prismjs/components/prism-swift';
import 'prismjs/components/prism-typescript';
import 'prismjs/components/prism-java';
import 'prismjs/components/prism-cpp';
declare global {
interface Window {
Prism: typeof import('prismjs');
}
}
export declare const Prism: typeof import('prismjs');
export declare const CODE_LANGUAGE_FRIENDLY_NAME_MAP: Record<string, string>;
export declare const CODE_LANGUAGE_MAP: Record<string, string>;
export declare function normalizeCodeLang(lang: string): string;
export declare function getLanguageFriendlyName(lang: string): string;
export declare const getCodeLanguages: () => Array<string>;
export declare function getCodeLanguageOptions(): [string, string][];
export declare function getCodeThemeOptions(): [string, string][];
export declare function isCodeLanguageLoaded(language: string): boolean;
export declare function loadCodeLanguage(language: string, editor?: LexicalEditor, codeNodeKey?: NodeKey): Promise<void>;
export declare function tokenizeDiffHighlight(tokens: (string | Token)[], language: string): Array<string | Token>;
export declare function $getHighlightNodes(codeNode: CodeNode, language: string): LexicalNode[];

View File

@@ -0,0 +1,9 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
"use strict";var e=require("@lexical/react/LexicalComposerContext"),t=require("lexical"),o=require("react"),n=require("react/jsx-runtime");const r="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,i=r?o.useLayoutEffect:o.useEffect,a={tag:t.HISTORY_MERGE_TAG};exports.LexicalComposer=function({initialConfig:c,children:s}){const l=o.useMemo((()=>{const{theme:o,namespace:n,nodes:i,onError:s,editorState:l,html:d}=c,u=e.createLexicalComposerContext(null,o),m=t.createEditor({editable:c.editable,html:d,namespace:n,nodes:i,onError:e=>s(e,m),theme:o});return function(e,o){if(null===o)return;if(void 0===o)e.update((()=>{const o=t.$getRoot();if(o.isEmpty()){const n=t.$createParagraphNode();o.append(n);const i=r?document.activeElement:null;(null!==t.$getSelection()||null!==i&&i===e.getRootElement())&&n.select()}}),a);else if(null!==o)switch(typeof o){case"string":{const t=e.parseEditorState(o);e.setEditorState(t,a);break}case"object":e.setEditorState(o,a);break;case"function":e.update((()=>{t.$getRoot().isEmpty()&&o(e)}),a)}}(m,l),[m,u]}),[]);return i((()=>{const e=c.editable,[t]=l;t.setEditable(void 0===e||e)}),[]),n.jsx(e.LexicalComposerContext.Provider,{value:l,children:s})};

View File

@@ -0,0 +1,38 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getSectionForNode = getSectionForNode;
function getSectionForNode(n) {
switch (n.type) {
case "ModuleImport":
return "import";
case "CallInstruction":
case "CallIndirectInstruction":
case "Func":
case "Instr":
return "code";
case "ModuleExport":
return "export";
case "Start":
return "start";
case "TypeInstruction":
return "type";
case "IndexInFuncSection":
return "func";
case "Global":
return "global";
// No section
default:
return;
}
}

View File

@@ -0,0 +1,30 @@
{
"name": "truncate-utf8-bytes",
"version": "1.0.2",
"description": "Truncate string to given length in bytes",
"main": "index.js",
"browser": "browser.js",
"scripts": {
"test": "tape test.js"
},
"repository": {
"type": "git",
"url": "git+https://github.com/parshap/truncate-utf8-bytes.git"
},
"keywords": [
"truncate",
"utf8"
],
"author": "Carl Xiong <xiongc05@gmail.com>",
"license": "WTFPL",
"bugs": {
"url": "https://github.com/parshap/truncate-utf8-bytes/issues"
},
"homepage": "https://github.com/parshap/truncate-utf8-bytes#readme",
"devDependencies": {
"tape": "^4.2.2"
},
"dependencies": {
"utf8-byte-length": "^1.0.1"
}
}

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/utilities/isReactComponent.ts"],"sourcesContent":["import type React from 'react'\n\nconst clientRefSymbol = Symbol.for('react.client.reference')\n\nexport function isReactServerComponentOrFunction<T extends any>(\n component: any | React.ComponentType,\n): component is T {\n return typeof component === 'function' && component.$$typeof !== clientRefSymbol\n}\n\nexport function isReactClientComponent<T extends any>(\n component: any | React.ComponentType,\n): component is T {\n return typeof component === 'function' && component.$$typeof === clientRefSymbol\n}\n\nexport function isReactComponentOrFunction<T extends any>(\n component: any | React.ComponentType,\n): component is T {\n return typeof component === 'function'\n}\n"],"names":["clientRefSymbol","Symbol","for","isReactServerComponentOrFunction","component","$$typeof","isReactClientComponent","isReactComponentOrFunction"],"mappings":"AAEA,MAAMA,kBAAkBC,OAAOC,GAAG,CAAC;AAEnC,OAAO,SAASC,iCACdC,SAAoC;IAEpC,OAAO,OAAOA,cAAc,cAAcA,UAAUC,QAAQ,KAAKL;AACnE;AAEA,OAAO,SAASM,uBACdF,SAAoC;IAEpC,OAAO,OAAOA,cAAc,cAAcA,UAAUC,QAAQ,KAAKL;AACnE;AAEA,OAAO,SAASO,2BACdH,SAAoC;IAEpC,OAAO,OAAOA,cAAc;AAC9B"}

View File

@@ -0,0 +1,28 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
*/
"use strict";
const RuntimeGlobals = require("../RuntimeGlobals");
const RuntimeModule = require("../RuntimeModule");
class ChunkNameRuntimeModule extends RuntimeModule {
/**
* @param {string} chunkName the chunk's name
*/
constructor(chunkName) {
super("chunkName");
/** @type {string} */
this.chunkName = chunkName;
}
/**
* @returns {string | null} runtime code
*/
generate() {
return `${RuntimeGlobals.chunkName} = ${JSON.stringify(this.chunkName)};`;
}
}
module.exports = ChunkNameRuntimeModule;

View File

@@ -0,0 +1,24 @@
/**
* @name addWeeks
* @category Week Helpers
* @summary Add the specified number of weeks to the given date.
*
* @description
* Add the specified number of week to the given date.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param date - The date to be changed
* @param amount - The amount of weeks to be added.
*
* @returns The new date with the weeks added
*
* @example
* // Add 4 weeks to 1 September 2014:
* const result = addWeeks(new Date(2014, 8, 1), 4)
* //=> Mon Sep 29 2014 00:00:00
*/
export declare function addWeeks<DateType extends Date>(
date: DateType | number | string,
amount: number,
): DateType;

View File

@@ -0,0 +1,2 @@
export { uk } from '@payloadcms/translations/languages/uk';
//# sourceMappingURL=uk.d.ts.map

View File

@@ -0,0 +1,26 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.Var = exports.User = exports.Statement = exports.SpreadProperty = exports.Scope = exports.RestProperty = exports.ReferencedMemberExpression = exports.ReferencedIdentifier = exports.Referenced = exports.Pure = exports.NumericLiteralTypeAnnotation = exports.Generated = exports.ForAwaitStatement = exports.Flow = exports.Expression = exports.ExistentialTypeParam = exports.BlockScoped = exports.BindingIdentifier = void 0;
const ReferencedIdentifier = exports.ReferencedIdentifier = ["Identifier", "JSXIdentifier"];
const ReferencedMemberExpression = exports.ReferencedMemberExpression = ["MemberExpression"];
const BindingIdentifier = exports.BindingIdentifier = ["Identifier"];
const Statement = exports.Statement = ["Statement"];
const Expression = exports.Expression = ["Expression"];
const Scope = exports.Scope = ["Scopable", "Pattern"];
const Referenced = exports.Referenced = null;
const BlockScoped = exports.BlockScoped = ["FunctionDeclaration", "ClassDeclaration", "VariableDeclaration"];
const Var = exports.Var = ["VariableDeclaration"];
const User = exports.User = null;
const Generated = exports.Generated = null;
const Pure = exports.Pure = null;
const Flow = exports.Flow = ["Flow", "ImportDeclaration", "ExportDeclaration", "ImportSpecifier"];
const RestProperty = exports.RestProperty = ["RestElement"];
const SpreadProperty = exports.SpreadProperty = ["RestElement"];
const ExistentialTypeParam = exports.ExistentialTypeParam = ["ExistsTypeAnnotation"];
const NumericLiteralTypeAnnotation = exports.NumericLiteralTypeAnnotation = ["NumberLiteralTypeAnnotation"];
const ForAwaitStatement = exports.ForAwaitStatement = ["ForOfStatement"];
//# sourceMappingURL=virtual-types.js.map

View File

@@ -0,0 +1,395 @@
Attribution 4.0 International
=======================================================================
Creative Commons Corporation ("Creative Commons") is not a law firm and
does not provide legal services or legal advice. Distribution of
Creative Commons public licenses does not create a lawyer-client or
other relationship. Creative Commons makes its licenses and related
information available on an "as-is" basis. Creative Commons gives no
warranties regarding its licenses, any material licensed under their
terms and conditions, or any related information. Creative Commons
disclaims all liability for damages resulting from their use to the
fullest extent possible.
Using Creative Commons Public Licenses
Creative Commons public licenses provide a standard set of terms and
conditions that creators and other rights holders may use to share
original works of authorship and other material subject to copyright
and certain other rights specified in the public license below. The
following considerations are for informational purposes only, are not
exhaustive, and do not form part of our licenses.
Considerations for licensors: Our public licenses are
intended for use by those authorized to give the public
permission to use material in ways otherwise restricted by
copyright and certain other rights. Our licenses are
irrevocable. Licensors should read and understand the terms
and conditions of the license they choose before applying it.
Licensors should also secure all rights necessary before
applying our licenses so that the public can reuse the
material as expected. Licensors should clearly mark any
material not subject to the license. This includes other CC-
licensed material, or material used under an exception or
limitation to copyright. More considerations for licensors:
wiki.creativecommons.org/Considerations_for_licensors
Considerations for the public: By using one of our public
licenses, a licensor grants the public permission to use the
licensed material under specified terms and conditions. If
the licensor's permission is not necessary for any reason--for
example, because of any applicable exception or limitation to
copyright--then that use is not regulated by the license. Our
licenses grant only permissions under copyright and certain
other rights that a licensor has authority to grant. Use of
the licensed material may still be restricted for other
reasons, including because others have copyright or other
rights in the material. A licensor may make special requests,
such as asking that all changes be marked or described.
Although not required by our licenses, you are encouraged to
respect those requests where reasonable. More_considerations
for the public:
wiki.creativecommons.org/Considerations_for_licensees
=======================================================================
Creative Commons Attribution 4.0 International Public License
By exercising the Licensed Rights (defined below), You accept and agree
to be bound by the terms and conditions of this Creative Commons
Attribution 4.0 International Public License ("Public License"). To the
extent this Public License may be interpreted as a contract, You are
granted the Licensed Rights in consideration of Your acceptance of
these terms and conditions, and the Licensor grants You such rights in
consideration of benefits the Licensor receives from making the
Licensed Material available under these terms and conditions.
Section 1 -- Definitions.
a. Adapted Material means material subject to Copyright and Similar
Rights that is derived from or based upon the Licensed Material
and in which the Licensed Material is translated, altered,
arranged, transformed, or otherwise modified in a manner requiring
permission under the Copyright and Similar Rights held by the
Licensor. For purposes of this Public License, where the Licensed
Material is a musical work, performance, or sound recording,
Adapted Material is always produced where the Licensed Material is
synched in timed relation with a moving image.
b. Adapter's License means the license You apply to Your Copyright
and Similar Rights in Your contributions to Adapted Material in
accordance with the terms and conditions of this Public License.
c. Copyright and Similar Rights means copyright and/or similar rights
closely related to copyright including, without limitation,
performance, broadcast, sound recording, and Sui Generis Database
Rights, without regard to how the rights are labeled or
categorized. For purposes of this Public License, the rights
specified in Section 2(b)(1)-(2) are not Copyright and Similar
Rights.
d. Effective Technological Measures means those measures that, in the
absence of proper authority, may not be circumvented under laws
fulfilling obligations under Article 11 of the WIPO Copyright
Treaty adopted on December 20, 1996, and/or similar international
agreements.
e. Exceptions and Limitations means fair use, fair dealing, and/or
any other exception or limitation to Copyright and Similar Rights
that applies to Your use of the Licensed Material.
f. Licensed Material means the artistic or literary work, database,
or other material to which the Licensor applied this Public
License.
g. Licensed Rights means the rights granted to You subject to the
terms and conditions of this Public License, which are limited to
all Copyright and Similar Rights that apply to Your use of the
Licensed Material and that the Licensor has authority to license.
h. Licensor means the individual(s) or entity(ies) granting rights
under this Public License.
i. Share means to provide material to the public by any means or
process that requires permission under the Licensed Rights, such
as reproduction, public display, public performance, distribution,
dissemination, communication, or importation, and to make material
available to the public including in ways that members of the
public may access the material from a place and at a time
individually chosen by them.
j. Sui Generis Database Rights means rights other than copyright
resulting from Directive 96/9/EC of the European Parliament and of
the Council of 11 March 1996 on the legal protection of databases,
as amended and/or succeeded, as well as other essentially
equivalent rights anywhere in the world.
k. You means the individual or entity exercising the Licensed Rights
under this Public License. Your has a corresponding meaning.
Section 2 -- Scope.
a. License grant.
1. Subject to the terms and conditions of this Public License,
the Licensor hereby grants You a worldwide, royalty-free,
non-sublicensable, non-exclusive, irrevocable license to
exercise the Licensed Rights in the Licensed Material to:
a. reproduce and Share the Licensed Material, in whole or
in part; and
b. produce, reproduce, and Share Adapted Material.
2. Exceptions and Limitations. For the avoidance of doubt, where
Exceptions and Limitations apply to Your use, this Public
License does not apply, and You do not need to comply with
its terms and conditions.
3. Term. The term of this Public License is specified in Section
6(a).
4. Media and formats; technical modifications allowed. The
Licensor authorizes You to exercise the Licensed Rights in
all media and formats whether now known or hereafter created,
and to make technical modifications necessary to do so. The
Licensor waives and/or agrees not to assert any right or
authority to forbid You from making technical modifications
necessary to exercise the Licensed Rights, including
technical modifications necessary to circumvent Effective
Technological Measures. For purposes of this Public License,
simply making modifications authorized by this Section 2(a)
(4) never produces Adapted Material.
5. Downstream recipients.
a. Offer from the Licensor -- Licensed Material. Every
recipient of the Licensed Material automatically
receives an offer from the Licensor to exercise the
Licensed Rights under the terms and conditions of this
Public License.
b. No downstream restrictions. You may not offer or impose
any additional or different terms or conditions on, or
apply any Effective Technological Measures to, the
Licensed Material if doing so restricts exercise of the
Licensed Rights by any recipient of the Licensed
Material.
6. No endorsement. Nothing in this Public License constitutes or
may be construed as permission to assert or imply that You
are, or that Your use of the Licensed Material is, connected
with, or sponsored, endorsed, or granted official status by,
the Licensor or others designated to receive attribution as
provided in Section 3(a)(1)(A)(i).
b. Other rights.
1. Moral rights, such as the right of integrity, are not
licensed under this Public License, nor are publicity,
privacy, and/or other similar personality rights; however, to
the extent possible, the Licensor waives and/or agrees not to
assert any such rights held by the Licensor to the limited
extent necessary to allow You to exercise the Licensed
Rights, but not otherwise.
2. Patent and trademark rights are not licensed under this
Public License.
3. To the extent possible, the Licensor waives any right to
collect royalties from You for the exercise of the Licensed
Rights, whether directly or through a collecting society
under any voluntary or waivable statutory or compulsory
licensing scheme. In all other cases the Licensor expressly
reserves any right to collect such royalties.
Section 3 -- License Conditions.
Your exercise of the Licensed Rights is expressly made subject to the
following conditions.
a. Attribution.
1. If You Share the Licensed Material (including in modified
form), You must:
a. retain the following if it is supplied by the Licensor
with the Licensed Material:
i. identification of the creator(s) of the Licensed
Material and any others designated to receive
attribution, in any reasonable manner requested by
the Licensor (including by pseudonym if
designated);
ii. a copyright notice;
iii. a notice that refers to this Public License;
iv. a notice that refers to the disclaimer of
warranties;
v. a URI or hyperlink to the Licensed Material to the
extent reasonably practicable;
b. indicate if You modified the Licensed Material and
retain an indication of any previous modifications; and
c. indicate the Licensed Material is licensed under this
Public License, and include the text of, or the URI or
hyperlink to, this Public License.
2. You may satisfy the conditions in Section 3(a)(1) in any
reasonable manner based on the medium, means, and context in
which You Share the Licensed Material. For example, it may be
reasonable to satisfy the conditions by providing a URI or
hyperlink to a resource that includes the required
information.
3. If requested by the Licensor, You must remove any of the
information required by Section 3(a)(1)(A) to the extent
reasonably practicable.
4. If You Share Adapted Material You produce, the Adapter's
License You apply must not prevent recipients of the Adapted
Material from complying with this Public License.
Section 4 -- Sui Generis Database Rights.
Where the Licensed Rights include Sui Generis Database Rights that
apply to Your use of the Licensed Material:
a. for the avoidance of doubt, Section 2(a)(1) grants You the right
to extract, reuse, reproduce, and Share all or a substantial
portion of the contents of the database;
b. if You include all or a substantial portion of the database
contents in a database in which You have Sui Generis Database
Rights, then the database in which You have Sui Generis Database
Rights (but not its individual contents) is Adapted Material; and
c. You must comply with the conditions in Section 3(a) if You Share
all or a substantial portion of the contents of the database.
For the avoidance of doubt, this Section 4 supplements and does not
replace Your obligations under this Public License where the Licensed
Rights include other Copyright and Similar Rights.
Section 5 -- Disclaimer of Warranties and Limitation of Liability.
a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
c. The disclaimer of warranties and limitation of liability provided
above shall be interpreted in a manner that, to the extent
possible, most closely approximates an absolute disclaimer and
waiver of all liability.
Section 6 -- Term and Termination.
a. This Public License applies for the term of the Copyright and
Similar Rights licensed here. However, if You fail to comply with
this Public License, then Your rights under this Public License
terminate automatically.
b. Where Your right to use the Licensed Material has terminated under
Section 6(a), it reinstates:
1. automatically as of the date the violation is cured, provided
it is cured within 30 days of Your discovery of the
violation; or
2. upon express reinstatement by the Licensor.
For the avoidance of doubt, this Section 6(b) does not affect any
right the Licensor may have to seek remedies for Your violations
of this Public License.
c. For the avoidance of doubt, the Licensor may also offer the
Licensed Material under separate terms or conditions or stop
distributing the Licensed Material at any time; however, doing so
will not terminate this Public License.
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
License.
Section 7 -- Other Terms and Conditions.
a. The Licensor shall not be bound by any additional or different
terms or conditions communicated by You unless expressly agreed.
b. Any arrangements, understandings, or agreements regarding the
Licensed Material not stated herein are separate from and
independent of the terms and conditions of this Public License.
Section 8 -- Interpretation.
a. For the avoidance of doubt, this Public License does not, and
shall not be interpreted to, reduce, limit, restrict, or impose
conditions on any use of the Licensed Material that could lawfully
be made without permission under this Public License.
b. To the extent possible, if any provision of this Public License is
deemed unenforceable, it shall be automatically reformed to the
minimum extent necessary to make it enforceable. If the provision
cannot be reformed, it shall be severed from this Public License
without affecting the enforceability of the remaining terms and
conditions.
c. No term or condition of this Public License will be waived and no
failure to comply consented to unless expressly agreed to by the
Licensor.
d. Nothing in this Public License constitutes or may be interpreted
as a limitation upon, or waiver of, any privileges and immunities
that apply to the Licensor or You, including from the legal
processes of any jurisdiction or authority.
=======================================================================
Creative Commons is not a party to its public
licenses. Notwithstanding, Creative Commons may elect to apply one of
its public licenses to material it publishes and in those instances
will be considered the “Licensor.” The text of the Creative Commons
public licenses is dedicated to the public domain under the CC0 Public
Domain Dedication. Except for the limited purpose of indicating that
material is shared under a Creative Commons public license or as
otherwise permitted by the Creative Commons policies published at
creativecommons.org/policies, Creative Commons does not authorize the
use of the trademark "Creative Commons" or any other trademark or logo
of Creative Commons without its prior written consent including,
without limitation, in connection with any unauthorized modifications
to any of its public licenses or any other arrangements,
understandings, or agreements concerning use of licensed material. For
the avoidance of doubt, this paragraph does not form part of the
public licenses.
Creative Commons may be contacted at creativecommons.org.

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/sqlite/createJSONQuery/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AA4GzD,eAAO,MAAM,eAAe,iGASzB,mBAAmB,KAAG,MA0BxB,CAAA"}

View File

@@ -0,0 +1,4 @@
import { MetricsAPI } from './api/metrics';
/** Entrypoint for metrics API */
export declare const metrics: MetricsAPI;
//# sourceMappingURL=metrics-api.d.ts.map

View File

@@ -0,0 +1,67 @@
/**
* The `node:string_decoder` module provides an API for decoding `Buffer` objects
* into strings in a manner that preserves encoded multi-byte UTF-8 and UTF-16
* characters. It can be accessed using:
*
* ```js
* import { StringDecoder } from 'node:string_decoder';
* ```
*
* The following example shows the basic use of the `StringDecoder` class.
*
* ```js
* import { StringDecoder } from 'node:string_decoder';
* const decoder = new StringDecoder('utf8');
*
* const cent = Buffer.from([0xC2, 0xA2]);
* console.log(decoder.write(cent)); // Prints: ¢
*
* const euro = Buffer.from([0xE2, 0x82, 0xAC]);
* console.log(decoder.write(euro)); // Prints: €
* ```
*
* When a `Buffer` instance is written to the `StringDecoder` instance, an
* internal buffer is used to ensure that the decoded string does not contain
* any incomplete multibyte characters. These are held in the buffer until the
* next call to `stringDecoder.write()` or until `stringDecoder.end()` is called.
*
* In the following example, the three UTF-8 encoded bytes of the European Euro
* symbol (`€`) are written over three separate operations:
*
* ```js
* import { StringDecoder } from 'node:string_decoder';
* const decoder = new StringDecoder('utf8');
*
* decoder.write(Buffer.from([0xE2]));
* decoder.write(Buffer.from([0x82]));
* console.log(decoder.end(Buffer.from([0xAC]))); // Prints: €
* ```
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/string_decoder.js)
*/
declare module "string_decoder" {
class StringDecoder {
constructor(encoding?: BufferEncoding);
/**
* Returns a decoded string, ensuring that any incomplete multibyte characters at
* the end of the `Buffer`, or `TypedArray`, or `DataView` are omitted from the
* returned string and stored in an internal buffer for the next call to `stringDecoder.write()` or `stringDecoder.end()`.
* @since v0.1.99
* @param buffer The bytes to decode.
*/
write(buffer: string | NodeJS.ArrayBufferView): string;
/**
* Returns any remaining input stored in the internal buffer as a string. Bytes
* representing incomplete UTF-8 and UTF-16 characters will be replaced with
* substitution characters appropriate for the character encoding.
*
* If the `buffer` argument is provided, one final call to `stringDecoder.write()` is performed before returning the remaining input.
* After `end()` is called, the `stringDecoder` object can be reused for new input.
* @since v0.9.3
* @param buffer The bytes to decode.
*/
end(buffer?: string | NodeJS.ArrayBufferView): string;
}
}
declare module "node:string_decoder" {
export * from "string_decoder";
}

View File

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

View File

@@ -0,0 +1,30 @@
import type { FolderOrDocument } from 'payload/shared';
import React from 'react';
import './index.scss';
type Props = {
readonly className?: string;
readonly disabled?: boolean;
readonly folderType?: string[];
readonly id: number | string;
readonly isDeleting?: boolean;
readonly isFocused?: boolean;
readonly isSelected?: boolean;
readonly itemKey: string;
readonly onClick?: (e: React.MouseEvent) => void;
readonly onKeyDown?: (e: React.KeyboardEvent) => void;
readonly PopupActions?: React.ReactNode;
readonly previewUrl?: string;
readonly selectedCount?: number;
readonly title: string;
readonly type: 'file' | 'folder';
};
export declare function FolderFileCard({ id, type, className, disabled, folderType, isDeleting, isFocused, isSelected, itemKey, onClick, onKeyDown, PopupActions, previewUrl, selectedCount, title, }: Props): React.JSX.Element;
type ContextCardProps = {
readonly className?: string;
readonly index: number;
readonly item: FolderOrDocument;
readonly type: 'file' | 'folder';
};
export declare function ContextFolderFileCard({ type, className, index, item }: ContextCardProps): React.JSX.Element;
export {};
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,27 @@
import React from 'react';
import type { ReloadDoc } from '../types.js';
import './index.scss';
type Props = {
readonly allowEdit?: boolean;
readonly allowRemove?: boolean;
readonly alt: string;
readonly byteSize: number;
readonly className?: string;
readonly collectionSlug: string;
readonly displayPreview?: boolean;
readonly filename: string;
readonly id?: number | string;
readonly mimeType: string;
readonly onRemove: () => void;
readonly reloadDoc: ReloadDoc;
readonly showCollectionSlug?: boolean;
readonly src: string;
readonly thumbnailSrc: string;
readonly updatedAt?: string;
readonly withMeta?: boolean;
readonly x?: number;
readonly y?: number;
};
export declare function RelationshipContent(props: Props): React.JSX.Element;
export {};
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,95 @@
'use strict'
const { InvalidArgumentError } = require('../core/errors')
module.exports = class WrapHandler {
#handler
constructor (handler) {
this.#handler = handler
}
static wrap (handler) {
// TODO (fix): More checks...
return handler.onRequestStart ? handler : new WrapHandler(handler)
}
// Unwrap Interface
onConnect (abort, context) {
return this.#handler.onConnect?.(abort, context)
}
onHeaders (statusCode, rawHeaders, resume, statusMessage) {
return this.#handler.onHeaders?.(statusCode, rawHeaders, resume, statusMessage)
}
onUpgrade (statusCode, rawHeaders, socket) {
return this.#handler.onUpgrade?.(statusCode, rawHeaders, socket)
}
onData (data) {
return this.#handler.onData?.(data)
}
onComplete (trailers) {
return this.#handler.onComplete?.(trailers)
}
onError (err) {
if (!this.#handler.onError) {
throw err
}
return this.#handler.onError?.(err)
}
// Wrap Interface
onRequestStart (controller, context) {
this.#handler.onConnect?.((reason) => controller.abort(reason), context)
}
onRequestUpgrade (controller, statusCode, headers, socket) {
const rawHeaders = []
for (const [key, val] of Object.entries(headers)) {
rawHeaders.push(Buffer.from(key), Array.isArray(val) ? val.map(v => Buffer.from(v)) : Buffer.from(val))
}
this.#handler.onUpgrade?.(statusCode, rawHeaders, socket)
}
onResponseStart (controller, statusCode, headers, statusMessage) {
const rawHeaders = []
for (const [key, val] of Object.entries(headers)) {
rawHeaders.push(Buffer.from(key), Array.isArray(val) ? val.map(v => Buffer.from(v)) : Buffer.from(val))
}
if (this.#handler.onHeaders?.(statusCode, rawHeaders, () => controller.resume(), statusMessage) === false) {
controller.pause()
}
}
onResponseData (controller, data) {
if (this.#handler.onData?.(data) === false) {
controller.pause()
}
}
onResponseEnd (controller, trailers) {
const rawTrailers = []
for (const [key, val] of Object.entries(trailers)) {
rawTrailers.push(Buffer.from(key), Array.isArray(val) ? val.map(v => Buffer.from(v)) : Buffer.from(val))
}
this.#handler.onComplete?.(rawTrailers)
}
onResponseError (controller, err) {
if (!this.#handler.onError) {
throw new InvalidArgumentError('invalid onError method')
}
this.#handler.onError?.(err)
}
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"sigma-square.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"joystick.js","sources":["../../../src/icons/joystick.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Joystick\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMjEgMTdhMiAyIDAgMCAwLTItMkg1YTIgMiAwIDAgMC0yIDJ2MmEyIDIgMCAwIDAgMiAyaDE0YTIgMiAwIDAgMCAyLTJ2LTJaIiAvPgogIDxwYXRoIGQ9Ik02IDE1di0yIiAvPgogIDxwYXRoIGQ9Ik0xMiAxNVY5IiAvPgogIDxjaXJjbGUgY3g9IjEyIiBjeT0iNiIgcj0iMyIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/joystick\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Joystick = createLucideIcon('Joystick', [\n [\n 'path',\n {\n d: 'M21 17a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-2Z',\n key: 'jg2n2t',\n },\n ],\n ['path', { d: 'M6 15v-2', key: 'gd6mvg' }],\n ['path', { d: 'M12 15V9', key: '8c7uyn' }],\n ['circle', { cx: '12', cy: '6', r: '3', key: '1gm2ql' }],\n]);\n\nexport default Joystick;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,iBAAiB,UAAY,CAAA,CAAA,CAAA;AAAA,CAC5C,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA,CAAA;AAAA,CAAA,CACA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CACzC,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,GAAA,CAAK,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA;AACzD,CAAC,CAAA,CAAA;;"}

View File

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

View File

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

View File

@@ -0,0 +1,580 @@
'use strict'
const assert = require('node:assert')
const { Readable } = require('node:stream')
const { RequestAbortedError, NotSupportedError, InvalidArgumentError, AbortError } = require('../core/errors')
const util = require('../core/util')
const { ReadableStreamFrom } = require('../core/util')
const kConsume = Symbol('kConsume')
const kReading = Symbol('kReading')
const kBody = Symbol('kBody')
const kAbort = Symbol('kAbort')
const kContentType = Symbol('kContentType')
const kContentLength = Symbol('kContentLength')
const kUsed = Symbol('kUsed')
const kBytesRead = Symbol('kBytesRead')
const noop = () => {}
/**
* @class
* @extends {Readable}
* @see https://fetch.spec.whatwg.org/#body
*/
class BodyReadable extends Readable {
/**
* @param {object} opts
* @param {(this: Readable, size: number) => void} opts.resume
* @param {() => (void | null)} opts.abort
* @param {string} [opts.contentType = '']
* @param {number} [opts.contentLength]
* @param {number} [opts.highWaterMark = 64 * 1024]
*/
constructor ({
resume,
abort,
contentType = '',
contentLength,
highWaterMark = 64 * 1024 // Same as nodejs fs streams.
}) {
super({
autoDestroy: true,
read: resume,
highWaterMark
})
this._readableState.dataEmitted = false
this[kAbort] = abort
/** @type {Consume | null} */
this[kConsume] = null
/** @type {number} */
this[kBytesRead] = 0
/** @type {ReadableStream|null} */
this[kBody] = null
/** @type {boolean} */
this[kUsed] = false
/** @type {string} */
this[kContentType] = contentType
/** @type {number|null} */
this[kContentLength] = Number.isFinite(contentLength) ? contentLength : null
/**
* Is stream being consumed through Readable API?
* This is an optimization so that we avoid checking
* for 'data' and 'readable' listeners in the hot path
* inside push().
*
* @type {boolean}
*/
this[kReading] = false
}
/**
* @param {Error|null} err
* @param {(error:(Error|null)) => void} callback
* @returns {void}
*/
_destroy (err, callback) {
if (!err && !this._readableState.endEmitted) {
err = new RequestAbortedError()
}
if (err) {
this[kAbort]()
}
// Workaround for Node "bug". If the stream is destroyed in same
// tick as it is created, then a user who is waiting for a
// promise (i.e micro tick) for installing an 'error' listener will
// never get a chance and will always encounter an unhandled exception.
if (!this[kUsed]) {
setImmediate(callback, err)
} else {
callback(err)
}
}
/**
* @param {string|symbol} event
* @param {(...args: any[]) => void} listener
* @returns {this}
*/
on (event, listener) {
if (event === 'data' || event === 'readable') {
this[kReading] = true
this[kUsed] = true
}
return super.on(event, listener)
}
/**
* @param {string|symbol} event
* @param {(...args: any[]) => void} listener
* @returns {this}
*/
addListener (event, listener) {
return this.on(event, listener)
}
/**
* @param {string|symbol} event
* @param {(...args: any[]) => void} listener
* @returns {this}
*/
off (event, listener) {
const ret = super.off(event, listener)
if (event === 'data' || event === 'readable') {
this[kReading] = (
this.listenerCount('data') > 0 ||
this.listenerCount('readable') > 0
)
}
return ret
}
/**
* @param {string|symbol} event
* @param {(...args: any[]) => void} listener
* @returns {this}
*/
removeListener (event, listener) {
return this.off(event, listener)
}
/**
* @param {Buffer|null} chunk
* @returns {boolean}
*/
push (chunk) {
if (chunk) {
this[kBytesRead] += chunk.length
if (this[kConsume]) {
consumePush(this[kConsume], chunk)
return this[kReading] ? super.push(chunk) : true
}
}
return super.push(chunk)
}
/**
* Consumes and returns the body as a string.
*
* @see https://fetch.spec.whatwg.org/#dom-body-text
* @returns {Promise<string>}
*/
text () {
return consume(this, 'text')
}
/**
* Consumes and returns the body as a JavaScript Object.
*
* @see https://fetch.spec.whatwg.org/#dom-body-json
* @returns {Promise<unknown>}
*/
json () {
return consume(this, 'json')
}
/**
* Consumes and returns the body as a Blob
*
* @see https://fetch.spec.whatwg.org/#dom-body-blob
* @returns {Promise<Blob>}
*/
blob () {
return consume(this, 'blob')
}
/**
* Consumes and returns the body as an Uint8Array.
*
* @see https://fetch.spec.whatwg.org/#dom-body-bytes
* @returns {Promise<Uint8Array>}
*/
bytes () {
return consume(this, 'bytes')
}
/**
* Consumes and returns the body as an ArrayBuffer.
*
* @see https://fetch.spec.whatwg.org/#dom-body-arraybuffer
* @returns {Promise<ArrayBuffer>}
*/
arrayBuffer () {
return consume(this, 'arrayBuffer')
}
/**
* Not implemented
*
* @see https://fetch.spec.whatwg.org/#dom-body-formdata
* @throws {NotSupportedError}
*/
async formData () {
// TODO: Implement.
throw new NotSupportedError()
}
/**
* Returns true if the body is not null and the body has been consumed.
* Otherwise, returns false.
*
* @see https://fetch.spec.whatwg.org/#dom-body-bodyused
* @readonly
* @returns {boolean}
*/
get bodyUsed () {
return util.isDisturbed(this)
}
/**
* @see https://fetch.spec.whatwg.org/#dom-body-body
* @readonly
* @returns {ReadableStream}
*/
get body () {
if (!this[kBody]) {
this[kBody] = ReadableStreamFrom(this)
if (this[kConsume]) {
// TODO: Is this the best way to force a lock?
this[kBody].getReader() // Ensure stream is locked.
assert(this[kBody].locked)
}
}
return this[kBody]
}
/**
* Dumps the response body by reading `limit` number of bytes.
* @param {object} opts
* @param {number} [opts.limit = 131072] Number of bytes to read.
* @param {AbortSignal} [opts.signal] An AbortSignal to cancel the dump.
* @returns {Promise<null>}
*/
dump (opts) {
const signal = opts?.signal
if (signal != null && (typeof signal !== 'object' || !('aborted' in signal))) {
return Promise.reject(new InvalidArgumentError('signal must be an AbortSignal'))
}
const limit = opts?.limit && Number.isFinite(opts.limit)
? opts.limit
: 128 * 1024
if (signal?.aborted) {
return Promise.reject(signal.reason ?? new AbortError())
}
if (this._readableState.closeEmitted) {
return Promise.resolve(null)
}
return new Promise((resolve, reject) => {
if (
(this[kContentLength] && (this[kContentLength] > limit)) ||
this[kBytesRead] > limit
) {
this.destroy(new AbortError())
}
if (signal) {
const onAbort = () => {
this.destroy(signal.reason ?? new AbortError())
}
signal.addEventListener('abort', onAbort)
this
.on('close', function () {
signal.removeEventListener('abort', onAbort)
if (signal.aborted) {
reject(signal.reason ?? new AbortError())
} else {
resolve(null)
}
})
} else {
this.on('close', resolve)
}
this
.on('error', noop)
.on('data', () => {
if (this[kBytesRead] > limit) {
this.destroy()
}
})
.resume()
})
}
/**
* @param {BufferEncoding} encoding
* @returns {this}
*/
setEncoding (encoding) {
if (Buffer.isEncoding(encoding)) {
this._readableState.encoding = encoding
}
return this
}
}
/**
* @see https://streams.spec.whatwg.org/#readablestream-locked
* @param {BodyReadable} bodyReadable
* @returns {boolean}
*/
function isLocked (bodyReadable) {
// Consume is an implicit lock.
return bodyReadable[kBody]?.locked === true || bodyReadable[kConsume] !== null
}
/**
* @see https://fetch.spec.whatwg.org/#body-unusable
* @param {BodyReadable} bodyReadable
* @returns {boolean}
*/
function isUnusable (bodyReadable) {
return util.isDisturbed(bodyReadable) || isLocked(bodyReadable)
}
/**
* @typedef {'text' | 'json' | 'blob' | 'bytes' | 'arrayBuffer'} ConsumeType
*/
/**
* @template {ConsumeType} T
* @typedef {T extends 'text' ? string :
* T extends 'json' ? unknown :
* T extends 'blob' ? Blob :
* T extends 'arrayBuffer' ? ArrayBuffer :
* T extends 'bytes' ? Uint8Array :
* never
* } ConsumeReturnType
*/
/**
* @typedef {object} Consume
* @property {ConsumeType} type
* @property {BodyReadable} stream
* @property {((value?: any) => void)} resolve
* @property {((err: Error) => void)} reject
* @property {number} length
* @property {Buffer[]} body
*/
/**
* @template {ConsumeType} T
* @param {BodyReadable} stream
* @param {T} type
* @returns {Promise<ConsumeReturnType<T>>}
*/
function consume (stream, type) {
assert(!stream[kConsume])
return new Promise((resolve, reject) => {
if (isUnusable(stream)) {
const rState = stream._readableState
if (rState.destroyed && rState.closeEmitted === false) {
stream
.on('error', reject)
.on('close', () => {
reject(new TypeError('unusable'))
})
} else {
reject(rState.errored ?? new TypeError('unusable'))
}
} else {
queueMicrotask(() => {
stream[kConsume] = {
type,
stream,
resolve,
reject,
length: 0,
body: []
}
stream
.on('error', function (err) {
consumeFinish(this[kConsume], err)
})
.on('close', function () {
if (this[kConsume].body !== null) {
consumeFinish(this[kConsume], new RequestAbortedError())
}
})
consumeStart(stream[kConsume])
})
}
})
}
/**
* @param {Consume} consume
* @returns {void}
*/
function consumeStart (consume) {
if (consume.body === null) {
return
}
const { _readableState: state } = consume.stream
if (state.bufferIndex) {
const start = state.bufferIndex
const end = state.buffer.length
for (let n = start; n < end; n++) {
consumePush(consume, state.buffer[n])
}
} else {
for (const chunk of state.buffer) {
consumePush(consume, chunk)
}
}
if (state.endEmitted) {
consumeEnd(this[kConsume], this._readableState.encoding)
} else {
consume.stream.on('end', function () {
consumeEnd(this[kConsume], this._readableState.encoding)
})
}
consume.stream.resume()
while (consume.stream.read() != null) {
// Loop
}
}
/**
* @param {Buffer[]} chunks
* @param {number} length
* @param {BufferEncoding} [encoding='utf8']
* @returns {string}
*/
function chunksDecode (chunks, length, encoding) {
if (chunks.length === 0 || length === 0) {
return ''
}
const buffer = chunks.length === 1 ? chunks[0] : Buffer.concat(chunks, length)
const bufferLength = buffer.length
// Skip BOM.
const start =
bufferLength > 2 &&
buffer[0] === 0xef &&
buffer[1] === 0xbb &&
buffer[2] === 0xbf
? 3
: 0
if (!encoding || encoding === 'utf8' || encoding === 'utf-8') {
return buffer.utf8Slice(start, bufferLength)
} else {
return buffer.subarray(start, bufferLength).toString(encoding)
}
}
/**
* @param {Buffer[]} chunks
* @param {number} length
* @returns {Uint8Array}
*/
function chunksConcat (chunks, length) {
if (chunks.length === 0 || length === 0) {
return new Uint8Array(0)
}
if (chunks.length === 1) {
// fast-path
return new Uint8Array(chunks[0])
}
const buffer = new Uint8Array(Buffer.allocUnsafeSlow(length).buffer)
let offset = 0
for (let i = 0; i < chunks.length; ++i) {
const chunk = chunks[i]
buffer.set(chunk, offset)
offset += chunk.length
}
return buffer
}
/**
* @param {Consume} consume
* @param {BufferEncoding} encoding
* @returns {void}
*/
function consumeEnd (consume, encoding) {
const { type, body, resolve, stream, length } = consume
try {
if (type === 'text') {
resolve(chunksDecode(body, length, encoding))
} else if (type === 'json') {
resolve(JSON.parse(chunksDecode(body, length, encoding)))
} else if (type === 'arrayBuffer') {
resolve(chunksConcat(body, length).buffer)
} else if (type === 'blob') {
resolve(new Blob(body, { type: stream[kContentType] }))
} else if (type === 'bytes') {
resolve(chunksConcat(body, length))
}
consumeFinish(consume)
} catch (err) {
stream.destroy(err)
}
}
/**
* @param {Consume} consume
* @param {Buffer} chunk
* @returns {void}
*/
function consumePush (consume, chunk) {
consume.length += chunk.length
consume.body.push(chunk)
}
/**
* @param {Consume} consume
* @param {Error} [err]
* @returns {void}
*/
function consumeFinish (consume, err) {
if (consume.body === null) {
return
}
if (err) {
consume.reject(err)
} else {
consume.resolve()
}
// Reset the consume object to allow for garbage collection.
consume.type = null
consume.stream = null
consume.resolve = null
consume.reject = null
consume.length = 0
consume.body = null
}
module.exports = {
Readable: BodyReadable,
chunksDecode
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"percent-square.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}

View File

@@ -0,0 +1,29 @@
import type { MarkOptional } from 'ts-essentials';
import type { ClientField, NamedTab, TabsField, TabsFieldClient, UnnamedTab } from '../../fields/config/types.js';
import type { FieldErrorClientComponent, FieldErrorServerComponent } from '../forms/Error.js';
import type { ClientFieldBase, FieldClientComponent, FieldPaths, FieldServerComponent, ServerFieldBase } from '../forms/Field.js';
import type { FieldDescriptionClientComponent, FieldDescriptionServerComponent, FieldDiffClientComponent, FieldDiffServerComponent, FieldLabelClientComponent, FieldLabelServerComponent } from '../types.js';
export type ClientTab = ({
fields: ClientField[];
passesCondition?: boolean;
readonly path?: string;
} & Omit<NamedTab, 'fields'>) | ({
fields: ClientField[];
passesCondition?: boolean;
} & Omit<UnnamedTab, 'fields'>);
type TabsFieldBaseClientProps = FieldPaths;
type TabsFieldClientWithoutType = MarkOptional<TabsFieldClient, 'type'>;
export type TabsFieldClientProps = ClientFieldBase<TabsFieldClientWithoutType> & TabsFieldBaseClientProps;
export type TabsFieldServerProps = ServerFieldBase<TabsField, TabsFieldClientWithoutType>;
export type TabsFieldServerComponent = FieldServerComponent<TabsField, TabsFieldClientWithoutType>;
export type TabsFieldClientComponent = FieldClientComponent<TabsFieldClientWithoutType, TabsFieldBaseClientProps>;
export type TabsFieldLabelServerComponent = FieldLabelServerComponent<TabsField, TabsFieldClientWithoutType>;
export type TabsFieldLabelClientComponent = FieldLabelClientComponent<TabsFieldClientWithoutType>;
export type TabsFieldDescriptionServerComponent = FieldDescriptionServerComponent<TabsField, TabsFieldClientWithoutType>;
export type TabsFieldDescriptionClientComponent = FieldDescriptionClientComponent<TabsFieldClientWithoutType>;
export type TabsFieldErrorServerComponent = FieldErrorServerComponent<TabsField, TabsFieldClientWithoutType>;
export type TabsFieldErrorClientComponent = FieldErrorClientComponent<TabsFieldClientWithoutType>;
export type TabsFieldDiffServerComponent = FieldDiffServerComponent<TabsField, TabsFieldClient>;
export type TabsFieldDiffClientComponent = FieldDiffClientComponent<TabsFieldClient>;
export {};
//# sourceMappingURL=Tabs.d.ts.map

View File

@@ -0,0 +1,17 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
import type { LexicalEditor } from 'lexical';
import type { JSX } from 'react';
import * as React from 'react';
type ErrorBoundaryProps = {
children: JSX.Element;
onError: (error: Error) => void;
};
export type ErrorBoundaryType = React.ComponentClass<ErrorBoundaryProps> | React.FC<ErrorBoundaryProps>;
export declare function useDecorators(editor: LexicalEditor, ErrorBoundary: ErrorBoundaryType): Array<JSX.Element>;
export {};

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 AlignHorizontalSpaceBetween = createLucideIcon("AlignHorizontalSpaceBetween", [
["rect", { width: "6", height: "14", x: "3", y: "5", rx: "2", key: "j77dae" }],
["rect", { width: "6", height: "10", x: "15", y: "7", rx: "2", key: "bq30hj" }],
["path", { d: "M3 2v20", key: "1d2pfg" }],
["path", { d: "M21 2v20", key: "p059bm" }]
]);
export { AlignHorizontalSpaceBetween as default };
//# sourceMappingURL=align-horizontal-space-between.js.map

View File

@@ -0,0 +1,21 @@
import { interpolate } from './interpolate.mjs';
const isCustomValueType = (v) => {
return v && typeof v === "object" && v.mix;
};
const getMixer = (v) => (isCustomValueType(v) ? v.mix : undefined);
function transform(...args) {
const useImmediate = !Array.isArray(args[0]);
const argOffset = useImmediate ? 0 : -1;
const inputValue = args[0 + argOffset];
const inputRange = args[1 + argOffset];
const outputRange = args[2 + argOffset];
const options = args[3 + argOffset];
const interpolator = interpolate(inputRange, outputRange, {
mixer: getMixer(outputRange[0]),
...options,
});
return useImmediate ? interpolator(inputValue) : interpolator;
}
export { transform };

View File

@@ -0,0 +1,48 @@
// Vendored from: https://github.com/vercel/next.js/blob/canary/packages/next/src/lib/client-and-server-references.ts
function extractInfoFromServerReferenceId(id) {
const infoByte = parseInt(id.slice(0, 2), 16);
// eslint-disable-next-line no-bitwise
const typeBit = (infoByte >> 7) & 0x1;
// eslint-disable-next-line no-bitwise
const argMask = (infoByte >> 1) & 0x3f;
// eslint-disable-next-line no-bitwise
const restArgs = infoByte & 0x1;
const usedArgs = Array(6);
for (let index = 0; index < 6; index++) {
const bitPosition = 5 - index;
// eslint-disable-next-line no-bitwise
const bit = (argMask >> bitPosition) & 0x1;
usedArgs[index] = bit === 1;
}
return {
type: typeBit === 1 ? 'use-cache' : 'server-action',
usedArgs: usedArgs ,
hasRestArgs: restArgs === 1,
};
}
function isServerReference(value) {
return value.$$typeof === Symbol.for('react.server.reference');
}
/**
* Check if the function is a use cache function.
*
* @param value - The function to check.
* @returns true if the function is a use cache function, false otherwise.
*/
function isUseCacheFunction(value) {
if (!isServerReference(value)) {
return false;
}
const { type } = extractInfoFromServerReferenceId(value.$$id);
return type === 'use-cache';
}
export { isUseCacheFunction };
//# sourceMappingURL=isUseCacheFunction.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"createTableName.d.ts","sourceRoot":"","sources":["../src/createTableName.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAK/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAEhD,KAAK,IAAI,GAAG;IACV,OAAO,EAAE,IAAI,CAAC,cAAc,EAAE,cAAc,GAAG,gBAAgB,CAAC,CAAA;IAChE,8CAA8C;IAC9C,MAAM,EAAE;QACN,MAAM,CAAC,EAAE,gBAAgB,CAAA;QACzB,QAAQ,CAAC,EAAE,gBAAgB,CAAA;QAC3B,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,IAAI,CAAC,EAAE,MAAM,CAAA;KACd,CAAA;IACD,mGAAmG;IACnG,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,mFAAmF;IACnF,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,uHAAuH;IACvH,MAAM,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAA;IAC9B,uFAAuF;IACvF,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,mIAAmI;IACnI,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,mHAAmH;IACnH,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAC7B,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,eAAe,sIAUzB,IAAI,KAAG,MA2CT,CAAA"}

View File

@@ -0,0 +1,47 @@
'use strict'
module.exports = {
mapHttpResponse,
resSerializer
}
const rawSymbol = Symbol('pino-raw-res-ref')
const pinoResProto = Object.create({}, {
statusCode: {
enumerable: true,
writable: true,
value: 0
},
headers: {
enumerable: true,
writable: true,
value: ''
},
raw: {
enumerable: false,
get: function () {
return this[rawSymbol]
},
set: function (val) {
this[rawSymbol] = val
}
}
})
Object.defineProperty(pinoResProto, rawSymbol, {
writable: true,
value: {}
})
function resSerializer (res) {
const _res = Object.create(pinoResProto)
_res.statusCode = res.headersSent ? res.statusCode : null
_res.headers = res.getHeaders ? res.getHeaders() : res._headers
_res.raw = res
return _res
}
function mapHttpResponse (res) {
return {
res: resSerializer(res)
}
}

View File

@@ -0,0 +1,41 @@
var baseAssignValue = require('./_baseAssignValue'),
createAggregator = require('./_createAggregator');
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* Creates an object composed of keys generated from the results of running
* each element of `collection` thru `iteratee`. The order of grouped values
* is determined by the order they occur in `collection`. The corresponding
* value of each key is an array of elements responsible for generating the
* key. The iteratee is invoked with one argument: (value).
*
* @static
* @memberOf _
* @since 0.1.0
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} [iteratee=_.identity] The iteratee to transform keys.
* @returns {Object} Returns the composed aggregate object.
* @example
*
* _.groupBy([6.1, 4.2, 6.3], Math.floor);
* // => { '4': [4.2], '6': [6.1, 6.3] }
*
* // The `_.property` iteratee shorthand.
* _.groupBy(['one', 'two', 'three'], 'length');
* // => { '3': ['one', 'two'], '5': ['three'] }
*/
var groupBy = createAggregator(function(result, value, key) {
if (hasOwnProperty.call(result, key)) {
result[key].push(value);
} else {
baseAssignValue(result, key, [value]);
}
});
module.exports = groupBy;

View File

@@ -0,0 +1,66 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
/** @typedef {import("estree").ArrowFunctionExpression} ArrowFunctionExpression */
/** @typedef {import("estree").Expression} Expression */
/** @typedef {import("estree").FunctionExpression} FunctionExpression */
/** @typedef {import("estree").SpreadElement} SpreadElement */
/** @typedef {{ fn: FunctionExpression | ArrowFunctionExpression, expressions: (Expression | SpreadElement)[], needThis: boolean | undefined }} FunctionExpressionResult */
/**
* @param {Expression | SpreadElement} expr expressions
* @returns {FunctionExpressionResult | undefined} function expression with additional information
*/
module.exports = (expr) => {
// <FunctionExpression>
if (
expr.type === "FunctionExpression" ||
expr.type === "ArrowFunctionExpression"
) {
return {
fn: expr,
expressions: [],
needThis: false
};
}
// <FunctionExpression>.bind(<Expression>)
if (
expr.type === "CallExpression" &&
expr.callee.type === "MemberExpression" &&
expr.callee.object.type === "FunctionExpression" &&
expr.callee.property.type === "Identifier" &&
expr.callee.property.name === "bind" &&
expr.arguments.length === 1
) {
return {
fn: expr.callee.object,
expressions: [expr.arguments[0]],
needThis: undefined
};
}
// (function(_this) {return <FunctionExpression>})(this) (Coffeescript)
if (
expr.type === "CallExpression" &&
expr.callee.type === "FunctionExpression" &&
expr.callee.body.type === "BlockStatement" &&
expr.arguments.length === 1 &&
expr.arguments[0].type === "ThisExpression" &&
expr.callee.body.body &&
expr.callee.body.body.length === 1 &&
expr.callee.body.body[0].type === "ReturnStatement" &&
expr.callee.body.body[0].argument &&
expr.callee.body.body[0].argument.type === "FunctionExpression"
) {
return {
fn: expr.callee.body.body[0].argument,
expressions: [],
needThis: true
};
}
};

View File

@@ -0,0 +1,30 @@
// export const sizeReducer: (state, action) => {
// switch (action.type) {
// case 'width':
// return { ...state, width: action.value }
// case 'height':
// return { ...state, height: action.value }
// default:
// return { ...state, ...(action?.value || {}) }
// }
// },
export const sizeReducer = (state, action) => {
switch (action.type) {
case 'height':
return {
...state,
height: action.value
};
case 'width':
return {
...state,
width: action.value
};
default:
return {
...state,
...(action?.value || {})
};
}
};
//# sourceMappingURL=sizeReducer.js.map

View File

@@ -0,0 +1,12 @@
import { MergeCoreCollection } from "../types/schema.cjs";
//#region src/schema/translation.d.ts
type DirectusTranslation<Schema = any> = MergeCoreCollection<Schema, 'directus_translations', {
id: string;
language: string;
key: string;
value: string;
}>;
//#endregion
export { DirectusTranslation };
//# sourceMappingURL=translation.d.cts.map

View File

@@ -0,0 +1,62 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const ContextDependency = require("./ContextDependency");
/** @typedef {import("webpack-sources").ReplaceSource} ReplaceSource */
/** @typedef {import("../javascript/JavascriptParser").Range} Range */
/** @typedef {import("../Dependency")} Dependency */
/** @typedef {import("../DependencyTemplate").DependencyTemplateContext} DependencyTemplateContext */
class ContextDependencyTemplateAsRequireCall
extends ContextDependency.Template
{
/**
* @param {Dependency} dependency the dependency for which the template should be applied
* @param {ReplaceSource} source the current replace source which can be modified
* @param {DependencyTemplateContext} templateContext the context object
* @returns {void}
*/
apply(
dependency,
source,
{ runtimeTemplate, moduleGraph, chunkGraph, runtimeRequirements }
) {
const dep = /** @type {ContextDependency} */ (dependency);
let moduleExports = runtimeTemplate.moduleExports({
module: moduleGraph.getModule(dep),
chunkGraph,
request: /** @type {string} */ (dep.request),
runtimeRequirements
});
if (dep.inShorthand) {
moduleExports = `${dep.inShorthand}: ${moduleExports}`;
}
const range = /** @type {Range} */ (dep.range);
if (moduleGraph.getModule(dep)) {
if (dep.valueRange) {
if (Array.isArray(dep.replaces)) {
for (let i = 0; i < dep.replaces.length; i++) {
const rep = dep.replaces[i];
source.replace(rep.range[0], rep.range[1] - 1, rep.value);
}
}
source.replace(dep.valueRange[1], range[1] - 1, ")");
source.replace(range[0], dep.valueRange[0] - 1, `${moduleExports}(`);
} else {
source.replace(range[0], range[1] - 1, moduleExports);
}
} else {
source.replace(range[0], range[1] - 1, moduleExports);
}
}
}
module.exports = ContextDependencyTemplateAsRequireCall;

View File

@@ -0,0 +1,307 @@
import { status as httpStatus } from 'http-status';
import { executeAccess } from '../../auth/executeAccess.js';
import { hasWhereAccessResult } from '../../auth/types.js';
import { combineQueries } from '../../database/combineQueries.js';
import { APIError, Forbidden, NotFound } from '../../errors/index.js';
import { afterChange } from '../../fields/hooks/afterChange/index.js';
import { afterRead } from '../../fields/hooks/afterRead/index.js';
import { beforeChange } from '../../fields/hooks/beforeChange/index.js';
import { beforeValidate } from '../../fields/hooks/beforeValidate/index.js';
import { commitTransaction } from '../../utilities/commitTransaction.js';
import { deepCopyObjectSimple } from '../../utilities/deepCopyObject.js';
import { hasDraftValidationEnabled } from '../../utilities/getVersionsConfig.js';
import { initTransaction } from '../../utilities/initTransaction.js';
import { killTransaction } from '../../utilities/killTransaction.js';
import { sanitizeSelect } from '../../utilities/sanitizeSelect.js';
import { getLatestCollectionVersion } from '../../versions/getLatestCollectionVersion.js';
import { saveVersion } from '../../versions/saveVersion.js';
import { buildAfterOperation } from './utilities/buildAfterOperation.js';
import { buildBeforeOperation } from './utilities/buildBeforeOperation.js';
export const restoreVersionOperation = async (args)=>{
const { id, collection: { config: collectionConfig }, depth, draft: draftArg = false, overrideAccess = false, populate, req, req: { fallbackLocale, locale, payload }, select: incomingSelect, showHiddenFields } = args;
try {
const shouldCommit = !args.disableTransaction && await initTransaction(args.req);
// /////////////////////////////////////
// beforeOperation - Collection
// /////////////////////////////////////
args = await buildBeforeOperation({
args,
collection: args.collection.config,
operation: 'restoreVersion',
overrideAccess
});
if (!id) {
throw new APIError('Missing ID of version to restore.', httpStatus.BAD_REQUEST);
}
// /////////////////////////////////////
// Retrieve original raw version
// /////////////////////////////////////
const { docs: versionDocs } = await req.payload.db.findVersions({
collection: collectionConfig.slug,
limit: 1,
locale: locale,
pagination: false,
req,
where: {
id: {
equals: id
}
}
});
const [rawVersionToRestore] = versionDocs;
if (!rawVersionToRestore) {
throw new NotFound(req.t);
}
const { parent: parentDocID, version: versionToRestoreWithLocales } = rawVersionToRestore;
// /////////////////////////////////////
// Access
// /////////////////////////////////////
const accessResults = !overrideAccess ? await executeAccess({
id: parentDocID,
req
}, collectionConfig.access.update) : true;
const hasWherePolicy = hasWhereAccessResult(accessResults);
// /////////////////////////////////////
// Retrieve document
// /////////////////////////////////////
const findOneArgs = {
collection: collectionConfig.slug,
locale: locale,
req,
where: combineQueries({
id: {
equals: parentDocID
}
}, accessResults)
};
// Get the document from the non versioned collection
const doc = await req.payload.db.findOne(findOneArgs);
if (!doc && !hasWherePolicy) {
throw new NotFound(req.t);
}
if (!doc && hasWherePolicy) {
throw new Forbidden(req.t);
}
if (collectionConfig.trash && doc?.deletedAt) {
throw new APIError(`Cannot restore a version of a trashed document (ID: ${parentDocID}). Restore the document first.`, httpStatus.FORBIDDEN);
}
// /////////////////////////////////////
// fetch previousDoc
// /////////////////////////////////////
const prevDocWithLocales = await getLatestCollectionVersion({
id: parentDocID,
config: collectionConfig,
payload,
query: findOneArgs,
req
});
// originalDoc with hoisted localized data
const originalDoc = await afterRead({
collection: collectionConfig,
context: req.context,
depth: 0,
doc: deepCopyObjectSimple(prevDocWithLocales),
draft: draftArg,
fallbackLocale: null,
global: null,
locale: locale,
overrideAccess: true,
req,
showHiddenFields: true
});
// version data with hoisted localized data
const prevVersionDoc = await afterRead({
collection: collectionConfig,
context: req.context,
depth: 0,
doc: deepCopyObjectSimple(rawVersionToRestore.version),
draft: draftArg,
fallbackLocale: null,
global: null,
locale: locale,
overrideAccess: true,
req,
showHiddenFields: true
});
// /////////////////////////////////////
// beforeValidate - Fields
// /////////////////////////////////////
let data = await beforeValidate({
id: parentDocID,
collection: collectionConfig,
context: req.context,
data: deepCopyObjectSimple(prevVersionDoc),
doc: originalDoc,
global: null,
operation: 'update',
overrideAccess,
req
});
// /////////////////////////////////////
// beforeValidate - Collection
// /////////////////////////////////////
if (collectionConfig.hooks?.beforeValidate?.length) {
for (const hook of collectionConfig.hooks.beforeValidate){
data = await hook({
collection: collectionConfig,
context: req.context,
data,
operation: 'update',
originalDoc,
req
}) || data;
}
}
// /////////////////////////////////////
// beforeChange - Collection
// /////////////////////////////////////
if (collectionConfig.hooks?.beforeChange?.length) {
for (const hook of collectionConfig.hooks.beforeChange){
data = await hook({
collection: collectionConfig,
context: req.context,
data,
operation: 'update',
originalDoc,
req
}) || data;
}
}
// /////////////////////////////////////
// beforeChange - Fields
// /////////////////////////////////////
let result = await beforeChange({
id: parentDocID,
collection: collectionConfig,
context: req.context,
data: {
...data,
id: parentDocID
},
doc: originalDoc,
docWithLocales: versionToRestoreWithLocales,
global: null,
operation: 'update',
overrideAccess,
req,
skipValidation: draftArg && !hasDraftValidationEnabled(collectionConfig)
});
// /////////////////////////////////////
// Update
// /////////////////////////////////////
const select = sanitizeSelect({
fields: collectionConfig.flattenedFields,
forceSelect: collectionConfig.forceSelect,
select: incomingSelect
});
// Ensure updatedAt date is always updated
result.updatedAt = new Date().toISOString();
// Ensure status respects restoreAsDraft arg
result._status = draftArg ? 'draft' : result._status;
if (!draftArg) {
result = await req.payload.db.updateOne({
id: parentDocID,
collection: collectionConfig.slug,
data: result,
req,
select
});
}
// /////////////////////////////////////
// Save restored doc as a new version
// /////////////////////////////////////
result = await saveVersion({
id: parentDocID,
autosave: false,
collection: collectionConfig,
docWithLocales: result,
draft: draftArg,
operation: 'restoreVersion',
payload,
req,
select
});
// /////////////////////////////////////
// afterRead - Fields
// /////////////////////////////////////
result = await afterRead({
collection: collectionConfig,
context: req.context,
depth: depth,
doc: result,
// @ts-expect-error - vestiges of when tsconfig was not strict. Feel free to improve
draft: undefined,
fallbackLocale: fallbackLocale,
global: null,
locale: locale,
overrideAccess,
populate,
req,
select,
showHiddenFields: showHiddenFields
});
// /////////////////////////////////////
// afterRead - Collection
// /////////////////////////////////////
if (collectionConfig.hooks?.afterRead?.length) {
for (const hook of collectionConfig.hooks.afterRead){
result = await hook({
collection: collectionConfig,
context: req.context,
doc: result,
overrideAccess,
req
}) || result;
}
}
// /////////////////////////////////////
// afterChange - Fields
// /////////////////////////////////////
result = await afterChange({
collection: collectionConfig,
context: req.context,
data: result,
doc: result,
global: null,
operation: 'update',
previousDoc: prevDocWithLocales,
req
});
// /////////////////////////////////////
// afterChange - Collection
// /////////////////////////////////////
if (collectionConfig.hooks?.afterChange?.length) {
for (const hook of collectionConfig.hooks.afterChange){
result = await hook({
collection: collectionConfig,
context: req.context,
data: result,
doc: result,
operation: 'update',
overrideAccess,
previousDoc: prevDocWithLocales,
req
}) || result;
}
}
// /////////////////////////////////////
// afterOperation - Collection
// /////////////////////////////////////
result = await buildAfterOperation({
args,
collection: collectionConfig,
operation: 'restoreVersion',
overrideAccess,
result
});
if (shouldCommit) {
await commitTransaction(req);
}
return result;
} catch (error) {
await killTransaction(req);
throw error;
}
};
//# sourceMappingURL=restoreVersion.js.map

View File

@@ -0,0 +1,788 @@
import _ = require("../index");
declare module "../index" {
interface LoDashStatic {
/**
* Converts string to camel case.
*
* @param string The string to convert.
* @return Returns the camel cased string.
*/
camelCase(string?: string): string;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.camelCase
*/
camelCase(): string;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.camelCase
*/
camelCase(): StringChain;
}
interface LoDashStatic {
/**
* Converts the first character of string to upper case and the remaining to lower case.
*
* @param string The string to capitalize.
* @return Returns the capitalized string.
*/
capitalize<T extends string>(string?: T): string extends T ? string : Capitalize<Lowercase<T>>;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.capitalize
*/
capitalize(): string extends TValue ? string : Capitalize<Lowercase<TValue extends string ? TValue : never>>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.capitalize
*/
capitalize(): StringChain<string extends TValue ? string : Capitalize<Lowercase<TValue extends string ? TValue : never>>>;
}
interface LoDashStatic {
/**
* Deburrs string by converting latin-1 supplementary letters to basic latin letters and removing combining
* diacritical marks.
*
* @param string The string to deburr.
* @return Returns the deburred string.
*/
deburr(string?: string): string;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.deburr
*/
deburr(): string;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.deburr
*/
deburr(): StringChain;
}
interface LoDashStatic {
/**
* Checks if string ends with the given target string.
*
* @param string The string to search.
* @param target The string to search for.
* @param position The position to search from.
* @return Returns true if string ends with target, else false.
*/
endsWith(string?: string, target?: string, position?: number): boolean;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.endsWith
*/
endsWith(target?: string, position?: number): boolean;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.endsWith
*/
endsWith(target?: string, position?: number): PrimitiveChain<boolean>;
}
interface LoDashStatic {
/**
* Converts the characters "&", "<", ">", '"', "'", and "`" in string to their corresponding HTML entities.
*
* Note: No other characters are escaped. To escape additional characters use a third-party library like he.
*
* Though the ">" character is escaped for symmetry, characters like ">" and "/" dont need escaping in HTML
* and have no special meaning unless they're part of a tag or unquoted attribute value. See Mathias Bynenss
* article (under "semi-related fun fact") for more details.
*
* Backticks are escaped because in IE < 9, they can break out of attribute values or HTML comments. See #59,
* #102, #108, and #133 of the HTML5 Security Cheatsheet for more details.
*
* When working with HTML you should always quote attribute values to reduce XSS vectors.
*
* @param string The string to escape.
* @return Returns the escaped string.
*/
escape(string?: string): string;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.escape
*/
escape(): string;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.escape
*/
escape(): StringChain;
}
interface LoDashStatic {
/**
* Escapes the RegExp special characters "^", "$", "\", ".", "*", "+", "?", "(", ")", "[", "]",
* "{", "}", and "|" in string.
*
* @param string The string to escape.
* @return Returns the escaped string.
*/
escapeRegExp(string?: string): string;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.escapeRegExp
*/
escapeRegExp(): string;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.escapeRegExp
*/
escapeRegExp(): StringChain;
}
interface LoDashStatic {
/**
* Converts string to kebab case.
*
* @param string The string to convert.
* @return Returns the kebab cased string.
*/
kebabCase(string?: string): string;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.kebabCase
*/
kebabCase(): string;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.kebabCase
*/
kebabCase(): StringChain;
}
interface LoDashStatic {
/**
* Converts `string`, as space separated words, to lower case.
*
* @param string The string to convert.
* @return Returns the lower cased string.
*/
lowerCase(string?: string): string;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.lowerCase
*/
lowerCase(): string;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.lowerCase
*/
lowerCase(): StringChain;
}
interface LoDashStatic {
/**
* Converts the first character of `string` to lower case.
*
* @param string The string to convert.
* @return Returns the converted string.
*/
lowerFirst<T extends string = string>(string?: T): Uncapitalize<T>;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.lowerFirst
*/
lowerFirst(): TValue extends string ? Uncapitalize<TValue> : string;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.lowerFirst
*/
lowerFirst(): StringChain<TValue extends string ? Uncapitalize<TValue> : string>;
}
interface LoDashStatic {
/**
* Pads string on the left and right sides if its shorter than length. Padding characters are truncated if
* they cant be evenly divided by length.
*
* @param string The string to pad.
* @param length The padding length.
* @param chars The string used as padding.
* @return Returns the padded string.
*/
pad(string?: string, length?: number, chars?: string): string;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.pad
*/
pad(length?: number, chars?: string): string;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.pad
*/
pad(length?: number, chars?: string): StringChain;
}
interface LoDashStatic {
/**
* Pads string on the right side if its shorter than length. Padding characters are truncated if they exceed
* length.
*
* @param string The string to pad.
* @param length The padding length.
* @param chars The string used as padding.
* @return Returns the padded string.
*/
padEnd(string?: string, length?: number, chars?: string): string;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.padEnd
*/
padEnd(length?: number, chars?: string): string;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.padEnd
*/
padEnd(length?: number, chars?: string): StringChain;
}
interface LoDashStatic {
/**
* Pads string on the left side if its shorter than length. Padding characters are truncated if they exceed
* length.
*
* @param string The string to pad.
* @param length The padding length.
* @param chars The string used as padding.
* @return Returns the padded string.
*/
padStart(string?: string, length?: number, chars?: string): string;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.padStart
*/
padStart(length?: number, chars?: string): string;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.padStart
*/
padStart(length?: number, chars?: string): StringChain;
}
interface LoDashStatic {
/**
* Converts string to an integer of the specified radix. If radix is undefined or 0, a radix of 10 is used
* unless value is a hexadecimal, in which case a radix of 16 is used.
*
* Note: This method aligns with the ES5 implementation of parseInt.
*
* @param string The string to convert.
* @param radix The radix to interpret value by.
* @return Returns the converted integer.
*/
parseInt(string: string, radix?: number): number;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.parseInt
*/
parseInt(radix?: number): number;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.parseInt
*/
parseInt(radix?: number): PrimitiveChain<number>;
}
interface LoDashStatic {
/**
* Repeats the given string n times.
*
* @param string The string to repeat.
* @param n The number of times to repeat the string.
* @return Returns the repeated string.
*/
repeat(string?: string, n?: number): string;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.repeat
*/
repeat(n?: number): string;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.repeat
*/
repeat(n?: number): StringChain;
}
type ReplaceFunction = (match: string, ...args: any[]) => string;
interface LoDashStatic {
/**
* Replaces matches for pattern in string with replacement.
*
* Note: This method is based on String#replace.
*
* @return Returns the modified string.
*/
replace(string: string, pattern: RegExp | string, replacement: ReplaceFunction | string): string;
/**
* @see _.replace
*/
replace(pattern: RegExp | string, replacement: ReplaceFunction | string): string;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.replace
*/
replace(pattern: RegExp | string, replacement: ReplaceFunction | string): string;
/**
* @see _.replace
*/
replace(replacement: ReplaceFunction | string): string;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.replace
*/
replace(pattern: RegExp | string, replacement: ReplaceFunction | string): StringChain;
/**
* @see _.replace
*/
replace(replacement: ReplaceFunction | string): StringChain;
}
interface LoDashStatic {
/**
* Converts string to snake case.
*
* @param string The string to convert.
* @return Returns the snake cased string.
*/
snakeCase(string?: string): string;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.snakeCase
*/
snakeCase(): string;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.snakeCase
*/
snakeCase(): StringChain;
}
interface LoDashStatic {
/**
* Splits string by separator.
*
* Note: This method is based on String#split.
*
* @param string The string to split.
* @param separator The separator pattern to split by.
* @param limit The length to truncate results to.
* @return Returns the new array of string segments.
*/
split(string: string | null | undefined, separator?: RegExp | string, limit?: number): string[];
/**
* @see _.split
*/
split(string: string | null | undefined, index: string | number, guard: object): string[];
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.split
*/
split(separator?: RegExp | string, limit?: number): Collection<string>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.split
*/
split(separator?: RegExp | string, limit?: number): CollectionChain<string>;
}
interface LoDashStatic {
/**
* Converts string to start case.
*
* @param string The string to convert.
* @return Returns the start cased string.
*/
startCase(string?: string): string;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.startCase
*/
startCase(): string;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.startCase
*/
startCase(): StringChain;
}
interface LoDashStatic {
/**
* Checks if string starts with the given target string.
*
* @param string The string to search.
* @param target The string to search for.
* @param position The position to search from.
* @return Returns true if string starts with target, else false.
*/
startsWith(string?: string, target?: string, position?: number): boolean;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.startsWith
*/
startsWith(target?: string, position?: number): boolean;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.startsWith
*/
startsWith(target?: string, position?: number): PrimitiveChain<boolean>;
}
interface TemplateOptions extends TemplateSettings {
/**
* @see _.sourceURL
*/
sourceURL?: string | undefined;
}
interface TemplateExecutor {
(data?: object): string;
/**
* @see _.source
*/
source: string;
}
interface LoDashStatic {
/**
* Creates a compiled template function that can interpolate data properties in "interpolate" delimiters,
* HTML-escape interpolated data properties in "escape" delimiters, and execute JavaScript in "evaluate"
* delimiters. Data properties may be accessed as free variables in the template. If a setting object is
* provided it takes precedence over _.templateSettings values.
*
* Note: In the development build _.template utilizes
* [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl) for easier
* debugging.
*
* For more information on precompiling templates see
* [lodash's custom builds documentation](https://lodash.com/custom-builds).
*
* For more information on Chrome extension sandboxes see
* [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
*
* @param string The template string.
* @param options The options object.
* @param options.escape The HTML "escape" delimiter.
* @param options.evaluate The "evaluate" delimiter.
* @param options.imports An object to import into the template as free variables.
* @param options.interpolate The "interpolate" delimiter.
* @param options.sourceURL The sourceURL of the template's compiled source.
* @param options.variable The data object variable name.
* @return Returns the compiled template function.
*/
template(string?: string, options?: TemplateOptions): TemplateExecutor;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.template
*/
template(options?: TemplateOptions): TemplateExecutor;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.template
*/
template(options?: TemplateOptions): FunctionChain<TemplateExecutor>;
}
interface LoDashStatic {
/**
* Converts `string`, as a whole, to lower case.
*
* @param string The string to convert.
* @return Returns the lower cased string.
*/
toLower<T extends string = string>(string?: T): Lowercase<T>;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.toLower
*/
toLower(): TValue extends string ? Lowercase<TValue> : string;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.toLower
*/
toLower(): StringChain<TValue extends string ? Lowercase<TValue> : string>;
}
interface LoDashStatic {
/**
* Converts `string`, as a whole, to upper case.
*
* @param string The string to convert.
* @return Returns the upper cased string.
*/
toUpper<T extends string = string>(string?: T): Uppercase<T>;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.toUpper
*/
toUpper(): TValue extends string ? Uppercase<TValue> : string;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.toUpper
*/
toUpper(): StringChain<TValue extends string ? Uppercase<TValue> : string>;
}
interface LoDashStatic {
/**
* Removes leading and trailing whitespace or specified characters from string.
*
* @param string The string to trim.
* @param chars The characters to trim.
* @return Returns the trimmed string.
*/
trim(string?: string, chars?: string): string;
/**
* @see _.trim
*/
trim(string: string, index: string | number, guard: object): string;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.trim
*/
trim(chars?: string): string;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.trim
*/
trim(chars?: string): StringChain;
}
interface LoDashStatic {
/**
* Removes trailing whitespace or specified characters from string.
*
* @param string The string to trim.
* @param chars The characters to trim.
* @return Returns the trimmed string.
*/
trimEnd(string?: string, chars?: string): string;
/**
* @see _.trimEnd
*/
trimEnd(string: string, index: string | number, guard: object): string;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.trimEnd
*/
trimEnd(chars?: string): string;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.trimEnd
*/
trimEnd(chars?: string): StringChain;
}
interface LoDashStatic {
/**
* Removes leading whitespace or specified characters from string.
*
* @param string The string to trim.
* @param chars The characters to trim.
* @return Returns the trimmed string.
*/
trimStart(string?: string, chars?: string): string;
/**
* @see _.trimStart
*/
trimStart(string: string, index: string | number, guard: object): string;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.trimStart
*/
trimStart(chars?: string): string;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.trimStart
*/
trimStart(chars?: string): StringChain;
}
interface TruncateOptions {
/**
* @see _.length
*/
length?: number | undefined;
/**
* @see _.omission
*/
omission?: string | undefined;
/**
* @see _.separator
*/
separator?: string | RegExp | undefined;
}
interface LoDashStatic {
/**
* Truncates string if its longer than the given maximum string length. The last characters of the truncated
* string are replaced with the omission string which defaults to "…".
*
* @param string The string to truncate.
* @param options The options object or maximum string length.
* @return Returns the truncated string.
*/
truncate(string?: string, options?: TruncateOptions): string;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.truncate
*/
truncate(options?: TruncateOptions): string;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.truncate
*/
truncate(options?: TruncateOptions): StringChain;
}
interface LoDashStatic {
/**
* The inverse of _.escape; this method converts the HTML entities &amp;, &lt;, &gt;, &quot;, &#39;, and &#96;
* in string to their corresponding characters.
*
* Note: No other HTML entities are unescaped. To unescape additional HTML entities use a third-party library
* like he.
*
* @param string The string to unescape.
* @return Returns the unescaped string.
*/
unescape(string?: string): string;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.unescape
*/
unescape(): string;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.unescape
*/
unescape(): StringChain;
}
interface LoDashStatic {
/**
* Converts `string`, as space separated words, to upper case.
*
* @param string The string to convert.
* @return Returns the upper cased string.
*/
upperCase(string?: string): string;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.upperCase
*/
upperCase(): string;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.upperCase
*/
upperCase(): StringChain;
}
interface LoDashStatic {
/**
* Converts the first character of `string` to upper case.
*
* @param string The string to convert.
* @return Returns the converted string.
*/
upperFirst<T extends string = string>(string?: T): Capitalize<T>;
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.upperFirst
*/
upperFirst(): TValue extends string ? Capitalize<TValue> : string;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.upperFirst
*/
upperFirst(): StringChain<TValue extends string ? Capitalize<TValue> : string>;
}
interface LoDashStatic {
/**
* Splits `string` into an array of its words.
*
* @param string The string to inspect.
* @param pattern The pattern to match words.
* @return Returns the words of `string`.
*/
words(string?: string, pattern?: string | RegExp): string[];
/**
* @see _.words
*/
words(string: string, index: string | number, guard: object): string[];
}
interface LoDashImplicitWrapper<TValue> {
/**
* @see _.words
*/
words(pattern?: string | RegExp): Collection<string>;
}
interface LoDashExplicitWrapper<TValue> {
/**
* @see _.words
*/
words(pattern?: string | RegExp): CollectionChain<string>;
}
}

View File

@@ -0,0 +1,14 @@
import type { ClientCollectionConfig, ViewTypes, Where } from 'payload';
import React from 'react';
export type ListSelectionProps = {
collectionConfig?: ClientCollectionConfig;
disableBulkDelete?: boolean;
disableBulkEdit?: boolean;
label: string;
modalPrefix?: string;
showSelectAllAcrossPages?: boolean;
viewType?: ViewTypes;
where?: Where;
};
export declare const ListSelection: React.FC<ListSelectionProps>;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,142 @@
export type Autosave = {
/**
* Define an `interval` in milliseconds to automatically save progress while documents are edited.
* Document updates are "debounced" at this interval.
*
* @default 800
*/
interval?: number;
/**
* When set to `true`, the "Save as draft" button will be displayed even while autosave is enabled.
* By default, this button is hidden to avoid redundancy with autosave behavior.
*
* @default false
*/
showSaveDraftButton?: boolean;
};
export type SchedulePublish = {
/**
* Define a date format to use for the time picker.
*
* @example 'hh:mm' will give a 24 hour clock
*
* @default 'h:mm aa' which is a 12 hour clock
*/
timeFormat?: string;
/**
* Intervals for the time picker.
*
* @default 5
*/
timeIntervals?: number;
};
export type IncomingDrafts = {
/**
* Enable autosave to automatically save progress while documents are edited.
* To enable, set to true or pass an object with options.
*/
autosave?: Autosave | boolean;
/**
* Localizes the status field.
*
* Only effective if the experimental `experimental.localizeStatus` is enabled.
*
* @experimental
* @default false
*/
localizeStatus?: boolean;
/**
* Allow for editors to schedule publish / unpublish events in the future.
*/
schedulePublish?: boolean | SchedulePublish;
/**
* Set validate to true to validate draft documents when saved.
*
* @default false
*/
validate?: boolean;
};
export type SanitizedDrafts = {
/**
* Enable autosave to automatically save progress while documents are edited.
* To enable, set to true or pass an object with options.
*/
autosave: Autosave | false;
/**
* Localizes the status field.
*
* Only effective if the experimental `experimental.localizeStatus` is enabled.
*
* @experimental
* @default false
*/
localizeStatus?: boolean;
/**
* Allow for editors to schedule publish / unpublish events in the future.
*/
schedulePublish: boolean | SchedulePublish;
/**
* Set validate to true to validate draft documents when saved.
*
* @default false
*/
validate: boolean;
};
export type IncomingCollectionVersions = {
/**
* Enable Drafts mode for this collection.
* To enable, set to true or pass an object with draft options.
*/
drafts?: boolean | IncomingDrafts;
/**
* Use this setting to control how many versions to keep on a document by document basis.
* Must be an integer. Use 0 to save all versions.
*
* @default 100
*/
maxPerDoc?: number;
};
export interface SanitizedCollectionVersions extends Omit<IncomingCollectionVersions, 'drafts'> {
/**
* Enable Drafts mode for this collection.
* To enable, set to true or pass an object with draft options.
*/
drafts: false | SanitizedDrafts;
/**
* Use this setting to control how many versions to keep on a document by document basis.
* Must be an integer. Use 0 to save all versions.
*
* @default 100
*/
maxPerDoc: number;
}
export type IncomingGlobalVersions = {
drafts?: boolean | IncomingDrafts;
/**
* Use this setting to control how many versions to keep on a global by global basis.
* Must be an integer.
*/
max?: number;
};
export type SanitizedGlobalVersions = {
/**
* Enable Drafts mode for this global. To enable, set to true or pass an object with draft options
*/
drafts: false | SanitizedDrafts;
/**
* Use this setting to control how many versions to keep on a global by global basis.
* Must be an integer.
*/
max: number;
};
export type TypeWithVersion<T> = {
createdAt: string;
id: string;
latest?: boolean;
parent: number | string;
publishedLocale?: string;
snapshot?: boolean;
updatedAt: string;
version: T;
};
//# sourceMappingURL=types.d.ts.map

View File

@@ -0,0 +1,21 @@
export * from "./alias.js";
export * from "./checks.js";
export * from "./columns/index.js";
export * from "./db.js";
export * from "./dialect.js";
export * from "./foreign-keys.js";
export * from "./indexes.js";
export * from "./policies.js";
export * from "./primary-keys.js";
export * from "./query-builders/index.js";
export * from "./roles.js";
export * from "./schema.js";
export * from "./sequence.js";
export * from "./session.js";
export * from "./subquery.js";
export * from "./table.js";
export * from "./unique-constraint.js";
export * from "./utils.js";
export * from "./view-common.js";
export * from "./view.js";
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/fields/Relationship/select-components/SingleValue/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAEpD,OAAO,KAA6B,MAAM,OAAO,CAAA;AAGjD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAA;AACxF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAM5C,OAAO,cAAc,CAAA;AAIrB,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAChC;IACE,WAAW,EAAE;QAEX,WAAW,EAAE,uBAAuB,CAAC,aAAa,CAAC,CAAA;KACpD,CAAA;CACF,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAsD7B,CAAA"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/transform/write/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAE7C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAI7C,KAAK,IAAI,GAAG;IACV,OAAO,EAAE,cAAc,CAAA;IACvB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC7B,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,MAAM,EAAE,cAAc,EAAE,CAAA;IACxB,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,eAAO,MAAM,iBAAiB,uFAQ3B,IAAI,KAAG,WAiDT,CAAA"}

View File

@@ -0,0 +1,205 @@
"use strict";
exports.localize = void 0;
var _index = require("../../_lib/buildLocalizeFn.cjs");
const eraValues = {
narrow: ["ab. J.C.", "apr. J.C."],
abbreviated: ["ab. J.C.", "apr. J.C."],
wide: ["abans Jèsus-Crist", "après Jèsus-Crist"],
};
const quarterValues = {
narrow: ["T1", "T2", "T3", "T4"],
abbreviated: ["1èr trim.", "2nd trim.", "3en trim.", "4en trim."],
wide: ["1èr trimèstre", "2nd trimèstre", "3en trimèstre", "4en trimèstre"],
};
const monthValues = {
narrow: [
"GN",
"FB",
"MÇ",
"AB",
"MA",
"JN",
"JL",
"AG",
"ST",
"OC",
"NV",
"DC",
],
abbreviated: [
"gen.",
"febr.",
"març",
"abr.",
"mai",
"junh",
"jul.",
"ag.",
"set.",
"oct.",
"nov.",
"dec.",
],
wide: [
"genièr",
"febrièr",
"març",
"abril",
"mai",
"junh",
"julhet",
"agost",
"setembre",
"octòbre",
"novembre",
"decembre",
],
};
const dayValues = {
narrow: ["dg.", "dl.", "dm.", "dc.", "dj.", "dv.", "ds."],
short: ["dg.", "dl.", "dm.", "dc.", "dj.", "dv.", "ds."],
abbreviated: ["dg.", "dl.", "dm.", "dc.", "dj.", "dv.", "ds."],
wide: [
"dimenge",
"diluns",
"dimars",
"dimècres",
"dijòus",
"divendres",
"dissabte",
],
};
const dayPeriodValues = {
narrow: {
am: "am",
pm: "pm",
midnight: "mièjanuèch",
noon: "miègjorn",
morning: "matin",
afternoon: "aprèp-miègjorn",
evening: "vèspre",
night: "nuèch",
},
abbreviated: {
am: "a.m.",
pm: "p.m.",
midnight: "mièjanuèch",
noon: "miègjorn",
morning: "matin",
afternoon: "aprèp-miègjorn",
evening: "vèspre",
night: "nuèch",
},
wide: {
am: "a.m.",
pm: "p.m.",
midnight: "mièjanuèch",
noon: "miègjorn",
morning: "matin",
afternoon: "aprèp-miègjorn",
evening: "vèspre",
night: "nuèch",
},
};
const formattingDayPeriodValues = {
narrow: {
am: "am",
pm: "pm",
midnight: "mièjanuèch",
noon: "miègjorn",
morning: "del matin",
afternoon: "de laprèp-miègjorn",
evening: "del ser",
night: "de la nuèch",
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "mièjanuèch",
noon: "miègjorn",
morning: "del matin",
afternoon: "de laprèp-miègjorn",
evening: "del ser",
night: "de la nuèch",
},
wide: {
am: "ante meridiem",
pm: "post meridiem",
midnight: "mièjanuèch",
noon: "miègjorn",
morning: "del matin",
afternoon: "de laprèp-miègjorn",
evening: "del ser",
night: "de la nuèch",
},
};
const ordinalNumber = (dirtyNumber, options) => {
const number = Number(dirtyNumber);
const unit = options?.unit;
let ordinal;
switch (number) {
case 1:
ordinal = "èr";
break;
case 2:
ordinal = "nd";
break;
default:
ordinal = "en";
}
// feminine for year, week, hour, minute, second
if (
unit === "year" ||
unit === "week" ||
unit === "hour" ||
unit === "minute" ||
unit === "second"
) {
ordinal += "a";
}
return number + ordinal;
};
const localize = (exports.localize = {
ordinalNumber,
era: (0, _index.buildLocalizeFn)({
values: eraValues,
defaultWidth: "wide",
}),
quarter: (0, _index.buildLocalizeFn)({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: (quarter) => quarter - 1,
}),
month: (0, _index.buildLocalizeFn)({
values: monthValues,
defaultWidth: "wide",
}),
day: (0, _index.buildLocalizeFn)({
values: dayValues,
defaultWidth: "wide",
}),
dayPeriod: (0, _index.buildLocalizeFn)({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide",
}),
});

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/utilities/formatName.ts"],"sourcesContent":["import { formatUtcOffset } from './formatUtcOffset.js'\n\nconst numbers = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']\n\nexport const formatName = (string: string): string => {\n let sanitizedString = String(string)\n\n // Check if this is a UTC offset (e.g., +05:30, -08:00)\n // These need special handling to avoid collisions\n const utcOffsetName = formatUtcOffset(sanitizedString)\n if (utcOffsetName) {\n return utcOffsetName\n }\n\n const firstLetter = sanitizedString.substring(0, 1)\n\n if (numbers.indexOf(firstLetter) > -1) {\n sanitizedString = `_${sanitizedString}`\n }\n\n const formatted = sanitizedString\n // Convert accented characters\n .normalize('NFKD')\n .replace(/[\\u0300-\\u036f]/g, '')\n\n .replace(/\\./g, '_')\n .replace(/-|\\//g, '_')\n .replace(/\\+/g, '_')\n .replace(/,/g, '_')\n .replace(/\\(/g, '_')\n .replace(/\\)/g, '_')\n .replace(/'/g, '_')\n .replace(/ /g, '')\n .replace(/\\[|\\]/g, '_')\n\n return formatted || '_'\n}\n"],"names":["formatUtcOffset","numbers","formatName","string","sanitizedString","String","utcOffsetName","firstLetter","substring","indexOf","formatted","normalize","replace"],"mappings":"AAAA,SAASA,eAAe,QAAQ,uBAAsB;AAEtD,MAAMC,UAAU;IAAC;IAAK;IAAK;IAAK;IAAK;IAAK;IAAK;IAAK;IAAK;IAAK;CAAI;AAElE,OAAO,MAAMC,aAAa,CAACC;IACzB,IAAIC,kBAAkBC,OAAOF;IAE7B,uDAAuD;IACvD,kDAAkD;IAClD,MAAMG,gBAAgBN,gBAAgBI;IACtC,IAAIE,eAAe;QACjB,OAAOA;IACT;IAEA,MAAMC,cAAcH,gBAAgBI,SAAS,CAAC,GAAG;IAEjD,IAAIP,QAAQQ,OAAO,CAACF,eAAe,CAAC,GAAG;QACrCH,kBAAkB,CAAC,CAAC,EAAEA,iBAAiB;IACzC;IAEA,MAAMM,YAAYN,eAChB,8BAA8B;KAC7BO,SAAS,CAAC,QACVC,OAAO,CAAC,oBAAoB,IAE5BA,OAAO,CAAC,OAAO,KACfA,OAAO,CAAC,SAAS,KACjBA,OAAO,CAAC,OAAO,KACfA,OAAO,CAAC,MAAM,KACdA,OAAO,CAAC,OAAO,KACfA,OAAO,CAAC,OAAO,KACfA,OAAO,CAAC,MAAM,KACdA,OAAO,CAAC,MAAM,IACdA,OAAO,CAAC,UAAU;IAErB,OAAOF,aAAa;AACtB,EAAC"}

View File

@@ -0,0 +1,118 @@
import { WINDOW } from '../../../types.js';
import { getActivationStart } from './getActivationStart.js';
import { addPageListener, removePageListener } from './globalListeners.js';
/*
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
let firstHiddenTime = -1;
const onHiddenFunctions = new Set();
const initHiddenTime = () => {
// If the document is hidden when this code runs, assume it was always
// hidden and the page was loaded in the background, with the one exception
// that visibility state is always 'hidden' during prerendering, so we have
// to ignore that case until prerendering finishes (see: `prerenderingchange`
// event logic below).
return WINDOW.document?.visibilityState === 'hidden' && !WINDOW.document?.prerendering ? 0 : Infinity;
};
const onVisibilityUpdate = (event) => {
// Handle changes to hidden state
if (isPageHidden(event) && firstHiddenTime > -1) {
// Sentry-specific change: Also call onHidden callbacks for pagehide events
// to support older browsers (Safari <14.4) that don't properly fire visibilitychange
if (event.type === 'visibilitychange' || event.type === 'pagehide') {
for (const onHiddenFunction of onHiddenFunctions) {
onHiddenFunction();
}
}
// If the document is 'hidden' and no previous hidden timestamp has been
// set (so is infinity), update it based on the current event data.
if (!isFinite(firstHiddenTime)) {
// If the event is a 'visibilitychange' event, it means the page was
// visible prior to this change, so the event timestamp is the first
// hidden time.
// However, if the event is not a 'visibilitychange' event, then it must
// be a 'prerenderingchange' or 'pagehide' event, and the fact that the document is
// still 'hidden' from the above check means the tab was activated
// in a background state and so has always been hidden.
firstHiddenTime = event.type === 'visibilitychange' ? event.timeStamp : 0;
// We no longer need the `prerenderingchange` event listener now we've
// set an initial init time so remove that
// (we'll keep the visibilitychange and pagehide ones for onHiddenFunction above)
removePageListener('prerenderingchange', onVisibilityUpdate, true);
}
}
};
const getVisibilityWatcher = () => {
if (WINDOW.document && firstHiddenTime < 0) {
// Check if we have a previous hidden `visibility-state` performance entry.
const activationStart = getActivationStart();
const firstVisibilityStateHiddenTime = !WINDOW.document.prerendering
? globalThis.performance
.getEntriesByType('visibility-state')
.filter(e => e.name === 'hidden' && e.startTime > activationStart)[0]?.startTime
: undefined;
// Prefer that, but if it's not available and the document is hidden when
// this code runs, assume it was hidden since navigation start. This isn't
// a perfect heuristic, but it's the best we can do until the
// `visibility-state` performance entry becomes available in all browsers.
firstHiddenTime = firstVisibilityStateHiddenTime ?? initHiddenTime();
// Listen for visibility changes so we can handle things like bfcache
// restores and/or prerender without having to examine individual
// timestamps in detail and also for onHidden function calls.
addPageListener('visibilitychange', onVisibilityUpdate, true);
// Sentry-specific change: Some browsers have buggy implementations of visibilitychange,
// so we use pagehide in addition, just to be safe. This is also required for older
// Safari versions (<14.4) that we still support.
addPageListener('pagehide', onVisibilityUpdate, true);
// IMPORTANT: when a page is prerendering, its `visibilityState` is
// 'hidden', so in order to account for cases where this module checks for
// visibility during prerendering, an additional check after prerendering
// completes is also required.
addPageListener('prerenderingchange', onVisibilityUpdate, true);
}
return {
get firstHiddenTime() {
return firstHiddenTime;
},
onHidden(cb) {
onHiddenFunctions.add(cb);
},
};
};
/**
* Check if the page is hidden, uses the `pagehide` event for older browsers support that we used to have in `onHidden` function.
* Some browsers we still support (Safari <14.4) don't fully support `visibilitychange`
* or have known bugs w.r.t the `visibilitychange` event.
* // TODO (v11): If we decide to drop support for Safari 14.4, we can use the logic from web-vitals 4.2.4
*/
function isPageHidden(event) {
return event.type === 'pagehide' || WINDOW.document?.visibilityState === 'hidden';
}
export { getVisibilityWatcher };
//# sourceMappingURL=getVisibilityWatcher.js.map

View File

@@ -0,0 +1,115 @@
{
"definitions": {
"BannerFunction": {
"description": "The banner as function, it will be wrapped in a comment.",
"instanceof": "Function",
"tsType": "(data: { hash?: string, chunk: import('../../lib/Chunk'), filename: string }) => string"
},
"Rule": {
"description": "Filtering rule as regex or string.",
"anyOf": [
{
"instanceof": "RegExp",
"tsType": "RegExp"
},
{
"type": "string",
"minLength": 1
},
{
"instanceof": "Function",
"tsType": "((str: string) => boolean)"
}
]
},
"Rules": {
"description": "Filtering rules.",
"anyOf": [
{
"type": "array",
"items": {
"description": "A rule condition.",
"oneOf": [
{
"$ref": "#/definitions/Rule"
}
]
}
},
{
"$ref": "#/definitions/Rule"
}
]
}
},
"title": "BannerPluginArgument",
"anyOf": [
{
"description": "The banner as string, it will be wrapped in a comment.",
"type": "string",
"minLength": 1
},
{
"title": "BannerPluginOptions",
"type": "object",
"additionalProperties": false,
"properties": {
"banner": {
"description": "Specifies the banner.",
"anyOf": [
{
"type": "string"
},
{
"$ref": "#/definitions/BannerFunction"
}
]
},
"entryOnly": {
"description": "If true, the banner will only be added to the entry chunks.",
"type": "boolean"
},
"exclude": {
"description": "Exclude all modules matching any of these conditions.",
"oneOf": [
{
"$ref": "#/definitions/Rules"
}
]
},
"footer": {
"description": "If true, banner will be placed at the end of the output.",
"type": "boolean"
},
"include": {
"description": "Include all modules matching any of these conditions.",
"oneOf": [
{
"$ref": "#/definitions/Rules"
}
]
},
"raw": {
"description": "If true, banner will not be wrapped in a comment.",
"type": "boolean"
},
"stage": {
"description": "Specifies the stage when add a banner.",
"type": "number"
},
"test": {
"description": "Include all modules that pass test assertion.",
"oneOf": [
{
"$ref": "#/definitions/Rules"
}
]
}
},
"required": ["banner"]
},
{
"$ref": "#/definitions/BannerFunction"
}
]
}

View File

@@ -0,0 +1,188 @@
'use strict'
const os = require('node:os')
const { promises: { readFile }, createWriteStream } = require('node:fs')
const { join } = require('node:path')
const { test } = require('tap')
const { fork } = require('node:child_process')
const writer = require('flush-write-stream')
const {
once,
getPathToNull,
file,
watchFileCreated
} = require('./helper')
const { promisify } = require('node:util')
const sleep = promisify(setTimeout)
test('asynchronous logging', async ({
equal,
teardown
}) => {
const now = Date.now
const hostname = os.hostname
const proc = process
global.process = {
__proto__: process,
pid: 123456
}
Date.now = () => 1459875739796
os.hostname = () => 'abcdefghijklmnopqr'
delete require.cache[require.resolve('../')]
const pino = require('../')
let expected = ''
let actual = ''
const normal = pino(writer((s, enc, cb) => {
expected += s
cb()
}))
const dest = createWriteStream(getPathToNull())
dest.write = (s) => {
actual += s
}
const asyncLogger = pino(dest)
let i = 44
while (i--) {
normal.info('h')
asyncLogger.info('h')
}
const expected2 = expected.split('\n')[0]
let actual2 = ''
const child = fork(join(__dirname, '/fixtures/syncfalse.js'), { silent: true })
child.stdout.pipe(writer((s, enc, cb) => {
actual2 += s
cb()
}))
await once(child, 'close')
// Wait for the last write to be flushed
await sleep(100)
equal(actual, expected)
equal(actual2.trim(), expected2)
teardown(() => {
os.hostname = hostname
Date.now = now
global.process = proc
})
})
test('sync false with child', async ({
equal,
teardown
}) => {
const now = Date.now
const hostname = os.hostname
const proc = process
global.process = {
__proto__: process,
pid: 123456
}
Date.now = function () {
return 1459875739796
}
os.hostname = function () {
return 'abcdefghijklmnopqr'
}
delete require.cache[require.resolve('../')]
const pino = require('../')
let expected = ''
let actual = ''
const normal = pino(writer((s, enc, cb) => {
expected += s
cb()
})).child({ hello: 'world' })
const dest = createWriteStream(getPathToNull())
dest.write = function (s) {
actual += s
}
const asyncLogger = pino(dest).child({ hello: 'world' })
let i = 500
while (i--) {
normal.info('h')
asyncLogger.info('h')
}
asyncLogger.flush()
const expected2 = expected.split('\n')[0]
let actual2 = ''
const child = fork(join(__dirname, '/fixtures/syncfalse-child.js'), { silent: true })
child.stdout.pipe(writer((s, enc, cb) => {
actual2 += s
cb()
}))
await once(child, 'close')
equal(actual, expected)
equal(actual2.trim(), expected2)
teardown(() => {
os.hostname = hostname
Date.now = now
global.process = proc
})
})
test('flush does nothing with sync true (default)', async ({ equal }) => {
const instance = require('..')()
equal(instance.flush(), undefined)
})
test('should still call flush callback even when does nothing with sync true (default)', (t) => {
t.plan(3)
const instance = require('..')()
instance.flush((...args) => {
t.ok('flush called')
t.same(args, [])
// next tick to make flush not called more than once
process.nextTick(() => {
t.ok('flush next tick called')
})
})
})
test('should call the flush callback when flushed the data for async logger', async (t) => {
const outputPath = file()
async function getOutputLogLines () {
return (await readFile(outputPath)).toString().trim().split('\n').map(JSON.parse)
}
const pino = require('../')
const instance = pino({}, pino.destination({
dest: outputPath,
// to make sure it does not flush on its own
minLength: 4096
}))
const flushPromise = promisify(instance.flush).bind(instance)
instance.info('hello')
await flushPromise()
await watchFileCreated(outputPath)
const [firstFlushData] = await getOutputLogLines()
t.equal(firstFlushData.msg, 'hello')
// should not flush this as no data accumulated that's bigger than min length
instance.info('world')
// Making sure data is not flushed yet
const afterLogData = await getOutputLogLines()
t.equal(afterLogData.length, 1)
await flushPromise()
// Making sure data is not flushed yet
const afterSecondFlush = (await getOutputLogLines())[1]
t.equal(afterSecondFlush.msg, 'world')
})

View File

@@ -0,0 +1 @@
{"version":3,"file":"isColumnActive.js","names":["isColumnActive","accessor","activeColumnsIndices","column","columns","active","Array","isArray","length","Boolean","find","col"],"sources":["../../../../src/providers/TableColumns/buildColumnState/isColumnActive.ts"],"sourcesContent":["import type { ColumnPreference } from 'payload'\n\nexport function isColumnActive({\n accessor,\n activeColumnsIndices,\n column,\n columns,\n}: {\n accessor: string\n activeColumnsIndices: number[]\n column: ColumnPreference\n columns: ColumnPreference[]\n}) {\n if (column) {\n return column.active\n } else if (columns && Array.isArray(columns) && columns.length > 0) {\n return Boolean(columns.find((col) => col.accessor === accessor)?.active)\n } else if (activeColumnsIndices.length < 4) {\n return true\n }\n\n return false\n}\n"],"mappings":"AAEA,OAAO,SAASA,eAAe;EAC7BC,QAAQ;EACRC,oBAAoB;EACpBC,MAAM;EACNC;AAAO,CAMR;EACC,IAAID,MAAA,EAAQ;IACV,OAAOA,MAAA,CAAOE,MAAM;EACtB,OAAO,IAAID,OAAA,IAAWE,KAAA,CAAMC,OAAO,CAACH,OAAA,KAAYA,OAAA,CAAQI,MAAM,GAAG,GAAG;IAClE,OAAOC,OAAA,CAAQL,OAAA,CAAQM,IAAI,CAAEC,GAAA,IAAQA,GAAA,CAAIV,QAAQ,KAAKA,QAAA,GAAWI,MAAA;EACnE,OAAO,IAAIH,oBAAA,CAAqBM,MAAM,GAAG,GAAG;IAC1C,OAAO;EACT;EAEA,OAAO;AACT","ignoreList":[]}

View File

@@ -0,0 +1 @@
{"version":3,"file":"bell-plus.js","sources":["../../../src/icons/bell-plus.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name BellPlus\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTkuMyAxNC44QzIwLjEgMTYuNCAyMSAxNyAyMSAxN0gzczMtMiAzLTljMC0zLjMgMi43LTYgNi02IDEgMCAxLjkuMiAyLjguNyIgLz4KICA8cGF0aCBkPSJNMTAuMyAyMWExLjk0IDEuOTQgMCAwIDAgMy40IDAiIC8+CiAgPHBhdGggZD0iTTE1IDhoNiIgLz4KICA8cGF0aCBkPSJNMTggNXY2IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/bell-plus\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst BellPlus = createLucideIcon('BellPlus', [\n [\n 'path',\n {\n d: 'M19.3 14.8C20.1 16.4 21 17 21 17H3s3-2 3-9c0-3.3 2.7-6 6-6 1 0 1.9.2 2.8.7',\n key: 'guizqy',\n },\n ],\n ['path', { d: 'M10.3 21a1.94 1.94 0 0 0 3.4 0', key: 'qgo35s' }],\n ['path', { d: 'M15 8h6', key: '8ybuxh' }],\n ['path', { d: 'M18 5v6', key: 'g5ayrv' }],\n]);\n\nexport default BellPlus;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,iBAAiB,UAAY,CAAA,CAAA,CAAA;AAAA,CAC5C,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA,CAAA;AAAA,CAAA,CACA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAkC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC/D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC1C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,60 @@
{
"name": "@payloadcms/email-nodemailer",
"version": "3.77.0",
"description": "Payload Nodemailer Email Adapter",
"homepage": "https://payloadcms.com",
"repository": {
"type": "git",
"url": "https://github.com/payloadcms/payload.git",
"directory": "packages/email-nodemailer"
},
"license": "MIT",
"author": "Payload <dev@payloadcms.com> (https://payloadcms.com)",
"maintainers": [
{
"name": "Payload",
"email": "info@payloadcms.com",
"url": "https://payloadcms.com"
}
],
"sideEffects": false,
"type": "module",
"exports": {
".": {
"import": "./dist/index.js",
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
},
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": [
"dist"
],
"dependencies": {
"nodemailer": "7.0.12"
},
"devDependencies": {
"@types/nodemailer": "7.0.2",
"payload": "3.77.0"
},
"peerDependencies": {
"payload": "3.77.0"
},
"engines": {
"node": "^18.20.2 || >=20.9.0"
},
"publishConfig": {
"registry": "https://registry.npmjs.org/"
},
"scripts": {
"build": "pnpm build:types && pnpm build:swc",
"build:clean": "find . \\( -type d \\( -name build -o -name dist -o -name .cache \\) -o -type f -name tsconfig.tsbuildinfo \\) -exec rm -rf {} + && pnpm build",
"build:debug": "pnpm build",
"build:swc": "swc ./src -d ./dist --config-file .swcrc --strip-leading-paths",
"build:types": "tsc --emitDeclarationOnly --outDir dist",
"clean": "rimraf -g {dist,*.tsbuildinfo}",
"lint": "eslint .",
"lint:fix": "eslint . --fix"
}
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"getDocumentData.js","names":["sanitizeID","logError","getDocumentData","id","idArg","collectionSlug","globalSlug","locale","payload","req","segments","user","resolvedData","transactionID","rest","isTrashedDoc","findByID","collection","depth","draft","fallbackLocale","code","overrideAccess","trash","findGlobal","slug","err"],"sources":["../../../src/views/Document/getDocumentData.ts"],"sourcesContent":["import { sanitizeID } from '@payloadcms/ui/shared'\nimport {\n type Locale,\n logError,\n type Payload,\n type PayloadRequest,\n type TypedUser,\n type TypeWithID,\n} from 'payload'\n\ntype Args = {\n collectionSlug?: string\n globalSlug?: string\n id?: number | string\n locale?: Locale\n payload: Payload\n req?: PayloadRequest\n segments?: string[]\n user?: TypedUser\n}\n\nexport const getDocumentData = async ({\n id: idArg,\n collectionSlug,\n globalSlug,\n locale,\n payload,\n req,\n segments,\n user,\n}: Args): Promise<null | Record<string, unknown> | TypeWithID> => {\n const id = sanitizeID(idArg)\n let resolvedData: Record<string, unknown> | TypeWithID = null\n const { transactionID, ...rest } = req\n\n const isTrashedDoc = segments?.[2] === 'trash' && typeof segments?.[3] === 'string' // id exists at segment 3\n\n try {\n if (collectionSlug && id) {\n resolvedData = await payload.findByID({\n id,\n collection: collectionSlug,\n depth: 0,\n draft: true,\n fallbackLocale: false,\n locale: locale?.code,\n overrideAccess: false,\n req: {\n ...rest,\n },\n trash: isTrashedDoc ? true : false,\n user,\n })\n }\n\n if (globalSlug) {\n resolvedData = await payload.findGlobal({\n slug: globalSlug,\n depth: 0,\n draft: true,\n fallbackLocale: false,\n locale: locale?.code,\n overrideAccess: false,\n req: {\n ...rest,\n },\n user,\n })\n }\n } catch (err) {\n logError({ err, payload })\n }\n\n return resolvedData\n}\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ;AAC3B,SAEEC,QAAQ,QAKH;AAaP,OAAO,MAAMC,eAAA,GAAkB,MAAAA,CAAO;EACpCC,EAAA,EAAIC,KAAK;EACTC,cAAc;EACdC,UAAU;EACVC,MAAM;EACNC,OAAO;EACPC,GAAG;EACHC,QAAQ;EACRC;AAAI,CACC;EACL,MAAMR,EAAA,GAAKH,UAAA,CAAWI,KAAA;EACtB,IAAIQ,YAAA,GAAqD;EACzD,MAAM;IAAEC,aAAa;IAAE,GAAGC;EAAA,CAAM,GAAGL,GAAA;EAEnC,MAAMM,YAAA,GAAeL,QAAA,GAAW,EAAE,KAAK,WAAW,OAAOA,QAAA,GAAW,EAAE,KAAK,SAAS;AAAA;EAEpF,IAAI;IACF,IAAIL,cAAA,IAAkBF,EAAA,EAAI;MACxBS,YAAA,GAAe,MAAMJ,OAAA,CAAQQ,QAAQ,CAAC;QACpCb,EAAA;QACAc,UAAA,EAAYZ,cAAA;QACZa,KAAA,EAAO;QACPC,KAAA,EAAO;QACPC,cAAA,EAAgB;QAChBb,MAAA,EAAQA,MAAA,EAAQc,IAAA;QAChBC,cAAA,EAAgB;QAChBb,GAAA,EAAK;UACH,GAAGK;QACL;QACAS,KAAA,EAAOR,YAAA,GAAe,OAAO;QAC7BJ;MACF;IACF;IAEA,IAAIL,UAAA,EAAY;MACdM,YAAA,GAAe,MAAMJ,OAAA,CAAQgB,UAAU,CAAC;QACtCC,IAAA,EAAMnB,UAAA;QACNY,KAAA,EAAO;QACPC,KAAA,EAAO;QACPC,cAAA,EAAgB;QAChBb,MAAA,EAAQA,MAAA,EAAQc,IAAA;QAChBC,cAAA,EAAgB;QAChBb,GAAA,EAAK;UACH,GAAGK;QACL;QACAH;MACF;IACF;EACF,EAAE,OAAOe,GAAA,EAAK;IACZzB,QAAA,CAAS;MAAEyB,GAAA;MAAKlB;IAAQ;EAC1B;EAEA,OAAOI,YAAA;AACT","ignoreList":[]}

View File

@@ -0,0 +1,50 @@
'use strict'
// limit of Crypto.getRandomValues()
// https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues
var MAX_BYTES = 65536
// Node supports requesting up to this number of bytes
// https://github.com/nodejs/node/blob/master/lib/internal/crypto/random.js#L48
var MAX_UINT32 = 4294967295
function oldBrowser () {
throw new Error('Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11')
}
var Buffer = require('safe-buffer').Buffer
var crypto = global.crypto || global.msCrypto
if (crypto && crypto.getRandomValues) {
module.exports = randomBytes
} else {
module.exports = oldBrowser
}
function randomBytes (size, cb) {
// phantomjs needs to throw
if (size > MAX_UINT32) throw new RangeError('requested too many random bytes')
var bytes = Buffer.allocUnsafe(size)
if (size > 0) { // getRandomValues fails on IE if size == 0
if (size > MAX_BYTES) { // this is the max bytes crypto.getRandomValues
// can do at once see https://developer.mozilla.org/en-US/docs/Web/API/window.crypto.getRandomValues
for (var generated = 0; generated < size; generated += MAX_BYTES) {
// buffer.slice automatically checks if the end is past the end of
// the buffer so we don't have to here
crypto.getRandomValues(bytes.slice(generated, generated + MAX_BYTES))
}
} else {
crypto.getRandomValues(bytes)
}
}
if (typeof cb === 'function') {
return process.nextTick(function () {
cb(null, bytes)
})
}
return bytes
}

View File

@@ -0,0 +1,11 @@
import type { SingleValueProps } from 'react-select';
import React from 'react';
import type { ReactSelectAdapterProps } from '../../../../elements/ReactSelect/types.js';
import type { Option } from '../../types.js';
import './index.scss';
export declare const SingleValue: React.FC<{
selectProps: {
customProps: ReactSelectAdapterProps['customProps'];
};
} & SingleValueProps<Option>>;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,4 @@
import type { Integration } from '@sentry/core';
import type { LocalVariablesIntegrationOptions } from './common';
export declare const localVariablesIntegration: (options?: LocalVariablesIntegrationOptions) => Integration;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"Blocks.d.ts","sourceRoot":"","sources":["../../../src/admin/fields/Blocks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAEjD,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AAClF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAA;AACxE,OAAO,KAAK,EAAE,yBAAyB,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAA;AAC7F,OAAO,KAAK,EACV,eAAe,EACf,oBAAoB,EACpB,UAAU,EACV,oBAAoB,EACpB,eAAe,EAChB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,KAAK,EACV,+BAA+B,EAC/B,+BAA+B,EAC/B,wBAAwB,EACxB,wBAAwB,EACxB,yBAAyB,EACzB,yBAAyB,EAC1B,MAAM,aAAa,CAAA;AAEpB,KAAK,4BAA4B,GAAG,YAAY,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAA;AAE3E,KAAK,0BAA0B,GAAG;IAChC,QAAQ,CAAC,QAAQ,CAAC,EAAE,qBAAqB,CAAA;CAC1C,GAAG,UAAU,CAAA;AAEd,KAAK,0BAA0B,GAAG,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,CAAA;AAE1D,MAAM,MAAM,sBAAsB,GAAG,0BAA0B,GAC7D,eAAe,CAAC,4BAA4B,CAAC,CAAA;AAE/C,MAAM,MAAM,sBAAsB,GAAG,0BAA0B,GAC7D,eAAe,CAAC,WAAW,EAAE,4BAA4B,CAAC,CAAA;AAE5D,MAAM,MAAM,0BAA0B,GAAG,oBAAoB,CAC3D,WAAW,EACX,4BAA4B,EAC5B,0BAA0B,CAC3B,CAAA;AAED,MAAM,MAAM,0BAA0B,GAAG,oBAAoB,CAC3D,4BAA4B,EAC5B,0BAA0B,CAC3B,CAAA;AAED,MAAM,MAAM,+BAA+B,GAAG,yBAAyB,CACrE,WAAW,EACX,4BAA4B,CAC7B,CAAA;AAED,MAAM,MAAM,+BAA+B,GACzC,yBAAyB,CAAC,4BAA4B,CAAC,CAAA;AAEzD,KAAK,iBAAiB,GAAG;IACvB,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,4BAA4B,GAAG,KAAK,CAAC,aAAa,CAC5D,iBAAiB,GAAG,eAAe,CAAC,4BAA4B,CAAC,CAClE,CAAA;AAED,MAAM,MAAM,4BAA4B,GAAG,KAAK,CAAC,aAAa,CAC5D,iBAAiB,GAAG,eAAe,CAAC,WAAW,EAAE,4BAA4B,CAAC,CAC/E,CAAA;AAED,MAAM,MAAM,qCAAqC,GAAG,+BAA+B,CACjF,WAAW,EACX,4BAA4B,CAC7B,CAAA;AAED,MAAM,MAAM,qCAAqC,GAC/C,+BAA+B,CAAC,4BAA4B,CAAC,CAAA;AAE/D,MAAM,MAAM,+BAA+B,GAAG,yBAAyB,CACrE,WAAW,EACX,4BAA4B,CAC7B,CAAA;AAED,MAAM,MAAM,+BAA+B,GACzC,yBAAyB,CAAC,4BAA4B,CAAC,CAAA;AAEzD,MAAM,MAAM,8BAA8B,GAAG,wBAAwB,CACnE,WAAW,EACX,iBAAiB,CAClB,CAAA;AAED,MAAM,MAAM,8BAA8B,GAAG,wBAAwB,CAAC,iBAAiB,CAAC,CAAA"}

View File

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

View File

@@ -0,0 +1,13 @@
import type { NumberFormatOptions } from "@formatjs/ecma402-abstract";
export interface ExtendedNumberFormatOptions extends NumberFormatOptions {
scale?: number;
}
export interface NumberSkeletonToken {
stem: string;
options: string[];
}
export declare function parseNumberSkeletonFromString(skeleton: string): NumberSkeletonToken[];
/**
* https://github.com/unicode-org/icu/blob/master/docs/userguide/format_parse/numbers/skeletons.md#skeleton-stems-and-options
*/
export declare function parseNumberSkeleton(tokens: NumberSkeletonToken[]): ExtendedNumberFormatOptions;

View File

@@ -0,0 +1,5 @@
function isGenerator(type) {
return typeof type === "function";
}
export { isGenerator };

View File

@@ -0,0 +1,31 @@
var SimpleSet = /*#__PURE__*/function () {
function SimpleSet() {
this.v = [];
}
var _proto = SimpleSet.prototype;
_proto.clear = function clear() {
this.v.length = 0;
};
_proto.has = function has(k) {
return this.v.indexOf(k) !== -1;
};
_proto.add = function add(k) {
if (this.has(k)) return;
this.v.push(k);
};
_proto.delete = function _delete(k) {
var idx = this.v.indexOf(k);
if (idx === -1) return false;
this.v.splice(idx, 1);
return true;
};
return SimpleSet;
}();
export { SimpleSet as default };

View File

@@ -0,0 +1,3 @@
import type { MigrationConfig } from "../migrator.js";
import type { DrizzleD1Database } from "./driver.js";
export declare function migrate<TSchema extends Record<string, unknown>>(db: DrizzleD1Database<TSchema>, config: MigrationConfig): Promise<void>;

View File

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

View File

@@ -0,0 +1,14 @@
import { Context } from '../../core/context';
export declare class Bounds {
readonly left: number;
readonly top: number;
readonly width: number;
readonly height: number;
constructor(left: number, top: number, width: number, height: number);
add(x: number, y: number, w: number, h: number): Bounds;
static fromClientRect(context: Context, clientRect: ClientRect): Bounds;
static fromDOMRectList(context: Context, domRectList: DOMRectList): Bounds;
static EMPTY: Bounds;
}
export declare const parseBounds: (context: Context, node: Element) => Bounds;
export declare const parseDocumentSize: (document: Document) => Bounds;

View File

@@ -0,0 +1 @@
{"version":3,"file":"index-incubating.js","sourceRoot":"","sources":["../../src/index-incubating.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,wEAAwE;AACxE,wDAAwD;AACxD,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// Incubating export also contains stable constants in order to maintain\n// backward compatibility between minor version releases\nexport * from './stable_attributes';\nexport * from './stable_metrics';\nexport * from './stable_events';\nexport * from './experimental_attributes';\nexport * from './experimental_metrics';\nexport * from './experimental_events';\n"]}

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/mysql-core/view-common.ts"],"sourcesContent":["export const MySqlViewConfig = Symbol.for('drizzle:MySqlViewConfig');\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,kBAAkB,OAAO,IAAI,yBAAyB;","names":[]}

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.server.js","names":["MoveDocToFolder","baseClass","FolderField","props","payload","config","folders","_jsx","className","folderCollectionSlug","slug","folderFieldName","fieldName"],"sources":["../../../../src/elements/FolderView/FolderField/index.server.tsx"],"sourcesContent":["import type { RelationshipFieldServerProps } from 'payload'\n\n// eslint-disable-next-line payload/no-imports-from-exports-dir\nimport { MoveDocToFolder } from '../../../exports/client/index.js'\nimport './index.scss'\n\nconst baseClass = 'folder-edit-field'\n\nexport const FolderField = (props: RelationshipFieldServerProps) => {\n if (props.payload.config.folders === false) {\n return null\n }\n return (\n <MoveDocToFolder\n className={baseClass}\n folderCollectionSlug={props.payload.config.folders.slug}\n folderFieldName={props.payload.config.folders.fieldName}\n />\n )\n}\n"],"mappings":";AAEA;AACA,SAASA,eAAe,QAAQ;AAChC,OAAO;AAEP,MAAMC,SAAA,GAAY;AAElB,OAAO,MAAMC,WAAA,GAAeC,KAAA;EAC1B,IAAIA,KAAA,CAAMC,OAAO,CAACC,MAAM,CAACC,OAAO,KAAK,OAAO;IAC1C,OAAO;EACT;EACA,oBACEC,IAAA,CAACP,eAAA;IACCQ,SAAA,EAAWP,SAAA;IACXQ,oBAAA,EAAsBN,KAAA,CAAMC,OAAO,CAACC,MAAM,CAACC,OAAO,CAACI,IAAI;IACvDC,eAAA,EAAiBR,KAAA,CAAMC,OAAO,CAACC,MAAM,CAACC,OAAO,CAACM;;AAGpD","ignoreList":[]}

View File

@@ -0,0 +1,6 @@
export declare const roundToNearestHoursWithOptions: import("./types.js").FPFn2<
Date,
| import("../roundToNearestHours.js").RoundToNearestHoursOptions<Date>
| undefined,
import("../fp.js").DateArg<Date>
>;

View File

@@ -0,0 +1,5 @@
import type React from 'react';
import type { Props } from './types.js';
import './index.scss';
export declare const TimezonePicker: React.FC<Props>;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/tracing.ts"],"sourcesContent":["import type { Span, Tracer } from '@opentelemetry/api';\nimport { iife } from '~/tracing-utils.ts';\nimport { npmVersion } from '~/version.ts';\n\nlet otel: typeof import('@opentelemetry/api') | undefined;\nlet rawTracer: Tracer | undefined;\n// try {\n// \totel = await import('@opentelemetry/api');\n// } catch (err: any) {\n// \tif (err.code !== 'MODULE_NOT_FOUND' && err.code !== 'ERR_MODULE_NOT_FOUND') {\n// \t\tthrow err;\n// \t}\n// }\n\ntype SpanName =\n\t| 'drizzle.operation'\n\t| 'drizzle.prepareQuery'\n\t| 'drizzle.buildSQL'\n\t| 'drizzle.execute'\n\t| 'drizzle.driver.execute'\n\t| 'drizzle.mapResponse';\n\n/** @internal */\nexport const tracer = {\n\tstartActiveSpan<F extends (span?: Span) => unknown>(name: SpanName, fn: F): ReturnType<F> {\n\t\tif (!otel) {\n\t\t\treturn fn() as ReturnType<F>;\n\t\t}\n\n\t\tif (!rawTracer) {\n\t\t\trawTracer = otel.trace.getTracer('drizzle-orm', npmVersion);\n\t\t}\n\n\t\treturn iife(\n\t\t\t(otel, rawTracer) =>\n\t\t\t\trawTracer.startActiveSpan(\n\t\t\t\t\tname,\n\t\t\t\t\t((span: Span) => {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\treturn fn(span);\n\t\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\t\tspan.setStatus({\n\t\t\t\t\t\t\t\tcode: otel.SpanStatusCode.ERROR,\n\t\t\t\t\t\t\t\tmessage: e instanceof Error ? e.message : 'Unknown error', // eslint-disable-line no-instanceof/no-instanceof\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tthrow e;\n\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\tspan.end();\n\t\t\t\t\t\t}\n\t\t\t\t\t}) as F,\n\t\t\t\t),\n\t\t\totel,\n\t\t\trawTracer,\n\t\t);\n\t},\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,2BAAqB;AACrB,qBAA2B;AAE3B,IAAI;AACJ,IAAI;AAkBG,MAAM,SAAS;AAAA,EACrB,gBAAoD,MAAgB,IAAsB;AACzF,QAAI,CAAC,MAAM;AACV,aAAO,GAAG;AAAA,IACX;AAEA,QAAI,CAAC,WAAW;AACf,kBAAY,KAAK,MAAM,UAAU,eAAe,yBAAU;AAAA,IAC3D;AAEA,eAAO;AAAA,MACN,CAACA,OAAMC,eACNA,WAAU;AAAA,QACT;AAAA,QACC,CAAC,SAAe;AAChB,cAAI;AACH,mBAAO,GAAG,IAAI;AAAA,UACf,SAAS,GAAG;AACX,iBAAK,UAAU;AAAA,cACd,MAAMD,MAAK,eAAe;AAAA,cAC1B,SAAS,aAAa,QAAQ,EAAE,UAAU;AAAA;AAAA,YAC3C,CAAC;AACD,kBAAM;AAAA,UACP,UAAE;AACD,iBAAK,IAAI;AAAA,UACV;AAAA,QACD;AAAA,MACD;AAAA,MACD;AAAA,MACA;AAAA,IACD;AAAA,EACD;AACD;","names":["otel","rawTracer"]}

View File

@@ -0,0 +1,8 @@
import { NextConfigObject, SentryBuildOptions } from '../types';
/**
* Materializes the final Next.js config object with Sentry's build-time integrations applied.
*
* Note: this mutates both `incomingUserNextConfigObject` and `userSentryOptions` (to apply defaults/migrations).
*/
export declare function getFinalConfigObject(incomingUserNextConfigObject: NextConfigObject, userSentryOptions: SentryBuildOptions): NextConfigObject;
//# sourceMappingURL=getFinalConfigObject.d.ts.map

View File

@@ -0,0 +1,27 @@
/**
* @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 Ambulance = createLucideIcon("Ambulance", [
["path", { d: "M10 10H6", key: "1bsnug" }],
["path", { d: "M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2", key: "wrbu53" }],
[
"path",
{
d: "M19 18h2a1 1 0 0 0 1-1v-3.28a1 1 0 0 0-.684-.948l-1.923-.641a1 1 0 0 1-.578-.502l-1.539-3.076A1 1 0 0 0 16.382 8H14",
key: "lrkjwd"
}
],
["path", { d: "M8 8v4", key: "1fwk8c" }],
["path", { d: "M9 18h6", key: "x1upvd" }],
["circle", { cx: "17", cy: "18", r: "2", key: "332jqn" }],
["circle", { cx: "7", cy: "18", r: "2", key: "19iecd" }]
]);
export { Ambulance as default };
//# sourceMappingURL=ambulance.js.map

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