apify-client 2.23.2-beta.1 → 2.23.2-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle.js +806 -849
- package/dist/bundle.js.map +1 -1
- package/dist/http_client.js +1 -1
- package/dist/http_client.js.map +1 -1
- package/dist/resource_clients/key_value_store.js +1 -1
- package/dist/resource_clients/key_value_store.js.map +1 -1
- package/dist/utils.js +2 -2
- package/dist/utils.js.map +1 -1
- package/package.json +21 -25
package/dist/bundle.js
CHANGED
|
@@ -20,6 +20,445 @@
|
|
|
20
20
|
})(globalThis, () => {
|
|
21
21
|
return (() => {
|
|
22
22
|
var __webpack_modules__ = ({
|
|
23
|
+
8890(module, exports) {
|
|
24
|
+
"use strict";
|
|
25
|
+
|
|
26
|
+
/// <reference lib="es2018"/>
|
|
27
|
+
/// <reference lib="dom"/>
|
|
28
|
+
/// <reference types="node"/>
|
|
29
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
30
|
+
const typedArrayTypeNames = [
|
|
31
|
+
'Int8Array',
|
|
32
|
+
'Uint8Array',
|
|
33
|
+
'Uint8ClampedArray',
|
|
34
|
+
'Int16Array',
|
|
35
|
+
'Uint16Array',
|
|
36
|
+
'Int32Array',
|
|
37
|
+
'Uint32Array',
|
|
38
|
+
'Float32Array',
|
|
39
|
+
'Float64Array',
|
|
40
|
+
'BigInt64Array',
|
|
41
|
+
'BigUint64Array'
|
|
42
|
+
];
|
|
43
|
+
function isTypedArrayName(name) {
|
|
44
|
+
return typedArrayTypeNames.includes(name);
|
|
45
|
+
}
|
|
46
|
+
const objectTypeNames = [
|
|
47
|
+
'Function',
|
|
48
|
+
'Generator',
|
|
49
|
+
'AsyncGenerator',
|
|
50
|
+
'GeneratorFunction',
|
|
51
|
+
'AsyncGeneratorFunction',
|
|
52
|
+
'AsyncFunction',
|
|
53
|
+
'Observable',
|
|
54
|
+
'Array',
|
|
55
|
+
'Buffer',
|
|
56
|
+
'Blob',
|
|
57
|
+
'Object',
|
|
58
|
+
'RegExp',
|
|
59
|
+
'Date',
|
|
60
|
+
'Error',
|
|
61
|
+
'Map',
|
|
62
|
+
'Set',
|
|
63
|
+
'WeakMap',
|
|
64
|
+
'WeakSet',
|
|
65
|
+
'ArrayBuffer',
|
|
66
|
+
'SharedArrayBuffer',
|
|
67
|
+
'DataView',
|
|
68
|
+
'Promise',
|
|
69
|
+
'URL',
|
|
70
|
+
'FormData',
|
|
71
|
+
'URLSearchParams',
|
|
72
|
+
'HTMLElement',
|
|
73
|
+
...typedArrayTypeNames
|
|
74
|
+
];
|
|
75
|
+
function isObjectTypeName(name) {
|
|
76
|
+
return objectTypeNames.includes(name);
|
|
77
|
+
}
|
|
78
|
+
const primitiveTypeNames = [
|
|
79
|
+
'null',
|
|
80
|
+
'undefined',
|
|
81
|
+
'string',
|
|
82
|
+
'number',
|
|
83
|
+
'bigint',
|
|
84
|
+
'boolean',
|
|
85
|
+
'symbol'
|
|
86
|
+
];
|
|
87
|
+
function isPrimitiveTypeName(name) {
|
|
88
|
+
return primitiveTypeNames.includes(name);
|
|
89
|
+
}
|
|
90
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
91
|
+
function isOfType(type) {
|
|
92
|
+
return (value) => typeof value === type;
|
|
93
|
+
}
|
|
94
|
+
const { toString } = Object.prototype;
|
|
95
|
+
const getObjectType = (value) => {
|
|
96
|
+
const objectTypeName = toString.call(value).slice(8, -1);
|
|
97
|
+
if (/HTML\w+Element/.test(objectTypeName) && is.domElement(value)) {
|
|
98
|
+
return 'HTMLElement';
|
|
99
|
+
}
|
|
100
|
+
if (isObjectTypeName(objectTypeName)) {
|
|
101
|
+
return objectTypeName;
|
|
102
|
+
}
|
|
103
|
+
return undefined;
|
|
104
|
+
};
|
|
105
|
+
const isObjectOfType = (type) => (value) => getObjectType(value) === type;
|
|
106
|
+
function is(value) {
|
|
107
|
+
if (value === null) {
|
|
108
|
+
return 'null';
|
|
109
|
+
}
|
|
110
|
+
switch (typeof value) {
|
|
111
|
+
case 'undefined':
|
|
112
|
+
return 'undefined';
|
|
113
|
+
case 'string':
|
|
114
|
+
return 'string';
|
|
115
|
+
case 'number':
|
|
116
|
+
return 'number';
|
|
117
|
+
case 'boolean':
|
|
118
|
+
return 'boolean';
|
|
119
|
+
case 'function':
|
|
120
|
+
return 'Function';
|
|
121
|
+
case 'bigint':
|
|
122
|
+
return 'bigint';
|
|
123
|
+
case 'symbol':
|
|
124
|
+
return 'symbol';
|
|
125
|
+
default:
|
|
126
|
+
}
|
|
127
|
+
if (is.observable(value)) {
|
|
128
|
+
return 'Observable';
|
|
129
|
+
}
|
|
130
|
+
if (is.array(value)) {
|
|
131
|
+
return 'Array';
|
|
132
|
+
}
|
|
133
|
+
if (is.buffer(value)) {
|
|
134
|
+
return 'Buffer';
|
|
135
|
+
}
|
|
136
|
+
const tagType = getObjectType(value);
|
|
137
|
+
if (tagType) {
|
|
138
|
+
return tagType;
|
|
139
|
+
}
|
|
140
|
+
if (value instanceof String || value instanceof Boolean || value instanceof Number) {
|
|
141
|
+
throw new TypeError('Please don\'t use object wrappers for primitive types');
|
|
142
|
+
}
|
|
143
|
+
return 'Object';
|
|
144
|
+
}
|
|
145
|
+
is.undefined = isOfType('undefined');
|
|
146
|
+
is.string = isOfType('string');
|
|
147
|
+
const isNumberType = isOfType('number');
|
|
148
|
+
is.number = (value) => isNumberType(value) && !is.nan(value);
|
|
149
|
+
is.bigint = isOfType('bigint');
|
|
150
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
151
|
+
is.function_ = isOfType('function');
|
|
152
|
+
is.null_ = (value) => value === null;
|
|
153
|
+
is.class_ = (value) => is.function_(value) && value.toString().startsWith('class ');
|
|
154
|
+
is.boolean = (value) => value === true || value === false;
|
|
155
|
+
is.symbol = isOfType('symbol');
|
|
156
|
+
is.numericString = (value) => is.string(value) && !is.emptyStringOrWhitespace(value) && !Number.isNaN(Number(value));
|
|
157
|
+
is.array = (value, assertion) => {
|
|
158
|
+
if (!Array.isArray(value)) {
|
|
159
|
+
return false;
|
|
160
|
+
}
|
|
161
|
+
if (!is.function_(assertion)) {
|
|
162
|
+
return true;
|
|
163
|
+
}
|
|
164
|
+
return value.every(assertion);
|
|
165
|
+
};
|
|
166
|
+
is.buffer = (value) => { var _a, _b, _c, _d; return (_d = (_c = (_b = (_a = value) === null || _a === void 0 ? void 0 : _a.constructor) === null || _b === void 0 ? void 0 : _b.isBuffer) === null || _c === void 0 ? void 0 : _c.call(_b, value)) !== null && _d !== void 0 ? _d : false; };
|
|
167
|
+
is.blob = (value) => isObjectOfType('Blob')(value);
|
|
168
|
+
is.nullOrUndefined = (value) => is.null_(value) || is.undefined(value);
|
|
169
|
+
is.object = (value) => !is.null_(value) && (typeof value === 'object' || is.function_(value));
|
|
170
|
+
is.iterable = (value) => { var _a; return is.function_((_a = value) === null || _a === void 0 ? void 0 : _a[Symbol.iterator]); };
|
|
171
|
+
is.asyncIterable = (value) => { var _a; return is.function_((_a = value) === null || _a === void 0 ? void 0 : _a[Symbol.asyncIterator]); };
|
|
172
|
+
is.generator = (value) => { var _a, _b; return is.iterable(value) && is.function_((_a = value) === null || _a === void 0 ? void 0 : _a.next) && is.function_((_b = value) === null || _b === void 0 ? void 0 : _b.throw); };
|
|
173
|
+
is.asyncGenerator = (value) => is.asyncIterable(value) && is.function_(value.next) && is.function_(value.throw);
|
|
174
|
+
is.nativePromise = (value) => isObjectOfType('Promise')(value);
|
|
175
|
+
const hasPromiseAPI = (value) => {
|
|
176
|
+
var _a, _b;
|
|
177
|
+
return is.function_((_a = value) === null || _a === void 0 ? void 0 : _a.then) &&
|
|
178
|
+
is.function_((_b = value) === null || _b === void 0 ? void 0 : _b.catch);
|
|
179
|
+
};
|
|
180
|
+
is.promise = (value) => is.nativePromise(value) || hasPromiseAPI(value);
|
|
181
|
+
is.generatorFunction = isObjectOfType('GeneratorFunction');
|
|
182
|
+
is.asyncGeneratorFunction = (value) => getObjectType(value) === 'AsyncGeneratorFunction';
|
|
183
|
+
is.asyncFunction = (value) => getObjectType(value) === 'AsyncFunction';
|
|
184
|
+
// eslint-disable-next-line no-prototype-builtins, @typescript-eslint/ban-types
|
|
185
|
+
is.boundFunction = (value) => is.function_(value) && !value.hasOwnProperty('prototype');
|
|
186
|
+
is.regExp = isObjectOfType('RegExp');
|
|
187
|
+
is.date = isObjectOfType('Date');
|
|
188
|
+
is.error = isObjectOfType('Error');
|
|
189
|
+
is.map = (value) => isObjectOfType('Map')(value);
|
|
190
|
+
is.set = (value) => isObjectOfType('Set')(value);
|
|
191
|
+
is.weakMap = (value) => isObjectOfType('WeakMap')(value);
|
|
192
|
+
is.weakSet = (value) => isObjectOfType('WeakSet')(value);
|
|
193
|
+
is.int8Array = isObjectOfType('Int8Array');
|
|
194
|
+
is.uint8Array = isObjectOfType('Uint8Array');
|
|
195
|
+
is.uint8ClampedArray = isObjectOfType('Uint8ClampedArray');
|
|
196
|
+
is.int16Array = isObjectOfType('Int16Array');
|
|
197
|
+
is.uint16Array = isObjectOfType('Uint16Array');
|
|
198
|
+
is.int32Array = isObjectOfType('Int32Array');
|
|
199
|
+
is.uint32Array = isObjectOfType('Uint32Array');
|
|
200
|
+
is.float32Array = isObjectOfType('Float32Array');
|
|
201
|
+
is.float64Array = isObjectOfType('Float64Array');
|
|
202
|
+
is.bigInt64Array = isObjectOfType('BigInt64Array');
|
|
203
|
+
is.bigUint64Array = isObjectOfType('BigUint64Array');
|
|
204
|
+
is.arrayBuffer = isObjectOfType('ArrayBuffer');
|
|
205
|
+
is.sharedArrayBuffer = isObjectOfType('SharedArrayBuffer');
|
|
206
|
+
is.dataView = isObjectOfType('DataView');
|
|
207
|
+
is.enumCase = (value, targetEnum) => Object.values(targetEnum).includes(value);
|
|
208
|
+
is.directInstanceOf = (instance, class_) => Object.getPrototypeOf(instance) === class_.prototype;
|
|
209
|
+
is.urlInstance = (value) => isObjectOfType('URL')(value);
|
|
210
|
+
is.urlString = (value) => {
|
|
211
|
+
if (!is.string(value)) {
|
|
212
|
+
return false;
|
|
213
|
+
}
|
|
214
|
+
try {
|
|
215
|
+
new URL(value); // eslint-disable-line no-new
|
|
216
|
+
return true;
|
|
217
|
+
}
|
|
218
|
+
catch (_a) {
|
|
219
|
+
return false;
|
|
220
|
+
}
|
|
221
|
+
};
|
|
222
|
+
// Example: `is.truthy = (value: unknown): value is (not false | not 0 | not '' | not undefined | not null) => Boolean(value);`
|
|
223
|
+
is.truthy = (value) => Boolean(value);
|
|
224
|
+
// Example: `is.falsy = (value: unknown): value is (not true | 0 | '' | undefined | null) => Boolean(value);`
|
|
225
|
+
is.falsy = (value) => !value;
|
|
226
|
+
is.nan = (value) => Number.isNaN(value);
|
|
227
|
+
is.primitive = (value) => is.null_(value) || isPrimitiveTypeName(typeof value);
|
|
228
|
+
is.integer = (value) => Number.isInteger(value);
|
|
229
|
+
is.safeInteger = (value) => Number.isSafeInteger(value);
|
|
230
|
+
is.plainObject = (value) => {
|
|
231
|
+
// From: https://github.com/sindresorhus/is-plain-obj/blob/main/index.js
|
|
232
|
+
if (toString.call(value) !== '[object Object]') {
|
|
233
|
+
return false;
|
|
234
|
+
}
|
|
235
|
+
const prototype = Object.getPrototypeOf(value);
|
|
236
|
+
return prototype === null || prototype === Object.getPrototypeOf({});
|
|
237
|
+
};
|
|
238
|
+
is.typedArray = (value) => isTypedArrayName(getObjectType(value));
|
|
239
|
+
const isValidLength = (value) => is.safeInteger(value) && value >= 0;
|
|
240
|
+
is.arrayLike = (value) => !is.nullOrUndefined(value) && !is.function_(value) && isValidLength(value.length);
|
|
241
|
+
is.inRange = (value, range) => {
|
|
242
|
+
if (is.number(range)) {
|
|
243
|
+
return value >= Math.min(0, range) && value <= Math.max(range, 0);
|
|
244
|
+
}
|
|
245
|
+
if (is.array(range) && range.length === 2) {
|
|
246
|
+
return value >= Math.min(...range) && value <= Math.max(...range);
|
|
247
|
+
}
|
|
248
|
+
throw new TypeError(`Invalid range: ${JSON.stringify(range)}`);
|
|
249
|
+
};
|
|
250
|
+
const NODE_TYPE_ELEMENT = 1;
|
|
251
|
+
const DOM_PROPERTIES_TO_CHECK = [
|
|
252
|
+
'innerHTML',
|
|
253
|
+
'ownerDocument',
|
|
254
|
+
'style',
|
|
255
|
+
'attributes',
|
|
256
|
+
'nodeValue'
|
|
257
|
+
];
|
|
258
|
+
is.domElement = (value) => {
|
|
259
|
+
return is.object(value) &&
|
|
260
|
+
value.nodeType === NODE_TYPE_ELEMENT &&
|
|
261
|
+
is.string(value.nodeName) &&
|
|
262
|
+
!is.plainObject(value) &&
|
|
263
|
+
DOM_PROPERTIES_TO_CHECK.every(property => property in value);
|
|
264
|
+
};
|
|
265
|
+
is.observable = (value) => {
|
|
266
|
+
var _a, _b, _c, _d;
|
|
267
|
+
if (!value) {
|
|
268
|
+
return false;
|
|
269
|
+
}
|
|
270
|
+
// eslint-disable-next-line no-use-extend-native/no-use-extend-native
|
|
271
|
+
if (value === ((_b = (_a = value)[Symbol.observable]) === null || _b === void 0 ? void 0 : _b.call(_a))) {
|
|
272
|
+
return true;
|
|
273
|
+
}
|
|
274
|
+
if (value === ((_d = (_c = value)['@@observable']) === null || _d === void 0 ? void 0 : _d.call(_c))) {
|
|
275
|
+
return true;
|
|
276
|
+
}
|
|
277
|
+
return false;
|
|
278
|
+
};
|
|
279
|
+
is.nodeStream = (value) => is.object(value) && is.function_(value.pipe) && !is.observable(value);
|
|
280
|
+
is.infinite = (value) => value === Infinity || value === -Infinity;
|
|
281
|
+
const isAbsoluteMod2 = (remainder) => (value) => is.integer(value) && Math.abs(value % 2) === remainder;
|
|
282
|
+
is.evenInteger = isAbsoluteMod2(0);
|
|
283
|
+
is.oddInteger = isAbsoluteMod2(1);
|
|
284
|
+
is.emptyArray = (value) => is.array(value) && value.length === 0;
|
|
285
|
+
is.nonEmptyArray = (value) => is.array(value) && value.length > 0;
|
|
286
|
+
is.emptyString = (value) => is.string(value) && value.length === 0;
|
|
287
|
+
const isWhiteSpaceString = (value) => is.string(value) && !/\S/.test(value);
|
|
288
|
+
is.emptyStringOrWhitespace = (value) => is.emptyString(value) || isWhiteSpaceString(value);
|
|
289
|
+
// TODO: Use `not ''` when the `not` operator is available.
|
|
290
|
+
is.nonEmptyString = (value) => is.string(value) && value.length > 0;
|
|
291
|
+
// TODO: Use `not ''` when the `not` operator is available.
|
|
292
|
+
is.nonEmptyStringAndNotWhitespace = (value) => is.string(value) && !is.emptyStringOrWhitespace(value);
|
|
293
|
+
is.emptyObject = (value) => is.object(value) && !is.map(value) && !is.set(value) && Object.keys(value).length === 0;
|
|
294
|
+
// TODO: Use `not` operator here to remove `Map` and `Set` from type guard:
|
|
295
|
+
// - https://github.com/Microsoft/TypeScript/pull/29317
|
|
296
|
+
is.nonEmptyObject = (value) => is.object(value) && !is.map(value) && !is.set(value) && Object.keys(value).length > 0;
|
|
297
|
+
is.emptySet = (value) => is.set(value) && value.size === 0;
|
|
298
|
+
is.nonEmptySet = (value) => is.set(value) && value.size > 0;
|
|
299
|
+
is.emptyMap = (value) => is.map(value) && value.size === 0;
|
|
300
|
+
is.nonEmptyMap = (value) => is.map(value) && value.size > 0;
|
|
301
|
+
// `PropertyKey` is any value that can be used as an object key (string, number, or symbol)
|
|
302
|
+
is.propertyKey = (value) => is.any([is.string, is.number, is.symbol], value);
|
|
303
|
+
is.formData = (value) => isObjectOfType('FormData')(value);
|
|
304
|
+
is.urlSearchParams = (value) => isObjectOfType('URLSearchParams')(value);
|
|
305
|
+
const predicateOnArray = (method, predicate, values) => {
|
|
306
|
+
if (!is.function_(predicate)) {
|
|
307
|
+
throw new TypeError(`Invalid predicate: ${JSON.stringify(predicate)}`);
|
|
308
|
+
}
|
|
309
|
+
if (values.length === 0) {
|
|
310
|
+
throw new TypeError('Invalid number of values');
|
|
311
|
+
}
|
|
312
|
+
return method.call(values, predicate);
|
|
313
|
+
};
|
|
314
|
+
is.any = (predicate, ...values) => {
|
|
315
|
+
const predicates = is.array(predicate) ? predicate : [predicate];
|
|
316
|
+
return predicates.some(singlePredicate => predicateOnArray(Array.prototype.some, singlePredicate, values));
|
|
317
|
+
};
|
|
318
|
+
is.all = (predicate, ...values) => predicateOnArray(Array.prototype.every, predicate, values);
|
|
319
|
+
const assertType = (condition, description, value, options = {}) => {
|
|
320
|
+
if (!condition) {
|
|
321
|
+
const { multipleValues } = options;
|
|
322
|
+
const valuesMessage = multipleValues ?
|
|
323
|
+
`received values of types ${[
|
|
324
|
+
...new Set(value.map(singleValue => `\`${is(singleValue)}\``))
|
|
325
|
+
].join(', ')}` :
|
|
326
|
+
`received value of type \`${is(value)}\``;
|
|
327
|
+
throw new TypeError(`Expected value which is \`${description}\`, ${valuesMessage}.`);
|
|
328
|
+
}
|
|
329
|
+
};
|
|
330
|
+
exports.assert = {
|
|
331
|
+
// Unknowns.
|
|
332
|
+
undefined: (value) => assertType(is.undefined(value), 'undefined', value),
|
|
333
|
+
string: (value) => assertType(is.string(value), 'string', value),
|
|
334
|
+
number: (value) => assertType(is.number(value), 'number', value),
|
|
335
|
+
bigint: (value) => assertType(is.bigint(value), 'bigint', value),
|
|
336
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
337
|
+
function_: (value) => assertType(is.function_(value), 'Function', value),
|
|
338
|
+
null_: (value) => assertType(is.null_(value), 'null', value),
|
|
339
|
+
class_: (value) => assertType(is.class_(value), "Class" /* class_ */, value),
|
|
340
|
+
boolean: (value) => assertType(is.boolean(value), 'boolean', value),
|
|
341
|
+
symbol: (value) => assertType(is.symbol(value), 'symbol', value),
|
|
342
|
+
numericString: (value) => assertType(is.numericString(value), "string with a number" /* numericString */, value),
|
|
343
|
+
array: (value, assertion) => {
|
|
344
|
+
const assert = assertType;
|
|
345
|
+
assert(is.array(value), 'Array', value);
|
|
346
|
+
if (assertion) {
|
|
347
|
+
value.forEach(assertion);
|
|
348
|
+
}
|
|
349
|
+
},
|
|
350
|
+
buffer: (value) => assertType(is.buffer(value), 'Buffer', value),
|
|
351
|
+
blob: (value) => assertType(is.blob(value), 'Blob', value),
|
|
352
|
+
nullOrUndefined: (value) => assertType(is.nullOrUndefined(value), "null or undefined" /* nullOrUndefined */, value),
|
|
353
|
+
object: (value) => assertType(is.object(value), 'Object', value),
|
|
354
|
+
iterable: (value) => assertType(is.iterable(value), "Iterable" /* iterable */, value),
|
|
355
|
+
asyncIterable: (value) => assertType(is.asyncIterable(value), "AsyncIterable" /* asyncIterable */, value),
|
|
356
|
+
generator: (value) => assertType(is.generator(value), 'Generator', value),
|
|
357
|
+
asyncGenerator: (value) => assertType(is.asyncGenerator(value), 'AsyncGenerator', value),
|
|
358
|
+
nativePromise: (value) => assertType(is.nativePromise(value), "native Promise" /* nativePromise */, value),
|
|
359
|
+
promise: (value) => assertType(is.promise(value), 'Promise', value),
|
|
360
|
+
generatorFunction: (value) => assertType(is.generatorFunction(value), 'GeneratorFunction', value),
|
|
361
|
+
asyncGeneratorFunction: (value) => assertType(is.asyncGeneratorFunction(value), 'AsyncGeneratorFunction', value),
|
|
362
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
363
|
+
asyncFunction: (value) => assertType(is.asyncFunction(value), 'AsyncFunction', value),
|
|
364
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
365
|
+
boundFunction: (value) => assertType(is.boundFunction(value), 'Function', value),
|
|
366
|
+
regExp: (value) => assertType(is.regExp(value), 'RegExp', value),
|
|
367
|
+
date: (value) => assertType(is.date(value), 'Date', value),
|
|
368
|
+
error: (value) => assertType(is.error(value), 'Error', value),
|
|
369
|
+
map: (value) => assertType(is.map(value), 'Map', value),
|
|
370
|
+
set: (value) => assertType(is.set(value), 'Set', value),
|
|
371
|
+
weakMap: (value) => assertType(is.weakMap(value), 'WeakMap', value),
|
|
372
|
+
weakSet: (value) => assertType(is.weakSet(value), 'WeakSet', value),
|
|
373
|
+
int8Array: (value) => assertType(is.int8Array(value), 'Int8Array', value),
|
|
374
|
+
uint8Array: (value) => assertType(is.uint8Array(value), 'Uint8Array', value),
|
|
375
|
+
uint8ClampedArray: (value) => assertType(is.uint8ClampedArray(value), 'Uint8ClampedArray', value),
|
|
376
|
+
int16Array: (value) => assertType(is.int16Array(value), 'Int16Array', value),
|
|
377
|
+
uint16Array: (value) => assertType(is.uint16Array(value), 'Uint16Array', value),
|
|
378
|
+
int32Array: (value) => assertType(is.int32Array(value), 'Int32Array', value),
|
|
379
|
+
uint32Array: (value) => assertType(is.uint32Array(value), 'Uint32Array', value),
|
|
380
|
+
float32Array: (value) => assertType(is.float32Array(value), 'Float32Array', value),
|
|
381
|
+
float64Array: (value) => assertType(is.float64Array(value), 'Float64Array', value),
|
|
382
|
+
bigInt64Array: (value) => assertType(is.bigInt64Array(value), 'BigInt64Array', value),
|
|
383
|
+
bigUint64Array: (value) => assertType(is.bigUint64Array(value), 'BigUint64Array', value),
|
|
384
|
+
arrayBuffer: (value) => assertType(is.arrayBuffer(value), 'ArrayBuffer', value),
|
|
385
|
+
sharedArrayBuffer: (value) => assertType(is.sharedArrayBuffer(value), 'SharedArrayBuffer', value),
|
|
386
|
+
dataView: (value) => assertType(is.dataView(value), 'DataView', value),
|
|
387
|
+
enumCase: (value, targetEnum) => assertType(is.enumCase(value, targetEnum), 'EnumCase', value),
|
|
388
|
+
urlInstance: (value) => assertType(is.urlInstance(value), 'URL', value),
|
|
389
|
+
urlString: (value) => assertType(is.urlString(value), "string with a URL" /* urlString */, value),
|
|
390
|
+
truthy: (value) => assertType(is.truthy(value), "truthy" /* truthy */, value),
|
|
391
|
+
falsy: (value) => assertType(is.falsy(value), "falsy" /* falsy */, value),
|
|
392
|
+
nan: (value) => assertType(is.nan(value), "NaN" /* nan */, value),
|
|
393
|
+
primitive: (value) => assertType(is.primitive(value), "primitive" /* primitive */, value),
|
|
394
|
+
integer: (value) => assertType(is.integer(value), "integer" /* integer */, value),
|
|
395
|
+
safeInteger: (value) => assertType(is.safeInteger(value), "integer" /* safeInteger */, value),
|
|
396
|
+
plainObject: (value) => assertType(is.plainObject(value), "plain object" /* plainObject */, value),
|
|
397
|
+
typedArray: (value) => assertType(is.typedArray(value), "TypedArray" /* typedArray */, value),
|
|
398
|
+
arrayLike: (value) => assertType(is.arrayLike(value), "array-like" /* arrayLike */, value),
|
|
399
|
+
domElement: (value) => assertType(is.domElement(value), "HTMLElement" /* domElement */, value),
|
|
400
|
+
observable: (value) => assertType(is.observable(value), 'Observable', value),
|
|
401
|
+
nodeStream: (value) => assertType(is.nodeStream(value), "Node.js Stream" /* nodeStream */, value),
|
|
402
|
+
infinite: (value) => assertType(is.infinite(value), "infinite number" /* infinite */, value),
|
|
403
|
+
emptyArray: (value) => assertType(is.emptyArray(value), "empty array" /* emptyArray */, value),
|
|
404
|
+
nonEmptyArray: (value) => assertType(is.nonEmptyArray(value), "non-empty array" /* nonEmptyArray */, value),
|
|
405
|
+
emptyString: (value) => assertType(is.emptyString(value), "empty string" /* emptyString */, value),
|
|
406
|
+
emptyStringOrWhitespace: (value) => assertType(is.emptyStringOrWhitespace(value), "empty string or whitespace" /* emptyStringOrWhitespace */, value),
|
|
407
|
+
nonEmptyString: (value) => assertType(is.nonEmptyString(value), "non-empty string" /* nonEmptyString */, value),
|
|
408
|
+
nonEmptyStringAndNotWhitespace: (value) => assertType(is.nonEmptyStringAndNotWhitespace(value), "non-empty string and not whitespace" /* nonEmptyStringAndNotWhitespace */, value),
|
|
409
|
+
emptyObject: (value) => assertType(is.emptyObject(value), "empty object" /* emptyObject */, value),
|
|
410
|
+
nonEmptyObject: (value) => assertType(is.nonEmptyObject(value), "non-empty object" /* nonEmptyObject */, value),
|
|
411
|
+
emptySet: (value) => assertType(is.emptySet(value), "empty set" /* emptySet */, value),
|
|
412
|
+
nonEmptySet: (value) => assertType(is.nonEmptySet(value), "non-empty set" /* nonEmptySet */, value),
|
|
413
|
+
emptyMap: (value) => assertType(is.emptyMap(value), "empty map" /* emptyMap */, value),
|
|
414
|
+
nonEmptyMap: (value) => assertType(is.nonEmptyMap(value), "non-empty map" /* nonEmptyMap */, value),
|
|
415
|
+
propertyKey: (value) => assertType(is.propertyKey(value), 'PropertyKey', value),
|
|
416
|
+
formData: (value) => assertType(is.formData(value), 'FormData', value),
|
|
417
|
+
urlSearchParams: (value) => assertType(is.urlSearchParams(value), 'URLSearchParams', value),
|
|
418
|
+
// Numbers.
|
|
419
|
+
evenInteger: (value) => assertType(is.evenInteger(value), "even integer" /* evenInteger */, value),
|
|
420
|
+
oddInteger: (value) => assertType(is.oddInteger(value), "odd integer" /* oddInteger */, value),
|
|
421
|
+
// Two arguments.
|
|
422
|
+
directInstanceOf: (instance, class_) => assertType(is.directInstanceOf(instance, class_), "T" /* directInstanceOf */, instance),
|
|
423
|
+
inRange: (value, range) => assertType(is.inRange(value, range), "in range" /* inRange */, value),
|
|
424
|
+
// Variadic functions.
|
|
425
|
+
any: (predicate, ...values) => {
|
|
426
|
+
return assertType(is.any(predicate, ...values), "predicate returns truthy for any value" /* any */, values, { multipleValues: true });
|
|
427
|
+
},
|
|
428
|
+
all: (predicate, ...values) => assertType(is.all(predicate, ...values), "predicate returns truthy for all values" /* all */, values, { multipleValues: true })
|
|
429
|
+
};
|
|
430
|
+
// Some few keywords are reserved, but we'll populate them for Node.js users
|
|
431
|
+
// See https://github.com/Microsoft/TypeScript/issues/2536
|
|
432
|
+
Object.defineProperties(is, {
|
|
433
|
+
class: {
|
|
434
|
+
value: is.class_
|
|
435
|
+
},
|
|
436
|
+
function: {
|
|
437
|
+
value: is.function_
|
|
438
|
+
},
|
|
439
|
+
null: {
|
|
440
|
+
value: is.null_
|
|
441
|
+
}
|
|
442
|
+
});
|
|
443
|
+
Object.defineProperties(exports.assert, {
|
|
444
|
+
class: {
|
|
445
|
+
value: exports.assert.class_
|
|
446
|
+
},
|
|
447
|
+
function: {
|
|
448
|
+
value: exports.assert.function_
|
|
449
|
+
},
|
|
450
|
+
null: {
|
|
451
|
+
value: exports.assert.null_
|
|
452
|
+
}
|
|
453
|
+
});
|
|
454
|
+
exports["default"] = is;
|
|
455
|
+
// For CommonJS default export support
|
|
456
|
+
module.exports = is;
|
|
457
|
+
module.exports["default"] = is;
|
|
458
|
+
module.exports.assert = exports.assert;
|
|
459
|
+
|
|
460
|
+
|
|
461
|
+
},
|
|
23
462
|
313(module, __unused_rspack_exports, __webpack_require__) {
|
|
24
463
|
"use strict";
|
|
25
464
|
/* provided dependency */ var process = __webpack_require__(5606);
|
|
@@ -6215,7 +6654,7 @@ exports.MapPredicate = MapPredicate;
|
|
|
6215
6654
|
|
|
6216
6655
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
6217
6656
|
exports.NumberPredicate = void 0;
|
|
6218
|
-
const is_1 = __webpack_require__(
|
|
6657
|
+
const is_1 = __webpack_require__(8890);
|
|
6219
6658
|
const predicate_1 = __webpack_require__(1830);
|
|
6220
6659
|
class NumberPredicate extends predicate_1.Predicate {
|
|
6221
6660
|
/**
|
|
@@ -6409,7 +6848,7 @@ exports.NumberPredicate = NumberPredicate;
|
|
|
6409
6848
|
|
|
6410
6849
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
6411
6850
|
exports.ObjectPredicate = void 0;
|
|
6412
|
-
const is_1 = __webpack_require__(
|
|
6851
|
+
const is_1 = __webpack_require__(8890);
|
|
6413
6852
|
const dotProp = __webpack_require__(8486);
|
|
6414
6853
|
const isEqual = __webpack_require__(8142);
|
|
6415
6854
|
const has_items_1 = __webpack_require__(3779);
|
|
@@ -6588,7 +7027,7 @@ exports.ObjectPredicate = ObjectPredicate;
|
|
|
6588
7027
|
|
|
6589
7028
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
6590
7029
|
exports.Predicate = exports.validatorSymbol = void 0;
|
|
6591
|
-
const is_1 = __webpack_require__(
|
|
7030
|
+
const is_1 = __webpack_require__(8890);
|
|
6592
7031
|
const argument_error_1 = __webpack_require__(2202);
|
|
6593
7032
|
const not_1 = __webpack_require__(6931);
|
|
6594
7033
|
const base_predicate_1 = __webpack_require__(7006);
|
|
@@ -6893,7 +7332,7 @@ exports.SetPredicate = SetPredicate;
|
|
|
6893
7332
|
|
|
6894
7333
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
6895
7334
|
exports.StringPredicate = void 0;
|
|
6896
|
-
const is_1 = __webpack_require__(
|
|
7335
|
+
const is_1 = __webpack_require__(8890);
|
|
6897
7336
|
const valiDate = __webpack_require__(302);
|
|
6898
7337
|
const predicate_1 = __webpack_require__(1830);
|
|
6899
7338
|
class StringPredicate extends predicate_1.Predicate {
|
|
@@ -7234,740 +7673,301 @@ class WeakSetPredicate extends predicate_1.Predicate {
|
|
|
7234
7673
|
constructor(options) {
|
|
7235
7674
|
super('WeakSet', options);
|
|
7236
7675
|
}
|
|
7237
|
-
/**
|
|
7238
|
-
Test a WeakSet to include all the provided items. The items are tested by identity, not structure.
|
|
7239
|
-
|
|
7240
|
-
@param items - The items that should be a item in the WeakSet.
|
|
7241
|
-
*/
|
|
7242
|
-
has(...items) {
|
|
7243
|
-
return this.addValidator({
|
|
7244
|
-
message: (_, label, missingItems) => `Expected ${label} to have items \`${JSON.stringify(missingItems)}\``,
|
|
7245
|
-
validator: set => (0, has_items_1.default)(set, items)
|
|
7246
|
-
});
|
|
7247
|
-
}
|
|
7248
|
-
/**
|
|
7249
|
-
Test a WeakSet to include any of the provided items. The items are tested by identity, not structure.
|
|
7250
|
-
|
|
7251
|
-
@param items - The items that could be a item in the WeakSet.
|
|
7252
|
-
*/
|
|
7253
|
-
hasAny(...items) {
|
|
7254
|
-
return this.addValidator({
|
|
7255
|
-
message: (_, label) => `Expected ${label} to have any item of \`${JSON.stringify(items)}\``,
|
|
7256
|
-
validator: set => items.some(item => set.has(item))
|
|
7257
|
-
});
|
|
7258
|
-
}
|
|
7259
|
-
}
|
|
7260
|
-
exports.WeakSetPredicate = WeakSetPredicate;
|
|
7261
|
-
|
|
7262
|
-
|
|
7263
|
-
},
|
|
7264
|
-
9514(__unused_rspack_module, exports, __webpack_require__) {
|
|
7265
|
-
"use strict";
|
|
7266
|
-
|
|
7267
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
7268
|
-
const base_predicate_1 = __webpack_require__(7006);
|
|
7269
|
-
/**
|
|
7270
|
-
Validate the value against the provided predicate.
|
|
7271
|
-
|
|
7272
|
-
@hidden
|
|
7273
|
-
|
|
7274
|
-
@param value - Value to test.
|
|
7275
|
-
@param label - Label which should be used in error messages.
|
|
7276
|
-
@param predicate - Predicate to test to value against.
|
|
7277
|
-
@param idLabel - If true, the label is a variable or type. Default: true.
|
|
7278
|
-
*/
|
|
7279
|
-
function test(value, label, predicate, idLabel = true) {
|
|
7280
|
-
predicate[base_predicate_1.testSymbol](value, test, label, idLabel);
|
|
7281
|
-
}
|
|
7282
|
-
exports["default"] = test;
|
|
7283
|
-
|
|
7284
|
-
|
|
7285
|
-
},
|
|
7286
|
-
5810(__unused_rspack_module, exports) {
|
|
7287
|
-
"use strict";
|
|
7288
|
-
|
|
7289
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
7290
|
-
exports.generateArgumentErrorMessage = void 0;
|
|
7291
|
-
/**
|
|
7292
|
-
Generates a complete message from all errors generated by predicates.
|
|
7293
|
-
|
|
7294
|
-
@param errors - The errors generated by the predicates.
|
|
7295
|
-
@param isAny - If this function is called from the any argument.
|
|
7296
|
-
@hidden
|
|
7297
|
-
*/
|
|
7298
|
-
const generateArgumentErrorMessage = (errors, isAny = false) => {
|
|
7299
|
-
const message = [];
|
|
7300
|
-
const errorArray = [...errors.entries()];
|
|
7301
|
-
const anyErrorWithoutOneItemOnly = errorArray.some(([, array]) => array.size !== 1);
|
|
7302
|
-
// If only one error "key" is present, enumerate all of those errors only.
|
|
7303
|
-
if (errorArray.length === 1) {
|
|
7304
|
-
const [, returnedErrors] = errorArray[0];
|
|
7305
|
-
if (!isAny && returnedErrors.size === 1) {
|
|
7306
|
-
const [errorMessage] = returnedErrors;
|
|
7307
|
-
return errorMessage;
|
|
7308
|
-
}
|
|
7309
|
-
for (const entry of returnedErrors) {
|
|
7310
|
-
message.push(`${isAny ? ' - ' : ''}${entry}`);
|
|
7311
|
-
}
|
|
7312
|
-
return message.join('\n');
|
|
7313
|
-
}
|
|
7314
|
-
// If every predicate returns just one error, enumerate them as is.
|
|
7315
|
-
if (!anyErrorWithoutOneItemOnly) {
|
|
7316
|
-
return errorArray.map(([, [item]]) => ` - ${item}`).join('\n');
|
|
7317
|
-
}
|
|
7318
|
-
// Else, iterate through all the errors and enumerate them.
|
|
7319
|
-
for (const [key, value] of errorArray) {
|
|
7320
|
-
message.push(`Errors from the "${key}" predicate:`);
|
|
7321
|
-
for (const entry of value) {
|
|
7322
|
-
message.push(` - ${entry}`);
|
|
7323
|
-
}
|
|
7324
|
-
}
|
|
7325
|
-
return message.join('\n');
|
|
7326
|
-
};
|
|
7327
|
-
exports.generateArgumentErrorMessage = generateArgumentErrorMessage;
|
|
7328
|
-
|
|
7329
|
-
|
|
7330
|
-
},
|
|
7331
|
-
5450(__unused_rspack_module, exports) {
|
|
7332
|
-
"use strict";
|
|
7333
|
-
|
|
7334
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
7335
|
-
exports.generateStackTrace = void 0;
|
|
7336
|
-
/**
|
|
7337
|
-
Generates a useful stacktrace that points to the user's code where the error happened on platforms without the `Error.captureStackTrace()` method.
|
|
7338
|
-
|
|
7339
|
-
@hidden
|
|
7340
|
-
*/
|
|
7341
|
-
const generateStackTrace = () => {
|
|
7342
|
-
const stack = new RangeError('INTERNAL_OW_ERROR').stack;
|
|
7343
|
-
return stack;
|
|
7344
|
-
};
|
|
7345
|
-
exports.generateStackTrace = generateStackTrace;
|
|
7346
|
-
|
|
7347
|
-
|
|
7348
|
-
},
|
|
7349
|
-
3779(__unused_rspack_module, exports) {
|
|
7350
|
-
"use strict";
|
|
7351
|
-
|
|
7352
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
7353
|
-
/**
|
|
7354
|
-
Retrieve the missing values in a collection based on an array of items.
|
|
7355
|
-
|
|
7356
|
-
@hidden
|
|
7357
|
-
|
|
7358
|
-
@param source - Source collection to search through.
|
|
7359
|
-
@param items - Items to search for.
|
|
7360
|
-
@param maxValues - Maximum number of values after the search process is stopped. Default: 5.
|
|
7361
|
-
*/
|
|
7362
|
-
exports["default"] = (source, items, maxValues = 5) => {
|
|
7363
|
-
const missingValues = [];
|
|
7364
|
-
for (const value of items) {
|
|
7365
|
-
if (source.has(value)) {
|
|
7366
|
-
continue;
|
|
7367
|
-
}
|
|
7368
|
-
missingValues.push(value);
|
|
7369
|
-
if (missingValues.length === maxValues) {
|
|
7370
|
-
return missingValues;
|
|
7371
|
-
}
|
|
7372
|
-
}
|
|
7373
|
-
return missingValues.length === 0 ? true : missingValues;
|
|
7374
|
-
};
|
|
7375
|
-
|
|
7376
|
-
|
|
7377
|
-
},
|
|
7378
|
-
9843(__unused_rspack_module, exports) {
|
|
7379
|
-
"use strict";
|
|
7380
|
-
|
|
7381
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
7382
|
-
exports.inferLabel = void 0;
|
|
7383
|
-
const inferLabel = () => { };
|
|
7384
|
-
exports.inferLabel = inferLabel;
|
|
7385
|
-
|
|
7386
|
-
|
|
7387
|
-
},
|
|
7388
|
-
4863(__unused_rspack_module, exports, __webpack_require__) {
|
|
7389
|
-
"use strict";
|
|
7390
|
-
|
|
7391
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
7392
|
-
exports.exact = exports.partial = void 0;
|
|
7393
|
-
const is_1 = __webpack_require__(5864);
|
|
7394
|
-
const test_1 = __webpack_require__(9514);
|
|
7395
|
-
const base_predicate_1 = __webpack_require__(7006);
|
|
7396
|
-
/**
|
|
7397
|
-
Test if the `object` matches the `shape` partially.
|
|
7398
|
-
|
|
7399
|
-
@hidden
|
|
7400
|
-
|
|
7401
|
-
@param object - Object to test against the provided shape.
|
|
7402
|
-
@param shape - Shape to test the object against.
|
|
7403
|
-
@param parent - Name of the parent property.
|
|
7404
|
-
*/
|
|
7405
|
-
function partial(object, shape, parent) {
|
|
7406
|
-
try {
|
|
7407
|
-
for (const key of Object.keys(shape)) {
|
|
7408
|
-
const label = parent ? `${parent}.${key}` : key;
|
|
7409
|
-
if ((0, base_predicate_1.isPredicate)(shape[key])) {
|
|
7410
|
-
(0, test_1.default)(object[key], label, shape[key]);
|
|
7411
|
-
}
|
|
7412
|
-
else if (is_1.default.plainObject(shape[key])) {
|
|
7413
|
-
const result = partial(object[key], shape[key], label);
|
|
7414
|
-
if (result !== true) {
|
|
7415
|
-
return result;
|
|
7416
|
-
}
|
|
7417
|
-
}
|
|
7418
|
-
}
|
|
7419
|
-
return true;
|
|
7420
|
-
}
|
|
7421
|
-
catch (error) {
|
|
7422
|
-
return error.message;
|
|
7423
|
-
}
|
|
7424
|
-
}
|
|
7425
|
-
exports.partial = partial;
|
|
7426
|
-
/**
|
|
7427
|
-
Test if the `object` matches the `shape` exactly.
|
|
7428
|
-
|
|
7429
|
-
@hidden
|
|
7430
|
-
|
|
7431
|
-
@param object - Object to test against the provided shape.
|
|
7432
|
-
@param shape - Shape to test the object against.
|
|
7433
|
-
@param parent - Name of the parent property.
|
|
7434
|
-
*/
|
|
7435
|
-
function exact(object, shape, parent, isArray) {
|
|
7436
|
-
try {
|
|
7437
|
-
const objectKeys = new Set(Object.keys(object));
|
|
7438
|
-
for (const key of Object.keys(shape)) {
|
|
7439
|
-
objectKeys.delete(key);
|
|
7440
|
-
const label = parent ? `${parent}.${key}` : key;
|
|
7441
|
-
if ((0, base_predicate_1.isPredicate)(shape[key])) {
|
|
7442
|
-
(0, test_1.default)(object[key], label, shape[key]);
|
|
7443
|
-
}
|
|
7444
|
-
else if (is_1.default.plainObject(shape[key])) {
|
|
7445
|
-
if (!Object.prototype.hasOwnProperty.call(object, key)) {
|
|
7446
|
-
return `Expected \`${label}\` to exist`;
|
|
7447
|
-
}
|
|
7448
|
-
const result = exact(object[key], shape[key], label);
|
|
7449
|
-
if (result !== true) {
|
|
7450
|
-
return result;
|
|
7451
|
-
}
|
|
7452
|
-
}
|
|
7453
|
-
}
|
|
7454
|
-
if (objectKeys.size > 0) {
|
|
7455
|
-
const firstKey = [...objectKeys.keys()][0];
|
|
7456
|
-
const label = parent ? `${parent}.${firstKey}` : firstKey;
|
|
7457
|
-
return `Did not expect ${isArray ? 'element' : 'property'} \`${label}\` to exist, got \`${object[firstKey]}\``;
|
|
7458
|
-
}
|
|
7459
|
-
return true;
|
|
7460
|
-
}
|
|
7461
|
-
catch (error) {
|
|
7462
|
-
return error.message;
|
|
7463
|
-
}
|
|
7464
|
-
}
|
|
7465
|
-
exports.exact = exact;
|
|
7466
|
-
|
|
7467
|
-
|
|
7468
|
-
},
|
|
7469
|
-
8921(__unused_rspack_module, exports, __webpack_require__) {
|
|
7470
|
-
"use strict";
|
|
7471
|
-
|
|
7472
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
7473
|
-
const is_1 = __webpack_require__(5864);
|
|
7474
|
-
const test_1 = __webpack_require__(9514);
|
|
7475
|
-
const ofTypeDeep = (object, predicate) => {
|
|
7476
|
-
if (!is_1.default.plainObject(object)) {
|
|
7477
|
-
(0, test_1.default)(object, 'deep values', predicate, false);
|
|
7478
|
-
return true;
|
|
7479
|
-
}
|
|
7480
|
-
return Object.values(object).every(value => ofTypeDeep(value, predicate));
|
|
7481
|
-
};
|
|
7482
|
-
/**
|
|
7483
|
-
Test all the values in the object against a provided predicate.
|
|
7484
|
-
|
|
7485
|
-
@hidden
|
|
7676
|
+
/**
|
|
7677
|
+
Test a WeakSet to include all the provided items. The items are tested by identity, not structure.
|
|
7486
7678
|
|
|
7487
|
-
@param
|
|
7488
|
-
*/
|
|
7489
|
-
|
|
7490
|
-
|
|
7491
|
-
|
|
7679
|
+
@param items - The items that should be a item in the WeakSet.
|
|
7680
|
+
*/
|
|
7681
|
+
has(...items) {
|
|
7682
|
+
return this.addValidator({
|
|
7683
|
+
message: (_, label, missingItems) => `Expected ${label} to have items \`${JSON.stringify(missingItems)}\``,
|
|
7684
|
+
validator: set => (0, has_items_1.default)(set, items)
|
|
7685
|
+
});
|
|
7492
7686
|
}
|
|
7493
|
-
|
|
7494
|
-
|
|
7687
|
+
/**
|
|
7688
|
+
Test a WeakSet to include any of the provided items. The items are tested by identity, not structure.
|
|
7689
|
+
|
|
7690
|
+
@param items - The items that could be a item in the WeakSet.
|
|
7691
|
+
*/
|
|
7692
|
+
hasAny(...items) {
|
|
7693
|
+
return this.addValidator({
|
|
7694
|
+
message: (_, label) => `Expected ${label} to have any item of \`${JSON.stringify(items)}\``,
|
|
7695
|
+
validator: set => items.some(item => set.has(item))
|
|
7696
|
+
});
|
|
7495
7697
|
}
|
|
7496
|
-
}
|
|
7698
|
+
}
|
|
7699
|
+
exports.WeakSetPredicate = WeakSetPredicate;
|
|
7497
7700
|
|
|
7498
7701
|
|
|
7499
7702
|
},
|
|
7500
|
-
|
|
7703
|
+
9514(__unused_rspack_module, exports, __webpack_require__) {
|
|
7501
7704
|
"use strict";
|
|
7502
7705
|
|
|
7503
7706
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
7504
|
-
const
|
|
7707
|
+
const base_predicate_1 = __webpack_require__(7006);
|
|
7505
7708
|
/**
|
|
7506
|
-
|
|
7709
|
+
Validate the value against the provided predicate.
|
|
7507
7710
|
|
|
7508
7711
|
@hidden
|
|
7509
|
-
@param source Source collection to test.
|
|
7510
|
-
@param name The name to call the collection of values, such as `values` or `keys`.
|
|
7511
|
-
@param predicate Predicate to test every item in the source collection against.
|
|
7512
|
-
*/
|
|
7513
|
-
exports["default"] = (source, name, predicate) => {
|
|
7514
|
-
try {
|
|
7515
|
-
for (const item of source) {
|
|
7516
|
-
(0, test_1.default)(item, name, predicate, false);
|
|
7517
|
-
}
|
|
7518
|
-
return true;
|
|
7519
|
-
}
|
|
7520
|
-
catch (error) {
|
|
7521
|
-
return error.message;
|
|
7522
|
-
}
|
|
7523
|
-
};
|
|
7524
|
-
|
|
7525
|
-
|
|
7526
|
-
},
|
|
7527
|
-
4693(__unused_rspack_module, exports) {
|
|
7528
|
-
"use strict";
|
|
7529
7712
|
|
|
7530
|
-
|
|
7531
|
-
|
|
7713
|
+
@param value - Value to test.
|
|
7714
|
+
@param label - Label which should be used in error messages.
|
|
7715
|
+
@param predicate - Predicate to test to value against.
|
|
7716
|
+
@param idLabel - If true, the label is a variable or type. Default: true.
|
|
7717
|
+
*/
|
|
7718
|
+
function test(value, label, predicate, idLabel = true) {
|
|
7719
|
+
predicate[base_predicate_1.testSymbol](value, test, label, idLabel);
|
|
7720
|
+
}
|
|
7721
|
+
exports["default"] = test;
|
|
7532
7722
|
|
|
7533
7723
|
|
|
7534
7724
|
},
|
|
7535
|
-
|
|
7536
|
-
"use strict";
|
|
7537
|
-
|
|
7538
|
-
|
|
7539
|
-
|
|
7540
|
-
|
|
7541
|
-
|
|
7542
|
-
|
|
7543
|
-
|
|
7544
|
-
|
|
7545
|
-
|
|
7546
|
-
|
|
7547
|
-
|
|
7548
|
-
|
|
7549
|
-
|
|
7550
|
-
|
|
7551
|
-
|
|
7552
|
-
|
|
7553
|
-
|
|
7554
|
-
|
|
7555
|
-
|
|
7556
|
-
|
|
7557
|
-
}
|
|
7558
|
-
const
|
|
7559
|
-
|
|
7560
|
-
|
|
7561
|
-
|
|
7562
|
-
'GeneratorFunction',
|
|
7563
|
-
'AsyncGeneratorFunction',
|
|
7564
|
-
'AsyncFunction',
|
|
7565
|
-
'Observable',
|
|
7566
|
-
'Array',
|
|
7567
|
-
'Buffer',
|
|
7568
|
-
'Blob',
|
|
7569
|
-
'Object',
|
|
7570
|
-
'RegExp',
|
|
7571
|
-
'Date',
|
|
7572
|
-
'Error',
|
|
7573
|
-
'Map',
|
|
7574
|
-
'Set',
|
|
7575
|
-
'WeakMap',
|
|
7576
|
-
'WeakSet',
|
|
7577
|
-
'ArrayBuffer',
|
|
7578
|
-
'SharedArrayBuffer',
|
|
7579
|
-
'DataView',
|
|
7580
|
-
'Promise',
|
|
7581
|
-
'URL',
|
|
7582
|
-
'FormData',
|
|
7583
|
-
'URLSearchParams',
|
|
7584
|
-
'HTMLElement',
|
|
7585
|
-
...typedArrayTypeNames
|
|
7586
|
-
];
|
|
7587
|
-
function isObjectTypeName(name) {
|
|
7588
|
-
return objectTypeNames.includes(name);
|
|
7589
|
-
}
|
|
7590
|
-
const primitiveTypeNames = [
|
|
7591
|
-
'null',
|
|
7592
|
-
'undefined',
|
|
7593
|
-
'string',
|
|
7594
|
-
'number',
|
|
7595
|
-
'bigint',
|
|
7596
|
-
'boolean',
|
|
7597
|
-
'symbol'
|
|
7598
|
-
];
|
|
7599
|
-
function isPrimitiveTypeName(name) {
|
|
7600
|
-
return primitiveTypeNames.includes(name);
|
|
7601
|
-
}
|
|
7602
|
-
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
7603
|
-
function isOfType(type) {
|
|
7604
|
-
return (value) => typeof value === type;
|
|
7605
|
-
}
|
|
7606
|
-
const { toString } = Object.prototype;
|
|
7607
|
-
const getObjectType = (value) => {
|
|
7608
|
-
const objectTypeName = toString.call(value).slice(8, -1);
|
|
7609
|
-
if (/HTML\w+Element/.test(objectTypeName) && is.domElement(value)) {
|
|
7610
|
-
return 'HTMLElement';
|
|
7611
|
-
}
|
|
7612
|
-
if (isObjectTypeName(objectTypeName)) {
|
|
7613
|
-
return objectTypeName;
|
|
7614
|
-
}
|
|
7615
|
-
return undefined;
|
|
7616
|
-
};
|
|
7617
|
-
const isObjectOfType = (type) => (value) => getObjectType(value) === type;
|
|
7618
|
-
function is(value) {
|
|
7619
|
-
if (value === null) {
|
|
7620
|
-
return 'null';
|
|
7621
|
-
}
|
|
7622
|
-
switch (typeof value) {
|
|
7623
|
-
case 'undefined':
|
|
7624
|
-
return 'undefined';
|
|
7625
|
-
case 'string':
|
|
7626
|
-
return 'string';
|
|
7627
|
-
case 'number':
|
|
7628
|
-
return 'number';
|
|
7629
|
-
case 'boolean':
|
|
7630
|
-
return 'boolean';
|
|
7631
|
-
case 'function':
|
|
7632
|
-
return 'Function';
|
|
7633
|
-
case 'bigint':
|
|
7634
|
-
return 'bigint';
|
|
7635
|
-
case 'symbol':
|
|
7636
|
-
return 'symbol';
|
|
7637
|
-
default:
|
|
7638
|
-
}
|
|
7639
|
-
if (is.observable(value)) {
|
|
7640
|
-
return 'Observable';
|
|
7641
|
-
}
|
|
7642
|
-
if (is.array(value)) {
|
|
7643
|
-
return 'Array';
|
|
7644
|
-
}
|
|
7645
|
-
if (is.buffer(value)) {
|
|
7646
|
-
return 'Buffer';
|
|
7647
|
-
}
|
|
7648
|
-
const tagType = getObjectType(value);
|
|
7649
|
-
if (tagType) {
|
|
7650
|
-
return tagType;
|
|
7651
|
-
}
|
|
7652
|
-
if (value instanceof String || value instanceof Boolean || value instanceof Number) {
|
|
7653
|
-
throw new TypeError('Please don\'t use object wrappers for primitive types');
|
|
7654
|
-
}
|
|
7655
|
-
return 'Object';
|
|
7656
|
-
}
|
|
7657
|
-
is.undefined = isOfType('undefined');
|
|
7658
|
-
is.string = isOfType('string');
|
|
7659
|
-
const isNumberType = isOfType('number');
|
|
7660
|
-
is.number = (value) => isNumberType(value) && !is.nan(value);
|
|
7661
|
-
is.bigint = isOfType('bigint');
|
|
7662
|
-
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
7663
|
-
is.function_ = isOfType('function');
|
|
7664
|
-
is.null_ = (value) => value === null;
|
|
7665
|
-
is.class_ = (value) => is.function_(value) && value.toString().startsWith('class ');
|
|
7666
|
-
is.boolean = (value) => value === true || value === false;
|
|
7667
|
-
is.symbol = isOfType('symbol');
|
|
7668
|
-
is.numericString = (value) => is.string(value) && !is.emptyStringOrWhitespace(value) && !Number.isNaN(Number(value));
|
|
7669
|
-
is.array = (value, assertion) => {
|
|
7670
|
-
if (!Array.isArray(value)) {
|
|
7671
|
-
return false;
|
|
7672
|
-
}
|
|
7673
|
-
if (!is.function_(assertion)) {
|
|
7674
|
-
return true;
|
|
7675
|
-
}
|
|
7676
|
-
return value.every(assertion);
|
|
7677
|
-
};
|
|
7678
|
-
is.buffer = (value) => { var _a, _b, _c, _d; return (_d = (_c = (_b = (_a = value) === null || _a === void 0 ? void 0 : _a.constructor) === null || _b === void 0 ? void 0 : _b.isBuffer) === null || _c === void 0 ? void 0 : _c.call(_b, value)) !== null && _d !== void 0 ? _d : false; };
|
|
7679
|
-
is.blob = (value) => isObjectOfType('Blob')(value);
|
|
7680
|
-
is.nullOrUndefined = (value) => is.null_(value) || is.undefined(value);
|
|
7681
|
-
is.object = (value) => !is.null_(value) && (typeof value === 'object' || is.function_(value));
|
|
7682
|
-
is.iterable = (value) => { var _a; return is.function_((_a = value) === null || _a === void 0 ? void 0 : _a[Symbol.iterator]); };
|
|
7683
|
-
is.asyncIterable = (value) => { var _a; return is.function_((_a = value) === null || _a === void 0 ? void 0 : _a[Symbol.asyncIterator]); };
|
|
7684
|
-
is.generator = (value) => { var _a, _b; return is.iterable(value) && is.function_((_a = value) === null || _a === void 0 ? void 0 : _a.next) && is.function_((_b = value) === null || _b === void 0 ? void 0 : _b.throw); };
|
|
7685
|
-
is.asyncGenerator = (value) => is.asyncIterable(value) && is.function_(value.next) && is.function_(value.throw);
|
|
7686
|
-
is.nativePromise = (value) => isObjectOfType('Promise')(value);
|
|
7687
|
-
const hasPromiseAPI = (value) => {
|
|
7688
|
-
var _a, _b;
|
|
7689
|
-
return is.function_((_a = value) === null || _a === void 0 ? void 0 : _a.then) &&
|
|
7690
|
-
is.function_((_b = value) === null || _b === void 0 ? void 0 : _b.catch);
|
|
7691
|
-
};
|
|
7692
|
-
is.promise = (value) => is.nativePromise(value) || hasPromiseAPI(value);
|
|
7693
|
-
is.generatorFunction = isObjectOfType('GeneratorFunction');
|
|
7694
|
-
is.asyncGeneratorFunction = (value) => getObjectType(value) === 'AsyncGeneratorFunction';
|
|
7695
|
-
is.asyncFunction = (value) => getObjectType(value) === 'AsyncFunction';
|
|
7696
|
-
// eslint-disable-next-line no-prototype-builtins, @typescript-eslint/ban-types
|
|
7697
|
-
is.boundFunction = (value) => is.function_(value) && !value.hasOwnProperty('prototype');
|
|
7698
|
-
is.regExp = isObjectOfType('RegExp');
|
|
7699
|
-
is.date = isObjectOfType('Date');
|
|
7700
|
-
is.error = isObjectOfType('Error');
|
|
7701
|
-
is.map = (value) => isObjectOfType('Map')(value);
|
|
7702
|
-
is.set = (value) => isObjectOfType('Set')(value);
|
|
7703
|
-
is.weakMap = (value) => isObjectOfType('WeakMap')(value);
|
|
7704
|
-
is.weakSet = (value) => isObjectOfType('WeakSet')(value);
|
|
7705
|
-
is.int8Array = isObjectOfType('Int8Array');
|
|
7706
|
-
is.uint8Array = isObjectOfType('Uint8Array');
|
|
7707
|
-
is.uint8ClampedArray = isObjectOfType('Uint8ClampedArray');
|
|
7708
|
-
is.int16Array = isObjectOfType('Int16Array');
|
|
7709
|
-
is.uint16Array = isObjectOfType('Uint16Array');
|
|
7710
|
-
is.int32Array = isObjectOfType('Int32Array');
|
|
7711
|
-
is.uint32Array = isObjectOfType('Uint32Array');
|
|
7712
|
-
is.float32Array = isObjectOfType('Float32Array');
|
|
7713
|
-
is.float64Array = isObjectOfType('Float64Array');
|
|
7714
|
-
is.bigInt64Array = isObjectOfType('BigInt64Array');
|
|
7715
|
-
is.bigUint64Array = isObjectOfType('BigUint64Array');
|
|
7716
|
-
is.arrayBuffer = isObjectOfType('ArrayBuffer');
|
|
7717
|
-
is.sharedArrayBuffer = isObjectOfType('SharedArrayBuffer');
|
|
7718
|
-
is.dataView = isObjectOfType('DataView');
|
|
7719
|
-
is.enumCase = (value, targetEnum) => Object.values(targetEnum).includes(value);
|
|
7720
|
-
is.directInstanceOf = (instance, class_) => Object.getPrototypeOf(instance) === class_.prototype;
|
|
7721
|
-
is.urlInstance = (value) => isObjectOfType('URL')(value);
|
|
7722
|
-
is.urlString = (value) => {
|
|
7723
|
-
if (!is.string(value)) {
|
|
7724
|
-
return false;
|
|
7725
|
+
5810(__unused_rspack_module, exports) {
|
|
7726
|
+
"use strict";
|
|
7727
|
+
|
|
7728
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
7729
|
+
exports.generateArgumentErrorMessage = void 0;
|
|
7730
|
+
/**
|
|
7731
|
+
Generates a complete message from all errors generated by predicates.
|
|
7732
|
+
|
|
7733
|
+
@param errors - The errors generated by the predicates.
|
|
7734
|
+
@param isAny - If this function is called from the any argument.
|
|
7735
|
+
@hidden
|
|
7736
|
+
*/
|
|
7737
|
+
const generateArgumentErrorMessage = (errors, isAny = false) => {
|
|
7738
|
+
const message = [];
|
|
7739
|
+
const errorArray = [...errors.entries()];
|
|
7740
|
+
const anyErrorWithoutOneItemOnly = errorArray.some(([, array]) => array.size !== 1);
|
|
7741
|
+
// If only one error "key" is present, enumerate all of those errors only.
|
|
7742
|
+
if (errorArray.length === 1) {
|
|
7743
|
+
const [, returnedErrors] = errorArray[0];
|
|
7744
|
+
if (!isAny && returnedErrors.size === 1) {
|
|
7745
|
+
const [errorMessage] = returnedErrors;
|
|
7746
|
+
return errorMessage;
|
|
7747
|
+
}
|
|
7748
|
+
for (const entry of returnedErrors) {
|
|
7749
|
+
message.push(`${isAny ? ' - ' : ''}${entry}`);
|
|
7750
|
+
}
|
|
7751
|
+
return message.join('\n');
|
|
7725
7752
|
}
|
|
7726
|
-
|
|
7727
|
-
|
|
7728
|
-
return
|
|
7753
|
+
// If every predicate returns just one error, enumerate them as is.
|
|
7754
|
+
if (!anyErrorWithoutOneItemOnly) {
|
|
7755
|
+
return errorArray.map(([, [item]]) => ` - ${item}`).join('\n');
|
|
7729
7756
|
}
|
|
7730
|
-
|
|
7731
|
-
|
|
7757
|
+
// Else, iterate through all the errors and enumerate them.
|
|
7758
|
+
for (const [key, value] of errorArray) {
|
|
7759
|
+
message.push(`Errors from the "${key}" predicate:`);
|
|
7760
|
+
for (const entry of value) {
|
|
7761
|
+
message.push(` - ${entry}`);
|
|
7762
|
+
}
|
|
7732
7763
|
}
|
|
7764
|
+
return message.join('\n');
|
|
7733
7765
|
};
|
|
7734
|
-
|
|
7735
|
-
|
|
7736
|
-
|
|
7737
|
-
|
|
7738
|
-
|
|
7739
|
-
|
|
7740
|
-
|
|
7741
|
-
|
|
7742
|
-
|
|
7743
|
-
|
|
7744
|
-
|
|
7745
|
-
|
|
7746
|
-
|
|
7747
|
-
|
|
7748
|
-
|
|
7766
|
+
exports.generateArgumentErrorMessage = generateArgumentErrorMessage;
|
|
7767
|
+
|
|
7768
|
+
|
|
7769
|
+
},
|
|
7770
|
+
5450(__unused_rspack_module, exports) {
|
|
7771
|
+
"use strict";
|
|
7772
|
+
|
|
7773
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
7774
|
+
exports.generateStackTrace = void 0;
|
|
7775
|
+
/**
|
|
7776
|
+
Generates a useful stacktrace that points to the user's code where the error happened on platforms without the `Error.captureStackTrace()` method.
|
|
7777
|
+
|
|
7778
|
+
@hidden
|
|
7779
|
+
*/
|
|
7780
|
+
const generateStackTrace = () => {
|
|
7781
|
+
const stack = new RangeError('INTERNAL_OW_ERROR').stack;
|
|
7782
|
+
return stack;
|
|
7749
7783
|
};
|
|
7750
|
-
|
|
7751
|
-
|
|
7752
|
-
|
|
7753
|
-
|
|
7754
|
-
|
|
7755
|
-
|
|
7756
|
-
|
|
7757
|
-
|
|
7758
|
-
|
|
7784
|
+
exports.generateStackTrace = generateStackTrace;
|
|
7785
|
+
|
|
7786
|
+
|
|
7787
|
+
},
|
|
7788
|
+
3779(__unused_rspack_module, exports) {
|
|
7789
|
+
"use strict";
|
|
7790
|
+
|
|
7791
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
7792
|
+
/**
|
|
7793
|
+
Retrieve the missing values in a collection based on an array of items.
|
|
7794
|
+
|
|
7795
|
+
@hidden
|
|
7796
|
+
|
|
7797
|
+
@param source - Source collection to search through.
|
|
7798
|
+
@param items - Items to search for.
|
|
7799
|
+
@param maxValues - Maximum number of values after the search process is stopped. Default: 5.
|
|
7800
|
+
*/
|
|
7801
|
+
exports["default"] = (source, items, maxValues = 5) => {
|
|
7802
|
+
const missingValues = [];
|
|
7803
|
+
for (const value of items) {
|
|
7804
|
+
if (source.has(value)) {
|
|
7805
|
+
continue;
|
|
7806
|
+
}
|
|
7807
|
+
missingValues.push(value);
|
|
7808
|
+
if (missingValues.length === maxValues) {
|
|
7809
|
+
return missingValues;
|
|
7810
|
+
}
|
|
7759
7811
|
}
|
|
7760
|
-
|
|
7761
|
-
};
|
|
7762
|
-
const NODE_TYPE_ELEMENT = 1;
|
|
7763
|
-
const DOM_PROPERTIES_TO_CHECK = [
|
|
7764
|
-
'innerHTML',
|
|
7765
|
-
'ownerDocument',
|
|
7766
|
-
'style',
|
|
7767
|
-
'attributes',
|
|
7768
|
-
'nodeValue'
|
|
7769
|
-
];
|
|
7770
|
-
is.domElement = (value) => {
|
|
7771
|
-
return is.object(value) &&
|
|
7772
|
-
value.nodeType === NODE_TYPE_ELEMENT &&
|
|
7773
|
-
is.string(value.nodeName) &&
|
|
7774
|
-
!is.plainObject(value) &&
|
|
7775
|
-
DOM_PROPERTIES_TO_CHECK.every(property => property in value);
|
|
7812
|
+
return missingValues.length === 0 ? true : missingValues;
|
|
7776
7813
|
};
|
|
7777
|
-
|
|
7778
|
-
|
|
7779
|
-
|
|
7780
|
-
|
|
7781
|
-
|
|
7782
|
-
|
|
7783
|
-
|
|
7814
|
+
|
|
7815
|
+
|
|
7816
|
+
},
|
|
7817
|
+
9843(__unused_rspack_module, exports) {
|
|
7818
|
+
"use strict";
|
|
7819
|
+
|
|
7820
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
7821
|
+
exports.inferLabel = void 0;
|
|
7822
|
+
const inferLabel = () => { };
|
|
7823
|
+
exports.inferLabel = inferLabel;
|
|
7824
|
+
|
|
7825
|
+
|
|
7826
|
+
},
|
|
7827
|
+
4863(__unused_rspack_module, exports, __webpack_require__) {
|
|
7828
|
+
"use strict";
|
|
7829
|
+
|
|
7830
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
7831
|
+
exports.exact = exports.partial = void 0;
|
|
7832
|
+
const is_1 = __webpack_require__(8890);
|
|
7833
|
+
const test_1 = __webpack_require__(9514);
|
|
7834
|
+
const base_predicate_1 = __webpack_require__(7006);
|
|
7835
|
+
/**
|
|
7836
|
+
Test if the `object` matches the `shape` partially.
|
|
7837
|
+
|
|
7838
|
+
@hidden
|
|
7839
|
+
|
|
7840
|
+
@param object - Object to test against the provided shape.
|
|
7841
|
+
@param shape - Shape to test the object against.
|
|
7842
|
+
@param parent - Name of the parent property.
|
|
7843
|
+
*/
|
|
7844
|
+
function partial(object, shape, parent) {
|
|
7845
|
+
try {
|
|
7846
|
+
for (const key of Object.keys(shape)) {
|
|
7847
|
+
const label = parent ? `${parent}.${key}` : key;
|
|
7848
|
+
if ((0, base_predicate_1.isPredicate)(shape[key])) {
|
|
7849
|
+
(0, test_1.default)(object[key], label, shape[key]);
|
|
7850
|
+
}
|
|
7851
|
+
else if (is_1.default.plainObject(shape[key])) {
|
|
7852
|
+
const result = partial(object[key], shape[key], label);
|
|
7853
|
+
if (result !== true) {
|
|
7854
|
+
return result;
|
|
7855
|
+
}
|
|
7856
|
+
}
|
|
7857
|
+
}
|
|
7784
7858
|
return true;
|
|
7785
7859
|
}
|
|
7786
|
-
|
|
7860
|
+
catch (error) {
|
|
7861
|
+
return error.message;
|
|
7862
|
+
}
|
|
7863
|
+
}
|
|
7864
|
+
exports.partial = partial;
|
|
7865
|
+
/**
|
|
7866
|
+
Test if the `object` matches the `shape` exactly.
|
|
7867
|
+
|
|
7868
|
+
@hidden
|
|
7869
|
+
|
|
7870
|
+
@param object - Object to test against the provided shape.
|
|
7871
|
+
@param shape - Shape to test the object against.
|
|
7872
|
+
@param parent - Name of the parent property.
|
|
7873
|
+
*/
|
|
7874
|
+
function exact(object, shape, parent, isArray) {
|
|
7875
|
+
try {
|
|
7876
|
+
const objectKeys = new Set(Object.keys(object));
|
|
7877
|
+
for (const key of Object.keys(shape)) {
|
|
7878
|
+
objectKeys.delete(key);
|
|
7879
|
+
const label = parent ? `${parent}.${key}` : key;
|
|
7880
|
+
if ((0, base_predicate_1.isPredicate)(shape[key])) {
|
|
7881
|
+
(0, test_1.default)(object[key], label, shape[key]);
|
|
7882
|
+
}
|
|
7883
|
+
else if (is_1.default.plainObject(shape[key])) {
|
|
7884
|
+
if (!Object.prototype.hasOwnProperty.call(object, key)) {
|
|
7885
|
+
return `Expected \`${label}\` to exist`;
|
|
7886
|
+
}
|
|
7887
|
+
const result = exact(object[key], shape[key], label);
|
|
7888
|
+
if (result !== true) {
|
|
7889
|
+
return result;
|
|
7890
|
+
}
|
|
7891
|
+
}
|
|
7892
|
+
}
|
|
7893
|
+
if (objectKeys.size > 0) {
|
|
7894
|
+
const firstKey = [...objectKeys.keys()][0];
|
|
7895
|
+
const label = parent ? `${parent}.${firstKey}` : firstKey;
|
|
7896
|
+
return `Did not expect ${isArray ? 'element' : 'property'} \`${label}\` to exist, got \`${object[firstKey]}\``;
|
|
7897
|
+
}
|
|
7787
7898
|
return true;
|
|
7788
7899
|
}
|
|
7789
|
-
|
|
7790
|
-
|
|
7791
|
-
is.nodeStream = (value) => is.object(value) && is.function_(value.pipe) && !is.observable(value);
|
|
7792
|
-
is.infinite = (value) => value === Infinity || value === -Infinity;
|
|
7793
|
-
const isAbsoluteMod2 = (remainder) => (value) => is.integer(value) && Math.abs(value % 2) === remainder;
|
|
7794
|
-
is.evenInteger = isAbsoluteMod2(0);
|
|
7795
|
-
is.oddInteger = isAbsoluteMod2(1);
|
|
7796
|
-
is.emptyArray = (value) => is.array(value) && value.length === 0;
|
|
7797
|
-
is.nonEmptyArray = (value) => is.array(value) && value.length > 0;
|
|
7798
|
-
is.emptyString = (value) => is.string(value) && value.length === 0;
|
|
7799
|
-
const isWhiteSpaceString = (value) => is.string(value) && !/\S/.test(value);
|
|
7800
|
-
is.emptyStringOrWhitespace = (value) => is.emptyString(value) || isWhiteSpaceString(value);
|
|
7801
|
-
// TODO: Use `not ''` when the `not` operator is available.
|
|
7802
|
-
is.nonEmptyString = (value) => is.string(value) && value.length > 0;
|
|
7803
|
-
// TODO: Use `not ''` when the `not` operator is available.
|
|
7804
|
-
is.nonEmptyStringAndNotWhitespace = (value) => is.string(value) && !is.emptyStringOrWhitespace(value);
|
|
7805
|
-
is.emptyObject = (value) => is.object(value) && !is.map(value) && !is.set(value) && Object.keys(value).length === 0;
|
|
7806
|
-
// TODO: Use `not` operator here to remove `Map` and `Set` from type guard:
|
|
7807
|
-
// - https://github.com/Microsoft/TypeScript/pull/29317
|
|
7808
|
-
is.nonEmptyObject = (value) => is.object(value) && !is.map(value) && !is.set(value) && Object.keys(value).length > 0;
|
|
7809
|
-
is.emptySet = (value) => is.set(value) && value.size === 0;
|
|
7810
|
-
is.nonEmptySet = (value) => is.set(value) && value.size > 0;
|
|
7811
|
-
is.emptyMap = (value) => is.map(value) && value.size === 0;
|
|
7812
|
-
is.nonEmptyMap = (value) => is.map(value) && value.size > 0;
|
|
7813
|
-
// `PropertyKey` is any value that can be used as an object key (string, number, or symbol)
|
|
7814
|
-
is.propertyKey = (value) => is.any([is.string, is.number, is.symbol], value);
|
|
7815
|
-
is.formData = (value) => isObjectOfType('FormData')(value);
|
|
7816
|
-
is.urlSearchParams = (value) => isObjectOfType('URLSearchParams')(value);
|
|
7817
|
-
const predicateOnArray = (method, predicate, values) => {
|
|
7818
|
-
if (!is.function_(predicate)) {
|
|
7819
|
-
throw new TypeError(`Invalid predicate: ${JSON.stringify(predicate)}`);
|
|
7900
|
+
catch (error) {
|
|
7901
|
+
return error.message;
|
|
7820
7902
|
}
|
|
7821
|
-
|
|
7822
|
-
|
|
7903
|
+
}
|
|
7904
|
+
exports.exact = exact;
|
|
7905
|
+
|
|
7906
|
+
|
|
7907
|
+
},
|
|
7908
|
+
8921(__unused_rspack_module, exports, __webpack_require__) {
|
|
7909
|
+
"use strict";
|
|
7910
|
+
|
|
7911
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
7912
|
+
const is_1 = __webpack_require__(8890);
|
|
7913
|
+
const test_1 = __webpack_require__(9514);
|
|
7914
|
+
const ofTypeDeep = (object, predicate) => {
|
|
7915
|
+
if (!is_1.default.plainObject(object)) {
|
|
7916
|
+
(0, test_1.default)(object, 'deep values', predicate, false);
|
|
7917
|
+
return true;
|
|
7823
7918
|
}
|
|
7824
|
-
return
|
|
7825
|
-
};
|
|
7826
|
-
is.any = (predicate, ...values) => {
|
|
7827
|
-
const predicates = is.array(predicate) ? predicate : [predicate];
|
|
7828
|
-
return predicates.some(singlePredicate => predicateOnArray(Array.prototype.some, singlePredicate, values));
|
|
7919
|
+
return Object.values(object).every(value => ofTypeDeep(value, predicate));
|
|
7829
7920
|
};
|
|
7830
|
-
|
|
7831
|
-
|
|
7832
|
-
|
|
7833
|
-
|
|
7834
|
-
|
|
7835
|
-
|
|
7836
|
-
|
|
7837
|
-
|
|
7838
|
-
|
|
7839
|
-
|
|
7921
|
+
/**
|
|
7922
|
+
Test all the values in the object against a provided predicate.
|
|
7923
|
+
|
|
7924
|
+
@hidden
|
|
7925
|
+
|
|
7926
|
+
@param predicate - Predicate to test every value in the given object against.
|
|
7927
|
+
*/
|
|
7928
|
+
exports["default"] = (object, predicate) => {
|
|
7929
|
+
try {
|
|
7930
|
+
return ofTypeDeep(object, predicate);
|
|
7931
|
+
}
|
|
7932
|
+
catch (error) {
|
|
7933
|
+
return error.message;
|
|
7840
7934
|
}
|
|
7841
7935
|
};
|
|
7842
|
-
|
|
7843
|
-
|
|
7844
|
-
|
|
7845
|
-
|
|
7846
|
-
|
|
7847
|
-
|
|
7848
|
-
|
|
7849
|
-
|
|
7850
|
-
|
|
7851
|
-
|
|
7852
|
-
|
|
7853
|
-
|
|
7854
|
-
|
|
7855
|
-
|
|
7856
|
-
|
|
7857
|
-
|
|
7858
|
-
|
|
7859
|
-
|
|
7936
|
+
|
|
7937
|
+
|
|
7938
|
+
},
|
|
7939
|
+
6678(__unused_rspack_module, exports, __webpack_require__) {
|
|
7940
|
+
"use strict";
|
|
7941
|
+
|
|
7942
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
7943
|
+
const test_1 = __webpack_require__(9514);
|
|
7944
|
+
/**
|
|
7945
|
+
Test all the values in the collection against a provided predicate.
|
|
7946
|
+
|
|
7947
|
+
@hidden
|
|
7948
|
+
@param source Source collection to test.
|
|
7949
|
+
@param name The name to call the collection of values, such as `values` or `keys`.
|
|
7950
|
+
@param predicate Predicate to test every item in the source collection against.
|
|
7951
|
+
*/
|
|
7952
|
+
exports["default"] = (source, name, predicate) => {
|
|
7953
|
+
try {
|
|
7954
|
+
for (const item of source) {
|
|
7955
|
+
(0, test_1.default)(item, name, predicate, false);
|
|
7860
7956
|
}
|
|
7861
|
-
|
|
7862
|
-
buffer: (value) => assertType(is.buffer(value), 'Buffer', value),
|
|
7863
|
-
blob: (value) => assertType(is.blob(value), 'Blob', value),
|
|
7864
|
-
nullOrUndefined: (value) => assertType(is.nullOrUndefined(value), "null or undefined" /* nullOrUndefined */, value),
|
|
7865
|
-
object: (value) => assertType(is.object(value), 'Object', value),
|
|
7866
|
-
iterable: (value) => assertType(is.iterable(value), "Iterable" /* iterable */, value),
|
|
7867
|
-
asyncIterable: (value) => assertType(is.asyncIterable(value), "AsyncIterable" /* asyncIterable */, value),
|
|
7868
|
-
generator: (value) => assertType(is.generator(value), 'Generator', value),
|
|
7869
|
-
asyncGenerator: (value) => assertType(is.asyncGenerator(value), 'AsyncGenerator', value),
|
|
7870
|
-
nativePromise: (value) => assertType(is.nativePromise(value), "native Promise" /* nativePromise */, value),
|
|
7871
|
-
promise: (value) => assertType(is.promise(value), 'Promise', value),
|
|
7872
|
-
generatorFunction: (value) => assertType(is.generatorFunction(value), 'GeneratorFunction', value),
|
|
7873
|
-
asyncGeneratorFunction: (value) => assertType(is.asyncGeneratorFunction(value), 'AsyncGeneratorFunction', value),
|
|
7874
|
-
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
7875
|
-
asyncFunction: (value) => assertType(is.asyncFunction(value), 'AsyncFunction', value),
|
|
7876
|
-
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
7877
|
-
boundFunction: (value) => assertType(is.boundFunction(value), 'Function', value),
|
|
7878
|
-
regExp: (value) => assertType(is.regExp(value), 'RegExp', value),
|
|
7879
|
-
date: (value) => assertType(is.date(value), 'Date', value),
|
|
7880
|
-
error: (value) => assertType(is.error(value), 'Error', value),
|
|
7881
|
-
map: (value) => assertType(is.map(value), 'Map', value),
|
|
7882
|
-
set: (value) => assertType(is.set(value), 'Set', value),
|
|
7883
|
-
weakMap: (value) => assertType(is.weakMap(value), 'WeakMap', value),
|
|
7884
|
-
weakSet: (value) => assertType(is.weakSet(value), 'WeakSet', value),
|
|
7885
|
-
int8Array: (value) => assertType(is.int8Array(value), 'Int8Array', value),
|
|
7886
|
-
uint8Array: (value) => assertType(is.uint8Array(value), 'Uint8Array', value),
|
|
7887
|
-
uint8ClampedArray: (value) => assertType(is.uint8ClampedArray(value), 'Uint8ClampedArray', value),
|
|
7888
|
-
int16Array: (value) => assertType(is.int16Array(value), 'Int16Array', value),
|
|
7889
|
-
uint16Array: (value) => assertType(is.uint16Array(value), 'Uint16Array', value),
|
|
7890
|
-
int32Array: (value) => assertType(is.int32Array(value), 'Int32Array', value),
|
|
7891
|
-
uint32Array: (value) => assertType(is.uint32Array(value), 'Uint32Array', value),
|
|
7892
|
-
float32Array: (value) => assertType(is.float32Array(value), 'Float32Array', value),
|
|
7893
|
-
float64Array: (value) => assertType(is.float64Array(value), 'Float64Array', value),
|
|
7894
|
-
bigInt64Array: (value) => assertType(is.bigInt64Array(value), 'BigInt64Array', value),
|
|
7895
|
-
bigUint64Array: (value) => assertType(is.bigUint64Array(value), 'BigUint64Array', value),
|
|
7896
|
-
arrayBuffer: (value) => assertType(is.arrayBuffer(value), 'ArrayBuffer', value),
|
|
7897
|
-
sharedArrayBuffer: (value) => assertType(is.sharedArrayBuffer(value), 'SharedArrayBuffer', value),
|
|
7898
|
-
dataView: (value) => assertType(is.dataView(value), 'DataView', value),
|
|
7899
|
-
enumCase: (value, targetEnum) => assertType(is.enumCase(value, targetEnum), 'EnumCase', value),
|
|
7900
|
-
urlInstance: (value) => assertType(is.urlInstance(value), 'URL', value),
|
|
7901
|
-
urlString: (value) => assertType(is.urlString(value), "string with a URL" /* urlString */, value),
|
|
7902
|
-
truthy: (value) => assertType(is.truthy(value), "truthy" /* truthy */, value),
|
|
7903
|
-
falsy: (value) => assertType(is.falsy(value), "falsy" /* falsy */, value),
|
|
7904
|
-
nan: (value) => assertType(is.nan(value), "NaN" /* nan */, value),
|
|
7905
|
-
primitive: (value) => assertType(is.primitive(value), "primitive" /* primitive */, value),
|
|
7906
|
-
integer: (value) => assertType(is.integer(value), "integer" /* integer */, value),
|
|
7907
|
-
safeInteger: (value) => assertType(is.safeInteger(value), "integer" /* safeInteger */, value),
|
|
7908
|
-
plainObject: (value) => assertType(is.plainObject(value), "plain object" /* plainObject */, value),
|
|
7909
|
-
typedArray: (value) => assertType(is.typedArray(value), "TypedArray" /* typedArray */, value),
|
|
7910
|
-
arrayLike: (value) => assertType(is.arrayLike(value), "array-like" /* arrayLike */, value),
|
|
7911
|
-
domElement: (value) => assertType(is.domElement(value), "HTMLElement" /* domElement */, value),
|
|
7912
|
-
observable: (value) => assertType(is.observable(value), 'Observable', value),
|
|
7913
|
-
nodeStream: (value) => assertType(is.nodeStream(value), "Node.js Stream" /* nodeStream */, value),
|
|
7914
|
-
infinite: (value) => assertType(is.infinite(value), "infinite number" /* infinite */, value),
|
|
7915
|
-
emptyArray: (value) => assertType(is.emptyArray(value), "empty array" /* emptyArray */, value),
|
|
7916
|
-
nonEmptyArray: (value) => assertType(is.nonEmptyArray(value), "non-empty array" /* nonEmptyArray */, value),
|
|
7917
|
-
emptyString: (value) => assertType(is.emptyString(value), "empty string" /* emptyString */, value),
|
|
7918
|
-
emptyStringOrWhitespace: (value) => assertType(is.emptyStringOrWhitespace(value), "empty string or whitespace" /* emptyStringOrWhitespace */, value),
|
|
7919
|
-
nonEmptyString: (value) => assertType(is.nonEmptyString(value), "non-empty string" /* nonEmptyString */, value),
|
|
7920
|
-
nonEmptyStringAndNotWhitespace: (value) => assertType(is.nonEmptyStringAndNotWhitespace(value), "non-empty string and not whitespace" /* nonEmptyStringAndNotWhitespace */, value),
|
|
7921
|
-
emptyObject: (value) => assertType(is.emptyObject(value), "empty object" /* emptyObject */, value),
|
|
7922
|
-
nonEmptyObject: (value) => assertType(is.nonEmptyObject(value), "non-empty object" /* nonEmptyObject */, value),
|
|
7923
|
-
emptySet: (value) => assertType(is.emptySet(value), "empty set" /* emptySet */, value),
|
|
7924
|
-
nonEmptySet: (value) => assertType(is.nonEmptySet(value), "non-empty set" /* nonEmptySet */, value),
|
|
7925
|
-
emptyMap: (value) => assertType(is.emptyMap(value), "empty map" /* emptyMap */, value),
|
|
7926
|
-
nonEmptyMap: (value) => assertType(is.nonEmptyMap(value), "non-empty map" /* nonEmptyMap */, value),
|
|
7927
|
-
propertyKey: (value) => assertType(is.propertyKey(value), 'PropertyKey', value),
|
|
7928
|
-
formData: (value) => assertType(is.formData(value), 'FormData', value),
|
|
7929
|
-
urlSearchParams: (value) => assertType(is.urlSearchParams(value), 'URLSearchParams', value),
|
|
7930
|
-
// Numbers.
|
|
7931
|
-
evenInteger: (value) => assertType(is.evenInteger(value), "even integer" /* evenInteger */, value),
|
|
7932
|
-
oddInteger: (value) => assertType(is.oddInteger(value), "odd integer" /* oddInteger */, value),
|
|
7933
|
-
// Two arguments.
|
|
7934
|
-
directInstanceOf: (instance, class_) => assertType(is.directInstanceOf(instance, class_), "T" /* directInstanceOf */, instance),
|
|
7935
|
-
inRange: (value, range) => assertType(is.inRange(value, range), "in range" /* inRange */, value),
|
|
7936
|
-
// Variadic functions.
|
|
7937
|
-
any: (predicate, ...values) => {
|
|
7938
|
-
return assertType(is.any(predicate, ...values), "predicate returns truthy for any value" /* any */, values, { multipleValues: true });
|
|
7939
|
-
},
|
|
7940
|
-
all: (predicate, ...values) => assertType(is.all(predicate, ...values), "predicate returns truthy for all values" /* all */, values, { multipleValues: true })
|
|
7941
|
-
};
|
|
7942
|
-
// Some few keywords are reserved, but we'll populate them for Node.js users
|
|
7943
|
-
// See https://github.com/Microsoft/TypeScript/issues/2536
|
|
7944
|
-
Object.defineProperties(is, {
|
|
7945
|
-
class: {
|
|
7946
|
-
value: is.class_
|
|
7947
|
-
},
|
|
7948
|
-
function: {
|
|
7949
|
-
value: is.function_
|
|
7950
|
-
},
|
|
7951
|
-
null: {
|
|
7952
|
-
value: is.null_
|
|
7957
|
+
return true;
|
|
7953
7958
|
}
|
|
7954
|
-
|
|
7955
|
-
|
|
7956
|
-
class: {
|
|
7957
|
-
value: exports.assert.class_
|
|
7958
|
-
},
|
|
7959
|
-
function: {
|
|
7960
|
-
value: exports.assert.function_
|
|
7961
|
-
},
|
|
7962
|
-
null: {
|
|
7963
|
-
value: exports.assert.null_
|
|
7959
|
+
catch (error) {
|
|
7960
|
+
return error.message;
|
|
7964
7961
|
}
|
|
7965
|
-
}
|
|
7966
|
-
|
|
7967
|
-
|
|
7968
|
-
|
|
7969
|
-
|
|
7970
|
-
|
|
7962
|
+
};
|
|
7963
|
+
|
|
7964
|
+
|
|
7965
|
+
},
|
|
7966
|
+
4693(__unused_rspack_module, exports) {
|
|
7967
|
+
"use strict";
|
|
7968
|
+
|
|
7969
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
7970
|
+
exports["default"] = () => Math.random().toString(16).slice(2);
|
|
7971
7971
|
|
|
7972
7972
|
|
|
7973
7973
|
},
|
|
@@ -15154,7 +15154,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
15154
15154
|
else if (typeof value === 'string') contentType = 'text/plain; charset=utf-8';
|
|
15155
15155
|
else contentType = 'application/json; charset=utf-8';
|
|
15156
15156
|
}
|
|
15157
|
-
const isContentTypeJson =
|
|
15157
|
+
const isContentTypeJson = contentType.startsWith('application/json');
|
|
15158
15158
|
if (isContentTypeJson && !isValueStreamOrBuffer && typeof value !== 'string') {
|
|
15159
15159
|
try {
|
|
15160
15160
|
value = JSON.stringify(value, null, 2);
|
|
@@ -18020,7 +18020,7 @@ function isStream(value) {
|
|
|
18020
18020
|
function getVersionData() {
|
|
18021
18021
|
if (true) {
|
|
18022
18022
|
return {
|
|
18023
|
-
version: "2.23.2-beta.
|
|
18023
|
+
version: "2.23.2-beta.3"
|
|
18024
18024
|
};
|
|
18025
18025
|
}
|
|
18026
18026
|
// eslint-disable-next-line
|
|
@@ -19783,10 +19783,8 @@ var FORBIDDEN_USERNAMES_REGEXPS = [
|
|
|
19783
19783
|
"reel",
|
|
19784
19784
|
"video-reel",
|
|
19785
19785
|
"mcp",
|
|
19786
|
-
"mcpc",
|
|
19787
19786
|
"model-context-protocol",
|
|
19788
19787
|
"modelcontextprotocol",
|
|
19789
|
-
// 'apify.com' intentionally unescaped so "." matches any character, also blocking variants like "apify_com" or "apifyxcom"
|
|
19790
19788
|
"apify.com",
|
|
19791
19789
|
"design-kit",
|
|
19792
19790
|
"press-kit",
|
|
@@ -19854,8 +19852,6 @@ var FORBIDDEN_USERNAMES_REGEXPS = [
|
|
|
19854
19852
|
"trust-center",
|
|
19855
19853
|
"security-center",
|
|
19856
19854
|
// Brand protection / impersonation prevention
|
|
19857
|
-
"brand",
|
|
19858
|
-
"branding",
|
|
19859
19855
|
"verified",
|
|
19860
19856
|
"apify-support",
|
|
19861
19857
|
"apify-team",
|
|
@@ -21814,20 +21810,18 @@ const factory = (env) => {
|
|
|
21814
21810
|
test(() => {
|
|
21815
21811
|
let duplexAccessed = false;
|
|
21816
21812
|
|
|
21817
|
-
const
|
|
21818
|
-
|
|
21813
|
+
const body = new ReadableStream();
|
|
21814
|
+
|
|
21815
|
+
const hasContentType = new Request(_platform_index_js__rspack_import_1["default"].origin, {
|
|
21816
|
+
body,
|
|
21819
21817
|
method: 'POST',
|
|
21820
21818
|
get duplex() {
|
|
21821
21819
|
duplexAccessed = true;
|
|
21822
21820
|
return 'half';
|
|
21823
21821
|
},
|
|
21824
|
-
});
|
|
21822
|
+
}).headers.has('Content-Type');
|
|
21825
21823
|
|
|
21826
|
-
|
|
21827
|
-
|
|
21828
|
-
if (request.body != null) {
|
|
21829
|
-
request.body.cancel();
|
|
21830
|
-
}
|
|
21824
|
+
body.cancel();
|
|
21831
21825
|
|
|
21832
21826
|
return duplexAccessed && !hasContentType;
|
|
21833
21827
|
});
|
|
@@ -21971,19 +21965,6 @@ const factory = (env) => {
|
|
|
21971
21965
|
// see https://github.com/cloudflare/workerd/issues/902
|
|
21972
21966
|
const isCredentialsSupported = isRequestSupported && 'credentials' in Request.prototype;
|
|
21973
21967
|
|
|
21974
|
-
// If data is FormData and Content-Type is multipart/form-data without boundary,
|
|
21975
|
-
// delete it so fetch can set it correctly with the boundary
|
|
21976
|
-
if (_utils_js__rspack_import_0["default"].isFormData(data)) {
|
|
21977
|
-
const contentType = headers.getContentType();
|
|
21978
|
-
if (
|
|
21979
|
-
contentType &&
|
|
21980
|
-
/^multipart\/form-data/i.test(contentType) &&
|
|
21981
|
-
!/boundary=/i.test(contentType)
|
|
21982
|
-
) {
|
|
21983
|
-
headers.delete('content-type');
|
|
21984
|
-
}
|
|
21985
|
-
}
|
|
21986
|
-
|
|
21987
21968
|
const resolvedOptions = {
|
|
21988
21969
|
...fetchOptions,
|
|
21989
21970
|
signal: composedSignal,
|
|
@@ -22970,40 +22951,40 @@ class AxiosError extends Error {
|
|
|
22970
22951
|
return axiosError;
|
|
22971
22952
|
}
|
|
22972
22953
|
|
|
22973
|
-
|
|
22974
|
-
|
|
22975
|
-
|
|
22976
|
-
|
|
22977
|
-
|
|
22978
|
-
|
|
22979
|
-
|
|
22980
|
-
|
|
22981
|
-
|
|
22982
|
-
|
|
22983
|
-
|
|
22984
|
-
|
|
22985
|
-
|
|
22986
|
-
|
|
22987
|
-
|
|
22988
|
-
|
|
22989
|
-
|
|
22990
|
-
|
|
22991
|
-
|
|
22992
|
-
|
|
22993
|
-
|
|
22994
|
-
|
|
22995
|
-
|
|
22996
|
-
|
|
22997
|
-
|
|
22998
|
-
|
|
22999
|
-
|
|
23000
|
-
|
|
23001
|
-
|
|
23002
|
-
|
|
23003
|
-
|
|
23004
|
-
|
|
22954
|
+
/**
|
|
22955
|
+
* Create an Error with the specified message, config, error code, request and response.
|
|
22956
|
+
*
|
|
22957
|
+
* @param {string} message The error message.
|
|
22958
|
+
* @param {string} [code] The error code (for example, 'ECONNABORTED').
|
|
22959
|
+
* @param {Object} [config] The config.
|
|
22960
|
+
* @param {Object} [request] The request.
|
|
22961
|
+
* @param {Object} [response] The response.
|
|
22962
|
+
*
|
|
22963
|
+
* @returns {Error} The created error.
|
|
22964
|
+
*/
|
|
22965
|
+
constructor(message, code, config, request, response) {
|
|
22966
|
+
super(message);
|
|
22967
|
+
|
|
22968
|
+
// Make message enumerable to maintain backward compatibility
|
|
22969
|
+
// The native Error constructor sets message as non-enumerable,
|
|
22970
|
+
// but axios < v1.13.3 had it as enumerable
|
|
22971
|
+
Object.defineProperty(this, 'message', {
|
|
22972
|
+
value: message,
|
|
22973
|
+
enumerable: true,
|
|
22974
|
+
writable: true,
|
|
22975
|
+
configurable: true
|
|
22976
|
+
});
|
|
22977
|
+
|
|
22978
|
+
this.name = 'AxiosError';
|
|
22979
|
+
this.isAxiosError = true;
|
|
22980
|
+
code && (this.code = code);
|
|
22981
|
+
config && (this.config = config);
|
|
22982
|
+
request && (this.request = request);
|
|
22983
|
+
if (response) {
|
|
22984
|
+
this.response = response;
|
|
22985
|
+
this.status = response.status;
|
|
22986
|
+
}
|
|
23005
22987
|
}
|
|
23006
|
-
}
|
|
23007
22988
|
|
|
23008
22989
|
toJSON() {
|
|
23009
22990
|
return {
|
|
@@ -23039,7 +23020,6 @@ AxiosError.ERR_BAD_REQUEST = 'ERR_BAD_REQUEST';
|
|
|
23039
23020
|
AxiosError.ERR_CANCELED = 'ERR_CANCELED';
|
|
23040
23021
|
AxiosError.ERR_NOT_SUPPORT = 'ERR_NOT_SUPPORT';
|
|
23041
23022
|
AxiosError.ERR_INVALID_URL = 'ERR_INVALID_URL';
|
|
23042
|
-
AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = 'ERR_FORM_DATA_DEPTH_EXCEEDED';
|
|
23043
23023
|
|
|
23044
23024
|
/* export default */ const __rspack_default_export = (AxiosError);
|
|
23045
23025
|
|
|
@@ -23060,41 +23040,41 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
23060
23040
|
|
|
23061
23041
|
const $internals = Symbol('internals');
|
|
23062
23042
|
|
|
23063
|
-
const
|
|
23064
|
-
|
|
23065
|
-
function trimSPorHTAB(str) {
|
|
23066
|
-
let start = 0;
|
|
23067
|
-
let end = str.length;
|
|
23043
|
+
const isValidHeaderValue = (value) => !/[\r\n]/.test(value);
|
|
23068
23044
|
|
|
23069
|
-
|
|
23070
|
-
|
|
23045
|
+
function assertValidHeaderValue(value, header) {
|
|
23046
|
+
if (value === false || value == null) {
|
|
23047
|
+
return;
|
|
23048
|
+
}
|
|
23071
23049
|
|
|
23072
|
-
|
|
23073
|
-
|
|
23074
|
-
|
|
23050
|
+
if (_utils_js__rspack_import_0["default"].isArray(value)) {
|
|
23051
|
+
value.forEach((v) => assertValidHeaderValue(v, header));
|
|
23052
|
+
return;
|
|
23053
|
+
}
|
|
23075
23054
|
|
|
23076
|
-
|
|
23055
|
+
if (!isValidHeaderValue(String(value))) {
|
|
23056
|
+
throw new Error(`Invalid character in header content ["${header}"]`);
|
|
23077
23057
|
}
|
|
23058
|
+
}
|
|
23059
|
+
|
|
23060
|
+
function normalizeHeader(header) {
|
|
23061
|
+
return header && String(header).trim().toLowerCase();
|
|
23062
|
+
}
|
|
23063
|
+
|
|
23064
|
+
function stripTrailingCRLF(str) {
|
|
23065
|
+
let end = str.length;
|
|
23078
23066
|
|
|
23079
|
-
while (end >
|
|
23080
|
-
const
|
|
23067
|
+
while (end > 0) {
|
|
23068
|
+
const charCode = str.charCodeAt(end - 1);
|
|
23081
23069
|
|
|
23082
|
-
if (
|
|
23070
|
+
if (charCode !== 10 && charCode !== 13) {
|
|
23083
23071
|
break;
|
|
23084
23072
|
}
|
|
23085
23073
|
|
|
23086
23074
|
end -= 1;
|
|
23087
23075
|
}
|
|
23088
23076
|
|
|
23089
|
-
return
|
|
23090
|
-
}
|
|
23091
|
-
|
|
23092
|
-
function normalizeHeader(header) {
|
|
23093
|
-
return header && String(header).trim().toLowerCase();
|
|
23094
|
-
}
|
|
23095
|
-
|
|
23096
|
-
function sanitizeHeaderValue(str) {
|
|
23097
|
-
return trimSPorHTAB(str.replace(INVALID_HEADER_VALUE_CHARS_RE, ''));
|
|
23077
|
+
return end === str.length ? str : str.slice(0, end);
|
|
23098
23078
|
}
|
|
23099
23079
|
|
|
23100
23080
|
function normalizeValue(value) {
|
|
@@ -23102,7 +23082,7 @@ function normalizeValue(value) {
|
|
|
23102
23082
|
return value;
|
|
23103
23083
|
}
|
|
23104
23084
|
|
|
23105
|
-
return _utils_js__rspack_import_0["default"].isArray(value) ? value.map(normalizeValue) :
|
|
23085
|
+
return _utils_js__rspack_import_0["default"].isArray(value) ? value.map(normalizeValue) : stripTrailingCRLF(String(value));
|
|
23106
23086
|
}
|
|
23107
23087
|
|
|
23108
23088
|
function parseTokens(str) {
|
|
@@ -23184,6 +23164,7 @@ class AxiosHeaders {
|
|
|
23184
23164
|
_rewrite === true ||
|
|
23185
23165
|
(_rewrite === undefined && self[key] !== false)
|
|
23186
23166
|
) {
|
|
23167
|
+
assertValidHeaderValue(_value, _header);
|
|
23187
23168
|
self[key || _header] = normalizeValue(_value);
|
|
23188
23169
|
}
|
|
23189
23170
|
}
|
|
@@ -23540,7 +23521,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
23540
23521
|
*/
|
|
23541
23522
|
function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
|
|
23542
23523
|
let isRelativeUrl = !(0,_helpers_isAbsoluteURL_js__rspack_import_0["default"])(requestedURL);
|
|
23543
|
-
if (baseURL && (isRelativeUrl || allowAbsoluteUrls
|
|
23524
|
+
if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) {
|
|
23544
23525
|
return (0,_helpers_combineURLs_js__rspack_import_1["default"])(baseURL, requestedURL);
|
|
23545
23526
|
}
|
|
23546
23527
|
return requestedURL;
|
|
@@ -23706,9 +23687,9 @@ function mergeConfig(config1, config2) {
|
|
|
23706
23687
|
|
|
23707
23688
|
// eslint-disable-next-line consistent-return
|
|
23708
23689
|
function mergeDirectKeys(a, b, prop) {
|
|
23709
|
-
if (
|
|
23690
|
+
if (prop in config2) {
|
|
23710
23691
|
return getMergedValue(a, b);
|
|
23711
|
-
} else if (
|
|
23692
|
+
} else if (prop in config1) {
|
|
23712
23693
|
return getMergedValue(undefined, a);
|
|
23713
23694
|
}
|
|
23714
23695
|
}
|
|
@@ -23749,9 +23730,7 @@ function mergeConfig(config1, config2) {
|
|
|
23749
23730
|
_utils_js__rspack_import_1["default"].forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
|
|
23750
23731
|
if (prop === '__proto__' || prop === 'constructor' || prop === 'prototype') return;
|
|
23751
23732
|
const merge = _utils_js__rspack_import_1["default"].hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
|
|
23752
|
-
const
|
|
23753
|
-
const b = _utils_js__rspack_import_1["default"].hasOwnProp(config2, prop) ? config2[prop] : undefined;
|
|
23754
|
-
const configValue = merge(a, b, prop);
|
|
23733
|
+
const configValue = merge(config1[prop], config2[prop], prop);
|
|
23755
23734
|
(_utils_js__rspack_import_1["default"].isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
|
|
23756
23735
|
});
|
|
23757
23736
|
|
|
@@ -23864,8 +23843,6 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
23864
23843
|
|
|
23865
23844
|
|
|
23866
23845
|
|
|
23867
|
-
const own = (obj, key) => (obj != null && _utils_js__rspack_import_0["default"].hasOwnProp(obj, key) ? obj[key] : undefined);
|
|
23868
|
-
|
|
23869
23846
|
/**
|
|
23870
23847
|
* It takes a string, tries to parse it, and if it fails, it returns the stringified version
|
|
23871
23848
|
* of the input
|
|
@@ -23933,22 +23910,20 @@ const defaults = {
|
|
|
23933
23910
|
let isFileList;
|
|
23934
23911
|
|
|
23935
23912
|
if (isObjectPayload) {
|
|
23936
|
-
const formSerializer = own(this, 'formSerializer');
|
|
23937
23913
|
if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {
|
|
23938
|
-
return (0,_helpers_toURLEncodedForm_js__rspack_import_3["default"])(data, formSerializer).toString();
|
|
23914
|
+
return (0,_helpers_toURLEncodedForm_js__rspack_import_3["default"])(data, this.formSerializer).toString();
|
|
23939
23915
|
}
|
|
23940
23916
|
|
|
23941
23917
|
if (
|
|
23942
23918
|
(isFileList = _utils_js__rspack_import_0["default"].isFileList(data)) ||
|
|
23943
23919
|
contentType.indexOf('multipart/form-data') > -1
|
|
23944
23920
|
) {
|
|
23945
|
-
const
|
|
23946
|
-
const _FormData = env && env.FormData;
|
|
23921
|
+
const _FormData = this.env && this.env.FormData;
|
|
23947
23922
|
|
|
23948
23923
|
return (0,_helpers_toFormData_js__rspack_import_4["default"])(
|
|
23949
23924
|
isFileList ? { 'files[]': data } : data,
|
|
23950
23925
|
_FormData && new _FormData(),
|
|
23951
|
-
formSerializer
|
|
23926
|
+
this.formSerializer
|
|
23952
23927
|
);
|
|
23953
23928
|
}
|
|
23954
23929
|
}
|
|
@@ -23964,10 +23939,9 @@ const defaults = {
|
|
|
23964
23939
|
|
|
23965
23940
|
transformResponse: [
|
|
23966
23941
|
function transformResponse(data) {
|
|
23967
|
-
const transitional =
|
|
23942
|
+
const transitional = this.transitional || defaults.transitional;
|
|
23968
23943
|
const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
|
|
23969
|
-
const
|
|
23970
|
-
const JSONRequested = responseType === 'json';
|
|
23944
|
+
const JSONRequested = this.responseType === 'json';
|
|
23971
23945
|
|
|
23972
23946
|
if (_utils_js__rspack_import_0["default"].isResponse(data) || _utils_js__rspack_import_0["default"].isReadableStream(data)) {
|
|
23973
23947
|
return data;
|
|
@@ -23976,17 +23950,17 @@ const defaults = {
|
|
|
23976
23950
|
if (
|
|
23977
23951
|
data &&
|
|
23978
23952
|
_utils_js__rspack_import_0["default"].isString(data) &&
|
|
23979
|
-
((forcedJSONParsing && !responseType) || JSONRequested)
|
|
23953
|
+
((forcedJSONParsing && !this.responseType) || JSONRequested)
|
|
23980
23954
|
) {
|
|
23981
23955
|
const silentJSONParsing = transitional && transitional.silentJSONParsing;
|
|
23982
23956
|
const strictJSONParsing = !silentJSONParsing && JSONRequested;
|
|
23983
23957
|
|
|
23984
23958
|
try {
|
|
23985
|
-
return JSON.parse(data,
|
|
23959
|
+
return JSON.parse(data, this.parseReviver);
|
|
23986
23960
|
} catch (e) {
|
|
23987
23961
|
if (strictJSONParsing) {
|
|
23988
23962
|
if (e.name === 'SyntaxError') {
|
|
23989
|
-
throw _core_AxiosError_js__rspack_import_5["default"].from(e, _core_AxiosError_js__rspack_import_5["default"].ERR_BAD_RESPONSE, this, null,
|
|
23963
|
+
throw _core_AxiosError_js__rspack_import_5["default"].from(e, _core_AxiosError_js__rspack_import_5["default"].ERR_BAD_RESPONSE, this, null, this.response);
|
|
23990
23964
|
}
|
|
23991
23965
|
throw e;
|
|
23992
23966
|
}
|
|
@@ -24057,7 +24031,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
24057
24031
|
__webpack_require__.d(__webpack_exports__, {
|
|
24058
24032
|
VERSION: () => (VERSION)
|
|
24059
24033
|
});
|
|
24060
|
-
const VERSION = "1.15.
|
|
24034
|
+
const VERSION = "1.15.0";
|
|
24061
24035
|
|
|
24062
24036
|
},
|
|
24063
24037
|
5267(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
@@ -24087,8 +24061,9 @@ function encode(str) {
|
|
|
24087
24061
|
')': '%29',
|
|
24088
24062
|
'~': '%7E',
|
|
24089
24063
|
'%20': '+',
|
|
24064
|
+
'%00': '\x00',
|
|
24090
24065
|
};
|
|
24091
|
-
return encodeURIComponent(str).replace(/[!'()~]|%20/g, function replacer(match) {
|
|
24066
|
+
return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {
|
|
24092
24067
|
return charMap[match];
|
|
24093
24068
|
});
|
|
24094
24069
|
}
|
|
@@ -24535,9 +24510,7 @@ function formDataToJSON(formData) {
|
|
|
24535
24510
|
|
|
24536
24511
|
if (isLast) {
|
|
24537
24512
|
if (_utils_js__rspack_import_0["default"].hasOwnProp(target, name)) {
|
|
24538
|
-
target[name] =
|
|
24539
|
-
? target[name].concat(value)
|
|
24540
|
-
: [target[name], value];
|
|
24513
|
+
target[name] = [target[name], value];
|
|
24541
24514
|
} else {
|
|
24542
24515
|
target[name] = value;
|
|
24543
24516
|
}
|
|
@@ -24778,13 +24751,13 @@ const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
|
|
|
24778
24751
|
const _speedometer = (0,_speedometer_js__rspack_import_0["default"])(50, 250);
|
|
24779
24752
|
|
|
24780
24753
|
return (0,_throttle_js__rspack_import_1["default"])((e) => {
|
|
24781
|
-
const
|
|
24754
|
+
const loaded = e.loaded;
|
|
24782
24755
|
const total = e.lengthComputable ? e.total : undefined;
|
|
24783
|
-
const
|
|
24784
|
-
const progressBytes = Math.max(0, loaded - bytesNotified);
|
|
24756
|
+
const progressBytes = loaded - bytesNotified;
|
|
24785
24757
|
const rate = _speedometer(progressBytes);
|
|
24758
|
+
const inRange = loaded <= total;
|
|
24786
24759
|
|
|
24787
|
-
bytesNotified =
|
|
24760
|
+
bytesNotified = loaded;
|
|
24788
24761
|
|
|
24789
24762
|
const data = {
|
|
24790
24763
|
loaded,
|
|
@@ -24792,7 +24765,7 @@ const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
|
|
|
24792
24765
|
progress: total ? loaded / total : undefined,
|
|
24793
24766
|
bytes: progressBytes,
|
|
24794
24767
|
rate: rate ? rate : undefined,
|
|
24795
|
-
estimated: rate && total ? (total - loaded) / rate : undefined,
|
|
24768
|
+
estimated: rate && total && inRange ? (total - loaded) / rate : undefined,
|
|
24796
24769
|
event: e,
|
|
24797
24770
|
lengthComputable: total != null,
|
|
24798
24771
|
[isDownloadStream ? 'download' : 'upload']: true,
|
|
@@ -24893,18 +24866,10 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
24893
24866
|
// Specifically not if we're in a web worker, or react-native.
|
|
24894
24867
|
|
|
24895
24868
|
if (_platform_index_js__rspack_import_5["default"].hasStandardBrowserEnv) {
|
|
24896
|
-
|
|
24897
|
-
withXSRFToken = withXSRFToken(newConfig);
|
|
24898
|
-
}
|
|
24899
|
-
|
|
24900
|
-
// Strict boolean check — prevents proto-pollution gadgets (e.g. Object.prototype.withXSRFToken = 1)
|
|
24901
|
-
// and misconfigurations (e.g. "false") from short-circuiting the same-origin check and leaking
|
|
24902
|
-
// the XSRF token cross-origin. See GHSA-xx6v-rp6x-q39c.
|
|
24903
|
-
const shouldSendXSRF =
|
|
24904
|
-
withXSRFToken === true ||
|
|
24905
|
-
(withXSRFToken == null && (0,_isURLSameOrigin_js__rspack_import_6["default"])(newConfig.url));
|
|
24869
|
+
withXSRFToken && _utils_js__rspack_import_4["default"].isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
|
|
24906
24870
|
|
|
24907
|
-
if (
|
|
24871
|
+
if (withXSRFToken || (withXSRFToken !== false && (0,_isURLSameOrigin_js__rspack_import_6["default"])(newConfig.url))) {
|
|
24872
|
+
// Add xsrf header
|
|
24908
24873
|
const xsrfValue = xsrfHeaderName && xsrfCookieName && _cookies_js__rspack_import_7["default"].read(xsrfCookieName);
|
|
24909
24874
|
|
|
24910
24875
|
if (xsrfValue) {
|
|
@@ -25199,7 +25164,6 @@ function toFormData(obj, formData, options) {
|
|
|
25199
25164
|
const dots = options.dots;
|
|
25200
25165
|
const indexes = options.indexes;
|
|
25201
25166
|
const _Blob = options.Blob || (typeof Blob !== 'undefined' && Blob);
|
|
25202
|
-
const maxDepth = options.maxDepth === undefined ? 100 : options.maxDepth;
|
|
25203
25167
|
const useBlob = _Blob && _utils_js__rspack_import_0["default"].isSpecCompliantForm(formData);
|
|
25204
25168
|
|
|
25205
25169
|
if (!_utils_js__rspack_import_0["default"].isFunction(visitor)) {
|
|
@@ -25292,16 +25256,9 @@ function toFormData(obj, formData, options) {
|
|
|
25292
25256
|
isVisitable,
|
|
25293
25257
|
});
|
|
25294
25258
|
|
|
25295
|
-
function build(value, path
|
|
25259
|
+
function build(value, path) {
|
|
25296
25260
|
if (_utils_js__rspack_import_0["default"].isUndefined(value)) return;
|
|
25297
25261
|
|
|
25298
|
-
if (depth > maxDepth) {
|
|
25299
|
-
throw new _core_AxiosError_js__rspack_import_2["default"](
|
|
25300
|
-
'Object is too deeply nested (' + depth + ' levels). Max depth: ' + maxDepth,
|
|
25301
|
-
_core_AxiosError_js__rspack_import_2["default"].ERR_FORM_DATA_DEPTH_EXCEEDED
|
|
25302
|
-
);
|
|
25303
|
-
}
|
|
25304
|
-
|
|
25305
25262
|
if (stack.indexOf(value) !== -1) {
|
|
25306
25263
|
throw Error('Circular reference detected in ' + path.join('.'));
|
|
25307
25264
|
}
|
|
@@ -25314,7 +25271,7 @@ function toFormData(obj, formData, options) {
|
|
|
25314
25271
|
visitor.call(formData, el, _utils_js__rspack_import_0["default"].isString(key) ? key.trim() : key, path, exposedHelpers);
|
|
25315
25272
|
|
|
25316
25273
|
if (result === true) {
|
|
25317
|
-
build(el, path ? path.concat(key) : [key]
|
|
25274
|
+
build(el, path ? path.concat(key) : [key]);
|
|
25318
25275
|
}
|
|
25319
25276
|
});
|
|
25320
25277
|
|
|
@@ -25993,16 +25950,16 @@ const G = getGlobal();
|
|
|
25993
25950
|
const FormDataCtor = typeof G.FormData !== 'undefined' ? G.FormData : undefined;
|
|
25994
25951
|
|
|
25995
25952
|
const isFormData = (thing) => {
|
|
25996
|
-
|
|
25997
|
-
|
|
25998
|
-
|
|
25999
|
-
|
|
26000
|
-
|
|
26001
|
-
|
|
26002
|
-
|
|
26003
|
-
|
|
26004
|
-
|
|
26005
|
-
|
|
25953
|
+
let kind;
|
|
25954
|
+
return thing && (
|
|
25955
|
+
(FormDataCtor && thing instanceof FormDataCtor) || (
|
|
25956
|
+
isFunction(thing.append) && (
|
|
25957
|
+
(kind = kindOf(thing)) === 'formdata' ||
|
|
25958
|
+
// detect form-data instance
|
|
25959
|
+
(kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')
|
|
25960
|
+
)
|
|
25961
|
+
)
|
|
25962
|
+
);
|
|
26006
25963
|
};
|
|
26007
25964
|
|
|
26008
25965
|
/**
|
|
@@ -26658,7 +26615,7 @@ const isIterable = (thing) => thing != null && isFunction(thing[iterator]);
|
|
|
26658
26615
|
},
|
|
26659
26616
|
8330(module) {
|
|
26660
26617
|
"use strict";
|
|
26661
|
-
module.exports = JSON.parse('{"name":"apify-client","version":"2.23.2-beta.
|
|
26618
|
+
module.exports = JSON.parse('{"name":"apify-client","version":"2.23.2-beta.3","description":"Apify API client for JavaScript","main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","browser":"dist/bundle.js","unpkg":"dist/bundle.js","exports":{"./package.json":"./package.json","./browser":"./dist/bundle.js",".":{"import":"./dist/index.mjs","require":"./dist/index.js","types":"./dist/index.d.ts","browser":"./dist/bundle.js"}},"keywords":["apify","api","apifier","crawler","scraper"],"author":{"name":"Apify","email":"support@apify.com","url":"https://apify.com"},"contributors":["Jan Curn <jan@apify.com>","Marek Trunkát <marek@apify.com>","Ondra Urban <ondra@apify.com>","Jakub Drobník <jakub.drobnik@apify.com>"],"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/apify/apify-client-js"},"bugs":{"url":"https://github.com/apify/apify-client-js/issues"},"homepage":"https://docs.apify.com/api/client/js/","files":["dist","!dist/*.tsbuildinfo"],"scripts":{"build":"pnpm clean && pnpm build:node && pnpm build:browser","postbuild":"gen-esm-wrapper dist/index.js dist/index.mjs","prepublishOnly":"(test $CI || (echo \\"Publishing is reserved to CI!\\"; exit 1))","clean":"rimraf dist tsconfig.tsbuildinfo","test":"pnpm build && vitest run","test:bundling":"pnpm build && pnpm --prefix=./test/bundling run bundle:all","lint":"oxlint --type-aware","lint:fix":"oxlint --type-aware --fix","tsc-check-tests":"tsc --noEmit --project test/tsconfig.json","format":"prettier --write .","format:check":"prettier --check .","build:node":"tsc","build:browser":"rsbuild build","preinstall":"npx only-allow pnpm"},"dependencies":{"@apify/consts":"^2.50.0","@apify/log":"^2.2.6","@apify/utilities":"^2.23.2","@crawlee/types":"^3.3.0","ansi-colors":"^4.1.1","async-retry":"^1.3.3","axios":"^1.6.7","content-type":"^1.0.5","ow":"^0.28.2","proxy-agent":"^6.5.0","tslib":"^2.5.0","type-fest":"^4.0.0"},"devDependencies":{"@apify/oxlint-config":"^0.2.5","@apify/tsconfig":"^0.1.2","@crawlee/puppeteer":"^3.2.2","@rsbuild/core":"^1.3.6","@rsbuild/plugin-node-polyfill":"^1.3.0","@rspack/cli":"^1.7.6","@rspack/core":"^1.7.6","@types/async-retry":"^1.4.5","@types/compression":"^1.8.1","@types/content-type":"^1.1.5","@types/express":"^5.0.0","@types/node":"^24.0.0","ajv":"^8.17.1","body-parser":"^2.0.0","compression":"^1.7.4","esbuild":"0.27.4","express":"^5.0.0","gen-esm-wrapper":"^1.1.2","oxlint":"1.62.0","oxlint-tsgolint":"0.22.0","prettier":"^3.5.3","puppeteer":"^24.0.0","rimraf":"^6.0.0","rolldown":"^1.0.0-rc.4","typescript":"^5.8.3","vitest":"^4.0.16","webpack":"^5.105.2","webpack-cli":"^7.0.0"},"packageManager":"pnpm@10.24.0"}')
|
|
26662
26619
|
|
|
26663
26620
|
},
|
|
26664
26621
|
|