@twin.org/core 0.0.1-next.9 → 0.0.2-next.3
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/cjs/index.cjs +1574 -833
- package/dist/esm/index.mjs +1571 -834
- package/dist/types/errors/baseError.d.ts +8 -1
- package/dist/types/factories/factory.d.ts +20 -1
- package/dist/types/helpers/arrayHelper.d.ts +13 -0
- package/dist/types/helpers/envHelper.d.ts +16 -0
- package/dist/types/helpers/errorHelper.d.ts +2 -1
- package/dist/types/helpers/jsonHelper.d.ts +30 -0
- package/dist/types/helpers/objectHelper.d.ts +25 -0
- package/dist/types/helpers/uint8ArrayHelper.d.ts +11 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/types/models/IComponent.d.ts +12 -3
- package/dist/types/models/II18nShared.d.ts +29 -0
- package/dist/types/models/coerceType.d.ts +49 -0
- package/dist/types/models/compressionType.d.ts +1 -1
- package/dist/types/models/objectOrArray.d.ts +4 -0
- package/dist/types/utils/asyncCache.d.ts +10 -1
- package/dist/types/utils/coerce.d.ts +22 -0
- package/dist/types/utils/guards.d.ts +35 -0
- package/dist/types/utils/is.d.ts +12 -0
- package/dist/types/utils/sharedStore.d.ts +23 -0
- package/dist/types/utils/validation.d.ts +2 -0
- package/docs/changelog.md +323 -1
- package/docs/reference/classes/AlreadyExistsError.md +103 -27
- package/docs/reference/classes/ArrayHelper.md +71 -5
- package/docs/reference/classes/AsyncCache.md +75 -13
- package/docs/reference/classes/Base32.md +9 -5
- package/docs/reference/classes/Base58.md +9 -5
- package/docs/reference/classes/Base64.md +12 -6
- package/docs/reference/classes/Base64Url.md +9 -5
- package/docs/reference/classes/BaseError.md +101 -29
- package/docs/reference/classes/BitString.md +23 -11
- package/docs/reference/classes/Coerce.md +110 -12
- package/docs/reference/classes/Compression.md +19 -11
- package/docs/reference/classes/ConflictError.md +106 -28
- package/docs/reference/classes/Converter.md +72 -28
- package/docs/reference/classes/EnvHelper.md +45 -0
- package/docs/reference/classes/ErrorHelper.md +19 -7
- package/docs/reference/classes/Factory.md +95 -17
- package/docs/reference/classes/FilenameHelper.md +6 -4
- package/docs/reference/classes/GeneralError.md +101 -27
- package/docs/reference/classes/GuardError.md +106 -28
- package/docs/reference/classes/Guards.md +398 -80
- package/docs/reference/classes/HexHelper.md +18 -8
- package/docs/reference/classes/I18n.md +46 -20
- package/docs/reference/classes/Is.md +179 -51
- package/docs/reference/classes/JsonHelper.md +146 -10
- package/docs/reference/classes/NotFoundError.md +103 -27
- package/docs/reference/classes/NotImplementedError.md +97 -25
- package/docs/reference/classes/NotSupportedError.md +100 -26
- package/docs/reference/classes/ObjectHelper.md +197 -39
- package/docs/reference/classes/RandomHelper.md +6 -4
- package/docs/reference/classes/SharedStore.md +94 -0
- package/docs/reference/classes/StringHelper.md +54 -20
- package/docs/reference/classes/Uint8ArrayHelper.md +35 -0
- package/docs/reference/classes/UnauthorizedError.md +100 -26
- package/docs/reference/classes/UnprocessableError.md +101 -27
- package/docs/reference/classes/Url.md +37 -17
- package/docs/reference/classes/Urn.md +63 -27
- package/docs/reference/classes/Validation.md +349 -135
- package/docs/reference/classes/ValidationError.md +100 -26
- package/docs/reference/index.md +7 -0
- package/docs/reference/interfaces/IComponent.md +30 -8
- package/docs/reference/interfaces/IError.md +2 -2
- package/docs/reference/interfaces/II18nShared.md +47 -0
- package/docs/reference/interfaces/IKeyValue.md +3 -1
- package/docs/reference/interfaces/ILabelledValue.md +3 -1
- package/docs/reference/interfaces/ILocaleDictionary.md +1 -1
- package/docs/reference/interfaces/IPatchOperation.md +1 -1
- package/docs/reference/interfaces/IValidationFailure.md +1 -1
- package/docs/reference/type-aliases/CoerceType.md +5 -0
- package/docs/reference/type-aliases/CompressionType.md +1 -1
- package/docs/reference/type-aliases/ObjectOrArray.md +11 -0
- package/docs/reference/variables/CoerceType.md +67 -0
- package/docs/reference/variables/CompressionType.md +1 -1
- package/locales/en.json +14 -1
- package/package.json +7 -7
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,327 @@
|
|
|
1
1
|
# @twin.org/core - Changelog
|
|
2
2
|
|
|
3
|
-
## 0.0.
|
|
3
|
+
## [0.0.2-next.3](https://github.com/twinfoundation/framework/compare/core-v0.0.2-next.2...core-v0.0.2-next.3) (2025-08-06)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add guards arrayEndsWith and arrayStartsWith ([95d875e](https://github.com/twinfoundation/framework/commit/95d875ec8ccb4713c145fdde941d4cfedcec2ed3))
|
|
9
|
+
* add ObjectOrArray and ArrayHelper methods ([0ac9077](https://github.com/twinfoundation/framework/commit/0ac907764d64b38ad1b04b0e9c3027055b527559))
|
|
10
|
+
* add rsa cipher support ([7af6cc6](https://github.com/twinfoundation/framework/commit/7af6cc67512d3363bd4a2f2e87bd7733c2800147))
|
|
11
|
+
* add set method for async caches ([ba34b55](https://github.com/twinfoundation/framework/commit/ba34b55e651ad56ab8fc59e139e4af631c19cda0))
|
|
12
|
+
* add zlib/deflate mime types detection ([72c472b](https://github.com/twinfoundation/framework/commit/72c472b5a35a973e7109336f5b6cdd84dbb8bbcb))
|
|
13
|
+
* async cache don't cache failures unless requested ([658ec4b](https://github.com/twinfoundation/framework/commit/658ec4b67a58a075de4702a3886d151e25ad3ddc))
|
|
14
|
+
* improve base error data extraction ([dccc933](https://github.com/twinfoundation/framework/commit/dccc93361a1544b41db0e7c126ff90e858d87960))
|
|
15
|
+
* improve error display in CLI ([94b6ca8](https://github.com/twinfoundation/framework/commit/94b6ca8bdcfe3ca7671c4095b436ea7bddaae98e))
|
|
16
|
+
* propagate includeStackTrace on error conversion ([8471cbb](https://github.com/twinfoundation/framework/commit/8471cbb71f8fc98247a0e92126c438c1a8b04d9b))
|
|
17
|
+
* propagate includeStackTrace on error conversion ([818337d](https://github.com/twinfoundation/framework/commit/818337d50d14bf5a7e8b3204649aa7527115cca9))
|
|
18
|
+
* relocate core packages from tools ([bcab8f3](https://github.com/twinfoundation/framework/commit/bcab8f3160442ea4fcaf442947462504f3d6a17d))
|
|
19
|
+
* simplify async set ([#121](https://github.com/twinfoundation/framework/issues/121)) ([2693c32](https://github.com/twinfoundation/framework/commit/2693c325266fd1a0aede6f1336c8b254c981a9ca))
|
|
20
|
+
* support indexed properties set in objects ([b9c001d](https://github.com/twinfoundation/framework/commit/b9c001dc4614f6ff7486f4370735a553613d823a))
|
|
21
|
+
* update dependencies ([f3bd015](https://github.com/twinfoundation/framework/commit/f3bd015efd169196b7e0335f5cab876ba6ca1d75))
|
|
22
|
+
* use new shared store mechanism ([#131](https://github.com/twinfoundation/framework/issues/131)) ([934385b](https://github.com/twinfoundation/framework/commit/934385b2fbaf9f5c00a505ebf9d093bd5a425f55))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Dependencies
|
|
26
|
+
|
|
27
|
+
* The following workspace dependencies were updated
|
|
28
|
+
* dependencies
|
|
29
|
+
* @twin.org/nameof bumped from 0.0.2-next.2 to 0.0.2-next.3
|
|
30
|
+
* devDependencies
|
|
31
|
+
* @twin.org/nameof-transformer bumped from 0.0.2-next.2 to 0.0.2-next.3
|
|
32
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.2-next.2 to 0.0.2-next.3
|
|
33
|
+
|
|
34
|
+
## [0.0.2-next.2](https://github.com/twinfoundation/framework/compare/core-v0.0.2-next.1...core-v0.0.2-next.2) (2025-08-06)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
### Features
|
|
38
|
+
|
|
39
|
+
* add guards arrayEndsWith and arrayStartsWith ([95d875e](https://github.com/twinfoundation/framework/commit/95d875ec8ccb4713c145fdde941d4cfedcec2ed3))
|
|
40
|
+
* add ObjectOrArray and ArrayHelper methods ([0ac9077](https://github.com/twinfoundation/framework/commit/0ac907764d64b38ad1b04b0e9c3027055b527559))
|
|
41
|
+
* add rsa cipher support ([7af6cc6](https://github.com/twinfoundation/framework/commit/7af6cc67512d3363bd4a2f2e87bd7733c2800147))
|
|
42
|
+
* add set method for async caches ([ba34b55](https://github.com/twinfoundation/framework/commit/ba34b55e651ad56ab8fc59e139e4af631c19cda0))
|
|
43
|
+
* add zlib/deflate mime types detection ([72c472b](https://github.com/twinfoundation/framework/commit/72c472b5a35a973e7109336f5b6cdd84dbb8bbcb))
|
|
44
|
+
* async cache don't cache failures unless requested ([658ec4b](https://github.com/twinfoundation/framework/commit/658ec4b67a58a075de4702a3886d151e25ad3ddc))
|
|
45
|
+
* improve base error data extraction ([dccc933](https://github.com/twinfoundation/framework/commit/dccc93361a1544b41db0e7c126ff90e858d87960))
|
|
46
|
+
* improve error display in CLI ([94b6ca8](https://github.com/twinfoundation/framework/commit/94b6ca8bdcfe3ca7671c4095b436ea7bddaae98e))
|
|
47
|
+
* propagate includeStackTrace on error conversion ([8471cbb](https://github.com/twinfoundation/framework/commit/8471cbb71f8fc98247a0e92126c438c1a8b04d9b))
|
|
48
|
+
* propagate includeStackTrace on error conversion ([818337d](https://github.com/twinfoundation/framework/commit/818337d50d14bf5a7e8b3204649aa7527115cca9))
|
|
49
|
+
* relocate core packages from tools ([bcab8f3](https://github.com/twinfoundation/framework/commit/bcab8f3160442ea4fcaf442947462504f3d6a17d))
|
|
50
|
+
* simplify async set ([#121](https://github.com/twinfoundation/framework/issues/121)) ([2693c32](https://github.com/twinfoundation/framework/commit/2693c325266fd1a0aede6f1336c8b254c981a9ca))
|
|
51
|
+
* support indexed properties set in objects ([b9c001d](https://github.com/twinfoundation/framework/commit/b9c001dc4614f6ff7486f4370735a553613d823a))
|
|
52
|
+
* update dependencies ([f3bd015](https://github.com/twinfoundation/framework/commit/f3bd015efd169196b7e0335f5cab876ba6ca1d75))
|
|
53
|
+
* use new shared store mechanism ([#131](https://github.com/twinfoundation/framework/issues/131)) ([934385b](https://github.com/twinfoundation/framework/commit/934385b2fbaf9f5c00a505ebf9d093bd5a425f55))
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
### Dependencies
|
|
57
|
+
|
|
58
|
+
* The following workspace dependencies were updated
|
|
59
|
+
* dependencies
|
|
60
|
+
* @twin.org/nameof bumped from 0.0.2-next.1 to 0.0.2-next.2
|
|
61
|
+
* devDependencies
|
|
62
|
+
* @twin.org/nameof-transformer bumped from 0.0.2-next.1 to 0.0.2-next.2
|
|
63
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.2-next.1 to 0.0.2-next.2
|
|
64
|
+
|
|
65
|
+
## [0.0.2-next.1](https://github.com/twinfoundation/framework/compare/core-v0.0.2-next.0...core-v0.0.2-next.1) (2025-08-06)
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
### Features
|
|
69
|
+
|
|
70
|
+
* add guards arrayEndsWith and arrayStartsWith ([95d875e](https://github.com/twinfoundation/framework/commit/95d875ec8ccb4713c145fdde941d4cfedcec2ed3))
|
|
71
|
+
* add ObjectOrArray and ArrayHelper methods ([0ac9077](https://github.com/twinfoundation/framework/commit/0ac907764d64b38ad1b04b0e9c3027055b527559))
|
|
72
|
+
* add rsa cipher support ([7af6cc6](https://github.com/twinfoundation/framework/commit/7af6cc67512d3363bd4a2f2e87bd7733c2800147))
|
|
73
|
+
* add set method for async caches ([ba34b55](https://github.com/twinfoundation/framework/commit/ba34b55e651ad56ab8fc59e139e4af631c19cda0))
|
|
74
|
+
* add zlib/deflate mime types detection ([72c472b](https://github.com/twinfoundation/framework/commit/72c472b5a35a973e7109336f5b6cdd84dbb8bbcb))
|
|
75
|
+
* async cache don't cache failures unless requested ([658ec4b](https://github.com/twinfoundation/framework/commit/658ec4b67a58a075de4702a3886d151e25ad3ddc))
|
|
76
|
+
* improve base error data extraction ([dccc933](https://github.com/twinfoundation/framework/commit/dccc93361a1544b41db0e7c126ff90e858d87960))
|
|
77
|
+
* improve error display in CLI ([94b6ca8](https://github.com/twinfoundation/framework/commit/94b6ca8bdcfe3ca7671c4095b436ea7bddaae98e))
|
|
78
|
+
* propagate includeStackTrace on error conversion ([8471cbb](https://github.com/twinfoundation/framework/commit/8471cbb71f8fc98247a0e92126c438c1a8b04d9b))
|
|
79
|
+
* propagate includeStackTrace on error conversion ([818337d](https://github.com/twinfoundation/framework/commit/818337d50d14bf5a7e8b3204649aa7527115cca9))
|
|
80
|
+
* relocate core packages from tools ([bcab8f3](https://github.com/twinfoundation/framework/commit/bcab8f3160442ea4fcaf442947462504f3d6a17d))
|
|
81
|
+
* simplify async set ([#121](https://github.com/twinfoundation/framework/issues/121)) ([2693c32](https://github.com/twinfoundation/framework/commit/2693c325266fd1a0aede6f1336c8b254c981a9ca))
|
|
82
|
+
* support indexed properties set in objects ([b9c001d](https://github.com/twinfoundation/framework/commit/b9c001dc4614f6ff7486f4370735a553613d823a))
|
|
83
|
+
* update dependencies ([f3bd015](https://github.com/twinfoundation/framework/commit/f3bd015efd169196b7e0335f5cab876ba6ca1d75))
|
|
84
|
+
* use new shared store mechanism ([#131](https://github.com/twinfoundation/framework/issues/131)) ([934385b](https://github.com/twinfoundation/framework/commit/934385b2fbaf9f5c00a505ebf9d093bd5a425f55))
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
### Dependencies
|
|
88
|
+
|
|
89
|
+
* The following workspace dependencies were updated
|
|
90
|
+
* dependencies
|
|
91
|
+
* @twin.org/nameof bumped from 0.0.2-next.0 to 0.0.2-next.1
|
|
92
|
+
* devDependencies
|
|
93
|
+
* @twin.org/nameof-transformer bumped from 0.0.2-next.0 to 0.0.2-next.1
|
|
94
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.2-next.0 to 0.0.2-next.1
|
|
95
|
+
|
|
96
|
+
## 0.0.1 (2025-07-03)
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
### Features
|
|
100
|
+
|
|
101
|
+
* release to production ([829d53d](https://github.com/twinfoundation/framework/commit/829d53d3953b1e1b40b0243c04cfdfd3842aac7b))
|
|
102
|
+
* release to production ([5cf3a76](https://github.com/twinfoundation/framework/commit/5cf3a76a09eff2e6414d0cba846c7c37400a11d6))
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
### Dependencies
|
|
106
|
+
|
|
107
|
+
* The following workspace dependencies were updated
|
|
108
|
+
* dependencies
|
|
109
|
+
* @twin.org/nameof bumped from ^0.0.0 to ^0.0.1
|
|
110
|
+
* devDependencies
|
|
111
|
+
* @twin.org/nameof-transformer bumped from ^0.0.0 to ^0.0.1
|
|
112
|
+
* @twin.org/nameof-vitest-plugin bumped from ^0.0.0 to ^0.0.1
|
|
113
|
+
|
|
114
|
+
## [0.0.1-next.70](https://github.com/twinfoundation/framework/compare/core-v0.0.1-next.69...core-v0.0.1-next.70) (2025-07-02)
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
### Features
|
|
118
|
+
|
|
119
|
+
* add guards arrayEndsWith and arrayStartsWith ([95d875e](https://github.com/twinfoundation/framework/commit/95d875ec8ccb4713c145fdde941d4cfedcec2ed3))
|
|
120
|
+
* add ObjectOrArray and ArrayHelper methods ([0ac9077](https://github.com/twinfoundation/framework/commit/0ac907764d64b38ad1b04b0e9c3027055b527559))
|
|
121
|
+
* add set method for async caches ([ba34b55](https://github.com/twinfoundation/framework/commit/ba34b55e651ad56ab8fc59e139e4af631c19cda0))
|
|
122
|
+
* add zlib/deflate mime types detection ([72c472b](https://github.com/twinfoundation/framework/commit/72c472b5a35a973e7109336f5b6cdd84dbb8bbcb))
|
|
123
|
+
* async cache don't cache failures unless requested ([658ec4b](https://github.com/twinfoundation/framework/commit/658ec4b67a58a075de4702a3886d151e25ad3ddc))
|
|
124
|
+
* improve base error data extraction ([dccc933](https://github.com/twinfoundation/framework/commit/dccc93361a1544b41db0e7c126ff90e858d87960))
|
|
125
|
+
* improve error display in CLI ([94b6ca8](https://github.com/twinfoundation/framework/commit/94b6ca8bdcfe3ca7671c4095b436ea7bddaae98e))
|
|
126
|
+
* propagate includeStackTrace on error conversion ([8471cbb](https://github.com/twinfoundation/framework/commit/8471cbb71f8fc98247a0e92126c438c1a8b04d9b))
|
|
127
|
+
* propagate includeStackTrace on error conversion ([818337d](https://github.com/twinfoundation/framework/commit/818337d50d14bf5a7e8b3204649aa7527115cca9))
|
|
128
|
+
* relocate core packages from tools ([bcab8f3](https://github.com/twinfoundation/framework/commit/bcab8f3160442ea4fcaf442947462504f3d6a17d))
|
|
129
|
+
* simplify async set ([#121](https://github.com/twinfoundation/framework/issues/121)) ([2693c32](https://github.com/twinfoundation/framework/commit/2693c325266fd1a0aede6f1336c8b254c981a9ca))
|
|
130
|
+
* support indexed properties set in objects ([b9c001d](https://github.com/twinfoundation/framework/commit/b9c001dc4614f6ff7486f4370735a553613d823a))
|
|
131
|
+
* use new shared store mechanism ([#131](https://github.com/twinfoundation/framework/issues/131)) ([934385b](https://github.com/twinfoundation/framework/commit/934385b2fbaf9f5c00a505ebf9d093bd5a425f55))
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
### Dependencies
|
|
135
|
+
|
|
136
|
+
* The following workspace dependencies were updated
|
|
137
|
+
* dependencies
|
|
138
|
+
* @twin.org/nameof bumped from 0.0.1-next.69 to 0.0.1-next.70
|
|
139
|
+
* devDependencies
|
|
140
|
+
* @twin.org/nameof-transformer bumped from 0.0.1-next.69 to 0.0.1-next.70
|
|
141
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.1-next.69 to 0.0.1-next.70
|
|
142
|
+
|
|
143
|
+
## [0.0.1-next.69](https://github.com/twinfoundation/framework/compare/core-v0.0.1-next.68...core-v0.0.1-next.69) (2025-07-02)
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
### Features
|
|
147
|
+
|
|
148
|
+
* add guards arrayEndsWith and arrayStartsWith ([95d875e](https://github.com/twinfoundation/framework/commit/95d875ec8ccb4713c145fdde941d4cfedcec2ed3))
|
|
149
|
+
* add ObjectOrArray and ArrayHelper methods ([0ac9077](https://github.com/twinfoundation/framework/commit/0ac907764d64b38ad1b04b0e9c3027055b527559))
|
|
150
|
+
* add set method for async caches ([ba34b55](https://github.com/twinfoundation/framework/commit/ba34b55e651ad56ab8fc59e139e4af631c19cda0))
|
|
151
|
+
* add zlib/deflate mime types detection ([72c472b](https://github.com/twinfoundation/framework/commit/72c472b5a35a973e7109336f5b6cdd84dbb8bbcb))
|
|
152
|
+
* async cache don't cache failures unless requested ([658ec4b](https://github.com/twinfoundation/framework/commit/658ec4b67a58a075de4702a3886d151e25ad3ddc))
|
|
153
|
+
* improve base error data extraction ([dccc933](https://github.com/twinfoundation/framework/commit/dccc93361a1544b41db0e7c126ff90e858d87960))
|
|
154
|
+
* improve error display in CLI ([94b6ca8](https://github.com/twinfoundation/framework/commit/94b6ca8bdcfe3ca7671c4095b436ea7bddaae98e))
|
|
155
|
+
* propagate includeStackTrace on error conversion ([8471cbb](https://github.com/twinfoundation/framework/commit/8471cbb71f8fc98247a0e92126c438c1a8b04d9b))
|
|
156
|
+
* propagate includeStackTrace on error conversion ([818337d](https://github.com/twinfoundation/framework/commit/818337d50d14bf5a7e8b3204649aa7527115cca9))
|
|
157
|
+
* relocate core packages from tools ([bcab8f3](https://github.com/twinfoundation/framework/commit/bcab8f3160442ea4fcaf442947462504f3d6a17d))
|
|
158
|
+
* simplify async set ([#121](https://github.com/twinfoundation/framework/issues/121)) ([2693c32](https://github.com/twinfoundation/framework/commit/2693c325266fd1a0aede6f1336c8b254c981a9ca))
|
|
159
|
+
* support indexed properties set in objects ([b9c001d](https://github.com/twinfoundation/framework/commit/b9c001dc4614f6ff7486f4370735a553613d823a))
|
|
160
|
+
* use new shared store mechanism ([#131](https://github.com/twinfoundation/framework/issues/131)) ([934385b](https://github.com/twinfoundation/framework/commit/934385b2fbaf9f5c00a505ebf9d093bd5a425f55))
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
### Dependencies
|
|
164
|
+
|
|
165
|
+
* The following workspace dependencies were updated
|
|
166
|
+
* dependencies
|
|
167
|
+
* @twin.org/nameof bumped from 0.0.1-next.68 to 0.0.1-next.69
|
|
168
|
+
* devDependencies
|
|
169
|
+
* @twin.org/nameof-transformer bumped from 0.0.1-next.68 to 0.0.1-next.69
|
|
170
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.1-next.68 to 0.0.1-next.69
|
|
171
|
+
|
|
172
|
+
## [0.0.1-next.68](https://github.com/twinfoundation/framework/compare/core-v0.0.1-next.67...core-v0.0.1-next.68) (2025-07-02)
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
### Features
|
|
176
|
+
|
|
177
|
+
* relocate core packages from tools ([bcab8f3](https://github.com/twinfoundation/framework/commit/bcab8f3160442ea4fcaf442947462504f3d6a17d))
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
### Dependencies
|
|
181
|
+
|
|
182
|
+
* The following workspace dependencies were updated
|
|
183
|
+
* dependencies
|
|
184
|
+
* @twin.org/nameof bumped from 0.0.1-next.67 to 0.0.1-next.68
|
|
185
|
+
* devDependencies
|
|
186
|
+
* @twin.org/nameof-transformer bumped from 0.0.1-next.67 to 0.0.1-next.68
|
|
187
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.1-next.67 to 0.0.1-next.68
|
|
188
|
+
|
|
189
|
+
## [0.0.1-next.67](https://github.com/twinfoundation/framework/compare/core-v0.0.1-next.66...core-v0.0.1-next.67) (2025-06-26)
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
### Miscellaneous Chores
|
|
193
|
+
|
|
194
|
+
* **core:** Synchronize repo versions
|
|
195
|
+
|
|
196
|
+
## [0.0.1-next.66](https://github.com/twinfoundation/framework/compare/core-v0.0.1-next.65...core-v0.0.1-next.66) (2025-06-26)
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
### Features
|
|
200
|
+
|
|
201
|
+
* improve base error data extraction ([dccc933](https://github.com/twinfoundation/framework/commit/dccc93361a1544b41db0e7c126ff90e858d87960))
|
|
202
|
+
|
|
203
|
+
## [0.0.1-next.65](https://github.com/twinfoundation/framework/compare/core-v0.0.1-next.64...core-v0.0.1-next.65) (2025-06-19)
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
### Miscellaneous Chores
|
|
207
|
+
|
|
208
|
+
* **core:** Synchronize repo versions
|
|
209
|
+
|
|
210
|
+
## [0.0.1-next.64](https://github.com/twinfoundation/framework/compare/core-v0.0.1-next.63...core-v0.0.1-next.64) (2025-06-19)
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
### Features
|
|
214
|
+
|
|
215
|
+
* add zlib/deflate mime types detection ([72c472b](https://github.com/twinfoundation/framework/commit/72c472b5a35a973e7109336f5b6cdd84dbb8bbcb))
|
|
216
|
+
|
|
217
|
+
## [0.0.1-next.63](https://github.com/twinfoundation/framework/compare/core-v0.0.1-next.62...core-v0.0.1-next.63) (2025-06-18)
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
### Miscellaneous Chores
|
|
221
|
+
|
|
222
|
+
* **core:** Synchronize repo versions
|
|
223
|
+
|
|
224
|
+
## [0.0.1-next.62](https://github.com/twinfoundation/framework/compare/core-v0.0.1-next.61...core-v0.0.1-next.62) (2025-06-17)
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
### Features
|
|
228
|
+
|
|
229
|
+
* add guards arrayEndsWith and arrayStartsWith ([95d875e](https://github.com/twinfoundation/framework/commit/95d875ec8ccb4713c145fdde941d4cfedcec2ed3))
|
|
230
|
+
* add ObjectOrArray and ArrayHelper methods ([0ac9077](https://github.com/twinfoundation/framework/commit/0ac907764d64b38ad1b04b0e9c3027055b527559))
|
|
231
|
+
* add set method for async caches ([ba34b55](https://github.com/twinfoundation/framework/commit/ba34b55e651ad56ab8fc59e139e4af631c19cda0))
|
|
232
|
+
* async cache don't cache failures unless requested ([658ec4b](https://github.com/twinfoundation/framework/commit/658ec4b67a58a075de4702a3886d151e25ad3ddc))
|
|
233
|
+
* improve error display in CLI ([94b6ca8](https://github.com/twinfoundation/framework/commit/94b6ca8bdcfe3ca7671c4095b436ea7bddaae98e))
|
|
234
|
+
* propagate includeStackTrace on error conversion ([8471cbb](https://github.com/twinfoundation/framework/commit/8471cbb71f8fc98247a0e92126c438c1a8b04d9b))
|
|
235
|
+
* propagate includeStackTrace on error conversion ([818337d](https://github.com/twinfoundation/framework/commit/818337d50d14bf5a7e8b3204649aa7527115cca9))
|
|
236
|
+
* simplify async set ([#121](https://github.com/twinfoundation/framework/issues/121)) ([2693c32](https://github.com/twinfoundation/framework/commit/2693c325266fd1a0aede6f1336c8b254c981a9ca))
|
|
237
|
+
* support indexed properties set in objects ([b9c001d](https://github.com/twinfoundation/framework/commit/b9c001dc4614f6ff7486f4370735a553613d823a))
|
|
238
|
+
* use new shared store mechanism ([#131](https://github.com/twinfoundation/framework/issues/131)) ([934385b](https://github.com/twinfoundation/framework/commit/934385b2fbaf9f5c00a505ebf9d093bd5a425f55))
|
|
239
|
+
|
|
240
|
+
## [0.0.1-next.61](https://github.com/twinfoundation/framework/compare/core-v0.0.1-next.60...core-v0.0.1-next.61) (2025-06-17)
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
### Features
|
|
244
|
+
|
|
245
|
+
* support indexed properties set in objects ([b9c001d](https://github.com/twinfoundation/framework/commit/b9c001dc4614f6ff7486f4370735a553613d823a))
|
|
246
|
+
|
|
247
|
+
## [0.0.1-next.60](https://github.com/twinfoundation/framework/compare/core-v0.0.1-next.59...core-v0.0.1-next.60) (2025-06-17)
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
### Features
|
|
251
|
+
|
|
252
|
+
* improve error display in CLI ([94b6ca8](https://github.com/twinfoundation/framework/commit/94b6ca8bdcfe3ca7671c4095b436ea7bddaae98e))
|
|
253
|
+
|
|
254
|
+
## [0.0.1-next.59](https://github.com/twinfoundation/framework/compare/core-v0.0.1-next.58...core-v0.0.1-next.59) (2025-06-17)
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
### Features
|
|
258
|
+
|
|
259
|
+
* propagate includeStackTrace on error conversion ([8471cbb](https://github.com/twinfoundation/framework/commit/8471cbb71f8fc98247a0e92126c438c1a8b04d9b))
|
|
260
|
+
* propagate includeStackTrace on error conversion ([818337d](https://github.com/twinfoundation/framework/commit/818337d50d14bf5a7e8b3204649aa7527115cca9))
|
|
261
|
+
|
|
262
|
+
## [0.0.1-next.58](https://github.com/twinfoundation/framework/compare/core-v0.0.1-next.57...core-v0.0.1-next.58) (2025-06-13)
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
### Miscellaneous Chores
|
|
266
|
+
|
|
267
|
+
* **core:** Synchronize repo versions
|
|
268
|
+
|
|
269
|
+
## [0.0.1-next.57](https://github.com/twinfoundation/framework/compare/core-v0.0.1-next.56...core-v0.0.1-next.57) (2025-06-10)
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
### Features
|
|
273
|
+
|
|
274
|
+
* add guards arrayEndsWith and arrayStartsWith ([95d875e](https://github.com/twinfoundation/framework/commit/95d875ec8ccb4713c145fdde941d4cfedcec2ed3))
|
|
275
|
+
|
|
276
|
+
## [0.0.1-next.56](https://github.com/twinfoundation/framework/compare/core-v0.0.1-next.55...core-v0.0.1-next.56) (2025-05-08)
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
### Features
|
|
280
|
+
|
|
281
|
+
* add ObjectOrArray and ArrayHelper methods ([0ac9077](https://github.com/twinfoundation/framework/commit/0ac907764d64b38ad1b04b0e9c3027055b527559))
|
|
282
|
+
|
|
283
|
+
## [0.0.1-next.55](https://github.com/twinfoundation/framework/compare/core-v0.0.1-next.54...core-v0.0.1-next.55) (2025-05-07)
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
### Miscellaneous Chores
|
|
287
|
+
|
|
288
|
+
* **core:** Synchronize repo versions
|
|
289
|
+
|
|
290
|
+
## [0.0.1-next.54](https://github.com/twinfoundation/framework/compare/core-v0.0.1-next.53...core-v0.0.1-next.54) (2025-05-06)
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
### Miscellaneous Chores
|
|
294
|
+
|
|
295
|
+
* **core:** Synchronize repo versions
|
|
296
|
+
|
|
297
|
+
## [0.0.1-next.53](https://github.com/twinfoundation/framework/compare/core-v0.0.1-next.52...core-v0.0.1-next.53) (2025-05-01)
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
### Features
|
|
301
|
+
|
|
302
|
+
* async cache don't cache failures unless requested ([658ec4b](https://github.com/twinfoundation/framework/commit/658ec4b67a58a075de4702a3886d151e25ad3ddc))
|
|
303
|
+
|
|
304
|
+
## [0.0.1-next.52](https://github.com/twinfoundation/framework/compare/core-v0.0.1-next.51...core-v0.0.1-next.52) (2025-04-17)
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
### Features
|
|
308
|
+
|
|
309
|
+
* use new shared store mechanism ([#131](https://github.com/twinfoundation/framework/issues/131)) ([934385b](https://github.com/twinfoundation/framework/commit/934385b2fbaf9f5c00a505ebf9d093bd5a425f55))
|
|
310
|
+
|
|
311
|
+
## [0.0.1-next.51](https://github.com/twinfoundation/framework/compare/core-v0.0.1-next.50...core-v0.0.1-next.51) (2025-03-27)
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
### Features
|
|
315
|
+
|
|
316
|
+
* simplify async set ([#121](https://github.com/twinfoundation/framework/issues/121)) ([2693c32](https://github.com/twinfoundation/framework/commit/2693c325266fd1a0aede6f1336c8b254c981a9ca))
|
|
317
|
+
|
|
318
|
+
## [0.0.1-next.50](https://github.com/twinfoundation/framework/compare/core-v0.0.1-next.49...core-v0.0.1-next.50) (2025-03-26)
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
### Features
|
|
322
|
+
|
|
323
|
+
* add set method for async caches ([ba34b55](https://github.com/twinfoundation/framework/commit/ba34b55e651ad56ab8fc59e139e4af631c19cda0))
|
|
324
|
+
|
|
325
|
+
## 0.0.1-next.49
|
|
4
326
|
|
|
5
327
|
- Initial Release
|
|
@@ -8,37 +8,45 @@ Class to handle errors which are triggered by data already existing.
|
|
|
8
8
|
|
|
9
9
|
## Constructors
|
|
10
10
|
|
|
11
|
-
###
|
|
11
|
+
### Constructor
|
|
12
12
|
|
|
13
|
-
> **new AlreadyExistsError**(`source`, `message`, `existingId
|
|
13
|
+
> **new AlreadyExistsError**(`source`, `message`, `existingId?`, `inner?`): `AlreadyExistsError`
|
|
14
14
|
|
|
15
15
|
Create a new instance of AlreadyExistsError.
|
|
16
16
|
|
|
17
17
|
#### Parameters
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
##### source
|
|
20
|
+
|
|
21
|
+
`string`
|
|
20
22
|
|
|
21
23
|
The source of the error.
|
|
22
24
|
|
|
23
|
-
|
|
25
|
+
##### message
|
|
26
|
+
|
|
27
|
+
`string`
|
|
24
28
|
|
|
25
29
|
The message as a code.
|
|
26
30
|
|
|
27
|
-
|
|
31
|
+
##### existingId?
|
|
32
|
+
|
|
33
|
+
`string`
|
|
28
34
|
|
|
29
35
|
The id for the item.
|
|
30
36
|
|
|
31
|
-
|
|
37
|
+
##### inner?
|
|
38
|
+
|
|
39
|
+
`unknown`
|
|
32
40
|
|
|
33
41
|
The inner error if we have wrapped another error.
|
|
34
42
|
|
|
35
43
|
#### Returns
|
|
36
44
|
|
|
37
|
-
|
|
45
|
+
`AlreadyExistsError`
|
|
38
46
|
|
|
39
47
|
#### Overrides
|
|
40
48
|
|
|
41
|
-
[`BaseError`](BaseError.md).[`constructor`](BaseError.md#
|
|
49
|
+
[`BaseError`](BaseError.md).[`constructor`](BaseError.md#constructor)
|
|
42
50
|
|
|
43
51
|
## Properties
|
|
44
52
|
|
|
@@ -70,7 +78,7 @@ Any additional information for the error.
|
|
|
70
78
|
|
|
71
79
|
#### Index Signature
|
|
72
80
|
|
|
73
|
-
|
|
81
|
+
\[`id`: `string`\]: `unknown`
|
|
74
82
|
|
|
75
83
|
#### Inherited from
|
|
76
84
|
|
|
@@ -98,7 +106,9 @@ Construct an error from an existing one.
|
|
|
98
106
|
|
|
99
107
|
#### Parameters
|
|
100
108
|
|
|
101
|
-
|
|
109
|
+
##### err
|
|
110
|
+
|
|
111
|
+
`unknown`
|
|
102
112
|
|
|
103
113
|
The existing error.
|
|
104
114
|
|
|
@@ -122,7 +132,9 @@ Flatten an error tree.
|
|
|
122
132
|
|
|
123
133
|
#### Parameters
|
|
124
134
|
|
|
125
|
-
|
|
135
|
+
##### err
|
|
136
|
+
|
|
137
|
+
`unknown`
|
|
126
138
|
|
|
127
139
|
The starting error.
|
|
128
140
|
|
|
@@ -146,10 +158,12 @@ Expand an error tree.
|
|
|
146
158
|
|
|
147
159
|
#### Parameters
|
|
148
160
|
|
|
149
|
-
|
|
161
|
+
##### errors
|
|
150
162
|
|
|
151
163
|
The list of errors to expand.
|
|
152
164
|
|
|
165
|
+
`undefined` | [`IError`](../interfaces/IError.md)[]
|
|
166
|
+
|
|
153
167
|
#### Returns
|
|
154
168
|
|
|
155
169
|
`undefined` \| [`IError`](../interfaces/IError.md)
|
|
@@ -170,14 +184,18 @@ Test to see if the error has the specified error name.
|
|
|
170
184
|
|
|
171
185
|
#### Parameters
|
|
172
186
|
|
|
173
|
-
|
|
187
|
+
##### error
|
|
188
|
+
|
|
189
|
+
`unknown`
|
|
174
190
|
|
|
175
191
|
The error to test.
|
|
176
192
|
|
|
177
|
-
|
|
193
|
+
##### name
|
|
178
194
|
|
|
179
195
|
The name to check for.
|
|
180
196
|
|
|
197
|
+
`string` | `RegExp`
|
|
198
|
+
|
|
181
199
|
#### Returns
|
|
182
200
|
|
|
183
201
|
`error is BaseError`
|
|
@@ -198,14 +216,18 @@ Test to see if the error has the specified error message.
|
|
|
198
216
|
|
|
199
217
|
#### Parameters
|
|
200
218
|
|
|
201
|
-
|
|
219
|
+
##### error
|
|
220
|
+
|
|
221
|
+
`unknown`
|
|
202
222
|
|
|
203
223
|
The error to test.
|
|
204
224
|
|
|
205
|
-
|
|
225
|
+
##### message
|
|
206
226
|
|
|
207
227
|
The message to check for.
|
|
208
228
|
|
|
229
|
+
`string` | `RegExp`
|
|
230
|
+
|
|
209
231
|
#### Returns
|
|
210
232
|
|
|
211
233
|
`error is BaseError`
|
|
@@ -226,14 +248,18 @@ Test to see if the error has the specified error code.
|
|
|
226
248
|
|
|
227
249
|
#### Parameters
|
|
228
250
|
|
|
229
|
-
|
|
251
|
+
##### error
|
|
252
|
+
|
|
253
|
+
`unknown`
|
|
230
254
|
|
|
231
255
|
The error to test.
|
|
232
256
|
|
|
233
|
-
|
|
257
|
+
##### code
|
|
234
258
|
|
|
235
259
|
The code to check for.
|
|
236
260
|
|
|
261
|
+
`string` | `RegExp`
|
|
262
|
+
|
|
237
263
|
#### Returns
|
|
238
264
|
|
|
239
265
|
`boolean`
|
|
@@ -254,14 +280,18 @@ Test to see if any of the errors or children have the given error name.
|
|
|
254
280
|
|
|
255
281
|
#### Parameters
|
|
256
282
|
|
|
257
|
-
|
|
283
|
+
##### error
|
|
284
|
+
|
|
285
|
+
`unknown`
|
|
258
286
|
|
|
259
287
|
The error to test.
|
|
260
288
|
|
|
261
|
-
|
|
289
|
+
##### name
|
|
262
290
|
|
|
263
291
|
The name to check for.
|
|
264
292
|
|
|
293
|
+
`string` | `RegExp`
|
|
294
|
+
|
|
265
295
|
#### Returns
|
|
266
296
|
|
|
267
297
|
`error is BaseError`
|
|
@@ -282,14 +312,18 @@ Test to see if any of the errors or children have the given error message.
|
|
|
282
312
|
|
|
283
313
|
#### Parameters
|
|
284
314
|
|
|
285
|
-
|
|
315
|
+
##### error
|
|
316
|
+
|
|
317
|
+
`unknown`
|
|
286
318
|
|
|
287
319
|
The error to test.
|
|
288
320
|
|
|
289
|
-
|
|
321
|
+
##### message
|
|
290
322
|
|
|
291
323
|
The message to check for.
|
|
292
324
|
|
|
325
|
+
`string` | `RegExp`
|
|
326
|
+
|
|
293
327
|
#### Returns
|
|
294
328
|
|
|
295
329
|
`error is BaseError`
|
|
@@ -310,11 +344,15 @@ Test to see if any of the errors or children are from a specific class.
|
|
|
310
344
|
|
|
311
345
|
#### Parameters
|
|
312
346
|
|
|
313
|
-
|
|
347
|
+
##### error
|
|
348
|
+
|
|
349
|
+
`unknown`
|
|
314
350
|
|
|
315
351
|
The error to test.
|
|
316
352
|
|
|
317
|
-
|
|
353
|
+
##### cls
|
|
354
|
+
|
|
355
|
+
`string`
|
|
318
356
|
|
|
319
357
|
The class to check for.
|
|
320
358
|
|
|
@@ -338,14 +376,18 @@ Test to see if any of the errors or children have the given error code.
|
|
|
338
376
|
|
|
339
377
|
#### Parameters
|
|
340
378
|
|
|
341
|
-
|
|
379
|
+
##### error
|
|
380
|
+
|
|
381
|
+
`unknown`
|
|
342
382
|
|
|
343
383
|
The error to test.
|
|
344
384
|
|
|
345
|
-
|
|
385
|
+
##### code
|
|
346
386
|
|
|
347
387
|
The code to check for.
|
|
348
388
|
|
|
389
|
+
`string` | `RegExp`
|
|
390
|
+
|
|
349
391
|
#### Returns
|
|
350
392
|
|
|
351
393
|
`error is BaseError`
|
|
@@ -358,12 +400,46 @@ True if the error has the name.
|
|
|
358
400
|
|
|
359
401
|
***
|
|
360
402
|
|
|
403
|
+
### isEmpty()
|
|
404
|
+
|
|
405
|
+
> `static` **isEmpty**(`err`): `boolean`
|
|
406
|
+
|
|
407
|
+
Is the error empty.
|
|
408
|
+
|
|
409
|
+
#### Parameters
|
|
410
|
+
|
|
411
|
+
##### err
|
|
412
|
+
|
|
413
|
+
[`IError`](../interfaces/IError.md)
|
|
414
|
+
|
|
415
|
+
The error to check for being empty.
|
|
416
|
+
|
|
417
|
+
#### Returns
|
|
418
|
+
|
|
419
|
+
`boolean`
|
|
420
|
+
|
|
421
|
+
True if the error is empty.
|
|
422
|
+
|
|
423
|
+
#### Inherited from
|
|
424
|
+
|
|
425
|
+
[`BaseError`](BaseError.md).[`isEmpty`](BaseError.md#isempty)
|
|
426
|
+
|
|
427
|
+
***
|
|
428
|
+
|
|
361
429
|
### toJsonObject()
|
|
362
430
|
|
|
363
|
-
> **toJsonObject**(): [`IError`](../interfaces/IError.md)
|
|
431
|
+
> **toJsonObject**(`includeStackTrace?`): [`IError`](../interfaces/IError.md)
|
|
364
432
|
|
|
365
433
|
Serialize the error to the error model.
|
|
366
434
|
|
|
435
|
+
#### Parameters
|
|
436
|
+
|
|
437
|
+
##### includeStackTrace?
|
|
438
|
+
|
|
439
|
+
`boolean`
|
|
440
|
+
|
|
441
|
+
Whether to include the error stack in the model, defaults to false.
|
|
442
|
+
|
|
367
443
|
#### Returns
|
|
368
444
|
|
|
369
445
|
[`IError`](../interfaces/IError.md)
|