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,81 @@
import { encode as base64url } from '../../runtime/base64url.js';
import sign from '../../runtime/sign.js';
import isDisjoint from '../../lib/is_disjoint.js';
import { JWSInvalid } from '../../util/errors.js';
import { encoder, decoder, concat } from '../../lib/buffer_utils.js';
import { checkKeyTypeWithJwk } from '../../lib/check_key_type.js';
import validateCrit from '../../lib/validate_crit.js';
export class FlattenedSign {
constructor(payload) {
if (!(payload instanceof Uint8Array)) {
throw new TypeError('payload must be an instance of Uint8Array');
}
this._payload = payload;
}
setProtectedHeader(protectedHeader) {
if (this._protectedHeader) {
throw new TypeError('setProtectedHeader can only be called once');
}
this._protectedHeader = protectedHeader;
return this;
}
setUnprotectedHeader(unprotectedHeader) {
if (this._unprotectedHeader) {
throw new TypeError('setUnprotectedHeader can only be called once');
}
this._unprotectedHeader = unprotectedHeader;
return this;
}
async sign(key, options) {
if (!this._protectedHeader && !this._unprotectedHeader) {
throw new JWSInvalid('either setProtectedHeader or setUnprotectedHeader must be called before #sign()');
}
if (!isDisjoint(this._protectedHeader, this._unprotectedHeader)) {
throw new JWSInvalid('JWS Protected and JWS Unprotected Header Parameter names must be disjoint');
}
const joseHeader = {
...this._protectedHeader,
...this._unprotectedHeader,
};
const extensions = validateCrit(JWSInvalid, new Map([['b64', true]]), options?.crit, this._protectedHeader, joseHeader);
let b64 = true;
if (extensions.has('b64')) {
b64 = this._protectedHeader.b64;
if (typeof b64 !== 'boolean') {
throw new JWSInvalid('The "b64" (base64url-encode payload) Header Parameter must be a boolean');
}
}
const { alg } = joseHeader;
if (typeof alg !== 'string' || !alg) {
throw new JWSInvalid('JWS "alg" (Algorithm) Header Parameter missing or invalid');
}
checkKeyTypeWithJwk(alg, key, 'sign');
let payload = this._payload;
if (b64) {
payload = encoder.encode(base64url(payload));
}
let protectedHeader;
if (this._protectedHeader) {
protectedHeader = encoder.encode(base64url(JSON.stringify(this._protectedHeader)));
}
else {
protectedHeader = encoder.encode('');
}
const data = concat(protectedHeader, encoder.encode('.'), payload);
const signature = await sign(alg, key, data);
const jws = {
signature: base64url(signature),
payload: '',
};
if (b64) {
jws.payload = decoder.decode(payload);
}
if (this._unprotectedHeader) {
jws.header = this._unprotectedHeader;
}
if (this._protectedHeader) {
jws.protected = decoder.decode(protectedHeader);
}
return jws;
}
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","names":["handleEndpoints","formatAdminURL","generateOGImage","initedOGEndpoint","handlerBuilder","config","request","args","awaitedConfig","endpoints","some","endpoint","path","method","push","handler","awaitedParams","params","response","apiRoute","routes","api","slug","join","undefined","OPTIONS","GET","POST","DELETE","PATCH","PUT"],"sources":["../../../src/routes/rest/index.ts"],"sourcesContent":["import { handleEndpoints, type SanitizedConfig } from 'payload'\nimport { formatAdminURL } from 'payload/shared'\n\nimport { generateOGImage } from './og/index.js'\n\nlet initedOGEndpoint = false\n\nconst handlerBuilder =\n (config: Promise<SanitizedConfig> | SanitizedConfig) =>\n async (\n request: Request,\n args: {\n params: Promise<{ slug?: string[] }>\n },\n ): Promise<Response> => {\n const awaitedConfig = await config\n\n // Add this endpoint only when using Next.js, still can be overridden.\n if (\n initedOGEndpoint === false &&\n !awaitedConfig.endpoints.some(\n (endpoint) => endpoint.path === '/og' && endpoint.method === 'get',\n )\n ) {\n awaitedConfig.endpoints.push({\n handler: generateOGImage,\n method: 'get',\n path: '/og',\n })\n }\n\n initedOGEndpoint = true\n\n const awaitedParams = await args.params\n\n const response = await handleEndpoints({\n config,\n path: formatAdminURL({\n apiRoute: awaitedConfig.routes.api,\n path: awaitedParams ? `/${awaitedParams.slug.join('/')}` : undefined,\n }),\n request,\n })\n\n return response\n }\n\nexport const OPTIONS = handlerBuilder\n\nexport const GET = handlerBuilder\n\nexport const POST = handlerBuilder\n\nexport const DELETE = handlerBuilder\n\nexport const PATCH = handlerBuilder\n\nexport const PUT = handlerBuilder\n"],"mappings":"AAAA,SAASA,eAAe,QAA8B;AACtD,SAASC,cAAc,QAAQ;AAE/B,SAASC,eAAe,QAAQ;AAEhC,IAAIC,gBAAA,GAAmB;AAEvB,MAAMC,cAAA,GACHC,MAAA,IACD,OACEC,OAAA,EACAC,IAAA;EAIA,MAAMC,aAAA,GAAgB,MAAMH,MAAA;EAE5B;EACA,IACEF,gBAAA,KAAqB,SACrB,CAACK,aAAA,CAAcC,SAAS,CAACC,IAAI,CAC1BC,QAAA,IAAaA,QAAA,CAASC,IAAI,KAAK,SAASD,QAAA,CAASE,MAAM,KAAK,QAE/D;IACAL,aAAA,CAAcC,SAAS,CAACK,IAAI,CAAC;MAC3BC,OAAA,EAASb,eAAA;MACTW,MAAA,EAAQ;MACRD,IAAA,EAAM;IACR;EACF;EAEAT,gBAAA,GAAmB;EAEnB,MAAMa,aAAA,GAAgB,MAAMT,IAAA,CAAKU,MAAM;EAEvC,MAAMC,QAAA,GAAW,MAAMlB,eAAA,CAAgB;IACrCK,MAAA;IACAO,IAAA,EAAMX,cAAA,CAAe;MACnBkB,QAAA,EAAUX,aAAA,CAAcY,MAAM,CAACC,GAAG;MAClCT,IAAA,EAAMI,aAAA,GAAgB,IAAIA,aAAA,CAAcM,IAAI,CAACC,IAAI,CAAC,MAAM,GAAGC;IAC7D;IACAlB;EACF;EAEA,OAAOY,QAAA;AACT;AAEF,OAAO,MAAMO,OAAA,GAAUrB,cAAA;AAEvB,OAAO,MAAMsB,GAAA,GAAMtB,cAAA;AAEnB,OAAO,MAAMuB,IAAA,GAAOvB,cAAA;AAEpB,OAAO,MAAMwB,MAAA,GAASxB,cAAA;AAEtB,OAAO,MAAMyB,KAAA,GAAQzB,cAAA;AAErB,OAAO,MAAM0B,GAAA,GAAM1B,cAAA","ignoreList":[]}

View File

@@ -0,0 +1,44 @@
import { normalizeDates } from "./_lib/normalizeDates.js";
/**
* The {@link isSameMonth} function options.
*/
/**
* @name isSameMonth
* @category Month Helpers
* @summary Are the given dates in the same month (and year)?
*
* @description
* Are the given dates in the same month (and year)?
*
* @param laterDate - The first date to check
* @param earlierDate - The second date to check
* @param options - An object with options
*
* @returns The dates are in the same month (and year)
*
* @example
* // Are 2 September 2014 and 25 September 2014 in the same month?
* const result = isSameMonth(new Date(2014, 8, 2), new Date(2014, 8, 25))
* //=> true
*
* @example
* // Are 2 September 2014 and 25 September 2015 in the same month?
* const result = isSameMonth(new Date(2014, 8, 2), new Date(2015, 8, 25))
* //=> false
*/
export function isSameMonth(laterDate, earlierDate, options) {
const [laterDate_, earlierDate_] = normalizeDates(
options?.in,
laterDate,
earlierDate,
);
return (
laterDate_.getFullYear() === earlierDate_.getFullYear() &&
laterDate_.getMonth() === earlierDate_.getMonth()
);
}
// Fallback for modularized imports:
export default isSameMonth;

View File

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

View File

@@ -0,0 +1,37 @@
import { AnyRecord } from "../any-record";
import { IsNever } from "../is-never";
type IsUnion<TUnion> = UnionToTuple<TUnion>["length"] extends 1 ? false : true;
type UnionToFunctionInsertion<TUnion> = (TUnion extends any ? (arg: () => TUnion) => any : never) extends (arg: infer TParam) => any ? TParam : never;
type UnionToTuple<TUnion> = UnionToFunctionInsertion<TUnion> extends () => infer TReturnType ? [...UnionToTuple<Exclude<TUnion, TReturnType>>, TReturnType] : [];
type ExactUnionLength<TValue, TShape, TValueLength = UnionToTuple<TValue>["length"], TShapeLength = UnionToTuple<TShape>["length"]> = TValueLength extends TShapeLength ? true : false;
type Xor<T, U> = T extends true ? (U extends true ? true : false) : U extends false ? true : false;
type And<TTuple> = TTuple extends [infer Head, ...infer Rest] ? Head extends true ? And<Rest> : false : TTuple extends [] ? true : false;
type ObjectKeyExact<TValue, TShape> = And<[
IsNever<Exclude<keyof TValue, keyof TShape>>,
IsNever<Exclude<keyof TShape, keyof TValue>>
]>;
type ObjectValueDiff<TValue, TShape> = {
[TKey in keyof TValue]: Exclude<TValue[TKey], TShape[TKey & keyof TShape]>;
}[keyof TValue];
type ObjectValueExact<TValue, TShape> = And<[
IsNever<ObjectValueDiff<TValue, TShape>>,
IsNever<ObjectValueDiff<TShape, TValue>>
]>;
type ObjectExact<TValue, TShape> = [TValue] extends [TShape] ? And<[
Xor<IsUnion<TValue>, IsUnion<TShape>>,
ExactUnionLength<TValue, TShape>,
ObjectKeyExact<TValue, TShape>,
ObjectValueExact<TValue, TShape>
]> extends true ? TValue : never : never;
type IsArray<TValue> = [TValue] extends [readonly any[]] ? true : false;
type IsReadonly<TArray> = Readonly<TArray> extends TArray ? true : false;
type SameLength<TValue extends readonly any[], TShape extends readonly any[]> = IsNever<PrimitiveExact<TValue["length"], TShape["length"]>> extends true ? false : true;
type ArrayExact<TValue extends readonly any[], TShape extends readonly any[]> = And<[
IsArray<TValue>,
IsArray<TShape>,
SameLength<TValue, TShape>,
Xor<IsReadonly<TValue>, IsReadonly<TShape>>
]> extends true ? [TValue, TShape] extends [readonly (infer TValueElement)[], readonly (infer TShapeElement)[]] ? Exact<TValueElement, TShapeElement> extends TValueElement ? TValue : never : never : never;
type PrimitiveExact<TValue, TShape> = [TValue] extends [TShape] ? ([TShape] extends [TValue] ? TValue : never) : never;
export type Exact<TValue, TShape> = [TValue] extends [readonly any[]] ? [TShape] extends [readonly any[]] ? ArrayExact<TValue, TShape> : never : [TValue] extends [AnyRecord] ? ObjectExact<TValue, TShape> : PrimitiveExact<TValue, TShape>;
export {};

View File

@@ -0,0 +1,90 @@
# `@lexical/react`
This package provides a set of components and hooks for Lexical that allow for text editing in React applications.
## Getting started
Install `lexical` and `@lexical/react`:
```
npm install --save lexical @lexical/react
```
Below is an example of a basic plain text editor using `lexical` and `@lexical/react` ([try it yourself](https://stackblitz.com/github/facebook/lexical/tree/main/examples/react-plain-text?embed=1&file=src%2FApp.tsx&terminalHeight=0&ctl=1&showSidebar=0&devtoolsheight=0&view=preview)).
```jsx
import {$getRoot, $getSelection} from 'lexical';
import {useEffect} from 'react';
import {LexicalComposer} from '@lexical/react/LexicalComposer';
import {PlainTextPlugin} from '@lexical/react/LexicalPlainTextPlugin';
import {ContentEditable} from '@lexical/react/LexicalContentEditable';
import {HistoryPlugin} from '@lexical/react/LexicalHistoryPlugin';
import {OnChangePlugin} from '@lexical/react/LexicalOnChangePlugin';
import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext';
const theme = {
// Theme styling goes here
...
}
// When the editor changes, you can get notified via the
// LexicalOnChangePlugin!
function onChange(editorState) {
editorState.read(() => {
// Read the contents of the EditorState here.
const root = $getRoot();
const selection = $getSelection();
console.log(root, selection);
});
}
// Lexical React plugins are React components, which makes them
// highly composable. Furthermore, you can lazy load plugins if
// desired, so you don't pay the cost for plugins until you
// actually use them.
function MyCustomAutoFocusPlugin() {
const [editor] = useLexicalComposerContext();
useEffect(() => {
// Focus the editor when the effect fires!
editor.focus();
}, [editor]);
return null;
}
// Catch any errors that occur during Lexical updates and log them
// or throw them as needed. If you don't throw them, Lexical will
// try to recover gracefully without losing user data.
function onError(error) {
throw error;
}
function Editor() {
const initialConfig = {
namespace: 'MyEditor',
theme,
onError,
};
return (
<LexicalComposer initialConfig={initialConfig}>
<PlainTextPlugin
contentEditable={
<ContentEditable
aria-placeholder={'Enter some text...'}
placeholder={<div>Enter some text...</div>}
/>
}
/>
<OnChangePlugin onChange={onChange} />
<HistoryPlugin />
<MyCustomAutoFocusPlugin />
</LexicalComposer>
);
}
```

View File

@@ -0,0 +1,77 @@
import { SQL } from "bun";
import { entityKind } from "../entity.js";
import { DefaultLogger } from "../logger.js";
import { PgDatabase } from "../pg-core/db.js";
import { PgDialect } from "../pg-core/dialect.js";
import {
createTableRelationsHelpers,
extractTablesRelationalConfig
} from "../relations.js";
import { isConfig } from "../utils.js";
import { BunSQLSession } from "./session.js";
class BunSQLDatabase extends PgDatabase {
static [entityKind] = "BunSQLDatabase";
}
function construct(client, config = {}) {
const dialect = new PgDialect({ casing: config.casing });
let logger;
if (config.logger === true) {
logger = new DefaultLogger();
} else if (config.logger !== false) {
logger = config.logger;
}
let schema;
if (config.schema) {
const tablesConfig = extractTablesRelationalConfig(
config.schema,
createTableRelationsHelpers
);
schema = {
fullSchema: config.schema,
schema: tablesConfig.tables,
tableNamesMap: tablesConfig.tableNamesMap
};
}
const session = new BunSQLSession(client, dialect, schema, { logger, cache: config.cache });
const db = new BunSQLDatabase(dialect, session, schema);
db.$client = client;
db.$cache = config.cache;
if (db.$cache) {
db.$cache["invalidate"] = config.cache?.onMutate;
}
return db;
}
function drizzle(...params) {
if (typeof params[0] === "string") {
const instance = new SQL(params[0]);
return construct(instance, params[1]);
}
if (isConfig(params[0])) {
const { connection, client, ...drizzleConfig } = params[0];
if (client) return construct(client, drizzleConfig);
if (typeof connection === "object" && connection.url !== void 0) {
const { url, ...config } = connection;
const instance2 = new SQL({ url, ...config });
return construct(instance2, drizzleConfig);
}
const instance = new SQL(connection);
return construct(instance, drizzleConfig);
}
return construct(params[0], params[1]);
}
((drizzle2) => {
function mock(config) {
return construct({
options: {
parsers: {},
serializers: {}
}
}, config);
}
drizzle2.mock = mock;
})(drizzle || (drizzle = {}));
export {
BunSQLDatabase,
drizzle
};
//# sourceMappingURL=driver.js.map

View File

@@ -0,0 +1,15 @@
# Installation
> `npm install --save @types/trusted-types`
# Summary
This package contains type definitions for trusted-types (https://github.com/WICG/trusted-types).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/trusted-types.
### Additional Details
* Last updated: Mon, 20 Nov 2023 23:36:24 GMT
* Dependencies: none
# Credits
These definitions were written by [Jakub Vrana](https://github.com/vrana), [Damien Engels](https://github.com/engelsdamien), [Emanuel Tesar](https://github.com/siegrift), [Bjarki](https://github.com/bjarkler), and [Sebastian Silbermann](https://github.com/eps1lon).

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","names":["fieldBaseClass","isFieldRTL","fieldLocalized","fieldRTL","locale","localizationConfig","hasMultipleLocales","locales","length","isCurrentLocaleDefaultLocale","code","defaultLocale","rtl"],"sources":["../../../src/fields/shared/index.tsx"],"sourcesContent":["'use client'\nimport type { Locale, SanitizedLocalizationConfig } from 'payload'\n\nexport const fieldBaseClass = 'field-type'\n\n/**\n * Determines whether a field should be displayed as right-to-left (RTL) based on its configuration, payload's localization configuration and the adming user's currently enabled locale.\n\n * @returns Whether the field should be displayed as RTL.\n */\nexport function isFieldRTL({\n fieldLocalized,\n fieldRTL,\n locale,\n localizationConfig,\n}: {\n fieldLocalized: boolean\n fieldRTL: boolean\n locale: Locale\n localizationConfig?: SanitizedLocalizationConfig\n}) {\n const hasMultipleLocales =\n locale &&\n localizationConfig &&\n localizationConfig.locales &&\n localizationConfig.locales.length > 1\n\n const isCurrentLocaleDefaultLocale = locale?.code === localizationConfig?.defaultLocale\n\n return (\n (fieldRTL !== false &&\n locale?.rtl === true &&\n (fieldLocalized ||\n (!fieldLocalized && !hasMultipleLocales) || // If there is only one locale which is also rtl, that field is rtl too\n (!fieldLocalized && isCurrentLocaleDefaultLocale))) || // If the current locale is the default locale, but the field is not localized, that field is rtl too\n fieldRTL === true\n ) // If fieldRTL is true. This should be useful for when no localization is set at all in the payload config, but you still want fields to be rtl.\n}\n"],"mappings":"AAAA;;AAGA,OAAO,MAAMA,cAAA,GAAiB;AAE9B;;;;;AAKA,OAAO,SAASC,WAAW;EACzBC,cAAc;EACdC,QAAQ;EACRC,MAAM;EACNC;AAAkB,CAMnB;EACC,MAAMC,kBAAA,GACJF,MAAA,IACAC,kBAAA,IACAA,kBAAA,CAAmBE,OAAO,IAC1BF,kBAAA,CAAmBE,OAAO,CAACC,MAAM,GAAG;EAEtC,MAAMC,4BAAA,GAA+BL,MAAA,EAAQM,IAAA,KAASL,kBAAA,EAAoBM,aAAA;EAE1E,OACER,QAAC,KAAa,SACZC,MAAA,EAAQQ,GAAA,KAAQ,SACfV,cAAA,IACE,CAACA,cAAA,IAAkB,CAACI,kBAAA;EAAuB;EAC3C,CAACJ,cAAA,IAAkBO,4BAA4B;EAAO;EAC3DN,QAAA,KAAa,KACb;AAAA;AACJ","ignoreList":[]}

View File

@@ -0,0 +1,565 @@
export interface Options {
/**
* The slug of the Sentry organization associated with the app.
*
* This value can also be specified via the `SENTRY_ORG` environment variable.
*/
org?: string;
/**
* The slug of the Sentry project associated with the app.
*
* When uploading source maps, you can specify multiple projects (as an array) to upload
* the same source maps to multiple projects. This is useful in monorepo environments
* where multiple projects share the same release.
*
* This value can also be specified via the `SENTRY_PROJECT` environment variable.
*/
project?: string | string[];
/**
* The authentication token to use for all communication with Sentry.
* Can be obtained from https://sentry.io/orgredirect/organizations/:orgslug/settings/auth-tokens/.
*
* This value can also be specified via the `SENTRY_AUTH_TOKEN` environment variable.
*
* @see https://docs.sentry.io/product/accounts/auth-tokens/#organization-auth-tokens
*/
authToken?: string | undefined;
/**
* The base URL of your Sentry instance. Use this if you are using a self-hosted
* or Sentry instance other than sentry.io.
*
* This value can also be set via the `SENTRY_URL` environment variable.
*
* @default "https://sentry.io" (correct value for SaaS customers)
*/
url?: string;
/**
* Additional headers to send with every outgoing request to Sentry.
*/
headers?: Record<string, string>;
/**
* Enable debug information logs during build-time.
* Enabling this will give you, for example, logs about source maps.
*
* This option also propagates the debug flag to the Sentry CLI by setting
* the `SENTRY_LOG_LEVEL` environment variable to `"debug"` if it's not already set.
* If you have explicitly set `SENTRY_LOG_LEVEL`, this option will be ignored.
*
* @default false
*/
debug?: boolean;
/**
* Suppresses all build logs (all log levels, including errors).
*
* @default false
*/
silent?: boolean;
/**
* When an error occurs during release creation or sourcemaps upload, the plugin will call this function.
*
* By default, the plugin will simply throw an error, thereby stopping the bundling process.
* If an `errorHandler` callback is provided, compilation will continue, unless an error is
* thrown in the provided callback.
*
* To allow compilation to continue but still emit a warning, set this option to the following:
*
* ```js
* (err) => {
* console.warn(err);
* }
* ```
*/
errorHandler?: (err: Error) => void;
/**
* If this flag is `true`, internal plugin errors and performance data will be sent to Sentry.
* It will not collect any sensitive or user-specific data.
*
* At Sentry, we like to use Sentry ourselves to deliver faster and more stable products.
* We're very careful of what we're sending. We won't collect anything other than error
* and high-level performance data. We will never collect your code or any details of the
* projects in which you're using this plugin.
*
* @default true
*/
telemetry?: boolean;
/**
* Completely disables all functionality of the plugin.
*
* Defaults to `false`.
*/
disable?: boolean;
/**
* Options related to source maps upload and processing.
*/
sourcemaps?: {
/**
* Disables all functionality related to sourcemaps if set to `true`.
*
* If set to `"disable-upload"`, the plugin will not upload sourcemaps to Sentry, but will inject debug IDs into the build artifacts.
* This is useful if you want to manually upload sourcemaps to Sentry at a later point in time.
*
* @default false
*/
disable?: boolean | "disable-upload";
/**
* A glob or an array of globs that specify the build artifacts and source maps that will be uploaded to Sentry.
*
* The globbing patterns must follow the implementation of the `glob` package: https://www.npmjs.com/package/glob#glob-primer
*
* If this option is not specified, the plugin will try to upload all JavaScript files and source map files that are created during build.
*
* Use the `debug` option to print information about which files end up being uploaded.
*
*/
assets?: string | string[];
/**
* A glob or an array of globs that specifies which build artifacts should not be uploaded to Sentry.
*
* The globbing patterns must follow the implementation of the `glob` package: https://www.npmjs.com/package/glob#glob-primer
*
* Use the `debug` option to print information about which files end up being uploaded.
*
* @default []
*/
ignore?: string | string[];
/**
* Hook to rewrite the `sources` field inside the source map before being uploaded to Sentry. Does not modify the actual source map.
*
* Defaults to making all sources relative to `process.cwd()` while building.
*/
rewriteSources?: RewriteSourcesHook;
/**
* Hook to customize source map file resolution.
*
* The hook is called with the absolute path of the build artifact and the value of the `//# sourceMappingURL=`
* comment, if present. The hook should then return an absolute path (or a promise that resolves to one) indicating
* where to find the artifact's corresponding source map file. If no path is returned or the returned path doesn't
* exist, the standard source map resolution process will be used.
*
* The standard process first tries to resolve based on the `//# sourceMappingURL=` value (it supports `file://`
* urls and absolute/relative paths). If that path doesn't exist, it then looks for a file named
* `${artifactName}.map` in the same directory as the artifact.
*
* Note: This is mostly helpful for complex builds with custom source map generation. For example, if you put source
* maps into a separate directory and rewrite the `//# sourceMappingURL=` comment to something other than a relative
* directory, sentry will be unable to locate the source maps for a given build artifact. This hook allows you to
* implement the resolution process yourself.
*
* Use the `debug` option to print information about source map resolution.
*/
resolveSourceMap?: ResolveSourceMapHook;
/**
* A glob or an array of globs that specifies the build artifacts that should be deleted after the artifact upload to Sentry has been completed.
*
* Note: If you pass in a Promise that resolves to a string or array, the plugin will await the Promise and use
* the resolved value globs. This is useful if you need to dynamically determine the files to delete. Some
* higher-level Sentry SDKs or options use this feature (e.g., SvelteKit).
*
* The globbing patterns must follow the implementation of the `glob` package: https://www.npmjs.com/package/glob#glob-primer
*
* Use the `debug` option to print information about which files end up being deleted.
*/
filesToDeleteAfterUpload?: string | string[] | Promise<string | string[] | undefined>;
};
/**
* Options related to managing the Sentry releases for a build.
*
* More info: https://docs.sentry.io/product/releases/
*/
release?: {
/**
* Unique identifier for the release you want to create.
*
* This value can also be specified via the `SENTRY_RELEASE` environment variable.
*
* Defaults to automatically detecting a value for your environment.
* This includes values for Cordova, Heroku, AWS CodeBuild, CircleCI, Xcode, and Gradle, and otherwise uses the git `HEAD`'s commit SHA
* (the latter requires access to git CLI and for the root directory to be a valid repository).
*
* If no `name` is provided and the plugin can't automatically detect one, no release will be created.
*/
name?: string;
/**
* Whether the plugin should inject release information into the build for the SDK to pick it up when sending events. (recommended)
*
* Defaults to `true`.
*/
inject?: boolean;
/**
* Whether the plugin should create a release on Sentry during the build.
*
* Note that a release may still appear in Sentry even if this value is `false`. Any Sentry event that has a release value attached
* will automatically create a release (for example, via the `inject` option).
*
* @default true
*/
create?: boolean;
/**
* Whether to automatically finalize the release. The release is finalized by adding an end timestamp after the build ends.
*
* @default true
*/
finalize?: boolean;
/**
* Unique distribution identifier for the release. Used to further segment the release.
*
* Usually your build number.
*/
dist?: string;
/**
* Version control system (VCS) remote name.
*
* This value can also be specified via the `SENTRY_VSC_REMOTE` environment variable.
*
* @default "origin"
*/
vcsRemote?: string;
/**
* Configuration for associating the release with its commits in Sentry.
*
* Set to `false` to disable commit association.
*
* @default { auto: true }
*/
setCommits?: SetCommitsOptions | false;
/**
* Configuration for adding deployment information to the release in Sentry.
*
* Set to `false` to disable automatic deployment detection and creation.
*/
deploy?: DeployOptions | false;
/**
* Legacy method of uploading source maps. (not recommended unless necessary)
*
* One or more paths that should be scanned recursively for sources.
*
* Each path can be given as a string or an object with more specific options.
*
* The modern version of doing source maps upload is more robust and way easier to get working but has to inject a very small snippet of JavaScript into your output bundles.
* In situations where this leads to problems (e.g subresource integrity) you can use this option as a fallback.
*/
uploadLegacySourcemaps?: string | IncludeEntry | Array<string | IncludeEntry>;
};
/**
* Options for bundle size optimizations by excluding certain features.
*/
bundleSizeOptimizations?: {
/**
* Exclude debug statements from the bundle, thus disabling features like the SDK's `debug` option.
*
* If set to `true`, the plugin will attempt to tree-shake (remove) any debugging code within the Sentry SDK during the build.
* Note that the success of this depends on tree-shaking being enabled in your build tooling.
*
* @default false
*/
excludeDebugStatements?: boolean;
/**
* Exclude tracing functionality from the bundle, thus disabling features like performance monitoring.
*
* If set to `true`, the plugin will attempt to tree-shake (remove) code within the Sentry SDK that is related to tracing and performance monitoring.
* Note that the success of this depends on tree-shaking being enabled in your build tooling.
*
* **Notice:** Do not enable this when you're using any performance monitoring-related SDK features (e.g. `Sentry.startTransaction()`).
* @default false
*/
excludeTracing?: boolean;
/**
* If set to `true`, the plugin will attempt to tree-shake (remove) code related to the Sentry SDK's Session Replay Canvas recording functionality.
* Note that the success of this depends on tree-shaking being enabled in your build tooling.
*
* You can safely do this when you do not want to capture any Canvas activity via Sentry Session Replay.
*
* @deprecated In versions v7.78.0 and later of the Sentry JavaScript SDKs, canvas recording is opt-in making this option redundant.
*/
excludeReplayCanvas?: boolean;
/**
* Exclude Replay Shadow DOM functionality from the bundle.
*
* If set to `true`, the plugin will attempt to tree-shake (remove) code related to the Sentry SDK's Session Replay Shadow DOM recording functionality.
* Note that the success of this depends on tree-shaking being enabled in your build tooling.
*
* This option is safe to be used when you do not want to capture any Shadow DOM activity via Sentry Session Replay.
*
* @default false
*/
excludeReplayShadowDom?: boolean;
/**
* Exclude Replay iFrame functionality from the bundle.
*
* If set to `true`, the Sentry SDK will attempt to tree-shake (remove) code related to the Sentry SDK's Session Replay `iframe` recording functionality.
* Note that the success of this depends on tree-shaking being enabled in your build tooling.
*
* You can safely do this when you do not want to capture any `iframe` activity via Sentry Session Replay.
*
* @default false
*/
excludeReplayIframe?: boolean;
/**
* Exclude Replay worker functionality from the bundle.
*
* If set to `true`, the Sentry SDK will attempt to tree-shake (remove) code related to the Sentry SDK's Session Replay's Compression Web Worker.
* Note that the success of this depends on tree-shaking being enabled in your build tooling.
*
* **Notice:** You should only use this option if you manually host a compression worker and configure it in your Sentry Session Replay integration config via the `workerUrl` option.
*
* @default false
*/
excludeReplayWorker?: boolean;
};
/**
* Options related to react component name annotations.
* Disabled by default, unless a value is set for this option.
* When enabled, your app's DOM will automatically be annotated during build-time with their respective component names.
* This will unlock the capability to search for Replays in Sentry by component name, as well as see component names in breadcrumbs and performance monitoring.
* Please note that this feature is not currently supported by the esbuild bundler plugins, and will only annotate React components
*/
reactComponentAnnotation?: {
/**
* Whether the component name annotate plugin should be enabled or not.
*/
enabled?: boolean;
/**
* A list of strings representing the names of components to ignore. The plugin will not apply `data-sentry` annotations on the DOM element for these components.
*/
ignoredComponents?: string[];
/**
* An experimental component annotation injection mode that injects
* annotations into HTML rather than React components.
*/
_experimentalInjectIntoHtml?: boolean;
};
/**
* Metadata that should be associated with the built application.
*
* The metadata is serialized and can be looked up at runtime from within the SDK (for example in the `beforeSend`,
* event processors, or the transport), allowing for custom event filtering logic or routing of events.
*
* Metadata can either be passed directly or alternatively a callback can be provided that will be
* called with the following parameters:
* - `org`: The organization slug.
* - `project`: The project slug (when multiple projects are configured, this is the first project).
* - `projects`: An array of all project slugs (available when multiple projects are configured).
* - `release`: The release name.
*/
moduleMetadata?: ModuleMetadata | ModuleMetadataCallback;
/**
* A key which will embedded in all the bundled files. The SDK will be able to use the key to apply filtering
* rules, for example using the `thirdPartyErrorFilterIntegration`.
*/
applicationKey?: string;
/**
* Options that are considered experimental and subject to change.
*
* @experimental API that does not follow semantic versioning and may change in any release
*/
_experiments?: {
/**
* If set to true, the plugin will inject an additional `SENTRY_BUILD_INFO` variable.
* This contains information about the build, e.g. dependencies, node version and other useful data.
*
* Defaults to `false`.
*/
injectBuildInformation?: boolean;
} & Record<string, unknown>;
/**
* Options that are useful for building wrappers around the plugin. You likely don't need these options unless you
* are distributing a tool that depends on this plugin
*/
_metaOptions?: {
/**
* Overrides the prefix that come before logger messages. (e.g. `[some-prefix] Info: Some log message`)
*
* Example value: `[sentry-webpack-plugin (client)]`
*/
loggerPrefixOverride?: string;
/**
* Arbitrary telemetry items.
*/
telemetry?: {
/**
* The meta framework using the plugin.
*/
metaFramework?: string;
/**
* The major version of the bundler (e.g., "4" or "5" for webpack).
*/
bundlerMajorVersion?: string;
};
};
}
export type RewriteSourcesHook = (source: string, map: any) => string;
export type ResolveSourceMapHook = (artifactPath: string, sourceMappingUrl: string | undefined) => string | undefined | Promise<string | undefined>;
export interface ModuleMetadata {
[key: string]: any;
}
export interface ModuleMetadataCallbackArgs {
org?: string;
project?: string;
projects?: string[];
release?: string;
}
export type ModuleMetadataCallback = (args: ModuleMetadataCallbackArgs) => ModuleMetadata;
export type IncludeEntry = {
/**
* One or more paths to scan for files to upload.
*/
paths: string[];
/**
* One or more paths to ignore during upload.
* Overrides entries in ignoreFile file.
*
* Defaults to `['node_modules']` if neither `ignoreFile` nor `ignore` is set.
*/
ignore?: string | string[];
/**
* Path to a file containing list of files/directories to ignore.
*
* Can point to `.gitignore` or anything with the same format.
*/
ignoreFile?: string;
/**
* Array of file extensions of files to be collected for the file upload.
*
* By default the following file extensions are processed: js, map, jsbundle and bundle.
*/
ext?: string[];
/**
* URL prefix to add to the beginning of all filenames.
* Defaults to '~/' but you might want to set this to the full URL.
*
* This is also useful if your files are stored in a sub folder. eg: url-prefix '~/static/js'.
*/
urlPrefix?: string;
/**
* URL suffix to add to the end of all filenames.
* Useful for appending query parameters.
*/
urlSuffix?: string;
/**
* When paired with the `rewrite` option, this will remove a prefix from filename references inside of
* sourcemaps. For instance you can use this to remove a path that is build machine specific.
* Note that this will NOT change the names of uploaded files.
*/
stripPrefix?: string[];
/**
* When paired with the `rewrite` option, this will add `~` to the `stripPrefix` array.
*
* Defaults to `false`.
*/
stripCommonPrefix?: boolean;
/**
* Determines whether sentry-cli should attempt to link minified files with their corresponding maps.
* By default, it will match files and maps based on name, and add a Sourcemap header to each minified file
* for which it finds a map. Can be disabled if all minified files contain sourceMappingURL.
*
* Defaults to true.
*/
sourceMapReference?: boolean;
/**
* Enables rewriting of matching source maps so that indexed maps are flattened and missing sources
* are inlined if possible.
*
* Defaults to true
*/
rewrite?: boolean;
/**
* When `true`, attempts source map validation before upload if rewriting is not enabled.
* It will spot a variety of issues with source maps and cancel the upload if any are found.
*
* Defaults to `false` as this can cause false positives.
*/
validate?: boolean;
};
export interface SentrySDKBuildFlags extends Record<string, boolean | undefined> {
__SENTRY_DEBUG__?: boolean;
__SENTRY_TRACING__?: boolean;
__RRWEB_EXCLUDE_CANVAS__?: boolean;
__RRWEB_EXCLUDE_IFRAME__?: boolean;
__RRWEB_EXCLUDE_SHADOW_DOM__?: boolean;
__SENTRY_EXCLUDE_REPLAY_WORKER__?: boolean;
}
export type SetCommitsOptions = (AutoSetCommitsOptions | ManualSetCommitsOptions) & {
/**
* The commit before the beginning of this release (in other words,
* the last commit of the previous release).
*
* Defaults to the last commit of the previous release in Sentry.
*
* If there was no previous release, the last 10 commits will be used.
*/
previousCommit?: string;
/**
* If the flag is to `true` and the previous release commit was not found
* in the repository, the plugin creates a release with the default commits
* count instead of failing the command.
*
* Defaults to `false`.
*/
ignoreMissing?: boolean;
/**
* If this flag is set, the setCommits step will not fail and just exit
* silently if no new commits for a given release have been found.
*
* Defaults to `false`.
*/
ignoreEmpty?: boolean;
};
type AutoSetCommitsOptions = {
/**
* Automatically sets `commit` and `previousCommit`. Sets `commit` to `HEAD`
* and `previousCommit` as described in the option's documentation.
*
* If you set this to `true`, manually specified `commit` and `previousCommit`
* options will be overridden. It is best to not specify them at all if you
* set this option to `true`.
*/
auto: true;
repo?: undefined;
commit?: undefined;
};
type ManualSetCommitsOptions = {
auto?: false | undefined;
/**
* The full repo name as defined in Sentry.
*
* Required if the `auto` option is not set to `true`.
*/
repo: string;
/**
* The current (last) commit in the release.
*
* Required if the `auto` option is not set to `true`.
*/
commit: string;
};
type DeployOptions = {
/**
* Environment for this release. Values that make sense here would
* be `production` or `staging`.
*/
env: string;
/**
* Deployment start time in Unix timestamp (in seconds) or ISO 8601 format.
*/
started?: number | string;
/**
* Deployment finish time in Unix timestamp (in seconds) or ISO 8601 format.
*/
finished?: number | string;
/**
* Deployment duration (in seconds). Can be used instead of started and finished.
*/
time?: number;
/**
* Human-readable name for the deployment.
*/
name?: string;
/**
* URL that points to the deployment.
*/
url?: string;
};
export type HandleRecoverableErrorFn = (error: unknown, throwByDefault: boolean) => void;
export {};
//# sourceMappingURL=types.d.ts.map

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"heart-off.js","sources":["../../../src/icons/heart-off.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name HeartOff\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8bGluZSB4MT0iMiIgeTE9IjIiIHgyPSIyMiIgeTI9IjIyIiAvPgogIDxwYXRoIGQ9Ik0xNi41IDE2LjUgMTIgMjFsLTctN2MtMS41LTEuNDUtMy0zLjItMy01LjVhNS41IDUuNSAwIDAgMSAyLjE0LTQuMzUiIC8+CiAgPHBhdGggZD0iTTguNzYgMy4xYzEuMTUuMjIgMi4xMy43OCAzLjI0IDEuOSAxLjUtMS41IDIuNzQtMiA0LjUtMkE1LjUgNS41IDAgMCAxIDIyIDguNWMwIDIuMTItMS4zIDMuNzgtMi42NyA1LjE3IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/heart-off\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 HeartOff = createLucideIcon('HeartOff', [\n ['line', { x1: '2', y1: '2', x2: '22', y2: '22', key: '1w4vcy' }],\n [\n 'path',\n { d: 'M16.5 16.5 12 21l-7-7c-1.5-1.45-3-3.2-3-5.5a5.5 5.5 0 0 1 2.14-4.35', key: '3mpagl' },\n ],\n [\n 'path',\n {\n d: 'M8.76 3.1c1.15.22 2.13.78 3.24 1.9 1.5-1.5 2.74-2 4.5-2A5.5 5.5 0 0 1 22 8.5c0 2.12-1.3 3.78-2.67 5.17',\n key: '1gh3v3',\n },\n ],\n]);\n\nexport default HeartOff;\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,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAChE,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA,CAAE,CAAA,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAuE,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,QAAS,CAAA,CAAA;AAAA,CAC5F,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,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,20 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const ListOrdered = createLucideIcon("ListOrdered", [
["line", { x1: "10", x2: "21", y1: "6", y2: "6", key: "76qw6h" }],
["line", { x1: "10", x2: "21", y1: "12", y2: "12", key: "16nom4" }],
["line", { x1: "10", x2: "21", y1: "18", y2: "18", key: "u3jurt" }],
["path", { d: "M4 6h1v4", key: "cnovpq" }],
["path", { d: "M4 10h2", key: "16xx2s" }],
["path", { d: "M6 18H4c0-1 2-2 2-3s-1-1.5-2-1", key: "m9a95d" }]
]);
export { ListOrdered as default };
//# sourceMappingURL=list-ordered.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"text-cursor-input.js","sources":["../../../src/icons/text-cursor-input.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name TextCursorInput\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNSA0aDFhMyAzIDAgMCAxIDMgMyAzIDMgMCAwIDEgMy0zaDEiIC8+CiAgPHBhdGggZD0iTTEzIDIwaC0xYTMgMyAwIDAgMS0zLTMgMyAzIDAgMCAxLTMgM0g1IiAvPgogIDxwYXRoIGQ9Ik01IDE2SDRhMiAyIDAgMCAxLTItMnYtNGEyIDIgMCAwIDEgMi0yaDEiIC8+CiAgPHBhdGggZD0iTTEzIDhoN2EyIDIgMCAwIDEgMiAydjRhMiAyIDAgMCAxLTIgMmgtNyIgLz4KICA8cGF0aCBkPSJNOSA3djEwIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/text-cursor-input\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 TextCursorInput = createLucideIcon('TextCursorInput', [\n ['path', { d: 'M5 4h1a3 3 0 0 1 3 3 3 3 0 0 1 3-3h1', key: '18xjzo' }],\n ['path', { d: 'M13 20h-1a3 3 0 0 1-3-3 3 3 0 0 1-3 3H5', key: 'fj48gi' }],\n ['path', { d: 'M5 16H4a2 2 0 0 1-2-2v-4a2 2 0 0 1 2-2h1', key: '1n9rhb' }],\n ['path', { d: 'M13 8h7a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-7', key: '13ksps' }],\n ['path', { d: 'M9 7v10', key: '1vc8ob' }],\n]);\n\nexport default TextCursorInput;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAkB,iBAAiB,iBAAmB,CAAA,CAAA,CAAA;AAAA,CAAA,CAC1D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAwC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CACrE,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,CAA4C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CACzE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA4C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CACzE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC1C,CAAC,CAAA,CAAA;;"}

View File

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

View File

@@ -0,0 +1,33 @@
"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 view_base_exports = {};
__export(view_base_exports, {
PgViewBase: () => PgViewBase
});
module.exports = __toCommonJS(view_base_exports);
var import_entity = require("../entity.cjs");
var import_sql = require("../sql/sql.cjs");
class PgViewBase extends import_sql.View {
static [import_entity.entityKind] = "PgViewBase";
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
PgViewBase
});
//# sourceMappingURL=view-base.cjs.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../../src/utilities/telemetry/events/adminInit.ts"],"sourcesContent":["import type { Payload } from '../../../index.js'\nimport type { PayloadRequest } from '../../../types/index.js'\n\nimport { sendEvent } from '../index.js'\nimport { oneWayHash } from '../oneWayHash.js'\n\nexport type AdminInitEvent = {\n domainID?: string\n type: 'admin-init'\n userID?: string\n}\n\ntype Args = {\n headers: Request['headers']\n payload: Payload\n user: PayloadRequest['user']\n}\nexport const adminInit = ({ headers, payload, user }: Args): void => {\n const host = headers.get('host')\n\n let domainID: string\n let userID: string\n\n if (host) {\n domainID = oneWayHash(host, payload.secret)\n }\n\n if (user?.id) {\n userID = oneWayHash(String(user.id), payload.secret)\n }\n\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n sendEvent({\n event: {\n type: 'admin-init',\n domainID: domainID!,\n userID: userID!,\n },\n payload,\n })\n}\n"],"names":["sendEvent","oneWayHash","adminInit","headers","payload","user","host","get","domainID","userID","secret","id","String","event","type"],"mappings":"AAGA,SAASA,SAAS,QAAQ,cAAa;AACvC,SAASC,UAAU,QAAQ,mBAAkB;AAa7C,OAAO,MAAMC,YAAY,CAAC,EAAEC,OAAO,EAAEC,OAAO,EAAEC,IAAI,EAAQ;IACxD,MAAMC,OAAOH,QAAQI,GAAG,CAAC;IAEzB,IAAIC;IACJ,IAAIC;IAEJ,IAAIH,MAAM;QACRE,WAAWP,WAAWK,MAAMF,QAAQM,MAAM;IAC5C;IAEA,IAAIL,MAAMM,IAAI;QACZF,SAASR,WAAWW,OAAOP,KAAKM,EAAE,GAAGP,QAAQM,MAAM;IACrD;IAEA,mEAAmE;IACnEV,UAAU;QACRa,OAAO;YACLC,MAAM;YACNN,UAAUA;YACVC,QAAQA;QACV;QACAL;IACF;AACF,EAAC"}

View File

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

View File

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

View File

@@ -0,0 +1,37 @@
import { startOfMinute } from "./startOfMinute.js";
/**
* @name isSameMinute
* @category Minute Helpers
* @summary Are the given dates in the same minute (and hour and day)?
*
* @description
* Are the given dates in the same minute (and hour and day)?
*
* @param laterDate - The first date to check
* @param earlierDate - The second date to check
*
* @returns The dates are in the same minute (and hour and day)
*
* @example
* // Are 4 September 2014 06:30:00 and 4 September 2014 06:30:15 in the same minute?
* const result = isSameMinute(
* new Date(2014, 8, 4, 6, 30),
* new Date(2014, 8, 4, 6, 30, 15)
* )
* //=> true
*
* @example
* // Are 4 September 2014 06:30:00 and 5 September 2014 06:30:00 in the same minute?
* const result = isSameMinute(
* new Date(2014, 8, 4, 6, 30),
* new Date(2014, 8, 5, 6, 30)
* )
* //=> false
*/
export function isSameMinute(laterDate, earlierDate) {
return +startOfMinute(laterDate) === +startOfMinute(earlierDate);
}
// Fallback for modularized imports:
export default isSameMinute;

View File

@@ -0,0 +1,17 @@
import { RequestTransformer } from "../../types/request.cjs";
import { RestCommand } from "../types.cjs";
//#region src/rest/helpers/with-options.d.ts
/**
* Add arbitrary options to a fetch request
*
* @param getOptions
* @param onRequest
*
* @returns
*/
declare function withOptions<Schema, Output>(getOptions: RestCommand<Output, Schema>, extraOptions: RequestTransformer | Partial<RequestInit>): RestCommand<Output, Schema>;
//#endregion
export { withOptions };
//# sourceMappingURL=with-options.d.cts.map

View File

@@ -0,0 +1,70 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const core = require('@sentry/core');
const react = require('@sentry/react');
const parameterization = require('./parameterization.js');
/**
* Cache for ISR/SSG route checks. Exported for testing purposes.
* @internal
*/
const IS_ISR_SSG_ROUTE_CACHE = new core.LRUMap(100);
/**
* Check if the current page is an ISR/SSG route by checking the route manifest.
* @internal Exported for testing purposes.
*/
function isIsrSsgRoute(pathname) {
// Early parameterization to get the cache key
const parameterizedPath = parameterization.maybeParameterizeRoute(pathname);
const pathToCheck = parameterizedPath || pathname;
// Check cache using the parameterized path as the key
const cachedResult = IS_ISR_SSG_ROUTE_CACHE.get(pathToCheck);
if (cachedResult !== undefined) {
return cachedResult;
}
// Cache miss get the manifest
const manifest = parameterization.getManifest();
if (!manifest?.isrRoutes || !Array.isArray(manifest.isrRoutes) || manifest.isrRoutes.length === 0) {
IS_ISR_SSG_ROUTE_CACHE.set(pathToCheck, false);
return false;
}
const isIsrSsgRoute = manifest.isrRoutes.includes(pathToCheck);
IS_ISR_SSG_ROUTE_CACHE.set(pathToCheck, isIsrSsgRoute);
return isIsrSsgRoute;
}
/**
* Remove sentry-trace and baggage meta tags from the DOM if this is an ISR/SSG page.
* This prevents the browser tracing integration from using stale/cached trace IDs.
*/
function removeIsrSsgTraceMetaTags() {
if (!react.WINDOW.document || !isIsrSsgRoute(react.WINDOW.location.pathname)) {
return;
}
// Helper function to remove a meta tag
function removeMetaTag(metaName) {
try {
const meta = react.WINDOW.document.querySelector(`meta[name="${metaName}"]`);
if (meta) {
meta.remove();
}
} catch {
// ignore errors when removing the meta tag
}
}
// Remove the meta tags so browserTracingIntegration won't pick them up
removeMetaTag('sentry-trace');
removeMetaTag('baggage');
}
exports.IS_ISR_SSG_ROUTE_CACHE = IS_ISR_SSG_ROUTE_CACHE;
exports.isIsrSsgRoute = isIsrSsgRoute;
exports.removeIsrSsgTraceMetaTags = removeIsrSsgTraceMetaTags;
//# sourceMappingURL=isrRoutingTracing.js.map

View File

@@ -0,0 +1,24 @@
const notify = (node) => !node.isLayoutDirty && node.willUpdate(false);
function nodeGroup() {
const nodes = new Set();
const subscriptions = new WeakMap();
const dirtyAll = () => nodes.forEach(notify);
return {
add: (node) => {
nodes.add(node);
subscriptions.set(node, node.addEventListener("willUpdate", dirtyAll));
},
remove: (node) => {
nodes.delete(node);
const unsubscribe = subscriptions.get(node);
if (unsubscribe) {
unsubscribe();
subscriptions.delete(node);
}
dirtyAll();
},
dirty: dirtyAll,
};
}
export { nodeGroup };

View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2018 Terkel Gjervig Nielsen
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,516 @@
function _typeof(o) {"@babel/helpers - typeof";return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {return typeof o;} : function (o) {return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;}, _typeof(o);}function ownKeys(e, r) {var t = Object.keys(e);if (Object.getOwnPropertySymbols) {var o = Object.getOwnPropertySymbols(e);r && (o = o.filter(function (r) {return Object.getOwnPropertyDescriptor(e, r).enumerable;})), t.push.apply(t, o);}return t;}function _objectSpread(e) {for (var r = 1; r < arguments.length; r++) {var t = null != arguments[r] ? arguments[r] : {};r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {_defineProperty(e, r, t[r]);}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));});}return e;}function _defineProperty(obj, key, value) {key = _toPropertyKey(key);if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}function _toPropertyKey(t) {var i = _toPrimitive(t, "string");return "symbol" == _typeof(i) ? i : String(i);}function _toPrimitive(t, r) {if ("object" != _typeof(t) || !t) return t;var e = t[Symbol.toPrimitive];if (void 0 !== e) {var i = e.call(t, r || "default");if ("object" != _typeof(i)) return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return ("string" === r ? String : Number)(t);}(function (_window$dateFns) {var __defProp = Object.defineProperty;
var __export = function __export(target, all) {
for (var name in all)
__defProp(target, name, {
get: all[name],
enumerable: true,
configurable: true,
set: function set(newValue) {return all[name] = function () {return newValue;};}
});
};
// lib/locale/sq/_lib/formatDistance.mjs
var formatDistanceLocale = {
lessThanXSeconds: {
one: "m\xEB pak se nj\xEB sekond\xEB",
other: "m\xEB pak se {{count}} sekonda"
},
xSeconds: {
one: "1 sekond\xEB",
other: "{{count}} sekonda"
},
halfAMinute: "gjys\xEBm minuti",
lessThanXMinutes: {
one: "m\xEB pak se nj\xEB minute",
other: "m\xEB pak se {{count}} minuta"
},
xMinutes: {
one: "1 minut\xEB",
other: "{{count}} minuta"
},
aboutXHours: {
one: "rreth 1 or\xEB",
other: "rreth {{count}} or\xEB"
},
xHours: {
one: "1 or\xEB",
other: "{{count}} or\xEB"
},
xDays: {
one: "1 dit\xEB",
other: "{{count}} dit\xEB"
},
aboutXWeeks: {
one: "rreth 1 jav\xEB",
other: "rreth {{count}} jav\xEB"
},
xWeeks: {
one: "1 jav\xEB",
other: "{{count}} jav\xEB"
},
aboutXMonths: {
one: "rreth 1 muaj",
other: "rreth {{count}} muaj"
},
xMonths: {
one: "1 muaj",
other: "{{count}} muaj"
},
aboutXYears: {
one: "rreth 1 vit",
other: "rreth {{count}} vite"
},
xYears: {
one: "1 vit",
other: "{{count}} vite"
},
overXYears: {
one: "mbi 1 vit",
other: "mbi {{count}} vite"
},
almostXYears: {
one: "pothuajse 1 vit",
other: "pothuajse {{count}} vite"
}
};
var formatDistance = function formatDistance(token, count, options) {
var result;
var tokenValue = formatDistanceLocale[token];
if (typeof tokenValue === "string") {
result = tokenValue;
} else if (count === 1) {
result = tokenValue.one;
} else {
result = tokenValue.other.replace("{{count}}", String(count));
}
if (options !== null && options !== void 0 && options.addSuffix) {
if (options.comparison && options.comparison > 0) {
return "n\xEB " + result;
} else {
return result + " m\xEB par\xEB";
}
}
return result;
};
// lib/locale/_lib/buildFormatLongFn.mjs
function buildFormatLongFn(args) {
return function () {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var width = options.width ? String(options.width) : args.defaultWidth;
var format = args.formats[width] || args.formats[args.defaultWidth];
return format;
};
}
// lib/locale/sq/_lib/formatLong.mjs
var dateFormats = {
full: "EEEE, MMMM do, y",
long: "MMMM do, y",
medium: "MMM d, y",
short: "MM/dd/yyyy"
};
var timeFormats = {
full: "h:mm:ss a zzzz",
long: "h:mm:ss a z",
medium: "h:mm:ss a",
short: "h:mm a"
};
var dateTimeFormats = {
full: "{{date}} 'n\xEB' {{time}}",
long: "{{date}} 'n\xEB' {{time}}",
medium: "{{date}}, {{time}}",
short: "{{date}}, {{time}}"
};
var formatLong = {
date: buildFormatLongFn({
formats: dateFormats,
defaultWidth: "full"
}),
time: buildFormatLongFn({
formats: timeFormats,
defaultWidth: "full"
}),
dateTime: buildFormatLongFn({
formats: dateTimeFormats,
defaultWidth: "full"
})
};
// lib/locale/sq/_lib/formatRelative.mjs
var formatRelativeLocale = {
lastWeek: "'t\xEB' eeee 'e shkuar n\xEB' p",
yesterday: "'dje n\xEB' p",
today: "'sot n\xEB' p",
tomorrow: "'nes\xEBr n\xEB' p",
nextWeek: "eeee 'at' p",
other: "P"
};
var formatRelative = function formatRelative(token, _date, _baseDate, _options) {return formatRelativeLocale[token];};
// lib/locale/_lib/buildLocalizeFn.mjs
function buildLocalizeFn(args) {
return function (value, options) {
var context = options !== null && options !== void 0 && options.context ? String(options.context) : "standalone";
var valuesArray;
if (context === "formatting" && args.formattingValues) {
var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;
valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
} else {
var _defaultWidth = args.defaultWidth;
var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;
valuesArray = args.values[_width] || args.values[_defaultWidth];
}
var index = args.argumentCallback ? args.argumentCallback(value) : value;
return valuesArray[index];
};
}
// lib/locale/sq/_lib/localize.mjs
var eraValues = {
narrow: ["P", "M"],
abbreviated: ["PK", "MK"],
wide: ["Para Krishtit", "Mbas Krishtit"]
};
var quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
wide: ["4-mujori I", "4-mujori II", "4-mujori III", "4-mujori IV"]
};
var monthValues = {
narrow: ["J", "S", "M", "P", "M", "Q", "K", "G", "S", "T", "N", "D"],
abbreviated: [
"Jan",
"Shk",
"Mar",
"Pri",
"Maj",
"Qer",
"Kor",
"Gus",
"Sht",
"Tet",
"N\xEBn",
"Dhj"],
wide: [
"Janar",
"Shkurt",
"Mars",
"Prill",
"Maj",
"Qershor",
"Korrik",
"Gusht",
"Shtator",
"Tetor",
"N\xEBntor",
"Dhjetor"]
};
var dayValues = {
narrow: ["D", "H", "M", "M", "E", "P", "S"],
short: ["Di", "H\xEB", "Ma", "M\xEB", "En", "Pr", "Sh"],
abbreviated: ["Die", "H\xEBn", "Mar", "M\xEBr", "Enj", "Pre", "Sht"],
wide: ["Diel\xEB", "H\xEBn\xEB", "Mart\xEB", "M\xEBrkur\xEB", "Enjte", "Premte", "Shtun\xEB"]
};
var dayPeriodValues = {
narrow: {
am: "p",
pm: "m",
midnight: "m",
noon: "d",
morning: "m\xEBngjes",
afternoon: "dite",
evening: "mbr\xEBmje",
night: "nat\xEB"
},
abbreviated: {
am: "PD",
pm: "MD",
midnight: "mesn\xEBt\xEB",
noon: "drek",
morning: "m\xEBngjes",
afternoon: "mbasdite",
evening: "mbr\xEBmje",
night: "nat\xEB"
},
wide: {
am: "p.d.",
pm: "m.d.",
midnight: "mesn\xEBt\xEB",
noon: "drek",
morning: "m\xEBngjes",
afternoon: "mbasdite",
evening: "mbr\xEBmje",
night: "nat\xEB"
}
};
var formattingDayPeriodValues = {
narrow: {
am: "p",
pm: "m",
midnight: "m",
noon: "d",
morning: "n\xEB m\xEBngjes",
afternoon: "n\xEB mbasdite",
evening: "n\xEB mbr\xEBmje",
night: "n\xEB mesnat\xEB"
},
abbreviated: {
am: "PD",
pm: "MD",
midnight: "mesnat\xEB",
noon: "drek",
morning: "n\xEB m\xEBngjes",
afternoon: "n\xEB mbasdite",
evening: "n\xEB mbr\xEBmje",
night: "n\xEB mesnat\xEB"
},
wide: {
am: "p.d.",
pm: "m.d.",
midnight: "mesnat\xEB",
noon: "drek",
morning: "n\xEB m\xEBngjes",
afternoon: "n\xEB mbasdite",
evening: "n\xEB mbr\xEBmje",
night: "n\xEB mesnat\xEB"
}
};
var ordinalNumber = function ordinalNumber(dirtyNumber, options) {
var number = Number(dirtyNumber);
if ((options === null || options === void 0 ? void 0 : options.unit) === "hour")
return String(number);
if (number === 1)
return number + "-r\xEB";
if (number === 4)
return number + "t";
return number + "-t\xEB";
};
var localize = {
ordinalNumber: ordinalNumber,
era: buildLocalizeFn({
values: eraValues,
defaultWidth: "wide"
}),
quarter: buildLocalizeFn({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: function argumentCallback(quarter) {return quarter - 1;}
}),
month: buildLocalizeFn({
values: monthValues,
defaultWidth: "wide"
}),
day: buildLocalizeFn({
values: dayValues,
defaultWidth: "wide"
}),
dayPeriod: buildLocalizeFn({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide"
})
};
// lib/locale/_lib/buildMatchFn.mjs
function buildMatchFn(args) {
return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var width = options.width;
var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
var matchResult = string.match(matchPattern);
if (!matchResult) {
return null;
}
var matchedString = matchResult[0];
var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) {return pattern.test(matchedString);}) : findKey(parsePatterns, function (pattern) {return pattern.test(matchedString);});
var value;
value = args.valueCallback ? args.valueCallback(key) : key;
value = options.valueCallback ? options.valueCallback(value) : value;
var rest = string.slice(matchedString.length);
return { value: value, rest: rest };
};
}
var findKey = function findKey(object, predicate) {
for (var key in object) {
if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) {
return key;
}
}
return;
};
var findIndex = function findIndex(array, predicate) {
for (var key = 0; key < array.length; key++) {
if (predicate(array[key])) {
return key;
}
}
return;
};
// lib/locale/_lib/buildMatchPatternFn.mjs
function buildMatchPatternFn(args) {
return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var matchResult = string.match(args.matchPattern);
if (!matchResult)
return null;
var matchedString = matchResult[0];
var parseResult = string.match(args.parsePattern);
if (!parseResult)
return null;
var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
value = options.valueCallback ? options.valueCallback(value) : value;
var rest = string.slice(matchedString.length);
return { value: value, rest: rest };
};
}
// lib/locale/sq/_lib/match.mjs
var matchOrdinalNumberPattern = /^(\d+)(-rë|-të|t|)?/i;
var parseOrdinalNumberPattern = /\d+/i;
var matchEraPatterns = {
narrow: /^(p|m)/i,
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
wide: /^(para krishtit|mbas krishtit)/i
};
var parseEraPatterns = {
any: [/^b/i, /^(p|m)/i]
};
var matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^q[1234]/i,
wide: /^[1234]-mujori (i{1,3}|iv)/i
};
var parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i]
};
var matchMonthPatterns = {
narrow: /^[jsmpqkftnd]/i,
abbreviated: /^(jan|shk|mar|pri|maj|qer|kor|gus|sht|tet|nën|dhj)/i,
wide: /^(janar|shkurt|mars|prill|maj|qershor|korrik|gusht|shtator|tetor|nëntor|dhjetor)/i
};
var parseMonthPatterns = {
narrow: [
/^j/i,
/^s/i,
/^m/i,
/^p/i,
/^m/i,
/^q/i,
/^k/i,
/^g/i,
/^s/i,
/^t/i,
/^n/i,
/^d/i],
any: [
/^ja/i,
/^shk/i,
/^mar/i,
/^pri/i,
/^maj/i,
/^qer/i,
/^kor/i,
/^gu/i,
/^sht/i,
/^tet/i,
/^n/i,
/^d/i]
};
var matchDayPatterns = {
narrow: /^[dhmeps]/i,
short: /^(di|hë|ma|më|en|pr|sh)/i,
abbreviated: /^(die|hën|mar|mër|enj|pre|sht)/i,
wide: /^(dielë|hënë|martë|mërkurë|enjte|premte|shtunë)/i
};
var parseDayPatterns = {
narrow: [/^d/i, /^h/i, /^m/i, /^m/i, /^e/i, /^p/i, /^s/i],
any: [/^d/i, /^h/i, /^ma/i, /^më/i, /^e/i, /^p/i, /^s/i]
};
var matchDayPeriodPatterns = {
narrow: /^(p|m|me|në (mëngjes|mbasdite|mbrëmje|mesnatë))/i,
any: /^([pm]\.?\s?d\.?|drek|në (mëngjes|mbasdite|mbrëmje|mesnatë))/i
};
var parseDayPeriodPatterns = {
any: {
am: /^p/i,
pm: /^m/i,
midnight: /^me/i,
noon: /^dr/i,
morning: /mëngjes/i,
afternoon: /mbasdite/i,
evening: /mbrëmje/i,
night: /natë/i
}
};
var match = {
ordinalNumber: buildMatchPatternFn({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: function valueCallback(value) {return parseInt(value, 10);}
}),
era: buildMatchFn({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any"
}),
quarter: buildMatchFn({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: function valueCallback(index) {return index + 1;}
}),
month: buildMatchFn({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any"
}),
day: buildMatchFn({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any"
}),
dayPeriod: buildMatchFn({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any"
})
};
// lib/locale/sq.mjs
var sq = {
code: "sq",
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
options: {
weekStartsOn: 1,
firstWeekContainsDate: 1
}
};
// lib/locale/sq/cdn.js
window.dateFns = _objectSpread(_objectSpread({},
window.dateFns), {}, {
locale: _objectSpread(_objectSpread({}, (_window$dateFns =
window.dateFns) === null || _window$dateFns === void 0 ? void 0 : _window$dateFns.locale), {}, {
sq: sq }) });
//# debugId=71287E84DF886B2564756e2164756e21
})();
//# sourceMappingURL=cdn.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","names":["React","PayloadIcon","fill","fillFromProps","_jsxs","className","height","viewBox","width","xmlns","_jsx","d"],"sources":["../../../src/graphics/Icon/index.tsx"],"sourcesContent":["import React from 'react'\n\nexport const PayloadIcon: React.FC<{\n fill?: string\n}> = ({ fill: fillFromProps }) => {\n const fill = fillFromProps || 'var(--theme-elevation-1000)'\n\n return (\n <svg\n className=\"graphic-icon\"\n height=\"100%\"\n viewBox=\"0 0 25 25\"\n width=\"100%\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M11.8673 21.2336L4.40922 16.9845C4.31871 16.9309 4.25837 16.8355 4.25837 16.7282V10.1609C4.25837 10.0477 4.38508 9.97616 4.48162 10.0298L13.1404 14.9642C13.2611 15.0358 13.412 14.9464 13.412 14.8093V11.6091C13.412 11.4839 13.3456 11.3647 13.2309 11.2992L2.81624 5.36353C2.72573 5.30989 2.60505 5.30989 2.51454 5.36353L1.15085 6.14422C1.06034 6.19786 1 6.29321 1 6.40048V18.5995C1 18.7068 1.06034 18.8021 1.15085 18.8558L11.8491 24.9583C11.9397 25.0119 12.0603 25.0119 12.1509 24.9583L21.1355 19.8331C21.2562 19.7616 21.2562 19.5948 21.1355 19.5232L18.3357 17.9261C18.2211 17.8605 18.0883 17.8605 17.9737 17.9261L12.175 21.2336C12.0845 21.2872 11.9638 21.2872 11.8733 21.2336H11.8673Z\"\n fill={fill}\n />\n <path\n d=\"M22.8491 6.13827L12.1508 0.0417218C12.0603 -0.0119135 11.9397 -0.0119135 11.8491 0.0417218L6.19528 3.2658C6.0746 3.33731 6.0746 3.50418 6.19528 3.57569L8.97092 5.16091C9.08557 5.22647 9.21832 5.22647 9.33296 5.16091L11.8672 3.71872C11.9578 3.66508 12.0784 3.66508 12.1689 3.71872L19.627 7.96782C19.7175 8.02146 19.7778 8.11681 19.7778 8.22408V14.8212C19.7778 14.9464 19.8442 15.0656 19.9589 15.1311L22.7345 16.7104C22.8552 16.7819 23.006 16.6925 23.006 16.5554V6.40048C23.006 6.29321 22.9457 6.19786 22.8552 6.14423L22.8491 6.13827Z\"\n fill={fill}\n />\n </svg>\n )\n}\n"],"mappings":";AAAA,OAAOA,KAAA,MAAW;AAElB,OAAO,MAAMC,WAAA,GAERA,CAAC;EAAEC,IAAA,EAAMC;AAAa,CAAE;EAC3B,MAAMD,IAAA,GAAOC,aAAA,IAAiB;EAE9B,oBACEC,KAAA,CAAC;IACCC,SAAA,EAAU;IACVC,MAAA,EAAO;IACPC,OAAA,EAAQ;IACRC,KAAA,EAAM;IACNC,KAAA,EAAM;4BAENC,IAAA,CAAC;MACCC,CAAA,EAAE;MACFT,IAAA,EAAMA;qBAERQ,IAAA,CAAC;MACCC,CAAA,EAAE;MACFT,IAAA,EAAMA;;;AAId","ignoreList":[]}

View File

@@ -0,0 +1,75 @@
/*
* 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 { getGlobal, registerGlobal, unregisterGlobal, } from '../internal/global-utils';
import { ProxyTracerProvider } from '../trace/ProxyTracerProvider';
import { isSpanContextValid, wrapSpanContext, } from '../trace/spancontext-utils';
import { deleteSpan, getActiveSpan, getSpan, getSpanContext, setSpan, setSpanContext, } from '../trace/context-utils';
import { DiagAPI } from './diag';
const API_NAME = 'trace';
/**
* Singleton object which represents the entry point to the OpenTelemetry Tracing API
*/
export class TraceAPI {
/** Empty private constructor prevents end users from constructing a new instance of the API */
constructor() {
this._proxyTracerProvider = new ProxyTracerProvider();
this.wrapSpanContext = wrapSpanContext;
this.isSpanContextValid = isSpanContextValid;
this.deleteSpan = deleteSpan;
this.getSpan = getSpan;
this.getActiveSpan = getActiveSpan;
this.getSpanContext = getSpanContext;
this.setSpan = setSpan;
this.setSpanContext = setSpanContext;
}
/** Get the singleton instance of the Trace API */
static getInstance() {
if (!this._instance) {
this._instance = new TraceAPI();
}
return this._instance;
}
/**
* Set the current global tracer.
*
* @returns true if the tracer provider was successfully registered, else false
*/
setGlobalTracerProvider(provider) {
const success = registerGlobal(API_NAME, this._proxyTracerProvider, DiagAPI.instance());
if (success) {
this._proxyTracerProvider.setDelegate(provider);
}
return success;
}
/**
* Returns the global tracer provider.
*/
getTracerProvider() {
return getGlobal(API_NAME) || this._proxyTracerProvider;
}
/**
* Returns a tracer from the global tracer provider.
*/
getTracer(name, version) {
return this.getTracerProvider().getTracer(name, version);
}
/** Remove the global tracer provider */
disable() {
unregisterGlobal(API_NAME, DiagAPI.instance());
this._proxyTracerProvider = new ProxyTracerProvider();
}
}
//# sourceMappingURL=trace.js.map

View File

@@ -0,0 +1,72 @@
import type { I18nClient } from '@payloadcms/translations';
import type { ClientField, Field, FieldTypes, Tab } from '../../fields/config/types.js';
import type { ClientFieldWithOptionalType, PayloadRequest, SanitizedFieldPermissions, SanitizedFieldsPermissions } from '../../index.js';
export type VersionTab = {
fields: VersionField[];
name?: string;
} & Pick<Tab, 'label'>;
export type BaseVersionField = {
CustomComponent?: React.ReactNode;
fields: VersionField[];
path: string;
rows?: VersionField[][];
schemaPath: string;
tabs?: VersionTab[];
type: FieldTypes;
};
export type VersionField = {
field?: BaseVersionField;
fieldByLocale?: Record<string, BaseVersionField>;
};
/**
* Taken from react-diff-viewer-continued
*
* @deprecated remove in 4.0 - react-diff-viewer-continued is no longer a dependency
*/
export declare enum DiffMethod {
CHARS = "diffChars",
CSS = "diffCss",
JSON = "diffJson",
LINES = "diffLines",
SENTENCES = "diffSentences",
TRIMMED_LINES = "diffTrimmedLines",
WORDS = "diffWords",
WORDS_WITH_SPACE = "diffWordsWithSpace"
}
export type FieldDiffClientProps<TClientField extends ClientFieldWithOptionalType = ClientField> = {
baseVersionField: BaseVersionField;
/**
* Field value from the version being compared from
*/
comparisonValue: unknown;
/**
* @deprecated remove in 4.0. react-diff-viewer-continued is no longer a dependency
*/
diffMethod: any;
field: TClientField;
/**
* Permissions at this level of the field. If this field is unnamed, this will be `SanitizedFieldsPermissions` - if it is named, it will be `SanitizedFieldPermissions`
*/
fieldPermissions: SanitizedFieldPermissions | SanitizedFieldsPermissions;
/**
* If this field is localized, this will be the locale of the field
*/
locale?: string;
nestingLevel?: number;
parentIsLocalized: boolean;
/**
* Field value from the version being compared to
*
*/
versionValue: unknown;
};
export type FieldDiffServerProps<TField extends Field = Field, TClientField extends ClientFieldWithOptionalType = ClientField> = {
clientField: TClientField;
field: TField;
i18n: I18nClient;
req: PayloadRequest;
selectedLocales: string[];
} & Omit<FieldDiffClientProps, 'field'>;
export type FieldDiffClientComponent<TFieldClient extends ClientFieldWithOptionalType = ClientFieldWithOptionalType> = React.ComponentType<FieldDiffClientProps<TFieldClient>>;
export type FieldDiffServerComponent<TFieldServer extends Field = Field, TFieldClient extends ClientFieldWithOptionalType = ClientFieldWithOptionalType> = React.ComponentType<FieldDiffServerProps<TFieldServer, TFieldClient>>;
//# sourceMappingURL=Diff.d.ts.map

View File

@@ -0,0 +1,5 @@
import { ono } from "./singleton";
export { Ono } from "./constructor";
export * from "./types";
export { ono };
export default ono;

View File

@@ -0,0 +1,70 @@
pre[data-line] {
position: relative;
padding: 1em 0 1em 3em;
}
.line-highlight {
position: absolute;
left: 0;
right: 0;
padding: inherit 0;
margin-top: 1em; /* Same as .prisms padding-top */
background: hsla(24, 20%, 50%,.08);
background: linear-gradient(to right, hsla(24, 20%, 50%,.1) 70%, hsla(24, 20%, 50%,0));
pointer-events: none;
line-height: inherit;
white-space: pre;
}
@media print {
.line-highlight {
/*
* This will prevent browsers from replacing the background color with white.
* It's necessary because the element is layered on top of the displayed code.
*/
-webkit-print-color-adjust: exact;
color-adjust: exact;
}
}
.line-highlight:before,
.line-highlight[data-end]:after {
content: attr(data-start);
position: absolute;
top: .4em;
left: .6em;
min-width: 1em;
padding: 0 .5em;
background-color: hsla(24, 20%, 50%,.4);
color: hsl(24, 20%, 95%);
font: bold 65%/1.5 sans-serif;
text-align: center;
vertical-align: .3em;
border-radius: 999px;
text-shadow: none;
box-shadow: 0 1px white;
}
.line-highlight[data-end]:after {
content: attr(data-end);
top: auto;
bottom: .4em;
}
.line-numbers .line-highlight:before,
.line-numbers .line-highlight:after {
content: none;
}
pre[id].linkable-line-numbers span.line-numbers-rows {
pointer-events: all;
}
pre[id].linkable-line-numbers span.line-numbers-rows > span:before {
cursor: pointer;
}
pre[id].linkable-line-numbers span.line-numbers-rows > span:hover:before {
background-color: rgba(128, 128, 128, .2);
}

View File

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

View File

@@ -0,0 +1,26 @@
import type { ColumnBuilderBaseConfig } from "../../column-builder.js";
import type { ColumnBaseConfig } from "../../column.js";
import { entityKind } from "../../entity.js";
import type { AnyGelTable } from "../table.js";
import { GelColumn, GelColumnBuilder } from "./common.js";
export type GelDecimalBuilderInitial<TName extends string> = GelDecimalBuilder<{
name: TName;
dataType: 'string';
columnType: 'GelDecimal';
data: string;
driverParam: string;
enumValues: undefined;
}>;
export declare class GelDecimalBuilder<T extends ColumnBuilderBaseConfig<'string', 'GelDecimal'>> extends GelColumnBuilder<T> {
static readonly [entityKind]: string;
constructor(name: T['name']);
}
export declare class GelDecimal<T extends ColumnBaseConfig<'string', 'GelDecimal'>> extends GelColumn<T> {
static readonly [entityKind]: string;
constructor(table: AnyGelTable<{
name: T['tableName'];
}>, config: GelDecimalBuilder<T>['config']);
getSQLType(): string;
}
export declare function decimal(): GelDecimalBuilderInitial<''>;
export declare function decimal<TName extends string>(name: TName): GelDecimalBuilderInitial<TName>;

View File

@@ -0,0 +1 @@
{"version":3,"file":"items.js","names":[],"sources":["../../../../src/rest/commands/read/items.ts"],"sourcesContent":["import type { ApplyQueryFields, CollectionType, Query, QueryItem, RegularCollections } from '../../../types/index.js';\nimport type { RestCommand } from '../../types.js';\nimport { throwIfCoreCollection, throwIfEmpty } from '../../utils/index.js';\n\nexport type ReadItemOutput<\n\tSchema,\n\tCollection extends RegularCollections<Schema>,\n\tTQuery extends Query<Schema, CollectionType<Schema, Collection>>,\n> = ApplyQueryFields<Schema, CollectionType<Schema, Collection>, TQuery['fields']>;\n\n/**\n * List all items that exist in Directus.\n *\n * @param collection The collection of the items\n * @param query The query parameters\n *\n * @returns An array of up to limit item objects. If no items are available, data will be an empty array.\n * @throws Will throw if collection is a core collection\n * @throws Will throw if collection is empty\n */\nexport const readItems =\n\t<\n\t\tSchema,\n\t\tCollection extends RegularCollections<Schema>,\n\t\tconst TQuery extends Query<Schema, CollectionType<Schema, Collection>>,\n\t>(\n\t\tcollection: Collection,\n\t\tquery?: TQuery,\n\t): RestCommand<ReadItemOutput<Schema, Collection, TQuery>[], Schema> =>\n\t() => {\n\t\tthrowIfEmpty(String(collection), 'Collection cannot be empty');\n\t\tthrowIfCoreCollection(collection, 'Cannot use readItems for core collections');\n\n\t\treturn {\n\t\t\tpath: `/items/${collection as string}`,\n\t\t\tparams: query ?? {},\n\t\t\tmethod: 'GET',\n\t\t};\n\t};\n\n/**\n * Get an item that exists in Directus.\n *\n * @param collection The collection of the item\n * @param key The primary key of the item\n * @param query The query parameters\n *\n * @returns Returns an item object if a valid primary key was provided.\n * @throws Will throw if collection is a core collection\n * @throws Will throw if collection is empty\n * @throws Will throw if key is empty\n */\nexport const readItem =\n\t<\n\t\tSchema,\n\t\tCollection extends RegularCollections<Schema>,\n\t\tconst TQuery extends QueryItem<Schema, CollectionType<Schema, Collection>>,\n\t>(\n\t\tcollection: Collection,\n\t\tkey: string | number,\n\t\tquery?: TQuery,\n\t): RestCommand<ReadItemOutput<Schema, Collection, TQuery>, Schema> =>\n\t() => {\n\t\tthrowIfEmpty(String(collection), 'Collection cannot be empty');\n\t\tthrowIfCoreCollection(collection, 'Cannot use readItem for core collections');\n\t\tthrowIfEmpty(String(key), 'Key cannot be empty');\n\n\t\treturn {\n\t\t\tpath: `/items/${collection as string}/${key}`,\n\t\t\tparams: query ?? {},\n\t\t\tmethod: 'GET',\n\t\t};\n\t};\n"],"mappings":"0IAoBA,MAAa,GAMX,EACA,SAGA,EAAa,OAAO,EAAW,CAAE,6BAA6B,CAC9D,EAAsB,EAAY,4CAA4C,CAEvE,CACN,KAAM,UAAU,IAChB,OAAQ,GAAS,EAAE,CACnB,OAAQ,MACR,EAeU,GAMX,EACA,EACA,SAGA,EAAa,OAAO,EAAW,CAAE,6BAA6B,CAC9D,EAAsB,EAAY,2CAA2C,CAC7E,EAAa,OAAO,EAAI,CAAE,sBAAsB,CAEzC,CACN,KAAM,UAAU,EAAqB,GAAG,IACxC,OAAQ,GAAS,EAAE,CACnB,OAAQ,MACR"}

View File

@@ -0,0 +1 @@
{"version":3,"names":["_nullishReceiverError","r","TypeError"],"sources":["../../src/helpers/nullishReceiverError.js"],"sourcesContent":["/* @minVersion 7.22.6 */\n\n// eslint-disable-next-line no-unused-vars\nexport default function _nullishReceiverError(r) {\n throw new TypeError(\"Cannot set property of null or undefined.\");\n}\n"],"mappings":";;;;;;AAGe,SAASA,qBAAqBA,CAACC,CAAC,EAAE;EAC/C,MAAM,IAAIC,SAAS,CAAC,2CAA2C,CAAC;AAClE","ignoreList":[]}

View File

@@ -0,0 +1,41 @@
import type { CollectionConfig } from '../collections/config/types.js';
import type { GlobalConfig } from '../globals/config/types.js';
import type { Autosave, SanitizedDrafts } from '../versions/types.js';
type EntityConfig = Pick<CollectionConfig | GlobalConfig, 'versions'>;
/**
* Check if an entity has drafts enabled
*/
export declare const hasDraftsEnabled: (config: EntityConfig) => boolean;
/**
* Check if an entity has localized status enabled
*/
export declare const hasLocalizeStatusEnabled: (config: EntityConfig) => boolean;
/**
* Check if an entity has autosave enabled
*/
export declare const hasAutosaveEnabled: (config: EntityConfig) => config is {
versions: {
drafts: {
autosave: Autosave | false;
};
};
} & EntityConfig;
/**
* Check if an entity has validate drafts enabled
*/
export declare const hasDraftValidationEnabled: (config: EntityConfig) => boolean;
export declare const hasScheduledPublishEnabled: (config: EntityConfig) => config is {
versions: {
drafts: {
schedulePublish: SanitizedDrafts["schedulePublish"];
};
};
} & EntityConfig;
/**
* Get the maximum number of versions to keep for an entity
* Returns maxPerDoc for collections or max for globals
*/
export declare const getVersionsMax: (config: EntityConfig) => number;
export declare const getAutosaveInterval: (config: EntityConfig) => number;
export {};
//# sourceMappingURL=getVersionsConfig.d.ts.map

View File

@@ -0,0 +1 @@
module.exports={C:{"5":0.06544,"52":0.00503,"59":0.00503,"60":0.00503,"61":0.00503,"69":0.00503,"72":0.01007,"73":0.00503,"84":0.00503,"114":0.00503,"115":0.2819,"123":0.00503,"127":0.02014,"128":0.00503,"135":0.00503,"139":0.00503,"140":0.06041,"141":0.0151,"142":0.0151,"143":0.02517,"144":0.0302,"145":0.65945,"146":1.42966,"147":0.01007,_:"2 3 4 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 53 54 55 56 57 58 62 63 64 65 66 67 68 70 71 74 75 76 77 78 79 80 81 82 83 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 116 117 118 119 120 121 122 124 125 126 129 130 131 132 133 134 136 137 138 148 149 3.5 3.6"},D:{"27":0.00503,"47":0.00503,"48":0.00503,"56":0.00503,"58":0.00503,"63":0.02014,"64":0.00503,"66":0.00503,"69":0.07551,"70":0.01007,"71":0.00503,"72":0.00503,"73":0.0151,"74":0.00503,"75":0.01007,"76":0.0151,"77":0.01007,"79":0.02517,"80":0.00503,"81":0.00503,"83":0.02014,"84":0.02517,"85":0.00503,"86":0.01007,"87":0.04531,"88":0.00503,"89":0.0151,"90":0.0151,"91":0.00503,"92":0.00503,"93":0.02014,"94":0.00503,"95":0.00503,"98":0.04531,"100":0.01007,"101":0.02014,"102":0.0302,"103":0.29197,"104":0.23156,"105":0.2215,"106":0.22653,"107":0.2366,"108":0.21143,"109":1.0219,"110":0.2366,"111":0.34231,"112":10.90868,"114":0.02517,"115":0.02014,"116":0.49333,"117":0.20639,"119":0.06544,"120":0.24667,"122":0.10068,"123":0.00503,"124":0.24163,"125":0.16612,"126":3.0506,"127":0.01007,"128":0.02517,"129":0.02014,"130":0.02517,"131":0.49837,"132":0.12082,"133":0.44299,"134":0.02517,"135":0.03524,"136":0.02517,"137":0.0302,"138":0.2366,"139":0.18626,"140":0.08558,"141":0.16612,"142":3.78053,"143":8.31617,"144":0.0151,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 49 50 51 52 53 54 55 57 59 60 61 62 65 67 68 78 96 97 99 113 118 121 145 146"},F:{"40":0.00503,"46":0.02517,"53":0.00503,"56":0.00503,"67":0.00503,"90":0.0151,"93":0.04027,"95":0.06544,"102":0.00503,"119":0.00503,"120":0.02014,"122":0.02014,"123":0.0151,"124":0.87592,"125":1.10245,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 41 42 43 44 45 47 48 49 50 51 52 54 55 57 58 60 62 63 64 65 66 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 91 92 94 96 97 98 99 100 101 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 121 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"12":0.00503,"15":0.01007,"18":0.02014,"85":0.00503,"89":0.01007,"90":0.01007,"92":0.05537,"96":0.00503,"109":0.01007,"113":0.00503,"114":0.00503,"122":0.00503,"124":0.00503,"126":0.00503,"128":0.01007,"131":0.00503,"133":0.00503,"135":0.00503,"136":0.00503,"137":0.00503,"138":0.0151,"139":0.01007,"140":0.0151,"141":0.05034,"142":0.69973,"143":2.74353,_:"13 14 16 17 79 80 81 83 84 86 87 88 91 93 94 95 97 98 99 100 101 102 103 104 105 106 107 108 110 111 112 115 116 117 118 119 120 121 123 125 127 129 130 132 134"},E:{_:"0 4 5 6 7 8 9 10 11 12 13 14 15 3.1 3.2 6.1 7.1 9.1 10.1 12.1 15.2-15.3 15.4 16.0 16.1 16.2 16.3 16.4 16.5 17.0 17.2 17.3 17.5 18.1 18.2 18.4 26.0 26.3","5.1":0.00503,"11.1":0.00503,"13.1":0.02517,"14.1":0.0151,"15.1":0.00503,"15.5":0.00503,"15.6":0.06544,"16.6":0.02517,"17.1":0.01007,"17.4":0.00503,"17.6":0.04531,"18.0":0.00503,"18.3":0.00503,"18.5-18.6":0.00503,"26.1":0.06544,"26.2":0.0151},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00085,"5.0-5.1":0,"6.0-6.1":0.0017,"7.0-7.1":0.00127,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.00339,"10.0-10.2":0.00042,"10.3":0.00594,"11.0-11.2":0.07294,"11.3-11.4":0.00212,"12.0-12.1":0.0017,"12.2-12.5":0.01908,"13.0-13.1":0.00042,"13.2":0.00297,"13.3":0.00085,"13.4-13.7":0.00297,"14.0-14.4":0.00594,"14.5-14.8":0.00636,"15.0-15.1":0.00679,"15.2-15.3":0.00509,"15.4":0.00551,"15.5":0.00594,"15.6-15.8":0.09203,"16.0":0.0106,"16.1":0.02036,"16.2":0.0106,"16.3":0.01908,"16.4":0.00467,"16.5":0.00806,"16.6-16.7":0.1196,"17.0":0.00679,"17.1":0.01103,"17.2":0.00806,"17.3":0.0123,"17.4":0.02078,"17.5":0.04071,"17.6-17.7":0.09415,"18.0":0.0212,"18.1":0.04411,"18.2":0.02333,"18.3":0.07591,"18.4":0.03902,"18.5-18.7":2.80158,"26.0":0.05471,"26.1":0.45506,"26.2":0.08652,"26.3":0.00382},P:{"4":0.06225,"25":0.01038,"26":0.02075,"27":0.0415,"28":0.03113,"29":0.23863,_:"20 21 22 23 24 8.2 10.1 11.1-11.2 12.0 13.0 14.0 16.0 17.0 18.0 19.0","5.0-5.4":0.01038,"6.2-6.4":0.01038,"7.2-7.4":0.01038,"9.2":0.13488,"15.0":0.01038},I:{"0":0.13883,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0.00003,"4.4":0,"4.4.3-4.4.4":0.00011},A:{_:"6 7 8 9 10 11 5.5"},K:{"0":1.85443,_:"10 11 12 11.1 11.5 12.1"},N:{_:"10 11"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},Q:{"14.9":0.00497},O:{"0":0.07946},H:{"0":0.42},L:{"0":48.36567},R:{_:"0"},M:{"0":0.07449}};

View File

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

View File

@@ -0,0 +1,17 @@
import { emailDefaults } from './defaults.js';
import { getStringifiedToAddress } from './getStringifiedToAddress.js';
export const consoleEmailAdapter = ({ payload })=>({
name: 'console',
defaultFromAddress: emailDefaults.defaultFromAddress,
defaultFromName: emailDefaults.defaultFromName,
sendEmail: async (message)=>{
const stringifiedTo = getStringifiedToAddress(message);
const res = `Email attempted without being configured. To: '${stringifiedTo}', Subject: '${message.subject}'`;
payload.logger.info({
msg: res
});
return Promise.resolve();
}
});
//# sourceMappingURL=consoleEmailAdapter.js.map

View File

@@ -0,0 +1,238 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const core = require('@sentry/core');
const types = require('../types.js');
const instrument = require('./instrument.js');
const utils = require('./utils.js');
const LAST_INTERACTIONS = [];
const INTERACTIONS_SPAN_MAP = new Map();
// Map to store element names by timestamp, since we get the DOM event before the PerformanceObserver entry
const ELEMENT_NAME_TIMESTAMP_MAP = new Map();
/**
* 60 seconds is the maximum for a plausible INP value
* (source: Me)
*/
const MAX_PLAUSIBLE_INP_DURATION = 60;
/**
* Start tracking INP webvital events.
*/
function startTrackingINP() {
const performance = utils.getBrowserPerformanceAPI();
if (performance && core.browserPerformanceTimeOrigin()) {
const inpCallback = _trackINP();
return () => {
inpCallback();
};
}
return () => undefined;
}
const INP_ENTRY_MAP = {
click: 'click',
pointerdown: 'click',
pointerup: 'click',
mousedown: 'click',
mouseup: 'click',
touchstart: 'click',
touchend: 'click',
mouseover: 'hover',
mouseout: 'hover',
mouseenter: 'hover',
mouseleave: 'hover',
pointerover: 'hover',
pointerout: 'hover',
pointerenter: 'hover',
pointerleave: 'hover',
dragstart: 'drag',
dragend: 'drag',
drag: 'drag',
dragenter: 'drag',
dragleave: 'drag',
dragover: 'drag',
drop: 'drag',
keydown: 'press',
keyup: 'press',
keypress: 'press',
input: 'press',
};
/** Starts tracking the Interaction to Next Paint on the current page. #
* exported only for testing
*/
function _trackINP() {
return instrument.addInpInstrumentationHandler(_onInp);
}
/**
* exported only for testing
*/
const _onInp = ({ metric }) => {
if (metric.value == undefined) {
return;
}
const duration = utils.msToSec(metric.value);
// We received occasional reports of hour-long INP values.
// Therefore, we add a sanity check to avoid creating spans for
// unrealistically long INP durations.
if (duration > MAX_PLAUSIBLE_INP_DURATION) {
return;
}
const entry = metric.entries.find(entry => entry.duration === metric.value && INP_ENTRY_MAP[entry.name]);
if (!entry) {
return;
}
const { interactionId } = entry;
const interactionType = INP_ENTRY_MAP[entry.name];
/** Build the INP span, create an envelope from the span, and then send the envelope */
const startTime = utils.msToSec((core.browserPerformanceTimeOrigin() ) + entry.startTime);
const activeSpan = core.getActiveSpan();
const rootSpan = activeSpan ? core.getRootSpan(activeSpan) : undefined;
// We first try to lookup the interaction context from our INTERACTIONS_SPAN_MAP,
// where we cache the route and element name per interactionId
const cachedInteractionContext = interactionId != null ? INTERACTIONS_SPAN_MAP.get(interactionId) : undefined;
const spanToUse = cachedInteractionContext?.span || rootSpan;
// Else, we try to use the active span.
// Finally, we fall back to look at the transactionName on the scope
const routeName = spanToUse ? core.spanToJSON(spanToUse).description : core.getCurrentScope().getScopeData().transactionName;
const name = cachedInteractionContext?.elementName || core.htmlTreeAsString(entry.target);
const attributes = {
[core.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.browser.inp',
[core.SEMANTIC_ATTRIBUTE_SENTRY_OP]: `ui.interaction.${interactionType}`,
[core.SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME]: entry.duration,
};
const span = utils.startStandaloneWebVitalSpan({
name,
transaction: routeName,
attributes,
startTime,
});
if (span) {
span.addEvent('inp', {
[core.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT]: 'millisecond',
[core.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE]: metric.value,
});
span.end(startTime + duration);
}
};
/**
* Register a listener to cache route information for INP interactions.
*/
function registerInpInteractionListener() {
// Listen for all interaction events that could contribute to INP
const interactionEvents = Object.keys(INP_ENTRY_MAP);
if (core.isBrowser()) {
interactionEvents.forEach(eventType => {
types.WINDOW.addEventListener(eventType, captureElementFromEvent, { capture: true, passive: true });
});
}
/**
* Captures the element name from a DOM event and stores it in the ELEMENT_NAME_TIMESTAMP_MAP.
*/
function captureElementFromEvent(event) {
const target = event.target ;
if (!target) {
return;
}
const elementName = core.htmlTreeAsString(target);
const timestamp = Math.round(event.timeStamp);
// Store the element name by timestamp so we can match it with the PerformanceEntry
ELEMENT_NAME_TIMESTAMP_MAP.set(timestamp, elementName);
// Clean up old
if (ELEMENT_NAME_TIMESTAMP_MAP.size > 50) {
const firstKey = ELEMENT_NAME_TIMESTAMP_MAP.keys().next().value;
if (firstKey !== undefined) {
ELEMENT_NAME_TIMESTAMP_MAP.delete(firstKey);
}
}
}
/**
* Tries to get the element name from the timestamp map.
*/
function resolveElementNameFromEntry(entry) {
const timestamp = Math.round(entry.startTime);
let elementName = ELEMENT_NAME_TIMESTAMP_MAP.get(timestamp);
// try nearby timestamps (±5ms)
if (!elementName) {
for (let offset = -5; offset <= 5; offset++) {
const nearbyName = ELEMENT_NAME_TIMESTAMP_MAP.get(timestamp + offset);
if (nearbyName) {
elementName = nearbyName;
break;
}
}
}
return elementName || '<unknown>';
}
const handleEntries = ({ entries }) => {
const activeSpan = core.getActiveSpan();
const activeRootSpan = activeSpan && core.getRootSpan(activeSpan);
entries.forEach(entry => {
if (!instrument.isPerformanceEventTiming(entry)) {
return;
}
const interactionId = entry.interactionId;
if (interactionId == null) {
return;
}
// If the interaction was already recorded before, nothing more to do
if (INTERACTIONS_SPAN_MAP.has(interactionId)) {
return;
}
const elementName = entry.target ? core.htmlTreeAsString(entry.target) : resolveElementNameFromEntry(entry);
// We keep max. 10 interactions in the list, then remove the oldest one & clean up
if (LAST_INTERACTIONS.length > 10) {
const last = LAST_INTERACTIONS.shift() ;
INTERACTIONS_SPAN_MAP.delete(last);
}
// We add the interaction to the list of recorded interactions
// and store both the span and element name for this interaction
LAST_INTERACTIONS.push(interactionId);
INTERACTIONS_SPAN_MAP.set(interactionId, {
span: activeRootSpan,
elementName,
});
});
};
instrument.addPerformanceInstrumentationHandler('event', handleEntries);
instrument.addPerformanceInstrumentationHandler('first-input', handleEntries);
}
exports._onInp = _onInp;
exports._trackINP = _trackINP;
exports.registerInpInteractionListener = registerInpInteractionListener;
exports.startTrackingINP = startTrackingINP;
//# sourceMappingURL=inp.js.map

View File

@@ -0,0 +1,38 @@
import { useCallback } from 'react';
import { isRefObject } from '../../utils/is-ref-object.mjs';
/**
* Creates a ref function that, when called, hydrates the provided
* external ref and VisualElement.
*/
function useMotionRef(visualState, visualElement, externalRef) {
return useCallback((instance) => {
if (instance) {
visualState.onMount && visualState.onMount(instance);
}
if (visualElement) {
if (instance) {
visualElement.mount(instance);
}
else {
visualElement.unmount();
}
}
if (externalRef) {
if (typeof externalRef === "function") {
externalRef(instance);
}
else if (isRefObject(externalRef)) {
externalRef.current = instance;
}
}
},
/**
* Only pass a new ref callback to React if we've received a visual element
* factory. Otherwise we'll be mounting/remounting every time externalRef
* or other dependencies change.
*/
[visualElement]);
}
export { useMotionRef };

View File

@@ -0,0 +1,4 @@
import { createTailwindMerge } from './create-tailwind-merge'
import { getDefaultConfig } from './default-config'
export const twMerge = createTailwindMerge(getDefaultConfig)

View File

@@ -0,0 +1,13 @@
import baseConfig from './config.base.js';
import { terser } from 'rollup-plugin-terser';
import pkg from './packageJson.js';
export default {
...baseConfig,
output: {
...baseConfig.output,
file: pkg.browser.replace('umd', 'min'),
format: 'umd',
},
plugins: [...baseConfig.plugins, terser()],
};

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/collections/endpoints/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAkBrD,eAAO,MAAM,0BAA0B,EAAE,QAAQ,EA0EhD,CAAA"}

View File

@@ -0,0 +1,26 @@
import type { ColumnBuilderBaseConfig } from "../../column-builder.js";
import type { ColumnBaseConfig } from "../../column.js";
import { entityKind } from "../../entity.js";
import { SingleStoreColumnBuilderWithAutoIncrement, SingleStoreColumnWithAutoIncrement } from "./common.js";
import type { SingleStoreIntConfig } from "./int.js";
export type SingleStoreMediumIntBuilderInitial<TName extends string> = SingleStoreMediumIntBuilder<{
name: TName;
dataType: 'number';
columnType: 'SingleStoreMediumInt';
data: number;
driverParam: number | string;
enumValues: undefined;
generated: undefined;
}>;
export declare class SingleStoreMediumIntBuilder<T extends ColumnBuilderBaseConfig<'number', 'SingleStoreMediumInt'>> extends SingleStoreColumnBuilderWithAutoIncrement<T, SingleStoreIntConfig> {
static readonly [entityKind]: string;
constructor(name: T['name'], config?: SingleStoreIntConfig);
}
export declare class SingleStoreMediumInt<T extends ColumnBaseConfig<'number', 'SingleStoreMediumInt'>> extends SingleStoreColumnWithAutoIncrement<T, SingleStoreIntConfig> {
static readonly [entityKind]: string;
getSQLType(): string;
mapFromDriverValue(value: number | string): number;
}
export declare function mediumint(): SingleStoreMediumIntBuilderInitial<''>;
export declare function mediumint(config?: SingleStoreIntConfig): SingleStoreMediumIntBuilderInitial<''>;
export declare function mediumint<TName extends string>(name: TName, config?: SingleStoreIntConfig): SingleStoreMediumIntBuilderInitial<TName>;

View File

@@ -0,0 +1,18 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const ChartColumnIncreasing = createLucideIcon("ChartColumnIncreasing", [
["path", { d: "M13 17V9", key: "1fwyjl" }],
["path", { d: "M18 17V5", key: "sfb6ij" }],
["path", { d: "M3 3v16a2 2 0 0 0 2 2h16", key: "c24i48" }],
["path", { d: "M8 17v-3", key: "17ska0" }]
]);
export { ChartColumnIncreasing as default };
//# sourceMappingURL=chart-column-increasing.js.map

View File

@@ -0,0 +1,26 @@
{
"name": "to-no-case",
"version": "1.0.2",
"description": "Remove any existing casing from a string.",
"repository": "git://github.com/ianstormtaylor/to-no-case.git",
"license": "MIT",
"devDependencies": {
"mocha": "^2.3.4"
},
"keywords": [
"camel",
"camelcase",
"case",
"pascal",
"pascalcase",
"sentence",
"sentencecase",
"slug",
"slugcase",
"snake",
"snakecase",
"string",
"title",
"titlecase"
]
}

View File

@@ -0,0 +1,928 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.graphqlHttpAudits = {}));
})(this, (function (exports) { 'use strict';
/**
*
* utils
*
*/
/** @private */
function extendedTypeof(val) {
if (val === null) {
return 'null';
}
if (Array.isArray(val)) {
return 'array';
}
return typeof val;
}
/**
*
* audit/utils
*
*/
/**
* Wrap and prepare an audit for testing.
*
* @private
*/
function audit(id, name, fn) {
return {
id,
name,
fn: async () => {
try {
await fn();
return {
id,
name,
status: 'ok',
};
}
catch (err) {
if (!(err instanceof AuditError)) {
// anything thrown that is not an assertion error is considered fatal
throw err;
}
return {
id,
name,
status: name.startsWith('MUST')
? // failing MUSTs are considered errors
'error'
: name.startsWith('SHOULD')
? // recommendations are warnings
'warn'
: // everything else is truly optional
'notice',
reason: err.reason,
response: err.response,
};
}
},
};
}
/**
* Error thrown when an assertion test fails.
*
* @private
*/
class AuditError {
constructor(response, reason) {
this.response = response;
this.reason = reason;
}
}
/**
* Will throw an AuditError if the assertion on Response fails.
*
* All fatal problems will throw an instance of an Error.
*
* The name "ressert" is a wordplay combining "response" and "assert".
*
* @private
*/
function ressert(res) {
return {
status: {
toBe(code) {
if (res.status !== code) {
throw new AuditError(res, `Response status code is not ${code}`);
}
},
toBeBetween: (min, max) => {
if (!(min <= res.status && res.status <= max)) {
throw new AuditError(res, `Response status is not between ${min} and ${max}`);
}
},
},
header(key) {
return {
toContain(part) {
var _a;
if (!((_a = res.headers.get(key)) === null || _a === void 0 ? void 0 : _a.includes(part))) {
throw new AuditError(res, `Response header ${key} does not contain ${part}`);
}
},
notToContain(part) {
var _a;
if ((_a = res.headers.get(key)) === null || _a === void 0 ? void 0 : _a.includes(part)) {
throw new AuditError(res, `Response header ${key} contains ${part}`);
}
},
};
},
bodyAsExecutionResult: {
data: {
async toBe(val) {
const clonedRes = res.clone(); // allow the body to be re-read
const body = await assertBodyAsExecutionResult(res);
if (body.data !== val) {
throw new AuditError(clonedRes, `Response body execution result data is not "${val}"`);
}
},
},
async toHaveProperty(key) {
const clonedRes = res.clone(); // allow the body to be re-read
const body = await assertBodyAsExecutionResult(res);
if (!(key in body)) {
throw new AuditError(clonedRes, `Response body execution result does not have a property "${key}"`);
}
},
async notToHaveProperty(key) {
const clonedRes = res.clone(); // allow the body to be re-read
const body = await assertBodyAsExecutionResult(res);
if (key in body) {
throw new AuditError(clonedRes, `Response body execution result has a property "${key}"`);
}
},
},
};
}
/** @private */
async function assertBodyAsExecutionResult(res) {
let decoded;
try {
const decoder = new TextDecoder('utf-8');
const buff = await res.arrayBuffer();
decoded = decoder.decode(buff);
}
catch (err) {
throw new AuditError(res, 'Response body is not UTF-8 encoded');
}
let body;
try {
body = JSON.parse(decoded);
}
catch (err) {
throw new AuditError(res, 'Response body is not valid JSON');
}
return body;
}
/**
*
* audit/server
*
*/
/**
* List of server audits required to check GraphQL over HTTP spec conformance.
*
* @category Audits
*/
function serverAudits(opts) {
const fetchFn = (opts.fetchFn || fetch);
return [
// Media Types
audit(
// TODO: convert to MUST after watershed
'22EB', 'SHOULD accept application/graphql-response+json and match the content-type', async () => {
const res = await fetchFn(await getUrl(opts.url), {
method: 'POST',
headers: {
'content-type': 'application/json',
accept: 'application/graphql-response+json',
},
body: JSON.stringify({ query: '{ __typename }' }),
});
ressert(res).status.toBe(200);
ressert(res)
.header('content-type')
.toContain('application/graphql-response+json');
}),
audit('4655', 'MUST accept application/json and match the content-type', async () => {
const res = await fetchFn(await getUrl(opts.url), {
method: 'POST',
headers: {
'content-type': 'application/json',
accept: 'application/json',
},
body: JSON.stringify({ query: '{ __typename }' }),
});
ressert(res).status.toBe(200);
ressert(res).header('content-type').toContain('application/json');
}),
audit('47DE', 'SHOULD accept */* and use application/json for the content-type', async () => {
const res = await fetchFn(await getUrl(opts.url), {
method: 'POST',
headers: {
'content-type': 'application/json',
accept: '*/*',
},
body: JSON.stringify({ query: '{ __typename }' }),
});
ressert(res).status.toBe(200);
ressert(res).header('content-type').toContain('application/json');
}),
audit('80D8', 'SHOULD assume application/json content-type when accept is missing', async () => {
const res = await fetchFn(await getUrl(opts.url), {
method: 'POST',
headers: {
'content-type': 'application/json',
},
body: JSON.stringify({ query: '{ __typename }' }),
});
ressert(res).status.toBe(200);
ressert(res).header('content-type').toContain('application/json');
}),
audit('82A3', 'MUST use utf-8 encoding when responding', async () => {
const res = await fetchFn(await getUrl(opts.url), {
method: 'POST',
headers: {
'content-type': 'application/json',
},
body: JSON.stringify({ query: '{ __typename }' }),
});
ressert(res).status.toBe(200);
try {
const decoder = new TextDecoder('utf-8');
decoder.decode(await res.arrayBuffer());
}
catch (_a) {
throw new AuditError(res, 'Response body is not UTF-8 encoded');
}
}),
audit('BF61', 'MUST accept utf-8 encoded request', async () => {
const res = await fetchFn(await getUrl(opts.url), {
method: 'POST',
headers: {
'content-type': 'application/json; charset=utf-8',
},
body: JSON.stringify({
query: '{ __type(name: "Run🏃Swim🏊") { name } }',
}),
});
ressert(res).status.toBe(200);
}),
audit('78D5', 'MUST assume utf-8 in request if encoding is unspecified', async () => {
const res = await fetchFn(await getUrl(opts.url), {
method: 'POST',
headers: {
'content-type': 'application/json',
},
body: JSON.stringify({ query: '{ __typename }' }),
});
ressert(res).status.toBe(200);
}),
// Request
audit('2C94', 'MUST accept POST requests', async () => {
const res = await fetchFn(await getUrl(opts.url), {
method: 'POST',
headers: { 'content-type': 'application/json' },
body: JSON.stringify({ query: '{ __typename }' }),
});
ressert(res).status.toBe(200);
}),
audit('5A70', 'MAY accept application/x-www-form-urlencoded formatted GET requests', async () => {
const url = new URL(await getUrl(opts.url));
url.searchParams.set('query', '{ __typename }');
const res = await fetchFn(url.toString());
ressert(res).status.toBe(200);
}),
// Request GET
// TODO: this is a MUST if the server supports GET requests
audit('9C48', 'MAY NOT allow executing mutations on GET requests', async () => {
const url = new URL(await getUrl(opts.url));
url.searchParams.set('query', 'mutation { __typename }');
const res = await fetchFn(url.toString(), {
headers: {
accept: 'application/graphql-response+json',
},
});
ressert(res).status.toBeBetween(400, 499);
}),
// Request POST
audit('9ABE', 'MAY respond with 4xx status code if content-type is not supplied on POST requests', async () => {
const res = await fetchFn(await getUrl(opts.url), {
method: 'POST',
});
ressert(res).status.toBeBetween(400, 499);
}),
audit('03D4', 'MUST accept application/json POST requests', async () => {
const res = await fetchFn(await getUrl(opts.url), {
method: 'POST',
headers: { 'content-type': 'application/json' },
body: JSON.stringify({ query: '{ __typename }' }),
});
ressert(res).status.toBe(200);
}),
audit('A5BF', 'MAY use 400 status code when request body is missing on POST', async () => {
const res = await fetchFn(await getUrl(opts.url), {
method: 'POST',
headers: { 'content-type': 'application/json' },
});
ressert(res).status.toBe(400);
}),
// Request Parameters
audit('423L', 'MAY use 400 status code on missing {query} parameter', async () => {
const res = await fetchFn(await getUrl(opts.url), {
method: 'POST',
headers: {
'content-type': 'application/json',
accept: 'application/graphql-response+json',
},
body: JSON.stringify({ notquery: '{ __typename }' }),
});
ressert(res).status.toBe(400);
}),
...[{ obj: 'ect' }, 0, false, ['array']].map((invalid, index) => audit(`LKJ${index}`, `MAY use 400 status code on ${extendedTypeof(invalid)} {query} parameter`, async () => {
const res = await fetchFn(await getUrl(opts.url), {
method: 'POST',
headers: {
'content-type': 'application/json',
},
body: JSON.stringify({
query: invalid,
}),
});
ressert(res).status.toBe(400);
})),
audit(
// TODO: convert to MUST after watershed
'34A2', 'SHOULD allow string {query} parameter when accepting application/graphql-response+json', async () => {
const res = await fetchFn(await getUrl(opts.url), {
method: 'POST',
headers: {
'content-type': 'application/json',
accept: 'application/graphql-response+json',
},
body: JSON.stringify({
query: '{ __typename }',
}),
});
ressert(res).status.toBe(200);
}),
audit('13EE', 'MUST allow string {query} parameter when accepting application/json', async () => {
const res = await fetchFn(await getUrl(opts.url), {
method: 'POST',
headers: {
'content-type': 'application/json',
accept: 'application/json',
},
body: JSON.stringify({
query: '{ __typename }',
}),
});
ressert(res).status.toBe(200);
await ressert(res).bodyAsExecutionResult.notToHaveProperty('errors');
}),
...[{ obj: 'ect' }, 0, false, ['array']].map((invalid, index) => audit(`6C0${index}`, `MAY use 400 status code on ${extendedTypeof(invalid)} {operationName} parameter`, async () => {
const res = await fetchFn(await getUrl(opts.url), {
method: 'POST',
headers: {
'content-type': 'application/json',
},
body: JSON.stringify({
operationName: invalid,
query: '{ __typename }',
}),
});
ressert(res).status.toBe(400);
})),
audit(
// TODO: convert to MUST after watershed
'8161', 'SHOULD allow string {operationName} parameter when accepting application/graphql-response+json', async () => {
const res = await fetchFn(await getUrl(opts.url), {
method: 'POST',
headers: {
'content-type': 'application/json',
accept: 'application/graphql-response+json',
},
body: JSON.stringify({
operationName: 'Query',
query: 'query Query { __typename }',
}),
});
ressert(res).status.toBe(200);
}),
audit('B8B3', 'MUST allow string {operationName} parameter when accepting application/json', async () => {
const res = await fetchFn(await getUrl(opts.url), {
method: 'POST',
headers: {
'content-type': 'application/json',
accept: 'application/json',
},
body: JSON.stringify({
operationName: 'Query',
query: 'query Query { __typename }',
}),
});
ressert(res).status.toBe(200);
await ressert(res).bodyAsExecutionResult.notToHaveProperty('errors');
}),
...['variables', 'operationName', 'extensions'].flatMap((parameter, index) => [
audit(`94B${index}`,
// TODO: convert to MUST after watershed
`SHOULD allow null {${parameter}} parameter when accepting application/graphql-response+json`, async () => {
const res = await fetchFn(await getUrl(opts.url), {
method: 'POST',
headers: {
'content-type': 'application/json',
accept: 'application/graphql-response+json',
},
body: JSON.stringify({
query: '{ __typename }',
[parameter]: null,
}),
});
ressert(res).status.toBe(200);
await ressert(res).bodyAsExecutionResult.notToHaveProperty('errors');
}),
audit(`022${index}`, `MUST allow null {${parameter}} parameter when accepting application/json`, async () => {
const res = await fetchFn(await getUrl(opts.url), {
method: 'POST',
headers: {
'content-type': 'application/json',
accept: 'application/json',
},
body: JSON.stringify({
query: '{ __typename }',
[parameter]: null,
}),
});
ressert(res).status.toBe(200);
await ressert(res).bodyAsExecutionResult.notToHaveProperty('errors');
}),
]),
...['string', 0, false, ['array']].map((invalid, index) => audit(`476${index}`, `MAY use 400 status code on ${extendedTypeof(invalid)} {variables} parameter`, async () => {
const res = await fetchFn(await getUrl(opts.url), {
method: 'POST',
headers: {
'content-type': 'application/json',
},
body: JSON.stringify({
query: '{ __typename }',
variables: invalid,
}),
});
ressert(res).status.toBe(400);
})),
audit(
// TODO: convert to MUST after watershed
'2EA1', 'SHOULD allow map {variables} parameter when accepting application/graphql-response+json', async () => {
const res = await fetchFn(await getUrl(opts.url), {
method: 'POST',
headers: {
'content-type': 'application/json',
accept: 'application/graphql-response+json',
},
body: JSON.stringify({
query: 'query Type($name: String!) { __type(name: $name) { name } }',
variables: { name: 'sometype' },
}),
});
ressert(res).status.toBe(200);
}),
audit('28B9', 'MUST allow map {variables} parameter when accepting application/json', async () => {
const res = await fetchFn(await getUrl(opts.url), {
method: 'POST',
headers: {
'content-type': 'application/json',
accept: 'application/json',
},
body: JSON.stringify({
query: 'query Type($name: String!) { __type(name: $name) { name } }',
variables: { name: 'sometype' },
}),
});
ressert(res).status.toBe(200);
await ressert(res).bodyAsExecutionResult.notToHaveProperty('errors');
}),
audit('D6D5', 'MAY allow URL-encoded JSON string {variables} parameter in GETs when accepting application/graphql-response+json', async () => {
const url = new URL(await getUrl(opts.url));
url.searchParams.set('query', 'query Type($name: String!) { __type(name: $name) { name } }');
url.searchParams.set('variables', JSON.stringify({ name: 'sometype' }));
const res = await fetchFn(url.toString(), {
method: 'GET',
headers: {
accept: 'application/graphql-response+json',
},
});
ressert(res).status.toBe(200);
}),
audit('6A70', 'MAY allow URL-encoded JSON string {variables} parameter in GETs when accepting application/json', async () => {
const url = new URL(await getUrl(opts.url));
url.searchParams.set('query', 'query Type($name: String!) { __type(name: $name) { name } }');
url.searchParams.set('variables', JSON.stringify({ name: 'sometype' }));
const res = await fetchFn(url.toString(), {
method: 'GET',
headers: {
accept: 'application/json',
},
});
ressert(res).status.toBe(200);
await ressert(res).bodyAsExecutionResult.notToHaveProperty('errors');
}),
...['string', 0, false, ['array']].map((invalid, index) => audit(`58B${index}`,
// TODO: convert to MUST after watershed
`MAY use 400 status code on ${extendedTypeof(invalid)} {extensions} parameter`, async () => {
const res = await fetchFn(await getUrl(opts.url), {
method: 'POST',
headers: {
'content-type': 'application/json',
},
body: JSON.stringify({
query: '{ __typename }',
extensions: invalid,
}),
});
ressert(res).status.toBe(400);
})),
audit(
// TODO: convert to MUST after watershed
'428F', 'SHOULD allow map {extensions} parameter when accepting application/graphql-response+json', async () => {
const res = await fetchFn(await getUrl(opts.url), {
method: 'POST',
headers: {
'content-type': 'application/json',
accept: 'application/graphql-response+json',
},
body: JSON.stringify({
query: '{ __typename }',
extensions: { some: 'value' },
}),
});
ressert(res).status.toBe(200);
}),
audit('1B7A', 'MUST allow map {extensions} parameter when accepting application/json', async () => {
const res = await fetchFn(await getUrl(opts.url), {
method: 'POST',
headers: {
'content-type': 'application/json',
accept: 'application/json',
},
body: JSON.stringify({
query: '{ __typename }',
extensions: { some: 'value' },
}),
});
ressert(res).status.toBe(200);
await ressert(res).bodyAsExecutionResult.notToHaveProperty('errors');
}),
audit('B6DC', 'MAY use 4xx or 5xx status codes on JSON parsing failure', async () => {
const res = await fetchFn(await getUrl(opts.url), {
method: 'POST',
headers: {
'content-type': 'application/json',
},
body: '{ "not a JSON',
});
ressert(res).status.toBeBetween(400, 499);
}),
audit('BCF8', 'MAY use 400 status code on JSON parsing failure', async () => {
const res = await fetchFn(await getUrl(opts.url), {
method: 'POST',
headers: {
'content-type': 'application/json',
},
body: '{ "not a JSON',
});
ressert(res).status.toBe(400);
}),
audit('8764', 'MAY use 4xx or 5xx status codes if parameters are invalid', async () => {
const res = await fetchFn(await getUrl(opts.url), {
method: 'POST',
headers: {
'content-type': 'application/json',
},
body: JSON.stringify({
qeury /* typo */: '{ __typename }',
}),
});
ressert(res).status.toBeBetween(400, 599);
}),
audit('3E3A', 'MAY use 400 status code if parameters are invalid', async () => {
const res = await fetchFn(await getUrl(opts.url), {
method: 'POST',
headers: {
'content-type': 'application/json',
},
body: JSON.stringify({
qeury: /* typo */ '{ __typename }',
}),
});
ressert(res).status.toBe(400);
}),
// TODO: audit('39AA', 'MUST accept a map for the {extensions} parameter'),
// Response application/json
audit('572B', 'SHOULD use 200 status code on document parsing failure when accepting application/json', async () => {
const res = await fetchFn(await getUrl(opts.url), {
method: 'POST',
headers: {
'content-type': 'application/json',
accept: 'application/json',
},
body: JSON.stringify({ query: '{' }),
});
ressert(res).status.toBe(200);
}),
audit('FDE2', 'SHOULD use 200 status code on document validation failure when accepting application/json', async () => {
const res = await fetchFn(await getUrl(opts.url), {
method: 'POST',
headers: {
'content-type': 'application/json',
accept: 'application/json',
},
body: JSON.stringify({
query: '{ 8f31403dfe404bccbb0e835f2629c6a7 }', // making sure the field doesnt exist
}),
});
ressert(res).status.toBe(200);
}),
audit('7B9B', 'SHOULD use a status code of 200 on variable coercion failure when accepting application/json', async () => {
const res = await fetchFn(await getUrl(opts.url), {
method: 'POST',
headers: {
'content-type': 'application/json',
accept: 'application/json',
},
body: JSON.stringify({
query: 'query CoerceFailure($id: ID!){ __typename }',
variables: { id: null },
}),
});
ressert(res).status.toBe(200);
}),
// Response application/graphql-response+json
audit(
// TODO: convert to MUST after watershed
'865D', 'SHOULD use 4xx or 5xx status codes on document parsing failure when accepting application/graphql-response+json', async () => {
const res = await fetchFn(await getUrl(opts.url), {
method: 'POST',
headers: {
'content-type': 'application/json',
accept: 'application/graphql-response+json',
},
body: JSON.stringify({
query: '{',
}),
});
ressert(res).status.toBeBetween(400, 599);
}),
audit('556A', 'SHOULD use 400 status code on document parsing failure when accepting application/graphql-response+json', async () => {
const res = await fetchFn(await getUrl(opts.url), {
method: 'POST',
headers: {
'content-type': 'application/json',
accept: 'application/graphql-response+json',
},
body: JSON.stringify({
query: '{',
}),
});
ressert(res).status.toBe(400);
}),
audit('D586', 'SHOULD not contain the data entry on document parsing failure when accepting application/graphql-response+json', async () => {
const res = await fetchFn(await getUrl(opts.url), {
method: 'POST',
headers: {
'content-type': 'application/json',
accept: 'application/graphql-response+json',
},
body: JSON.stringify({
query: '{',
}),
});
await ressert(res).bodyAsExecutionResult.data.toBe(undefined);
}),
audit(
// TODO: convert to MUST after watershed
'51FE', 'SHOULD use 4xx or 5xx status codes on document validation failure when accepting application/graphql-response+json', async () => {
const res = await fetchFn(await getUrl(opts.url), {
method: 'POST',
headers: {
'content-type': 'application/json',
accept: 'application/graphql-response+json',
},
body: JSON.stringify({
query: '{ 8f31403dfe404bccbb0e835f2629c6a7 }', // making sure the field doesnt exist
}),
});
ressert(res).status.toBeBetween(400, 599);
}),
audit('74FF', 'SHOULD use 400 status code on document validation failure when accepting application/graphql-response+json', async () => {
const res = await fetchFn(await getUrl(opts.url), {
method: 'POST',
headers: {
'content-type': 'application/json',
accept: 'application/graphql-response+json',
},
body: JSON.stringify({
query: '{ 8f31403dfe404bccbb0e835f2629c6a7 }', // making sure the field doesnt exist
}),
});
ressert(res).status.toBe(400);
}),
audit('5E5B', 'SHOULD not contain the data entry on document validation failure when accepting application/graphql-response+json', async () => {
const res = await fetchFn(await getUrl(opts.url), {
method: 'POST',
headers: {
'content-type': 'application/json',
accept: 'application/graphql-response+json',
},
body: JSON.stringify({
query: '{ 8f31403dfe404bccbb0e835f2629c6a7 }', // making sure the field doesnt exist
}),
});
await ressert(res).bodyAsExecutionResult.data.toBe(undefined);
}),
audit('86EE', 'SHOULD use a status code of 400 on variable coercion failure when accepting application/graphql-response+json', async () => {
const res = await fetchFn(await getUrl(opts.url), {
method: 'POST',
headers: {
'content-type': 'application/json',
accept: 'application/graphql-response+json',
},
body: JSON.stringify({
query: 'query CoerceFailure($id: ID!){ __typename }',
variables: { id: null },
}),
});
ressert(res).status.toBe(400);
}),
// TODO: how to fail and have the data entry?
// audit('EE52', 'MUST use 2xx status code if response contains the data entry and it is not null when accepting application/graphql-response+json'),
// TODO: how to make an unauthorized request?
// https://graphql.github.io/graphql-over-http/draft/#sel-EANNNDTAAEVBAAqqc
// audit('BC58', 'SHOULD use 401 or 403 status codes when the request is not permitted')
];
}
/**
* Performs the full list of server audits required for GraphQL over HTTP spec conformance.
*
* Please consult the `AuditResult` for more information.
*
* @category Audits
*/
async function auditServer(opts) {
const audits = serverAudits(opts);
// audit tests will throw only on fatal errors, tests are contained within the AuditResult
return await Promise.all(audits.map(({ fn }) => fn()));
}
/** @private */
async function getUrl(url) {
if (typeof url === 'function') {
return await url();
}
return url;
}
/**
* Renders the provided audit results to well-formatted and valid HTML.
*
* Do note that the rendered result is not an HTML document, it's rather
* just a component with results.
*/
async function renderAuditResultsToHTML(results) {
const grouped = {
total: 0,
ok: [],
notice: [],
warn: [],
error: [],
};
for (const result of results) {
grouped.total++;
if (result.status === 'ok') {
grouped[result.status].push(result);
}
else {
grouped[result.status].push(result);
}
}
let report = '<i>* This report was auto-generated by graphql-http</i>\n';
report += '\n';
report += '<h1>GraphQL over HTTP audit report</h1>\n';
report += '\n';
report += '<ul>\n';
report += `<li><b>${grouped.total}</b> audits in total</li>\n`;
// font-family: monospace helps render native emojis in HTML
if (grouped.ok.length) {
report += `<li><span style="font-family: monospace">✅</span> <b>${grouped.ok.length}</b> pass</li>\n`;
}
if (grouped.notice.length) {
report += `<li><span style="font-family: monospace">💡</span> <b>${grouped.notice.length}</b> notices (suggestions)</li>\n`;
}
if (grouped.warn.length) {
report += `<li><span style="font-family: monospace">❗️</span> <b>${grouped.warn.length}</b> warnings (optional)</li>\n`;
}
if (grouped.error.length) {
report += `<li><span style="font-family: monospace">❌</span> <b>${grouped.error.length}</b> errors (required)</li>\n`;
}
report += '</ul>\n';
report += '\n';
if (grouped.ok.length) {
report += '<h2>Passing</h2>\n';
report += '<ol>\n';
for (const [, result] of grouped.ok.entries()) {
report += `<li><code>${result.id}</code> ${result.name}</li>\n`;
}
report += '</ol>\n';
report += '\n';
}
if (grouped.notice.length) {
report += `<h2>Notices</h2>\n`;
report +=
'The server <i>MAY</i> support these, but are truly optional. These are suggestions following recommended conventions.\n';
report += '<ol>\n';
for (const [, result] of grouped.notice.entries()) {
report += await printAuditFail(result);
}
report += '</ol>\n';
report += '\n';
}
if (grouped.warn.length) {
report += `<h2>Warnings</h2>\n`;
report += 'The server <i>SHOULD</i> support these, but is not required.\n';
report += '<ol>\n';
for (const [, result] of grouped.warn.entries()) {
report += await printAuditFail(result);
}
report += '</ol>\n';
report += '\n';
}
if (grouped.error.length) {
report += `<h2>Errors</h2>\n`;
report += 'The server <b>MUST</b> support these.\n';
report += '<ol>\n';
for (const [, result] of grouped.error.entries()) {
report += await printAuditFail(result);
}
report += '</ol>\n';
}
return report;
}
async function printAuditFail(result) {
var _a;
let report = '';
report += `<li><code>${result.id}</code> ${result.name}\n`;
report += '<details>\n';
report += `<summary>${truncate(result.reason)}</summary>\n`;
report += '<pre><code class="lang-json">'; // no "\n" because they count in HTML pre tags
const res = result.response;
const headers = {};
for (const [key, val] of res.headers.entries()) {
// some headers change on each run, dont report it
if (key === 'date') {
headers[key] = '<timestamp>';
}
else if (['cf-ray', 'server-timing', 'set-cookie'].includes(key)) {
headers[key] = '<omitted>';
}
else {
headers[key] = val;
}
}
let text = '', json;
try {
text = await res.text();
json = JSON.parse(text);
// is json, there shouldnt be nothing to sanitize (hopefully)
}
catch (_b) {
// is not json, avoid rendering html (rest is allowed)
if ((_a = res.headers.get('content-type')) === null || _a === void 0 ? void 0 : _a.includes('text/html')) {
text = '<html omitted>';
}
}
const stringified = JSON.stringify({
status: res.status,
statusText: res.statusText,
headers,
body: json || ((text === null || text === void 0 ? void 0 : text.length) > 5120 ? '<body is too long>' : text) || null,
}, (_k, v) => {
if (v != null && typeof v === 'object' && !Array.isArray(v)) {
// sort object fields for stable stringify
const acc = {};
return Object.keys(v)
.sort()
.reverse() // body on bottom
.reduce((acc, k) => {
acc[k] = v[k];
return acc;
}, acc);
}
return v;
}, 2);
report += stringified + '\n';
report += '</code></pre>\n';
report += '</details>\n';
report += '</li>\n';
return report;
}
function truncate(str, len = 1024) {
if (str.length > len) {
return str.substring(0, len) + '...';
}
return str;
}
exports.auditServer = auditServer;
exports.renderAuditResultsToHTML = renderAuditResultsToHTML;
exports.serverAudits = serverAudits;
}));

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","names":["useRouteCache","useTranslation","useDocumentDrawer","ListSelectionButton","EditFolderAction","id","folderCollectionSlug","clearRouteCache","t","FolderDocumentDrawer","closeDrawer","openDrawer","collectionSlug","_jsxs","_Fragment","_jsx","onClick","type","onSave"],"sources":["../../../../../src/elements/FolderView/Drawers/EditFolderAction/index.tsx"],"sourcesContent":["import { useRouteCache } from '../../../../providers/RouteCache/index.js'\nimport { useTranslation } from '../../../../providers/Translation/index.js'\nimport { useDocumentDrawer } from '../../../DocumentDrawer/index.js'\nimport { ListSelectionButton } from '../../../ListSelection/index.js'\n\ntype EditFolderActionProps = {\n folderCollectionSlug: string\n id: number | string\n}\nexport const EditFolderAction = ({ id, folderCollectionSlug }: EditFolderActionProps) => {\n const { clearRouteCache } = useRouteCache()\n const { t } = useTranslation()\n const [FolderDocumentDrawer, , { closeDrawer, openDrawer }] = useDocumentDrawer({\n id,\n collectionSlug: folderCollectionSlug,\n })\n\n if (!id) {\n return null\n }\n\n return (\n <>\n <ListSelectionButton onClick={openDrawer} type=\"button\">\n {t('general:edit')}\n </ListSelectionButton>\n\n <FolderDocumentDrawer\n onSave={() => {\n closeDrawer()\n clearRouteCache()\n }}\n />\n </>\n )\n}\n"],"mappings":";AAAA,SAASA,aAAa,QAAQ;AAC9B,SAASC,cAAc,QAAQ;AAC/B,SAASC,iBAAiB,QAAQ;AAClC,SAASC,mBAAmB,QAAQ;AAMpC,OAAO,MAAMC,gBAAA,GAAmBA,CAAC;EAAEC,EAAE;EAAEC;AAAoB,CAAyB;EAClF,MAAM;IAAEC;EAAe,CAAE,GAAGP,aAAA;EAC5B,MAAM;IAAEQ;EAAC,CAAE,GAAGP,cAAA;EACd,MAAM,CAACQ,oBAAA,GAAwB;IAAEC,WAAW;IAAEC;EAAU,CAAE,CAAC,GAAGT,iBAAA,CAAkB;IAC9EG,EAAA;IACAO,cAAA,EAAgBN;EAClB;EAEA,IAAI,CAACD,EAAA,EAAI;IACP,OAAO;EACT;EAEA,oBACEQ,KAAA,CAAAC,SAAA;4BACEC,IAAA,CAACZ,mBAAA;MAAoBa,OAAA,EAASL,UAAA;MAAYM,IAAA,EAAK;gBAC5CT,CAAA,CAAE;qBAGLO,IAAA,CAACN,oBAAA;MACCS,MAAA,EAAQA,CAAA;QACNR,WAAA;QACAH,eAAA;MACF;;;AAIR","ignoreList":[]}

View File

@@ -0,0 +1,43 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GraphQLObjectID = void 0;
const graphql_1 = require("graphql");
const error_js_1 = require("../error.js");
const MONGODB_OBJECTID_REGEX = /*#__PURE__*/ /^[A-Fa-f0-9]{24}$/;
exports.GraphQLObjectID = new graphql_1.GraphQLScalarType({
name: 'ObjectID',
description: 'A field whose value conforms with the standard mongodb object ID as described here: https://docs.mongodb.com/manual/reference/method/ObjectId/#ObjectId. Example: 5e5677d71bdc2ae76344968c',
serialize(value) {
if (!MONGODB_OBJECTID_REGEX.test(value)) {
throw (0, error_js_1.createGraphQLError)(`Value is not a valid mongodb object id of form: ${value}`);
}
return value;
},
parseValue(value) {
if (!MONGODB_OBJECTID_REGEX.test(value)) {
throw (0, error_js_1.createGraphQLError)(`Value is not a valid mongodb object id of form: ${value}`);
}
return value;
},
parseLiteral(ast) {
if (ast.kind !== graphql_1.Kind.STRING) {
throw (0, error_js_1.createGraphQLError)(`Can only validate strings as mongodb object id but got a: ${ast.kind}`, {
nodes: [ast],
});
}
if (!MONGODB_OBJECTID_REGEX.test(ast.value)) {
throw (0, error_js_1.createGraphQLError)(`Value is not a valid mongodb object id of form: ${ast.value}`, {
nodes: ast,
});
}
return ast.value;
},
extensions: {
codegenScalarType: 'string',
jsonSchema: {
title: 'ObjectID',
type: 'string',
pattern: MONGODB_OBJECTID_REGEX.source,
},
},
});

View File

@@ -0,0 +1 @@
module.exports={C:{"5":0.12629,"52":0.00702,"83":0.01403,"113":0.01403,"115":0.09822,"121":0.00702,"128":0.03508,"134":0.00702,"136":0.01403,"138":0.00702,"139":0.01403,"140":0.01403,"143":0.00702,"144":0.02105,"145":0.30169,"146":0.54725,_:"2 3 4 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 114 116 117 118 119 120 122 123 124 125 126 127 129 130 131 132 133 135 137 141 142 147 148 149 3.5 3.6"},D:{"49":0.01403,"68":0.00702,"69":0.12629,"70":0.00702,"74":0.00702,"79":0.00702,"86":0.02105,"87":0.00702,"90":0.00702,"95":0.00702,"97":0.00702,"98":0.00702,"99":0.00702,"100":0.00702,"103":0.47709,"104":0.4841,"105":0.4841,"106":0.47709,"107":0.47007,"108":0.47709,"109":0.86998,"110":0.4841,"111":0.60338,"112":21.14622,"114":0.00702,"116":0.97522,"117":0.47709,"119":0.01403,"120":0.4841,"122":0.14032,"123":0.00702,"124":0.49112,"125":0.88402,"126":8.4613,"127":0.02105,"128":0.01403,"129":0.01403,"130":0.01403,"131":0.98926,"132":0.1333,"133":0.98224,"134":0.03508,"135":0.03508,"136":0.01403,"137":0.02105,"138":0.07718,"139":0.07016,"140":0.08419,"141":0.14032,"142":6.63012,"143":12.30606,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 71 72 73 75 76 77 78 80 81 83 84 85 88 89 91 92 93 94 96 101 102 113 115 118 121 144 145 146"},F:{"56":0.00702,"93":0.00702,"95":0.01403,"123":0.00702,"124":1.23482,"125":0.33677,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 94 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"92":0.00702,"138":0.00702,"139":0.01403,"140":0.00702,"141":0.02105,"142":0.60338,"143":1.69086,_:"12 13 14 15 16 17 18 79 80 81 83 84 85 86 87 88 89 90 91 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137"},E:{_:"0 4 5 6 7 8 9 10 11 12 13 14 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 12.1 13.1 15.2-15.3 15.4 15.5 16.0 16.1 16.2 16.3 17.0 17.2 17.4 18.0 18.2 26.3","14.1":0.00702,"15.1":0.01403,"15.6":0.00702,"16.4":0.00702,"16.5":0.00702,"16.6":0.02806,"17.1":0.02105,"17.3":0.00702,"17.5":0.00702,"17.6":0.0421,"18.1":0.02806,"18.3":0.00702,"18.4":0.01403,"18.5-18.6":0.03508,"26.0":0.01403,"26.1":0.15435,"26.2":0.03508},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00179,"5.0-5.1":0,"6.0-6.1":0.00358,"7.0-7.1":0.00268,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.00715,"10.0-10.2":0.00089,"10.3":0.01252,"11.0-11.2":0.15377,"11.3-11.4":0.00447,"12.0-12.1":0.00358,"12.2-12.5":0.04023,"13.0-13.1":0.00089,"13.2":0.00626,"13.3":0.00179,"13.4-13.7":0.00626,"14.0-14.4":0.01252,"14.5-14.8":0.01341,"15.0-15.1":0.0143,"15.2-15.3":0.01073,"15.4":0.01162,"15.5":0.01252,"15.6-15.8":0.194,"16.0":0.02235,"16.1":0.04291,"16.2":0.02235,"16.3":0.04023,"16.4":0.00983,"16.5":0.01699,"16.6-16.7":0.25211,"17.0":0.0143,"17.1":0.02324,"17.2":0.01699,"17.3":0.02593,"17.4":0.04381,"17.5":0.08582,"17.6-17.7":0.19847,"18.0":0.0447,"18.1":0.09298,"18.2":0.04917,"18.3":0.16003,"18.4":0.08225,"18.5-18.7":5.90581,"26.0":0.11533,"26.1":0.95927,"26.2":0.18238,"26.3":0.00805},P:{"22":0.01025,"24":0.01025,"25":0.01025,"26":0.01025,"27":0.05125,"28":0.11274,"29":0.92245,_:"4 20 21 23 5.0-5.4 6.2-6.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0","7.2-7.4":0.05125},I:{"0":0.00596,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0},A:{_:"6 7 8 9 10 11 5.5"},K:{"0":0.06266,_:"10 11 12 11.1 11.5 12.1"},N:{_:"10 11"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},Q:{_:"14.9"},O:{_:"0"},H:{"0":0},L:{"0":22.48045},R:{_:"0"},M:{"0":0.17307}};

View File

@@ -0,0 +1,17 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const UserMinus = createLucideIcon("UserMinus", [
["path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2", key: "1yyitq" }],
["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }],
["line", { x1: "22", x2: "16", y1: "11", y2: "11", key: "1shjgl" }]
]);
export { UserMinus as default };
//# sourceMappingURL=user-minus.js.map

View File

@@ -0,0 +1,16 @@
import { InstrumentationBase, InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation';
import { FastifyInstrumentationConfig } from './types';
/**
* Fastify instrumentation for OpenTelemetry
*/
export declare class FastifyInstrumentationV3 extends InstrumentationBase<FastifyInstrumentationConfig> {
constructor(config?: FastifyInstrumentationConfig);
init(): InstrumentationNodeModuleDefinition[];
private _hookOnRequest;
private _wrapHandler;
private _wrapAddHook;
private _patchConstructor;
private _patchSend;
private _hookPreHandler;
}
//# sourceMappingURL=instrumentation.d.ts.map

View File

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

View File

@@ -0,0 +1,141 @@
'use strict';
var util = require('util');
var isArrayish = require('is-arrayish');
var errorEx = function errorEx(name, properties) {
if (!name || name.constructor !== String) {
properties = name || {};
name = Error.name;
}
var errorExError = function ErrorEXError(message) {
if (!this) {
return new ErrorEXError(message);
}
message = message instanceof Error
? message.message
: (message || this.message);
Error.call(this, message);
Error.captureStackTrace(this, errorExError);
this.name = name;
Object.defineProperty(this, 'message', {
configurable: true,
enumerable: false,
get: function () {
var newMessage = message.split(/\r?\n/g);
for (var key in properties) {
if (!properties.hasOwnProperty(key)) {
continue;
}
var modifier = properties[key];
if ('message' in modifier) {
newMessage = modifier.message(this[key], newMessage) || newMessage;
if (!isArrayish(newMessage)) {
newMessage = [newMessage];
}
}
}
return newMessage.join('\n');
},
set: function (v) {
message = v;
}
});
var overwrittenStack = null;
var stackDescriptor = Object.getOwnPropertyDescriptor(this, 'stack');
var stackGetter = stackDescriptor.get;
var stackValue = stackDescriptor.value;
delete stackDescriptor.value;
delete stackDescriptor.writable;
stackDescriptor.set = function (newstack) {
overwrittenStack = newstack;
};
stackDescriptor.get = function () {
var stack = (overwrittenStack || ((stackGetter)
? stackGetter.call(this)
: stackValue)).split(/\r?\n+/g);
// starting in Node 7, the stack builder caches the message.
// just replace it.
if (!overwrittenStack) {
stack[0] = this.name + ': ' + this.message;
}
var lineCount = 1;
for (var key in properties) {
if (!properties.hasOwnProperty(key)) {
continue;
}
var modifier = properties[key];
if ('line' in modifier) {
var line = modifier.line(this[key]);
if (line) {
stack.splice(lineCount++, 0, ' ' + line);
}
}
if ('stack' in modifier) {
modifier.stack(this[key], stack);
}
}
return stack.join('\n');
};
Object.defineProperty(this, 'stack', stackDescriptor);
};
if (Object.setPrototypeOf) {
Object.setPrototypeOf(errorExError.prototype, Error.prototype);
Object.setPrototypeOf(errorExError, Error);
} else {
util.inherits(errorExError, Error);
}
return errorExError;
};
errorEx.append = function (str, def) {
return {
message: function (v, message) {
v = v || def;
if (v) {
message[0] += ' ' + str.replace('%s', v.toString());
}
return message;
}
};
};
errorEx.line = function (str, def) {
return {
line: function (v) {
v = v || def;
if (v) {
return str.replace('%s', v.toString());
}
return null;
}
};
};
module.exports = errorEx;

View File

@@ -0,0 +1,43 @@
import { entityKind } from "../../entity.js";
import { getColumnNameAndConfig } from "../../utils.js";
import { MySqlColumnBuilderWithAutoIncrement, MySqlColumnWithAutoIncrement } from "./common.js";
class MySqlDoubleBuilder extends MySqlColumnBuilderWithAutoIncrement {
static [entityKind] = "MySqlDoubleBuilder";
constructor(name, config) {
super(name, "number", "MySqlDouble");
this.config.precision = config?.precision;
this.config.scale = config?.scale;
this.config.unsigned = config?.unsigned;
}
/** @internal */
build(table) {
return new MySqlDouble(table, this.config);
}
}
class MySqlDouble extends MySqlColumnWithAutoIncrement {
static [entityKind] = "MySqlDouble";
precision = this.config.precision;
scale = this.config.scale;
unsigned = this.config.unsigned;
getSQLType() {
let type = "";
if (this.precision !== void 0 && this.scale !== void 0) {
type += `double(${this.precision},${this.scale})`;
} else if (this.precision === void 0) {
type += "double";
} else {
type += `double(${this.precision})`;
}
return this.unsigned ? `${type} unsigned` : type;
}
}
function double(a, b) {
const { name, config } = getColumnNameAndConfig(a, b);
return new MySqlDoubleBuilder(name, config);
}
export {
MySqlDouble,
MySqlDoubleBuilder,
double
};
//# sourceMappingURL=double.js.map

View File

@@ -0,0 +1,346 @@
#!/usr/bin/env node
'use strict';
const fs = require('fs');
const os = require('os');
const path = require('path');
const crypto = require('crypto');
const zlib = require('zlib');
const stream = require('stream');
const process = require('process');
const fetch = require('node-fetch');
const HttpsProxyAgent = require('https-proxy-agent');
const ProgressBar = require('progress');
const Proxy = require('proxy-from-env');
const which = require('which');
const helper = require('../js/helper');
const pkgInfo = require('../package.json');
const Logger = require('../js/logger');
const logger = new Logger(getLogStream('stderr'));
const CDN_URL =
process.env.SENTRYCLI_LOCAL_CDNURL ||
process.env.npm_config_sentrycli_cdnurl ||
process.env.SENTRYCLI_CDNURL ||
'https://downloads.sentry-cdn.com/sentry-cli';
function getLogStream(defaultStream) {
const logStream = process.env.SENTRYCLI_LOG_STREAM || defaultStream;
if (logStream === 'stdout') {
return process.stdout;
}
if (logStream === 'stderr') {
return process.stderr;
}
throw new Error(
`Incorrect SENTRYCLI_LOG_STREAM env variable. Possible values: 'stdout' | 'stderr'`
);
}
function shouldRenderProgressBar() {
const silentFlag = process.argv.some((v) => v === '--silent');
const silentConfig = process.env.npm_config_loglevel === 'silent';
const silentEnv = process.env.SENTRYCLI_NO_PROGRESS_BAR;
const ciEnv = process.env.CI === 'true' || process.env.CI === '1';
const notTTY = !process.stdout.isTTY;
// If any of possible options is set, skip rendering of progress bar
return !(silentFlag || silentConfig || silentEnv || ciEnv || notTTY);
}
function getDownloadUrl(platform, arch) {
const releasesUrl = `${CDN_URL}/${pkgInfo.version}/sentry-cli`;
let archString = '';
switch (arch) {
case 'x64':
archString = 'x86_64';
break;
case 'x86':
case 'ia32':
archString = 'i686';
break;
case 'arm64':
archString = 'aarch64';
break;
case 'arm':
archString = 'armv7';
break;
default:
archString = arch;
}
switch (platform) {
case 'darwin':
return `${releasesUrl}-Darwin-universal`;
case 'win32':
return `${releasesUrl}-Windows-${archString}.exe`;
case 'linux':
case 'freebsd':
case 'android':
return `${releasesUrl}-Linux-${archString}`;
default:
return null;
}
}
function createProgressBar(name, total) {
const incorrectTotal = typeof total !== 'number' || Number.isNaN(total);
if (incorrectTotal || !shouldRenderProgressBar()) {
return {
tick: () => {},
};
}
const logStream = getLogStream('stdout');
if (logStream.isTTY) {
return new ProgressBar(`fetching ${name} :bar :percent :etas`, {
complete: '█',
incomplete: '░',
width: 20,
total,
});
}
let pct = null;
let current = 0;
return {
tick: (length) => {
current += length;
const next = Math.round((current / total) * 100);
if (next > pct) {
pct = next;
logStream.write(`fetching ${name} ${pct}%\n`);
}
},
};
}
function npmCache() {
const keys = ['npm_config_cache', 'npm_config_cache_folder', 'npm_config_yarn_offline_mirror'];
for (let key of [...keys, ...keys.map((k) => k.toUpperCase())]) {
if (process.env[key]) return process.env[key];
}
if (process.env.APPDATA) {
return path.join(process.env.APPDATA, 'npm-cache');
}
return path.join(os.homedir(), '.npm');
}
function getCachedPath(url) {
const digest = crypto.createHash('md5').update(url).digest('hex').slice(0, 6);
return path.join(
npmCache(),
'sentry-cli',
`${digest}-${path.basename(url).replace(/[^a-zA-Z0-9.]+/g, '-')}`
);
}
function getTempFile(cached) {
return `${cached}.${process.pid}-${Math.random().toString(16).slice(2)}.tmp`;
}
function validateChecksum(tempPath, name) {
let storedHash;
try {
const checksums = fs.readFileSync(path.join(__dirname, '../checksums.txt'), 'utf8');
const entries = checksums.split('\n');
for (let i = 0; i < entries.length; i++) {
const [key, value] = entries[i].split('=');
if (key === name) {
storedHash = value;
break;
}
}
} catch (e) {
logger.log(
'Checksums are generated when the package is published to npm. They are not available directly in the source repository. Skipping validation.'
);
return;
}
if (!storedHash) {
logger.log(`Checksum for ${name} not found, skipping validation.`);
return;
}
const currentHash = crypto.createHash('sha256').update(fs.readFileSync(tempPath)).digest('hex');
if (storedHash !== currentHash) {
fs.unlinkSync(tempPath);
throw new Error(
`Checksum validation for ${name} failed.\nExpected: ${storedHash}\nReceived: ${currentHash}`
);
} else {
logger.log('Checksum validation passed.');
}
}
async function downloadBinary() {
const arch = os.arch();
const platform = os.platform();
const outputPath = helper.getFallbackBinaryPath();
if (process.env.SENTRYCLI_USE_LOCAL === '1') {
try {
const binPaths = which.sync('sentry-cli', { all: true });
if (!binPaths.length) throw new Error('Binary not found');
const binPath = binPaths[binPaths.length - 1];
logger.log(`Using local binary: ${binPath}`);
fs.copyFileSync(binPath, outputPath);
return Promise.resolve();
} catch (e) {
throw new Error(
'Configured installation of local binary, but it was not found.' +
'Make sure that `sentry-cli` executable is available in your $PATH or disable SENTRYCLI_USE_LOCAL env variable.'
);
}
}
const downloadUrl = getDownloadUrl(platform, arch);
if (!downloadUrl) {
throw new Error(`Unsupported target ${platform}-${arch}`);
}
const cachedPath = getCachedPath(downloadUrl);
if (fs.existsSync(cachedPath)) {
logger.log(`Using cached binary: ${cachedPath}`);
fs.copyFileSync(cachedPath, outputPath);
return;
}
const proxyUrl = Proxy.getProxyForUrl(downloadUrl);
const agent = proxyUrl ? new HttpsProxyAgent(proxyUrl) : null;
logger.log(`Downloading from ${downloadUrl}`);
if (proxyUrl) {
logger.log(`Using proxy URL: ${proxyUrl}`);
}
let response;
try {
response = await fetch(downloadUrl, {
agent,
compress: false,
headers: {
'accept-encoding': 'gzip, deflate, br',
},
redirect: 'follow',
});
} catch (error) {
let errorMsg = `Unable to download sentry-cli binary from ${downloadUrl}.\nError message: ${error.message}`;
if (error.code) {
errorMsg += `\nError code: ${error.code}`;
}
throw new Error(errorMsg);
}
if (!response.ok) {
let errorMsg = `Unable to download sentry-cli binary from ${downloadUrl}.\nServer returned: ${response.status}`;
if (response.statusText) {
errorMsg += ` - ${response.statusText}`;
}
throw new Error(errorMsg);
}
const contentEncoding = response.headers.get('content-encoding');
let decompressor;
if (/\bgzip\b/.test(contentEncoding)) {
decompressor = zlib.createGunzip();
} else if (/\bdeflate\b/.test(contentEncoding)) {
decompressor = zlib.createInflate();
} else if (/\bbr\b/.test(contentEncoding)) {
decompressor = zlib.createBrotliDecompress();
} else {
decompressor = new stream.PassThrough();
}
const name = downloadUrl.match(/.*\/(.*?)$/)[1];
let downloadedBytes = 0;
const totalBytes = parseInt(response.headers.get('content-length'), 10);
const progressBar = createProgressBar(name, totalBytes);
const tempPath = getTempFile(cachedPath);
fs.mkdirSync(path.dirname(tempPath), { recursive: true });
await new Promise((resolve, reject) => {
response.body
.on('error', (e) => reject(e))
.on('data', (chunk) => {
downloadedBytes += chunk.length;
progressBar.tick(chunk.length);
})
.pipe(decompressor)
.pipe(fs.createWriteStream(tempPath, { mode: '0755' }))
.on('error', (e) => reject(e))
.on('close', () => {
if (downloadedBytes >= totalBytes) {
resolve();
} else {
reject(new Error('connection interrupted'));
}
});
});
if (process.env.SENTRYCLI_SKIP_CHECKSUM_VALIDATION !== '1') {
validateChecksum(tempPath, name);
}
fs.copyFileSync(tempPath, cachedPath);
fs.copyFileSync(tempPath, outputPath);
fs.unlinkSync(tempPath);
}
async function checkVersion() {
const output = await helper.execute(['--version']);
const version = output.replace('sentry-cli ', '').trim();
const expected = pkgInfo.version;
if (version !== expected) {
throw new Error(`Unexpected sentry-cli version "${version}", expected "${expected}"`);
}
}
if (process.env.SENTRYCLI_SKIP_DOWNLOAD === '1') {
logger.log(`Skipping download because SENTRYCLI_SKIP_DOWNLOAD=1 detected.`);
process.exit(0);
}
const { packageName: distributionPackageName, subpath: distributionSubpath } =
helper.getDistributionForThisPlatform();
if (distributionPackageName === undefined) {
helper.throwUnsupportedPlatformError();
}
try {
require.resolve(`${distributionPackageName}/${distributionSubpath}`);
// If the `resolve` call succeeds it means a binary was installed successfully via optional dependencies so we can skip the manual postinstall download.
process.exit(0);
} catch (e) {
// Optional dependencies likely didn't get installed - proceed with fallback downloading manually
// Log message inspired by esbuild: https://github.com/evanw/esbuild/blob/914f6080c77cfe32a54888caa51ca6ea13873ce9/lib/npm/node-install.ts#L253
logger.log(
`Sentry CLI failed to locate the "${distributionPackageName}" package after installation!
This can happen if you use an option to disable optional dependencies during installation, like "--no-optional", "--ignore-optional", or "--omit=optional". Sentry CLI uses the "optionalDependencies" package.json feature to install the correct binary for your platform and operating system. This post-install script will now try to work around this by manually downloading the Sentry CLI binary from the Sentry CDN. If this fails, you need to remove the "--no-optional", "--ignore-optional", and "--omit=optional" flags for Sentry CLI to work.`
);
downloadBinary()
.then(() => checkVersion())
.then(() => {
process.exit(0);
})
.catch((e) => {
console.error(e);
process.exit(1);
});
}

View File

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

View File

@@ -0,0 +1,49 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
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 __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var index_exports = {};
module.exports = __toCommonJS(index_exports);
__reExport(index_exports, require("./alias.cjs"), module.exports);
__reExport(index_exports, require("./column-builder.cjs"), module.exports);
__reExport(index_exports, require("./column.cjs"), module.exports);
__reExport(index_exports, require("./entity.cjs"), module.exports);
__reExport(index_exports, require("./errors.cjs"), module.exports);
__reExport(index_exports, require("./logger.cjs"), module.exports);
__reExport(index_exports, require("./operations.cjs"), module.exports);
__reExport(index_exports, require("./query-promise.cjs"), module.exports);
__reExport(index_exports, require("./relations.cjs"), module.exports);
__reExport(index_exports, require("./sql/index.cjs"), module.exports);
__reExport(index_exports, require("./subquery.cjs"), module.exports);
__reExport(index_exports, require("./table.cjs"), module.exports);
__reExport(index_exports, require("./utils.cjs"), module.exports);
__reExport(index_exports, require("./view-common.cjs"), module.exports);
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
...require("./alias.cjs"),
...require("./column-builder.cjs"),
...require("./column.cjs"),
...require("./entity.cjs"),
...require("./errors.cjs"),
...require("./logger.cjs"),
...require("./operations.cjs"),
...require("./query-promise.cjs"),
...require("./relations.cjs"),
...require("./sql/index.cjs"),
...require("./subquery.cjs"),
...require("./table.cjs"),
...require("./utils.cjs"),
...require("./view-common.cjs")
});
//# sourceMappingURL=index.cjs.map

View File

@@ -0,0 +1,227 @@
import { expect, expectTypeOf, test } from "vitest";
import * as z from "zod/v4";
test("opt passthrough", () => {
const object = z.object({
a: z.lazy(() => z.string()),
b: z.lazy(() => z.string().optional()),
c: z.lazy(() => z.string().default("default")),
});
type ObjectTypeIn = z.input<typeof object>;
expectTypeOf<ObjectTypeIn>().toEqualTypeOf<{
a: string;
b?: string | undefined;
c?: string | undefined;
}>();
type ObjectTypeOut = z.output<typeof object>;
expectTypeOf<ObjectTypeOut>().toEqualTypeOf<{
a: string;
b?: string | undefined;
c: string;
}>();
const result = object.parse(
{
a: "hello",
b: undefined,
},
{ jitless: true }
);
expect(result).toEqual({
a: "hello",
// b: undefined,
c: "default",
});
expect(z.lazy(() => z.string())._zod.optin).toEqual(undefined);
expect(z.lazy(() => z.string())._zod.optout).toEqual(undefined);
expect(z.lazy(() => z.string().optional())._zod.optin).toEqual("optional");
expect(z.lazy(() => z.string().optional())._zod.optout).toEqual("optional");
expect(z.lazy(() => z.string().default("asdf"))._zod.optin).toEqual("optional");
expect(z.lazy(() => z.string().default("asdf"))._zod.optout).toEqual(undefined);
});
////////////// LAZY //////////////
test("schema getter", () => {
z.lazy(() => z.string()).parse("asdf");
});
test("lazy proxy", () => {
const schema = z.lazy(() => z.string())._zod.innerType.min(6);
schema.parse("123456");
expect(schema.safeParse("12345").success).toBe(false);
});
interface Category {
name: string;
subcategories: Category[];
}
const testCategory: Category = {
name: "I",
subcategories: [
{
name: "A",
subcategories: [
{
name: "1",
subcategories: [
{
name: "a",
subcategories: [],
},
],
},
],
},
],
};
test("recursion with z.lazy", () => {
const Category: z.ZodType<Category> = z.lazy(() =>
z.object({
name: z.string(),
subcategories: z.array(Category),
})
);
Category.parse(testCategory);
});
type LinkedList = null | { value: number; next: LinkedList };
const linkedListExample = {
value: 1,
next: {
value: 2,
next: {
value: 3,
next: {
value: 4,
next: null,
},
},
},
};
test("recursive union wit z.lazy", () => {
const LinkedListSchema: z.ZodType<LinkedList> = z.lazy(() =>
z.union([
z.null(),
z.object({
value: z.number(),
next: LinkedListSchema,
}),
])
);
LinkedListSchema.parse(linkedListExample);
});
interface A {
val: number;
b: B;
}
interface B {
val: number;
a?: A | undefined;
}
test("mutual recursion with lazy", () => {
const Alazy: z.ZodType<A> = z.lazy(() =>
z.object({
val: z.number(),
b: Blazy,
})
);
const Blazy: z.ZodType<B> = z.lazy(() =>
z.object({
val: z.number(),
a: Alazy.optional(),
})
);
const testData = {
val: 1,
b: {
val: 5,
a: {
val: 3,
b: {
val: 4,
a: {
val: 2,
b: {
val: 1,
},
},
},
},
},
};
Alazy.parse(testData);
Blazy.parse(testData.b);
expect(() => Alazy.parse({ val: "asdf" })).toThrow();
});
// TODO
test("mutual recursion with cyclical data", () => {
const a: any = { val: 1 };
const b: any = { val: 2 };
a.b = b;
b.a = a;
});
test("complicated self-recursion", () => {
const Category = z.object({
name: z.string(),
age: z.optional(z.number()),
get nullself() {
return Category.nullable();
},
get optself() {
return Category.optional();
},
get self() {
return Category;
},
get subcategories() {
return z.array(Category);
},
nested: z.object({
get sub() {
return Category;
},
}),
});
type _Category = z.output<typeof Category>;
});
test("lazy initialization", () => {
const a: any = z.lazy(() => a).optional();
const b: any = z.lazy(() => b).nullable();
const c: any = z.lazy(() => c).default({} as any);
const d: any = z.lazy(() => d).prefault({} as any);
const e: any = z.lazy(() => e).nonoptional();
const f: any = z.lazy(() => f).catch({} as any);
const g: any = z.lazy(() => z.object({ g })).readonly();
const baseCategorySchema = z.object({
name: z.string(),
});
type Category = z.infer<typeof baseCategorySchema> & {
subcategories: Category[];
};
const categorySchema: z.ZodType<Category> = baseCategorySchema.extend({
subcategories: z.lazy(() => categorySchema.array()),
});
});

View File

@@ -0,0 +1,35 @@
"use strict";
exports.getDecade = getDecade;
var _index = require("./toDate.cjs");
/**
* The {@link getDecade} function options.
*/
/**
* @name getDecade
* @category Decade Helpers
* @summary Get the decade of the given date.
*
* @description
* Get the decade of the given date.
*
* @param date - The given date
* @param options - An object with options
*
* @returns The year of decade
*
* @example
* // Which decade belongs 27 November 1942?
* const result = getDecade(new Date(1942, 10, 27))
* //=> 1940
*/
function getDecade(date, options) {
// TODO: Switch to more technical definition in of decades that start with 1
// end with 0. I.e. 2001-2010 instead of current 2000-2009. It's a breaking
// change, so it can only be done in 4.0.
const _date = (0, _index.toDate)(date, options?.in);
const year = _date.getFullYear();
const decade = Math.floor(year / 10) * 10;
return decade;
}

View File

@@ -0,0 +1,143 @@
import { buildMatchPatternFn } from "../../_lib/buildMatchPatternFn.mjs";
import { buildMatchFn } from "../../_lib/buildMatchFn.mjs";
const matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
const parseOrdinalNumberPattern = /\d+/i;
const matchEraPatterns = {
narrow: /[قب]/,
abbreviated: /[قب]\.م\./,
wide: /(قبل|بعد) الميلاد/,
};
const parseEraPatterns = {
any: [/قبل/, /بعد/],
};
const matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /ر[1234]/,
wide: /الربع (الأول|الثاني|الثالث|الرابع)/,
};
const parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i],
};
const matchMonthPatterns = {
narrow: /^[أيفمسند]/,
abbreviated:
/^(يناير|فبراير|مارس|أبريل|مايو|يونيو|يوليو|أغسطس|سبتمبر|أكتوبر|نوفمبر|ديسمبر)/,
wide: /^(يناير|فبراير|مارس|أبريل|مايو|يونيو|يوليو|أغسطس|سبتمبر|أكتوبر|نوفمبر|ديسمبر)/,
};
const parseMonthPatterns = {
narrow: [
/^ي/i,
/^ف/i,
/^م/i,
/^أ/i,
/^م/i,
/^ي/i,
/^ي/i,
/^أ/i,
/^س/i,
/^أ/i,
/^ن/i,
/^د/i,
],
any: [
/^يناير/i,
/^فبراير/i,
/^مارس/i,
/^أبريل/i,
/^مايو/i,
/^يونيو/i,
/^يوليو/i,
/^أغسطس/i,
/^سبتمبر/i,
/^أكتوبر/i,
/^نوفمبر/i,
/^ديسمبر/i,
],
};
const matchDayPatterns = {
narrow: /^[حنثرخجس]/i,
short: /^(أحد|اثنين|ثلاثاء|أربعاء|خميس|جمعة|سبت)/i,
abbreviated: /^(أحد|اثنين|ثلاثاء|أربعاء|خميس|جمعة|سبت)/i,
wide: /^(الأحد|الاثنين|الثلاثاء|الأربعاء|الخميس|الجمعة|السبت)/i,
};
const parseDayPatterns = {
narrow: [/^ح/i, /^ن/i, /^ث/i, /^ر/i, /^خ/i, /^ج/i, /^س/i],
wide: [
/^الأحد/i,
/^الاثنين/i,
/^الثلاثاء/i,
/^الأربعاء/i,
/^الخميس/i,
/^الجمعة/i,
/^السبت/i,
],
any: [/^أح/i, /^اث/i, /^ث/i, /^أر/i, /^خ/i, /^ج/i, /^س/i],
};
const matchDayPeriodPatterns = {
narrow: /^(ص|م|منتصف الليل|الظهر|بعد الظهر|في الصباح|في المساء|في الليل)/,
any: /^(ص|م|منتصف الليل|الظهر|بعد الظهر|في الصباح|في المساء|في الليل)/,
};
const parseDayPeriodPatterns = {
any: {
am: /^ص/,
pm: /^م/,
midnight: /منتصف الليل/,
noon: /الظهر/,
afternoon: /بعد الظهر/,
morning: /في الصباح/,
evening: /في المساء/,
night: /في الليل/,
},
};
export const match = {
ordinalNumber: buildMatchPatternFn({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: (value) => parseInt(value, 10),
}),
era: buildMatchFn({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any",
}),
quarter: buildMatchFn({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: (index) => index + 1,
}),
month: buildMatchFn({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any",
}),
day: buildMatchFn({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any",
}),
dayPeriod: buildMatchFn({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any",
}),
};

View File

@@ -0,0 +1,19 @@
# @babel/runtime
> babel's modular runtime helpers
See our website [@babel/runtime](https://babeljs.io/docs/babel-runtime) for more information.
## Install
Using npm:
```sh
npm install --save @babel/runtime
```
or using yarn:
```sh
yarn add @babel/runtime
```

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{useLexicalCommandsLog as e,TreeView as t,generateContent as a}from"@lexical/devtools-core";import{mergeRegister as r}from"@lexical/utils";import*as l from"react";import{useState as i,useEffect as o}from"react";import{jsx as s}from"react/jsx-runtime";function n({treeTypeButtonClassName:n,timeTravelButtonClassName:m,timeTravelPanelSliderClassName:c,timeTravelPanelButtonClassName:d,timeTravelPanelClassName:u,viewClassName:C,editor:N,customPrintNode:f}){const v=l.createRef(),[T,E]=i(N.getEditorState()),p=e(N);o((()=>r(N.registerUpdateListener((({editorState:e})=>{E(e)})),N.registerEditableListener((()=>{E(N.getEditorState())})))),[N]),o((()=>{const e=v.current;if(null!==e)return e.__lexicalEditor=N,()=>{e.__lexicalEditor=null}}),[N,v]);return s(t,{treeTypeButtonClassName:n,timeTravelButtonClassName:m,timeTravelPanelSliderClassName:c,timeTravelPanelButtonClassName:d,viewClassName:C,timeTravelPanelClassName:u,setEditorReadOnly:e=>{const t=N.getRootElement();null!=t&&(t.contentEditable=e?"false":"true")},editorState:T,setEditorState:e=>N.setEditorState(e),generateContent:async function(e){return a(N,p,e,f)},ref:v,commandsLog:p})}export{n as TreeView};

View File

@@ -0,0 +1,174 @@
"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 session_exports = {};
__export(session_exports, {
BunSQLPreparedQuery: () => BunSQLPreparedQuery,
BunSQLSession: () => BunSQLSession,
BunSQLTransaction: () => BunSQLTransaction
});
module.exports = __toCommonJS(session_exports);
var import_core = require("../cache/core/index.cjs");
var import_entity = require("../entity.cjs");
var import_logger = require("../logger.cjs");
var import_pg_core = require("../pg-core/index.cjs");
var import_session = require("../pg-core/session.cjs");
var import_sql = require("../sql/sql.cjs");
var import_tracing = require("../tracing.cjs");
var import_utils = require("../utils.cjs");
class BunSQLPreparedQuery extends import_session.PgPreparedQuery {
constructor(client, queryString, params, logger, cache, queryMetadata, cacheConfig, fields, _isResponseInArrayMode, customResultMapper) {
super({ sql: queryString, params }, cache, queryMetadata, cacheConfig);
this.client = client;
this.queryString = queryString;
this.params = params;
this.logger = logger;
this.fields = fields;
this._isResponseInArrayMode = _isResponseInArrayMode;
this.customResultMapper = customResultMapper;
}
static [import_entity.entityKind] = "BunSQLPreparedQuery";
async execute(placeholderValues = {}) {
return import_tracing.tracer.startActiveSpan("drizzle.execute", async (span) => {
const params = (0, import_sql.fillPlaceholders)(this.params, placeholderValues);
span?.setAttributes({
"drizzle.query.text": this.queryString,
"drizzle.query.params": JSON.stringify(params)
});
this.logger.logQuery(this.queryString, params);
const { fields, queryString: query, client, joinsNotNullableMap, customResultMapper } = this;
if (!fields && !customResultMapper) {
return import_tracing.tracer.startActiveSpan("drizzle.driver.execute", async () => {
return await this.queryWithCache(query, params, async () => {
return await client.unsafe(query, params);
});
});
}
const rows = await import_tracing.tracer.startActiveSpan("drizzle.driver.execute", async () => {
span?.setAttributes({
"drizzle.query.text": query,
"drizzle.query.params": JSON.stringify(params)
});
return await this.queryWithCache(query, params, async () => {
return client.unsafe(query, params).values();
});
});
return import_tracing.tracer.startActiveSpan("drizzle.mapResponse", () => {
return customResultMapper ? customResultMapper(rows) : rows.map((row) => (0, import_utils.mapResultRow)(fields, row, joinsNotNullableMap));
});
});
}
all(placeholderValues = {}) {
return import_tracing.tracer.startActiveSpan("drizzle.execute", async (span) => {
const params = (0, import_sql.fillPlaceholders)(this.params, placeholderValues);
span?.setAttributes({
"drizzle.query.text": this.queryString,
"drizzle.query.params": JSON.stringify(params)
});
this.logger.logQuery(this.queryString, params);
return import_tracing.tracer.startActiveSpan("drizzle.driver.execute", async () => {
span?.setAttributes({
"drizzle.query.text": this.queryString,
"drizzle.query.params": JSON.stringify(params)
});
return await this.queryWithCache(this.queryString, params, async () => {
return await this.client.unsafe(this.queryString, params);
});
});
});
}
/** @internal */
isResponseInArrayMode() {
return this._isResponseInArrayMode;
}
}
class BunSQLSession extends import_session.PgSession {
constructor(client, dialect, schema, options = {}) {
super(dialect);
this.client = client;
this.schema = schema;
this.options = options;
this.logger = options.logger ?? new import_logger.NoopLogger();
this.cache = options.cache ?? new import_core.NoopCache();
}
static [import_entity.entityKind] = "BunSQLSession";
logger;
cache;
prepareQuery(query, fields, name, isResponseInArrayMode, customResultMapper, queryMetadata, cacheConfig) {
return new BunSQLPreparedQuery(
this.client,
query.sql,
query.params,
this.logger,
this.cache,
queryMetadata,
cacheConfig,
fields,
isResponseInArrayMode,
customResultMapper
);
}
query(query, params) {
this.logger.logQuery(query, params);
return this.client.unsafe(query, params).values();
}
queryObjects(query, params) {
return this.client.unsafe(query, params);
}
transaction(transaction, config) {
return this.client.begin(async (client) => {
const session = new BunSQLSession(
client,
this.dialect,
this.schema,
this.options
);
const tx = new BunSQLTransaction(this.dialect, session, this.schema);
if (config) {
await tx.setTransaction(config);
}
return transaction(tx);
});
}
}
class BunSQLTransaction extends import_pg_core.PgTransaction {
constructor(dialect, session, schema, nestedIndex = 0) {
super(dialect, session, schema, nestedIndex);
this.session = session;
}
static [import_entity.entityKind] = "BunSQLTransaction";
transaction(transaction) {
return this.session.client.savepoint((client) => {
const session = new BunSQLSession(
client,
this.dialect,
this.schema,
this.session.options
);
const tx = new BunSQLTransaction(this.dialect, session, this.schema);
return transaction(tx);
});
}
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
BunSQLPreparedQuery,
BunSQLSession,
BunSQLTransaction
});
//# sourceMappingURL=session.cjs.map

View File

@@ -0,0 +1,156 @@
import { buildLocalizeFn } from "../../_lib/buildLocalizeFn.js";
const eraValues = {
narrow: ["пр.н.е.", "н.е."],
abbreviated: ["преди н. е.", "н. е."],
wide: ["преди новата ера", "новата ера"],
};
const quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["1-во тримес.", "2-ро тримес.", "3-то тримес.", "4-то тримес."],
wide: [
"1-во тримесечие",
"2-ро тримесечие",
"3-то тримесечие",
"4-то тримесечие",
],
};
const monthValues = {
abbreviated: [
"яну",
"фев",
"мар",
"апр",
"май",
"юни",
"юли",
"авг",
"сеп",
"окт",
"ное",
"дек",
],
wide: [
"януари",
"февруари",
"март",
"април",
"май",
"юни",
"юли",
"август",
"септември",
"октомври",
"ноември",
"декември",
],
};
const dayValues = {
narrow: ["Н", "П", "В", "С", "Ч", "П", "С"],
short: ["нд", "пн", "вт", "ср", "чт", "пт", "сб"],
abbreviated: ["нед", "пон", "вто", "сря", "чет", "пет", "съб"],
wide: [
"неделя",
"понеделник",
"вторник",
"сряда",
"четвъртък",
"петък",
"събота",
],
};
const dayPeriodValues = {
wide: {
am: "преди обяд",
pm: "след обяд",
midnight: "в полунощ",
noon: "на обяд",
morning: "сутринта",
afternoon: "следобед",
evening: "вечерта",
night: "през нощта",
},
};
function isFeminine(unit) {
return (
unit === "year" || unit === "week" || unit === "minute" || unit === "second"
);
}
function isNeuter(unit) {
return unit === "quarter";
}
function numberWithSuffix(number, unit, masculine, feminine, neuter) {
const suffix = isNeuter(unit)
? neuter
: isFeminine(unit)
? feminine
: masculine;
return number + "-" + suffix;
}
const ordinalNumber = (dirtyNumber, options) => {
const number = Number(dirtyNumber);
const unit = options?.unit;
if (number === 0) {
return numberWithSuffix(0, unit, "ев", "ева", "ево");
} else if (number % 1000 === 0) {
return numberWithSuffix(number, unit, "ен", "на", "но");
} else if (number % 100 === 0) {
return numberWithSuffix(number, unit, "тен", "тна", "тно");
}
const rem100 = number % 100;
if (rem100 > 20 || rem100 < 10) {
switch (rem100 % 10) {
case 1:
return numberWithSuffix(number, unit, "ви", "ва", "во");
case 2:
return numberWithSuffix(number, unit, "ри", "ра", "ро");
case 7:
case 8:
return numberWithSuffix(number, unit, "ми", "ма", "мо");
}
}
return numberWithSuffix(number, unit, "ти", "та", "то");
};
export const localize = {
ordinalNumber,
era: buildLocalizeFn({
values: eraValues,
defaultWidth: "wide",
}),
quarter: buildLocalizeFn({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: (quarter) => quarter - 1,
}),
month: buildLocalizeFn({
values: monthValues,
defaultWidth: "wide",
}),
day: buildLocalizeFn({
values: dayValues,
defaultWidth: "wide",
}),
dayPeriod: buildLocalizeFn({
values: dayPeriodValues,
defaultWidth: "wide",
}),
};

View File

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

View File

@@ -0,0 +1,2 @@
import type { PluginConfig } from '../types.js';
export default function initExtractionCompiler(pluginConfig: PluginConfig): void;

View File

@@ -0,0 +1,16 @@
import React from 'react';
type ActionsContextType = {
Actions: {
[key: string]: React.ReactNode;
};
setViewActions: (actions: ActionsContextType['Actions']) => void;
};
export declare const useActions: () => ActionsContextType;
export declare const ActionsProvider: React.FC<{
readonly Actions?: {
[key: string]: React.ReactNode;
};
readonly children: React.ReactNode;
}>;
export {};
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,13 @@
import App from 'next/app';
type AppGetInitialProps = (typeof App)['getInitialProps'];
/**
* Create a wrapped version of the user's exported `getInitialProps` function in
* a custom app ("_app.js").
*
* @param origAppGetInitialProps The user's `getInitialProps` function
* @param parameterizedRoute The page's parameterized route
* @returns A wrapped version of the function
*/
export declare function wrapAppGetInitialPropsWithSentry(origAppGetInitialProps: AppGetInitialProps): AppGetInitialProps;
export {};
//# sourceMappingURL=wrapAppGetInitialPropsWithSentry.d.ts.map

View File

@@ -0,0 +1,17 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const BluetoothSearching = createLucideIcon("BluetoothSearching", [
["path", { d: "m7 7 10 10-5 5V2l5 5L7 17", key: "1q5490" }],
["path", { d: "M20.83 14.83a4 4 0 0 0 0-5.66", key: "k8tn1j" }],
["path", { d: "M18 12h.01", key: "yjnet6" }]
]);
export { BluetoothSearching as default };
//# sourceMappingURL=bluetooth-searching.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"notebook-text.js","sources":["../../../src/icons/notebook-text.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name NotebookText\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMiA2aDQiIC8+CiAgPHBhdGggZD0iTTIgMTBoNCIgLz4KICA8cGF0aCBkPSJNMiAxNGg0IiAvPgogIDxwYXRoIGQ9Ik0yIDE4aDQiIC8+CiAgPHJlY3Qgd2lkdGg9IjE2IiBoZWlnaHQ9IjIwIiB4PSI0IiB5PSIyIiByeD0iMiIgLz4KICA8cGF0aCBkPSJNOS41IDhoNSIgLz4KICA8cGF0aCBkPSJNOS41IDEySDE2IiAvPgogIDxwYXRoIGQ9Ik05LjUgMTZIMTQiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/notebook-text\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst NotebookText = createLucideIcon('NotebookText', [\n ['path', { d: 'M2 6h4', key: 'aawbzj' }],\n ['path', { d: 'M2 10h4', key: 'l0bgd4' }],\n ['path', { d: 'M2 14h4', key: '1gsvsf' }],\n ['path', { d: 'M2 18h4', key: '1bu2t1' }],\n ['rect', { width: '16', height: '20', x: '4', y: '2', rx: '2', key: '1nb95v' }],\n ['path', { d: 'M9.5 8h5', key: '11mslq' }],\n ['path', { d: 'M9.5 12H16', key: 'ktog6x' }],\n ['path', { d: 'M9.5 16H14', key: 'p1seyn' }],\n]);\n\nexport default NotebookText;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAe,iBAAiB,cAAgB,CAAA,CAAA,CAAA;AAAA,CAAA,CACpD,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,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,CAAA,CAC9E,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,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC3C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC7C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,21 @@
/**
* Inlined implementation of hoist-non-react-statics
* Original library: https://github.com/mridgway/hoist-non-react-statics
* License: BSD-3-Clause
* Copyright 2015, Yahoo! Inc.
*
* This is an inlined version to avoid ESM compatibility issues with the original package.
*/
import type * as React from 'react';
/**
* Copies non-react specific statics from a child component to a parent component.
* Similar to Object.assign, but copies all static properties from source to target,
* excluding React-specific statics and known JavaScript statics.
*
* @param targetComponent - The component to copy statics to
* @param sourceComponent - The component to copy statics from
* @param excludelist - An optional object of keys to exclude from hoisting
* @returns The target component with hoisted statics
*/
export declare function hoistNonReactStatics<T extends React.ComponentType<any>, S extends React.ComponentType<any>, C extends Record<string, boolean> = Record<string, never>>(targetComponent: T, sourceComponent: S, excludelist?: C): T;
//# sourceMappingURL=hoist-non-react-statics.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"commitTransaction.d.ts","sourceRoot":"","sources":["../../src/transactions/commitTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAEhD,eAAO,MAAM,iBAAiB,EAAE,iBAqB/B,CAAA"}

View File

@@ -0,0 +1,484 @@
(() => {
var _window$dateFns;function _typeof(o) {"@babel/helpers - typeof";return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {return typeof o;} : function (o) {return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;}, _typeof(o);}function ownKeys(e, r) {var t = Object.keys(e);if (Object.getOwnPropertySymbols) {var o = Object.getOwnPropertySymbols(e);r && (o = o.filter(function (r) {return Object.getOwnPropertyDescriptor(e, r).enumerable;})), t.push.apply(t, o);}return t;}function _objectSpread(e) {for (var r = 1; r < arguments.length; r++) {var t = null != arguments[r] ? arguments[r] : {};r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {_defineProperty(e, r, t[r]);}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));});}return e;}function _defineProperty(obj, key, value) {key = _toPropertyKey(key);if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}function _toPropertyKey(t) {var i = _toPrimitive(t, "string");return "symbol" == _typeof(i) ? i : String(i);}function _toPrimitive(t, r) {if ("object" != _typeof(t) || !t) return t;var e = t[Symbol.toPrimitive];if (void 0 !== e) {var i = e.call(t, r || "default");if ("object" != _typeof(i)) return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return ("string" === r ? String : Number)(t);}var __defProp = Object.defineProperty;
var __export = function __export(target, all) {
for (var name in all)
__defProp(target, name, {
get: all[name],
enumerable: true,
configurable: true,
set: function set(newValue) {return all[name] = function () {return newValue;};}
});
};
// lib/locale/fy/_lib/formatDistance.js
var formatDistanceLocale = {
lessThanXSeconds: {
one: "minder as 1 sekonde",
other: "minder as {{count}} sekonden"
},
xSeconds: {
one: "1 sekonde",
other: "{{count}} sekonden"
},
halfAMinute: "oardel min\xFAt",
lessThanXMinutes: {
one: "minder as 1 min\xFAt",
other: "minder as {{count}} minuten"
},
xMinutes: {
one: "1 min\xFAt",
other: "{{count}} minuten"
},
aboutXHours: {
one: "sawat 1 oere",
other: "sawat {{count}} oere"
},
xHours: {
one: "1 oere",
other: "{{count}} oere"
},
xDays: {
one: "1 dei",
other: "{{count}} dagen"
},
aboutXWeeks: {
one: "sawat 1 wike",
other: "sawat {{count}} wiken"
},
xWeeks: {
one: "1 wike",
other: "{{count}} wiken"
},
aboutXMonths: {
one: "sawat 1 moanne",
other: "sawat {{count}} moannen"
},
xMonths: {
one: "1 moanne",
other: "{{count}} moannen"
},
aboutXYears: {
one: "sawat 1 jier",
other: "sawat {{count}} jier"
},
xYears: {
one: "1 jier",
other: "{{count}} jier"
},
overXYears: {
one: "mear as 1 jier",
other: "mear as {{count}}s jier"
},
almostXYears: {
one: "hast 1 jier",
other: "hast {{count}} jier"
}
};
var formatDistance = function formatDistance(token, count, options) {
var result;
var tokenValue = formatDistanceLocale[token];
if (typeof tokenValue === "string") {
result = tokenValue;
} else if (count === 1) {
result = tokenValue.one;
} else {
result = tokenValue.other.replace("{{count}}", String(count));
}
if (options !== null && options !== void 0 && options.addSuffix) {
if (options.comparison && options.comparison > 0) {
return "oer " + result;
} else {
return result + " lyn";
}
}
return result;
};
// lib/locale/_lib/buildFormatLongFn.js
function buildFormatLongFn(args) {
return function () {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var width = options.width ? String(options.width) : args.defaultWidth;
var format = args.formats[width] || args.formats[args.defaultWidth];
return format;
};
}
// lib/locale/fy/_lib/formatLong.js
var dateFormats = {
full: "EEEE d MMMM y",
long: "d MMMM y",
medium: "d MMM y",
short: "dd-MM-y"
};
var timeFormats = {
full: "HH:mm:ss zzzz",
long: "HH:mm:ss z",
medium: "HH:mm:ss",
short: "HH:mm"
};
var dateTimeFormats = {
full: "{{date}} 'om' {{time}}",
long: "{{date}} 'om' {{time}}",
medium: "{{date}}, {{time}}",
short: "{{date}}, {{time}}"
};
var formatLong = {
date: buildFormatLongFn({
formats: dateFormats,
defaultWidth: "full"
}),
time: buildFormatLongFn({
formats: timeFormats,
defaultWidth: "full"
}),
dateTime: buildFormatLongFn({
formats: dateTimeFormats,
defaultWidth: "full"
})
};
// lib/locale/fy/_lib/formatRelative.js
var formatRelativeLocale = {
lastWeek: "'\xF4fr\xFBne' eeee 'om' p",
yesterday: "'juster om' p",
today: "'hjoed om' p",
tomorrow: "'moarn om' p",
nextWeek: "eeee 'om' p",
other: "P"
};
var formatRelative = function formatRelative(token, _date, _baseDate, _options) {return formatRelativeLocale[token];};
// lib/locale/_lib/buildLocalizeFn.js
function buildLocalizeFn(args) {
return function (value, options) {
var context = options !== null && options !== void 0 && options.context ? String(options.context) : "standalone";
var valuesArray;
if (context === "formatting" && args.formattingValues) {
var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;
valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
} else {
var _defaultWidth = args.defaultWidth;
var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;
valuesArray = args.values[_width] || args.values[_defaultWidth];
}
var index = args.argumentCallback ? args.argumentCallback(value) : value;
return valuesArray[index];
};
}
// lib/locale/fy/_lib/localize.js
var eraValues = {
narrow: ["f.K.", "n.K."],
abbreviated: ["f.Kr.", "n.Kr."],
wide: ["foar Kristus", "nei Kristus"]
};
var quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["K1", "K2", "K3", "K4"],
wide: ["1e fearnsjier", "2e fearnsjier", "3e fearnsjier", "4e fearnsjier"]
};
var monthValues = {
narrow: ["j", "f", "m", "a", "m", "j", "j", "a", "s", "o", "n", "d"],
abbreviated: [
"jan.",
"feb.",
"mrt.",
"apr.",
"mai.",
"jun.",
"jul.",
"aug.",
"sep.",
"okt.",
"nov.",
"des."],
wide: [
"jannewaris",
"febrewaris",
"maart",
"april",
"maaie",
"juny",
"july",
"augustus",
"septimber",
"oktober",
"novimber",
"desimber"]
};
var dayValues = {
narrow: ["s", "m", "t", "w", "t", "f", "s"],
short: ["si", "mo", "ti", "wo", "to", "fr", "so"],
abbreviated: ["snein", "moa", "tii", "woa", "ton", "fre", "sneon"],
wide: [
"snein",
"moandei",
"tiisdei",
"woansdei",
"tongersdei",
"freed",
"sneon"]
};
var dayPeriodValues = {
narrow: {
am: "AM",
pm: "PM",
midnight: "middernacht",
noon: "middei",
morning: "moarns",
afternoon: "middeis",
evening: "j\xFBns",
night: "nachts"
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "middernacht",
noon: "middei",
morning: "moarns",
afternoon: "middeis",
evening: "j\xFBns",
night: "nachts"
},
wide: {
am: "AM",
pm: "PM",
midnight: "middernacht",
noon: "middei",
morning: "moarns",
afternoon: "middeis",
evening: "j\xFBns",
night: "nachts"
}
};
var ordinalNumber = function ordinalNumber(dirtyNumber, _options) {
var number = Number(dirtyNumber);
return number + "e";
};
var localize = {
ordinalNumber: ordinalNumber,
era: buildLocalizeFn({
values: eraValues,
defaultWidth: "wide"
}),
quarter: buildLocalizeFn({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: function argumentCallback(quarter) {return quarter - 1;}
}),
month: buildLocalizeFn({
values: monthValues,
defaultWidth: "wide"
}),
day: buildLocalizeFn({
values: dayValues,
defaultWidth: "wide"
}),
dayPeriod: buildLocalizeFn({
values: dayPeriodValues,
defaultWidth: "wide"
})
};
// lib/locale/_lib/buildMatchFn.js
function buildMatchFn(args) {
return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var width = options.width;
var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
var matchResult = string.match(matchPattern);
if (!matchResult) {
return null;
}
var matchedString = matchResult[0];
var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) {return pattern.test(matchedString);}) : findKey(parsePatterns, function (pattern) {return pattern.test(matchedString);});
var value;
value = args.valueCallback ? args.valueCallback(key) : key;
value = options.valueCallback ? options.valueCallback(value) : value;
var rest = string.slice(matchedString.length);
return { value: value, rest: rest };
};
}
function findKey(object, predicate) {
for (var key in object) {
if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) {
return key;
}
}
return;
}
function findIndex(array, predicate) {
for (var key = 0; key < array.length; key++) {
if (predicate(array[key])) {
return key;
}
}
return;
}
// lib/locale/_lib/buildMatchPatternFn.js
function buildMatchPatternFn(args) {
return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var matchResult = string.match(args.matchPattern);
if (!matchResult)
return null;
var matchedString = matchResult[0];
var parseResult = string.match(args.parsePattern);
if (!parseResult)
return null;
var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
value = options.valueCallback ? options.valueCallback(value) : value;
var rest = string.slice(matchedString.length);
return { value: value, rest: rest };
};
}
// lib/locale/fy/_lib/match.js
var matchOrdinalNumberPattern = /^(\d+)e?/i;
var parseOrdinalNumberPattern = /\d+/i;
var matchEraPatterns = {
narrow: /^([fn]\.? ?K\.?)/,
abbreviated: /^([fn]\. ?Kr\.?)/,
wide: /^((foar|nei) Kristus)/
};
var parseEraPatterns = {
any: [/^f/, /^n/]
};
var matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^K[1234]/i,
wide: /^[1234]e fearnsjier/i
};
var parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i]
};
var matchMonthPatterns = {
narrow: /^[jfmasond]/i,
abbreviated: /^(jan.|feb.|mrt.|apr.|mai.|jun.|jul.|aug.|sep.|okt.|nov.|des.)/i,
wide: /^(jannewaris|febrewaris|maart|april|maaie|juny|july|augustus|septimber|oktober|novimber|desimber)/i
};
var parseMonthPatterns = {
narrow: [
/^j/i,
/^f/i,
/^m/i,
/^a/i,
/^m/i,
/^j/i,
/^j/i,
/^a/i,
/^s/i,
/^o/i,
/^n/i,
/^d/i],
any: [
/^jan/i,
/^feb/i,
/^m(r|a)/i,
/^apr/i,
/^mai/i,
/^jun/i,
/^jul/i,
/^aug/i,
/^sep/i,
/^okt/i,
/^nov/i,
/^des/i]
};
var matchDayPatterns = {
narrow: /^[smtwf]/i,
short: /^(si|mo|ti|wo|to|fr|so)/i,
abbreviated: /^(snein|moa|tii|woa|ton|fre|sneon)/i,
wide: /^(snein|moandei|tiisdei|woansdei|tongersdei|freed|sneon)/i
};
var parseDayPatterns = {
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
any: [/^sn/i, /^mo/i, /^ti/i, /^wo/i, /^to/i, /^fr/i, /^sn/i]
};
var matchDayPeriodPatterns = {
any: /^(am|pm|middernacht|middeis|moarns|middei|jûns|nachts)/i
};
var parseDayPeriodPatterns = {
any: {
am: /^am/i,
pm: /^pm/i,
midnight: /^middernacht/i,
noon: /^middei/i,
morning: /moarns/i,
afternoon: /^middeis/i,
evening: /jûns/i,
night: /nachts/i
}
};
var match = {
ordinalNumber: buildMatchPatternFn({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: function valueCallback(value) {return parseInt(value, 10);}
}),
era: buildMatchFn({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any"
}),
quarter: buildMatchFn({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: function valueCallback(index) {return index + 1;}
}),
month: buildMatchFn({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any"
}),
day: buildMatchFn({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any"
}),
dayPeriod: buildMatchFn({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any"
})
};
// lib/locale/fy.js
var fy = {
code: "fy",
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
options: {
weekStartsOn: 1,
firstWeekContainsDate: 4
}
};
// lib/locale/fy/cdn.js
window.dateFns = _objectSpread(_objectSpread({},
window.dateFns), {}, {
locale: _objectSpread(_objectSpread({}, (_window$dateFns =
window.dateFns) === null || _window$dateFns === void 0 ? void 0 : _window$dateFns.locale), {}, {
fy: fy }) });
//# debugId=D2E32F336E3B596464756E2164756E21
//# sourceMappingURL=cdn.js.map
})();

View File

@@ -0,0 +1 @@
{"version":3,"file":"composable.js","names":["defaultConfigValues: GraphqlConfig","fetchOptions: RequestInit","headers: Record<string, string>"],"sources":["../../src/graphql/composable.ts"],"sourcesContent":["import type { AuthenticationClient } from '../auth/types.js';\nimport type { DirectusClient } from '../types/client.js';\nimport { getRequestUrl } from '../utils/get-request-url.js';\nimport { request } from '../utils/request.js';\nimport type { GraphqlClient, GraphqlConfig } from './types.js';\n\nconst defaultConfigValues: GraphqlConfig = {};\n\n/**\n * Creates a client to communicate with Directus GraphQL.\n *\n * @returns A Directus GraphQL client.\n */\nexport const graphql = (config: Partial<GraphqlConfig> = {}) => {\n\treturn <Schema>(client: DirectusClient<Schema>): GraphqlClient<Schema> => {\n\t\tconst gqlConfig = { ...defaultConfigValues, ...config };\n\t\treturn {\n\t\t\tasync query<Output extends object = Record<string, any>>(\n\t\t\t\tquery: string,\n\t\t\t\tvariables?: Record<string, unknown>,\n\t\t\t\tscope: 'items' | 'system' = 'items',\n\t\t\t): Promise<Output> {\n\t\t\t\tconst fetchOptions: RequestInit = {\n\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\tbody: JSON.stringify({ query, variables }),\n\t\t\t\t};\n\n\t\t\t\tif ('credentials' in gqlConfig) {\n\t\t\t\t\tfetchOptions.credentials = gqlConfig.credentials;\n\t\t\t\t}\n\n\t\t\t\tconst headers: Record<string, string> = {};\n\n\t\t\t\tif ('getToken' in this) {\n\t\t\t\t\tconst token = await (this.getToken as AuthenticationClient<Schema>['getToken'])();\n\n\t\t\t\t\tif (token) {\n\t\t\t\t\t\theaders['Authorization'] = `Bearer ${token}`;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ('Content-Type' in headers === false) {\n\t\t\t\t\theaders['Content-Type'] = 'application/json';\n\t\t\t\t}\n\n\t\t\t\tfetchOptions.headers = headers;\n\t\t\t\tconst requestPath = scope === 'items' ? '/graphql' : '/graphql/system';\n\t\t\t\tconst requestUrl = getRequestUrl(client.url, requestPath);\n\n\t\t\t\treturn await request<Output>(requestUrl.toString(), fetchOptions, client.globals.fetch);\n\t\t\t},\n\t\t};\n\t};\n};\n"],"mappings":"0GAMA,MAAMA,EAAqC,EAAE,CAOhC,GAAW,EAAiC,EAAE,GAC1C,GAA0D,CACzE,IAAM,EAAY,CAAE,GAAG,EAAqB,GAAG,EAAQ,CACvD,MAAO,CACN,MAAM,MACL,EACA,EACA,EAA4B,QACV,CAClB,IAAMC,EAA4B,CACjC,OAAQ,OACR,KAAM,KAAK,UAAU,CAAE,QAAO,YAAW,CAAC,CAC1C,CAEG,gBAAiB,IACpB,EAAa,YAAc,EAAU,aAGtC,IAAMC,EAAkC,EAAE,CAE1C,GAAI,aAAc,KAAM,CACvB,IAAM,EAAQ,MAAO,KAAK,UAAuD,CAE7E,IACH,EAAQ,cAAmB,UAAU,KAInC,iBAAkB,IACrB,EAAQ,gBAAkB,oBAG3B,EAAa,QAAU,EACvB,IAAM,EAAc,IAAU,QAAU,WAAa,kBAGrD,OAAO,MAAM,EAFM,EAAc,EAAO,IAAK,EAAY,CAEjB,UAAU,CAAE,EAAc,EAAO,QAAQ,MAAM,EAExF"}

View File

@@ -0,0 +1,136 @@
import { buildMatchFn } from "../../_lib/buildMatchFn.mjs";
import { buildMatchPatternFn } from "../../_lib/buildMatchPatternFn.mjs";
const matchOrdinalNumberPattern = /^(\d+)(º)?/i;
const parseOrdinalNumberPattern = /\d+/i;
const matchEraPatterns = {
narrow: /^(ac|dc|a|d)/i,
abbreviated: /^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,
wide: /^(antes de cristo|antes da era com[uú]n|despois de cristo|era com[uú]n)/i,
};
const parseEraPatterns = {
any: [/^ac/i, /^dc/i],
wide: [
/^(antes de cristo|antes da era com[uú]n)/i,
/^(despois de cristo|era com[uú]n)/i,
],
};
const matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^T[1234]/i,
wide: /^[1234](º)? trimestre/i,
};
const parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i],
};
const matchMonthPatterns = {
narrow: /^[xfmasond]/i,
abbreviated: /^(xan|feb|mar|abr|mai|xun|xul|ago|set|out|nov|dec)/i,
wide: /^(xaneiro|febreiro|marzo|abril|maio|xuño|xullo|agosto|setembro|outubro|novembro|decembro)/i,
};
const parseMonthPatterns = {
narrow: [
/^x/i,
/^f/i,
/^m/i,
/^a/i,
/^m/i,
/^x/i,
/^x/i,
/^a/i,
/^s/i,
/^o/i,
/^n/i,
/^d/i,
],
any: [
/^xan/i,
/^feb/i,
/^mar/i,
/^abr/i,
/^mai/i,
/^xun/i,
/^xul/i,
/^ago/i,
/^set/i,
/^out/i,
/^nov/i,
/^dec/i,
],
};
const matchDayPatterns = {
narrow: /^[dlmxvs]/i,
short: /^(do|lu|ma|me|xo|ve|sa)/i,
abbreviated: /^(dom|lun|mar|mer|xov|ven|sab)/i,
wide: /^(domingo|luns|martes|m[eé]rcores|xoves|venres|s[áa]bado)/i,
};
const parseDayPatterns = {
narrow: [/^d/i, /^l/i, /^m/i, /^m/i, /^x/i, /^v/i, /^s/i],
any: [/^do/i, /^lu/i, /^ma/i, /^me/i, /^xo/i, /^ve/i, /^sa/i],
};
const matchDayPeriodPatterns = {
narrow: /^(a|p|mn|md|(da|[aá]s) (mañ[aá]|tarde|noite))/i,
any: /^([ap]\.?\s?m\.?|medianoite|mediod[ií]a|(da|[aá]s) (mañ[aá]|tarde|noite))/i,
};
const parseDayPeriodPatterns = {
any: {
am: /^a/i,
pm: /^p/i,
midnight: /^mn/i,
noon: /^md/i,
morning: /mañ[aá]/i,
afternoon: /tarde/i,
evening: /tardiña/i,
night: /noite/i,
},
};
export const match = {
ordinalNumber: buildMatchPatternFn({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: (value) => parseInt(value, 10),
}),
era: buildMatchFn({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any",
}),
quarter: buildMatchFn({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: (index) => index + 1,
}),
month: buildMatchFn({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any",
}),
day: buildMatchFn({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any",
}),
dayPeriod: buildMatchFn({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any",
}),
};

View File

@@ -0,0 +1,6 @@
import type { BeginTransaction } from './types.js';
/**
* Default implementation of `beginTransaction` that returns a resolved promise of null
*/
export declare function defaultBeginTransaction(): BeginTransaction;
//# sourceMappingURL=defaultBeginTransaction.d.ts.map

View File

@@ -0,0 +1 @@
Prism.languages.vala=Prism.languages.extend("clike",{"class-name":[{pattern:/\b[A-Z]\w*(?:\.\w+)*\b(?=(?:\?\s+|\*?\s+\*?)\w)/,inside:{punctuation:/\./}},{pattern:/(\[)[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}},{pattern:/(\b(?:class|interface)\s+[A-Z]\w*(?:\.\w+)*\s*:\s*)[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}},{pattern:/((?:\b(?:class|enum|interface|new|struct)\s+)|(?:catch\s+\())[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}}],keyword:/\b(?:abstract|as|assert|async|base|bool|break|case|catch|char|class|const|construct|continue|default|delegate|delete|do|double|dynamic|else|ensures|enum|errordomain|extern|finally|float|for|foreach|get|if|in|inline|int|int16|int32|int64|int8|interface|internal|is|lock|long|namespace|new|null|out|override|owned|params|private|protected|public|ref|requires|return|set|short|signal|sizeof|size_t|ssize_t|static|string|struct|switch|this|throw|throws|try|typeof|uchar|uint|uint16|uint32|uint64|uint8|ulong|unichar|unowned|ushort|using|value|var|virtual|void|volatile|weak|while|yield)\b/i,function:/\b\w+(?=\s*\()/,number:/(?:\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)(?:f|u?l?)?/i,operator:/\+\+|--|&&|\|\||<<=?|>>=?|=>|->|~|[+\-*\/%&^|=!<>]=?|\?\??|\.\.\./,punctuation:/[{}[\];(),.:]/,constant:/\b[A-Z0-9_]+\b/}),Prism.languages.insertBefore("vala","string",{"raw-string":{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string"},"template-string":{pattern:/@"[\s\S]*?"/,greedy:!0,inside:{interpolation:{pattern:/\$(?:\([^)]*\)|[a-zA-Z]\w*)/,inside:{delimiter:{pattern:/^\$\(?|\)$/,alias:"punctuation"},rest:Prism.languages.vala}},string:/[\s\S]+/}}}),Prism.languages.insertBefore("vala","keyword",{regex:{pattern:/\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[imsx]{0,4}(?=\s*(?:$|[\r\n,.;})\]]))/,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\//,"regex-flags":/^[a-z]+$/}}});

View File

@@ -0,0 +1,3 @@
export {
StyleSheet
} from "./emotion-sheet.development.cjs.js";

View File

@@ -0,0 +1,78 @@
import { startInactiveSpan as startInactiveSpan$1, startSpan as startSpan$1, startSpanManual as startSpanManual$1, debug, SentryNonRecordingSpan } from '@sentry/core';
import { DEBUG_BUILD } from '../debug-build.js';
import { isBuild } from './isBuild.js';
import { isUseCacheFunction } from './isUseCacheFunction.js';
function shouldNoopSpan(callback) {
const isBuildContext = isBuild();
const isUseCacheFunctionContext = callback ? isUseCacheFunction(callback) : false;
if (isUseCacheFunctionContext) {
DEBUG_BUILD && debug.log('Skipping span creation in Cache Components context');
}
return isBuildContext || isUseCacheFunctionContext;
}
function createNonRecordingSpan() {
return new SentryNonRecordingSpan({
traceId: '00000000000000000000000000000000',
spanId: '0000000000000000',
});
}
/**
* Next.js-specific implementation of `startSpan` that skips span creation
* in Cache Components contexts (which render at build time).
*
* When in a Cache Components context, we execute the callback with a non-recording span
* and return early without creating an actual span, since spans don't make sense at build/cache time.
*
* @param options - Options for starting the span
* @param callback - Callback function that receives the span
* @returns The return value of the callback
*/
function startSpan(options, callback) {
if (shouldNoopSpan(callback)) {
return callback(createNonRecordingSpan());
}
return startSpan$1(options, callback);
}
/**
*
* When in a Cache Components context, we execute the callback with a non-recording span
* and return early without creating an actual span, since spans don't make sense at build/cache time.
*
* @param options - Options for starting the span
* @param callback - Callback function that receives the span and finish function
* @returns The return value of the callback
*/
function startSpanManual(options, callback) {
if (shouldNoopSpan(callback)) {
const nonRecordingSpan = createNonRecordingSpan();
return callback(nonRecordingSpan, () => nonRecordingSpan.end());
}
return startSpanManual$1(options, callback);
}
/**
*
* When in a Cache Components context, we return a non-recording span and return early
* without creating an actual span, since spans don't make sense at build/cache time.
*
* @param options - Options for starting the span
* @returns A non-recording span (in Cache Components context) or the created span
*/
function startInactiveSpan(options) {
if (shouldNoopSpan()) {
return createNonRecordingSpan();
}
return startInactiveSpan$1(options);
}
export { startInactiveSpan, startSpan, startSpanManual };
//# sourceMappingURL=nextSpan.js.map

View File

@@ -0,0 +1,21 @@
import { CollectionType, SingletonCollections } from "../../../types/schema.cjs";
import { ApplyQueryFields } from "../../../types/output.cjs";
import { Query, QueryItem } from "../../../types/query.cjs";
import { RestCommand } from "../../types.cjs";
//#region src/rest/commands/read/singleton.d.ts
type ReadSingletonOutput<Schema, Collection extends SingletonCollections<Schema>, TQuery extends Query<Schema, Schema[Collection]>> = ApplyQueryFields<Schema, CollectionType<Schema, Collection>, TQuery['fields']>;
/**
* List the singleton item in Directus.
*
* @param collection The collection of the items
* @param query The query parameters
*
* @returns An array of up to limit item objects. If no items are available, data will be an empty array.
* @throws Will throw if collection is a core collection
* @throws Will throw if collection is empty
*/
declare const readSingleton: <Schema, Collection extends SingletonCollections<Schema>, const TQuery extends QueryItem<Schema, Schema[Collection]>>(collection: Collection, query?: TQuery) => RestCommand<ReadSingletonOutput<Schema, Collection, TQuery>, Schema>;
//#endregion
export { ReadSingletonOutput, readSingleton };
//# sourceMappingURL=singleton.d.cts.map

View File

@@ -0,0 +1,37 @@
"use strict";
exports.endOfYear = endOfYear;
var _index = require("./toDate.cjs");
/**
* The {@link endOfYear} function options.
*/
/**
* @name endOfYear
* @category Year Helpers
* @summary Return the end of a year for the given date.
*
* @description
* Return the end of a year for the given date.
* The result will be in the local timezone.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
*
* @param date - The original date
* @param options - The options
*
* @returns The end of a year
*
* @example
* // The end of a year for 2 September 2014 11:55:00:
* const result = endOfYear(new Date(2014, 8, 2, 11, 55, 0))
* //=> Wed Dec 31 2014 23:59:59.999
*/
function endOfYear(date, options) {
const _date = (0, _index.toDate)(date, options?.in);
const year = _date.getFullYear();
_date.setFullYear(year + 1, 0, 0);
_date.setHours(23, 59, 59, 999);
return _date;
}

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/sqlite-core/columns/all.ts"],"sourcesContent":["import { blob } from './blob.ts';\nimport { customType } from './custom.ts';\nimport { integer } from './integer.ts';\nimport { numeric } from './numeric.ts';\nimport { real } from './real.ts';\nimport { text } from './text.ts';\n\nexport function getSQLiteColumnBuilders() {\n\treturn {\n\t\tblob,\n\t\tcustomType,\n\t\tinteger,\n\t\tnumeric,\n\t\treal,\n\t\ttext,\n\t};\n}\n\nexport type SQLiteColumnBuilders = ReturnType<typeof getSQLiteColumnBuilders>;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAqB;AACrB,oBAA2B;AAC3B,qBAAwB;AACxB,qBAAwB;AACxB,kBAAqB;AACrB,kBAAqB;AAEd,SAAS,0BAA0B;AACzC,SAAO;AAAA,IACN;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD;AACD;","names":[]}

View File

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

View File

@@ -0,0 +1,15 @@
"use strict";
exports.formatRelative = void 0;
const formatRelativeLocale = {
lastWeek: "eeee 'اللي جاي الساعة' p",
yesterday: "'إمبارح الساعة' p",
today: "'النهاردة الساعة' p",
tomorrow: "'بكرة الساعة' p",
nextWeek: "eeee 'الساعة' p",
other: "P",
};
const formatRelative = (token, _date, _baseDate, _options) =>
formatRelativeLocale[token];
exports.formatRelative = formatRelative;

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/forms/Form/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAA+D,MAAM,OAAO,CAAA;AAGnF,OAAO,KAAK,EAGV,SAAS,EAIV,MAAM,YAAY,CAAA;AAoCnB,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CA81BpC,CAAA;AAED,OAAO,EACL,mBAAmB,EACnB,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,OAAO,EACP,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,YAAY,GACb,MAAM,cAAc,CAAA;AAErB,OAAO,EAAE,SAAS,EAAE,CAAA"}

View File

@@ -0,0 +1,26 @@
import initExtractionCompiler from './extractor/initExtractionCompiler.js';
import getNextConfig from './getNextConfig.js';
import { warn } from './utils.js';
import createMessagesDeclaration from './declaration/createMessagesDeclaration.js';
function initPlugin(pluginConfig, nextConfig) {
if (nextConfig?.i18n != null) {
warn("An `i18n` property was found in your Next.js config. This likely causes conflicts and should therefore be removed if you use the App Router.\n\nIf you're in progress of migrating from the Pages Router, you can refer to this example: https://next-intl.dev/examples#app-router-migration\n");
}
const messagesPathOrPaths = pluginConfig.experimental?.createMessagesDeclaration;
if (messagesPathOrPaths) {
createMessagesDeclaration(typeof messagesPathOrPaths === 'string' ? [messagesPathOrPaths] : messagesPathOrPaths);
}
initExtractionCompiler(pluginConfig);
return getNextConfig(pluginConfig, nextConfig);
}
function createNextIntlPlugin(i18nPathOrConfig = {}) {
const config = typeof i18nPathOrConfig === 'string' ? {
requestConfig: i18nPathOrConfig
} : i18nPathOrConfig;
return function withNextIntl(nextConfig) {
return initPlugin(config, nextConfig);
};
}
export { createNextIntlPlugin as default };

View File

@@ -0,0 +1 @@
{"version":3,"names":["_arrayLikeToArray","arr","len","length","i","arr2","Array"],"sources":["../../src/helpers/arrayLikeToArray.ts"],"sourcesContent":["/* @minVersion 7.9.0 */\n\nexport default function _arrayLikeToArray<T>(\n arr: ArrayLike<T>,\n len?: number | null,\n) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array<T>(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}\n"],"mappings":";;;;;;AAEe,SAASA,iBAAiBA,CACvCC,GAAiB,EACjBC,GAAmB,EACnB;EACA,IAAIA,GAAG,IAAI,IAAI,IAAIA,GAAG,GAAGD,GAAG,CAACE,MAAM,EAAED,GAAG,GAAGD,GAAG,CAACE,MAAM;EACrD,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEC,IAAI,GAAG,IAAIC,KAAK,CAAIJ,GAAG,CAAC,EAAEE,CAAC,GAAGF,GAAG,EAAEE,CAAC,EAAE,EAAEC,IAAI,CAACD,CAAC,CAAC,GAAGH,GAAG,CAACG,CAAC,CAAC;EACxE,OAAOC,IAAI;AACb","ignoreList":[]}

View File

@@ -0,0 +1,135 @@
"use strict";
exports.match = void 0;
var _index = require("../../_lib/buildMatchFn.js");
var _index2 = require("../../_lib/buildMatchPatternFn.js");
const matchOrdinalNumberPattern = /^(\d+)(\.)?/i;
const parseOrdinalNumberPattern = /\d+/i;
const matchEraPatterns = {
narrow: /^(fKr|fvt|eKr|vt)/i,
abbreviated: /^(f\.Kr\.?|f\.v\.t\.?|e\.Kr\.?|v\.t\.)/i,
wide: /^(f.Kr.|før vesterlandsk tidsregning|e.Kr.|vesterlandsk tidsregning)/i,
};
const parseEraPatterns = {
any: [/^f/i, /^(v|e)/i],
};
const matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^[1234]. kvt\./i,
wide: /^[1234]\.? kvartal/i,
};
const parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i],
};
const matchMonthPatterns = {
narrow: /^[jfmasond]/i,
abbreviated: /^(jan.|feb.|mar.|apr.|maj|jun.|jul.|aug.|sep.|okt.|nov.|dec.)/i,
wide: /^(januar|februar|marts|april|maj|juni|juli|august|september|oktober|november|december)/i,
};
const parseMonthPatterns = {
narrow: [
/^j/i,
/^f/i,
/^m/i,
/^a/i,
/^m/i,
/^j/i,
/^j/i,
/^a/i,
/^s/i,
/^o/i,
/^n/i,
/^d/i,
],
any: [
/^ja/i,
/^f/i,
/^mar/i,
/^ap/i,
/^maj/i,
/^jun/i,
/^jul/i,
/^au/i,
/^s/i,
/^o/i,
/^n/i,
/^d/i,
],
};
const matchDayPatterns = {
narrow: /^[smtofl]/i,
short: /^(søn.|man.|tir.|ons.|tor.|fre.|lør.)/i,
abbreviated: /^(søn|man|tir|ons|tor|fre|lør)/i,
wide: /^(søndag|mandag|tirsdag|onsdag|torsdag|fredag|lørdag)/i,
};
const parseDayPatterns = {
narrow: [/^s/i, /^m/i, /^t/i, /^o/i, /^t/i, /^f/i, /^l/i],
any: [/^s/i, /^m/i, /^ti/i, /^o/i, /^to/i, /^f/i, /^l/i],
};
const matchDayPeriodPatterns = {
narrow: /^(a|p|midnat|middag|(om) (morgenen|eftermiddagen|aftenen|natten))/i,
any: /^([ap]\.?\s?m\.?|midnat|middag|(om) (morgenen|eftermiddagen|aftenen|natten))/i,
};
const parseDayPeriodPatterns = {
any: {
am: /^a/i,
pm: /^p/i,
midnight: /midnat/i,
noon: /middag/i,
morning: /morgen/i,
afternoon: /eftermiddag/i,
evening: /aften/i,
night: /nat/i,
},
};
const match = (exports.match = {
ordinalNumber: (0, _index2.buildMatchPatternFn)({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: (value) => parseInt(value, 10),
}),
era: (0, _index.buildMatchFn)({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any",
}),
quarter: (0, _index.buildMatchFn)({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: (index) => index + 1,
}),
month: (0, _index.buildMatchFn)({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any",
}),
day: (0, _index.buildMatchFn)({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any",
}),
dayPeriod: (0, _index.buildMatchFn)({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any",
}),
});

View File

@@ -0,0 +1,53 @@
/*
* 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.
*/
const consoleMap = [
{ n: 'error', c: 'error' },
{ n: 'warn', c: 'warn' },
{ n: 'info', c: 'info' },
{ n: 'debug', c: 'debug' },
{ n: 'verbose', c: 'trace' },
];
/**
* A simple Immutable Console based diagnostic logger which will output any messages to the Console.
* If you want to limit the amount of logging to a specific level or lower use the
* {@link createLogLevelDiagLogger}
*/
export class DiagConsoleLogger {
constructor() {
function _consoleFunc(funcName) {
return function (...args) {
if (console) {
// Some environments only expose the console when the F12 developer console is open
// eslint-disable-next-line no-console
let theFunc = console[funcName];
if (typeof theFunc !== 'function') {
// Not all environments support all functions
// eslint-disable-next-line no-console
theFunc = console.log;
}
// One last final check
if (typeof theFunc === 'function') {
return theFunc.apply(console, args);
}
}
};
}
for (let i = 0; i < consoleMap.length; i++) {
this[consoleMap[i].n] = _consoleFunc(consoleMap[i].c);
}
}
}
//# sourceMappingURL=consoleLogger.js.map

View File

@@ -0,0 +1,441 @@
import { RawSourceMap, SourceMapGenerator } from 'source-map-js'
import AtRule, { AtRuleProps } from './at-rule.js'
import Comment, { CommentProps } from './comment.js'
import Container, { ContainerProps } from './container.js'
import CssSyntaxError from './css-syntax-error.js'
import Declaration, { DeclarationProps } from './declaration.js'
import Document, { DocumentProps } from './document.js'
import Input, { FilePosition } from './input.js'
import LazyResult from './lazy-result.js'
import list from './list.js'
import Node, {
AnyNode,
ChildNode,
ChildProps,
NodeErrorOptions,
NodeProps,
Position,
Source
} from './node.js'
import Processor from './processor.js'
import Result, { Message } from './result.js'
import Root, { RootProps } from './root.js'
import Rule, { RuleProps } from './rule.js'
import Warning, { WarningOptions } from './warning.js'
type DocumentProcessor = (
document: Document,
helper: postcss.Helpers
) => Promise<void> | void
type RootProcessor = (root: Root, helper: postcss.Helpers) => Promise<void> | void
type DeclarationProcessor = (
decl: Declaration,
helper: postcss.Helpers
) => Promise<void> | void
type RuleProcessor = (rule: Rule, helper: postcss.Helpers) => Promise<void> | void
type AtRuleProcessor = (atRule: AtRule, helper: postcss.Helpers) => Promise<void> | void
type CommentProcessor = (
comment: Comment,
helper: postcss.Helpers
) => Promise<void> | void
interface Processors {
/**
* Will be called on all`AtRule` nodes.
*
* Will be called again on node or children changes.
*/
AtRule?: { [name: string]: AtRuleProcessor } | AtRuleProcessor
/**
* Will be called on all `AtRule` nodes, when all children will be processed.
*
* Will be called again on node or children changes.
*/
AtRuleExit?: { [name: string]: AtRuleProcessor } | AtRuleProcessor
/**
* Will be called on all `Comment` nodes.
*
* Will be called again on node or children changes.
*/
Comment?: CommentProcessor
/**
* Will be called on all `Comment` nodes after listeners
* for `Comment` event.
*
* Will be called again on node or children changes.
*/
CommentExit?: CommentProcessor
/**
* Will be called on all `Declaration` nodes after listeners
* for `Declaration` event.
*
* Will be called again on node or children changes.
*/
Declaration?: { [prop: string]: DeclarationProcessor } | DeclarationProcessor
/**
* Will be called on all `Declaration` nodes.
*
* Will be called again on node or children changes.
*/
DeclarationExit?:
| { [prop: string]: DeclarationProcessor }
| DeclarationProcessor
/**
* Will be called on `Document` node.
*
* Will be called again on children changes.
*/
Document?: DocumentProcessor
/**
* Will be called on `Document` node, when all children will be processed.
*
* Will be called again on children changes.
*/
DocumentExit?: DocumentProcessor
/**
* Will be called on `Root` node once.
*/
Once?: RootProcessor
/**
* Will be called on `Root` node once, when all children will be processed.
*/
OnceExit?: RootProcessor
/**
* Will be called on `Root` node.
*
* Will be called again on children changes.
*/
Root?: RootProcessor
/**
* Will be called on `Root` node, when all children will be processed.
*
* Will be called again on children changes.
*/
RootExit?: RootProcessor
/**
* Will be called on all `Rule` nodes.
*
* Will be called again on node or children changes.
*/
Rule?: RuleProcessor
/**
* Will be called on all `Rule` nodes, when all children will be processed.
*
* Will be called again on node or children changes.
*/
RuleExit?: RuleProcessor
}
declare namespace postcss {
export {
AnyNode,
AtRule,
AtRuleProps,
ChildNode,
ChildProps,
Comment,
CommentProps,
Container,
ContainerProps,
CssSyntaxError,
Declaration,
DeclarationProps,
Document,
DocumentProps,
FilePosition,
Input,
LazyResult,
list,
Message,
Node,
NodeErrorOptions,
NodeProps,
Position,
Processor,
Result,
Root,
RootProps,
Rule,
RuleProps,
Source,
Warning,
WarningOptions
}
export type SourceMap = SourceMapGenerator & {
toJSON(): RawSourceMap
}
export type Helpers = { postcss: Postcss; result: Result } & Postcss
export interface Plugin extends Processors {
postcssPlugin: string
prepare?: (result: Result) => Processors
}
export interface PluginCreator<PluginOptions> {
(opts?: PluginOptions): Plugin | Processor
postcss: true
}
export interface Transformer extends TransformCallback {
postcssPlugin: string
postcssVersion: string
}
export interface TransformCallback {
(root: Root, result: Result): Promise<void> | void
}
export interface OldPlugin<T> extends Transformer {
(opts?: T): Transformer
postcss: Transformer
}
export type AcceptedPlugin =
| {
postcss: Processor | TransformCallback
}
| OldPlugin<any>
| Plugin
| PluginCreator<any>
| Processor
| TransformCallback
export interface Parser<RootNode = Document | Root> {
(
css: { toString(): string } | string,
opts?: Pick<ProcessOptions, 'from' | 'map'>
): RootNode
}
export interface Builder {
(part: string, node?: AnyNode, type?: 'end' | 'start'): void
}
export interface Stringifier {
(node: AnyNode, builder: Builder): void
}
export interface JSONHydrator {
(data: object): Node
(data: object[]): Node[]
}
export interface Syntax<RootNode = Document | Root> {
/**
* Function to generate AST by string.
*/
parse?: Parser<RootNode>
/**
* Class to generate string by AST.
*/
stringify?: Stringifier
}
export interface SourceMapOptions {
/**
* Use absolute path in generated source map.
*/
absolute?: boolean
/**
* Indicates that PostCSS should add annotation comments to the CSS.
* By default, PostCSS will always add a comment with a path
* to the source map. PostCSS will not add annotations to CSS files
* that do not contain any comments.
*
* By default, PostCSS presumes that you want to save the source map as
* `opts.to + '.map'` and will use this path in the annotation comment.
* A different path can be set by providing a string value for annotation.
*
* If you have set `inline: true`, annotation cannot be disabled.
*/
annotation?: ((file: string, root: Root) => string) | boolean | string
/**
* Override `from` in maps sources.
*/
from?: string
/**
* Indicates that the source map should be embedded in the output CSS
* as a Base64-encoded comment. By default, it is `true`.
* But if all previous maps are external, not inline, PostCSS will not embed
* the map even if you do not set this option.
*
* If you have an inline source map, the result.map property will be empty,
* as the source map will be contained within the text of `result.css`.
*/
inline?: boolean
/**
* Source map content from a previous processing step (e.g., Sass).
*
* PostCSS will try to read the previous source map
* automatically (based on comments within the source CSS), but you can use
* this option to identify it manually.
*
* If desired, you can omit the previous map with prev: `false`.
*/
prev?: ((file: string) => string) | boolean | object | string
/**
* Indicates that PostCSS should set the origin content (e.g., Sass source)
* of the source map. By default, it is true. But if all previous maps do not
* contain sources content, PostCSS will also leave it out even if you
* do not set this option.
*/
sourcesContent?: boolean
}
export interface ProcessOptions<RootNode = Document | Root> {
/**
* The path of the CSS source file. You should always set `from`,
* because it is used in source map generation and syntax error messages.
*/
from?: string
/**
* Source map options
*/
map?: boolean | SourceMapOptions
/**
* Function to generate AST by string.
*/
parser?: Parser<RootNode> | Syntax<RootNode>
/**
* Class to generate string by AST.
*/
stringifier?: Stringifier | Syntax<RootNode>
/**
* Object with parse and stringify.
*/
syntax?: Syntax<RootNode>
/**
* The path where you'll put the output CSS file. You should always set `to`
* to generate correct source maps.
*/
to?: string
}
export type Postcss = typeof postcss
/**
* Default function to convert a node tree into a CSS string.
*/
export let stringify: Stringifier
/**
* Parses source css and returns a new `Root` or `Document` node,
* which contains the source CSS nodes.
*
* ```js
* // Simple CSS concatenation with source map support
* const root1 = postcss.parse(css1, { from: file1 })
* const root2 = postcss.parse(css2, { from: file2 })
* root1.append(root2).toResult().css
* ```
*/
export let parse: Parser<Root>
/**
* Rehydrate a JSON AST (from `Node#toJSON`) back into the AST classes.
*
* ```js
* const json = root.toJSON()
* // save to file, send by network, etc
* const root2 = postcss.fromJSON(json)
* ```
*/
export let fromJSON: JSONHydrator
/**
* Creates a new `Comment` node.
*
* @param defaults Properties for the new node.
* @return New comment node
*/
export function comment(defaults?: CommentProps): Comment
/**
* Creates a new `AtRule` node.
*
* @param defaults Properties for the new node.
* @return New at-rule node.
*/
export function atRule(defaults?: AtRuleProps): AtRule
/**
* Creates a new `Declaration` node.
*
* @param defaults Properties for the new node.
* @return New declaration node.
*/
export function decl(defaults?: DeclarationProps): Declaration
/**
* Creates a new `Rule` node.
*
* @param default Properties for the new node.
* @return New rule node.
*/
export function rule(defaults?: RuleProps): Rule
/**
* Creates a new `Root` node.
*
* @param defaults Properties for the new node.
* @return New root node.
*/
export function root(defaults?: RootProps): Root
/**
* Creates a new `Document` node.
*
* @param defaults Properties for the new node.
* @return New document node.
*/
export function document(defaults?: DocumentProps): Document
export { postcss as default }
}
/**
* Create a new `Processor` instance that will apply `plugins`
* as CSS processors.
*
* ```js
* let postcss = require('postcss')
*
* postcss(plugins).process(css, { from, to }).then(result => {
* console.log(result.css)
* })
* ```
*
* @param plugins PostCSS plugins.
* @return Processor to process multiple CSS.
*/
declare function postcss(plugins?: postcss.AcceptedPlugin[]): Processor
declare function postcss(...plugins: postcss.AcceptedPlugin[]): Processor
export = postcss

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