fix(products): fix breadcrumbs and product filtering (backport from main)
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
@@ -0,0 +1,4 @@
import type { SanitizedConfig } from 'payload';
export declare const getGraphql: (config: Promise<SanitizedConfig> | SanitizedConfig) => Promise<any>;
export declare const POST: (config: Promise<SanitizedConfig> | SanitizedConfig) => (request: Request) => Promise<Response>;
//# sourceMappingURL=handler.d.ts.map
@@ -0,0 +1,53 @@
import { Parser } from "../Parser.mjs";
import { dayPeriodEnumToHours } from "../utils.mjs";
export class AMPMMidnightParser extends Parser {
priority = 80;
parse(dateString, token, match) {
switch (token) {
case "b":
case "bb":
case "bbb":
return (
match.dayPeriod(dateString, {
width: "abbreviated",
context: "formatting",
}) ||
match.dayPeriod(dateString, {
width: "narrow",
context: "formatting",
})
);
case "bbbbb":
return match.dayPeriod(dateString, {
width: "narrow",
context: "formatting",
});
case "bbbb":
default:
return (
match.dayPeriod(dateString, {
width: "wide",
context: "formatting",
}) ||
match.dayPeriod(dateString, {
width: "abbreviated",
context: "formatting",
}) ||
match.dayPeriod(dateString, {
width: "narrow",
context: "formatting",
})
);
}
}
set(date, _flags, value) {
date.setHours(dayPeriodEnumToHours(value), 0, 0, 0);
return date;
}
incompatibleTokens = ["a", "B", "H", "k", "t", "T"];
}
@@ -0,0 +1 @@
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/resolvers/auth/init.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAE1C,wBAAgB,IAAI,CAAC,UAAU,EAAE,MAAM,gCACK,OAAO,sBAUlD"}
@@ -0,0 +1,75 @@
import isBrowser from '#is-browser'
import { RegisteredCache, EmotionCache, SerializedStyles } from './types'
export function getRegisteredStyles(
registered: RegisteredCache,
registeredStyles: string[],
classNames: string
): string {
let rawClassName = ''
classNames.split(' ').forEach(className => {
if (registered[className] !== undefined) {
registeredStyles.push(`${registered[className]};`)
} else if (className) {
rawClassName += `${className} `
}
})
return rawClassName
}
export const registerStyles = (
cache: EmotionCache,
serialized: SerializedStyles,
isStringTag: boolean
): void => {
let className = `${cache.key}-${serialized.name}`
if (
// we only need to add the styles to the registered cache if the
// class name could be used further down
// the tree but if it's a string tag, we know it won't
// so we don't have to add it to registered cache.
// this improves memory usage since we can avoid storing the whole style string
(isStringTag === false ||
// we need to always store it if we're in compat mode and
// in node since emotion-server relies on whether a style is in
// the registered cache to know whether a style is global or not
// also, note that this check will be dead code eliminated in the browser
(isBrowser === false && cache.compat !== undefined)) &&
cache.registered[className] === undefined
) {
cache.registered[className] = serialized.styles
}
}
export const insertStyles = (
cache: EmotionCache,
serialized: SerializedStyles,
isStringTag: boolean
) => {
registerStyles(cache, serialized, isStringTag)
let className = `${cache.key}-${serialized.name}`
if (cache.inserted[serialized.name] === undefined) {
let stylesForSSR = ''
let current: SerializedStyles | undefined = serialized
do {
let maybeStyles = cache.insert(
serialized === current ? `.${className}` : '',
current,
cache.sheet,
true
)
if (!isBrowser && maybeStyles !== undefined) {
stylesForSSR += maybeStyles
}
current = current.next
} while (current !== undefined)
if (!isBrowser && stylesForSSR.length !== 0) {
return stylesForSSR
}
}
}
export * from './types'
@@ -0,0 +1,7 @@
# @swc/couter
Download counter for swc packages.
This package does not contain any code. It is used solely to track number of downloads of npm packages like `@swc/core` and `@next/swc`. If you are building a huge project using SWC, please consider depending on this package. It will not add any code to your bundle, but it will help us determine the number of users of SWC.
Counting is done by npm, just like other packages.
@@ -0,0 +1,74 @@
import { entityKind } from "../entity.js";
import { TableName } from "../table.utils.js";
class ForeignKeyBuilder {
static [entityKind] = "MySqlForeignKeyBuilder";
/** @internal */
reference;
/** @internal */
_onUpdate;
/** @internal */
_onDelete;
constructor(config, actions) {
this.reference = () => {
const { name, columns, foreignColumns } = config();
return { name, columns, foreignTable: foreignColumns[0].table, foreignColumns };
};
if (actions) {
this._onUpdate = actions.onUpdate;
this._onDelete = actions.onDelete;
}
}
onUpdate(action) {
this._onUpdate = action;
return this;
}
onDelete(action) {
this._onDelete = action;
return this;
}
/** @internal */
build(table) {
return new ForeignKey(table, this);
}
}
class ForeignKey {
constructor(table, builder) {
this.table = table;
this.reference = builder.reference;
this.onUpdate = builder._onUpdate;
this.onDelete = builder._onDelete;
}
static [entityKind] = "MySqlForeignKey";
reference;
onUpdate;
onDelete;
getName() {
const { name, columns, foreignColumns } = this.reference();
const columnNames = columns.map((column) => column.name);
const foreignColumnNames = foreignColumns.map((column) => column.name);
const chunks = [
this.table[TableName],
...columnNames,
foreignColumns[0].table[TableName],
...foreignColumnNames
];
return name ?? `${chunks.join("_")}_fk`;
}
}
function foreignKey(config) {
function mappedConfig() {
const { name, columns, foreignColumns } = config;
return {
name,
columns,
foreignColumns
};
}
return new ForeignKeyBuilder(mappedConfig);
}
export {
ForeignKey,
ForeignKeyBuilder,
foreignKey
};
//# sourceMappingURL=foreign-keys.js.map
@@ -0,0 +1,84 @@
import type { ComponentType, ReactNode } from 'react';
export interface Context<Value> {
Provider: ComponentType<{
value: Value;
children: ReactNode;
}>;
displayName?: string;
}
/**
* This creates a special context for `useContextSelector`.
*
* @example
* import { createContext } from 'use-context-selector';
*
* const PersonContext = createContext({ firstName: '', familyName: '' });
*/
export declare function createContext<Value>(defaultValue: Value): Context<Value>;
/**
* This hook returns context selected value by selector.
*
* It will only accept context created by `createContext`.
* It will trigger re-render if only the selected value is referentially changed.
*
* The selector should return referentially equal result for same input for better performance.
*
* @example
* import { useContextSelector } from 'use-context-selector';
*
* const firstName = useContextSelector(PersonContext, (state) => state.firstName);
*/
export declare function useContextSelector<Value, Selected>(context: Context<Value>, selector: (value: Value) => Selected): Selected;
/**
* This hook returns the entire context value.
* Use this instead of React.useContext for consistent behavior.
*
* @example
* import { useContext } from 'use-context-selector';
*
* const person = useContext(PersonContext);
*/
export declare function useContext<Value>(context: Context<Value>): Value;
/**
* This hook returns an update function to wrap an updating function
*
* Use this for a function that will change a value in
* concurrent rendering in React 18.
* Otherwise, there's no need to use this hook.
*
* @example
* import { useContextUpdate } from 'use-context-selector';
*
* const update = useContextUpdate();
*
* // Wrap set state function
* update(() => setState(...));
*
* // Experimental suspense mode
* update(() => setState(...), { suspense: true });
*/
export declare function useContextUpdate<Value>(context: Context<Value>): (fn: () => void, options?: {
suspense: boolean;
} | undefined) => void;
/**
* This is a Provider component for bridging multiple react roots
*
* @example
* const valueToBridge = useBridgeValue(PersonContext);
* return (
* <Renderer>
* <BridgeProvider context={PersonContext} value={valueToBridge}>
* {children}
* </BridgeProvider>
* </Renderer>
* );
*/
export declare const BridgeProvider: ({ context, value, children, }: {
context: Context<any>;
value: unknown;
children: ReactNode;
}) => import("react").FunctionComponentElement<import("react").ProviderProps<unknown>>;
/**
* This hook return a value for BridgeProvider
*/
export declare const useBridgeValue: (context: Context<any>) => any;
@@ -0,0 +1,82 @@
"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 unique_constraint_exports = {};
__export(unique_constraint_exports, {
UniqueConstraint: () => UniqueConstraint,
UniqueConstraintBuilder: () => UniqueConstraintBuilder,
UniqueOnConstraintBuilder: () => UniqueOnConstraintBuilder,
unique: () => unique,
uniqueKeyName: () => uniqueKeyName
});
module.exports = __toCommonJS(unique_constraint_exports);
var import_entity = require("../entity.cjs");
var import_table_utils = require("../table.utils.cjs");
function unique(name) {
return new UniqueOnConstraintBuilder(name);
}
function uniqueKeyName(table, columns) {
return `${table[import_table_utils.TableName]}_${columns.join("_")}_unique`;
}
class UniqueConstraintBuilder {
constructor(columns, name) {
this.name = name;
this.columns = columns;
}
static [import_entity.entityKind] = "SingleStoreUniqueConstraintBuilder";
/** @internal */
columns;
/** @internal */
build(table) {
return new UniqueConstraint(table, this.columns, this.name);
}
}
class UniqueOnConstraintBuilder {
static [import_entity.entityKind] = "SingleStoreUniqueOnConstraintBuilder";
/** @internal */
name;
constructor(name) {
this.name = name;
}
on(...columns) {
return new UniqueConstraintBuilder(columns, this.name);
}
}
class UniqueConstraint {
constructor(table, columns, name) {
this.table = table;
this.columns = columns;
this.name = name ?? uniqueKeyName(this.table, this.columns.map((column) => column.name));
}
static [import_entity.entityKind] = "SingleStoreUniqueConstraint";
columns;
name;
nullsNotDistinct = false;
getName() {
return this.name;
}
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
UniqueConstraint,
UniqueConstraintBuilder,
UniqueOnConstraintBuilder,
unique,
uniqueKeyName
});
//# sourceMappingURL=unique-constraint.cjs.map
@@ -0,0 +1,282 @@
import * as React from 'react';
import { useContext, forwardRef } from 'react';
import createCache from '@emotion/cache';
import _extends from '@babel/runtime/helpers/esm/extends';
import weakMemoize from '@emotion/weak-memoize';
import hoistNonReactStatics from '../_isolated-hnrs/dist/emotion-react-_isolated-hnrs.development.esm.js';
import { getRegisteredStyles, registerStyles, insertStyles } from '@emotion/utils';
import { serializeStyles } from '@emotion/serialize';
import { useInsertionEffectAlwaysWithSyncFallback } from '@emotion/use-insertion-effect-with-fallbacks';
var isBrowser = typeof document !== 'undefined';
var EmotionCacheContext = /* #__PURE__ */React.createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case
// because this module is primarily intended for the browser and node
// but it's also required in react native and similar environments sometimes
// and we could have a special build just for that
// but this is much easier and the native packages
// might use a different theme context in the future anyway
typeof HTMLElement !== 'undefined' ? /* #__PURE__ */createCache({
key: 'css'
}) : null);
{
EmotionCacheContext.displayName = 'EmotionCacheContext';
}
var CacheProvider = EmotionCacheContext.Provider;
var __unsafe_useEmotionCache = function useEmotionCache() {
return useContext(EmotionCacheContext);
};
var withEmotionCache = function withEmotionCache(func) {
return /*#__PURE__*/forwardRef(function (props, ref) {
// the cache will never be null in the browser
var cache = useContext(EmotionCacheContext);
return func(props, cache, ref);
});
};
if (!isBrowser) {
withEmotionCache = function withEmotionCache(func) {
return function (props) {
var cache = useContext(EmotionCacheContext);
if (cache === null) {
// yes, we're potentially creating this on every render
// it doesn't actually matter though since it's only on the server
// so there will only every be a single render
// that could change in the future because of suspense and etc. but for now,
// this works and i don't want to optimise for a future thing that we aren't sure about
cache = createCache({
key: 'css'
});
return /*#__PURE__*/React.createElement(EmotionCacheContext.Provider, {
value: cache
}, func(props, cache));
} else {
return func(props, cache);
}
};
};
}
var ThemeContext = /* #__PURE__ */React.createContext({});
{
ThemeContext.displayName = 'EmotionThemeContext';
}
var useTheme = function useTheme() {
return React.useContext(ThemeContext);
};
var getTheme = function getTheme(outerTheme, theme) {
if (typeof theme === 'function') {
var mergedTheme = theme(outerTheme);
if ((mergedTheme == null || typeof mergedTheme !== 'object' || Array.isArray(mergedTheme))) {
throw new Error('[ThemeProvider] Please return an object from your theme function, i.e. theme={() => ({})}!');
}
return mergedTheme;
}
if ((theme == null || typeof theme !== 'object' || Array.isArray(theme))) {
throw new Error('[ThemeProvider] Please make your theme prop a plain object');
}
return _extends({}, outerTheme, theme);
};
var createCacheWithTheme = /* #__PURE__ */weakMemoize(function (outerTheme) {
return weakMemoize(function (theme) {
return getTheme(outerTheme, theme);
});
});
var ThemeProvider = function ThemeProvider(props) {
var theme = React.useContext(ThemeContext);
if (props.theme !== theme) {
theme = createCacheWithTheme(theme)(props.theme);
}
return /*#__PURE__*/React.createElement(ThemeContext.Provider, {
value: theme
}, props.children);
};
function withTheme(Component) {
var componentName = Component.displayName || Component.name || 'Component';
var WithTheme = /*#__PURE__*/React.forwardRef(function render(props, ref) {
var theme = React.useContext(ThemeContext);
return /*#__PURE__*/React.createElement(Component, _extends({
theme: theme,
ref: ref
}, props));
});
WithTheme.displayName = "WithTheme(" + componentName + ")";
return hoistNonReactStatics(WithTheme, Component);
}
var hasOwn = {}.hasOwnProperty;
var getLastPart = function getLastPart(functionName) {
// The match may be something like 'Object.createEmotionProps' or
// 'Loader.prototype.render'
var parts = functionName.split('.');
return parts[parts.length - 1];
};
var getFunctionNameFromStackTraceLine = function getFunctionNameFromStackTraceLine(line) {
// V8
var match = /^\s+at\s+([A-Za-z0-9$.]+)\s/.exec(line);
if (match) return getLastPart(match[1]); // Safari / Firefox
match = /^([A-Za-z0-9$.]+)@/.exec(line);
if (match) return getLastPart(match[1]);
return undefined;
};
var internalReactFunctionNames = /* #__PURE__ */new Set(['renderWithHooks', 'processChild', 'finishClassComponent', 'renderToString']); // These identifiers come from error stacks, so they have to be valid JS
// identifiers, thus we only need to replace what is a valid character for JS,
// but not for CSS.
var sanitizeIdentifier = function sanitizeIdentifier(identifier) {
return identifier.replace(/\$/g, '-');
};
var getLabelFromStackTrace = function getLabelFromStackTrace(stackTrace) {
if (!stackTrace) return undefined;
var lines = stackTrace.split('\n');
for (var i = 0; i < lines.length; i++) {
var functionName = getFunctionNameFromStackTraceLine(lines[i]); // The first line of V8 stack traces is just "Error"
if (!functionName) continue; // If we reach one of these, we have gone too far and should quit
if (internalReactFunctionNames.has(functionName)) break; // The component name is the first function in the stack that starts with an
// uppercase letter
if (/^[A-Z]/.test(functionName)) return sanitizeIdentifier(functionName);
}
return undefined;
};
var typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';
var labelPropName = '__EMOTION_LABEL_PLEASE_DO_NOT_USE__';
var createEmotionProps = function createEmotionProps(type, props) {
if (typeof props.css === 'string' && // check if there is a css declaration
props.css.indexOf(':') !== -1) {
throw new Error("Strings are not allowed as css prop values, please wrap it in a css template literal from '@emotion/react' like this: css`" + props.css + "`");
}
var newProps = {};
for (var _key in props) {
if (hasOwn.call(props, _key)) {
newProps[_key] = props[_key];
}
}
newProps[typePropName] = type; // Runtime labeling is an opt-in feature because:
// - It causes hydration warnings when using Safari and SSR
// - It can degrade performance if there are a huge number of elements
//
// Even if the flag is set, we still don't compute the label if it has already
// been determined by the Babel plugin.
if (typeof globalThis !== 'undefined' && !!globalThis.EMOTION_RUNTIME_AUTO_LABEL && !!props.css && (typeof props.css !== 'object' || !('name' in props.css) || typeof props.css.name !== 'string' || props.css.name.indexOf('-') === -1)) {
var label = getLabelFromStackTrace(new Error().stack);
if (label) newProps[labelPropName] = label;
}
return newProps;
};
var Insertion = function Insertion(_ref) {
var cache = _ref.cache,
serialized = _ref.serialized,
isStringTag = _ref.isStringTag;
registerStyles(cache, serialized, isStringTag);
var rules = useInsertionEffectAlwaysWithSyncFallback(function () {
return insertStyles(cache, serialized, isStringTag);
});
if (!isBrowser && rules !== undefined) {
var _ref2;
var serializedNames = serialized.name;
var next = serialized.next;
while (next !== undefined) {
serializedNames += ' ' + next.name;
next = next.next;
}
return /*#__PURE__*/React.createElement("style", (_ref2 = {}, _ref2["data-emotion"] = cache.key + " " + serializedNames, _ref2.dangerouslySetInnerHTML = {
__html: rules
}, _ref2.nonce = cache.sheet.nonce, _ref2));
}
return null;
};
var Emotion = /* #__PURE__ */withEmotionCache(function (props, cache, ref) {
var cssProp = props.css; // so that using `css` from `emotion` and passing the result to the css prop works
// not passing the registered cache to serializeStyles because it would
// make certain babel optimisations not possible
if (typeof cssProp === 'string' && cache.registered[cssProp] !== undefined) {
cssProp = cache.registered[cssProp];
}
var WrappedComponent = props[typePropName];
var registeredStyles = [cssProp];
var className = '';
if (typeof props.className === 'string') {
className = getRegisteredStyles(cache.registered, registeredStyles, props.className);
} else if (props.className != null) {
className = props.className + " ";
}
var serialized = serializeStyles(registeredStyles, undefined, React.useContext(ThemeContext));
if (serialized.name.indexOf('-') === -1) {
var labelFromStack = props[labelPropName];
if (labelFromStack) {
serialized = serializeStyles([serialized, 'label:' + labelFromStack + ';']);
}
}
className += cache.key + "-" + serialized.name;
var newProps = {};
for (var _key2 in props) {
if (hasOwn.call(props, _key2) && _key2 !== 'css' && _key2 !== typePropName && (_key2 !== labelPropName)) {
newProps[_key2] = props[_key2];
}
}
newProps.className = className;
if (ref) {
newProps.ref = ref;
}
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion, {
cache: cache,
serialized: serialized,
isStringTag: typeof WrappedComponent === 'string'
}), /*#__PURE__*/React.createElement(WrappedComponent, newProps));
});
{
Emotion.displayName = 'EmotionCssPropInternal';
}
var Emotion$1 = Emotion;
export { CacheProvider as C, Emotion$1 as E, ThemeContext as T, __unsafe_useEmotionCache as _, ThemeProvider as a, withTheme as b, createEmotionProps as c, hasOwn as h, isBrowser as i, useTheme as u, withEmotionCache as w };
@@ -0,0 +1,356 @@
// prettier-ignore
/* eslint-disable */
/* auto-generated by NAPI-RS */
const { readFileSync } = require('fs')
let nativeBinding = null
const loadErrors = []
const isMusl = () => {
let musl = false
if (process.platform === 'linux') {
musl = isMuslFromFilesystem()
if (musl === null) {
musl = isMuslFromReport()
}
if (musl === null) {
musl = isMuslFromChildProcess()
}
}
return musl
}
const isFileMusl = (f) => f.includes('libc.musl-') || f.includes('ld-musl-')
const isMuslFromFilesystem = () => {
try {
return readFileSync('/usr/bin/ldd', 'utf-8').includes('musl')
} catch {
return null
}
}
const isMuslFromReport = () => {
const report = typeof process.report.getReport === 'function' ? process.report.getReport() : null
if (!report) {
return null
}
if (report.header && report.header.glibcVersionRuntime) {
return false
}
if (Array.isArray(report.sharedObjects)) {
if (report.sharedObjects.some(isFileMusl)) {
return true
}
}
return false
}
const isMuslFromChildProcess = () => {
try {
return require('child_process').execSync('ldd --version', { encoding: 'utf8' }).includes('musl')
} catch (e) {
// If we reach this case, we don't know if the system is musl or not, so is better to just fallback to false
return false
}
}
function requireNative() {
if (process.platform === 'android') {
if (process.arch === 'arm64') {
try {
return require('./swc.android-arm64.node')
} catch (e) {
loadErrors.push(e)
}
try {
return require('@swc/core-android-arm64')
} catch (e) {
loadErrors.push(e)
}
} else if (process.arch === 'arm') {
try {
return require('./swc.android-arm-eabi.node')
} catch (e) {
loadErrors.push(e)
}
try {
return require('@swc/core-android-arm-eabi')
} catch (e) {
loadErrors.push(e)
}
} else {
loadErrors.push(new Error(`Unsupported architecture on Android ${process.arch}`))
}
} else if (process.platform === 'win32') {
if (process.arch === 'x64') {
try {
return require('./swc.win32-x64-msvc.node')
} catch (e) {
loadErrors.push(e)
}
try {
return require('@swc/core-win32-x64-msvc')
} catch (e) {
loadErrors.push(e)
}
} else if (process.arch === 'ia32') {
try {
return require('./swc.win32-ia32-msvc.node')
} catch (e) {
loadErrors.push(e)
}
try {
return require('@swc/core-win32-ia32-msvc')
} catch (e) {
loadErrors.push(e)
}
} else if (process.arch === 'arm64') {
try {
return require('./swc.win32-arm64-msvc.node')
} catch (e) {
loadErrors.push(e)
}
try {
return require('@swc/core-win32-arm64-msvc')
} catch (e) {
loadErrors.push(e)
}
} else {
loadErrors.push(new Error(`Unsupported architecture on Windows: ${process.arch}`))
}
} else if (process.platform === 'darwin') {
try {
return require('./swc.darwin-universal.node')
} catch (e) {
loadErrors.push(e)
}
try {
return require('@swc/core-darwin-universal')
} catch (e) {
loadErrors.push(e)
}
if (process.arch === 'x64') {
try {
return require('./swc.darwin-x64.node')
} catch (e) {
loadErrors.push(e)
}
try {
return require('@swc/core-darwin-x64')
} catch (e) {
loadErrors.push(e)
}
} else if (process.arch === 'arm64') {
try {
return require('./swc.darwin-arm64.node')
} catch (e) {
loadErrors.push(e)
}
try {
return require('@swc/core-darwin-arm64')
} catch (e) {
loadErrors.push(e)
}
} else {
loadErrors.push(new Error(`Unsupported architecture on macOS: ${process.arch}`))
}
} else if (process.platform === 'freebsd') {
if (process.arch === 'x64') {
try {
return require('./swc.freebsd-x64.node')
} catch (e) {
loadErrors.push(e)
}
try {
return require('@swc/core-freebsd-x64')
} catch (e) {
loadErrors.push(e)
}
} else if (process.arch === 'arm64') {
try {
return require('./swc.freebsd-arm64.node')
} catch (e) {
loadErrors.push(e)
}
try {
return require('@swc/core-freebsd-arm64')
} catch (e) {
loadErrors.push(e)
}
} else {
loadErrors.push(new Error(`Unsupported architecture on FreeBSD: ${process.arch}`))
}
} else if (process.platform === 'linux') {
if (process.arch === 'x64') {
if (isMusl()) {
try {
return require('./swc.linux-x64-musl.node')
} catch (e) {
loadErrors.push(e)
}
try {
return require('@swc/core-linux-x64-musl')
} catch (e) {
loadErrors.push(e)
}
} else {
try {
return require('./swc.linux-x64-gnu.node')
} catch (e) {
loadErrors.push(e)
}
try {
return require('@swc/core-linux-x64-gnu')
} catch (e) {
loadErrors.push(e)
}
}
} else if (process.arch === 'arm64') {
if (isMusl()) {
try {
return require('./swc.linux-arm64-musl.node')
} catch (e) {
loadErrors.push(e)
}
try {
return require('@swc/core-linux-arm64-musl')
} catch (e) {
loadErrors.push(e)
}
} else {
try {
return require('./swc.linux-arm64-gnu.node')
} catch (e) {
loadErrors.push(e)
}
try {
return require('@swc/core-linux-arm64-gnu')
} catch (e) {
loadErrors.push(e)
}
}
} else if (process.arch === 'arm') {
try {
return require('./swc.linux-arm-gnueabihf.node')
} catch (e) {
loadErrors.push(e)
}
try {
return require('@swc/core-linux-arm-gnueabihf')
} catch (e) {
loadErrors.push(e)
}
} else if (process.arch === 'riscv64') {
if (isMusl()) {
try {
return require('./swc.linux-riscv64-musl.node')
} catch (e) {
loadErrors.push(e)
}
try {
return require('@swc/core-linux-riscv64-musl')
} catch (e) {
loadErrors.push(e)
}
} else {
try {
return require('./swc.linux-riscv64-gnu.node')
} catch (e) {
loadErrors.push(e)
}
try {
return require('@swc/core-linux-riscv64-gnu')
} catch (e) {
loadErrors.push(e)
}
}
} else if (process.arch === 's390x') {
try {
return require('./swc.linux-s390x-gnu.node')
} catch (e) {
loadErrors.push(e)
}
try {
return require('@swc/core-linux-s390x-gnu')
} catch (e) {
loadErrors.push(e)
}
} else {
loadErrors.push(new Error(`Unsupported architecture on Linux: ${process.arch}`))
}
} else {
loadErrors.push(new Error(`Unsupported OS: ${process.platform}, architecture: ${process.arch}`))
}
}
nativeBinding = requireNative()
if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
try {
nativeBinding = require('./swc.wasi.cjs')
} catch (err) {
if (process.env.NAPI_RS_FORCE_WASI) {
console.error(err)
}
}
if (!nativeBinding) {
try {
nativeBinding = require('@swc/core-wasm32-wasi')
} catch (err) {
if (process.env.NAPI_RS_FORCE_WASI) {
console.error(err)
}
}
}
}
if (!nativeBinding) {
if (loadErrors.length > 0) {
// TODO Link to documentation with potential fixes
// - The package owner could build/publish bindings for this arch
// - The user may need to bundle the correct files
// - The user may need to re-install node_modules to get new packages
throw new Error('Failed to load native binding', { cause: loadErrors })
}
throw new Error(`Failed to load native binding`)
}
module.exports.Compiler = nativeBinding.Compiler
module.exports.JsCompiler = nativeBinding.JsCompiler
module.exports.analyze = nativeBinding.analyze
module.exports.bundle = nativeBinding.bundle
module.exports.getTargetTriple = nativeBinding.getTargetTriple
module.exports.initCustomTraceSubscriber = nativeBinding.initCustomTraceSubscriber
module.exports.minify = nativeBinding.minify
module.exports.minifySync = nativeBinding.minifySync
module.exports.newMangleNameCache = nativeBinding.newMangleNameCache
module.exports.parse = nativeBinding.parse
module.exports.parseFile = nativeBinding.parseFile
module.exports.parseFileSync = nativeBinding.parseFileSync
module.exports.parseSync = nativeBinding.parseSync
module.exports.print = nativeBinding.print
module.exports.printSync = nativeBinding.printSync
module.exports.transform = nativeBinding.transform
module.exports.transformFile = nativeBinding.transformFile
module.exports.transformFileSync = nativeBinding.transformFileSync
module.exports.transformSync = nativeBinding.transformSync
@@ -0,0 +1,27 @@
import type { ClientRequest, IncomingHttpHeaders, RequestOptions as HTTPRequestOptions } from 'node:http';
import type { RequestOptions as HTTPSRequestOptions } from 'node:https';
export type HTTPModuleRequestOptions = HTTPRequestOptions | HTTPSRequestOptions | string | URL;
/**
* Cut version of http.IncomingMessage.
* Some transports work in a special Javascript environment where http.IncomingMessage is not available.
*/
export interface HTTPModuleRequestIncomingMessage {
headers: IncomingHttpHeaders;
statusCode?: number;
on(event: 'data' | 'end', listener: (chunk: Buffer) => void): void;
off(event: 'data' | 'end', listener: (chunk: Buffer) => void): void;
setEncoding(encoding: string): void;
}
/**
* Internal used interface for typescript.
* @hidden
*/
export interface HTTPModule {
/**
* Request wrapper
* @param options These are {@see TransportOptions}
* @param callback Callback when request is finished
*/
request(options: HTTPModuleRequestOptions, callback?: (res: HTTPModuleRequestIncomingMessage) => void): ClientRequest;
}
//# sourceMappingURL=http-module.d.ts.map
@@ -0,0 +1,56 @@
/**
*
* audit/utils
*
*/
import type { ExecutionResult } from 'graphql';
import { Audit, AuditName } from './common';
export * from '../utils';
/**
* Wrap and prepare an audit for testing.
*
* @private
*/
export declare function audit(id: string, name: AuditName, fn: () => Promise<void>): Audit;
/**
* Error thrown when an assertion test fails.
*
* @private
*/
export declare class AuditError {
/**
* Response from the server.
*/
response: Response;
/**
* Reason for the failing audit.
*/
reason: string;
constructor(response: Response, reason: string);
}
/**
* 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
*/
export declare function ressert(res: Response): {
status: {
toBe(code: number): void;
toBeBetween: (min: number, max: number) => void;
};
header(key: 'content-type'): {
toContain(part: string): void;
notToContain(part: string): void;
};
bodyAsExecutionResult: {
data: {
toBe(val: ExecutionResult['data']): Promise<void>;
};
toHaveProperty(key: keyof ExecutionResult): Promise<void>;
notToHaveProperty(key: keyof ExecutionResult): Promise<void>;
};
};
@@ -0,0 +1 @@
{"version":3,"file":"createMigration.d.ts","sourceRoot":"","sources":["../../../src/database/migrations/createMigration.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAKlD,eAAO,MAAM,eAAe,EAAE,eAuB7B,CAAA"}
@@ -0,0 +1,518 @@
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/is/_lib/formatDistance.mjs
var formatDistanceLocale = {
lessThanXSeconds: {
one: "minna en 1 sek\xFAnda",
other: "minna en {{count}} sek\xFAndur"
},
xSeconds: {
one: "1 sek\xFAnda",
other: "{{count}} sek\xFAndur"
},
halfAMinute: "h\xE1lf m\xEDn\xFAta",
lessThanXMinutes: {
one: "minna en 1 m\xEDn\xFAta",
other: "minna en {{count}} m\xEDn\xFAtur"
},
xMinutes: {
one: "1 m\xEDn\xFAta",
other: "{{count}} m\xEDn\xFAtur"
},
aboutXHours: {
one: "u.\xFE.b. 1 klukkustund",
other: "u.\xFE.b. {{count}} klukkustundir"
},
xHours: {
one: "1 klukkustund",
other: "{{count}} klukkustundir"
},
xDays: {
one: "1 dagur",
other: "{{count}} dagar"
},
aboutXWeeks: {
one: "um viku",
other: "um {{count}} vikur"
},
xWeeks: {
one: "1 viku",
other: "{{count}} vikur"
},
aboutXMonths: {
one: "u.\xFE.b. 1 m\xE1nu\xF0ur",
other: "u.\xFE.b. {{count}} m\xE1nu\xF0ir"
},
xMonths: {
one: "1 m\xE1nu\xF0ur",
other: "{{count}} m\xE1nu\xF0ir"
},
aboutXYears: {
one: "u.\xFE.b. 1 \xE1r",
other: "u.\xFE.b. {{count}} \xE1r"
},
xYears: {
one: "1 \xE1r",
other: "{{count}} \xE1r"
},
overXYears: {
one: "meira en 1 \xE1r",
other: "meira en {{count}} \xE1r"
},
almostXYears: {
one: "n\xE6stum 1 \xE1r",
other: "n\xE6stum {{count}} \xE1r"
}
};
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}}", count.toString());
}
if (options !== null && options !== void 0 && options.addSuffix) {
if (options.comparison && options.comparison > 0) {
return "\xED " + result;
} else {
return result + " s\xED\xF0an";
}
}
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/is/_lib/formatLong.mjs
var dateFormats = {
full: "EEEE, do MMMM y",
long: "do MMMM y",
medium: "do MMM y",
short: "d.MM.y"
};
var timeFormats = {
full: "'kl'. HH:mm:ss zzzz",
long: "HH:mm:ss z",
medium: "HH:mm:ss",
short: "HH:mm"
};
var dateTimeFormats = {
full: "{{date}} 'kl.' {{time}}",
long: "{{date}} 'kl.' {{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/is/_lib/formatRelative.mjs
var formatRelativeLocale = {
lastWeek: "'s\xED\xF0asta' dddd 'kl.' p",
yesterday: "'\xED g\xE6r kl.' p",
today: "'\xED dag kl.' p",
tomorrow: "'\xE1 morgun kl.' p",
nextWeek: "dddd 'kl.' 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/is/_lib/localize.mjs
var eraValues = {
narrow: ["f.Kr.", "e.Kr."],
abbreviated: ["f.Kr.", "e.Kr."],
wide: ["fyrir Krist", "eftir Krist"]
};
var quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["1F", "2F", "3F", "4F"],
wide: ["1. fj\xF3r\xF0ungur", "2. fj\xF3r\xF0ungur", "3. fj\xF3r\xF0ungur", "4. fj\xF3r\xF0ungur"]
};
var monthValues = {
narrow: ["J", "F", "M", "A", "M", "J", "J", "\xC1", "S", "\xD3", "N", "D"],
abbreviated: [
"jan.",
"feb.",
"mars",
"apr\xEDl",
"ma\xED",
"j\xFAn\xED",
"j\xFAl\xED",
"\xE1g\xFAst",
"sept.",
"okt.",
"n\xF3v.",
"des."],
wide: [
"jan\xFAar",
"febr\xFAar",
"mars",
"apr\xEDl",
"ma\xED",
"j\xFAn\xED",
"j\xFAl\xED",
"\xE1g\xFAst",
"september",
"okt\xF3ber",
"n\xF3vember",
"desember"]
};
var dayValues = {
narrow: ["S", "M", "\xDE", "M", "F", "F", "L"],
short: ["Su", "M\xE1", "\xDEr", "Mi", "Fi", "F\xF6", "La"],
abbreviated: ["sun.", "m\xE1n.", "\xFEri.", "mi\xF0.", "fim.", "f\xF6s.", "lau."],
wide: [
"sunnudagur",
"m\xE1nudagur",
"\xFEri\xF0judagur",
"mi\xF0vikudagur",
"fimmtudagur",
"f\xF6studagur",
"laugardagur"]
};
var dayPeriodValues = {
narrow: {
am: "f",
pm: "e",
midnight: "mi\xF0n\xE6tti",
noon: "h\xE1degi",
morning: "morgunn",
afternoon: "s\xED\xF0degi",
evening: "kv\xF6ld",
night: "n\xF3tt"
},
abbreviated: {
am: "f.h.",
pm: "e.h.",
midnight: "mi\xF0n\xE6tti",
noon: "h\xE1degi",
morning: "morgunn",
afternoon: "s\xED\xF0degi",
evening: "kv\xF6ld",
night: "n\xF3tt"
},
wide: {
am: "fyrir h\xE1degi",
pm: "eftir h\xE1degi",
midnight: "mi\xF0n\xE6tti",
noon: "h\xE1degi",
morning: "morgunn",
afternoon: "s\xED\xF0degi",
evening: "kv\xF6ld",
night: "n\xF3tt"
}
};
var formattingDayPeriodValues = {
narrow: {
am: "f",
pm: "e",
midnight: "\xE1 mi\xF0n\xE6tti",
noon: "\xE1 h\xE1degi",
morning: "a\xF0 morgni",
afternoon: "s\xED\xF0degis",
evening: "um kv\xF6ld",
night: "um n\xF3tt"
},
abbreviated: {
am: "f.h.",
pm: "e.h.",
midnight: "\xE1 mi\xF0n\xE6tti",
noon: "\xE1 h\xE1degi",
morning: "a\xF0 morgni",
afternoon: "s\xED\xF0degis",
evening: "um kv\xF6ld",
night: "um n\xF3tt"
},
wide: {
am: "fyrir h\xE1degi",
pm: "eftir h\xE1degi",
midnight: "\xE1 mi\xF0n\xE6tti",
noon: "\xE1 h\xE1degi",
morning: "a\xF0 morgni",
afternoon: "s\xED\xF0degis",
evening: "um kv\xF6ld",
night: "um n\xF3tt"
}
};
var ordinalNumber = function ordinalNumber(dirtyNumber, _options) {
var number = Number(dirtyNumber);
return number + ".";
};
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/is/_lib/match.mjs
var matchOrdinalNumberPattern = /^(\d+)(\.)?/i;
var parseOrdinalNumberPattern = /\d+(\.)?/i;
var matchEraPatterns = {
narrow: /^(f\.Kr\.|e\.Kr\.)/i,
abbreviated: /^(f\.Kr\.|e\.Kr\.)/i,
wide: /^(fyrir Krist|eftir Krist)/i
};
var parseEraPatterns = {
any: [/^(f\.Kr\.)/i, /^(e\.Kr\.)/i]
};
var matchQuarterPatterns = {
narrow: /^[1234]\.?/i,
abbreviated: /^q[1234]\.?/i,
wide: /^[1234]\.? fjórðungur/i
};
var parseQuarterPatterns = {
any: [/1\.?/i, /2\.?/i, /3\.?/i, /4\.?/i]
};
var matchMonthPatterns = {
narrow: /^[jfmásónd]/i,
abbreviated: /^(jan\.|feb\.|mars\.|apríl\.|maí|júní|júlí|águst|sep\.|oct\.|nov\.|dec\.)/i,
wide: /^(januar|febrúar|mars|apríl|maí|júní|júlí|águst|september|október|nóvember|desember)/i
};
var parseMonthPatterns = {
narrow: [
/^j/i,
/^f/i,
/^m/i,
/^a/i,
/^m/i,
/^j/i,
/^j/i,
/^á/i,
/^s/i,
/^ó/i,
/^n/i,
/^d/i],
any: [
/^ja/i,
/^f/i,
/^mar/i,
/^ap/i,
/^maí/i,
/^jún/i,
/^júl/i,
/^áu/i,
/^s/i,
/^ó/i,
/^n/i,
/^d/i]
};
var matchDayPatterns = {
narrow: /^[smtwf]/i,
short: /^(su|má|þr|mi|fi|fö|la)/i,
abbreviated: /^(sun|mán|þri|mið|fim|fös|lau)\.?/i,
wide: /^(sunnudagur|mánudagur|þriðjudagur|miðvikudagur|fimmtudagur|föstudagur|laugardagur)/i
};
var parseDayPatterns = {
narrow: [/^s/i, /^m/i, /^þ/i, /^m/i, /^f/i, /^f/i, /^l/i],
any: [/^su/i, /^má/i, /^þr/i, /^mi/i, /^fi/i, /^fö/i, /^la/i]
};
var matchDayPeriodPatterns = {
narrow: /^(f|e|síðdegis|(á|að|um) (morgni|kvöld|nótt|miðnætti))/i,
any: /^(fyrir hádegi|eftir hádegi|[ef]\.?h\.?|síðdegis|morgunn|(á|að|um) (morgni|kvöld|nótt|miðnætti))/i
};
var parseDayPeriodPatterns = {
any: {
am: /^f/i,
pm: /^e/i,
midnight: /^mi/i,
noon: /^há/i,
morning: /morgunn/i,
afternoon: /síðdegi/i,
evening: /kvöld/i,
night: /nótt/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/is.mjs
var is = {
code: "is",
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
options: {
weekStartsOn: 1,
firstWeekContainsDate: 4
}
};
// lib/locale/is/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), {}, {
is: is }) });
//# debugId=39BB4A639A880E0264756e2164756e21
})();
//# sourceMappingURL=cdn.js.map
@@ -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 Tent = createLucideIcon("Tent", [
["path", { d: "M3.5 21 14 3", key: "1szst5" }],
["path", { d: "M20.5 21 10 3", key: "1310c3" }],
["path", { d: "M15.5 21 12 15l-3.5 6", key: "1ddtfw" }],
["path", { d: "M2 21h20", key: "1nyx9w" }]
]);
export { Tent as default };
//# sourceMappingURL=tent.js.map
@@ -0,0 +1,40 @@
import { type Client, type ConnectOptions } from 'gel';
import type { Cache } from "../cache/core/index.cjs";
import { entityKind } from "../entity.cjs";
import { GelDatabase } from "../gel-core/db.cjs";
import { GelDialect } from "../gel-core/dialect.cjs";
import type { GelQueryResultHKT } from "../gel-core/session.cjs";
import type { Logger } from "../logger.cjs";
import { type RelationalSchemaConfig, type TablesRelationalConfig } from "../relations.cjs";
import { type DrizzleConfig } from "../utils.cjs";
import type { GelClient } from "./session.cjs";
import { GelDbSession } from "./session.cjs";
export interface GelDriverOptions {
logger?: Logger;
cache?: Cache;
}
export declare class GelDriver {
private client;
private dialect;
private options;
static readonly [entityKind]: string;
constructor(client: GelClient, dialect: GelDialect, options?: GelDriverOptions);
createSession(schema: RelationalSchemaConfig<TablesRelationalConfig> | undefined): GelDbSession<Record<string, unknown>, TablesRelationalConfig>;
}
export declare class GelJsDatabase<TSchema extends Record<string, unknown> = Record<string, never>> extends GelDatabase<GelQueryResultHKT, TSchema> {
static readonly [entityKind]: string;
}
export declare function drizzle<TSchema extends Record<string, unknown> = Record<string, never>, TClient extends GelClient = Client>(...params: [TClient | string] | [TClient | string, DrizzleConfig<TSchema>] | [
DrizzleConfig<TSchema> & ({
connection: string | ConnectOptions;
} | {
client: TClient;
})
]): GelJsDatabase<TSchema> & {
$client: GelClient extends TClient ? Client : TClient;
};
export declare namespace drizzle {
function mock<TSchema extends Record<string, unknown> = Record<string, never>>(config?: DrizzleConfig<TSchema>): GelJsDatabase<TSchema> & {
$client: '$client is not available on drizzle.mock()';
};
}
@@ -0,0 +1,67 @@
import type { Interval } from "./types.js";
/**
* The {@link areIntervalsOverlapping} function options.
*/
export interface AreIntervalsOverlappingOptions {
/** Whether the comparison is inclusive or not */
inclusive?: boolean;
}
/**
* @name areIntervalsOverlapping
* @category Interval Helpers
* @summary Is the given time interval overlapping with another time interval?
*
* @description
* Is the given time interval overlapping with another time interval? Adjacent intervals do not count as overlapping unless `inclusive` is set to `true`.
*
* @param intervalLeft - The first interval to compare.
* @param intervalRight - The second interval to compare.
* @param options - The object with options
*
* @returns Whether the time intervals are overlapping
*
* @example
* // For overlapping time intervals:
* areIntervalsOverlapping(
* { start: new Date(2014, 0, 10), end: new Date(2014, 0, 20) },
* { start: new Date(2014, 0, 17), end: new Date(2014, 0, 21) }
* )
* //=> true
*
* @example
* // For non-overlapping time intervals:
* areIntervalsOverlapping(
* { start: new Date(2014, 0, 10), end: new Date(2014, 0, 20) },
* { start: new Date(2014, 0, 21), end: new Date(2014, 0, 22) }
* )
* //=> false
*
* @example
* // For adjacent time intervals:
* areIntervalsOverlapping(
* { start: new Date(2014, 0, 10), end: new Date(2014, 0, 20) },
* { start: new Date(2014, 0, 20), end: new Date(2014, 0, 30) }
* )
* //=> false
*
* @example
* // Using the inclusive option:
* areIntervalsOverlapping(
* { start: new Date(2014, 0, 10), end: new Date(2014, 0, 20) },
* { start: new Date(2014, 0, 20), end: new Date(2014, 0, 24) }
* )
* //=> false
*
* @example
* areIntervalsOverlapping(
* { start: new Date(2014, 0, 10), end: new Date(2014, 0, 20) },
* { start: new Date(2014, 0, 20), end: new Date(2014, 0, 24) },
* { inclusive: true }
* )
* //=> true
*/
export declare function areIntervalsOverlapping(
intervalLeft: Interval,
intervalRight: Interval,
options?: AreIntervalsOverlappingOptions,
): boolean;
@@ -0,0 +1,5 @@
import React from 'react';
export declare function IDCell({ id }: {
id: number | string;
}): React.JSX.Element;
//# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"a-arrow-up.js","sources":["../../../src/icons/a-arrow-up.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name AArrowUp\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMy41IDEzaDYiIC8+CiAgPHBhdGggZD0ibTIgMTYgNC41LTkgNC41IDkiIC8+CiAgPHBhdGggZD0iTTE4IDE2VjciIC8+CiAgPHBhdGggZD0ibTE0IDExIDQtNCA0IDQiIC8+Cjwvc3ZnPg==) - https://lucide.dev/icons/a-arrow-up\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 AArrowUp = createLucideIcon('AArrowUp', [\n ['path', { d: 'M3.5 13h6', key: 'p1my2r' }],\n ['path', { d: 'm2 16 4.5-9 4.5 9', key: 'ndf0b3' }],\n ['path', { d: 'M18 16V7', key: 'ty0viw' }],\n ['path', { d: 'm14 11 4-4 4 4', key: '1pu57t' }],\n]);\n\nexport default AArrowUp;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,iBAAiB,UAAY,CAAA,CAAA,CAAA;AAAA,CAAA,CAC5C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAqB,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,CAClD,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,CAAkB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACjD,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,6 @@
import React from 'react';
import './index.scss';
export declare const NotFoundClient: React.FC<{
marginTop?: 'large';
}>;
//# sourceMappingURL=index.client.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"trash-2.js","sources":["../../../src/icons/trash-2.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Trash2\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMyA2aDE4IiAvPgogIDxwYXRoIGQ9Ik0xOSA2djE0YzAgMS0xIDItMiAySDdjLTEgMC0yLTEtMi0yVjYiIC8+CiAgPHBhdGggZD0iTTggNlY0YzAtMSAxLTIgMi0yaDRjMSAwIDIgMSAyIDJ2MiIgLz4KICA8bGluZSB4MT0iMTAiIHgyPSIxMCIgeTE9IjExIiB5Mj0iMTciIC8+CiAgPGxpbmUgeDE9IjE0IiB4Mj0iMTQiIHkxPSIxMSIgeTI9IjE3IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/trash-2\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 Trash2 = createLucideIcon('Trash2', [\n ['path', { d: 'M3 6h18', key: 'd0wm0j' }],\n ['path', { d: 'M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6', key: '4alrt4' }],\n ['path', { d: 'M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2', key: 'v07s0e' }],\n ['line', { x1: '10', x2: '10', y1: '11', y2: '17', key: '1uufr5' }],\n ['line', { x1: '14', x2: '14', y1: '11', y2: '17', key: 'xtxkd' }],\n]);\n\nexport default Trash2;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,iBAAiB,QAAU,CAAA,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,CAAyC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CACtE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAsC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CACnE,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAM,CAAA,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,CAClE,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAM,CAAA,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,SAAS,CAAA;AACnE,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,6 @@
import { InstrumentationBase, InstrumentationConfig, InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation';
export declare class LruMemoizerInstrumentation extends InstrumentationBase {
constructor(config?: InstrumentationConfig);
init(): InstrumentationNodeModuleDefinition[];
}
//# sourceMappingURL=instrumentation.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"views.d.ts","sourceRoot":"","sources":["../../src/exports/views.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAA;AACvE,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,4BAA4B,EACjC,gBAAgB,GACjB,MAAM,qCAAqC,CAAA;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAE3D,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,KAAK,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAC1F,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAEzD,OAAO,EAAE,KAAK,oBAAoB,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AAC5E,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA"}
@@ -0,0 +1,24 @@
import type { ColumnBuilderBaseConfig } from "../../column-builder.js";
import type { ColumnBaseConfig } from "../../column.js";
import { entityKind } from "../../entity.js";
import { SingleStoreColumn, SingleStoreColumnBuilder } from "./common.js";
export type SingleStoreBooleanBuilderInitial<TName extends string> = SingleStoreBooleanBuilder<{
name: TName;
dataType: 'boolean';
columnType: 'SingleStoreBoolean';
data: boolean;
driverParam: number | boolean;
enumValues: undefined;
generated: undefined;
}>;
export declare class SingleStoreBooleanBuilder<T extends ColumnBuilderBaseConfig<'boolean', 'SingleStoreBoolean'>> extends SingleStoreColumnBuilder<T> {
static readonly [entityKind]: string;
constructor(name: T['name']);
}
export declare class SingleStoreBoolean<T extends ColumnBaseConfig<'boolean', 'SingleStoreBoolean'>> extends SingleStoreColumn<T> {
static readonly [entityKind]: string;
getSQLType(): string;
mapFromDriverValue(value: number | boolean): boolean;
}
export declare function boolean(): SingleStoreBooleanBuilderInitial<''>;
export declare function boolean<TName extends string>(name: TName): SingleStoreBooleanBuilderInitial<TName>;
@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/elements/BulkUpload/DrawerCloseButton/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,OAAO,cAAc,CAAA;AAIrB,KAAK,KAAK,GAAG;IACX,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAA;CAC7B,CAAA;AACD,wBAAgB,iBAAiB,CAAC,EAAE,OAAO,EAAE,EAAE,KAAK,qBAQnD"}
@@ -0,0 +1,67 @@
"use strict";
exports.eachHourOfInterval = eachHourOfInterval;
var _index = require("./_lib/normalizeInterval.cjs");
var _index2 = require("./constructFrom.cjs");
/**
* The {@link eachHourOfInterval} function options.
*/
/**
* The {@link eachHourOfInterval} function result type.
* Resolves to the appropriate date type based on inputs.
*/
/**
* @name eachHourOfInterval
* @category Interval Helpers
* @summary Return the array of hours within the specified time interval.
*
* @description
* Return the array of hours within the specified time interval.
*
* @typeParam IntervalType - Interval type.
* @typeParam Options - Options type.
*
* @param interval - The interval.
* @param options - An object with options.
*
* @returns The array with starts of hours from the hour of the interval start to the hour of the interval end
*
* @example
* // Each hour between 6 October 2014, 12:00 and 6 October 2014, 15:00
* const result = eachHourOfInterval({
* start: new Date(2014, 9, 6, 12),
* end: new Date(2014, 9, 6, 15)
* });
* //=> [
* // Mon Oct 06 2014 12:00:00,
* // Mon Oct 06 2014 13:00:00,
* // Mon Oct 06 2014 14:00:00,
* // Mon Oct 06 2014 15:00:00
* // ]
*/
function eachHourOfInterval(interval, options) {
const { start, end } = (0, _index.normalizeInterval)(options?.in, interval);
let reversed = +start > +end;
const endTime = reversed ? +start : +end;
const date = reversed ? end : start;
date.setMinutes(0, 0, 0);
let step = options?.step ?? 1;
if (!step) return [];
if (step < 0) {
step = -step;
reversed = !reversed;
}
const dates = [];
while (+date <= endTime) {
dates.push((0, _index2.constructFrom)(start, date));
date.setHours(date.getHours() + step);
}
return reversed ? dates.reverse() : dates;
}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_object_spread.cjs",
"module": "../../esm/_object_spread.js"
}
@@ -0,0 +1,15 @@
/**
* Attempt to find migrations directory.
*
* Checks for the following directories in order:
* - `migrationDir` argument from Payload config
* - `src/migrations`
* - `dist/migrations`
* - `migrations`
*
* @param migrationDir
* @default src/migrations`, if the src folder does not exists - migrations.
* @returns
*/
export declare const findMigrationDir: (migrationDir?: string) => string;
//# sourceMappingURL=findMigrationDir.d.ts.map
@@ -0,0 +1,220 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
// Slightly modified (no IE8 support, ES6) and transcribed to TypeScript
// https://github.com/calvinmetcalf/rollup-plugin-node-builtins/blob/63ab8aacd013767445ca299e468d9a60a95328d7/src/es6/path.js
//
// Copyright Joyent, Inc.and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
/** JSDoc */
function normalizeArray(parts, allowAboveRoot) {
// if the path tries to go above the root, `up` ends up > 0
let up = 0;
for (let i = parts.length - 1; i >= 0; i--) {
const last = parts[i];
if (last === '.') {
parts.splice(i, 1);
} else if (last === '..') {
parts.splice(i, 1);
up++;
} else if (up) {
parts.splice(i, 1);
up--;
}
}
// if the path is allowed to go above the root, restore leading ..s
if (allowAboveRoot) {
for (; up--; up) {
parts.unshift('..');
}
}
return parts;
}
// Split a filename into [root, dir, basename, ext], unix version
// 'root' is just a slash, or nothing.
const splitPathRe = /^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;
/** JSDoc */
function splitPath(filename) {
// Truncate files names greater than 1024 characters to avoid regex dos
// https://github.com/getsentry/sentry-javascript/pull/8737#discussion_r1285719172
const truncated = filename.length > 1024 ? `<truncated>${filename.slice(-1024)}` : filename;
const parts = splitPathRe.exec(truncated);
return parts ? parts.slice(1) : [];
}
// path.resolve([from ...], to)
// posix version
/** JSDoc */
function resolve(...args) {
let resolvedPath = '';
let resolvedAbsolute = false;
for (let i = args.length - 1; i >= -1 && !resolvedAbsolute; i--) {
const path = i >= 0 ? args[i] : '/';
// Skip empty entries
if (!path) {
continue;
}
resolvedPath = `${path}/${resolvedPath}`;
resolvedAbsolute = path.charAt(0) === '/';
}
// At this point the path should be resolved to a full absolute path, but
// handle relative paths to be safe (might happen when process.cwd() fails)
// Normalize the path
resolvedPath = normalizeArray(
resolvedPath.split('/').filter(p => !!p),
!resolvedAbsolute,
).join('/');
return (resolvedAbsolute ? '/' : '') + resolvedPath || '.';
}
/** JSDoc */
function trim(arr) {
let start = 0;
for (; start < arr.length; start++) {
if (arr[start] !== '') {
break;
}
}
let end = arr.length - 1;
for (; end >= 0; end--) {
if (arr[end] !== '') {
break;
}
}
if (start > end) {
return [];
}
return arr.slice(start, end - start + 1);
}
// path.relative(from, to)
// posix version
/** JSDoc */
function relative(from, to) {
/* eslint-disable no-param-reassign */
from = resolve(from).slice(1);
to = resolve(to).slice(1);
/* eslint-enable no-param-reassign */
const fromParts = trim(from.split('/'));
const toParts = trim(to.split('/'));
const length = Math.min(fromParts.length, toParts.length);
let samePartsLength = length;
for (let i = 0; i < length; i++) {
if (fromParts[i] !== toParts[i]) {
samePartsLength = i;
break;
}
}
let outputParts = [];
for (let i = samePartsLength; i < fromParts.length; i++) {
outputParts.push('..');
}
outputParts = outputParts.concat(toParts.slice(samePartsLength));
return outputParts.join('/');
}
// path.normalize(path)
// posix version
/** JSDoc */
function normalizePath(path) {
const isPathAbsolute = isAbsolute(path);
const trailingSlash = path.slice(-1) === '/';
// Normalize the path
let normalizedPath = normalizeArray(
path.split('/').filter(p => !!p),
!isPathAbsolute,
).join('/');
if (!normalizedPath && !isPathAbsolute) {
normalizedPath = '.';
}
if (normalizedPath && trailingSlash) {
normalizedPath += '/';
}
return (isPathAbsolute ? '/' : '') + normalizedPath;
}
// posix version
/** JSDoc */
function isAbsolute(path) {
return path.charAt(0) === '/';
}
// posix version
/** JSDoc */
function join(...args) {
return normalizePath(args.join('/'));
}
/** JSDoc */
function dirname(path) {
const result = splitPath(path);
const root = result[0] || '';
let dir = result[1];
if (!root && !dir) {
// No dirname whatsoever
return '.';
}
if (dir) {
// It has a dirname, strip trailing slash
dir = dir.slice(0, dir.length - 1);
}
return root + dir;
}
/** JSDoc */
function basename(path, ext) {
let f = splitPath(path)[2] || '';
if (ext && f.slice(ext.length * -1) === ext) {
f = f.slice(0, f.length - ext.length);
}
return f;
}
exports.basename = basename;
exports.dirname = dirname;
exports.isAbsolute = isAbsolute;
exports.join = join;
exports.normalizePath = normalizePath;
exports.relative = relative;
exports.resolve = resolve;
//# sourceMappingURL=path.js.map
@@ -0,0 +1,48 @@
/*
* 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 { NOOP_LOGGER } from './NoopLogger';
export class ProxyLogger {
constructor(provider, name, version, options) {
this._provider = provider;
this.name = name;
this.version = version;
this.options = options;
}
/**
* Emit a log record. This method should only be used by log appenders.
*
* @param logRecord
*/
emit(logRecord) {
this._getLogger().emit(logRecord);
}
/**
* Try to get a logger from the proxy logger provider.
* If the proxy logger provider has no delegate, return a noop logger.
*/
_getLogger() {
if (this._delegate) {
return this._delegate;
}
const logger = this._provider._getDelegateLogger(this.name, this.version, this.options);
if (!logger) {
return NOOP_LOGGER;
}
this._delegate = logger;
return this._delegate;
}
}
//# sourceMappingURL=ProxyLogger.js.map
@@ -0,0 +1,5 @@
export { ListBulkUploadButton } from './ListBulkUploadButton.js';
export { ListCreateNewButton } from './ListCreateNewDocButton.js';
export { ListCreateNewDocInFolderButton } from './ListCreateNewDocInFolderButton.js';
export { ListEmptyTrashButton } from './ListEmptyTrashButton.js';
//# sourceMappingURL=index.js.map
@@ -0,0 +1,21 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Gitlab = createLucideIcon("Gitlab", [
[
"path",
{
d: "m22 13.29-3.33-10a.42.42 0 0 0-.14-.18.38.38 0 0 0-.22-.11.39.39 0 0 0-.23.07.42.42 0 0 0-.14.18l-2.26 6.67H8.32L6.1 3.26a.42.42 0 0 0-.1-.18.38.38 0 0 0-.26-.08.39.39 0 0 0-.23.07.42.42 0 0 0-.14.18L2 13.29a.74.74 0 0 0 .27.83L12 21l9.69-6.88a.71.71 0 0 0 .31-.83Z",
key: "148pdi"
}
]
]);
export { Gitlab as default };
//# sourceMappingURL=gitlab.js.map
@@ -0,0 +1 @@
{"version":3,"file":"float.js","sourceRoot":"","sources":["../../../../src/css/property-descriptors/float.ts"],"names":[],"mappings":";;;AAUa,QAAA,KAAK,GAAyC;IACvD,IAAI,EAAE,OAAO;IACb,YAAY,EAAE,MAAM;IACpB,MAAM,EAAE,KAAK;IACb,IAAI,qBAA2C;IAC/C,KAAK,EAAE,UAAC,QAAiB,EAAE,KAAa;QACpC,QAAQ,KAAK,EAAE;YACX,KAAK,MAAM;gBACP,oBAAkB;YACtB,KAAK,OAAO;gBACR,qBAAmB;YACvB,KAAK,cAAc;gBACf,4BAA0B;YAC9B,KAAK,YAAY;gBACb,0BAAwB;SAC/B;QACD,oBAAkB;IACtB,CAAC;CACJ,CAAC"}
@@ -0,0 +1,10 @@
function _extends() {
return module.exports = _extends = Object.assign ? Object.assign.bind() : function (n) {
for (var e = 1; e < arguments.length; e++) {
var t = arguments[e];
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
}
return n;
}, module.exports.__esModule = true, module.exports["default"] = module.exports, _extends.apply(null, arguments);
}
module.exports = _extends, module.exports.__esModule = true, module.exports["default"] = module.exports;
@@ -0,0 +1,5 @@
import { IImage } from './interface.mjs';
declare const PNG: IImage;
export { PNG };
@@ -0,0 +1,14 @@
import { DirectusFile } from "../../../schema/file.cjs";
import { Query } from "../../../types/query.cjs";
import { RestCommand } from "../../types.cjs";
//#region src/rest/commands/utils/export.d.ts
type FileFormat = 'csv' | 'csv_utf8' | 'json' | 'xml' | 'yaml';
/**
* Export a larger data set to a file in the File Library
* @returns Nothing
*/
declare const utilsExport: <Schema, TQuery extends Query<Schema, Schema[Collection]>, Collection extends keyof Schema>(collection: Collection, format: FileFormat, query: TQuery, file: Partial<DirectusFile<Schema>>) => RestCommand<void, Schema>;
//#endregion
export { FileFormat, utilsExport };
//# sourceMappingURL=export.d.cts.map
@@ -0,0 +1 @@
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../../../src/types/request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEzE,KAAK,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAC1C,KAAK,SAAS,GAAG,OAAO,EAAE,CAAC;AAE3B,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG,SAAS,GAAG,MAAM,CAAC;AAE1D,UAAU,WAAW;IACnB,QAAQ,CAAC,EAAE,kBAAkB,EAAE,CAAC;CACjC;AAED,MAAM,WAAW,8BAA8B;IAC7C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB"}
@@ -0,0 +1,37 @@
import { entityKind } from "../../entity.js";
import { getColumnNameAndConfig } from "../../utils.js";
import { SingleStoreColumn, SingleStoreColumnBuilder } from "./common.js";
class SingleStoreVarCharBuilder extends SingleStoreColumnBuilder {
static [entityKind] = "SingleStoreVarCharBuilder";
/** @internal */
constructor(name, config) {
super(name, "string", "SingleStoreVarChar");
this.config.length = config.length;
this.config.enum = config.enum;
}
/** @internal */
build(table) {
return new SingleStoreVarChar(
table,
this.config
);
}
}
class SingleStoreVarChar extends SingleStoreColumn {
static [entityKind] = "SingleStoreVarChar";
length = this.config.length;
enumValues = this.config.enum;
getSQLType() {
return this.length === void 0 ? `varchar` : `varchar(${this.length})`;
}
}
function varchar(a, b) {
const { name, config } = getColumnNameAndConfig(a, b);
return new SingleStoreVarCharBuilder(name, config);
}
export {
SingleStoreVarChar,
SingleStoreVarCharBuilder,
varchar
};
//# sourceMappingURL=varchar.js.map
@@ -0,0 +1 @@
{"version":3,"file":"tram-front.js","sources":["../../../src/icons/tram-front.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name TramFront\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHg9IjQiIHk9IjMiIHJ4PSIyIiAvPgogIDxwYXRoIGQ9Ik00IDExaDE2IiAvPgogIDxwYXRoIGQ9Ik0xMiAzdjgiIC8+CiAgPHBhdGggZD0ibTggMTktMiAzIiAvPgogIDxwYXRoIGQ9Im0xOCAyMi0yLTMiIC8+CiAgPHBhdGggZD0iTTggMTVoLjAxIiAvPgogIDxwYXRoIGQ9Ik0xNiAxNWguMDEiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/tram-front\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 TramFront = createLucideIcon('TramFront', [\n ['rect', { width: '16', height: '16', x: '4', y: '3', rx: '2', key: '1wxw4b' }],\n ['path', { d: 'M4 11h16', key: 'mpoxn0' }],\n ['path', { d: 'M12 3v8', key: '1h2ygw' }],\n ['path', { d: 'm8 19-2 3', key: '13i0xs' }],\n ['path', { d: 'm18 22-2-3', key: '1p0ohu' }],\n ['path', { d: 'M8 15h.01', key: 'a7atzg' }],\n ['path', { d: 'M16 15h.01', key: 'rnfrdf' }],\n]);\n\nexport default TramFront;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,iBAAiB,WAAa,CAAA,CAAA,CAAA;AAAA,CAAA,CAC9C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,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,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,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,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,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,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;;"}
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,yCAA0C;AAUtB,8FAVX,wBAAa,OAUW;AATjC,6CAAwC;AAS/B,0FATA,sBAAS,OASA;AARlB,qCAAkD;AAElD,SAAgB,KAAK,CAAC,MAA6B,EAAE,QAAyB;IAC5E,MAAM,MAAM,GAAG,IAAI,eAAM,EAAE,CAAA;IAC3B,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,MAAc,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAA;IACrE,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC,CAAA;AACpE,CAAC;AAJD,sBAIC"}
@@ -0,0 +1 @@
import{readActivities as e,readActivity as t}from"./activity.js";import{aggregate as n}from"./aggregate.js";import{downloadFilesZip as r,downloadFolderZip as i,readAssetArrayBuffer as a,readAssetBlob as o,readAssetRaw as s}from"./assets.js";import{readCollection as c,readCollections as l}from"./collections.js";import{readComment as u,readComments as d}from"./comments.js";import{readDashboard as f,readDashboards as p}from"./dashboards.js";import{readDeployment as m,readDeploymentDashboard as h,readDeploymentProject as g,readDeploymentProjects as _,readDeploymentRun as v,readDeploymentRuns as y,readDeployments as b}from"./deployment.js";import{readExtensions as x}from"./extensions.js";import{readField as S,readFields as C,readFieldsByCollection as w}from"./fields.js";import{readFile as T,readFiles as E}from"./files.js";import{readFlow as D,readFlows as O}from"./flows.js";import{readFolder as k,readFolders as A}from"./folders.js";import{readItem as j,readItems as M}from"./items.js";import{readNotification as N,readNotifications as P}from"./notifications.js";import{readOperation as F,readOperations as I}from"./operations.js";import{readPanel as L,readPanels as R}from"./panels.js";import{readItemPermissions as z,readPermission as B,readPermissions as V,readUserPermissions as H}from"./permissions.js";import{readPolicies as U,readPolicy as W,readPolicyGlobals as G}from"./policies.js";import{readPreset as K,readPresets as q}from"./presets.js";import{readRelation as J,readRelationByCollection as Y,readRelations as X}from"./relations.js";import{readRevision as Z,readRevisions as Q}from"./revisions.js";import{readRole as $,readRoles as ee,readRolesMe as te}from"./roles.js";import{readSettings as ne}from"./settings.js";import{readShare as re,readShares as ie}from"./shares.js";import{readSingleton as ae}from"./singleton.js";import{readTranslation as oe,readTranslations as se}from"./translations.js";import{readMe as ce,readUser as le,readUsers as ue}from"./users.js";import{readContentVersion as de,readContentVersions as fe}from"./versions.js";export{};
@@ -0,0 +1,23 @@
/**
* A specialized version of `_.every` for arrays without support for
* iteratee shorthands.
*
* @private
* @param {Array} [array] The array to iterate over.
* @param {Function} predicate The function invoked per iteration.
* @returns {boolean} Returns `true` if all elements pass the predicate check,
* else `false`.
*/
function arrayEvery(array, predicate) {
var index = -1,
length = array == null ? 0 : array.length;
while (++index < length) {
if (!predicate(array[index], index, array)) {
return false;
}
}
return true;
}
module.exports = arrayEvery;
@@ -0,0 +1,34 @@
var toString = require('./toString'),
unescapeHtmlChar = require('./_unescapeHtmlChar');
/** Used to match HTML entities and HTML characters. */
var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,
reHasEscapedHtml = RegExp(reEscapedHtml.source);
/**
* The inverse of `_.escape`; this method converts the HTML entities
* `&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#39;` in `string` to
* their corresponding characters.
*
* **Note:** No other HTML entities are unescaped. To unescape additional
* HTML entities use a third-party library like [_he_](https://mths.be/he).
*
* @static
* @memberOf _
* @since 0.6.0
* @category String
* @param {string} [string=''] The string to unescape.
* @returns {string} Returns the unescaped string.
* @example
*
* _.unescape('fred, barney, &amp; pebbles');
* // => 'fred, barney, & pebbles'
*/
function unescape(string) {
string = toString(string);
return (string && reHasEscapedHtml.test(string))
? string.replace(reEscapedHtml, unescapeHtmlChar)
: string;
}
module.exports = unescape;
@@ -0,0 +1 @@
{"version":3,"file":"handlePreview.js","names":["extractJWT","isPreviewEnabled","collectionConfig","globalConfig","Boolean","admin","preview","handlePreview","collectionSlug","config","data","globalSlug","operation","req","payload","collections","undefined","globals","find","g","slug","enabled","generatePreviewURL","token","previewURL","result","locale","err","logger","error","msg"],"sources":["../../src/utilities/handlePreview.ts"],"sourcesContent":["import {\n type CollectionConfig,\n extractJWT,\n type GlobalConfig,\n type Operation,\n type PayloadRequest,\n type SanitizedConfig,\n} from 'payload'\n\n/**\n * Multi-level check to determine whether live preview is enabled on a collection or global.\n * For example, live preview can be enabled at both the root config level, or on the entity's config.\n * If a collectionConfig/globalConfig is provided, checks if it is enabled at the root level,\n * or on the entity's own config.\n */\nexport const isPreviewEnabled = ({\n collectionConfig,\n globalConfig,\n}: {\n collectionConfig?: CollectionConfig\n globalConfig?: GlobalConfig\n}): boolean => {\n if (globalConfig) {\n return Boolean(globalConfig.admin?.preview)\n }\n\n if (collectionConfig) {\n return Boolean(collectionConfig.admin?.preview)\n }\n}\n\n/**\n * 1. Looks up the relevant live preview config, which could have been enabled:\n * a. At the root level, e.g. `collections: ['posts']`\n * b. On the collection or global config, e.g. `admin: { livePreview: { ... } }`\n * 2. Determines if live preview is enabled, and if not, early returns.\n * 3. Merges the config with the root config, if necessary.\n * 4. Executes the `url` function, if necessary.\n *\n * Notice: internal function only. Subject to change at any time. Use at your own risk.\n */\nexport const handlePreview = async ({\n collectionSlug,\n config,\n data,\n globalSlug,\n operation,\n req,\n}: {\n collectionSlug?: string\n config: SanitizedConfig\n data: Record<string, unknown>\n globalSlug?: string\n operation?: Operation\n req: PayloadRequest\n}): Promise<{\n isPreviewEnabled?: boolean\n previewURL?: string\n}> => {\n const collectionConfig = collectionSlug\n ? req.payload.collections[collectionSlug]?.config\n : undefined\n\n const globalConfig = globalSlug ? config.globals.find((g) => g.slug === globalSlug) : undefined\n\n const enabled = isPreviewEnabled({\n collectionConfig,\n globalConfig,\n })\n\n if (!enabled) {\n return {}\n }\n\n const generatePreviewURL = collectionConfig?.admin?.preview || globalConfig?.admin?.preview\n const token = extractJWT(req)\n let previewURL: string | undefined\n\n if (typeof generatePreviewURL === 'function' && operation !== 'create') {\n try {\n const result = await generatePreviewURL(data, { locale: req.locale, req, token })\n\n if (typeof result === 'string') {\n previewURL = result\n }\n } catch (err) {\n req.payload.logger.error({\n err,\n msg: `There was an error executing the live preview URL function for ${collectionSlug || globalSlug}`,\n })\n }\n }\n\n return { isPreviewEnabled: enabled, previewURL }\n}\n"],"mappings":"AAAA,SAEEA,UAAU,QAKL;AAEP;;;;;;AAMA,OAAO,MAAMC,gBAAA,GAAmBA,CAAC;EAC/BC,gBAAgB;EAChBC;AAAY,CAIb;EACC,IAAIA,YAAA,EAAc;IAChB,OAAOC,OAAA,CAAQD,YAAA,CAAaE,KAAK,EAAEC,OAAA;EACrC;EAEA,IAAIJ,gBAAA,EAAkB;IACpB,OAAOE,OAAA,CAAQF,gBAAA,CAAiBG,KAAK,EAAEC,OAAA;EACzC;AACF;AAEA;;;;;;;;;;AAUA,OAAO,MAAMC,aAAA,GAAgB,MAAAA,CAAO;EAClCC,cAAc;EACdC,MAAM;EACNC,IAAI;EACJC,UAAU;EACVC,SAAS;EACTC;AAAG,CAQJ;EAIC,MAAMX,gBAAA,GAAmBM,cAAA,GACrBK,GAAA,CAAIC,OAAO,CAACC,WAAW,CAACP,cAAA,CAAe,EAAEC,MAAA,GACzCO,SAAA;EAEJ,MAAMb,YAAA,GAAeQ,UAAA,GAAaF,MAAA,CAAOQ,OAAO,CAACC,IAAI,CAAEC,CAAA,IAAMA,CAAA,CAAEC,IAAI,KAAKT,UAAA,IAAcK,SAAA;EAEtF,MAAMK,OAAA,GAAUpB,gBAAA,CAAiB;IAC/BC,gBAAA;IACAC;EACF;EAEA,IAAI,CAACkB,OAAA,EAAS;IACZ,OAAO,CAAC;EACV;EAEA,MAAMC,kBAAA,GAAqBpB,gBAAA,EAAkBG,KAAA,EAAOC,OAAA,IAAWH,YAAA,EAAcE,KAAA,EAAOC,OAAA;EACpF,MAAMiB,KAAA,GAAQvB,UAAA,CAAWa,GAAA;EACzB,IAAIW,UAAA;EAEJ,IAAI,OAAOF,kBAAA,KAAuB,cAAcV,SAAA,KAAc,UAAU;IACtE,IAAI;MACF,MAAMa,MAAA,GAAS,MAAMH,kBAAA,CAAmBZ,IAAA,EAAM;QAAEgB,MAAA,EAAQb,GAAA,CAAIa,MAAM;QAAEb,GAAA;QAAKU;MAAM;MAE/E,IAAI,OAAOE,MAAA,KAAW,UAAU;QAC9BD,UAAA,GAAaC,MAAA;MACf;IACF,EAAE,OAAOE,GAAA,EAAK;MACZd,GAAA,CAAIC,OAAO,CAACc,MAAM,CAACC,KAAK,CAAC;QACvBF,GAAA;QACAG,GAAA,EAAK,kEAAkEtB,cAAA,IAAkBG,UAAA;MAC3F;IACF;EACF;EAEA,OAAO;IAAEV,gBAAA,EAAkBoB,OAAA;IAASG;EAAW;AACjD","ignoreList":[]}
@@ -0,0 +1,15 @@
import { FetchBreadcrumbHint, HandlerDataFetch, SentryWrappedXMLHttpRequest, XhrBreadcrumbHint } from '@sentry/core';
import { GLOBAL_OBJ } from '@sentry/core';
export declare const WINDOW: typeof GLOBAL_OBJ & Pick<Window, Exclude<keyof Window, "document">> & Partial<Pick<Window, "document">>;
export type NetworkMetaWarning = 'MAYBE_JSON_TRUNCATED' | 'TEXT_TRUNCATED' | 'URL_SKIPPED' | 'BODY_PARSE_ERROR' | 'BODY_PARSE_TIMEOUT' | 'UNPARSEABLE_BODY_TYPE';
type RequestBody = null | Blob | BufferSource | FormData | URLSearchParams | string;
export type XhrHint = XhrBreadcrumbHint & {
xhr: XMLHttpRequest & SentryWrappedXMLHttpRequest;
input?: RequestBody;
};
export type FetchHint = FetchBreadcrumbHint & {
input: HandlerDataFetch['args'];
response: Response;
};
export {};
//# sourceMappingURL=types.d.ts.map
@@ -0,0 +1,254 @@
"use strict";
exports.localize = void 0;
var _index = require("../../_lib/buildLocalizeFn.js");
const eraValues = {
narrow: ["p.m.ē", "m.ē"],
abbreviated: ["p. m. ē.", "m. ē."],
wide: ["pirms mūsu ēras", "mūsu ērā"],
};
const quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["1. cet.", "2. cet.", "3. cet.", "4. cet."],
wide: [
"pirmais ceturksnis",
"otrais ceturksnis",
"trešais ceturksnis",
"ceturtais ceturksnis",
],
};
const formattingQuarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["1. cet.", "2. cet.", "3. cet.", "4. cet."],
wide: [
"pirmajā ceturksnī",
"otrajā ceturksnī",
"trešajā ceturksnī",
"ceturtajā ceturksnī",
],
};
const monthValues = {
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
abbreviated: [
"janv.",
"febr.",
"marts",
"apr.",
"maijs",
"jūn.",
"jūl.",
"aug.",
"sept.",
"okt.",
"nov.",
"dec.",
],
wide: [
"janvāris",
"februāris",
"marts",
"aprīlis",
"maijs",
"jūnijs",
"jūlijs",
"augusts",
"septembris",
"oktobris",
"novembris",
"decembris",
],
};
const formattingMonthValues = {
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
abbreviated: [
"janv.",
"febr.",
"martā",
"apr.",
"maijs",
"jūn.",
"jūl.",
"aug.",
"sept.",
"okt.",
"nov.",
"dec.",
],
wide: [
"janvārī",
"februārī",
"martā",
"aprīlī",
"maijā",
"jūnijā",
"jūlijā",
"augustā",
"septembrī",
"oktobrī",
"novembrī",
"decembrī",
],
};
const dayValues = {
narrow: ["S", "P", "O", "T", "C", "P", "S"],
short: ["Sv", "P", "O", "T", "C", "Pk", "S"],
abbreviated: [
"svētd.",
"pirmd.",
"otrd.",
"trešd.",
"ceturtd.",
"piektd.",
"sestd.",
],
wide: [
"svētdiena",
"pirmdiena",
"otrdiena",
"trešdiena",
"ceturtdiena",
"piektdiena",
"sestdiena",
],
};
const formattingDayValues = {
narrow: ["S", "P", "O", "T", "C", "P", "S"],
short: ["Sv", "P", "O", "T", "C", "Pk", "S"],
abbreviated: [
"svētd.",
"pirmd.",
"otrd.",
"trešd.",
"ceturtd.",
"piektd.",
"sestd.",
],
wide: [
"svētdienā",
"pirmdienā",
"otrdienā",
"trešdienā",
"ceturtdienā",
"piektdienā",
"sestdienā",
],
};
const dayPeriodValues = {
narrow: {
am: "am",
pm: "pm",
midnight: "pusn.",
noon: "pusd.",
morning: "rīts",
afternoon: "diena",
evening: "vakars",
night: "nakts",
},
abbreviated: {
am: "am",
pm: "pm",
midnight: "pusn.",
noon: "pusd.",
morning: "rīts",
afternoon: "pēcpusd.",
evening: "vakars",
night: "nakts",
},
wide: {
am: "am",
pm: "pm",
midnight: "pusnakts",
noon: "pusdienlaiks",
morning: "rīts",
afternoon: "pēcpusdiena",
evening: "vakars",
night: "nakts",
},
};
const formattingDayPeriodValues = {
narrow: {
am: "am",
pm: "pm",
midnight: "pusn.",
noon: "pusd.",
morning: "rītā",
afternoon: "dienā",
evening: "vakarā",
night: "naktī",
},
abbreviated: {
am: "am",
pm: "pm",
midnight: "pusn.",
noon: "pusd.",
morning: "rītā",
afternoon: "pēcpusd.",
evening: "vakarā",
night: "naktī",
},
wide: {
am: "am",
pm: "pm",
midnight: "pusnaktī",
noon: "pusdienlaikā",
morning: "rītā",
afternoon: "pēcpusdienā",
evening: "vakarā",
night: "naktī",
},
};
const ordinalNumber = (dirtyNumber, _options) => {
const number = Number(dirtyNumber);
return number + ".";
};
const localize = (exports.localize = {
ordinalNumber,
era: (0, _index.buildLocalizeFn)({
values: eraValues,
defaultWidth: "wide",
}),
quarter: (0, _index.buildLocalizeFn)({
values: quarterValues,
defaultWidth: "wide",
formattingValues: formattingQuarterValues,
defaultFormattingWidth: "wide",
argumentCallback: (quarter) => quarter - 1,
}),
month: (0, _index.buildLocalizeFn)({
values: monthValues,
defaultWidth: "wide",
formattingValues: formattingMonthValues,
defaultFormattingWidth: "wide",
}),
day: (0, _index.buildLocalizeFn)({
values: dayValues,
defaultWidth: "wide",
formattingValues: formattingDayValues,
defaultFormattingWidth: "wide",
}),
dayPeriod: (0, _index.buildLocalizeFn)({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide",
}),
});
@@ -0,0 +1,22 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Scroll = createLucideIcon("Scroll", [
["path", { d: "M19 17V5a2 2 0 0 0-2-2H4", key: "zz82l3" }],
[
"path",
{
d: "M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",
key: "1ph1d7"
}
]
]);
export { Scroll as default };
//# sourceMappingURL=scroll.js.map
@@ -0,0 +1,4 @@
declare function parseJson(input: string | null, filepath?: string): any;
declare function parseJson(input: string | null, reviver: (key: any, value: any) => any, filepath?: string): any;
export = parseJson;
@@ -0,0 +1,805 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const { fileURLToPath } = require("url");
const CommentCompilationWarning = require("../CommentCompilationWarning");
const RuntimeGlobals = require("../RuntimeGlobals");
const UnsupportedFeatureWarning = require("../UnsupportedFeatureWarning");
const WebpackError = require("../WebpackError");
const BasicEvaluatedExpression = require("../javascript/BasicEvaluatedExpression");
const { VariableInfo } = require("../javascript/JavascriptParser");
const {
evaluateToIdentifier,
evaluateToString,
expressionIsUnsupported,
toConstantDependency
} = require("../javascript/JavascriptParserHelpers");
const CommonJsFullRequireDependency = require("./CommonJsFullRequireDependency");
const CommonJsRequireContextDependency = require("./CommonJsRequireContextDependency");
const CommonJsRequireDependency = require("./CommonJsRequireDependency");
const ConstDependency = require("./ConstDependency");
const ContextDependencyHelpers = require("./ContextDependencyHelpers");
const LocalModuleDependency = require("./LocalModuleDependency");
const { getLocalModule } = require("./LocalModulesHelpers");
const RequireHeaderDependency = require("./RequireHeaderDependency");
const RequireResolveContextDependency = require("./RequireResolveContextDependency");
const RequireResolveDependency = require("./RequireResolveDependency");
const RequireResolveHeaderDependency = require("./RequireResolveHeaderDependency");
/** @typedef {import("estree").CallExpression} CallExpression */
/** @typedef {import("estree").Expression} Expression */
/** @typedef {import("estree").NewExpression} NewExpression */
/** @typedef {import("../../declarations/WebpackOptions").JavascriptParserOptions} JavascriptParserOptions */
/** @typedef {import("../Dependency").DependencyLocation} DependencyLocation */
/** @typedef {import("../javascript/JavascriptParser")} JavascriptParser */
/** @typedef {import("../javascript/JavascriptParser").ImportSource} ImportSource */
/** @typedef {import("../javascript/JavascriptParser").Range} Range */
/** @typedef {import("../javascript/JavascriptParser").Members} Members */
/** @typedef {import("../javascript/JavascriptParser").CalleeMembers} CalleeMembers */
/** @typedef {import("./LocalModule")} LocalModule */
/**
* @typedef {object} CommonJsImportSettings
* @property {string=} name
* @property {string} context
*/
const createRequireSpecifierTag = Symbol("createRequire");
const createdRequireIdentifierTag = Symbol("createRequire()");
const PLUGIN_NAME = "CommonJsImportsParserPlugin";
class CommonJsImportsParserPlugin {
/**
* @param {JavascriptParserOptions} options parser options
*/
constructor(options) {
this.options = options;
}
/**
* @param {JavascriptParser} parser the parser
* @returns {void}
*/
apply(parser) {
const options = this.options;
const getContext = () => {
if (parser.currentTagData) {
const { context } =
/** @type {CommonJsImportSettings} */
(parser.currentTagData);
return context;
}
};
// #region metadata
/**
* @param {string} expression expression
* @param {() => Members} getMembers get members
*/
const tapRequireExpression = (expression, getMembers) => {
parser.hooks.typeof
.for(expression)
.tap(
PLUGIN_NAME,
toConstantDependency(parser, JSON.stringify("function"))
);
parser.hooks.evaluateTypeof
.for(expression)
.tap(PLUGIN_NAME, evaluateToString("function"));
parser.hooks.evaluateIdentifier
.for(expression)
.tap(
PLUGIN_NAME,
evaluateToIdentifier(expression, "require", getMembers, true)
);
};
/**
* @param {string | symbol} tag tag
*/
const tapRequireExpressionTag = (tag) => {
parser.hooks.typeof
.for(tag)
.tap(
PLUGIN_NAME,
toConstantDependency(parser, JSON.stringify("function"))
);
parser.hooks.evaluateTypeof
.for(tag)
.tap(PLUGIN_NAME, evaluateToString("function"));
};
tapRequireExpression("require", () => []);
tapRequireExpression("require.resolve", () => ["resolve"]);
tapRequireExpression("require.resolveWeak", () => ["resolveWeak"]);
// #endregion
// Weird stuff //
parser.hooks.assign.for("require").tap(PLUGIN_NAME, (expr) => {
// to not leak to global "require", we need to define a local require here.
const dep = new ConstDependency("var require;", 0);
dep.loc = /** @type {DependencyLocation} */ (expr.loc);
parser.state.module.addPresentationalDependency(dep);
return true;
});
// #region Unsupported
parser.hooks.call
.for("require.main.require")
.tap(
PLUGIN_NAME,
expressionIsUnsupported(
parser,
"require.main.require is not supported by webpack."
)
);
parser.hooks.expression
.for("module.parent.require")
.tap(
PLUGIN_NAME,
expressionIsUnsupported(
parser,
"module.parent.require is not supported by webpack."
)
);
parser.hooks.call
.for("module.parent.require")
.tap(
PLUGIN_NAME,
expressionIsUnsupported(
parser,
"module.parent.require is not supported by webpack."
)
);
// #endregion
// #region Renaming
/**
* @param {Expression} expr expression
* @returns {boolean} true when set undefined
*/
const defineUndefined = (expr) => {
// To avoid "not defined" error, replace the value with undefined
const dep = new ConstDependency(
"undefined",
/** @type {Range} */ (expr.range)
);
dep.loc = /** @type {DependencyLocation} */ (expr.loc);
parser.state.module.addPresentationalDependency(dep);
return false;
};
parser.hooks.canRename.for("require").tap(PLUGIN_NAME, () => true);
parser.hooks.rename.for("require").tap(PLUGIN_NAME, defineUndefined);
// #endregion
// #region Inspection
const requireCache = toConstantDependency(
parser,
RuntimeGlobals.moduleCache,
[
RuntimeGlobals.moduleCache,
RuntimeGlobals.moduleId,
RuntimeGlobals.moduleLoaded
]
);
parser.hooks.expression.for("require.cache").tap(PLUGIN_NAME, requireCache);
// #endregion
// #region Require as expression
/**
* @param {Expression} expr expression
* @returns {boolean} true when handled
*/
const requireAsExpressionHandler = (expr) => {
const dep = new CommonJsRequireContextDependency(
{
request: /** @type {string} */ (options.unknownContextRequest),
recursive: /** @type {boolean} */ (options.unknownContextRecursive),
regExp: /** @type {RegExp} */ (options.unknownContextRegExp),
mode: "sync"
},
/** @type {Range} */ (expr.range),
undefined,
parser.scope.inShorthand,
getContext()
);
dep.critical =
options.unknownContextCritical &&
"require function is used in a way in which dependencies cannot be statically extracted";
dep.loc = /** @type {DependencyLocation} */ (expr.loc);
dep.optional = Boolean(parser.scope.inTry);
parser.state.current.addDependency(dep);
return true;
};
parser.hooks.expression
.for("require")
.tap(PLUGIN_NAME, requireAsExpressionHandler);
// #endregion
// #region Require
/**
* @param {CallExpression | NewExpression} expr expression
* @param {BasicEvaluatedExpression} param param
* @returns {boolean | void} true when handled
*/
const processRequireItem = (expr, param) => {
if (param.isString()) {
const dep = new CommonJsRequireDependency(
/** @type {string} */ (param.string),
/** @type {Range} */ (param.range),
getContext()
);
dep.loc = /** @type {DependencyLocation} */ (expr.loc);
dep.optional = Boolean(parser.scope.inTry);
parser.state.current.addDependency(dep);
return true;
}
};
/**
* @param {CallExpression | NewExpression} expr expression
* @param {BasicEvaluatedExpression} param param
* @returns {boolean | void} true when handled
*/
const processRequireContext = (expr, param) => {
const dep = ContextDependencyHelpers.create(
CommonJsRequireContextDependency,
/** @type {Range} */ (expr.range),
param,
expr,
options,
{
category: "commonjs"
},
parser,
undefined,
getContext()
);
if (!dep) return;
dep.loc = /** @type {DependencyLocation} */ (expr.loc);
dep.optional = Boolean(parser.scope.inTry);
parser.state.current.addDependency(dep);
return true;
};
/**
* @param {boolean} callNew true, when require is called with new
* @returns {(expr: CallExpression | NewExpression) => (boolean | void)} handler
*/
const createRequireHandler = (callNew) => (expr) => {
if (options.commonjsMagicComments) {
const { options: requireOptions, errors: commentErrors } =
parser.parseCommentOptions(/** @type {Range} */ (expr.range));
if (commentErrors) {
for (const e of commentErrors) {
const { comment } = e;
parser.state.module.addWarning(
new CommentCompilationWarning(
`Compilation error while processing magic comment(-s): /*${comment.value}*/: ${e.message}`,
/** @type {DependencyLocation} */ (comment.loc)
)
);
}
}
if (requireOptions && requireOptions.webpackIgnore !== undefined) {
if (typeof requireOptions.webpackIgnore !== "boolean") {
parser.state.module.addWarning(
new UnsupportedFeatureWarning(
`\`webpackIgnore\` expected a boolean, but received: ${requireOptions.webpackIgnore}.`,
/** @type {DependencyLocation} */ (expr.loc)
)
);
} else if (requireOptions.webpackIgnore) {
// Do not instrument `require()` if `webpackIgnore` is `true`
return true;
}
}
}
if (expr.arguments.length !== 1) return;
/** @type {null | LocalModule} */
let localModule;
const param = parser.evaluateExpression(expr.arguments[0]);
if (param.isConditional()) {
let isExpression = false;
for (const p of /** @type {BasicEvaluatedExpression[]} */ (
param.options
)) {
const result = processRequireItem(expr, p);
if (result === undefined) {
isExpression = true;
}
}
if (!isExpression) {
const dep = new RequireHeaderDependency(
/** @type {Range} */ (expr.callee.range)
);
dep.loc = /** @type {DependencyLocation} */ (expr.loc);
parser.state.module.addPresentationalDependency(dep);
return true;
}
}
if (
param.isString() &&
(localModule = getLocalModule(
parser.state,
/** @type {string} */ (param.string)
))
) {
localModule.flagUsed();
const dep = new LocalModuleDependency(
localModule,
/** @type {Range} */ (expr.range),
callNew
);
dep.loc = /** @type {DependencyLocation} */ (expr.loc);
parser.state.module.addPresentationalDependency(dep);
} else {
const result = processRequireItem(expr, param);
if (result === undefined) {
processRequireContext(expr, param);
} else {
const dep = new RequireHeaderDependency(
/** @type {Range} */ (expr.callee.range)
);
dep.loc = /** @type {DependencyLocation} */ (expr.loc);
parser.state.module.addPresentationalDependency(dep);
}
}
return true;
};
parser.hooks.call
.for("require")
.tap(PLUGIN_NAME, createRequireHandler(false));
parser.hooks.new
.for("require")
.tap(PLUGIN_NAME, createRequireHandler(true));
parser.hooks.call
.for("module.require")
.tap(PLUGIN_NAME, createRequireHandler(false));
parser.hooks.new
.for("module.require")
.tap(PLUGIN_NAME, createRequireHandler(true));
// #endregion
// #region Require with property access
/**
* @param {Expression} expr expression
* @param {CalleeMembers} calleeMembers callee members
* @param {CallExpression} callExpr call expression
* @param {Members} members members
* @param {Range[]} memberRanges member ranges
* @returns {boolean | void} true when handled
*/
const chainHandler = (
expr,
calleeMembers,
callExpr,
members,
memberRanges
) => {
if (callExpr.arguments.length !== 1) return;
const param = parser.evaluateExpression(callExpr.arguments[0]);
if (
param.isString() &&
!getLocalModule(parser.state, /** @type {string} */ (param.string))
) {
const dep = new CommonJsFullRequireDependency(
/** @type {string} */ (param.string),
/** @type {Range} */ (expr.range),
members,
/** @type {Range[]} */ memberRanges
);
dep.asiSafe = !parser.isAsiPosition(
/** @type {Range} */ (expr.range)[0]
);
dep.optional = Boolean(parser.scope.inTry);
dep.loc = /** @type {DependencyLocation} */ (expr.loc);
parser.state.current.addDependency(dep);
return true;
}
};
/**
* @param {CallExpression} expr expression
* @param {CalleeMembers} calleeMembers callee members
* @param {CallExpression} callExpr call expression
* @param {Members} members members
* @param {Range[]} memberRanges member ranges
* @returns {boolean | void} true when handled
*/
const callChainHandler = (
expr,
calleeMembers,
callExpr,
members,
memberRanges
) => {
if (callExpr.arguments.length !== 1) return;
const param = parser.evaluateExpression(callExpr.arguments[0]);
if (
param.isString() &&
!getLocalModule(parser.state, /** @type {string} */ (param.string))
) {
const dep = new CommonJsFullRequireDependency(
/** @type {string} */ (param.string),
/** @type {Range} */ (expr.callee.range),
members,
/** @type {Range[]} */ memberRanges
);
dep.call = true;
dep.asiSafe = !parser.isAsiPosition(
/** @type {Range} */ (expr.range)[0]
);
dep.optional = Boolean(parser.scope.inTry);
dep.loc = /** @type {DependencyLocation} */ (expr.callee.loc);
parser.state.current.addDependency(dep);
parser.walkExpressions(expr.arguments);
return true;
}
};
parser.hooks.memberChainOfCallMemberChain
.for("require")
.tap(PLUGIN_NAME, chainHandler);
parser.hooks.memberChainOfCallMemberChain
.for("module.require")
.tap(PLUGIN_NAME, chainHandler);
parser.hooks.callMemberChainOfCallMemberChain
.for("require")
.tap(PLUGIN_NAME, callChainHandler);
parser.hooks.callMemberChainOfCallMemberChain
.for("module.require")
.tap(PLUGIN_NAME, callChainHandler);
// #endregion
// #region Require.resolve
/**
* @param {CallExpression} expr call expression
* @param {boolean} weak weak
* @returns {boolean | void} true when handled
*/
const processResolve = (expr, weak) => {
if (!weak && options.commonjsMagicComments) {
const { options: requireOptions, errors: commentErrors } =
parser.parseCommentOptions(/** @type {Range} */ (expr.range));
if (commentErrors) {
for (const e of commentErrors) {
const { comment } = e;
parser.state.module.addWarning(
new CommentCompilationWarning(
`Compilation error while processing magic comment(-s): /*${comment.value}*/: ${e.message}`,
/** @type {DependencyLocation} */ (comment.loc)
)
);
}
}
if (requireOptions && requireOptions.webpackIgnore !== undefined) {
if (typeof requireOptions.webpackIgnore !== "boolean") {
parser.state.module.addWarning(
new UnsupportedFeatureWarning(
`\`webpackIgnore\` expected a boolean, but received: ${requireOptions.webpackIgnore}.`,
/** @type {DependencyLocation} */ (expr.loc)
)
);
} else if (requireOptions.webpackIgnore) {
// Do not instrument `require()` if `webpackIgnore` is `true`
return true;
}
}
}
if (expr.arguments.length !== 1) return;
const param = parser.evaluateExpression(expr.arguments[0]);
if (param.isConditional()) {
for (const option of /** @type {BasicEvaluatedExpression[]} */ (
param.options
)) {
const result = processResolveItem(expr, option, weak);
if (result === undefined) {
processResolveContext(expr, option, weak);
}
}
const dep = new RequireResolveHeaderDependency(
/** @type {Range} */ (expr.callee.range)
);
dep.loc = /** @type {DependencyLocation} */ (expr.loc);
parser.state.module.addPresentationalDependency(dep);
return true;
}
const result = processResolveItem(expr, param, weak);
if (result === undefined) {
processResolveContext(expr, param, weak);
}
const dep = new RequireResolveHeaderDependency(
/** @type {Range} */ (expr.callee.range)
);
dep.loc = /** @type {DependencyLocation} */ (expr.loc);
parser.state.module.addPresentationalDependency(dep);
return true;
};
/**
* @param {CallExpression} expr call expression
* @param {BasicEvaluatedExpression} param param
* @param {boolean} weak weak
* @returns {boolean | void} true when handled
*/
const processResolveItem = (expr, param, weak) => {
if (param.isString()) {
const dep = new RequireResolveDependency(
/** @type {string} */ (param.string),
/** @type {Range} */ (param.range),
getContext()
);
dep.loc = /** @type {DependencyLocation} */ (expr.loc);
dep.optional = Boolean(parser.scope.inTry);
dep.weak = weak;
parser.state.current.addDependency(dep);
return true;
}
};
/**
* @param {CallExpression} expr call expression
* @param {BasicEvaluatedExpression} param param
* @param {boolean} weak weak
* @returns {boolean | void} true when handled
*/
const processResolveContext = (expr, param, weak) => {
const dep = ContextDependencyHelpers.create(
RequireResolveContextDependency,
/** @type {Range} */ (param.range),
param,
expr,
options,
{
category: "commonjs",
mode: weak ? "weak" : "sync"
},
parser,
getContext()
);
if (!dep) return;
dep.loc = /** @type {DependencyLocation} */ (expr.loc);
dep.optional = Boolean(parser.scope.inTry);
parser.state.current.addDependency(dep);
return true;
};
parser.hooks.call
.for("require.resolve")
.tap(PLUGIN_NAME, (expr) => processResolve(expr, false));
parser.hooks.call
.for("require.resolveWeak")
.tap(PLUGIN_NAME, (expr) => processResolve(expr, true));
// #endregion
// #region Create require
if (!options.createRequire) return;
/** @type {ImportSource[]} */
let moduleName = [];
/** @type {string | undefined} */
let specifierName;
if (options.createRequire === true) {
moduleName = ["module", "node:module"];
specifierName = "createRequire";
} else {
/** @type {undefined | string} */
let moduleName;
const match = /^(.*) from (.*)$/.exec(options.createRequire);
if (match) {
[, specifierName, moduleName] = match;
}
if (!specifierName || !moduleName) {
const err = new WebpackError(
`Parsing javascript parser option "createRequire" failed, got ${JSON.stringify(
options.createRequire
)}`
);
err.details =
'Expected string in format "createRequire from module", where "createRequire" is specifier name and "module" name of the module';
throw err;
}
}
tapRequireExpressionTag(createdRequireIdentifierTag);
tapRequireExpressionTag(createRequireSpecifierTag);
parser.hooks.evaluateCallExpression
.for(createRequireSpecifierTag)
.tap(PLUGIN_NAME, (expr) => {
const context = parseCreateRequireArguments(expr);
if (context === undefined) return;
const ident = parser.evaluatedVariable({
tag: createdRequireIdentifierTag,
data: { context },
next: undefined
});
return new BasicEvaluatedExpression()
.setIdentifier(ident, ident, () => [])
.setSideEffects(false)
.setRange(/** @type {Range} */ (expr.range));
});
parser.hooks.unhandledExpressionMemberChain
.for(createdRequireIdentifierTag)
.tap(PLUGIN_NAME, (expr, members) =>
expressionIsUnsupported(
parser,
`createRequire().${members.join(".")} is not supported by webpack.`
)(expr)
);
parser.hooks.canRename
.for(createdRequireIdentifierTag)
.tap(PLUGIN_NAME, () => true);
parser.hooks.canRename
.for(createRequireSpecifierTag)
.tap(PLUGIN_NAME, () => true);
parser.hooks.rename
.for(createRequireSpecifierTag)
.tap(PLUGIN_NAME, defineUndefined);
parser.hooks.expression
.for(createdRequireIdentifierTag)
.tap(PLUGIN_NAME, requireAsExpressionHandler);
parser.hooks.call
.for(createdRequireIdentifierTag)
.tap(PLUGIN_NAME, createRequireHandler(false));
/**
* @param {CallExpression} expr call expression
* @returns {string | void} context
*/
const parseCreateRequireArguments = (expr) => {
const args = expr.arguments;
if (args.length !== 1) {
const err = new WebpackError(
"module.createRequire supports only one argument."
);
err.loc = /** @type {DependencyLocation} */ (expr.loc);
parser.state.module.addWarning(err);
return;
}
const arg = args[0];
const evaluated = parser.evaluateExpression(arg);
if (!evaluated.isString()) {
const err = new WebpackError(
"module.createRequire failed parsing argument."
);
err.loc = /** @type {DependencyLocation} */ (arg.loc);
parser.state.module.addWarning(err);
return;
}
const ctx = /** @type {string} */ (evaluated.string).startsWith("file://")
? fileURLToPath(/** @type {string} */ (evaluated.string))
: /** @type {string} */ (evaluated.string);
// argument always should be a filename
return ctx.slice(0, ctx.lastIndexOf(ctx.startsWith("/") ? "/" : "\\"));
};
parser.hooks.import.tap(
{
name: PLUGIN_NAME,
stage: -10
},
(statement, source) => {
if (
!moduleName.includes(source) ||
statement.specifiers.length !== 1 ||
statement.specifiers[0].type !== "ImportSpecifier" ||
statement.specifiers[0].imported.type !== "Identifier" ||
statement.specifiers[0].imported.name !== specifierName
) {
return;
}
// clear for 'import { createRequire as x } from "module"'
// if any other specifier was used import module
const clearDep = new ConstDependency(
parser.isAsiPosition(/** @type {Range} */ (statement.range)[0])
? ";"
: "",
/** @type {Range} */ (statement.range)
);
clearDep.loc = /** @type {DependencyLocation} */ (statement.loc);
parser.state.module.addPresentationalDependency(clearDep);
parser.unsetAsiPosition(/** @type {Range} */ (statement.range)[1]);
return true;
}
);
parser.hooks.importSpecifier.tap(
{
name: PLUGIN_NAME,
stage: -10
},
(statement, source, id, name) => {
if (!moduleName.includes(source) || id !== specifierName) return;
parser.tagVariable(name, createRequireSpecifierTag);
return true;
}
);
parser.hooks.preDeclarator.tap(PLUGIN_NAME, (declarator) => {
if (
declarator.id.type !== "Identifier" ||
!declarator.init ||
declarator.init.type !== "CallExpression" ||
declarator.init.callee.type !== "Identifier"
) {
return;
}
const variableInfo = parser.getVariableInfo(declarator.init.callee.name);
if (
variableInfo instanceof VariableInfo &&
variableInfo.tagInfo &&
variableInfo.tagInfo.tag === createRequireSpecifierTag
) {
const context = parseCreateRequireArguments(declarator.init);
if (context === undefined) return;
parser.tagVariable(declarator.id.name, createdRequireIdentifierTag, {
name: declarator.id.name,
context
});
return true;
}
});
parser.hooks.memberChainOfCallMemberChain
.for(createRequireSpecifierTag)
.tap(PLUGIN_NAME, (expr, calleeMembers, callExpr, members) => {
if (
calleeMembers.length !== 0 ||
members.length !== 1 ||
members[0] !== "cache"
) {
return;
}
// createRequire().cache
const context = parseCreateRequireArguments(callExpr);
if (context === undefined) return;
return requireCache(expr);
});
parser.hooks.callMemberChainOfCallMemberChain
.for(createRequireSpecifierTag)
.tap(PLUGIN_NAME, (expr, calleeMembers, innerCallExpression, members) => {
if (
calleeMembers.length !== 0 ||
members.length !== 1 ||
members[0] !== "resolve"
) {
return;
}
// createRequire().resolve()
return processResolve(expr, false);
});
parser.hooks.expressionMemberChain
.for(createdRequireIdentifierTag)
.tap(PLUGIN_NAME, (expr, members) => {
// require.cache
if (members.length === 1 && members[0] === "cache") {
return requireCache(expr);
}
});
parser.hooks.callMemberChain
.for(createdRequireIdentifierTag)
.tap(PLUGIN_NAME, (expr, members) => {
// require.resolve()
if (members.length === 1 && members[0] === "resolve") {
return processResolve(expr, false);
}
});
parser.hooks.call
.for(createRequireSpecifierTag)
.tap(PLUGIN_NAME, (expr) => {
const clearDep = new ConstDependency(
"/* createRequire() */ undefined",
/** @type {Range} */ (expr.range)
);
clearDep.loc = /** @type {DependencyLocation} */ (expr.loc);
parser.state.module.addPresentationalDependency(clearDep);
return true;
});
// #endregion
}
}
module.exports = CommonJsImportsParserPlugin;
@@ -0,0 +1,6 @@
/**
* Returns the actively focused element safely.
*
* @param doc the document to check
*/
export default function activeElement(doc?: Document): Element | null;
@@ -0,0 +1,40 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = cleanJSXElementLiteralChild;
var _index = require("../../builders/generated/index.js");
var _index2 = require("../../index.js");
function cleanJSXElementLiteralChild(child, args) {
const lines = child.value.split(/\r\n|\n|\r/);
let lastNonEmptyLine = 0;
for (let i = 0; i < lines.length; i++) {
if (/[^ \t]/.exec(lines[i])) {
lastNonEmptyLine = i;
}
}
let str = "";
for (let i = 0; i < lines.length; i++) {
const line = lines[i];
const isFirstLine = i === 0;
const isLastLine = i === lines.length - 1;
const isLastNonEmptyLine = i === lastNonEmptyLine;
let trimmedLine = line.replace(/\t/g, " ");
if (!isFirstLine) {
trimmedLine = trimmedLine.replace(/^ +/, "");
}
if (!isLastLine) {
trimmedLine = trimmedLine.replace(/ +$/, "");
}
if (trimmedLine) {
if (!isLastNonEmptyLine) {
trimmedLine += " ";
}
str += trimmedLine;
}
}
if (str) args.push((0, _index2.inherits)((0, _index.stringLiteral)(str), child));
}
//# sourceMappingURL=cleanJSXElementLiteralChild.js.map
@@ -0,0 +1,27 @@
'use strict'
let Container = require('./container')
let list = require('./list')
class Rule extends Container {
constructor(defaults) {
super(defaults)
this.type = 'rule'
if (!this.nodes) this.nodes = []
}
get selectors() {
return list.comma(this.selector)
}
set selectors(values) {
let match = this.selector ? this.selector.match(/,\s*/) : null
let sep = match ? match[0] : ',' + this.raw('between', 'beforeOpen')
this.selector = values.join(sep)
}
}
module.exports = Rule
Rule.default = Rule
Container.registerRule(Rule)
@@ -0,0 +1,12 @@
export * from '@sentry/browser';
export { init } from './sdk.js';
export { captureReactException, reactErrorHandler } from './error.js';
export { Profiler, useProfiler, withProfiler } from './profiler.js';
export { ErrorBoundary, withErrorBoundary } from './errorboundary.js';
export { createReduxEnhancer } from './redux.js';
export { reactRouterV3BrowserTracingIntegration } from './reactrouterv3.js';
export { tanstackRouterBrowserTracingIntegration } from './tanstackrouter.js';
export { reactRouterV4BrowserTracingIntegration, reactRouterV5BrowserTracingIntegration, withSentryRouting } from './reactrouter.js';
export { reactRouterV6BrowserTracingIntegration, withSentryReactRouterV6Routing, wrapCreateBrowserRouterV6, wrapCreateMemoryRouterV6, wrapUseRoutesV6 } from './reactrouterv6.js';
export { reactRouterV7BrowserTracingIntegration, withSentryReactRouterV7Routing, wrapCreateBrowserRouterV7, wrapCreateMemoryRouterV7, wrapUseRoutesV7 } from './reactrouterv7.js';
//# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
{"version":3,"file":"arrow-down-left-from-circle.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1,434 @@
/**
* 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.
*
* @flow strict
*/
import type {
BaseSelection,
EditorConfig,
LexicalNode,
NodeKey,
ParagraphNode,
PointType,
RangeSelection,
LexicalEditor,
TextFormatType,
LexicalCommand,
ElementDOMSlot,
} from 'lexical';
import {
ElementNode,
} from 'lexical';
/**
* LexicalTableCellNode
*/
export const TableCellHeaderStates = {
NO_STATUS: 0,
ROW: 1,
COLUMN: 2,
BOTH: 3,
};
export type TableCellHeaderState = $Values<typeof TableCellHeaderStates>;
declare export class TableCellNode extends ElementNode {
__colSpan: number;
__rowSpan: number;
__headerState: TableCellHeaderState;
__width?: number;
__backgroundColor: null | string;
static getType(): string;
static clone(node: TableCellNode): TableCellNode;
constructor(
headerState?: TableCellHeaderState,
colSpan?: number,
width?: ?number,
key?: NodeKey,
): void;
createDOM(config: EditorConfig): HTMLElement;
insertNewAfter(
selection: RangeSelection,
): null | ParagraphNode | TableCellNode;
collapseAtStart(): true;
getColSpan(): number;
setColSpan(colSpan: number): this;
getRowSpan(): number;
setRowSpan(rowSpan: number): this;
getTag(): string;
setHeaderStyles(headerState: TableCellHeaderState, mask?: TableCellHeaderState): TableCellNode;
getHeaderStyles(): TableCellHeaderState;
setWidth(width: number): TableCellNode;
getWidth(): ?number;
getBackgroundColor(): null | string;
setBackgroundColor(newBackgroundColor: null | string): TableCellNode;
toggleHeaderStyle(headerState: TableCellHeaderState): TableCellNode;
hasHeader(): boolean;
collapseAtStart(): true;
canBeEmpty(): false;
}
declare export function $createTableCellNode(
headerState?: TableCellHeaderState,
colSpan?: number,
width?: ?number,
): TableCellNode;
declare export function $isTableCellNode(
node: ?LexicalNode,
): node is TableCellNode;
/**
* LexicalTableNode
*/
export type TableMapValueType = {
cell: TableCellNode,
startRow: number,
startColumn: number,
};
export type TableMapType = Array<Array<TableMapValueType>>;
declare export class TableNode extends ElementNode {
static getType(): string;
static clone(node: TableNode): TableNode;
constructor(key?: NodeKey): void;
createDOM(config: EditorConfig): HTMLElement;
insertNewAfter(selection: RangeSelection): null | ParagraphNode | TableNode;
collapseAtStart(): true;
getCordsFromCellNode(
tableCellNode: TableCellNode,
table: TableDOMTable,
): {x: number, y: number};
getDOMCellFromCords(x: number, y: number, table: TableDOMTable): ?TableDOMCell;
getDOMCellFromCordsOrThrow(x: number, y: number, table: TableDOMTable): TableDOMCell;
getCellNodeFromCords(x: number, y: number, table: TableDOMTable): ?TableCellNode;
getCellNodeFromCordsOrThrow(x: number, y: number, table: TableDOMTable): TableCellNode;
canSelectBefore(): true;
getDOMSlot(element: HTMLElement): ElementDOMSlot<HTMLTableElement>;
}
declare export function $createTableNode(): TableNode;
declare export function $isTableNode(
node: ?LexicalNode,
): node is TableNode;
declare export function $isScrollableTablesActive(
editor?: LexicalEditor
): boolean;
declare export function setScrollableTablesActive(
editor: LexicalEditor,
active: boolean,
): void;
declare export function $getTableAndElementByKey(
tableNodeKey: NodeKey,
editor?: LexicalEditor,
): {
tableNode: TableNode;
tableElement: HTMLTableElementWithWithTableSelectionState;
};
/**
* LexicalTableRowNode
*/
declare export class TableRowNode extends ElementNode {
static getType(): string;
static clone(node: TableRowNode): TableRowNode;
constructor(height?: ?number, key?: NodeKey): void;
createDOM(config: EditorConfig): HTMLElement;
setHeight(height: number): ?number;
getHeight(): ?number;
insertNewAfter(
selection: RangeSelection,
): null | ParagraphNode | TableRowNode;
collapseAtStart(): true;
}
declare export function $createTableRowNode(): TableRowNode;
declare export function $isTableRowNode(
node: ?LexicalNode,
): node is TableRowNode;
/**
* LexicalTableSelectionHelpers
*/
export const LEXICAL_ELEMENT_KEY = '__lexicalTableSelection';
export type TableDOMCell = {
elem: HTMLElement,
highlighted: boolean,
x: number,
y: number,
};
export type TableDOMRows = Array<Array<TableDOMCell>>;
export type TableDOMTable = {
cells: TableDOMRows,
columns: number,
rows: number,
};
export type HTMLTableElementWithWithTableSelectionState = HTMLTableElement & Partial<{
[typeof LEXICAL_ELEMENT_KEY]: TableObserver | void;
}>;
declare export function applyTableHandlers(
tableNode: TableNode,
tableElement: HTMLElement,
editor: LexicalEditor,
hasTabHandler: boolean,
): TableObserver;
declare export function $getElementForTableNode(
editor: LexicalEditor,
tableNode: TableNode,
): TableDOMTable;
declare export function getTableObserverFromTableElement(
tableElement: HTMLElement,
): null | TableObserver;
declare export function getDOMCellFromTarget(node: Node): null | TableDOMCell;
declare export function $findTableNode(node: LexicalNode): null | TableNode;
declare export function $findCellNode(node: LexicalNode): null | TableCellNode;
declare export function getTableElement<T: HTMLElement | null>(
tableNode: TableNode,
dom: T,
): HTMLTableElementWithWithTableSelectionState | (T & null);
/**
* LexicalTableUtils
*/
declare export function $createTableNodeWithDimensions(
rowCount: number,
columnCount: number,
includeHeaders?: boolean,
): TableNode;
declare export function $getTableCellNodeFromLexicalNode(
startingNode: LexicalNode,
): TableCellNode | null;
declare export function $getTableRowNodeFromTableCellNodeOrThrow(
startingNode: LexicalNode,
): TableRowNode;
declare export function $getTableNodeFromLexicalNodeOrThrow(
startingNode: LexicalNode,
): TableNode;
declare export function $getTableRowIndexFromTableCellNode(
tableCellNode: TableCellNode,
): number;
declare export function $getTableColumnIndexFromTableCellNode(
tableCellNode: TableCellNode,
): number;
declare export function $removeTableRowAtIndex(
tableNode: TableNode,
indexToDelete: number,
): TableNode;
/** @deprecated This function does not support merged cells. Use {@link $insertTableRowAtSelection} or {@link $insertTableRowAtNode} instead. */
declare export function $insertTableRow(
tableNode: TableNode,
targetIndex: number,
shouldInsertAfter?: boolean,
rowCount: number,
table: TableDOMTable,
): TableNode;
/** @deprecated This function does not support merged cells. Use {@link $insertTableColumnAtSelection} or {@link $insertTableColumnAtNode} instead. */
declare export function $insertTableColumn(
tableNode: TableNode,
targetIndex: number,
shouldInsertAfter?: boolean,
columnCount: number,
table: TableDOMTable,
): TableNode;
/** @deprecated This function does not support merged cells. Use {@link $deleteTableColumnAtSelection} instead. */
declare export function $deleteTableColumn(
tableNode: TableNode,
targetIndex: number,
): TableNode;
declare export function $insertTableRowAtSelection(
insertAfter?: boolean,
): TableRowNode | null;
declare export function $insertTableRowAtNode(
cellNode: TableCellNode,
insertAfter?: boolean,
): TableRowNode | null;
declare export function $insertTableColumnAtSelection(
insertAfter?: boolean,
): TableCellNode | null;
declare export function $insertTableColumnAtNode(
cellNode: TableCellNode,
insertAfter?: boolean,
shouldSetSelection?: boolean,
): TableCellNode | null
declare export function $deleteTableRowAtSelection(): void;
declare export function $deleteTableColumnAtSelection(): void;
/** @deprecated renamed to {@link $insertTableRowAtSelection} */
declare export function $insertTableRow__EXPERIMENTAL(
insertAfter: boolean,
): TableRowNode | null;
/** @deprecated renamed to {@link $insertTableColumnAtSelection} */
declare export function $insertTableColumn__EXPERIMENTAL(
insertAfter: boolean,
): TableCellNode | null;
/** @deprecated renamed to {@link $deleteTableRowAtSelection} */
declare export function $deleteTableRow__EXPERIMENTAL(): void;
/** @deprecated renamed to {@link $deleteTableColumnAtSelection} */
declare export function $deleteTableColumn__EXPERIMENTAL(): void;
declare export function $unmergeCell(): void;
declare export function $computeTableMap(
table: TableNode,
cellA: TableCellNode,
cellB: TableCellNode,
): [TableMapType, TableMapValueType, TableMapValueType];
declare export function $getNodeTriplet(
source: PointType | LexicalNode | TableCellNode,
): [TableCellNode, TableRowNode, TableNode];
declare export function $getTableCellNodeRect(tableCellNode: TableCellNode): {
rowIndex: number;
columnIndex: number;
rowSpan: number;
colSpan: number;
} | null;
declare export function $computeTableMapSkipCellCheck(
tableNode: TableNode,
cellA: null | TableCellNode,
cellB: null | TableCellNode,
): [
tableMap: TableMapType,
cellAValue: TableMapValueType | null,
cellBValue: TableMapValueType | null,
];
/**
* LexicalTableObserver.js
*/
declare export class TableObserver {
currentX: number;
currentY: number;
listenersToRemove: Set<() => void>;
table: TableDOMTable;
isHighlightingCells: boolean;
isMouseDown: boolean;
startX: number;
startY: number;
nodeKey: string;
editor: LexicalEditor;
constructor(editor: LexicalEditor, nodeKey: string): void;
getTable(): TableDOMTable;
removeListeners(): void;
trackTable(): void;
$clearHighlight(): void;
$setFocusCellForSelection(cell: TableDOMCell, ignoreStart?: boolean): void;
$setAnchorCellForSelection(cell: TableDOMCell): void;
$formatCells(type: TextFormatType): void;
$clearText(): void;
}
/**
* LexicalTableSelection.ts
*/
export type TableSelectionShape = {
fromX: number,
fromY: number,
toX: number,
toY: number,
};
declare export class TableSelection implements BaseSelection {
tableKey: NodeKey;
anchor: PointType;
focus: PointType;
dirty: boolean;
constructor(tableKey: NodeKey, anchor: PointType, focus: PointType): void;
is(selection: null | BaseSelection): boolean;
set(tableKey: NodeKey, anchorCellKey: NodeKey, focusCellKey: NodeKey): void;
clone(): TableSelection;
getCharacterOffsets(): [number, number];
extract(): Array<LexicalNode>;
insertRawText(): void;
insertText(): void;
isCollapsed(): false;
isBackward(): boolean;
getShape(): TableSelectionShape;
getNodes(): Array<LexicalNode>;
getTextContent(): string;
insertNodes(nodes: Array<LexicalNode>): void;
getStartEndPoints(): [PointType, PointType];
getCachedNodes(): null | Array<LexicalNode>;
setCachedNodes(nodes: null | Array<LexicalNode>): void;
}
declare export function $isTableSelection(
x: ?mixed,
): x is TableSelection;
declare export function $createTableSelection(): TableSelection;
declare export function $createTableSelectionFrom(
tableNode: TableNode,
anchorCell: TableCellNode,
focusCell: TableCellNode,
): TableSelection;
/**
* LexicalTableCommands
*/
export type InsertTableCommandPayloadHeaders =
| $ReadOnly<{
rows: boolean;
columns: boolean;
}>
| boolean;
export type InsertTableCommandPayload = $ReadOnly<{
columns: string;
rows: string;
includeHeaders?: InsertTableCommandPayloadHeaders;
}>;
declare export var INSERT_TABLE_COMMAND: LexicalCommand<InsertTableCommandPayload>;
/**
* LexicalTablePluginHelpers
*/
declare export function registerTableCellUnmergeTransform(editor: LexicalEditor): () => void;
declare export function registerTablePlugin(editor: LexicalEditor): () => void;
declare export function registerTableSelectionObserver(editor: LexicalEditor, hasTabHandler?: boolean): () => void;
@@ -0,0 +1,17 @@
let { execSync } = require('child_process')
let pico = require('picocolors')
try {
let version = parseInt(execSync('npm -v'))
if (version <= 6) {
process.stderr.write(
pico.red(
'Update npm or call ' +
pico.yellow('npx browserslist@latest --update-db') +
'\n'
)
)
process.exit(1)
}
// eslint-disable-next-line no-unused-vars
} catch (e) {}
@@ -0,0 +1,53 @@
"use strict";
exports.setWeek = setWeek;
var _index = require("./getWeek.cjs");
var _index2 = require("./toDate.cjs");
/**
* The {@link setWeek} function options.
*/
/**
* @name setWeek
* @category Week Helpers
* @summary Set the local week to the given date.
*
* @description
* Set the local week to the given date, saving the weekday number.
* The exact calculation depends on the values of
* `options.weekStartsOn` (which is the index of the first day of the week)
* and `options.firstWeekContainsDate` (which is the day of January, which is always in
* the first week of the week-numbering year)
*
* Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
*
* @param date - The date to be changed
* @param week - The week of the new date
* @param options - An object with options
*
* @returns The new date with the local week set
*
* @example
* // Set the 1st week to 2 January 2005 with default options:
* const result = setWeek(new Date(2005, 0, 2), 1)
* //=> Sun Dec 26 2004 00:00:00
*
* @example
* // Set the 1st week to 2 January 2005,
* // if Monday is the first day of the week,
* // and the first week of the year always contains 4 January:
* const result = setWeek(new Date(2005, 0, 2), 1, {
* weekStartsOn: 1,
* firstWeekContainsDate: 4
* })
* //=> Sun Jan 4 2004 00:00:00
*/
function setWeek(date, week, options) {
const date_ = (0, _index2.toDate)(date, options?.in);
const diff = (0, _index.getWeek)(date_, options) - week;
date_.setDate(date_.getDate() - diff * 7);
return (0, _index2.toDate)(date_, options?.in);
}
@@ -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 Package2 = createLucideIcon("Package2", [
["path", { d: "M3 9h18v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V9Z", key: "1ront0" }],
["path", { d: "m3 9 2.45-4.9A2 2 0 0 1 7.24 3h9.52a2 2 0 0 1 1.8 1.1L21 9", key: "19h2x1" }],
["path", { d: "M12 3v6", key: "1holv5" }]
]);
export { Package2 as default };
//# sourceMappingURL=package-2.js.map
@@ -0,0 +1 @@
{"version":3,"file":"adminInit.d.ts","sourceRoot":"","sources":["../../../../src/utilities/telemetry/events/adminInit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAK7D,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,YAAY,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,KAAK,IAAI,GAAG;IACV,OAAO,EAAE,OAAO,CAAC,SAAS,CAAC,CAAA;IAC3B,OAAO,EAAE,OAAO,CAAA;IAChB,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC,CAAA;CAC7B,CAAA;AACD,eAAO,MAAM,SAAS,+BAAgC,IAAI,KAAG,IAuB5D,CAAA"}
@@ -0,0 +1,245 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const fs = require('fs');
const path = require('path');
let manifestCache = null;
let lastAppDirPath = null;
let lastIncludeRouteGroups = undefined;
function isPageFile(filename) {
return filename === 'page.tsx' || filename === 'page.jsx' || filename === 'page.ts' || filename === 'page.js';
}
function isRouteGroup(name) {
return name.startsWith('(') && name.endsWith(')');
}
function normalizeRouteGroupPath(routePath) {
// Remove route group segments from the path
// Using positive lookahead with (?=[^)\/]*\)) to avoid polynomial matching
return routePath.replace(/\/\((?=[^)/]*\))[^)/]+\)/g, '');
}
function getDynamicRouteSegment(name) {
if (name.startsWith('[[...') && name.endsWith(']]')) {
// Optional catchall: [[...param]]
const paramName = name.slice(5, -2); // Remove [[... and ]]
return `:${paramName}*?`; // Mark with ? as optional
} else if (name.startsWith('[...') && name.endsWith(']')) {
// Required catchall: [...param]
const paramName = name.slice(4, -1); // Remove [... and ]
return `:${paramName}*`;
}
// Regular dynamic: [param]
return `:${name.slice(1, -1)}`;
}
function buildRegexForDynamicRoute(routePath)
{
const segments = routePath.split('/').filter(Boolean);
const regexSegments = [];
const paramNames = [];
let hasOptionalCatchall = false;
for (const segment of segments) {
if (segment.startsWith(':')) {
const paramName = segment.substring(1);
if (paramName.endsWith('*?')) {
// Optional catchall: matches zero or more segments
const cleanParamName = paramName.slice(0, -2);
paramNames.push(cleanParamName);
// Handling this special case in pattern construction below
hasOptionalCatchall = true;
} else if (paramName.endsWith('*')) {
// Required catchall: matches one or more segments
const cleanParamName = paramName.slice(0, -1);
paramNames.push(cleanParamName);
regexSegments.push('(.+)');
} else {
// Regular dynamic segment
paramNames.push(paramName);
regexSegments.push('([^/]+)');
}
} else {
// Static segment - escape regex special characters including route group parentheses
regexSegments.push(segment.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'));
}
}
let pattern;
if (hasOptionalCatchall) {
if (regexSegments.length === 0) {
// If the optional catchall happens at the root, accept any path starting
// with a slash. Need capturing group for parameter extraction.
pattern = '^/(.*)$';
} else {
// For optional catchall, make the trailing slash and segments optional
// This allows matching both /catchall and /catchall/anything
const staticParts = regexSegments.join('/');
pattern = `^/${staticParts}(?:/(.*))?$`;
}
} else {
pattern = `^/${regexSegments.join('/')}$`;
}
return { regex: pattern, paramNames, hasOptionalPrefix: hasOptionalPrefix(paramNames) };
}
/**
* Detect if the first parameter is a common i18n prefix segment
* Common patterns: locale, lang, language
*/
function hasOptionalPrefix(paramNames) {
const firstParam = paramNames[0];
if (firstParam === undefined) {
return false;
}
return firstParam === 'locale' || firstParam === 'lang' || firstParam === 'language';
}
/**
* Check if a page file exports generateStaticParams (ISR/SSG indicator)
*/
function checkForGenerateStaticParams(pageFilePath) {
try {
const content = fs.readFileSync(pageFilePath, 'utf8');
// check for generateStaticParams export
// the regex covers `export function generateStaticParams`, `export async function generateStaticParams`, `export const generateStaticParams`
return /export\s+(async\s+)?function\s+generateStaticParams|export\s+const\s+generateStaticParams/.test(content);
} catch {
return false;
}
}
function scanAppDirectory(dir, basePath = '', includeRouteGroups = false) {
const dynamicRoutes = [];
const staticRoutes = [];
const isrRoutes = [];
try {
const entries = fs.readdirSync(dir, { withFileTypes: true });
const pageFile = entries.find(entry => isPageFile(entry.name));
if (pageFile) {
// Conditionally normalize the path based on includeRouteGroups option
const routePath = includeRouteGroups ? basePath || '/' : normalizeRouteGroupPath(basePath || '/');
const isDynamic = routePath.includes(':');
// Check if this page has generateStaticParams (ISR/SSG indicator)
const pageFilePath = path.join(dir, pageFile.name);
const hasGenerateStaticParams = checkForGenerateStaticParams(pageFilePath);
if (hasGenerateStaticParams) {
isrRoutes.push(routePath);
}
if (isDynamic) {
const { regex, paramNames, hasOptionalPrefix } = buildRegexForDynamicRoute(routePath);
dynamicRoutes.push({
path: routePath,
regex,
paramNames,
hasOptionalPrefix,
});
} else {
staticRoutes.push({
path: routePath,
});
}
}
for (const entry of entries) {
if (entry.isDirectory()) {
const fullPath = path.join(dir, entry.name);
let routeSegment;
const isDynamic = entry.name.startsWith('[') && entry.name.endsWith(']');
const isRouteGroupDir = isRouteGroup(entry.name);
if (isRouteGroupDir) {
if (includeRouteGroups) {
routeSegment = entry.name;
} else {
routeSegment = '';
}
} else if (isDynamic) {
routeSegment = getDynamicRouteSegment(entry.name);
} else {
routeSegment = entry.name;
}
const newBasePath = routeSegment ? `${basePath}/${routeSegment}` : basePath;
const subRoutes = scanAppDirectory(fullPath, newBasePath, includeRouteGroups);
dynamicRoutes.push(...subRoutes.dynamicRoutes);
staticRoutes.push(...subRoutes.staticRoutes);
isrRoutes.push(...subRoutes.isrRoutes);
}
}
} catch (error) {
// eslint-disable-next-line no-console
console.warn('Error building route manifest:', error);
}
return { dynamicRoutes, staticRoutes, isrRoutes };
}
/**
* Returns a route manifest for the given app directory
*/
function createRouteManifest(options) {
let targetDir;
if (options?.appDirPath) {
targetDir = options.appDirPath;
} else {
const projectDir = process.cwd();
const maybeAppDirPath = path.join(projectDir, 'app');
const maybeSrcAppDirPath = path.join(projectDir, 'src', 'app');
if (fs.existsSync(maybeAppDirPath) && fs.lstatSync(maybeAppDirPath).isDirectory()) {
targetDir = maybeAppDirPath;
} else if (fs.existsSync(maybeSrcAppDirPath) && fs.lstatSync(maybeSrcAppDirPath).isDirectory()) {
targetDir = maybeSrcAppDirPath;
}
}
if (!targetDir) {
return {
isrRoutes: [],
dynamicRoutes: [],
staticRoutes: [],
};
}
// Check if we can use cached version
if (manifestCache && lastAppDirPath === targetDir && lastIncludeRouteGroups === options?.includeRouteGroups) {
return manifestCache;
}
const { dynamicRoutes, staticRoutes, isrRoutes } = scanAppDirectory(
targetDir,
options?.basePath,
options?.includeRouteGroups,
);
const manifest = {
dynamicRoutes,
staticRoutes,
isrRoutes,
};
// set cache
manifestCache = manifest;
lastAppDirPath = targetDir;
lastIncludeRouteGroups = options?.includeRouteGroups;
return manifest;
}
exports.createRouteManifest = createRouteManifest;
//# sourceMappingURL=createRouteManifest.js.map
@@ -0,0 +1,23 @@
var LazyWrapper = require('./_LazyWrapper'),
LodashWrapper = require('./_LodashWrapper'),
copyArray = require('./_copyArray');
/**
* Creates a clone of `wrapper`.
*
* @private
* @param {Object} wrapper The wrapper to clone.
* @returns {Object} Returns the cloned wrapper.
*/
function wrapperClone(wrapper) {
if (wrapper instanceof LazyWrapper) {
return wrapper.clone();
}
var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
result.__actions__ = copyArray(wrapper.__actions__);
result.__index__ = wrapper.__index__;
result.__values__ = wrapper.__values__;
return result;
}
module.exports = wrapperClone;
@@ -0,0 +1,20 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const wcwidth_1 = __importDefault(require("./wcwidth"));
const mk_wcswidth = (pwcs) => {
let width = 0;
// eslint-disable-next-line no-plusplus
for (let i = 0; i < pwcs.length; i++) {
const charCode = pwcs.charCodeAt(i);
const w = (0, wcwidth_1.default)(charCode);
if (w < 0) {
return -1;
}
width += w;
}
return width;
};
exports.default = mk_wcswidth;
@@ -0,0 +1,61 @@
import { sql } from "../sql/index.js";
function readMigrationFiles({ journal, migrations }) {
const migrationQueries = [];
for (const journalEntry of journal.entries) {
const query = migrations[`m${journalEntry.idx.toString().padStart(4, "0")}`];
if (!query) {
throw new Error(`Missing migration: ${journalEntry.tag}`);
}
try {
const result = query.split("--> statement-breakpoint").map((it) => {
return it;
});
migrationQueries.push({
sql: result,
bps: journalEntry.breakpoints,
folderMillis: journalEntry.when,
hash: ""
});
} catch {
throw new Error(`Failed to parse migration: ${journalEntry.tag}`);
}
}
return migrationQueries;
}
async function migrate(db, config) {
const migrations = readMigrationFiles(config);
db.transaction((tx) => {
try {
const migrationsTable = "__drizzle_migrations";
const migrationTableCreate = sql`
CREATE TABLE IF NOT EXISTS ${sql.identifier(migrationsTable)} (
id SERIAL PRIMARY KEY,
hash text NOT NULL,
created_at numeric
)
`;
db.run(migrationTableCreate);
const dbMigrations = db.values(
sql`SELECT id, hash, created_at FROM ${sql.identifier(migrationsTable)} ORDER BY created_at DESC LIMIT 1`
);
const lastDbMigration = dbMigrations[0] ?? void 0;
for (const migration of migrations) {
if (!lastDbMigration || Number(lastDbMigration[2]) < migration.folderMillis) {
for (const stmt of migration.sql) {
db.run(sql.raw(stmt));
}
db.run(
sql`INSERT INTO ${sql.identifier(migrationsTable)} ("hash", "created_at") VALUES(${migration.hash}, ${migration.folderMillis})`
);
}
}
} catch (error) {
tx.rollback();
throw error;
}
});
}
export {
migrate
};
//# sourceMappingURL=migrator.js.map
@@ -0,0 +1,37 @@
import { toDate } from "./toDate.mjs";
/**
* @name getISODay
* @category Weekday Helpers
* @summary Get the day of the ISO week of the given date.
*
* @description
* Get the day of the ISO week of the given date,
* which is 7 for Sunday, 1 for Monday etc.
*
* ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param date - The given date
*
* @returns The day of ISO week
*
* @example
* // Which day of the ISO week is 26 February 2012?
* const result = getISODay(new Date(2012, 1, 26))
* //=> 7
*/
export function getISODay(date) {
const _date = toDate(date);
let day = _date.getDay();
if (day === 0) {
day = 7;
}
return day;
}
// Fallback for modularized imports:
export default getISODay;
@@ -0,0 +1,22 @@
import type { Coordinates, UniqueIdentifier } from '../../types';
import type { SensorContext } from '../types';
export declare enum KeyboardCode {
Space = "Space",
Down = "ArrowDown",
Right = "ArrowRight",
Left = "ArrowLeft",
Up = "ArrowUp",
Esc = "Escape",
Enter = "Enter",
Tab = "Tab"
}
export declare type KeyboardCodes = {
start: KeyboardEvent['code'][];
cancel: KeyboardEvent['code'][];
end: KeyboardEvent['code'][];
};
export declare type KeyboardCoordinateGetter = (event: KeyboardEvent, args: {
active: UniqueIdentifier;
currentCoordinates: Coordinates;
context: SensorContext;
}) => Coordinates | void;
@@ -0,0 +1 @@
Prism.languages.go=Prism.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),Prism.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete Prism.languages.go["class-name"];
@@ -0,0 +1,9 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
export { default } from './ellipsis-vertical.js';
//# sourceMappingURL=more-vertical.js.map
@@ -0,0 +1,2 @@
export { nl } from '@payloadcms/translations/languages/nl';
//# sourceMappingURL=nl.d.ts.map
@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/pg-core/columns/time.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyPgTable } from '~/pg-core/table.ts';\nimport { getColumnNameAndConfig } from '~/utils.ts';\nimport { PgColumn } from './common.ts';\nimport { PgDateColumnBaseBuilder } from './date.common.ts';\nimport type { Precision } from './timestamp.ts';\n\nexport type PgTimeBuilderInitial<TName extends string> = PgTimeBuilder<{\n\tname: TName;\n\tdataType: 'string';\n\tcolumnType: 'PgTime';\n\tdata: string;\n\tdriverParam: string;\n\tenumValues: undefined;\n}>;\n\nexport class PgTimeBuilder<T extends ColumnBuilderBaseConfig<'string', 'PgTime'>> extends PgDateColumnBaseBuilder<\n\tT,\n\t{ withTimezone: boolean; precision: number | undefined }\n> {\n\tstatic override readonly [entityKind]: string = 'PgTimeBuilder';\n\n\tconstructor(\n\t\tname: T['name'],\n\t\treadonly withTimezone: boolean,\n\t\treadonly precision: number | undefined,\n\t) {\n\t\tsuper(name, 'string', 'PgTime');\n\t\tthis.config.withTimezone = withTimezone;\n\t\tthis.config.precision = precision;\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyPgTable<{ name: TTableName }>,\n\t): PgTime<MakeColumnConfig<T, TTableName>> {\n\t\treturn new PgTime<MakeColumnConfig<T, TTableName>>(table, this.config as ColumnBuilderRuntimeConfig<any, any>);\n\t}\n}\n\nexport class PgTime<T extends ColumnBaseConfig<'string', 'PgTime'>> extends PgColumn<T> {\n\tstatic override readonly [entityKind]: string = 'PgTime';\n\n\treadonly withTimezone: boolean;\n\treadonly precision: number | undefined;\n\n\tconstructor(table: AnyPgTable<{ name: T['tableName'] }>, config: PgTimeBuilder<T>['config']) {\n\t\tsuper(table, config);\n\t\tthis.withTimezone = config.withTimezone;\n\t\tthis.precision = config.precision;\n\t}\n\n\tgetSQLType(): string {\n\t\tconst precision = this.precision === undefined ? '' : `(${this.precision})`;\n\t\treturn `time${precision}${this.withTimezone ? ' with time zone' : ''}`;\n\t}\n}\n\nexport interface TimeConfig {\n\tprecision?: Precision;\n\twithTimezone?: boolean;\n}\n\nexport function time(): PgTimeBuilderInitial<''>;\nexport function time(config?: TimeConfig): PgTimeBuilderInitial<''>;\nexport function time<TName extends string>(name: TName, config?: TimeConfig): PgTimeBuilderInitial<TName>;\nexport function time(a?: string | TimeConfig, b: TimeConfig = {}) {\n\tconst { name, config } = getColumnNameAndConfig<TimeConfig>(a, b);\n\treturn new PgTimeBuilder(name, config.withTimezone ?? false, config.precision);\n}\n"],"mappings":"AAEA,SAAS,kBAAkB;AAE3B,SAAS,8BAA8B;AACvC,SAAS,gBAAgB;AACzB,SAAS,+BAA+B;AAYjC,MAAM,sBAA6E,wBAGxF;AAAA,EAGD,YACC,MACS,cACA,WACR;AACD,UAAM,MAAM,UAAU,QAAQ;AAHrB;AACA;AAGT,SAAK,OAAO,eAAe;AAC3B,SAAK,OAAO,YAAY;AAAA,EACzB;AAAA,EAVA,QAA0B,UAAU,IAAY;AAAA;AAAA,EAavC,MACR,OAC0C;AAC1C,WAAO,IAAI,OAAwC,OAAO,KAAK,MAA8C;AAAA,EAC9G;AACD;AAEO,MAAM,eAA+D,SAAY;AAAA,EACvF,QAA0B,UAAU,IAAY;AAAA,EAEvC;AAAA,EACA;AAAA,EAET,YAAY,OAA6C,QAAoC;AAC5F,UAAM,OAAO,MAAM;AACnB,SAAK,eAAe,OAAO;AAC3B,SAAK,YAAY,OAAO;AAAA,EACzB;AAAA,EAEA,aAAqB;AACpB,UAAM,YAAY,KAAK,cAAc,SAAY,KAAK,IAAI,KAAK,SAAS;AACxE,WAAO,OAAO,SAAS,GAAG,KAAK,eAAe,oBAAoB,EAAE;AAAA,EACrE;AACD;AAUO,SAAS,KAAK,GAAyB,IAAgB,CAAC,GAAG;AACjE,QAAM,EAAE,MAAM,OAAO,IAAI,uBAAmC,GAAG,CAAC;AAChE,SAAO,IAAI,cAAc,MAAM,OAAO,gBAAgB,OAAO,OAAO,SAAS;AAC9E;","names":[]}
@@ -0,0 +1,9 @@
import type { LangChainCallbackHandler, LangChainOptions } from './types';
/**
* Creates a Sentry callback handler for LangChain
* Returns a plain object that LangChain will call via duck-typing
*
* This is a stateful handler that tracks spans across multiple LangChain executions.
*/
export declare function createLangChainCallbackHandler(options?: LangChainOptions): LangChainCallbackHandler;
//# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,23 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const FileAudio = createLucideIcon("FileAudio", [
["path", { d: "M17.5 22h.5a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v3", key: "rslqgf" }],
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
[
"path",
{
d: "M2 19a2 2 0 1 1 4 0v1a2 2 0 1 1-4 0v-4a6 6 0 0 1 12 0v4a2 2 0 1 1-4 0v-1a2 2 0 1 1 4 0",
key: "9f7x3i"
}
]
]);
export { FileAudio as default };
//# sourceMappingURL=file-audio.js.map
@@ -0,0 +1,26 @@
{
"name": "next-intl-swc-plugin-extractor",
"version": "4.8.2",
"sideEffects": false,
"author": "강동윤 <kdy1997.dev@gmail.com>",
"contributors": [
"Jan Amann <jan@amann.work>"
],
"description": "SWC plugin for extracting inline messages.",
"license": "MIT",
"homepage": "https://next-intl.dev",
"repository": {
"type": "git",
"url": "git+https://github.com/amannn/next-intl.git"
},
"scripts": {
"prepublishOnly": "turbo build",
"test": "cargo test --release",
"build": "cargo build --release --target wasm32-wasip1 --target-dir target"
},
"main": "target/wasm32-wasip1/release/swc_plugin_extractor.wasm",
"files": [
"target/wasm32-wasip1/release/swc_plugin_extractor.wasm"
],
"gitHead": "de4baeb465185133923b69c8da36457c9418d781"
}
@@ -0,0 +1,977 @@
import type * as checks from "./checks.js";
import type * as JSONSchema from "./json-schema.js";
import { $ZodRegistry, globalRegistry } from "./registries.js";
import type * as schemas from "./schemas.js";
import { getEnumValues } from "./util.js";
interface JSONSchemaGeneratorParams {
/** A registry used to look up metadata for each schema. Any schema with an `id` property will be extracted as a $def.
* @default globalRegistry */
metadata?: $ZodRegistry<Record<string, any>>;
/** The JSON Schema version to target.
* - `"draft-2020-12"` — Default. JSON Schema Draft 2020-12
* - `"draft-7"` — JSON Schema Draft 7 */
target?: "draft-7" | "draft-2020-12";
/** How to handle unrepresentable types.
* - `"throw"` — Default. Unrepresentable types throw an error
* - `"any"` — Unrepresentable types become `{}` */
unrepresentable?: "throw" | "any";
/** Arbitrary custom logic that can be used to modify the generated JSON Schema. */
override?: (ctx: {
zodSchema: schemas.$ZodTypes;
jsonSchema: JSONSchema.BaseSchema;
path: (string | number)[];
}) => void;
/** Whether to extract the `"input"` or `"output"` type. Relevant to transforms, Error converting schema to JSONz, defaults, coerced primitives, etc.
* - `"output"` — Default. Convert the output schema.
* - `"input"` — Convert the input schema. */
io?: "input" | "output";
}
interface ProcessParams {
schemaPath: schemas.$ZodType[];
path: (string | number)[];
}
interface EmitParams {
/** How to handle cycles.
* - `"ref"` — Default. Cycles will be broken using $defs
* - `"throw"` — Cycles will throw an error if encountered */
cycles?: "ref" | "throw";
/* How to handle reused schemas.
* - `"inline"` — Default. Reused schemas will be inlined
* - `"ref"` — Reused schemas will be extracted as $defs */
reused?: "ref" | "inline";
external?:
| {
/** */
registry: $ZodRegistry<{ id?: string | undefined }>;
uri?: ((id: string) => string) | undefined;
defs: Record<string, JSONSchema.BaseSchema>;
}
| undefined;
}
interface Seen {
/** JSON Schema result for this Zod schema */
schema: JSONSchema.BaseSchema;
/** A cached version of the schema that doesn't get overwritten during ref resolution */
def?: JSONSchema.BaseSchema;
defId?: string | undefined;
/** Number of times this schema was encountered during traversal */
count: number;
/** Cycle path */
cycle?: (string | number)[] | undefined;
isParent?: boolean | undefined;
ref?: schemas.$ZodType | undefined | null;
/** JSON Schema property path for this schema */
path?: (string | number)[] | undefined;
}
export class JSONSchemaGenerator {
metadataRegistry: $ZodRegistry<Record<string, any>>;
target: "draft-7" | "draft-2020-12";
unrepresentable: "throw" | "any";
override: (ctx: {
zodSchema: schemas.$ZodTypes;
jsonSchema: JSONSchema.BaseSchema;
path: (string | number)[];
}) => void;
io: "input" | "output";
counter = 0;
seen: Map<schemas.$ZodType, Seen>;
constructor(params?: JSONSchemaGeneratorParams) {
this.metadataRegistry = params?.metadata ?? globalRegistry;
this.target = params?.target ?? "draft-2020-12";
this.unrepresentable = params?.unrepresentable ?? "throw";
this.override = params?.override ?? (() => {});
this.io = params?.io ?? "output";
this.seen = new Map();
}
process(schema: schemas.$ZodType, _params: ProcessParams = { path: [], schemaPath: [] }): JSONSchema.BaseSchema {
const def = (schema as schemas.$ZodTypes)._zod.def;
const formatMap: Partial<Record<checks.$ZodStringFormats, string | undefined>> = {
guid: "uuid",
url: "uri",
datetime: "date-time",
json_string: "json-string",
regex: "", // do not set
};
// check for schema in seens
const seen = this.seen.get(schema);
if (seen) {
seen.count++;
// check if cycle
const isCycle = _params.schemaPath.includes(schema);
if (isCycle) {
seen.cycle = _params.path;
}
return seen.schema;
}
// initialize
const result: Seen = { schema: {}, count: 1, cycle: undefined, path: _params.path };
this.seen.set(schema, result);
// custom method overrides default behavior
const overrideSchema = schema._zod.toJSONSchema?.();
if (overrideSchema) {
result.schema = overrideSchema as any;
} else {
const params = {
..._params,
schemaPath: [..._params.schemaPath, schema],
path: _params.path,
};
const parent = schema._zod.parent;
if (parent) {
// schema was cloned from another schema
result.ref = parent;
this.process(parent, params);
this.seen.get(parent)!.isParent = true;
} else {
const _json = result.schema;
switch (def.type) {
case "string": {
const json: JSONSchema.StringSchema = _json as any;
json.type = "string";
const { minimum, maximum, format, patterns, contentEncoding } = schema._zod
.bag as schemas.$ZodStringInternals<unknown>["bag"];
if (typeof minimum === "number") json.minLength = minimum;
if (typeof maximum === "number") json.maxLength = maximum;
// custom pattern overrides format
if (format) {
json.format = formatMap[format as checks.$ZodStringFormats] ?? format;
if (json.format === "") delete json.format; // empty format is not valid
}
if (contentEncoding) json.contentEncoding = contentEncoding;
if (patterns && patterns.size > 0) {
const regexes = [...patterns];
if (regexes.length === 1) json.pattern = regexes[0]!.source;
else if (regexes.length > 1) {
result.schema.allOf = [
...regexes.map((regex) => ({
...(this.target === "draft-7" ? ({ type: "string" } as const) : {}),
pattern: regex.source,
})),
];
}
}
break;
}
case "number": {
const json: JSONSchema.NumberSchema | JSONSchema.IntegerSchema = _json as any;
const { minimum, maximum, format, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag;
if (typeof format === "string" && format.includes("int")) json.type = "integer";
else json.type = "number";
if (typeof exclusiveMinimum === "number") json.exclusiveMinimum = exclusiveMinimum;
if (typeof minimum === "number") {
json.minimum = minimum;
if (typeof exclusiveMinimum === "number") {
if (exclusiveMinimum >= minimum) delete json.minimum;
else delete json.exclusiveMinimum;
}
}
if (typeof exclusiveMaximum === "number") json.exclusiveMaximum = exclusiveMaximum;
if (typeof maximum === "number") {
json.maximum = maximum;
if (typeof exclusiveMaximum === "number") {
if (exclusiveMaximum <= maximum) delete json.maximum;
else delete json.exclusiveMaximum;
}
}
if (typeof multipleOf === "number") json.multipleOf = multipleOf;
break;
}
case "boolean": {
const json = _json as JSONSchema.BooleanSchema;
json.type = "boolean";
break;
}
case "bigint": {
if (this.unrepresentable === "throw") {
throw new Error("BigInt cannot be represented in JSON Schema");
}
break;
}
case "symbol": {
if (this.unrepresentable === "throw") {
throw new Error("Symbols cannot be represented in JSON Schema");
}
break;
}
case "null": {
_json.type = "null";
break;
}
case "any": {
break;
}
case "unknown": {
break;
}
case "undefined": {
if (this.unrepresentable === "throw") {
throw new Error("Undefined cannot be represented in JSON Schema");
}
break;
}
case "void": {
if (this.unrepresentable === "throw") {
throw new Error("Void cannot be represented in JSON Schema");
}
break;
}
case "never": {
_json.not = {};
break;
}
case "date": {
if (this.unrepresentable === "throw") {
throw new Error("Date cannot be represented in JSON Schema");
}
break;
}
case "array": {
const json: JSONSchema.ArraySchema = _json as any;
const { minimum, maximum } = schema._zod.bag;
if (typeof minimum === "number") json.minItems = minimum;
if (typeof maximum === "number") json.maxItems = maximum;
json.type = "array";
json.items = this.process(def.element, { ...params, path: [...params.path, "items"] });
break;
}
case "object": {
const json: JSONSchema.ObjectSchema = _json as any;
json.type = "object";
json.properties = {};
const shape = def.shape; // params.shapeCache.get(schema)!;
for (const key in shape) {
json.properties[key] = this.process(shape[key]!, {
...params,
path: [...params.path, "properties", key],
});
}
// required keys
const allKeys = new Set(Object.keys(shape));
// const optionalKeys = new Set(def.optional);
const requiredKeys = new Set(
[...allKeys].filter((key) => {
const v = def.shape[key]!._zod;
if (this.io === "input") {
return v.optin === undefined;
} else {
return v.optout === undefined;
}
})
);
if (requiredKeys.size > 0) {
json.required = Array.from(requiredKeys);
}
// catchall
if (def.catchall?._zod.def.type === "never") {
// strict
json.additionalProperties = false;
} else if (!def.catchall) {
// regular
if (this.io === "output") json.additionalProperties = false;
} else if (def.catchall) {
json.additionalProperties = this.process(def.catchall, {
...params,
path: [...params.path, "additionalProperties"],
});
}
break;
}
case "union": {
const json: JSONSchema.BaseSchema = _json as any;
json.anyOf = def.options.map((x, i) =>
this.process(x, {
...params,
path: [...params.path, "anyOf", i],
})
);
break;
}
case "intersection": {
const json: JSONSchema.BaseSchema = _json as any;
const a = this.process(def.left, {
...params,
path: [...params.path, "allOf", 0],
});
const b = this.process(def.right, {
...params,
path: [...params.path, "allOf", 1],
});
const isSimpleIntersection = (val: any) => "allOf" in val && Object.keys(val).length === 1;
const allOf = [
...(isSimpleIntersection(a) ? (a.allOf as any[]) : [a]),
...(isSimpleIntersection(b) ? (b.allOf as any[]) : [b]),
];
json.allOf = allOf;
break;
}
case "tuple": {
const json: JSONSchema.ArraySchema = _json as any;
json.type = "array";
const prefixItems = def.items.map((x, i) =>
this.process(x, { ...params, path: [...params.path, "prefixItems", i] })
);
if (this.target === "draft-2020-12") {
json.prefixItems = prefixItems;
} else {
json.items = prefixItems;
}
if (def.rest) {
const rest = this.process(def.rest, {
...params,
path: [...params.path, "items"],
});
if (this.target === "draft-2020-12") {
json.items = rest;
} else {
json.additionalItems = rest;
}
}
// additionalItems
if (def.rest) {
json.items = this.process(def.rest, {
...params,
path: [...params.path, "items"],
});
}
// length
const { minimum, maximum } = schema._zod.bag as {
minimum?: number;
maximum?: number;
};
if (typeof minimum === "number") json.minItems = minimum;
if (typeof maximum === "number") json.maxItems = maximum;
break;
}
case "record": {
const json: JSONSchema.ObjectSchema = _json as any;
json.type = "object";
json.propertyNames = this.process(def.keyType, { ...params, path: [...params.path, "propertyNames"] });
json.additionalProperties = this.process(def.valueType, {
...params,
path: [...params.path, "additionalProperties"],
});
break;
}
case "map": {
if (this.unrepresentable === "throw") {
throw new Error("Map cannot be represented in JSON Schema");
}
break;
}
case "set": {
if (this.unrepresentable === "throw") {
throw new Error("Set cannot be represented in JSON Schema");
}
break;
}
case "enum": {
const json: JSONSchema.BaseSchema = _json as any;
const values = getEnumValues(def.entries);
// Number enums can have both string and number values
if (values.every((v) => typeof v === "number")) json.type = "number";
if (values.every((v) => typeof v === "string")) json.type = "string";
json.enum = values;
break;
}
case "literal": {
const json: JSONSchema.BaseSchema = _json as any;
const vals: (string | number | boolean | null)[] = [];
for (const val of def.values) {
if (val === undefined) {
if (this.unrepresentable === "throw") {
throw new Error("Literal `undefined` cannot be represented in JSON Schema");
} else {
// do not add to vals
}
} else if (typeof val === "bigint") {
if (this.unrepresentable === "throw") {
throw new Error("BigInt literals cannot be represented in JSON Schema");
} else {
vals.push(Number(val));
}
} else {
vals.push(val);
}
}
if (vals.length === 0) {
// do nothing (an undefined literal was stripped)
} else if (vals.length === 1) {
const val = vals[0]!;
json.type = val === null ? ("null" as const) : (typeof val as any);
json.const = val;
} else {
if (vals.every((v) => typeof v === "number")) json.type = "number";
if (vals.every((v) => typeof v === "string")) json.type = "string";
if (vals.every((v) => typeof v === "boolean")) json.type = "string";
if (vals.every((v) => v === null)) json.type = "null";
json.enum = vals;
}
break;
}
case "file": {
const json: JSONSchema.StringSchema = _json as any;
const file: JSONSchema.StringSchema = {
type: "string",
format: "binary",
contentEncoding: "binary",
};
const { minimum, maximum, mime } = schema._zod.bag as schemas.$ZodFileInternals["bag"];
if (minimum !== undefined) file.minLength = minimum;
if (maximum !== undefined) file.maxLength = maximum;
if (mime) {
if (mime.length === 1) {
file.contentMediaType = mime[0]!;
Object.assign(json, file);
} else {
json.anyOf = mime.map((m) => {
const mFile: JSONSchema.StringSchema = { ...file, contentMediaType: m };
return mFile;
});
}
} else {
Object.assign(json, file);
}
// if (this.unrepresentable === "throw") {
// throw new Error("File cannot be represented in JSON Schema");
// }
break;
}
case "transform": {
if (this.unrepresentable === "throw") {
throw new Error("Transforms cannot be represented in JSON Schema");
}
break;
}
case "nullable": {
const inner = this.process(def.innerType, params);
_json.anyOf = [inner, { type: "null" }];
break;
}
case "nonoptional": {
this.process(def.innerType, params);
result.ref = def.innerType;
break;
}
case "success": {
const json = _json as JSONSchema.BooleanSchema;
json.type = "boolean";
break;
}
case "default": {
this.process(def.innerType, params);
result.ref = def.innerType;
_json.default = JSON.parse(JSON.stringify(def.defaultValue));
break;
}
case "prefault": {
this.process(def.innerType, params);
result.ref = def.innerType;
if (this.io === "input") _json._prefault = JSON.parse(JSON.stringify(def.defaultValue));
break;
}
case "catch": {
// use conditionals
this.process(def.innerType, params);
result.ref = def.innerType;
let catchValue: any;
try {
catchValue = def.catchValue(undefined as any);
} catch {
throw new Error("Dynamic catch values are not supported in JSON Schema");
}
_json.default = catchValue;
break;
}
case "nan": {
if (this.unrepresentable === "throw") {
throw new Error("NaN cannot be represented in JSON Schema");
}
break;
}
case "template_literal": {
const json = _json as JSONSchema.StringSchema;
const pattern = schema._zod.pattern;
if (!pattern) throw new Error("Pattern not found in template literal");
json.type = "string";
json.pattern = pattern.source;
break;
}
case "pipe": {
const innerType = this.io === "input" ? (def.in._zod.def.type === "transform" ? def.out : def.in) : def.out;
this.process(innerType, params);
result.ref = innerType;
break;
}
case "readonly": {
this.process(def.innerType, params);
result.ref = def.innerType;
_json.readOnly = true;
break;
}
// passthrough types
case "promise": {
this.process(def.innerType, params);
result.ref = def.innerType;
break;
}
case "optional": {
this.process(def.innerType, params);
result.ref = def.innerType;
break;
}
case "lazy": {
const innerType = (schema as schemas.$ZodLazy)._zod.innerType;
this.process(innerType, params);
result.ref = innerType;
break;
}
case "custom": {
if (this.unrepresentable === "throw") {
throw new Error("Custom types cannot be represented in JSON Schema");
}
break;
}
default: {
def satisfies never;
}
}
}
}
// metadata
const meta = this.metadataRegistry.get(schema);
if (meta) Object.assign(result.schema, meta);
if (this.io === "input" && isTransforming(schema)) {
// examples/defaults only apply to output type of pipe
delete result.schema.examples;
delete result.schema.default;
}
// set prefault as default
if (this.io === "input" && result.schema._prefault) result.schema.default ??= result.schema._prefault;
delete result.schema._prefault;
// pulling fresh from this.seen in case it was overwritten
const _result = this.seen.get(schema)!;
return _result.schema;
}
emit(schema: schemas.$ZodType, _params?: EmitParams): JSONSchema.BaseSchema {
const params = {
cycles: _params?.cycles ?? "ref",
reused: _params?.reused ?? "inline",
// unrepresentable: _params?.unrepresentable ?? "throw",
// uri: _params?.uri ?? ((id) => `${id}`),
external: _params?.external ?? undefined,
} satisfies EmitParams;
// iterate over seen map;
const root = this.seen.get(schema);
if (!root) throw new Error("Unprocessed schema. This is a bug in Zod.");
// initialize result with root schema fields
// Object.assign(result, seen.cached);
// returns a ref to the schema
// defId will be empty if the ref points to an external schema (or #)
const makeURI = (entry: [schemas.$ZodType<unknown, unknown>, Seen]): { ref: string; defId?: string } => {
// comparing the seen objects because sometimes
// multiple schemas map to the same seen object.
// e.g. lazy
// external is configured
const defsSegment = this.target === "draft-2020-12" ? "$defs" : "definitions";
if (params.external) {
const externalId = params.external.registry.get(entry[0])?.id; // ?? "__shared";// `__schema${this.counter++}`;
// check if schema is in the external registry
const uriGenerator = params.external.uri ?? ((id) => id);
if (externalId) {
return { ref: uriGenerator(externalId) };
}
// otherwise, add to __shared
const id: string = entry[1].defId ?? (entry[1].schema.id as string) ?? `schema${this.counter++}`;
entry[1].defId = id; // set defId so it will be reused if needed
return { defId: id, ref: `${uriGenerator("__shared")}#/${defsSegment}/${id}` };
}
if (entry[1] === root) {
return { ref: "#" };
}
// self-contained schema
const uriPrefix = `#`;
const defUriPrefix = `${uriPrefix}/${defsSegment}/`;
const defId = entry[1].schema.id ?? `__schema${this.counter++}`;
return { defId, ref: defUriPrefix + defId };
};
// stored cached version in `def` property
// remove all properties, set $ref
const extractToDef = (entry: [schemas.$ZodType<unknown, unknown>, Seen]): void => {
// if the schema is already a reference, do not extract it
if (entry[1].schema.$ref) {
return;
}
const seen = entry[1];
const { ref, defId } = makeURI(entry);
seen.def = { ...seen.schema };
// defId won't be set if the schema is a reference to an external schema
if (defId) seen.defId = defId;
// wipe away all properties except $ref
const schema = seen.schema;
for (const key in schema) {
delete schema[key];
}
schema.$ref = ref;
};
// throw on cycles
// break cycles
if (params.cycles === "throw") {
for (const entry of this.seen.entries()) {
const seen = entry[1];
if (seen.cycle) {
throw new Error(
"Cycle detected: " +
`#/${seen.cycle?.join("/")}/<root>` +
'\n\nSet the `cycles` parameter to `"ref"` to resolve cyclical schemas with defs.'
);
}
}
}
// extract schemas into $defs
for (const entry of this.seen.entries()) {
const seen = entry[1];
// convert root schema to # $ref
if (schema === entry[0]) {
extractToDef(entry); // this has special handling for the root schema
continue;
}
// extract schemas that are in the external registry
if (params.external) {
const ext = params.external.registry.get(entry[0])?.id;
if (schema !== entry[0] && ext) {
extractToDef(entry);
continue;
}
}
// extract schemas with `id` meta
const id = this.metadataRegistry.get(entry[0])?.id;
if (id) {
extractToDef(entry);
continue;
}
// break cycles
if (seen.cycle) {
// any
extractToDef(entry);
continue;
}
// extract reused schemas
if (seen.count > 1) {
if (params.reused === "ref") {
extractToDef(entry);
// biome-ignore lint:
continue;
}
}
}
// flatten _refs
const flattenRef = (zodSchema: schemas.$ZodType, params: Pick<ToJSONSchemaParams, "target">) => {
const seen = this.seen.get(zodSchema)!;
const schema = seen.def ?? seen.schema;
const _cached = { ...schema };
// already seen
if (seen.ref === null) {
return;
}
// flatten ref if defined
const ref = seen.ref;
seen.ref = null; // prevent recursion
if (ref) {
flattenRef(ref, params);
// merge referenced schema into current
const refSchema = this.seen.get(ref)!.schema;
if (refSchema.$ref && params.target === "draft-7") {
schema.allOf = schema.allOf ?? [];
schema.allOf.push(refSchema);
} else {
Object.assign(schema, refSchema);
Object.assign(schema, _cached); // prevent overwriting any fields in the original schema
}
}
// execute overrides
if (!seen.isParent)
this.override({
zodSchema: zodSchema as schemas.$ZodTypes,
jsonSchema: schema,
path: seen.path ?? [],
});
};
for (const entry of [...this.seen.entries()].reverse()) {
flattenRef(entry[0], { target: this.target });
}
const result: JSONSchema.BaseSchema = {};
if (this.target === "draft-2020-12") {
result.$schema = "https://json-schema.org/draft/2020-12/schema";
} else if (this.target === "draft-7") {
result.$schema = "http://json-schema.org/draft-07/schema#";
} else {
console.warn(`Invalid target: ${this.target}`);
}
if (params.external?.uri) {
const id = params.external.registry.get(schema)?.id;
if (!id) throw new Error("Schema is missing an `id` property");
result.$id = params.external.uri(id);
}
Object.assign(result, root.def);
// build defs object
const defs: JSONSchema.BaseSchema["$defs"] = params.external?.defs ?? {};
for (const entry of this.seen.entries()) {
const seen = entry[1];
if (seen.def && seen.defId) {
defs[seen.defId] = seen.def;
}
}
// set definitions in result
if (params.external) {
} else {
if (Object.keys(defs).length > 0) {
if (this.target === "draft-2020-12") {
result.$defs = defs;
} else {
result.definitions = defs;
}
}
}
try {
// this "finalizes" this schema and ensures all cycles are removed
// each call to .emit() is functionally independent
// though the seen map is shared
return JSON.parse(JSON.stringify(result));
} catch (_err) {
throw new Error("Error converting schema to JSON.");
}
}
}
interface ToJSONSchemaParams extends Omit<JSONSchemaGeneratorParams & EmitParams, "external"> {}
interface RegistryToJSONSchemaParams extends Omit<JSONSchemaGeneratorParams & EmitParams, "external"> {
uri?: (id: string) => string;
}
export function toJSONSchema(schema: schemas.$ZodType, _params?: ToJSONSchemaParams): JSONSchema.BaseSchema;
export function toJSONSchema(
registry: $ZodRegistry<{ id?: string | undefined }>,
_params?: RegistryToJSONSchemaParams
): { schemas: Record<string, JSONSchema.BaseSchema> };
export function toJSONSchema(
input: schemas.$ZodType | $ZodRegistry<{ id?: string | undefined }>,
_params?: ToJSONSchemaParams
): any {
if (input instanceof $ZodRegistry) {
const gen = new JSONSchemaGenerator(_params);
const defs: any = {};
for (const entry of input._idmap.entries()) {
const [_, schema] = entry;
gen.process(schema);
}
const schemas: Record<string, JSONSchema.BaseSchema> = {};
const external = {
registry: input,
uri: (_params as RegistryToJSONSchemaParams)?.uri,
defs,
};
for (const entry of input._idmap.entries()) {
const [key, schema] = entry;
schemas[key] = gen.emit(schema, {
..._params,
external,
});
}
if (Object.keys(defs).length > 0) {
const defsSegment = gen.target === "draft-2020-12" ? "$defs" : "definitions";
schemas.__shared = {
[defsSegment]: defs,
};
}
return { schemas };
}
const gen = new JSONSchemaGenerator(_params);
gen.process(input);
return gen.emit(input, _params);
}
function isTransforming(
_schema: schemas.$ZodType,
_ctx?: {
seen: Set<schemas.$ZodType>;
}
): boolean {
const ctx = _ctx ?? { seen: new Set() };
if (ctx.seen.has(_schema)) return false;
ctx.seen.add(_schema);
const schema = _schema as schemas.$ZodTypes;
const def = schema._zod.def;
switch (def.type) {
case "string":
case "number":
case "bigint":
case "boolean":
case "date":
case "symbol":
case "undefined":
case "null":
case "any":
case "unknown":
case "never":
case "void":
case "literal":
case "enum":
case "nan":
case "file":
case "template_literal":
return false;
case "array": {
return isTransforming(def.element, ctx);
}
case "object": {
for (const key in def.shape) {
if (isTransforming(def.shape[key]!, ctx)) return true;
}
return false;
}
case "union": {
for (const option of def.options) {
if (isTransforming(option, ctx)) return true;
}
return false;
}
case "intersection": {
return isTransforming(def.left, ctx) || isTransforming(def.right, ctx);
}
case "tuple": {
for (const item of def.items) {
if (isTransforming(item, ctx)) return true;
}
if (def.rest && isTransforming(def.rest, ctx)) return true;
return false;
}
case "record": {
return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx);
}
case "map": {
return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx);
}
case "set": {
return isTransforming(def.valueType, ctx);
}
// inner types
case "promise":
case "optional":
case "nonoptional":
case "nullable":
case "readonly":
return isTransforming(def.innerType, ctx);
case "lazy":
return isTransforming(def.getter(), ctx);
case "default": {
return isTransforming(def.innerType, ctx);
}
case "prefault": {
return isTransforming(def.innerType, ctx);
}
case "custom": {
return false;
}
case "transform": {
return true;
}
case "pipe": {
return isTransforming(def.in, ctx) || isTransforming(def.out, ctx);
}
case "success": {
return false;
}
case "catch": {
return false;
}
default:
def satisfies never;
}
throw new Error(`Unknown schema type: ${(def as any).type}`);
}
@@ -0,0 +1 @@
{"version":3,"sources":["../../src/utilities/applyLocaleFiltering.ts"],"sourcesContent":["import type { ClientConfig } from '../config/client.js'\nimport type { SanitizedConfig } from '../config/types.js'\nimport type { PayloadRequest } from '../types/index.js'\n\nexport async function applyLocaleFiltering({\n clientConfig,\n config,\n req,\n}: {\n clientConfig: ClientConfig\n config: SanitizedConfig\n req: PayloadRequest\n}): Promise<void> {\n if (\n !clientConfig.localization ||\n !config.localization ||\n typeof config.localization.filterAvailableLocales !== 'function'\n ) {\n return\n }\n\n const filteredLocales = (\n await config.localization.filterAvailableLocales({\n locales: config.localization.locales,\n req,\n })\n ).map(({ toString, ...rest }) => rest)\n\n clientConfig.localization.localeCodes = filteredLocales.map(({ code }) => code)\n clientConfig.localization.locales = filteredLocales\n}\n"],"names":["applyLocaleFiltering","clientConfig","config","req","localization","filterAvailableLocales","filteredLocales","locales","map","toString","rest","localeCodes","code"],"mappings":"AAIA,OAAO,eAAeA,qBAAqB,EACzCC,YAAY,EACZC,MAAM,EACNC,GAAG,EAKJ;IACC,IACE,CAACF,aAAaG,YAAY,IAC1B,CAACF,OAAOE,YAAY,IACpB,OAAOF,OAAOE,YAAY,CAACC,sBAAsB,KAAK,YACtD;QACA;IACF;IAEA,MAAMC,kBAAkB,AACtB,CAAA,MAAMJ,OAAOE,YAAY,CAACC,sBAAsB,CAAC;QAC/CE,SAASL,OAAOE,YAAY,CAACG,OAAO;QACpCJ;IACF,EAAC,EACDK,GAAG,CAAC,CAAC,EAAEC,QAAQ,EAAE,GAAGC,MAAM,GAAKA;IAEjCT,aAAaG,YAAY,CAACO,WAAW,GAAGL,gBAAgBE,GAAG,CAAC,CAAC,EAAEI,IAAI,EAAE,GAAKA;IAC1EX,aAAaG,YAAY,CAACG,OAAO,GAAGD;AACtC"}
@@ -0,0 +1,73 @@
import { filenameIsInApp } from './node-stack-trace.js';
import { UNKNOWN_FUNCTION } from './stacktrace.js';
/**
* A node.js watchdog timer
* @param pollInterval The interval that we expect to get polled at
* @param anrThreshold The threshold for when we consider ANR
* @param callback The callback to call for ANR
* @returns An object with `poll` and `enabled` functions {@link WatchdogReturn}
*/
function watchdogTimer(
createTimer,
pollInterval,
anrThreshold,
callback,
) {
const timer = createTimer();
let triggered = false;
let enabled = true;
setInterval(() => {
const diffMs = timer.getTimeMs();
if (triggered === false && diffMs > pollInterval + anrThreshold) {
triggered = true;
if (enabled) {
callback();
}
}
if (diffMs < pollInterval + anrThreshold) {
triggered = false;
}
}, 20);
return {
poll: () => {
timer.reset();
},
enabled: (state) => {
enabled = state;
},
};
}
// types copied from inspector.d.ts
/**
* Converts Debugger.CallFrame to Sentry StackFrame
*/
function callFrameToStackFrame(
frame,
url,
getModuleFromFilename,
) {
const filename = url ? url.replace(/^file:\/\//, '') : undefined;
// CallFrame row/col are 0 based, whereas StackFrame are 1 based
const colno = frame.location.columnNumber ? frame.location.columnNumber + 1 : undefined;
const lineno = frame.location.lineNumber ? frame.location.lineNumber + 1 : undefined;
return {
filename,
module: getModuleFromFilename(filename),
function: frame.functionName || UNKNOWN_FUNCTION,
colno,
lineno,
in_app: filename ? filenameIsInApp(filename) : undefined,
};
}
export { callFrameToStackFrame, watchdogTimer };
//# sourceMappingURL=anr.js.map
@@ -0,0 +1,5 @@
export declare const endOfQuarterWithOptions: import("./types.js").FPFn2<
Date,
import("../endOfQuarter.js").EndOfQuarterOptions<Date> | undefined,
import("../fp.js").DateArg<Date>
>;
@@ -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 SeparatorVertical = createLucideIcon("SeparatorVertical", [
["line", { x1: "12", x2: "12", y1: "3", y2: "21", key: "1efggb" }],
["polyline", { points: "8 8 4 12 8 16", key: "bnfmv4" }],
["polyline", { points: "16 16 20 12 16 8", key: "u90052" }]
]);
export { SeparatorVertical as default };
//# sourceMappingURL=separator-vertical.js.map
@@ -0,0 +1,12 @@
'use strict'
const pino = require('./pino')
const { once } = require('node:events')
module.exports = async function (opts = {}) {
const destOpts = Object.assign({}, opts, { dest: opts.destination || 1, sync: false })
delete destOpts.destination
const destination = pino.destination(destOpts)
await once(destination, 'ready')
return destination
}
@@ -0,0 +1 @@
{"version":3,"names":["getAssignmentIdentifiers","node","search","concat","ids","Object","create","length","id","pop","type","push","elements","left","properties","value","argument","operator","name"],"sources":["../../src/retrievers/getAssignmentIdentifiers.ts"],"sourcesContent":["import type * as t from \"../index.ts\";\n\n/**\n * For the given node, generate a map from assignment id names to the identifier node.\n * Unlike getBindingIdentifiers, this function does not handle declarations and imports.\n * @param node the assignment expression or forXstatement\n * @returns an object map\n * @see getBindingIdentifiers\n */\nexport default function getAssignmentIdentifiers(\n node: t.Node | t.Node[],\n): Record<string, t.Identifier> {\n // null represents holes in an array pattern\n const search: (t.Node | null)[] = [].concat(node);\n const ids = Object.create(null);\n\n while (search.length) {\n const id = search.pop();\n if (!id) continue;\n\n switch (id.type) {\n case \"ArrayPattern\":\n search.push(...id.elements);\n break;\n\n case \"AssignmentExpression\":\n case \"AssignmentPattern\":\n case \"ForInStatement\":\n case \"ForOfStatement\":\n search.push(id.left);\n break;\n\n case \"ObjectPattern\":\n search.push(...id.properties);\n break;\n\n case \"ObjectProperty\":\n search.push(id.value);\n break;\n\n case \"RestElement\":\n case \"UpdateExpression\":\n search.push(id.argument);\n break;\n\n case \"UnaryExpression\":\n if (id.operator === \"delete\") {\n search.push(id.argument);\n }\n break;\n\n case \"Identifier\":\n ids[id.name] = id;\n break;\n\n default:\n break;\n }\n }\n\n return ids;\n}\n"],"mappings":";;;;;;AASe,SAASA,wBAAwBA,CAC9CC,IAAuB,EACO;EAE9B,MAAMC,MAAyB,GAAG,EAAE,CAACC,MAAM,CAACF,IAAI,CAAC;EACjD,MAAMG,GAAG,GAAGC,MAAM,CAACC,MAAM,CAAC,IAAI,CAAC;EAE/B,OAAOJ,MAAM,CAACK,MAAM,EAAE;IACpB,MAAMC,EAAE,GAAGN,MAAM,CAACO,GAAG,CAAC,CAAC;IACvB,IAAI,CAACD,EAAE,EAAE;IAET,QAAQA,EAAE,CAACE,IAAI;MACb,KAAK,cAAc;QACjBR,MAAM,CAACS,IAAI,CAAC,GAAGH,EAAE,CAACI,QAAQ,CAAC;QAC3B;MAEF,KAAK,sBAAsB;MAC3B,KAAK,mBAAmB;MACxB,KAAK,gBAAgB;MACrB,KAAK,gBAAgB;QACnBV,MAAM,CAACS,IAAI,CAACH,EAAE,CAACK,IAAI,CAAC;QACpB;MAEF,KAAK,eAAe;QAClBX,MAAM,CAACS,IAAI,CAAC,GAAGH,EAAE,CAACM,UAAU,CAAC;QAC7B;MAEF,KAAK,gBAAgB;QACnBZ,MAAM,CAACS,IAAI,CAACH,EAAE,CAACO,KAAK,CAAC;QACrB;MAEF,KAAK,aAAa;MAClB,KAAK,kBAAkB;QACrBb,MAAM,CAACS,IAAI,CAACH,EAAE,CAACQ,QAAQ,CAAC;QACxB;MAEF,KAAK,iBAAiB;QACpB,IAAIR,EAAE,CAACS,QAAQ,KAAK,QAAQ,EAAE;UAC5Bf,MAAM,CAACS,IAAI,CAACH,EAAE,CAACQ,QAAQ,CAAC;QAC1B;QACA;MAEF,KAAK,YAAY;QACfZ,GAAG,CAACI,EAAE,CAACU,IAAI,CAAC,GAAGV,EAAE;QACjB;MAEF;QACE;IACJ;EACF;EAEA,OAAOJ,GAAG;AACZ","ignoreList":[]}
@@ -0,0 +1,51 @@
# real-require
[![Package Version](https://img.shields.io/npm/v/real-require.svg)](https://npm.im/real-require)
[![Dependency Status](https://img.shields.io/librariesio/release/npm/real-require)](https://libraries.io/npm/real-require)
[![Build](https://github.com/pinojs/real-require/workflows/CI/badge.svg)](https://github.com/pinojs/real-require/actions?query=workflow%3ACI)
Keep require and import consistent after bundling or transpiling.
## Installation
Just run:
```bash
npm install real-require
```
## Usage
The package provides two drop-ins functions, `realRequire` and `realImport`, which can be used in scenarios where tools like transpilers or bundlers change the native `require` or `await import` calls.
The current `realRequire` functions only handles webpack at the moment, wrapping the `__non_webpack__require__` implementation that webpack provides for the final bundle.
### Example
```js
// After bundling, real-require will be embedded in the bundle
const { realImport, realRequire } = require('real-require')
/*
By using realRequire, at build time the module will not be embedded and at runtime it will try to load path from the local filesytem.
This is useful in situations where the build tool does not support skipping modules to embed.
*/
const { join } = realRequire('path')
async function main() {
// Similarly, this make sure the import call is not modified by the build tools
const localFunction = await realImport('./source.js')
localFunction()
}
main().catch(console.error)
```
## Contributing
See [CONTRIBUTING.md](./CONTRIBUTING.md)
## License
Copyright Paolo Insogna and real-require contributors 2021. Licensed under the [MIT License](http://www.apache.org/licenses/MIT).
@@ -0,0 +1,86 @@
[![NPM version](https://badge.fury.io/js/cssfilter.png)](http://badge.fury.io/js/xss)
[![Build Status](https://secure.travis-ci.org/leizongmin/js-css-filter.png?branch=master)](http://travis-ci.org/leizongmin/js-css-filter)
[![Dependencies Status](https://david-dm.org/leizongmin/js-css-filter.png)](https://david-dm.org/leizongmin/js-css-filter)
[![coveralls-image](https://img.shields.io/coveralls/leizongmin/js-css-filter.svg?style=flat-square)](https://coveralls.io/r/leizongmin/js-css-filter?branch=master)
# cssfilter
Sanitize untrusted CSS with a configuration specified by a Whitelist. 根据白名单过滤CSS
## 安装
```bash
$ npm install cssfilter --save
```
## 使用方法
```javascript
var cssfilter = require('cssfilter');
var css = cssfilter('position:fixed; /* this is comments */ width:100px; height:100px; background:#aaa;');
console.log(css);
// 输出:width:100px; height:100px; background:#aaa;
// 因为position不在白名单允许范围
```
或者:
```javascript
options = {
// 白名单,可选
whiteList: {
a: true, // true表示允许
b: /^fixed|relative$/, // 正则test()返回true表示允许
c: function (value) {
// 返回true表示允许
},
d: false // 除以上三个以外,所有值均表示不允许
},
// 当匹配到一个在白名单中的属性时
onAttr: function (name, value, options) {
// name为属性名
// value为属性值
// 返回字符串表示覆盖此段CSS
// 不返回任何值表示使用默认生成方法,即 name:value
},
// 当匹配到一个不在白名单中的属性时
onIgnoreAttr: function (name, value, options) {
// name为属性名
// value为属性值
// 返回字符串表示覆盖此段CSS
// 不返回任何值表示使用默认生成方法,即将此段CSS去掉
}
};
mycss = new cssfilter.FilterCSS(options);
// then apply mycss.process()
css = mycss.process('position:fixed; width:100px; height:100px; background:#aaa;');
console.log(css);
```
## License
```
The MIT License (MIT)
Copyright (c) 2015-2016 Zongmin Lei(雷宗民) <leizongmin@gmail.com>
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.
```
@@ -0,0 +1,10 @@
{
"main": "dist/emotion-react-jsx-runtime.cjs.js",
"module": "dist/emotion-react-jsx-runtime.esm.js",
"umd:main": "dist/emotion-react-jsx-runtime.umd.min.js",
"types": "dist/emotion-react-jsx-runtime.cjs.d.ts",
"sideEffects": false,
"preconstruct": {
"umdName": "emotionReactJSXRuntime"
}
}
@@ -0,0 +1,19 @@
/**
* @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 CassetteTape = createLucideIcon("CassetteTape", [
["rect", { width: "20", height: "16", x: "2", y: "4", rx: "2", key: "18n3k1" }],
["circle", { cx: "8", cy: "10", r: "2", key: "1xl4ub" }],
["path", { d: "M8 12h8", key: "1wcyev" }],
["circle", { cx: "16", cy: "10", r: "2", key: "r14t7q" }],
["path", { d: "m6 20 .7-2.9A1.4 1.4 0 0 1 8.1 16h7.8a1.4 1.4 0 0 1 1.4 1l.7 3", key: "l01ucn" }]
]);
export { CassetteTape as default };
//# sourceMappingURL=cassette-tape.js.map
@@ -0,0 +1,25 @@
import { getRouteWithoutAdmin } from './getRouteWithoutAdmin.js';
// Routes that require admin authentication
const publicAdminRoutes = ['createFirstUser', 'forgot', 'login', 'logout', 'forgot', 'inactivity', 'unauthorized', 'reset'];
export const isPublicAdminRoute = ({
adminRoute,
config,
route
}) => {
const isPublicAdminRoute = publicAdminRoutes.some(routeSegment => {
const segment = config.admin?.routes?.[routeSegment] || routeSegment;
const routeWithoutAdmin = getRouteWithoutAdmin({
adminRoute,
route
});
if (routeWithoutAdmin.startsWith(segment)) {
return true;
} else if (routeWithoutAdmin.includes('/verify/')) {
return true;
} else {
return false;
}
});
return isPublicAdminRoute;
};
//# sourceMappingURL=isPublicAdminRoute.js.map
@@ -0,0 +1,64 @@
import { sql } from 'drizzle-orm';
import { fetchAndResave } from './fetchAndResave/index.js';
export const migrateRelationships = async ({ adapter, collectionSlug, db, debug, fields, globalSlug, isVersions, pathsToQuery, payload, req, tableName })=>{
if (pathsToQuery.size === 0) {
return;
}
let offset = 0;
let paginationResult;
const schemaName = adapter.pgSchema.schemaName ?? 'public';
const where = Array.from(pathsToQuery).reduce((statement, path, i)=>{
return statement += `
"${schemaName}"."${tableName}${adapter.relationshipsSuffix}"."path" LIKE '${path}'${pathsToQuery.size !== i + 1 ? ' OR' : ''}
`;
}, '');
while(typeof paginationResult === 'undefined' || paginationResult.rows.length > 0){
const paginationStatement = `SELECT DISTINCT parent_id FROM "${schemaName}"."${tableName}${adapter.relationshipsSuffix}" WHERE
${where} ORDER BY parent_id LIMIT 500 OFFSET ${offset * 500};
`;
paginationResult = await db.execute(sql.raw(`${paginationStatement}`));
if (paginationResult.rows.length === 0) {
return;
}
offset += 1;
const statement = `SELECT * FROM "${schemaName}"."${tableName}${adapter.relationshipsSuffix}" WHERE
(${where}) AND parent_id IN (${paginationResult.rows.map((row)=>`'${row.parent_id}'`).join(', ')});
`;
if (debug) {
payload.logger.info('FINDING ROWS TO MIGRATE');
payload.logger.info(statement);
}
const result = await db.execute(sql.raw(`${statement}`));
const docsToResave = {};
result.rows.forEach((row)=>{
const parentID = row.parent_id;
if (typeof parentID === 'string' || typeof parentID === 'number') {
if (!docsToResave[parentID]) {
docsToResave[parentID] = [];
}
docsToResave[parentID].push(row);
}
});
await fetchAndResave({
adapter,
collectionSlug,
db,
debug,
docsToResave,
fields,
globalSlug,
isVersions,
payload,
req,
tableName
});
}
const deleteStatement = `DELETE FROM "${schemaName}"."${tableName}${adapter.relationshipsSuffix}" WHERE ${where}`;
if (debug) {
payload.logger.info('DELETING ROWS');
payload.logger.info(deleteStatement);
}
await db.execute(sql.raw(`${deleteStatement}`));
};
//# sourceMappingURL=migrateRelationships.js.map
@@ -0,0 +1,8 @@
import type { QueryPreset } from 'payload';
import './index.scss';
export declare function QueryPresetToggler({ activePreset, openPresetListDrawer, resetPreset, }: {
activePreset: QueryPreset;
openPresetListDrawer: () => void;
resetPreset: () => Promise<void>;
}): import("react").JSX.Element;
//# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,21 @@
import { notFound } from 'next/navigation.js';
import { renderListView } from '../List/index.js';
export const TrashView = async args => {
try {
const {
List: TrashList
} = await renderListView({
...args,
enableRowSelections: true,
trash: true,
viewType: 'trash'
});
return TrashList;
} catch (error) {
if (error.message === 'not-found') {
notFound();
}
console.error(error); // eslint-disable-line no-console
}
};
//# sourceMappingURL=index.js.map
@@ -0,0 +1,37 @@
@import '../../scss/styles.scss';
@layer payload-default {
.field-type.email {
position: relative;
input {
@include formInput;
}
&.error {
input {
background-color: var(--theme-error-200);
}
}
}
html[data-theme='light'] {
.field-type.email {
&.error {
input {
@include lightInputError;
}
}
}
}
html[data-theme='dark'] {
.field-type.email {
&.error {
input {
@include darkInputError;
}
}
}
}
}
@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/tracing/google-genai/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAiB,MAAM,cAAc,CAAC;AAKtE,eAAO,MAAM,qBAAqB;;CAGjC,CAAC;AAWF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,eAAO,MAAM,sBAAsB,kFAA6C,CAAC"}
@@ -0,0 +1,2 @@
export * from './client';
//# sourceMappingURL=index.client.d.ts.map
@@ -0,0 +1,54 @@
var createWrap = require('./_createWrap');
/** Used to compose bitmasks for function metadata. */
var WRAP_CURRY_RIGHT_FLAG = 16;
/**
* This method is like `_.curry` except that arguments are applied to `func`
* in the manner of `_.partialRight` instead of `_.partial`.
*
* The `_.curryRight.placeholder` value, which defaults to `_` in monolithic
* builds, may be used as a placeholder for provided arguments.
*
* **Note:** This method doesn't set the "length" property of curried functions.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Function
* @param {Function} func The function to curry.
* @param {number} [arity=func.length] The arity of `func`.
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
* @returns {Function} Returns the new curried function.
* @example
*
* var abc = function(a, b, c) {
* return [a, b, c];
* };
*
* var curried = _.curryRight(abc);
*
* curried(3)(2)(1);
* // => [1, 2, 3]
*
* curried(2, 3)(1);
* // => [1, 2, 3]
*
* curried(1, 2, 3);
* // => [1, 2, 3]
*
* // Curried with placeholders.
* curried(3)(1, _)(2);
* // => [1, 2, 3]
*/
function curryRight(func, arity, guard) {
arity = guard ? undefined : arity;
var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
result.placeholder = curryRight.placeholder;
return result;
}
// Assign default placeholders.
curryRight.placeholder = {};
module.exports = curryRight;
@@ -0,0 +1,91 @@
{
"name": "@opentelemetry/resources",
"version": "2.5.1",
"description": "OpenTelemetry SDK resources",
"main": "build/src/index.js",
"module": "build/esm/index.js",
"esnext": "build/esnext/index.js",
"browser": {
"./src/detectors/platform/index.ts": "./src/detectors/platform/browser/index.ts",
"./build/esm/detectors/platform/index.js": "./build/esm/detectors/platform/browser/index.js",
"./build/esnext/detectors/platform/index.js": "./build/esnext/detectors/platform/browser/index.js",
"./build/src/detectors/platform/index.js": "./build/src/detectors/platform/browser/index.js"
},
"types": "build/src/index.d.ts",
"repository": "open-telemetry/opentelemetry-js",
"scripts": {
"prepublishOnly": "npm run compile",
"compile": "tsc --build tsconfig.json tsconfig.esm.json tsconfig.esnext.json",
"clean": "tsc --build --clean tsconfig.json tsconfig.esm.json tsconfig.esnext.json",
"lint": "eslint . --ext .ts",
"lint:fix": "eslint . --ext .ts --fix",
"test": "nyc mocha 'test/**/*.test.ts'",
"test:browser": "karma start --single-run",
"test:webworker": "karma start karma.worker.js --single-run",
"tdd": "npm run test -- --watch-extensions ts --watch",
"version": "node ../../scripts/version-update.js",
"prewatch": "npm run precompile",
"peer-api-check": "node ../../scripts/peer-api-check.js",
"align-api-deps": "node ../../scripts/align-api-deps.js"
},
"keywords": [
"opentelemetry",
"nodejs",
"resources",
"stats",
"profiling"
],
"author": "OpenTelemetry Authors",
"license": "Apache-2.0",
"engines": {
"node": "^18.19.0 || >=20.6.0"
},
"files": [
"build/esm/**/*.js",
"build/esm/**/*.js.map",
"build/esm/**/*.d.ts",
"build/esnext/**/*.js",
"build/esnext/**/*.js.map",
"build/esnext/**/*.d.ts",
"build/src/**/*.js",
"build/src/**/*.js.map",
"build/src/**/*.d.ts",
"doc",
"LICENSE",
"README.md"
],
"publishConfig": {
"access": "public"
},
"devDependencies": {
"@opentelemetry/api": ">=1.3.0 <1.10.0",
"@types/mocha": "10.0.10",
"@types/node": "18.19.130",
"@types/sinon": "17.0.4",
"@types/webpack-env": "1.16.3",
"karma": "6.4.4",
"karma-chrome-launcher": "3.1.0",
"karma-coverage": "2.2.1",
"karma-mocha": "2.0.1",
"karma-mocha-webworker": "1.3.0",
"karma-spec-reporter": "0.0.36",
"karma-webpack": "5.0.1",
"mocha": "11.7.5",
"nock": "13.5.6",
"nyc": "17.1.0",
"sinon": "18.0.1",
"typescript": "5.0.4",
"webpack": "5.104.1",
"webpack-cli": "6.0.1"
},
"peerDependencies": {
"@opentelemetry/api": ">=1.3.0 <1.10.0"
},
"dependencies": {
"@opentelemetry/core": "2.5.1",
"@opentelemetry/semantic-conventions": "^1.29.0"
},
"homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-resources",
"sideEffects": false,
"gitHead": "ad92be4c2c1094745a85b0b7eeff1444a11b1b4a"
}
@@ -0,0 +1,56 @@
var castPath = require('./_castPath'),
isFunction = require('./isFunction'),
toKey = require('./_toKey');
/**
* This method is like `_.get` except that if the resolved value is a
* function it's invoked with the `this` binding of its parent object and
* its result is returned.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Object
* @param {Object} object The object to query.
* @param {Array|string} path The path of the property to resolve.
* @param {*} [defaultValue] The value returned for `undefined` resolved values.
* @returns {*} Returns the resolved value.
* @example
*
* var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };
*
* _.result(object, 'a[0].b.c1');
* // => 3
*
* _.result(object, 'a[0].b.c2');
* // => 4
*
* _.result(object, 'a[0].b.c3', 'default');
* // => 'default'
*
* _.result(object, 'a[0].b.c3', _.constant('default'));
* // => 'default'
*/
function result(object, path, defaultValue) {
path = castPath(path, object);
var index = -1,
length = path.length;
// Ensure the loop is entered when path is empty.
if (!length) {
length = 1;
object = undefined;
}
while (++index < length) {
var value = object == null ? undefined : object[toKey(path[index])];
if (value === undefined) {
index = length;
value = defaultValue;
}
object = isFunction(value) ? value.call(object) : value;
}
return object;
}
module.exports = result;
@@ -0,0 +1,21 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
import * as modDev from './LexicalLink.dev.mjs';
import * as modProd from './LexicalLink.prod.mjs';
const mod = process.env.NODE_ENV !== 'production' ? modDev : modProd;
export const $createAutoLinkNode = mod.$createAutoLinkNode;
export const $createLinkNode = mod.$createLinkNode;
export const $isAutoLinkNode = mod.$isAutoLinkNode;
export const $isLinkNode = mod.$isLinkNode;
export const $toggleLink = mod.$toggleLink;
export const AutoLinkNode = mod.AutoLinkNode;
export const LinkNode = mod.LinkNode;
export const TOGGLE_LINK_COMMAND = mod.TOGGLE_LINK_COMMAND;
export const formatUrl = mod.formatUrl;
export const toggleLink = mod.toggleLink;
@@ -0,0 +1,73 @@
import { applySdkMetadata, hasSpansEnabled } from '@sentry/core';
import { init as init$1, validateOpenTelemetrySetup, getDefaultIntegrations as getDefaultIntegrations$1 } from '@sentry/node-core';
import { httpIntegration } from '../integrations/http.js';
import { nativeNodeFetchIntegration } from '../integrations/node-fetch.js';
import { getAutoPerformanceIntegrations } from '../integrations/tracing/index.js';
import { initOpenTelemetry } from './initOtel.js';
/**
* Get default integrations, excluding performance.
*/
function getDefaultIntegrationsWithoutPerformance() {
const nodeCoreIntegrations = getDefaultIntegrations$1();
// Filter out the node-core HTTP and NodeFetch integrations and replace them with Node SDK's composite versions
return nodeCoreIntegrations
.filter(integration => integration.name !== 'Http' && integration.name !== 'NodeFetch')
.concat(httpIntegration(), nativeNodeFetchIntegration());
}
/** Get the default integrations for the Node SDK. */
function getDefaultIntegrations(options) {
return [
...getDefaultIntegrationsWithoutPerformance(),
// We only add performance integrations if tracing is enabled
// Note that this means that without tracing enabled, e.g. `expressIntegration()` will not be added
// This means that generally request isolation will work (because that is done by httpIntegration)
// But `transactionName` will not be set automatically
...(hasSpansEnabled(options) ? getAutoPerformanceIntegrations() : []),
];
}
/**
* Initialize Sentry for Node.
*/
function init(options = {}) {
return _init(options, getDefaultIntegrations);
}
/**
* Internal initialization function.
*/
function _init(
options = {},
getDefaultIntegrationsImpl,
) {
applySdkMetadata(options, 'node');
const client = init$1({
...options,
// Only use Node SDK defaults if none provided
defaultIntegrations: options.defaultIntegrations ?? getDefaultIntegrationsImpl(options),
});
// Add Node SDK specific OpenTelemetry setup
if (client && !options.skipOpenTelemetrySetup) {
initOpenTelemetry(client, {
spanProcessors: options.openTelemetrySpanProcessors,
});
validateOpenTelemetrySetup();
}
return client;
}
/**
* Initialize Sentry for Node, without any integrations added by default.
*/
function initWithoutDefaultIntegrations(options = {}) {
return _init(options, () => []);
}
export { getDefaultIntegrations, getDefaultIntegrationsWithoutPerformance, init, initWithoutDefaultIntegrations };
//# sourceMappingURL=index.js.map

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