@naturalcycles/js-lib 14.109.0 → 14.110.0
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/array/array.util.d.ts +2 -2
- package/dist/datetime/dateInterval.d.ts +2 -1
- package/dist/datetime/localDate.d.ts +1 -1
- package/dist/datetime/localTime.d.ts +3 -2
- package/dist/datetime/timeInterval.d.ts +4 -3
- package/dist/decorators/asyncMemo.decorator.d.ts +2 -2
- package/dist/decorators/debounce.d.ts +1 -1
- package/dist/decorators/debounce.decorator.d.ts +1 -1
- package/dist/decorators/decorator.util.d.ts +1 -1
- package/dist/decorators/logMethod.decorator.d.ts +1 -1
- package/dist/decorators/memo.decorator.d.ts +2 -2
- package/dist/decorators/memo.util.d.ts +1 -1
- package/dist/decorators/memoFn.d.ts +2 -2
- package/dist/decorators/memoFnAsync.d.ts +2 -2
- package/dist/decorators/memoSimple.decorator.d.ts +1 -1
- package/dist/decorators/retry.decorator.d.ts +1 -1
- package/dist/decorators/timeout.decorator.d.ts +1 -1
- package/dist/enum.util.d.ts +1 -1
- package/dist/error/app.error.d.ts +1 -1
- package/dist/error/assert.d.ts +1 -1
- package/dist/error/error.util.d.ts +4 -3
- package/dist/error/http.error.d.ts +1 -1
- package/dist/error/try.d.ts +1 -1
- package/dist/error/tryCatch.d.ts +2 -2
- package/dist/index.d.ts +20 -23
- package/dist/index.js +20 -26
- package/dist/is.util.d.ts +2 -2
- package/dist/json-schema/from-data/generateJsonSchemaFromData.d.ts +2 -2
- package/dist/json-schema/jsonSchema.cnst.d.ts +1 -1
- package/dist/json-schema/jsonSchema.model.d.ts +2 -2
- package/dist/json-schema/jsonSchema.util.d.ts +3 -2
- package/dist/json-schema/jsonSchemaBuilder.d.ts +2 -2
- package/dist/json-schema/jsonSchemas.d.ts +1 -1
- package/dist/lazy.d.ts +1 -1
- package/dist/object/object.util.d.ts +2 -2
- package/dist/object/sortObject.d.ts +1 -1
- package/dist/promise/pFilter.d.ts +1 -1
- package/dist/promise/pMap.d.ts +2 -1
- package/dist/promise/pQueue.d.ts +1 -1
- package/dist/promise/pRetry.d.ts +1 -1
- package/dist/promise/pTimeout.d.ts +2 -2
- package/dist/seq/seq.d.ts +2 -1
- package/dist/string/safeJsonStringify.d.ts +1 -1
- package/dist/string/stringifyAny.d.ts +1 -1
- package/dist/string/url.util.d.ts +1 -1
- package/dist/typeFest.d.ts +40 -3
- package/dist/types.d.ts +5 -13
- package/dist-esm/error/error.util.js +1 -1
- package/dist-esm/index.js +20 -12
- package/dist-esm/json-schema/from-data/generateJsonSchemaFromData.js +1 -1
- package/dist-esm/json-schema/jsonSchemaBuilder.js +1 -1
- package/dist-esm/seq/seq.js +1 -1
- package/package.json +2 -2
- package/src/array/array.util.ts +2 -2
- package/src/datetime/dateInterval.ts +2 -1
- package/src/datetime/localDate.ts +1 -1
- package/src/datetime/localTime.ts +3 -2
- package/src/datetime/timeInterval.ts +4 -3
- package/src/decorators/asyncMemo.decorator.ts +4 -3
- package/src/decorators/debounce.decorator.ts +2 -1
- package/src/decorators/debounce.ts +1 -1
- package/src/decorators/decorator.util.ts +1 -1
- package/src/decorators/logMethod.decorator.ts +2 -1
- package/src/decorators/memo.decorator.ts +4 -3
- package/src/decorators/memo.util.ts +1 -1
- package/src/decorators/memoFn.ts +3 -2
- package/src/decorators/memoFnAsync.ts +3 -2
- package/src/decorators/memoSimple.decorator.ts +3 -2
- package/src/decorators/retry.decorator.ts +2 -1
- package/src/decorators/timeout.decorator.ts +2 -1
- package/src/enum.util.ts +1 -1
- package/src/error/app.error.ts +1 -1
- package/src/error/assert.ts +2 -1
- package/src/error/error.util.ts +6 -6
- package/src/error/http.error.ts +1 -1
- package/src/error/try.ts +1 -1
- package/src/error/tryCatch.ts +3 -2
- package/src/index.ts +20 -244
- package/src/is.util.ts +2 -2
- package/src/json-schema/from-data/generateJsonSchemaFromData.ts +5 -4
- package/src/json-schema/jsonSchema.cnst.ts +1 -1
- package/src/json-schema/jsonSchema.model.ts +2 -2
- package/src/json-schema/jsonSchema.util.ts +3 -3
- package/src/json-schema/jsonSchemaBuilder.ts +3 -5
- package/src/json-schema/jsonSchemas.ts +1 -1
- package/src/lazy.ts +1 -1
- package/src/object/object.util.ts +2 -2
- package/src/object/sortObject.ts +2 -1
- package/src/promise/pFilter.ts +1 -1
- package/src/promise/pMap.ts +2 -1
- package/src/promise/pQueue.ts +3 -2
- package/src/promise/pRetry.ts +2 -1
- package/src/promise/pTimeout.ts +2 -2
- package/src/seq/seq.ts +2 -3
- package/src/string/safeJsonStringify.ts +1 -1
- package/src/string/stringifyAny.ts +1 -1
- package/src/string/url.util.ts +1 -1
- package/src/typeFest.ts +57 -7
- package/src/types.ts +8 -20
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RecursiveArray } from '../lodash.types';
|
|
2
|
-
import { FalsyValue, Mapper, Predicate, StringMap } from '../types';
|
|
1
|
+
import type { RecursiveArray } from '../lodash.types';
|
|
2
|
+
import type { FalsyValue, Mapper, Predicate, StringMap } from '../types';
|
|
3
3
|
/**
|
|
4
4
|
* Creates an array of elements split into groups the length of size. If collection can’t be split evenly, the
|
|
5
5
|
* final chunk will be the remaining elements.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Inclusiveness,
|
|
1
|
+
import type { Inclusiveness, LocalDateConfig, LocalDateUnit } from './localDate';
|
|
2
|
+
import { LocalDate } from './localDate';
|
|
2
3
|
export declare type DateIntervalConfig = DateInterval | DateIntervalString;
|
|
3
4
|
export declare type DateIntervalString = string;
|
|
4
5
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IsoDateString, IsoDateTimeString, UnixTimestampMillisNumber, UnixTimestampNumber } from '../types';
|
|
1
|
+
import type { IsoDateString, IsoDateTimeString, UnixTimestampMillisNumber, UnixTimestampNumber } from '../types';
|
|
2
2
|
import { LocalTime } from './localTime';
|
|
3
3
|
export declare type LocalDateUnit = LocalDateUnitStrict | 'week';
|
|
4
4
|
export declare type LocalDateUnitStrict = 'year' | 'month' | 'day';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { IsoDateString, IsoDateTimeString, UnixTimestampMillisNumber, UnixTimestampNumber } from '../types';
|
|
2
|
-
import { Inclusiveness
|
|
1
|
+
import type { IsoDateString, IsoDateTimeString, UnixTimestampMillisNumber, UnixTimestampNumber } from '../types';
|
|
2
|
+
import type { Inclusiveness } from './localDate';
|
|
3
|
+
import { LocalDate } from './localDate';
|
|
3
4
|
export declare type LocalTimeUnit = 'year' | 'month' | 'week' | 'day' | 'hour' | 'minute' | 'second';
|
|
4
5
|
export declare enum ISODayOfWeek {
|
|
5
6
|
MONDAY = 1,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { UnixTimestampNumber } from '../types';
|
|
2
|
-
import { Inclusiveness } from './localDate';
|
|
3
|
-
import {
|
|
1
|
+
import type { UnixTimestampNumber } from '../types';
|
|
2
|
+
import type { Inclusiveness } from './localDate';
|
|
3
|
+
import type { LocalTimeConfig } from './localTime';
|
|
4
|
+
import { LocalTime } from './localTime';
|
|
4
5
|
export declare type TimeIntervalConfig = TimeInterval | TimeIntervalString;
|
|
5
6
|
export declare type TimeIntervalString = string;
|
|
6
7
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CommonLogger } from '../log/commonLogger';
|
|
2
|
-
import { AsyncMemoCache } from './memo.util';
|
|
1
|
+
import type { CommonLogger } from '../log/commonLogger';
|
|
2
|
+
import type { AsyncMemoCache } from './memo.util';
|
|
3
3
|
export interface AsyncMemoOptions {
|
|
4
4
|
/**
|
|
5
5
|
* Provide a custom implementation of MemoCache.
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { DebounceOptions, ThrottleOptions } from './debounce';
|
|
1
|
+
import type { DebounceOptions, ThrottleOptions } from './debounce';
|
|
2
2
|
export declare function _Debounce(wait: number, opt?: DebounceOptions): MethodDecorator;
|
|
3
3
|
export declare function _Throttle(wait: number, opt?: ThrottleOptions): MethodDecorator;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CommonLogger } from '../log/commonLogger';
|
|
2
|
-
import { MemoCache } from './memo.util';
|
|
1
|
+
import type { CommonLogger } from '../log/commonLogger';
|
|
2
|
+
import type { MemoCache } from './memo.util';
|
|
3
3
|
export interface MemoOptions {
|
|
4
4
|
/**
|
|
5
5
|
* Provide a custom implementation of MemoCache.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AsyncMemoOptions } from './asyncMemo.decorator';
|
|
2
|
-
import { AsyncMemoCache } from './memo.util';
|
|
1
|
+
import type { AsyncMemoOptions } from './asyncMemo.decorator';
|
|
2
|
+
import type { AsyncMemoCache } from './memo.util';
|
|
3
3
|
export interface MemoizedAsyncFunction {
|
|
4
4
|
cache: AsyncMemoCache;
|
|
5
5
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { PRetryOptions } from '..';
|
|
1
|
+
import type { PRetryOptions } from '..';
|
|
2
2
|
export declare function _Retry(opt?: PRetryOptions): MethodDecorator;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { PTimeoutOptions } from '../promise/pTimeout';
|
|
1
|
+
import type { PTimeoutOptions } from '../promise/pTimeout';
|
|
2
2
|
export declare function _Timeout(opt: PTimeoutOptions): MethodDecorator;
|
package/dist/enum.util.d.ts
CHANGED
package/dist/error/assert.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ErrorData, ErrorObject, HttpErrorData, HttpErrorResponse, StringifyAnyOptions, Class } from '..';
|
|
2
|
+
import { AppError } from '..';
|
|
2
3
|
/**
|
|
3
4
|
* Useful to ensure that error in `catch (err) { ... }`
|
|
4
5
|
* is indeed an Error (and not e.g `string` or `undefined`).
|
|
@@ -16,8 +17,8 @@ export declare function _anyToError<ERROR_TYPE extends Error = Error>(o: any, er
|
|
|
16
17
|
*/
|
|
17
18
|
export declare function _anyToErrorObject<DATA_TYPE extends ErrorData = ErrorData>(o: any, opt?: StringifyAnyOptions): ErrorObject<DATA_TYPE>;
|
|
18
19
|
export declare function _errorToErrorObject<DATA_TYPE extends ErrorData = ErrorData>(e: AppError<DATA_TYPE> | Error, includeErrorStack?: boolean): ErrorObject<DATA_TYPE>;
|
|
19
|
-
export declare function _errorObjectToAppError<DATA_TYPE>(o: ErrorObject<DATA_TYPE>): AppError<DATA_TYPE>;
|
|
20
|
-
export declare function _errorObjectToError<DATA_TYPE, ERROR_TYPE extends Error>(o: ErrorObject<DATA_TYPE>, errorClass?: Class<ERROR_TYPE>): ERROR_TYPE;
|
|
20
|
+
export declare function _errorObjectToAppError<DATA_TYPE extends ErrorData>(o: ErrorObject<DATA_TYPE>): AppError<DATA_TYPE>;
|
|
21
|
+
export declare function _errorObjectToError<DATA_TYPE extends ErrorData, ERROR_TYPE extends Error>(o: ErrorObject<DATA_TYPE>, errorClass?: Class<ERROR_TYPE>): ERROR_TYPE;
|
|
21
22
|
export declare function _isHttpErrorResponse(o: any): o is HttpErrorResponse;
|
|
22
23
|
export declare function _isHttpErrorObject(o: any): o is ErrorObject<HttpErrorData>;
|
|
23
24
|
/**
|
package/dist/error/try.d.ts
CHANGED
package/dist/error/tryCatch.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CommonLogger } from '../index';
|
|
2
|
-
import { AnyFunction } from '../types';
|
|
1
|
+
import type { CommonLogger } from '../index';
|
|
2
|
+
import type { AnyFunction } from '../types';
|
|
3
3
|
export interface TryCatchOptions {
|
|
4
4
|
/**
|
|
5
5
|
* The value returned from the function will be returned from the wrapped method (!).
|
package/dist/index.d.ts
CHANGED
|
@@ -2,14 +2,14 @@ export * from './array/array.util';
|
|
|
2
2
|
export * from './lazy';
|
|
3
3
|
export * from './string/url.util';
|
|
4
4
|
export * from './array/range';
|
|
5
|
-
|
|
5
|
+
export * from './decorators/createPromiseDecorator';
|
|
6
6
|
export * from './decorators/debounce';
|
|
7
7
|
export * from './decorators/debounce.decorator';
|
|
8
8
|
export * from './decorators/decorator.util';
|
|
9
9
|
export * from './decorators/logMethod.decorator';
|
|
10
10
|
export * from './decorators/memo.decorator';
|
|
11
11
|
export * from './decorators/asyncMemo.decorator';
|
|
12
|
-
|
|
12
|
+
export * from './decorators/memo.util';
|
|
13
13
|
export * from './decorators/memoFn';
|
|
14
14
|
export * from './decorators/memoFnAsync';
|
|
15
15
|
export * from './decorators/retry.decorator';
|
|
@@ -17,17 +17,18 @@ export * from './decorators/timeout.decorator';
|
|
|
17
17
|
export * from './error/app.error';
|
|
18
18
|
export * from './error/assert';
|
|
19
19
|
export * from './enum.util';
|
|
20
|
-
|
|
20
|
+
export * from './error/error.model';
|
|
21
21
|
export * from './error/error.util';
|
|
22
|
-
|
|
22
|
+
export * from './error/errorMode';
|
|
23
23
|
export * from './error/http.error';
|
|
24
24
|
export * from './error/try';
|
|
25
|
-
|
|
25
|
+
export * from './error/tryCatch';
|
|
26
26
|
export * from './json-schema/from-data/generateJsonSchemaFromData';
|
|
27
27
|
export * from './json-schema/jsonSchema.cnst';
|
|
28
|
-
|
|
28
|
+
export * from './json-schema/jsonSchema.model';
|
|
29
29
|
export * from './json-schema/jsonSchema.util';
|
|
30
|
-
|
|
30
|
+
export * from './json-schema/jsonSchemaBuilder';
|
|
31
|
+
export * from './json-schema/jsonSchemaBuilder';
|
|
31
32
|
export * from './math/math.util';
|
|
32
33
|
export * from './math/sma';
|
|
33
34
|
export * from './number/createDeterministicRandom';
|
|
@@ -36,34 +37,31 @@ export * from './object/deepEquals';
|
|
|
36
37
|
export * from './object/object.util';
|
|
37
38
|
export * from './object/sortObject';
|
|
38
39
|
export * from './object/sortObjectDeep';
|
|
39
|
-
|
|
40
|
-
|
|
40
|
+
export * from './promise/AggregatedError';
|
|
41
|
+
export * from './promise/pDefer';
|
|
41
42
|
export * from './promise/pDelay';
|
|
42
43
|
export * from './promise/pFilter';
|
|
43
44
|
export * from './promise/pHang';
|
|
44
|
-
|
|
45
|
+
export * from './promise/pMap';
|
|
45
46
|
export * from './promise/pProps';
|
|
46
|
-
|
|
47
|
+
export * from './promise/pRetry';
|
|
47
48
|
export * from './promise/pState';
|
|
48
|
-
|
|
49
|
+
export * from './promise/pTimeout';
|
|
49
50
|
export * from './string/case';
|
|
50
51
|
export * from './string/json.util';
|
|
51
52
|
export * from './string/string.util';
|
|
52
53
|
export * from './string/readingTime';
|
|
53
54
|
export * from './string/escape';
|
|
54
55
|
export * from './string/pupa';
|
|
55
|
-
|
|
56
|
+
export * from './string/stringifyAny';
|
|
56
57
|
export * from './time/time.util';
|
|
57
58
|
export * from './is.util';
|
|
58
|
-
|
|
59
|
-
import { AsyncMapper, AsyncPredicate, BaseDBEntity, CreatedUpdated, CreatedUpdatedId, ObjectWithId, AnyObjectWithId, Saved, Unsaved, UnsavedId, BatchResult, InstanceId, IsoDate, IsoDateString, IsoDateTimeString, KeyValueTuple, Mapper, ObjectMapper, ObjectPredicate, Predicate, PromiseMap, AnyObject, AnyEnum, NumberEnum, StringEnum, AnyFunction, Reviver, SavedDBEntity, StringMap, UnixTimestampNumber, UnixTimestampMillisNumber, UnixTimestamp, Integer, ValueOf, ValuesOf, AbortableMapper, AbortableAsyncPredicate, AbortableAsyncMapper, AbortablePredicate, NullishValue, FalsyValue } from './types';
|
|
59
|
+
export * from './typeFest';
|
|
60
60
|
export * from './types';
|
|
61
61
|
export * from './unit/size.util';
|
|
62
62
|
import { is } from './vendor/is';
|
|
63
|
-
import { CommonLogLevel, CommonLogFunction, CommonLogger, CommonLogWithLevelFunction } from './log/commonLogger';
|
|
64
63
|
export * from './log/commonLogger';
|
|
65
64
|
export * from './string/safeJsonStringify';
|
|
66
|
-
import { PQueueCfg } from './promise/pQueue';
|
|
67
65
|
export * from './promise/pQueue';
|
|
68
66
|
export * from './seq/seq';
|
|
69
67
|
export * from './math/stack.util';
|
|
@@ -72,9 +70,8 @@ export * from './datetime/localDate';
|
|
|
72
70
|
export * from './datetime/localTime';
|
|
73
71
|
export * from './datetime/dateInterval';
|
|
74
72
|
export * from './datetime/timeInterval';
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
export
|
|
80
|
-
export { is, _createPromiseDecorator, pMap, ErrorMode, pDefer, AggregatedError, pRetry, pRetryFn, pTimeout, pTimeoutFn, _tryCatch, _TryCatch, _stringifyAny, jsonSchema, JsonSchemaAnyBuilder, };
|
|
73
|
+
export * from './datetime/localDate';
|
|
74
|
+
export * from './datetime/localTime';
|
|
75
|
+
export * from './datetime/dateInterval';
|
|
76
|
+
export * from './datetime/timeInterval';
|
|
77
|
+
export { is };
|
package/dist/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.is = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
tslib_1.__exportStar(require("./array/array.util"), exports);
|
|
6
6
|
tslib_1.__exportStar(require("./lazy"), exports);
|
|
7
7
|
tslib_1.__exportStar(require("./string/url.util"), exports);
|
|
8
8
|
tslib_1.__exportStar(require("./array/range"), exports);
|
|
9
|
-
|
|
10
|
-
Object.defineProperty(exports, "_createPromiseDecorator", { enumerable: true, get: function () { return createPromiseDecorator_1._createPromiseDecorator; } });
|
|
9
|
+
tslib_1.__exportStar(require("./decorators/createPromiseDecorator"), exports);
|
|
11
10
|
tslib_1.__exportStar(require("./decorators/debounce"), exports);
|
|
12
11
|
tslib_1.__exportStar(require("./decorators/debounce.decorator"), exports);
|
|
13
12
|
tslib_1.__exportStar(require("./decorators/decorator.util"), exports);
|
|
14
13
|
tslib_1.__exportStar(require("./decorators/logMethod.decorator"), exports);
|
|
15
14
|
tslib_1.__exportStar(require("./decorators/memo.decorator"), exports);
|
|
16
15
|
tslib_1.__exportStar(require("./decorators/asyncMemo.decorator"), exports);
|
|
16
|
+
tslib_1.__exportStar(require("./decorators/memo.util"), exports);
|
|
17
17
|
tslib_1.__exportStar(require("./decorators/memoFn"), exports);
|
|
18
18
|
tslib_1.__exportStar(require("./decorators/memoFnAsync"), exports);
|
|
19
19
|
tslib_1.__exportStar(require("./decorators/retry.decorator"), exports);
|
|
@@ -21,20 +21,18 @@ tslib_1.__exportStar(require("./decorators/timeout.decorator"), exports);
|
|
|
21
21
|
tslib_1.__exportStar(require("./error/app.error"), exports);
|
|
22
22
|
tslib_1.__exportStar(require("./error/assert"), exports);
|
|
23
23
|
tslib_1.__exportStar(require("./enum.util"), exports);
|
|
24
|
+
tslib_1.__exportStar(require("./error/error.model"), exports);
|
|
24
25
|
tslib_1.__exportStar(require("./error/error.util"), exports);
|
|
25
|
-
|
|
26
|
-
Object.defineProperty(exports, "ErrorMode", { enumerable: true, get: function () { return errorMode_1.ErrorMode; } });
|
|
26
|
+
tslib_1.__exportStar(require("./error/errorMode"), exports);
|
|
27
27
|
tslib_1.__exportStar(require("./error/http.error"), exports);
|
|
28
28
|
tslib_1.__exportStar(require("./error/try"), exports);
|
|
29
|
-
|
|
30
|
-
Object.defineProperty(exports, "_TryCatch", { enumerable: true, get: function () { return tryCatch_1._TryCatch; } });
|
|
31
|
-
Object.defineProperty(exports, "_tryCatch", { enumerable: true, get: function () { return tryCatch_1._tryCatch; } });
|
|
29
|
+
tslib_1.__exportStar(require("./error/tryCatch"), exports);
|
|
32
30
|
tslib_1.__exportStar(require("./json-schema/from-data/generateJsonSchemaFromData"), exports);
|
|
33
31
|
tslib_1.__exportStar(require("./json-schema/jsonSchema.cnst"), exports);
|
|
32
|
+
tslib_1.__exportStar(require("./json-schema/jsonSchema.model"), exports);
|
|
34
33
|
tslib_1.__exportStar(require("./json-schema/jsonSchema.util"), exports);
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
Object.defineProperty(exports, "JsonSchemaAnyBuilder", { enumerable: true, get: function () { return jsonSchemaBuilder_1.JsonSchemaAnyBuilder; } });
|
|
34
|
+
tslib_1.__exportStar(require("./json-schema/jsonSchemaBuilder"), exports);
|
|
35
|
+
tslib_1.__exportStar(require("./json-schema/jsonSchemaBuilder"), exports);
|
|
38
36
|
tslib_1.__exportStar(require("./math/math.util"), exports);
|
|
39
37
|
tslib_1.__exportStar(require("./math/sma"), exports);
|
|
40
38
|
tslib_1.__exportStar(require("./number/createDeterministicRandom"), exports);
|
|
@@ -43,33 +41,26 @@ tslib_1.__exportStar(require("./object/deepEquals"), exports);
|
|
|
43
41
|
tslib_1.__exportStar(require("./object/object.util"), exports);
|
|
44
42
|
tslib_1.__exportStar(require("./object/sortObject"), exports);
|
|
45
43
|
tslib_1.__exportStar(require("./object/sortObjectDeep"), exports);
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
const pDefer_1 = require("./promise/pDefer");
|
|
49
|
-
Object.defineProperty(exports, "pDefer", { enumerable: true, get: function () { return pDefer_1.pDefer; } });
|
|
44
|
+
tslib_1.__exportStar(require("./promise/AggregatedError"), exports);
|
|
45
|
+
tslib_1.__exportStar(require("./promise/pDefer"), exports);
|
|
50
46
|
tslib_1.__exportStar(require("./promise/pDelay"), exports);
|
|
51
47
|
tslib_1.__exportStar(require("./promise/pFilter"), exports);
|
|
52
48
|
tslib_1.__exportStar(require("./promise/pHang"), exports);
|
|
53
|
-
|
|
54
|
-
Object.defineProperty(exports, "pMap", { enumerable: true, get: function () { return pMap_1.pMap; } });
|
|
49
|
+
tslib_1.__exportStar(require("./promise/pMap"), exports);
|
|
55
50
|
tslib_1.__exportStar(require("./promise/pProps"), exports);
|
|
56
|
-
|
|
57
|
-
Object.defineProperty(exports, "pRetry", { enumerable: true, get: function () { return pRetry_1.pRetry; } });
|
|
58
|
-
Object.defineProperty(exports, "pRetryFn", { enumerable: true, get: function () { return pRetry_1.pRetryFn; } });
|
|
51
|
+
tslib_1.__exportStar(require("./promise/pRetry"), exports);
|
|
59
52
|
tslib_1.__exportStar(require("./promise/pState"), exports);
|
|
60
|
-
|
|
61
|
-
Object.defineProperty(exports, "pTimeout", { enumerable: true, get: function () { return pTimeout_1.pTimeout; } });
|
|
62
|
-
Object.defineProperty(exports, "pTimeoutFn", { enumerable: true, get: function () { return pTimeout_1.pTimeoutFn; } });
|
|
53
|
+
tslib_1.__exportStar(require("./promise/pTimeout"), exports);
|
|
63
54
|
tslib_1.__exportStar(require("./string/case"), exports);
|
|
64
55
|
tslib_1.__exportStar(require("./string/json.util"), exports);
|
|
65
56
|
tslib_1.__exportStar(require("./string/string.util"), exports);
|
|
66
57
|
tslib_1.__exportStar(require("./string/readingTime"), exports);
|
|
67
58
|
tslib_1.__exportStar(require("./string/escape"), exports);
|
|
68
59
|
tslib_1.__exportStar(require("./string/pupa"), exports);
|
|
69
|
-
|
|
70
|
-
Object.defineProperty(exports, "_stringifyAny", { enumerable: true, get: function () { return stringifyAny_1._stringifyAny; } });
|
|
60
|
+
tslib_1.__exportStar(require("./string/stringifyAny"), exports);
|
|
71
61
|
tslib_1.__exportStar(require("./time/time.util"), exports);
|
|
72
62
|
tslib_1.__exportStar(require("./is.util"), exports);
|
|
63
|
+
tslib_1.__exportStar(require("./typeFest"), exports);
|
|
73
64
|
tslib_1.__exportStar(require("./types"), exports);
|
|
74
65
|
tslib_1.__exportStar(require("./unit/size.util"), exports);
|
|
75
66
|
const is_1 = require("./vendor/is");
|
|
@@ -84,4 +75,7 @@ tslib_1.__exportStar(require("./datetime/localDate"), exports);
|
|
|
84
75
|
tslib_1.__exportStar(require("./datetime/localTime"), exports);
|
|
85
76
|
tslib_1.__exportStar(require("./datetime/dateInterval"), exports);
|
|
86
77
|
tslib_1.__exportStar(require("./datetime/timeInterval"), exports);
|
|
87
|
-
|
|
78
|
+
tslib_1.__exportStar(require("./datetime/localDate"), exports);
|
|
79
|
+
tslib_1.__exportStar(require("./datetime/localTime"), exports);
|
|
80
|
+
tslib_1.__exportStar(require("./datetime/dateInterval"), exports);
|
|
81
|
+
tslib_1.__exportStar(require("./datetime/timeInterval"), exports);
|
package/dist/is.util.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Primitive } from './typeFest';
|
|
2
|
-
import { AnyObject, FalsyValue, NullishValue } from './types';
|
|
1
|
+
import type { Primitive } from './typeFest';
|
|
2
|
+
import type { AnyObject, FalsyValue, NullishValue } from './types';
|
|
3
3
|
declare type Nullish<T> = T extends NullishValue ? T : never;
|
|
4
4
|
declare type Truthy<T> = T extends FalsyValue ? never : T;
|
|
5
5
|
declare type Falsy<T> = T extends FalsyValue ? T : never;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { JsonSchemaObject, AnyObject } from '../..';
|
|
1
|
+
import type { JsonSchemaObject, AnyObject } from '../..';
|
|
2
2
|
/**
|
|
3
3
|
* Each row must be an object (current limitation).
|
|
4
4
|
*
|
|
5
5
|
* `additionalProperties` is set to `true`, cause it's safer.
|
|
6
6
|
*/
|
|
7
|
-
export declare function generateJsonSchemaFromData<T =
|
|
7
|
+
export declare function generateJsonSchemaFromData<T extends AnyObject = AnyObject>(rows: AnyObject[]): JsonSchemaObject<T>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { JsonSchema, JsonSchemaAny, JsonSchemaNumber, JsonSchemaObject, JsonSchemaString } from './jsonSchema.model';
|
|
1
|
+
import type { JsonSchema, JsonSchemaAny, JsonSchemaNumber, JsonSchemaObject, JsonSchemaString } from './jsonSchema.model';
|
|
2
2
|
export declare const JSON_SCHEMA_ORDER: (keyof JsonSchema | keyof JsonSchemaAny | keyof JsonSchemaObject | keyof JsonSchemaString | keyof JsonSchemaNumber)[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AnyObject, StringMap } from '../types';
|
|
2
|
-
export declare type JsonSchema<T = unknown> = JsonSchemaAny<T> | JsonSchemaOneOf<T> | JsonSchemaAllOf<T> | JsonSchemaAnyOf<T> | JsonSchemaNot<T> | JsonSchemaRef<T> | JsonSchemaConst<T> | JsonSchemaEnum<T> | JsonSchemaString | JsonSchemaNumber | JsonSchemaBoolean | JsonSchemaNull | JsonSchemaObject
|
|
1
|
+
import type { AnyObject, StringMap } from '../types';
|
|
2
|
+
export declare type JsonSchema<T = unknown> = JsonSchemaAny<T> | JsonSchemaOneOf<T> | JsonSchemaAllOf<T> | JsonSchemaAnyOf<T> | JsonSchemaNot<T> | JsonSchemaRef<T> | JsonSchemaConst<T> | JsonSchemaEnum<T> | JsonSchemaString | JsonSchemaNumber | JsonSchemaBoolean | JsonSchemaNull | JsonSchemaObject | JsonSchemaArray<T> | JsonSchemaTuple<T>;
|
|
3
3
|
export interface JsonSchemaAny<T = unknown> {
|
|
4
4
|
$schema?: string;
|
|
5
5
|
$id?: string;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AnyObject } from '../index';
|
|
2
|
+
import type { JsonSchemaObject } from './jsonSchema.model';
|
|
2
3
|
/**
|
|
3
4
|
* Merges s2 into s1 (mutates s1) and returns s1.
|
|
4
5
|
* Does not mutate s2.
|
|
5
6
|
* API similar to Object.assign(s1, s2)
|
|
6
7
|
*/
|
|
7
|
-
export declare function mergeJsonSchemaObjects<T1, T2>(s1: JsonSchemaObject<T1>, s2: JsonSchemaObject<T2>): JsonSchemaObject<T1 & T2>;
|
|
8
|
+
export declare function mergeJsonSchemaObjects<T1 extends AnyObject, T2 extends AnyObject>(s1: JsonSchemaObject<T1>, s2: JsonSchemaObject<T2>): JsonSchemaObject<T1 & T2>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import { BaseDBEntity, JsonSchemaAllOf, JsonSchemaArray, JsonSchemaOneOf, JsonSchemaTuple, SavedDBEntity, AnyObject } from '../index';
|
|
3
|
-
import { JsonSchema, JsonSchemaAny, JsonSchemaBoolean, JsonSchemaConst, JsonSchemaEnum, JsonSchemaNull, JsonSchemaNumber, JsonSchemaObject, JsonSchemaRef, JsonSchemaString } from './jsonSchema.model';
|
|
2
|
+
import type { BaseDBEntity, JsonSchemaAllOf, JsonSchemaArray, JsonSchemaOneOf, JsonSchemaTuple, SavedDBEntity, AnyObject } from '../index';
|
|
3
|
+
import type { JsonSchema, JsonSchemaAny, JsonSchemaBoolean, JsonSchemaConst, JsonSchemaEnum, JsonSchemaNull, JsonSchemaNumber, JsonSchemaObject, JsonSchemaRef, JsonSchemaString } from './jsonSchema.model';
|
|
4
4
|
export interface JsonSchemaBuilder<T = unknown> {
|
|
5
5
|
build(): JsonSchema<T>;
|
|
6
6
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { SavedDBEntity } from '../types';
|
|
1
|
+
import type { SavedDBEntity } from '../types';
|
|
2
2
|
export declare const baseDBEntityJsonSchema: import("./jsonSchemaBuilder").JsonSchemaObjectBuilder<Partial<SavedDBEntity<string>>>;
|
|
3
3
|
export declare const savedDBEntityJsonSchema: import("./jsonSchemaBuilder").JsonSchemaObjectBuilder<SavedDBEntity<string>>;
|
package/dist/lazy.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PropertyPath } from '../lodash.types';
|
|
2
|
-
import { AnyObject, ObjectMapper, ObjectPredicate, StringMap, ValueOf } from '../types';
|
|
1
|
+
import type { PropertyPath } from '../lodash.types';
|
|
2
|
+
import type { AnyObject, ObjectMapper, ObjectPredicate, StringMap, ValueOf } from '../types';
|
|
3
3
|
/**
|
|
4
4
|
* Returns clone of `obj` with only `props` preserved.
|
|
5
5
|
* Opposite of Omit.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { AsyncPredicate } from '../types';
|
|
1
|
+
import type { AsyncPredicate } from '../types';
|
|
2
2
|
export declare function pFilter<T>(iterable: Iterable<T>, filterFn: AsyncPredicate<T>): Promise<T[]>;
|
package/dist/promise/pMap.d.ts
CHANGED
package/dist/promise/pQueue.d.ts
CHANGED
package/dist/promise/pRetry.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AppError } from '../error/app.error';
|
|
2
|
-
import { ErrorData } from '../error/error.model';
|
|
3
|
-
import { AnyFunction } from '../types';
|
|
2
|
+
import type { ErrorData } from '../error/error.model';
|
|
3
|
+
import type { AnyFunction } from '../types';
|
|
4
4
|
export declare class TimeoutError extends AppError {
|
|
5
5
|
}
|
|
6
6
|
export interface PTimeoutOptions {
|
package/dist/seq/seq.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { AbortableAsyncMapper, AbortableAsyncPredicate, AbortableMapper, AbortablePredicate
|
|
1
|
+
import type { AbortableAsyncMapper, AbortableAsyncPredicate, AbortableMapper, AbortablePredicate } from '../types';
|
|
2
|
+
import { END } from '../types';
|
|
2
3
|
/**
|
|
3
4
|
* Inspired by Kotlin Sequences.
|
|
4
5
|
* Similar to arrays, but with lazy evaluation, abortable.
|