@nocobase/plugin-backup-restore 1.9.0-beta.8 → 1.9.0-beta.9

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.
Files changed (58) hide show
  1. package/dist/externalVersion.js +5 -5
  2. package/dist/node_modules/@hapi/topo/lib/index.js +1 -1
  3. package/dist/node_modules/@hapi/topo/node_modules/@hapi/hoek/lib/applyToDefaults.d.ts +3 -0
  4. package/dist/node_modules/@hapi/topo/node_modules/@hapi/hoek/lib/applyToDefaults.js +102 -0
  5. package/dist/node_modules/@hapi/topo/node_modules/@hapi/hoek/lib/assert.d.ts +3 -0
  6. package/dist/node_modules/@hapi/topo/node_modules/@hapi/hoek/lib/assert.js +30 -0
  7. package/dist/node_modules/@hapi/topo/node_modules/@hapi/hoek/lib/assertError.d.ts +3 -0
  8. package/dist/node_modules/@hapi/topo/node_modules/@hapi/hoek/lib/assertError.js +18 -0
  9. package/dist/node_modules/@hapi/topo/node_modules/@hapi/hoek/lib/bench.d.ts +3 -0
  10. package/dist/node_modules/@hapi/topo/node_modules/@hapi/hoek/lib/bench.js +29 -0
  11. package/dist/node_modules/@hapi/topo/node_modules/@hapi/hoek/lib/block.d.ts +3 -0
  12. package/dist/node_modules/@hapi/topo/node_modules/@hapi/hoek/lib/block.js +12 -0
  13. package/dist/node_modules/@hapi/topo/node_modules/@hapi/hoek/lib/clone.d.ts +3 -0
  14. package/dist/node_modules/@hapi/topo/node_modules/@hapi/hoek/lib/clone.js +174 -0
  15. package/dist/node_modules/@hapi/topo/node_modules/@hapi/hoek/lib/contain.d.ts +3 -0
  16. package/dist/node_modules/@hapi/topo/node_modules/@hapi/hoek/lib/contain.js +307 -0
  17. package/dist/node_modules/@hapi/topo/node_modules/@hapi/hoek/lib/deepEqual.d.ts +3 -0
  18. package/dist/node_modules/@hapi/topo/node_modules/@hapi/hoek/lib/deepEqual.js +317 -0
  19. package/dist/node_modules/@hapi/topo/node_modules/@hapi/hoek/lib/escapeHeaderAttribute.d.ts +3 -0
  20. package/dist/node_modules/@hapi/topo/node_modules/@hapi/hoek/lib/escapeHeaderAttribute.js +16 -0
  21. package/dist/node_modules/@hapi/topo/node_modules/@hapi/hoek/lib/escapeHtml.d.ts +3 -0
  22. package/dist/node_modules/@hapi/topo/node_modules/@hapi/hoek/lib/escapeHtml.js +87 -0
  23. package/dist/node_modules/@hapi/topo/node_modules/@hapi/hoek/lib/escapeJson.d.ts +3 -0
  24. package/dist/node_modules/@hapi/topo/node_modules/@hapi/hoek/lib/escapeJson.js +28 -0
  25. package/dist/node_modules/@hapi/topo/node_modules/@hapi/hoek/lib/escapeRegex.d.ts +3 -0
  26. package/dist/node_modules/@hapi/topo/node_modules/@hapi/hoek/lib/escapeRegex.js +11 -0
  27. package/dist/node_modules/@hapi/topo/node_modules/@hapi/hoek/lib/flatten.d.ts +3 -0
  28. package/dist/node_modules/@hapi/topo/node_modules/@hapi/hoek/lib/flatten.js +20 -0
  29. package/dist/node_modules/@hapi/topo/node_modules/@hapi/hoek/lib/ignore.d.ts +3 -0
  30. package/dist/node_modules/@hapi/topo/node_modules/@hapi/hoek/lib/ignore.js +6 -0
  31. package/dist/node_modules/@hapi/topo/node_modules/@hapi/hoek/lib/index.d.ts +480 -0
  32. package/dist/node_modules/@hapi/topo/node_modules/@hapi/hoek/lib/index.js +45 -0
  33. package/dist/node_modules/@hapi/topo/node_modules/@hapi/hoek/lib/intersect.d.ts +3 -0
  34. package/dist/node_modules/@hapi/topo/node_modules/@hapi/hoek/lib/intersect.js +41 -0
  35. package/dist/node_modules/@hapi/topo/node_modules/@hapi/hoek/lib/isPromise.d.ts +3 -0
  36. package/dist/node_modules/@hapi/topo/node_modules/@hapi/hoek/lib/isPromise.js +9 -0
  37. package/dist/node_modules/@hapi/topo/node_modules/@hapi/hoek/lib/merge.d.ts +3 -0
  38. package/dist/node_modules/@hapi/topo/node_modules/@hapi/hoek/lib/merge.js +78 -0
  39. package/dist/node_modules/@hapi/topo/node_modules/@hapi/hoek/lib/once.d.ts +3 -0
  40. package/dist/node_modules/@hapi/topo/node_modules/@hapi/hoek/lib/once.js +25 -0
  41. package/dist/node_modules/@hapi/topo/node_modules/@hapi/hoek/lib/reach.d.ts +3 -0
  42. package/dist/node_modules/@hapi/topo/node_modules/@hapi/hoek/lib/reach.js +76 -0
  43. package/dist/node_modules/@hapi/topo/node_modules/@hapi/hoek/lib/reachTemplate.d.ts +3 -0
  44. package/dist/node_modules/@hapi/topo/node_modules/@hapi/hoek/lib/reachTemplate.js +16 -0
  45. package/dist/node_modules/@hapi/topo/node_modules/@hapi/hoek/lib/stringify.d.ts +3 -0
  46. package/dist/node_modules/@hapi/topo/node_modules/@hapi/hoek/lib/stringify.js +14 -0
  47. package/dist/node_modules/@hapi/topo/node_modules/@hapi/hoek/lib/types.js +57 -0
  48. package/dist/node_modules/@hapi/topo/node_modules/@hapi/hoek/lib/utils.js +9 -0
  49. package/dist/node_modules/@hapi/topo/node_modules/@hapi/hoek/lib/wait.d.ts +3 -0
  50. package/dist/node_modules/@hapi/topo/node_modules/@hapi/hoek/lib/wait.js +37 -0
  51. package/dist/node_modules/@hapi/topo/node_modules/@hapi/hoek/package.json +60 -0
  52. package/dist/node_modules/@hapi/topo/package.json +1 -1
  53. package/dist/node_modules/archiver/package.json +1 -1
  54. package/dist/node_modules/decompress/package.json +1 -1
  55. package/dist/node_modules/fs-extra/package.json +1 -1
  56. package/dist/node_modules/moment/package.json +1 -1
  57. package/dist/node_modules/semver/package.json +1 -1
  58. package/package.json +2 -2
@@ -0,0 +1,87 @@
1
+ 'use strict';
2
+
3
+ const internals = {};
4
+
5
+
6
+ module.exports = function (input) {
7
+
8
+ if (!input) {
9
+ return '';
10
+ }
11
+
12
+ let escaped = '';
13
+
14
+ for (let i = 0; i < input.length; ++i) {
15
+
16
+ const charCode = input.charCodeAt(i);
17
+
18
+ if (internals.isSafe(charCode)) {
19
+ escaped += input[i];
20
+ }
21
+ else {
22
+ escaped += internals.escapeHtmlChar(charCode);
23
+ }
24
+ }
25
+
26
+ return escaped;
27
+ };
28
+
29
+
30
+ internals.escapeHtmlChar = function (charCode) {
31
+
32
+ const namedEscape = internals.namedHtml.get(charCode);
33
+ if (namedEscape) {
34
+ return namedEscape;
35
+ }
36
+
37
+ if (charCode >= 256) {
38
+ return '&#' + charCode + ';';
39
+ }
40
+
41
+ const hexValue = charCode.toString(16).padStart(2, '0');
42
+ return `&#x${hexValue};`;
43
+ };
44
+
45
+
46
+ internals.isSafe = function (charCode) {
47
+
48
+ return internals.safeCharCodes.has(charCode);
49
+ };
50
+
51
+
52
+ internals.namedHtml = new Map([
53
+ [38, '&amp;'],
54
+ [60, '&lt;'],
55
+ [62, '&gt;'],
56
+ [34, '&quot;'],
57
+ [160, '&nbsp;'],
58
+ [162, '&cent;'],
59
+ [163, '&pound;'],
60
+ [164, '&curren;'],
61
+ [169, '&copy;'],
62
+ [174, '&reg;']
63
+ ]);
64
+
65
+
66
+ internals.safeCharCodes = (function () {
67
+
68
+ const safe = new Set();
69
+
70
+ for (let i = 32; i < 123; ++i) {
71
+
72
+ if ((i >= 97) || // a-z
73
+ (i >= 65 && i <= 90) || // A-Z
74
+ (i >= 48 && i <= 57) || // 0-9
75
+ i === 32 || // space
76
+ i === 46 || // .
77
+ i === 44 || // ,
78
+ i === 45 || // -
79
+ i === 58 || // :
80
+ i === 95) { // _
81
+
82
+ safe.add(i);
83
+ }
84
+ }
85
+
86
+ return safe;
87
+ }());
@@ -0,0 +1,3 @@
1
+ import { escapeJson } from "./index";
2
+
3
+ export = escapeJson;
@@ -0,0 +1,28 @@
1
+ 'use strict';
2
+
3
+ const internals = {};
4
+
5
+
6
+ module.exports = function (input) {
7
+
8
+ if (!input) {
9
+ return '';
10
+ }
11
+
12
+ return input.replace(/[<>&\u2028\u2029]/g, internals.escape);
13
+ };
14
+
15
+
16
+ internals.escape = function (char) {
17
+
18
+ return internals.replacements.get(char);
19
+ };
20
+
21
+
22
+ internals.replacements = new Map([
23
+ ['<', '\\u003c'],
24
+ ['>', '\\u003e'],
25
+ ['&', '\\u0026'],
26
+ ['\u2028', '\\u2028'],
27
+ ['\u2029', '\\u2029']
28
+ ]);
@@ -0,0 +1,3 @@
1
+ import { escapeRegex } from "./index";
2
+
3
+ export = escapeRegex;
@@ -0,0 +1,11 @@
1
+ 'use strict';
2
+
3
+ const internals = {};
4
+
5
+
6
+ module.exports = function (string) {
7
+
8
+ // Escape ^$.*+-?=!:|\/()[]{},
9
+
10
+ return string.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g, '\\$&');
11
+ };
@@ -0,0 +1,3 @@
1
+ import { flatten } from "./index";
2
+
3
+ export = flatten;
@@ -0,0 +1,20 @@
1
+ 'use strict';
2
+
3
+ const internals = {};
4
+
5
+
6
+ module.exports = internals.flatten = function (array, target) {
7
+
8
+ const result = target || [];
9
+
10
+ for (const entry of array) {
11
+ if (Array.isArray(entry)) {
12
+ internals.flatten(entry, result);
13
+ }
14
+ else {
15
+ result.push(entry);
16
+ }
17
+ }
18
+
19
+ return result;
20
+ };
@@ -0,0 +1,3 @@
1
+ import { ignore } from "./index";
2
+
3
+ export = ignore;
@@ -0,0 +1,6 @@
1
+ 'use strict';
2
+
3
+ const internals = {};
4
+
5
+
6
+ module.exports = function () { };
@@ -0,0 +1,480 @@
1
+ /// <reference types="node" />
2
+
3
+
4
+ /**
5
+ * Performs a deep comparison of the two values including support for circular dependencies, prototype, and enumerable properties.
6
+ *
7
+ * @param obj - The value being compared.
8
+ * @param ref - The reference value used for comparison.
9
+ *
10
+ * @return true when the two values are equal, otherwise false.
11
+ */
12
+ export function deepEqual(obj: any, ref: any, options?: deepEqual.Options): boolean;
13
+
14
+ export namespace deepEqual {
15
+
16
+ interface Options {
17
+
18
+ /**
19
+ * Compare functions with difference references by comparing their internal code and properties.
20
+ *
21
+ * @default false
22
+ */
23
+ readonly deepFunction?: boolean;
24
+
25
+ /**
26
+ * Allow partial match.
27
+ *
28
+ * @default false
29
+ */
30
+ readonly part?: boolean;
31
+
32
+ /**
33
+ * Compare the objects' prototypes.
34
+ *
35
+ * @default true
36
+ */
37
+ readonly prototype?: boolean;
38
+
39
+ /**
40
+ * List of object keys to ignore different values of.
41
+ *
42
+ * @default null
43
+ */
44
+ readonly skip?: (string | symbol)[];
45
+
46
+ /**
47
+ * Compare symbol properties.
48
+ *
49
+ * @default true
50
+ */
51
+ readonly symbols?: boolean;
52
+ }
53
+ }
54
+
55
+
56
+ /**
57
+ * Clone any value, object, or array.
58
+ *
59
+ * @param obj - The value being cloned.
60
+ * @param options - Optional settings.
61
+ *
62
+ * @returns A deep clone of `obj`.
63
+ */
64
+ export function clone<T>(obj: T, options?: clone.Options): T;
65
+
66
+ export namespace clone {
67
+
68
+ interface Options {
69
+
70
+ /**
71
+ * Clone the object's prototype.
72
+ *
73
+ * @default true
74
+ */
75
+ readonly prototype?: boolean;
76
+
77
+ /**
78
+ * Include symbol properties.
79
+ *
80
+ * @default true
81
+ */
82
+ readonly symbols?: boolean;
83
+
84
+ /**
85
+ * Shallow clone the specified keys.
86
+ *
87
+ * @default undefined
88
+ */
89
+ readonly shallow?: string[] | string[][] | boolean;
90
+ }
91
+ }
92
+
93
+
94
+ /**
95
+ * Merge all the properties of source into target.
96
+ *
97
+ * @param target - The object being modified.
98
+ * @param source - The object used to copy properties from.
99
+ * @param options - Optional settings.
100
+ *
101
+ * @returns The `target` object.
102
+ */
103
+ export function merge<T1 extends object, T2 extends object>(target: T1, source: T2, options?: merge.Options): T1 & T2;
104
+
105
+ export namespace merge {
106
+
107
+ interface Options {
108
+
109
+ /**
110
+ * When true, null value from `source` overrides existing value in `target`.
111
+ *
112
+ * @default true
113
+ */
114
+ readonly nullOverride?: boolean;
115
+
116
+ /**
117
+ * When true, array value from `source` is merged with the existing value in `target`.
118
+ *
119
+ * @default false
120
+ */
121
+ readonly mergeArrays?: boolean;
122
+
123
+ /**
124
+ * Compare symbol properties.
125
+ *
126
+ * @default true
127
+ */
128
+ readonly symbols?: boolean;
129
+ }
130
+ }
131
+
132
+
133
+ /**
134
+ * Apply source to a copy of the defaults.
135
+ *
136
+ * @param defaults - An object with the default values to use of `options` does not contain the same keys.
137
+ * @param source - The source used to override the `defaults`.
138
+ * @param options - Optional settings.
139
+ *
140
+ * @returns A copy of `defaults` with `source` keys overriding any conflicts.
141
+ */
142
+ export function applyToDefaults<T extends object>(defaults: Partial<T>, source: Partial<T> | boolean | null, options?: applyToDefaults.Options): Partial<T>;
143
+
144
+ export namespace applyToDefaults {
145
+
146
+ interface Options {
147
+
148
+ /**
149
+ * When true, null value from `source` overrides existing value in `target`.
150
+ *
151
+ * @default true
152
+ */
153
+ readonly nullOverride?: boolean;
154
+
155
+ /**
156
+ * Shallow clone the specified keys.
157
+ *
158
+ * @default undefined
159
+ */
160
+ readonly shallow?: string[] | string[][];
161
+ }
162
+ }
163
+
164
+
165
+ /**
166
+ * Find the common unique items in two arrays.
167
+ *
168
+ * @param array1 - The first array to compare.
169
+ * @param array2 - The second array to compare.
170
+ * @param options - Optional settings.
171
+ *
172
+ * @return - An array of the common items. If `justFirst` is true, returns the first common item.
173
+ */
174
+ export function intersect<T1, T2>(array1: intersect.Array<T1>, array2: intersect.Array<T2>, options?: intersect.Options): Array<T1 | T2>;
175
+ export function intersect<T1, T2>(array1: intersect.Array<T1>, array2: intersect.Array<T2>, options?: intersect.Options): T1 | T2;
176
+
177
+ export namespace intersect {
178
+
179
+ type Array<T> = ArrayLike<T> | Set<T> | null;
180
+
181
+ interface Options {
182
+
183
+ /**
184
+ * When true, return the first overlapping value.
185
+ *
186
+ * @default false
187
+ */
188
+ readonly first?: boolean;
189
+ }
190
+ }
191
+
192
+
193
+ /**
194
+ * Checks if the reference value contains the provided values.
195
+ *
196
+ * @param ref - The reference string, array, or object.
197
+ * @param values - A single or array of values to find within `ref`. If `ref` is an object, `values` can be a key name, an array of key names, or an object with key-value pairs to compare.
198
+ *
199
+ * @return true if the value contains the provided values, otherwise false.
200
+ */
201
+ export function contain(ref: string, values: string | string[], options?: contain.Options): boolean;
202
+ export function contain(ref: any[], values: any, options?: contain.Options): boolean;
203
+ export function contain(ref: object, values: string | string[] | object, options?: Omit<contain.Options, 'once'>): boolean;
204
+
205
+ export namespace contain {
206
+
207
+ interface Options {
208
+
209
+ /**
210
+ * Perform a deep comparison.
211
+ *
212
+ * @default false
213
+ */
214
+ readonly deep?: boolean;
215
+
216
+ /**
217
+ * Allow only one occurrence of each value.
218
+ *
219
+ * @default false
220
+ */
221
+ readonly once?: boolean;
222
+
223
+ /**
224
+ * Allow only values explicitly listed.
225
+ *
226
+ * @default false
227
+ */
228
+ readonly only?: boolean;
229
+
230
+ /**
231
+ * Allow partial match.
232
+ *
233
+ * @default false
234
+ */
235
+ readonly part?: boolean;
236
+
237
+ /**
238
+ * Include symbol properties.
239
+ *
240
+ * @default true
241
+ */
242
+ readonly symbols?: boolean;
243
+ }
244
+ }
245
+
246
+
247
+ /**
248
+ * Flatten an array with sub arrays
249
+ *
250
+ * @param array - an array of items or other arrays to flatten.
251
+ * @param target - if provided, an array to shallow copy the flattened `array` items to
252
+ *
253
+ * @return a flat array of the provided values (appended to `target` is provided).
254
+ */
255
+ export function flatten<T>(array: ArrayLike<T | ReadonlyArray<T>>, target?: ArrayLike<T | ReadonlyArray<T>>): T[];
256
+
257
+
258
+ /**
259
+ * Convert an object key chain string to reference.
260
+ *
261
+ * @param obj - the object from which to look up the value.
262
+ * @param chain - the string path of the requested value. The chain string is split into key names using `options.separator`, or an array containing each individual key name. A chain including negative numbers will work like a negative index on an array.
263
+ *
264
+ * @return The value referenced by the chain if found, otherwise undefined. If chain is null, undefined, or false, the object itself will be returned.
265
+ */
266
+ export function reach(obj: object | null, chain: string | (string | number)[] | false | null | undefined, options?: reach.Options): any;
267
+
268
+ export namespace reach {
269
+
270
+ interface Options {
271
+
272
+ /**
273
+ * String to split chain path on. Defaults to '.'.
274
+ *
275
+ * @default false
276
+ */
277
+ readonly separator?: string;
278
+
279
+ /**
280
+ * Value to return if the path or value is not present. No default value.
281
+ *
282
+ * @default false
283
+ */
284
+ readonly default?: any;
285
+
286
+ /**
287
+ * If true, will throw an error on missing member in the chain. Default to false.
288
+ *
289
+ * @default false
290
+ */
291
+ readonly strict?: boolean;
292
+
293
+ /**
294
+ * If true, allows traversing functions for properties. false will throw an error if a function is part of the chain.
295
+ *
296
+ * @default true
297
+ */
298
+ readonly functions?: boolean;
299
+
300
+ /**
301
+ * If true, allows traversing Set and Map objects for properties. false will return undefined regardless of the Set or Map passed.
302
+ *
303
+ * @default false
304
+ */
305
+ readonly iterables?: boolean;
306
+ }
307
+ }
308
+
309
+
310
+ /**
311
+ * Replace string parameters (using format "{path.to.key}") with their corresponding object key values using `Hoek.reach()`.
312
+ *
313
+ * @param obj - the object from which to look up the value.
314
+ * @param template - the string containing {} enclosed key paths to be replaced.
315
+ *
316
+ * @return The template string with the {} enclosed keys replaced with looked-up values.
317
+ */
318
+ export function reachTemplate(obj: object | null, template: string, options?: reach.Options): string;
319
+
320
+
321
+ /**
322
+ * Throw an error if condition is falsy.
323
+ *
324
+ * @param condition - If `condition` is not truthy, an exception is thrown.
325
+ * @param error - The error thrown if the condition fails.
326
+ *
327
+ * @return Does not return a value but throws if the `condition` is falsy.
328
+ */
329
+ export function assert(condition: any, error: Error): asserts condition;
330
+
331
+
332
+ /**
333
+ * Throw an error if condition is falsy.
334
+ *
335
+ * @param condition - If `condition` is not truthy, an exception is thrown.
336
+ * @param args - Any number of values, concatenated together (space separated) to create the error message.
337
+ *
338
+ * @return Does not return a value but throws if the `condition` is falsy.
339
+ */
340
+ export function assert(condition: any, ...args: any): asserts condition;
341
+
342
+
343
+ /**
344
+ * Assertion Error as thrown from Hoek.assert().
345
+ */
346
+ export class AssertError extends Error {
347
+
348
+ name: 'AssertError';
349
+ }
350
+
351
+
352
+ /**
353
+ * A benchmarking timer, using the internal node clock for maximum accuracy.
354
+ */
355
+ export class Bench {
356
+
357
+ constructor();
358
+
359
+ /** The starting timestamp expressed in the number of milliseconds since the epoch. */
360
+ ts: number;
361
+
362
+ /** The time in milliseconds since the object was created. */
363
+ elapsed(): number;
364
+
365
+ /** Reset the `ts` value to now. */
366
+ reset(): void;
367
+
368
+ /** The current time in milliseconds since the epoch. */
369
+ static now(): number;
370
+ }
371
+
372
+
373
+ /**
374
+ * Escape string for Regex construction by prefixing all reserved characters with a backslash.
375
+ *
376
+ * @param string - The string to be escaped.
377
+ *
378
+ * @return The escaped string.
379
+ */
380
+ export function escapeRegex(string: string): string;
381
+
382
+
383
+ /**
384
+ * Escape string for usage as an attribute value in HTTP headers.
385
+ *
386
+ * @param attribute - The string to be escaped.
387
+ *
388
+ * @return The escaped string. Will throw on invalid characters that are not supported to be escaped.
389
+ */
390
+ export function escapeHeaderAttribute(attribute: string): string;
391
+
392
+
393
+ /**
394
+ * Escape string for usage in HTML.
395
+ *
396
+ * @param string - The string to be escaped.
397
+ *
398
+ * @return The escaped string.
399
+ */
400
+ export function escapeHtml(string: string): string;
401
+
402
+
403
+ /**
404
+ * Escape string for usage in JSON.
405
+ *
406
+ * @param string - The string to be escaped.
407
+ *
408
+ * @return The escaped string.
409
+ */
410
+ export function escapeJson(string: string): string;
411
+
412
+
413
+ /**
414
+ * Wraps a function to ensure it can only execute once.
415
+ *
416
+ * @param method - The function to be wrapped.
417
+ *
418
+ * @return The wrapped function.
419
+ */
420
+ export function once<T extends Function>(method: T): T;
421
+
422
+
423
+ /**
424
+ * A reusable no-op function.
425
+ */
426
+ export function ignore(...ignore: any): void;
427
+
428
+
429
+ /**
430
+ * Converts a JavaScript value to a JavaScript Object Notation (JSON) string with protection against thrown errors.
431
+ *
432
+ * @param value A JavaScript value, usually an object or array, to be converted.
433
+ * @param replacer The JSON.stringify() `replacer` argument.
434
+ * @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
435
+ *
436
+ * @return The JSON string. If the operation fails, an error string value is returned (no exception thrown).
437
+ */
438
+ export function stringify(value: any, replacer?: any, space?: string | number): string;
439
+
440
+
441
+ /**
442
+ * Returns a Promise that resolves after the requested timeout.
443
+ *
444
+ * @param timeout - The number of milliseconds to wait before resolving the Promise.
445
+ * @param returnValue - The value that the Promise will resolve to.
446
+ *
447
+ * @return A Promise that resolves with `returnValue`.
448
+ */
449
+ export function wait<T>(timeout?: number, returnValue?: T): Promise<T>;
450
+
451
+
452
+ /**
453
+ * Returns a Promise that never resolves.
454
+ */
455
+ export function block(): Promise<void>;
456
+
457
+
458
+ /**
459
+ * Determines if an object is a promise.
460
+ *
461
+ * @param promise - the object tested.
462
+ *
463
+ * @returns true if the object is a promise, otherwise false.
464
+ */
465
+ export function isPromise(promise: any): boolean;
466
+
467
+
468
+ export namespace ts {
469
+
470
+ /**
471
+ * Defines a type that can must be one of T or U but not both.
472
+ */
473
+ type XOR<T, U> = (T | U) extends object ? (internals.Without<T, U> & U) | (internals.Without<U, T> & T) : T | U;
474
+ }
475
+
476
+
477
+ declare namespace internals {
478
+
479
+ type Without<T, U> = { [P in Exclude<keyof T, keyof U>]?: never };
480
+ }
@@ -0,0 +1,45 @@
1
+ 'use strict';
2
+
3
+ exports.applyToDefaults = require('./applyToDefaults');
4
+
5
+ exports.assert = require('./assert');
6
+
7
+ exports.AssertError = require('./assertError');
8
+
9
+ exports.Bench = require('./bench');
10
+
11
+ exports.block = require('./block');
12
+
13
+ exports.clone = require('./clone');
14
+
15
+ exports.contain = require('./contain');
16
+
17
+ exports.deepEqual = require('./deepEqual');
18
+
19
+ exports.escapeHeaderAttribute = require('./escapeHeaderAttribute');
20
+
21
+ exports.escapeHtml = require('./escapeHtml');
22
+
23
+ exports.escapeJson = require('./escapeJson');
24
+
25
+ exports.escapeRegex = require('./escapeRegex');
26
+
27
+ exports.flatten = require('./flatten');
28
+
29
+ exports.ignore = require('./ignore');
30
+
31
+ exports.intersect = require('./intersect');
32
+
33
+ exports.isPromise = require('./isPromise');
34
+
35
+ exports.merge = require('./merge');
36
+
37
+ exports.once = require('./once');
38
+
39
+ exports.reach = require('./reach');
40
+
41
+ exports.reachTemplate = require('./reachTemplate');
42
+
43
+ exports.stringify = require('./stringify');
44
+
45
+ exports.wait = require('./wait');
@@ -0,0 +1,3 @@
1
+ import { intersect } from "./index";
2
+
3
+ export = intersect;