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,13 @@
import type { ASTVisitor } from '../../language/visitor';
import type { ValidationContext } from '../ValidationContext';
/**
* Fields on correct type
*
* A GraphQL document is only valid if all fields selected are defined by the
* parent type, or are an allowed meta field such as __typename.
*
* See https://spec.graphql.org/draft/#sec-Field-Selections
*/
export declare function FieldsOnCorrectTypeRule(
context: ValidationContext,
): ASTVisitor;

View File

@@ -0,0 +1,98 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
/** @typedef {import("../declarations/WebpackOptions").EntryDescriptionNormalized} EntryDescription */
/** @typedef {import("../declarations/WebpackOptions").EntryNormalized} Entry */
/** @typedef {import("./Compiler")} Compiler */
/** @typedef {import("./Entrypoint").EntryOptions} EntryOptions */
const PLUGIN_NAME = "EntryOptionPlugin";
class EntryOptionPlugin {
/**
* @param {Compiler} compiler the compiler instance one is tapping into
* @returns {void}
*/
apply(compiler) {
compiler.hooks.entryOption.tap(PLUGIN_NAME, (context, entry) => {
EntryOptionPlugin.applyEntryOption(compiler, context, entry);
return true;
});
}
/**
* @param {Compiler} compiler the compiler
* @param {string} context context directory
* @param {Entry} entry request
* @returns {void}
*/
static applyEntryOption(compiler, context, entry) {
if (typeof entry === "function") {
const DynamicEntryPlugin = require("./DynamicEntryPlugin");
new DynamicEntryPlugin(context, entry).apply(compiler);
} else {
const EntryPlugin = require("./EntryPlugin");
for (const name of Object.keys(entry)) {
const desc = entry[name];
const options = EntryOptionPlugin.entryDescriptionToOptions(
compiler,
name,
desc
);
const descImport =
/** @type {Exclude<EntryDescription["import"], undefined>} */
(desc.import);
for (const entry of descImport) {
new EntryPlugin(context, entry, options).apply(compiler);
}
}
}
}
/**
* @param {Compiler} compiler the compiler
* @param {string} name entry name
* @param {EntryDescription} desc entry description
* @returns {EntryOptions} options for the entry
*/
static entryDescriptionToOptions(compiler, name, desc) {
/** @type {EntryOptions} */
const options = {
name,
filename: desc.filename,
runtime: desc.runtime,
layer: desc.layer,
dependOn: desc.dependOn,
baseUri: desc.baseUri,
publicPath: desc.publicPath,
chunkLoading: desc.chunkLoading,
asyncChunks: desc.asyncChunks,
wasmLoading: desc.wasmLoading,
library: desc.library
};
if (desc.chunkLoading) {
const EnableChunkLoadingPlugin = require("./javascript/EnableChunkLoadingPlugin");
EnableChunkLoadingPlugin.checkEnabled(compiler, desc.chunkLoading);
}
if (desc.wasmLoading) {
const EnableWasmLoadingPlugin = require("./wasm/EnableWasmLoadingPlugin");
EnableWasmLoadingPlugin.checkEnabled(compiler, desc.wasmLoading);
}
if (desc.library) {
const EnableLibraryPlugin = require("./library/EnableLibraryPlugin");
EnableLibraryPlugin.checkEnabled(compiler, desc.library.type);
}
return options;
}
}
module.exports = EntryOptionPlugin;

View File

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

View File

@@ -0,0 +1,53 @@
var arrayMap = require('./_arrayMap'),
baseIteratee = require('./_baseIteratee'),
baseMap = require('./_baseMap'),
isArray = require('./isArray');
/**
* Creates an array of values by running each element in `collection` thru
* `iteratee`. The iteratee is invoked with three arguments:
* (value, index|key, collection).
*
* Many lodash methods are guarded to work as iteratees for methods like
* `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
*
* The guarded methods are:
* `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
* `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
* `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
* `template`, `trim`, `trimEnd`, `trimStart`, and `words`
*
* @static
* @memberOf _
* @since 0.1.0
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
* @returns {Array} Returns the new mapped array.
* @example
*
* function square(n) {
* return n * n;
* }
*
* _.map([4, 8], square);
* // => [16, 64]
*
* _.map({ 'a': 4, 'b': 8 }, square);
* // => [16, 64] (iteration order is not guaranteed)
*
* var users = [
* { 'user': 'barney' },
* { 'user': 'fred' }
* ];
*
* // The `_.property` iteratee shorthand.
* _.map(users, 'user');
* // => ['barney', 'fred']
*/
function map(collection, iteratee) {
var func = isArray(collection) ? arrayMap : baseMap;
return func(collection, baseIteratee(iteratee, 3));
}
module.exports = map;

View File

@@ -0,0 +1,65 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var smallint_exports = {};
__export(smallint_exports, {
SingleStoreSmallInt: () => SingleStoreSmallInt,
SingleStoreSmallIntBuilder: () => SingleStoreSmallIntBuilder,
smallint: () => smallint
});
module.exports = __toCommonJS(smallint_exports);
var import_entity = require("../../entity.cjs");
var import_utils = require("../../utils.cjs");
var import_common = require("./common.cjs");
class SingleStoreSmallIntBuilder extends import_common.SingleStoreColumnBuilderWithAutoIncrement {
static [import_entity.entityKind] = "SingleStoreSmallIntBuilder";
constructor(name, config) {
super(name, "number", "SingleStoreSmallInt");
this.config.unsigned = config ? config.unsigned : false;
}
/** @internal */
build(table) {
return new SingleStoreSmallInt(
table,
this.config
);
}
}
class SingleStoreSmallInt extends import_common.SingleStoreColumnWithAutoIncrement {
static [import_entity.entityKind] = "SingleStoreSmallInt";
getSQLType() {
return `smallint${this.config.unsigned ? " unsigned" : ""}`;
}
mapFromDriverValue(value) {
if (typeof value === "string") {
return Number(value);
}
return value;
}
}
function smallint(a, b) {
const { name, config } = (0, import_utils.getColumnNameAndConfig)(a, b);
return new SingleStoreSmallIntBuilder(name, config);
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
SingleStoreSmallInt,
SingleStoreSmallIntBuilder,
smallint
});
//# sourceMappingURL=smallint.cjs.map

View File

@@ -0,0 +1,9 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
import{useLexicalComposerContext as t}from"@lexical/react/LexicalComposerContext";import{mergeRegister as e,$getNearestBlockElementAncestorOrThrow as n,$filter as r}from"@lexical/utils";import{KEY_TAB_COMMAND as o,$getSelection as c,$isRangeSelection as i,OUTDENT_CONTENT_COMMAND as s,INDENT_CONTENT_COMMAND as a,INSERT_TAB_COMMAND as m,COMMAND_PRIORITY_EDITOR as u,COMMAND_PRIORITY_CRITICAL as l,$isBlockElementNode as f,$createRangeSelection as d,$normalizeSelection__EXPERIMENTAL as p}from"lexical";import{useEffect as g}from"react";function x(t,g){return e(t.registerCommand(o,(e=>{const o=c();if(!i(o))return!1;e.preventDefault();const u=function(t){const e=t.getNodes();if(r(e,(t=>f(t)&&t.canIndent()?t:null)).length>0)return!0;const o=t.anchor,c=t.focus,i=c.isBefore(o)?c:o,s=i.getNode(),a=n(s);if(a.canIndent()){const t=a.getKey();let e=d();if(e.anchor.set(t,0,"element"),e.focus.set(t,0,"element"),e=p(e),e.anchor.is(i))return!0}return!1}(o)?e.shiftKey?s:a:m;return t.dispatchCommand(u,void 0)}),u),t.registerCommand(a,(()=>{if(null==g)return!1;const t=c();if(!i(t))return!1;const e=t.getNodes().map((t=>n(t).getIndent()));return Math.max(...e)+1>=g}),l))}function h({maxIndent:e}){const[n]=t();return g((()=>x(n,e)),[n,e]),null}export{h as TabIndentationPlugin,x as registerTabIndentation};

View File

@@ -0,0 +1,315 @@
/// <reference types="node" resolution-mode="require"/>
export type ConfigType = 'number' | 'string' | 'boolean';
/**
* Given a Jack object, get the typeof its ConfigSet
*/
export type Unwrap<J> = J extends Jack<infer C> ? C : never;
import { inspect, InspectOptions } from 'node:util';
/**
* Defines the type of value that is valid, given a config definition's
* {@link ConfigType} and boolean multiple setting
*/
export type ValidValue<T extends ConfigType = ConfigType, M extends boolean = boolean> = [
T,
M
] extends ['number', true] ? number[] : [T, M] extends ['string', true] ? string[] : [T, M] extends ['boolean', true] ? boolean[] : [T, M] extends ['number', false] ? number : [T, M] extends ['string', false] ? string : [T, M] extends ['boolean', false] ? boolean : [T, M] extends ['string', boolean] ? string | string[] : [T, M] extends ['boolean', boolean] ? boolean | boolean[] : [T, M] extends ['number', boolean] ? number | number[] : [T, M] extends [ConfigType, false] ? string | number | boolean : [T, M] extends [ConfigType, true] ? string[] | number[] | boolean[] : string | number | boolean | string[] | number[] | boolean[];
/**
* The meta information for a config option definition, when the
* type and multiple values can be inferred by the method being used
*/
export type ConfigOptionMeta<T extends ConfigType, M extends boolean = boolean, O extends undefined | (T extends 'boolean' ? never : T extends 'string' ? readonly string[] : T extends 'number' ? readonly number[] : readonly number[] | readonly string[]) = undefined | (T extends 'boolean' ? never : T extends 'string' ? readonly string[] : T extends 'number' ? readonly number[] : readonly number[] | readonly string[])> = {
default?: undefined | (ValidValue<T, M> & (O extends number[] | string[] ? M extends false ? O[number] : O[number][] : unknown));
validOptions?: O;
description?: string;
validate?: ((v: unknown) => v is ValidValue<T, M>) | ((v: unknown) => boolean);
short?: string | undefined;
type?: T;
hint?: T extends 'boolean' ? never : string;
delim?: M extends true ? string : never;
} & (M extends false ? {
multiple?: false | undefined;
} : M extends true ? {
multiple: true;
} : {
multiple?: boolean;
});
/**
* A set of {@link ConfigOptionMeta} fields, referenced by their longOption
* string values.
*/
export type ConfigMetaSet<T extends ConfigType, M extends boolean = boolean> = {
[longOption: string]: ConfigOptionMeta<T, M>;
};
/**
* Infer {@link ConfigSet} fields from a given {@link ConfigMetaSet}
*/
export type ConfigSetFromMetaSet<T extends ConfigType, M extends boolean, S extends ConfigMetaSet<T, M>> = {
[longOption in keyof S]: ConfigOptionBase<T, M>;
};
/**
* Fields that can be set on a {@link ConfigOptionBase} or
* {@link ConfigOptionMeta} based on whether or not the field is known to be
* multiple.
*/
export type MultiType<M extends boolean> = M extends true ? {
multiple: true;
delim?: string | undefined;
} : M extends false ? {
multiple?: false | undefined;
delim?: undefined;
} : {
multiple?: boolean | undefined;
delim?: string | undefined;
};
/**
* A config field definition, in its full representation.
*/
export type ConfigOptionBase<T extends ConfigType, M extends boolean = boolean> = {
type: T;
short?: string | undefined;
default?: ValidValue<T, M> | undefined;
description?: string;
hint?: T extends 'boolean' ? undefined : string | undefined;
validate?: (v: unknown) => v is ValidValue<T, M>;
validOptions?: T extends 'boolean' ? undefined : T extends 'string' ? readonly string[] : T extends 'number' ? readonly number[] : readonly number[] | readonly string[];
} & MultiType<M>;
export declare const isConfigType: (t: string) => t is ConfigType;
export declare const isConfigOption: <T extends ConfigType, M extends boolean>(o: any, type: T, multi: M) => o is ConfigOptionBase<T, M>;
/**
* A set of {@link ConfigOptionBase} objects, referenced by their longOption
* string values.
*/
export type ConfigSet = {
[longOption: string]: ConfigOptionBase<ConfigType>;
};
/**
* The 'values' field returned by {@link Jack#parse}
*/
export type OptionsResults<T extends ConfigSet> = {
[k in keyof T]?: T[k]['validOptions'] extends (readonly string[] | readonly number[]) ? T[k] extends ConfigOptionBase<'string' | 'number', false> ? T[k]['validOptions'][number] : T[k] extends ConfigOptionBase<'string' | 'number', true> ? T[k]['validOptions'][number][] : never : T[k] extends ConfigOptionBase<'string', false> ? string : T[k] extends ConfigOptionBase<'string', true> ? string[] : T[k] extends ConfigOptionBase<'number', false> ? number : T[k] extends ConfigOptionBase<'number', true> ? number[] : T[k] extends ConfigOptionBase<'boolean', false> ? boolean : T[k] extends ConfigOptionBase<'boolean', true> ? boolean[] : never;
};
/**
* The object retured by {@link Jack#parse}
*/
export type Parsed<T extends ConfigSet> = {
values: OptionsResults<T>;
positionals: string[];
};
/**
* A row used when generating the {@link Jack#usage} string
*/
export interface Row {
left?: string;
text: string;
skipLine?: boolean;
type?: string;
}
/**
* A heading for a section in the usage, created by the jack.heading()
* method.
*
* First heading is always level 1, subsequent headings default to 2.
*
* The level of the nearest heading level sets the indentation of the
* description that follows.
*/
export interface Heading extends Row {
type: 'heading';
text: string;
left?: '';
skipLine?: boolean;
level: number;
pre?: boolean;
}
/**
* An arbitrary blob of text describing some stuff, set by the
* jack.description() method.
*
* Indentation determined by level of the nearest header.
*/
export interface Description extends Row {
type: 'description';
text: string;
left?: '';
skipLine?: boolean;
pre?: boolean;
}
/**
* A heading or description row used when generating the {@link Jack#usage}
* string
*/
export type TextRow = Heading | Description;
/**
* Either a {@link TextRow} or a reference to a {@link ConfigOptionBase}
*/
export type UsageField = TextRow | {
type: 'config';
name: string;
value: ConfigOptionBase<ConfigType>;
};
/**
* Options provided to the {@link Jack} constructor
*/
export interface JackOptions {
/**
* Whether to allow positional arguments
*
* @default true
*/
allowPositionals?: boolean;
/**
* Prefix to use when reading/writing the environment variables
*
* If not specified, environment behavior will not be available.
*/
envPrefix?: string;
/**
* Environment object to read/write. Defaults `process.env`.
* No effect if `envPrefix` is not set.
*/
env?: {
[k: string]: string | undefined;
};
/**
* A short usage string. If not provided, will be generated from the
* options provided, but that can of course be rather verbose if
* there are a lot of options.
*/
usage?: string;
/**
* Stop parsing flags and opts at the first positional argument.
* This is to support cases like `cmd [flags] <subcmd> [options]`, where
* each subcommand may have different options. This effectively treats
* any positional as a `--` argument. Only relevant if `allowPositionals`
* is true.
*
* To do subcommands, set this option, look at the first positional, and
* parse the remaining positionals as appropriate.
*
* @default false
*/
stopAtPositional?: boolean;
/**
* Conditional `stopAtPositional`. If set to a `(string)=>boolean` function,
* will be called with each positional argument encountered. If the function
* returns true, then parsing will stop at that point.
*/
stopAtPositionalTest?: (arg: string) => boolean;
}
/**
* Class returned by the {@link jack} function and all configuration
* definition methods. This is what gets chained together.
*/
export declare class Jack<C extends ConfigSet = {}> {
#private;
constructor(options?: JackOptions);
/**
* Set the default value (which will still be overridden by env or cli)
* as if from a parsed config file. The optional `source` param, if
* provided, will be included in error messages if a value is invalid or
* unknown.
*/
setConfigValues(values: OptionsResults<C>, source?: string): this;
/**
* Parse a string of arguments, and return the resulting
* `{ values, positionals }` object.
*
* If an {@link JackOptions#envPrefix} is set, then it will read default
* values from the environment, and write the resulting values back
* to the environment as well.
*
* Environment values always take precedence over any other value, except
* an explicit CLI setting.
*/
parse(args?: string[]): Parsed<C>;
loadEnvDefaults(): void;
applyDefaults(p: Parsed<C>): void;
/**
* Only parse the command line arguments passed in.
* Does not strip off the `node script.js` bits, so it must be just the
* arguments you wish to have parsed.
* Does not read from or write to the environment, or set defaults.
*/
parseRaw(args: string[]): Parsed<C>;
/**
* Validate that any arbitrary object is a valid configuration `values`
* object. Useful when loading config files or other sources.
*/
validate(o: unknown): asserts o is Parsed<C>['values'];
writeEnv(p: Parsed<C>): void;
/**
* Add a heading to the usage output banner
*/
heading(text: string, level?: 1 | 2 | 3 | 4 | 5 | 6, { pre }?: {
pre?: boolean;
}): Jack<C>;
/**
* Add a long-form description to the usage output at this position.
*/
description(text: string, { pre }?: {
pre?: boolean;
}): Jack<C>;
/**
* Add one or more number fields.
*/
num<F extends ConfigMetaSet<'number', false>>(fields: F): Jack<C & ConfigSetFromMetaSet<'number', false, F>>;
/**
* Add one or more multiple number fields.
*/
numList<F extends ConfigMetaSet<'number'>>(fields: F): Jack<C & ConfigSetFromMetaSet<'number', true, F>>;
/**
* Add one or more string option fields.
*/
opt<F extends ConfigMetaSet<'string', false>>(fields: F): Jack<C & ConfigSetFromMetaSet<'string', false, F>>;
/**
* Add one or more multiple string option fields.
*/
optList<F extends ConfigMetaSet<'string'>>(fields: F): Jack<C & ConfigSetFromMetaSet<'string', true, F>>;
/**
* Add one or more flag fields.
*/
flag<F extends ConfigMetaSet<'boolean', false>>(fields: F): Jack<C & ConfigSetFromMetaSet<'boolean', false, F>>;
/**
* Add one or more multiple flag fields.
*/
flagList<F extends ConfigMetaSet<'boolean'>>(fields: F): Jack<C & ConfigSetFromMetaSet<'boolean', true, F>>;
/**
* Generic field definition method. Similar to flag/flagList/number/etc,
* but you must specify the `type` (and optionally `multiple` and `delim`)
* fields on each one, or Jack won't know how to define them.
*/
addFields<F extends ConfigSet>(fields: F): Jack<C & F>;
/**
* Return the usage banner for the given configuration
*/
usage(): string;
/**
* Return the usage banner markdown for the given configuration
*/
usageMarkdown(): string;
/**
* Return the configuration options as a plain object
*/
toJSON(): {
[k: string]: {
hint?: string | undefined;
default?: string | number | boolean | string[] | number[] | boolean[] | undefined;
validOptions?: readonly number[] | readonly string[] | undefined;
validate?: ((v: unknown) => v is string | number | boolean | string[] | number[] | boolean[]) | undefined;
description?: string | undefined;
short?: string | undefined;
delim?: string | undefined;
multiple?: boolean | undefined;
type: ConfigType;
};
};
/**
* Custom printer for `util.inspect`
*/
[inspect.custom](_: number, options: InspectOptions): string;
}
/**
* Main entry point. Create and return a {@link Jack} object.
*/
export declare const jack: (options?: JackOptions) => Jack<{}>;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,272 @@
import { entityKind, is } from "../entity.js";
import { SelectionProxyHandler } from "../selection-proxy.js";
import { getTableColumns } from "../utils.js";
import { QueryBuilder } from "./query-builders/query-builder.js";
import { pgTable } from "./table.js";
import { PgViewBase } from "./view-base.js";
import { PgViewConfig } from "./view-common.js";
class DefaultViewBuilderCore {
constructor(name, schema) {
this.name = name;
this.schema = schema;
}
static [entityKind] = "PgDefaultViewBuilderCore";
config = {};
with(config) {
this.config.with = config;
return this;
}
}
class ViewBuilder extends DefaultViewBuilderCore {
static [entityKind] = "PgViewBuilder";
as(qb) {
if (typeof qb === "function") {
qb = qb(new QueryBuilder());
}
const selectionProxy = new SelectionProxyHandler({
alias: this.name,
sqlBehavior: "error",
sqlAliasedBehavior: "alias",
replaceOriginalName: true
});
const aliasedSelection = new Proxy(qb.getSelectedFields(), selectionProxy);
return new Proxy(
new PgView({
pgConfig: this.config,
config: {
name: this.name,
schema: this.schema,
selectedFields: aliasedSelection,
query: qb.getSQL().inlineParams()
}
}),
selectionProxy
);
}
}
class ManualViewBuilder extends DefaultViewBuilderCore {
static [entityKind] = "PgManualViewBuilder";
columns;
constructor(name, columns, schema) {
super(name, schema);
this.columns = getTableColumns(pgTable(name, columns));
}
existing() {
return new Proxy(
new PgView({
pgConfig: void 0,
config: {
name: this.name,
schema: this.schema,
selectedFields: this.columns,
query: void 0
}
}),
new SelectionProxyHandler({
alias: this.name,
sqlBehavior: "error",
sqlAliasedBehavior: "alias",
replaceOriginalName: true
})
);
}
as(query) {
return new Proxy(
new PgView({
pgConfig: this.config,
config: {
name: this.name,
schema: this.schema,
selectedFields: this.columns,
query: query.inlineParams()
}
}),
new SelectionProxyHandler({
alias: this.name,
sqlBehavior: "error",
sqlAliasedBehavior: "alias",
replaceOriginalName: true
})
);
}
}
class MaterializedViewBuilderCore {
constructor(name, schema) {
this.name = name;
this.schema = schema;
}
static [entityKind] = "PgMaterializedViewBuilderCore";
config = {};
using(using) {
this.config.using = using;
return this;
}
with(config) {
this.config.with = config;
return this;
}
tablespace(tablespace) {
this.config.tablespace = tablespace;
return this;
}
withNoData() {
this.config.withNoData = true;
return this;
}
}
class MaterializedViewBuilder extends MaterializedViewBuilderCore {
static [entityKind] = "PgMaterializedViewBuilder";
as(qb) {
if (typeof qb === "function") {
qb = qb(new QueryBuilder());
}
const selectionProxy = new SelectionProxyHandler({
alias: this.name,
sqlBehavior: "error",
sqlAliasedBehavior: "alias",
replaceOriginalName: true
});
const aliasedSelection = new Proxy(qb.getSelectedFields(), selectionProxy);
return new Proxy(
new PgMaterializedView({
pgConfig: {
with: this.config.with,
using: this.config.using,
tablespace: this.config.tablespace,
withNoData: this.config.withNoData
},
config: {
name: this.name,
schema: this.schema,
selectedFields: aliasedSelection,
query: qb.getSQL().inlineParams()
}
}),
selectionProxy
);
}
}
class ManualMaterializedViewBuilder extends MaterializedViewBuilderCore {
static [entityKind] = "PgManualMaterializedViewBuilder";
columns;
constructor(name, columns, schema) {
super(name, schema);
this.columns = getTableColumns(pgTable(name, columns));
}
existing() {
return new Proxy(
new PgMaterializedView({
pgConfig: {
tablespace: this.config.tablespace,
using: this.config.using,
with: this.config.with,
withNoData: this.config.withNoData
},
config: {
name: this.name,
schema: this.schema,
selectedFields: this.columns,
query: void 0
}
}),
new SelectionProxyHandler({
alias: this.name,
sqlBehavior: "error",
sqlAliasedBehavior: "alias",
replaceOriginalName: true
})
);
}
as(query) {
return new Proxy(
new PgMaterializedView({
pgConfig: {
tablespace: this.config.tablespace,
using: this.config.using,
with: this.config.with,
withNoData: this.config.withNoData
},
config: {
name: this.name,
schema: this.schema,
selectedFields: this.columns,
query: query.inlineParams()
}
}),
new SelectionProxyHandler({
alias: this.name,
sqlBehavior: "error",
sqlAliasedBehavior: "alias",
replaceOriginalName: true
})
);
}
}
class PgView extends PgViewBase {
static [entityKind] = "PgView";
[PgViewConfig];
constructor({ pgConfig, config }) {
super(config);
if (pgConfig) {
this[PgViewConfig] = {
with: pgConfig.with
};
}
}
}
const PgMaterializedViewConfig = Symbol.for("drizzle:PgMaterializedViewConfig");
class PgMaterializedView extends PgViewBase {
static [entityKind] = "PgMaterializedView";
[PgMaterializedViewConfig];
constructor({ pgConfig, config }) {
super(config);
this[PgMaterializedViewConfig] = {
with: pgConfig?.with,
using: pgConfig?.using,
tablespace: pgConfig?.tablespace,
withNoData: pgConfig?.withNoData
};
}
}
function pgViewWithSchema(name, selection, schema) {
if (selection) {
return new ManualViewBuilder(name, selection, schema);
}
return new ViewBuilder(name, schema);
}
function pgMaterializedViewWithSchema(name, selection, schema) {
if (selection) {
return new ManualMaterializedViewBuilder(name, selection, schema);
}
return new MaterializedViewBuilder(name, schema);
}
function pgView(name, columns) {
return pgViewWithSchema(name, columns, void 0);
}
function pgMaterializedView(name, columns) {
return pgMaterializedViewWithSchema(name, columns, void 0);
}
function isPgView(obj) {
return is(obj, PgView);
}
function isPgMaterializedView(obj) {
return is(obj, PgMaterializedView);
}
export {
DefaultViewBuilderCore,
ManualMaterializedViewBuilder,
ManualViewBuilder,
MaterializedViewBuilder,
MaterializedViewBuilderCore,
PgMaterializedView,
PgMaterializedViewConfig,
PgView,
ViewBuilder,
isPgMaterializedView,
isPgView,
pgMaterializedView,
pgMaterializedViewWithSchema,
pgView,
pgViewWithSchema
};
//# sourceMappingURL=view.js.map

View File

@@ -0,0 +1,123 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.createEmptySection = createEmptySection;
var _wasmGen = require("@webassemblyjs/wasm-gen");
var _helperBuffer = require("@webassemblyjs/helper-buffer");
var _helperWasmBytecode = _interopRequireDefault(require("@webassemblyjs/helper-wasm-bytecode"));
var t = _interopRequireWildcard(require("@webassemblyjs/ast"));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
function findLastSection(ast, forSection) {
var targetSectionId = _helperWasmBytecode["default"].sections[forSection]; // $FlowIgnore: metadata can not be empty
var moduleSections = ast.body[0].metadata.sections;
var lastSection;
var lastId = 0;
for (var i = 0, len = moduleSections.length; i < len; i++) {
var section = moduleSections[i]; // Ignore custom section since they can actually occur everywhere
if (section.section === "custom") {
continue;
}
var sectionId = _helperWasmBytecode["default"].sections[section.section];
if (targetSectionId > lastId && targetSectionId < sectionId) {
return lastSection;
}
lastId = sectionId;
lastSection = section;
}
return lastSection;
}
function createEmptySection(ast, uint8Buffer, section) {
// previous section after which we are going to insert our section
var lastSection = findLastSection(ast, section);
var start, end;
/**
* It's the first section
*/
if (lastSection == null || lastSection.section === "custom") {
start = 8
/* wasm header size */
;
end = start;
} else {
start = lastSection.startOffset + lastSection.size.value + 1;
end = start;
} // section id
start += 1;
var sizeStartLoc = {
line: -1,
column: start
};
var sizeEndLoc = {
line: -1,
column: start + 1
}; // 1 byte for the empty vector
var size = t.withLoc(t.numberLiteralFromRaw(1), sizeEndLoc, sizeStartLoc);
var vectorOfSizeStartLoc = {
line: -1,
column: sizeEndLoc.column
};
var vectorOfSizeEndLoc = {
line: -1,
column: sizeEndLoc.column + 1
};
var vectorOfSize = t.withLoc(t.numberLiteralFromRaw(0), vectorOfSizeEndLoc, vectorOfSizeStartLoc);
var sectionMetadata = t.sectionMetadata(section, start, size, vectorOfSize);
var sectionBytes = (0, _wasmGen.encodeNode)(sectionMetadata);
uint8Buffer = (0, _helperBuffer.overrideBytesInBuffer)(uint8Buffer, start - 1, end, sectionBytes); // Add section into the AST for later lookups
if (_typeof(ast.body[0].metadata) === "object") {
// $FlowIgnore: metadata can not be empty
ast.body[0].metadata.sections.push(sectionMetadata);
t.sortSectionMetadata(ast.body[0]);
}
/**
* Update AST
*/
// Once we hit our section every that is after needs to be shifted by the delta
var deltaBytes = +sectionBytes.length;
var encounteredSection = false;
t.traverse(ast, {
SectionMetadata: function SectionMetadata(path) {
if (path.node.section === section) {
encounteredSection = true;
return;
}
if (encounteredSection === true) {
t.shiftSection(ast, path.node, deltaBytes);
}
}
});
return {
uint8Buffer: uint8Buffer,
sectionMetadata: sectionMetadata
};
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"mic-vocal.js","sources":["../../../src/icons/mic-vocal.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name MicVocal\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtMTEgNy42MDEtNS45OTQgOC4xOWExIDEgMCAwIDAgLjEgMS4yOThsLjgxNy44MThhMSAxIDAgMCAwIDEuMzE0LjA4N0wxNS4wOSAxMiIgLz4KICA8cGF0aCBkPSJNMTYuNSAyMS4xNzRDMTUuNSAyMC41IDE0LjM3MiAyMCAxMyAyMGMtMi4wNTggMC0zLjkyOCAyLjM1Ni02IDItMi4wNzItLjM1Ni0yLjc3NS0zLjM2OS0xLjUtNC41IiAvPgogIDxjaXJjbGUgY3g9IjE2IiBjeT0iNyIgcj0iNSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/mic-vocal\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 MicVocal = createLucideIcon('MicVocal', [\n [\n 'path',\n {\n d: 'm11 7.601-5.994 8.19a1 1 0 0 0 .1 1.298l.817.818a1 1 0 0 0 1.314.087L15.09 12',\n key: '80a601',\n },\n ],\n [\n 'path',\n {\n d: 'M16.5 21.174C15.5 20.5 14.372 20 13 20c-2.058 0-3.928 2.356-6 2-2.072-.356-2.775-3.369-1.5-4.5',\n key: 'j0ngtp',\n },\n ],\n ['circle', { cx: '16', cy: '7', r: '5', key: 'd08jfb' }],\n]);\n\nexport default MicVocal;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,iBAAiB,UAAY,CAAA,CAAA,CAAA;AAAA,CAC5C,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CACA,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;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,CACA,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,GAAA,CAAK,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA;AACzD,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,227 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Natsu @xiaoxiaojx
*/
"use strict";
const { NormalModule } = require("..");
const ModuleNotFoundError = require("../ModuleNotFoundError");
const { parseResourceWithoutFragment } = require("../util/identifier");
/** @typedef {import("../Compiler")} Compiler */
/** @typedef {import("../NormalModule")} NormalModule */
/**
* @template T
* @typedef {import("../../declarations/LoaderContext").LoaderContext<T>} LoaderContext
*/
const PLUGIN_NAME = "VirtualUrlPlugin";
const DEFAULT_SCHEME = "virtual";
/** @typedef {(loaderContext: LoaderContext<EXPECTED_ANY>) => Promise<string | Buffer> | string | Buffer} SourceFn */
/** @typedef {() => string} VersionFn */
/**
* @typedef {object} VirtualModuleConfig
* @property {string=} type the module type
* @property {SourceFn} source the source function
* @property {VersionFn | true | string=} version optional version function or value
*/
/**
* @typedef {string | SourceFn | VirtualModuleConfig} VirtualModuleInput
*/
/** @typedef {{ [key: string]: VirtualModuleInput }} VirtualModules */
/**
* Normalizes a virtual module definition into a standard format
* @param {VirtualModuleInput} virtualConfig The virtual module to normalize
* @returns {VirtualModuleConfig} The normalized virtual module
*/
function normalizeModule(virtualConfig) {
if (typeof virtualConfig === "string") {
return {
type: "",
source() {
return virtualConfig;
}
};
} else if (typeof virtualConfig === "function") {
return {
type: "",
source: virtualConfig
};
}
return virtualConfig;
}
/** @typedef {{ [key: string]: VirtualModuleConfig }} NormalizedModules */
/**
* Normalizes all virtual modules with the given scheme
* @param {VirtualModules} virtualConfigs The virtual modules to normalize
* @param {string} scheme The URL scheme to use
* @returns {NormalizedModules} The normalized virtual modules
*/
function normalizeModules(virtualConfigs, scheme) {
return Object.keys(virtualConfigs).reduce((pre, id) => {
pre[toVid(id, scheme)] = normalizeModule(virtualConfigs[id]);
return pre;
}, /** @type {NormalizedModules} */ ({}));
}
/**
* Converts a module id and scheme to a virtual module id
* @param {string} id The module id
* @param {string} scheme The URL scheme
* @returns {string} The virtual module id
*/
function toVid(id, scheme) {
return `${scheme}:${id}`;
}
const VALUE_DEP_VERSION = `webpack/${PLUGIN_NAME}/version`;
/**
* Converts a module id and scheme to a cache key
* @param {string} id The module id
* @param {string} scheme The URL scheme
* @returns {string} The cache key
*/
function toCacheKey(id, scheme) {
return `${VALUE_DEP_VERSION}/${toVid(id, scheme)}`;
}
/**
* @typedef {object} VirtualUrlPluginOptions
* @property {VirtualModules} modules - The virtual modules
* @property {string=} scheme - The URL scheme to use
*/
class VirtualUrlPlugin {
/**
* @param {VirtualModules} modules The virtual modules
* @param {string=} scheme The URL scheme to use
*/
constructor(modules, scheme) {
/** @type {string} */
this.scheme = scheme || DEFAULT_SCHEME;
/** @type {NormalizedModules} */
this.modules = normalizeModules(modules, this.scheme);
}
/**
* Apply the plugin
* @param {Compiler} compiler the compiler instance
* @returns {void}
*/
apply(compiler) {
const scheme = this.scheme;
const cachedParseResourceWithoutFragment =
parseResourceWithoutFragment.bindCache(compiler.root);
compiler.hooks.compilation.tap(
PLUGIN_NAME,
(compilation, { normalModuleFactory }) => {
normalModuleFactory.hooks.resolveForScheme
.for(scheme)
.tap(PLUGIN_NAME, (resourceData) => {
const virtualConfig = this.findVirtualModuleConfigById(
resourceData.resource
);
const url = cachedParseResourceWithoutFragment(
resourceData.resource
);
const path = url.path;
const type = virtualConfig.type;
resourceData.path = path + type;
resourceData.resource = path;
resourceData.context = compiler.context;
if (virtualConfig.version) {
const cacheKey = toCacheKey(resourceData.resource, scheme);
const cacheVersion = this.getCacheVersion(virtualConfig.version);
compilation.valueCacheVersions.set(
cacheKey,
/** @type {string} */ (cacheVersion)
);
}
return true;
});
const hooks = NormalModule.getCompilationHooks(compilation);
hooks.readResource
.for(scheme)
.tapAsync(PLUGIN_NAME, async (loaderContext, callback) => {
const { resourcePath } = loaderContext;
const module = /** @type {NormalModule} */ (loaderContext._module);
const cacheKey = toCacheKey(resourcePath, scheme);
const addVersionValueDependency = () => {
if (!module || !module.buildInfo) return;
const buildInfo = module.buildInfo;
if (!buildInfo.valueDependencies) {
buildInfo.valueDependencies = new Map();
}
const cacheVersion = compilation.valueCacheVersions.get(cacheKey);
if (compilation.valueCacheVersions.has(cacheKey)) {
buildInfo.valueDependencies.set(
cacheKey,
/** @type {string} */ (cacheVersion)
);
}
};
try {
const virtualConfig =
this.findVirtualModuleConfigById(resourcePath);
const content = await virtualConfig.source(loaderContext);
addVersionValueDependency();
callback(null, content);
} catch (err) {
callback(/** @type {Error} */ (err));
}
});
}
);
}
/**
* @param {string} id The module id
* @returns {VirtualModuleConfig} The virtual module config
*/
findVirtualModuleConfigById(id) {
const config = this.modules[id];
if (!config) {
throw new ModuleNotFoundError(
null,
new Error(`Can't resolve virtual module ${id}`),
{
name: `virtual module ${id}`
}
);
}
return config;
}
/**
* Get the cache version for a given version value
* @param {VersionFn | true | string} version The version value or function
* @returns {string | undefined} The cache version
*/
getCacheVersion(version) {
return version === true
? undefined
: (typeof version === "function" ? version() : version) || "unset";
}
}
VirtualUrlPlugin.DEFAULT_SCHEME = DEFAULT_SCHEME;
module.exports = VirtualUrlPlugin;

View File

@@ -0,0 +1 @@
{"version":3,"file":"circle-gauge.js","sources":["../../../src/icons/circle-gauge.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name CircleGauge\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTUuNiAyLjdhMTAgMTAgMCAxIDAgNS43IDUuNyIgLz4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIyIiAvPgogIDxwYXRoIGQ9Ik0xMy40IDEwLjYgMTkgNSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/circle-gauge\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 CircleGauge = createLucideIcon('CircleGauge', [\n ['path', { d: 'M15.6 2.7a10 10 0 1 0 5.7 5.7', key: '1e0p6d' }],\n ['circle', { cx: '12', cy: '12', r: '2', key: '1c9p78' }],\n ['path', { d: 'M13.4 10.6 19 5', key: '1kr7tw' }],\n]);\n\nexport default CircleGauge;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAc,iBAAiB,aAAe,CAAA,CAAA,CAAA;AAAA,CAAA,CAClD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAiC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAC9D,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAmB,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;AAClD,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,27 @@
import { valueIsValueWithRelation } from 'payload/shared';
export const transformRelationship = ({ baseRow, data, field, relationships })=>{
const relations = Array.isArray(data) ? data : [
data
];
relations.forEach((relation, i)=>{
if (relation) {
const relationRow = {
...baseRow
};
if ('hasMany' in field && field.hasMany) {
relationRow.order = i + 1;
}
if (Array.isArray(field.relationTo) && valueIsValueWithRelation(relation)) {
relationRow[`${relation.relationTo}ID`] = relation.value;
relationships.push(relationRow);
} else if (typeof field.relationTo === 'string') {
relationRow[`${field.relationTo}ID`] = relation;
if (relation) {
relationships.push(relationRow);
}
}
}
});
};
//# sourceMappingURL=relationships.js.map

View File

@@ -0,0 +1,22 @@
import { DirectusPermission } from "../../../schema/permission.js";
import { RestCommand } from "../../types.js";
//#region src/rest/commands/delete/permissions.d.ts
/**
* Delete multiple existing permissions rules
* @param keys
* @returns
* @throws Will throw if keys is empty
*/
declare const deletePermissions: <Schema>(keys: DirectusPermission<Schema>["id"][]) => RestCommand<void, Schema>;
/**
* Delete an existing permissions rule
* @param key
* @returns
* @throws Will throw if key is empty
*/
declare const deletePermission: <Schema>(key: DirectusPermission<Schema>["id"]) => RestCommand<void, Schema>;
//#endregion
export { deletePermission, deletePermissions };
//# sourceMappingURL=permissions.d.ts.map

View File

@@ -0,0 +1,18 @@
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeFloor = Math.floor,
nativeRandom = Math.random;
/**
* The base implementation of `_.random` without support for returning
* floating-point numbers.
*
* @private
* @param {number} lower The lower bound.
* @param {number} upper The upper bound.
* @returns {number} Returns the random number.
*/
function baseRandom(lower, upper) {
return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
}
module.exports = baseRandom;

View File

@@ -0,0 +1 @@
{"version":3,"file":"ipAddress.js","sources":["../../../src/utils/ipAddress.ts"],"sourcesContent":["import type { Session, SessionAggregates } from '../types-hoist/session';\nimport type { User } from '../types-hoist/user';\n\n// By default, we want to infer the IP address, unless this is explicitly set to `null`\n// We do this after all other processing is done\n// If `ip_address` is explicitly set to `null` or a value, we leave it as is\n\n/**\n * @internal\n * @deprecated -- set ip inferral via via SDK metadata options on client instead.\n */\nexport function addAutoIpAddressToUser(objWithMaybeUser: { user?: User | null }): void {\n if (objWithMaybeUser.user?.ip_address === undefined) {\n objWithMaybeUser.user = {\n ...objWithMaybeUser.user,\n ip_address: '{{auto}}',\n };\n }\n}\n\n/**\n * @internal\n */\nexport function addAutoIpAddressToSession(session: Session | SessionAggregates): void {\n if ('aggregates' in session) {\n if (session.attrs?.['ip_address'] === undefined) {\n session.attrs = {\n ...session.attrs,\n ip_address: '{{auto}}',\n };\n }\n } else {\n if (session.ipAddress === undefined) {\n session.ipAddress = '{{auto}}';\n }\n }\n}\n"],"names":[],"mappings":"AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACO,SAAS,sBAAsB,CAAC,gBAAgB,EAAgC;AACvF,EAAE,IAAI,gBAAgB,CAAC,IAAI,EAAE,UAAA,KAAe,SAAS,EAAE;AACvD,IAAI,gBAAgB,CAAC,IAAA,GAAO;AAC5B,MAAM,GAAG,gBAAgB,CAAC,IAAI;AAC9B,MAAM,UAAU,EAAE,UAAU;AAC5B,KAAK;AACL,EAAE;AACF;;AAEA;AACA;AACA;AACO,SAAS,yBAAyB,CAAC,OAAO,EAAqC;AACtF,EAAE,IAAI,YAAA,IAAgB,OAAO,EAAE;AAC/B,IAAI,IAAI,OAAO,CAAC,KAAK,GAAG,YAAY,CAAA,KAAM,SAAS,EAAE;AACrD,MAAM,OAAO,CAAC,KAAA,GAAQ;AACtB,QAAQ,GAAG,OAAO,CAAC,KAAK;AACxB,QAAQ,UAAU,EAAE,UAAU;AAC9B,OAAO;AACP,IAAI;AACJ,EAAE,OAAO;AACT,IAAI,IAAI,OAAO,CAAC,SAAA,KAAc,SAAS,EAAE;AACzC,MAAM,OAAO,CAAC,SAAA,GAAY,UAAU;AACpC,IAAI;AACJ,EAAE;AACF;;;;"}

View File

@@ -0,0 +1,3 @@
import { GraphQLScalarType } from 'graphql';
export declare const IPV6_REGEX: RegExp;
export declare const GraphQLIPv6: GraphQLScalarType<string, string>;

View File

@@ -0,0 +1 @@
{"version":3,"file":"boom-box.js","sources":["../../../src/icons/boom-box.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name BoomBox\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNCA5VjVhMiAyIDAgMCAxIDItMmgxMmEyIDIgMCAwIDEgMiAydjQiIC8+CiAgPHBhdGggZD0iTTggOHYxIiAvPgogIDxwYXRoIGQ9Ik0xMiA4djEiIC8+CiAgPHBhdGggZD0iTTE2IDh2MSIgLz4KICA8cmVjdCB3aWR0aD0iMjAiIGhlaWdodD0iMTIiIHg9IjIiIHk9IjkiIHJ4PSIyIiAvPgogIDxjaXJjbGUgY3g9IjgiIGN5PSIxNSIgcj0iMiIgLz4KICA8Y2lyY2xlIGN4PSIxNiIgY3k9IjE1IiByPSIyIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/boom-box\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 BoomBox = createLucideIcon('BoomBox', [\n ['path', { d: 'M4 9V5a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v4', key: 'vvzvr1' }],\n ['path', { d: 'M8 8v1', key: 'xcqmfk' }],\n ['path', { d: 'M12 8v1', key: '1rj8u4' }],\n ['path', { d: 'M16 8v1', key: '1q12zr' }],\n ['rect', { width: '20', height: '12', x: '2', y: '9', rx: '2', key: 'igpb89' }],\n ['circle', { cx: '8', cy: '15', r: '2', key: 'fa4a8s' }],\n ['circle', { cx: '16', cy: '15', r: '2', key: '14c3ya' }],\n]);\n\nexport default BoomBox;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,iBAAiB,SAAW,CAAA,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA2C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CACxE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACvC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,MAAM,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,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,CAC9E,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,EAAK,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CACvD,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA;AAC1D,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,67 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.hasRef = void 0;
const compile_1 = require("../../compile");
const codegen_1 = require("../../compile/codegen");
const ref_error_1 = require("../../compile/ref_error");
const names_1 = require("../../compile/names");
const ref_1 = require("../core/ref");
const metadata_1 = require("./metadata");
const def = {
keyword: "ref",
schemaType: "string",
code(cxt) {
(0, metadata_1.checkMetadata)(cxt);
const { gen, data, schema: ref, parentSchema, it } = cxt;
const { schemaEnv: { root }, } = it;
const valid = gen.name("valid");
if (parentSchema.nullable) {
gen.var(valid, (0, codegen_1._) `${data} === null`);
gen.if((0, codegen_1.not)(valid), validateJtdRef);
}
else {
gen.var(valid, false);
validateJtdRef();
}
cxt.ok(valid);
function validateJtdRef() {
var _a;
const refSchema = (_a = root.schema.definitions) === null || _a === void 0 ? void 0 : _a[ref];
if (!refSchema) {
throw new ref_error_1.default(it.opts.uriResolver, "", ref, `No definition ${ref}`);
}
if (hasRef(refSchema) || !it.opts.inlineRefs)
callValidate(refSchema);
else
inlineRefSchema(refSchema);
}
function callValidate(schema) {
const sch = compile_1.compileSchema.call(it.self, new compile_1.SchemaEnv({ schema, root, schemaPath: `/definitions/${ref}` }));
const v = (0, ref_1.getValidate)(cxt, sch);
const errsCount = gen.const("_errs", names_1.default.errors);
(0, ref_1.callRef)(cxt, v, sch, sch.$async);
gen.assign(valid, (0, codegen_1._) `${errsCount} === ${names_1.default.errors}`);
}
function inlineRefSchema(schema) {
const schName = gen.scopeValue("schema", it.opts.code.source === true ? { ref: schema, code: (0, codegen_1.stringify)(schema) } : { ref: schema });
cxt.subschema({
schema,
dataTypes: [],
schemaPath: codegen_1.nil,
topSchemaRef: schName,
errSchemaPath: `/definitions/${ref}`,
}, valid);
}
},
};
function hasRef(schema) {
for (const key in schema) {
let sch;
if (key === "ref" || (typeof (sch = schema[key]) == "object" && hasRef(sch)))
return true;
}
return false;
}
exports.hasRef = hasRef;
exports.default = def;
//# sourceMappingURL=ref.js.map

View File

@@ -0,0 +1,45 @@
import { RequestEventData } from '../types-hoist/request';
import { WorkerLocation } from './misc';
import { SpanAttributes } from './span';
/**
* Context data passed by the user when starting a transaction, to be used by the tracesSampler method.
*/
export interface CustomSamplingContext {
[key: string]: any;
}
/**
* Auxiliary data for various sampling mechanisms in the Sentry SDK.
*/
export interface SamplingContext extends CustomSamplingContext {
/**
* Sampling decision from the parent transaction, if any.
*/
parentSampled?: boolean;
/**
* Sample rate that is coming from an incoming trace (if there is one).
*/
parentSampleRate?: number;
/**
* Object representing the URL of the current page or worker script. Passed by default when using the `BrowserTracing`
* integration.
*/
location?: WorkerLocation;
/**
* Object representing the incoming request to a node server in a normalized format.
*/
normalizedRequest?: RequestEventData;
/** The name of the span being sampled. */
name: string;
/** Initial attributes that have been passed to the span being sampled. */
attributes?: SpanAttributes;
}
/**
* Auxiliary data passed to the `tracesSampler` function.
*/
export interface TracesSamplerSamplingContext extends SamplingContext {
/**
* Returns a sample rate value that matches the sampling decision from the incoming trace, or falls back to the provided `fallbackSampleRate`.
*/
inheritOrSampleWith: (fallbackSampleRate: number) => number;
}
//# sourceMappingURL=samplingcontext.d.ts.map

View File

@@ -0,0 +1,103 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const DescriptionFileUtils = require("./DescriptionFileUtils");
const getInnerRequest = require("./getInnerRequest");
/** @typedef {import("./Resolver")} Resolver */
/** @typedef {import("./Resolver").JsonPrimitive} JsonPrimitive */
/** @typedef {import("./Resolver").ResolveRequest} ResolveRequest */
/** @typedef {import("./Resolver").ResolveStepHook} ResolveStepHook */
module.exports = class AliasFieldPlugin {
/**
* @param {string | ResolveStepHook} source source
* @param {string | string[]} field field
* @param {string | ResolveStepHook} target target
*/
constructor(source, field, target) {
this.source = source;
this.field = field;
this.target = target;
}
/**
* @param {Resolver} resolver the resolver
* @returns {void}
*/
apply(resolver) {
const target = resolver.ensureHook(this.target);
resolver
.getHook(this.source)
.tapAsync("AliasFieldPlugin", (request, resolveContext, callback) => {
if (!request.descriptionFileData) return callback();
const innerRequest = getInnerRequest(resolver, request);
if (!innerRequest) return callback();
const fieldData = DescriptionFileUtils.getField(
request.descriptionFileData,
this.field,
);
if (fieldData === null || typeof fieldData !== "object") {
if (resolveContext.log) {
resolveContext.log(
`Field '${this.field}' doesn't contain a valid alias configuration`,
);
}
return callback();
}
/** @type {JsonPrimitive | undefined} */
const data = Object.prototype.hasOwnProperty.call(
fieldData,
innerRequest,
)
? /** @type {{ [Key in string]: JsonPrimitive }} */ (fieldData)[
innerRequest
]
: innerRequest.startsWith("./")
? /** @type {{ [Key in string]: JsonPrimitive }} */ (fieldData)[
innerRequest.slice(2)
]
: undefined;
if (data === innerRequest) return callback();
if (data === undefined) return callback();
if (data === false) {
/** @type {ResolveRequest} */
const ignoreObj = {
...request,
path: false,
};
if (typeof resolveContext.yield === "function") {
resolveContext.yield(ignoreObj);
return callback(null, null);
}
return callback(null, ignoreObj);
}
/** @type {ResolveRequest} */
const obj = {
...request,
path: /** @type {string} */ (request.descriptionFileRoot),
request: /** @type {string} */ (data),
fullySpecified: false,
};
resolver.doResolve(
target,
obj,
`aliased from description file ${
request.descriptionFilePath
} with mapping '${innerRequest}' to '${/** @type {string} */ data}'`,
resolveContext,
(err, result) => {
if (err) return callback(err);
// Don't allow other aliasing or raw request
if (result === undefined) return callback(null, null);
callback(null, result);
},
);
});
}
};

View File

@@ -0,0 +1,42 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = validate;
exports.validateChild = validateChild;
exports.validateField = validateField;
exports.validateInternal = validateInternal;
var _index = require("../definitions/index.js");
function validate(node, key, val) {
if (!node) return;
const fields = _index.NODE_FIELDS[node.type];
if (!fields) return;
const field = fields[key];
validateField(node, key, val, field);
validateChild(node, key, val);
}
function validateInternal(field, node, key, val, maybeNode) {
if (!(field != null && field.validate)) return;
if (field.optional && val == null) return;
field.validate(node, key, val);
if (maybeNode) {
var _NODE_PARENT_VALIDATI;
const type = val.type;
if (type == null) return;
(_NODE_PARENT_VALIDATI = _index.NODE_PARENT_VALIDATIONS[type]) == null || _NODE_PARENT_VALIDATI.call(_index.NODE_PARENT_VALIDATIONS, node, key, val);
}
}
function validateField(node, key, val, field) {
if (!(field != null && field.validate)) return;
if (field.optional && val == null) return;
field.validate(node, key, val);
}
function validateChild(node, key, val) {
var _NODE_PARENT_VALIDATI2;
const type = val == null ? void 0 : val.type;
if (type == null) return;
(_NODE_PARENT_VALIDATI2 = _index.NODE_PARENT_VALIDATIONS[type]) == null || _NODE_PARENT_VALIDATI2.call(_index.NODE_PARENT_VALIDATIONS, node, key, val);
}
//# sourceMappingURL=validate.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/database/migrations/readMigrationFiles.ts"],"sourcesContent":["import fs from 'fs'\nimport path from 'path'\n\nimport type { Payload } from '../../index.js'\nimport type { Migration } from '../types.js'\n\nimport { dynamicImport } from '../../utilities/dynamicImport.js'\n\n/**\n * Read the migration files from disk\n */\nexport const readMigrationFiles = async ({\n payload,\n}: {\n payload: Payload\n}): Promise<Migration[]> => {\n if (!fs.existsSync(payload.db.migrationDir)) {\n payload.logger.error({\n msg: `No migration directory found at ${payload.db.migrationDir}`,\n })\n return []\n }\n\n payload.logger.info({\n msg: `Reading migration files from ${payload.db.migrationDir}`,\n })\n\n const files = fs\n .readdirSync(payload.db.migrationDir)\n .sort()\n .filter((f) => {\n return (f.endsWith('.ts') || f.endsWith('.js')) && f !== 'index.js' && f !== 'index.ts'\n })\n .map((file) => {\n return path.resolve(payload.db.migrationDir, file)\n })\n\n return Promise.all(\n files.map(async (filePath) => {\n const migrationModule = await dynamicImport<\n | {\n default: Migration\n }\n | Migration\n >(filePath)\n const migration = 'default' in migrationModule ? migrationModule.default : migrationModule\n\n const result: Migration = {\n name: path.basename(filePath).split('.')[0]!,\n down: migration.down,\n up: migration.up,\n }\n\n return result\n }),\n )\n}\n"],"names":["fs","path","dynamicImport","readMigrationFiles","payload","existsSync","db","migrationDir","logger","error","msg","info","files","readdirSync","sort","filter","f","endsWith","map","file","resolve","Promise","all","filePath","migrationModule","migration","default","result","name","basename","split","down","up"],"mappings":"AAAA,OAAOA,QAAQ,KAAI;AACnB,OAAOC,UAAU,OAAM;AAKvB,SAASC,aAAa,QAAQ,mCAAkC;AAEhE;;CAEC,GACD,OAAO,MAAMC,qBAAqB,OAAO,EACvCC,OAAO,EAGR;IACC,IAAI,CAACJ,GAAGK,UAAU,CAACD,QAAQE,EAAE,CAACC,YAAY,GAAG;QAC3CH,QAAQI,MAAM,CAACC,KAAK,CAAC;YACnBC,KAAK,CAAC,gCAAgC,EAAEN,QAAQE,EAAE,CAACC,YAAY,EAAE;QACnE;QACA,OAAO,EAAE;IACX;IAEAH,QAAQI,MAAM,CAACG,IAAI,CAAC;QAClBD,KAAK,CAAC,6BAA6B,EAAEN,QAAQE,EAAE,CAACC,YAAY,EAAE;IAChE;IAEA,MAAMK,QAAQZ,GACXa,WAAW,CAACT,QAAQE,EAAE,CAACC,YAAY,EACnCO,IAAI,GACJC,MAAM,CAAC,CAACC;QACP,OAAO,AAACA,CAAAA,EAAEC,QAAQ,CAAC,UAAUD,EAAEC,QAAQ,CAAC,MAAK,KAAMD,MAAM,cAAcA,MAAM;IAC/E,GACCE,GAAG,CAAC,CAACC;QACJ,OAAOlB,KAAKmB,OAAO,CAAChB,QAAQE,EAAE,CAACC,YAAY,EAAEY;IAC/C;IAEF,OAAOE,QAAQC,GAAG,CAChBV,MAAMM,GAAG,CAAC,OAAOK;QACf,MAAMC,kBAAkB,MAAMtB,cAK5BqB;QACF,MAAME,YAAY,aAAaD,kBAAkBA,gBAAgBE,OAAO,GAAGF;QAE3E,MAAMG,SAAoB;YACxBC,MAAM3B,KAAK4B,QAAQ,CAACN,UAAUO,KAAK,CAAC,IAAI,CAAC,EAAE;YAC3CC,MAAMN,UAAUM,IAAI;YACpBC,IAAIP,UAAUO,EAAE;QAClB;QAEA,OAAOL;IACT;AAEJ,EAAC"}

View File

@@ -0,0 +1,228 @@
"use strict";
exports.localize = void 0;
var _index = require("../../_lib/buildLocalizeFn.cjs");
const eraValues = {
narrow: ["да н.э.", "н.э."],
abbreviated: ["да н. э.", "н. э."],
wide: ["да нашай эры", "нашай эры"],
};
const quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["1-ы кв.", "2-і кв.", "3-і кв.", "4-ы кв."],
wide: ["1-ы квартал", "2-і квартал", "3-і квартал", "4-ы квартал"],
};
const monthValues = {
narrow: ["С", "Л", "С", "К", "Т", "Ч", "Л", "Ж", "В", "К", "Л", "С"],
abbreviated: [
"студз.",
"лют.",
"сак.",
"крас.",
"трав.",
"чэрв.",
"ліп.",
"жн.",
"вер.",
"кастр.",
"ліст.",
"сьнеж.",
],
wide: [
"студзень",
"люты",
"сакавік",
"красавік",
"травень",
"чэрвень",
"ліпень",
"жнівень",
"верасень",
"кастрычнік",
"лістапад",
"сьнежань",
],
};
const formattingMonthValues = {
narrow: ["С", "Л", "С", "К", "Т", "Ч", "Л", "Ж", "В", "К", "Л", "С"],
abbreviated: [
"студз.",
"лют.",
"сак.",
"крас.",
"трав.",
"чэрв.",
"ліп.",
"жн.",
"вер.",
"кастр.",
"ліст.",
"сьнеж.",
],
wide: [
"студзеня",
"лютага",
"сакавіка",
"красавіка",
"траўня",
"чэрвеня",
"ліпеня",
"жніўня",
"верасня",
"кастрычніка",
"лістапада",
"сьнежня",
],
};
const dayValues = {
narrow: ["Н", "П", "А", "С", "Ч", "П", "С"],
short: ["нд", "пн", "аў", "ср", "чц", "пт", "сб"],
abbreviated: ["нядз", "пан", "аўт", "сер", "чаць", "пят", "суб"],
wide: [
"нядзеля",
"панядзелак",
"аўторак",
"серада",
"чацьвер",
"пятніца",
"субота",
],
};
const dayPeriodValues = {
narrow: {
am: "ДП",
pm: "ПП",
midnight: "поўн.",
noon: "поўд.",
morning: "ран.",
afternoon: "дзень",
evening: "веч.",
night: "ноч",
},
abbreviated: {
am: "ДП",
pm: "ПП",
midnight: "поўн.",
noon: "поўд.",
morning: "ран.",
afternoon: "дзень",
evening: "веч.",
night: "ноч",
},
wide: {
am: "ДП",
pm: "ПП",
midnight: "поўнач",
noon: "поўдзень",
morning: "раніца",
afternoon: "дзень",
evening: "вечар",
night: "ноч",
},
};
const formattingDayPeriodValues = {
narrow: {
am: "ДП",
pm: "ПП",
midnight: "поўн.",
noon: "поўд.",
morning: "ран.",
afternoon: "дня",
evening: "веч.",
night: "ночы",
},
abbreviated: {
am: "ДП",
pm: "ПП",
midnight: "поўн.",
noon: "поўд.",
morning: "ран.",
afternoon: "дня",
evening: "веч.",
night: "ночы",
},
wide: {
am: "ДП",
pm: "ПП",
midnight: "поўнач",
noon: "поўдзень",
morning: "раніцы",
afternoon: "дня",
evening: "вечара",
night: "ночы",
},
};
const ordinalNumber = (dirtyNumber, options) => {
const unit = String(options?.unit);
const number = Number(dirtyNumber);
let suffix;
/** Though it's an incorrect ordinal form of a date we use it here for consistency with other similar locales (ru, uk)
* For date-month combinations should be used `d` formatter.
* Correct: `d MMMM` (4 верасня)
* Incorrect: `do MMMM` (4-га верасня)
*
* But following the consistency leads to mistakes for literal uses of `do` formatter (ordinal day of month).
* So for phrase "5th day of month" (`do дзень месяца`)
* library will produce: `5-га дзень месяца`
* but correct spelling should be: `5-ы дзень месяца`
*
* So I guess there should be a stand-alone and a formatting version of "day of month" formatters
*/
if (unit === "date") {
suffix = "-га";
} else if (unit === "hour" || unit === "minute" || unit === "second") {
suffix = "-я";
} else {
suffix =
(number % 10 === 2 || number % 10 === 3) &&
number % 100 !== 12 &&
number % 100 !== 13
? "-і"
: "-ы";
}
return number + suffix;
};
const localize = (exports.localize = {
ordinalNumber,
era: (0, _index.buildLocalizeFn)({
values: eraValues,
defaultWidth: "wide",
}),
quarter: (0, _index.buildLocalizeFn)({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: (quarter) => quarter - 1,
}),
month: (0, _index.buildLocalizeFn)({
values: monthValues,
defaultWidth: "wide",
formattingValues: formattingMonthValues,
defaultFormattingWidth: "wide",
}),
day: (0, _index.buildLocalizeFn)({
values: dayValues,
defaultWidth: "wide",
}),
dayPeriod: (0, _index.buildLocalizeFn)({
values: dayPeriodValues,
defaultWidth: "any",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide",
}),
});

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/sqlite-core/query-builders/index.ts"],"sourcesContent":["export * from './delete.ts';\nexport * from './insert.ts';\nexport * from './query-builder.ts';\nexport * from './select.ts';\nexport * from './select.types.ts';\nexport * from './update.ts';\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,mCAAc,wBAAd;AACA,mCAAc,wBADd;AAEA,mCAAc,+BAFd;AAGA,mCAAc,wBAHd;AAIA,mCAAc,8BAJd;AAKA,mCAAc,wBALd;","names":[]}

View File

@@ -0,0 +1,2 @@
export * from "./declarations/src/index";
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW1vdGlvbi11dGlscy5janMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4vZGVjbGFyYXRpb25zL3NyYy9pbmRleC5kLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBIn0=

View File

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

View File

@@ -0,0 +1,39 @@
import type { StaticDescription, StaticLabel } from 'payload';
import type { ChangeEvent, JSX } from 'react';
import type React from 'react';
import type { Option, ReactSelectAdapterProps } from '../../elements/ReactSelect/types.js';
export type SharedTextFieldProps = {
readonly hasMany?: false;
readonly onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
} | {
readonly hasMany?: true;
readonly onChange?: ReactSelectAdapterProps['onChange'];
};
export type TextInputProps = {
readonly AfterInput?: React.ReactNode;
readonly BeforeInput?: React.ReactNode;
readonly className?: string;
readonly Description?: React.ReactNode;
readonly description?: StaticDescription;
readonly Error?: React.ReactNode;
readonly htmlAttributes?: {
autoComplete?: JSX.IntrinsicElements['input']['autoComplete'];
};
readonly inputRef?: React.RefObject<HTMLInputElement>;
readonly Label?: React.ReactNode;
readonly label?: StaticLabel;
readonly localized?: boolean;
readonly maxRows?: number;
readonly minRows?: number;
readonly onKeyDown?: React.KeyboardEventHandler<HTMLInputElement>;
readonly path: string;
readonly placeholder?: Record<string, string> | string;
readonly readOnly?: boolean;
readonly required?: boolean;
readonly rtl?: boolean;
readonly showError?: boolean;
readonly style?: React.CSSProperties;
readonly value?: string;
readonly valueToRender?: Option[];
} & SharedTextFieldProps;
//# sourceMappingURL=types.d.ts.map

View File

@@ -0,0 +1,9 @@
/**
* @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.
*/
export { default } from './arrow-down-0-1.js';
//# sourceMappingURL=arrow-down-01.js.map

View File

@@ -0,0 +1,4 @@
// Needed for projects with `moduleResolution: 'node'`
import config from './dist/types/config';
export default config;

View File

@@ -0,0 +1,285 @@
import { createLocalReq, Forbidden } from '../index.js';
import { jobAfterRead, jobsCollectionSlug } from './config/collection.js';
import { handleSchedules } from './operations/handleSchedules/index.js';
import { runJobs } from './operations/runJobs/index.js';
import { updateJob, updateJobs } from './utilities/updateJob.js';
export const getJobsLocalAPI = (payload)=>({
handleSchedules: async (args)=>{
const newReq = args?.req ?? await createLocalReq({}, payload);
return await handleSchedules({
allQueues: args?.allQueues,
queue: args?.queue,
req: newReq
});
},
queue: async (args)=>{
const overrideAccess = args?.overrideAccess !== false;
const req = args.req ?? await createLocalReq({}, payload);
if (!overrideAccess) {
/**
* By default, jobsConfig.access.queue will be `defaultAccess` which is a function that returns `true` if the user is logged in.
*/ const accessFn = payload.config.jobs?.access?.queue ?? (()=>true);
const hasAccess = await accessFn({
req
});
if (!hasAccess) {
throw new Forbidden(req.t);
}
}
let queue = undefined;
// If user specifies queue, use that
if (args.queue) {
queue = args.queue;
} else if (args.workflow) {
// Otherwise, if there is a workflow specified, and it has a default queue to use,
// use that
const workflow = payload.config.jobs?.workflows?.find(({ slug })=>slug === args.workflow);
if (workflow?.queue) {
queue = workflow.queue;
}
}
const data = {
input: args.input
};
if (queue) {
data.queue = queue;
}
if (args.waitUntil) {
data.waitUntil = args.waitUntil?.toISOString();
}
if (args.workflow) {
data.workflowSlug = args.workflow;
}
if (args.task) {
data.taskSlug = args.task;
}
if (args.meta) {
data.meta = args.meta;
}
// Compute concurrency key from workflow or task config (only if feature is enabled)
if (payload.config.jobs?.enableConcurrencyControl) {
let concurrencyKey = null;
let supersedes = false;
const queueName = queue || 'default';
if (args.workflow) {
const workflow = payload.config.jobs?.workflows?.find(({ slug })=>slug === args.workflow);
if (workflow?.concurrency) {
const concurrencyConfig = workflow.concurrency;
if (typeof concurrencyConfig === 'function') {
concurrencyKey = concurrencyConfig({
input: args.input,
queue: queueName
});
} else {
concurrencyKey = concurrencyConfig.key({
input: args.input,
queue: queueName
});
supersedes = concurrencyConfig.supersedes ?? false;
}
}
} else if (args.task) {
const task = payload.config.jobs?.tasks?.find(({ slug })=>slug === args.task);
if (task?.concurrency) {
const concurrencyConfig = task.concurrency;
if (typeof concurrencyConfig === 'function') {
concurrencyKey = concurrencyConfig({
input: args.input,
queue: queueName
});
} else {
concurrencyKey = concurrencyConfig.key({
input: args.input,
queue: queueName
});
supersedes = concurrencyConfig.supersedes ?? false;
}
}
}
if (concurrencyKey) {
data.concurrencyKey = concurrencyKey;
// If supersedes is enabled, delete older pending jobs with the same key
if (supersedes) {
if (payload.config.jobs.runHooks) {
await payload.delete({
collection: jobsCollectionSlug,
depth: 0,
disableTransaction: true,
where: {
and: [
{
concurrencyKey: {
equals: concurrencyKey
}
},
{
processing: {
equals: false
}
},
{
completedAt: {
exists: false
}
}
]
}
});
} else {
await payload.db.deleteMany({
collection: jobsCollectionSlug,
req,
where: {
and: [
{
concurrencyKey: {
equals: concurrencyKey
}
},
{
processing: {
equals: false
}
},
{
completedAt: {
exists: false
}
}
]
}
});
}
}
}
}
// Type assertion is still needed here
if (payload?.config?.jobs?.depth || payload?.config?.jobs?.runHooks) {
return await payload.create({
collection: jobsCollectionSlug,
data,
depth: payload.config.jobs.depth ?? 0,
overrideAccess,
req
});
} else {
return jobAfterRead({
config: payload.config,
doc: await payload.db.create({
collection: jobsCollectionSlug,
data,
req
})
});
}
},
run: async (args)=>{
const newReq = args?.req ?? await createLocalReq({}, payload);
return await runJobs({
allQueues: args?.allQueues,
limit: args?.limit,
overrideAccess: args?.overrideAccess !== false,
processingOrder: args?.processingOrder,
queue: args?.queue,
req: newReq,
sequential: args?.sequential,
silent: args?.silent,
where: args?.where
});
},
runByID: async (args)=>{
const newReq = args.req ?? await createLocalReq({}, payload);
return await runJobs({
id: args.id,
overrideAccess: args.overrideAccess !== false,
req: newReq,
silent: args.silent
});
},
cancel: async (args)=>{
const req = args.req ?? await createLocalReq({}, payload);
const overrideAccess = args.overrideAccess !== false;
if (!overrideAccess) {
/**
* By default, jobsConfig.access.cancel will be `defaultAccess` which is a function that returns `true` if the user is logged in.
*/ const accessFn = payload.config.jobs?.access?.cancel ?? (()=>true);
const hasAccess = await accessFn({
req
});
if (!hasAccess) {
throw new Forbidden(req.t);
}
}
const and = [
args.where,
{
completedAt: {
exists: false
}
},
{
hasError: {
not_equals: true
}
}
];
if (args.queue) {
and.push({
queue: {
equals: args.queue
}
});
}
await updateJobs({
data: {
completedAt: null,
error: {
cancelled: true
},
hasError: true,
processing: false,
waitUntil: null
},
depth: 0,
disableTransaction: true,
req,
returning: false,
where: {
and
}
});
},
cancelByID: async (args)=>{
const req = args.req ?? await createLocalReq({}, payload);
const overrideAccess = args.overrideAccess !== false;
if (!overrideAccess) {
/**
* By default, jobsConfig.access.cancel will be `defaultAccess` which is a function that returns `true` if the user is logged in.
*/ const accessFn = payload.config.jobs?.access?.cancel ?? (()=>true);
const hasAccess = await accessFn({
req
});
if (!hasAccess) {
throw new Forbidden(req.t);
}
}
await updateJob({
id: args.id,
data: {
completedAt: null,
error: {
cancelled: true
},
hasError: true,
processing: false,
waitUntil: null
},
depth: 0,
disableTransaction: true,
req,
returning: false
});
}
});
//# sourceMappingURL=localAPI.js.map

View File

@@ -0,0 +1,121 @@
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true,
});
exports.inspect = inspect;
const MAX_ARRAY_LENGTH = 10;
const MAX_RECURSIVE_DEPTH = 2;
/**
* Used to print values in error messages.
*/
function inspect(value) {
return formatValue(value, []);
}
function formatValue(value, seenValues) {
switch (typeof value) {
case 'string':
return JSON.stringify(value);
case 'function':
return value.name ? `[function ${value.name}]` : '[function]';
case 'object':
return formatObjectValue(value, seenValues);
default:
return String(value);
}
}
function formatObjectValue(value, previouslySeenValues) {
if (value === null) {
return 'null';
}
if (previouslySeenValues.includes(value)) {
return '[Circular]';
}
const seenValues = [...previouslySeenValues, value];
if (isJSONable(value)) {
const jsonValue = value.toJSON(); // check for infinite recursion
if (jsonValue !== value) {
return typeof jsonValue === 'string'
? jsonValue
: formatValue(jsonValue, seenValues);
}
} else if (Array.isArray(value)) {
return formatArray(value, seenValues);
}
return formatObject(value, seenValues);
}
function isJSONable(value) {
return typeof value.toJSON === 'function';
}
function formatObject(object, seenValues) {
const entries = Object.entries(object);
if (entries.length === 0) {
return '{}';
}
if (seenValues.length > MAX_RECURSIVE_DEPTH) {
return '[' + getObjectTag(object) + ']';
}
const properties = entries.map(
([key, value]) => key + ': ' + formatValue(value, seenValues),
);
return '{ ' + properties.join(', ') + ' }';
}
function formatArray(array, seenValues) {
if (array.length === 0) {
return '[]';
}
if (seenValues.length > MAX_RECURSIVE_DEPTH) {
return '[Array]';
}
const len = Math.min(MAX_ARRAY_LENGTH, array.length);
const remaining = array.length - len;
const items = [];
for (let i = 0; i < len; ++i) {
items.push(formatValue(array[i], seenValues));
}
if (remaining === 1) {
items.push('... 1 more item');
} else if (remaining > 1) {
items.push(`... ${remaining} more items`);
}
return '[' + items.join(', ') + ']';
}
function getObjectTag(object) {
const tag = Object.prototype.toString
.call(object)
.replace(/^\[object /, '')
.replace(/]$/, '');
if (tag === 'Object' && typeof object.constructor === 'function') {
const name = object.constructor.name;
if (typeof name === 'string' && name !== '') {
return name;
}
}
return tag;
}

View File

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

View File

@@ -0,0 +1,3 @@
export * from 'drizzle-orm/relations';
//# sourceMappingURL=relations.js.map

View File

@@ -0,0 +1 @@
var p=Object.defineProperty;var e=(t,r)=>p(t,"name",{value:r,configurable:!0});import{createRequire as o}from"module";import a from"node:path";import{t as s}from"./temporary-directory-CwHp0_NW.mjs";var m=o(import.meta.url);const i=process.platform==="win32",n=e(t=>{const r=a.join(s,`${t}.pipe`);return i?`\\\\?\\pipe\\${r}`:r},"getPipePath");export{n as g,i,m as r};

View File

@@ -0,0 +1 @@
{"version":3,"file":"logout.cjs","names":["logoutData: LogoutOptions"],"sources":["../../../../src/rest/commands/auth/logout.ts"],"sourcesContent":["import type { LogoutOptions } from '../../../index.js';\nimport type { RestCommand } from '../../types.js';\n\n/**\n * Invalidate the refresh token thus destroying the user's session.\n *\n * @param options Optional logout settings.\n *\n * @returns Empty body.\n */\nexport const logout =\n\t<Schema>(options: LogoutOptions = {}): RestCommand<void, Schema> =>\n\t() => {\n\t\tconst logoutData: LogoutOptions = {\n\t\t\tmode: options.mode ?? 'cookie',\n\t\t};\n\n\t\tif (logoutData.mode === 'json' && options.refresh_token) {\n\t\t\tlogoutData['refresh_token'] = options.refresh_token;\n\t\t}\n\n\t\treturn {\n\t\t\tpath: '/auth/logout',\n\t\t\tmethod: 'POST',\n\t\t\tbody: JSON.stringify(logoutData),\n\t\t};\n\t};\n"],"mappings":"AAUA,MAAa,GACH,EAAyB,EAAE,OAC9B,CACL,IAAMA,EAA4B,CACjC,KAAM,EAAQ,MAAQ,SACtB,CAMD,OAJI,EAAW,OAAS,QAAU,EAAQ,gBACzC,EAAW,cAAmB,EAAQ,eAGhC,CACN,KAAM,eACN,OAAQ,OACR,KAAM,KAAK,UAAU,EAAW,CAChC"}

View File

@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _assertClassBrand;
function _assertClassBrand(brand, receiver, returnValue) {
if (typeof brand === "function" ? brand === receiver : brand.has(receiver)) {
return arguments.length < 3 ? receiver : returnValue;
}
throw new TypeError("Private element is not present on this object");
}
//# sourceMappingURL=assertClassBrand.js.map

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/collections/endpoints/find.ts"],"sourcesContent":["import { status as httpStatus } from 'http-status'\n\nimport type { PayloadHandler } from '../../config/types.js'\n\nimport { getRequestCollection } from '../../utilities/getRequestEntity.js'\nimport { headersWithCors } from '../../utilities/headersWithCors.js'\nimport { parseParams } from '../../utilities/parseParams/index.js'\nimport { findOperation } from '../operations/find.js'\n\nexport const findHandler: PayloadHandler = async (req) => {\n const collection = getRequestCollection(req)\n\n const { depth, draft, joins, limit, page, pagination, populate, select, sort, trash, where } =\n parseParams(req.query)\n\n const result = await findOperation({\n collection,\n depth,\n draft,\n joins,\n limit,\n page,\n pagination,\n populate,\n req,\n select,\n sort,\n trash,\n where,\n })\n\n return Response.json(result, {\n headers: headersWithCors({\n headers: new Headers(),\n req,\n }),\n status: httpStatus.OK,\n })\n}\n"],"names":["status","httpStatus","getRequestCollection","headersWithCors","parseParams","findOperation","findHandler","req","collection","depth","draft","joins","limit","page","pagination","populate","select","sort","trash","where","query","result","Response","json","headers","Headers","OK"],"mappings":"AAAA,SAASA,UAAUC,UAAU,QAAQ,cAAa;AAIlD,SAASC,oBAAoB,QAAQ,sCAAqC;AAC1E,SAASC,eAAe,QAAQ,qCAAoC;AACpE,SAASC,WAAW,QAAQ,uCAAsC;AAClE,SAASC,aAAa,QAAQ,wBAAuB;AAErD,OAAO,MAAMC,cAA8B,OAAOC;IAChD,MAAMC,aAAaN,qBAAqBK;IAExC,MAAM,EAAEE,KAAK,EAAEC,KAAK,EAAEC,KAAK,EAAEC,KAAK,EAAEC,IAAI,EAAEC,UAAU,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,IAAI,EAAEC,KAAK,EAAEC,KAAK,EAAE,GAC1Ff,YAAYG,IAAIa,KAAK;IAEvB,MAAMC,SAAS,MAAMhB,cAAc;QACjCG;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAC;QACAR;QACAS;QACAC;QACAC;QACAC;IACF;IAEA,OAAOG,SAASC,IAAI,CAACF,QAAQ;QAC3BG,SAASrB,gBAAgB;YACvBqB,SAAS,IAAIC;YACblB;QACF;QACAP,QAAQC,WAAWyB,EAAE;IACvB;AACF,EAAC"}

View File

@@ -0,0 +1,72 @@
'use client';
import { c as _c } from "react/compiler-runtime";
import { jsx as _jsx } from "react/jsx-runtime";
import React, { useState } from 'react';
const Context = /*#__PURE__*/React.createContext(null);
export const UploadHandlersProvider = t0 => {
const $ = _c(6);
const {
children
} = t0;
const [uploadHandlers, setUploadHandlers] = useState(_temp);
let t1;
if ($[0] !== uploadHandlers) {
t1 = t2 => {
const {
collectionSlug
} = t2;
return uploadHandlers.get(collectionSlug);
};
$[0] = uploadHandlers;
$[1] = t1;
} else {
t1 = $[1];
}
const getUploadHandler = t1;
let t2;
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
t2 = t3 => {
const {
collectionSlug: collectionSlug_0,
handler
} = t3;
setUploadHandlers(uploadHandlers_0 => {
const clone = new Map(uploadHandlers_0);
clone.set(collectionSlug_0, handler);
return clone;
});
};
$[2] = t2;
} else {
t2 = $[2];
}
const setUploadHandler = t2;
let t3;
if ($[3] !== children || $[4] !== getUploadHandler) {
t3 = _jsx(Context, {
value: {
getUploadHandler,
setUploadHandler
},
children
});
$[3] = children;
$[4] = getUploadHandler;
$[5] = t3;
} else {
t3 = $[5];
}
return t3;
};
export const useUploadHandlers = () => {
const context = React.use(Context);
if (context === null) {
throw new Error('useUploadHandlers must be used within UploadHandlersProvider');
}
return context;
};
function _temp() {
return new Map();
}
//# sourceMappingURL=index.js.map

View File

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

View File

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

View File

@@ -0,0 +1 @@
const e=require(`./utils/memory-storage.cjs`),t=require(`./composable.cjs`),n=require(`./static.cjs`);

View File

@@ -0,0 +1 @@
{"version":3,"file":"tornado.js","sources":["../../../src/icons/tornado.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Tornado\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMjEgNEgzIiAvPgogIDxwYXRoIGQ9Ik0xOCA4SDYiIC8+CiAgPHBhdGggZD0iTTE5IDEySDkiIC8+CiAgPHBhdGggZD0iTTE2IDE2aC02IiAvPgogIDxwYXRoIGQ9Ik0xMSAyMEg5IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/tornado\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 Tornado = createLucideIcon('Tornado', [\n ['path', { d: 'M21 4H3', key: '1hwok0' }],\n ['path', { d: 'M18 8H6', key: '41n648' }],\n ['path', { d: 'M19 12H9', key: '1g4lpz' }],\n ['path', { d: 'M16 16h-6', key: '1j5d54' }],\n ['path', { d: 'M11 20H9', key: '39obr8' }],\n]);\n\nexport default Tornado;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,iBAAiB,SAAW,CAAA,CAAA,CAAA;AAAA,CAAA,CAC1C,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,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3C,CAAC,CAAA,CAAA;;"}

View File

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

View File

@@ -0,0 +1,138 @@
/**
* Produce the GraphQL query recommended for a full schema introspection.
* Accepts optional IntrospectionOptions.
*/
export function getIntrospectionQuery(options) {
const optionsWithDefault = {
descriptions: true,
specifiedByUrl: false,
directiveIsRepeatable: false,
schemaDescription: false,
inputValueDeprecation: false,
oneOf: false,
...options,
};
const descriptions = optionsWithDefault.descriptions ? 'description' : '';
const specifiedByUrl = optionsWithDefault.specifiedByUrl
? 'specifiedByURL'
: '';
const directiveIsRepeatable = optionsWithDefault.directiveIsRepeatable
? 'isRepeatable'
: '';
const schemaDescription = optionsWithDefault.schemaDescription
? descriptions
: '';
function inputDeprecation(str) {
return optionsWithDefault.inputValueDeprecation ? str : '';
}
const oneOf = optionsWithDefault.oneOf ? 'isOneOf' : '';
return `
query IntrospectionQuery {
__schema {
${schemaDescription}
queryType { name kind }
mutationType { name kind }
subscriptionType { name kind }
types {
...FullType
}
directives {
name
${descriptions}
${directiveIsRepeatable}
locations
args${inputDeprecation('(includeDeprecated: true)')} {
...InputValue
}
}
}
}
fragment FullType on __Type {
kind
name
${descriptions}
${specifiedByUrl}
${oneOf}
fields(includeDeprecated: true) {
name
${descriptions}
args${inputDeprecation('(includeDeprecated: true)')} {
...InputValue
}
type {
...TypeRef
}
isDeprecated
deprecationReason
}
inputFields${inputDeprecation('(includeDeprecated: true)')} {
...InputValue
}
interfaces {
...TypeRef
}
enumValues(includeDeprecated: true) {
name
${descriptions}
isDeprecated
deprecationReason
}
possibleTypes {
...TypeRef
}
}
fragment InputValue on __InputValue {
name
${descriptions}
type { ...TypeRef }
defaultValue
${inputDeprecation('isDeprecated')}
${inputDeprecation('deprecationReason')}
}
fragment TypeRef on __Type {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
}
}
}
}
}
}
}
}
}
}
`;
}

View File

@@ -0,0 +1,192 @@
import { didYouMean } from '../jsutils/didYouMean.mjs';
import { inspect } from '../jsutils/inspect.mjs';
import { invariant } from '../jsutils/invariant.mjs';
import { isIterableObject } from '../jsutils/isIterableObject.mjs';
import { isObjectLike } from '../jsutils/isObjectLike.mjs';
import { addPath, pathToArray } from '../jsutils/Path.mjs';
import { printPathArray } from '../jsutils/printPathArray.mjs';
import { suggestionList } from '../jsutils/suggestionList.mjs';
import { GraphQLError } from '../error/GraphQLError.mjs';
import {
isInputObjectType,
isLeafType,
isListType,
isNonNullType,
} from '../type/definition.mjs';
/**
* Coerces a JavaScript value given a GraphQL Input Type.
*/
export function coerceInputValue(inputValue, type, onError = defaultOnError) {
return coerceInputValueImpl(inputValue, type, onError, undefined);
}
function defaultOnError(path, invalidValue, error) {
let errorPrefix = 'Invalid value ' + inspect(invalidValue);
if (path.length > 0) {
errorPrefix += ` at "value${printPathArray(path)}"`;
}
error.message = errorPrefix + ': ' + error.message;
throw error;
}
function coerceInputValueImpl(inputValue, type, onError, path) {
if (isNonNullType(type)) {
if (inputValue != null) {
return coerceInputValueImpl(inputValue, type.ofType, onError, path);
}
onError(
pathToArray(path),
inputValue,
new GraphQLError(
`Expected non-nullable type "${inspect(type)}" not to be null.`,
),
);
return;
}
if (inputValue == null) {
// Explicitly return the value null.
return null;
}
if (isListType(type)) {
const itemType = type.ofType;
if (isIterableObject(inputValue)) {
return Array.from(inputValue, (itemValue, index) => {
const itemPath = addPath(path, index, undefined);
return coerceInputValueImpl(itemValue, itemType, onError, itemPath);
});
} // Lists accept a non-list value as a list of one.
return [coerceInputValueImpl(inputValue, itemType, onError, path)];
}
if (isInputObjectType(type)) {
if (!isObjectLike(inputValue) || Array.isArray(inputValue)) {
onError(
pathToArray(path),
inputValue,
new GraphQLError(`Expected type "${type.name}" to be an object.`),
);
return;
}
const coercedValue = {};
const fieldDefs = type.getFields();
for (const field of Object.values(fieldDefs)) {
const fieldValue = inputValue[field.name];
if (fieldValue === undefined) {
if (field.defaultValue !== undefined) {
coercedValue[field.name] = field.defaultValue;
} else if (isNonNullType(field.type)) {
const typeStr = inspect(field.type);
onError(
pathToArray(path),
inputValue,
new GraphQLError(
`Field "${field.name}" of required type "${typeStr}" was not provided.`,
),
);
}
continue;
}
coercedValue[field.name] = coerceInputValueImpl(
fieldValue,
field.type,
onError,
addPath(path, field.name, type.name),
);
} // Ensure every provided field is defined.
for (const fieldName of Object.keys(inputValue)) {
if (!fieldDefs[fieldName]) {
const suggestions = suggestionList(
fieldName,
Object.keys(type.getFields()),
);
onError(
pathToArray(path),
inputValue,
new GraphQLError(
`Field "${fieldName}" is not defined by type "${type.name}".` +
didYouMean(suggestions),
),
);
}
}
if (type.isOneOf) {
const keys = Object.keys(coercedValue);
if (keys.length !== 1) {
onError(
pathToArray(path),
inputValue,
new GraphQLError(
`Exactly one key must be specified for OneOf type "${type.name}".`,
),
);
}
const key = keys[0];
const value = coercedValue[key];
if (value === null) {
onError(
pathToArray(path).concat(key),
value,
new GraphQLError(`Field "${key}" must be non-null.`),
);
}
}
return coercedValue;
}
if (isLeafType(type)) {
let parseResult; // Scalars and Enums determine if a input value is valid via parseValue(),
// which can throw to indicate failure. If it throws, maintain a reference
// to the original error.
try {
parseResult = type.parseValue(inputValue);
} catch (error) {
if (error instanceof GraphQLError) {
onError(pathToArray(path), inputValue, error);
} else {
onError(
pathToArray(path),
inputValue,
new GraphQLError(`Expected type "${type.name}". ` + error.message, {
originalError: error,
}),
);
}
return;
}
if (parseResult === undefined) {
onError(
pathToArray(path),
inputValue,
new GraphQLError(`Expected type "${type.name}".`),
);
}
return parseResult;
}
/* c8 ignore next 3 */
// Not reachable, all possible types have been considered.
false || invariant(false, 'Unexpected input type: ' + inspect(type));
}

View File

@@ -0,0 +1,26 @@
"use strict";
exports.previousSunday = previousSunday;
var _index = require("./previousDay.js");
/**
* @name previousSunday
* @category Weekday Helpers
* @summary When is the previous Sunday?
*
* @description
* When is the previous Sunday?
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param date - The date to start counting from
*
* @returns The previous Sunday
*
* @example
* // When is the previous Sunday before Jun, 21, 2021?
* const result = previousSunday(new Date(2021, 5, 21))
* //=> Sun June 20 2021 00:00:00
*/
function previousSunday(date) {
return (0, _index.previousDay)(date, 0);
}

View File

@@ -0,0 +1,31 @@
"use strict";
exports.frCH = void 0;
var _index = require("./fr/_lib/formatDistance.js");
var _index2 = require("./fr/_lib/localize.js");
var _index3 = require("./fr/_lib/match.js");
var _index4 = require("./fr-CH/_lib/formatLong.js");
var _index5 = require("./fr-CH/_lib/formatRelative.js"); // Same as fr
// Unique for fr-CH
/**
* @category Locales
* @summary French locale (Switzerland).
* @language French
* @iso-639-2 fra
* @author Jean Dupouy [@izeau](https://github.com/izeau)
* @author François B [@fbonzon](https://github.com/fbonzon)
* @author Van Vuong Ngo [@vanvuongngo](https://github.com/vanvuongngo)
* @author Alex Hoeing [@dcbn](https://github.com/dcbn)
*/
const frCH = (exports.frCH = {
code: "fr-CH",
formatDistance: _index.formatDistance,
formatLong: _index4.formatLong,
formatRelative: _index5.formatRelative,
localize: _index2.localize,
match: _index3.match,
options: {
weekStartsOn: 1 /* Monday */,
firstWeekContainsDate: 4,
},
});

View File

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

View File

@@ -0,0 +1,33 @@
import type { ContextOptions, DateArg } from "./types.js";
/**
* The {@link differenceInCalendarYears} function options.
*/
export interface DifferenceInCalendarYearsOptions
extends ContextOptions<Date> {}
/**
* @name differenceInCalendarYears
* @category Year Helpers
* @summary Get the number of calendar years between the given dates.
*
* @description
* Get the number of calendar years between the given dates.
*
* @param laterDate - The later date
* @param earlierDate - The earlier date
* @param options - An object with options
* @returns The number of calendar years
*
* @example
* // How many calendar years are between 31 December 2013 and 11 February 2015?
* const result = differenceInCalendarYears(
* new Date(2015, 1, 11),
* new Date(2013, 11, 31)
* );
* //=> 2
*/
export declare function differenceInCalendarYears(
laterDate: DateArg<Date> & {},
earlierDate: DateArg<Date> & {},
options?: DifferenceInCalendarYearsOptions | undefined,
): number;

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/forms/fieldSchemasToFormState/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,oBAAoB,EACpB,IAAI,EACJ,mBAAmB,EACnB,KAAK,EACL,cAAc,EACd,SAAS,EAET,cAAc,EACd,0BAA0B,EAC1B,UAAU,EACV,UAAU,EACX,MAAM,SAAS,CAAA;AAEhB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAGnD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAElD,KAAK,IAAI,GAAG;IACV;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,oBAAoB,CAAA;IAC3C,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,IAAI,CAAC,EAAE,IAAI,CAAA;IACX;;;;;;;;;;;;;;;OAeG;IACH,YAAY,CAAC,EAAE,IAAI,CAAA;IACnB,MAAM,EAAE,KAAK,EAAE,GAAG,SAAS,CAAA;IAC3B;;;;OAIG;IACH,cAAc,EAAE,cAAc,GAAG,SAAS,CAAA;IAC1C,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACpB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,IAAI,CAAA;IACvB,QAAQ,CAAC,EAAE,kBAAkB,CAAC,UAAU,CAAC,CAAA;IACzC,SAAS,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAA;IAC/B,WAAW,EAAE,0BAA0B,CAAA;IACvC,WAAW,EAAE,mBAAmB,CAAA;IAChC;;;OAGG;IACH,iBAAiB,CAAC,EAAE,SAAS,CAAA;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;;OAGG;IACH,eAAe,EAAE,OAAO,CAAA;IACxB,aAAa,CAAC,EAAE,iBAAiB,CAAA;IACjC,GAAG,EAAE,cAAc,CAAA;IACnB,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,CAAC,EAAE,UAAU,CAAA;IACnB,UAAU,CAAC,EAAE,UAAU,CAAA;IACvB,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB,CAAA;AAED,eAAO,MAAM,uBAAuB,iRAsBjC,IAAI,KAAG,OAAO,CAAC,SAAS,CAkE1B,CAAA;AAED,OAAO,EAAE,aAAa,EAAE,CAAA"}

View File

@@ -0,0 +1,77 @@
import OverloadYield from "./OverloadYield.js";
import regenerator from "./regenerator.js";
import regeneratorAsync from "./regeneratorAsync.js";
import regeneratorAsyncGen from "./regeneratorAsyncGen.js";
import regeneratorAsyncIterator from "./regeneratorAsyncIterator.js";
import regeneratorKeys from "./regeneratorKeys.js";
import regeneratorValues from "./regeneratorValues.js";
function _regeneratorRuntime() {
"use strict";
var r = regenerator(),
e = r.m(_regeneratorRuntime),
t = (Object.getPrototypeOf ? Object.getPrototypeOf(e) : e.__proto__).constructor;
function n(r) {
var e = "function" == typeof r && r.constructor;
return !!e && (e === t || "GeneratorFunction" === (e.displayName || e.name));
}
var o = {
"throw": 1,
"return": 2,
"break": 3,
"continue": 3
};
function a(r) {
var e, t;
return function (n) {
e || (e = {
stop: function stop() {
return t(n.a, 2);
},
"catch": function _catch() {
return n.v;
},
abrupt: function abrupt(r, e) {
return t(n.a, o[r], e);
},
delegateYield: function delegateYield(r, o, a) {
return e.resultName = o, t(n.d, regeneratorValues(r), a);
},
finish: function finish(r) {
return t(n.f, r);
}
}, t = function t(r, _t, o) {
n.p = e.prev, n.n = e.next;
try {
return r(_t, o);
} finally {
e.next = n.n;
}
}), e.resultName && (e[e.resultName] = n.v, e.resultName = void 0), e.sent = n.v, e.next = n.n;
try {
return r.call(this, e);
} finally {
n.p = e.prev, n.n = e.next;
}
};
}
return (_regeneratorRuntime = function _regeneratorRuntime() {
return {
wrap: function wrap(e, t, n, o) {
return r.w(a(e), t, n, o && o.reverse());
},
isGeneratorFunction: n,
mark: r.m,
awrap: function awrap(r, e) {
return new OverloadYield(r, e);
},
AsyncIterator: regeneratorAsyncIterator,
async: function async(r, e, t, o, u) {
return (n(e) ? regeneratorAsyncGen : regeneratorAsync)(a(r), e, t, o, u);
},
keys: regeneratorKeys,
values: regeneratorValues
};
})();
}
export { _regeneratorRuntime as default };

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,yBAAyB;AACzB,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAElC,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AACpC,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,GAAG,EAAE,CAAC;AAEf,eAAe,GAAG,CAAC;AAEnB,+BAA+B;AAC/B,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,OAAO,MAAM,CAAC,OAAO,KAAK,QAAQ,EAAE;IACpE,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;CACxE"}

View File

@@ -0,0 +1,102 @@
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { diag } from '@opentelemetry/api';
import { getNumberFromEnv, getStringFromEnv } from '@opentelemetry/core';
import { AlwaysOffSampler } from './sampler/AlwaysOffSampler';
import { AlwaysOnSampler } from './sampler/AlwaysOnSampler';
import { ParentBasedSampler } from './sampler/ParentBasedSampler';
import { TraceIdRatioBasedSampler } from './sampler/TraceIdRatioBasedSampler';
var TracesSamplerValues;
(function (TracesSamplerValues) {
TracesSamplerValues["AlwaysOff"] = "always_off";
TracesSamplerValues["AlwaysOn"] = "always_on";
TracesSamplerValues["ParentBasedAlwaysOff"] = "parentbased_always_off";
TracesSamplerValues["ParentBasedAlwaysOn"] = "parentbased_always_on";
TracesSamplerValues["ParentBasedTraceIdRatio"] = "parentbased_traceidratio";
TracesSamplerValues["TraceIdRatio"] = "traceidratio";
})(TracesSamplerValues || (TracesSamplerValues = {}));
const DEFAULT_RATIO = 1;
/**
* Load default configuration. For fields with primitive values, any user-provided
* value will override the corresponding default value. For fields with
* non-primitive values (like `spanLimits`), the user-provided value will be
* used to extend the default value.
*/
// object needs to be wrapped in this function and called when needed otherwise
// envs are parsed before tests are ran - causes tests using these envs to fail
export function loadDefaultConfig() {
return {
sampler: buildSamplerFromEnv(),
forceFlushTimeoutMillis: 30000,
generalLimits: {
attributeValueLengthLimit: getNumberFromEnv('OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT') ?? Infinity,
attributeCountLimit: getNumberFromEnv('OTEL_ATTRIBUTE_COUNT_LIMIT') ?? 128,
},
spanLimits: {
attributeValueLengthLimit: getNumberFromEnv('OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT') ?? Infinity,
attributeCountLimit: getNumberFromEnv('OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT') ?? 128,
linkCountLimit: getNumberFromEnv('OTEL_SPAN_LINK_COUNT_LIMIT') ?? 128,
eventCountLimit: getNumberFromEnv('OTEL_SPAN_EVENT_COUNT_LIMIT') ?? 128,
attributePerEventCountLimit: getNumberFromEnv('OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT') ?? 128,
attributePerLinkCountLimit: getNumberFromEnv('OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT') ?? 128,
},
};
}
/**
* Based on environment, builds a sampler, complies with specification.
*/
export function buildSamplerFromEnv() {
const sampler = getStringFromEnv('OTEL_TRACES_SAMPLER') ??
TracesSamplerValues.ParentBasedAlwaysOn;
switch (sampler) {
case TracesSamplerValues.AlwaysOn:
return new AlwaysOnSampler();
case TracesSamplerValues.AlwaysOff:
return new AlwaysOffSampler();
case TracesSamplerValues.ParentBasedAlwaysOn:
return new ParentBasedSampler({
root: new AlwaysOnSampler(),
});
case TracesSamplerValues.ParentBasedAlwaysOff:
return new ParentBasedSampler({
root: new AlwaysOffSampler(),
});
case TracesSamplerValues.TraceIdRatio:
return new TraceIdRatioBasedSampler(getSamplerProbabilityFromEnv());
case TracesSamplerValues.ParentBasedTraceIdRatio:
return new ParentBasedSampler({
root: new TraceIdRatioBasedSampler(getSamplerProbabilityFromEnv()),
});
default:
diag.error(`OTEL_TRACES_SAMPLER value "${sampler}" invalid, defaulting to "${TracesSamplerValues.ParentBasedAlwaysOn}".`);
return new ParentBasedSampler({
root: new AlwaysOnSampler(),
});
}
}
function getSamplerProbabilityFromEnv() {
const probability = getNumberFromEnv('OTEL_TRACES_SAMPLER_ARG');
if (probability == null) {
diag.error(`OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${DEFAULT_RATIO}.`);
return DEFAULT_RATIO;
}
if (probability < 0 || probability > 1) {
diag.error(`OTEL_TRACES_SAMPLER_ARG=${probability} was given, but it is out of range ([0..1]), defaulting to ${DEFAULT_RATIO}.`);
return DEFAULT_RATIO;
}
return probability;
}
//# sourceMappingURL=config.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"integration.js","sources":["../../../../../../../src/integrations/featureFlags/growthbook/integration.ts"],"sourcesContent":["import type { IntegrationFn } from '@sentry/core';\nimport { growthbookIntegration as coreGrowthbookIntegration } from '@sentry/core';\nimport type { GrowthBookClass } from './types';\n\n/**\n * Sentry integration for capturing feature flag evaluations from GrowthBook.\n *\n * See the feature flag documentation: https://develop.sentry.dev/sdk/expected-features/#feature-flags\n *\n * @example\n * ```\n * import { GrowthBook } from '@growthbook/growthbook';\n * import * as Sentry from '@sentry/browser';\n *\n * Sentry.init({\n * dsn: '___PUBLIC_DSN___',\n * integrations: [Sentry.growthbookIntegration({ growthbookClass: GrowthBook })],\n * });\n *\n * const gb = new GrowthBook();\n * gb.isOn('my-feature');\n * Sentry.captureException(new Error('something went wrong'));\n * ```\n */\nexport const growthbookIntegration = (({ growthbookClass }: { growthbookClass: GrowthBookClass }) =>\n coreGrowthbookIntegration({ growthbookClass })) satisfies IntegrationFn;\n"],"names":["coreGrowthbookIntegration"],"mappings":";;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,yBAAyB,CAAC,EAAE,eAAA,EAAiB;AAC1D,EAAEA,uBAAyB,CAAC,EAAE,eAAA,EAAiB,CAAC,CAAA;;;;"}

View File

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

View File

@@ -0,0 +1,49 @@
import type { ColumnBuilderBaseConfig } from "../../column-builder.cjs";
import type { ColumnBaseConfig } from "../../column.cjs";
import { entityKind } from "../../entity.cjs";
import { type Equal } from "../../utils.cjs";
import { MySqlDateBaseColumn, MySqlDateColumnBaseBuilder } from "./date.common.cjs";
export type MySqlTimestampBuilderInitial<TName extends string> = MySqlTimestampBuilder<{
name: TName;
dataType: 'date';
columnType: 'MySqlTimestamp';
data: Date;
driverParam: string | number;
enumValues: undefined;
}>;
export declare class MySqlTimestampBuilder<T extends ColumnBuilderBaseConfig<'date', 'MySqlTimestamp'>> extends MySqlDateColumnBaseBuilder<T, MySqlTimestampConfig> {
static readonly [entityKind]: string;
constructor(name: T['name'], config: MySqlTimestampConfig | undefined);
}
export declare class MySqlTimestamp<T extends ColumnBaseConfig<'date', 'MySqlTimestamp'>> extends MySqlDateBaseColumn<T, MySqlTimestampConfig> {
static readonly [entityKind]: string;
readonly fsp: number | undefined;
getSQLType(): string;
mapFromDriverValue(value: string): Date;
mapToDriverValue(value: Date): string;
}
export type MySqlTimestampStringBuilderInitial<TName extends string> = MySqlTimestampStringBuilder<{
name: TName;
dataType: 'string';
columnType: 'MySqlTimestampString';
data: string;
driverParam: string | number;
enumValues: undefined;
}>;
export declare class MySqlTimestampStringBuilder<T extends ColumnBuilderBaseConfig<'string', 'MySqlTimestampString'>> extends MySqlDateColumnBaseBuilder<T, MySqlTimestampConfig> {
static readonly [entityKind]: string;
constructor(name: T['name'], config: MySqlTimestampConfig | undefined);
}
export declare class MySqlTimestampString<T extends ColumnBaseConfig<'string', 'MySqlTimestampString'>> extends MySqlDateBaseColumn<T, MySqlTimestampConfig> {
static readonly [entityKind]: string;
readonly fsp: number | undefined;
getSQLType(): string;
}
export type TimestampFsp = 0 | 1 | 2 | 3 | 4 | 5 | 6;
export interface MySqlTimestampConfig<TMode extends 'string' | 'date' = 'string' | 'date'> {
mode?: TMode;
fsp?: TimestampFsp;
}
export declare function timestamp(): MySqlTimestampBuilderInitial<''>;
export declare function timestamp<TMode extends MySqlTimestampConfig['mode'] & {}>(config?: MySqlTimestampConfig<TMode>): Equal<TMode, 'string'> extends true ? MySqlTimestampStringBuilderInitial<''> : MySqlTimestampBuilderInitial<''>;
export declare function timestamp<TName extends string, TMode extends MySqlTimestampConfig['mode'] & {}>(name: TName, config?: MySqlTimestampConfig<TMode>): Equal<TMode, 'string'> extends true ? MySqlTimestampStringBuilderInitial<TName> : MySqlTimestampBuilderInitial<TName>;

View File

@@ -0,0 +1,5 @@
'use strict';
var truncate = require("./lib/truncate");
var getLength = Buffer.byteLength.bind(Buffer);
module.exports = truncate.bind(null, getLength);

View File

@@ -0,0 +1,8 @@
import type { ClientField, CollectionConfig, CollectionPreferences, Field } from 'payload';
/**
* Returns the initial columns to display in the table based on the following criteria:
* 1. If `defaultColumns` is set in the collection config, use those columns
* 2. Otherwise take `useAtTitle, if set, and the next 3 fields that are not hidden or disabled
*/
export declare const getInitialColumns: <T extends ClientField[] | Field[]>(fields: T, useAsTitle: CollectionConfig["admin"]["useAsTitle"], defaultColumns: CollectionConfig["admin"]["defaultColumns"]) => CollectionPreferences["columns"];
//# sourceMappingURL=getInitialColumns.d.ts.map

View File

@@ -0,0 +1,117 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const worldwide = require('./utils/worldwide.js');
/** Keys are source filename/url, values are metadata objects. */
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const filenameMetadataMap = new Map();
/** Set of stack strings that have already been parsed. */
const parsedStacks = new Set();
/**
* Builds a map of filenames to module metadata from the global _sentryModuleMetadata object.
* This is useful for forwarding metadata from web workers to the main thread.
*
* @param parser - Stack parser to use for extracting filenames from stack traces
* @returns A map of filename to metadata object
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function getFilenameToMetadataMap(parser) {
if (!worldwide.GLOBAL_OBJ._sentryModuleMetadata) {
return {};
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const filenameMap = {};
for (const stack of Object.keys(worldwide.GLOBAL_OBJ._sentryModuleMetadata)) {
const metadata = worldwide.GLOBAL_OBJ._sentryModuleMetadata[stack];
const frames = parser(stack);
for (const frame of frames.reverse()) {
if (frame.filename) {
filenameMap[frame.filename] = metadata;
break;
}
}
}
return filenameMap;
}
function ensureMetadataStacksAreParsed(parser) {
if (!worldwide.GLOBAL_OBJ._sentryModuleMetadata) {
return;
}
for (const stack of Object.keys(worldwide.GLOBAL_OBJ._sentryModuleMetadata)) {
const metadata = worldwide.GLOBAL_OBJ._sentryModuleMetadata[stack];
if (parsedStacks.has(stack)) {
continue;
}
// Ensure this stack doesn't get parsed again
parsedStacks.add(stack);
const frames = parser(stack);
// Go through the frames starting from the top of the stack and find the first one with a filename
for (const frame of frames.reverse()) {
if (frame.filename) {
// Save the metadata for this filename
filenameMetadataMap.set(frame.filename, metadata);
break;
}
}
}
}
/**
* Retrieve metadata for a specific JavaScript file URL.
*
* Metadata is injected by the Sentry bundler plugins using the `_experiments.moduleMetadata` config option.
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function getMetadataForUrl(parser, filename) {
ensureMetadataStacksAreParsed(parser);
return filenameMetadataMap.get(filename);
}
/**
* Adds metadata to stack frames.
*
* Metadata is injected by the Sentry bundler plugins using the `_experiments.moduleMetadata` config option.
*/
function addMetadataToStackFrames(parser, event) {
event.exception?.values?.forEach(exception => {
exception.stacktrace?.frames?.forEach(frame => {
if (!frame.filename || frame.module_metadata) {
return;
}
const metadata = getMetadataForUrl(parser, frame.filename);
if (metadata) {
frame.module_metadata = metadata;
}
});
});
}
/**
* Strips metadata from stack frames.
*/
function stripMetadataFromStackFrames(event) {
event.exception?.values?.forEach(exception => {
exception.stacktrace?.frames?.forEach(frame => {
delete frame.module_metadata;
});
});
}
exports.addMetadataToStackFrames = addMetadataToStackFrames;
exports.getFilenameToMetadataMap = getFilenameToMetadataMap;
exports.getMetadataForUrl = getMetadataForUrl;
exports.stripMetadataFromStackFrames = stripMetadataFromStackFrames;
//# sourceMappingURL=metadata.js.map

View File

@@ -0,0 +1,30 @@
import { formatDistance } from "./cs/_lib/formatDistance.mjs";
import { formatLong } from "./cs/_lib/formatLong.mjs";
import { formatRelative } from "./cs/_lib/formatRelative.mjs";
import { localize } from "./cs/_lib/localize.mjs";
import { match } from "./cs/_lib/match.mjs";
/**
* @category Locales
* @summary Czech locale.
* @language Czech
* @iso-639-2 ces
* @author David Rus [@davidrus](https://github.com/davidrus)
* @author Pavel Hrách [@SilenY](https://github.com/SilenY)
* @author Jozef Bíroš [@JozefBiros](https://github.com/JozefBiros)
*/
export const cs = {
code: "cs",
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
options: {
weekStartsOn: 1 /* Monday */,
firstWeekContainsDate: 4,
},
};
// Fallback for modularized imports:
export default cs;

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"addMemoryEntry.d.ts","sourceRoot":"","sources":["../../../../src/util/addMemoryEntry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAc,eAAe,EAA0B,MAAM,UAAU,CAAC;AAWpG;;;GAGG;AACH,wBAAsB,cAAc,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,KAAK,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC,CAanG"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"pattern.d.ts","sourceRoot":"","sources":["../../src/pattern.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AACpC,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,QAAQ,CAAA;AAGzD,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,SAAS,EAAE,CAAC,CAAA;AAC9D,MAAM,MAAM,cAAc,GAAG;IAC3B,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,EAAE;IACN,EAAE,EAAE,MAAM;IACV,EAAE,EAAE,MAAM;IACV,GAAG,IAAI,EAAE,SAAS,EAAE;CACrB,CAAA;AACD,MAAM,MAAM,gBAAgB,GAAG,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,SAAS,EAAE,CAAC,CAAA;AACjE,MAAM,MAAM,mBAAmB,GAAG,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,IAAI,EAAE,SAAS,EAAE,CAAC,CAAA;AAChE,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,CAAC,CAAA;AAMrD;;;GAGG;AACH,qBAAa,OAAO;;IAIlB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;gBAUrB,WAAW,EAAE,SAAS,EAAE,EACxB,QAAQ,EAAE,MAAM,EAAE,EAClB,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,CAAC,QAAQ;IA6D3B;;OAEG;IACH,OAAO,IAAI,SAAS;IAIpB;;OAEG;IACH,QAAQ,IAAI,OAAO;IAGnB;;OAEG;IACH,UAAU,IAAI,OAAO;IAGrB;;OAEG;IACH,QAAQ,IAAI,OAAO;IAInB;;OAEG;IACH,UAAU,IAAI,MAAM;IAUpB;;OAEG;IACH,OAAO,IAAI,OAAO;IAIlB;;OAEG;IACH,IAAI,IAAI,OAAO,GAAG,IAAI;IAetB;;OAEG;IACH,KAAK,IAAI,OAAO;IAoBhB;;OAEG;IACH,OAAO,IAAI,OAAO;IAelB;;OAEG;IACH,UAAU,IAAI,OAAO;IAUrB;;OAEG;IACH,IAAI,IAAI,MAAM;IASd;;;OAGG;IACH,mBAAmB,IAAI,OAAO;IAQ9B;;OAEG;IACH,kBAAkB,IAAI,OAAO;CAM9B"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"chart-area.js","sources":["../../../src/icons/chart-area.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ChartArea\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMyAzdjE2YTIgMiAwIDAgMCAyIDJoMTYiIC8+CiAgPHBhdGggZD0iTTcgMTEuMjA3YS41LjUgMCAwIDEgLjE0Ni0uMzUzbDItMmEuNS41IDAgMCAxIC43MDggMGwzLjI5MiAzLjI5MmEuNS41IDAgMCAwIC43MDggMGw0LjI5Mi00LjI5MmEuNS41IDAgMCAxIC44NTQuMzUzVjE2YTEgMSAwIDAgMS0xIDFIOGExIDEgMCAwIDEtMS0xeiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/chart-area\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 ChartArea = createLucideIcon('ChartArea', [\n ['path', { d: 'M3 3v16a2 2 0 0 0 2 2h16', key: 'c24i48' }],\n [\n 'path',\n {\n d: 'M7 11.207a.5.5 0 0 1 .146-.353l2-2a.5.5 0 0 1 .708 0l3.292 3.292a.5.5 0 0 0 .708 0l4.292-4.292a.5.5 0 0 1 .854.353V16a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1z',\n key: 'q0gr47',\n },\n ],\n]);\n\nexport default ChartArea;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,iBAAiB,WAAa,CAAA,CAAA,CAAA;AAAA,CAAA,CAC9C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA4B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CACzD,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA;AACF,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,77 @@
import { ColumnBuilder } from "../../column-builder.js";
import { Column } from "../../column.js";
import { entityKind } from "../../entity.js";
import { ForeignKeyBuilder } from "../foreign-keys.js";
import { uniqueKeyName } from "../unique-constraint.js";
class MySqlColumnBuilder extends ColumnBuilder {
static [entityKind] = "MySqlColumnBuilder";
foreignKeyConfigs = [];
references(ref, actions = {}) {
this.foreignKeyConfigs.push({ ref, actions });
return this;
}
unique(name) {
this.config.isUnique = true;
this.config.uniqueName = name;
return this;
}
generatedAlwaysAs(as, config) {
this.config.generated = {
as,
type: "always",
mode: config?.mode ?? "virtual"
};
return this;
}
/** @internal */
buildForeignKeys(column, table) {
return this.foreignKeyConfigs.map(({ ref, actions }) => {
return ((ref2, actions2) => {
const builder = new ForeignKeyBuilder(() => {
const foreignColumn = ref2();
return { columns: [column], foreignColumns: [foreignColumn] };
});
if (actions2.onUpdate) {
builder.onUpdate(actions2.onUpdate);
}
if (actions2.onDelete) {
builder.onDelete(actions2.onDelete);
}
return builder.build(table);
})(ref, actions);
});
}
}
class MySqlColumn extends Column {
constructor(table, config) {
if (!config.uniqueName) {
config.uniqueName = uniqueKeyName(table, [config.name]);
}
super(table, config);
this.table = table;
}
static [entityKind] = "MySqlColumn";
}
class MySqlColumnBuilderWithAutoIncrement extends MySqlColumnBuilder {
static [entityKind] = "MySqlColumnBuilderWithAutoIncrement";
constructor(name, dataType, columnType) {
super(name, dataType, columnType);
this.config.autoIncrement = false;
}
autoincrement() {
this.config.autoIncrement = true;
this.config.hasDefault = true;
return this;
}
}
class MySqlColumnWithAutoIncrement extends MySqlColumn {
static [entityKind] = "MySqlColumnWithAutoIncrement";
autoIncrement = this.config.autoIncrement;
}
export {
MySqlColumn,
MySqlColumnBuilder,
MySqlColumnBuilderWithAutoIncrement,
MySqlColumnWithAutoIncrement
};
//# sourceMappingURL=common.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"text-search.js","sources":["../../../src/icons/text-search.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name TextSearch\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMjEgNkgzIiAvPgogIDxwYXRoIGQ9Ik0xMCAxMkgzIiAvPgogIDxwYXRoIGQ9Ik0xMCAxOEgzIiAvPgogIDxjaXJjbGUgY3g9IjE3IiBjeT0iMTUiIHI9IjMiIC8+CiAgPHBhdGggZD0ibTIxIDE5LTEuOS0xLjkiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/text-search\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 TextSearch = createLucideIcon('TextSearch', [\n ['path', { d: 'M21 6H3', key: '1jwq7v' }],\n ['path', { d: 'M10 12H3', key: '1ulcyk' }],\n ['path', { d: 'M10 18H3', key: '13769t' }],\n ['circle', { cx: '17', cy: '15', r: '3', key: '1upz2a' }],\n ['path', { d: 'm21 19-1.9-1.9', key: 'dwi7p8' }],\n]);\n\nexport default TextSearch;\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,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,CAAA;AAAA,CACzC,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAkB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACjD,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,33 @@
"use strict";
exports.addSeconds = addSeconds;
var _index = require("./addMilliseconds.cjs");
/**
* The {@link addSeconds} function options.
*/
/**
* @name addSeconds
* @category Second Helpers
* @summary Add the specified number of seconds to the given date.
*
* @description
* Add the specified number of seconds to the given date.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
*
* @param date - The date to be changed
* @param amount - The amount of seconds to be added.
* @param options - An object with options
*
* @returns The new date with the seconds added
*
* @example
* // Add 30 seconds to 10 July 2014 12:45:00:
* const result = addSeconds(new Date(2014, 6, 10, 12, 45, 0), 30)
* //=> Thu Jul 10 2014 12:45:30
*/
function addSeconds(date, amount, options) {
return (0, _index.addMilliseconds)(date, amount * 1000, options);
}

View File

@@ -0,0 +1,33 @@
{
"name": "postgres-date",
"main": "index.js",
"version": "1.0.7",
"description": "Postgres date column parser",
"license": "MIT",
"repository": "bendrucker/postgres-date",
"author": {
"name": "Ben Drucker",
"email": "bvdrucker@gmail.com",
"url": "bendrucker.me"
},
"engines": {
"node": ">=0.10.0"
},
"scripts": {
"test": "standard && tape test.js"
},
"keywords": [
"postgres",
"date",
"parser"
],
"dependencies": {},
"devDependencies": {
"standard": "^14.0.0",
"tape": "^5.0.0"
},
"files": [
"index.js",
"readme.md"
]
}

View File

@@ -0,0 +1 @@
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).FloatingUIUtils={})}(this,(function(t){"use strict";const e=["top","right","bottom","left"],n=["start","end"],o=e.reduce(((t,e)=>t.concat(e,e+"-"+n[0],e+"-"+n[1])),[]),i=Math.min,r=Math.max,c=Math.round,u=Math.floor,f={left:"right",right:"left",bottom:"top",top:"bottom"},s={start:"end",end:"start"};function a(t){return t.split("-")[0]}function l(t){return t.split("-")[1]}function g(t){return"x"===t?"y":"x"}function p(t){return"y"===t?"height":"width"}const d=new Set(["top","bottom"]);function m(t){return d.has(a(t))?"y":"x"}function h(t){return g(m(t))}function x(t){return t.replace(/start|end/g,(t=>s[t]))}const b=["left","right"],y=["right","left"],A=["top","bottom"],O=["bottom","top"];function P(t){return t.replace(/left|right|bottom|top/g,(t=>f[t]))}function w(t){return{top:0,right:0,bottom:0,left:0,...t}}t.alignments=n,t.clamp=function(t,e,n){return r(t,i(e,n))},t.createCoords=t=>({x:t,y:t}),t.evaluate=function(t,e){return"function"==typeof t?t(e):t},t.expandPaddingObject=w,t.floor=u,t.getAlignment=l,t.getAlignmentAxis=h,t.getAlignmentSides=function(t,e,n){void 0===n&&(n=!1);const o=l(t),i=h(t),r=p(i);let c="x"===i?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return e.reference[r]>e.floating[r]&&(c=P(c)),[c,P(c)]},t.getAxisLength=p,t.getExpandedPlacements=function(t){const e=P(t);return[x(t),e,x(e)]},t.getOppositeAlignmentPlacement=x,t.getOppositeAxis=g,t.getOppositeAxisPlacements=function(t,e,n,o){const i=l(t);let r=function(t,e,n){switch(t){case"top":case"bottom":return n?e?y:b:e?b:y;case"left":case"right":return e?A:O;default:return[]}}(a(t),"start"===n,o);return i&&(r=r.map((t=>t+"-"+i)),e&&(r=r.concat(r.map(x)))),r},t.getOppositePlacement=P,t.getPaddingObject=function(t){return"number"!=typeof t?w(t):{top:t,right:t,bottom:t,left:t}},t.getSide=a,t.getSideAxis=m,t.max=r,t.min=i,t.placements=o,t.rectToClientRect=function(t){const{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}},t.round=c,t.sides=e}));

View File

@@ -0,0 +1,19 @@
import { InstrumentationBase, type InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation';
import type { FirebaseInstrumentationConfig } from './types';
/**
* Instrumentation for Firebase services, specifically Firestore.
*/
export declare class FirebaseInstrumentation extends InstrumentationBase<FirebaseInstrumentationConfig> {
constructor(config?: FirebaseInstrumentationConfig);
/**
* sets config
* @param config
*/
setConfig(config?: FirebaseInstrumentationConfig): void;
/**
*
* @protected
*/
protected init(): InstrumentationNodeModuleDefinition | InstrumentationNodeModuleDefinition[] | void;
}
//# sourceMappingURL=firebaseInstrumentation.d.ts.map

View File

@@ -0,0 +1,20 @@
import type { MetricRatingThresholds, ReportOpts, TTFBMetric } from './types';
/** Thresholds for TTFB. See https://web.dev/articles/ttfb#what_is_a_good_ttfb_score */
export declare const TTFBThresholds: MetricRatingThresholds;
/**
* Calculates the [TTFB](https://web.dev/articles/ttfb) value for the
* current page and calls the `callback` function once the page has loaded,
* along with the relevant `navigation` performance entry used to determine the
* value. The reported value is a `DOMHighResTimeStamp`.
*
* Note, this function waits until after the page is loaded to call `callback`
* in order to ensure all properties of the `navigation` entry are populated.
* This is useful if you want to report on other metrics exposed by the
* [Navigation Timing API](https://w3c.github.io/navigation-timing/). For
* example, the TTFB metric starts from the page's [time
* origin](https://www.w3.org/TR/hr-time-2/#sec-time-origin), which means it
* includes time spent on DNS lookup, connection negotiation, network latency,
* and server processing time.
*/
export declare const onTTFB: (onReport: (metric: TTFBMetric) => void, opts?: ReportOpts) => void;
//# sourceMappingURL=onTTFB.d.ts.map

View File

@@ -0,0 +1,24 @@
/**
* @name addHours
* @category Hour Helpers
* @summary Add the specified number of hours to the given date.
*
* @description
* Add the specified number of hours to the given date.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param date - The date to be changed
* @param amount - The amount of hours to be added.
*
* @returns The new date with the hours added
*
* @example
* // Add 2 hours to 10 July 2014 23:00:00:
* const result = addHours(new Date(2014, 6, 10, 23, 0), 2)
* //=> Fri Jul 11 2014 01:00:00
*/
export declare function addHours<DateType extends Date>(
date: DateType | number | string,
amount: number,
): DateType;

View File

@@ -0,0 +1,12 @@
export { addClsInstrumentationHandler, addInpInstrumentationHandler, addLcpInstrumentationHandler, addPerformanceInstrumentationHandler, addTtfbInstrumentationHandler } from './metrics/instrument.js';
export { addPerformanceEntries, startTrackingInteractions, startTrackingLongAnimationFrames, startTrackingLongTasks, startTrackingWebVitals } from './metrics/browserMetrics.js';
export { startTrackingElementTiming } from './metrics/elementTiming.js';
export { extractNetworkProtocol } from './metrics/utils.js';
export { addClickKeypressInstrumentationHandler } from './instrument/dom.js';
export { addHistoryInstrumentationHandler } from './instrument/history.js';
export { clearCachedImplementation, fetch, getNativeImplementation, setTimeout } from './getNativeImplementation.js';
export { SENTRY_XHR_DATA_KEY, addXhrInstrumentationHandler } from './instrument/xhr.js';
export { getBodyString, getFetchRequestArgBody, parseXhrResponseHeaders, serializeFormData } from './networkUtils.js';
export { resourceTimingToSpanAttributes } from './metrics/resourceTiming.js';
export { registerInpInteractionListener, startTrackingINP } from './metrics/inp.js';
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,29 @@
import type { Options as SentryBuildPluginOptions } from '@sentry/bundler-plugin-core';
import type { SentryBuildOptions } from './types';
declare const LOGGER_PREFIXES: {
readonly 'webpack-nodejs': "[@sentry/nextjs - Node.js]";
readonly 'webpack-edge': "[@sentry/nextjs - Edge]";
readonly 'webpack-client': "[@sentry/nextjs - Client]";
readonly 'after-production-compile-webpack': "[@sentry/nextjs - After Production Compile (Webpack)]";
readonly 'after-production-compile-turbopack': "[@sentry/nextjs - After Production Compile (Turbopack)]";
};
type BuildTool = keyof typeof LOGGER_PREFIXES;
/**
* Normalizes Windows paths to POSIX format for glob patterns
*/
export declare function normalizePathForGlob(distPath: string): string;
/**
* Get Sentry Build Plugin options for both webpack and turbopack builds.
* These options can be used in two ways:
* 1. The options can be built in a single operation after the production build completes
* 2. The options can be built in multiple operations, one for each webpack build
*/
export declare function getBuildPluginOptions({ sentryBuildOptions, releaseName, distDirAbsPath, buildTool, useRunAfterProductionCompileHook, }: {
sentryBuildOptions: SentryBuildOptions;
releaseName: string | undefined;
distDirAbsPath: string;
buildTool: BuildTool;
useRunAfterProductionCompileHook?: boolean;
}): SentryBuildPluginOptions;
export {};
//# sourceMappingURL=getBuildPluginOptions.d.ts.map

View File

@@ -0,0 +1,69 @@
@import '../../../scss/styles.scss';
@layer payload-default {
.popup-button-list {
--list-button-padding: calc(var(--base) * 0.5);
--popup-button-list-gap: 3px;
display: flex;
flex-direction: column;
text-align: left;
[dir='rtl'] &__text-align--left {
text-align: right;
}
&__text-align--left {
text-align: left;
}
&__text-align--center {
text-align: center;
}
[dir='rtl'] &__text-align--right {
text-align: left;
}
&__text-align--right {
text-align: right;
}
&__button {
@extend %btn-reset;
padding-left: var(--list-button-padding);
padding-right: var(--list-button-padding);
padding-top: calc(2px + var(--popup-button-list-gap) / 2);
padding-bottom: calc(2px + var(--popup-button-list-gap) / 2);
cursor: pointer;
text-align: inherit;
line-height: var(--base);
text-decoration: none;
border-radius: 3px;
width: 100%;
button {
@extend %btn-reset;
&:focus-visible {
outline: none;
}
}
&:hover,
&:focus-visible,
&:focus-within {
outline: none;
background-color: var(--popup-button-highlight);
}
}
&__button--selected {
background-color: var(--theme-elevation-150);
}
&__disabled {
cursor: not-allowed;
--popup-button-highlight: transparent;
background-color: var(--popup-button-highlight);
color: var(--theme-elevation-350);
&:hover {
--popup-button-highlight: var(--theme-elevation-50);
}
}
}
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"stable_events.js","sourceRoot":"","sources":["../../src/stable_events.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,6GAA6G;AAC7G,6GAA6G;AAC7G,6GAA6G;AAE7G;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,WAAoB,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n//-----------------------------------------------------------------------------------------------------------\n// DO NOT EDIT, this is an Auto-generated file from scripts/semconv/templates/registry/ts-stable/events.ts.j2\n//-----------------------------------------------------------------------------------------------------------\n\n/**\n * This event describes a single exception.\n */\nexport const EVENT_EXCEPTION = 'exception' as const;\n\n"]}

View File

@@ -0,0 +1,15 @@
import { Logger } from './logger';
import { Cache, ResourceOptions } from './cache-storage';
import { Bounds } from '../css/layout/bounds';
export declare type ContextOptions = {
logging: boolean;
cache?: Cache;
} & ResourceOptions;
export declare class Context {
windowBounds: Bounds;
private readonly instanceName;
readonly logger: Logger;
readonly cache: Cache;
private static instanceCount;
constructor(options: ContextOptions, windowBounds: Bounds);
}

View File

@@ -0,0 +1,23 @@
/*
* 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.
*/
//-----------------------------------------------------------------------------------------------------------
// DO NOT EDIT, this is an Auto-generated file from scripts/semconv/templates/registry/ts-stable/events.ts.j2
//-----------------------------------------------------------------------------------------------------------
/**
* This event describes a single exception.
*/
export const EVENT_EXCEPTION = 'exception';
//# sourceMappingURL=stable_events.js.map

View File

@@ -0,0 +1,9 @@
module.exports = {
1: 'ls', // WHATWG Living Standard
2: 'rec', // W3C Recommendation
3: 'pr', // W3C Proposed Recommendation
4: 'cr', // W3C Candidate Recommendation
5: 'wd', // W3C Working Draft
6: 'other', // Non-W3C, but reputable
7: 'unoff' // Unofficial, Editor's Draft or W3C "Note"
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"getLatestGlobalVersion.d.ts","sourceRoot":"","sources":["../../src/versions/getLatestGlobalVersion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAA;AACvE,OAAO,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAKjF,KAAK,IAAI,GAAG;IACV,MAAM,EAAE,qBAAqB,CAAA;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,OAAO,CAAA;IAChB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,GAAG,CAAC,EAAE,cAAc,CAAA;IACpB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,KAAK,CAAA;CACb,CAAA;AAED,eAAO,MAAM,sBAAsB,8DAQhC,IAAI,KAAG,OAAO,CAAC;IAAE,MAAM,EAAE,QAAQ,CAAC;IAAC,YAAY,EAAE,OAAO,CAAA;CAAE,CA+C5D,CAAA"}

View File

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

View File

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

View File

@@ -0,0 +1,3 @@
import { AnyArray } from "../any-array";
import { AnyRecord } from "../any-record";
export type StrictOmit<Type extends AnyRecord, Keys extends keyof Type> = Type extends AnyArray ? never : Omit<Type, Keys>;

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/gel-core/query-builders/raw.ts"],"sourcesContent":["import { entityKind } from '~/entity.ts';\nimport { QueryPromise } from '~/query-promise.ts';\nimport type { RunnableQuery } from '~/runnable-query.ts';\nimport type { PreparedQuery } from '~/session.ts';\nimport type { Query, SQL, SQLWrapper } from '~/sql/sql.ts';\n\nexport interface GelRaw<TResult> extends QueryPromise<TResult>, RunnableQuery<TResult, 'gel'>, SQLWrapper {}\n\nexport class GelRaw<TResult> extends QueryPromise<TResult>\n\timplements RunnableQuery<TResult, 'gel'>, SQLWrapper, PreparedQuery\n{\n\tstatic override readonly [entityKind]: string = 'GelRaw';\n\n\tdeclare readonly _: {\n\t\treadonly dialect: 'gel';\n\t\treadonly result: TResult;\n\t};\n\n\tconstructor(\n\t\tpublic execute: () => Promise<TResult>,\n\t\tprivate sql: SQL,\n\t\tprivate query: Query,\n\t\tprivate mapBatchResult: (result: unknown) => unknown,\n\t) {\n\t\tsuper();\n\t}\n\n\t/** @internal */\n\tgetSQL() {\n\t\treturn this.sql;\n\t}\n\n\tgetQuery() {\n\t\treturn this.query;\n\t}\n\n\tmapResult(result: unknown, isFromBatch?: boolean) {\n\t\treturn isFromBatch ? this.mapBatchResult(result) : result;\n\t}\n\n\t_prepare(): PreparedQuery {\n\t\treturn this;\n\t}\n\n\t/** @internal */\n\tisResponseInArrayMode() {\n\t\treturn false;\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAA2B;AAC3B,2BAA6B;AAOtB,MAAM,eAAwB,kCAErC;AAAA,EAQC,YACQ,SACC,KACA,OACA,gBACP;AACD,UAAM;AALC;AACC;AACA;AACA;AAAA,EAGT;AAAA,EAdA,QAA0B,wBAAU,IAAY;AAAA;AAAA,EAiBhD,SAAS;AACR,WAAO,KAAK;AAAA,EACb;AAAA,EAEA,WAAW;AACV,WAAO,KAAK;AAAA,EACb;AAAA,EAEA,UAAU,QAAiB,aAAuB;AACjD,WAAO,cAAc,KAAK,eAAe,MAAM,IAAI;AAAA,EACpD;AAAA,EAEA,WAA0B;AACzB,WAAO;AAAA,EACR;AAAA;AAAA,EAGA,wBAAwB;AACvB,WAAO;AAAA,EACR;AACD;","names":[]}

View File

@@ -0,0 +1,15 @@
'use client';
import { jsx as _jsx } from "react/jsx-runtime";
import React, { lazy, Suspense } from 'react';
import { ShimmerEffect } from '../ShimmerEffect/index.js';
const LazyEditor = /*#__PURE__*/lazy(() => import('./CodeEditor.js'));
export const CodeEditor = props => {
return /*#__PURE__*/_jsx(Suspense, {
fallback: /*#__PURE__*/_jsx(ShimmerEffect, {}),
children: /*#__PURE__*/_jsx(LazyEditor, {
...props
})
});
};
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,28 @@
"use strict";
exports.bn = void 0;
var _index = require("./bn/_lib/formatDistance.cjs");
var _index2 = require("./bn/_lib/formatLong.cjs");
var _index3 = require("./bn/_lib/formatRelative.cjs");
var _index4 = require("./bn/_lib/localize.cjs");
var _index5 = require("./bn/_lib/match.cjs");
/**
* @category Locales
* @summary Bengali locale.
* @language Bengali
* @iso-639-2 ben
* @author Touhidur Rahman [@touhidrahman](https://github.com/touhidrahman)
* @author Farhad Yasir [@nutboltu](https://github.com/nutboltu)
*/
const bn = (exports.bn = {
code: "bn",
formatDistance: _index.formatDistance,
formatLong: _index2.formatLong,
formatRelative: _index3.formatRelative,
localize: _index4.localize,
match: _index5.match,
options: {
weekStartsOn: 0 /* Sunday */,
firstWeekContainsDate: 1,
},
});

View File

@@ -0,0 +1,15 @@
import { NextApiRequest } from 'next';
import { NextApiHandler } from '../types';
export type AugmentedNextApiRequest = NextApiRequest & {
__withSentry_applied__?: boolean;
};
/**
* Wrap the given API route handler with error nad performance monitoring.
*
* @param apiHandler The handler exported from the user's API page route file, which may or may not already be
* wrapped with `withSentry`
* @param parameterizedRoute The page's parameterized route.
* @returns The wrapped handler which will always return a Promise.
*/
export declare function wrapApiHandlerWithSentry(apiHandler: NextApiHandler, parameterizedRoute: string): NextApiHandler;
//# sourceMappingURL=wrapApiHandlerWithSentry.d.ts.map

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