@twin.org/core 0.0.3-next.23 → 0.0.3-next.25
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/es/utils/asyncCache.js +92 -74
- package/dist/es/utils/asyncCache.js.map +1 -1
- package/dist/types/utils/asyncCache.d.ts +7 -0
- package/docs/changelog.md +34 -0
- package/docs/reference/classes/AlreadyExistsError.md +17 -17
- package/docs/reference/classes/AsyncCache.md +2 -2
- package/docs/reference/classes/BaseError.md +17 -17
- package/docs/reference/classes/ConflictError.md +17 -17
- package/docs/reference/classes/GeneralError.md +17 -17
- package/docs/reference/classes/GuardError.md +17 -17
- package/docs/reference/classes/Guards.md +2 -2
- package/docs/reference/classes/Is.md +2 -2
- package/docs/reference/classes/JsonHelper.md +2 -2
- package/docs/reference/classes/NotFoundError.md +17 -17
- package/docs/reference/classes/NotImplementedError.md +17 -17
- package/docs/reference/classes/NotSupportedError.md +17 -17
- package/docs/reference/classes/ObjectHelper.md +12 -12
- package/docs/reference/classes/RandomHelper.md +2 -2
- package/docs/reference/classes/UnauthorizedError.md +17 -17
- package/docs/reference/classes/UnprocessableError.md +17 -17
- package/docs/reference/classes/Urn.md +2 -2
- package/docs/reference/classes/ValidationError.md +17 -17
- package/docs/reference/interfaces/IError.md +4 -4
- package/docs/reference/interfaces/ILocaleDictionary.md +1 -1
- package/docs/reference/interfaces/IPatchOperation.md +2 -2
- package/docs/reference/interfaces/IUrlParts.md +3 -3
- package/docs/reference/interfaces/IValidationFailure.md +1 -1
- package/package.json +3 -3
|
@@ -50,7 +50,7 @@ The cause of the error if we have wrapped another error.
|
|
|
50
50
|
|
|
51
51
|
### source? {#source}
|
|
52
52
|
|
|
53
|
-
> `optional` **source
|
|
53
|
+
> `optional` **source?**: `string`
|
|
54
54
|
|
|
55
55
|
The source of the error.
|
|
56
56
|
|
|
@@ -62,7 +62,7 @@ The source of the error.
|
|
|
62
62
|
|
|
63
63
|
### properties? {#properties}
|
|
64
64
|
|
|
65
|
-
> `optional` **properties
|
|
65
|
+
> `optional` **properties?**: `object`
|
|
66
66
|
|
|
67
67
|
Any additional information for the error.
|
|
68
68
|
|
|
@@ -78,7 +78,7 @@ Any additional information for the error.
|
|
|
78
78
|
|
|
79
79
|
### cause? {#cause}
|
|
80
80
|
|
|
81
|
-
> `optional` **cause
|
|
81
|
+
> `optional` **cause?**: [`IError`](../interfaces/IError.md)
|
|
82
82
|
|
|
83
83
|
The cause of the error.
|
|
84
84
|
|
|
@@ -158,9 +158,9 @@ Expand an error tree.
|
|
|
158
158
|
|
|
159
159
|
##### errors
|
|
160
160
|
|
|
161
|
-
|
|
161
|
+
[`IError`](../interfaces/IError.md)[] \| `undefined`
|
|
162
162
|
|
|
163
|
-
|
|
163
|
+
The list of errors to expand.
|
|
164
164
|
|
|
165
165
|
#### Returns
|
|
166
166
|
|
|
@@ -190,9 +190,9 @@ The error to test.
|
|
|
190
190
|
|
|
191
191
|
##### name
|
|
192
192
|
|
|
193
|
-
|
|
193
|
+
`string` \| `RegExp`
|
|
194
194
|
|
|
195
|
-
|
|
195
|
+
The name to check for.
|
|
196
196
|
|
|
197
197
|
#### Returns
|
|
198
198
|
|
|
@@ -222,9 +222,9 @@ The error to test.
|
|
|
222
222
|
|
|
223
223
|
##### message
|
|
224
224
|
|
|
225
|
-
|
|
225
|
+
`string` \| `RegExp`
|
|
226
226
|
|
|
227
|
-
|
|
227
|
+
The message to check for.
|
|
228
228
|
|
|
229
229
|
#### Returns
|
|
230
230
|
|
|
@@ -254,9 +254,9 @@ The error to test.
|
|
|
254
254
|
|
|
255
255
|
##### code
|
|
256
256
|
|
|
257
|
-
|
|
257
|
+
`string` \| `RegExp`
|
|
258
258
|
|
|
259
|
-
|
|
259
|
+
The code to check for.
|
|
260
260
|
|
|
261
261
|
#### Returns
|
|
262
262
|
|
|
@@ -286,9 +286,9 @@ The error to test.
|
|
|
286
286
|
|
|
287
287
|
##### name
|
|
288
288
|
|
|
289
|
-
|
|
289
|
+
`string` \| `RegExp`
|
|
290
290
|
|
|
291
|
-
|
|
291
|
+
The name to check for.
|
|
292
292
|
|
|
293
293
|
#### Returns
|
|
294
294
|
|
|
@@ -318,9 +318,9 @@ The error to test.
|
|
|
318
318
|
|
|
319
319
|
##### message
|
|
320
320
|
|
|
321
|
-
|
|
321
|
+
`string` \| `RegExp`
|
|
322
322
|
|
|
323
|
-
|
|
323
|
+
The message to check for.
|
|
324
324
|
|
|
325
325
|
#### Returns
|
|
326
326
|
|
|
@@ -382,9 +382,9 @@ The error to test.
|
|
|
382
382
|
|
|
383
383
|
##### code
|
|
384
384
|
|
|
385
|
-
|
|
385
|
+
`string` \| `RegExp`
|
|
386
386
|
|
|
387
|
-
|
|
387
|
+
The code to check for.
|
|
388
388
|
|
|
389
389
|
#### Returns
|
|
390
390
|
|
|
@@ -50,7 +50,7 @@ The cause of the error if we have wrapped another error.
|
|
|
50
50
|
|
|
51
51
|
### source? {#source}
|
|
52
52
|
|
|
53
|
-
> `optional` **source
|
|
53
|
+
> `optional` **source?**: `string`
|
|
54
54
|
|
|
55
55
|
The source of the error.
|
|
56
56
|
|
|
@@ -62,7 +62,7 @@ The source of the error.
|
|
|
62
62
|
|
|
63
63
|
### properties? {#properties}
|
|
64
64
|
|
|
65
|
-
> `optional` **properties
|
|
65
|
+
> `optional` **properties?**: `object`
|
|
66
66
|
|
|
67
67
|
Any additional information for the error.
|
|
68
68
|
|
|
@@ -78,7 +78,7 @@ Any additional information for the error.
|
|
|
78
78
|
|
|
79
79
|
### cause? {#cause}
|
|
80
80
|
|
|
81
|
-
> `optional` **cause
|
|
81
|
+
> `optional` **cause?**: [`IError`](../interfaces/IError.md)
|
|
82
82
|
|
|
83
83
|
The cause of the error.
|
|
84
84
|
|
|
@@ -158,9 +158,9 @@ Expand an error tree.
|
|
|
158
158
|
|
|
159
159
|
##### errors
|
|
160
160
|
|
|
161
|
-
|
|
161
|
+
[`IError`](../interfaces/IError.md)[] \| `undefined`
|
|
162
162
|
|
|
163
|
-
|
|
163
|
+
The list of errors to expand.
|
|
164
164
|
|
|
165
165
|
#### Returns
|
|
166
166
|
|
|
@@ -190,9 +190,9 @@ The error to test.
|
|
|
190
190
|
|
|
191
191
|
##### name
|
|
192
192
|
|
|
193
|
-
|
|
193
|
+
`string` \| `RegExp`
|
|
194
194
|
|
|
195
|
-
|
|
195
|
+
The name to check for.
|
|
196
196
|
|
|
197
197
|
#### Returns
|
|
198
198
|
|
|
@@ -222,9 +222,9 @@ The error to test.
|
|
|
222
222
|
|
|
223
223
|
##### message
|
|
224
224
|
|
|
225
|
-
|
|
225
|
+
`string` \| `RegExp`
|
|
226
226
|
|
|
227
|
-
|
|
227
|
+
The message to check for.
|
|
228
228
|
|
|
229
229
|
#### Returns
|
|
230
230
|
|
|
@@ -254,9 +254,9 @@ The error to test.
|
|
|
254
254
|
|
|
255
255
|
##### code
|
|
256
256
|
|
|
257
|
-
|
|
257
|
+
`string` \| `RegExp`
|
|
258
258
|
|
|
259
|
-
|
|
259
|
+
The code to check for.
|
|
260
260
|
|
|
261
261
|
#### Returns
|
|
262
262
|
|
|
@@ -286,9 +286,9 @@ The error to test.
|
|
|
286
286
|
|
|
287
287
|
##### name
|
|
288
288
|
|
|
289
|
-
|
|
289
|
+
`string` \| `RegExp`
|
|
290
290
|
|
|
291
|
-
|
|
291
|
+
The name to check for.
|
|
292
292
|
|
|
293
293
|
#### Returns
|
|
294
294
|
|
|
@@ -318,9 +318,9 @@ The error to test.
|
|
|
318
318
|
|
|
319
319
|
##### message
|
|
320
320
|
|
|
321
|
-
|
|
321
|
+
`string` \| `RegExp`
|
|
322
322
|
|
|
323
|
-
|
|
323
|
+
The message to check for.
|
|
324
324
|
|
|
325
325
|
#### Returns
|
|
326
326
|
|
|
@@ -382,9 +382,9 @@ The error to test.
|
|
|
382
382
|
|
|
383
383
|
##### code
|
|
384
384
|
|
|
385
|
-
|
|
385
|
+
`string` \| `RegExp`
|
|
386
386
|
|
|
387
|
-
|
|
387
|
+
The code to check for.
|
|
388
388
|
|
|
389
389
|
#### Returns
|
|
390
390
|
|
|
@@ -46,7 +46,7 @@ The validation failures.
|
|
|
46
46
|
|
|
47
47
|
### source? {#source}
|
|
48
48
|
|
|
49
|
-
> `optional` **source
|
|
49
|
+
> `optional` **source?**: `string`
|
|
50
50
|
|
|
51
51
|
The source of the error.
|
|
52
52
|
|
|
@@ -58,7 +58,7 @@ The source of the error.
|
|
|
58
58
|
|
|
59
59
|
### properties? {#properties}
|
|
60
60
|
|
|
61
|
-
> `optional` **properties
|
|
61
|
+
> `optional` **properties?**: `object`
|
|
62
62
|
|
|
63
63
|
Any additional information for the error.
|
|
64
64
|
|
|
@@ -74,7 +74,7 @@ Any additional information for the error.
|
|
|
74
74
|
|
|
75
75
|
### cause? {#cause}
|
|
76
76
|
|
|
77
|
-
> `optional` **cause
|
|
77
|
+
> `optional` **cause?**: [`IError`](../interfaces/IError.md)
|
|
78
78
|
|
|
79
79
|
The cause of the error.
|
|
80
80
|
|
|
@@ -154,9 +154,9 @@ Expand an error tree.
|
|
|
154
154
|
|
|
155
155
|
##### errors
|
|
156
156
|
|
|
157
|
-
|
|
157
|
+
[`IError`](../interfaces/IError.md)[] \| `undefined`
|
|
158
158
|
|
|
159
|
-
|
|
159
|
+
The list of errors to expand.
|
|
160
160
|
|
|
161
161
|
#### Returns
|
|
162
162
|
|
|
@@ -186,9 +186,9 @@ The error to test.
|
|
|
186
186
|
|
|
187
187
|
##### name
|
|
188
188
|
|
|
189
|
-
|
|
189
|
+
`string` \| `RegExp`
|
|
190
190
|
|
|
191
|
-
|
|
191
|
+
The name to check for.
|
|
192
192
|
|
|
193
193
|
#### Returns
|
|
194
194
|
|
|
@@ -218,9 +218,9 @@ The error to test.
|
|
|
218
218
|
|
|
219
219
|
##### message
|
|
220
220
|
|
|
221
|
-
|
|
221
|
+
`string` \| `RegExp`
|
|
222
222
|
|
|
223
|
-
|
|
223
|
+
The message to check for.
|
|
224
224
|
|
|
225
225
|
#### Returns
|
|
226
226
|
|
|
@@ -250,9 +250,9 @@ The error to test.
|
|
|
250
250
|
|
|
251
251
|
##### code
|
|
252
252
|
|
|
253
|
-
|
|
253
|
+
`string` \| `RegExp`
|
|
254
254
|
|
|
255
|
-
|
|
255
|
+
The code to check for.
|
|
256
256
|
|
|
257
257
|
#### Returns
|
|
258
258
|
|
|
@@ -282,9 +282,9 @@ The error to test.
|
|
|
282
282
|
|
|
283
283
|
##### name
|
|
284
284
|
|
|
285
|
-
|
|
285
|
+
`string` \| `RegExp`
|
|
286
286
|
|
|
287
|
-
|
|
287
|
+
The name to check for.
|
|
288
288
|
|
|
289
289
|
#### Returns
|
|
290
290
|
|
|
@@ -314,9 +314,9 @@ The error to test.
|
|
|
314
314
|
|
|
315
315
|
##### message
|
|
316
316
|
|
|
317
|
-
|
|
317
|
+
`string` \| `RegExp`
|
|
318
318
|
|
|
319
|
-
|
|
319
|
+
The message to check for.
|
|
320
320
|
|
|
321
321
|
#### Returns
|
|
322
322
|
|
|
@@ -378,9 +378,9 @@ The error to test.
|
|
|
378
378
|
|
|
379
379
|
##### code
|
|
380
380
|
|
|
381
|
-
|
|
381
|
+
`string` \| `RegExp`
|
|
382
382
|
|
|
383
|
-
|
|
383
|
+
The code to check for.
|
|
384
384
|
|
|
385
385
|
#### Returns
|
|
386
386
|
|
|
@@ -22,7 +22,7 @@ The message for the error.
|
|
|
22
22
|
|
|
23
23
|
### source? {#source}
|
|
24
24
|
|
|
25
|
-
> `optional` **source
|
|
25
|
+
> `optional` **source?**: `string`
|
|
26
26
|
|
|
27
27
|
The source of the error.
|
|
28
28
|
|
|
@@ -30,7 +30,7 @@ The source of the error.
|
|
|
30
30
|
|
|
31
31
|
### properties? {#properties}
|
|
32
32
|
|
|
33
|
-
> `optional` **properties
|
|
33
|
+
> `optional` **properties?**: `object`
|
|
34
34
|
|
|
35
35
|
Any additional information for the error.
|
|
36
36
|
|
|
@@ -42,7 +42,7 @@ Any additional information for the error.
|
|
|
42
42
|
|
|
43
43
|
### stack? {#stack}
|
|
44
44
|
|
|
45
|
-
> `optional` **stack
|
|
45
|
+
> `optional` **stack?**: `string`
|
|
46
46
|
|
|
47
47
|
The stack trace for the error.
|
|
48
48
|
|
|
@@ -50,6 +50,6 @@ The stack trace for the error.
|
|
|
50
50
|
|
|
51
51
|
### cause? {#cause}
|
|
52
52
|
|
|
53
|
-
> `optional` **cause
|
|
53
|
+
> `optional` **cause?**: `IError`
|
|
54
54
|
|
|
55
55
|
The cause of the error if there was one.
|
|
@@ -22,7 +22,7 @@ The path to the object that was changed.
|
|
|
22
22
|
|
|
23
23
|
### from? {#from}
|
|
24
24
|
|
|
25
|
-
> `optional` **from
|
|
25
|
+
> `optional` **from?**: `string`
|
|
26
26
|
|
|
27
27
|
The path the value was copied or moved from.
|
|
28
28
|
|
|
@@ -30,6 +30,6 @@ The path the value was copied or moved from.
|
|
|
30
30
|
|
|
31
31
|
### value? {#value}
|
|
32
32
|
|
|
33
|
-
> `optional` **value
|
|
33
|
+
> `optional` **value?**: `unknown`
|
|
34
34
|
|
|
35
35
|
The value to add.
|
|
@@ -22,7 +22,7 @@ The host for the url.
|
|
|
22
22
|
|
|
23
23
|
### port? {#port}
|
|
24
24
|
|
|
25
|
-
> `optional` **port
|
|
25
|
+
> `optional` **port?**: `number`
|
|
26
26
|
|
|
27
27
|
The port for the url.
|
|
28
28
|
|
|
@@ -38,7 +38,7 @@ The path for the url.
|
|
|
38
38
|
|
|
39
39
|
### params? {#params}
|
|
40
40
|
|
|
41
|
-
> `optional` **params
|
|
41
|
+
> `optional` **params?**: `string`
|
|
42
42
|
|
|
43
43
|
The params for the url.
|
|
44
44
|
|
|
@@ -46,6 +46,6 @@ The params for the url.
|
|
|
46
46
|
|
|
47
47
|
### hash? {#hash}
|
|
48
48
|
|
|
49
|
-
> `optional` **hash
|
|
49
|
+
> `optional` **hash?**: `string`
|
|
50
50
|
|
|
51
51
|
The hash for the url.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/core",
|
|
3
|
-
"version": "0.0.3-next.
|
|
3
|
+
"version": "0.0.3-next.25",
|
|
4
4
|
"description": "Helper methods/classes for data type checking/validation/guarding/error handling",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
"node": ">=20.0.0"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@twin.org/nameof": "0.0.3-next.
|
|
18
|
-
"intl-messageformat": "11.1.
|
|
17
|
+
"@twin.org/nameof": "0.0.3-next.25",
|
|
18
|
+
"intl-messageformat": "11.1.3",
|
|
19
19
|
"rfc6902": "5.2.0"
|
|
20
20
|
},
|
|
21
21
|
"main": "./dist/es/index.js",
|