node_modules ignore

This commit is contained in:
2025-05-08 23:43:47 +02:00
parent e19d52f172
commit 4574544c9f
65041 changed files with 10593536 additions and 0 deletions

14
server/node_modules/yup/lib/util/ReferenceSet.d.ts generated vendored Normal file
View File

@@ -0,0 +1,14 @@
import Reference from '../Reference';
export default class ReferenceSet {
list: Set<unknown>;
refs: Map<string, Reference>;
constructor();
get size(): number;
describe(): unknown[];
toArray(): unknown[];
add(value: unknown): void;
delete(value: unknown): void;
has(value: unknown, resolve: (v: unknown) => unknown): boolean;
clone(): ReferenceSet;
merge(newItems: ReferenceSet, removeItems: ReferenceSet): ReferenceSet;
}

72
server/node_modules/yup/lib/util/ReferenceSet.js generated vendored Normal file
View File

@@ -0,0 +1,72 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _Reference = _interopRequireDefault(require("../Reference"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
class ReferenceSet {
constructor() {
this.list = new Set();
this.refs = new Map();
}
get size() {
return this.list.size + this.refs.size;
}
describe() {
const description = [];
for (const item of this.list) description.push(item);
for (const [, ref] of this.refs) description.push(ref.describe());
return description;
}
toArray() {
return Array.from(this.list).concat(Array.from(this.refs.values()));
}
add(value) {
_Reference.default.isRef(value) ? this.refs.set(value.key, value) : this.list.add(value);
}
delete(value) {
_Reference.default.isRef(value) ? this.refs.delete(value.key) : this.list.delete(value);
}
has(value, resolve) {
if (this.list.has(value)) return true;
let item,
values = this.refs.values();
while (item = values.next(), !item.done) if (resolve(item.value) === value) return true;
return false;
}
clone() {
const next = new ReferenceSet();
next.list = new Set(this.list);
next.refs = new Map(this.refs);
return next;
}
merge(newItems, removeItems) {
const next = this.clone();
newItems.list.forEach(value => next.add(value));
newItems.refs.forEach(value => next.add(value));
removeItems.list.forEach(value => next.delete(value));
removeItems.refs.forEach(value => next.delete(value));
return next;
}
}
exports.default = ReferenceSet;

52
server/node_modules/yup/lib/util/createValidation.d.ts generated vendored Normal file
View File

@@ -0,0 +1,52 @@
import ValidationError from '../ValidationError';
import { ValidateOptions, Message, InternalOptions, Callback, ExtraParams } from '../types';
import Reference from '../Reference';
import type { AnySchema } from '../schema';
export declare type CreateErrorOptions = {
path?: string;
message?: Message<any>;
params?: ExtraParams;
type?: string;
};
export declare type TestContext<TContext = {}> = {
path: string;
options: ValidateOptions<TContext>;
parent: any;
schema: any;
resolve: <T>(value: T | Reference<T>) => T;
createError: (params?: CreateErrorOptions) => ValidationError;
};
export declare type TestFunction<T = unknown, TContext = {}> = (this: TestContext<TContext>, value: T, context: TestContext<TContext>) => boolean | ValidationError | Promise<boolean | ValidationError>;
export declare type TestOptions<TSchema extends AnySchema = AnySchema> = {
value: any;
path?: string;
label?: string;
options: InternalOptions;
originalValue: any;
schema: TSchema;
sync?: boolean;
};
export declare type TestConfig<TValue = unknown, TContext = {}> = {
name?: string;
message?: Message<any>;
test: TestFunction<TValue, TContext>;
params?: ExtraParams;
exclusive?: boolean;
};
export declare type Test = ((opts: TestOptions, cb: Callback) => void) & {
OPTIONS: TestConfig;
};
export default function createValidation(config: {
name?: string;
test: TestFunction;
params?: ExtraParams;
message?: Message<any>;
}): {
<TSchema extends AnySchema<any, any, any> = AnySchema<any, any, any>>({ value, path, label, options, originalValue, sync, ...rest }: TestOptions<TSchema>, cb: Callback): void;
OPTIONS: {
name?: string | undefined;
test: TestFunction;
params?: Record<string, unknown> | undefined;
message?: string | Record<string | number | symbol, unknown> | ((params: any) => unknown) | undefined;
};
};

101
server/node_modules/yup/lib/util/createValidation.js generated vendored Normal file
View File

@@ -0,0 +1,101 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = createValidation;
var _mapValues = _interopRequireDefault(require("lodash/mapValues"));
var _ValidationError = _interopRequireDefault(require("../ValidationError"));
var _Reference = _interopRequireDefault(require("../Reference"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
function createValidation(config) {
function validate(_ref, cb) {
let {
value,
path = '',
label,
options,
originalValue,
sync
} = _ref,
rest = _objectWithoutPropertiesLoose(_ref, ["value", "path", "label", "options", "originalValue", "sync"]);
const {
name,
test,
params,
message
} = config;
let {
parent,
context
} = options;
function resolve(item) {
return _Reference.default.isRef(item) ? item.getValue(value, parent, context) : item;
}
function createError(overrides = {}) {
const nextParams = (0, _mapValues.default)(_extends({
value,
originalValue,
label,
path: overrides.path || path
}, params, overrides.params), resolve);
const error = new _ValidationError.default(_ValidationError.default.formatError(overrides.message || message, nextParams), value, nextParams.path, overrides.type || name);
error.params = nextParams;
return error;
}
let ctx = _extends({
path,
parent,
type: name,
createError,
resolve,
options,
originalValue
}, rest);
if (!sync) {
try {
Promise.resolve(test.call(ctx, value, ctx)).then(validOrError => {
if (_ValidationError.default.isError(validOrError)) cb(validOrError);else if (!validOrError) cb(createError());else cb(null, validOrError);
});
} catch (err) {
cb(err);
}
return;
}
let result;
try {
var _ref2;
result = test.call(ctx, value, ctx);
if (typeof ((_ref2 = result) == null ? void 0 : _ref2.then) === 'function') {
throw new Error(`Validation test of type: "${ctx.type}" returned a Promise during a synchronous validate. ` + `This test will finish after the validate call has returned`);
}
} catch (err) {
cb(err);
return;
}
if (_ValidationError.default.isError(result)) cb(result);else if (!result) cb(createError());else cb(null, result);
}
validate.OPTIONS = config;
return validate;
}

2
server/node_modules/yup/lib/util/isAbsent.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
declare const _default: (value: any) => value is null | undefined;
export default _default;

10
server/node_modules/yup/lib/util/isAbsent.js generated vendored Normal file
View File

@@ -0,0 +1,10 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _default = value => value == null;
exports.default = _default;

3
server/node_modules/yup/lib/util/isSchema.d.ts generated vendored Normal file
View File

@@ -0,0 +1,3 @@
import type { SchemaLike } from '../types';
declare const _default: (obj: any) => obj is SchemaLike;
export default _default;

10
server/node_modules/yup/lib/util/isSchema.js generated vendored Normal file
View File

@@ -0,0 +1,10 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _default = obj => obj && obj.__isYupSchema__;
exports.default = _default;

1
server/node_modules/yup/lib/util/isodate.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export default function parseIsoDate(date: any): number;

47
server/node_modules/yup/lib/util/isodate.js generated vendored Normal file
View File

@@ -0,0 +1,47 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = parseIsoDate;
/* eslint-disable */
/**
*
* Date.parse with progressive enhancement for ISO 8601 <https://github.com/csnover/js-iso8601>
* NON-CONFORMANT EDITION.
* © 2011 Colin Snover <http://zetafleet.com>
* Released under MIT license.
*/
// 1 YYYY 2 MM 3 DD 4 HH 5 mm 6 ss 7 msec 8 Z 9 ± 10 tzHH 11 tzmm
var isoReg = /^(\d{4}|[+\-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;
function parseIsoDate(date) {
var numericKeys = [1, 4, 5, 6, 7, 10, 11],
minutesOffset = 0,
timestamp,
struct;
if (struct = isoReg.exec(date)) {
// avoid NaN timestamps caused by “undefined” values being passed to Date.UTC
for (var i = 0, k; k = numericKeys[i]; ++i) struct[k] = +struct[k] || 0; // allow undefined days and months
struct[2] = (+struct[2] || 1) - 1;
struct[3] = +struct[3] || 1; // allow arbitrary sub-second precision beyond milliseconds
struct[7] = struct[7] ? String(struct[7]).substr(0, 3) : 0; // timestamps without timezone identifiers should be considered local time
if ((struct[8] === undefined || struct[8] === '') && (struct[9] === undefined || struct[9] === '')) timestamp = +new Date(struct[1], struct[2], struct[3], struct[4], struct[5], struct[6], struct[7]);else {
if (struct[8] !== 'Z' && struct[9] !== undefined) {
minutesOffset = struct[10] * 60 + struct[11];
if (struct[9] === '+') minutesOffset = 0 - minutesOffset;
}
timestamp = Date.UTC(struct[1], struct[2], struct[3], struct[4], struct[5] + minutesOffset, struct[6], struct[7]);
}
} else timestamp = Date.parse ? Date.parse(date) : NaN;
return timestamp;
}

1
server/node_modules/yup/lib/util/printValue.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export default function printValue(value: any, quoteStrings?: boolean): any;

41
server/node_modules/yup/lib/util/printValue.js generated vendored Normal file
View File

@@ -0,0 +1,41 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = printValue;
const toString = Object.prototype.toString;
const errorToString = Error.prototype.toString;
const regExpToString = RegExp.prototype.toString;
const symbolToString = typeof Symbol !== 'undefined' ? Symbol.prototype.toString : () => '';
const SYMBOL_REGEXP = /^Symbol\((.*)\)(.*)$/;
function printNumber(val) {
if (val != +val) return 'NaN';
const isNegativeZero = val === 0 && 1 / val < 0;
return isNegativeZero ? '-0' : '' + val;
}
function printSimpleValue(val, quoteStrings = false) {
if (val == null || val === true || val === false) return '' + val;
const typeOf = typeof val;
if (typeOf === 'number') return printNumber(val);
if (typeOf === 'string') return quoteStrings ? `"${val}"` : val;
if (typeOf === 'function') return '[Function ' + (val.name || 'anonymous') + ']';
if (typeOf === 'symbol') return symbolToString.call(val).replace(SYMBOL_REGEXP, 'Symbol($1)');
const tag = toString.call(val).slice(8, -1);
if (tag === 'Date') return isNaN(val.getTime()) ? '' + val : val.toISOString(val);
if (tag === 'Error' || val instanceof Error) return '[' + errorToString.call(val) + ']';
if (tag === 'RegExp') return regExpToString.call(val);
return null;
}
function printValue(value, quoteStrings) {
let result = printSimpleValue(value, quoteStrings);
if (result !== null) return result;
return JSON.stringify(value, function (key, value) {
let result = printSimpleValue(this[key], quoteStrings);
if (result !== null) return result;
return value;
}, 2);
}

7
server/node_modules/yup/lib/util/reach.d.ts generated vendored Normal file
View File

@@ -0,0 +1,7 @@
export declare function getIn(schema: any, path: string, value?: any, context?: any): {
parent: any;
parentPath: string;
schema: any;
};
declare const reach: (obj: {}, path: string, value?: any, context?: any) => any;
export default reach;

65
server/node_modules/yup/lib/util/reach.js generated vendored Normal file
View File

@@ -0,0 +1,65 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getIn = getIn;
exports.default = void 0;
var _propertyExpr = require("property-expr");
let trim = part => part.substr(0, part.length - 1).substr(1);
function getIn(schema, path, value, context = value) {
let parent, lastPart, lastPartDebug; // root path: ''
if (!path) return {
parent,
parentPath: path,
schema
};
(0, _propertyExpr.forEach)(path, (_part, isBracket, isArray) => {
let part = isBracket ? trim(_part) : _part;
schema = schema.resolve({
context,
parent,
value
});
if (schema.innerType) {
let idx = isArray ? parseInt(part, 10) : 0;
if (value && idx >= value.length) {
throw new Error(`Yup.reach cannot resolve an array item at index: ${_part}, in the path: ${path}. ` + `because there is no value at that index. `);
}
parent = value;
value = value && value[idx];
schema = schema.innerType;
} // sometimes the array index part of a path doesn't exist: "nested.arr.child"
// in these cases the current part is the next schema and should be processed
// in this iteration. For cases where the index signature is included this
// check will fail and we'll handle the `child` part on the next iteration like normal
if (!isArray) {
if (!schema.fields || !schema.fields[part]) throw new Error(`The schema does not contain the path: ${path}. ` + `(failed at: ${lastPartDebug} which is a type: "${schema._type}")`);
parent = value;
value = value && value[part];
schema = schema.fields[part];
}
lastPart = part;
lastPartDebug = isBracket ? '[' + _part + ']' : '.' + _part;
});
return {
schema,
parent,
parentPath: lastPart
};
}
const reach = (obj, path, value, context) => getIn(obj, path, value, context).schema;
var _default = reach;
exports.default = _default;

15
server/node_modules/yup/lib/util/runTests.d.ts generated vendored Normal file
View File

@@ -0,0 +1,15 @@
import ValidationError from '../ValidationError';
import { TestOptions } from './createValidation';
import { Callback } from '../types';
export declare type RunTest = (opts: TestOptions, cb: Callback) => void;
export declare type TestRunOptions = {
endEarly?: boolean;
tests: RunTest[];
args?: TestOptions;
errors?: ValidationError[];
sort?: (a: ValidationError, b: ValidationError) => number;
path?: string;
value: any;
sync?: boolean;
};
export default function runTests(options: TestRunOptions, cb: Callback): void;

71
server/node_modules/yup/lib/util/runTests.js generated vendored Normal file
View File

@@ -0,0 +1,71 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = runTests;
var _ValidationError = _interopRequireDefault(require("../ValidationError"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
const once = cb => {
let fired = false;
return (...args) => {
if (fired) return;
fired = true;
cb(...args);
};
};
function runTests(options, cb) {
let {
endEarly,
tests,
args,
value,
errors,
sort,
path
} = options;
let callback = once(cb);
let count = tests.length;
const nestedErrors = [];
errors = errors ? errors : [];
if (!count) return errors.length ? callback(new _ValidationError.default(errors, value, path)) : callback(null, value);
for (let i = 0; i < tests.length; i++) {
const test = tests[i];
test(args, function finishTestRun(err) {
if (err) {
// always return early for non validation errors
if (!_ValidationError.default.isError(err)) {
return callback(err, value);
}
if (endEarly) {
err.value = value;
return callback(err, value);
}
nestedErrors.push(err);
}
if (--count <= 0) {
if (nestedErrors.length) {
if (sort) nestedErrors.sort(sort); //show parent errors after the nested ones: name.first, name
if (errors.length) nestedErrors.push(...errors);
errors = nestedErrors;
}
if (errors.length) {
callback(new _ValidationError.default(errors, value, path), value);
return;
}
callback(null, value);
}
});
}
}

2
server/node_modules/yup/lib/util/sortByKeyOrder.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
import ValidationError from '../ValidationError';
export default function sortByKeyOrder(keys: string[]): (a: ValidationError, b: ValidationError) => number;

25
server/node_modules/yup/lib/util/sortByKeyOrder.js generated vendored Normal file
View File

@@ -0,0 +1,25 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = sortByKeyOrder;
function findIndex(arr, err) {
let idx = Infinity;
arr.some((key, ii) => {
var _err$path;
if (((_err$path = err.path) == null ? void 0 : _err$path.indexOf(key)) !== -1) {
idx = ii;
return true;
}
});
return idx;
}
function sortByKeyOrder(keys) {
return (a, b) => {
return findIndex(keys, a) - findIndex(keys, b);
};
}

2
server/node_modules/yup/lib/util/sortFields.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
import { ObjectShape } from '../object';
export default function sortFields(fields: ObjectShape, excludes?: readonly string[]): string[];

38
server/node_modules/yup/lib/util/sortFields.js generated vendored Normal file
View File

@@ -0,0 +1,38 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = sortFields;
var _has = _interopRequireDefault(require("lodash/has"));
var _toposort = _interopRequireDefault(require("toposort"));
var _propertyExpr = require("property-expr");
var _Reference = _interopRequireDefault(require("../Reference"));
var _isSchema = _interopRequireDefault(require("./isSchema"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
// @ts-expect-error
function sortFields(fields, excludes = []) {
let edges = [];
let nodes = [];
function addNode(depPath, key) {
var node = (0, _propertyExpr.split)(depPath)[0];
if (!~nodes.indexOf(node)) nodes.push(node);
if (!~excludes.indexOf(`${key}-${node}`)) edges.push([key, node]);
}
for (const key in fields) if ((0, _has.default)(fields, key)) {
let value = fields[key];
if (!~nodes.indexOf(key)) nodes.push(key);
if (_Reference.default.isRef(value) && value.isSibling) addNode(value.path, key);else if ((0, _isSchema.default)(value) && 'deps' in value) value.deps.forEach(path => addNode(path, key));
}
return _toposort.default.array(nodes, edges).reverse();
}

1
server/node_modules/yup/lib/util/toArray.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export default function toArray<T>(value?: null | T | T[]): T[];

10
server/node_modules/yup/lib/util/toArray.js generated vendored Normal file
View File

@@ -0,0 +1,10 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = toArray;
function toArray(value) {
return value == null ? [] : [].concat(value);
}

9
server/node_modules/yup/lib/util/types.d.ts generated vendored Normal file
View File

@@ -0,0 +1,9 @@
export declare type Defined<T> = T extends undefined ? never : T;
export declare type TypedSchema = {
__inputType: any;
__outputType: any;
};
export declare type TypeOf<TSchema extends TypedSchema> = TSchema['__inputType'];
export declare type Asserts<TSchema extends TypedSchema> = TSchema['__outputType'];
export declare type Thunk<T> = T | (() => T);
export declare type If<T, Y, N> = T extends undefined ? Y : N;

1
server/node_modules/yup/lib/util/types.js generated vendored Normal file
View File

@@ -0,0 +1 @@
"use strict";