@naturalcycles/js-lib 14.109.0 → 14.109.1
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 +2 -1
- 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 +27 -19
- package/dist/index.js +0 -1
- package/dist/is.util.d.ts +2 -2
- package/dist/json-schema/from-data/generateJsonSchemaFromData.d.ts +1 -1
- package/dist/json-schema/jsonSchema.cnst.d.ts +1 -1
- package/dist/json-schema/jsonSchema.model.d.ts +1 -1
- package/dist/json-schema/jsonSchema.util.d.ts +1 -1
- 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/types.d.ts +1 -1
- package/dist-esm/error/error.util.js +1 -1
- package/dist-esm/index.js +2 -3
- 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 +1 -1
- 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 +2 -4
- 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 +27 -27
- package/src/is.util.ts +2 -2
- package/src/json-schema/from-data/generateJsonSchemaFromData.ts +2 -3
- package/src/json-schema/jsonSchema.cnst.ts +1 -1
- package/src/json-schema/jsonSchema.model.ts +1 -1
- package/src/json-schema/jsonSchema.util.ts +1 -1
- 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/types.ts +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { CommonLogger } from '..'
|
|
2
|
+
import { SimpleMovingAverage, _stringifyAny, _assert } from '..'
|
|
2
3
|
import { _ms } from '../time/time.util'
|
|
3
4
|
import { _getArgsSignature, _getMethodSignature } from './decorator.util'
|
|
4
5
|
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { CommonLogger } from '../log/commonLogger'
|
|
1
|
+
import type { CommonLogger } from '../log/commonLogger'
|
|
2
2
|
import { _since } from '../time/time.util'
|
|
3
|
-
import { AnyObject } from '../types'
|
|
3
|
+
import type { AnyObject } from '../types'
|
|
4
4
|
import { _getArgsSignature, _getMethodSignature, _getTargetMethodSignature } from './decorator.util'
|
|
5
|
-
import {
|
|
5
|
+
import type { MemoCache } from './memo.util'
|
|
6
|
+
import { jsonMemoSerializer, MapMemoCache } from './memo.util'
|
|
6
7
|
|
|
7
8
|
export interface MemoOptions {
|
|
8
9
|
/**
|
package/src/decorators/memoFn.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { _since } from '../time/time.util'
|
|
2
2
|
import { _getArgsSignature } from './decorator.util'
|
|
3
|
-
import { MemoOptions } from './memo.decorator'
|
|
4
|
-
import {
|
|
3
|
+
import type { MemoOptions } from './memo.decorator'
|
|
4
|
+
import type { MemoCache } from './memo.util'
|
|
5
|
+
import { jsonMemoSerializer, MapMemoCache } from './memo.util'
|
|
5
6
|
|
|
6
7
|
export interface MemoizedFunction {
|
|
7
8
|
cache: MemoCache
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { _since } from '../time/time.util'
|
|
2
|
-
import { AsyncMemoOptions } from './asyncMemo.decorator'
|
|
2
|
+
import type { AsyncMemoOptions } from './asyncMemo.decorator'
|
|
3
3
|
import { _getArgsSignature } from './decorator.util'
|
|
4
|
-
import { AsyncMemoCache
|
|
4
|
+
import type { AsyncMemoCache } from './memo.util'
|
|
5
|
+
import { jsonMemoSerializer, MapMemoCache } from './memo.util'
|
|
5
6
|
|
|
6
7
|
export interface MemoizedAsyncFunction {
|
|
7
8
|
cache: AsyncMemoCache
|
|
@@ -11,9 +11,10 @@ Otherwise resorts to JSON.stringify.
|
|
|
11
11
|
Benchmark shows similar perf for ObjectCache and MapCache.
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
-
import { CommonLogger } from '../log/commonLogger'
|
|
14
|
+
import type { CommonLogger } from '../log/commonLogger'
|
|
15
15
|
import { _getArgsSignature, _getTargetMethodSignature } from './decorator.util'
|
|
16
|
-
import {
|
|
16
|
+
import type { MemoCache } from './memo.util'
|
|
17
|
+
import { jsonMemoSerializer, MapMemoCache } from './memo.util'
|
|
17
18
|
|
|
18
19
|
export interface MemoOpts {
|
|
19
20
|
logHit?: boolean
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { _assert } from '../error/assert'
|
|
2
|
-
import {
|
|
2
|
+
import type { PTimeoutOptions } from '../promise/pTimeout'
|
|
3
|
+
import { pTimeout } from '../promise/pTimeout'
|
|
3
4
|
import { _getMethodSignature } from './decorator.util'
|
|
4
5
|
|
|
5
6
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
package/src/enum.util.ts
CHANGED
package/src/error/app.error.ts
CHANGED
package/src/error/assert.ts
CHANGED
package/src/error/error.util.ts
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AppError,
|
|
1
|
+
import type {
|
|
3
2
|
ErrorData,
|
|
4
3
|
ErrorObject,
|
|
5
4
|
HttpErrorData,
|
|
6
5
|
HttpErrorResponse,
|
|
7
6
|
StringifyAnyOptions,
|
|
8
|
-
_jsonParseIfPossible,
|
|
9
|
-
_stringifyAny,
|
|
10
7
|
Class,
|
|
11
8
|
} from '..'
|
|
9
|
+
import { AppError, _jsonParseIfPossible, _stringifyAny } from '..'
|
|
12
10
|
|
|
13
11
|
/**
|
|
14
12
|
* Useful to ensure that error in `catch (err) { ... }`
|
package/src/error/http.error.ts
CHANGED
package/src/error/try.ts
CHANGED
package/src/error/tryCatch.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { CommonLogger } from '../index'
|
|
2
|
+
import { _anyToError, _since, _stringifyAny } from '../index'
|
|
3
|
+
import type { AnyFunction } from '../types'
|
|
3
4
|
|
|
4
5
|
export interface TryCatchOptions {
|
|
5
6
|
/**
|
package/src/index.ts
CHANGED
|
@@ -2,18 +2,15 @@ export * from './array/array.util'
|
|
|
2
2
|
export * from './lazy'
|
|
3
3
|
export * from './string/url.util'
|
|
4
4
|
export * from './array/range'
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
PromiseDecoratorResp,
|
|
8
|
-
_createPromiseDecorator,
|
|
9
|
-
} from './decorators/createPromiseDecorator'
|
|
5
|
+
import type { PromiseDecoratorCfg, PromiseDecoratorResp } from './decorators/createPromiseDecorator'
|
|
6
|
+
import { _createPromiseDecorator } from './decorators/createPromiseDecorator'
|
|
10
7
|
export * from './decorators/debounce'
|
|
11
8
|
export * from './decorators/debounce.decorator'
|
|
12
9
|
export * from './decorators/decorator.util'
|
|
13
10
|
export * from './decorators/logMethod.decorator'
|
|
14
11
|
export * from './decorators/memo.decorator'
|
|
15
12
|
export * from './decorators/asyncMemo.decorator'
|
|
16
|
-
import { MemoCache, AsyncMemoCache } from './decorators/memo.util'
|
|
13
|
+
import type { MemoCache, AsyncMemoCache } from './decorators/memo.util'
|
|
17
14
|
export * from './decorators/memoFn'
|
|
18
15
|
export * from './decorators/memoFnAsync'
|
|
19
16
|
export * from './decorators/retry.decorator'
|
|
@@ -21,7 +18,7 @@ export * from './decorators/timeout.decorator'
|
|
|
21
18
|
export * from './error/app.error'
|
|
22
19
|
export * from './error/assert'
|
|
23
20
|
export * from './enum.util'
|
|
24
|
-
import {
|
|
21
|
+
import type {
|
|
25
22
|
Admin401ErrorData,
|
|
26
23
|
Admin403ErrorData,
|
|
27
24
|
ErrorData,
|
|
@@ -33,10 +30,11 @@ export * from './error/error.util'
|
|
|
33
30
|
import { ErrorMode } from './error/errorMode'
|
|
34
31
|
export * from './error/http.error'
|
|
35
32
|
export * from './error/try'
|
|
36
|
-
import { TryCatchOptions
|
|
33
|
+
import type { TryCatchOptions } from './error/tryCatch'
|
|
34
|
+
import { _TryCatch, _tryCatch } from './error/tryCatch'
|
|
37
35
|
export * from './json-schema/from-data/generateJsonSchemaFromData'
|
|
38
36
|
export * from './json-schema/jsonSchema.cnst'
|
|
39
|
-
import {
|
|
37
|
+
import type {
|
|
40
38
|
JsonSchema,
|
|
41
39
|
JsonSchemaAllOf,
|
|
42
40
|
JsonSchemaAny,
|
|
@@ -56,11 +54,8 @@ import {
|
|
|
56
54
|
JsonSchemaTuple,
|
|
57
55
|
} from './json-schema/jsonSchema.model'
|
|
58
56
|
export * from './json-schema/jsonSchema.util'
|
|
59
|
-
import {
|
|
60
|
-
|
|
61
|
-
JsonSchemaAnyBuilder,
|
|
62
|
-
JsonSchemaBuilder,
|
|
63
|
-
} from './json-schema/jsonSchemaBuilder'
|
|
57
|
+
import type { JsonSchemaBuilder } from './json-schema/jsonSchemaBuilder'
|
|
58
|
+
import { jsonSchema, JsonSchemaAnyBuilder } from './json-schema/jsonSchemaBuilder'
|
|
64
59
|
export * from './math/math.util'
|
|
65
60
|
export * from './math/sma'
|
|
66
61
|
export * from './number/createDeterministicRandom'
|
|
@@ -70,26 +65,31 @@ export * from './object/object.util'
|
|
|
70
65
|
export * from './object/sortObject'
|
|
71
66
|
export * from './object/sortObjectDeep'
|
|
72
67
|
import { AggregatedError } from './promise/AggregatedError'
|
|
73
|
-
import { DeferredPromise
|
|
68
|
+
import type { DeferredPromise } from './promise/pDefer'
|
|
69
|
+
import { pDefer } from './promise/pDefer'
|
|
74
70
|
export * from './promise/pDelay'
|
|
75
71
|
export * from './promise/pFilter'
|
|
76
72
|
export * from './promise/pHang'
|
|
77
|
-
import {
|
|
73
|
+
import type { PMapOptions } from './promise/pMap'
|
|
74
|
+
import { pMap } from './promise/pMap'
|
|
78
75
|
export * from './promise/pProps'
|
|
79
|
-
import {
|
|
76
|
+
import type { PRetryOptions } from './promise/pRetry'
|
|
77
|
+
import { pRetry, pRetryFn } from './promise/pRetry'
|
|
80
78
|
export * from './promise/pState'
|
|
81
|
-
import {
|
|
79
|
+
import type { PTimeoutOptions } from './promise/pTimeout'
|
|
80
|
+
import { pTimeout, pTimeoutFn } from './promise/pTimeout'
|
|
82
81
|
export * from './string/case'
|
|
83
82
|
export * from './string/json.util'
|
|
84
83
|
export * from './string/string.util'
|
|
85
84
|
export * from './string/readingTime'
|
|
86
85
|
export * from './string/escape'
|
|
87
86
|
export * from './string/pupa'
|
|
88
|
-
import { JsonStringifyFunction, StringifyAnyOptions
|
|
87
|
+
import type { JsonStringifyFunction, StringifyAnyOptions } from './string/stringifyAny'
|
|
88
|
+
import { _stringifyAny } from './string/stringifyAny'
|
|
89
89
|
export * from './time/time.util'
|
|
90
90
|
export * from './is.util'
|
|
91
91
|
|
|
92
|
-
import {
|
|
92
|
+
import type {
|
|
93
93
|
Class,
|
|
94
94
|
ConditionalExcept,
|
|
95
95
|
ConditionalPick,
|
|
@@ -98,7 +98,7 @@ import {
|
|
|
98
98
|
ReadonlyDeep,
|
|
99
99
|
Simplify,
|
|
100
100
|
} from './typeFest'
|
|
101
|
-
import {
|
|
101
|
+
import type {
|
|
102
102
|
AsyncMapper,
|
|
103
103
|
AsyncPredicate,
|
|
104
104
|
BaseDBEntity,
|
|
@@ -144,7 +144,7 @@ import {
|
|
|
144
144
|
export * from './types'
|
|
145
145
|
export * from './unit/size.util'
|
|
146
146
|
import { is } from './vendor/is'
|
|
147
|
-
import {
|
|
147
|
+
import type {
|
|
148
148
|
CommonLogLevel,
|
|
149
149
|
CommonLogFunction,
|
|
150
150
|
CommonLogger,
|
|
@@ -152,7 +152,7 @@ import {
|
|
|
152
152
|
} from './log/commonLogger'
|
|
153
153
|
export * from './log/commonLogger'
|
|
154
154
|
export * from './string/safeJsonStringify'
|
|
155
|
-
import { PQueueCfg } from './promise/pQueue'
|
|
155
|
+
import type { PQueueCfg } from './promise/pQueue'
|
|
156
156
|
export * from './promise/pQueue'
|
|
157
157
|
export * from './seq/seq'
|
|
158
158
|
export * from './math/stack.util'
|
|
@@ -161,22 +161,22 @@ export * from './datetime/localDate'
|
|
|
161
161
|
export * from './datetime/localTime'
|
|
162
162
|
export * from './datetime/dateInterval'
|
|
163
163
|
export * from './datetime/timeInterval'
|
|
164
|
-
import {
|
|
164
|
+
import type {
|
|
165
165
|
LocalDateConfig,
|
|
166
166
|
LocalDateFormatter,
|
|
167
167
|
LocalDateUnit,
|
|
168
168
|
LocalDateUnitStrict,
|
|
169
169
|
Inclusiveness,
|
|
170
170
|
} from './datetime/localDate'
|
|
171
|
-
import {
|
|
171
|
+
import type {
|
|
172
172
|
LocalTimeConfig,
|
|
173
173
|
LocalTimeFormatter,
|
|
174
174
|
LocalTimeUnit,
|
|
175
175
|
LocalTimeComponents,
|
|
176
176
|
ISODayOfWeek,
|
|
177
177
|
} from './datetime/localTime'
|
|
178
|
-
import { DateIntervalConfig, DateIntervalString } from './datetime/dateInterval'
|
|
179
|
-
import { TimeIntervalConfig, TimeIntervalString } from './datetime/timeInterval'
|
|
178
|
+
import type { DateIntervalConfig, DateIntervalString } from './datetime/dateInterval'
|
|
179
|
+
import type { TimeIntervalConfig, TimeIntervalString } from './datetime/timeInterval'
|
|
180
180
|
|
|
181
181
|
export type {
|
|
182
182
|
DateIntervalConfig,
|
package/src/is.util.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
|
|
|
4
4
|
type Nullish<T> = T extends NullishValue ? T : never
|
|
5
5
|
type Truthy<T> = T extends FalsyValue ? never : T
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type {
|
|
2
2
|
JsonSchema,
|
|
3
3
|
JsonSchemaArray,
|
|
4
4
|
JsonSchemaBoolean,
|
|
@@ -8,10 +8,9 @@ import {
|
|
|
8
8
|
JsonSchemaOneOf,
|
|
9
9
|
JsonSchemaString,
|
|
10
10
|
StringMap,
|
|
11
|
-
_stringMapEntries,
|
|
12
|
-
_uniq,
|
|
13
11
|
AnyObject,
|
|
14
12
|
} from '../..'
|
|
13
|
+
import { _stringMapEntries, _uniq } from '../..'
|
|
15
14
|
|
|
16
15
|
type PrimitiveType = 'undefined' | 'null' | 'boolean' | 'string' | 'number'
|
|
17
16
|
type Type = PrimitiveType | 'array' | 'object'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { _uniq } from '../index'
|
|
2
2
|
import { _filterNullishValues } from '../object/object.util'
|
|
3
|
-
import { JsonSchemaObject } from './jsonSchema.model'
|
|
3
|
+
import type { JsonSchemaObject } from './jsonSchema.model'
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Merges s2 into s1 (mutates s1) and returns s1.
|
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
import { _uniq } from '../array/array.util'
|
|
2
|
-
import {
|
|
2
|
+
import type {
|
|
3
3
|
BaseDBEntity,
|
|
4
4
|
JsonSchemaAllOf,
|
|
5
5
|
JsonSchemaArray,
|
|
6
6
|
JsonSchemaOneOf,
|
|
7
7
|
JsonSchemaTuple,
|
|
8
|
-
mergeJsonSchemaObjects,
|
|
9
8
|
SavedDBEntity,
|
|
10
|
-
_deepCopy,
|
|
11
|
-
_sortObject,
|
|
12
9
|
AnyObject,
|
|
13
10
|
} from '../index'
|
|
11
|
+
import { mergeJsonSchemaObjects, _deepCopy, _sortObject } from '../index'
|
|
14
12
|
import { JSON_SCHEMA_ORDER } from './jsonSchema.cnst'
|
|
15
|
-
import {
|
|
13
|
+
import type {
|
|
16
14
|
JsonSchema,
|
|
17
15
|
JsonSchemaAny,
|
|
18
16
|
JsonSchemaBoolean,
|
package/src/lazy.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { _isEmpty, _isObject } from '../is.util'
|
|
2
|
-
import { PropertyPath } from '../lodash.types'
|
|
3
|
-
import { AnyObject, ObjectMapper, ObjectPredicate, StringMap, ValueOf } from '../types'
|
|
2
|
+
import type { PropertyPath } from '../lodash.types'
|
|
3
|
+
import type { AnyObject, ObjectMapper, ObjectPredicate, StringMap, ValueOf } from '../types'
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Returns clone of `obj` with only `props` preserved.
|
package/src/object/sortObject.ts
CHANGED
package/src/promise/pFilter.ts
CHANGED
package/src/promise/pMap.ts
CHANGED
|
@@ -7,7 +7,8 @@ Improvements:
|
|
|
7
7
|
- Compatible with pProps (that had typings issues)
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import { AbortableAsyncMapper
|
|
10
|
+
import type { AbortableAsyncMapper } from '..'
|
|
11
|
+
import { END, ErrorMode, SKIP } from '..'
|
|
11
12
|
import { AggregatedError } from './AggregatedError'
|
|
12
13
|
|
|
13
14
|
export interface PMapOptions {
|
package/src/promise/pQueue.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ErrorMode } from '../error/errorMode'
|
|
2
|
-
import { CommonLogger } from '../log/commonLogger'
|
|
3
|
-
import { DeferredPromise
|
|
2
|
+
import type { CommonLogger } from '../log/commonLogger'
|
|
3
|
+
import type { DeferredPromise } from './pDefer'
|
|
4
|
+
import { pDefer } from './pDefer'
|
|
4
5
|
|
|
5
6
|
export interface PQueueCfg {
|
|
6
7
|
concurrency: number
|
package/src/promise/pRetry.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { AnyFunction, AppError, CommonLogger, ErrorData } from '..'
|
|
2
|
+
import { _since, _stringifyAny } from '..'
|
|
2
3
|
import { TimeoutError } from './pTimeout'
|
|
3
4
|
|
|
4
5
|
export interface PRetryOptions {
|
package/src/promise/pTimeout.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
|
|
|
5
5
|
export class TimeoutError extends AppError {}
|
|
6
6
|
|
package/src/seq/seq.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { _isErrorObject, _isHttpErrorObject, _isHttpErrorResponse } from '../error/error.util'
|
|
2
|
-
import { Reviver } from '../types'
|
|
2
|
+
import type { Reviver } from '../types'
|
|
3
3
|
import { _jsonParseIfPossible } from './json.util'
|
|
4
4
|
import { _safeJsonStringify } from './safeJsonStringify'
|
|
5
5
|
|
package/src/string/url.util.ts
CHANGED
package/src/types.ts
CHANGED