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,107 @@
import type { SourceMapSegment } from './sourcemap-segment.cts';
import type { GREATEST_LOWER_BOUND, LEAST_UPPER_BOUND, TraceMap } from './trace-mapping.cts';
export interface SourceMapV3 {
file?: string | null;
names: string[];
sourceRoot?: string;
sources: (string | null)[];
sourcesContent?: (string | null)[];
version: 3;
ignoreList?: number[];
}
export interface EncodedSourceMap extends SourceMapV3 {
mappings: string;
}
export interface DecodedSourceMap extends SourceMapV3 {
mappings: SourceMapSegment[][];
}
export interface Section {
offset: {
line: number;
column: number;
};
map: EncodedSourceMap | DecodedSourceMap | SectionedSourceMap;
}
export interface SectionedSourceMap {
file?: string | null;
sections: Section[];
version: 3;
}
export type OriginalMapping = {
source: string | null;
line: number;
column: number;
name: string | null;
};
export type InvalidOriginalMapping = {
source: null;
line: null;
column: null;
name: null;
};
export type GeneratedMapping = {
line: number;
column: number;
};
export type InvalidGeneratedMapping = {
line: null;
column: null;
};
export type Bias = typeof GREATEST_LOWER_BOUND | typeof LEAST_UPPER_BOUND;
export type XInput = {
x_google_ignoreList?: SourceMapV3['ignoreList'];
};
export type EncodedSourceMapXInput = EncodedSourceMap & XInput;
export type DecodedSourceMapXInput = DecodedSourceMap & XInput;
export type SectionedSourceMapXInput = Omit<SectionedSourceMap, 'sections'> & {
sections: SectionXInput[];
};
export type SectionXInput = Omit<Section, 'map'> & {
map: SectionedSourceMapInput;
};
export type SourceMapInput = string | EncodedSourceMapXInput | DecodedSourceMapXInput | TraceMap;
export type SectionedSourceMapInput = SourceMapInput | SectionedSourceMapXInput;
export type Needle = {
line: number;
column: number;
bias?: Bias;
};
export type SourceNeedle = {
source: string;
line: number;
column: number;
bias?: Bias;
};
export type EachMapping = {
generatedLine: number;
generatedColumn: number;
source: null;
originalLine: null;
originalColumn: null;
name: null;
} | {
generatedLine: number;
generatedColumn: number;
source: string | null;
originalLine: number;
originalColumn: number;
name: string | null;
};
export declare abstract class SourceMap {
version: SourceMapV3['version'];
file: SourceMapV3['file'];
names: SourceMapV3['names'];
sourceRoot: SourceMapV3['sourceRoot'];
sources: SourceMapV3['sources'];
sourcesContent: SourceMapV3['sourcesContent'];
resolvedSources: SourceMapV3['sources'];
ignoreList: SourceMapV3['ignoreList'];
}
export type Ro<T> = T extends Array<infer V> ? V[] | Readonly<V[]> | RoArray<V> | Readonly<RoArray<V>> : T extends object ? T | Readonly<T> | RoObject<T> | Readonly<RoObject<T>> : T;
type RoArray<T> = Ro<T>[];
type RoObject<T> = {
[K in keyof T]: T[K] | Ro<T[K]>;
};
export declare function parse<T>(map: T): Exclude<T, string>;
export {};
//# sourceMappingURL=types.d.ts.map

View File

@@ -0,0 +1,94 @@
/**
* Copyright (c) 2017, Dirk-Jan Rutten
* All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
import { GraphQLScalarType, Kind } from 'graphql';
import { createGraphQLError } from '../../error.js';
import { parseDateTime } from './formatter.js';
// eslint-disable-line
import { validateDateTime, validateJSDate } from './validator.js';
export const GraphQLDateTimeConfig = /*#__PURE__*/ {
name: 'DateTime',
description: 'A date-time string at UTC, such as 2007-12-03T10:15:30Z, ' +
'compliant with the `date-time` format outlined in section 5.6 of ' +
'the RFC 3339 profile of the ISO 8601 standard for representation ' +
'of dates and times using the Gregorian calendar.',
serialize(value) {
if (value instanceof Date) {
if (validateJSDate(value)) {
return value;
}
throw createGraphQLError('DateTime cannot represent an invalid Date instance');
}
else if (typeof value === 'string') {
if (validateDateTime(value)) {
return parseDateTime(value);
}
throw createGraphQLError(`DateTime cannot represent an invalid date-time-string ${value}.`);
}
else if (typeof value === 'number') {
try {
return new Date(value);
}
catch (e) {
throw createGraphQLError('DateTime cannot represent an invalid Unix timestamp ' + value);
}
}
else {
throw createGraphQLError('DateTime cannot be serialized from a non string, ' +
'non numeric or non Date type ' +
JSON.stringify(value));
}
},
parseValue(value) {
if (value instanceof Date) {
if (validateJSDate(value)) {
return value;
}
throw createGraphQLError('DateTime cannot represent an invalid Date instance');
}
if (typeof value === 'string') {
if (validateDateTime(value)) {
return parseDateTime(value);
}
throw createGraphQLError(`DateTime cannot represent an invalid date-time-string ${value}.`);
}
throw createGraphQLError(`DateTime cannot represent non string or Date type ${JSON.stringify(value)}`);
},
parseLiteral(ast) {
if (ast.kind !== Kind.STRING) {
throw createGraphQLError(`DateTime cannot represent non string or Date type ${'value' in ast && ast.value}`, {
nodes: ast,
});
}
const { value } = ast;
if (validateDateTime(value)) {
return parseDateTime(value);
}
throw createGraphQLError(`DateTime cannot represent an invalid date-time-string ${String(value)}.`, { nodes: ast });
},
extensions: {
codegenScalarType: 'Date | string',
jsonSchema: {
type: 'string',
format: 'date-time',
},
},
};
/**
* An RFC 3339 compliant date-time scalar.
*
* Input:
* This scalar takes an RFC 3339 date-time string as input and
* parses it to a javascript Date.
*
* Output:
* This scalar serializes javascript Dates,
* RFC 3339 date-time strings and unix timestamps
* to RFC 3339 UTC date-time strings.
*/
export const GraphQLDateTime = /*#__PURE__*/ new GraphQLScalarType(GraphQLDateTimeConfig);

View File

@@ -0,0 +1,73 @@
#ifndef WATCHER_H
#define WATCHER_H
#include <condition_variable>
#include <unordered_set>
#include <set>
#include <node_api.h>
#include "Glob.hh"
#include "Event.hh"
#include "Debounce.hh"
#include "DirTree.hh"
#include "Signal.hh"
using namespace Napi;
struct Watcher;
using WatcherRef = std::shared_ptr<Watcher>;
struct Callback {
Napi::ThreadSafeFunction tsfn;
Napi::FunctionReference ref;
std::thread::id threadId;
};
class WatcherState {
public:
virtual ~WatcherState() = default;
};
struct Watcher {
std::string mDir;
std::unordered_set<std::string> mIgnorePaths;
std::unordered_set<Glob> mIgnoreGlobs;
EventList mEvents;
std::shared_ptr<WatcherState> state;
Watcher(std::string dir, std::unordered_set<std::string> ignorePaths, std::unordered_set<Glob> ignoreGlobs);
~Watcher();
bool operator==(const Watcher &other) const {
return mDir == other.mDir && mIgnorePaths == other.mIgnorePaths && mIgnoreGlobs == other.mIgnoreGlobs;
}
void wait();
void notify();
void notifyError(std::exception &err);
bool watch(Function callback);
bool unwatch(Function callback);
void unref();
bool isIgnored(std::string path);
void destroy();
static WatcherRef getShared(std::string dir, std::unordered_set<std::string> ignorePaths, std::unordered_set<Glob> ignoreGlobs);
private:
std::mutex mMutex;
std::condition_variable mCond;
std::vector<Callback> mCallbacks;
std::shared_ptr<Debounce> mDebounce;
std::vector<Callback>::iterator findCallback(Function callback);
void clearCallbacks();
void triggerCallbacks();
};
class WatcherError : public std::runtime_error {
public:
WatcherRef mWatcher;
WatcherError(std::string msg, WatcherRef watcher) : std::runtime_error(msg), mWatcher(watcher) {}
WatcherError(const char *msg, WatcherRef watcher) : std::runtime_error(msg), mWatcher(watcher) {}
};
#endif

View File

@@ -0,0 +1,41 @@
"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.detectResources = void 0;
const api_1 = require("@opentelemetry/api");
const ResourceImpl_1 = require("./ResourceImpl");
/**
* Runs all resource detectors and returns the results merged into a single Resource.
*
* @param config Configuration for resource detection
*/
const detectResources = (config = {}) => {
const resources = (config.detectors || []).map(d => {
try {
const resource = (0, ResourceImpl_1.resourceFromDetectedResource)(d.detect(config));
api_1.diag.debug(`${d.constructor.name} found resource.`, resource);
return resource;
}
catch (e) {
api_1.diag.debug(`${d.constructor.name} failed: ${e.message}`);
return (0, ResourceImpl_1.emptyResource)();
}
});
return resources.reduce((acc, resource) => acc.merge(resource), (0, ResourceImpl_1.emptyResource)());
};
exports.detectResources = detectResources;
//# sourceMappingURL=detect-resources.js.map

View File

@@ -0,0 +1 @@
exports._default = require("./emotion-react-_isolated-hnrs.development.edge-light.cjs.js").default;

View File

@@ -0,0 +1,23 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
module.exports = {
/**
* @type {Record<string, string>}
*/
versions: {},
// eslint-disable-next-line jsdoc/reject-function-type
/** @param {Function} fn function */
nextTick(fn) {
// eslint-disable-next-line prefer-rest-params
const args = Array.prototype.slice.call(arguments, 1);
Promise.resolve().then(() => {
// eslint-disable-next-line prefer-spread
fn.apply(null, args);
});
},
};

View File

@@ -0,0 +1,33 @@
export type HandlerOriginal = ((request: FastifyRequest, reply: FastifyReply, done: HookHandlerDoneFunction) => Promise<void>) | ((request: FastifyRequest, reply: FastifyReply, done: HookHandlerDoneFunction) => void);
export type FastifyError = any;
export type HookHandlerDoneFunction = <TError extends Error = FastifyError>(err?: TError) => void;
export type FastifyErrorCodes = any;
export type FastifyPlugin = (instance: FastifyInstance, opts: any, done: HookHandlerDoneFunction) => unknown | Promise<unknown>;
export interface FastifyInstance {
version: string;
register: (plugin: any) => FastifyInstance;
after: (listener?: (err: Error) => void) => FastifyInstance;
addHook(hook: string, handler: HandlerOriginal): FastifyInstance;
addHook(hook: 'onError', handler: (request: FastifyRequest, reply: FastifyReply, error: Error) => void): FastifyInstance;
addHook(hook: 'onRequest', handler: (request: FastifyRequest, reply: FastifyReply) => void): FastifyInstance;
}
/**
* Minimal type for `setupFastifyErrorHandler` parameter.
* Uses structural typing without overloads to avoid exactOptionalPropertyTypes issues.
* https://github.com/getsentry/sentry-javascript/issues/18619
*/
export type FastifyMinimal = {
register: (plugin: (instance: any, opts: any, done: () => void) => void) => unknown;
};
export interface FastifyReply {
send: () => FastifyReply;
statusCode: number;
}
export interface FastifyRequest {
method?: string;
routeOptions?: {
url?: string;
};
routerPath?: string;
}
//# sourceMappingURL=types.d.ts.map

View File

@@ -0,0 +1,3 @@
export * from './index.js';
//# sourceMappingURL=types.js.map

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"useThrottledValue.d.ts","sourceRoot":"","sources":["../../src/hooks/useThrottledValue.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,KAAA,EAAE,KAAK,KAAA,OAe7C"}

View File

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

View File

@@ -0,0 +1,13 @@
import type { ASTVisitor } from '../../language/visitor';
import type { ASTValidationContext } from '../ValidationContext';
/**
* Executable definitions
*
* A GraphQL document is only valid for execution if all definitions are either
* operation or fragment definitions.
*
* See https://spec.graphql.org/draft/#sec-Executable-Definitions
*/
export declare function ExecutableDefinitionsRule(
context: ASTValidationContext,
): ASTVisitor;

View File

@@ -0,0 +1,3 @@
export * from "./expressions/index.cjs";
export * from "./functions/index.cjs";
export * from "./sql.cjs";

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/elements/DatePicker/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAyB,MAAM,OAAO,CAAA;AAE7C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAMvC,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAI3C,CAAA"}

View File

@@ -0,0 +1 @@
import{cache as t}from"react";import o from"./getConfig.js";const r=t((async function(){return(await o()).formats}));export{r as default};

View File

@@ -0,0 +1 @@
{"version":3,"file":"border.js","sourceRoot":"","sources":["../../../src/render/border.ts"],"names":[],"mappings":";;;AAEA,+CAA6C;AAEtC,IAAM,kBAAkB,GAAG,UAAC,MAAmB,EAAE,UAAkB;IACtE,QAAQ,UAAU,EAAE;QAChB,KAAK,CAAC;YACF,OAAO,oBAAoB,CACvB,MAAM,CAAC,gBAAgB,EACvB,MAAM,CAAC,iBAAiB,EACxB,MAAM,CAAC,iBAAiB,EACxB,MAAM,CAAC,kBAAkB,CAC5B,CAAC;QACN,KAAK,CAAC;YACF,OAAO,oBAAoB,CACvB,MAAM,CAAC,iBAAiB,EACxB,MAAM,CAAC,kBAAkB,EACzB,MAAM,CAAC,oBAAoB,EAC3B,MAAM,CAAC,qBAAqB,CAC/B,CAAC;QACN,KAAK,CAAC;YACF,OAAO,oBAAoB,CACvB,MAAM,CAAC,oBAAoB,EAC3B,MAAM,CAAC,qBAAqB,EAC5B,MAAM,CAAC,mBAAmB,EAC1B,MAAM,CAAC,oBAAoB,CAC9B,CAAC;QACN,KAAK,CAAC,CAAC;QACP;YACI,OAAO,oBAAoB,CACvB,MAAM,CAAC,mBAAmB,EAC1B,MAAM,CAAC,oBAAoB,EAC3B,MAAM,CAAC,gBAAgB,EACvB,MAAM,CAAC,iBAAiB,CAC3B,CAAC;KACT;AACL,CAAC,CAAC;AAhCW,QAAA,kBAAkB,sBAgC7B;AAEK,IAAM,6BAA6B,GAAG,UAAC,MAAmB,EAAE,UAAkB;IACjF,QAAQ,UAAU,EAAE;QAChB,KAAK,CAAC;YACF,OAAO,oBAAoB,CACvB,MAAM,CAAC,gBAAgB,EACvB,MAAM,CAAC,2BAA2B,EAClC,MAAM,CAAC,iBAAiB,EACxB,MAAM,CAAC,4BAA4B,CACtC,CAAC;QACN,KAAK,CAAC;YACF,OAAO,oBAAoB,CACvB,MAAM,CAAC,iBAAiB,EACxB,MAAM,CAAC,4BAA4B,EACnC,MAAM,CAAC,oBAAoB,EAC3B,MAAM,CAAC,+BAA+B,CACzC,CAAC;QACN,KAAK,CAAC;YACF,OAAO,oBAAoB,CACvB,MAAM,CAAC,oBAAoB,EAC3B,MAAM,CAAC,+BAA+B,EACtC,MAAM,CAAC,mBAAmB,EAC1B,MAAM,CAAC,8BAA8B,CACxC,CAAC;QACN,KAAK,CAAC,CAAC;QACP;YACI,OAAO,oBAAoB,CACvB,MAAM,CAAC,mBAAmB,EAC1B,MAAM,CAAC,8BAA8B,EACrC,MAAM,CAAC,gBAAgB,EACvB,MAAM,CAAC,2BAA2B,CACrC,CAAC;KACT;AACL,CAAC,CAAC;AAhCW,QAAA,6BAA6B,iCAgCxC;AAEK,IAAM,6BAA6B,GAAG,UAAC,MAAmB,EAAE,UAAkB;IACjF,QAAQ,UAAU,EAAE;QAChB,KAAK,CAAC;YACF,OAAO,oBAAoB,CACvB,MAAM,CAAC,2BAA2B,EAClC,MAAM,CAAC,iBAAiB,EACxB,MAAM,CAAC,4BAA4B,EACnC,MAAM,CAAC,kBAAkB,CAC5B,CAAC;QACN,KAAK,CAAC;YACF,OAAO,oBAAoB,CACvB,MAAM,CAAC,4BAA4B,EACnC,MAAM,CAAC,kBAAkB,EACzB,MAAM,CAAC,+BAA+B,EACtC,MAAM,CAAC,qBAAqB,CAC/B,CAAC;QACN,KAAK,CAAC;YACF,OAAO,oBAAoB,CACvB,MAAM,CAAC,+BAA+B,EACtC,MAAM,CAAC,qBAAqB,EAC5B,MAAM,CAAC,8BAA8B,EACrC,MAAM,CAAC,oBAAoB,CAC9B,CAAC;QACN,KAAK,CAAC,CAAC;QACP;YACI,OAAO,oBAAoB,CACvB,MAAM,CAAC,8BAA8B,EACrC,MAAM,CAAC,oBAAoB,EAC3B,MAAM,CAAC,2BAA2B,EAClC,MAAM,CAAC,iBAAiB,CAC3B,CAAC;KACT;AACL,CAAC,CAAC;AAhCW,QAAA,6BAA6B,iCAgCxC;AAEK,IAAM,wBAAwB,GAAG,UAAC,MAAmB,EAAE,UAAkB;IAC5E,QAAQ,UAAU,EAAE;QAChB,KAAK,CAAC;YACF,OAAO,0BAA0B,CAAC,MAAM,CAAC,mBAAmB,EAAE,MAAM,CAAC,oBAAoB,CAAC,CAAC;QAC/F,KAAK,CAAC;YACF,OAAO,0BAA0B,CAAC,MAAM,CAAC,oBAAoB,EAAE,MAAM,CAAC,uBAAuB,CAAC,CAAC;QACnG,KAAK,CAAC;YACF,OAAO,0BAA0B,CAAC,MAAM,CAAC,uBAAuB,EAAE,MAAM,CAAC,sBAAsB,CAAC,CAAC;QACrG,KAAK,CAAC,CAAC;QACP;YACI,OAAO,0BAA0B,CAAC,MAAM,CAAC,sBAAsB,EAAE,MAAM,CAAC,mBAAmB,CAAC,CAAC;KACpG;AACL,CAAC,CAAC;AAZW,QAAA,wBAAwB,4BAYnC;AAEF,IAAM,0BAA0B,GAAG,UAAC,MAAY,EAAE,MAAY;IAC1D,IAAM,IAAI,GAAG,EAAE,CAAC;IAChB,IAAI,4BAAa,CAAC,MAAM,CAAC,EAAE;QACvB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;KAC3C;SAAM;QACH,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;KACrB;IAED,IAAI,4BAAa,CAAC,MAAM,CAAC,EAAE;QACvB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC;KAC1C;SAAM;QACH,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;KACrB;IAED,OAAO,IAAI,CAAC;AAChB,CAAC,CAAC;AAEF,IAAM,oBAAoB,GAAG,UAAC,MAAY,EAAE,MAAY,EAAE,MAAY,EAAE,MAAY;IAChF,IAAM,IAAI,GAAG,EAAE,CAAC;IAChB,IAAI,4BAAa,CAAC,MAAM,CAAC,EAAE;QACvB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;KAC3C;SAAM;QACH,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;KACrB;IAED,IAAI,4BAAa,CAAC,MAAM,CAAC,EAAE;QACvB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC;KAC1C;SAAM;QACH,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;KACrB;IAED,IAAI,4BAAa,CAAC,MAAM,CAAC,EAAE;QACvB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;KACpD;SAAM;QACH,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;KACrB;IAED,IAAI,4BAAa,CAAC,MAAM,CAAC,EAAE;QACvB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;KACrD;SAAM;QACH,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;KACrB;IAED,OAAO,IAAI,CAAC;AAChB,CAAC,CAAC"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"wrapperUtils.d.ts","sourceRoot":"","sources":["../../../../src/common/utils/wrapperUtils.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AAG5D;;;;GAIG;AAEH,wBAAgB,wBAAwB,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EACxE,YAAY,EAAE,CAAC,GACd,CAAC,GAAG,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CActD;AAED;;;;;;;;;;;;;GAaG;AAEH,wBAAgB,+BAA+B,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC,GAAG,CAAC,GAAG,GAAG,EAC9F,eAAe,EAAE,CAAC,EAClB,GAAG,EAAE,eAAe,EACpB,GAAG,EAAE,cAAc,EACnB,OAAO,EAAE;IACP,oFAAoF;IACpF,kBAAkB,EAAE,MAAM,CAAC;IAC3B,+GAA+G;IAC/G,oBAAoB,EAAE,MAAM,CAAC;IAC7B,8FAA8F;IAC9F,sBAAsB,EAAE,MAAM,CAAC;CAChC,GACA,CAAC,GAAG,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC;IAAE,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAyBxG;AAED;;;;;GAKG;AAEH,wBAAsB,qBAAqB,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC,GAAG,CAAC,GAAG,GAAG,EAC1F,YAAY,EAAE,CAAC,EACf,gBAAgB,EAAE,UAAU,CAAC,CAAC,CAAC,GAC9B,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAOxB;AAED;;;;GAIG;AACH,wBAAgB,4CAA4C,CAAC,KAAK,EAAE,OAAO,GAAG;IAC5E,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC;IAC3C,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC;CAClD,CAkBA"}

View File

@@ -0,0 +1,21 @@
"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.UndiciInstrumentation = void 0;
var undici_1 = require("./undici");
Object.defineProperty(exports, "UndiciInstrumentation", { enumerable: true, get: function () { return undici_1.UndiciInstrumentation; } });
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/core/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAE5D;;;;GAIG;AACH,MAAM,WAAW,6BAA8B,SAAQ,IAAI,CACzD,OAAO,CAAC,uBAAuB,CAAC,EAChC,YAAY,GAAG,WAAW,CAC3B;IACC,UAAU,CAAC,EAAE,OAAO,CAAC,uBAAuB,CAAC,YAAY,CAAC,CAAC,CAAC;IAC5D,SAAS,CAAC,EAAE,OAAO,CAAC,uBAAuB,CAAC,YAAY,CAAC,CAAC,CAAC;CAC5D;AAED;;;;GAIG;AACH,MAAM,MAAM,6BAA6B,GAAG,IAAI,CAAC,OAAO,CAAC,uBAAuB,CAAC,EAAE,YAAY,GAAG,WAAW,CAAC,CAAC"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"clock-2.js","sources":["../../../src/icons/clock-2.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Clock2\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMCIgLz4KICA8cG9seWxpbmUgcG9pbnRzPSIxMiA2IDEyIDEyIDE2IDEwIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/clock-2\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Clock2 = createLucideIcon('Clock2', [\n ['circle', { cx: '12', cy: '12', r: '10', key: '1mglay' }],\n ['polyline', { points: '12 6 12 12 16 10', key: '1g230d' }],\n]);\n\nexport default Clock2;\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,CACxC,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACzD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,CAAA,CAAA,CAAA,CAAE,QAAQ,CAAoB,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;AAC5D,CAAC,CAAA,CAAA;;"}

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"getNavPrefs.d.ts","sourceRoot":"","sources":["../../../src/elements/Nav/getNavPrefs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAK7D,eAAO,MAAM,WAAW,QAAqB,cAAc,KAAG,OAAO,CAAC,cAAc,CA+BlF,CAAA"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"sendFeedback.d.ts","sourceRoot":"","sources":["../../../../src/types-hoist/feedback/sendFeedback.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAEpC;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,UAAU,eAAgB,SAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACvD,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,aAAc,SAAQ,KAAK;IAC1C,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE,KAAK,CAAC,UAAU,CAAC,GAAG;QAC5B,QAAQ,EAAE,eAAe,CAAC;KAC3B,CAAC;CACH;AAED,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,IAAI,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,CAAC;CACrC;AAED,MAAM,MAAM,YAAY,GAAG,CACzB,MAAM,EAAE,kBAAkB,EAC1B,IAAI,CAAC,EAAE,SAAS,GAAG;IAAE,aAAa,CAAC,EAAE,OAAO,CAAA;CAAE,KAC3C,OAAO,CAAC,MAAM,CAAC,CAAC"}

View File

@@ -0,0 +1,165 @@
import { __spreadArray } from "tslib";
import { data as jsonData } from './languageMatching';
import { regions } from './regions.generated';
export var UNICODE_EXTENSION_SEQUENCE_REGEX = /-u(?:-[0-9a-z]{2,8})+/gi;
export function invariant(condition, message, Err) {
if (Err === void 0) { Err = Error; }
if (!condition) {
throw new Err(message);
}
}
// This is effectively 2 languages in 2 different regions in the same cluster
var DEFAULT_MATCHING_THRESHOLD = 838;
var PROCESSED_DATA;
function processData() {
var _a, _b;
if (!PROCESSED_DATA) {
var paradigmLocales = (_b = (_a = jsonData.supplemental.languageMatching['written-new'][0]) === null || _a === void 0 ? void 0 : _a.paradigmLocales) === null || _b === void 0 ? void 0 : _b._locales.split(' ');
var matchVariables = jsonData.supplemental.languageMatching['written-new'].slice(1, 5);
var data = jsonData.supplemental.languageMatching['written-new'].slice(5);
var matches = data.map(function (d) {
var key = Object.keys(d)[0];
var value = d[key];
return {
supported: key,
desired: value._desired,
distance: +value._distance,
oneway: value.oneway === 'true' ? true : false,
};
}, {});
PROCESSED_DATA = {
matches: matches,
matchVariables: matchVariables.reduce(function (all, d) {
var key = Object.keys(d)[0];
var value = d[key];
all[key.slice(1)] = value._value.split('+');
return all;
}, {}),
paradigmLocales: __spreadArray(__spreadArray([], paradigmLocales, true), paradigmLocales.map(function (l) {
return new Intl.Locale(l.replace(/_/g, '-')).maximize().toString();
}), true),
};
}
return PROCESSED_DATA;
}
function isMatched(locale, languageMatchInfoLocale, matchVariables) {
var _a = languageMatchInfoLocale.split('-'), language = _a[0], script = _a[1], region = _a[2];
var matches = true;
if (region && region[0] === '$') {
var shouldInclude = region[1] !== '!';
var matchRegions = shouldInclude
? matchVariables[region.slice(1)]
: matchVariables[region.slice(2)];
var expandedMatchedRegions = matchRegions
.map(function (r) { return regions[r] || [r]; })
.reduce(function (all, list) { return __spreadArray(__spreadArray([], all, true), list, true); }, []);
matches && (matches = !(expandedMatchedRegions.indexOf(locale.region || '') > 1 !=
shouldInclude));
}
else {
matches && (matches = locale.region
? region === '*' || region === locale.region
: true);
}
matches && (matches = locale.script ? script === '*' || script === locale.script : true);
matches && (matches = locale.language
? language === '*' || language === locale.language
: true);
return matches;
}
function serializeLSR(lsr) {
return [lsr.language, lsr.script, lsr.region].filter(Boolean).join('-');
}
function findMatchingDistanceForLSR(desired, supported, data) {
for (var _i = 0, _a = data.matches; _i < _a.length; _i++) {
var d = _a[_i];
var matches = isMatched(desired, d.desired, data.matchVariables) &&
isMatched(supported, d.supported, data.matchVariables);
if (!d.oneway && !matches) {
matches =
isMatched(desired, d.supported, data.matchVariables) &&
isMatched(supported, d.desired, data.matchVariables);
}
if (matches) {
var distance = d.distance * 10;
if (data.paradigmLocales.indexOf(serializeLSR(desired)) > -1 !=
data.paradigmLocales.indexOf(serializeLSR(supported)) > -1) {
return distance - 1;
}
return distance;
}
}
throw new Error('No matching distance found');
}
export function findMatchingDistance(desired, supported) {
var desiredLocale = new Intl.Locale(desired).maximize();
var supportedLocale = new Intl.Locale(supported).maximize();
var desiredLSR = {
language: desiredLocale.language,
script: desiredLocale.script || '',
region: desiredLocale.region || '',
};
var supportedLSR = {
language: supportedLocale.language,
script: supportedLocale.script || '',
region: supportedLocale.region || '',
};
var matchingDistance = 0;
var data = processData();
if (desiredLSR.language !== supportedLSR.language) {
matchingDistance += findMatchingDistanceForLSR({
language: desiredLocale.language,
script: '',
region: '',
}, {
language: supportedLocale.language,
script: '',
region: '',
}, data);
}
if (desiredLSR.script !== supportedLSR.script) {
matchingDistance += findMatchingDistanceForLSR({
language: desiredLocale.language,
script: desiredLSR.script,
region: '',
}, {
language: supportedLocale.language,
script: desiredLSR.script,
region: '',
}, data);
}
if (desiredLSR.region !== supportedLSR.region) {
matchingDistance += findMatchingDistanceForLSR(desiredLSR, supportedLSR, data);
}
return matchingDistance;
}
export function findBestMatch(requestedLocales, supportedLocales, threshold) {
if (threshold === void 0) { threshold = DEFAULT_MATCHING_THRESHOLD; }
var lowestDistance = Infinity;
var result = {
matchedDesiredLocale: '',
distances: {},
};
requestedLocales.forEach(function (desired, i) {
if (!result.distances[desired]) {
result.distances[desired] = {};
}
supportedLocales.forEach(function (supported) {
// Add some weight to the distance based on the order of the supported locales
// Add penalty for the order of the requested locales, which currently is 0 since ECMA-402
// doesn't really have room for weighted locales like `en; q=0.1`
var distance = findMatchingDistance(desired, supported) + 0 + i * 40;
result.distances[desired][supported] = distance;
if (distance < lowestDistance) {
lowestDistance = distance;
result.matchedDesiredLocale = desired;
result.matchedSupportedLocale = supported;
}
});
});
if (lowestDistance >= threshold) {
result.matchedDesiredLocale = undefined;
result.matchedSupportedLocale = undefined;
}
return result;
}

View File

@@ -0,0 +1,33 @@
import { test } from 'tap'
import { readFile } from 'fs'
import ThreadStream from '../index.js'
import { join } from 'path'
import { file } from './helper.js'
test('typescript module', function (t) {
t.plan(5)
const dest = file()
const stream = new ThreadStream({
filename: join(__dirname, 'ts', 'to-file.ts'),
workerData: { dest },
sync: true
})
stream.on('finish', () => {
readFile(dest, 'utf8', (err, data) => {
t.error(err)
t.equal(data, 'hello world\nsomething else\n')
})
})
stream.on('close', () => {
t.pass('close emitted')
})
t.ok(stream.write('hello world\n'))
t.ok(stream.write('something else\n'))
stream.end()
})

View File

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

View File

@@ -0,0 +1,211 @@
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { getTranslation } from '@payloadcms/translations';
import { fieldAffectsData, fieldIsHiddenOrDisabled } from 'payload/shared';
import React from 'react';
import { RenderServerComponent } from '../elements/RenderServerComponent/index.js';
import { GroupByHeader, GroupByPageControls, OrderableTable, Pill, SelectAll, SelectionProvider, SelectRow, SortHeader, SortRow, Table } from '../exports/client/index.js';
import { filterFieldsWithPermissions } from '../providers/TableColumns/buildColumnState/filterFieldsWithPermissions.js';
import { buildColumnState } from '../providers/TableColumns/buildColumnState/index.js';
export const renderFilters = (fields, importMap) => fields.reduce((acc, field) => {
if (fieldIsHiddenOrDisabled(field)) {
return acc;
}
if ('name' in field && field.admin?.components?.Filter) {
acc.set(field.name, RenderServerComponent({
Component: field.admin.components?.Filter,
importMap
}));
}
return acc;
}, new Map());
export const renderTable = ({
clientCollectionConfig,
clientConfig,
collectionConfig,
collections,
columns,
customCellProps,
data,
enableRowSelections,
fieldPermissions,
groupByFieldPath,
groupByValue,
heading,
i18n,
key = 'table',
orderableFieldName,
payload,
query,
renderRowTypes,
req,
tableAppearance,
useAsTitle,
viewType
}) => {
// Ensure that columns passed as args comply with the field config, i.e. `hidden`, `disableListColumn`, etc.
let columnState;
let clientFields = clientCollectionConfig?.fields || [];
let serverFields = collectionConfig?.fields || [];
const isPolymorphic = collections;
const isGroupingBy = Boolean(collectionConfig?.admin?.groupBy && query?.groupBy);
if (isPolymorphic) {
clientFields = [];
serverFields = [];
for (const collection of collections) {
const clientCollectionConfig = clientConfig.collections.find(each => each.slug === collection);
for (const field of filterFieldsWithPermissions({
fieldPermissions,
fields: clientCollectionConfig.fields
})) {
if (fieldAffectsData(field)) {
if (clientFields.some(each => fieldAffectsData(each) && each.name === field.name)) {
continue;
}
}
clientFields.push(field);
}
const serverCollectionConfig = payload.collections[collection].config;
for (const field of filterFieldsWithPermissions({
fieldPermissions,
fields: serverCollectionConfig.fields
})) {
if (fieldAffectsData(field)) {
if (serverFields.some(each => fieldAffectsData(each) && each.name === field.name)) {
continue;
}
}
serverFields.push(field);
}
}
}
const sharedArgs = {
clientFields,
columns,
enableRowSelections,
fieldPermissions,
i18n,
// sortColumnProps,
customCellProps,
payload,
req,
serverFields,
useAsTitle,
viewType
};
if (isPolymorphic) {
columnState = buildColumnState({
...sharedArgs,
collectionSlug: undefined,
dataType: 'polymorphic',
docs: data?.docs || []
});
} else {
columnState = buildColumnState({
...sharedArgs,
collectionSlug: clientCollectionConfig.slug,
dataType: 'monomorphic',
docs: data?.docs || []
});
}
const columnsToUse = [...columnState];
if (renderRowTypes) {
columnsToUse.unshift({
accessor: 'collection',
active: true,
field: {
admin: {
disabled: true
},
hidden: true
},
Heading: i18n.t('version:type'),
renderedCells: (data?.docs || []).map((doc, i) => /*#__PURE__*/_jsx(Pill, {
size: "small",
children: getTranslation(collections ? payload.collections[doc.relationTo].config.labels.singular : clientCollectionConfig.labels.singular, i18n)
}, i))
});
}
if (enableRowSelections) {
columnsToUse.unshift({
accessor: '_select',
active: true,
field: {
admin: {
disabled: true
},
hidden: true
},
Heading: /*#__PURE__*/_jsx(SelectAll, {}),
renderedCells: (data?.docs || []).map((_, i) => /*#__PURE__*/_jsx(SelectRow, {
rowData: data?.docs[i]
}, i))
});
}
if (isGroupingBy) {
return {
columnState,
// key is required since Next.js 15.2.0 to prevent React key error
Table: /*#__PURE__*/_jsx("div", {
className: ['table-wrap', groupByValue !== undefined && `table-wrap--group-by`].filter(Boolean).join(' '),
children: /*#__PURE__*/_jsxs(SelectionProvider, {
docs: data?.docs || [],
totalDocs: data?.totalDocs || 0,
children: [/*#__PURE__*/_jsx(GroupByHeader, {
collectionConfig: clientCollectionConfig,
groupByFieldPath: groupByFieldPath,
groupByValue: groupByValue,
heading: heading
}), /*#__PURE__*/_jsx(Table, {
appearance: tableAppearance,
columns: columnsToUse,
data: data?.docs || []
}), /*#__PURE__*/_jsx(GroupByPageControls, {
collectionConfig: clientCollectionConfig,
data: data,
groupByValue: groupByValue
})]
})
}, key)
};
}
if (!orderableFieldName) {
return {
columnState,
// key is required since Next.js 15.2.0 to prevent React key error
Table: /*#__PURE__*/_jsx("div", {
className: "table-wrap",
children: /*#__PURE__*/_jsx(Table, {
appearance: tableAppearance,
columns: columnsToUse,
data: data?.docs || []
})
}, key)
};
}
columnsToUse.unshift({
accessor: '_dragHandle',
active: true,
field: {
admin: {
disabled: true
},
hidden: true
},
Heading: /*#__PURE__*/_jsx(SortHeader, {}),
renderedCells: (data?.docs || []).map((_, i) => /*#__PURE__*/_jsx(SortRow, {}, i))
});
return {
columnState,
// key is required since Next.js 15.2.0 to prevent React key error
Table: /*#__PURE__*/_jsx("div", {
className: "table-wrap",
children: /*#__PURE__*/_jsx(OrderableTable, {
appearance: tableAppearance,
collection: clientCollectionConfig,
columns: columnsToUse,
data: data?.docs || []
})
}, key)
};
};
//# sourceMappingURL=renderTable.js.map

View File

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

View File

@@ -0,0 +1,22 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const HeartPulse = createLucideIcon("HeartPulse", [
[
"path",
{
d: "M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",
key: "c3ymky"
}
],
["path", { d: "M3.22 12H9.5l.5-1 2 4.5 2-7 1.5 3.5h5.27", key: "1uw2ng" }]
]);
export { HeartPulse as default };
//# sourceMappingURL=heart-pulse.js.map

View File

@@ -0,0 +1,13 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
import type { EditorConfig } from 'lexical';
import { ElementNode } from './LexicalElementNode';
export declare class ArtificialNode__DO_NOT_USE extends ElementNode {
static getType(): string;
createDOM(config: EditorConfig): HTMLElement;
}

View File

@@ -0,0 +1,91 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra and Zackary Jackson @ScriptedAlchemy
*/
"use strict";
const { parseOptions } = require("../container/options");
const ConsumeSharedPlugin = require("./ConsumeSharedPlugin");
const ProvideSharedPlugin = require("./ProvideSharedPlugin");
const { isRequiredVersion } = require("./utils");
/** @typedef {import("../../declarations/plugins/sharing/ConsumeSharedPlugin").ConsumesConfig} ConsumesConfig */
/** @typedef {import("../../declarations/plugins/sharing/ProvideSharedPlugin").ProvidesConfig} ProvidesConfig */
/** @typedef {import("../../declarations/plugins/sharing/SharePlugin").SharePluginOptions} SharePluginOptions */
/** @typedef {import("../../declarations/plugins/sharing/SharePlugin").SharedConfig} SharedConfig */
/** @typedef {import("../Compiler")} Compiler */
class SharePlugin {
/**
* @param {SharePluginOptions} options options
*/
constructor(options) {
/** @type {[string, SharedConfig][]} */
const sharedOptions = parseOptions(
options.shared,
(item, key) => {
if (typeof item !== "string") {
throw new Error("Unexpected array in shared");
}
/** @type {SharedConfig} */
const config =
item === key || !isRequiredVersion(item)
? {
import: item
}
: {
import: key,
requiredVersion: item
};
return config;
},
(item) => item
);
/** @type {Record<string, ConsumesConfig>[]} */
const consumes = sharedOptions.map(([key, options]) => ({
[key]: {
import: options.import,
shareKey: options.shareKey || key,
shareScope: options.shareScope,
requiredVersion: options.requiredVersion,
strictVersion: options.strictVersion,
singleton: options.singleton,
packageName: options.packageName,
eager: options.eager
}
}));
/** @type {Record<string, ProvidesConfig>[]} */
const provides = sharedOptions
.filter(([, options]) => options.import !== false)
.map(([key, options]) => ({
[options.import || key]: {
shareKey: options.shareKey || key,
shareScope: options.shareScope,
version: options.version,
eager: options.eager
}
}));
this._shareScope = options.shareScope;
this._consumes = consumes;
this._provides = provides;
}
/**
* Apply the plugin
* @param {Compiler} compiler the compiler instance
* @returns {void}
*/
apply(compiler) {
new ConsumeSharedPlugin({
shareScope: this._shareScope,
consumes: this._consumes
}).apply(compiler);
new ProvideSharedPlugin({
shareScope: this._shareScope,
provides: this._provides
}).apply(compiler);
}
}
module.exports = SharePlugin;

View File

@@ -0,0 +1,35 @@
# Pretty Printing
By default, Pino log lines are newline delimited JSON (NDJSON). This is perfect
for production usage and long-term storage. It's not so great for development
environments. Thus, Pino logs can be prettified by using a Pino prettifier
module like [`pino-pretty`][pp]:
1. Install a prettifier module as a separate dependency, e.g. `npm install pino-pretty`.
2. Instantiate the logger with the `transport.target` option set to `'pino-pretty'`:
```js
const pino = require('pino')
const logger = pino({
transport: {
target: 'pino-pretty'
},
})
logger.info('hi')
```
3. The transport option can also have an options object containing `pino-pretty` options:
```js
const pino = require('pino')
const logger = pino({
transport: {
target: 'pino-pretty',
options: {
colorize: true
}
}
})
logger.info('hi')
```
[pp]: https://github.com/pinojs/pino-pretty

View File

@@ -0,0 +1 @@
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/database/queryValidation/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AACjF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAGlE,MAAM,MAAM,cAAc,GAAG;IAC3B,WAAW,CAAC,EAAE;QACZ,CAAC,cAAc,EAAE,MAAM,GAAG,oBAAoB,CAAA;KAC/C,CAAA;IACD,OAAO,CAAC,EAAE;QACR,CAAC,UAAU,EAAE,MAAM,GAAG,gBAAgB,CAAA;KACvC,CAAA;CACF,CAAA;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,QAAQ,EAAE,OAAO,CAAA;IACjB,KAAK,EAAE,cAAc,CAAA;IACrB,MAAM,CAAC,EAAE,cAAc,EAAE,CAAA;IACzB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;OAEG;IACH,iBAAiB,EAAE,OAAO,CAAA;IAC1B,IAAI,EAAE,MAAM,CAAA;CACb,CAAA"}

View File

@@ -0,0 +1,30 @@
import { GoogleGenAIOptions } from './types';
/**
* Extract model from parameters or chat context object
* For chat instances, the model is available on the chat object as 'model' (older versions) or 'modelVersion' (newer versions)
*/
export declare function extractModel(params: Record<string, unknown>, context?: unknown): string;
/**
* Instrument a Google GenAI client with Sentry tracing
* Can be used across Node.js, Cloudflare Workers, and Vercel Edge
*
* @template T - The type of the client that extends client object
* @param client - The Google GenAI client to instrument
* @param options - Optional configuration for recording inputs and outputs
* @returns The instrumented client with the same type as the input
*
* @example
* ```typescript
* import { GoogleGenAI } from '@google/genai';
* import { instrumentGoogleGenAIClient } from '@sentry/core';
*
* const genAI = new GoogleGenAI({ apiKey: process.env.GOOGLE_GENAI_API_KEY });
* const instrumentedClient = instrumentGoogleGenAIClient(genAI);
*
* // Now both chats.create and sendMessage will be instrumented
* const chat = instrumentedClient.chats.create({ model: 'gemini-1.5-pro' });
* const response = await chat.sendMessage({ message: 'Hello' });
* ```
*/
export declare function instrumentGoogleGenAIClient<T extends object>(client: T, options?: GoogleGenAIOptions): T;
//# sourceMappingURL=index.d.ts.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 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 Q H R S T"},C:{"1":"0 1 2 3 4 5 6 7 8 NC Q H R YC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I ZC aC OC 1C 2C 3C","2":"9 0C VC J bB K D E F A B C L M G N O P cB AB BB CB DB EB FB GB HB IB dB 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 4C 5C"},D:{"1":"0 1 2 3 4 5 6 7 8 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 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"},E:{"1":"M G BD CD DD dC eC RC ED SC fC gC hC iC jC FD TC kC lC mC nC oC GD UC pC qC rC sC HD tC uC vC wC ID","2":"J bB K D E F A B C L 6C bC 7C 8C 9C AD cC PC QC"},F:{"1":"0 1 2 3 4 5 6 7 8 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 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 JD KD LD MD PC xC ND QC"},G:{"1":"cD dD eD fD gD hD dC eC RC iD SC fC gC hC iC jC jD TC kC lC mC nC oC kD UC pC qC rC sC lD tC uC vC wC","2":"E bC OD yC PD QD RD SD TD UD VD WD XD YD ZD aD bD"},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:{"1":"RC"},P:{"1":"9 AB BB CB DB EB FB GB HB IB 1D 2D SC TC UC 3D","2":"J tD uD vD wD xD cC yD zD 0D"},Q:{"16":"4D"},R:{"16":"5D"},S:{"2":"6D","16":"7D"}},B:5,C:"WebAssembly Multi-Value",D:true};

View File

@@ -0,0 +1,61 @@
"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 serial_exports = {};
__export(serial_exports, {
MySqlSerial: () => MySqlSerial,
MySqlSerialBuilder: () => MySqlSerialBuilder,
serial: () => serial
});
module.exports = __toCommonJS(serial_exports);
var import_entity = require("../../entity.cjs");
var import_common = require("./common.cjs");
class MySqlSerialBuilder extends import_common.MySqlColumnBuilderWithAutoIncrement {
static [import_entity.entityKind] = "MySqlSerialBuilder";
constructor(name) {
super(name, "number", "MySqlSerial");
this.config.hasDefault = true;
this.config.autoIncrement = true;
}
/** @internal */
build(table) {
return new MySqlSerial(table, this.config);
}
}
class MySqlSerial extends import_common.MySqlColumnWithAutoIncrement {
static [import_entity.entityKind] = "MySqlSerial";
getSQLType() {
return "serial";
}
mapFromDriverValue(value) {
if (typeof value === "string") {
return Number(value);
}
return value;
}
}
function serial(name) {
return new MySqlSerialBuilder(name ?? "");
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
MySqlSerial,
MySqlSerialBuilder,
serial
});
//# sourceMappingURL=serial.cjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"injectLoader.js","sources":["../../../src/sdk/injectLoader.ts"],"sourcesContent":["import type { InstrumentationConfig } from '@apm-js-collab/code-transformer';\nimport ModulePatch from '@apm-js-collab/tracing-hooks';\nimport { debug, GLOBAL_OBJ } from '@sentry/core';\nimport * as moduleModule from 'module';\nimport { supportsEsmLoaderHooks } from '../utils/detection';\n\nlet instrumentationConfigs: InstrumentationConfig[] | undefined;\n\n/**\n * Add an instrumentation config to be used by the injection loader.\n */\nexport function addInstrumentationConfig(config: InstrumentationConfig): void {\n if (!supportsEsmLoaderHooks()) {\n return;\n }\n\n if (!instrumentationConfigs) {\n instrumentationConfigs = [];\n }\n\n instrumentationConfigs.push(config);\n\n GLOBAL_OBJ._sentryInjectLoaderHookRegister = () => {\n if (GLOBAL_OBJ._sentryInjectLoaderHookRegistered) {\n return;\n }\n\n GLOBAL_OBJ._sentryInjectLoaderHookRegistered = true;\n\n const instrumentations = instrumentationConfigs || [];\n\n // Patch require to support CJS modules\n const requirePatch = new ModulePatch({ instrumentations });\n requirePatch.patch();\n\n // Add ESM loader to support ESM modules\n try {\n // @ts-expect-error register is available in these versions\n moduleModule.register('@apm-js-collab/tracing-hooks/hook.mjs', import.meta.url, {\n data: { instrumentations },\n });\n } catch (error) {\n debug.warn(\"Failed to register '@apm-js-collab/tracing-hooks' hook\", error);\n }\n };\n}\n"],"names":[],"mappings":";;;;;AAMA,IAAI,sBAAsB;;AAE1B;AACA;AACA;AACO,SAAS,wBAAwB,CAAC,MAAM,EAA+B;AAC9E,EAAE,IAAI,CAAC,sBAAsB,EAAE,EAAE;AACjC,IAAI;AACJ,EAAE;;AAEF,EAAE,IAAI,CAAC,sBAAsB,EAAE;AAC/B,IAAI,sBAAA,GAAyB,EAAE;AAC/B,EAAE;;AAEF,EAAE,sBAAsB,CAAC,IAAI,CAAC,MAAM,CAAC;;AAErC,EAAE,UAAU,CAAC,+BAAA,GAAkC,MAAM;AACrD,IAAI,IAAI,UAAU,CAAC,iCAAiC,EAAE;AACtD,MAAM;AACN,IAAI;;AAEJ,IAAI,UAAU,CAAC,iCAAA,GAAoC,IAAI;;AAEvD,IAAI,MAAM,gBAAA,GAAmB,sBAAA,IAA0B,EAAE;;AAEzD;AACA,IAAI,MAAM,eAAe,IAAI,WAAW,CAAC,EAAE,gBAAA,EAAkB,CAAC;AAC9D,IAAI,YAAY,CAAC,KAAK,EAAE;;AAExB;AACA,IAAI,IAAI;AACR;AACA,MAAM,YAAY,CAAC,QAAQ,CAAC,uCAAuC,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE;AACtF,QAAQ,IAAI,EAAE,EAAE,gBAAA,EAAkB;AAClC,OAAO,CAAC;AACR,IAAI,CAAA,CAAE,OAAO,KAAK,EAAE;AACpB,MAAM,KAAK,CAAC,IAAI,CAAC,wDAAwD,EAAE,KAAK,CAAC;AACjF,IAAI;AACJ,EAAE,CAAC;AACH;;;;"}

View File

@@ -0,0 +1 @@
!function(e){var t=e.languages.javascript["template-string"],n=t.pattern.source,r=t.inside.interpolation,a=r.inside["interpolation-punctuation"],i=r.pattern.source;function o(t,r){if(e.languages[t])return{pattern:RegExp("((?:"+r+")\\s*)"+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:t}}}}function s(e,t){return"___"+t.toUpperCase()+"_"+e+"___"}function p(t,n,r){var a={code:t,grammar:n,language:r};return e.hooks.run("before-tokenize",a),a.tokens=e.tokenize(a.code,a.grammar),e.hooks.run("after-tokenize",a),a.tokens}function l(t){var n={};n["interpolation-punctuation"]=a;var i=e.tokenize(t,n);if(3===i.length){var o=[1,1];o.push.apply(o,p(i[1],e.languages.javascript,"javascript")),i.splice.apply(i,o)}return new e.Token("interpolation",i,r.alias,t)}function g(t,n,r){var a=e.tokenize(t,{interpolation:{pattern:RegExp(i),lookbehind:!0}}),o=0,g={},u=p(a.map((function(e){if("string"==typeof e)return e;for(var n,a=e.content;-1!==t.indexOf(n=s(o++,r)););return g[n]=a,n})).join(""),n,r),c=Object.keys(g);return o=0,function e(t){for(var n=0;n<t.length;n++){if(o>=c.length)return;var r=t[n];if("string"==typeof r||"string"==typeof r.content){var a=c[o],i="string"==typeof r?r:r.content,s=i.indexOf(a);if(-1!==s){++o;var p=i.substring(0,s),u=l(g[a]),f=i.substring(s+a.length),y=[];if(p&&y.push(p),y.push(u),f){var v=[f];e(v),y.push.apply(y,v)}"string"==typeof r?(t.splice.apply(t,[n,1].concat(y)),n+=y.length-1):r.content=y}}else{var d=r.content;Array.isArray(d)?e(d):e([d])}}}(u),new e.Token(r,u,"language-"+r,t)}e.languages.javascript["template-string"]=[o("css","\\b(?:styled(?:\\([^)]*\\))?(?:\\s*\\.\\s*\\w+(?:\\([^)]*\\))*)*|css(?:\\s*\\.\\s*(?:global|resolve))?|createGlobalStyle|keyframes)"),o("html","\\bhtml|\\.\\s*(?:inner|outer)HTML\\s*\\+?="),o("svg","\\bsvg"),o("markdown","\\b(?:markdown|md)"),o("graphql","\\b(?:gql|graphql(?:\\s*\\.\\s*experimental)?)"),o("sql","\\bsql"),t].filter(Boolean);var u={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function c(e){return"string"==typeof e?e:Array.isArray(e)?e.map(c).join(""):c(e.content)}e.hooks.add("after-tokenize",(function(t){t.language in u&&function t(n){for(var r=0,a=n.length;r<a;r++){var i=n[r];if("string"!=typeof i){var o=i.content;if(Array.isArray(o))if("template-string"===i.type){var s=o[1];if(3===o.length&&"string"!=typeof s&&"embedded-code"===s.type){var p=c(s),l=s.alias,u=Array.isArray(l)?l[0]:l,f=e.languages[u];if(!f)continue;o[1]=g(p,f,u)}}else t(o);else"string"!=typeof o&&t([o])}}}(t.tokens)}))}(Prism);

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/versions/payloadPackageList.ts"],"sourcesContent":["export const PAYLOAD_PACKAGE_LIST = [\n 'payload',\n '@payloadcms/bundler-vite',\n '@payloadcms/bundler-webpack',\n '@payloadcms/db-d1-sqlite',\n '@payloadcms/db-mongodb',\n '@payloadcms/db-postgres',\n '@payloadcms/db-sqlite',\n '@payloadcms/db-vercel-postgres',\n '@payloadcms/drizzle',\n '@payloadcms/ecommerce',\n '@payloadcms/email-nodemailer',\n '@payloadcms/email-resend',\n '@payloadcms/graphql',\n '@payloadcms/live-preview',\n '@payloadcms/live-preview-react',\n '@payloadcms/live-preview-vue',\n '@payloadcms/kv-redis',\n '@payloadcms/next/utilities',\n '@payloadcms/payload-cloud',\n '@payloadcms/plugin-cloud-storage',\n '@payloadcms/plugin-form-builder',\n '@payloadcms/plugin-import-export',\n '@payloadcms/plugin-mcp',\n '@payloadcms/plugin-multi-tenant',\n '@payloadcms/plugin-nested-docs',\n '@payloadcms/plugin-redirects',\n '@payloadcms/plugin-search',\n '@payloadcms/plugin-seo',\n '@payloadcms/plugin-stripe',\n '@payloadcms/plugin-zapier',\n '@payloadcms/richtext-lexical',\n '@payloadcms/richtext-slate',\n '@payloadcms/sdk',\n '@payloadcms/storage-azure',\n '@payloadcms/storage-gcs',\n '@payloadcms/storage-r2',\n '@payloadcms/storage-s3',\n '@payloadcms/storage-uploadthing',\n '@payloadcms/storage-vercel-blob',\n '@payloadcms/translations',\n '@payloadcms/ui/shared',\n]\n"],"names":["PAYLOAD_PACKAGE_LIST"],"mappings":"AAAA,OAAO,MAAMA,uBAAuB;IAClC;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD,CAAA"}

View File

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

View File

@@ -0,0 +1,18 @@
export const commitTransaction = async function commitTransaction(incomingID = '') {
const transactionID = incomingID instanceof Promise ? await incomingID : incomingID;
// if the session was deleted it has already been aborted
if (!this.sessions[transactionID]) {
return;
}
const session = this.sessions[transactionID];
// Delete from registry FIRST to prevent race conditions
// This ensures other operations can't retrieve this session while we're ending it
delete this.sessions[transactionID];
try {
await session.resolve();
} catch (_) {
await session.reject();
}
};
//# sourceMappingURL=commitTransaction.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["_inherit","require","inheritLeadingComments","child","parent","inherit"],"sources":["../../src/comments/inheritLeadingComments.ts"],"sourcesContent":["import inherit from \"../utils/inherit.ts\";\nimport type * as t from \"../index.ts\";\n\nexport default function inheritLeadingComments(\n child: t.Node,\n parent: t.Node,\n): void {\n inherit(\"leadingComments\", child, parent);\n}\n"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AAGe,SAASC,sBAAsBA,CAC5CC,KAAa,EACbC,MAAc,EACR;EACN,IAAAC,gBAAO,EAAC,iBAAiB,EAAEF,KAAK,EAAEC,MAAM,CAAC;AAC3C","ignoreList":[]}

View File

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

View File

@@ -0,0 +1,77 @@
import { didYouMean } from '../../jsutils/didYouMean.mjs';
import { suggestionList } from '../../jsutils/suggestionList.mjs';
import { GraphQLError } from '../../error/GraphQLError.mjs';
import {
isTypeDefinitionNode,
isTypeSystemDefinitionNode,
isTypeSystemExtensionNode,
} from '../../language/predicates.mjs';
import { introspectionTypes } from '../../type/introspection.mjs';
import { specifiedScalarTypes } from '../../type/scalars.mjs';
/**
* Known type names
*
* A GraphQL document is only valid if referenced types (specifically
* variable definitions and fragment conditions) are defined by the type schema.
*
* See https://spec.graphql.org/draft/#sec-Fragment-Spread-Type-Existence
*/
export function KnownTypeNamesRule(context) {
const schema = context.getSchema();
const existingTypesMap = schema ? schema.getTypeMap() : Object.create(null);
const definedTypes = Object.create(null);
for (const def of context.getDocument().definitions) {
if (isTypeDefinitionNode(def)) {
definedTypes[def.name.value] = true;
}
}
const typeNames = [
...Object.keys(existingTypesMap),
...Object.keys(definedTypes),
];
return {
NamedType(node, _1, parent, _2, ancestors) {
const typeName = node.name.value;
if (!existingTypesMap[typeName] && !definedTypes[typeName]) {
var _ancestors$;
const definitionNode =
(_ancestors$ = ancestors[2]) !== null && _ancestors$ !== void 0
? _ancestors$
: parent;
const isSDL = definitionNode != null && isSDLNode(definitionNode);
if (isSDL && standardTypeNames.includes(typeName)) {
return;
}
const suggestedTypes = suggestionList(
typeName,
isSDL ? standardTypeNames.concat(typeNames) : typeNames,
);
context.reportError(
new GraphQLError(
`Unknown type "${typeName}".` + didYouMean(suggestedTypes),
{
nodes: node,
},
),
);
}
},
};
}
const standardTypeNames = [...specifiedScalarTypes, ...introspectionTypes].map(
(type) => type.name,
);
function isSDLNode(value) {
return (
'kind' in value &&
(isTypeSystemDefinitionNode(value) || isTypeSystemExtensionNode(value))
);
}

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/pg-core/columns/integer.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyPgTable } from '../table.ts';\nimport { PgColumn } from './common.ts';\nimport { PgIntColumnBaseBuilder } from './int.common.ts';\n\nexport type PgIntegerBuilderInitial<TName extends string> = PgIntegerBuilder<{\n\tname: TName;\n\tdataType: 'number';\n\tcolumnType: 'PgInteger';\n\tdata: number;\n\tdriverParam: number | string;\n\tenumValues: undefined;\n}>;\n\nexport class PgIntegerBuilder<T extends ColumnBuilderBaseConfig<'number', 'PgInteger'>>\n\textends PgIntColumnBaseBuilder<T>\n{\n\tstatic override readonly [entityKind]: string = 'PgIntegerBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'number', 'PgInteger');\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyPgTable<{ name: TTableName }>,\n\t): PgInteger<MakeColumnConfig<T, TTableName>> {\n\t\treturn new PgInteger<MakeColumnConfig<T, TTableName>>(table, this.config as ColumnBuilderRuntimeConfig<any, any>);\n\t}\n}\n\nexport class PgInteger<T extends ColumnBaseConfig<'number', 'PgInteger'>> extends PgColumn<T> {\n\tstatic override readonly [entityKind]: string = 'PgInteger';\n\n\tgetSQLType(): string {\n\t\treturn 'integer';\n\t}\n\n\toverride mapFromDriverValue(value: number | string): number {\n\t\tif (typeof value === 'string') {\n\t\t\treturn Number.parseInt(value);\n\t\t}\n\t\treturn value;\n\t}\n}\n\nexport function integer(): PgIntegerBuilderInitial<''>;\nexport function integer<TName extends string>(name: TName): PgIntegerBuilderInitial<TName>;\nexport function integer(name?: string) {\n\treturn new PgIntegerBuilder(name ?? '');\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,oBAA2B;AAE3B,oBAAyB;AACzB,wBAAuC;AAWhC,MAAM,yBACJ,yCACT;AAAA,EACC,QAA0B,wBAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB;AAC5B,UAAM,MAAM,UAAU,WAAW;AAAA,EAClC;AAAA;AAAA,EAGS,MACR,OAC6C;AAC7C,WAAO,IAAI,UAA2C,OAAO,KAAK,MAA8C;AAAA,EACjH;AACD;AAEO,MAAM,kBAAqE,uBAAY;AAAA,EAC7F,QAA0B,wBAAU,IAAY;AAAA,EAEhD,aAAqB;AACpB,WAAO;AAAA,EACR;AAAA,EAES,mBAAmB,OAAgC;AAC3D,QAAI,OAAO,UAAU,UAAU;AAC9B,aAAO,OAAO,SAAS,KAAK;AAAA,IAC7B;AACA,WAAO;AAAA,EACR;AACD;AAIO,SAAS,QAAQ,MAAe;AACtC,SAAO,IAAI,iBAAiB,QAAQ,EAAE;AACvC;","names":[]}

View File

@@ -0,0 +1,20 @@
import type { ClientUser } from 'payload';
export interface HandleTakeOverParams {
clearRouteCache?: () => void;
collectionSlug?: string;
documentLockStateRef: React.RefObject<{
hasShownLockedModal: boolean;
isLocked: boolean;
user: ClientUser | number | string;
}>;
globalSlug?: string;
id: number | string;
isLockingEnabled: boolean;
isWithinDoc: boolean;
setCurrentEditor: (value: React.SetStateAction<ClientUser | number | string>) => void;
setIsReadOnlyForIncomingUser?: (value: React.SetStateAction<boolean>) => void;
updateDocumentEditor: (docID: number | string, slug: string, user: ClientUser | number | string) => Promise<void>;
user: ClientUser | number | string;
}
export declare const handleTakeOver: ({ id, clearRouteCache, collectionSlug, documentLockStateRef, globalSlug, isLockingEnabled, isWithinDoc, setCurrentEditor, setIsReadOnlyForIncomingUser, updateDocumentEditor, user, }: HandleTakeOverParams) => Promise<void>;
//# sourceMappingURL=handleTakeOver.d.ts.map

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 Hammer = createLucideIcon("Hammer", [
["path", { d: "m15 12-8.373 8.373a1 1 0 1 1-3-3L12 9", key: "eefl8a" }],
["path", { d: "m18 15 4-4", key: "16gjal" }],
[
"path",
{
d: "m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172V7l-2.26-2.26a6 6 0 0 0-4.202-1.756L9 2.96l.92.82A6.18 6.18 0 0 1 12 8.4V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5",
key: "b7pghm"
}
]
]);
export { Hammer as default };
//# sourceMappingURL=hammer.js.map

View File

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

View File

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

View File

@@ -0,0 +1,190 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = default_1;
const util = __importStar(require("../core/util.cjs"));
function getRussianPlural(count, one, few, many) {
const absCount = Math.abs(count);
const lastDigit = absCount % 10;
const lastTwoDigits = absCount % 100;
if (lastTwoDigits >= 11 && lastTwoDigits <= 19) {
return many;
}
if (lastDigit === 1) {
return one;
}
if (lastDigit >= 2 && lastDigit <= 4) {
return few;
}
return many;
}
const error = () => {
const Sizable = {
string: {
unit: {
one: "символ",
few: "символа",
many: "символов",
},
verb: "иметь",
},
file: {
unit: {
one: "байт",
few: "байта",
many: "байт",
},
verb: "иметь",
},
array: {
unit: {
one: "элемент",
few: "элемента",
many: "элементов",
},
verb: "иметь",
},
set: {
unit: {
one: "элемент",
few: "элемента",
many: "элементов",
},
verb: "иметь",
},
};
function getSizing(origin) {
return Sizable[origin] ?? null;
}
const parsedType = (data) => {
const t = typeof data;
switch (t) {
case "number": {
return Number.isNaN(data) ? "NaN" : "число";
}
case "object": {
if (Array.isArray(data)) {
return "массив";
}
if (data === null) {
return "null";
}
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
return data.constructor.name;
}
}
}
return t;
};
const Nouns = {
regex: "ввод",
email: "email адрес",
url: "URL",
emoji: "эмодзи",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "ISO дата и время",
date: "ISO дата",
time: "ISO время",
duration: "ISO длительность",
ipv4: "IPv4 адрес",
ipv6: "IPv6 адрес",
cidrv4: "IPv4 диапазон",
cidrv6: "IPv6 диапазон",
base64: "строка в формате base64",
base64url: "строка в формате base64url",
json_string: "JSON строка",
e164: "номер E.164",
jwt: "JWT",
template_literal: "ввод",
};
return (issue) => {
switch (issue.code) {
case "invalid_type":
return `Неверный ввод: ожидалось ${issue.expected}, получено ${parsedType(issue.input)}`;
case "invalid_value":
if (issue.values.length === 1)
return `Неверный ввод: ожидалось ${util.stringifyPrimitive(issue.values[0])}`;
return `Неверный вариант: ожидалось одно из ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing) {
const maxValue = Number(issue.maximum);
const unit = getRussianPlural(maxValue, sizing.unit.one, sizing.unit.few, sizing.unit.many);
return `Слишком большое значение: ожидалось, что ${issue.origin ?? "значение"} будет иметь ${adj}${issue.maximum.toString()} ${unit}`;
}
return `Слишком большое значение: ожидалось, что ${issue.origin ?? "значение"} будет ${adj}${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
const minValue = Number(issue.minimum);
const unit = getRussianPlural(minValue, sizing.unit.one, sizing.unit.few, sizing.unit.many);
return `Слишком маленькое значение: ожидалось, что ${issue.origin} будет иметь ${adj}${issue.minimum.toString()} ${unit}`;
}
return `Слишком маленькое значение: ожидалось, что ${issue.origin} будет ${adj}${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue;
if (_issue.format === "starts_with")
return `Неверная строка: должна начинаться с "${_issue.prefix}"`;
if (_issue.format === "ends_with")
return `Неверная строка: должна заканчиваться на "${_issue.suffix}"`;
if (_issue.format === "includes")
return `Неверная строка: должна содержать "${_issue.includes}"`;
if (_issue.format === "regex")
return `Неверная строка: должна соответствовать шаблону ${_issue.pattern}`;
return `Неверный ${Nouns[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `Неверное число: должно быть кратным ${issue.divisor}`;
case "unrecognized_keys":
return `Нераспознанн${issue.keys.length > 1 ? "ые" : "ый"} ключ${issue.keys.length > 1 ? "и" : ""}: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `Неверный ключ в ${issue.origin}`;
case "invalid_union":
return "Неверные входные данные";
case "invalid_element":
return `Неверное значение в ${issue.origin}`;
default:
return `Неверные входные данные`;
}
};
};
function default_1() {
return {
localeError: error(),
};
}

View File

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

View File

@@ -0,0 +1,12 @@
/** This class helps read Uint8Array bit-by-bit */
declare class BitReader {
private readonly input;
private readonly endianness;
private byteOffset;
private bitOffset;
constructor(input: Uint8Array, endianness: 'big-endian' | 'little-endian');
/** Reads a specified number of bits, and move the offset */
getBits(length?: number): number;
}
export { BitReader };

View File

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

View File

@@ -0,0 +1,28 @@
import type { SanitizedCollectionConfig, TypeWithID } from '../collections/config/types.js';
import type { TypedUser } from '../index.js';
import type { Payload, PayloadRequest } from '../types/index.js';
import type { UntypedUser, UserSession } from './types.js';
/**
* Removes expired sessions from an array of sessions
*/
export declare const removeExpiredSessions: (sessions: UserSession[]) => UserSession[];
/**
* Adds a session to the user and removes expired sessions
* @returns The session ID (sid) if sessions are used
*/
export declare const addSessionToUser: ({ collectionConfig, payload, req, user, }: {
collectionConfig: SanitizedCollectionConfig;
payload: Payload;
req: PayloadRequest;
user: TypedUser;
}) => Promise<{
sid?: string;
}>;
export declare const revokeSession: ({ collectionConfig, payload, req, sid, user, }: {
collectionConfig: SanitizedCollectionConfig;
payload: Payload;
req: PayloadRequest;
sid: string;
user: null | (TypeWithID & UntypedUser);
}) => Promise<void>;
//# sourceMappingURL=sessions.d.ts.map

View File

@@ -0,0 +1,25 @@
import { username } from '../../fields/validations.js';
export const usernameFieldConfig = {
name: 'username',
type: 'text',
admin: {
components: {
Field: false
}
},
hooks: {
beforeChange: [
({ value })=>{
if (value) {
return value.toLowerCase().trim();
}
}
]
},
label: ({ t })=>t('authentication:username'),
required: true,
unique: true,
validate: username
};
//# sourceMappingURL=username.js.map

View File

@@ -0,0 +1,754 @@
/* eslint no-console: 0 */
'use strict';
const urllib = require('url');
const util = require('util');
const fs = require('fs');
const nmfetch = require('../fetch');
const dns = require('dns');
const net = require('net');
const os = require('os');
const DNS_TTL = 5 * 60 * 1000;
const CACHE_CLEANUP_INTERVAL = 30 * 1000; // Minimum 30 seconds between cleanups
const MAX_CACHE_SIZE = 1000; // Maximum number of entries in cache
let lastCacheCleanup = 0;
module.exports._lastCacheCleanup = () => lastCacheCleanup;
module.exports._resetCacheCleanup = () => {
lastCacheCleanup = 0;
};
let networkInterfaces;
try {
networkInterfaces = os.networkInterfaces();
} catch (_err) {
// fails on some systems
}
module.exports.networkInterfaces = networkInterfaces;
const isFamilySupported = (family, allowInternal) => {
let networkInterfaces = module.exports.networkInterfaces;
if (!networkInterfaces) {
// hope for the best
return true;
}
const familySupported =
// crux that replaces Object.values(networkInterfaces) as Object.values is not supported in nodejs v6
Object.keys(networkInterfaces)
.map(key => networkInterfaces[key])
// crux that replaces .flat() as it is not supported in older Node versions (v10 and older)
.reduce((acc, val) => acc.concat(val), [])
.filter(i => !i.internal || allowInternal)
.filter(i => i.family === 'IPv' + family || i.family === family).length > 0;
return familySupported;
};
const resolver = (family, hostname, options, callback) => {
options = options || {};
const familySupported = isFamilySupported(family, options.allowInternalNetworkInterfaces);
if (!familySupported) {
return callback(null, []);
}
const resolver = dns.Resolver ? new dns.Resolver(options) : dns;
resolver['resolve' + family](hostname, (err, addresses) => {
if (err) {
switch (err.code) {
case dns.NODATA:
case dns.NOTFOUND:
case dns.NOTIMP:
case dns.SERVFAIL:
case dns.CONNREFUSED:
case dns.REFUSED:
case 'EAI_AGAIN':
return callback(null, []);
}
return callback(err);
}
return callback(null, Array.isArray(addresses) ? addresses : [].concat(addresses || []));
});
};
const dnsCache = (module.exports.dnsCache = new Map());
const formatDNSValue = (value, extra) => {
if (!value) {
return Object.assign({}, extra || {});
}
return Object.assign(
{
servername: value.servername,
host:
!value.addresses || !value.addresses.length
? null
: value.addresses.length === 1
? value.addresses[0]
: value.addresses[Math.floor(Math.random() * value.addresses.length)]
},
extra || {}
);
};
module.exports.resolveHostname = (options, callback) => {
options = options || {};
if (!options.host && options.servername) {
options.host = options.servername;
}
if (!options.host || net.isIP(options.host)) {
// nothing to do here
let value = {
addresses: [options.host],
servername: options.servername || false
};
return callback(
null,
formatDNSValue(value, {
cached: false
})
);
}
let cached;
if (dnsCache.has(options.host)) {
cached = dnsCache.get(options.host);
// Lazy cleanup with time throttling
const now = Date.now();
if (now - lastCacheCleanup > CACHE_CLEANUP_INTERVAL) {
lastCacheCleanup = now;
// Clean up expired entries
for (const [host, entry] of dnsCache.entries()) {
if (entry.expires && entry.expires < now) {
dnsCache.delete(host);
}
}
// If cache is still too large, remove oldest entries
if (dnsCache.size > MAX_CACHE_SIZE) {
const toDelete = Math.floor(MAX_CACHE_SIZE * 0.1); // Remove 10% of entries
const keys = Array.from(dnsCache.keys()).slice(0, toDelete);
keys.forEach(key => dnsCache.delete(key));
}
}
if (!cached.expires || cached.expires >= now) {
return callback(
null,
formatDNSValue(cached.value, {
cached: true
})
);
}
}
resolver(4, options.host, options, (err, addresses) => {
if (err) {
if (cached) {
dnsCache.set(options.host, {
value: cached.value,
expires: Date.now() + (options.dnsTtl || DNS_TTL)
});
return callback(
null,
formatDNSValue(cached.value, {
cached: true,
error: err
})
);
}
return callback(err);
}
if (addresses && addresses.length) {
let value = {
addresses,
servername: options.servername || options.host
};
dnsCache.set(options.host, {
value,
expires: Date.now() + (options.dnsTtl || DNS_TTL)
});
return callback(
null,
formatDNSValue(value, {
cached: false
})
);
}
resolver(6, options.host, options, (err, addresses) => {
if (err) {
if (cached) {
dnsCache.set(options.host, {
value: cached.value,
expires: Date.now() + (options.dnsTtl || DNS_TTL)
});
return callback(
null,
formatDNSValue(cached.value, {
cached: true,
error: err
})
);
}
return callback(err);
}
if (addresses && addresses.length) {
let value = {
addresses,
servername: options.servername || options.host
};
dnsCache.set(options.host, {
value,
expires: Date.now() + (options.dnsTtl || DNS_TTL)
});
return callback(
null,
formatDNSValue(value, {
cached: false
})
);
}
try {
dns.lookup(options.host, { all: true }, (err, addresses) => {
if (err) {
if (cached) {
dnsCache.set(options.host, {
value: cached.value,
expires: Date.now() + (options.dnsTtl || DNS_TTL)
});
return callback(
null,
formatDNSValue(cached.value, {
cached: true,
error: err
})
);
}
return callback(err);
}
let address = addresses
? addresses
.filter(addr => isFamilySupported(addr.family))
.map(addr => addr.address)
.shift()
: false;
if (addresses && addresses.length && !address) {
// there are addresses but none can be used
console.warn(`Failed to resolve IPv${addresses[0].family} addresses with current network`);
}
if (!address && cached) {
// nothing was found, fallback to cached value
return callback(
null,
formatDNSValue(cached.value, {
cached: true
})
);
}
let value = {
addresses: address ? [address] : [options.host],
servername: options.servername || options.host
};
dnsCache.set(options.host, {
value,
expires: Date.now() + (options.dnsTtl || DNS_TTL)
});
return callback(
null,
formatDNSValue(value, {
cached: false
})
);
});
} catch (_err) {
if (cached) {
dnsCache.set(options.host, {
value: cached.value,
expires: Date.now() + (options.dnsTtl || DNS_TTL)
});
return callback(
null,
formatDNSValue(cached.value, {
cached: true,
error: err
})
);
}
return callback(err);
}
});
});
};
/**
* Parses connection url to a structured configuration object
*
* @param {String} str Connection url
* @return {Object} Configuration object
*/
module.exports.parseConnectionUrl = str => {
str = str || '';
let options = {};
[urllib.parse(str, true)].forEach(url => {
let auth;
switch (url.protocol) {
case 'smtp:':
options.secure = false;
break;
case 'smtps:':
options.secure = true;
break;
case 'direct:':
options.direct = true;
break;
}
if (!isNaN(url.port) && Number(url.port)) {
options.port = Number(url.port);
}
if (url.hostname) {
options.host = url.hostname;
}
if (url.auth) {
auth = url.auth.split(':');
if (!options.auth) {
options.auth = {};
}
options.auth.user = auth.shift();
options.auth.pass = auth.join(':');
}
Object.keys(url.query || {}).forEach(key => {
let obj = options;
let lKey = key;
let value = url.query[key];
if (!isNaN(value)) {
value = Number(value);
}
switch (value) {
case 'true':
value = true;
break;
case 'false':
value = false;
break;
}
// tls is nested object
if (key.indexOf('tls.') === 0) {
lKey = key.substr(4);
if (!options.tls) {
options.tls = {};
}
obj = options.tls;
} else if (key.indexOf('.') >= 0) {
// ignore nested properties besides tls
return;
}
if (!(lKey in obj)) {
obj[lKey] = value;
}
});
});
return options;
};
module.exports._logFunc = (logger, level, defaults, data, message, ...args) => {
let entry = {};
Object.keys(defaults || {}).forEach(key => {
if (key !== 'level') {
entry[key] = defaults[key];
}
});
Object.keys(data || {}).forEach(key => {
if (key !== 'level') {
entry[key] = data[key];
}
});
logger[level](entry, message, ...args);
};
/**
* Returns a bunyan-compatible logger interface. Uses either provided logger or
* creates a default console logger
*
* @param {Object} [options] Options object that might include 'logger' value
* @return {Object} bunyan compatible logger
*/
module.exports.getLogger = (options, defaults) => {
options = options || {};
let response = {};
let levels = ['trace', 'debug', 'info', 'warn', 'error', 'fatal'];
if (!options.logger) {
// use vanity logger
levels.forEach(level => {
response[level] = () => false;
});
return response;
}
let logger = options.logger;
if (options.logger === true) {
// create console logger
logger = createDefaultLogger(levels);
}
levels.forEach(level => {
response[level] = (data, message, ...args) => {
module.exports._logFunc(logger, level, defaults, data, message, ...args);
};
});
return response;
};
/**
* Wrapper for creating a callback that either resolves or rejects a promise
* based on input
*
* @param {Function} resolve Function to run if callback is called
* @param {Function} reject Function to run if callback ends with an error
*/
module.exports.callbackPromise = (resolve, reject) =>
function () {
let args = Array.from(arguments);
let err = args.shift();
if (err) {
reject(err);
} else {
resolve(...args);
}
};
module.exports.parseDataURI = uri => {
if (typeof uri !== 'string') {
return null;
}
// Early return for non-data URIs to avoid unnecessary processing
if (!uri.startsWith('data:')) {
return null;
}
// Find the first comma safely - this prevents ReDoS
const commaPos = uri.indexOf(',');
if (commaPos === -1) {
return null;
}
const data = uri.substring(commaPos + 1);
const metaStr = uri.substring('data:'.length, commaPos);
let encoding;
const metaEntries = metaStr.split(';');
if (metaEntries.length > 0) {
const lastEntry = metaEntries[metaEntries.length - 1].toLowerCase().trim();
// Only recognize valid encoding types to prevent manipulation
if (['base64', 'utf8', 'utf-8'].includes(lastEntry) && lastEntry.indexOf('=') === -1) {
encoding = lastEntry;
metaEntries.pop();
}
}
const contentType = metaEntries.length > 0 ? metaEntries.shift() : 'application/octet-stream';
const params = {};
for (let i = 0; i < metaEntries.length; i++) {
const entry = metaEntries[i];
const sepPos = entry.indexOf('=');
if (sepPos > 0) {
// Ensure there's a key before the '='
const key = entry.substring(0, sepPos).trim();
const value = entry.substring(sepPos + 1).trim();
if (key) {
params[key] = value;
}
}
}
// Decode data based on encoding with proper error handling
let bufferData;
try {
if (encoding === 'base64') {
bufferData = Buffer.from(data, 'base64');
} else {
try {
bufferData = Buffer.from(decodeURIComponent(data));
} catch (_decodeError) {
bufferData = Buffer.from(data);
}
}
} catch (_bufferError) {
bufferData = Buffer.alloc(0);
}
return {
data: bufferData,
encoding: encoding || null,
contentType: contentType || 'application/octet-stream',
params
};
};
/**
* Resolves a String or a Buffer value for content value. Useful if the value
* is a Stream or a file or an URL. If the value is a Stream, overwrites
* the stream object with the resolved value (you can't stream a value twice).
*
* This is useful when you want to create a plugin that needs a content value,
* for example the `html` or `text` value as a String or a Buffer but not as
* a file path or an URL.
*
* @param {Object} data An object or an Array you want to resolve an element for
* @param {String|Number} key Property name or an Array index
* @param {Function} callback Callback function with (err, value)
*/
module.exports.resolveContent = (data, key, callback) => {
let promise;
if (!callback) {
promise = new Promise((resolve, reject) => {
callback = module.exports.callbackPromise(resolve, reject);
});
}
let content = (data && data[key] && data[key].content) || data[key];
let contentStream;
let encoding = ((typeof data[key] === 'object' && data[key].encoding) || 'utf8')
.toString()
.toLowerCase()
.replace(/[-_\s]/g, '');
if (!content) {
return callback(null, content);
}
if (typeof content === 'object') {
if (typeof content.pipe === 'function') {
return resolveStream(content, (err, value) => {
if (err) {
return callback(err);
}
// we can't stream twice the same content, so we need
// to replace the stream object with the streaming result
if (data[key].content) {
data[key].content = value;
} else {
data[key] = value;
}
callback(null, value);
});
} else if (/^https?:\/\//i.test(content.path || content.href)) {
contentStream = nmfetch(content.path || content.href);
return resolveStream(contentStream, callback);
} else if (/^data:/i.test(content.path || content.href)) {
let parsedDataUri = module.exports.parseDataURI(content.path || content.href);
if (!parsedDataUri || !parsedDataUri.data) {
return callback(null, Buffer.from(0));
}
return callback(null, parsedDataUri.data);
} else if (content.path) {
return resolveStream(fs.createReadStream(content.path), callback);
}
}
if (typeof data[key].content === 'string' && !['utf8', 'usascii', 'ascii'].includes(encoding)) {
content = Buffer.from(data[key].content, encoding);
}
// default action, return as is
setImmediate(() => callback(null, content));
return promise;
};
/**
* Copies properties from source objects to target objects
*/
module.exports.assign = function (/* target, ... sources */) {
let args = Array.from(arguments);
let target = args.shift() || {};
args.forEach(source => {
Object.keys(source || {}).forEach(key => {
if (['tls', 'auth'].includes(key) && source[key] && typeof source[key] === 'object') {
// tls and auth are special keys that need to be enumerated separately
// other objects are passed as is
if (!target[key]) {
// ensure that target has this key
target[key] = {};
}
Object.keys(source[key]).forEach(subKey => {
target[key][subKey] = source[key][subKey];
});
} else {
target[key] = source[key];
}
});
});
return target;
};
module.exports.encodeXText = str => {
// ! 0x21
// + 0x2B
// = 0x3D
// ~ 0x7E
if (!/[^\x21-\x2A\x2C-\x3C\x3E-\x7E]/.test(str)) {
return str;
}
let buf = Buffer.from(str);
let result = '';
for (let i = 0, len = buf.length; i < len; i++) {
let c = buf[i];
if (c < 0x21 || c > 0x7e || c === 0x2b || c === 0x3d) {
result += '+' + (c < 0x10 ? '0' : '') + c.toString(16).toUpperCase();
} else {
result += String.fromCharCode(c);
}
}
return result;
};
/**
* Streams a stream value into a Buffer
*
* @param {Object} stream Readable stream
* @param {Function} callback Callback function with (err, value)
*/
function resolveStream(stream, callback) {
let responded = false;
let chunks = [];
let chunklen = 0;
stream.on('error', err => {
if (responded) {
return;
}
responded = true;
callback(err);
});
stream.on('readable', () => {
let chunk;
while ((chunk = stream.read()) !== null) {
chunks.push(chunk);
chunklen += chunk.length;
}
});
stream.on('end', () => {
if (responded) {
return;
}
responded = true;
let value;
try {
value = Buffer.concat(chunks, chunklen);
} catch (E) {
return callback(E);
}
callback(null, value);
});
}
/**
* Generates a bunyan-like logger that prints to console
*
* @returns {Object} Bunyan logger instance
*/
function createDefaultLogger(levels) {
let levelMaxLen = 0;
let levelNames = new Map();
levels.forEach(level => {
if (level.length > levelMaxLen) {
levelMaxLen = level.length;
}
});
levels.forEach(level => {
let levelName = level.toUpperCase();
if (levelName.length < levelMaxLen) {
levelName += ' '.repeat(levelMaxLen - levelName.length);
}
levelNames.set(level, levelName);
});
let print = (level, entry, message, ...args) => {
let prefix = '';
if (entry) {
if (entry.tnx === 'server') {
prefix = 'S: ';
} else if (entry.tnx === 'client') {
prefix = 'C: ';
}
if (entry.sid) {
prefix = '[' + entry.sid + '] ' + prefix;
}
if (entry.cid) {
prefix = '[#' + entry.cid + '] ' + prefix;
}
}
message = util.format(message, ...args);
message.split(/\r?\n/).forEach(line => {
console.log('[%s] %s %s', new Date().toISOString().substr(0, 19).replace(/T/, ' '), levelNames.get(level), prefix + line);
});
};
let logger = {};
levels.forEach(level => {
logger[level] = print.bind(null, level);
});
return logger;
}

View File

@@ -0,0 +1,30 @@
import { bindIfParam } from "../sql/expressions/index.js";
import { sql } from "../sql/sql.js";
export * from "../sql/expressions/index.js";
function concat(column, value) {
return sql`${column} || ${bindIfParam(value, column)}`;
}
function substring(column, { from, for: _for }) {
const chunks = [sql`substring(`, column];
if (from !== void 0) {
chunks.push(sql` from `, bindIfParam(from, column));
}
if (_for !== void 0) {
chunks.push(sql` for `, bindIfParam(_for, column));
}
chunks.push(sql`)`);
return sql.join(chunks);
}
function dotProduct(column, value) {
return sql`${column} <*> ${JSON.stringify(value)}`;
}
function euclideanDistance(column, value) {
return sql`${column} <-> ${JSON.stringify(value)}`;
}
export {
concat,
dotProduct,
euclideanDistance,
substring
};
//# sourceMappingURL=expressions.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"decode_codepoint.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["decode_codepoint.ts"],"names":[],"mappings":"AAkCA;;GAEG;AACH,eAAO,MAAM,aAAa,qCAgBrB,CAAC;AAEN;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,UAMjD;AAED;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAEjE"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"debug.d.ts","sourceRoot":"","sources":["../../../src/utils/debug.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,OAAO,CAAC,CAY1D"}

View File

@@ -0,0 +1,19 @@
/**
* Inserts a node after a given reference node.
*
* @param node the node to insert
* @param refNode the reference node
*/
export default function insertAfter(node, refNode) {
if (node && refNode && refNode.parentNode) {
if (refNode.nextSibling) {
refNode.parentNode.insertBefore(node, refNode.nextSibling);
} else {
refNode.parentNode.appendChild(node);
}
return node;
}
return null;
}

View File

@@ -0,0 +1,33 @@
/**
* The set of allowed directive location values.
*/
declare enum DirectiveLocation {
/** Request Definitions */
QUERY = 'QUERY',
MUTATION = 'MUTATION',
SUBSCRIPTION = 'SUBSCRIPTION',
FIELD = 'FIELD',
FRAGMENT_DEFINITION = 'FRAGMENT_DEFINITION',
FRAGMENT_SPREAD = 'FRAGMENT_SPREAD',
INLINE_FRAGMENT = 'INLINE_FRAGMENT',
VARIABLE_DEFINITION = 'VARIABLE_DEFINITION',
/** Type System Definitions */
SCHEMA = 'SCHEMA',
SCALAR = 'SCALAR',
OBJECT = 'OBJECT',
FIELD_DEFINITION = 'FIELD_DEFINITION',
ARGUMENT_DEFINITION = 'ARGUMENT_DEFINITION',
INTERFACE = 'INTERFACE',
UNION = 'UNION',
ENUM = 'ENUM',
ENUM_VALUE = 'ENUM_VALUE',
INPUT_OBJECT = 'INPUT_OBJECT',
INPUT_FIELD_DEFINITION = 'INPUT_FIELD_DEFINITION',
}
export { DirectiveLocation };
/**
* The enum type representing the directive location values.
*
* @deprecated Please use `DirectiveLocation`. Will be remove in v17.
*/
export declare type DirectiveLocationEnum = typeof DirectiveLocation;

View File

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

View File

@@ -0,0 +1 @@
export{default as createNavigation}from"./navigation/react-client/createNavigation.js";

View File

@@ -0,0 +1,434 @@
import { Forbidden } from '../../../errors/Forbidden.js';
import { isolateObjectProperty } from '../../../utilities/isolateObjectProperty.js';
import { jobsCollectionSlug } from '../../config/collection.js';
import { JobCancelledError } from '../../errors/index.js';
import { getCurrentDate } from '../../utilities/getCurrentDate.js';
import { updateJob, updateJobs } from '../../utilities/updateJob.js';
import { getUpdateJobFunction } from './runJob/getUpdateJobFunction.js';
import { importHandlerPath } from './runJob/importHandlerPath.js';
import { runJob } from './runJob/index.js';
import { runJSONJob } from './runJSONJob/index.js';
export const runJobs = async (args)=>{
const { id, allQueues = false, limit = 10, overrideAccess, processingOrder, queue = 'default', req, req: { payload, payload: { config: { jobs: jobsConfig } } }, sequential, silent = false, where: whereFromProps } = args;
if (!overrideAccess) {
/**
* By default, jobsConfig.access.run will be `defaultAccess` which is a function that returns `true` if the user is logged in.
*/ const accessFn = jobsConfig?.access?.run ?? (()=>true);
const hasAccess = await accessFn({
req
});
if (!hasAccess) {
throw new Forbidden(req.t);
}
}
const and = [
{
completedAt: {
exists: false
}
},
{
hasError: {
not_equals: true
}
},
{
processing: {
equals: false
}
},
{
or: [
{
waitUntil: {
exists: false
}
},
{
waitUntil: {
less_than: getCurrentDate().toISOString()
}
}
]
}
];
if (allQueues !== true) {
and.push({
queue: {
equals: queue ?? 'default'
}
});
}
if (whereFromProps) {
and.push(whereFromProps);
}
// Only enforce concurrency controls if the feature is enabled
if (jobsConfig.enableConcurrencyControl) {
// Find currently running jobs with concurrency keys to enforce exclusive concurrency
// Jobs with the same concurrencyKey should not run in parallel
const runningJobsWithConcurrency = await payload.db.find({
collection: jobsCollectionSlug,
limit: 0,
pagination: false,
req: {
transactionID: undefined
},
select: {
concurrencyKey: true
},
where: {
and: [
{
processing: {
equals: true
}
},
{
concurrencyKey: {
exists: true
}
}
]
}
});
const runningConcurrencyKeys = new Set();
if (runningJobsWithConcurrency?.docs) {
for (const doc of runningJobsWithConcurrency.docs){
const concurrencyKey = doc.concurrencyKey;
if (concurrencyKey) {
runningConcurrencyKeys.add(concurrencyKey);
}
}
}
// Exclude jobs whose concurrencyKey is already running
if (runningConcurrencyKeys.size > 0) {
and.push({
or: [
// Jobs without a concurrency key can always run
{
concurrencyKey: {
exists: false
}
},
// Jobs with a concurrency key that is not currently running can run
{
concurrencyKey: {
not_in: [
...runningConcurrencyKeys
]
}
}
]
});
}
}
// Find all jobs and ensure we set job to processing: true as early as possible to reduce the chance of
// the same job being picked up by another worker
let jobs = [];
if (id) {
// Only one job to run
const job = await updateJob({
id,
data: {
processing: true
},
depth: jobsConfig.depth,
disableTransaction: true,
req,
returning: true
});
if (job) {
jobs = [
job
];
}
} else {
let defaultProcessingOrder = payload.collections[jobsCollectionSlug]?.config.defaultSort ?? 'createdAt';
const processingOrderConfig = jobsConfig.processingOrder;
if (typeof processingOrderConfig === 'function') {
defaultProcessingOrder = await processingOrderConfig(args);
} else if (typeof processingOrderConfig === 'object' && !Array.isArray(processingOrderConfig)) {
if (!allQueues && queue && processingOrderConfig.queues && processingOrderConfig.queues[queue]) {
defaultProcessingOrder = processingOrderConfig.queues[queue];
} else if (processingOrderConfig.default) {
defaultProcessingOrder = processingOrderConfig.default;
}
} else if (typeof processingOrderConfig === 'string') {
defaultProcessingOrder = processingOrderConfig;
}
const updatedDocs = await updateJobs({
data: {
processing: true
},
depth: jobsConfig.depth,
disableTransaction: true,
limit,
req,
returning: true,
sort: processingOrder ?? defaultProcessingOrder,
where: {
and
}
});
if (updatedDocs) {
jobs = updatedDocs;
}
}
if (!jobs.length) {
return {
noJobsRemaining: true,
remainingJobsFromQueried: 0
};
}
// Only handle concurrency deduplication if the feature is enabled
if (jobsConfig.enableConcurrencyControl) {
// Handle the case where multiple jobs with the same concurrencyKey were picked up in the same batch
// We should only run one job per concurrencyKey, release the others back to pending
const seenConcurrencyKeys = new Set();
const jobsToRun = [];
const jobsToRelease = [];
for (const job of jobs){
if (job.concurrencyKey) {
if (seenConcurrencyKeys.has(job.concurrencyKey)) {
// This job has the same concurrencyKey as another job we're already running
jobsToRelease.push(job);
} else {
seenConcurrencyKeys.add(job.concurrencyKey);
jobsToRun.push(job);
}
} else {
jobsToRun.push(job);
}
}
// Release duplicate concurrencyKey jobs back to pending state
if (jobsToRelease.length > 0) {
const releaseIds = jobsToRelease.map((job)=>job.id);
await updateJobs({
data: {
processing: false
},
disableTransaction: true,
req,
returning: false,
where: {
id: {
in: releaseIds
}
}
});
}
// Use only the filtered jobs going forward
jobs = jobsToRun;
}
if (!jobs.length) {
return {
noJobsRemaining: false,
remainingJobsFromQueried: 0
};
}
/**
* Just for logging purposes, we want to know how many jobs are new and how many are existing (= already been tried).
* This is only for logs - in the end we still want to run all jobs, regardless of whether they are new or existing.
*/ const { existingJobs, newJobs } = jobs.reduce((acc, job)=>{
if (job.totalTried > 0) {
acc.existingJobs.push(job);
} else {
acc.newJobs.push(job);
}
return acc;
}, {
existingJobs: [],
newJobs: []
});
if (!silent || typeof silent === 'object' && !silent.info) {
payload.logger.info({
msg: `Running ${jobs.length} jobs.`,
new: newJobs?.length,
retrying: existingJobs?.length
});
}
const successfullyCompletedJobs = [];
const runSingleJob = async (job)=>{
if (!job.workflowSlug && !job.taskSlug) {
throw new Error('Job must have either a workflowSlug or a taskSlug');
}
const jobReq = isolateObjectProperty(req, 'transactionID');
const workflowConfig = job.workflowSlug && jobsConfig.workflows?.length ? jobsConfig.workflows.find(({ slug })=>slug === job.workflowSlug) : {
slug: 'singleTask',
handler: async ({ job, tasks })=>{
await tasks[job.taskSlug]('1', {
input: job.input
});
}
};
if (!workflowConfig) {
return {
id: job.id,
result: {
status: 'error'
}
} // Skip jobs with no workflow configuration
;
}
try {
const updateJob = getUpdateJobFunction(job, jobReq);
// the runner will either be passed to the config
// OR it will be a path, which we will need to import via eval to avoid
// Next.js compiler dynamic import expression errors
let workflowHandler;
if (typeof workflowConfig.handler === 'function' || typeof workflowConfig.handler === 'object' && Array.isArray(workflowConfig.handler)) {
workflowHandler = workflowConfig.handler;
} else {
workflowHandler = await importHandlerPath(workflowConfig.handler);
if (!workflowHandler) {
const jobLabel = job.workflowSlug || `Task: ${job.taskSlug}`;
const errorMessage = `Can't find runner while importing with the path ${workflowConfig.handler} in job type ${jobLabel}.`;
if (!silent || typeof silent === 'object' && !silent.error) {
payload.logger.error(errorMessage);
}
await updateJob({
error: {
error: errorMessage
},
hasError: true,
processing: false
});
return {
id: job.id,
result: {
status: 'error-reached-max-retries'
}
};
}
}
if (typeof workflowHandler === 'function') {
const result = await runJob({
job,
req: jobReq,
silent,
updateJob,
workflowConfig,
workflowHandler
});
if (result.status === 'success') {
successfullyCompletedJobs.push(job.id);
}
return {
id: job.id,
result
};
} else {
const result = await runJSONJob({
job,
req: jobReq,
silent,
updateJob,
workflowConfig,
workflowHandler
});
if (result.status === 'success') {
successfullyCompletedJobs.push(job.id);
}
return {
id: job.id,
result
};
}
} catch (error) {
if (error instanceof JobCancelledError) {
if (!job.error?.cancelled || !job.hasError || job.processing || job.completedAt || job.waitUntil) {
// When using the local API to cancel jobs, the local API will update the job data for us to ensure the job is cancelled.
// But when throwing a JobCancelledError within a task or workflow handler, we are responsible for updating the job data ourselves.
await updateJob({
id: job.id,
data: {
completedAt: null,
error: {
cancelled: true,
message: error.message
},
hasError: true,
processing: false,
waitUntil: null
},
depth: 0,
disableTransaction: true,
req,
returning: false
});
}
return {
id: job.id,
result: {
status: 'error-reached-max-retries'
}
};
}
throw error;
}
};
let resultsArray = [];
if (sequential) {
for (const job of jobs){
const result = await runSingleJob(job);
if (result) {
resultsArray.push(result);
}
}
} else {
const jobPromises = jobs.map(runSingleJob);
resultsArray = await Promise.all(jobPromises);
}
if (jobsConfig.deleteJobOnComplete && successfullyCompletedJobs.length) {
try {
if (jobsConfig.runHooks) {
await payload.delete({
collection: jobsCollectionSlug,
depth: 0,
disableTransaction: true,
where: {
id: {
in: successfullyCompletedJobs
}
}
});
} else {
await payload.db.deleteMany({
collection: jobsCollectionSlug,
where: {
id: {
in: successfullyCompletedJobs
}
}
});
}
} catch (err) {
if (!silent || typeof silent === 'object' && !silent.error) {
payload.logger.error({
err,
msg: `Failed to delete jobs ${successfullyCompletedJobs.join(', ')} on complete`
});
}
}
}
const resultsObject = resultsArray.reduce((acc, cur)=>{
if (cur !== null) {
// Check if there's a valid result to include
acc[cur.id] = cur.result;
}
return acc;
}, {});
let remainingJobsFromQueried = 0;
for(const jobID in resultsObject){
const jobResult = resultsObject[jobID];
if (jobResult?.status === 'error') {
remainingJobsFromQueried++; // Can be retried
}
}
return {
jobStatus: resultsObject,
remainingJobsFromQueried
};
};
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,45 @@
import { combineQueries } from '../../index.js';
/**
* Returns whether or not the entity doc exists based on the where query.
*/ export async function entityDocExists({ id, slug, entityType, locale, operation, req, where }) {
if (entityType === 'global') {
const global = await req.payload.db.findGlobal({
slug,
locale,
req,
select: {},
where
});
const hasGlobalDoc = Boolean(global && Object.keys(global).length > 0);
return hasGlobalDoc;
}
if (entityType === 'collection' && id) {
if (operation === 'readVersions') {
const count = await req.payload.db.countVersions({
collection: slug,
locale,
req,
where: combineQueries(where, {
parent: {
equals: id
}
})
});
return count.totalDocs > 0;
}
const count = await req.payload.db.count({
collection: slug,
locale,
req,
where: combineQueries(where, {
id: {
equals: id
}
})
});
return count.totalDocs > 0;
}
return false;
}
//# sourceMappingURL=entityDocExists.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"hexagon.js","sources":["../../../src/icons/hexagon.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Hexagon\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMjEgMTZWOGEyIDIgMCAwIDAtMS0xLjczbC03LTRhMiAyIDAgMCAwLTIgMGwtNyA0QTIgMiAwIDAgMCAzIDh2OGEyIDIgMCAwIDAgMSAxLjczbDcgNGEyIDIgMCAwIDAgMiAwbDctNEEyIDIgMCAwIDAgMjEgMTZ6IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/hexagon\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 Hexagon = createLucideIcon('Hexagon', [\n [\n 'path',\n {\n d: 'M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z',\n key: 'yt0hxn',\n },\n ],\n]);\n\nexport default Hexagon;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,iBAAiB,SAAW,CAAA,CAAA,CAAA;AAAA,CAC1C,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA;AACF,CAAC,CAAA,CAAA;;"}

View File

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

View File

@@ -0,0 +1,8 @@
import { Transport } from '@sentry/core';
import { WINDOW } from '../helpers';
import { BrowserTransportOptions } from './types';
/**
* Creates a Transport that uses the Fetch API to send events to Sentry.
*/
export declare function makeFetchTransport(options: BrowserTransportOptions, nativeFetch?: typeof WINDOW.fetch): Transport;
//# sourceMappingURL=fetch.d.ts.map

View File

@@ -0,0 +1,22 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Bean = createLucideIcon("Bean", [
[
"path",
{
d: "M10.165 6.598C9.954 7.478 9.64 8.36 9 9c-.64.64-1.521.954-2.402 1.165A6 6 0 0 0 8 22c7.732 0 14-6.268 14-14a6 6 0 0 0-11.835-1.402Z",
key: "1tvzk7"
}
],
["path", { d: "M5.341 10.62a4 4 0 1 0 5.279-5.28", key: "2cyri2" }]
]);
export { Bean as default };
//# sourceMappingURL=bean.js.map

View File

@@ -0,0 +1,107 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.numberLiteralFromRaw = numberLiteralFromRaw;
exports.instruction = instruction;
exports.objectInstruction = objectInstruction;
exports.withLoc = withLoc;
exports.withRaw = withRaw;
exports.funcParam = funcParam;
exports.indexLiteral = indexLiteral;
exports.memIndexLiteral = memIndexLiteral;
var _helperNumbers = require("@webassemblyjs/helper-numbers");
var _nodes = require("./nodes");
function numberLiteralFromRaw(rawValue) {
var instructionType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "i32";
var original = rawValue; // Remove numeric separators _
if (typeof rawValue === "string") {
rawValue = rawValue.replace(/_/g, "");
}
if (typeof rawValue === "number") {
return (0, _nodes.numberLiteral)(rawValue, String(original));
} else {
switch (instructionType) {
case "i32":
{
return (0, _nodes.numberLiteral)((0, _helperNumbers.parse32I)(rawValue), String(original));
}
case "u32":
{
return (0, _nodes.numberLiteral)((0, _helperNumbers.parseU32)(rawValue), String(original));
}
case "i64":
{
return (0, _nodes.longNumberLiteral)((0, _helperNumbers.parse64I)(rawValue), String(original));
}
case "f32":
{
return (0, _nodes.floatLiteral)((0, _helperNumbers.parse32F)(rawValue), (0, _helperNumbers.isNanLiteral)(rawValue), (0, _helperNumbers.isInfLiteral)(rawValue), String(original));
}
// f64
default:
{
return (0, _nodes.floatLiteral)((0, _helperNumbers.parse64F)(rawValue), (0, _helperNumbers.isNanLiteral)(rawValue), (0, _helperNumbers.isInfLiteral)(rawValue), String(original));
}
}
}
}
function instruction(id) {
var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
var namedArgs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
return (0, _nodes.instr)(id, undefined, args, namedArgs);
}
function objectInstruction(id, object) {
var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
var namedArgs = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
return (0, _nodes.instr)(id, object, args, namedArgs);
}
/**
* Decorators
*/
function withLoc(n, end, start) {
var loc = {
start: start,
end: end
};
n.loc = loc;
return n;
}
function withRaw(n, raw) {
n.raw = raw;
return n;
}
function funcParam(valtype, id) {
return {
id: id,
valtype: valtype
};
}
function indexLiteral(value) {
// $FlowIgnore
var x = numberLiteralFromRaw(value, "u32");
return x;
}
function memIndexLiteral(value) {
// $FlowIgnore
var x = numberLiteralFromRaw(value, "u32");
return x;
}

View File

@@ -0,0 +1,67 @@
'use client';
import { c as _c } from "react/compiler-runtime";
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import React from 'react';
import { useTranslation } from '../../providers/Translation/index.js';
import { Button } from '../Button/index.js';
import './index.scss';
const baseClass = 'list-selection';
export function ListSelection_v4(t0) {
const $ = _c(5);
const {
count,
ListActions,
SelectionActions
} = t0;
const {
t
} = useTranslation();
let t1;
if ($[0] !== ListActions || $[1] !== SelectionActions || $[2] !== count || $[3] !== t) {
t1 = _jsxs("div", {
className: baseClass,
children: [_jsx("span", {
children: t("general:selectedCount", {
count,
label: ""
})
}), ListActions && ListActions.length > 0 && _jsxs(React.Fragment, {
children: [_jsx("span", {
children: "\u2014"
}), _jsx("div", {
className: `${baseClass}__actions`,
children: ListActions
})]
}), SelectionActions && SelectionActions.length > 0 && _jsxs(React.Fragment, {
children: [_jsx("span", {
children: "\u2014"
}), _jsx("div", {
className: `${baseClass}__actions`,
children: SelectionActions
})]
})]
});
$[0] = ListActions;
$[1] = SelectionActions;
$[2] = count;
$[3] = t;
$[4] = t1;
} else {
t1 = $[4];
}
return t1;
}
export function ListSelectionButton({
children,
className,
...props
}) {
return /*#__PURE__*/_jsx(Button, {
...props,
buttonStyle: "none",
className: [`${baseClass}__button`, className].filter(Boolean).join(' '),
children: children
});
}
//# sourceMappingURL=index.js.map

View File

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

View File

@@ -0,0 +1,17 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const ChartNoAxesColumnIncreasing = createLucideIcon("ChartNoAxesColumnIncreasing", [
["line", { x1: "12", x2: "12", y1: "20", y2: "10", key: "1vz5eb" }],
["line", { x1: "18", x2: "18", y1: "20", y2: "4", key: "cun8e5" }],
["line", { x1: "6", x2: "6", y1: "20", y2: "16", key: "hq0ia6" }]
]);
export { ChartNoAxesColumnIncreasing as default };
//# sourceMappingURL=chart-no-axes-column-increasing.js.map

View File

@@ -0,0 +1,263 @@
'use strict';
function hasKey(obj, keys) {
var o = obj;
keys.slice(0, -1).forEach(function (key) {
o = o[key] || {};
});
var key = keys[keys.length - 1];
return key in o;
}
function isNumber(x) {
if (typeof x === 'number') { return true; }
if ((/^0x[0-9a-f]+$/i).test(x)) { return true; }
return (/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/).test(x);
}
function isConstructorOrProto(obj, key) {
return (key === 'constructor' && typeof obj[key] === 'function') || key === '__proto__';
}
module.exports = function (args, opts) {
if (!opts) { opts = {}; }
var flags = {
bools: {},
strings: {},
unknownFn: null,
};
if (typeof opts.unknown === 'function') {
flags.unknownFn = opts.unknown;
}
if (typeof opts.boolean === 'boolean' && opts.boolean) {
flags.allBools = true;
} else {
[].concat(opts.boolean).filter(Boolean).forEach(function (key) {
flags.bools[key] = true;
});
}
var aliases = {};
function aliasIsBoolean(key) {
return aliases[key].some(function (x) {
return flags.bools[x];
});
}
Object.keys(opts.alias || {}).forEach(function (key) {
aliases[key] = [].concat(opts.alias[key]);
aliases[key].forEach(function (x) {
aliases[x] = [key].concat(aliases[key].filter(function (y) {
return x !== y;
}));
});
});
[].concat(opts.string).filter(Boolean).forEach(function (key) {
flags.strings[key] = true;
if (aliases[key]) {
[].concat(aliases[key]).forEach(function (k) {
flags.strings[k] = true;
});
}
});
var defaults = opts.default || {};
var argv = { _: [] };
function argDefined(key, arg) {
return (flags.allBools && (/^--[^=]+$/).test(arg))
|| flags.strings[key]
|| flags.bools[key]
|| aliases[key];
}
function setKey(obj, keys, value) {
var o = obj;
for (var i = 0; i < keys.length - 1; i++) {
var key = keys[i];
if (isConstructorOrProto(o, key)) { return; }
if (o[key] === undefined) { o[key] = {}; }
if (
o[key] === Object.prototype
|| o[key] === Number.prototype
|| o[key] === String.prototype
) {
o[key] = {};
}
if (o[key] === Array.prototype) { o[key] = []; }
o = o[key];
}
var lastKey = keys[keys.length - 1];
if (isConstructorOrProto(o, lastKey)) { return; }
if (
o === Object.prototype
|| o === Number.prototype
|| o === String.prototype
) {
o = {};
}
if (o === Array.prototype) { o = []; }
if (o[lastKey] === undefined || flags.bools[lastKey] || typeof o[lastKey] === 'boolean') {
o[lastKey] = value;
} else if (Array.isArray(o[lastKey])) {
o[lastKey].push(value);
} else {
o[lastKey] = [o[lastKey], value];
}
}
function setArg(key, val, arg) {
if (arg && flags.unknownFn && !argDefined(key, arg)) {
if (flags.unknownFn(arg) === false) { return; }
}
var value = !flags.strings[key] && isNumber(val)
? Number(val)
: val;
setKey(argv, key.split('.'), value);
(aliases[key] || []).forEach(function (x) {
setKey(argv, x.split('.'), value);
});
}
Object.keys(flags.bools).forEach(function (key) {
setArg(key, defaults[key] === undefined ? false : defaults[key]);
});
var notFlags = [];
if (args.indexOf('--') !== -1) {
notFlags = args.slice(args.indexOf('--') + 1);
args = args.slice(0, args.indexOf('--'));
}
for (var i = 0; i < args.length; i++) {
var arg = args[i];
var key;
var next;
if ((/^--.+=/).test(arg)) {
// Using [\s\S] instead of . because js doesn't support the
// 'dotall' regex modifier. See:
// http://stackoverflow.com/a/1068308/13216
var m = arg.match(/^--([^=]+)=([\s\S]*)$/);
key = m[1];
var value = m[2];
if (flags.bools[key]) {
value = value !== 'false';
}
setArg(key, value, arg);
} else if ((/^--no-.+/).test(arg)) {
key = arg.match(/^--no-(.+)/)[1];
setArg(key, false, arg);
} else if ((/^--.+/).test(arg)) {
key = arg.match(/^--(.+)/)[1];
next = args[i + 1];
if (
next !== undefined
&& !(/^(-|--)[^-]/).test(next)
&& !flags.bools[key]
&& !flags.allBools
&& (aliases[key] ? !aliasIsBoolean(key) : true)
) {
setArg(key, next, arg);
i += 1;
} else if ((/^(true|false)$/).test(next)) {
setArg(key, next === 'true', arg);
i += 1;
} else {
setArg(key, flags.strings[key] ? '' : true, arg);
}
} else if ((/^-[^-]+/).test(arg)) {
var letters = arg.slice(1, -1).split('');
var broken = false;
for (var j = 0; j < letters.length; j++) {
next = arg.slice(j + 2);
if (next === '-') {
setArg(letters[j], next, arg);
continue;
}
if ((/[A-Za-z]/).test(letters[j]) && next[0] === '=') {
setArg(letters[j], next.slice(1), arg);
broken = true;
break;
}
if (
(/[A-Za-z]/).test(letters[j])
&& (/-?\d+(\.\d*)?(e-?\d+)?$/).test(next)
) {
setArg(letters[j], next, arg);
broken = true;
break;
}
if (letters[j + 1] && letters[j + 1].match(/\W/)) {
setArg(letters[j], arg.slice(j + 2), arg);
broken = true;
break;
} else {
setArg(letters[j], flags.strings[letters[j]] ? '' : true, arg);
}
}
key = arg.slice(-1)[0];
if (!broken && key !== '-') {
if (
args[i + 1]
&& !(/^(-|--)[^-]/).test(args[i + 1])
&& !flags.bools[key]
&& (aliases[key] ? !aliasIsBoolean(key) : true)
) {
setArg(key, args[i + 1], arg);
i += 1;
} else if (args[i + 1] && (/^(true|false)$/).test(args[i + 1])) {
setArg(key, args[i + 1] === 'true', arg);
i += 1;
} else {
setArg(key, flags.strings[key] ? '' : true, arg);
}
}
} else {
if (!flags.unknownFn || flags.unknownFn(arg) !== false) {
argv._.push(flags.strings._ || !isNumber(arg) ? arg : Number(arg));
}
if (opts.stopEarly) {
argv._.push.apply(argv._, args.slice(i + 1));
break;
}
}
}
Object.keys(defaults).forEach(function (k) {
if (!hasKey(argv, k.split('.'))) {
setKey(argv, k.split('.'), defaults[k]);
(aliases[k] || []).forEach(function (x) {
setKey(argv, x.split('.'), defaults[k]);
});
}
});
if (opts['--']) {
argv['--'] = notFlags.slice();
} else {
notFlags.forEach(function (k) {
argv._.push(k);
});
}
return argv;
};

View File

@@ -0,0 +1,39 @@
import { Span } from '@opentelemetry/api';
import { InstrumentationConfig } from '@opentelemetry/instrumentation';
import { ExpressLayerType } from './enums/ExpressLayerType';
export type LayerPathSegment = string | RegExp | number;
export type IgnoreMatcher = string | RegExp | ((name: string) => boolean);
export type ExpressRequestInfo<T = any> = {
/** An express request object */
request: T;
route: string;
layerType: ExpressLayerType;
};
export type SpanNameHook = (info: ExpressRequestInfo,
/**
* If no decision is taken based on RequestInfo, the default name
* supplied by the instrumentation can be used instead.
*/
defaultName: string) => string;
/**
* Function that can be used to add custom attributes to the current span or the root span on
* a Express request
* @param span - The Express middleware layer span.
* @param info - An instance of ExpressRequestInfo that contains info about the request such as the route, and the layer type.
*/
export interface ExpressRequestCustomAttributeFunction {
(span: Span, info: ExpressRequestInfo): void;
}
/**
* Options available for the Express Instrumentation (see [documentation](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/packages/instrumentation-express#express-instrumentation-options))
*/
export interface ExpressInstrumentationConfig extends InstrumentationConfig {
/** Ignore specific based on their name */
ignoreLayers?: IgnoreMatcher[];
/** Ignore specific layers based on their type */
ignoreLayersType?: ExpressLayerType[];
spanNameHook?: SpanNameHook;
/** Function for adding custom attributes on Express request */
requestHook?: ExpressRequestCustomAttributeFunction;
}
//# sourceMappingURL=types.d.ts.map

View File

@@ -0,0 +1,63 @@
'use strict'
const SemVer = require('../classes/semver')
const Range = require('../classes/range')
const gt = require('../functions/gt')
const minVersion = (range, loose) => {
range = new Range(range, loose)
let minver = new SemVer('0.0.0')
if (range.test(minver)) {
return minver
}
minver = new SemVer('0.0.0-0')
if (range.test(minver)) {
return minver
}
minver = null
for (let i = 0; i < range.set.length; ++i) {
const comparators = range.set[i]
let setMin = null
comparators.forEach((comparator) => {
// Clone to avoid manipulating the comparator's semver object.
const compver = new SemVer(comparator.semver.version)
switch (comparator.operator) {
case '>':
if (compver.prerelease.length === 0) {
compver.patch++
} else {
compver.prerelease.push(0)
}
compver.raw = compver.format()
/* fallthrough */
case '':
case '>=':
if (!setMin || gt(compver, setMin)) {
setMin = compver
}
break
case '<':
case '<=':
/* Ignore maximum versions */
break
/* istanbul ignore next */
default:
throw new Error(`Unexpected operation: ${comparator.operator}`)
}
})
if (setMin && (!minver || gt(minver, setMin))) {
minver = setMin
}
}
if (minver && range.test(minver)) {
return minver
}
return null
}
module.exports = minVersion

View File

@@ -0,0 +1,24 @@
import type { FeedbackModalIntegration, Integration, IntegrationFn } from '@sentry/core';
import type { ActorComponent } from './components/Actor';
import type { OverrideFeedbackConfiguration } from './types';
type Unsubscribe = () => void;
/**
* Allow users to capture user feedback and send it to Sentry.
*/
type BuilderOptions = {
lazyLoadIntegration?: never;
getModalIntegration: () => IntegrationFn;
getScreenshotIntegration: () => IntegrationFn;
} | {
lazyLoadIntegration: (name: 'feedbackModalIntegration' | 'feedbackScreenshotIntegration', scriptNonce?: string) => Promise<IntegrationFn>;
getModalIntegration?: never;
getScreenshotIntegration?: never;
};
export declare const buildFeedbackIntegration: ({ lazyLoadIntegration, getModalIntegration, getScreenshotIntegration, }: BuilderOptions) => IntegrationFn<Integration & {
attachTo(el: Element | string, optionOverrides?: OverrideFeedbackConfiguration): Unsubscribe;
createForm(optionOverrides?: OverrideFeedbackConfiguration): Promise<ReturnType<FeedbackModalIntegration["createDialog"]>>;
createWidget(optionOverrides?: OverrideFeedbackConfiguration): ActorComponent;
remove(): void;
}>;
export {};
//# sourceMappingURL=integration.d.ts.map

View File

@@ -0,0 +1 @@
import e from"../server/react-server/getConfig.js";import n from"../shared/use.js";function r(r){return function(e,r){try{return n(r)}catch(n){throw n instanceof TypeError&&n.message.includes("Cannot read properties of null (reading 'use')")?new Error(`\`${e}\` is not callable within an async component. Please refer to https://next-intl.dev/docs/environments/server-client-components#async-components`,{cause:n}):n}}(r,e())}export{r as default};

View File

@@ -0,0 +1,18 @@
// Definitions by: @types/styled-jsx <https://www.npmjs.com/package/@types/styled-jsx>
declare module 'styled-jsx/css' {
import type { JSX } from "react";
function css(chunks: TemplateStringsArray, ...args: any[]): JSX.Element
namespace css {
export function global(
chunks: TemplateStringsArray,
...args: any[]
): JSX.Element
export function resolve(
chunks: TemplateStringsArray,
...args: any[]
): { className: string; styles: JSX.Element }
}
export = css
}

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 LexicalTabIndentationPlugin = process.env.NODE_ENV !== 'production' ? require('./LexicalTabIndentationPlugin.dev.js') : require('./LexicalTabIndentationPlugin.prod.js');
module.exports = LexicalTabIndentationPlugin;

View File

@@ -0,0 +1,21 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Octagon = createLucideIcon("Octagon", [
[
"path",
{
d: "M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 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-.586z",
key: "2d38gg"
}
]
]);
export { Octagon as default };
//# sourceMappingURL=octagon.js.map

View File

@@ -0,0 +1,24 @@
function _define_enumerable_properties(obj, descs) {
for (var key in descs) {
var desc = descs[key];
desc.configurable = desc.enumerable = true;
if ("value" in desc) desc.writable = true;
Object.defineProperty(obj, key, desc);
}
if (Object.getOwnPropertySymbols) {
var objectSymbols = Object.getOwnPropertySymbols(descs);
for (var i = 0; i < objectSymbols.length; i++) {
var sym = objectSymbols[i];
var desc = descs[sym];
desc.configurable = desc.enumerable = true;
if ("value" in desc) desc.writable = true;
Object.defineProperty(obj, sym, desc);
}
}
return obj;
}
export { _define_enumerable_properties as _ };

View File

@@ -0,0 +1,615 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const util = require("util");
const SortableSet = require("./util/SortableSet");
const {
compareChunks,
compareIterables,
compareLocations
} = require("./util/comparators");
/** @typedef {import("./AsyncDependenciesBlock")} AsyncDependenciesBlock */
/** @typedef {import("./Chunk")} Chunk */
/** @typedef {import("./ChunkGraph")} ChunkGraph */
/** @typedef {import("./Dependency").DependencyLocation} DependencyLocation */
/** @typedef {import("./Entrypoint")} Entrypoint */
/** @typedef {import("./Module")} Module */
/** @typedef {import("./ModuleGraph")} ModuleGraph */
/** @typedef {{ module: Module | null, loc: DependencyLocation, request: string }} OriginRecord */
/**
* @typedef {object} RawChunkGroupOptions
* @property {number=} preloadOrder
* @property {number=} prefetchOrder
* @property {("low" | "high" | "auto")=} fetchPriority
*/
/** @typedef {RawChunkGroupOptions & { name?: string | null }} ChunkGroupOptions */
let debugId = 5000;
/**
* @template T
* @param {SortableSet<T>} set set to convert to array.
* @returns {T[]} the array format of existing set
*/
const getArray = (set) => [...set];
/**
* A convenience method used to sort chunks based on their id's
* @param {ChunkGroup} a first sorting comparator
* @param {ChunkGroup} b second sorting comparator
* @returns {1 | 0 | -1} a sorting index to determine order
*/
const sortById = (a, b) => {
if (a.id < b.id) return -1;
if (b.id < a.id) return 1;
return 0;
};
/**
* @param {OriginRecord} a the first comparator in sort
* @param {OriginRecord} b the second comparator in sort
* @returns {1 | -1 | 0} returns sorting order as index
*/
const sortOrigin = (a, b) => {
const aIdent = a.module ? a.module.identifier() : "";
const bIdent = b.module ? b.module.identifier() : "";
if (aIdent < bIdent) return -1;
if (aIdent > bIdent) return 1;
return compareLocations(a.loc, b.loc);
};
class ChunkGroup {
/**
* Creates an instance of ChunkGroup.
* @param {string | ChunkGroupOptions=} options chunk group options passed to chunkGroup
*/
constructor(options) {
if (typeof options === "string") {
options = { name: options };
} else if (!options) {
options = { name: undefined };
}
/** @type {number} */
this.groupDebugId = debugId++;
/** @type {ChunkGroupOptions} */
this.options = options;
/** @type {SortableSet<ChunkGroup>} */
this._children = new SortableSet(undefined, sortById);
/** @type {SortableSet<ChunkGroup>} */
this._parents = new SortableSet(undefined, sortById);
/** @type {SortableSet<ChunkGroup>} */
this._asyncEntrypoints = new SortableSet(undefined, sortById);
/** @type {SortableSet<AsyncDependenciesBlock>} */
this._blocks = new SortableSet();
/** @type {Chunk[]} */
this.chunks = [];
/** @type {OriginRecord[]} */
this.origins = [];
/** @typedef {Map<Module, number>} OrderIndices */
/** Indices in top-down order */
/**
* @private
* @type {OrderIndices}
*/
this._modulePreOrderIndices = new Map();
/** Indices in bottom-up order */
/**
* @private
* @type {OrderIndices}
*/
this._modulePostOrderIndices = new Map();
/** @type {number | undefined} */
this.index = undefined;
}
/**
* when a new chunk is added to a chunkGroup, addingOptions will occur.
* @param {ChunkGroupOptions} options the chunkGroup options passed to addOptions
* @returns {void}
*/
addOptions(options) {
for (const key of /** @type {(keyof ChunkGroupOptions)[]} */ (
Object.keys(options)
)) {
if (this.options[key] === undefined) {
/** @type {ChunkGroupOptions[keyof ChunkGroupOptions]} */
(this.options[key]) = options[key];
} else if (this.options[key] !== options[key]) {
if (key.endsWith("Order")) {
const orderKey =
/** @type {Exclude<keyof ChunkGroupOptions, "name" | "fetchPriority">} */
(key);
this.options[orderKey] = Math.max(
/** @type {number} */
(this.options[orderKey]),
/** @type {number} */
(options[orderKey])
);
} else {
throw new Error(
`ChunkGroup.addOptions: No option merge strategy for ${key}`
);
}
}
}
}
/**
* returns the name of current ChunkGroup
* @returns {ChunkGroupOptions["name"]} returns the ChunkGroup name
*/
get name() {
return this.options.name;
}
/**
* sets a new name for current ChunkGroup
* @param {string | undefined} value the new name for ChunkGroup
* @returns {void}
*/
set name(value) {
this.options.name = value;
}
/* istanbul ignore next */
/**
* get a uniqueId for ChunkGroup, made up of its member Chunk debugId's
* @returns {string} a unique concatenation of chunk debugId's
*/
get debugId() {
return Array.from(this.chunks, (x) => x.debugId).join("+");
}
/**
* get a unique id for ChunkGroup, made up of its member Chunk id's
* @returns {string} a unique concatenation of chunk ids
*/
get id() {
return Array.from(this.chunks, (x) => x.id).join("+");
}
/**
* Performs an unshift of a specific chunk
* @param {Chunk} chunk chunk being unshifted
* @returns {boolean} returns true if attempted chunk shift is accepted
*/
unshiftChunk(chunk) {
const oldIdx = this.chunks.indexOf(chunk);
if (oldIdx > 0) {
this.chunks.splice(oldIdx, 1);
this.chunks.unshift(chunk);
} else if (oldIdx < 0) {
this.chunks.unshift(chunk);
return true;
}
return false;
}
/**
* inserts a chunk before another existing chunk in group
* @param {Chunk} chunk Chunk being inserted
* @param {Chunk} before Placeholder/target chunk marking new chunk insertion point
* @returns {boolean} return true if insertion was successful
*/
insertChunk(chunk, before) {
const oldIdx = this.chunks.indexOf(chunk);
const idx = this.chunks.indexOf(before);
if (idx < 0) {
throw new Error("before chunk not found");
}
if (oldIdx >= 0 && oldIdx > idx) {
this.chunks.splice(oldIdx, 1);
this.chunks.splice(idx, 0, chunk);
} else if (oldIdx < 0) {
this.chunks.splice(idx, 0, chunk);
return true;
}
return false;
}
/**
* add a chunk into ChunkGroup. Is pushed on or prepended
* @param {Chunk} chunk chunk being pushed into ChunkGroupS
* @returns {boolean} returns true if chunk addition was successful.
*/
pushChunk(chunk) {
const oldIdx = this.chunks.indexOf(chunk);
if (oldIdx >= 0) {
return false;
}
this.chunks.push(chunk);
return true;
}
/**
* @param {Chunk} oldChunk chunk to be replaced
* @param {Chunk} newChunk New chunk that will be replaced with
* @returns {boolean | undefined} returns true if the replacement was successful
*/
replaceChunk(oldChunk, newChunk) {
const oldIdx = this.chunks.indexOf(oldChunk);
if (oldIdx < 0) return false;
const newIdx = this.chunks.indexOf(newChunk);
if (newIdx < 0) {
this.chunks[oldIdx] = newChunk;
return true;
}
if (newIdx < oldIdx) {
this.chunks.splice(oldIdx, 1);
return true;
} else if (newIdx !== oldIdx) {
this.chunks[oldIdx] = newChunk;
this.chunks.splice(newIdx, 1);
return true;
}
}
/**
* @param {Chunk} chunk chunk to remove
* @returns {boolean} returns true if chunk was removed
*/
removeChunk(chunk) {
const idx = this.chunks.indexOf(chunk);
if (idx >= 0) {
this.chunks.splice(idx, 1);
return true;
}
return false;
}
/**
* @returns {boolean} true, when this chunk group will be loaded on initial page load
*/
isInitial() {
return false;
}
/**
* @param {ChunkGroup} group chunk group to add
* @returns {boolean} returns true if chunk group was added
*/
addChild(group) {
const size = this._children.size;
this._children.add(group);
return size !== this._children.size;
}
/**
* @returns {ChunkGroup[]} returns the children of this group
*/
getChildren() {
return this._children.getFromCache(getArray);
}
getNumberOfChildren() {
return this._children.size;
}
get childrenIterable() {
return this._children;
}
/**
* @param {ChunkGroup} group the chunk group to remove
* @returns {boolean} returns true if the chunk group was removed
*/
removeChild(group) {
if (!this._children.has(group)) {
return false;
}
this._children.delete(group);
group.removeParent(this);
return true;
}
/**
* @param {ChunkGroup} parentChunk the parent group to be added into
* @returns {boolean} returns true if this chunk group was added to the parent group
*/
addParent(parentChunk) {
if (!this._parents.has(parentChunk)) {
this._parents.add(parentChunk);
return true;
}
return false;
}
/**
* @returns {ChunkGroup[]} returns the parents of this group
*/
getParents() {
return this._parents.getFromCache(getArray);
}
getNumberOfParents() {
return this._parents.size;
}
/**
* @param {ChunkGroup} parent the parent group
* @returns {boolean} returns true if the parent group contains this group
*/
hasParent(parent) {
return this._parents.has(parent);
}
get parentsIterable() {
return this._parents;
}
/**
* @param {ChunkGroup} chunkGroup the parent group
* @returns {boolean} returns true if this group has been removed from the parent
*/
removeParent(chunkGroup) {
if (this._parents.delete(chunkGroup)) {
chunkGroup.removeChild(this);
return true;
}
return false;
}
/**
* @param {Entrypoint} entrypoint entrypoint to add
* @returns {boolean} returns true if entrypoint was added
*/
addAsyncEntrypoint(entrypoint) {
const size = this._asyncEntrypoints.size;
this._asyncEntrypoints.add(entrypoint);
return size !== this._asyncEntrypoints.size;
}
get asyncEntrypointsIterable() {
return this._asyncEntrypoints;
}
/**
* @returns {AsyncDependenciesBlock[]} an array containing the blocks
*/
getBlocks() {
return this._blocks.getFromCache(getArray);
}
getNumberOfBlocks() {
return this._blocks.size;
}
/**
* @param {AsyncDependenciesBlock} block block
* @returns {boolean} true, if block exists
*/
hasBlock(block) {
return this._blocks.has(block);
}
/**
* @returns {Iterable<AsyncDependenciesBlock>} blocks
*/
get blocksIterable() {
return this._blocks;
}
/**
* @param {AsyncDependenciesBlock} block a block
* @returns {boolean} false, if block was already added
*/
addBlock(block) {
if (!this._blocks.has(block)) {
this._blocks.add(block);
return true;
}
return false;
}
/**
* @param {Module | null} module origin module
* @param {DependencyLocation} loc location of the reference in the origin module
* @param {string} request request name of the reference
* @returns {void}
*/
addOrigin(module, loc, request) {
this.origins.push({
module,
loc,
request
});
}
/**
* @returns {string[]} the files contained this chunk group
*/
getFiles() {
/** @type {Set<string>} */
const files = new Set();
for (const chunk of this.chunks) {
for (const file of chunk.files) {
files.add(file);
}
}
return [...files];
}
/**
* @returns {void}
*/
remove() {
// cleanup parents
for (const parentChunkGroup of this._parents) {
// remove this chunk from its parents
parentChunkGroup._children.delete(this);
// cleanup "sub chunks"
for (const chunkGroup of this._children) {
/**
* remove this chunk as "intermediary" and connect
* it "sub chunks" and parents directly
*/
// add parent to each "sub chunk"
chunkGroup.addParent(parentChunkGroup);
// add "sub chunk" to parent
parentChunkGroup.addChild(chunkGroup);
}
}
/**
* we need to iterate again over the children
* to remove this from the child's parents.
* This can not be done in the above loop
* as it is not guaranteed that `this._parents` contains anything.
*/
for (const chunkGroup of this._children) {
// remove this as parent of every "sub chunk"
chunkGroup._parents.delete(this);
}
// remove chunks
for (const chunk of this.chunks) {
chunk.removeGroup(this);
}
}
sortItems() {
this.origins.sort(sortOrigin);
}
/**
* Sorting predicate which allows current ChunkGroup to be compared against another.
* Sorting values are based off of number of chunks in ChunkGroup.
* @param {ChunkGraph} chunkGraph the chunk graph
* @param {ChunkGroup} otherGroup the chunkGroup to compare this against
* @returns {-1 | 0 | 1} sort position for comparison
*/
compareTo(chunkGraph, otherGroup) {
if (this.chunks.length > otherGroup.chunks.length) return -1;
if (this.chunks.length < otherGroup.chunks.length) return 1;
return compareIterables(compareChunks(chunkGraph))(
this.chunks,
otherGroup.chunks
);
}
/**
* @param {ModuleGraph} moduleGraph the module graph
* @param {ChunkGraph} chunkGraph the chunk graph
* @returns {Record<string, ChunkGroup[]>} mapping from children type to ordered list of ChunkGroups
*/
getChildrenByOrders(moduleGraph, chunkGraph) {
/** @type {Map<string, { order: number, group: ChunkGroup }[]>} */
const lists = new Map();
for (const childGroup of this._children) {
for (const key of Object.keys(childGroup.options)) {
if (key.endsWith("Order")) {
const name = key.slice(0, key.length - "Order".length);
let list = lists.get(name);
if (list === undefined) {
lists.set(name, (list = []));
}
list.push({
order:
/** @type {number} */
(
childGroup.options[/** @type {keyof ChunkGroupOptions} */ (key)]
),
group: childGroup
});
}
}
}
/** @type {Record<string, ChunkGroup[]>} */
const result = Object.create(null);
for (const [name, list] of lists) {
list.sort((a, b) => {
const cmp = b.order - a.order;
if (cmp !== 0) return cmp;
return a.group.compareTo(chunkGraph, b.group);
});
result[name] = list.map((i) => i.group);
}
return result;
}
/**
* Sets the top-down index of a module in this ChunkGroup
* @param {Module} module module for which the index should be set
* @param {number} index the index of the module
* @returns {void}
*/
setModulePreOrderIndex(module, index) {
this._modulePreOrderIndices.set(module, index);
}
/**
* Gets the top-down index of a module in this ChunkGroup
* @param {Module} module the module
* @returns {number | undefined} index
*/
getModulePreOrderIndex(module) {
return this._modulePreOrderIndices.get(module);
}
/**
* Sets the bottom-up index of a module in this ChunkGroup
* @param {Module} module module for which the index should be set
* @param {number} index the index of the module
* @returns {void}
*/
setModulePostOrderIndex(module, index) {
this._modulePostOrderIndices.set(module, index);
}
/**
* Gets the bottom-up index of a module in this ChunkGroup
* @param {Module} module the module
* @returns {number | undefined} index
*/
getModulePostOrderIndex(module) {
return this._modulePostOrderIndices.get(module);
}
/* istanbul ignore next */
checkConstraints() {
const chunk = this;
for (const child of chunk._children) {
if (!child._parents.has(chunk)) {
throw new Error(
`checkConstraints: child missing parent ${chunk.debugId} -> ${child.debugId}`
);
}
}
for (const parentChunk of chunk._parents) {
if (!parentChunk._children.has(chunk)) {
throw new Error(
`checkConstraints: parent missing child ${parentChunk.debugId} <- ${chunk.debugId}`
);
}
}
}
}
ChunkGroup.prototype.getModuleIndex = util.deprecate(
ChunkGroup.prototype.getModulePreOrderIndex,
"ChunkGroup.getModuleIndex was renamed to getModulePreOrderIndex",
"DEP_WEBPACK_CHUNK_GROUP_GET_MODULE_INDEX"
);
ChunkGroup.prototype.getModuleIndex2 = util.deprecate(
ChunkGroup.prototype.getModulePostOrderIndex,
"ChunkGroup.getModuleIndex2 was renamed to getModulePostOrderIndex",
"DEP_WEBPACK_CHUNK_GROUP_GET_MODULE_INDEX_2"
);
module.exports = ChunkGroup;

View File

@@ -0,0 +1,6 @@
export declare const isEditing: ({ id, collectionSlug, globalSlug, }: {
collectionSlug?: string;
globalSlug?: string;
id?: number | string;
}) => boolean;
//# sourceMappingURL=isEditing.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"validation.js","sources":["../../../../src/integrations/mcp-server/validation.ts"],"sourcesContent":["/**\n * Message validation functions for MCP server instrumentation\n *\n * Provides JSON-RPC 2.0 message type validation and MCP server instance validation.\n */\n\nimport { DEBUG_BUILD } from '../../debug-build';\nimport { debug } from '../../utils/debug-logger';\nimport type { JsonRpcNotification, JsonRpcRequest, JsonRpcResponse } from './types';\n\n/**\n * Validates if a message is a JSON-RPC request\n * @param message - Message to validate\n * @returns True if message is a JSON-RPC request\n */\nexport function isJsonRpcRequest(message: unknown): message is JsonRpcRequest {\n return (\n typeof message === 'object' &&\n message !== null &&\n 'jsonrpc' in message &&\n (message as JsonRpcRequest).jsonrpc === '2.0' &&\n 'method' in message &&\n 'id' in message\n );\n}\n\n/**\n * Validates if a message is a JSON-RPC notification\n * @param message - Message to validate\n * @returns True if message is a JSON-RPC notification\n */\nexport function isJsonRpcNotification(message: unknown): message is JsonRpcNotification {\n return (\n typeof message === 'object' &&\n message !== null &&\n 'jsonrpc' in message &&\n (message as JsonRpcNotification).jsonrpc === '2.0' &&\n 'method' in message &&\n !('id' in message)\n );\n}\n\n/**\n * Validates if a message is a JSON-RPC response\n * @param message - Message to validate\n * @returns True if message is a JSON-RPC response\n */\nexport function isJsonRpcResponse(message: unknown): message is JsonRpcResponse {\n return (\n typeof message === 'object' &&\n message !== null &&\n 'jsonrpc' in message &&\n (message as { jsonrpc: string }).jsonrpc === '2.0' &&\n 'id' in message &&\n ('result' in message || 'error' in message)\n );\n}\n\n/**\n * Validates MCP server instance with type checking\n * @param instance - Object to validate as MCP server instance\n * @returns True if instance has required MCP server methods\n */\nexport function validateMcpServerInstance(instance: unknown): boolean {\n if (\n typeof instance === 'object' &&\n instance !== null &&\n 'resource' in instance &&\n 'tool' in instance &&\n 'prompt' in instance &&\n 'connect' in instance\n ) {\n return true;\n }\n DEBUG_BUILD && debug.warn('Did not patch MCP server. Interface is incompatible.');\n return false;\n}\n\n/**\n * Check if the item is a valid content item\n * @param item - The item to check\n * @returns True if the item is a valid content item, false otherwise\n */\nexport function isValidContentItem(item: unknown): item is Record<string, unknown> {\n return item != null && typeof item === 'object';\n}\n"],"names":["DEBUG_BUILD","debug"],"mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;;;AAMA;AACA;AACA;AACA;AACA;AACO,SAAS,gBAAgB,CAAC,OAAO,EAAsC;AAC9E,EAAE;AACF,IAAI,OAAO,OAAA,KAAY,QAAA;AACvB,IAAI,OAAA,KAAY,IAAA;AAChB,IAAI,SAAA,IAAa,OAAA;AACjB,IAAI,CAAC,OAAA,GAA2B,OAAA,KAAY,KAAA;AAC5C,IAAI,QAAA,IAAY,OAAA;AAChB,IAAI,QAAQ;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACO,SAAS,qBAAqB,CAAC,OAAO,EAA2C;AACxF,EAAE;AACF,IAAI,OAAO,OAAA,KAAY,QAAA;AACvB,IAAI,OAAA,KAAY,IAAA;AAChB,IAAI,SAAA,IAAa,OAAA;AACjB,IAAI,CAAC,OAAA,GAAgC,OAAA,KAAY,KAAA;AACjD,IAAI,QAAA,IAAY,OAAA;AAChB,IAAI,EAAE,IAAA,IAAQ,OAAO;AACrB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACO,SAAS,iBAAiB,CAAC,OAAO,EAAuC;AAChF,EAAE;AACF,IAAI,OAAO,OAAA,KAAY,QAAA;AACvB,IAAI,OAAA,KAAY,IAAA;AAChB,IAAI,SAAA,IAAa,OAAA;AACjB,IAAI,CAAC,OAAA,GAAgC,OAAA,KAAY,KAAA;AACjD,IAAI,IAAA,IAAQ,OAAA;AACZ,KAAK,QAAA,IAAY,WAAW,OAAA,IAAW,OAAO;AAC9C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACO,SAAS,yBAAyB,CAAC,QAAQ,EAAoB;AACtE,EAAE;AACF,IAAI,OAAO,QAAA,KAAa,QAAA;AACxB,IAAI,QAAA,KAAa,IAAA;AACjB,IAAI,UAAA,IAAc,QAAA;AAClB,IAAI,MAAA,IAAU,QAAA;AACd,IAAI,QAAA,IAAY,QAAA;AAChB,IAAI,aAAa;AACjB,IAAI;AACJ,IAAI,OAAO,IAAI;AACf,EAAE;AACF,EAAEA,0BAAeC,iBAAK,CAAC,IAAI,CAAC,sDAAsD,CAAC;AACnF,EAAE,OAAO,KAAK;AACd;;AAEA;AACA;AACA;AACA;AACA;AACO,SAAS,kBAAkB,CAAC,IAAI,EAA4C;AACnF,EAAE,OAAO,QAAQ,IAAA,IAAQ,OAAO,IAAA,KAAS,QAAQ;AACjD;;;;;;;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","names":["React","Button","useForm","useFormBackgroundProcessing","useFormInitializing","useFormProcessing","baseClass","FormSubmit","props","type","buttonId","id","children","disabled","disabledFromProps","onClick","programmaticSubmit","ref","processing","backgroundProcessing","initializing","submit","canSave","handleClick","undefined","_jsx","className"],"sources":["../../../src/forms/Submit/index.tsx"],"sourcesContent":["'use client'\nimport React from 'react'\n\nimport type { Props } from '../../elements/Button/types.js'\n\nimport { Button } from '../../elements/Button/index.js'\nimport {\n useForm,\n useFormBackgroundProcessing,\n useFormInitializing,\n useFormProcessing,\n} from '../Form/context.js'\nimport './index.scss'\n\nconst baseClass = 'form-submit'\n\nexport const FormSubmit: React.FC<Props> = (props) => {\n const {\n type = 'submit',\n buttonId: id,\n children,\n disabled: disabledFromProps,\n onClick,\n programmaticSubmit,\n ref,\n } = props\n\n const processing = useFormProcessing()\n const backgroundProcessing = useFormBackgroundProcessing()\n const initializing = useFormInitializing()\n const { disabled, submit } = useForm()\n\n const canSave = !(\n disabledFromProps ||\n initializing ||\n processing ||\n backgroundProcessing ||\n disabled\n )\n\n const handleClick =\n onClick ??\n (programmaticSubmit\n ? () => {\n void submit()\n }\n : undefined)\n\n return (\n <div className={baseClass}>\n <Button\n ref={ref}\n {...props}\n disabled={canSave ? undefined : true}\n id={id}\n onClick={handleClick}\n type={type}\n >\n {children}\n </Button>\n </div>\n )\n}\n"],"mappings":"AAAA;;;AACA,OAAOA,KAAA,MAAW;AAIlB,SAASC,MAAM,QAAQ;AACvB,SACEC,OAAO,EACPC,2BAA2B,EAC3BC,mBAAmB,EACnBC,iBAAiB,QACZ;AACP,OAAO;AAEP,MAAMC,SAAA,GAAY;AAElB,OAAO,MAAMC,UAAA,GAA+BC,KAAA;EAC1C,MAAM;IACJC,IAAA,GAAO,QAAQ;IACfC,QAAA,EAAUC,EAAE;IACZC,QAAQ;IACRC,QAAA,EAAUC,iBAAiB;IAC3BC,OAAO;IACPC,kBAAkB;IAClBC;EAAG,CACJ,GAAGT,KAAA;EAEJ,MAAMU,UAAA,GAAab,iBAAA;EACnB,MAAMc,oBAAA,GAAuBhB,2BAAA;EAC7B,MAAMiB,YAAA,GAAehB,mBAAA;EACrB,MAAM;IAAES,QAAQ;IAAEQ;EAAM,CAAE,GAAGnB,OAAA;EAE7B,MAAMoB,OAAA,GAAU,EACdR,iBAAA,IACAM,YAAA,IACAF,UAAA,IACAC,oBAAA,IACAN,QAAO;EAGT,MAAMU,WAAA,GACJR,OAAA,KACCC,kBAAA,GACG;IACE,KAAKK,MAAA;EACP,IACAG,SAAQ;EAEd,oBACEC,IAAA,CAAC;IAAIC,SAAA,EAAWpB,SAAA;cACd,aAAAmB,IAAA,CAACxB,MAAA;MACCgB,GAAA,EAAKA,GAAA;MACJ,GAAGT,KAAK;MACTK,QAAA,EAAUS,OAAA,GAAUE,SAAA,GAAY;MAChCb,EAAA,EAAIA,EAAA;MACJI,OAAA,EAASQ,WAAA;MACTd,IAAA,EAAMA,IAAA;gBAELG;;;AAIT","ignoreList":[]}

View File

@@ -0,0 +1 @@
{"version":3,"file":"oneRequired.js","sourceRoot":"","sources":["../../src/keywords/oneRequired.ts"],"names":[],"mappings":";;;;;AACA,6EAA+C;AAE/C,MAAM,WAAW,GAAsB,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,UAAU,CAAC,IAAA,qBAAM,GAAE,CAAC,CAAA;AAExE,kBAAe,WAAW,CAAA;AAC1B,MAAM,CAAC,OAAO,GAAG,WAAW,CAAA"}

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