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,"sources":["../../src/mysql-proxy/migrator.ts"],"sourcesContent":["import type { MigrationConfig } from '~/migrator.ts';\nimport { readMigrationFiles } from '~/migrator.ts';\nimport { sql } from '~/sql/sql.ts';\nimport type { MySqlRemoteDatabase } from './driver.ts';\n\nexport type ProxyMigrator = (migrationQueries: string[]) => Promise<void>;\n\nexport async function migrate<TSchema extends Record<string, unknown>>(\n\tdb: MySqlRemoteDatabase<TSchema>,\n\tcallback: ProxyMigrator,\n\tconfig: MigrationConfig,\n) {\n\tconst migrations = readMigrationFiles(config);\n\n\tconst migrationsTable = config.migrationsTable ?? '__drizzle_migrations';\n\tconst migrationTableCreate = sql`\n\t\tcreate table if not exists ${sql.identifier(migrationsTable)} (\n\t\t\tid serial primary key,\n\t\t\thash text not null,\n\t\t\tcreated_at bigint\n\t\t)\n\t`;\n\tawait db.execute(migrationTableCreate);\n\n\tconst dbMigrations = await db.select({\n\t\tid: sql.raw('id'),\n\t\thash: sql.raw('hash'),\n\t\tcreated_at: sql.raw('created_at'),\n\t}).from(sql.identifier(migrationsTable).getSQL()).orderBy(\n\t\tsql.raw('created_at desc'),\n\t).limit(1);\n\n\tconst lastDbMigration = dbMigrations[0];\n\n\tconst queriesToRun: string[] = [];\n\n\tfor (const migration of migrations) {\n\t\tif (\n\t\t\t!lastDbMigration\n\t\t\t|| Number(lastDbMigration.created_at) < migration.folderMillis\n\t\t) {\n\t\t\tqueriesToRun.push(\n\t\t\t\t...migration.sql,\n\t\t\t\t`insert into ${\n\t\t\t\t\tsql.identifier(migrationsTable).value\n\t\t\t\t} (\\`hash\\`, \\`created_at\\`) values('${migration.hash}', '${migration.folderMillis}')`,\n\t\t\t);\n\t\t}\n\t}\n\n\tawait callback(queriesToRun);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,sBAAmC;AACnC,iBAAoB;AAKpB,eAAsB,QACrB,IACA,UACA,QACC;AACD,QAAM,iBAAa,oCAAmB,MAAM;AAE5C,QAAM,kBAAkB,OAAO,mBAAmB;AAClD,QAAM,uBAAuB;AAAA,+BACC,eAAI,WAAW,eAAe,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAM7D,QAAM,GAAG,QAAQ,oBAAoB;AAErC,QAAM,eAAe,MAAM,GAAG,OAAO;AAAA,IACpC,IAAI,eAAI,IAAI,IAAI;AAAA,IAChB,MAAM,eAAI,IAAI,MAAM;AAAA,IACpB,YAAY,eAAI,IAAI,YAAY;AAAA,EACjC,CAAC,EAAE,KAAK,eAAI,WAAW,eAAe,EAAE,OAAO,CAAC,EAAE;AAAA,IACjD,eAAI,IAAI,iBAAiB;AAAA,EAC1B,EAAE,MAAM,CAAC;AAET,QAAM,kBAAkB,aAAa,CAAC;AAEtC,QAAM,eAAyB,CAAC;AAEhC,aAAW,aAAa,YAAY;AACnC,QACC,CAAC,mBACE,OAAO,gBAAgB,UAAU,IAAI,UAAU,cACjD;AACD,mBAAa;AAAA,QACZ,GAAG,UAAU;AAAA,QACb,eACC,eAAI,WAAW,eAAe,EAAE,KACjC,uCAAuC,UAAU,IAAI,OAAO,UAAU,YAAY;AAAA,MACnF;AAAA,IACD;AAAA,EACD;AAEA,QAAM,SAAS,YAAY;AAC5B;","names":[]}

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.bundle.replay.feedback.d.ts","sourceRoot":"","sources":["../../../src/index.bundle.replay.feedback.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,6BAA6B,EAC7B,6BAA6B,EAC7B,UAAU,EACX,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAE3D,cAAc,qBAAqB,CAAC;AAGpC,OAAO,EAAE,6BAA6B,IAAI,yBAAyB,EAAE,UAAU,IAAI,MAAM,EAAE,CAAC;AAE5F,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEtE,OAAO,EACL,6BAA6B,IAAI,yBAAyB,EAC1D,wBAAwB,IAAI,wBAAwB,EACpD,wBAAwB,IAAI,mBAAmB,GAChD,CAAC;AAEF,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC"}

View File

@@ -0,0 +1,106 @@
{
"name": "http-status",
"version": "2.1.0",
"description": "Interact with HTTP status code",
"homepage": "https://github.com/adaltas/node-http-status",
"author": "David Worms <david@adaltas.com> (https://www.adaltas.com)",
"keywords": [
"http",
"connect",
"frontend",
"status",
"express"
],
"license": "BSD-3-Clause",
"repository": {
"type": "git",
"url": "https://github.com/adaltas/node-http-status"
},
"bugs": {
"email": "open@adaltas.com",
"url": "http://github.com/adaltas/node-http-status/issues"
},
"devDependencies": {
"@commitlint/cli": "^19.5.0",
"@commitlint/config-conventional": "^19.5.0",
"@eslint/core": "^0.7.0",
"@eslint/js": "^9.13.0",
"@types/eslint__js": "^8.42.3",
"@types/mocha": "^10.0.9",
"@types/node": "^22.7.7",
"@types/should": "^13.0.0",
"commitlint": "^19.5.0",
"eslint": "^9.13.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-mocha": "^10.5.0",
"eslint-plugin-prettier": "^5.2.1",
"husky": "^9.1.6",
"lint-staged": "^15.2.10",
"mocha": "10.7.3",
"prettier": "^3.3.3",
"should": "13.2.3",
"standard-version": "^9.5.0",
"ts-node": "^10.9.2",
"tsup": "^8.3.0",
"typescript": "^5.6.3",
"typescript-eslint": "^8.10.0"
},
"contributors": [
{
"name": "David Worms",
"email": "david@adaltas.com"
},
{
"name": "Daniel Gasienica",
"email": "daniel@gasienica.ch"
}
],
"main": "./dist/index.js",
"exports": {
".": {
"import": "./dist/index.js",
"types": "./dist/index.d.ts",
"require": "./dist/index.cjs"
},
"./*": {
"import": "./dist/*.js",
"types": "./dist/*.d.ts",
"require": "./dist/*.cjs"
}
},
"files": [
"dist"
],
"lint-staged": {
"*.js": "npm run lint:fix",
"*.md": "prettier -w"
},
"mocha": {
"throw-deprecation": false,
"loader": "ts-node/esm",
"require": [
"should"
],
"inline-diffs": true,
"timeout": 40000,
"reporter": "spec",
"recursive": true
},
"engines": {
"node": ">= 0.4.0"
},
"scripts": {
"build": "tsup-node",
"lint:check": "eslint",
"lint:fix": "eslint --fix",
"lint:staged": "npx lint-staged",
"prepare": "husky install",
"release": "standard-version",
"release:minor": "standard-version --release-as minor",
"release:patch": "standard-version --release-as patch",
"release:major": "standard-version --release-as major",
"postrelease": "git push --follow-tags origin master",
"test": "mocha \"test/**/*.{js,ts}\""
},
"type": "module"
}

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/gel-core/columns/bytes.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyGelTable } from '~/gel-core/table.ts';\nimport { GelColumn, GelColumnBuilder } from './common.ts';\n\nexport type GelBytesBuilderInitial<TName extends string> = GelBytesBuilder<{\n\tname: TName;\n\tdataType: 'buffer';\n\tcolumnType: 'GelBytes';\n\tdata: Uint8Array;\n\tdriverParam: Uint8Array | Buffer;\n\tenumValues: undefined;\n}>;\n\nexport class GelBytesBuilder<T extends ColumnBuilderBaseConfig<'buffer', 'GelBytes'>> extends GelColumnBuilder<T> {\n\tstatic override readonly [entityKind]: string = 'GelBytesBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'buffer', 'GelBytes');\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyGelTable<{ name: TTableName }>,\n\t): GelBytes<MakeColumnConfig<T, TTableName>> {\n\t\treturn new GelBytes<MakeColumnConfig<T, TTableName>>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig<any, any>,\n\t\t);\n\t}\n}\n\nexport class GelBytes<T extends ColumnBaseConfig<'buffer', 'GelBytes'>> extends GelColumn<T> {\n\tstatic override readonly [entityKind]: string = 'GelBytes';\n\n\tgetSQLType(): string {\n\t\treturn 'bytea';\n\t}\n}\n\nexport function bytes(): GelBytesBuilderInitial<''>;\nexport function bytes<TName extends string>(name: TName): GelBytesBuilderInitial<TName>;\nexport function bytes(name?: string) {\n\treturn new GelBytesBuilder(name ?? '');\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,oBAA2B;AAE3B,oBAA4C;AAWrC,MAAM,wBAAiF,+BAAoB;AAAA,EACjH,QAA0B,wBAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB;AAC5B,UAAM,MAAM,UAAU,UAAU;AAAA,EACjC;AAAA;AAAA,EAGS,MACR,OAC4C;AAC5C,WAAO,IAAI;AAAA,MACV;AAAA,MACA,KAAK;AAAA,IACN;AAAA,EACD;AACD;AAEO,MAAM,iBAAmE,wBAAa;AAAA,EAC5F,QAA0B,wBAAU,IAAY;AAAA,EAEhD,aAAqB;AACpB,WAAO;AAAA,EACR;AACD;AAIO,SAAS,MAAM,MAAe;AACpC,SAAO,IAAI,gBAAgB,QAAQ,EAAE;AACtC;","names":[]}

View File

@@ -0,0 +1,286 @@
import type { Cache } from "../cache/core/cache.cjs";
import { entityKind } from "../entity.cjs";
import type { GelDialect } from "./dialect.cjs";
import { GelDeleteBase, GelInsertBuilder, GelSelectBuilder, GelUpdateBuilder, QueryBuilder } from "./query-builders/index.cjs";
import type { GelQueryResultHKT, GelSession, GelTransaction } from "./session.cjs";
import type { GelTable } from "./table.cjs";
import type { TypedQueryBuilder } from "../query-builders/query-builder.cjs";
import type { ExtractTablesWithRelations, RelationalSchemaConfig, TablesRelationalConfig } from "../relations.cjs";
import { type ColumnsSelection, type SQL, type SQLWrapper } from "../sql/sql.cjs";
import { WithSubquery } from "../subquery.cjs";
import type { DrizzleTypeError } from "../utils.cjs";
import type { GelColumn } from "./columns/index.cjs";
import { GelCountBuilder } from "./query-builders/count.cjs";
import { RelationalQueryBuilder } from "./query-builders/query.cjs";
import { GelRaw } from "./query-builders/raw.cjs";
import type { SelectedFields } from "./query-builders/select.types.cjs";
import type { WithSubqueryWithSelection } from "./subquery.cjs";
import type { GelViewBase } from "./view-base.cjs";
export declare class GelDatabase<TQueryResult extends GelQueryResultHKT, TFullSchema extends Record<string, unknown> = Record<string, never>, TSchema extends TablesRelationalConfig = ExtractTablesWithRelations<TFullSchema>> {
static readonly [entityKind]: string;
readonly _: {
readonly schema: TSchema | undefined;
readonly fullSchema: TFullSchema;
readonly tableNamesMap: Record<string, string>;
readonly session: GelSession<TQueryResult, TFullSchema, TSchema>;
};
query: TFullSchema extends Record<string, never> ? DrizzleTypeError<'Seems like the schema generic is missing - did you forget to add it to your DB type?'> : {
[K in keyof TSchema]: RelationalQueryBuilder<TSchema, TSchema[K]>;
};
constructor(
/** @internal */
dialect: GelDialect,
/** @internal */
session: GelSession<any, any, any>, schema: RelationalSchemaConfig<TSchema> | undefined);
/**
* Creates a subquery that defines a temporary named result set as a CTE.
*
* It is useful for breaking down complex queries into simpler parts and for reusing the result set in subsequent parts of the query.
*
* See docs: {@link https://orm.drizzle.team/docs/select#with-clause}
*
* @param alias The alias for the subquery.
*
* Failure to provide an alias will result in a DrizzleTypeError, preventing the subquery from being referenced in other queries.
*
* @example
*
* ```ts
* // Create a subquery with alias 'sq' and use it in the select query
* const sq = db.$with('sq').as(db.select().from(users).where(eq(users.id, 42)));
*
* const result = await db.with(sq).select().from(sq);
* ```
*
* To select arbitrary SQL values as fields in a CTE and reference them in other CTEs or in the main query, you need to add aliases to them:
*
* ```ts
* // Select an arbitrary SQL value as a field in a CTE and reference it in the main query
* const sq = db.$with('sq').as(db.select({
* name: sql<string>`upper(${users.name})`.as('name'),
* })
* .from(users));
*
* const result = await db.with(sq).select({ name: sq.name }).from(sq);
* ```
*/
$with<TAlias extends string>(alias: TAlias): {
as<TSelection extends ColumnsSelection>(qb: TypedQueryBuilder<TSelection> | ((qb: QueryBuilder) => TypedQueryBuilder<TSelection>)): WithSubqueryWithSelection<TSelection, TAlias>;
};
$count(source: GelTable | GelViewBase | SQL | SQLWrapper, filters?: SQL<unknown>): GelCountBuilder<GelSession<any, any, any>>;
/**
* Incorporates a previously defined CTE (using `$with`) into the main query.
*
* This method allows the main query to reference a temporary named result set.
*
* See docs: {@link https://orm.drizzle.team/docs/select#with-clause}
*
* @param queries The CTEs to incorporate into the main query.
*
* @example
*
* ```ts
* // Define a subquery 'sq' as a CTE using $with
* const sq = db.$with('sq').as(db.select().from(users).where(eq(users.id, 42)));
*
* // Incorporate the CTE 'sq' into the main query and select from it
* const result = await db.with(sq).select().from(sq);
* ```
*/
with(...queries: WithSubquery[]): {
select: {
(): GelSelectBuilder<undefined>;
<TSelection extends SelectedFields>(fields: TSelection): GelSelectBuilder<TSelection>;
};
selectDistinct: {
(): GelSelectBuilder<undefined>;
<TSelection extends SelectedFields>(fields: TSelection): GelSelectBuilder<TSelection>;
};
selectDistinctOn: {
(on: (GelColumn | SQLWrapper)[]): GelSelectBuilder<undefined>;
<TSelection extends SelectedFields>(on: (GelColumn | SQLWrapper)[], fields: TSelection): GelSelectBuilder<TSelection>;
};
update: <TTable extends GelTable>(table: TTable) => GelUpdateBuilder<TTable, TQueryResult>;
insert: <TTable extends GelTable>(table: TTable) => GelInsertBuilder<TTable, TQueryResult>;
delete: <TTable extends GelTable>(table: TTable) => GelDeleteBase<TTable, TQueryResult>;
};
/**
* Creates a select query.
*
* Calling this method with no arguments will select all columns from the table. Pass a selection object to specify the columns you want to select.
*
* Use `.from()` method to specify which table to select from.
*
* See docs: {@link https://orm.drizzle.team/docs/select}
*
* @param fields The selection object.
*
* @example
*
* ```ts
* // Select all columns and all rows from the 'cars' table
* const allCars: Car[] = await db.select().from(cars);
*
* // Select specific columns and all rows from the 'cars' table
* const carsIdsAndBrands: { id: number; brand: string }[] = await db.select({
* id: cars.id,
* brand: cars.brand
* })
* .from(cars);
* ```
*
* Like in SQL, you can use arbitrary expressions as selection fields, not just table columns:
*
* ```ts
* // Select specific columns along with expression and all rows from the 'cars' table
* const carsIdsAndLowerNames: { id: number; lowerBrand: string }[] = await db.select({
* id: cars.id,
* lowerBrand: sql<string>`lower(${cars.brand})`,
* })
* .from(cars);
* ```
*/
select(): GelSelectBuilder<undefined>;
select<TSelection extends SelectedFields>(fields: TSelection): GelSelectBuilder<TSelection>;
/**
* Adds `distinct` expression to the select query.
*
* Calling this method will return only unique values. When multiple columns are selected, it returns rows with unique combinations of values in these columns.
*
* Use `.from()` method to specify which table to select from.
*
* See docs: {@link https://orm.drizzle.team/docs/select#distinct}
*
* @param fields The selection object.
*
* @example
* ```ts
* // Select all unique rows from the 'cars' table
* await db.selectDistinct()
* .from(cars)
* .orderBy(cars.id, cars.brand, cars.color);
*
* // Select all unique brands from the 'cars' table
* await db.selectDistinct({ brand: cars.brand })
* .from(cars)
* .orderBy(cars.brand);
* ```
*/
selectDistinct(): GelSelectBuilder<undefined>;
selectDistinct<TSelection extends SelectedFields>(fields: TSelection): GelSelectBuilder<TSelection>;
/**
* Adds `distinct on` expression to the select query.
*
* Calling this method will specify how the unique rows are determined.
*
* Use `.from()` method to specify which table to select from.
*
* See docs: {@link https://orm.drizzle.team/docs/select#distinct}
*
* @param on The expression defining uniqueness.
* @param fields The selection object.
*
* @example
* ```ts
* // Select the first row for each unique brand from the 'cars' table
* await db.selectDistinctOn([cars.brand])
* .from(cars)
* .orderBy(cars.brand);
*
* // Selects the first occurrence of each unique car brand along with its color from the 'cars' table
* await db.selectDistinctOn([cars.brand], { brand: cars.brand, color: cars.color })
* .from(cars)
* .orderBy(cars.brand, cars.color);
* ```
*/
selectDistinctOn(on: (GelColumn | SQLWrapper)[]): GelSelectBuilder<undefined>;
selectDistinctOn<TSelection extends SelectedFields>(on: (GelColumn | SQLWrapper)[], fields: TSelection): GelSelectBuilder<TSelection>;
$cache: {
invalidate: Cache['onMutate'];
};
/**
* Creates an update query.
*
* Calling this method without `.where()` clause will update all rows in a table. The `.where()` clause specifies which rows should be updated.
*
* Use `.set()` method to specify which values to update.
*
* See docs: {@link https://orm.drizzle.team/docs/update}
*
* @param table The table to update.
*
* @example
*
* ```ts
* // Update all rows in the 'cars' table
* await db.update(cars).set({ color: 'red' });
*
* // Update rows with filters and conditions
* await db.update(cars).set({ color: 'red' }).where(eq(cars.brand, 'BMW'));
*
* // Update with returning clause
* const updatedCar: Car[] = await db.update(cars)
* .set({ color: 'red' })
* .where(eq(cars.id, 1))
* .returning();
* ```
*/
update<TTable extends GelTable>(table: TTable): GelUpdateBuilder<TTable, TQueryResult>;
/**
* Creates an insert query.
*
* Calling this method will create new rows in a table. Use `.values()` method to specify which values to insert.
*
* See docs: {@link https://orm.drizzle.team/docs/insert}
*
* @param table The table to insert into.
*
* @example
*
* ```ts
* // Insert one row
* await db.insert(cars).values({ brand: 'BMW' });
*
* // Insert multiple rows
* await db.insert(cars).values([{ brand: 'BMW' }, { brand: 'Porsche' }]);
*
* // Insert with returning clause
* const insertedCar: Car[] = await db.insert(cars)
* .values({ brand: 'BMW' })
* .returning();
* ```
*/
insert<TTable extends GelTable>(table: TTable): GelInsertBuilder<TTable, TQueryResult>;
/**
* Creates a delete query.
*
* Calling this method without `.where()` clause will delete all rows in a table. The `.where()` clause specifies which rows should be deleted.
*
* See docs: {@link https://orm.drizzle.team/docs/delete}
*
* @param table The table to delete from.
*
* @example
*
* ```ts
* // Delete all rows in the 'cars' table
* await db.delete(cars);
*
* // Delete rows with filters and conditions
* await db.delete(cars).where(eq(cars.color, 'green'));
*
* // Delete with returning clause
* const deletedCar: Car[] = await db.delete(cars)
* .where(eq(cars.id, 1))
* .returning();
* ```
*/
delete<TTable extends GelTable>(table: TTable): GelDeleteBase<TTable, TQueryResult>;
execute<TRow extends Record<string, unknown> = Record<string, unknown>>(query: SQLWrapper | string): GelRaw<TRow[]>;
transaction<T>(transaction: (tx: GelTransaction<TQueryResult, TFullSchema, TSchema>) => Promise<T>): Promise<T>;
}
export type GelWithReplicas<Q> = Q & {
$primary: Q;
$replicas: Q[];
};
export declare const withReplicas: <HKT extends GelQueryResultHKT, TFullSchema extends Record<string, unknown>, TSchema extends TablesRelationalConfig, Q extends GelDatabase<HKT, TFullSchema, TSchema extends Record<string, unknown> ? ExtractTablesWithRelations<TFullSchema> : TSchema>>(primary: Q, replicas: [Q, ...Q[]], getReplica?: (replicas: Q[]) => Q) => GelWithReplicas<Q>;

View File

@@ -0,0 +1,149 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.validateProperties = exports.error = void 0;
const code_1 = require("../code");
const util_1 = require("../../compile/util");
const codegen_1 = require("../../compile/codegen");
const metadata_1 = require("./metadata");
const nullable_1 = require("./nullable");
const error_1 = require("./error");
var PropError;
(function (PropError) {
PropError["Additional"] = "additional";
PropError["Missing"] = "missing";
})(PropError || (PropError = {}));
exports.error = {
message: (cxt) => {
const { params } = cxt;
return params.propError
? params.propError === PropError.Additional
? "must NOT have additional properties"
: `must have property '${params.missingProperty}'`
: (0, error_1.typeErrorMessage)(cxt, "object");
},
params: (cxt) => {
const { params } = cxt;
return params.propError
? params.propError === PropError.Additional
? (0, codegen_1._) `{error: ${params.propError}, additionalProperty: ${params.additionalProperty}}`
: (0, codegen_1._) `{error: ${params.propError}, missingProperty: ${params.missingProperty}}`
: (0, error_1.typeErrorParams)(cxt, "object");
},
};
const def = {
keyword: "properties",
schemaType: "object",
error: exports.error,
code: validateProperties,
};
// const error: KeywordErrorDefinition = {
// message: "should NOT have additional properties",
// params: ({params}) => _`{additionalProperty: ${params.additionalProperty}}`,
// }
function validateProperties(cxt) {
(0, metadata_1.checkMetadata)(cxt);
const { gen, data, parentSchema, it } = cxt;
const { additionalProperties, nullable } = parentSchema;
if (it.jtdDiscriminator && nullable)
throw new Error("JTD: nullable inside discriminator mapping");
if (commonProperties()) {
throw new Error("JTD: properties and optionalProperties have common members");
}
const [allProps, properties] = schemaProperties("properties");
const [allOptProps, optProperties] = schemaProperties("optionalProperties");
if (properties.length === 0 && optProperties.length === 0 && additionalProperties) {
return;
}
const [valid, cond] = it.jtdDiscriminator === undefined
? (0, nullable_1.checkNullableObject)(cxt, data)
: [gen.let("valid", false), true];
gen.if(cond, () => gen.assign(valid, true).block(() => {
validateProps(properties, "properties", true);
validateProps(optProperties, "optionalProperties");
if (!additionalProperties)
validateAdditional();
}));
cxt.pass(valid);
function commonProperties() {
const props = parentSchema.properties;
const optProps = parentSchema.optionalProperties;
if (!(props && optProps))
return false;
for (const p in props) {
if (Object.prototype.hasOwnProperty.call(optProps, p))
return true;
}
return false;
}
function schemaProperties(keyword) {
const schema = parentSchema[keyword];
const allPs = schema ? (0, code_1.allSchemaProperties)(schema) : [];
if (it.jtdDiscriminator && allPs.some((p) => p === it.jtdDiscriminator)) {
throw new Error(`JTD: discriminator tag used in ${keyword}`);
}
const ps = allPs.filter((p) => !(0, util_1.alwaysValidSchema)(it, schema[p]));
return [allPs, ps];
}
function validateProps(props, keyword, required) {
const _valid = gen.var("valid");
for (const prop of props) {
gen.if((0, code_1.propertyInData)(gen, data, prop, it.opts.ownProperties), () => applyPropertySchema(prop, keyword, _valid), () => missingProperty(prop));
cxt.ok(_valid);
}
function missingProperty(prop) {
if (required) {
gen.assign(_valid, false);
cxt.error(false, { propError: PropError.Missing, missingProperty: prop }, { schemaPath: prop });
}
else {
gen.assign(_valid, true);
}
}
}
function applyPropertySchema(prop, keyword, _valid) {
cxt.subschema({
keyword,
schemaProp: prop,
dataProp: prop,
}, _valid);
}
function validateAdditional() {
gen.forIn("key", data, (key) => {
const addProp = isAdditional(key, allProps, "properties", it.jtdDiscriminator);
const addOptProp = isAdditional(key, allOptProps, "optionalProperties");
const extra = addProp === true ? addOptProp : addOptProp === true ? addProp : (0, codegen_1.and)(addProp, addOptProp);
gen.if(extra, () => {
if (it.opts.removeAdditional) {
gen.code((0, codegen_1._) `delete ${data}[${key}]`);
}
else {
cxt.error(false, { propError: PropError.Additional, additionalProperty: key }, { instancePath: key, parentSchema: true });
if (!it.opts.allErrors)
gen.break();
}
});
});
}
function isAdditional(key, props, keyword, jtdDiscriminator) {
let additional;
if (props.length > 8) {
// TODO maybe an option instead of hard-coded 8?
const propsSchema = (0, util_1.schemaRefOrVal)(it, parentSchema[keyword], keyword);
additional = (0, codegen_1.not)((0, code_1.isOwnProperty)(gen, propsSchema, key));
if (jtdDiscriminator !== undefined) {
additional = (0, codegen_1.and)(additional, (0, codegen_1._) `${key} !== ${jtdDiscriminator}`);
}
}
else if (props.length || jtdDiscriminator !== undefined) {
const ps = jtdDiscriminator === undefined ? props : [jtdDiscriminator].concat(props);
additional = (0, codegen_1.and)(...ps.map((p) => (0, codegen_1._) `${key} !== ${p}`));
}
else {
additional = true;
}
return additional;
}
}
exports.validateProperties = validateProperties;
exports.default = def;
//# sourceMappingURL=properties.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/singlestore-core/columns/time.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnySingleStoreTable } from '~/singlestore-core/table.ts';\nimport { SingleStoreColumn, SingleStoreColumnBuilder } from './common.ts';\n\nexport type SingleStoreTimeBuilderInitial<TName extends string> = SingleStoreTimeBuilder<{\n\tname: TName;\n\tdataType: 'string';\n\tcolumnType: 'SingleStoreTime';\n\tdata: string;\n\tdriverParam: string | number;\n\tenumValues: undefined;\n\tgenerated: undefined;\n}>;\n\nexport class SingleStoreTimeBuilder<T extends ColumnBuilderBaseConfig<'string', 'SingleStoreTime'>>\n\textends SingleStoreColumnBuilder<\n\t\tT\n\t>\n{\n\tstatic override readonly [entityKind]: string = 'SingleStoreTimeBuilder';\n\n\tconstructor(\n\t\tname: T['name'],\n\t) {\n\t\tsuper(name, 'string', 'SingleStoreTime');\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnySingleStoreTable<{ name: TTableName }>,\n\t): SingleStoreTime<MakeColumnConfig<T, TTableName>> {\n\t\treturn new SingleStoreTime<MakeColumnConfig<T, TTableName>>(\n\t\t\ttable,\n\t\t\tthis.config as ColumnBuilderRuntimeConfig<any, any>,\n\t\t);\n\t}\n}\n\nexport class SingleStoreTime<\n\tT extends ColumnBaseConfig<'string', 'SingleStoreTime'>,\n> extends SingleStoreColumn<T> {\n\tstatic override readonly [entityKind]: string = 'SingleStoreTime';\n\n\tgetSQLType(): string {\n\t\treturn `time`;\n\t}\n}\n\nexport function time(): SingleStoreTimeBuilderInitial<''>;\nexport function time<TName extends string>(name: TName): SingleStoreTimeBuilderInitial<TName>;\nexport function time(name?: string) {\n\treturn new SingleStoreTimeBuilder(name ?? '');\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,oBAA2B;AAE3B,oBAA4D;AAYrD,MAAM,+BACJ,uCAGT;AAAA,EACC,QAA0B,wBAAU,IAAY;AAAA,EAEhD,YACC,MACC;AACD,UAAM,MAAM,UAAU,iBAAiB;AAAA,EACxC;AAAA;AAAA,EAGS,MACR,OACmD;AACnD,WAAO,IAAI;AAAA,MACV;AAAA,MACA,KAAK;AAAA,IACN;AAAA,EACD;AACD;AAEO,MAAM,wBAEH,gCAAqB;AAAA,EAC9B,QAA0B,wBAAU,IAAY;AAAA,EAEhD,aAAqB;AACpB,WAAO;AAAA,EACR;AACD;AAIO,SAAS,KAAK,MAAe;AACnC,SAAO,IAAI,uBAAuB,QAAQ,EAAE;AAC7C;","names":[]}

View File

@@ -0,0 +1,59 @@
import { Redis } from '@upstash/redis';
import type { MutationOption } from "../core/index.cjs";
import { Cache } from "../core/index.cjs";
import { entityKind } from "../../entity.cjs";
import type { CacheConfig } from "../core/types.cjs";
export declare class UpstashCache extends Cache {
redis: Redis;
protected useGlobally?: boolean | undefined;
static readonly [entityKind]: string;
/**
* Prefix for sets which denote the composite table names for each unique table
*
* Example: In the composite table set of "table1", you may find
* `${compositeTablePrefix}table1,table2` and `${compositeTablePrefix}table1,table3`
*/
private static compositeTableSetPrefix;
/**
* Prefix for hashes which map hash or tags to cache values
*/
private static compositeTablePrefix;
/**
* Key which holds the mapping of tags to composite table names
*
* Using this tagsMapKey, you can find the composite table name for a given tag
* and get the cache value for that tag:
*
* ```ts
* const compositeTable = redis.hget(tagsMapKey, 'tag1')
* console.log(compositeTable) // `${compositeTablePrefix}table1,table2`
*
* const cachevalue = redis.hget(compositeTable, 'tag1')
*/
private static tagsMapKey;
/**
* Queries whose auto invalidation is false aren't stored in their respective
* composite table hashes because those hashes are deleted when a mutation
* occurs on related tables.
*
* Instead, they are stored in a separate hash with the prefix
* `__nonAutoInvalidate__` to prevent them from being deleted when a mutation
*/
private static nonAutoInvalidateTablePrefix;
private luaScripts;
private internalConfig;
constructor(redis: Redis, config?: CacheConfig, useGlobally?: boolean | undefined);
strategy(): "all" | "explicit";
private toInternalConfig;
get(key: string, tables: string[], isTag?: boolean, isAutoInvalidate?: boolean): Promise<any[] | undefined>;
put(key: string, response: any, tables: string[], isTag?: boolean, config?: CacheConfig): Promise<void>;
onMutate(params: MutationOption): Promise<void>;
private addTablePrefix;
private getCompositeKey;
}
export declare function upstashCache({ url, token, config, global }: {
url: string;
token: string;
config?: CacheConfig;
global?: boolean;
}): UpstashCache;

View File

@@ -0,0 +1,6 @@
import type { Payload } from '../../../index.js';
export type ServerInitEvent = {
type: 'server-init';
};
export declare const serverInit: (payload: Payload) => void;
//# sourceMappingURL=serverInit.d.ts.map

View File

@@ -0,0 +1,45 @@
import { GraphQLError } from '../../error/GraphQLError.mjs';
/**
* No undefined variables
*
* A GraphQL operation is only valid if all variables encountered, both directly
* and via fragment spreads, are defined by that operation.
*
* See https://spec.graphql.org/draft/#sec-All-Variable-Uses-Defined
*/
export function NoUndefinedVariablesRule(context) {
let variableNameDefined = Object.create(null);
return {
OperationDefinition: {
enter() {
variableNameDefined = Object.create(null);
},
leave(operation) {
const usages = context.getRecursiveVariableUsages(operation);
for (const { node } of usages) {
const varName = node.name.value;
if (variableNameDefined[varName] !== true) {
context.reportError(
new GraphQLError(
operation.name
? `Variable "$${varName}" is not defined by operation "${operation.name.value}".`
: `Variable "$${varName}" is not defined.`,
{
nodes: [node, operation],
},
),
);
}
}
},
},
VariableDefinition(node) {
variableNameDefined[node.variable.name.value] = true;
},
};
}

View File

@@ -0,0 +1,16 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Clock6 = createLucideIcon("Clock6", [
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
["polyline", { points: "12 6 12 12 12 16.5", key: "hb2qv6" }]
]);
export { Clock6 as default };
//# sourceMappingURL=clock-6.js.map

View File

@@ -0,0 +1,68 @@
import { getRoundingMethod } from "./_lib/getRoundingMethod.mjs";
import { constructFrom } from "./constructFrom.mjs";
import { toDate } from "./toDate.mjs";
/**
* The {@link roundToNearestMinutes} function options.
*/
/**
* @name roundToNearestMinutes
* @category Minute Helpers
* @summary Rounds the given date to the nearest minute
*
* @description
* Rounds the given date to the nearest minute (or number of minutes).
* Rounds up when the given date is exactly between the nearest round minutes.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param date - The date to round
* @param options - An object with options.
*
* @returns The new date rounded to the closest minute
*
* @example
* // Round 10 July 2014 12:12:34 to nearest minute:
* const result = roundToNearestMinutes(new Date(2014, 6, 10, 12, 12, 34))
* //=> Thu Jul 10 2014 12:13:00
*
* @example
* // Round 10 July 2014 12:12:34 to nearest quarter hour:
* const result = roundToNearestMinutes(new Date(2014, 6, 10, 12, 12, 34), { nearestTo: 15 })
* //=> Thu Jul 10 2014 12:15:00
*
* @example
* // Floor (rounds down) 10 July 2014 12:12:34 to nearest minute:
* const result = roundToNearestMinutes(new Date(2014, 6, 10, 12, 12, 34), { roundingMethod: 'floor' })
* //=> Thu Jul 10 2014 12:12:00
*
* @example
* // Ceil (rounds up) 10 July 2014 12:12:34 to nearest half hour:
* const result = roundToNearestMinutes(new Date(2014, 6, 10, 12, 12, 34), { roundingMethod: 'ceil', nearestTo: 30 })
* //=> Thu Jul 10 2014 12:30:00
*/
export function roundToNearestMinutes(date, options) {
const nearestTo = options?.nearestTo ?? 1;
if (nearestTo < 1 || nearestTo > 30) return constructFrom(date, NaN);
const _date = toDate(date);
const fractionalSeconds = _date.getSeconds() / 60;
const fractionalMilliseconds = _date.getMilliseconds() / 1000 / 60;
const minutes =
_date.getMinutes() + fractionalSeconds + fractionalMilliseconds;
// Unlike the `differenceIn*` functions, the default rounding behavior is `round` and not 'trunc'
const method = options?.roundingMethod ?? "round";
const roundingMethod = getRoundingMethod(method);
const roundedMinutes = roundingMethod(minutes / nearestTo) * nearestTo;
const result = constructFrom(date, _date);
result.setMinutes(roundedMinutes, 0, 0);
return result;
}
// Fallback for modularized imports:
export default roundToNearestMinutes;

View File

@@ -0,0 +1 @@
{"version":3,"file":"layout-list.js","sources":["../../../src/icons/layout-list.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name LayoutList\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSI3IiB4PSIzIiB5PSIzIiByeD0iMSIgLz4KICA8cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSI3IiB4PSIzIiB5PSIxNCIgcng9IjEiIC8+CiAgPHBhdGggZD0iTTE0IDRoNyIgLz4KICA8cGF0aCBkPSJNMTQgOWg3IiAvPgogIDxwYXRoIGQ9Ik0xNCAxNWg3IiAvPgogIDxwYXRoIGQ9Ik0xNCAyMGg3IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/layout-list\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 LayoutList = createLucideIcon('LayoutList', [\n ['rect', { width: '7', height: '7', x: '3', y: '3', rx: '1', key: '1g98yp' }],\n ['rect', { width: '7', height: '7', x: '3', y: '14', rx: '1', key: '1bb6yr' }],\n ['path', { d: 'M14 4h7', key: '3xa0d5' }],\n ['path', { d: 'M14 9h7', key: '1icrd9' }],\n ['path', { d: 'M14 15h7', key: '1mj8o2' }],\n ['path', { d: 'M14 20h7', key: '11slyb' }],\n]);\n\nexport default LayoutList;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAa,iBAAiB,YAAc,CAAA,CAAA,CAAA;AAAA,CAAA,CAChD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,KAAK,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC5E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,KAAK,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAG,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC7E,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,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,38 @@
import type { Client } from '../client';
import type { DsnComponents, DsnLike } from '../types-hoist/dsn';
/**
* Renders the string representation of this Dsn.
*
* By default, this will render the public representation without the password
* component. To get the deprecated private representation, set `withPassword`
* to true.
*
* @param withPassword When set to true, the password will be included.
*/
export declare function dsnToString(dsn: DsnComponents, withPassword?: boolean): string;
/**
* Parses a Dsn from a given string.
*
* @param str A Dsn as string
* @returns Dsn as DsnComponents or undefined if @param str is not a valid DSN string
*/
export declare function dsnFromString(str: string): DsnComponents | undefined;
/**
* Extract the org ID from a DSN host.
*
* @param host The host from a DSN
* @returns The org ID if found, undefined otherwise
*/
export declare function extractOrgIdFromDsnHost(host: string): string | undefined;
/**
* Returns the organization ID of the client.
*
* The organization ID is extracted from the DSN. If the client options include a `orgId`, this will always take precedence.
*/
export declare function extractOrgIdFromClient(client: Client): string | undefined;
/**
* Creates a valid Sentry Dsn object, identifying a Sentry instance and project.
* @returns a valid DsnComponents object or `undefined` if @param from is an invalid DSN source
*/
export declare function makeDsn(from: DsnLike): DsnComponents | undefined;
//# sourceMappingURL=dsn.d.ts.map

View File

@@ -0,0 +1,41 @@
"use strict";
exports.formatLong = void 0;
var _index = require("../../_lib/buildFormatLongFn.cjs");
const dateFormats = {
full: "y. MMMM d., EEEE",
long: "y. MMMM d.",
medium: "y. MMM d.",
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}}",
};
const formatLong = (exports.formatLong = {
date: (0, _index.buildFormatLongFn)({
formats: dateFormats,
defaultWidth: "full",
}),
time: (0, _index.buildFormatLongFn)({
formats: timeFormats,
defaultWidth: "full",
}),
dateTime: (0, _index.buildFormatLongFn)({
formats: dateTimeFormats,
defaultWidth: "full",
}),
});

View File

@@ -0,0 +1,90 @@
import "@formatjs/icu-skeleton-parser";
import { isArgumentElement, isDateElement, isLiteralElement, isNumberElement, isPluralElement, isPoundElement, isSelectElement, isTagElement, isTimeElement, SKELETON_TYPE, TYPE } from "./types.js";
export function printAST(ast) {
return doPrintAST(ast, false);
}
export function doPrintAST(ast, isInPlural) {
const printedNodes = ast.map((el, i) => {
if (isLiteralElement(el)) {
return printLiteralElement(el, isInPlural, i === 0, i === ast.length - 1);
}
if (isArgumentElement(el)) {
return printArgumentElement(el);
}
if (isDateElement(el) || isTimeElement(el) || isNumberElement(el)) {
return printSimpleFormatElement(el);
}
if (isPluralElement(el)) {
return printPluralElement(el);
}
if (isSelectElement(el)) {
return printSelectElement(el);
}
if (isPoundElement(el)) {
return "#";
}
if (isTagElement(el)) {
return printTagElement(el);
}
});
return printedNodes.join("");
}
function printTagElement(el) {
return `<${el.value}>${printAST(el.children)}</${el.value}>`;
}
function printEscapedMessage(message) {
return message.replace(/([{}](?:[\s\S]*[{}])?)/, `'$1'`);
}
function printLiteralElement({ value }, isInPlural, isFirstEl, isLastEl) {
let escaped = value;
// If this literal starts with a ' and its not the 1st node, this means the node before it is non-literal
// and the `'` needs to be unescaped
if (!isFirstEl && escaped[0] === `'`) {
escaped = `''${escaped.slice(1)}`;
}
// Same logic but for last el
if (!isLastEl && escaped[escaped.length - 1] === `'`) {
escaped = `${escaped.slice(0, escaped.length - 1)}''`;
}
escaped = printEscapedMessage(escaped);
return isInPlural ? escaped.replace("#", "'#'") : escaped;
}
function printArgumentElement({ value }) {
return `{${value}}`;
}
function printSimpleFormatElement(el) {
return `{${el.value}, ${TYPE[el.type]}${el.style ? `, ${printArgumentStyle(el.style)}` : ""}}`;
}
function printNumberSkeletonToken(token) {
const { stem, options } = token;
return options.length === 0 ? stem : `${stem}${options.map((o) => `/${o}`).join("")}`;
}
function printArgumentStyle(style) {
if (typeof style === "string") {
return printEscapedMessage(style);
} else if (style.type === SKELETON_TYPE.dateTime) {
return `::${printDateTimeSkeleton(style)}`;
} else {
return `::${style.tokens.map(printNumberSkeletonToken).join(" ")}`;
}
}
export function printDateTimeSkeleton(style) {
return style.pattern;
}
function printSelectElement(el) {
const msg = [
el.value,
"select",
Object.keys(el.options).map((id) => `${id}{${doPrintAST(el.options[id].value, false)}}`).join(" ")
].join(",");
return `{${msg}}`;
}
function printPluralElement(el) {
const type = el.pluralType === "cardinal" ? "plural" : "selectordinal";
const msg = [
el.value,
type,
[el.offset ? `offset:${el.offset}` : "", ...Object.keys(el.options).map((id) => `${id}{${doPrintAST(el.options[id].value, true)}}`)].filter(Boolean).join(" ")
].join(",");
return `{${msg}}`;
}

View File

@@ -0,0 +1,57 @@
import Benchmark from "benchmark";
const suite = new Benchmark.Suite("ipv4");
const DATA = "127.0.0.1";
const ipv4RegexA =
/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/;
const ipv4RegexB =
/^(?:(?:(?=(25[0-5]))\1|(?=(2[0-4][0-9]))\2|(?=(1[0-9]{2}))\3|(?=([0-9]{1,2}))\4)\.){3}(?:(?=(25[0-5]))\5|(?=(2[0-4][0-9]))\6|(?=(1[0-9]{2}))\7|(?=([0-9]{1,2}))\8)$/;
const ipv4RegexC = /^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/;
const ipv4RegexD = /^(\b25[0-5]|\b2[0-4][0-9]|\b[01]?[0-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/;
const ipv4RegexE = /^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)\.){3}(25[0-5]|(2[0-4]|1\d|[1-9]|)\d)$/;
const ipv4RegexF = /^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)\.?\b){4}$/;
const ipv4RegexG = /^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)(\.(?!$)|$)){4}$/;
const ipv4RegexH = /^((25[0-5]|(2[0-4]|1[0-9]|[1-9]|)[0-9])(\.(?!$)|$)){4}$/;
const ipv4RegexI =
/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;
suite
.add("A", () => {
return ipv4RegexA.test(DATA);
})
.add("B", () => {
return ipv4RegexB.test(DATA);
})
.add("C", () => {
return ipv4RegexC.test(DATA);
})
.add("D", () => {
return ipv4RegexD.test(DATA);
})
.add("E", () => {
return ipv4RegexE.test(DATA);
})
.add("F", () => {
return ipv4RegexF.test(DATA);
})
.add("G", () => {
return ipv4RegexG.test(DATA);
})
.add("H", () => {
return ipv4RegexH.test(DATA);
})
.add("I", () => {
return ipv4RegexI.test(DATA);
})
.on("cycle", (e: Benchmark.Event) => {
console.log(`${suite.name!}: ${e.target}`);
});
export default {
suites: [suite],
};
if (require.main === module) {
suite.run();
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/collections/endpoints/create.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAO3D,eAAO,MAAM,aAAa,EAAE,cAmC3B,CAAA"}

View File

@@ -0,0 +1,9 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
import{registerCheckList as o}from"@lexical/list";import{useLexicalComposerContext as r}from"@lexical/react/LexicalComposerContext";import{useEffect as t}from"react";function e(){const[e]=r();return t((()=>o(e)),[e]),null}export{e as CheckListPlugin};

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/fields/config/reservedFieldNames.ts"],"sourcesContent":["/**\n * Reserved field names for collections with auth config enabled\n */\nexport const reservedBaseAuthFieldNames = [\n /* 'email',\n 'resetPasswordToken',\n 'resetPasswordExpiration', */\n 'salt',\n 'hash',\n]\n\n/**\n * Reserved field names for auth collections with verify: true\n */\nexport const reservedVerifyFieldNames = [\n /* '_verified', '_verificationToken' */\n]\n\n/**\n * Reserved field names for auth collections with useApiKey: true\n */\nexport const reservedAPIKeyFieldNames = [\n /* 'enableAPIKey', 'apiKeyIndex', 'apiKey' */\n]\n\n/**\n * Reserved field names for collections with upload config enabled\n */\nexport const reservedBaseUploadFieldNames = [\n 'file',\n /* 'mimeType',\n 'thumbnailURL',\n 'width',\n 'height',\n 'filesize',\n 'filename',\n 'url',\n 'focalX',\n 'focalY',\n 'sizes', */\n]\n\n/**\n * Reserved field names for collections with versions enabled\n */\nexport const reservedVersionsFieldNames = [\n /* '__v', '_status' */\n]\n"],"names":["reservedBaseAuthFieldNames","reservedVerifyFieldNames","reservedAPIKeyFieldNames","reservedBaseUploadFieldNames","reservedVersionsFieldNames"],"mappings":"AAAA;;CAEC,GACD,OAAO,MAAMA,6BAA6B;IACxC;;+BAE6B,GAC7B;IACA;CACD,CAAA;AAED;;CAEC,GACD,OAAO,MAAMC,2BAA2B,EAEvC,CAAA;AAED;;CAEC,GACD,OAAO,MAAMC,2BAA2B,EAEvC,CAAA;AAED;;CAEC,GACD,OAAO,MAAMC,+BAA+B;IAC1C;CAWD,CAAA;AAED;;CAEC,GACD,OAAO,MAAMC,6BAA6B,EAEzC,CAAA"}

View File

@@ -0,0 +1 @@
{"version":3,"names":["_index","require","_isLet","isBlockScoped","node","isFunctionDeclaration","isClassDeclaration","isLet"],"sources":["../../src/validators/isBlockScoped.ts"],"sourcesContent":["import {\n isClassDeclaration,\n isFunctionDeclaration,\n} from \"./generated/index.ts\";\nimport isLet from \"./isLet.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Check if the input `node` is block scoped.\n */\nexport default function isBlockScoped(\n node: t.Node | null | undefined,\n): boolean {\n return isFunctionDeclaration(node) || isClassDeclaration(node) || isLet(node);\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAIA,IAAAC,MAAA,GAAAD,OAAA;AAMe,SAASE,aAAaA,CACnCC,IAA+B,EACtB;EACT,OAAO,IAAAC,4BAAqB,EAACD,IAAI,CAAC,IAAI,IAAAE,yBAAkB,EAACF,IAAI,CAAC,IAAI,IAAAG,cAAK,EAACH,IAAI,CAAC;AAC/E","ignoreList":[]}

View File

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

View File

@@ -0,0 +1,96 @@
import { createPath } from "./node-path";
import { unionTypesMap, nodeAndUnionTypes } from "./nodes"; // recursively walks the AST starting at the given node. The callback is invoked for
// and object that has a 'type' property.
function walk(context, callback) {
var stop = false;
function innerWalk(context, callback) {
if (stop) {
return;
}
var node = context.node;
if (node === undefined) {
console.warn("traversing with an empty context");
return;
}
if (node._deleted === true) {
return;
}
var path = createPath(context);
callback(node.type, path);
if (path.shouldStop) {
stop = true;
return;
}
Object.keys(node).forEach(function (prop) {
var value = node[prop];
if (value === null || value === undefined) {
return;
}
var valueAsArray = Array.isArray(value) ? value : [value];
valueAsArray.forEach(function (childNode) {
if (typeof childNode.type === "string") {
var childContext = {
node: childNode,
parentKey: prop,
parentPath: path,
shouldStop: false,
inList: Array.isArray(value)
};
innerWalk(childContext, callback);
}
});
});
}
innerWalk(context, callback);
}
var noop = function noop() {};
export function traverse(node, visitors) {
var before = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : noop;
var after = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : noop;
Object.keys(visitors).forEach(function (visitor) {
if (!nodeAndUnionTypes.includes(visitor)) {
throw new Error("Unexpected visitor ".concat(visitor));
}
});
var context = {
node: node,
inList: false,
shouldStop: false,
parentPath: null,
parentKey: null
};
walk(context, function (type, path) {
if (typeof visitors[type] === "function") {
before(type, path);
visitors[type](path);
after(type, path);
}
var unionTypes = unionTypesMap[type];
if (!unionTypes) {
throw new Error("Unexpected node type ".concat(type));
}
unionTypes.forEach(function (unionType) {
if (typeof visitors[unionType] === "function") {
before(unionType, path);
visitors[unionType](path);
after(unionType, path);
}
});
});
}

View File

@@ -0,0 +1,42 @@
{
"name": "is-fullwidth-code-point",
"version": "3.0.0",
"description": "Check if the character represented by a given Unicode code point is fullwidth",
"license": "MIT",
"repository": "sindresorhus/is-fullwidth-code-point",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"engines": {
"node": ">=8"
},
"scripts": {
"test": "xo && ava && tsd-check"
},
"files": [
"index.js",
"index.d.ts"
],
"keywords": [
"fullwidth",
"full-width",
"full",
"width",
"unicode",
"character",
"string",
"codepoint",
"code",
"point",
"is",
"detect",
"check"
],
"devDependencies": {
"ava": "^1.3.1",
"tsd-check": "^0.5.0",
"xo": "^0.24.0"
}
}

View File

@@ -0,0 +1,26 @@
import type { CLSMetric, MetricRatingThresholds, ReportOpts } from './types';
/** Thresholds for CLS. See https://web.dev/articles/cls#what_is_a_good_cls_score */
export declare const CLSThresholds: MetricRatingThresholds;
/**
* Calculates the [CLS](https://web.dev/articles/cls) value for the current page and
* calls the `callback` function once the value is ready to be reported, along
* with all `layout-shift` performance entries that were used in the metric
* value calculation. The reported value is a `double` (corresponding to a
* [layout shift score](https://web.dev/articles/cls#layout_shift_score)).
*
* If the `reportAllChanges` configuration option is set to `true`, the
* `callback` function will be called as soon as the value is initially
* determined as well as any time the value changes throughout the page
* lifespan.
*
* _**Important:** CLS should be continually monitored for changes throughout
* the entire lifespan of a page—including if the user returns to the page after
* it's been hidden/backgrounded. However, since browsers often [will not fire
* additional callbacks once the user has backgrounded a
* page](https://developer.chrome.com/blog/page-lifecycle-api/#advice-hidden),
* `callback` is always called when the page's visibility state changes to
* hidden. As a result, the `callback` function might be called multiple times
* during the same page load._
*/
export declare const onCLS: (onReport: (metric: CLSMetric) => void, opts?: ReportOpts) => void;
//# sourceMappingURL=getCLS.d.ts.map

View File

@@ -0,0 +1,109 @@
"use strict";
exports.formatDistance = void 0;
const formatDistanceLocale = {
lessThanXSeconds: {
one: "น้อยกว่า 1 วินาที",
other: "น้อยกว่า {{count}} วินาที",
},
xSeconds: {
one: "1 วินาที",
other: "{{count}} วินาที",
},
halfAMinute: "ครึ่งนาที",
lessThanXMinutes: {
one: "น้อยกว่า 1 นาที",
other: "น้อยกว่า {{count}} นาที",
},
xMinutes: {
one: "1 นาที",
other: "{{count}} นาที",
},
aboutXHours: {
one: "ประมาณ 1 ชั่วโมง",
other: "ประมาณ {{count}} ชั่วโมง",
},
xHours: {
one: "1 ชั่วโมง",
other: "{{count}} ชั่วโมง",
},
xDays: {
one: "1 วัน",
other: "{{count}} วัน",
},
aboutXWeeks: {
one: "ประมาณ 1 สัปดาห์",
other: "ประมาณ {{count}} สัปดาห์",
},
xWeeks: {
one: "1 สัปดาห์",
other: "{{count}} สัปดาห์",
},
aboutXMonths: {
one: "ประมาณ 1 เดือน",
other: "ประมาณ {{count}} เดือน",
},
xMonths: {
one: "1 เดือน",
other: "{{count}} เดือน",
},
aboutXYears: {
one: "ประมาณ 1 ปี",
other: "ประมาณ {{count}} ปี",
},
xYears: {
one: "1 ปี",
other: "{{count}} ปี",
},
overXYears: {
one: "มากกว่า 1 ปี",
other: "มากกว่า {{count}} ปี",
},
almostXYears: {
one: "เกือบ 1 ปี",
other: "เกือบ {{count}} ปี",
},
};
const formatDistance = (token, count, options) => {
let result;
const tokenValue = formatDistanceLocale[token];
if (typeof tokenValue === "string") {
result = tokenValue;
} else if (count === 1) {
result = tokenValue.one;
} else {
result = tokenValue.other.replace("{{count}}", String(count));
}
if (options?.addSuffix) {
if (options.comparison && options.comparison > 0) {
if (token === "halfAMinute") {
return "ใน" + result;
} else {
return "ใน " + result;
}
} else {
return result + "ที่ผ่านมา";
}
}
return result;
};
exports.formatDistance = formatDistance;

View File

@@ -0,0 +1,27 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const envelope = require('./envelope.js');
const time = require('./time.js');
/**
* Creates client report envelope
* @param discarded_events An array of discard events
* @param dsn A DSN that can be set on the header. Optional.
*/
function createClientReportEnvelope(
discarded_events,
dsn,
timestamp,
) {
const clientReportItem = [
{ type: 'client_report' },
{
timestamp: timestamp || time.dateTimestampInSeconds(),
discarded_events,
},
];
return envelope.createEnvelope(dsn ? { dsn } : {}, [clientReportItem]);
}
exports.createClientReportEnvelope = createClientReportEnvelope;
//# sourceMappingURL=clientreport.js.map

View File

@@ -0,0 +1,51 @@
import { GLOBAL_OBJ } from '../utils/worldwide.js';
import { addHandler, maybeInstrument, triggerHandlers } from './handlers.js';
let _oldOnErrorHandler = null;
/**
* Add an instrumentation handler for when an error is captured by the global error handler.
*
* Use at your own risk, this might break without changelog notice, only used internally.
* @hidden
*/
function addGlobalErrorInstrumentationHandler(handler) {
const type = 'error';
addHandler(type, handler);
maybeInstrument(type, instrumentError);
}
function instrumentError() {
_oldOnErrorHandler = GLOBAL_OBJ.onerror;
// Note: The reason we are doing window.onerror instead of window.addEventListener('error')
// is that we are using this handler in the Loader Script, to handle buffered errors consistently
GLOBAL_OBJ.onerror = function (
msg,
url,
line,
column,
error,
) {
const handlerData = {
column,
error,
line,
msg,
url,
};
triggerHandlers('error', handlerData);
if (_oldOnErrorHandler) {
// eslint-disable-next-line prefer-rest-params
return _oldOnErrorHandler.apply(this, arguments);
}
return false;
};
GLOBAL_OBJ.onerror.__SENTRY_INSTRUMENTED__ = true;
}
export { addGlobalErrorInstrumentationHandler };
//# sourceMappingURL=globalError.js.map

View File

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

View File

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

View File

@@ -0,0 +1,12 @@
Prism.languages.mizar = {
'comment': /::.+/,
'keyword': /@proof\b|\b(?:according|aggregate|all|and|antonym|are|as|associativity|assume|asymmetry|attr|be|begin|being|by|canceled|case|cases|clusters?|coherence|commutativity|compatibility|connectedness|consider|consistency|constructors|contradiction|correctness|def|deffunc|define|definitions?|defpred|do|does|end|environ|equals|ex|exactly|existence|for|from|func|given|hence|hereby|holds|idempotence|identity|iff?|implies|involutiveness|irreflexivity|is|it|let|means|mode|non|not|notations?|now|of|or|otherwise|over|per|pred|prefix|projectivity|proof|provided|qua|reconsider|redefine|reduce|reducibility|reflexivity|registrations?|requirements|reserve|sch|schemes?|section|selector|set|sethood|st|struct|such|suppose|symmetry|synonym|take|that|the|then|theorems?|thesis|thus|to|transitivity|uniqueness|vocabular(?:ies|y)|when|where|with|wrt)\b/,
'parameter': {
pattern: /\$(?:10|\d)/,
alias: 'variable'
},
'variable': /\b\w+(?=:)/,
'number': /(?:\b|-)\d+\b/,
'operator': /\.\.\.|->|&|\.?=/,
'punctuation': /\(#|#\)|[,:;\[\](){}]/
};

View File

@@ -0,0 +1,30 @@
import type { GraphQLField, GraphQLNamedType } from './definition';
import { GraphQLEnumType, GraphQLObjectType } from './definition';
export declare const __Schema: GraphQLObjectType;
export declare const __Directive: GraphQLObjectType;
export declare const __DirectiveLocation: GraphQLEnumType;
export declare const __Type: GraphQLObjectType;
export declare const __Field: GraphQLObjectType;
export declare const __InputValue: GraphQLObjectType;
export declare const __EnumValue: GraphQLObjectType;
declare enum TypeKind {
SCALAR = 'SCALAR',
OBJECT = 'OBJECT',
INTERFACE = 'INTERFACE',
UNION = 'UNION',
ENUM = 'ENUM',
INPUT_OBJECT = 'INPUT_OBJECT',
LIST = 'LIST',
NON_NULL = 'NON_NULL',
}
export { TypeKind };
export declare const __TypeKind: GraphQLEnumType;
/**
* Note that these are GraphQLField and not GraphQLFieldConfig,
* so the format for args is different.
*/
export declare const SchemaMetaFieldDef: GraphQLField<unknown, unknown>;
export declare const TypeMetaFieldDef: GraphQLField<unknown, unknown>;
export declare const TypeNameMetaFieldDef: GraphQLField<unknown, unknown>;
export declare const introspectionTypes: ReadonlyArray<GraphQLNamedType>;
export declare function isIntrospectionType(type: GraphQLNamedType): boolean;

View File

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

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"types.js","names":[],"sources":["../../../../../src/elements/WhereBuilder/Condition/Text/types.ts"],"sourcesContent":["import type { TextFieldClient } from 'payload'\n\nimport type { DefaultFilterProps } from '../types.js'\n\nexport type TextFilterProps = {\n readonly field: TextFieldClient\n readonly onChange: (val: string) => void\n readonly value: string | string[]\n} & DefaultFilterProps\n"],"mappings":"AAIA","ignoreList":[]}

View File

@@ -0,0 +1,350 @@
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.sanitizedErrorMessage = exports.isObjectWithTextString = exports.getErrorMessage = exports.patchClientConnectCallback = exports.patchCallbackPGPool = exports.updateCounter = exports.getPoolName = exports.patchCallback = exports.handleExecutionResult = exports.handleConfigQuery = exports.shouldSkipInstrumentation = exports.getSemanticAttributesFromPoolConnection = exports.getSemanticAttributesFromConnection = exports.getConnectionString = exports.parseAndMaskConnectionString = exports.parseNormalizedOperationName = exports.getQuerySpanName = void 0;
const api_1 = require("@opentelemetry/api");
const AttributeNames_1 = require("./enums/AttributeNames");
const semantic_conventions_1 = require("@opentelemetry/semantic-conventions");
const semconv_1 = require("./semconv");
const instrumentation_1 = require("@opentelemetry/instrumentation");
const SpanNames_1 = require("./enums/SpanNames");
/**
* Helper function to get a low cardinality span name from whatever info we have
* about the query.
*
* This is tricky, because we don't have most of the information (table name,
* operation name, etc) the spec recommends using to build a low-cardinality
* value w/o parsing. So, we use db.name and assume that, if the query's a named
* prepared statement, those `name` values will be low cardinality. If we don't
* have a named prepared statement, we try to parse an operation (despite the
* spec's warnings).
*
* @params dbName The name of the db against which this query is being issued,
* which could be missing if no db name was given at the time that the
* connection was established.
* @params queryConfig Information we have about the query being issued, typed
* to reflect only the validation we've actually done on the args to
* `client.query()`. This will be undefined if `client.query()` was called
* with invalid arguments.
*/
function getQuerySpanName(dbName, queryConfig) {
// NB: when the query config is invalid, we omit the dbName too, so that
// someone (or some tool) reading the span name doesn't misinterpret the
// dbName as being a prepared statement or sql commit name.
if (!queryConfig)
return SpanNames_1.SpanNames.QUERY_PREFIX;
// Either the name of a prepared statement; or an attempted parse
// of the SQL command, normalized to uppercase; or unknown.
const command = typeof queryConfig.name === 'string' && queryConfig.name
? queryConfig.name
: parseNormalizedOperationName(queryConfig.text);
return `${SpanNames_1.SpanNames.QUERY_PREFIX}:${command}${dbName ? ` ${dbName}` : ''}`;
}
exports.getQuerySpanName = getQuerySpanName;
function parseNormalizedOperationName(queryText) {
// Trim the query text to handle leading/trailing whitespace
const trimmedQuery = queryText.trim();
const indexOfFirstSpace = trimmedQuery.indexOf(' ');
let sqlCommand = indexOfFirstSpace === -1
? trimmedQuery
: trimmedQuery.slice(0, indexOfFirstSpace);
sqlCommand = sqlCommand.toUpperCase();
// Handle query text being "COMMIT;", which has an extra semicolon before the space.
return sqlCommand.endsWith(';') ? sqlCommand.slice(0, -1) : sqlCommand;
}
exports.parseNormalizedOperationName = parseNormalizedOperationName;
function parseAndMaskConnectionString(connectionString) {
try {
// Parse the connection string
const url = new URL(connectionString);
// Remove all auth information (username and password)
url.username = '';
url.password = '';
return url.toString();
}
catch (e) {
// If parsing fails, return a generic connection string
return 'postgresql://localhost:5432/';
}
}
exports.parseAndMaskConnectionString = parseAndMaskConnectionString;
function getConnectionString(params) {
if ('connectionString' in params && params.connectionString) {
return parseAndMaskConnectionString(params.connectionString);
}
const host = params.host || 'localhost';
const port = params.port || 5432;
const database = params.database || '';
return `postgresql://${host}:${port}/${database}`;
}
exports.getConnectionString = getConnectionString;
function getPort(port) {
// Port may be NaN as parseInt() is used on the value, passing null will result in NaN being parsed.
// https://github.com/brianc/node-postgres/blob/2a8efbee09a284be12748ed3962bc9b816965e36/packages/pg/lib/connection-parameters.js#L66
if (Number.isInteger(port)) {
return port;
}
// Unable to find the default used in pg code, so falling back to 'undefined'.
return undefined;
}
function getSemanticAttributesFromConnection(params, semconvStability) {
let attributes = {};
if (semconvStability & instrumentation_1.SemconvStability.OLD) {
attributes = {
...attributes,
[semconv_1.ATTR_DB_SYSTEM]: semconv_1.DB_SYSTEM_VALUE_POSTGRESQL,
[semconv_1.ATTR_DB_NAME]: params.database,
[semconv_1.ATTR_DB_CONNECTION_STRING]: getConnectionString(params),
[semconv_1.ATTR_DB_USER]: params.user,
[semconv_1.ATTR_NET_PEER_NAME]: params.host,
[semconv_1.ATTR_NET_PEER_PORT]: getPort(params.port),
};
}
if (semconvStability & instrumentation_1.SemconvStability.STABLE) {
attributes = {
...attributes,
[semantic_conventions_1.ATTR_DB_SYSTEM_NAME]: semantic_conventions_1.DB_SYSTEM_NAME_VALUE_POSTGRESQL,
[semantic_conventions_1.ATTR_DB_NAMESPACE]: params.namespace,
[semantic_conventions_1.ATTR_SERVER_ADDRESS]: params.host,
[semantic_conventions_1.ATTR_SERVER_PORT]: getPort(params.port),
};
}
return attributes;
}
exports.getSemanticAttributesFromConnection = getSemanticAttributesFromConnection;
function getSemanticAttributesFromPoolConnection(params, semconvStability) {
let url;
try {
url = params.connectionString
? new URL(params.connectionString)
: undefined;
}
catch (e) {
url = undefined;
}
let attributes = {
[AttributeNames_1.AttributeNames.IDLE_TIMEOUT_MILLIS]: params.idleTimeoutMillis,
[AttributeNames_1.AttributeNames.MAX_CLIENT]: params.maxClient,
};
if (semconvStability & instrumentation_1.SemconvStability.OLD) {
attributes = {
...attributes,
[semconv_1.ATTR_DB_SYSTEM]: semconv_1.DB_SYSTEM_VALUE_POSTGRESQL,
[semconv_1.ATTR_DB_NAME]: url?.pathname.slice(1) ?? params.database,
[semconv_1.ATTR_DB_CONNECTION_STRING]: getConnectionString(params),
[semconv_1.ATTR_NET_PEER_NAME]: url?.hostname ?? params.host,
[semconv_1.ATTR_NET_PEER_PORT]: Number(url?.port) || getPort(params.port),
[semconv_1.ATTR_DB_USER]: url?.username ?? params.user,
};
}
if (semconvStability & instrumentation_1.SemconvStability.STABLE) {
attributes = {
...attributes,
[semantic_conventions_1.ATTR_DB_SYSTEM_NAME]: semantic_conventions_1.DB_SYSTEM_NAME_VALUE_POSTGRESQL,
[semantic_conventions_1.ATTR_DB_NAMESPACE]: params.namespace,
[semantic_conventions_1.ATTR_SERVER_ADDRESS]: url?.hostname ?? params.host,
[semantic_conventions_1.ATTR_SERVER_PORT]: Number(url?.port) || getPort(params.port),
};
}
return attributes;
}
exports.getSemanticAttributesFromPoolConnection = getSemanticAttributesFromPoolConnection;
function shouldSkipInstrumentation(instrumentationConfig) {
return (instrumentationConfig.requireParentSpan === true &&
api_1.trace.getSpan(api_1.context.active()) === undefined);
}
exports.shouldSkipInstrumentation = shouldSkipInstrumentation;
// Create a span from our normalized queryConfig object,
// or return a basic span if no queryConfig was given/could be created.
function handleConfigQuery(tracer, instrumentationConfig, semconvStability, queryConfig) {
// Create child span.
const { connectionParameters } = this;
const dbName = connectionParameters.database;
const spanName = getQuerySpanName(dbName, queryConfig);
const span = tracer.startSpan(spanName, {
kind: api_1.SpanKind.CLIENT,
attributes: getSemanticAttributesFromConnection(connectionParameters, semconvStability),
});
if (!queryConfig) {
return span;
}
// Set attributes
if (queryConfig.text) {
if (semconvStability & instrumentation_1.SemconvStability.OLD) {
span.setAttribute(semconv_1.ATTR_DB_STATEMENT, queryConfig.text);
}
if (semconvStability & instrumentation_1.SemconvStability.STABLE) {
span.setAttribute(semantic_conventions_1.ATTR_DB_QUERY_TEXT, queryConfig.text);
}
}
if (instrumentationConfig.enhancedDatabaseReporting &&
Array.isArray(queryConfig.values)) {
try {
const convertedValues = queryConfig.values.map(value => {
if (value == null) {
return 'null';
}
else if (value instanceof Buffer) {
return value.toString();
}
else if (typeof value === 'object') {
if (typeof value.toPostgres === 'function') {
return value.toPostgres();
}
return JSON.stringify(value);
}
else {
//string, number
return value.toString();
}
});
span.setAttribute(AttributeNames_1.AttributeNames.PG_VALUES, convertedValues);
}
catch (e) {
api_1.diag.error('failed to stringify ', queryConfig.values, e);
}
}
// Set plan name attribute, if present
if (typeof queryConfig.name === 'string') {
span.setAttribute(AttributeNames_1.AttributeNames.PG_PLAN, queryConfig.name);
}
return span;
}
exports.handleConfigQuery = handleConfigQuery;
function handleExecutionResult(config, span, pgResult) {
if (typeof config.responseHook === 'function') {
(0, instrumentation_1.safeExecuteInTheMiddle)(() => {
config.responseHook(span, {
data: pgResult,
});
}, err => {
if (err) {
api_1.diag.error('Error running response hook', err);
}
}, true);
}
}
exports.handleExecutionResult = handleExecutionResult;
function patchCallback(instrumentationConfig, span, cb, attributes, recordDuration) {
return function patchedCallback(err, res) {
if (err) {
if (Object.prototype.hasOwnProperty.call(err, 'code')) {
attributes[semantic_conventions_1.ATTR_ERROR_TYPE] = err['code'];
}
if (err instanceof Error) {
span.recordException(sanitizedErrorMessage(err));
}
span.setStatus({
code: api_1.SpanStatusCode.ERROR,
message: err.message,
});
}
else {
handleExecutionResult(instrumentationConfig, span, res);
}
recordDuration();
span.end();
cb.call(this, err, res);
};
}
exports.patchCallback = patchCallback;
function getPoolName(pool) {
let poolName = '';
poolName += (pool?.host ? `${pool.host}` : 'unknown_host') + ':';
poolName += (pool?.port ? `${pool.port}` : 'unknown_port') + '/';
poolName += pool?.database ? `${pool.database}` : 'unknown_database';
return poolName.trim();
}
exports.getPoolName = getPoolName;
function updateCounter(poolName, pool, connectionCount, connectionPendingRequests, latestCounter) {
const all = pool.totalCount;
const pending = pool.waitingCount;
const idle = pool.idleCount;
const used = all - idle;
connectionCount.add(used - latestCounter.used, {
[semconv_1.ATTR_DB_CLIENT_CONNECTION_STATE]: semconv_1.DB_CLIENT_CONNECTION_STATE_VALUE_USED,
[semconv_1.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]: poolName,
});
connectionCount.add(idle - latestCounter.idle, {
[semconv_1.ATTR_DB_CLIENT_CONNECTION_STATE]: semconv_1.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE,
[semconv_1.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]: poolName,
});
connectionPendingRequests.add(pending - latestCounter.pending, {
[semconv_1.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]: poolName,
});
return { used: used, idle: idle, pending: pending };
}
exports.updateCounter = updateCounter;
function patchCallbackPGPool(span, cb) {
return function patchedCallback(err, res, done) {
if (err) {
if (err instanceof Error) {
span.recordException(sanitizedErrorMessage(err));
}
span.setStatus({
code: api_1.SpanStatusCode.ERROR,
message: err.message,
});
}
span.end();
cb.call(this, err, res, done);
};
}
exports.patchCallbackPGPool = patchCallbackPGPool;
function patchClientConnectCallback(span, cb) {
return function patchedClientConnectCallback(err) {
if (err) {
if (err instanceof Error) {
span.recordException(sanitizedErrorMessage(err));
}
span.setStatus({
code: api_1.SpanStatusCode.ERROR,
message: err.message,
});
}
span.end();
cb.apply(this, arguments);
};
}
exports.patchClientConnectCallback = patchClientConnectCallback;
/**
* Attempt to get a message string from a thrown value, while being quite
* defensive, to recognize the fact that, in JS, any kind of value (even
* primitives) can be thrown.
*/
function getErrorMessage(e) {
return typeof e === 'object' && e !== null && 'message' in e
? String(e.message)
: undefined;
}
exports.getErrorMessage = getErrorMessage;
function isObjectWithTextString(it) {
return (typeof it === 'object' &&
typeof it?.text === 'string');
}
exports.isObjectWithTextString = isObjectWithTextString;
/**
* Generates a sanitized message for the error.
* Only includes the error type and PostgreSQL error code, omitting any sensitive details.
*/
function sanitizedErrorMessage(error) {
const name = error?.name ?? 'PostgreSQLError';
const code = error?.code ?? 'UNKNOWN';
return `PostgreSQL error of type '${name}' occurred (code: ${code})`;
}
exports.sanitizedErrorMessage = sanitizedErrorMessage;
//# sourceMappingURL=utils.js.map

View File

@@ -0,0 +1,32 @@
import { toDate } from "./toDate.js";
/**
* The {@link getQuarter} function options.
*/
/**
* @name getQuarter
* @category Quarter Helpers
* @summary Get the year quarter of the given date.
*
* @description
* Get the year quarter of the given date.
*
* @param date - The given date
* @param options - An object with options
*
* @returns The quarter
*
* @example
* // Which quarter is 2 July 2014?
* const result = getQuarter(new Date(2014, 6, 2));
* //=> 3
*/
export function getQuarter(date, options) {
const _date = toDate(date, options?.in);
const quarter = Math.trunc(_date.getMonth() / 3) + 1;
return quarter;
}
// Fallback for modularized imports:
export default getQuarter;

View File

@@ -0,0 +1,21 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Dice6 = createLucideIcon("Dice6", [
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
["path", { d: "M16 8h.01", key: "cr5u4v" }],
["path", { d: "M16 12h.01", key: "1l6xoz" }],
["path", { d: "M16 16h.01", key: "1f9h7w" }],
["path", { d: "M8 8h.01", key: "1e4136" }],
["path", { d: "M8 12h.01", key: "czm47f" }],
["path", { d: "M8 16h.01", key: "18s6g9" }]
]);
export { Dice6 as default };
//# sourceMappingURL=dice-6.js.map

View File

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

View File

@@ -0,0 +1,33 @@
/**
* @name isDate
* @category Common Helpers
* @summary Is the given value a date?
*
* @description
* Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.
*
* @param value - The value to check
*
* @returns True if the given value is a date
*
* @example
* // For a valid date:
* const result = isDate(new Date())
* //=> true
*
* @example
* // For an invalid date:
* const result = isDate(new Date(NaN))
* //=> true
*
* @example
* // For some value:
* const result = isDate('2014-02-31')
* //=> false
*
* @example
* // For an object:
* const result = isDate({})
* //=> false
*/
export declare function isDate(value: unknown): value is Date;

View File

@@ -0,0 +1,349 @@
/// <reference types="node" />
import events = require("events");
import stream = require("stream");
import pgTypes = require("pg-types");
import { NoticeMessage } from "pg-protocol/dist/messages.js";
import { ConnectionOptions } from "tls";
export type QueryConfigValues<T> = T extends Array<infer U> ? T : never;
export interface ClientConfig {
user?: string | undefined;
database?: string | undefined;
password?: string | (() => string | Promise<string>) | undefined;
port?: number | undefined;
host?: string | undefined;
connectionString?: string | undefined;
keepAlive?: boolean | undefined;
stream?: () => stream.Duplex | undefined;
statement_timeout?: false | number | undefined;
ssl?: boolean | ConnectionOptions | undefined;
query_timeout?: number | undefined;
lock_timeout?: number | undefined;
keepAliveInitialDelayMillis?: number | undefined;
idle_in_transaction_session_timeout?: number | undefined;
application_name?: string | undefined;
fallback_application_name?: string | undefined;
connectionTimeoutMillis?: number | undefined;
types?: CustomTypesConfig | undefined;
options?: string | undefined;
client_encoding?: string | undefined;
}
export type ConnectionConfig = ClientConfig;
export interface Defaults extends ClientConfig {
poolSize?: number | undefined;
poolIdleTimeout?: number | undefined;
reapIntervalMillis?: number | undefined;
binary?: boolean | undefined;
parseInt8?: boolean | undefined;
parseInputDatesAsUTC?: boolean | undefined;
}
export interface PoolConfig extends ClientConfig {
// properties from module 'pg-pool'
max?: number | undefined;
min?: number | undefined;
idleTimeoutMillis?: number | undefined | null;
log?: ((...messages: any[]) => void) | undefined;
Promise?: PromiseConstructorLike | undefined;
allowExitOnIdle?: boolean | undefined;
maxUses?: number | undefined;
maxLifetimeSeconds?: number | undefined;
Client?: (new() => ClientBase) | undefined;
}
export interface QueryConfig<I = any[]> {
name?: string | undefined;
text: string;
values?: QueryConfigValues<I>;
types?: CustomTypesConfig | undefined;
}
export interface CustomTypesConfig {
getTypeParser: typeof pgTypes.getTypeParser;
}
export interface Submittable {
submit: (connection: Connection) => void;
}
export interface QueryArrayConfig<I = any[]> extends QueryConfig<I> {
rowMode: "array";
}
export interface FieldDef {
name: string;
tableID: number;
columnID: number;
dataTypeID: number;
dataTypeSize: number;
dataTypeModifier: number;
format: string;
}
export interface QueryResultBase {
command: string;
rowCount: number | null;
oid: number;
fields: FieldDef[];
}
export interface QueryResultRow {
[column: string]: any;
}
export interface QueryResult<R extends QueryResultRow = any> extends QueryResultBase {
rows: R[];
}
export interface QueryArrayResult<R extends any[] = any[]> extends QueryResultBase {
rows: R[];
}
export interface Notification {
processId: number;
channel: string;
payload?: string | undefined;
}
export interface ResultBuilder<R extends QueryResultRow = any> extends QueryResult<R> {
addRow(row: R): void;
}
export interface QueryParse {
name: string;
text: string;
types: string[];
}
type ValueMapper = (param: any, index: number) => any;
export interface BindConfig {
portal?: string | undefined;
statement?: string | undefined;
binary?: string | undefined;
values?: Array<Buffer | null | undefined | string> | undefined;
valueMapper?: ValueMapper | undefined;
}
export interface ExecuteConfig {
portal?: string | undefined;
rows?: string | undefined;
}
export interface MessageConfig {
type: string;
name?: string | undefined;
}
export function escapeIdentifier(str: string): string;
export function escapeLiteral(str: string): string;
export class Connection extends events.EventEmitter {
readonly stream: stream.Duplex;
constructor(config?: ConnectionConfig);
bind(config: BindConfig | null, more: boolean): void;
execute(config: ExecuteConfig | null, more: boolean): void;
parse(query: QueryParse, more: boolean): void;
query(text: string): void;
describe(msg: MessageConfig, more: boolean): void;
close(msg: MessageConfig, more: boolean): void;
flush(): void;
sync(): void;
end(): void;
}
export interface PoolOptions extends PoolConfig {
max: number;
maxUses: number;
allowExitOnIdle: boolean;
maxLifetimeSeconds: number;
idleTimeoutMillis: number | null;
}
/**
* {@link https://node-postgres.com/apis/pool}
*/
export class Pool extends events.EventEmitter {
/**
* Every field of the config object is entirely optional.
* The config passed to the pool is also passed to every client
* instance within the pool when the pool creates that client.
*/
constructor(config?: PoolConfig);
readonly totalCount: number;
readonly idleCount: number;
readonly waitingCount: number;
readonly expiredCount: number;
readonly ending: boolean;
readonly ended: boolean;
options: PoolOptions;
connect(): Promise<PoolClient>;
connect(
callback: (err: Error | undefined, client: PoolClient | undefined, done: (release?: any) => void) => void,
): void;
end(): Promise<void>;
end(callback: () => void): void;
query<T extends Submittable>(queryStream: T): T;
// tslint:disable:no-unnecessary-generics
query<R extends any[] = any[], I = any[]>(
queryConfig: QueryArrayConfig<I>,
values?: QueryConfigValues<I>,
): Promise<QueryArrayResult<R>>;
query<R extends QueryResultRow = any, I = any[]>(
queryConfig: QueryConfig<I>,
): Promise<QueryResult<R>>;
query<R extends QueryResultRow = any, I = any[]>(
queryTextOrConfig: string | QueryConfig<I>,
values?: QueryConfigValues<I>,
): Promise<QueryResult<R>>;
query<R extends any[] = any[], I = any[]>(
queryConfig: QueryArrayConfig<I>,
callback: (err: Error, result: QueryArrayResult<R>) => void,
): void;
query<R extends QueryResultRow = any, I = any[]>(
queryTextOrConfig: string | QueryConfig<I>,
callback: (err: Error, result: QueryResult<R>) => void,
): void;
query<R extends QueryResultRow = any, I = any[]>(
queryText: string,
values: QueryConfigValues<I>,
callback: (err: Error, result: QueryResult<R>) => void,
): void;
// tslint:enable:no-unnecessary-generics
on(event: "release" | "error", listener: (err: Error, client: PoolClient) => void): this;
on(event: "connect" | "acquire" | "remove", listener: (client: PoolClient) => void): this;
}
export class ClientBase extends events.EventEmitter {
constructor(config?: string | ClientConfig);
connect(): Promise<void>;
connect(callback: (err: Error) => void): void;
query<T extends Submittable>(queryStream: T): T;
// tslint:disable:no-unnecessary-generics
query<R extends any[] = any[], I = any[]>(
queryConfig: QueryArrayConfig<I>,
values?: QueryConfigValues<I>,
): Promise<QueryArrayResult<R>>;
query<R extends QueryResultRow = any, I = any>(
queryConfig: QueryConfig<I>,
): Promise<QueryResult<R>>;
query<R extends QueryResultRow = any, I = any[]>(
queryTextOrConfig: string | QueryConfig<I>,
values?: QueryConfigValues<I>,
): Promise<QueryResult<R>>;
query<R extends any[] = any[], I = any[]>(
queryConfig: QueryArrayConfig<I>,
callback: (err: Error, result: QueryArrayResult<R>) => void,
): void;
query<R extends QueryResultRow = any, I = any[]>(
queryTextOrConfig: string | QueryConfig<I>,
callback: (err: Error, result: QueryResult<R>) => void,
): void;
query<R extends QueryResultRow = any, I = any[]>(
queryText: string,
values: QueryConfigValues<I>,
callback: (err: Error, result: QueryResult<R>) => void,
): void;
// tslint:enable:no-unnecessary-generics
copyFrom(queryText: string): stream.Writable;
copyTo(queryText: string): stream.Readable;
pauseDrain(): void;
resumeDrain(): void;
escapeIdentifier: typeof escapeIdentifier;
escapeLiteral: typeof escapeLiteral;
setTypeParser: typeof pgTypes.setTypeParser;
getTypeParser: typeof pgTypes.getTypeParser;
on(event: "drain", listener: () => void): this;
on(event: "error", listener: (err: Error) => void): this;
on(event: "notice", listener: (notice: NoticeMessage) => void): this;
on(event: "notification", listener: (message: Notification) => void): this;
// tslint:disable-next-line unified-signatures
on(event: "end", listener: () => void): this;
}
export class Client extends ClientBase {
user?: string | undefined;
database?: string | undefined;
port: number;
host: string;
password?: string | undefined;
ssl: boolean;
readonly connection: Connection;
constructor(config?: string | ClientConfig);
end(): Promise<void>;
end(callback: (err: Error) => void): void;
}
export interface PoolClient extends ClientBase {
release(err?: Error | boolean): void;
}
export class Query<R extends QueryResultRow = any, I extends any[] = any> extends events.EventEmitter
implements Submittable
{
constructor(
queryTextOrConfig?: string | QueryConfig<I>,
callback?: (error: Error | undefined, result: ResultBuilder<R>) => void,
);
constructor(
queryTextOrConfig?: string | QueryConfig<I>,
values?: I,
callback?: (error: Error | undefined, result: ResultBuilder<R>) => void,
);
submit: (connection: Connection) => void;
on(event: "row", listener: (row: R, result?: ResultBuilder<R>) => void): this;
on(event: "error", listener: (err: Error) => void): this;
on(event: "end", listener: (result: ResultBuilder<R>) => void): this;
}
export class Events extends events.EventEmitter {
on(event: "error", listener: (err: Error, client: Client) => void): this;
}
export const types: typeof pgTypes;
export const defaults: Defaults & ClientConfig;
import * as Pg from ".";
export const native: typeof Pg | null;
export { DatabaseError } from "pg-protocol";
import TypeOverrides = require("./lib/type-overrides");
export { TypeOverrides };
export class Result<R extends QueryResultRow = any> implements QueryResult<R> {
command: string;
rowCount: number | null;
oid: number;
fields: FieldDef[];
rows: R[];
constructor(rowMode: string, t: typeof types);
}

View File

@@ -0,0 +1,11 @@
type Point = [number, number];
export declare const geometryColumn: (name: string) => import("drizzle-orm/pg-core").PgCustomColumnBuilder<{
name: string;
dataType: "custom";
columnType: "PgCustomColumn";
data: Point;
driverParam: string;
enumValues: undefined;
}>;
export {};
//# sourceMappingURL=geometryColumn.d.ts.map

View File

@@ -0,0 +1,78 @@
export interface LangGraphOptions {
/**
* Enable or disable input recording.
*/
recordInputs?: boolean;
/**
* Enable or disable output recording.
*/
recordOutputs?: boolean;
}
/**
* LangGraph Tool definition from lc_kwargs
*/
export interface LangGraphToolDefinition {
name?: string;
description?: string;
schema?: unknown;
func?: (...args: unknown[]) => unknown;
}
/**
* LangGraph Tool object (DynamicTool, DynamicStructuredTool, etc.)
*/
export interface LangGraphTool {
[key: string]: unknown;
lc_kwargs?: LangGraphToolDefinition;
name?: string;
description?: string;
}
/**
* LangGraph ToolNode with tools array
*/
export interface ToolNode {
[key: string]: unknown;
tools?: LangGraphTool[];
}
/**
* LangGraph PregelNode containing a ToolNode
*/
export interface PregelNode {
[key: string]: unknown;
runnable?: ToolNode;
}
/**
* LangGraph StateGraph builder nodes
*/
export interface StateGraphNodes {
[key: string]: unknown;
tools?: PregelNode;
}
/**
* LangGraph StateGraph builder
*/
export interface StateGraphBuilder {
[key: string]: unknown;
nodes?: StateGraphNodes;
}
/**
* Basic interface for compiled graph
*/
export interface CompiledGraph {
[key: string]: unknown;
invoke?: (...args: unknown[]) => Promise<unknown>;
name?: string;
graph_name?: string;
lc_kwargs?: {
[key: string]: unknown;
name?: string;
};
builder?: StateGraphBuilder;
}
/**
* LangGraph Integration interface for type safety
*/
export interface LangGraphIntegration {
name: string;
options: LangGraphOptions;
}
//# sourceMappingURL=types.d.ts.map

View File

@@ -0,0 +1,15 @@
import type { TextareaFieldValidation } from 'payload';
import React from 'react';
import type { TextAreaInputProps } from './types.js';
import './index.scss';
import { TextareaInput } from './Input.js';
export { TextareaInput, TextAreaInputProps };
export declare const TextareaField: React.FC<{
readonly inputRef?: React.Ref<HTMLInputElement>;
readonly onKeyDown?: React.KeyboardEventHandler<HTMLInputElement>;
readonly path: string;
readonly validate?: TextareaFieldValidation;
} & {
readonly field: Omit<import("payload").TextareaFieldClient, "type"> & Partial<Pick<import("payload").TextareaFieldClient, "type">>;
} & Omit<import("payload").ClientComponentProps, "customComponents" | "field">>;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,70 @@
{
"name": "@types/eslint",
"version": "9.6.1",
"description": "TypeScript definitions for eslint",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/eslint",
"license": "MIT",
"contributors": [
{
"name": "Pierre-Marie Dartus",
"githubUsername": "pmdartus",
"url": "https://github.com/pmdartus"
},
{
"name": "Jed Fox",
"githubUsername": "j-f1",
"url": "https://github.com/j-f1"
},
{
"name": "Saad Quadri",
"githubUsername": "saadq",
"url": "https://github.com/saadq"
},
{
"name": "Jason Kwok",
"githubUsername": "JasonHK",
"url": "https://github.com/JasonHK"
},
{
"name": "Brad Zacher",
"githubUsername": "bradzacher",
"url": "https://github.com/bradzacher"
},
{
"name": "JounQin",
"githubUsername": "JounQin",
"url": "https://github.com/JounQin"
},
{
"name": "Bryan Mishkin",
"githubUsername": "bmish",
"url": "https://github.com/bmish"
}
],
"main": "",
"types": "index.d.ts",
"exports": {
".": {
"types": "./index.d.ts"
},
"./use-at-your-own-risk": {
"types": "./use-at-your-own-risk.d.ts"
},
"./rules": {
"types": "./rules/index.d.ts"
},
"./package.json": "./package.json"
},
"repository": {
"type": "git",
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/eslint"
},
"scripts": {},
"dependencies": {
"@types/estree": "*",
"@types/json-schema": "*"
},
"typesPublisherContentHash": "bc2620143f844d291da2d199e7b8e2605e3277f1941a508dc72ac92843b149b6",
"typeScriptVersion": "4.8"
}

View File

@@ -0,0 +1,10 @@
import type { SanitizedCollectionConfig } from '../../../collections/config/types.js';
import { type Payload, type TypedUser } from '../../../index.js';
type Args = {
collection: SanitizedCollectionConfig;
payload: Payload;
user: TypedUser;
};
export declare const incrementLoginAttempts: ({ collection, payload, user, }: Args) => Promise<void>;
export {};
//# sourceMappingURL=incrementLoginAttempts.d.ts.map

View File

@@ -0,0 +1,20 @@
export { S as default, a as defaultProps } from '../../dist/Select-aab027f3.esm.js';
import '@babel/runtime/helpers/extends';
import '@babel/runtime/helpers/objectSpread2';
import '@babel/runtime/helpers/classCallCheck';
import '@babel/runtime/helpers/createClass';
import '@babel/runtime/helpers/inherits';
import '@babel/runtime/helpers/createSuper';
import '@babel/runtime/helpers/toConsumableArray';
import 'react';
import '../../dist/index-641ee5b8.esm.js';
import '@emotion/react';
import '@babel/runtime/helpers/slicedToArray';
import '@babel/runtime/helpers/objectWithoutProperties';
import '@babel/runtime/helpers/typeof';
import '@babel/runtime/helpers/taggedTemplateLiteral';
import '@babel/runtime/helpers/defineProperty';
import 'react-dom';
import '@floating-ui/dom';
import 'use-isomorphic-layout-effect';
import 'memoize-one';

View File

@@ -0,0 +1,2 @@
const e=require(`../../utils/throw-if-empty.cjs`),t=t=>()=>(e.throwIfEmpty(t,`Keys cannot be empty`),{path:`/translations`,body:JSON.stringify(t),method:`DELETE`}),n=t=>()=>(e.throwIfEmpty(String(t),`Key cannot be empty`),{path:`/translations/${t}`,method:`DELETE`});exports.deleteTranslation=n,exports.deleteTranslations=t;
//# sourceMappingURL=translations.cjs.map

View File

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

View File

@@ -0,0 +1,39 @@
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports._globalThis = void 0;
// Updates to this file should also be replicated to @opentelemetry/api and
// @opentelemetry/core too.
/**
* - globalThis (New standard)
* - self (Will return the current window instance for supported browsers)
* - window (fallback for older browser implementations)
* - global (NodeJS implementation)
* - <object> (When all else fails)
*/
/** only globals that common to node and browsers are allowed */
// eslint-disable-next-line n/no-unsupported-features/es-builtins, no-undef
exports._globalThis = typeof globalThis === 'object'
? globalThis
: typeof self === 'object'
? self
: typeof window === 'object'
? window
: typeof global === 'object'
? global
: {};
//# sourceMappingURL=globalThis.js.map

View File

@@ -0,0 +1,34 @@
import { calculateBackoffWaitUntil } from './calculateBackoffWaitUntil.js';
/**
* Assuming there is no task that has already reached max retries,
* this function determines if the workflow should retry the job
* and if so, when it should retry.
*/ export function getWorkflowRetryBehavior({ job, retriesConfig }) {
const maxWorkflowRetries = typeof retriesConfig === 'object' ? retriesConfig.attempts : retriesConfig;
if (maxWorkflowRetries !== undefined && maxWorkflowRetries !== null && job.totalTried >= maxWorkflowRetries) {
return {
hasFinalError: true,
maxWorkflowRetries
};
}
if (!retriesConfig) {
// No retries provided => assuming no task reached max retries, we can retry
return {
hasFinalError: false,
maxWorkflowRetries: undefined,
waitUntil: undefined
};
}
// Job will retry. Let's determine when!
const waitUntil = calculateBackoffWaitUntil({
retriesConfig,
totalTried: job.totalTried ?? 0
});
return {
hasFinalError: false,
maxWorkflowRetries,
waitUntil
};
}
//# sourceMappingURL=getWorkflowRetryBehavior.js.map

View File

@@ -0,0 +1,182 @@
# pino-std-serializers&nbsp;&nbsp;[![CI](https://github.com/pinojs/pino-std-serializers/workflows/CI/badge.svg)](https://github.com/pinojs/pino-std-serializers/actions?query=workflow%3ACI)
This module provides a set of standard object serializers for the
[Pino](https://getpino.io) logger.
## Serializers
### `exports.err(error)`
Serializes an `Error` like object. Returns an object:
```js
{
type: 'string', // The name of the object's constructor.
message: 'string', // The supplied error message.
stack: 'string', // The stack when the error was generated.
raw: Error // Non-enumerable, i.e. will not be in the output, original
// Error object. This is available for subsequent serializers
// to use.
[...any additional Enumerable property the original Error had]
}
```
Any other extra properties, e.g. `statusCode`, that have been attached to the
object will also be present on the serialized object.
If the error object has a [`cause`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause) property, the `cause`'s `message` and `stack` will be appended to the top-level `message` and `stack`. All other parameters that belong to the `error.cause` object will be omitted.
Example:
```js
const serializer = require('pino-std-serializers').err;
const innerError = new Error("inner error");
innerError.isInner = true;
const outerError = new Error("outer error", { cause: innerError });
outerError.isInner = false;
const serialized = serializer(outerError);
/* Result:
{
"type": "Error",
"message": "outer error: inner error",
"isInner": false,
"stack": "Error: outer error
at <...omitted..>
caused by: Error: inner error
at <...omitted..>
}
*/
```
### `exports.errWithCause(error)`
Serializes an `Error` like object, including any `error.cause`. Returns an object:
```js
{
type: 'string', // The name of the object's constructor.
message: 'string', // The supplied error message.
stack: 'string', // The stack when the error was generated.
cause?: Error, // If the original error had an error.cause, it will be serialized here
raw: Error // Non-enumerable, i.e. will not be in the output, original
// Error object. This is available for subsequent serializers
// to use.
[...any additional Enumerable property the original Error had]
}
```
Any other extra properties, e.g. `statusCode`, that have been attached to the object will also be present on the serialized object.
Example:
```javascript
const serializer = require('pino-std-serializers').errWithCause;
const innerError = new Error("inner error");
innerError.isInner = true;
const outerError = new Error("outer error", { cause: innerError });
outerError.isInner = false;
const serialized = serializer(outerError);
/* Result:
{
"type": "Error",
"message": "outer error",
"isInner": false,
"stack": "Error: outer error
at <...omitted..>",
"cause": {
"type": "Error",
"message": "inner error",
"isInner": true,
"stack": "Error: inner error
at <...omitted..>"
},
}
*/
```
### `exports.mapHttpResponse(response)`
Used internally by Pino for general response logging. Returns an object:
```js
{
res: {}
}
```
Where `res` is the `response` as serialized by the standard response serializer.
### `exports.mapHttpRequest(request)`
Used internall by Pino for general request logging. Returns an object:
```js
{
req: {}
}
```
Where `req` is the `request` as serialized by the standard request serializer.
### `exports.req(request)`
The default `request` serializer. Returns an object:
```js
{
id: 'string', // Defaults to `undefined`, unless there is an `id` property
// already attached to the `request` object or to the `request.info`
// object. Attach a synchronous function
// to the `request.id` that returns an identifier to have
// the value filled.
method: 'string',
url: 'string', // the request pathname (as per req.url in core HTTP)
query: 'object', // the request query (as per req.query in express or hapi)
params: 'object', // the request params (as per req.params in express or hapi)
headers: Object, // a reference to the `headers` object from the request
// (as per req.headers in core HTTP)
remoteAddress: 'string',
remotePort: Number,
raw: Object // Non-enumerable, i.e. will not be in the output, original
// request object. This is available for subsequent serializers
// to use. In cases where the `request` input already has
// a `raw` property this will replace the original `request.raw`
// property
}
```
### `exports.res(response)`
The default `response` serializer. Returns an object:
```js
{
statusCode: Number, // Response status code, will be null before headers are flushed
headers: Object, // The headers to be sent in the response.
raw: Object // Non-enumerable, i.e. will not be in the output, original
// response object. This is available for subsequent serializers
// to use.
}
```
### `exports.wrapErrorSerializer(customSerializer)`
A utility method for wrapping the default error serializer. This allows
custom serializers to work with the already serialized object.
The `customSerializer` accepts one parameter — the newly serialized error
object — and returns the new (or updated) error object.
### `exports.wrapRequestSerializer(customSerializer)`
A utility method for wrapping the default request serializer. This allows
custom serializers to work with the already serialized object.
The `customSerializer` accepts one parameter — the newly serialized request
object — and returns the new (or updated) request object.
### `exports.wrapResponseSerializer(customSerializer)`
A utility method for wrapping the default response serializer. This allows
custom serializers to work with the already serialized object.
The `customSerializer` accepts one parameter — the newly serialized response
object — and returns the new (or updated) response object.
## License
MIT License

View File

@@ -0,0 +1,32 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const version = require('./version.js');
/**
* A builder for the SDK metadata in the options for the SDK initialization.
*
* Note: This function is identical to `buildMetadata` in Remix and NextJS and SvelteKit.
* We don't extract it for bundle size reasons.
* @see https://github.com/getsentry/sentry-javascript/pull/7404
* @see https://github.com/getsentry/sentry-javascript/pull/4196
*
* If you make changes to this function consider updating the others as well.
*
* @param options SDK options object that gets mutated
* @param names list of package names
*/
function applySdkMetadata(options, name, names = [name], source = 'npm') {
const sdk = ((options._metadata = options._metadata || {}).sdk = options._metadata.sdk || {});
if (!sdk.name) {
sdk.name = `sentry.javascript.${name}`;
sdk.packages = names.map(name => ({
name: `${source}:@sentry/${name}`,
version: version.SDK_VERSION,
}));
sdk.version = version.SDK_VERSION;
}
}
exports.applySdkMetadata = applySdkMetadata;
//# sourceMappingURL=sdkMetadata.js.map

View File

@@ -0,0 +1,4 @@
import type { DefaultTranslationsObject, Language } from '../types.js';
export declare const bnInTranslations: DefaultTranslationsObject;
export declare const bnIn: Language;
//# sourceMappingURL=bnIn.d.ts.map

View File

@@ -0,0 +1,22 @@
/**
* @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 Radar = createLucideIcon("Radar", [
["path", { d: "M19.07 4.93A10 10 0 0 0 6.99 3.34", key: "z3du51" }],
["path", { d: "M4 6h.01", key: "oypzma" }],
["path", { d: "M2.29 9.62A10 10 0 1 0 21.31 8.35", key: "qzzz0" }],
["path", { d: "M16.24 7.76A6 6 0 1 0 8.23 16.67", key: "1yjesh" }],
["path", { d: "M12 18h.01", key: "mhygvu" }],
["path", { d: "M17.99 11.66A6 6 0 0 1 15.77 16.67", key: "1u2y91" }],
["circle", { cx: "12", cy: "12", r: "2", key: "1c9p78" }],
["path", { d: "m13.41 10.59 5.66-5.66", key: "mhq4k0" }]
]);
export { Radar as default };
//# sourceMappingURL=radar.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"onunhandledrejection.d.ts","sourceRoot":"","sources":["../../../src/integrations/onunhandledrejection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAsC,MAAM,cAAc,CAAC;AAW/E,KAAK,sBAAsB,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEzD,KAAK,aAAa,GAAG;IAAE,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CAAC;AAE3E,UAAU,2BAA2B;IACnC;;;OAGG;IACH,IAAI,EAAE,sBAAsB,CAAC;IAC7B,0DAA0D;IAC1D,MAAM,CAAC,EAAE,aAAa,EAAE,CAAC;CAC1B;AA2BD,eAAO,MAAM,+BAA+B,oGAAsD,CAAC;AAgCnG,mBAAmB;AACnB,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,2BAA2B,GACnC,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAuC7C"}

View File

@@ -0,0 +1,19 @@
import { EventHandler } from './addEventListener';
import { TransformValue } from './isTransform';
import { Property } from './types';
declare type AnimateProperties = Record<Property | TransformValue, string>;
interface Options {
node: HTMLElement;
properties: AnimateProperties;
duration?: number;
easing?: string;
callback?: EventHandler<'transitionend'>;
}
interface Cancel {
cancel(): void;
}
declare function animate(options: Options): Cancel;
declare function animate(node: HTMLElement, properties: AnimateProperties, duration: number): Cancel;
declare function animate(node: HTMLElement, properties: AnimateProperties, duration: number, callback: EventHandler<'transitionend'>): Cancel;
declare function animate(node: HTMLElement, properties: AnimateProperties, duration: number, easing: string, callback: EventHandler<'transitionend'>): Cancel;
export default animate;

View File

@@ -0,0 +1 @@
{"version":3,"file":"down.d.ts","sourceRoot":"","sources":["../../../../../src/versions/migrations/localizeStatus/mongo/down.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAIzD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,OAAO,CAAA;IAChB,GAAG,CAAC,EAAE,GAAG,CAAA;CACV,CAAA;AAED,wBAAsB,IAAI,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAsIlE"}

View File

@@ -0,0 +1,222 @@
import { existsSync } from 'fs';
import { writeFile } from 'fs/promises';
import path from 'path';
/**
* @example
* console.log(sanitizeObjectKey("oneTwo")); // oneTwo
* console.log(sanitizeObjectKey("one-two")); // 'one-two'
* console.log(sanitizeObjectKey("_one$Two3")); // _one$Two3
* console.log(sanitizeObjectKey("3invalid")); // '3invalid'
*/ const sanitizeObjectKey = (key)=>{
// Regular expression for a valid identifier
const identifierRegex = /^[a-z_$][\w$]*$/i;
if (identifierRegex.test(key)) {
return key;
}
return `'${key}'`;
};
/**
* @example
* (columns default-valuesID) -> columns['default-valuesID']
* (columns defaultValues) -> columns.defaultValues
*/ const accessProperty = (objName, key)=>{
const sanitized = sanitizeObjectKey(key);
if (sanitized.startsWith("'")) {
return `${objName}[${sanitized}]`;
}
return `${objName}.${key}`;
};
export const createSchemaGenerator = ({ columnToCodeConverter, corePackageSuffix, defaultOutputFile, enumImport, schemaImport, tableImport })=>{
return async function generateSchema({ log = true, outputFile = defaultOutputFile, prettify = true } = {}) {
const importDeclarations = {};
const tableDeclarations = [];
const enumDeclarations = [];
const relationsDeclarations = [];
const addImport = (from, name)=>{
if (!importDeclarations[from]) {
importDeclarations[from] = new Set();
}
importDeclarations[from].add(name);
};
const corePackage = `${this.packageName}/drizzle/${corePackageSuffix}`;
let schemaDeclaration = null;
if (this.schemaName) {
addImport(corePackage, schemaImport);
schemaDeclaration = `export const db_schema = ${schemaImport}('${this.schemaName}')`;
}
const enumFn = this.schemaName ? `db_schema.enum` : enumImport;
const enumsList = [];
const addEnum = (name, options)=>{
if (enumsList.some((each)=>each === name)) {
return;
}
enumsList.push(name);
enumDeclarations.push(`export const ${name} = ${enumFn}('${name}', [${options.map((option)=>`'${option}'`).join(', ')}])`);
};
if (this.payload.config.localization && enumImport) {
addEnum('enum__locales', this.payload.config.localization.localeCodes);
}
const tableFn = this.schemaName ? `db_schema.table` : tableImport;
if (!this.schemaName) {
addImport(corePackage, tableImport);
}
addImport(corePackage, 'index');
addImport(corePackage, 'uniqueIndex');
addImport(corePackage, 'foreignKey');
addImport(`${this.packageName}/drizzle`, 'sql');
addImport(`${this.packageName}/drizzle`, 'relations');
for(const tableName in this.rawTables){
const table = this.rawTables[tableName];
const extrasDeclarations = [];
if (table.indexes) {
for(const key in table.indexes){
const index = table.indexes[key];
let indexDeclaration = `${index.unique ? 'uniqueIndex' : 'index'}('${index.name}')`;
indexDeclaration += `.on(${typeof index.on === 'string' ? `${accessProperty('columns', index.on)}` : `${index.on.map((on)=>`${accessProperty('columns', on)}`).join(', ')}`}),`;
extrasDeclarations.push(indexDeclaration);
}
}
if (table.foreignKeys) {
for(const key in table.foreignKeys){
const foreignKey = table.foreignKeys[key];
let foreignKeyDeclaration = `foreignKey({
columns: [${foreignKey.columns.map((col)=>`columns['${col}']`).join(', ')}],
foreignColumns: [${foreignKey.foreignColumns.map((col)=>`${accessProperty(col.table, col.name)}`).join(', ')}],
name: '${foreignKey.name}'
})`;
if (foreignKey.onDelete) {
foreignKeyDeclaration += `.onDelete('${foreignKey.onDelete}')`;
}
if (foreignKey.onUpdate) {
foreignKeyDeclaration += `.onUpdate('${foreignKey.onDelete}')`;
}
foreignKeyDeclaration += ',';
extrasDeclarations.push(foreignKeyDeclaration);
}
}
const tableCode = `
export const ${tableName} = ${tableFn}('${tableName}', {
${Object.entries(table.columns).map(([key, column])=>` ${sanitizeObjectKey(key)}: ${columnToCodeConverter({
adapter: this,
addEnum,
addImport,
column,
locales: this.payload.config.localization ? this.payload.config.localization.localeCodes : undefined,
tableKey: tableName
})},`).join('\n')}
}${extrasDeclarations.length ? `, (columns) => [
${extrasDeclarations.join(' ')}
]` : ''}
)
`;
tableDeclarations.push(tableCode);
}
for(const tableName in this.rawRelations){
const relations = this.rawRelations[tableName];
const properties = [];
for(const key in relations){
const relation = relations[key];
let declaration;
if (relation.type === 'one') {
declaration = `${sanitizeObjectKey(key)}: one(${relation.to}, {
${relation.fields.some((field)=>field.table !== tableName) ? '// @ts-expect-error Drizzle TypeScript bug for ONE relationships with a field in different table' : ''}
fields: [${relation.fields.map((field)=>`${accessProperty(field.table, field.name)}`).join(', ')}],
references: [${relation.references.map((col)=>`${accessProperty(relation.to, col)}`).join(', ')}],
${relation.relationName ? `relationName: '${relation.relationName}',` : ''}
}),`;
} else {
declaration = `${sanitizeObjectKey(key)}: many(${relation.to}, {
${relation.relationName ? `relationName: '${relation.relationName}',` : ''}
}),`;
}
properties.push(declaration);
}
// beautify / lintify relations callback output, when no many for example, don't add it
const args = [];
if (Object.values(relations).some((rel)=>rel.type === 'one')) {
args.push('one');
}
if (Object.values(relations).some((rel)=>rel.type === 'many')) {
args.push('many');
}
const arg = args.length ? `{ ${args.join(', ')} }` : '';
const declaration = `export const relations_${tableName} = relations(${tableName}, (${arg}) => ({
${properties.join('\n ')}
}))`;
relationsDeclarations.push(declaration);
}
if (enumDeclarations.length && !this.schemaName) {
addImport(corePackage, enumImport);
}
const importDeclarationsSanitized = [];
for(const moduleName in importDeclarations){
const moduleImports = importDeclarations[moduleName];
importDeclarationsSanitized.push(`import { ${Array.from(moduleImports).join(', ')} } from '${moduleName}'`);
}
const schemaType = `
type DatabaseSchema = {
${[
this.schemaName ? 'db_schema' : null,
...enumsList,
...Object.keys(this.rawTables),
...Object.keys(this.rawRelations).map((table)=>`relations_${table}`)
].filter(Boolean).map((name)=>`${name}: typeof ${name}`).join('\n ')}
}
`;
const finalDeclaration = `
declare module '${this.packageName}' {
export interface GeneratedDatabaseSchema {
schema: DatabaseSchema
}
}
`;
const warning = `
/* tslint:disable */
/* eslint-disable */
/**
* This file was automatically generated by Payload.
* DO NOT MODIFY IT BY HAND. Instead, modify your source Payload config,
* and re-run \`payload generate:db-schema\` to regenerate this file.
*/
`;
const importTypes = `import type {} from '${this.packageName}'`;
let code = [
warning,
importTypes,
...importDeclarationsSanitized,
schemaDeclaration,
...enumDeclarations,
...tableDeclarations,
...relationsDeclarations,
schemaType,
finalDeclaration
].filter(Boolean).join('\n');
if (!outputFile) {
const cwd = process.cwd();
const srcDir = path.resolve(cwd, 'src');
if (existsSync(srcDir)) {
outputFile = path.resolve(srcDir, 'payload-generated-schema.ts');
} else {
outputFile = path.resolve(cwd, 'payload-generated-schema.ts');
}
}
if (prettify) {
try {
const prettier = await eval('import("prettier")');
const configPath = await prettier.resolveConfigFile();
const config = configPath ? await prettier.resolveConfig(configPath) : {};
code = await prettier.format(code, {
...config,
parser: 'typescript'
});
} catch {
/* empty */ }
}
await writeFile(outputFile, code, 'utf-8');
if (log) {
this.payload.logger.info(`Written ${outputFile}`);
}
};
};
//# sourceMappingURL=createSchemaGenerator.js.map

View File

@@ -0,0 +1,84 @@
@import '../../../scss/styles.scss';
@layer payload-default {
.doc-drawer {
&__header {
width: 100%;
margin-top: calc(var(--base) * 2);
display: flex;
flex-direction: column;
gap: calc(var(--base) * 0.5);
border-bottom: 1px solid var(--theme-elevation-100);
padding-bottom: var(--base);
}
&__header-content {
display: flex;
justify-content: space-between;
align-items: flex-start;
width: 100%;
}
&__header-text {
margin: 0;
}
&__header-toggler {
background: transparent;
border: 0;
margin: 0;
padding: 0;
cursor: pointer;
color: inherit;
&:focus,
&:focus-within {
outline: none;
}
&:disabled {
pointer-events: none;
}
}
&__header-close {
border: 0;
background-color: transparent;
padding: 0;
cursor: pointer;
overflow: hidden;
width: calc(var(--base) * 2);
height: calc(var(--base) * 2);
svg {
width: calc(var(--base) * 2);
height: calc(var(--base) * 2);
position: relative;
.stroke {
stroke-width: 2px;
vector-effect: non-scaling-stroke;
}
}
}
&__after-header {
padding-top: calc(var(--base) / 4);
}
&__divider {
height: 1px;
background: var(--theme-elevation-100);
width: 100%;
}
@include mid-break {
.doc-drawer__header {
margin-top: calc(var(--base) * 1.5);
margin-bottom: calc(var(--base) * 0.5);
padding-left: var(--gutter-h);
padding-right: var(--gutter-h);
}
}
}
}

View File

@@ -0,0 +1,3 @@
import * as base64url from '../runtime/base64url.js';
export const encode = base64url.encode;
export const decode = base64url.decode;

View File

@@ -0,0 +1 @@
{"version":3,"file":"oneWayHash.d.ts","sourceRoot":"","sources":["../../../src/utilities/telemetry/oneWayHash.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAA;AAIxC,eAAO,MAAM,UAAU,SAAU,UAAU,UAAU,MAAM,KAAG,MAU7D,CAAA"}

View File

@@ -0,0 +1,5 @@
export declare const addISOWeekYears: import("./types.js").FPFn2<
Date,
number,
string | number | Date
>;

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 Split = createLucideIcon("Split", [
["path", { d: "M16 3h5v5", key: "1806ms" }],
["path", { d: "M8 3H3v5", key: "15dfkv" }],
["path", { d: "M12 22v-8.3a4 4 0 0 0-1.172-2.872L3 3", key: "1qrqzj" }],
["path", { d: "m15 9 6-6", key: "ko1vev" }]
]);
export { Split as default };
//# sourceMappingURL=split.js.map

View File

@@ -0,0 +1,140 @@
"use strict";
exports.match = void 0;
var _index = require("../../_lib/buildMatchPatternFn.cjs");
var _index2 = require("../../_lib/buildMatchFn.cjs");
const matchOrdinalNumberPattern = /^(\d+)(º)?/i;
const parseOrdinalNumberPattern = /\d+/i;
const matchEraPatterns = {
narrow: /^(ac|dc|a|d)/i,
abbreviated: /^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,
wide: /^(antes de cristo|antes de la era com[uú]n|despu[eé]s de cristo|era com[uú]n)/i,
};
const parseEraPatterns = {
any: [/^ac/i, /^dc/i],
wide: [
/^(antes de cristo|antes de la era com[uú]n)/i,
/^(despu[eé]s de cristo|era com[uú]n)/i,
],
};
const matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^T[1234]/i,
wide: /^[1234](º)? trimestre/i,
};
const parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i],
};
const matchMonthPatterns = {
narrow: /^[efmajsond]/i,
abbreviated: /^(ene|feb|mar|abr|may|jun|jul|ago|sep|oct|nov|dic)/i,
wide: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
};
const parseMonthPatterns = {
narrow: [
/^e/i,
/^f/i,
/^m/i,
/^a/i,
/^m/i,
/^j/i,
/^j/i,
/^a/i,
/^s/i,
/^o/i,
/^n/i,
/^d/i,
],
any: [
/^en/i,
/^feb/i,
/^mar/i,
/^abr/i,
/^may/i,
/^jun/i,
/^jul/i,
/^ago/i,
/^sep/i,
/^oct/i,
/^nov/i,
/^dic/i,
],
};
const matchDayPatterns = {
narrow: /^[dlmjvs]/i,
short: /^(do|lu|ma|mi|ju|vi|s[áa])/i,
abbreviated: /^(dom|lun|mar|mi[ée]|jue|vie|s[áa]b)/i,
wide: /^(domingo|lunes|martes|mi[ée]rcoles|jueves|viernes|s[áa]bado)/i,
};
const parseDayPatterns = {
narrow: [/^d/i, /^l/i, /^m/i, /^m/i, /^j/i, /^v/i, /^s/i],
any: [/^do/i, /^lu/i, /^ma/i, /^mi/i, /^ju/i, /^vi/i, /^sa/i],
};
const matchDayPeriodPatterns = {
narrow: /^(a|p|mn|md|(de la|a las) (mañana|tarde|noche))/i,
any: /^([ap]\.?\s?m\.?|medianoche|mediodia|(de la|a las) (mañana|tarde|noche))/i,
};
const parseDayPeriodPatterns = {
any: {
am: /^a/i,
pm: /^p/i,
midnight: /^mn/i,
noon: /^md/i,
morning: /mañana/i,
afternoon: /tarde/i,
evening: /tarde/i,
night: /noche/i,
},
};
const match = (exports.match = {
ordinalNumber: (0, _index.buildMatchPatternFn)({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: function (value) {
return parseInt(value, 10);
},
}),
era: (0, _index2.buildMatchFn)({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any",
}),
quarter: (0, _index2.buildMatchFn)({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: (index) => index + 1,
}),
month: (0, _index2.buildMatchFn)({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any",
}),
day: (0, _index2.buildMatchFn)({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any",
}),
dayPeriod: (0, _index2.buildMatchFn)({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any",
}),
});

View File

@@ -0,0 +1,88 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.FlattenedSign = void 0;
const base64url_js_1 = require("../../runtime/base64url.js");
const sign_js_1 = require("../../runtime/sign.js");
const is_disjoint_js_1 = require("../../lib/is_disjoint.js");
const errors_js_1 = require("../../util/errors.js");
const buffer_utils_js_1 = require("../../lib/buffer_utils.js");
const check_key_type_js_1 = require("../../lib/check_key_type.js");
const validate_crit_js_1 = require("../../lib/validate_crit.js");
class FlattenedSign {
_payload;
_protectedHeader;
_unprotectedHeader;
constructor(payload) {
if (!(payload instanceof Uint8Array)) {
throw new TypeError('payload must be an instance of Uint8Array');
}
this._payload = payload;
}
setProtectedHeader(protectedHeader) {
if (this._protectedHeader) {
throw new TypeError('setProtectedHeader can only be called once');
}
this._protectedHeader = protectedHeader;
return this;
}
setUnprotectedHeader(unprotectedHeader) {
if (this._unprotectedHeader) {
throw new TypeError('setUnprotectedHeader can only be called once');
}
this._unprotectedHeader = unprotectedHeader;
return this;
}
async sign(key, options) {
if (!this._protectedHeader && !this._unprotectedHeader) {
throw new errors_js_1.JWSInvalid('either setProtectedHeader or setUnprotectedHeader must be called before #sign()');
}
if (!(0, is_disjoint_js_1.default)(this._protectedHeader, this._unprotectedHeader)) {
throw new errors_js_1.JWSInvalid('JWS Protected and JWS Unprotected Header Parameter names must be disjoint');
}
const joseHeader = {
...this._protectedHeader,
...this._unprotectedHeader,
};
const extensions = (0, validate_crit_js_1.default)(errors_js_1.JWSInvalid, new Map([['b64', true]]), options?.crit, this._protectedHeader, joseHeader);
let b64 = true;
if (extensions.has('b64')) {
b64 = this._protectedHeader.b64;
if (typeof b64 !== 'boolean') {
throw new errors_js_1.JWSInvalid('The "b64" (base64url-encode payload) Header Parameter must be a boolean');
}
}
const { alg } = joseHeader;
if (typeof alg !== 'string' || !alg) {
throw new errors_js_1.JWSInvalid('JWS "alg" (Algorithm) Header Parameter missing or invalid');
}
(0, check_key_type_js_1.checkKeyTypeWithJwk)(alg, key, 'sign');
let payload = this._payload;
if (b64) {
payload = buffer_utils_js_1.encoder.encode((0, base64url_js_1.encode)(payload));
}
let protectedHeader;
if (this._protectedHeader) {
protectedHeader = buffer_utils_js_1.encoder.encode((0, base64url_js_1.encode)(JSON.stringify(this._protectedHeader)));
}
else {
protectedHeader = buffer_utils_js_1.encoder.encode('');
}
const data = (0, buffer_utils_js_1.concat)(protectedHeader, buffer_utils_js_1.encoder.encode('.'), payload);
const signature = await (0, sign_js_1.default)(alg, key, data);
const jws = {
signature: (0, base64url_js_1.encode)(signature),
payload: '',
};
if (b64) {
jws.payload = buffer_utils_js_1.decoder.decode(payload);
}
if (this._unprotectedHeader) {
jws.header = this._unprotectedHeader;
}
if (this._protectedHeader) {
jws.protected = buffer_utils_js_1.decoder.decode(protectedHeader);
}
return jws;
}
}
exports.FlattenedSign = FlattenedSign;

View File

@@ -0,0 +1 @@
{"version":3,"file":"folder-kanban.js","sources":["../../../src/icons/folder-kanban.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name FolderKanban\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNCAyMGgxNmEyIDIgMCAwIDAgMi0yVjhhMiAyIDAgMCAwLTItMmgtNy45M2EyIDIgMCAwIDEtMS42Ni0uOWwtLjgyLTEuMkEyIDIgMCAwIDAgNy45MyAzSDRhMiAyIDAgMCAwLTIgMnYxM2MwIDEuMS45IDIgMiAyWiIgLz4KICA8cGF0aCBkPSJNOCAxMHY0IiAvPgogIDxwYXRoIGQ9Ik0xMiAxMHYyIiAvPgogIDxwYXRoIGQ9Ik0xNiAxMHY2IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/folder-kanban\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 FolderKanban = createLucideIcon('FolderKanban', [\n [\n 'path',\n {\n d: 'M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z',\n key: '1fr9dc',\n },\n ],\n ['path', { d: 'M8 10v4', key: 'tgpxqk' }],\n ['path', { d: 'M12 10v2', key: 'hh53o1' }],\n ['path', { d: 'M16 10v6', key: '1d6xys' }],\n]);\n\nexport default FolderKanban;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAe,iBAAiB,cAAgB,CAAA,CAAA,CAAA;AAAA,CACpD,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;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,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3C,CAAC,CAAA,CAAA;;"}

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"file-text.js","sources":["../../../src/icons/file-text.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name FileText\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTUgMkg2YTIgMiAwIDAgMC0yIDJ2MTZhMiAyIDAgMCAwIDIgMmgxMmEyIDIgMCAwIDAgMi0yVjdaIiAvPgogIDxwYXRoIGQ9Ik0xNCAydjRhMiAyIDAgMCAwIDIgMmg0IiAvPgogIDxwYXRoIGQ9Ik0xMCA5SDgiIC8+CiAgPHBhdGggZD0iTTE2IDEzSDgiIC8+CiAgPHBhdGggZD0iTTE2IDE3SDgiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/file-text\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 FileText = createLucideIcon('FileText', [\n ['path', { d: 'M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z', key: '1rqfz7' }],\n ['path', { d: 'M14 2v4a2 2 0 0 0 2 2h4', key: 'tnqrlb' }],\n ['path', { d: 'M10 9H8', key: 'b1mrlr' }],\n ['path', { d: 'M16 13H8', key: 't4e002' }],\n ['path', { d: 'M16 17H8', key: 'z1uh3a' }],\n]);\n\nexport default FileText;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,iBAAiB,UAAY,CAAA,CAAA,CAAA;AAAA,CAAA,CAC5C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA8D,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAC3F,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA2B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,3 @@
# `@rollup/rollup-linux-arm64-musl`
This is the **aarch64-unknown-linux-musl** binary for `rollup`

View File

@@ -0,0 +1,23 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Euro = createLucideIcon("Euro", [
["path", { d: "M4 10h12", key: "1y6xl8" }],
["path", { d: "M4 14h9", key: "1loblj" }],
[
"path",
{
d: "M19 6a7.7 7.7 0 0 0-5.2-2A7.9 7.9 0 0 0 6 12c0 4.4 3.5 8 7.8 8 2 0 3.8-.8 5.2-2",
key: "1j6lzo"
}
]
]);
export { Euro as default };
//# sourceMappingURL=euro.js.map

View File

@@ -0,0 +1,173 @@
import { buildLocalizeFn } from "../../_lib/buildLocalizeFn.js";
const eraValues = {
narrow: ["vC", "nC"],
abbreviated: ["vC", "nC"],
wide: ["voor Christus", "na Christus"],
};
const quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["K1", "K2", "K3", "K4"],
wide: ["1ste kwartaal", "2de kwartaal", "3de kwartaal", "4de kwartaal"],
};
const monthValues = {
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
abbreviated: [
"Jan",
"Feb",
"Mrt",
"Apr",
"Mei",
"Jun",
"Jul",
"Aug",
"Sep",
"Okt",
"Nov",
"Des",
],
wide: [
"Januarie",
"Februarie",
"Maart",
"April",
"Mei",
"Junie",
"Julie",
"Augustus",
"September",
"Oktober",
"November",
"Desember",
],
};
const dayValues = {
narrow: ["S", "M", "D", "W", "D", "V", "S"],
short: ["So", "Ma", "Di", "Wo", "Do", "Vr", "Sa"],
abbreviated: ["Son", "Maa", "Din", "Woe", "Don", "Vry", "Sat"],
wide: [
"Sondag",
"Maandag",
"Dinsdag",
"Woensdag",
"Donderdag",
"Vrydag",
"Saterdag",
],
};
const dayPeriodValues = {
narrow: {
am: "vm",
pm: "nm",
midnight: "middernag",
noon: "middaguur",
morning: "oggend",
afternoon: "middag",
evening: "laat middag",
night: "aand",
},
abbreviated: {
am: "vm",
pm: "nm",
midnight: "middernag",
noon: "middaguur",
morning: "oggend",
afternoon: "middag",
evening: "laat middag",
night: "aand",
},
wide: {
am: "vm",
pm: "nm",
midnight: "middernag",
noon: "middaguur",
morning: "oggend",
afternoon: "middag",
evening: "laat middag",
night: "aand",
},
};
const formattingDayPeriodValues = {
narrow: {
am: "vm",
pm: "nm",
midnight: "middernag",
noon: "uur die middag",
morning: "uur die oggend",
afternoon: "uur die middag",
evening: "uur die aand",
night: "uur die aand",
},
abbreviated: {
am: "vm",
pm: "nm",
midnight: "middernag",
noon: "uur die middag",
morning: "uur die oggend",
afternoon: "uur die middag",
evening: "uur die aand",
night: "uur die aand",
},
wide: {
am: "vm",
pm: "nm",
midnight: "middernag",
noon: "uur die middag",
morning: "uur die oggend",
afternoon: "uur die middag",
evening: "uur die aand",
night: "uur die aand",
},
};
const ordinalNumber = (dirtyNumber) => {
const number = Number(dirtyNumber);
const rem100 = number % 100;
if (rem100 < 20) {
switch (rem100) {
case 1:
case 8:
return number + "ste";
default:
return number + "de";
}
}
return number + "ste";
};
export const localize = {
ordinalNumber,
era: buildLocalizeFn({
values: eraValues,
defaultWidth: "wide",
}),
quarter: buildLocalizeFn({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: (quarter) => quarter - 1,
}),
month: buildLocalizeFn({
values: monthValues,
defaultWidth: "wide",
}),
day: buildLocalizeFn({
values: dayValues,
defaultWidth: "wide",
}),
dayPeriod: buildLocalizeFn({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide",
}),
};

View File

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

View File

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

View File

@@ -0,0 +1,61 @@
{
"name": "ansi-regex",
"version": "6.2.2",
"description": "Regular expression for matching ANSI escape codes",
"license": "MIT",
"repository": "chalk/ansi-regex",
"funding": "https://github.com/chalk/ansi-regex?sponsor=1",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "https://sindresorhus.com"
},
"type": "module",
"exports": "./index.js",
"types": "./index.d.ts",
"sideEffects": false,
"engines": {
"node": ">=12"
},
"scripts": {
"test": "xo && ava && tsd",
"view-supported": "node fixtures/view-codes.js"
},
"files": [
"index.js",
"index.d.ts"
],
"keywords": [
"ansi",
"styles",
"color",
"colour",
"colors",
"terminal",
"console",
"cli",
"string",
"tty",
"escape",
"formatting",
"rgb",
"256",
"shell",
"xterm",
"command-line",
"text",
"regex",
"regexp",
"re",
"match",
"test",
"find",
"pattern"
],
"devDependencies": {
"ansi-escapes": "^5.0.0",
"ava": "^3.15.0",
"tsd": "^0.21.0",
"xo": "^0.54.2"
}
}

View File

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

View File

@@ -0,0 +1,2 @@
import { GraphQLScalarType } from 'graphql';
export declare const GraphQLIBAN: GraphQLScalarType<string, string>;

View File

@@ -0,0 +1,2 @@
export declare const createPathMap: (rows: unknown) => Record<string, Record<string, unknown>[]>;
//# sourceMappingURL=createRelationshipMap.d.ts.map

View File

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

View File

@@ -0,0 +1,22 @@
var baseSlice = require('./_baseSlice');
/**
* Gets all but the last element of `array`.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Array
* @param {Array} array The array to query.
* @returns {Array} Returns the slice of `array`.
* @example
*
* _.initial([1, 2, 3]);
* // => [1, 2]
*/
function initial(array) {
var length = array == null ? 0 : array.length;
return length ? baseSlice(array, 0, -1) : [];
}
module.exports = initial;

View File

@@ -0,0 +1,27 @@
"use strict";
exports.et = void 0;
var _index = require("./et/_lib/formatDistance.cjs");
var _index2 = require("./et/_lib/formatLong.cjs");
var _index3 = require("./et/_lib/formatRelative.cjs");
var _index4 = require("./et/_lib/localize.cjs");
var _index5 = require("./et/_lib/match.cjs");
/**
* @category Locales
* @summary Estonian locale.
* @language Estonian
* @iso-639-2 est
* @author Priit Hansen [@HansenPriit](https://github.com/priithansen)
*/
const et = (exports.et = {
code: "et",
formatDistance: _index.formatDistance,
formatLong: _index2.formatLong,
formatRelative: _index3.formatRelative,
localize: _index4.localize,
match: _index5.match,
options: {
weekStartsOn: 1 /* Monday */,
firstWeekContainsDate: 4,
},
});

View File

@@ -0,0 +1,28 @@
/* eslint-env browser */
const perf = typeof performance === 'undefined' ? null : performance
const isoCrypto = typeof crypto === 'undefined' ? null : crypto
/**
* @type {function(number):ArrayBuffer}
*/
const cryptoRandomBuffer = isoCrypto !== null
? len => {
// browser
const buf = new ArrayBuffer(len)
const arr = new Uint8Array(buf)
isoCrypto.getRandomValues(arr)
return buf
}
: len => {
// polyfill
const buf = new ArrayBuffer(len)
const arr = new Uint8Array(buf)
for (let i = 0; i < len; i++) {
arr[i] = Math.ceil((Math.random() * 0xFFFFFFFF) >>> 0)
}
return buf
}
exports.performance = perf
exports.cryptoRandomBuffer = cryptoRandomBuffer

View File

@@ -0,0 +1 @@
!function(e){function t(e,t,a){return{pattern:RegExp("<#"+e+"[\\s\\S]*?#>"),alias:"block",inside:{delimiter:{pattern:RegExp("^<#"+e+"|#>$"),alias:"important"},content:{pattern:/[\s\S]+/,inside:t,alias:a}}}}e.languages["t4-templating"]=Object.defineProperty({},"createT4",{value:function(a){var n=e.languages[a],i="language-"+a;return{block:{pattern:/<#[\s\S]+?#>/,inside:{directive:t("@",{"attr-value":{pattern:/=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+)/,inside:{punctuation:/^=|^["']|["']$/}},keyword:/\b\w+(?=\s)/,"attr-name":/\b\w+/}),expression:t("=",n,i),"class-feature":t("\\+",n,i),standard:t("",n,i)}}}}})}(Prism);

View File

@@ -0,0 +1,625 @@
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true,
});
exports.introspectionTypes =
exports.__TypeKind =
exports.__Type =
exports.__Schema =
exports.__InputValue =
exports.__Field =
exports.__EnumValue =
exports.__DirectiveLocation =
exports.__Directive =
exports.TypeNameMetaFieldDef =
exports.TypeMetaFieldDef =
exports.TypeKind =
exports.SchemaMetaFieldDef =
void 0;
exports.isIntrospectionType = isIntrospectionType;
var _inspect = require('../jsutils/inspect.js');
var _invariant = require('../jsutils/invariant.js');
var _directiveLocation = require('../language/directiveLocation.js');
var _printer = require('../language/printer.js');
var _astFromValue = require('../utilities/astFromValue.js');
var _definition = require('./definition.js');
var _scalars = require('./scalars.js');
const __Schema = new _definition.GraphQLObjectType({
name: '__Schema',
description:
'A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.',
fields: () => ({
description: {
type: _scalars.GraphQLString,
resolve: (schema) => schema.description,
},
types: {
description: 'A list of all types supported by this server.',
type: new _definition.GraphQLNonNull(
new _definition.GraphQLList(new _definition.GraphQLNonNull(__Type)),
),
resolve(schema) {
return Object.values(schema.getTypeMap());
},
},
queryType: {
description: 'The type that query operations will be rooted at.',
type: new _definition.GraphQLNonNull(__Type),
resolve: (schema) => schema.getQueryType(),
},
mutationType: {
description:
'If this server supports mutation, the type that mutation operations will be rooted at.',
type: __Type,
resolve: (schema) => schema.getMutationType(),
},
subscriptionType: {
description:
'If this server support subscription, the type that subscription operations will be rooted at.',
type: __Type,
resolve: (schema) => schema.getSubscriptionType(),
},
directives: {
description: 'A list of all directives supported by this server.',
type: new _definition.GraphQLNonNull(
new _definition.GraphQLList(
new _definition.GraphQLNonNull(__Directive),
),
),
resolve: (schema) => schema.getDirectives(),
},
}),
});
exports.__Schema = __Schema;
const __Directive = new _definition.GraphQLObjectType({
name: '__Directive',
description:
"A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.\n\nIn some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.",
fields: () => ({
name: {
type: new _definition.GraphQLNonNull(_scalars.GraphQLString),
resolve: (directive) => directive.name,
},
description: {
type: _scalars.GraphQLString,
resolve: (directive) => directive.description,
},
isRepeatable: {
type: new _definition.GraphQLNonNull(_scalars.GraphQLBoolean),
resolve: (directive) => directive.isRepeatable,
},
locations: {
type: new _definition.GraphQLNonNull(
new _definition.GraphQLList(
new _definition.GraphQLNonNull(__DirectiveLocation),
),
),
resolve: (directive) => directive.locations,
},
args: {
type: new _definition.GraphQLNonNull(
new _definition.GraphQLList(
new _definition.GraphQLNonNull(__InputValue),
),
),
args: {
includeDeprecated: {
type: _scalars.GraphQLBoolean,
defaultValue: false,
},
},
resolve(field, { includeDeprecated }) {
return includeDeprecated
? field.args
: field.args.filter((arg) => arg.deprecationReason == null);
},
},
}),
});
exports.__Directive = __Directive;
const __DirectiveLocation = new _definition.GraphQLEnumType({
name: '__DirectiveLocation',
description:
'A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.',
values: {
QUERY: {
value: _directiveLocation.DirectiveLocation.QUERY,
description: 'Location adjacent to a query operation.',
},
MUTATION: {
value: _directiveLocation.DirectiveLocation.MUTATION,
description: 'Location adjacent to a mutation operation.',
},
SUBSCRIPTION: {
value: _directiveLocation.DirectiveLocation.SUBSCRIPTION,
description: 'Location adjacent to a subscription operation.',
},
FIELD: {
value: _directiveLocation.DirectiveLocation.FIELD,
description: 'Location adjacent to a field.',
},
FRAGMENT_DEFINITION: {
value: _directiveLocation.DirectiveLocation.FRAGMENT_DEFINITION,
description: 'Location adjacent to a fragment definition.',
},
FRAGMENT_SPREAD: {
value: _directiveLocation.DirectiveLocation.FRAGMENT_SPREAD,
description: 'Location adjacent to a fragment spread.',
},
INLINE_FRAGMENT: {
value: _directiveLocation.DirectiveLocation.INLINE_FRAGMENT,
description: 'Location adjacent to an inline fragment.',
},
VARIABLE_DEFINITION: {
value: _directiveLocation.DirectiveLocation.VARIABLE_DEFINITION,
description: 'Location adjacent to a variable definition.',
},
SCHEMA: {
value: _directiveLocation.DirectiveLocation.SCHEMA,
description: 'Location adjacent to a schema definition.',
},
SCALAR: {
value: _directiveLocation.DirectiveLocation.SCALAR,
description: 'Location adjacent to a scalar definition.',
},
OBJECT: {
value: _directiveLocation.DirectiveLocation.OBJECT,
description: 'Location adjacent to an object type definition.',
},
FIELD_DEFINITION: {
value: _directiveLocation.DirectiveLocation.FIELD_DEFINITION,
description: 'Location adjacent to a field definition.',
},
ARGUMENT_DEFINITION: {
value: _directiveLocation.DirectiveLocation.ARGUMENT_DEFINITION,
description: 'Location adjacent to an argument definition.',
},
INTERFACE: {
value: _directiveLocation.DirectiveLocation.INTERFACE,
description: 'Location adjacent to an interface definition.',
},
UNION: {
value: _directiveLocation.DirectiveLocation.UNION,
description: 'Location adjacent to a union definition.',
},
ENUM: {
value: _directiveLocation.DirectiveLocation.ENUM,
description: 'Location adjacent to an enum definition.',
},
ENUM_VALUE: {
value: _directiveLocation.DirectiveLocation.ENUM_VALUE,
description: 'Location adjacent to an enum value definition.',
},
INPUT_OBJECT: {
value: _directiveLocation.DirectiveLocation.INPUT_OBJECT,
description: 'Location adjacent to an input object type definition.',
},
INPUT_FIELD_DEFINITION: {
value: _directiveLocation.DirectiveLocation.INPUT_FIELD_DEFINITION,
description: 'Location adjacent to an input object field definition.',
},
},
});
exports.__DirectiveLocation = __DirectiveLocation;
const __Type = new _definition.GraphQLObjectType({
name: '__Type',
description:
'The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByURL`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.',
fields: () => ({
kind: {
type: new _definition.GraphQLNonNull(__TypeKind),
resolve(type) {
if ((0, _definition.isScalarType)(type)) {
return TypeKind.SCALAR;
}
if ((0, _definition.isObjectType)(type)) {
return TypeKind.OBJECT;
}
if ((0, _definition.isInterfaceType)(type)) {
return TypeKind.INTERFACE;
}
if ((0, _definition.isUnionType)(type)) {
return TypeKind.UNION;
}
if ((0, _definition.isEnumType)(type)) {
return TypeKind.ENUM;
}
if ((0, _definition.isInputObjectType)(type)) {
return TypeKind.INPUT_OBJECT;
}
if ((0, _definition.isListType)(type)) {
return TypeKind.LIST;
}
if ((0, _definition.isNonNullType)(type)) {
return TypeKind.NON_NULL;
}
/* c8 ignore next 3 */
// Not reachable, all possible types have been considered)
false ||
(0, _invariant.invariant)(
false,
`Unexpected type: "${(0, _inspect.inspect)(type)}".`,
);
},
},
name: {
type: _scalars.GraphQLString,
resolve: (type) => ('name' in type ? type.name : undefined),
},
description: {
type: _scalars.GraphQLString,
resolve: (
type, // FIXME: add test case
) =>
/* c8 ignore next */
'description' in type ? type.description : undefined,
},
specifiedByURL: {
type: _scalars.GraphQLString,
resolve: (obj) =>
'specifiedByURL' in obj ? obj.specifiedByURL : undefined,
},
fields: {
type: new _definition.GraphQLList(
new _definition.GraphQLNonNull(__Field),
),
args: {
includeDeprecated: {
type: _scalars.GraphQLBoolean,
defaultValue: false,
},
},
resolve(type, { includeDeprecated }) {
if (
(0, _definition.isObjectType)(type) ||
(0, _definition.isInterfaceType)(type)
) {
const fields = Object.values(type.getFields());
return includeDeprecated
? fields
: fields.filter((field) => field.deprecationReason == null);
}
},
},
interfaces: {
type: new _definition.GraphQLList(new _definition.GraphQLNonNull(__Type)),
resolve(type) {
if (
(0, _definition.isObjectType)(type) ||
(0, _definition.isInterfaceType)(type)
) {
return type.getInterfaces();
}
},
},
possibleTypes: {
type: new _definition.GraphQLList(new _definition.GraphQLNonNull(__Type)),
resolve(type, _args, _context, { schema }) {
if ((0, _definition.isAbstractType)(type)) {
return schema.getPossibleTypes(type);
}
},
},
enumValues: {
type: new _definition.GraphQLList(
new _definition.GraphQLNonNull(__EnumValue),
),
args: {
includeDeprecated: {
type: _scalars.GraphQLBoolean,
defaultValue: false,
},
},
resolve(type, { includeDeprecated }) {
if ((0, _definition.isEnumType)(type)) {
const values = type.getValues();
return includeDeprecated
? values
: values.filter((field) => field.deprecationReason == null);
}
},
},
inputFields: {
type: new _definition.GraphQLList(
new _definition.GraphQLNonNull(__InputValue),
),
args: {
includeDeprecated: {
type: _scalars.GraphQLBoolean,
defaultValue: false,
},
},
resolve(type, { includeDeprecated }) {
if ((0, _definition.isInputObjectType)(type)) {
const values = Object.values(type.getFields());
return includeDeprecated
? values
: values.filter((field) => field.deprecationReason == null);
}
},
},
ofType: {
type: __Type,
resolve: (type) => ('ofType' in type ? type.ofType : undefined),
},
isOneOf: {
type: _scalars.GraphQLBoolean,
resolve: (type) => {
if ((0, _definition.isInputObjectType)(type)) {
return type.isOneOf;
}
},
},
}),
});
exports.__Type = __Type;
const __Field = new _definition.GraphQLObjectType({
name: '__Field',
description:
'Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.',
fields: () => ({
name: {
type: new _definition.GraphQLNonNull(_scalars.GraphQLString),
resolve: (field) => field.name,
},
description: {
type: _scalars.GraphQLString,
resolve: (field) => field.description,
},
args: {
type: new _definition.GraphQLNonNull(
new _definition.GraphQLList(
new _definition.GraphQLNonNull(__InputValue),
),
),
args: {
includeDeprecated: {
type: _scalars.GraphQLBoolean,
defaultValue: false,
},
},
resolve(field, { includeDeprecated }) {
return includeDeprecated
? field.args
: field.args.filter((arg) => arg.deprecationReason == null);
},
},
type: {
type: new _definition.GraphQLNonNull(__Type),
resolve: (field) => field.type,
},
isDeprecated: {
type: new _definition.GraphQLNonNull(_scalars.GraphQLBoolean),
resolve: (field) => field.deprecationReason != null,
},
deprecationReason: {
type: _scalars.GraphQLString,
resolve: (field) => field.deprecationReason,
},
}),
});
exports.__Field = __Field;
const __InputValue = new _definition.GraphQLObjectType({
name: '__InputValue',
description:
'Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.',
fields: () => ({
name: {
type: new _definition.GraphQLNonNull(_scalars.GraphQLString),
resolve: (inputValue) => inputValue.name,
},
description: {
type: _scalars.GraphQLString,
resolve: (inputValue) => inputValue.description,
},
type: {
type: new _definition.GraphQLNonNull(__Type),
resolve: (inputValue) => inputValue.type,
},
defaultValue: {
type: _scalars.GraphQLString,
description:
'A GraphQL-formatted string representing the default value for this input value.',
resolve(inputValue) {
const { type, defaultValue } = inputValue;
const valueAST = (0, _astFromValue.astFromValue)(defaultValue, type);
return valueAST ? (0, _printer.print)(valueAST) : null;
},
},
isDeprecated: {
type: new _definition.GraphQLNonNull(_scalars.GraphQLBoolean),
resolve: (field) => field.deprecationReason != null,
},
deprecationReason: {
type: _scalars.GraphQLString,
resolve: (obj) => obj.deprecationReason,
},
}),
});
exports.__InputValue = __InputValue;
const __EnumValue = new _definition.GraphQLObjectType({
name: '__EnumValue',
description:
'One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.',
fields: () => ({
name: {
type: new _definition.GraphQLNonNull(_scalars.GraphQLString),
resolve: (enumValue) => enumValue.name,
},
description: {
type: _scalars.GraphQLString,
resolve: (enumValue) => enumValue.description,
},
isDeprecated: {
type: new _definition.GraphQLNonNull(_scalars.GraphQLBoolean),
resolve: (enumValue) => enumValue.deprecationReason != null,
},
deprecationReason: {
type: _scalars.GraphQLString,
resolve: (enumValue) => enumValue.deprecationReason,
},
}),
});
exports.__EnumValue = __EnumValue;
var TypeKind;
exports.TypeKind = TypeKind;
(function (TypeKind) {
TypeKind['SCALAR'] = 'SCALAR';
TypeKind['OBJECT'] = 'OBJECT';
TypeKind['INTERFACE'] = 'INTERFACE';
TypeKind['UNION'] = 'UNION';
TypeKind['ENUM'] = 'ENUM';
TypeKind['INPUT_OBJECT'] = 'INPUT_OBJECT';
TypeKind['LIST'] = 'LIST';
TypeKind['NON_NULL'] = 'NON_NULL';
})(TypeKind || (exports.TypeKind = TypeKind = {}));
const __TypeKind = new _definition.GraphQLEnumType({
name: '__TypeKind',
description: 'An enum describing what kind of type a given `__Type` is.',
values: {
SCALAR: {
value: TypeKind.SCALAR,
description: 'Indicates this type is a scalar.',
},
OBJECT: {
value: TypeKind.OBJECT,
description:
'Indicates this type is an object. `fields` and `interfaces` are valid fields.',
},
INTERFACE: {
value: TypeKind.INTERFACE,
description:
'Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields.',
},
UNION: {
value: TypeKind.UNION,
description:
'Indicates this type is a union. `possibleTypes` is a valid field.',
},
ENUM: {
value: TypeKind.ENUM,
description:
'Indicates this type is an enum. `enumValues` is a valid field.',
},
INPUT_OBJECT: {
value: TypeKind.INPUT_OBJECT,
description:
'Indicates this type is an input object. `inputFields` is a valid field.',
},
LIST: {
value: TypeKind.LIST,
description: 'Indicates this type is a list. `ofType` is a valid field.',
},
NON_NULL: {
value: TypeKind.NON_NULL,
description:
'Indicates this type is a non-null. `ofType` is a valid field.',
},
},
});
/**
* Note that these are GraphQLField and not GraphQLFieldConfig,
* so the format for args is different.
*/
exports.__TypeKind = __TypeKind;
const SchemaMetaFieldDef = {
name: '__schema',
type: new _definition.GraphQLNonNull(__Schema),
description: 'Access the current type schema of this server.',
args: [],
resolve: (_source, _args, _context, { schema }) => schema,
deprecationReason: undefined,
extensions: Object.create(null),
astNode: undefined,
};
exports.SchemaMetaFieldDef = SchemaMetaFieldDef;
const TypeMetaFieldDef = {
name: '__type',
type: __Type,
description: 'Request the type information of a single type.',
args: [
{
name: 'name',
description: undefined,
type: new _definition.GraphQLNonNull(_scalars.GraphQLString),
defaultValue: undefined,
deprecationReason: undefined,
extensions: Object.create(null),
astNode: undefined,
},
],
resolve: (_source, { name }, _context, { schema }) => schema.getType(name),
deprecationReason: undefined,
extensions: Object.create(null),
astNode: undefined,
};
exports.TypeMetaFieldDef = TypeMetaFieldDef;
const TypeNameMetaFieldDef = {
name: '__typename',
type: new _definition.GraphQLNonNull(_scalars.GraphQLString),
description: 'The name of the current Object type at runtime.',
args: [],
resolve: (_source, _args, _context, { parentType }) => parentType.name,
deprecationReason: undefined,
extensions: Object.create(null),
astNode: undefined,
};
exports.TypeNameMetaFieldDef = TypeNameMetaFieldDef;
const introspectionTypes = Object.freeze([
__Schema,
__Directive,
__DirectiveLocation,
__Type,
__Field,
__InputValue,
__EnumValue,
__TypeKind,
]);
exports.introspectionTypes = introspectionTypes;
function isIntrospectionType(type) {
return introspectionTypes.some(({ name }) => type.name === name);
}

View File

@@ -0,0 +1 @@
export{getExtracted,getFormatter,getLocale,getMessages,getNow,getRequestConfig,getTimeZone,getTranslations,setRequestLocale}from"./server/react-client/index.js";

View File

@@ -0,0 +1,4 @@
'use client';
import { createContext } from 'react';
export const WindowInfoContext = createContext({});
//# sourceMappingURL=context.js.map

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,2CAAwD;AAA/C,sHAAA,wBAAwB,OAAA;AACjC,0CAAuD;AAA9C,4GAAA,mBAAmB,OAAA;AAC5B,6FAA4F;AAAnF,0JAAA,mCAAmC,OAAA;AAC5C,iFAAgF;AAAvE,8IAAA,6BAA6B,OAAA;AAUtC,iCAIiB;AAHf,kGAAA,SAAS,OAAA;AACT,+GAAA,sBAAsB,OAAA;AACtB,oHAAA,2BAA2B,OAAA;AAE7B,uDAA+E;AAAtE,oHAAA,gBAAgB,OAAA;AAAE,2HAAA,uBAAuB,OAAA","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\nexport { registerInstrumentations } from './autoLoader';\nexport { InstrumentationBase } from './platform/index';\nexport { InstrumentationNodeModuleDefinition } from './instrumentationNodeModuleDefinition';\nexport { InstrumentationNodeModuleFile } from './instrumentationNodeModuleFile';\nexport type {\n Instrumentation,\n InstrumentationConfig,\n InstrumentationModuleDefinition,\n InstrumentationModuleFile,\n ShimWrapped,\n SpanCustomizationHook,\n} from './types';\nexport type { AutoLoaderOptions, AutoLoaderResult } from './types_internal';\nexport {\n isWrapped,\n safeExecuteInTheMiddle,\n safeExecuteInTheMiddleAsync,\n} from './utils';\nexport { SemconvStability, semconvStabilityFromStr } from './semconvStability';\n"]}

View File

@@ -0,0 +1,209 @@
'use strict';
const color = require('kleur');
const Prompt = require('./prompt');
const { style, clear, figures } = require('../util');
const { erase, cursor } = require('sisteransi');
const { DatePart, Meridiem, Day, Hours, Milliseconds, Minutes, Month, Seconds, Year } = require('../dateparts');
const regex = /\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g;
const regexGroups = {
1: ({token}) => token.replace(/\\(.)/g, '$1'),
2: (opts) => new Day(opts), // Day // TODO
3: (opts) => new Month(opts), // Month
4: (opts) => new Year(opts), // Year
5: (opts) => new Meridiem(opts), // AM/PM // TODO (special)
6: (opts) => new Hours(opts), // Hours
7: (opts) => new Minutes(opts), // Minutes
8: (opts) => new Seconds(opts), // Seconds
9: (opts) => new Milliseconds(opts), // Fractional seconds
}
const dfltLocales = {
months: 'January,February,March,April,May,June,July,August,September,October,November,December'.split(','),
monthsShort: 'Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec'.split(','),
weekdays: 'Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday'.split(','),
weekdaysShort: 'Sun,Mon,Tue,Wed,Thu,Fri,Sat'.split(',')
}
/**
* DatePrompt Base Element
* @param {Object} opts Options
* @param {String} opts.message Message
* @param {Number} [opts.initial] Index of default value
* @param {String} [opts.mask] The format mask
* @param {object} [opts.locales] The date locales
* @param {String} [opts.error] The error message shown on invalid value
* @param {Function} [opts.validate] Function to validate the submitted value
* @param {Stream} [opts.stdin] The Readable stream to listen to
* @param {Stream} [opts.stdout] The Writable stream to write readline data to
*/
class DatePrompt extends Prompt {
constructor(opts={}) {
super(opts);
this.msg = opts.message;
this.cursor = 0;
this.typed = '';
this.locales = Object.assign(dfltLocales, opts.locales);
this._date = opts.initial || new Date();
this.errorMsg = opts.error || 'Please Enter A Valid Value';
this.validator = opts.validate || (() => true);
this.mask = opts.mask || 'YYYY-MM-DD HH:mm:ss';
this.clear = clear('', this.out.columns);
this.render();
}
get value() {
return this.date
}
get date() {
return this._date;
}
set date(date) {
if (date) this._date.setTime(date.getTime());
}
set mask(mask) {
let result;
this.parts = [];
while(result = regex.exec(mask)) {
let match = result.shift();
let idx = result.findIndex(gr => gr != null);
this.parts.push(idx in regexGroups
? regexGroups[idx]({ token: result[idx] || match, date: this.date, parts: this.parts, locales: this.locales })
: result[idx] || match);
}
let parts = this.parts.reduce((arr, i) => {
if (typeof i === 'string' && typeof arr[arr.length - 1] === 'string')
arr[arr.length - 1] += i;
else arr.push(i);
return arr;
}, []);
this.parts.splice(0);
this.parts.push(...parts);
this.reset();
}
moveCursor(n) {
this.typed = '';
this.cursor = n;
this.fire();
}
reset() {
this.moveCursor(this.parts.findIndex(p => p instanceof DatePart));
this.fire();
this.render();
}
exit() {
this.abort();
}
abort() {
this.done = this.aborted = true;
this.error = false;
this.fire();
this.render();
this.out.write('\n');
this.close();
}
async validate() {
let valid = await this.validator(this.value);
if (typeof valid === 'string') {
this.errorMsg = valid;
valid = false;
}
this.error = !valid;
}
async submit() {
await this.validate();
if (this.error) {
this.color = 'red';
this.fire();
this.render();
return;
}
this.done = true;
this.aborted = false;
this.fire();
this.render();
this.out.write('\n');
this.close();
}
up() {
this.typed = '';
this.parts[this.cursor].up();
this.render();
}
down() {
this.typed = '';
this.parts[this.cursor].down();
this.render();
}
left() {
let prev = this.parts[this.cursor].prev();
if (prev == null) return this.bell();
this.moveCursor(this.parts.indexOf(prev));
this.render();
}
right() {
let next = this.parts[this.cursor].next();
if (next == null) return this.bell();
this.moveCursor(this.parts.indexOf(next));
this.render();
}
next() {
let next = this.parts[this.cursor].next();
this.moveCursor(next
? this.parts.indexOf(next)
: this.parts.findIndex((part) => part instanceof DatePart));
this.render();
}
_(c) {
if (/\d/.test(c)) {
this.typed += c;
this.parts[this.cursor].setTo(this.typed);
this.render();
}
}
render() {
if (this.closed) return;
if (this.firstRender) this.out.write(cursor.hide);
else this.out.write(clear(this.outputText, this.out.columns));
super.render();
// Print prompt
this.outputText = [
style.symbol(this.done, this.aborted),
color.bold(this.msg),
style.delimiter(false),
this.parts.reduce((arr, p, idx) => arr.concat(idx === this.cursor && !this.done ? color.cyan().underline(p.toString()) : p), [])
.join('')
].join(' ');
// Print error
if (this.error) {
this.outputText += this.errorMsg.split('\n').reduce(
(a, l, i) => a + `\n${i ? ` ` : figures.pointerSmall} ${color.red().italic(l)}`, ``);
}
this.out.write(erase.line + cursor.to(0) + this.outputText);
}
}
module.exports = DatePrompt;

View File

@@ -0,0 +1,68 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const integration = require('../../integration.js');
const featureFlags = require('../../utils/featureFlags.js');
const object = require('../../utils/object.js');
/**
* Sentry integration for capturing feature flag evaluations from GrowthBook.
*
* Only boolean results are captured at this time.
*
* @example
* ```typescript
* import { GrowthBook } from '@growthbook/growthbook';
* import * as Sentry from '@sentry/browser'; // or '@sentry/node'
*
* Sentry.init({
* dsn: 'your-dsn',
* integrations: [
* Sentry.growthbookIntegration({ growthbookClass: GrowthBook })
* ]
* });
* ```
*/
const growthbookIntegration = integration.defineIntegration(
({ growthbookClass }) => {
return {
name: 'GrowthBook',
setupOnce() {
const proto = growthbookClass.prototype ;
// Type guard and wrap isOn
if (typeof proto.isOn === 'function') {
object.fill(proto, 'isOn', _wrapAndCaptureBooleanResult);
}
// Type guard and wrap getFeatureValue
if (typeof proto.getFeatureValue === 'function') {
object.fill(proto, 'getFeatureValue', _wrapAndCaptureBooleanResult);
}
},
processEvent(event, _hint, _client) {
return featureFlags._INTERNAL_copyFlagsFromScopeToEvent(event);
},
};
},
);
function _wrapAndCaptureBooleanResult(
original,
) {
return function ( ...args) {
const flagName = args[0];
const result = original.apply(this, args);
if (typeof flagName === 'string' && typeof result === 'boolean') {
featureFlags._INTERNAL_insertFlagToScope(flagName, result);
featureFlags._INTERNAL_addFeatureFlagToActiveSpan(flagName, result);
}
return result;
};
}
exports.growthbookIntegration = growthbookIntegration;
//# sourceMappingURL=growthbook.js.map

View File

@@ -0,0 +1,27 @@
"use strict";
exports.sq = void 0;
var _index = require("./sq/_lib/formatDistance.js");
var _index2 = require("./sq/_lib/formatLong.js");
var _index3 = require("./sq/_lib/formatRelative.js");
var _index4 = require("./sq/_lib/localize.js");
var _index5 = require("./sq/_lib/match.js");
/**
* @category Locales
* @summary Albanian locale.
* @language Shqip
* @iso-639-2 sqi
* @author Ardit Dine [@arditdine](https://github.com/arditdine)
*/
const sq = (exports.sq = {
code: "sq",
formatDistance: _index.formatDistance,
formatLong: _index2.formatLong,
formatRelative: _index3.formatRelative,
localize: _index4.localize,
match: _index5.match,
options: {
weekStartsOn: 1 /* Monday */,
firstWeekContainsDate: 1,
},
});

View File

@@ -0,0 +1,148 @@
#!/usr/bin/env node
(function() {
var fs = require('fs');
var stringEscape = require('../jsesc.js');
var strings = process.argv.splice(2);
var stdin = process.stdin;
var data;
var timeout;
var isObject = false;
var options = {};
var log = console.log;
var main = function() {
var option = strings[0];
if (/^(?:-h|--help|undefined)$/.test(option)) {
log(
'jsesc v%s - https://mths.be/jsesc',
stringEscape.version
);
log([
'\nUsage:\n',
'\tjsesc [string]',
'\tjsesc [-s | --single-quotes] [string]',
'\tjsesc [-d | --double-quotes] [string]',
'\tjsesc [-w | --wrap] [string]',
'\tjsesc [-e | --escape-everything] [string]',
'\tjsesc [-t | --escape-etago] [string]',
'\tjsesc [-6 | --es6] [string]',
'\tjsesc [-l | --lowercase-hex] [string]',
'\tjsesc [-j | --json] [string]',
'\tjsesc [-o | --object] [stringified_object]', // `JSON.parse()` the argument
'\tjsesc [-p | --pretty] [string]', // `compact: false`
'\tjsesc [-v | --version]',
'\tjsesc [-h | --help]',
'\nExamples:\n',
'\tjsesc \'f\xF6o \u2665 b\xE5r \uD834\uDF06 baz\'',
'\tjsesc --json \'f\xF6o \u2665 b\xE5r \uD834\uDF06 baz\'',
'\tjsesc --json --escape-everything \'f\xF6o \u2665 b\xE5r \uD834\uDF06 baz\'',
'\tjsesc --double-quotes --wrap \'f\xF6o \u2665 b\xE5r \uD834\uDF06 baz\'',
'\techo \'f\xF6o \u2665 b\xE5r \uD834\uDF06 baz\' | jsesc'
].join('\n'));
return process.exit(1);
}
if (/^(?:-v|--version)$/.test(option)) {
log('v%s', stringEscape.version);
return process.exit(1);
}
strings.forEach(function(string) {
// Process options
if (/^(?:-s|--single-quotes)$/.test(string)) {
options.quotes = 'single';
return;
}
if (/^(?:-d|--double-quotes)$/.test(string)) {
options.quotes = 'double';
return;
}
if (/^(?:-w|--wrap)$/.test(string)) {
options.wrap = true;
return;
}
if (/^(?:-e|--escape-everything)$/.test(string)) {
options.escapeEverything = true;
return;
}
if (/^(?:-t|--escape-etago)$/.test(string)) {
options.escapeEtago = true;
return;
}
if (/^(?:-6|--es6)$/.test(string)) {
options.es6 = true;
return;
}
if (/^(?:-l|--lowercase-hex)$/.test(string)) {
options.lowercaseHex = true;
return;
}
if (/^(?:-j|--json)$/.test(string)) {
options.json = true;
return;
}
if (/^(?:-o|--object)$/.test(string)) {
isObject = true;
return;
}
if (/^(?:-p|--pretty)$/.test(string)) {
isObject = true;
options.compact = false;
return;
}
// Process string(s)
var result;
try {
if (isObject) {
string = JSON.parse(string);
}
result = stringEscape(string, options);
log(result);
} catch(error) {
log(error.message + '\n');
log('Error: failed to escape.');
log('If you think this is a bug in jsesc, please report it:');
log('https://github.com/mathiasbynens/jsesc/issues/new');
log(
'\nStack trace using jsesc@%s:\n',
stringEscape.version
);
log(error.stack);
return process.exit(1);
}
});
// Return with exit status 0 outside of the `forEach` loop, in case
// multiple strings were passed in.
return process.exit(0);
};
if (stdin.isTTY) {
// handle shell arguments
main();
} else {
// Either the script is called from within a non-TTY context,
// or `stdin` content is being piped in.
if (!process.stdout.isTTY) { // called from a non-TTY context
timeout = setTimeout(function() {
// if no piped data arrived after a while, handle shell arguments
main();
}, 250);
}
data = '';
stdin.on('data', function(chunk) {
clearTimeout(timeout);
data += chunk;
});
stdin.on('end', function() {
strings.push(data.trim());
main();
});
stdin.resume();
}
}());

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