@twin.org/core 0.0.2-next.9 → 0.0.2
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/README.md +1 -9
- package/dist/es/encoding/base32.js +75 -0
- package/dist/es/encoding/base32.js.map +1 -0
- package/dist/es/encoding/base58.js +124 -0
- package/dist/es/encoding/base58.js.map +1 -0
- package/dist/es/encoding/base64.js +231 -0
- package/dist/es/encoding/base64.js.map +1 -0
- package/dist/es/encoding/base64Url.js +42 -0
- package/dist/es/encoding/base64Url.js.map +1 -0
- package/dist/es/errors/alreadyExistsError.js +22 -0
- package/dist/es/errors/alreadyExistsError.js.map +1 -0
- package/dist/es/errors/baseError.js +257 -0
- package/dist/es/errors/baseError.js.map +1 -0
- package/dist/es/errors/conflictError.js +23 -0
- package/dist/es/errors/conflictError.js.map +1 -0
- package/dist/es/errors/generalError.js +21 -0
- package/dist/es/errors/generalError.js.map +1 -0
- package/dist/es/errors/guardError.js +27 -0
- package/dist/es/errors/guardError.js.map +1 -0
- package/dist/es/errors/notFoundError.js +22 -0
- package/dist/es/errors/notFoundError.js.map +1 -0
- package/dist/es/errors/notImplementedError.js +24 -0
- package/dist/es/errors/notImplementedError.js.map +1 -0
- package/dist/es/errors/notSupportedError.js +21 -0
- package/dist/es/errors/notSupportedError.js.map +1 -0
- package/dist/es/errors/unauthorizedError.js +21 -0
- package/dist/es/errors/unauthorizedError.js.map +1 -0
- package/dist/es/errors/unprocessableError.js +21 -0
- package/dist/es/errors/unprocessableError.js.map +1 -0
- package/dist/es/errors/validationError.js +23 -0
- package/dist/es/errors/validationError.js.map +1 -0
- package/dist/es/factories/componentFactory.js +9 -0
- package/dist/es/factories/componentFactory.js.map +1 -0
- package/dist/es/factories/factory.js +297 -0
- package/dist/es/factories/factory.js.map +1 -0
- package/dist/es/helpers/arrayHelper.js +46 -0
- package/dist/es/helpers/arrayHelper.js.map +1 -0
- package/dist/es/helpers/envHelper.js +39 -0
- package/dist/es/helpers/envHelper.js.map +1 -0
- package/dist/es/helpers/errorHelper.js +100 -0
- package/dist/es/helpers/errorHelper.js.map +1 -0
- package/dist/es/helpers/filenameHelper.js +32 -0
- package/dist/es/helpers/filenameHelper.js.map +1 -0
- package/dist/es/helpers/hexHelper.js +45 -0
- package/dist/es/helpers/hexHelper.js.map +1 -0
- package/dist/es/helpers/jsonHelper.js +163 -0
- package/dist/es/helpers/jsonHelper.js.map +1 -0
- package/dist/es/helpers/numberHelper.js +30 -0
- package/dist/es/helpers/numberHelper.js.map +1 -0
- package/dist/es/helpers/objectHelper.js +309 -0
- package/dist/es/helpers/objectHelper.js.map +1 -0
- package/dist/es/helpers/randomHelper.js +66 -0
- package/dist/es/helpers/randomHelper.js.map +1 -0
- package/dist/es/helpers/stringHelper.js +252 -0
- package/dist/es/helpers/stringHelper.js.map +1 -0
- package/dist/es/helpers/uint8ArrayHelper.js +26 -0
- package/dist/es/helpers/uint8ArrayHelper.js.map +1 -0
- package/dist/es/index.js +60 -0
- package/dist/es/index.js.map +1 -0
- package/dist/es/models/IComponent.js +2 -0
- package/dist/es/models/IComponent.js.map +1 -0
- package/dist/es/models/IError.js +4 -0
- package/dist/es/models/IError.js.map +1 -0
- package/dist/es/models/IHealth.js +2 -0
- package/dist/es/models/IHealth.js.map +1 -0
- package/dist/es/models/II18nShared.js +2 -0
- package/dist/es/models/II18nShared.js.map +1 -0
- package/dist/es/models/IKeyValue.js +2 -0
- package/dist/es/models/IKeyValue.js.map +1 -0
- package/dist/es/models/ILabelledValue.js +2 -0
- package/dist/es/models/ILabelledValue.js.map +1 -0
- package/dist/es/models/ILocale.js +2 -0
- package/dist/es/models/ILocale.js.map +1 -0
- package/dist/es/models/ILocaleDictionary.js +4 -0
- package/dist/es/models/ILocaleDictionary.js.map +1 -0
- package/dist/es/models/ILocalesIndex.js +2 -0
- package/dist/es/models/ILocalesIndex.js.map +1 -0
- package/dist/es/models/IPatchOperation.js +4 -0
- package/dist/es/models/IPatchOperation.js.map +1 -0
- package/dist/es/models/IUrlParts.js +4 -0
- package/dist/es/models/IUrlParts.js.map +1 -0
- package/dist/es/models/IValidationFailure.js +2 -0
- package/dist/es/models/IValidationFailure.js.map +1 -0
- package/dist/es/models/coerceType.js +49 -0
- package/dist/es/models/coerceType.js.map +1 -0
- package/dist/es/models/compressionType.js +17 -0
- package/dist/es/models/compressionType.js.map +1 -0
- package/dist/es/models/healthStatus.js +21 -0
- package/dist/es/models/healthStatus.js.map +1 -0
- package/dist/es/types/bitString.js +98 -0
- package/dist/es/types/bitString.js.map +1 -0
- package/dist/es/types/objectOrArray.js +2 -0
- package/dist/es/types/objectOrArray.js.map +1 -0
- package/dist/es/types/singleOccurrenceArray.js +2 -0
- package/dist/es/types/singleOccurrenceArray.js.map +1 -0
- package/dist/es/types/url.js +144 -0
- package/dist/es/types/url.js.map +1 -0
- package/dist/es/types/urn.js +211 -0
- package/dist/es/types/urn.js.map +1 -0
- package/dist/es/utils/asyncCache.js +206 -0
- package/dist/es/utils/asyncCache.js.map +1 -0
- package/dist/es/utils/coerce.js +269 -0
- package/dist/es/utils/coerce.js.map +1 -0
- package/dist/es/utils/compression.js +49 -0
- package/dist/es/utils/compression.js.map +1 -0
- package/dist/es/utils/converter.js +256 -0
- package/dist/es/utils/converter.js.map +1 -0
- package/dist/es/utils/guards.js +385 -0
- package/dist/es/utils/guards.js.map +1 -0
- package/dist/es/utils/i18n.js +243 -0
- package/dist/es/utils/i18n.js.map +1 -0
- package/dist/es/utils/is.js +367 -0
- package/dist/es/utils/is.js.map +1 -0
- package/dist/es/utils/sharedStore.js +48 -0
- package/dist/es/utils/sharedStore.js.map +1 -0
- package/dist/es/utils/validation.js +774 -0
- package/dist/es/utils/validation.js.map +1 -0
- package/dist/types/encoding/base32.d.ts +5 -1
- package/dist/types/encoding/base58.d.ts +4 -0
- package/dist/types/encoding/base64.d.ts +4 -0
- package/dist/types/encoding/base64Url.d.ts +4 -0
- package/dist/types/errors/alreadyExistsError.d.ts +6 -3
- package/dist/types/errors/baseError.d.ts +2 -2
- package/dist/types/errors/conflictError.d.ts +6 -3
- package/dist/types/errors/generalError.d.ts +2 -2
- package/dist/types/errors/guardError.d.ts +2 -2
- package/dist/types/errors/notFoundError.d.ts +6 -3
- package/dist/types/errors/notImplementedError.d.ts +6 -2
- package/dist/types/errors/notSupportedError.d.ts +6 -3
- package/dist/types/errors/unauthorizedError.d.ts +7 -4
- package/dist/types/errors/unprocessableError.d.ts +2 -2
- package/dist/types/errors/validationError.d.ts +2 -2
- package/dist/types/factories/componentFactory.d.ts +2 -2
- package/dist/types/factories/factory.d.ts +27 -1
- package/dist/types/helpers/arrayHelper.d.ts +1 -8
- package/dist/types/helpers/errorHelper.d.ts +1 -1
- package/dist/types/helpers/jsonHelper.d.ts +5 -1
- package/dist/types/helpers/numberHelper.d.ts +17 -0
- package/dist/types/helpers/objectHelper.d.ts +24 -6
- package/dist/types/helpers/randomHelper.d.ts +16 -0
- package/dist/types/helpers/stringHelper.d.ts +12 -6
- package/dist/types/index.d.ts +57 -53
- package/dist/types/models/IComponent.d.ts +18 -7
- package/dist/types/models/IError.d.ts +1 -1
- package/dist/types/models/IHealth.d.ts +32 -0
- package/dist/types/models/ILocalesIndex.d.ts +1 -1
- package/dist/types/models/IValidationFailure.d.ts +0 -4
- package/dist/types/models/healthStatus.d.ts +21 -0
- package/dist/types/types/bitString.d.ts +4 -0
- package/dist/types/types/singleOccurrenceArray.d.ts +9 -0
- package/dist/types/types/url.d.ts +8 -3
- package/dist/types/types/urn.d.ts +7 -2
- package/dist/types/utils/asyncCache.d.ts +7 -0
- package/dist/types/utils/coerce.d.ts +1 -1
- package/dist/types/utils/compression.d.ts +5 -1
- package/dist/types/utils/guards.d.ts +11 -3
- package/dist/types/utils/i18n.d.ts +16 -1
- package/dist/types/utils/is.d.ts +8 -1
- package/dist/types/utils/validation.d.ts +1 -1
- package/docs/changelog.md +1224 -131
- package/docs/examples.md +308 -1
- package/docs/reference/classes/AlreadyExistsError.md +43 -39
- package/docs/reference/classes/ArrayHelper.md +10 -44
- package/docs/reference/classes/AsyncCache.md +12 -12
- package/docs/reference/classes/Base32.md +11 -3
- package/docs/reference/classes/Base58.md +10 -2
- package/docs/reference/classes/Base64.md +11 -3
- package/docs/reference/classes/Base64Url.md +10 -2
- package/docs/reference/classes/BaseError.md +37 -37
- package/docs/reference/classes/BitString.md +13 -5
- package/docs/reference/classes/Coerce.md +31 -31
- package/docs/reference/classes/Compression.md +10 -2
- package/docs/reference/classes/ConflictError.md +43 -39
- package/docs/reference/classes/Converter.md +18 -18
- package/docs/reference/classes/EnvHelper.md +1 -1
- package/docs/reference/classes/ErrorHelper.md +5 -5
- package/docs/reference/classes/Factory.md +122 -20
- package/docs/reference/classes/FilenameHelper.md +1 -1
- package/docs/reference/classes/GeneralError.md +38 -38
- package/docs/reference/classes/GuardError.md +38 -38
- package/docs/reference/classes/Guards.md +80 -34
- package/docs/reference/classes/HexHelper.md +6 -6
- package/docs/reference/classes/I18n.md +66 -14
- package/docs/reference/classes/Is.md +77 -43
- package/docs/reference/classes/JsonHelper.md +17 -9
- package/docs/reference/classes/NotFoundError.md +43 -39
- package/docs/reference/classes/NotImplementedError.md +48 -38
- package/docs/reference/classes/NotSupportedError.md +43 -39
- package/docs/reference/classes/NumberHelper.md +55 -0
- package/docs/reference/classes/ObjectHelper.md +163 -51
- package/docs/reference/classes/RandomHelper.md +53 -1
- package/docs/reference/classes/SharedStore.md +5 -5
- package/docs/reference/classes/StringHelper.md +52 -30
- package/docs/reference/classes/Uint8ArrayHelper.md +1 -1
- package/docs/reference/classes/UnauthorizedError.md +44 -40
- package/docs/reference/classes/UnprocessableError.md +38 -38
- package/docs/reference/classes/Url.md +24 -10
- package/docs/reference/classes/Urn.md +42 -28
- package/docs/reference/classes/Validation.md +27 -27
- package/docs/reference/classes/ValidationError.md +37 -37
- package/docs/reference/index.md +6 -0
- package/docs/reference/interfaces/IComponent.md +57 -27
- package/docs/reference/interfaces/IError.md +11 -11
- package/docs/reference/interfaces/IHealth.md +55 -0
- package/docs/reference/interfaces/II18nShared.md +4 -4
- package/docs/reference/interfaces/IKeyValue.md +2 -2
- package/docs/reference/interfaces/ILabelledValue.md +2 -2
- package/docs/reference/interfaces/ILocale.md +2 -2
- package/docs/reference/interfaces/ILocaleDictionary.md +1 -1
- package/docs/reference/interfaces/ILocalesIndex.md +1 -1
- package/docs/reference/interfaces/IPatchOperation.md +6 -6
- package/docs/reference/interfaces/IUrlParts.md +9 -9
- package/docs/reference/interfaces/IValidationFailure.md +4 -12
- package/docs/reference/type-aliases/HealthStatus.md +5 -0
- package/docs/reference/type-aliases/SingleOccurrenceArray.md +15 -0
- package/docs/reference/type-aliases/SingleOccurrenceArrayDepthHelper.md +19 -0
- package/docs/reference/variables/CoerceType.md +10 -10
- package/docs/reference/variables/CompressionType.md +2 -2
- package/docs/reference/variables/HealthStatus.md +25 -0
- package/locales/.validate-ignore +1 -0
- package/locales/en.json +9 -7
- package/package.json +24 -12
- package/dist/cjs/index.cjs +0 -5175
- package/dist/esm/index.mjs +0 -5133
- /package/dist/types/{models → types}/objectOrArray.d.ts +0 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Interface: IHealth
|
|
2
|
+
|
|
3
|
+
Provides health information for a component.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### source {#source}
|
|
8
|
+
|
|
9
|
+
> **source**: `string`
|
|
10
|
+
|
|
11
|
+
The source of the health information.
|
|
12
|
+
|
|
13
|
+
***
|
|
14
|
+
|
|
15
|
+
### description? {#description}
|
|
16
|
+
|
|
17
|
+
> `optional` **description?**: `string`
|
|
18
|
+
|
|
19
|
+
The description of the component as an i18n key.
|
|
20
|
+
|
|
21
|
+
***
|
|
22
|
+
|
|
23
|
+
### status {#status}
|
|
24
|
+
|
|
25
|
+
> **status**: [`HealthStatus`](../type-aliases/HealthStatus.md)
|
|
26
|
+
|
|
27
|
+
The overall status of the component, the entries can also report their own health.
|
|
28
|
+
|
|
29
|
+
***
|
|
30
|
+
|
|
31
|
+
### message? {#message}
|
|
32
|
+
|
|
33
|
+
> `optional` **message?**: `string`
|
|
34
|
+
|
|
35
|
+
The message for the status if there are further details to provide as an i18n key.
|
|
36
|
+
|
|
37
|
+
***
|
|
38
|
+
|
|
39
|
+
### data? {#data}
|
|
40
|
+
|
|
41
|
+
> `optional` **data?**: `object`
|
|
42
|
+
|
|
43
|
+
Data to substitute in the i18n key for the message.
|
|
44
|
+
|
|
45
|
+
#### Index Signature
|
|
46
|
+
|
|
47
|
+
\[`id`: `string`\]: `unknown`
|
|
48
|
+
|
|
49
|
+
***
|
|
50
|
+
|
|
51
|
+
### grouped? {#grouped}
|
|
52
|
+
|
|
53
|
+
> `optional` **grouped?**: `IHealth`[]
|
|
54
|
+
|
|
55
|
+
The grouped child components, if any.
|
|
@@ -4,7 +4,7 @@ The shared state for the I18n global.
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
|
-
### localeDictionaries
|
|
7
|
+
### localeDictionaries {#localedictionaries}
|
|
8
8
|
|
|
9
9
|
> **localeDictionaries**: `object`
|
|
10
10
|
|
|
@@ -16,7 +16,7 @@ Dictionaries for lookups.
|
|
|
16
16
|
|
|
17
17
|
***
|
|
18
18
|
|
|
19
|
-
### currentLocale
|
|
19
|
+
### currentLocale {#currentlocale}
|
|
20
20
|
|
|
21
21
|
> **currentLocale**: `string`
|
|
22
22
|
|
|
@@ -24,7 +24,7 @@ The current locale.
|
|
|
24
24
|
|
|
25
25
|
***
|
|
26
26
|
|
|
27
|
-
### localeChangedHandlers
|
|
27
|
+
### localeChangedHandlers {#localechangedhandlers}
|
|
28
28
|
|
|
29
29
|
> **localeChangedHandlers**: `object`
|
|
30
30
|
|
|
@@ -36,7 +36,7 @@ Change handler for the locale being updated.
|
|
|
36
36
|
|
|
37
37
|
***
|
|
38
38
|
|
|
39
|
-
### dictionaryChangedHandlers
|
|
39
|
+
### dictionaryChangedHandlers {#dictionarychangedhandlers}
|
|
40
40
|
|
|
41
41
|
> **dictionaryChangedHandlers**: `object`
|
|
42
42
|
|
|
@@ -10,7 +10,7 @@ Interface describing a label/value pair.
|
|
|
10
10
|
|
|
11
11
|
## Properties
|
|
12
12
|
|
|
13
|
-
### label
|
|
13
|
+
### label {#label}
|
|
14
14
|
|
|
15
15
|
> **label**: `string`
|
|
16
16
|
|
|
@@ -18,7 +18,7 @@ The label for the item.
|
|
|
18
18
|
|
|
19
19
|
***
|
|
20
20
|
|
|
21
|
-
### value
|
|
21
|
+
### value {#value}
|
|
22
22
|
|
|
23
23
|
> **value**: `T`
|
|
24
24
|
|
|
@@ -4,7 +4,7 @@ Interface describing a patch operation to add a property.
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
|
-
### op
|
|
7
|
+
### op {#op}
|
|
8
8
|
|
|
9
9
|
> **op**: `"add"` \| `"remove"` \| `"replace"` \| `"move"` \| `"copy"` \| `"test"`
|
|
10
10
|
|
|
@@ -12,7 +12,7 @@ The operation that was performed on the item.
|
|
|
12
12
|
|
|
13
13
|
***
|
|
14
14
|
|
|
15
|
-
### path
|
|
15
|
+
### path {#path}
|
|
16
16
|
|
|
17
17
|
> **path**: `string`
|
|
18
18
|
|
|
@@ -20,16 +20,16 @@ The path to the object that was changed.
|
|
|
20
20
|
|
|
21
21
|
***
|
|
22
22
|
|
|
23
|
-
### from?
|
|
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
|
|
|
29
29
|
***
|
|
30
30
|
|
|
31
|
-
### value?
|
|
31
|
+
### value? {#value}
|
|
32
32
|
|
|
33
|
-
> `optional` **value
|
|
33
|
+
> `optional` **value?**: `unknown`
|
|
34
34
|
|
|
35
35
|
The value to add.
|
|
@@ -4,7 +4,7 @@ Model to describe the parts of a url.
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
|
-
### schema
|
|
7
|
+
### schema {#schema}
|
|
8
8
|
|
|
9
9
|
> **schema**: `string`
|
|
10
10
|
|
|
@@ -12,7 +12,7 @@ The schema for the url.
|
|
|
12
12
|
|
|
13
13
|
***
|
|
14
14
|
|
|
15
|
-
### host
|
|
15
|
+
### host {#host}
|
|
16
16
|
|
|
17
17
|
> **host**: `string`
|
|
18
18
|
|
|
@@ -20,15 +20,15 @@ The host for the url.
|
|
|
20
20
|
|
|
21
21
|
***
|
|
22
22
|
|
|
23
|
-
### port?
|
|
23
|
+
### port? {#port}
|
|
24
24
|
|
|
25
|
-
> `optional` **port
|
|
25
|
+
> `optional` **port?**: `number`
|
|
26
26
|
|
|
27
27
|
The port for the url.
|
|
28
28
|
|
|
29
29
|
***
|
|
30
30
|
|
|
31
|
-
### path
|
|
31
|
+
### path {#path}
|
|
32
32
|
|
|
33
33
|
> **path**: `string`
|
|
34
34
|
|
|
@@ -36,16 +36,16 @@ The path for the url.
|
|
|
36
36
|
|
|
37
37
|
***
|
|
38
38
|
|
|
39
|
-
### params?
|
|
39
|
+
### params? {#params}
|
|
40
40
|
|
|
41
|
-
> `optional` **params
|
|
41
|
+
> `optional` **params?**: `string`
|
|
42
42
|
|
|
43
43
|
The params for the url.
|
|
44
44
|
|
|
45
45
|
***
|
|
46
46
|
|
|
47
|
-
### hash?
|
|
47
|
+
### hash? {#hash}
|
|
48
48
|
|
|
49
|
-
> `optional` **hash
|
|
49
|
+
> `optional` **hash?**: `string`
|
|
50
50
|
|
|
51
51
|
The hash for the url.
|
|
@@ -4,7 +4,7 @@ Interface describing the reason a validation failed.
|
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
|
-
### property
|
|
7
|
+
### property {#property}
|
|
8
8
|
|
|
9
9
|
> **property**: `string`
|
|
10
10
|
|
|
@@ -12,7 +12,7 @@ The property that failed validation.
|
|
|
12
12
|
|
|
13
13
|
***
|
|
14
14
|
|
|
15
|
-
### reason
|
|
15
|
+
### reason {#reason}
|
|
16
16
|
|
|
17
17
|
> **reason**: `string`
|
|
18
18
|
|
|
@@ -20,17 +20,9 @@ The reason the validation failed as an i18 resource error.
|
|
|
20
20
|
|
|
21
21
|
***
|
|
22
22
|
|
|
23
|
-
###
|
|
23
|
+
### properties? {#properties}
|
|
24
24
|
|
|
25
|
-
> `optional` **
|
|
26
|
-
|
|
27
|
-
The optional human readable name for the field as an i18 resource.
|
|
28
|
-
|
|
29
|
-
***
|
|
30
|
-
|
|
31
|
-
### properties?
|
|
32
|
-
|
|
33
|
-
> `optional` **properties**: `object`
|
|
25
|
+
> `optional` **properties?**: `object`
|
|
34
26
|
|
|
35
27
|
Additional properties for the validation failure.
|
|
36
28
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Type Alias: SingleOccurrenceArray\<T, U\>
|
|
2
|
+
|
|
3
|
+
> **SingleOccurrenceArray**\<`T`, `U`\> = [`SingleOccurrenceArrayDepthHelper`](SingleOccurrenceArrayDepthHelper.md)\<`T`, `U`, \[\]\>
|
|
4
|
+
|
|
5
|
+
Utility type to create a non-empty array with values of type T and exactly one value of type U.
|
|
6
|
+
|
|
7
|
+
## Type Parameters
|
|
8
|
+
|
|
9
|
+
### T
|
|
10
|
+
|
|
11
|
+
`T` = `unknown`
|
|
12
|
+
|
|
13
|
+
### U
|
|
14
|
+
|
|
15
|
+
`U` = `never`
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Type Alias: SingleOccurrenceArrayDepthHelper\<T, U, Depth\>
|
|
2
|
+
|
|
3
|
+
> **SingleOccurrenceArrayDepthHelper**\<`T`, `U`, `Depth`\> = `Depth`\[`"length"`\] *extends* `16` ? \[`U`, `...T[]`\] : \[`U`, `...T[]`\] \| \[`T`, `...SingleOccurrenceArrayDepthHelper<T, U, [0, ...Depth]>`\]
|
|
4
|
+
|
|
5
|
+
Helper with bounded recursion depth to keep type instantiation tractable.
|
|
6
|
+
|
|
7
|
+
## Type Parameters
|
|
8
|
+
|
|
9
|
+
### T
|
|
10
|
+
|
|
11
|
+
`T`
|
|
12
|
+
|
|
13
|
+
### U
|
|
14
|
+
|
|
15
|
+
`U`
|
|
16
|
+
|
|
17
|
+
### Depth
|
|
18
|
+
|
|
19
|
+
`Depth` *extends* `0`[]
|
|
@@ -6,61 +6,61 @@ The types the extracted data can be coerced to.
|
|
|
6
6
|
|
|
7
7
|
## Type Declaration
|
|
8
8
|
|
|
9
|
-
### String
|
|
9
|
+
### String {#string}
|
|
10
10
|
|
|
11
11
|
> `readonly` **String**: `"string"` = `"string"`
|
|
12
12
|
|
|
13
13
|
String.
|
|
14
14
|
|
|
15
|
-
### Number
|
|
15
|
+
### Number {#number}
|
|
16
16
|
|
|
17
17
|
> `readonly` **Number**: `"number"` = `"number"`
|
|
18
18
|
|
|
19
19
|
Number.
|
|
20
20
|
|
|
21
|
-
### Integer
|
|
21
|
+
### Integer {#integer}
|
|
22
22
|
|
|
23
23
|
> `readonly` **Integer**: `"integer"` = `"integer"`
|
|
24
24
|
|
|
25
25
|
Integer.
|
|
26
26
|
|
|
27
|
-
### Boolean
|
|
27
|
+
### Boolean {#boolean}
|
|
28
28
|
|
|
29
29
|
> `readonly` **Boolean**: `"boolean"` = `"boolean"`
|
|
30
30
|
|
|
31
31
|
Boolean.
|
|
32
32
|
|
|
33
|
-
### BigInt
|
|
33
|
+
### BigInt {#bigint}
|
|
34
34
|
|
|
35
35
|
> `readonly` **BigInt**: `"bigint"` = `"bigint"`
|
|
36
36
|
|
|
37
37
|
Big Integer.
|
|
38
38
|
|
|
39
|
-
### Date
|
|
39
|
+
### Date {#date}
|
|
40
40
|
|
|
41
41
|
> `readonly` **Date**: `"date"` = `"date"`
|
|
42
42
|
|
|
43
43
|
Date.
|
|
44
44
|
|
|
45
|
-
### DateTime
|
|
45
|
+
### DateTime {#datetime}
|
|
46
46
|
|
|
47
47
|
> `readonly` **DateTime**: `"datetime"` = `"datetime"`
|
|
48
48
|
|
|
49
49
|
Date Time.
|
|
50
50
|
|
|
51
|
-
### Time
|
|
51
|
+
### Time {#time}
|
|
52
52
|
|
|
53
53
|
> `readonly` **Time**: `"time"` = `"time"`
|
|
54
54
|
|
|
55
55
|
Time.
|
|
56
56
|
|
|
57
|
-
### Object
|
|
57
|
+
### Object {#object}
|
|
58
58
|
|
|
59
59
|
> `readonly` **Object**: `"object"` = `"object"`
|
|
60
60
|
|
|
61
61
|
Object.
|
|
62
62
|
|
|
63
|
-
### Uint8Array
|
|
63
|
+
### Uint8Array {#uint8array}
|
|
64
64
|
|
|
65
65
|
> `readonly` **Uint8Array**: `"uint8array"` = `"uint8array"`
|
|
66
66
|
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Variable: HealthStatus
|
|
2
|
+
|
|
3
|
+
> `const` **HealthStatus**: `object`
|
|
4
|
+
|
|
5
|
+
The health status of the component.
|
|
6
|
+
|
|
7
|
+
## Type Declaration
|
|
8
|
+
|
|
9
|
+
### Ok {#ok}
|
|
10
|
+
|
|
11
|
+
> `readonly` **Ok**: `"ok"` = `"ok"`
|
|
12
|
+
|
|
13
|
+
OK.
|
|
14
|
+
|
|
15
|
+
### Warning {#warning}
|
|
16
|
+
|
|
17
|
+
> `readonly` **Warning**: `"warning"` = `"warning"`
|
|
18
|
+
|
|
19
|
+
Warning.
|
|
20
|
+
|
|
21
|
+
### Error {#error}
|
|
22
|
+
|
|
23
|
+
> `readonly` **Error**: `"error"` = `"error"`
|
|
24
|
+
|
|
25
|
+
Error.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
^errorNames.*$
|
package/locales/en.json
CHANGED
|
@@ -38,9 +38,7 @@
|
|
|
38
38
|
"beUrn": "{fieldName} must be a correctly formatted urn",
|
|
39
39
|
"beUrl": "{fieldName} must be a correctly formatted url",
|
|
40
40
|
"beJSON": "{fieldName} must be correctly formatted JSON",
|
|
41
|
-
"beEmail": "{fieldName} must be a correctly formatted e-mail address"
|
|
42
|
-
"failed": "Validation failed",
|
|
43
|
-
"failedObject": "Validation of \"{objectName}\" failed"
|
|
41
|
+
"beEmail": "{fieldName} must be a correctly formatted e-mail address"
|
|
44
42
|
},
|
|
45
43
|
"guard": {
|
|
46
44
|
"undefined": "Property \"{property}\" must be defined, it is \"{value}\"",
|
|
@@ -71,7 +69,9 @@
|
|
|
71
69
|
"function": "Property \"{property}\" must be a function, it is \"{value}\"",
|
|
72
70
|
"urn": "Property \"{property}\" must be a Urn formatted string, it is \"{value}\"",
|
|
73
71
|
"url": "Property \"{property}\" must be a Url formatted string, it is \"{value}\"",
|
|
74
|
-
"email": "Property \"{property}\" must be string in e-mail format, it is \"{value}\""
|
|
72
|
+
"email": "Property \"{property}\" must be string in e-mail format, it is \"{value}\"",
|
|
73
|
+
"uuidV7": "Property \"{property}\" must be a UUIDv7 formatted string, it is \"{value}\"",
|
|
74
|
+
"uuidV7Compact": "Property \"{property}\" must be a UUIDv7 formatted string in compact mode, it is \"{value}\""
|
|
75
75
|
},
|
|
76
76
|
"objectHelper": {
|
|
77
77
|
"failedBytesToJSON": "Failed converting bytes to JSON",
|
|
@@ -84,10 +84,11 @@
|
|
|
84
84
|
},
|
|
85
85
|
"factory": {
|
|
86
86
|
"noUnregister": "There is no {typeName} registered with the name \"{name}\"",
|
|
87
|
-
"noGet": "The requested {typeName} \"{name}\" does not exist in the factory"
|
|
87
|
+
"noGet": "The requested {typeName} \"{name}\" does not exist in the factory",
|
|
88
|
+
"noCreate": "The requested {typeName} \"{name}\" cannot be created by the factory, with params \"{params}\""
|
|
88
89
|
},
|
|
89
90
|
"bitString": {
|
|
90
|
-
"outOfRange": "The index should be >= 0 and less than the length of the bit string"
|
|
91
|
+
"outOfRange": "The index should be >= 0 and less than the length of the bit string, the index is \"{index}\" and the number of bit is \"{numberBits}\""
|
|
91
92
|
},
|
|
92
93
|
"base32": {
|
|
93
94
|
"invalidCharacter": "Data contains a character \"{invalidCharacter}\" which is not in the charset"
|
|
@@ -112,7 +113,8 @@
|
|
|
112
113
|
"alreadyExistsError": "Already Exists",
|
|
113
114
|
"notImplementedError": "Not Implemented",
|
|
114
115
|
"validationError": "Validation",
|
|
115
|
-
"unprocessableError": "Unprocessable"
|
|
116
|
+
"unprocessableError": "Unprocessable",
|
|
117
|
+
"unauthorizedError": "Unauthorized"
|
|
116
118
|
},
|
|
117
119
|
"validation": {
|
|
118
120
|
"defaultFieldName": "The field"
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/core",
|
|
3
|
-
"version": "0.0.2
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"description": "Helper methods/classes for data type checking/validation/guarding/error handling",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
|
-
"url": "git+https://github.com/
|
|
7
|
+
"url": "git+https://github.com/iotaledger/framework.git",
|
|
8
8
|
"directory": "packages/core"
|
|
9
9
|
},
|
|
10
10
|
"author": "martyn.janes@iota.org",
|
|
@@ -14,26 +14,38 @@
|
|
|
14
14
|
"node": ">=20.0.0"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@twin.org/nameof": "0.0.2
|
|
18
|
-
"intl-messageformat": "
|
|
19
|
-
"rfc6902": "5.
|
|
17
|
+
"@twin.org/nameof": "0.0.2",
|
|
18
|
+
"intl-messageformat": "11.2.6",
|
|
19
|
+
"rfc6902": "5.2.0"
|
|
20
20
|
},
|
|
21
|
-
"main": "./dist/
|
|
22
|
-
"module": "./dist/esm/index.mjs",
|
|
21
|
+
"main": "./dist/es/index.js",
|
|
23
22
|
"types": "./dist/types/index.d.ts",
|
|
24
23
|
"exports": {
|
|
25
24
|
".": {
|
|
26
25
|
"types": "./dist/types/index.d.ts",
|
|
27
|
-
"
|
|
28
|
-
"
|
|
26
|
+
"import": "./dist/es/index.js",
|
|
27
|
+
"default": "./dist/es/index.js"
|
|
29
28
|
},
|
|
30
29
|
"./locales/*.json": "./locales/*.json"
|
|
31
30
|
},
|
|
32
31
|
"files": [
|
|
33
|
-
"dist/
|
|
34
|
-
"dist/esm",
|
|
32
|
+
"dist/es",
|
|
35
33
|
"dist/types",
|
|
36
34
|
"locales",
|
|
37
35
|
"docs"
|
|
38
|
-
]
|
|
36
|
+
],
|
|
37
|
+
"keywords": [
|
|
38
|
+
"twin",
|
|
39
|
+
"trade",
|
|
40
|
+
"iota",
|
|
41
|
+
"framework",
|
|
42
|
+
"blockchain",
|
|
43
|
+
"core",
|
|
44
|
+
"foundation",
|
|
45
|
+
"utilities"
|
|
46
|
+
],
|
|
47
|
+
"bugs": {
|
|
48
|
+
"url": "git+https://github.com/iotaledger/framework/issues"
|
|
49
|
+
},
|
|
50
|
+
"homepage": "https://twindev.org"
|
|
39
51
|
}
|