fix(products): fix breadcrumbs and product filtering (backport from main)
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled

This commit is contained in:
2026-02-24 16:04:21 +01:00
parent 915eb61613
commit 5397309103
43805 changed files with 4324295 additions and 3 deletions

View File

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

View File

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

View File

@@ -0,0 +1,6 @@
export { adjustScale } from './adjustScale';
export { getRectDelta } from './getRectDelta';
export { getAdjustedRect } from './rectAdjustment';
export { getClientRect, getTransformAgnosticClientRect } from './getRect';
export { getWindowClientRect } from './getWindowClientRect';
export { Rect } from './Rect';

View File

@@ -0,0 +1,39 @@
{
"name": "@babel/types",
"version": "7.29.0",
"description": "Babel Types is a Lodash-esque utility library for AST nodes",
"author": "The Babel Team (https://babel.dev/team)",
"homepage": "https://babel.dev/docs/en/next/babel-types",
"bugs": "https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20types%22+is%3Aopen",
"license": "MIT",
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "https://github.com/babel/babel.git",
"directory": "packages/babel-types"
},
"main": "./lib/index.js",
"dependencies": {
"@babel/helper-string-parser": "^7.27.1",
"@babel/helper-validator-identifier": "^7.28.5"
},
"devDependencies": {
"@babel/generator": "^7.29.0",
"@babel/helper-fixtures": "^7.28.6",
"@babel/parser": "^7.29.0"
},
"engines": {
"node": ">=6.9.0"
},
"type": "commonjs",
"types": "./lib/index-legacy.d.ts",
"typesVersions": {
">=4.1": {
"lib/index-legacy.d.ts": [
"lib/index.d.ts"
]
}
}
}

View File

@@ -0,0 +1,47 @@
# to-no-case [![Build Status](https://travis-ci.org/ianstormtaylor/to-no-case.svg?branch=master)](https://travis-ci.org/ianstormtaylor/to-no-case)
Remove any existing casing from a string. Part of the series of [case helpers](https://github.com/ianstormtaylor/to-case).
## Installation
```
$ npm install to-no-case
```
## Example
```js
var toNoCase = require('to-no-case')
toNoCase('camelCase') // "camel case"
toNoCase('snake_case') // "snake case"
toNoCase('slug-case') // "slug case"
toNoCase('Title of Case') // "title of case"
toNoCase('Sentence case.') // "sentence case."
toNoCase('RAnDom -jUNk$__loL!') // "random -junk$__lol!"
```
If you specifically want to receive `space case` strings as the output, without any other odd characters, check out [`to-space-case`](https://github.com/ianstormtaylor/to-space-case) instead. Or one of the other [case helpers](https://github.com/ianstormtaylor/to-case).
## API
### toNoCase(string)
Returns the `string` with any existing casing removed.
## License
The MIT License (MIT)
Copyright © 2016, Ian Storm Taylor
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@@ -0,0 +1,13 @@
// Source: https://www.unicode.org/cldr/charts/32/summary/gu.html
const formatRelativeLocale = {
lastWeek: "'પાછલા' eeee p", // CLDR #1384
yesterday: "'ગઈકાલે' p", // CLDR #1409
today: "'આજે' p", // CLDR #1410
tomorrow: "'આવતીકાલે' p", // CLDR #1411
nextWeek: "eeee p", // CLDR #1386
other: "P",
};
export const formatRelative = (token, _date, _baseDate, _options) =>
formatRelativeLocale[token];

View File

@@ -0,0 +1,22 @@
'use strict'
const replace = String.prototype.replace
const percentTwenties = /%20/g
const Format = {
RFC1738: 'RFC1738',
RFC3986: 'RFC3986',
}
export const formatters = {
RFC1738: function (value) {
return replace.call(value, percentTwenties, '+')
},
RFC3986: function (value) {
return String(value)
},
}
export const RFC1738 = Format.RFC1738
export const RFC3986 = Format.RFC3986
export default Format.RFC3986

View File

@@ -0,0 +1,115 @@
import { getSanitizedUrlStringFromUrlObject, parseStringToURLObject } from '@sentry/core';
const HeaderKeys = {
FORWARDED_PROTO: 'x-forwarded-proto',
FORWARDED_HOST: 'x-forwarded-host',
HOST: 'host',
REFERER: 'referer',
} ;
/**
* Replaces route parameters in a path template with their values
* @param path - The path template containing parameters in [paramName] format
* @param params - Optional route parameters to replace in the template
* @returns The path with parameters replaced
*/
function substituteRouteParams(path, params) {
return path;
}
/**
* Normalizes a path by removing route groups
* @param path - The path to normalize
* @returns The normalized path
*/
function sanitizeRoutePath(path) {
const cleanedSegments = path
.split('/')
.filter(segment => segment && !(segment.startsWith('(') && segment.endsWith(')')));
return cleanedSegments.length > 0 ? `/${cleanedSegments.join('/')}` : '/';
}
/**
* Constructs a full URL from the component route, parameters, and headers.
*
* @param componentRoute - The route template to construct the URL from
* @param params - Optional route parameters to replace in the template
* @param headersDict - Optional headers containing protocol and host information
* @param pathname - Optional pathname coming from parent span "http.target"
* @returns A sanitized URL string
*/
function buildUrlFromComponentRoute(
componentRoute,
params,
headersDict,
pathname,
) {
const parameterizedPath = substituteRouteParams(componentRoute);
// If available, the pathname from the http.target of the HTTP request server span takes precedence over the parameterized path.
// Spans such as generateMetadata and Server Component rendering are typically direct children of that span.
const path = pathname ?? sanitizeRoutePath(parameterizedPath);
const protocol = headersDict?.[HeaderKeys.FORWARDED_PROTO];
const host = headersDict?.[HeaderKeys.FORWARDED_HOST] || headersDict?.[HeaderKeys.HOST];
if (!protocol || !host) {
return path;
}
const fullUrl = `${protocol}://${host}${path}`;
const urlObject = parseStringToURLObject(fullUrl);
if (!urlObject) {
return path;
}
return getSanitizedUrlStringFromUrlObject(urlObject);
}
/**
* Returns a sanitized URL string from the referer header if it exists and is valid.
*
* @param headersDict - Optional headers containing the referer
* @returns A sanitized URL string or undefined if referer is missing/invalid
*/
function extractSanitizedUrlFromRefererHeader(headersDict) {
const referer = headersDict?.[HeaderKeys.REFERER];
if (!referer) {
return undefined;
}
try {
const refererUrl = new URL(referer);
return getSanitizedUrlStringFromUrlObject(refererUrl);
} catch {
return undefined;
}
}
/**
* Returns a sanitized URL string using the referer header if available,
* otherwise constructs the URL from the component route, params, and headers.
*
* @param componentRoute - The route template to construct the URL from
* @param params - Optional route parameters to replace in the template
* @param headersDict - Optional headers containing protocol, host, and referer
* @param pathname - Optional pathname coming from root span "http.target"
* @returns A sanitized URL string
*/
function getSanitizedRequestUrl(
componentRoute,
params,
headersDict,
pathname,
) {
const refererUrl = extractSanitizedUrlFromRefererHeader(headersDict);
if (refererUrl) {
return refererUrl;
}
return buildUrlFromComponentRoute(componentRoute, params, headersDict, pathname);
}
export { buildUrlFromComponentRoute, extractSanitizedUrlFromRefererHeader, getSanitizedRequestUrl, sanitizeRoutePath, substituteRouteParams };
//# sourceMappingURL=urls.js.map

View File

@@ -0,0 +1,20 @@
var toNumber = require('./toNumber');
/**
* Creates a function that performs a relational operation on two values.
*
* @private
* @param {Function} operator The function to perform the operation.
* @returns {Function} Returns the new relational operation function.
*/
function createRelationalOperation(operator) {
return function(value, other) {
if (!(typeof value == 'string' && typeof other == 'string')) {
value = toNumber(value);
other = toNumber(other);
}
return operator(value, other);
};
}
module.exports = createRelationalOperation;

View File

@@ -0,0 +1,130 @@
module.exports = function (glob, opts) {
if (typeof glob !== 'string') {
throw new TypeError('Expected a string');
}
var str = String(glob);
// The regexp we are building, as a string.
var reStr = "";
// Whether we are matching so called "extended" globs (like bash) and should
// support single character matching, matching ranges of characters, group
// matching, etc.
var extended = opts ? !!opts.extended : false;
// When globstar is _false_ (default), '/foo/*' is translated a regexp like
// '^\/foo\/.*$' which will match any string beginning with '/foo/'
// When globstar is _true_, '/foo/*' is translated to regexp like
// '^\/foo\/[^/]*$' which will match any string beginning with '/foo/' BUT
// which does not have a '/' to the right of it.
// E.g. with '/foo/*' these will match: '/foo/bar', '/foo/bar.txt' but
// these will not '/foo/bar/baz', '/foo/bar/baz.txt'
// Lastely, when globstar is _true_, '/foo/**' is equivelant to '/foo/*' when
// globstar is _false_
var globstar = opts ? !!opts.globstar : false;
// If we are doing extended matching, this boolean is true when we are inside
// a group (eg {*.html,*.js}), and false otherwise.
var inGroup = false;
// RegExp flags (eg "i" ) to pass in to RegExp constructor.
var flags = opts && typeof( opts.flags ) === "string" ? opts.flags : "";
var c;
for (var i = 0, len = str.length; i < len; i++) {
c = str[i];
switch (c) {
case "/":
case "$":
case "^":
case "+":
case ".":
case "(":
case ")":
case "=":
case "!":
case "|":
reStr += "\\" + c;
break;
case "?":
if (extended) {
reStr += ".";
break;
}
case "[":
case "]":
if (extended) {
reStr += c;
break;
}
case "{":
if (extended) {
inGroup = true;
reStr += "(";
break;
}
case "}":
if (extended) {
inGroup = false;
reStr += ")";
break;
}
case ",":
if (inGroup) {
reStr += "|";
break;
}
reStr += "\\" + c;
break;
case "*":
// Move over all consecutive "*"'s.
// Also store the previous and next characters
var prevChar = str[i - 1];
var starCount = 1;
while(str[i + 1] === "*") {
starCount++;
i++;
}
var nextChar = str[i + 1];
if (!globstar) {
// globstar is disabled, so treat any number of "*" as one
reStr += ".*";
} else {
// globstar is enabled, so determine if this is a globstar segment
var isGlobstar = starCount > 1 // multiple "*"'s
&& (prevChar === "/" || prevChar === undefined) // from the start of the segment
&& (nextChar === "/" || nextChar === undefined) // to the end of the segment
if (isGlobstar) {
// it's a globstar, so match zero or more path segments
reStr += "((?:[^/]*(?:\/|$))*)";
i++; // move over the "/"
} else {
// it's not a globstar, so only match one path segment
reStr += "([^/]*)";
}
}
break;
default:
reStr += c;
}
}
// When regexp 'g' flag is specified don't
// constrain the regular expression with ^ & $
if (!flags || !~flags.indexOf('g')) {
reStr = "^" + reStr + "$";
}
return new RegExp(reStr, flags);
};

View File

@@ -0,0 +1,89 @@
/**
* Find the package.json file, either from a TypeScript file somewhere not
* in a 'dist' folder, or a built and/or installed 'dist' folder.
*
* Note: this *only* works if you build your code into `'./dist'`, and that the
* source path does not also contain `'dist'`! If you don't build into
* `'./dist'`, or if you have files at `./src/dist/dist.ts`, then this will
* not work properly!
*
* The default `pathFromSrc` option assumes that the calling code lives one
* folder below the root of the package. Otherwise, it must be specified.
*
* Example:
*
* ```ts
* // src/index.ts
* import { findPackageJson } from 'package-json-from-dist'
*
* const pj = findPackageJson(import.meta.url)
* console.log(`package.json found at ${pj}`)
* ```
*
* If the caller is deeper within the project source, then you must provide
* the appropriate fallback path:
*
* ```ts
* // src/components/something.ts
* import { findPackageJson } from 'package-json-from-dist'
*
* const pj = findPackageJson(import.meta.url, '../../package.json')
* console.log(`package.json found at ${pj}`)
* ```
*
* When running from CommmonJS, use `__filename` instead of `import.meta.url`
*
* ```ts
* // src/index.cts
* import { findPackageJson } from 'package-json-from-dist'
*
* const pj = findPackageJson(__filename)
* console.log(`package.json found at ${pj}`)
* ```
*/
export declare const findPackageJson: (from: string | URL, pathFromSrc?: string) => string;
/**
* Load the package.json file, either from a TypeScript file somewhere not
* in a 'dist' folder, or a built and/or installed 'dist' folder.
*
* Note: this *only* works if you build your code into `'./dist'`, and that the
* source path does not also contain `'dist'`! If you don't build into
* `'./dist'`, or if you have files at `./src/dist/dist.ts`, then this will
* not work properly!
*
* The default `pathFromSrc` option assumes that the calling code lives one
* folder below the root of the package. Otherwise, it must be specified.
*
* Example:
*
* ```ts
* // src/index.ts
* import { loadPackageJson } from 'package-json-from-dist'
*
* const pj = loadPackageJson(import.meta.url)
* console.log(`Hello from ${pj.name}@${pj.version}`)
* ```
*
* If the caller is deeper within the project source, then you must provide
* the appropriate fallback path:
*
* ```ts
* // src/components/something.ts
* import { loadPackageJson } from 'package-json-from-dist'
*
* const pj = loadPackageJson(import.meta.url, '../../package.json')
* console.log(`Hello from ${pj.name}@${pj.version}`)
* ```
*
* When running from CommmonJS, use `__filename` instead of `import.meta.url`
*
* ```ts
* // src/index.cts
* import { loadPackageJson } from 'package-json-from-dist'
*
* const pj = loadPackageJson(__filename)
* console.log(`Hello from ${pj.name}@${pj.version}`)
* ```
*/
export declare const loadPackageJson: (from: string | URL, pathFromSrc?: string) => any;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,42 @@
import { consoleSandbox } from '@sentry/core';
import { NODE_MAJOR, NODE_MINOR } from '../nodeVersion.js';
/** Detect CommonJS. */
function isCjs() {
try {
return typeof module !== 'undefined' && typeof module.exports !== 'undefined';
} catch {
return false;
}
}
let hasWarnedAboutNodeVersion;
/**
* Check if the current Node.js version supports module.register
*/
function supportsEsmLoaderHooks() {
if (isCjs()) {
return false;
}
if (NODE_MAJOR >= 21 || (NODE_MAJOR === 20 && NODE_MINOR >= 6) || (NODE_MAJOR === 18 && NODE_MINOR >= 19)) {
return true;
}
if (!hasWarnedAboutNodeVersion) {
hasWarnedAboutNodeVersion = true;
consoleSandbox(() => {
// eslint-disable-next-line no-console
console.warn(
`[Sentry] You are using Node.js v${process.versions.node} in ESM mode ("import syntax"). The Sentry Node.js SDK is not compatible with ESM in Node.js versions before 18.19.0 or before 20.6.0. Please either build your application with CommonJS ("require() syntax"), or upgrade your Node.js version.`,
);
});
}
return false;
}
export { isCjs, supportsEsmLoaderHooks };
//# sourceMappingURL=detection.js.map

View File

@@ -0,0 +1,20 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const GitGraph = createLucideIcon("GitGraph", [
["circle", { cx: "5", cy: "6", r: "3", key: "1qnov2" }],
["path", { d: "M5 9v6", key: "158jrl" }],
["circle", { cx: "5", cy: "18", r: "3", key: "104gr9" }],
["path", { d: "M12 3v18", key: "108xh3" }],
["circle", { cx: "19", cy: "6", r: "3", key: "108a5v" }],
["path", { d: "M16 15.7A9 9 0 0 0 19 9", key: "1e3vqb" }]
]);
export { GitGraph as default };
//# sourceMappingURL=git-graph.js.map

View File

@@ -0,0 +1,88 @@
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.ConsoleSpanExporter = void 0;
const core_1 = require("@opentelemetry/core");
/**
* This is implementation of {@link SpanExporter} that prints spans to the
* console. This class can be used for diagnostic purposes.
*
* NOTE: This {@link SpanExporter} is intended for diagnostics use only, output rendered to the console may change at any time.
*/
/* eslint-disable no-console */
class ConsoleSpanExporter {
/**
* Export spans.
* @param spans
* @param resultCallback
*/
export(spans, resultCallback) {
return this._sendSpans(spans, resultCallback);
}
/**
* Shutdown the exporter.
*/
shutdown() {
this._sendSpans([]);
return this.forceFlush();
}
/**
* Exports any pending spans in exporter
*/
forceFlush() {
return Promise.resolve();
}
/**
* converts span info into more readable format
* @param span
*/
_exportInfo(span) {
return {
resource: {
attributes: span.resource.attributes,
},
instrumentationScope: span.instrumentationScope,
traceId: span.spanContext().traceId,
parentSpanContext: span.parentSpanContext,
traceState: span.spanContext().traceState?.serialize(),
name: span.name,
id: span.spanContext().spanId,
kind: span.kind,
timestamp: (0, core_1.hrTimeToMicroseconds)(span.startTime),
duration: (0, core_1.hrTimeToMicroseconds)(span.duration),
attributes: span.attributes,
status: span.status,
events: span.events,
links: span.links,
};
}
/**
* Showing spans in console
* @param spans
* @param done
*/
_sendSpans(spans, done) {
for (const span of spans) {
console.dir(this._exportInfo(span), { depth: 3 });
}
if (done) {
return done({ code: core_1.ExportResultCode.SUCCESS });
}
}
}
exports.ConsoleSpanExporter = ConsoleSpanExporter;
//# sourceMappingURL=ConsoleSpanExporter.js.map

View File

@@ -0,0 +1,103 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _usingCtx;
function _usingCtx() {
var _disposeSuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed) {
var err = new Error();
err.name = "SuppressedError";
err.error = error;
err.suppressed = suppressed;
return err;
},
empty = {},
stack = [];
function using(isAwait, value) {
if (value != null) {
if (Object(value) !== value) {
throw new TypeError("using declarations can only be used with objects, functions, null, or undefined.");
}
if (isAwait) {
var dispose = value[Symbol.asyncDispose || Symbol["for"]("Symbol.asyncDispose")];
}
if (dispose === undefined) {
dispose = value[Symbol.dispose || Symbol["for"]("Symbol.dispose")];
if (isAwait) {
var inner = dispose;
}
}
if (typeof dispose !== "function") {
throw new TypeError("Object is not disposable.");
}
if (inner) {
dispose = function () {
try {
inner.call(value);
} catch (e) {
return Promise.reject(e);
}
};
}
stack.push({
v: value,
d: dispose,
a: isAwait
});
} else if (isAwait) {
stack.push({
d: value,
a: isAwait
});
}
return value;
}
return {
e: empty,
u: using.bind(null, false),
a: using.bind(null, true),
d: function () {
var error = this.e,
state = 0,
resource;
function next() {
while (resource = stack.pop()) {
try {
if (!resource.a && state === 1) {
state = 0;
stack.push(resource);
return Promise.resolve().then(next);
}
if (resource.d) {
var disposalResult = resource.d.call(resource.v);
if (resource.a) {
state |= 2;
return Promise.resolve(disposalResult).then(next, err);
}
} else {
state |= 1;
}
} catch (e) {
return err(e);
}
}
if (state === 1) {
if (error !== empty) {
return Promise.reject(error);
} else {
return Promise.resolve();
}
}
if (error !== empty) throw error;
}
function err(e) {
error = error !== empty ? new _disposeSuppressedError(e, error) : e;
return next();
}
return next();
}
};
}
//# sourceMappingURL=usingCtx.js.map

View File

@@ -0,0 +1,26 @@
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true,
});
exports.concatAST = concatAST;
var _kinds = require('../language/kinds.js');
/**
* Provided a collection of ASTs, presumably each from different files,
* concatenate the ASTs together into batched AST, useful for validating many
* GraphQL source files which together represent one conceptual application.
*/
function concatAST(documents) {
const definitions = [];
for (const doc of documents) {
definitions.push(...doc.definitions);
}
return {
kind: _kinds.Kind.DOCUMENT,
definitions,
};
}

View File

@@ -0,0 +1,26 @@
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* Initializes an array clone.
*
* @private
* @param {Array} array The array to clone.
* @returns {Array} Returns the initialized clone.
*/
function initCloneArray(array) {
var length = array.length,
result = new array.constructor(length);
// Add properties assigned by `RegExp#exec`.
if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
result.index = array.index;
result.input = array.input;
}
return result;
}
module.exports = initCloneArray;

View File

@@ -0,0 +1,88 @@
import { useContext } from 'react';
import { isAnimationControls } from '../../animation/utils/is-animation-controls.mjs';
import { MotionContext } from '../../context/MotionContext/index.mjs';
import { PresenceContext } from '../../context/PresenceContext.mjs';
import { isControllingVariants, isVariantNode } from '../../render/utils/is-controlling-variants.mjs';
import { resolveVariantFromProps } from '../../render/utils/resolve-variants.mjs';
import { useConstant } from '../../utils/use-constant.mjs';
import { resolveMotionValue } from '../../value/utils/resolve-motion-value.mjs';
function makeState({ scrapeMotionValuesFromProps, createRenderState, onUpdate, }, props, context, presenceContext) {
const state = {
latestValues: makeLatestValues(props, context, presenceContext, scrapeMotionValuesFromProps),
renderState: createRenderState(),
};
if (onUpdate) {
/**
* onMount works without the VisualElement because it could be
* called before the VisualElement payload has been hydrated.
* (e.g. if someone is using m components <m.circle />)
*/
state.onMount = (instance) => onUpdate({ props, current: instance, ...state });
state.onUpdate = (visualElement) => onUpdate(visualElement);
}
return state;
}
const makeUseVisualState = (config) => (props, isStatic) => {
const context = useContext(MotionContext);
const presenceContext = useContext(PresenceContext);
const make = () => makeState(config, props, context, presenceContext);
return isStatic ? make() : useConstant(make);
};
function makeLatestValues(props, context, presenceContext, scrapeMotionValues) {
const values = {};
const motionValues = scrapeMotionValues(props, {});
for (const key in motionValues) {
values[key] = resolveMotionValue(motionValues[key]);
}
let { initial, animate } = props;
const isControllingVariants$1 = isControllingVariants(props);
const isVariantNode$1 = isVariantNode(props);
if (context &&
isVariantNode$1 &&
!isControllingVariants$1 &&
props.inherit !== false) {
if (initial === undefined)
initial = context.initial;
if (animate === undefined)
animate = context.animate;
}
let isInitialAnimationBlocked = presenceContext
? presenceContext.initial === false
: false;
isInitialAnimationBlocked = isInitialAnimationBlocked || initial === false;
const variantToSet = isInitialAnimationBlocked ? animate : initial;
if (variantToSet &&
typeof variantToSet !== "boolean" &&
!isAnimationControls(variantToSet)) {
const list = Array.isArray(variantToSet) ? variantToSet : [variantToSet];
for (let i = 0; i < list.length; i++) {
const resolved = resolveVariantFromProps(props, list[i]);
if (resolved) {
const { transitionEnd, transition, ...target } = resolved;
for (const key in target) {
let valueTarget = target[key];
if (Array.isArray(valueTarget)) {
/**
* Take final keyframe if the initial animation is blocked because
* we want to initialise at the end of that blocked animation.
*/
const index = isInitialAnimationBlocked
? valueTarget.length - 1
: 0;
valueTarget = valueTarget[index];
}
if (valueTarget !== null) {
values[key] = valueTarget;
}
}
for (const key in transitionEnd) {
values[key] = transitionEnd[key];
}
}
}
}
return values;
}
export { makeUseVisualState };

View File

@@ -0,0 +1,15 @@
/**
* @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 Play = createLucideIcon("Play", [
["polygon", { points: "6 3 20 12 6 21 6 3", key: "1oa8hb" }]
]);
export { Play as default };
//# sourceMappingURL=play.js.map

View File

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

View File

@@ -0,0 +1,29 @@
/**
* @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 Origami = createLucideIcon("Origami", [
["path", { d: "M12 12V4a1 1 0 0 1 1-1h6.297a1 1 0 0 1 .651 1.759l-4.696 4.025", key: "1bx4vc" }],
[
"path",
{
d: "m12 21-7.414-7.414A2 2 0 0 1 4 12.172V6.415a1.002 1.002 0 0 1 1.707-.707L20 20.009",
key: "1h3km6"
}
],
[
"path",
{
d: "m12.214 3.381 8.414 14.966a1 1 0 0 1-.167 1.199l-1.168 1.163a1 1 0 0 1-.706.291H6.351a1 1 0 0 1-.625-.219L3.25 18.8a1 1 0 0 1 .631-1.781l4.165.027",
key: "1hj4wg"
}
]
]);
export { Origami as default };
//# sourceMappingURL=origami.js.map

View File

@@ -0,0 +1,56 @@
'use client';
import { c as _c } from "react/compiler-runtime";
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { toWords, transformColumnsToSearchParams } from 'payload/shared';
import React from 'react';
import { FieldLabel } from '../../../../fields/FieldLabel/index.js';
import { useField } from '../../../../forms/useField/index.js';
import { Pill } from '../../../Pill/index.js';
import './index.scss';
export const QueryPresetsColumnField = t0 => {
const $ = _c(5);
const {
field: t1
} = t0;
const {
label,
required
} = t1;
const {
path,
value
} = useField();
let t2;
if ($[0] !== label || $[1] !== path || $[2] !== required || $[3] !== value) {
t2 = _jsxs("div", {
className: "field-type query-preset-columns-field",
children: [_jsx(FieldLabel, {
as: "h3",
label,
path,
required
}), _jsx("div", {
className: "value-wrapper",
children: value ? transformColumnsToSearchParams(value).map(_temp) : "No columns selected"
})]
});
$[0] = label;
$[1] = path;
$[2] = required;
$[3] = value;
$[4] = t2;
} else {
t2 = $[4];
}
return t2;
};
function _temp(column, i) {
const isColumnActive = !column.startsWith("-");
return _jsx(Pill, {
pillStyle: isColumnActive ? "always-white" : "light-gray",
size: "small",
children: toWords(column)
}, i);
}
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/utilities/ensureDirExists.ts"],"sourcesContent":["import fs from 'fs'\n\nexport function ensureDirectoryExists(directory: string) {\n try {\n if (!fs.existsSync(directory)) {\n fs.mkdirSync(directory, { recursive: true })\n }\n } catch (error) {\n const msg = error instanceof Error ? error.message : 'Unknown error'\n // eslint-disable-next-line no-console\n console.error(`Error creating directory '${directory}': ${msg}`)\n }\n}\n"],"names":["fs","ensureDirectoryExists","directory","existsSync","mkdirSync","recursive","error","msg","Error","message","console"],"mappings":"AAAA,OAAOA,QAAQ,KAAI;AAEnB,OAAO,SAASC,sBAAsBC,SAAiB;IACrD,IAAI;QACF,IAAI,CAACF,GAAGG,UAAU,CAACD,YAAY;YAC7BF,GAAGI,SAAS,CAACF,WAAW;gBAAEG,WAAW;YAAK;QAC5C;IACF,EAAE,OAAOC,OAAO;QACd,MAAMC,MAAMD,iBAAiBE,QAAQF,MAAMG,OAAO,GAAG;QACrD,sCAAsC;QACtCC,QAAQJ,KAAK,CAAC,CAAC,0BAA0B,EAAEJ,UAAU,GAAG,EAAEK,KAAK;IACjE;AACF"}

View File

@@ -0,0 +1,227 @@
"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 common_exports = {};
__export(common_exports, {
ExtraConfigColumn: () => ExtraConfigColumn,
IndexedColumn: () => IndexedColumn,
PgArray: () => PgArray,
PgArrayBuilder: () => PgArrayBuilder,
PgColumn: () => PgColumn,
PgColumnBuilder: () => PgColumnBuilder
});
module.exports = __toCommonJS(common_exports);
var import_column_builder = require("../../column-builder.cjs");
var import_column = require("../../column.cjs");
var import_entity = require("../../entity.cjs");
var import_foreign_keys = require("../foreign-keys.cjs");
var import_tracing_utils = require("../../tracing-utils.cjs");
var import_unique_constraint = require("../unique-constraint.cjs");
var import_array = require("../utils/array.cjs");
class PgColumnBuilder extends import_column_builder.ColumnBuilder {
foreignKeyConfigs = [];
static [import_entity.entityKind] = "PgColumnBuilder";
array(size) {
return new PgArrayBuilder(this.config.name, this, size);
}
references(ref, actions = {}) {
this.foreignKeyConfigs.push({ ref, actions });
return this;
}
unique(name, config) {
this.config.isUnique = true;
this.config.uniqueName = name;
this.config.uniqueType = config?.nulls;
return this;
}
generatedAlwaysAs(as) {
this.config.generated = {
as,
type: "always",
mode: "stored"
};
return this;
}
/** @internal */
buildForeignKeys(column, table) {
return this.foreignKeyConfigs.map(({ ref, actions }) => {
return (0, import_tracing_utils.iife)(
(ref2, actions2) => {
const builder = new import_foreign_keys.ForeignKeyBuilder(() => {
const foreignColumn = ref2();
return { columns: [column], foreignColumns: [foreignColumn] };
});
if (actions2.onUpdate) {
builder.onUpdate(actions2.onUpdate);
}
if (actions2.onDelete) {
builder.onDelete(actions2.onDelete);
}
return builder.build(table);
},
ref,
actions
);
});
}
/** @internal */
buildExtraConfigColumn(table) {
return new ExtraConfigColumn(table, this.config);
}
}
class PgColumn extends import_column.Column {
constructor(table, config) {
if (!config.uniqueName) {
config.uniqueName = (0, import_unique_constraint.uniqueKeyName)(table, [config.name]);
}
super(table, config);
this.table = table;
}
static [import_entity.entityKind] = "PgColumn";
}
class ExtraConfigColumn extends PgColumn {
static [import_entity.entityKind] = "ExtraConfigColumn";
getSQLType() {
return this.getSQLType();
}
indexConfig = {
order: this.config.order ?? "asc",
nulls: this.config.nulls ?? "last",
opClass: this.config.opClass
};
defaultConfig = {
order: "asc",
nulls: "last",
opClass: void 0
};
asc() {
this.indexConfig.order = "asc";
return this;
}
desc() {
this.indexConfig.order = "desc";
return this;
}
nullsFirst() {
this.indexConfig.nulls = "first";
return this;
}
nullsLast() {
this.indexConfig.nulls = "last";
return this;
}
/**
* ### PostgreSQL documentation quote
*
* > An operator class with optional parameters can be specified for each column of an index.
* The operator class identifies the operators to be used by the index for that column.
* For example, a B-tree index on four-byte integers would use the int4_ops class;
* this operator class includes comparison functions for four-byte integers.
* In practice the default operator class for the column's data type is usually sufficient.
* The main point of having operator classes is that for some data types, there could be more than one meaningful ordering.
* For example, we might want to sort a complex-number data type either by absolute value or by real part.
* We could do this by defining two operator classes for the data type and then selecting the proper class when creating an index.
* More information about operator classes check:
*
* ### Useful links
* https://www.postgresql.org/docs/current/sql-createindex.html
*
* https://www.postgresql.org/docs/current/indexes-opclass.html
*
* https://www.postgresql.org/docs/current/xindex.html
*
* ### Additional types
* If you have the `pg_vector` extension installed in your database, you can use the
* `vector_l2_ops`, `vector_ip_ops`, `vector_cosine_ops`, `vector_l1_ops`, `bit_hamming_ops`, `bit_jaccard_ops`, `halfvec_l2_ops`, `sparsevec_l2_ops` options, which are predefined types.
*
* **You can always specify any string you want in the operator class, in case Drizzle doesn't have it natively in its types**
*
* @param opClass
* @returns
*/
op(opClass) {
this.indexConfig.opClass = opClass;
return this;
}
}
class IndexedColumn {
static [import_entity.entityKind] = "IndexedColumn";
constructor(name, keyAsName, type, indexConfig) {
this.name = name;
this.keyAsName = keyAsName;
this.type = type;
this.indexConfig = indexConfig;
}
name;
keyAsName;
type;
indexConfig;
}
class PgArrayBuilder extends PgColumnBuilder {
static [import_entity.entityKind] = "PgArrayBuilder";
constructor(name, baseBuilder, size) {
super(name, "array", "PgArray");
this.config.baseBuilder = baseBuilder;
this.config.size = size;
}
/** @internal */
build(table) {
const baseColumn = this.config.baseBuilder.build(table);
return new PgArray(
table,
this.config,
baseColumn
);
}
}
class PgArray extends PgColumn {
constructor(table, config, baseColumn, range) {
super(table, config);
this.baseColumn = baseColumn;
this.range = range;
this.size = config.size;
}
size;
static [import_entity.entityKind] = "PgArray";
getSQLType() {
return `${this.baseColumn.getSQLType()}[${typeof this.size === "number" ? this.size : ""}]`;
}
mapFromDriverValue(value) {
if (typeof value === "string") {
value = (0, import_array.parsePgArray)(value);
}
return value.map((v) => this.baseColumn.mapFromDriverValue(v));
}
mapToDriverValue(value, isNestedArray = false) {
const a = value.map(
(v) => v === null ? null : (0, import_entity.is)(this.baseColumn, PgArray) ? this.baseColumn.mapToDriverValue(v, true) : this.baseColumn.mapToDriverValue(v)
);
if (isNestedArray) return a;
return (0, import_array.makePgArray)(a);
}
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
ExtraConfigColumn,
IndexedColumn,
PgArray,
PgArrayBuilder,
PgColumn,
PgColumnBuilder
});
//# sourceMappingURL=common.cjs.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/bun-sql/index.ts"],"sourcesContent":["export * from './driver.ts';\nexport * from './session.ts';\n"],"mappings":"AAAA,cAAc;AACd,cAAc;","names":[]}

View File

@@ -0,0 +1,4 @@
import type { CreateGlobalArgs } from 'payload';
import type { DrizzleAdapter } from './types.js';
export declare function createGlobal<T extends Record<string, unknown>>(this: DrizzleAdapter, { slug, data, req, returning }: CreateGlobalArgs): Promise<T>;
//# sourceMappingURL=createGlobal.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"timestamp.js","sourceRoot":"","sources":["../../lib/runtime/timestamp.ts"],"names":[],"mappings":";;AAAA,MAAM,YAAY,GAAG,OAAO,CAAA;AAC5B,MAAM,IAAI,GAAG,4BAA4B,CAAA;AACzC,MAAM,IAAI,GAAG,gEAAgE,CAAA;AAC7E,MAAM,IAAI,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAA;AAEhE,SAAwB,cAAc,CAAC,GAAW,EAAE,SAAkB;IACpE,iDAAiD;IACjD,MAAM,EAAE,GAAa,GAAG,CAAC,KAAK,CAAC,YAAY,CAAC,CAAA;IAC5C,OAAO,CACL,CAAC,EAAE,CAAC,MAAM,KAAK,CAAC,IAAI,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QACzD,CAAC,SAAS,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,IAAI,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CACnD,CAAA;AACH,CAAC;AAPD,iCAOC;AAED,SAAS,SAAS,CAAC,GAAW;IAC5B,MAAM,OAAO,GAAoB,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;IAC/C,IAAI,CAAC,OAAO;QAAE,OAAO,KAAK,CAAA;IAC1B,MAAM,CAAC,GAAW,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;IAC7B,MAAM,CAAC,GAAW,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;IAC7B,MAAM,CAAC,GAAW,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;IAC7B,OAAO,CACL,CAAC,IAAI,CAAC;QACN,CAAC,IAAI,EAAE;QACP,CAAC,IAAI,CAAC;QACN,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC;YACX,4DAA4D;YAC5D,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAC1E,CAAA;AACH,CAAC;AAED,SAAS,SAAS,CAAC,GAAW;IAC5B,MAAM,OAAO,GAAoB,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;IAC/C,IAAI,CAAC,OAAO;QAAE,OAAO,KAAK,CAAA;IAC1B,MAAM,EAAE,GAAW,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;IAC9B,MAAM,GAAG,GAAW,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;IAC/B,MAAM,GAAG,GAAW,CAAC,OAAO,CAAC,CAAC,CAAC,CAAA;IAC/B,MAAM,GAAG,GAAW,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAA;IACtC,MAAM,GAAG,GAAW,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAA;IACtC,OAAO,CACL,CAAC,EAAE,IAAI,EAAE,IAAI,GAAG,IAAI,EAAE,IAAI,GAAG,IAAI,EAAE,CAAC;QACpC,cAAc;QACd,CAAC,EAAE,GAAG,GAAG,KAAK,EAAE,IAAI,GAAG,GAAG,GAAG,KAAK,EAAE,IAAI,GAAG,KAAK,EAAE,CAAC,CACpD,CAAA;AACH,CAAC;AAED,cAAc,CAAC,IAAI,GAAG,+CAA+C,CAAA"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"formatOptions.d.ts","sourceRoot":"","sources":["../../src/utilities/formatOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAItD,eAAO,MAAM,aAAa,UAAW,UAAU,GAAG,WAAW,OAkB5D,CAAA"}

View File

@@ -0,0 +1,15 @@
The ISC License
Copyright (c) 2011-2022 Isaac Z. Schlueter, Ben Noordhuis, and Contributors
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

View File

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

View File

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

View File

@@ -0,0 +1,264 @@
import { KeyboardCode, KeyboardSensor, PointerSensor, useSensor, useSensors } from '@dnd-kit/core';
/**
* Get all droppable widget positions, filtering out overlapping "before" droppables
* and assigning row numbers based on Y position.
*/
function getDroppablePositions() {
const positionTolerance = 5;
const rowTolerance = 10;
const result = [];
let currentRow = 0;
let currentY = null;
const allDroppables = Array.from(document.querySelectorAll('.droppable-widget'));
for (let i = 0; i < allDroppables.length; i++) {
const element = allDroppables[i];
const rect = element.getBoundingClientRect();
// Skip hidden elements
if (rect.width === 0 || rect.height === 0) {
continue;
}
const centerX = rect.left + rect.width / 2;
const centerY = rect.top + rect.height / 2;
const testId = element.getAttribute('data-testid') || '';
const isBeforeDroppable = testId.endsWith('-before');
// Skip "before" droppables that overlap with another droppable
if (isBeforeDroppable) {
const hasOverlapping = allDroppables.some((other, otherIndex) => {
if (otherIndex === i) {
return false;
}
const otherRect = other.getBoundingClientRect();
const otherCenterX = otherRect.left + otherRect.width / 2;
const otherCenterY = otherRect.top + otherRect.height / 2;
return Math.abs(otherCenterX - centerX) < positionTolerance && Math.abs(otherCenterY - centerY) < positionTolerance;
});
if (hasOverlapping) {
continue;
}
}
// Assign row number based on Y position change
if (currentY === null) {
currentY = centerY;
} else if (Math.abs(centerY - currentY) >= rowTolerance) {
currentRow++;
currentY = centerY;
}
result.push({
centerX,
centerY,
element,
isBeforeDroppable,
rect,
row: currentRow
});
}
return result;
}
/**
* Find the row with the closest Y position to the given posY.
* Returns the row index, or null if no droppables exist.
*/
function findClosestRow(droppables, posY) {
if (droppables.length === 0) {
return null;
}
let closestRow = droppables[0].row;
let minYDistance = Infinity;
for (const droppable of droppables) {
const yDistance = Math.abs(droppable.centerY - posY);
if (yDistance < minYDistance) {
minYDistance = yDistance;
closestRow = droppable.row;
}
}
return closestRow;
}
/**
* Find the closest droppable within a specific row by X position.
* Returns the droppable and its index, or null if no droppables in that row.
*/
function findClosestDroppableInRow(droppables, rowIndex, posX) {
let closestIndex = -1;
let minXDistance = Infinity;
for (let i = 0; i < droppables.length; i++) {
const droppable = droppables[i];
if (droppable.row === rowIndex) {
const xDistance = Math.abs(droppable.centerX - posX);
if (xDistance < minXDistance) {
minXDistance = xDistance;
closestIndex = i;
}
}
}
if (closestIndex === -1) {
return null;
}
return {
droppable: droppables[closestIndex],
index: closestIndex
};
}
/**
* Find the target droppable based on direction
* - ArrowRight/Left: Next/previous in DOM order (now that overlapping droppables are filtered)
* - ArrowUp/Down: Closest in adjacent row (row +1 or -1) by X position
*/
function findTargetDroppable(droppables, currentCenterX, currentCenterY, direction) {
// Find the closest row, then the closest droppable in that row
const currentRow = findClosestRow(droppables, currentCenterY);
if (currentRow === null) {
return null;
}
const currentDroppable = findClosestDroppableInRow(droppables, currentRow, currentCenterX);
if (!currentDroppable) {
return null;
}
const {
index: currentIndex
} = currentDroppable;
switch (direction) {
case 'ArrowDown':
{
const targetRow = currentRow + 1;
return findClosestDroppableInRow(droppables, targetRow, currentCenterX)?.droppable || null;
}
case 'ArrowLeft':
// Previous in DOM order
return droppables[currentIndex - 1] || null;
case 'ArrowRight':
// Next in DOM order
return droppables[currentIndex + 1] || null;
case 'ArrowUp':
{
const targetRow = currentRow - 1;
return findClosestDroppableInRow(droppables, targetRow, currentCenterX)?.droppable || null;
}
default:
return null;
}
}
/**
* Custom coordinate getter that jumps directly to droppable positions
* instead of moving in pixel increments. This works better with scrolling
* and provides more predictable navigation.
*/
const droppableJumpKeyboardCoordinateGetter = (event, {
context,
currentCoordinates
}) => {
const {
collisionRect
} = context;
const {
code
} = event;
if (!collisionRect) {
return currentCoordinates;
}
// Only handle arrow keys
if (!['ArrowDown', 'ArrowLeft', 'ArrowRight', 'ArrowUp'].includes(code)) {
return currentCoordinates;
}
// Prevent default browser scroll behavior for arrow keys
event.preventDefault();
// Clear scrollableAncestors to prevent dnd-kit from scrolling instead of moving
// This must be done on every keydown because context is updated by dnd-kit
if (context.scrollableAncestors) {
context.scrollableAncestors.length = 0;
}
// Get all droppable widgets and their positions
const droppables = getDroppablePositions();
if (droppables.length === 0) {
return currentCoordinates;
}
// Current position center (viewport coordinates from collisionRect)
const currentCenterX = collisionRect.left + collisionRect.width / 2;
const currentCenterY = collisionRect.top + collisionRect.height / 2;
// Find the target droppable based on direction
const targetDroppable = findTargetDroppable(droppables, currentCenterX, currentCenterY, code);
// If we found a target, scroll if needed and calculate the delta
if (targetDroppable) {
const viewportHeight = window.innerHeight;
const targetRect = targetDroppable.rect;
const scrollPadding = 20 // Extra padding to ensure element is fully visible
;
// Check if target droppable is fully visible in viewport
const isAboveViewport = targetRect.top < scrollPadding;
const isBelowViewport = targetRect.bottom > viewportHeight - scrollPadding;
// Scroll to make target visible (using instant scroll for synchronous behavior)
if (isAboveViewport) {
const scrollAmount = targetRect.top - scrollPadding;
// don't use smooth scroll here, because it will mess up the delta calculation
window.scrollBy({
behavior: 'instant',
top: scrollAmount
});
} else if (isBelowViewport) {
const scrollAmount = targetRect.bottom - viewportHeight + scrollPadding;
window.scrollBy({
behavior: 'instant',
top: scrollAmount
});
}
// After scroll, recalculate target position (it may have changed due to scroll)
const newTargetRect = targetDroppable.element.getBoundingClientRect();
const newTargetCenterX = newTargetRect.left + newTargetRect.width / 2;
const newTargetCenterY = newTargetRect.top + newTargetRect.height / 2;
// Calculate delta using current overlay position (which didn't change) and new target position
const deltaX = newTargetCenterX - currentCenterX;
const deltaY = newTargetCenterY - currentCenterY;
// Add delta to currentCoordinates to position overlay's center at target's center
return {
x: currentCoordinates.x + deltaX,
y: currentCoordinates.y + deltaY
};
}
// No valid target found, stay in place
return currentCoordinates;
};
/**
* Custom KeyboardSensor that only activates when focus is directly on the
* draggable element, not on any of its descendants. This allows interactive
* elements inside draggables (like buttons) to work normally with the keyboard.
*/
class DirectFocusKeyboardSensor extends KeyboardSensor {
static activators = [{
eventName: 'onKeyDown',
handler: (event, {
keyboardCodes = {
cancel: [KeyboardCode.Esc],
end: [KeyboardCode.Space, KeyboardCode.Enter],
start: [KeyboardCode.Space, KeyboardCode.Enter]
},
onActivation
}, {
active
}) => {
const {
code
} = event.nativeEvent;
// Only activate if focus is directly on the draggable node, not descendants
if (event.target !== active.node.current) {
return false;
}
if (keyboardCodes.start.includes(code)) {
event.preventDefault();
onActivation?.({
event: event.nativeEvent
});
return true;
}
return false;
}
}];
}
export function useDashboardSensors() {
return useSensors(useSensor(PointerSensor, {
activationConstraint: {
distance: 5
}
}), useSensor(DirectFocusKeyboardSensor, {
coordinateGetter: droppableJumpKeyboardCoordinateGetter
}));
}
//# sourceMappingURL=sensors.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"filter.js","sources":["../../../src/icons/filter.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Filter\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cG9seWdvbiBwb2ludHM9IjIyIDMgMiAzIDEwIDEyLjQ2IDEwIDE5IDE0IDIxIDE0IDEyLjQ2IDIyIDMiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/filter\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 Filter = createLucideIcon('Filter', [\n ['polygon', { points: '22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3', key: '1yg77f' }],\n]);\n\nexport default Filter;\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,CAAA,CAAA,CAAA,CAAW,CAAA,CAAA,CAAA,CAAE,QAAQ,CAA+C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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;AACtF,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,188 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.FloatingUIUtilsDOM = {}));
})(this, (function (exports) { 'use strict';
function hasWindow() {
return typeof window !== 'undefined';
}
function getNodeName(node) {
if (isNode(node)) {
return (node.nodeName || '').toLowerCase();
}
// Mocked nodes in testing environments may not be instances of Node. By
// returning `#document` an infinite loop won't occur.
// https://github.com/floating-ui/floating-ui/issues/2317
return '#document';
}
function getWindow(node) {
var _node$ownerDocument;
return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
}
function getDocumentElement(node) {
var _ref;
return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
}
function isNode(value) {
if (!hasWindow()) {
return false;
}
return value instanceof Node || value instanceof getWindow(value).Node;
}
function isElement(value) {
if (!hasWindow()) {
return false;
}
return value instanceof Element || value instanceof getWindow(value).Element;
}
function isHTMLElement(value) {
if (!hasWindow()) {
return false;
}
return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
}
function isShadowRoot(value) {
if (!hasWindow() || typeof ShadowRoot === 'undefined') {
return false;
}
return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
}
const invalidOverflowDisplayValues = /*#__PURE__*/new Set(['inline', 'contents']);
function isOverflowElement(element) {
const {
overflow,
overflowX,
overflowY,
display
} = getComputedStyle(element);
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !invalidOverflowDisplayValues.has(display);
}
const tableElements = /*#__PURE__*/new Set(['table', 'td', 'th']);
function isTableElement(element) {
return tableElements.has(getNodeName(element));
}
const topLayerSelectors = [':popover-open', ':modal'];
function isTopLayer(element) {
return topLayerSelectors.some(selector => {
try {
return element.matches(selector);
} catch (_e) {
return false;
}
});
}
const transformProperties = ['transform', 'translate', 'scale', 'rotate', 'perspective'];
const willChangeValues = ['transform', 'translate', 'scale', 'rotate', 'perspective', 'filter'];
const containValues = ['paint', 'layout', 'strict', 'content'];
function isContainingBlock(elementOrCss) {
const webkit = isWebKit();
const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
// https://drafts.csswg.org/css-transforms-2/#individual-transforms
return transformProperties.some(value => css[value] ? css[value] !== 'none' : false) || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || willChangeValues.some(value => (css.willChange || '').includes(value)) || containValues.some(value => (css.contain || '').includes(value));
}
function getContainingBlock(element) {
let currentNode = getParentNode(element);
while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
if (isContainingBlock(currentNode)) {
return currentNode;
} else if (isTopLayer(currentNode)) {
return null;
}
currentNode = getParentNode(currentNode);
}
return null;
}
function isWebKit() {
if (typeof CSS === 'undefined' || !CSS.supports) return false;
return CSS.supports('-webkit-backdrop-filter', 'none');
}
const lastTraversableNodeNames = /*#__PURE__*/new Set(['html', 'body', '#document']);
function isLastTraversableNode(node) {
return lastTraversableNodeNames.has(getNodeName(node));
}
function getComputedStyle(element) {
return getWindow(element).getComputedStyle(element);
}
function getNodeScroll(element) {
if (isElement(element)) {
return {
scrollLeft: element.scrollLeft,
scrollTop: element.scrollTop
};
}
return {
scrollLeft: element.scrollX,
scrollTop: element.scrollY
};
}
function getParentNode(node) {
if (getNodeName(node) === 'html') {
return node;
}
const result =
// Step into the shadow DOM of the parent of a slotted node.
node.assignedSlot ||
// DOM Element detected.
node.parentNode ||
// ShadowRoot detected.
isShadowRoot(node) && node.host ||
// Fallback.
getDocumentElement(node);
return isShadowRoot(result) ? result.host : result;
}
function getNearestOverflowAncestor(node) {
const parentNode = getParentNode(node);
if (isLastTraversableNode(parentNode)) {
return node.ownerDocument ? node.ownerDocument.body : node.body;
}
if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
return parentNode;
}
return getNearestOverflowAncestor(parentNode);
}
function getOverflowAncestors(node, list, traverseIframes) {
var _node$ownerDocument2;
if (list === void 0) {
list = [];
}
if (traverseIframes === void 0) {
traverseIframes = true;
}
const scrollableAncestor = getNearestOverflowAncestor(node);
const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
const win = getWindow(scrollableAncestor);
if (isBody) {
const frameElement = getFrameElement(win);
return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
}
return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
}
function getFrameElement(win) {
return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
}
exports.getComputedStyle = getComputedStyle;
exports.getContainingBlock = getContainingBlock;
exports.getDocumentElement = getDocumentElement;
exports.getFrameElement = getFrameElement;
exports.getNearestOverflowAncestor = getNearestOverflowAncestor;
exports.getNodeName = getNodeName;
exports.getNodeScroll = getNodeScroll;
exports.getOverflowAncestors = getOverflowAncestors;
exports.getParentNode = getParentNode;
exports.getWindow = getWindow;
exports.isContainingBlock = isContainingBlock;
exports.isElement = isElement;
exports.isHTMLElement = isHTMLElement;
exports.isLastTraversableNode = isLastTraversableNode;
exports.isNode = isNode;
exports.isOverflowElement = isOverflowElement;
exports.isShadowRoot = isShadowRoot;
exports.isTableElement = isTableElement;
exports.isTopLayer = isTopLayer;
exports.isWebKit = isWebKit;
}));

View File

@@ -0,0 +1,32 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _native = _interopRequireDefault(require("./native.js"));
var _rng = _interopRequireDefault(require("./rng.js"));
var _stringify = require("./stringify.js");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
function v4(options, buf, offset) {
if (_native.default.randomUUID && !buf && !options) {
return _native.default.randomUUID();
}
options = options || {};
const rnds = options.random || (options.rng || _rng.default)();
// Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
rnds[6] = rnds[6] & 0x0f | 0x40;
rnds[8] = rnds[8] & 0x3f | 0x80;
// Copy bytes to buffer, if provided
if (buf) {
offset = offset || 0;
for (let i = 0; i < 16; ++i) {
buf[offset + i] = rnds[i];
}
return buf;
}
return (0, _stringify.unsafeStringify)(rnds);
}
var _default = exports.default = v4;

View File

@@ -0,0 +1,20 @@
{
"name": "ljharb-monorepo-symlink-test",
"private": true,
"version": "0.0.0",
"description": "",
"main": "index.js",
"scripts": {
"postinstall": "lerna bootstrap",
"test": "node packages/package-a"
},
"author": "",
"license": "MIT",
"dependencies": {
"jquery": "^3.3.1",
"resolve": "../../../"
},
"devDependencies": {
"lerna": "^3.4.3"
}
}

View File

@@ -0,0 +1,76 @@
import type {CodeKeywordDefinition, AnySchemaObject} from "../../types"
import type {KeywordCxt} from "../../compile/validate"
import {compileSchema, SchemaEnv} from "../../compile"
import {_, not, nil, stringify} from "../../compile/codegen"
import MissingRefError from "../../compile/ref_error"
import N from "../../compile/names"
import {getValidate, callRef} from "../core/ref"
import {checkMetadata} from "./metadata"
const def: CodeKeywordDefinition = {
keyword: "ref",
schemaType: "string",
code(cxt: KeywordCxt) {
checkMetadata(cxt)
const {gen, data, schema: ref, parentSchema, it} = cxt
const {
schemaEnv: {root},
} = it
const valid = gen.name("valid")
if (parentSchema.nullable) {
gen.var(valid, _`${data} === null`)
gen.if(not(valid), validateJtdRef)
} else {
gen.var(valid, false)
validateJtdRef()
}
cxt.ok(valid)
function validateJtdRef(): void {
const refSchema = (root.schema as AnySchemaObject).definitions?.[ref]
if (!refSchema) {
throw new MissingRefError(it.opts.uriResolver, "", ref, `No definition ${ref}`)
}
if (hasRef(refSchema) || !it.opts.inlineRefs) callValidate(refSchema)
else inlineRefSchema(refSchema)
}
function callValidate(schema: AnySchemaObject): void {
const sch = compileSchema.call(
it.self,
new SchemaEnv({schema, root, schemaPath: `/definitions/${ref}`})
)
const v = getValidate(cxt, sch)
const errsCount = gen.const("_errs", N.errors)
callRef(cxt, v, sch, sch.$async)
gen.assign(valid, _`${errsCount} === ${N.errors}`)
}
function inlineRefSchema(schema: AnySchemaObject): void {
const schName = gen.scopeValue(
"schema",
it.opts.code.source === true ? {ref: schema, code: stringify(schema)} : {ref: schema}
)
cxt.subschema(
{
schema,
dataTypes: [],
schemaPath: nil,
topSchemaRef: schName,
errSchemaPath: `/definitions/${ref}`,
},
valid
)
}
},
}
export function hasRef(schema: AnySchemaObject): boolean {
for (const key in schema) {
let sch: AnySchemaObject
if (key === "ref" || (typeof (sch = schema[key]) == "object" && hasRef(sch))) return true
}
return false
}
export default def

View File

@@ -0,0 +1,19 @@
import { collectMotionValues } from './index.mjs';
import { useCombineMotionValues } from './use-combine-values.mjs';
function useComputed(compute) {
/**
* Open session of collectMotionValues. Any MotionValue that calls get()
* will be saved into this array.
*/
collectMotionValues.current = [];
compute();
const value = useCombineMotionValues(collectMotionValues.current, compute);
/**
* Synchronously close session of collectMotionValues.
*/
collectMotionValues.current = undefined;
return value;
}
export { useComputed };

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,qDAA0D;AAAjD,wHAAA,qBAAqB,OAAA","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport { MySQL2Instrumentation } from './instrumentation';\nexport type {\n MySQL2InstrumentationConfig,\n MySQL2InstrumentationExecutionResponseHook,\n MySQL2ResponseHookInformation,\n} from './types';\n"]}

View File

@@ -0,0 +1,23 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const OctagonAlert = createLucideIcon("OctagonAlert", [
["path", { d: "M12 16h.01", key: "1drbdi" }],
["path", { d: "M12 8v4", key: "1got3b" }],
[
"path",
{
d: "M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",
key: "1fd625"
}
]
]);
export { OctagonAlert as default };
//# sourceMappingURL=octagon-alert.js.map

View File

@@ -0,0 +1,59 @@
import type { OpenAiOptions } from '@sentry/core';
export declare const instrumentOpenAi: ((options?: OpenAiOptions | undefined) => import("@opentelemetry/instrumentation").Instrumentation<import("@opentelemetry/instrumentation").InstrumentationConfig>) & {
id: string;
};
/**
* Adds Sentry tracing instrumentation for the OpenAI SDK.
*
* This integration is enabled by default.
*
* When configured, this integration automatically instruments OpenAI SDK client instances
* to capture telemetry data following OpenTelemetry Semantic Conventions for Generative AI.
*
* @example
* ```javascript
* import * as Sentry from '@sentry/node';
*
* Sentry.init({
* integrations: [Sentry.openAIIntegration()],
* });
* ```
*
* ## Options
*
* - `recordInputs`: Whether to record prompt messages (default: respects `sendDefaultPii` client option)
* - `recordOutputs`: Whether to record response text (default: respects `sendDefaultPii` client option)
*
* ### Default Behavior
*
* By default, the integration will:
* - Record inputs and outputs ONLY if `sendDefaultPii` is set to `true` in your Sentry client options
* - Otherwise, inputs and outputs are NOT recorded unless explicitly enabled
*
* @example
* ```javascript
* // Record inputs and outputs when sendDefaultPii is false
* Sentry.init({
* integrations: [
* Sentry.openAIIntegration({
* recordInputs: true,
* recordOutputs: true
* })
* ],
* });
*
* // Never record inputs/outputs regardless of sendDefaultPii
* Sentry.init({
* sendDefaultPii: true,
* integrations: [
* Sentry.openAIIntegration({
* recordInputs: false,
* recordOutputs: false
* })
* ],
* });
* ```
*
*/
export declare const openAIIntegration: (options?: OpenAiOptions | undefined) => import("@sentry/core").Integration;
//# sourceMappingURL=index.d.ts.map

View File

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

View File

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

View File

@@ -0,0 +1,34 @@
var arrayFilter = require('./_arrayFilter'),
baseRest = require('./_baseRest'),
baseXor = require('./_baseXor'),
isArrayLikeObject = require('./isArrayLikeObject'),
last = require('./last');
/**
* This method is like `_.xor` except that it accepts `comparator` which is
* invoked to compare elements of `arrays`. The order of result values is
* determined by the order they occur in the arrays. The comparator is invoked
* with two arguments: (arrVal, othVal).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {...Array} [arrays] The arrays to inspect.
* @param {Function} [comparator] The comparator invoked per element.
* @returns {Array} Returns the new array of filtered values.
* @example
*
* var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
* var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
*
* _.xorWith(objects, others, _.isEqual);
* // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
*/
var xorWith = baseRest(function(arrays) {
var comparator = last(arrays);
comparator = typeof comparator == 'function' ? comparator : undefined;
return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);
});
module.exports = xorWith;

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/providers/Theme/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAA+D,MAAM,OAAO,CAAA;AAInF,MAAM,MAAM,KAAK,GAAG,MAAM,GAAG,OAAO,CAAA;AAEpC,MAAM,MAAM,YAAY,GAAG;IACzB,QAAQ,EAAE,OAAO,CAAA;IACjB,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;IAChC,KAAK,EAAE,KAAK,CAAA;CACb,CAAA;AA4CD,eAAO,MAAM,YAAY,UAAU,CAAA;AAEnC,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC;IACnC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,KAAK,CAAC,EAAE,KAAK,CAAA;CACd,CA2CA,CAAA;AAED,eAAO,MAAM,QAAQ,QAAO,YAA4B,CAAA"}

View File

@@ -0,0 +1,25 @@
"use strict";
exports.__esModule = true;
exports.default = void 0;
/**
* A `removeEventListener` ponyfill
*
* @param node the element
* @param eventName the event name
* @param handle the handler
* @param options event options
*/
function removeEventListener(node, eventName, handler, options) {
var capture = options && typeof options !== 'boolean' ? options.capture : options;
node.removeEventListener(eventName, handler, capture);
if (handler.__once) {
node.removeEventListener(eventName, handler.__once, capture);
}
}
var _default = removeEventListener;
exports.default = _default;
module.exports = exports["default"];

View File

@@ -0,0 +1,98 @@
import type {FuncKeywordDefinition, SchemaCxt} from "ajv"
const sequences: Record<string, number | undefined> = {}
export type DynamicDefaultFunc = (args?: Record<string, any>) => () => any
const DEFAULTS: Record<string, DynamicDefaultFunc | undefined> = {
timestamp: () => () => Date.now(),
datetime: () => () => new Date().toISOString(),
date: () => () => new Date().toISOString().slice(0, 10),
time: () => () => new Date().toISOString().slice(11),
random: () => () => Math.random(),
randomint: (args?: {max?: number}) => {
const max = args?.max ?? 2
return () => Math.floor(Math.random() * max)
},
seq: (args?: {name?: string}) => {
const name = args?.name ?? ""
sequences[name] ||= 0
return () => (sequences[name] as number)++
},
}
interface PropertyDefaultSchema {
func: string
args: Record<string, any>
}
type DefaultSchema = Record<string, string | PropertyDefaultSchema | undefined>
const getDef: (() => FuncKeywordDefinition) & {
DEFAULTS: typeof DEFAULTS
} = Object.assign(_getDef, {DEFAULTS})
function _getDef(): FuncKeywordDefinition {
return {
keyword: "dynamicDefaults",
type: "object",
schemaType: ["string", "object"],
modifying: true,
valid: true,
compile(schema: DefaultSchema, _parentSchema, it: SchemaCxt) {
if (!it.opts.useDefaults || it.compositeRule) return () => true
const fs: Record<string, () => any> = {}
for (const key in schema) fs[key] = getDefault(schema[key])
const empty = it.opts.useDefaults === "empty"
return (data: Record<string, any>) => {
for (const prop in schema) {
if (data[prop] === undefined || (empty && (data[prop] === null || data[prop] === ""))) {
data[prop] = fs[prop]()
}
}
return true
}
},
metaSchema: {
type: "object",
additionalProperties: {
anyOf: [
{type: "string"},
{
type: "object",
additionalProperties: false,
required: ["func", "args"],
properties: {
func: {type: "string"},
args: {type: "object"},
},
},
],
},
},
}
}
function getDefault(d: string | PropertyDefaultSchema | undefined): () => any {
return typeof d == "object" ? getObjDefault(d) : getStrDefault(d)
}
function getObjDefault({func, args}: PropertyDefaultSchema): () => any {
const def = DEFAULTS[func]
assertDefined(func, def)
return def(args)
}
function getStrDefault(d = ""): () => any {
const def = DEFAULTS[d]
assertDefined(d, def)
return def()
}
function assertDefined(name: string, def?: DynamicDefaultFunc): asserts def is DynamicDefaultFunc {
if (!def) throw new Error(`invalid "dynamicDefaults" keyword property value: ${name}`)
}
export default getDef
module.exports = getDef

View File

@@ -0,0 +1,14 @@
import type * as Hooks from 'preact/hooks';
interface FactoryParams {
hooks: typeof Hooks;
}
interface Props {
onBeforeScreenshot: () => void;
onScreenshot: (imageSource: HTMLVideoElement, dpi: number) => void;
onAfterScreenshot: () => void;
onError: (error: Error) => void;
}
type UseTakeScreenshot = ({ onBeforeScreenshot, onScreenshot, onAfterScreenshot, onError }: Props) => void;
export declare function useTakeScreenshotFactory({ hooks }: FactoryParams): UseTakeScreenshot;
export {};
//# sourceMappingURL=useTakeScreenshot.d.ts.map

View File

@@ -0,0 +1,185 @@
"use strict";
exports.localize = void 0;
var _index = require("../../_lib/buildLocalizeFn.js");
const eraValues = {
narrow: ["前", "公元"],
abbreviated: ["前", "公元"],
wide: ["公元前", "公元"],
};
const quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["第一刻", "第二刻", "第三刻", "第四刻"],
wide: ["第一刻鐘", "第二刻鐘", "第三刻鐘", "第四刻鐘"],
};
const monthValues = {
narrow: [
"一",
"二",
"三",
"四",
"五",
"六",
"七",
"八",
"九",
"十",
"十一",
"十二",
],
abbreviated: [
"1月",
"2月",
"3月",
"4月",
"5月",
"6月",
"7月",
"8月",
"9月",
"10月",
"11月",
"12月",
],
wide: [
"一月",
"二月",
"三月",
"四月",
"五月",
"六月",
"七月",
"八月",
"九月",
"十月",
"十一月",
"十二月",
],
};
const dayValues = {
narrow: ["日", "一", "二", "三", "四", "五", "六"],
short: ["日", "一", "二", "三", "四", "五", "六"],
abbreviated: ["週日", "週一", "週二", "週三", "週四", "週五", "週六"],
wide: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"],
};
const dayPeriodValues = {
narrow: {
am: "上",
pm: "下",
midnight: "凌晨",
noon: "午",
morning: "早",
afternoon: "下午",
evening: "晚",
night: "夜",
},
abbreviated: {
am: "上午",
pm: "下午",
midnight: "凌晨",
noon: "中午",
morning: "早晨",
afternoon: "中午",
evening: "晚上",
night: "夜間",
},
wide: {
am: "上午",
pm: "下午",
midnight: "凌晨",
noon: "中午",
morning: "早晨",
afternoon: "中午",
evening: "晚上",
night: "夜間",
},
};
const formattingDayPeriodValues = {
narrow: {
am: "上",
pm: "下",
midnight: "凌晨",
noon: "午",
morning: "早",
afternoon: "下午",
evening: "晚",
night: "夜",
},
abbreviated: {
am: "上午",
pm: "下午",
midnight: "凌晨",
noon: "中午",
morning: "早晨",
afternoon: "中午",
evening: "晚上",
night: "夜間",
},
wide: {
am: "上午",
pm: "下午",
midnight: "凌晨",
noon: "中午",
morning: "早晨",
afternoon: "中午",
evening: "晚上",
night: "夜間",
},
};
const ordinalNumber = (dirtyNumber, options) => {
const number = Number(dirtyNumber);
switch (options?.unit) {
case "date":
return number + "日";
case "hour":
return number + "時";
case "minute":
return number + "分";
case "second":
return number + "秒";
default:
return "第 " + number;
}
};
const localize = (exports.localize = {
ordinalNumber,
era: (0, _index.buildLocalizeFn)({
values: eraValues,
defaultWidth: "wide",
}),
quarter: (0, _index.buildLocalizeFn)({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: (quarter) => quarter - 1,
}),
month: (0, _index.buildLocalizeFn)({
values: monthValues,
defaultWidth: "wide",
}),
day: (0, _index.buildLocalizeFn)({
values: dayValues,
defaultWidth: "wide",
}),
dayPeriod: (0, _index.buildLocalizeFn)({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide",
}),
});

View File

@@ -0,0 +1,71 @@
import type { AnyNode } from "domhandler";
/**
* The medium of a media item.
*
* @category Feeds
*/
export type FeedItemMediaMedium = "image" | "audio" | "video" | "document" | "executable";
/**
* The type of a media item.
*
* @category Feeds
*/
export type FeedItemMediaExpression = "sample" | "full" | "nonstop";
/**
* A media item of a feed entry.
*
* @category Feeds
*/
export interface FeedItemMedia {
medium: FeedItemMediaMedium | undefined;
isDefault: boolean;
url?: string;
fileSize?: number;
type?: string;
expression?: FeedItemMediaExpression;
bitrate?: number;
framerate?: number;
samplingrate?: number;
channels?: number;
duration?: number;
height?: number;
width?: number;
lang?: string;
}
/**
* An entry of a feed.
*
* @category Feeds
*/
export interface FeedItem {
id?: string;
title?: string;
link?: string;
description?: string;
pubDate?: Date;
media: FeedItemMedia[];
}
/**
* The root of a feed.
*
* @category Feeds
*/
export interface Feed {
type: string;
id?: string;
title?: string;
link?: string;
description?: string;
updated?: Date;
author?: string;
items: FeedItem[];
}
/**
* Get the feed object from the root of a DOM tree.
*
* @category Feeds
* @param doc - The DOM to to extract the feed from.
* @returns The feed.
*/
export declare function getFeed(doc: AnyNode[]): Feed | null;
//# sourceMappingURL=feeds.d.ts.map

View File

@@ -0,0 +1,68 @@
"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 primary_keys_exports = {};
__export(primary_keys_exports, {
PrimaryKey: () => PrimaryKey,
PrimaryKeyBuilder: () => PrimaryKeyBuilder,
primaryKey: () => primaryKey
});
module.exports = __toCommonJS(primary_keys_exports);
var import_entity = require("../entity.cjs");
var import_table = require("./table.cjs");
function primaryKey(...config) {
if (config[0].columns) {
return new PrimaryKeyBuilder(config[0].columns, config[0].name);
}
return new PrimaryKeyBuilder(config);
}
class PrimaryKeyBuilder {
static [import_entity.entityKind] = "SingleStorePrimaryKeyBuilder";
/** @internal */
columns;
/** @internal */
name;
constructor(columns, name) {
this.columns = columns;
this.name = name;
}
/** @internal */
build(table) {
return new PrimaryKey(table, this.columns, this.name);
}
}
class PrimaryKey {
constructor(table, columns, name) {
this.table = table;
this.columns = columns;
this.name = name;
}
static [import_entity.entityKind] = "SingleStorePrimaryKey";
columns;
name;
getName() {
return this.name ?? `${this.table[import_table.SingleStoreTable.Symbol.Name]}_${this.columns.map((column) => column.name).join("_")}_pk`;
}
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
PrimaryKey,
PrimaryKeyBuilder,
primaryKey
});
//# sourceMappingURL=primary-keys.cjs.map

View File

@@ -0,0 +1,2 @@
export declare function getUniqueListBy<T>(arr: T[], key: string): T[];
//# sourceMappingURL=getUniqueListBy.d.ts.map

View File

@@ -0,0 +1,102 @@
import { NoopCache } from "../cache/core/cache.js";
import { entityKind } from "../entity.js";
import { NoopLogger } from "../logger.js";
import { PgTransaction } from "../pg-core/index.js";
import { PgPreparedQuery as PreparedQueryBase, PgSession } from "../pg-core/session.js";
import { fillPlaceholders } from "../sql/sql.js";
import { tracer } from "../tracing.js";
import { mapResultRow } from "../utils.js";
class PgRemoteSession extends PgSession {
constructor(client, dialect, schema, options = {}) {
super(dialect);
this.client = client;
this.schema = schema;
this.logger = options.logger ?? new NoopLogger();
this.cache = options.cache ?? new NoopCache();
}
static [entityKind] = "PgRemoteSession";
logger;
cache;
prepareQuery(query, fields, name, isResponseInArrayMode, customResultMapper, queryMetadata, cacheConfig) {
return new PreparedQuery(
this.client,
query.sql,
query.params,
query.typings,
this.logger,
this.cache,
queryMetadata,
cacheConfig,
fields,
isResponseInArrayMode,
customResultMapper
);
}
async transaction(_transaction, _config) {
throw new Error("Transactions are not supported by the Postgres Proxy driver");
}
}
class PgProxyTransaction extends PgTransaction {
static [entityKind] = "PgProxyTransaction";
async transaction(_transaction) {
throw new Error("Transactions are not supported by the Postgres Proxy driver");
}
}
class PreparedQuery extends PreparedQueryBase {
constructor(client, queryString, params, typings, logger, cache, queryMetadata, cacheConfig, fields, _isResponseInArrayMode, customResultMapper) {
super({ sql: queryString, params }, cache, queryMetadata, cacheConfig);
this.client = client;
this.queryString = queryString;
this.params = params;
this.typings = typings;
this.logger = logger;
this.fields = fields;
this._isResponseInArrayMode = _isResponseInArrayMode;
this.customResultMapper = customResultMapper;
}
static [entityKind] = "PgProxyPreparedQuery";
async execute(placeholderValues = {}) {
return tracer.startActiveSpan("drizzle.execute", async (span) => {
const params = fillPlaceholders(this.params, placeholderValues);
const { fields, client, queryString, joinsNotNullableMap, customResultMapper, logger, typings } = this;
span?.setAttributes({
"drizzle.query.text": queryString,
"drizzle.query.params": JSON.stringify(params)
});
logger.logQuery(queryString, params);
if (!fields && !customResultMapper) {
return tracer.startActiveSpan("drizzle.driver.execute", async () => {
const { rows: rows2 } = await this.queryWithCache(queryString, params, async () => {
return await client(queryString, params, "execute", typings);
});
return rows2;
});
}
const rows = await tracer.startActiveSpan("drizzle.driver.execute", async () => {
span?.setAttributes({
"drizzle.query.text": queryString,
"drizzle.query.params": JSON.stringify(params)
});
const { rows: rows2 } = await this.queryWithCache(queryString, params, async () => {
return await client(queryString, params, "all", typings);
});
return rows2;
});
return tracer.startActiveSpan("drizzle.mapResponse", () => {
return customResultMapper ? customResultMapper(rows) : rows.map((row) => mapResultRow(fields, row, joinsNotNullableMap));
});
});
}
async all() {
}
/** @internal */
isResponseInArrayMode() {
return this._isResponseInArrayMode;
}
}
export {
PgProxyTransaction,
PgRemoteSession,
PreparedQuery
};
//# sourceMappingURL=session.js.map

View File

@@ -0,0 +1,49 @@
Prism.languages.armasm = {
'comment': {
pattern: /;.*/,
greedy: true
},
'string': {
pattern: /"(?:[^"\r\n]|"")*"/,
greedy: true,
inside: {
'variable': {
pattern: /((?:^|[^$])(?:\${2})*)\$\w+/,
lookbehind: true
}
}
},
'char': {
pattern: /'(?:[^'\r\n]{0,4}|'')'/,
greedy: true
},
'version-symbol': {
pattern: /\|[\w@]+\|/,
greedy: true,
alias: 'property'
},
'boolean': /\b(?:FALSE|TRUE)\b/,
'directive': {
pattern: /\b(?:ALIAS|ALIGN|AREA|ARM|ASSERT|ATTR|CN|CODE|CODE16|CODE32|COMMON|CP|DATA|DCB|DCD|DCDO|DCDU|DCFD|DCFDU|DCI|DCQ|DCQU|DCW|DCWU|DN|ELIF|ELSE|END|ENDFUNC|ENDIF|ENDP|ENTRY|EQU|EXPORT|EXPORTAS|EXTERN|FIELD|FILL|FN|FUNCTION|GBLA|GBLL|GBLS|GET|GLOBAL|IF|IMPORT|INCBIN|INCLUDE|INFO|KEEP|LCLA|LCLL|LCLS|LTORG|MACRO|MAP|MEND|MEXIT|NOFP|OPT|PRESERVE8|PROC|QN|READONLY|RELOC|REQUIRE|REQUIRE8|RLIST|ROUT|SETA|SETL|SETS|SN|SPACE|SUBT|THUMB|THUMBX|TTL|WEND|WHILE)\b/,
alias: 'property'
},
'instruction': {
pattern: /((?:^|(?:^|[^\\])(?:\r\n?|\n))[ \t]*(?:(?:[A-Z][A-Z0-9_]*[a-z]\w*|[a-z]\w*|\d+)[ \t]+)?)\b[A-Z.]+\b/,
lookbehind: true,
alias: 'keyword'
},
'variable': /\$\w+/,
'number': /(?:\b[2-9]_\d+|(?:\b\d+(?:\.\d+)?|\B\.\d+)(?:e-?\d+)?|\b0(?:[fd]_|x)[0-9a-f]+|&[0-9a-f]+)\b/i,
'register': {
pattern: /\b(?:r\d|lr)\b/,
alias: 'symbol'
},
'operator': /<>|<<|>>|&&|\|\||[=!<>/]=?|[+\-*%#?&|^]|:[A-Z]+:/,
'punctuation': /[()[\],]/
};
Prism.languages['arm-asm'] = Prism.languages.armasm;

View File

@@ -0,0 +1,19 @@
// Standard YAML's JSON schema.
// http://www.yaml.org/spec/1.2/spec.html#id2803231
//
// NOTE: JS-YAML does not support schema-specific tag resolution restrictions.
// So, this schema is not such strict as defined in the YAML specification.
// It allows numbers in binary notaion, use `Null` and `NULL` as `null`, etc.
'use strict';
module.exports = require('./failsafe').extend({
implicit: [
require('../type/null'),
require('../type/bool'),
require('../type/int'),
require('../type/float')
]
});

View File

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

View File

@@ -0,0 +1,13 @@
/**
* The base implementation of `_.hasIn` without support for deep paths.
*
* @private
* @param {Object} [object] The object to query.
* @param {Array|string} key The key to check.
* @returns {boolean} Returns `true` if `key` exists, else `false`.
*/
function baseHasIn(object, key) {
return object != null && key in Object(object);
}
module.exports = baseHasIn;

View File

@@ -0,0 +1 @@
{"version":3,"file":"getParentSpanId.d.ts","sourceRoot":"","sources":["../../../src/utils/getParentSpanId.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAElE;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,GAAG,SAAS,CAQtE"}

View File

@@ -0,0 +1,61 @@
# OpenTelemetry lru-memoizer Instrumentation for Node.js
[![NPM Published Version][npm-img]][npm-url]
[![Apache License][license-image]][license-image]
This module provides automatic instrumentation for the [`lru-memoizer`](https://github.com/jfromaniello/lru-memoizer) module, which may be loaded using the [`@opentelemetry/sdk-trace-node`](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-node) package and is included in the [`@opentelemetry/auto-instrumentations-node`](https://www.npmjs.com/package/@opentelemetry/auto-instrumentations-node) bundle.
If total installation size is not constrained, it is recommended to use the [`@opentelemetry/auto-instrumentations-node`](https://www.npmjs.com/package/@opentelemetry/auto-instrumentations-node) bundle with [@opentelemetry/sdk-node](`https://www.npmjs.com/package/@opentelemetry/sdk-node`) for the most seamless instrumentation experience.
Compatible with OpenTelemetry JS API and SDK `1.0+`.
## Installation
```bash
npm install --save @opentelemetry/instrumentation-lru-memoizer
```
## Supported Versions
- [`lru-memoizer`](https://www.npmjs.com/package/lru-memoizer) versions `>=1.3.0 <3`
## Usage
This instrumentation does not produce any telemetry data. It only bind the caller context to callbacks so downstream operations are recorded with the right context (traceId / parentSpanId / baggage / etc). The `lru-memoizer` package is a dependency for other packages such as [jwks-rsa](https://www.npmjs.com/package/jwks-rsa)
To load a specific plugin, specify it in the registerInstrumentations's configuration:
```js
const { NodeTracerProvider } = require('@opentelemetry/sdk-trace-node');
const { LruMemoizerInstrumentation } = require('@opentelemetry/instrumentation-lru-memoizer');
const { registerInstrumentations } = require('@opentelemetry/instrumentation');
const provider = new NodeTracerProvider();
provider.register();
registerInstrumentations({
instrumentations: [
new LruMemoizerInstrumentation(),
],
})
```
## Semantic Conventions
This package does not currently generate any attributes from semantic conventions.
## Useful links
- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>
- For more about OpenTelemetry JavaScript: <https://github.com/open-telemetry/opentelemetry-js>
- For help or feedback on this project, join us in [GitHub Discussions][discussions-url]
## License
Apache 2.0 - See [LICENSE][license-url] for more information.
[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions
[license-url]: https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/LICENSE
[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat
[npm-url]: https://www.npmjs.com/package/@opentelemetry/instrumentation-lru-memoizer
[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Finstrumentation-lru-memoizer.svg

View File

@@ -0,0 +1,11 @@
'use strict'
const { test } = require('tap')
const indexes = require('../lib/indexes')
for (const index of Object.keys(indexes)) {
test(`${index} is lock free`, function (t) {
t.equal(Atomics.isLockFree(indexes[index]), true)
t.end()
})
}

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/auth/baseFields/sessions.ts"],"sourcesContent":["import type { ArrayField } from '../../fields/config/types.js'\n\nexport const sessionsFieldConfig: ArrayField = {\n name: 'sessions',\n type: 'array',\n access: {\n read: ({ doc, req: { user } }) => {\n return user?.id === doc?.id\n },\n update: () => false,\n },\n admin: {\n disabled: true,\n },\n fields: [\n {\n name: 'id',\n type: 'text',\n required: true,\n },\n {\n name: 'createdAt',\n type: 'date',\n defaultValue: () => new Date(),\n },\n {\n name: 'expiresAt',\n type: 'date',\n required: true,\n },\n ],\n}\n"],"names":["sessionsFieldConfig","name","type","access","read","doc","req","user","id","update","admin","disabled","fields","required","defaultValue","Date"],"mappings":"AAEA,OAAO,MAAMA,sBAAkC;IAC7CC,MAAM;IACNC,MAAM;IACNC,QAAQ;QACNC,MAAM,CAAC,EAAEC,GAAG,EAAEC,KAAK,EAAEC,IAAI,EAAE,EAAE;YAC3B,OAAOA,MAAMC,OAAOH,KAAKG;QAC3B;QACAC,QAAQ,IAAM;IAChB;IACAC,OAAO;QACLC,UAAU;IACZ;IACAC,QAAQ;QACN;YACEX,MAAM;YACNC,MAAM;YACNW,UAAU;QACZ;QACA;YACEZ,MAAM;YACNC,MAAM;YACNY,cAAc,IAAM,IAAIC;QAC1B;QACA;YACEd,MAAM;YACNC,MAAM;YACNW,UAAU;QACZ;KACD;AACH,EAAC"}

View File

@@ -0,0 +1,483 @@
# CJS Module Lexer
[![Build Status][travis-image]][travis-url]
A [very fast](#benchmarks) JS CommonJS module syntax lexer used to detect the most likely list of named exports of a CommonJS module.
Outputs the list of named exports (`exports.name = ...`) and possible module reexports (`module.exports = require('...')`), including the common transpiler variations of these cases.
Forked from https://github.com/guybedford/es-module-lexer.
_Comprehensively handles the JS language grammar while remaining small and fast. - ~90ms per MB of JS cold and ~15ms per MB of JS warm, [see benchmarks](#benchmarks) for more info._
### Project Status
This project is used in Node.js core for detecting the named exports available when importing a CJS module into ESM, and is maintained for this purpose.
PRs will be accepted and upstreamed for parser bugs, performance improvements or new syntax support only.
_Detection patterns for this project are **frozen**_. This is because adding any new export detection patterns would result in fragmented backwards-compatibility. Specifically, it would be very difficult to figure out why an ES module named export for CommonJS might work in newer Node.js versions but not older versions. This problem would only be discovered downstream of module authors, with the fix for module authors being to then have to understand which patterns in this project provide full backwards-compatibily. Rather, by fully freezing the detected patterns, if it works in any Node.js version it will work in any other. Build tools can also reliably treat the supported syntax for this project as a part of their output target for ensuring syntax support.
### Usage
```
npm install cjs-module-lexer
```
For use in CommonJS:
```js
const { parse } = require('cjs-module-lexer');
// `init` return a promise for parity with the ESM API, but you do not have to call it
const { exports, reexports } = parse(`
// named exports detection
module.exports.a = 'a';
(function () {
exports.b = 'b';
})();
Object.defineProperty(exports, 'c', { value: 'c' });
/* exports.d = 'not detected'; */
// reexports detection
if (maybe) module.exports = require('./dep1.js');
if (another) module.exports = require('./dep2.js');
// literal exports assignments
module.exports = { a, b: c, d, 'e': f }
// __esModule detection
Object.defineProperty(module.exports, '__esModule', { value: true })
`);
// exports === ['a', 'b', 'c', '__esModule']
// reexports === ['./dep1.js', './dep2.js']
```
When using the ESM version, Wasm is supported instead:
```js
import { parse, init } from 'cjs-module-lexer';
// init() needs to be called and waited upon, or use initSync() to compile
// Wasm blockingly and synchronously.
await init();
const { exports, reexports } = parse(source);
```
The Wasm build is around 1.5x faster and without a cold start.
### Grammar
CommonJS exports matches are run against the source token stream.
The token grammar is:
```
IDENTIFIER: As defined by ECMA-262, without support for identifier `\` escapes, filtered to remove strict reserved words:
"implements", "interface", "let", "package", "private", "protected", "public", "static", "yield", "enum"
STRING_LITERAL: A `"` or `'` bounded ECMA-262 string literal.
MODULE_EXPORTS: `module` `.` `exports`
EXPORTS_IDENTIFIER: MODULE_EXPORTS_IDENTIFIER | `exports`
EXPORTS_DOT_ASSIGN: EXPORTS_IDENTIFIER `.` IDENTIFIER `=`
EXPORTS_LITERAL_COMPUTED_ASSIGN: EXPORTS_IDENTIFIER `[` STRING_LITERAL `]` `=`
EXPORTS_LITERAL_PROP: (IDENTIFIER (`:` IDENTIFIER)?) | (STRING_LITERAL `:` IDENTIFIER)
EXPORTS_SPREAD: `...` (IDENTIFIER | REQUIRE)
EXPORTS_MEMBER: EXPORTS_DOT_ASSIGN | EXPORTS_LITERAL_COMPUTED_ASSIGN
EXPORTS_DEFINE: `Object` `.` `defineProperty `(` EXPORTS_IDENFITIER `,` STRING_LITERAL
EXPORTS_DEFINE_VALUE: EXPORTS_DEFINE `, {`
(`enumerable: true,`)?
(
`value:` |
`get` (`: function` IDENTIFIER? )? `() {` return IDENTIFIER (`.` IDENTIFIER | `[` STRING_LITERAL `]`)? `;`? `}` `,`?
)
`})`
EXPORTS_LITERAL: MODULE_EXPORTS `=` `{` (EXPORTS_LITERAL_PROP | EXPORTS_SPREAD) `,`)+ `}`
REQUIRE: `require` `(` STRING_LITERAL `)`
EXPORTS_ASSIGN: (`var` | `const` | `let`) IDENTIFIER `=` (`_interopRequireWildcard (`)? REQUIRE
MODULE_EXPORTS_ASSIGN: MODULE_EXPORTS `=` REQUIRE
EXPORT_STAR: (`__export` | `__exportStar`) `(` REQUIRE
EXPORT_STAR_LIB: `Object.keys(` IDENTIFIER$1 `).forEach(function (` IDENTIFIER$2 `) {`
(
(
`if (` IDENTIFIER$2 `===` ( `'default'` | `"default"` ) `||` IDENTIFIER$2 `===` ( '__esModule' | `"__esModule"` ) `) return` `;`?
(
(`if (Object` `.prototype`? `.hasOwnProperty.call(` IDENTIFIER `, ` IDENTIFIER$2 `)) return` `;`?)?
(`if (` IDENTIFIER$2 `in` EXPORTS_IDENTIFIER `&&` EXPORTS_IDENTIFIER `[` IDENTIFIER$2 `] ===` IDENTIFIER$1 `[` IDENTIFIER$2 `]) return` `;`)?
)?
) |
`if (` IDENTIFIER$2 `!==` ( `'default'` | `"default"` ) (`&& !` (`Object` `.prototype`? `.hasOwnProperty.call(` IDENTIFIER `, ` IDENTIFIER$2 `)` | IDENTIFIER `.hasOwnProperty(` IDENTIFIER$2 `)`))? `)`
)
(
EXPORTS_IDENTIFIER `[` IDENTIFIER$2 `] =` IDENTIFIER$1 `[` IDENTIFIER$2 `]` `;`? |
`Object.defineProperty(` EXPORTS_IDENTIFIER `, ` IDENTIFIER$2 `, { enumerable: true, get` (`: function` IDENTIFIER? )? `() { return ` IDENTIFIER$1 `[` IDENTIFIER$2 `]` `;`? `}` `,`? `})` `;`?
)
`})`
```
Spacing between tokens is taken to be any ECMA-262 whitespace, ECMA-262 block comment or ECMA-262 line comment.
* The returned export names are taken to be the combination of:
1. All `IDENTIFIER` and `STRING_LITERAL` slots for `EXPORTS_MEMBER` and `EXPORTS_LITERAL` matches.
2. The first `STRING_LITERAL` slot for all `EXPORTS_DEFINE_VALUE` matches where that same string is not an `EXPORTS_DEFINE` match that is not also an `EXPORTS_DEFINE_VALUE` match.
* The reexport specifiers are taken to be the combination of:
1. The `REQUIRE` matches of the last matched of either `MODULE_EXPORTS_ASSIGN` or `EXPORTS_LITERAL`.
2. All _top-level_ `EXPORT_STAR` `REQUIRE` matches and `EXPORTS_ASSIGN` matches whose `IDENTIFIER` also matches the first `IDENTIFIER` in `EXPORT_STAR_LIB`.
### Parsing Examples
#### Named Exports Parsing
The basic matching rules for named exports are `exports.name`, `exports['name']` or `Object.defineProperty(exports, 'name', ...)`. This matching is done without scope analysis and regardless of the expression position:
```js
// DETECTS EXPORTS: a, b
(function (exports) {
exports.a = 'a';
exports['b'] = 'b';
})(exports);
```
Because there is no scope analysis, the above detection may overclassify:
```js
// DETECTS EXPORTS: a, b, c
(function (exports, Object) {
exports.a = 'a';
exports['b'] = 'b';
if (false)
exports.c = 'c';
})(NOT_EXPORTS, NOT_OBJECT);
```
It will in turn underclassify in cases where the identifiers are renamed:
```js
// DETECTS: NO EXPORTS
(function (e) {
e.a = 'a';
e['b'] = 'b';
})(exports);
```
#### Getter Exports Parsing
`Object.defineProperty` is detected for specifically value and getter forms returning an identifier or member expression:
```js
// DETECTS: a, b, c, d, __esModule
Object.defineProperty(exports, 'a', {
enumerable: true,
get: function () {
return q.p;
}
});
Object.defineProperty(exports, 'b', {
enumerable: true,
get: function () {
return q['p'];
}
});
Object.defineProperty(exports, 'c', {
enumerable: true,
get () {
return b;
}
});
Object.defineProperty(exports, 'd', { value: 'd' });
Object.defineProperty(exports, '__esModule', { value: true });
```
Value properties are also detected specifically:
```js
Object.defineProperty(exports, 'a', {
value: 'no problem'
});
```
To avoid matching getters that have side effects, any getter for an export name that does not support the forms above will
opt-out of the getter matching:
```js
// DETECTS: NO EXPORTS
Object.defineProperty(exports, 'a', {
get () {
return 'nope';
}
});
if (false) {
Object.defineProperty(module.exports, 'a', {
get () {
return dynamic();
}
})
}
```
Alternative object definition structures or getter function bodies are not detected:
```js
// DETECTS: NO EXPORTS
Object.defineProperty(exports, 'a', {
enumerable: false,
get () {
return p;
}
});
Object.defineProperty(exports, 'b', {
configurable: true,
get () {
return p;
}
});
Object.defineProperty(exports, 'c', {
get: () => p
});
Object.defineProperty(exports, 'd', {
enumerable: true,
get: function () {
return dynamic();
}
});
Object.defineProperty(exports, 'e', {
enumerable: true,
get () {
return 'str';
}
});
```
`Object.defineProperties` is also not supported.
#### Exports Object Assignment
A best-effort is made to detect `module.exports` object assignments, but because this is not a full parser, arbitrary expressions are not handled in the
object parsing process.
Simple object definitions are supported:
```js
// DETECTS EXPORTS: a, b, c
module.exports = {
a,
'b': b,
c: c,
...d
};
```
Object properties that are not identifiers or string expressions will bail out of the object detection, while spreads are ignored:
```js
// DETECTS EXPORTS: a, b
module.exports = {
a,
...d,
b: require('c'),
c: "not detected since require('c') above bails the object detection"
}
```
`Object.defineProperties` is not currently supported either.
#### module.exports reexport assignment
Any `module.exports = require('mod')` assignment is detected as a reexport, but only the last one is returned:
```js
// DETECTS REEXPORTS: c
module.exports = require('a');
(module => module.exports = require('b'))(NOT_MODULE);
if (false) module.exports = require('c');
```
This is to avoid over-classification in Webpack bundles with externals which include `module.exports = require('external')` in their source for every external dependency.
In exports object assignment, any spread of `require()` are detected as multiple separate reexports:
```js
// DETECTS REEXPORTS: a, b
module.exports = require('ignored');
module.exports = {
...require('a'),
...require('b')
};
```
#### Transpiler Re-exports
For named exports, transpiler output works well with the rules described above.
But for star re-exports, special care is taken to support common patterns of transpiler outputs from Babel and TypeScript as well as bundlers like RollupJS.
These reexport and star reexport patterns are restricted to only be detected at the top-level as provided by the direct output of these tools.
For example, `export * from 'external'` is output by Babel as:
```js
"use strict";
exports.__esModule = true;
var _external = require("external");
Object.keys(_external).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
exports[key] = _external[key];
});
```
Where the `var _external = require("external")` is specifically detected as well as the `Object.keys(_external)` statement, down to the exact
for of that entire expression including minor variations of the output. The `_external` and `key` identifiers are carefully matched in this
detection.
Similarly for TypeScript, `export * from 'external'` is output as:
```js
"use strict";
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
Object.defineProperty(exports, "__esModule", { value: true });
__export(require("external"));
```
Where the `__export(require("external"))` statement is explicitly detected as a reexport, including variations `tslib.__export` and `__exportStar`.
### Environment Support
Node.js 10+, and [all browsers with Web Assembly support](https://caniuse.com/#feat=wasm).
### JS Grammar Support
* Token state parses all line comments, block comments, strings, template strings, blocks, parens and punctuators.
* Division operator / regex token ambiguity is handled via backtracking checks against punctuator prefixes, including closing brace or paren backtracking.
* Always correctly parses valid JS source, but may parse invalid JS source without errors.
### Benchmarks
Benchmarks can be run with `npm run bench`.
Current results:
JS Build:
```
Module load time
> 4ms
Cold Run, All Samples
test/samples/*.js (3635 KiB)
> 299ms
Warm Runs (average of 25 runs)
test/samples/angular.js (1410 KiB)
> 13.96ms
test/samples/angular.min.js (303 KiB)
> 4.72ms
test/samples/d3.js (553 KiB)
> 6.76ms
test/samples/d3.min.js (250 KiB)
> 4ms
test/samples/magic-string.js (34 KiB)
> 0.64ms
test/samples/magic-string.min.js (20 KiB)
> 0ms
test/samples/rollup.js (698 KiB)
> 8.48ms
test/samples/rollup.min.js (367 KiB)
> 5.36ms
Warm Runs, All Samples (average of 25 runs)
test/samples/*.js (3635 KiB)
> 40.28ms
```
Wasm Build:
```
Module load time
> 10ms
Cold Run, All Samples
test/samples/*.js (3635 KiB)
> 43ms
Warm Runs (average of 25 runs)
test/samples/angular.js (1410 KiB)
> 9.32ms
test/samples/angular.min.js (303 KiB)
> 3.16ms
test/samples/d3.js (553 KiB)
> 5ms
test/samples/d3.min.js (250 KiB)
> 2.32ms
test/samples/magic-string.js (34 KiB)
> 0.16ms
test/samples/magic-string.min.js (20 KiB)
> 0ms
test/samples/rollup.js (698 KiB)
> 6.28ms
test/samples/rollup.min.js (367 KiB)
> 3.6ms
Warm Runs, All Samples (average of 25 runs)
test/samples/*.js (3635 KiB)
> 27.76ms
```
### Wasm Build Steps
The build uses docker and make, they must be installed first.
To build the lexer wasm run `npm run build-wasm`.
Optimization passes are run with [Binaryen](https://github.com/WebAssembly/binaryen)
prior to publish to reduce the Web Assembly footprint.
After building the lexer wasm, build the final distribution components
(lexer.js and lexer.mjs) by running `npm run build`.
If you need to build lib/lexer.wat (optional) you must first install
[wabt](https://github.com/WebAssembly/wabt) as a sibling folder to this
project. The wat file is then build by running `make lib/lexer.wat`
### Creating a Release
These are the steps to create and publish a release. You will need docker
installed as well as having installed [wabt](https://github.com/WebAssembly/wabt)
as outlined above:
- [ ] Figure out if the release should be semver patch, minor or major based on the changes since
the last release and determine the new version.
- [ ] Update the package.json version, and run a full build and test
- npm install
- npm run build
- npm run test
- [ ] Commit and tag the changes, pushing up to main and the tag
- For example
- `git tag -a 1.4.2 -m "1.4.2"`
- `git push origin tag 1.4.2`
- [ ] Create the GitHub release
- [ ] Run npm publish from an account with access (asking somebody with access
the nodejs-foundation account is an option if you don't have access.
### License
MIT
[travis-url]: https://travis-ci.org/guybedford/es-module-lexer
[travis-image]: https://travis-ci.org/guybedford/es-module-lexer.svg?branch=master

View File

@@ -0,0 +1,55 @@
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.TraceIdRatioBasedSampler = void 0;
const api_1 = require("@opentelemetry/api");
const Sampler_1 = require("../Sampler");
/** Sampler that samples a given fraction of traces based of trace id deterministically. */
class TraceIdRatioBasedSampler {
_ratio;
_upperBound;
constructor(ratio = 0) {
this._ratio = this._normalize(ratio);
this._upperBound = Math.floor(this._ratio * 0xffffffff);
}
shouldSample(context, traceId) {
return {
decision: (0, api_1.isValidTraceId)(traceId) && this._accumulate(traceId) < this._upperBound
? Sampler_1.SamplingDecision.RECORD_AND_SAMPLED
: Sampler_1.SamplingDecision.NOT_RECORD,
};
}
toString() {
return `TraceIdRatioBased{${this._ratio}}`;
}
_normalize(ratio) {
if (typeof ratio !== 'number' || isNaN(ratio))
return 0;
return ratio >= 1 ? 1 : ratio <= 0 ? 0 : ratio;
}
_accumulate(traceId) {
let accumulation = 0;
for (let i = 0; i < traceId.length / 8; i++) {
const pos = i * 8;
const part = parseInt(traceId.slice(pos, pos + 8), 16);
accumulation = (accumulation ^ part) >>> 0;
}
return accumulation;
}
}
exports.TraceIdRatioBasedSampler = TraceIdRatioBasedSampler;
//# sourceMappingURL=TraceIdRatioBasedSampler.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"prohibited.js","sourceRoot":"","sources":["../../src/definitions/prohibited.ts"],"names":[],"mappings":";;AAEA,SAAwB,MAAM;IAC5B,OAAO;QACL,OAAO,EAAE,YAAY;QACrB,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE,OAAO;QACnB,KAAK,EAAE,UAAU,MAAgB;YAC/B,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;gBAAE,OAAO,IAAI,CAAA;YACpC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;gBAAE,OAAO,EAAC,GAAG,EAAE,EAAC,QAAQ,EAAE,MAAM,EAAC,EAAC,CAAA;YACzD,OAAO,EAAC,GAAG,EAAE,EAAC,KAAK,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAC,CAAC,CAAC,EAAC,EAAC,CAAA;QAC7D,CAAC;QACD,UAAU,EAAE;YACV,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,EAAC,IAAI,EAAE,QAAQ,EAAC;SACxB;KACF,CAAA;AACH,CAAC;AAfD,yBAeC;AAED,MAAM,CAAC,OAAO,GAAG,MAAM,CAAA"}

View File

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

View File

@@ -0,0 +1 @@
Prism.languages.hsts={directive:{pattern:/\b(?:includeSubDomains|max-age|preload)(?=[\s;=]|$)/i,alias:"property"},operator:/=/,punctuation:/;/};

View File

@@ -0,0 +1,66 @@
/**
* Deprecated, use `server.address`, `server.port` attributes instead.
*
* @example "Server=(localdb)\\v11.0;Integrated Security=true;"
*
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*
* @deprecated Replaced by `server.address` and `server.port`.
*/
export declare const ATTR_DB_CONNECTION_STRING: "db.connection_string";
/**
* The database statement being executed.
*
* @example SELECT * FROM wuser_table
* @example SET mykey "WuValue"
*
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*
* @deprecated Replaced by `db.query.text`.
*/
export declare const ATTR_DB_STATEMENT: "db.statement";
/**
* Deprecated, use `db.system.name` instead.
*
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*
* @deprecated Replaced by `db.system.name`.
*/
export declare const ATTR_DB_SYSTEM: "db.system";
/**
* Deprecated, use `server.address` on client spans and `client.address` on server spans.
*
* @example example.com
*
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*
* @deprecated Replaced by `server.address` on client spans and `client.address` on server spans.
*/
export declare const ATTR_NET_PEER_NAME: "net.peer.name";
/**
* Deprecated, use `server.port` on client spans and `client.port` on server spans.
*
* @example 8080
*
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*
* @deprecated Replaced by `server.port` on client spans and `client.port` on server spans.
*/
export declare const ATTR_NET_PEER_PORT: "net.peer.port";
/**
* Enum value "redis" for attribute {@link ATTR_DB_SYSTEM_NAME}.
*
* [Redis](https://redis.io/)
*
* @experimental This enum value is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*/
export declare const DB_SYSTEM_NAME_VALUE_REDIS: "redis";
/**
* Enum value "redis" for attribute {@link ATTR_DB_SYSTEM}.
*
* Redis
*
* @experimental This enum value is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*/
export declare const DB_SYSTEM_VALUE_REDIS: "redis";
//# sourceMappingURL=semconv.d.ts.map

View File

@@ -0,0 +1,3 @@
export { hr } from '@payloadcms/translations/languages/hr';
//# sourceMappingURL=hr.js.map

View File

@@ -0,0 +1,5 @@
import type { CodeKeywordDefinition, ErrorObject } from "../../types";
import { DependenciesErrorParams, PropertyDependencies } from "../applicator/dependencies";
export type DependentRequiredError = ErrorObject<"dependentRequired", DependenciesErrorParams, PropertyDependencies>;
declare const def: CodeKeywordDefinition;
export default def;

View File

@@ -0,0 +1,9 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
export { default } from './book-dashed.js';
//# sourceMappingURL=book-template.js.map

View File

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

View File

@@ -0,0 +1,6 @@
import { imageType } from './types/index.mjs';
import './types/interface.mjs';
declare function detector(input: Uint8Array): imageType | undefined;
export { detector };

View File

@@ -0,0 +1,89 @@
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.DB_SYSTEM_VALUE_REDIS = exports.DB_SYSTEM_NAME_VALUE_REDIS = exports.ATTR_NET_PEER_PORT = exports.ATTR_NET_PEER_NAME = exports.ATTR_DB_SYSTEM = exports.ATTR_DB_STATEMENT = exports.ATTR_DB_CONNECTION_STRING = void 0;
/*
* This file contains a copy of unstable semantic convention definitions
* used by this package.
* @see https://github.com/open-telemetry/opentelemetry-js/tree/main/semantic-conventions#unstable-semconv
*/
/**
* Deprecated, use `server.address`, `server.port` attributes instead.
*
* @example "Server=(localdb)\\v11.0;Integrated Security=true;"
*
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*
* @deprecated Replaced by `server.address` and `server.port`.
*/
exports.ATTR_DB_CONNECTION_STRING = 'db.connection_string';
/**
* The database statement being executed.
*
* @example SELECT * FROM wuser_table
* @example SET mykey "WuValue"
*
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*
* @deprecated Replaced by `db.query.text`.
*/
exports.ATTR_DB_STATEMENT = 'db.statement';
/**
* Deprecated, use `db.system.name` instead.
*
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*
* @deprecated Replaced by `db.system.name`.
*/
exports.ATTR_DB_SYSTEM = 'db.system';
/**
* Deprecated, use `server.address` on client spans and `client.address` on server spans.
*
* @example example.com
*
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*
* @deprecated Replaced by `server.address` on client spans and `client.address` on server spans.
*/
exports.ATTR_NET_PEER_NAME = 'net.peer.name';
/**
* Deprecated, use `server.port` on client spans and `client.port` on server spans.
*
* @example 8080
*
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*
* @deprecated Replaced by `server.port` on client spans and `client.port` on server spans.
*/
exports.ATTR_NET_PEER_PORT = 'net.peer.port';
/**
* Enum value "redis" for attribute {@link ATTR_DB_SYSTEM_NAME}.
*
* [Redis](https://redis.io/)
*
* @experimental This enum value is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*/
exports.DB_SYSTEM_NAME_VALUE_REDIS = 'redis';
/**
* Enum value "redis" for attribute {@link ATTR_DB_SYSTEM}.
*
* Redis
*
* @experimental This enum value is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*/
exports.DB_SYSTEM_VALUE_REDIS = 'redis';
//# sourceMappingURL=semconv.js.map

View File

@@ -0,0 +1,65 @@
const globalLockDurationDefault = 300;
export async function getGlobalData(req) {
const {
payload: {
config
},
payload
} = req;
// Query locked global documents only if there are globals in the config
// This type is repeated from DashboardViewServerPropsOnly['globalData'].
// I thought about moving it to a payload to share it, but we're already
// exporting all the views props from the next package.
let globalData = [];
if (config.globals.length > 0) {
if (payload.collections?.['payload-locked-documents']) {
const lockedDocuments = await payload.find({
collection: 'payload-locked-documents',
depth: 1,
overrideAccess: false,
pagination: false,
req,
select: {
globalSlug: true,
updatedAt: true,
user: true
},
where: {
globalSlug: {
exists: true
}
}
});
// Map over globals to include `lockDuration` and lock data for each global slug
globalData = config.globals.map(global => {
const lockDuration = typeof global.lockDocuments === 'object' ? global.lockDocuments.duration : globalLockDurationDefault;
const lockedDoc = lockedDocuments.docs.find(doc => doc.globalSlug === global.slug);
return {
slug: global.slug,
data: {
_isLocked: !!lockedDoc,
_lastEditedAt: lockedDoc?.updatedAt ?? null,
_userEditing: lockedDoc?.user?.value ?? null
},
lockDuration
};
});
} else {
// If locked-documents collection doesn't exist, return globals without lock data
globalData = config.globals.map(global => {
const lockDuration = typeof global.lockDocuments === 'object' ? global.lockDocuments.duration : globalLockDurationDefault;
return {
slug: global.slug,
data: {
_isLocked: false,
_lastEditedAt: null,
_userEditing: null
},
lockDuration
};
});
}
}
return globalData;
}
//# sourceMappingURL=getGlobalData.js.map

View File

@@ -0,0 +1,134 @@
import { KoaInstrumentation } from '@opentelemetry/instrumentation-koa';
import { ATTR_HTTP_ROUTE } from '@opentelemetry/semantic-conventions';
import { spanToJSON, SEMANTIC_ATTRIBUTE_SENTRY_OP, getIsolationScope, getDefaultIsolationScope, debug, defineIntegration, captureException } from '@sentry/core';
import { generateInstrumentOnce, addOriginToSpan, ensureIsWrapped } from '@sentry/node-core';
import { DEBUG_BUILD } from '../../debug-build.js';
const INTEGRATION_NAME = 'Koa';
const instrumentKoa = generateInstrumentOnce(
INTEGRATION_NAME,
KoaInstrumentation,
(options = {}) => {
return {
ignoreLayersType: options.ignoreLayersType ,
requestHook(span, info) {
addOriginToSpan(span, 'auto.http.otel.koa');
const attributes = spanToJSON(span).data;
// this is one of: middleware, router
const type = attributes['koa.type'];
if (type) {
span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_OP, `${type}.koa`);
}
// Also update the name
const name = attributes['koa.name'];
if (typeof name === 'string') {
// Somehow, name is sometimes `''` for middleware spans
// See: https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2220
span.updateName(name || '< unknown >');
}
if (getIsolationScope() === getDefaultIsolationScope()) {
DEBUG_BUILD && debug.warn('Isolation scope is default isolation scope - skipping setting transactionName');
return;
}
const route = attributes[ATTR_HTTP_ROUTE];
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
const method = info.context?.request?.method?.toUpperCase() || 'GET';
if (route) {
getIsolationScope().setTransactionName(`${method} ${route}`);
}
},
} ;
},
);
const _koaIntegration = ((options = {}) => {
return {
name: INTEGRATION_NAME,
setupOnce() {
instrumentKoa(options);
},
};
}) ;
/**
* Adds Sentry tracing instrumentation for [Koa](https://koajs.com/).
*
* If you also want to capture errors, you need to call `setupKoaErrorHandler(app)` after you set up your Koa server.
*
* For more information, see the [koa documentation](https://docs.sentry.io/platforms/javascript/guides/koa/).
*
* @param {KoaOptions} options Configuration options for the Koa integration.
*
* @example
* ```javascript
* const Sentry = require('@sentry/node');
*
* Sentry.init({
* integrations: [Sentry.koaIntegration()],
* })
* ```
*
* @example
* ```javascript
* // To ignore middleware spans
* const Sentry = require('@sentry/node');
*
* Sentry.init({
* integrations: [
* Sentry.koaIntegration({
* ignoreLayersType: ['middleware']
* })
* ],
* })
* ```
*/
const koaIntegration = defineIntegration(_koaIntegration);
/**
* Add an Koa error handler to capture errors to Sentry.
*
* The error handler must be before any other middleware and after all controllers.
*
* @param app The Express instances
* @param options {ExpressHandlerOptions} Configuration options for the handler
*
* @example
* ```javascript
* const Sentry = require('@sentry/node');
* const Koa = require("koa");
*
* const app = new Koa();
*
* Sentry.setupKoaErrorHandler(app);
*
* // Add your routes, etc.
*
* app.listen(3000);
* ```
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const setupKoaErrorHandler = (app) => {
app.use(async (ctx, next) => {
try {
await next();
} catch (error) {
captureException(error, {
mechanism: {
handled: false,
type: 'auto.middleware.koa',
},
});
throw error;
}
});
ensureIsWrapped(app.use, 'koa');
};
export { instrumentKoa, koaIntegration, setupKoaErrorHandler };
//# sourceMappingURL=koa.js.map

View File

@@ -0,0 +1,40 @@
/**
* Creates a proxy for the given object that has its own property
*/ export function isolateObjectProperty(object, key) {
const keys = Array.isArray(key) ? key : [
key
];
const delegate = {};
// Initialize delegate with the keys, if they exist in the original object
for (const k of keys){
if (k in object) {
delegate[k] = object[k];
}
}
const handler = {
deleteProperty (target, p) {
return Reflect.deleteProperty(keys.includes(p) ? delegate : target, p);
},
get (target, p, receiver) {
if (keys.includes(p)) {
return Reflect.get(delegate, p, receiver);
}
// Use target as receiver to preserve private field access (e.g., Request#headers in Node 24+)
return Reflect.get(target, p, target);
},
has (target, p) {
return Reflect.has(keys.includes(p) ? delegate : target, p);
},
set (target, p, newValue, _receiver) {
if (keys.includes(p)) {
// in case of transactionID we must ignore any receiver, because
// "If provided and target does not have a setter for propertyKey, the property will be set on receiver instead."
return Reflect.set(delegate, p, newValue);
}
return Reflect.set(target, p, newValue, target);
}
};
return new Proxy(object, handler);
}
//# sourceMappingURL=isolateObjectProperty.js.map

View File

@@ -0,0 +1,8 @@
function _defineAccessor(e, r, n, t) {
var c = {
configurable: !0,
enumerable: !0
};
return c[e] = t, Object.defineProperty(r, n, c);
}
module.exports = _defineAccessor, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -0,0 +1,80 @@
Prism.languages.c = Prism.languages.extend('clike', {
'comment': {
pattern: /\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,
greedy: true
},
'string': {
// https://en.cppreference.com/w/c/language/string_literal
pattern: /"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,
greedy: true
},
'class-name': {
pattern: /(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,
lookbehind: true
},
'keyword': /\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,
'function': /\b[a-z_]\w*(?=\s*\()/i,
'number': /(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,
'operator': />>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/
});
Prism.languages.insertBefore('c', 'string', {
'char': {
// https://en.cppreference.com/w/c/language/character_constant
pattern: /'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,
greedy: true
}
});
Prism.languages.insertBefore('c', 'string', {
'macro': {
// allow for multiline macro definitions
// spaces after the # character compile fine with gcc
pattern: /(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,
lookbehind: true,
greedy: true,
alias: 'property',
inside: {
'string': [
{
// highlight the path of the include statement as a string
pattern: /^(#\s*include\s*)<[^>]+>/,
lookbehind: true
},
Prism.languages.c['string']
],
'char': Prism.languages.c['char'],
'comment': Prism.languages.c['comment'],
'macro-name': [
{
pattern: /(^#\s*define\s+)\w+\b(?!\()/i,
lookbehind: true
},
{
pattern: /(^#\s*define\s+)\w+\b(?=\()/i,
lookbehind: true,
alias: 'function'
}
],
// highlight macro directives as keywords
'directive': {
pattern: /^(#\s*)[a-z]+/,
lookbehind: true,
alias: 'keyword'
},
'directive-hash': /^#/,
'punctuation': /##|\\(?=[\r\n])/,
'expression': {
pattern: /\S[\s\S]*/,
inside: Prism.languages.c
}
}
}
});
Prism.languages.insertBefore('c', 'function', {
// highlight predefined macros as constants
'constant': /\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/
});
delete Prism.languages.c['boolean'];

View File

@@ -0,0 +1,2 @@
import{throwIfEmpty as e}from"../../utils/throw-if-empty.js";const t=t=>()=>(e(t,`Provider cannot be empty`),{path:`/deployments/${t}`,method:`DELETE`});export{t as deleteDeployment};
//# sourceMappingURL=deployment.js.map

View File

@@ -0,0 +1,65 @@
import { Readable } from "stream";
import { Blob } from 'buffer'
export default BodyReadable
declare class BodyReadable extends Readable {
constructor(
resume?: (this: Readable, size: number) => void | null,
abort?: () => void | null,
contentType?: string
)
/** Consumes and returns the body as a string
* https://fetch.spec.whatwg.org/#dom-body-text
*/
text(): Promise<string>
/** Consumes and returns the body as a JavaScript Object
* https://fetch.spec.whatwg.org/#dom-body-json
*/
json(): Promise<unknown>
/** Consumes and returns the body as a Blob
* https://fetch.spec.whatwg.org/#dom-body-blob
*/
blob(): Promise<Blob>
/** Consumes and returns the body as an Uint8Array
* https://fetch.spec.whatwg.org/#dom-body-bytes
*/
bytes(): Promise<Uint8Array>
/** Consumes and returns the body as an ArrayBuffer
* https://fetch.spec.whatwg.org/#dom-body-arraybuffer
*/
arrayBuffer(): Promise<ArrayBuffer>
/** Not implemented
*
* https://fetch.spec.whatwg.org/#dom-body-formdata
*/
formData(): Promise<never>
/** Returns true if the body is not null and the body has been consumed
*
* Otherwise, returns false
*
* https://fetch.spec.whatwg.org/#dom-body-bodyused
*/
readonly bodyUsed: boolean
/**
* If body is null, it should return null as the body
*
* If body is not null, should return the body as a ReadableStream
*
* https://fetch.spec.whatwg.org/#dom-body-body
*/
readonly body: never | undefined
/** Dumps the response body by reading `limit` number of bytes.
* @param opts.limit Number of bytes to read (optional) - Default: 262144
*/
dump(opts?: { limit: number }): Promise<void>
}

View File

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

View File

@@ -0,0 +1,12 @@
import type { ImportMap, PayloadComponent } from 'payload';
import React from 'react';
export declare const OGImage: React.FC<{
description?: string;
Fallback: React.ComponentType;
fontFamily?: string;
Icon: PayloadComponent;
importMap: ImportMap;
leader?: string;
title?: string;
}>;
//# sourceMappingURL=image.d.ts.map

View File

@@ -0,0 +1,176 @@
import { describe, beforeEach, expect, it, vitest } from 'vitest';
import { addPayloadComponentToImportMap } from './utilities/addPayloadComponentToImportMap.js';
import { getImportMapToBaseDirPath } from './utilities/getImportMapToBaseDirPath.js';
describe('addPayloadComponentToImportMap', ()=>{
let importMap;
let imports;
beforeEach(()=>{
importMap = {};
imports = {};
vitest.restoreAllMocks();
});
function componentPathTest({ baseDir, importMapFilePath, payloadComponent, expectedPath, expectedSpecifier, expectedImportMapToBaseDirPath }) {
const importMapToBaseDirPath = getImportMapToBaseDirPath({
baseDir,
importMapPath: importMapFilePath
});
expect(importMapToBaseDirPath).toBe(expectedImportMapToBaseDirPath);
const { path, specifier } = addPayloadComponentToImportMap({
importMapToBaseDirPath,
importMap,
imports,
payloadComponent
}) ?? {};
expect(path).toBe(expectedPath);
expect(specifier).toBe(expectedSpecifier);
}
it('relative path with import map partially in base dir', ()=>{
componentPathTest({
baseDir: '/myPackage/test/myTest',
importMapFilePath: '/myPackage/app/(payload)/importMap.js',
payloadComponent: './MyComponent.js#MyExport',
expectedImportMapToBaseDirPath: '../../test/myTest/',
expectedPath: '../../test/myTest/MyComponent.js',
expectedSpecifier: 'MyExport'
});
});
it('relative path with import map partially in base dir 2', ()=>{
componentPathTest({
baseDir: '/myPackage/test/myTest',
importMapFilePath: '/myPackage/test/prod/app/(payload)/importMap.js',
payloadComponent: {
path: './MyComponent.js#MyExport'
},
expectedImportMapToBaseDirPath: '../../../myTest/',
expectedPath: '../../../myTest/MyComponent.js',
expectedSpecifier: 'MyExport'
});
});
it('relative path with import map partially in base dir 3', ()=>{
componentPathTest({
baseDir: '/myPackage/test/myTest',
importMapFilePath: '/myPackage/test/prod/app/(payload)/importMap.js',
payloadComponent: {
path: '../otherTest/MyComponent.js',
exportName: 'MyExport'
},
expectedImportMapToBaseDirPath: '../../../myTest/',
expectedPath: '../../../otherTest/MyComponent.js',
expectedSpecifier: 'MyExport'
});
});
it('relative path with import map within base dir', ()=>{
componentPathTest({
baseDir: '/myPackage/test/myTest',
importMapFilePath: '/myPackage/test/myTest/prod/app/(payload)/importMap.js',
payloadComponent: './MyComponent.js#MyExport',
expectedImportMapToBaseDirPath: '../../../',
expectedPath: '../../../MyComponent.js',
expectedSpecifier: 'MyExport'
});
});
it('relative path with import map not in base dir', ()=>{
componentPathTest({
baseDir: '/test/myTest',
importMapFilePath: '/app/(payload)/importMap.js',
payloadComponent: './MyComponent.js#MyExport',
expectedImportMapToBaseDirPath: '../../test/myTest/',
expectedPath: '../../test/myTest/MyComponent.js',
expectedSpecifier: 'MyExport'
});
});
it('relative path with import map not in base dir 2', ()=>{
componentPathTest({
baseDir: '/test/myTest',
importMapFilePath: '/app/(payload)/importMap.js',
payloadComponent: '../myOtherTest/MyComponent.js#MyExport',
expectedImportMapToBaseDirPath: '../../test/myTest/',
expectedPath: '../../test/myOtherTest/MyComponent.js',
expectedSpecifier: 'MyExport'
});
});
it('relative path with import map not in base dir, baseDir ending with slash', ()=>{
componentPathTest({
baseDir: '/test/myTest/',
importMapFilePath: '/app/(payload)/importMap.js',
payloadComponent: './MyComponent.js#MyExport',
expectedImportMapToBaseDirPath: '../../test/myTest/',
expectedPath: '../../test/myTest/MyComponent.js',
expectedSpecifier: 'MyExport'
});
});
it('relative path with import map not in base dir, component starting with slash', ()=>{
componentPathTest({
baseDir: '/test/myTest',
importMapFilePath: '/app/(payload)/importMap.js',
payloadComponent: '/MyComponent.js#MyExport',
expectedImportMapToBaseDirPath: '../../test/myTest/',
expectedPath: '../../test/myTest/MyComponent.js',
expectedSpecifier: 'MyExport'
});
});
it('aliased path', ()=>{
componentPathTest({
baseDir: '/test/myTest',
importMapFilePath: '/app/(payload)/importMap.js',
payloadComponent: '@components/MyComponent.js#MyExport',
expectedImportMapToBaseDirPath: '../../test/myTest/',
expectedPath: '@components/MyComponent.js',
expectedSpecifier: 'MyExport'
});
});
it('aliased path in PayloadComponent object', ()=>{
componentPathTest({
baseDir: '/test/',
importMapFilePath: '/app/(payload)/importMap.js',
payloadComponent: {
path: '@components/MyComponent.js'
},
expectedImportMapToBaseDirPath: '../../test/',
expectedPath: '@components/MyComponent.js',
expectedSpecifier: 'default'
});
});
it('relative path import starting with slash, going up', ()=>{
componentPathTest({
baseDir: '/test/myTest',
importMapFilePath: '/test/myTest/app/importMap.js',
payloadComponent: '/../MyComponent.js#MyExport',
expectedImportMapToBaseDirPath: '../',
expectedPath: '../../MyComponent.js',
expectedSpecifier: 'MyExport'
});
});
it('relative path import starting with dot-slash, going up', ()=>{
componentPathTest({
baseDir: '/test/myTest',
importMapFilePath: '/test/myTest/app/importMap.js',
payloadComponent: './../MyComponent.js#MyExport',
expectedImportMapToBaseDirPath: '../',
expectedPath: '../../MyComponent.js',
expectedSpecifier: 'MyExport'
});
});
it('importMap and baseDir in same directory', ()=>{
componentPathTest({
baseDir: '/test/myTest',
importMapFilePath: '/test/myTest/importMap.js',
payloadComponent: './MyComponent.js#MyExport',
expectedImportMapToBaseDirPath: './',
expectedPath: './MyComponent.js',
expectedSpecifier: 'MyExport'
});
});
it('baseDir within importMap dir', ()=>{
componentPathTest({
baseDir: '/test/myTest/components',
importMapFilePath: '/test/myTest/importMap.js',
payloadComponent: './MyComponent.js#MyExport',
expectedImportMapToBaseDirPath: './components/',
expectedPath: './components/MyComponent.js',
expectedSpecifier: 'MyExport'
});
});
});
//# sourceMappingURL=generateImportMap.spec.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"stretch-vertical.js","sources":["../../../src/icons/stretch-vertical.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name StretchVertical\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iNiIgaGVpZ2h0PSIyMCIgeD0iNCIgeT0iMiIgcng9IjIiIC8+CiAgPHJlY3Qgd2lkdGg9IjYiIGhlaWdodD0iMjAiIHg9IjE0IiB5PSIyIiByeD0iMiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/stretch-vertical\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 StretchVertical = createLucideIcon('StretchVertical', [\n ['rect', { width: '6', height: '20', x: '4', y: '2', rx: '2', key: '19qu7m' }],\n ['rect', { width: '6', height: '20', x: '14', y: '2', rx: '2', key: '24v0nk' }],\n]);\n\nexport default StretchVertical;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAkB,iBAAiB,iBAAmB,CAAA,CAAA,CAAA;AAAA,CAAA,CAC1D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,KAAK,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAC7E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,KAAK,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,GAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAChF,CAAC,CAAA,CAAA;;"}

View File

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

View File

@@ -0,0 +1,40 @@
import type { Where } from 'payload';
import React from 'react';
import type { FieldOption } from '../FieldSelect/reduceFieldOptions.js';
import './index.scss';
import '../../forms/RenderFields/index.scss';
import { type EditManyProps } from './index.js';
type EditManyDrawerContentProps = {
/**
* The total count of selected items
*/
count?: number;
/**
* The slug of the drawer
*/
drawerSlug: string;
/**
* The IDs of the selected items
*/
ids?: (number | string)[];
/**
* The function to call after a successful action
*/
onSuccess?: () => void;
/**
* Whether all items are selected
*/
selectAll?: boolean;
/**
* The fields that are selected to bulk edit
*/
selectedFields: FieldOption[];
/**
* The function to set the selected fields to bulk edit
*/
setSelectedFields: (fields: FieldOption[]) => void;
where?: Where;
} & EditManyProps;
export declare const EditManyDrawerContent: React.FC<EditManyDrawerContentProps>;
export {};
//# sourceMappingURL=DrawerContent.d.ts.map

View File

@@ -0,0 +1,157 @@
'use strict';
const Mailer = require('./mailer');
const shared = require('./shared');
const SMTPPool = require('./smtp-pool');
const SMTPTransport = require('./smtp-transport');
const SendmailTransport = require('./sendmail-transport');
const StreamTransport = require('./stream-transport');
const JSONTransport = require('./json-transport');
const SESTransport = require('./ses-transport');
const nmfetch = require('./fetch');
const packageData = require('../package.json');
const ETHEREAL_API = (process.env.ETHEREAL_API || 'https://api.nodemailer.com').replace(/\/+$/, '');
const ETHEREAL_WEB = (process.env.ETHEREAL_WEB || 'https://ethereal.email').replace(/\/+$/, '');
const ETHEREAL_API_KEY = (process.env.ETHEREAL_API_KEY || '').replace(/\s*/g, '') || null;
const ETHEREAL_CACHE = ['true', 'yes', 'y', '1'].includes((process.env.ETHEREAL_CACHE || 'yes').toString().trim().toLowerCase());
let testAccount = false;
module.exports.createTransport = function (transporter, defaults) {
let urlConfig;
let options;
let mailer;
if (
// provided transporter is a configuration object, not transporter plugin
(typeof transporter === 'object' && typeof transporter.send !== 'function') ||
// provided transporter looks like a connection url
(typeof transporter === 'string' && /^(smtps?|direct):/i.test(transporter))
) {
if ((urlConfig = typeof transporter === 'string' ? transporter : transporter.url)) {
// parse a configuration URL into configuration options
options = shared.parseConnectionUrl(urlConfig);
} else {
options = transporter;
}
if (options.pool) {
transporter = new SMTPPool(options);
} else if (options.sendmail) {
transporter = new SendmailTransport(options);
} else if (options.streamTransport) {
transporter = new StreamTransport(options);
} else if (options.jsonTransport) {
transporter = new JSONTransport(options);
} else if (options.SES) {
if (options.SES.ses && options.SES.aws) {
let error = new Error(
'Using legacy SES configuration, expecting @aws-sdk/client-sesv2, see https://nodemailer.com/transports/ses/'
);
error.code = 'LegacyConfig';
throw error;
}
transporter = new SESTransport(options);
} else {
transporter = new SMTPTransport(options);
}
}
mailer = new Mailer(transporter, options, defaults);
return mailer;
};
module.exports.createTestAccount = function (apiUrl, callback) {
let promise;
if (!callback && typeof apiUrl === 'function') {
callback = apiUrl;
apiUrl = false;
}
if (!callback) {
promise = new Promise((resolve, reject) => {
callback = shared.callbackPromise(resolve, reject);
});
}
if (ETHEREAL_CACHE && testAccount) {
setImmediate(() => callback(null, testAccount));
return promise;
}
apiUrl = apiUrl || ETHEREAL_API;
let chunks = [];
let chunklen = 0;
let requestHeaders = {};
let requestBody = {
requestor: packageData.name,
version: packageData.version
};
if (ETHEREAL_API_KEY) {
requestHeaders.Authorization = 'Bearer ' + ETHEREAL_API_KEY;
}
let req = nmfetch(apiUrl + '/user', {
contentType: 'application/json',
method: 'POST',
headers: requestHeaders,
body: Buffer.from(JSON.stringify(requestBody))
});
req.on('readable', () => {
let chunk;
while ((chunk = req.read()) !== null) {
chunks.push(chunk);
chunklen += chunk.length;
}
});
req.once('error', err => callback(err));
req.once('end', () => {
let res = Buffer.concat(chunks, chunklen);
let data;
let err;
try {
data = JSON.parse(res.toString());
} catch (E) {
err = E;
}
if (err) {
return callback(err);
}
if (data.status !== 'success' || data.error) {
return callback(new Error(data.error || 'Request failed'));
}
delete data.status;
testAccount = data;
callback(null, testAccount);
});
return promise;
};
module.exports.getTestMessageUrl = function (info) {
if (!info || !info.response) {
return false;
}
let infoProps = new Map();
info.response.replace(/\[([^\]]+)\]$/, (m, props) => {
props.replace(/\b([A-Z0-9]+)=([^\s]+)/g, (m, key, value) => {
infoProps.set(key, value);
});
});
if (infoProps.has('STATUS') && infoProps.has('MSGID')) {
return (testAccount.web || ETHEREAL_WEB) + '/message/' + infoProps.get('MSGID');
}
return false;
};

View File

@@ -0,0 +1 @@
{"version":3,"file":"thermometer-sun.js","sources":["../../../src/icons/thermometer-sun.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ThermometerSun\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTIgOWE0IDQgMCAwIDAtMiA3LjUiIC8+CiAgPHBhdGggZD0iTTEyIDN2MiIgLz4KICA8cGF0aCBkPSJtNi42IDE4LjQtMS40IDEuNCIgLz4KICA8cGF0aCBkPSJNMjAgNHYxMC41NGE0IDQgMCAxIDEtNCAwVjRhMiAyIDAgMCAxIDQgMFoiIC8+CiAgPHBhdGggZD0iTTQgMTNIMiIgLz4KICA8cGF0aCBkPSJNNi4zNCA3LjM0IDQuOTMgNS45MyIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/thermometer-sun\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 ThermometerSun = createLucideIcon('ThermometerSun', [\n ['path', { d: 'M12 9a4 4 0 0 0-2 7.5', key: '1jvsq6' }],\n ['path', { d: 'M12 3v2', key: '1w22ol' }],\n ['path', { d: 'm6.6 18.4-1.4 1.4', key: 'w2yidj' }],\n ['path', { d: 'M20 4v10.54a4 4 0 1 1-4 0V4a2 2 0 0 1 4 0Z', key: 'iof6y5' }],\n ['path', { d: 'M4 13H2', key: '118le4' }],\n ['path', { d: 'M6.34 7.34 4.93 5.93', key: '1brd51' }],\n]);\n\nexport default ThermometerSun;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAiB,iBAAiB,gBAAkB,CAAA,CAAA,CAAA;AAAA,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAyB,CAAA,CAAA,CAAA,CAAA,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,CACtD,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,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,CAA8C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAC3E,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,CAAwB,CAAA,CAAA,CAAA,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;AACvD,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,57 @@
import { withScope, httpRequestToRequestData, captureException } from '@sentry/core';
import { waitUntil, flushSafelyWithTimeout } from '../utils/responseEnd.js';
/**
* Capture the exception passed by nextjs to the `_error` page, adding context data as appropriate.
*
* This will not capture the exception if the status code is < 500 or if the pathname is not provided and will thus not return an event ID.
*
* @param contextOrProps The data passed to either `getInitialProps` or `render` by nextjs
* @returns The Sentry event ID, or `undefined` if no event was captured
*/
async function captureUnderscoreErrorException(contextOrProps) {
const { req, res, err } = contextOrProps;
// 404s (and other 400-y friends) can trigger `_error`, but we don't want to send them to Sentry
const statusCode = res?.statusCode || contextOrProps.statusCode;
if (statusCode && statusCode < 500) {
return;
}
// In previous versions of the suggested `_error.js` page in which this function is meant to be used, there was a
// workaround for https://github.com/vercel/next.js/issues/8592 which involved an extra call to this function, in the
// custom error component's `render` method, just in case it hadn't been called by `getInitialProps`. Now that that
// issue has been fixed, the second call is unnecessary, but since it lives in user code rather than our code, users
// have to be the ones to get rid of it, and guaraneteedly, not all of them will. So, rather than capture the error
// twice, we just bail if we sense we're in that now-extraneous second call. (We can tell which function we're in
// because Nextjs passes `pathname` to `getInitialProps` but not to `render`.)
if (!contextOrProps.pathname) {
return;
}
const eventId = withScope(scope => {
if (req) {
const normalizedRequest = httpRequestToRequestData(req);
scope.setSDKProcessingMetadata({ normalizedRequest });
}
// If third-party libraries (or users themselves) throw something falsy, we want to capture it as a message (which
// is what passing a string to `captureException` will wind up doing)
return captureException(err || `_error.js called with falsy error (${err})`, {
mechanism: {
type: 'auto.function.nextjs.underscore_error',
handled: false,
data: {
function: '_error.getInitialProps',
},
},
});
});
waitUntil(flushSafelyWithTimeout());
return eventId;
}
export { captureUnderscoreErrorException };
//# sourceMappingURL=_error.js.map

View File

@@ -0,0 +1 @@
Prism.languages.basic={comment:{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},string:{pattern:/"(?:""|[!#$%&'()*,\/:;<=>?^\w +\-.])*"/,greedy:!0},number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,keyword:/\b(?:AS|BEEP|BLOAD|BSAVE|CALL(?: ABSOLUTE)?|CASE|CHAIN|CHDIR|CLEAR|CLOSE|CLS|COM|COMMON|CONST|DATA|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DIM|DO|DOUBLE|ELSE|ELSEIF|END|ENVIRON|ERASE|ERROR|EXIT|FIELD|FILES|FOR|FUNCTION|GET|GOSUB|GOTO|IF|INPUT|INTEGER|IOCTL|KEY|KILL|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|MKDIR|NAME|NEXT|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPTION BASE|OUT|POKE|PUT|READ|REDIM|REM|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SELECT CASE|SHARED|SHELL|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|SUB|SWAP|SYSTEM|THEN|TIMER|TO|TROFF|TRON|TYPE|UNLOCK|UNTIL|USING|VIEW PRINT|WAIT|WEND|WHILE|WRITE)(?:\$|\b)/i,function:/\b(?:ABS|ACCESS|ACOS|ANGLE|AREA|ARITHMETIC|ARRAY|ASIN|ASK|AT|ATN|BASE|BEGIN|BREAK|CAUSE|CEIL|CHR|CLIP|COLLATE|COLOR|CON|COS|COSH|COT|CSC|DATE|DATUM|DEBUG|DECIMAL|DEF|DEG|DEGREES|DELETE|DET|DEVICE|DISPLAY|DOT|ELAPSED|EPS|ERASABLE|EXLINE|EXP|EXTERNAL|EXTYPE|FILETYPE|FIXED|FP|GO|GRAPH|HANDLER|IDN|IMAGE|IN|INT|INTERNAL|IP|IS|KEYED|LBOUND|LCASE|LEFT|LEN|LENGTH|LET|LINE|LINES|LOG|LOG10|LOG2|LTRIM|MARGIN|MAT|MAX|MAXNUM|MID|MIN|MISSING|MOD|NATIVE|NUL|NUMERIC|OF|OPTION|ORD|ORGANIZATION|OUTIN|OUTPUT|PI|POINT|POINTER|POINTS|POS|PRINT|PROGRAM|PROMPT|RAD|RADIANS|RANDOMIZE|RECORD|RECSIZE|RECTYPE|RELATIVE|REMAINDER|REPEAT|REST|RETRY|REWRITE|RIGHT|RND|ROUND|RTRIM|SAME|SEC|SELECT|SEQUENTIAL|SET|SETTER|SGN|SIN|SINH|SIZE|SKIP|SQR|STANDARD|STATUS|STR|STREAM|STYLE|TAB|TAN|TANH|TEMPLATE|TEXT|THERE|TIME|TIMEOUT|TRACE|TRANSFORM|TRUNCATE|UBOUND|UCASE|USE|VAL|VARIABLE|VIEWPORT|WHEN|WINDOW|WITH|ZER|ZONEWIDTH)(?:\$|\b)/i,operator:/<[=>]?|>=?|[+\-*\/^=&]|\b(?:AND|EQV|IMP|NOT|OR|XOR)\b/i,punctuation:/[,;:()]/};

View File

@@ -0,0 +1,2 @@
const e=require(`../../utils/throw-if-empty.cjs`),t=require(`../../utils/throw-core-collection.cjs`),n=(n,r)=>()=>(e.throwIfEmpty(String(n),`Collection cannot be empty`),t.throwIfCoreCollection(n,`Cannot use readSingleton for core collections`),{path:`/items/${n}`,params:r??{},method:`GET`});exports.readSingleton=n;
//# sourceMappingURL=singleton.cjs.map

View File

@@ -0,0 +1,149 @@
import {isPlainObject} from 'lodash'
import {isCompound, JSONSchema, SchemaType} from './types/JSONSchema'
/**
* Duck types a JSONSchema schema or property to determine which kind of AST node to parse it into.
*
* Due to what some might say is an oversight in the JSON-Schema spec, a given schema may
* implicitly be an *intersection* of multiple JSON-Schema directives (ie. multiple TypeScript
* types). The spec leaves it up to implementations to decide what to do with this
* loosely-defined behavior.
*/
export function typesOfSchema(schema: JSONSchema): Set<SchemaType> {
// tsType is an escape hatch that supercedes all other directives
if (schema.tsType) {
return new Set(['CUSTOM_TYPE'])
}
// Collect matched types
const matchedTypes = new Set<SchemaType>()
for (const [schemaType, f] of Object.entries(matchers)) {
if (f(schema)) {
matchedTypes.add(schemaType as SchemaType)
}
}
// Default to an unnamed schema
if (!matchedTypes.size) {
matchedTypes.add('UNNAMED_SCHEMA')
}
return matchedTypes
}
const matchers: Record<SchemaType, (schema: JSONSchema) => boolean> = {
ALL_OF(schema) {
return 'allOf' in schema
},
ANY(schema) {
if (Object.keys(schema).length === 0) {
// The empty schema {} validates any value
// @see https://json-schema.org/draft-07/json-schema-core.html#rfc.section.4.3.1
return true
}
return schema.type === 'any'
},
ANY_OF(schema) {
return 'anyOf' in schema
},
BOOLEAN(schema) {
if ('enum' in schema) {
return false
}
if (schema.type === 'boolean') {
return true
}
if (!isCompound(schema) && typeof schema.default === 'boolean') {
return true
}
return false
},
CUSTOM_TYPE() {
return false // Explicitly handled before we try to match
},
NAMED_ENUM(schema) {
return 'enum' in schema && 'tsEnumNames' in schema
},
NAMED_SCHEMA(schema) {
// 8.2.1. The presence of "$id" in a subschema indicates that the subschema constitutes a distinct schema resource within a single schema document.
return '$id' in schema && ('patternProperties' in schema || 'properties' in schema)
},
NEVER(schema: JSONSchema | boolean) {
return schema === false
},
NULL(schema) {
return schema.type === 'null'
},
NUMBER(schema) {
if ('enum' in schema) {
return false
}
if (schema.type === 'integer' || schema.type === 'number') {
return true
}
if (!isCompound(schema) && typeof schema.default === 'number') {
return true
}
return false
},
OBJECT(schema) {
return (
schema.type === 'object' &&
!isPlainObject(schema.additionalProperties) &&
!schema.allOf &&
!schema.anyOf &&
!schema.oneOf &&
!schema.patternProperties &&
!schema.properties &&
!schema.required
)
},
ONE_OF(schema) {
return 'oneOf' in schema
},
REFERENCE(schema) {
return '$ref' in schema
},
STRING(schema) {
if ('enum' in schema) {
return false
}
if (schema.type === 'string') {
return true
}
if (!isCompound(schema) && typeof schema.default === 'string') {
return true
}
return false
},
TYPED_ARRAY(schema) {
if (schema.type && schema.type !== 'array') {
return false
}
return 'items' in schema
},
UNION(schema) {
return Array.isArray(schema.type)
},
UNNAMED_ENUM(schema) {
if ('tsEnumNames' in schema) {
return false
}
if (
schema.type &&
schema.type !== 'boolean' &&
schema.type !== 'integer' &&
schema.type !== 'number' &&
schema.type !== 'string'
) {
return false
}
return 'enum' in schema
},
UNNAMED_SCHEMA() {
return false // Explicitly handled as the default case
},
UNTYPED_ARRAY(schema) {
return schema.type === 'array' && !('items' in schema)
},
}

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