@twin.org/web 0.0.2-next.8 → 0.0.3-next.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/es/errors/fetchError.js +27 -0
- package/dist/es/errors/fetchError.js.map +1 -0
- package/dist/es/index.js +20 -0
- package/dist/es/index.js.map +1 -0
- package/dist/es/models/IFetchOptions.js +2 -0
- package/dist/es/models/IFetchOptions.js.map +1 -0
- package/dist/es/models/IHttpHeaders.js +4 -0
- package/dist/es/models/IHttpHeaders.js.map +1 -0
- package/dist/es/models/IJwk.js +2 -0
- package/dist/es/models/IJwk.js.map +1 -0
- package/dist/es/models/IJwtHeader.js +2 -0
- package/dist/es/models/IJwtHeader.js.map +1 -0
- package/dist/es/models/IJwtPayload.js +2 -0
- package/dist/es/models/IJwtPayload.js.map +1 -0
- package/dist/es/models/headerTypes.js +41 -0
- package/dist/es/models/headerTypes.js.map +1 -0
- package/dist/es/models/httpMethod.js +18 -0
- package/dist/es/models/httpMethod.js.map +1 -0
- package/dist/es/models/httpStatusCode.js +257 -0
- package/dist/es/models/httpStatusCode.js.map +1 -0
- package/dist/es/models/jwkCryptoKey.js +4 -0
- package/dist/es/models/jwkCryptoKey.js.map +1 -0
- package/dist/es/models/mimeTypes.js +101 -0
- package/dist/es/models/mimeTypes.js.map +1 -0
- package/dist/es/utils/fetchHelper.js +271 -0
- package/dist/es/utils/fetchHelper.js.map +1 -0
- package/dist/es/utils/headerHelper.js +34 -0
- package/dist/es/utils/headerHelper.js.map +1 -0
- package/dist/es/utils/jwk.js +99 -0
- package/dist/es/utils/jwk.js.map +1 -0
- package/dist/es/utils/jws.js +58 -0
- package/dist/es/utils/jws.js.map +1 -0
- package/dist/es/utils/jwt.js +243 -0
- package/dist/es/utils/jwt.js.map +1 -0
- package/dist/es/utils/mimeTypeHelper.js +144 -0
- package/dist/es/utils/mimeTypeHelper.js.map +1 -0
- package/dist/types/errors/fetchError.d.ts +1 -1
- package/dist/types/index.d.ts +17 -16
- package/dist/types/models/IFetchOptions.d.ts +1 -1
- package/dist/types/models/IJwk.d.ts +1 -2
- package/dist/types/models/IJwtHeader.d.ts +1 -2
- package/dist/types/models/IJwtPayload.d.ts +1 -2
- package/dist/types/utils/fetchHelper.d.ts +6 -2
- package/dist/types/utils/headerHelper.d.ts +17 -0
- package/dist/types/utils/jwk.d.ts +10 -4
- package/dist/types/utils/jws.d.ts +5 -1
- package/dist/types/utils/jwt.d.ts +7 -3
- package/docs/changelog.md +311 -0
- package/docs/reference/classes/FetchHelper.md +10 -2
- package/docs/reference/classes/HeaderHelper.md +57 -0
- package/docs/reference/classes/Jwk.md +27 -7
- package/docs/reference/classes/Jws.md +8 -0
- package/docs/reference/classes/Jwt.md +30 -22
- package/docs/reference/classes/MimeTypeHelper.md +5 -5
- package/docs/reference/index.md +4 -3
- package/docs/reference/type-aliases/IJwk.md +5 -0
- package/docs/reference/type-aliases/IJwtHeader.md +5 -0
- package/docs/reference/type-aliases/IJwtPayload.md +5 -0
- package/locales/.validate-ignore +1 -0
- package/locales/en.json +3 -2
- package/package.json +25 -12
- package/dist/cjs/index.cjs +0 -1269
- package/dist/esm/index.mjs +0 -1258
- package/docs/reference/interfaces/IJwk.md +0 -7
- package/docs/reference/interfaces/IJwtHeader.md +0 -13
- package/docs/reference/interfaces/IJwtPayload.md +0 -13
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,316 @@
|
|
|
1
1
|
# @twin.org/web - Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.3-next.1](https://github.com/twinfoundation/framework/compare/web-v0.0.3-next.0...web-v0.0.3-next.1) (2025-11-10)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add context id features ([#206](https://github.com/twinfoundation/framework/issues/206)) ([ef0d4ee](https://github.com/twinfoundation/framework/commit/ef0d4ee11a4f5fc6cc6f52a4958ce905c04ee13b))
|
|
9
|
+
* add guards arrayEndsWith and arrayStartsWith ([95d875e](https://github.com/twinfoundation/framework/commit/95d875ec8ccb4713c145fdde941d4cfedcec2ed3))
|
|
10
|
+
* add header helper for common bearer support ([0c940b2](https://github.com/twinfoundation/framework/commit/0c940b29cccf0c3bb5b4aa8a01f1998010e44d51))
|
|
11
|
+
* add jwk enc property overrides ([18b6309](https://github.com/twinfoundation/framework/commit/18b63092a386b56ea7fcd7e12865ac6e1b47cc1e))
|
|
12
|
+
* add kid method to Jwk ([bc9239e](https://github.com/twinfoundation/framework/commit/bc9239ed9896a053d83e00ca221e962704ebc277))
|
|
13
|
+
* add rsa cipher support ([7af6cc6](https://github.com/twinfoundation/framework/commit/7af6cc67512d3363bd4a2f2e87bd7733c2800147))
|
|
14
|
+
* add set method for async caches ([ba34b55](https://github.com/twinfoundation/framework/commit/ba34b55e651ad56ab8fc59e139e4af631c19cda0))
|
|
15
|
+
* add zlib/deflate mime types detection ([72c472b](https://github.com/twinfoundation/framework/commit/72c472b5a35a973e7109336f5b6cdd84dbb8bbcb))
|
|
16
|
+
* additional nameof operators ([a5aab60](https://github.com/twinfoundation/framework/commit/a5aab60bf66a86f1b7ff8af7c4f044cb03706d50))
|
|
17
|
+
* ensure the alg is the correct one when generating JWK or JWS ([#136](https://github.com/twinfoundation/framework/issues/136)) ([46a5af1](https://github.com/twinfoundation/framework/commit/46a5af127192d7048068275d14f555f09add3642))
|
|
18
|
+
* eslint migration to flat config ([74427d7](https://github.com/twinfoundation/framework/commit/74427d78d342167f7850e49ab87269326355befe))
|
|
19
|
+
* improve bearer creation and extraction ([b9ddd6d](https://github.com/twinfoundation/framework/commit/b9ddd6dae0cb558e2227f0ec5e9cd21f85957400))
|
|
20
|
+
* improve bearer creation and extraction ([29a347a](https://github.com/twinfoundation/framework/commit/29a347a760cb3bc5eb819112e84f1ac99430e72b))
|
|
21
|
+
* locales validation ([#197](https://github.com/twinfoundation/framework/issues/197)) ([55fdadb](https://github.com/twinfoundation/framework/commit/55fdadb13595ce0047f787bd1d4135d429a99f12))
|
|
22
|
+
* propagate includeStackTrace on error conversion ([098fc72](https://github.com/twinfoundation/framework/commit/098fc729939ea3127f2bdcc0ddb6754096c5f919))
|
|
23
|
+
* relocate core packages from tools ([bcab8f3](https://github.com/twinfoundation/framework/commit/bcab8f3160442ea4fcaf442947462504f3d6a17d))
|
|
24
|
+
* update dependencies ([f3bd015](https://github.com/twinfoundation/framework/commit/f3bd015efd169196b7e0335f5cab876ba6ca1d75))
|
|
25
|
+
* use cause instead of inner for errors ([1f4acc4](https://github.com/twinfoundation/framework/commit/1f4acc4d7a6b71a134d9547da9bf40de1e1e49da))
|
|
26
|
+
* use new shared store mechanism ([#131](https://github.com/twinfoundation/framework/issues/131)) ([934385b](https://github.com/twinfoundation/framework/commit/934385b2fbaf9f5c00a505ebf9d093bd5a425f55))
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Bug Fixes
|
|
30
|
+
|
|
31
|
+
* wrap inner error within FetchError / 2 ([#134](https://github.com/twinfoundation/framework/issues/134)) ([2ddb101](https://github.com/twinfoundation/framework/commit/2ddb101c3778be4e99559e37aa036cd7101585fb))
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
### Dependencies
|
|
35
|
+
|
|
36
|
+
* The following workspace dependencies were updated
|
|
37
|
+
* dependencies
|
|
38
|
+
* @twin.org/core bumped from 0.0.3-next.0 to 0.0.3-next.1
|
|
39
|
+
* @twin.org/crypto bumped from 0.0.3-next.0 to 0.0.3-next.1
|
|
40
|
+
* @twin.org/nameof bumped from 0.0.3-next.0 to 0.0.3-next.1
|
|
41
|
+
* devDependencies
|
|
42
|
+
* @twin.org/nameof-transformer bumped from 0.0.3-next.0 to 0.0.3-next.1
|
|
43
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.0 to 0.0.3-next.1
|
|
44
|
+
* @twin.org/validate-locales bumped from 0.0.3-next.0 to 0.0.3-next.1
|
|
45
|
+
|
|
46
|
+
## [0.0.2-next.22](https://github.com/twinfoundation/framework/compare/web-v0.0.2-next.21...web-v0.0.2-next.22) (2025-10-10)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
### Miscellaneous Chores
|
|
50
|
+
|
|
51
|
+
* **web:** Synchronize repo versions
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
### Dependencies
|
|
55
|
+
|
|
56
|
+
* The following workspace dependencies were updated
|
|
57
|
+
* dependencies
|
|
58
|
+
* @twin.org/core bumped from 0.0.2-next.21 to 0.0.2-next.22
|
|
59
|
+
* @twin.org/crypto bumped from 0.0.2-next.21 to 0.0.2-next.22
|
|
60
|
+
* @twin.org/nameof bumped from 0.0.2-next.21 to 0.0.2-next.22
|
|
61
|
+
* devDependencies
|
|
62
|
+
* @twin.org/nameof-transformer bumped from 0.0.2-next.21 to 0.0.2-next.22
|
|
63
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.2-next.21 to 0.0.2-next.22
|
|
64
|
+
* @twin.org/validate-locales bumped from 0.0.2-next.21 to 0.0.2-next.22
|
|
65
|
+
|
|
66
|
+
## [0.0.2-next.21](https://github.com/twinfoundation/framework/compare/web-v0.0.2-next.20...web-v0.0.2-next.21) (2025-10-09)
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
### Features
|
|
70
|
+
|
|
71
|
+
* locales validation ([#197](https://github.com/twinfoundation/framework/issues/197)) ([55fdadb](https://github.com/twinfoundation/framework/commit/55fdadb13595ce0047f787bd1d4135d429a99f12))
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
### Dependencies
|
|
75
|
+
|
|
76
|
+
* The following workspace dependencies were updated
|
|
77
|
+
* dependencies
|
|
78
|
+
* @twin.org/core bumped from 0.0.2-next.20 to 0.0.2-next.21
|
|
79
|
+
* @twin.org/crypto bumped from 0.0.2-next.20 to 0.0.2-next.21
|
|
80
|
+
* @twin.org/nameof bumped from 0.0.2-next.20 to 0.0.2-next.21
|
|
81
|
+
* devDependencies
|
|
82
|
+
* @twin.org/nameof-transformer bumped from 0.0.2-next.20 to 0.0.2-next.21
|
|
83
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.2-next.20 to 0.0.2-next.21
|
|
84
|
+
* @twin.org/validate-locales bumped from 0.0.2-next.20 to 0.0.2-next.21
|
|
85
|
+
|
|
86
|
+
## [0.0.2-next.20](https://github.com/twinfoundation/framework/compare/web-v0.0.2-next.19...web-v0.0.2-next.20) (2025-10-02)
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
### Miscellaneous Chores
|
|
90
|
+
|
|
91
|
+
* **web:** Synchronize repo versions
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
### Dependencies
|
|
95
|
+
|
|
96
|
+
* The following workspace dependencies were updated
|
|
97
|
+
* dependencies
|
|
98
|
+
* @twin.org/core bumped from 0.0.2-next.19 to 0.0.2-next.20
|
|
99
|
+
* @twin.org/crypto bumped from 0.0.2-next.19 to 0.0.2-next.20
|
|
100
|
+
* @twin.org/nameof bumped from 0.0.2-next.19 to 0.0.2-next.20
|
|
101
|
+
* devDependencies
|
|
102
|
+
* @twin.org/nameof-transformer bumped from 0.0.2-next.19 to 0.0.2-next.20
|
|
103
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.2-next.19 to 0.0.2-next.20
|
|
104
|
+
|
|
105
|
+
## [0.0.2-next.19](https://github.com/twinfoundation/framework/compare/web-v0.0.2-next.18...web-v0.0.2-next.19) (2025-09-30)
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
### Miscellaneous Chores
|
|
109
|
+
|
|
110
|
+
* **web:** Synchronize repo versions
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
### Dependencies
|
|
114
|
+
|
|
115
|
+
* The following workspace dependencies were updated
|
|
116
|
+
* dependencies
|
|
117
|
+
* @twin.org/core bumped from 0.0.2-next.18 to 0.0.2-next.19
|
|
118
|
+
* @twin.org/crypto bumped from 0.0.2-next.18 to 0.0.2-next.19
|
|
119
|
+
* @twin.org/nameof bumped from 0.0.2-next.18 to 0.0.2-next.19
|
|
120
|
+
* devDependencies
|
|
121
|
+
* @twin.org/nameof-transformer bumped from 0.0.2-next.18 to 0.0.2-next.19
|
|
122
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.2-next.18 to 0.0.2-next.19
|
|
123
|
+
|
|
124
|
+
## [0.0.2-next.18](https://github.com/twinfoundation/framework/compare/web-v0.0.2-next.17...web-v0.0.2-next.18) (2025-09-29)
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
### Miscellaneous Chores
|
|
128
|
+
|
|
129
|
+
* **web:** Synchronize repo versions
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
### Dependencies
|
|
133
|
+
|
|
134
|
+
* The following workspace dependencies were updated
|
|
135
|
+
* dependencies
|
|
136
|
+
* @twin.org/core bumped from 0.0.2-next.17 to 0.0.2-next.18
|
|
137
|
+
* @twin.org/crypto bumped from 0.0.2-next.17 to 0.0.2-next.18
|
|
138
|
+
* @twin.org/nameof bumped from 0.0.2-next.17 to 0.0.2-next.18
|
|
139
|
+
* devDependencies
|
|
140
|
+
* @twin.org/nameof-transformer bumped from 0.0.2-next.17 to 0.0.2-next.18
|
|
141
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.2-next.17 to 0.0.2-next.18
|
|
142
|
+
|
|
143
|
+
## [0.0.2-next.17](https://github.com/twinfoundation/framework/compare/web-v0.0.2-next.16...web-v0.0.2-next.17) (2025-09-29)
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
### Features
|
|
147
|
+
|
|
148
|
+
* additional nameof operators ([a5aab60](https://github.com/twinfoundation/framework/commit/a5aab60bf66a86f1b7ff8af7c4f044cb03706d50))
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
### Dependencies
|
|
152
|
+
|
|
153
|
+
* The following workspace dependencies were updated
|
|
154
|
+
* dependencies
|
|
155
|
+
* @twin.org/core bumped from 0.0.2-next.16 to 0.0.2-next.17
|
|
156
|
+
* @twin.org/crypto bumped from 0.0.2-next.16 to 0.0.2-next.17
|
|
157
|
+
* @twin.org/nameof bumped from 0.0.2-next.16 to 0.0.2-next.17
|
|
158
|
+
* devDependencies
|
|
159
|
+
* @twin.org/nameof-transformer bumped from 0.0.2-next.16 to 0.0.2-next.17
|
|
160
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.2-next.16 to 0.0.2-next.17
|
|
161
|
+
|
|
162
|
+
## [0.0.2-next.16](https://github.com/twinfoundation/framework/compare/web-v0.0.2-next.15...web-v0.0.2-next.16) (2025-09-28)
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
### Miscellaneous Chores
|
|
166
|
+
|
|
167
|
+
* **web:** Synchronize repo versions
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
### Dependencies
|
|
171
|
+
|
|
172
|
+
* The following workspace dependencies were updated
|
|
173
|
+
* dependencies
|
|
174
|
+
* @twin.org/core bumped from 0.0.2-next.15 to 0.0.2-next.16
|
|
175
|
+
* @twin.org/crypto bumped from 0.0.2-next.15 to 0.0.2-next.16
|
|
176
|
+
* @twin.org/nameof bumped from 0.0.2-next.15 to 0.0.2-next.16
|
|
177
|
+
* devDependencies
|
|
178
|
+
* @twin.org/nameof-transformer bumped from 0.0.2-next.15 to 0.0.2-next.16
|
|
179
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.2-next.15 to 0.0.2-next.16
|
|
180
|
+
|
|
181
|
+
## [0.0.2-next.15](https://github.com/twinfoundation/framework/compare/web-v0.0.2-next.14...web-v0.0.2-next.15) (2025-09-22)
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
### Features
|
|
185
|
+
|
|
186
|
+
* improve bearer creation and extraction ([29a347a](https://github.com/twinfoundation/framework/commit/29a347a760cb3bc5eb819112e84f1ac99430e72b))
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
### Dependencies
|
|
190
|
+
|
|
191
|
+
* The following workspace dependencies were updated
|
|
192
|
+
* dependencies
|
|
193
|
+
* @twin.org/core bumped from 0.0.2-next.14 to 0.0.2-next.15
|
|
194
|
+
* @twin.org/crypto bumped from 0.0.2-next.14 to 0.0.2-next.15
|
|
195
|
+
* @twin.org/nameof bumped from 0.0.2-next.14 to 0.0.2-next.15
|
|
196
|
+
* devDependencies
|
|
197
|
+
* @twin.org/nameof-transformer bumped from 0.0.2-next.14 to 0.0.2-next.15
|
|
198
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.2-next.14 to 0.0.2-next.15
|
|
199
|
+
|
|
200
|
+
## [0.0.2-next.14](https://github.com/twinfoundation/framework/compare/web-v0.0.2-next.13...web-v0.0.2-next.14) (2025-09-22)
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
### Features
|
|
204
|
+
|
|
205
|
+
* add header helper for common bearer support ([0c940b2](https://github.com/twinfoundation/framework/commit/0c940b29cccf0c3bb5b4aa8a01f1998010e44d51))
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
### Dependencies
|
|
209
|
+
|
|
210
|
+
* The following workspace dependencies were updated
|
|
211
|
+
* dependencies
|
|
212
|
+
* @twin.org/core bumped from 0.0.2-next.13 to 0.0.2-next.14
|
|
213
|
+
* @twin.org/crypto bumped from 0.0.2-next.13 to 0.0.2-next.14
|
|
214
|
+
* @twin.org/nameof bumped from 0.0.2-next.13 to 0.0.2-next.14
|
|
215
|
+
* devDependencies
|
|
216
|
+
* @twin.org/nameof-transformer bumped from 0.0.2-next.13 to 0.0.2-next.14
|
|
217
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.2-next.13 to 0.0.2-next.14
|
|
218
|
+
|
|
219
|
+
## [0.0.2-next.13](https://github.com/twinfoundation/framework/compare/web-v0.0.2-next.12...web-v0.0.2-next.13) (2025-09-22)
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
### Miscellaneous Chores
|
|
223
|
+
|
|
224
|
+
* **web:** Synchronize repo versions
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
### Dependencies
|
|
228
|
+
|
|
229
|
+
* The following workspace dependencies were updated
|
|
230
|
+
* dependencies
|
|
231
|
+
* @twin.org/core bumped from 0.0.2-next.12 to 0.0.2-next.13
|
|
232
|
+
* @twin.org/crypto bumped from 0.0.2-next.12 to 0.0.2-next.13
|
|
233
|
+
* @twin.org/nameof bumped from 0.0.2-next.12 to 0.0.2-next.13
|
|
234
|
+
* devDependencies
|
|
235
|
+
* @twin.org/nameof-transformer bumped from 0.0.2-next.12 to 0.0.2-next.13
|
|
236
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.2-next.12 to 0.0.2-next.13
|
|
237
|
+
|
|
238
|
+
## [0.0.2-next.12](https://github.com/twinfoundation/framework/compare/web-v0.0.2-next.11...web-v0.0.2-next.12) (2025-09-15)
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
### Features
|
|
242
|
+
|
|
243
|
+
* add jwk enc property overrides ([18b6309](https://github.com/twinfoundation/framework/commit/18b63092a386b56ea7fcd7e12865ac6e1b47cc1e))
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
### Dependencies
|
|
247
|
+
|
|
248
|
+
* The following workspace dependencies were updated
|
|
249
|
+
* dependencies
|
|
250
|
+
* @twin.org/core bumped from 0.0.2-next.11 to 0.0.2-next.12
|
|
251
|
+
* @twin.org/crypto bumped from 0.0.2-next.11 to 0.0.2-next.12
|
|
252
|
+
* @twin.org/nameof bumped from 0.0.2-next.11 to 0.0.2-next.12
|
|
253
|
+
* devDependencies
|
|
254
|
+
* @twin.org/nameof-transformer bumped from 0.0.2-next.11 to 0.0.2-next.12
|
|
255
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.2-next.11 to 0.0.2-next.12
|
|
256
|
+
|
|
257
|
+
## [0.0.2-next.11](https://github.com/twinfoundation/framework/compare/web-v0.0.2-next.10...web-v0.0.2-next.11) (2025-09-15)
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
### Miscellaneous Chores
|
|
261
|
+
|
|
262
|
+
* **web:** Synchronize repo versions
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
### Dependencies
|
|
266
|
+
|
|
267
|
+
* The following workspace dependencies were updated
|
|
268
|
+
* dependencies
|
|
269
|
+
* @twin.org/core bumped from 0.0.2-next.10 to 0.0.2-next.11
|
|
270
|
+
* @twin.org/crypto bumped from 0.0.2-next.10 to 0.0.2-next.11
|
|
271
|
+
* @twin.org/nameof bumped from 0.0.2-next.10 to 0.0.2-next.11
|
|
272
|
+
* devDependencies
|
|
273
|
+
* @twin.org/nameof-transformer bumped from 0.0.2-next.10 to 0.0.2-next.11
|
|
274
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.2-next.10 to 0.0.2-next.11
|
|
275
|
+
|
|
276
|
+
## [0.0.2-next.10](https://github.com/twinfoundation/framework/compare/web-v0.0.2-next.9...web-v0.0.2-next.10) (2025-09-11)
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
### Miscellaneous Chores
|
|
280
|
+
|
|
281
|
+
* **web:** Synchronize repo versions
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
### Dependencies
|
|
285
|
+
|
|
286
|
+
* The following workspace dependencies were updated
|
|
287
|
+
* dependencies
|
|
288
|
+
* @twin.org/core bumped from 0.0.2-next.9 to 0.0.2-next.10
|
|
289
|
+
* @twin.org/crypto bumped from 0.0.2-next.9 to 0.0.2-next.10
|
|
290
|
+
* @twin.org/nameof bumped from 0.0.2-next.9 to 0.0.2-next.10
|
|
291
|
+
* devDependencies
|
|
292
|
+
* @twin.org/nameof-transformer bumped from 0.0.2-next.9 to 0.0.2-next.10
|
|
293
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.2-next.9 to 0.0.2-next.10
|
|
294
|
+
|
|
295
|
+
## [0.0.2-next.9](https://github.com/twinfoundation/framework/compare/web-v0.0.2-next.8...web-v0.0.2-next.9) (2025-09-08)
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
### Miscellaneous Chores
|
|
299
|
+
|
|
300
|
+
* **web:** Synchronize repo versions
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
### Dependencies
|
|
304
|
+
|
|
305
|
+
* The following workspace dependencies were updated
|
|
306
|
+
* dependencies
|
|
307
|
+
* @twin.org/core bumped from 0.0.2-next.8 to 0.0.2-next.9
|
|
308
|
+
* @twin.org/crypto bumped from 0.0.2-next.8 to 0.0.2-next.9
|
|
309
|
+
* @twin.org/nameof bumped from 0.0.2-next.8 to 0.0.2-next.9
|
|
310
|
+
* devDependencies
|
|
311
|
+
* @twin.org/nameof-transformer bumped from 0.0.2-next.8 to 0.0.2-next.9
|
|
312
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.2-next.8 to 0.0.2-next.9
|
|
313
|
+
|
|
3
314
|
## [0.0.2-next.8](https://github.com/twinfoundation/framework/compare/web-v0.0.2-next.7...web-v0.0.2-next.8) (2025-09-05)
|
|
4
315
|
|
|
5
316
|
|
|
@@ -12,6 +12,14 @@ Class to helper with fetch operations.
|
|
|
12
12
|
|
|
13
13
|
`FetchHelper`
|
|
14
14
|
|
|
15
|
+
## Properties
|
|
16
|
+
|
|
17
|
+
### CLASS\_NAME
|
|
18
|
+
|
|
19
|
+
> `readonly` `static` **CLASS\_NAME**: `string`
|
|
20
|
+
|
|
21
|
+
Runtime name for the class.
|
|
22
|
+
|
|
15
23
|
## Methods
|
|
16
24
|
|
|
17
25
|
### fetch()
|
|
@@ -182,7 +190,7 @@ Clears the cache.
|
|
|
182
190
|
|
|
183
191
|
### getCacheEntry()
|
|
184
192
|
|
|
185
|
-
> `static` **getCacheEntry**\<`T`\>(`url`): `Promise`\<`
|
|
193
|
+
> `static` **getCacheEntry**\<`T`\>(`url`): `Promise`\<`T` \| `undefined`\>
|
|
186
194
|
|
|
187
195
|
Get a cache entry.
|
|
188
196
|
|
|
@@ -202,7 +210,7 @@ The url for the request.
|
|
|
202
210
|
|
|
203
211
|
#### Returns
|
|
204
212
|
|
|
205
|
-
`Promise`\<`
|
|
213
|
+
`Promise`\<`T` \| `undefined`\>
|
|
206
214
|
|
|
207
215
|
The cache entry if it exists.
|
|
208
216
|
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Class: HeaderHelper
|
|
2
|
+
|
|
3
|
+
Class to helper with header operations.
|
|
4
|
+
|
|
5
|
+
## Constructors
|
|
6
|
+
|
|
7
|
+
### Constructor
|
|
8
|
+
|
|
9
|
+
> **new HeaderHelper**(): `HeaderHelper`
|
|
10
|
+
|
|
11
|
+
#### Returns
|
|
12
|
+
|
|
13
|
+
`HeaderHelper`
|
|
14
|
+
|
|
15
|
+
## Methods
|
|
16
|
+
|
|
17
|
+
### createBearer()
|
|
18
|
+
|
|
19
|
+
> `static` **createBearer**(`token`): `string`
|
|
20
|
+
|
|
21
|
+
Create a bearer token header.
|
|
22
|
+
|
|
23
|
+
#### Parameters
|
|
24
|
+
|
|
25
|
+
##### token
|
|
26
|
+
|
|
27
|
+
`unknown`
|
|
28
|
+
|
|
29
|
+
The token to create the header for.
|
|
30
|
+
|
|
31
|
+
#### Returns
|
|
32
|
+
|
|
33
|
+
`string`
|
|
34
|
+
|
|
35
|
+
The bearer token header.
|
|
36
|
+
|
|
37
|
+
***
|
|
38
|
+
|
|
39
|
+
### extractBearer()
|
|
40
|
+
|
|
41
|
+
> `static` **extractBearer**(`header`): `string`
|
|
42
|
+
|
|
43
|
+
Extract the bearer token from a header.
|
|
44
|
+
|
|
45
|
+
#### Parameters
|
|
46
|
+
|
|
47
|
+
##### header
|
|
48
|
+
|
|
49
|
+
`unknown`
|
|
50
|
+
|
|
51
|
+
The header value to extract the token from.
|
|
52
|
+
|
|
53
|
+
#### Returns
|
|
54
|
+
|
|
55
|
+
`string`
|
|
56
|
+
|
|
57
|
+
The extracted token if it exists.
|
|
@@ -12,6 +12,14 @@ Class to handle JSON Web Keys.
|
|
|
12
12
|
|
|
13
13
|
`Jwk`
|
|
14
14
|
|
|
15
|
+
## Properties
|
|
16
|
+
|
|
17
|
+
### CLASS\_NAME
|
|
18
|
+
|
|
19
|
+
> `readonly` `static` **CLASS\_NAME**: `string`
|
|
20
|
+
|
|
21
|
+
Runtime name for the class.
|
|
22
|
+
|
|
15
23
|
## Methods
|
|
16
24
|
|
|
17
25
|
### toCryptoKey()
|
|
@@ -24,7 +32,7 @@ Convert the JWK to a crypto key.
|
|
|
24
32
|
|
|
25
33
|
##### jwk
|
|
26
34
|
|
|
27
|
-
|
|
35
|
+
`JWK`
|
|
28
36
|
|
|
29
37
|
The JWK to convert.
|
|
30
38
|
|
|
@@ -44,7 +52,7 @@ The crypto key.
|
|
|
44
52
|
|
|
45
53
|
### fromEd25519Private()
|
|
46
54
|
|
|
47
|
-
> `static` **fromEd25519Private**(`privateKey`): `Promise
|
|
55
|
+
> `static` **fromEd25519Private**(`privateKey`, `overrideUse?`): `Promise`\<`JWK`\>
|
|
48
56
|
|
|
49
57
|
Convert the Ed25519 private key to a crypto key.
|
|
50
58
|
|
|
@@ -56,9 +64,15 @@ Convert the Ed25519 private key to a crypto key.
|
|
|
56
64
|
|
|
57
65
|
The private key to use.
|
|
58
66
|
|
|
67
|
+
##### overrideUse?
|
|
68
|
+
|
|
69
|
+
`string`
|
|
70
|
+
|
|
71
|
+
Optional override for the use property, defaults to "sig".
|
|
72
|
+
|
|
59
73
|
#### Returns
|
|
60
74
|
|
|
61
|
-
`Promise
|
|
75
|
+
`Promise`\<`JWK`\>
|
|
62
76
|
|
|
63
77
|
The crypto key.
|
|
64
78
|
|
|
@@ -66,7 +80,7 @@ The crypto key.
|
|
|
66
80
|
|
|
67
81
|
### fromEd25519Public()
|
|
68
82
|
|
|
69
|
-
> `static` **fromEd25519Public**(`publicKey`): `Promise
|
|
83
|
+
> `static` **fromEd25519Public**(`publicKey`, `overrideUse?`): `Promise`\<`JWK`\>
|
|
70
84
|
|
|
71
85
|
Convert the Ed25519 public key to a crypto key.
|
|
72
86
|
|
|
@@ -78,9 +92,15 @@ Convert the Ed25519 public key to a crypto key.
|
|
|
78
92
|
|
|
79
93
|
The private key to use.
|
|
80
94
|
|
|
95
|
+
##### overrideUse?
|
|
96
|
+
|
|
97
|
+
`string`
|
|
98
|
+
|
|
99
|
+
Optional override for the use property, defaults to "sig".
|
|
100
|
+
|
|
81
101
|
#### Returns
|
|
82
102
|
|
|
83
|
-
`Promise
|
|
103
|
+
`Promise`\<`JWK`\>
|
|
84
104
|
|
|
85
105
|
The crypto key.
|
|
86
106
|
|
|
@@ -96,7 +116,7 @@ Convert the JWK to raw keys.
|
|
|
96
116
|
|
|
97
117
|
##### jwk
|
|
98
118
|
|
|
99
|
-
|
|
119
|
+
`JWK`
|
|
100
120
|
|
|
101
121
|
The JWK to convert to raw.
|
|
102
122
|
|
|
@@ -118,7 +138,7 @@ Generate a KID for the JWK.
|
|
|
118
138
|
|
|
119
139
|
##### jwk
|
|
120
140
|
|
|
121
|
-
|
|
141
|
+
`JWK`
|
|
122
142
|
|
|
123
143
|
The JWK to generate a KID for.
|
|
124
144
|
|
|
@@ -12,6 +12,14 @@ Class to handle JSON Web Tokens.
|
|
|
12
12
|
|
|
13
13
|
`Jwt`
|
|
14
14
|
|
|
15
|
+
## Properties
|
|
16
|
+
|
|
17
|
+
### CLASS\_NAME
|
|
18
|
+
|
|
19
|
+
> `readonly` `static` **CLASS\_NAME**: `string`
|
|
20
|
+
|
|
21
|
+
Runtime name for the class.
|
|
22
|
+
|
|
15
23
|
## Methods
|
|
16
24
|
|
|
17
25
|
### encode()
|
|
@@ -24,11 +32,11 @@ Encode a token.
|
|
|
24
32
|
|
|
25
33
|
##### T
|
|
26
34
|
|
|
27
|
-
`T` *extends*
|
|
35
|
+
`T` *extends* `JWTHeaderParameters`
|
|
28
36
|
|
|
29
37
|
##### U
|
|
30
38
|
|
|
31
|
-
`U` *extends*
|
|
39
|
+
`U` *extends* `JWTPayload`
|
|
32
40
|
|
|
33
41
|
#### Parameters
|
|
34
42
|
|
|
@@ -68,11 +76,11 @@ Encode a token.
|
|
|
68
76
|
|
|
69
77
|
##### T
|
|
70
78
|
|
|
71
|
-
`T` *extends*
|
|
79
|
+
`T` *extends* `JWTHeaderParameters`
|
|
72
80
|
|
|
73
81
|
##### U
|
|
74
82
|
|
|
75
|
-
`U` *extends*
|
|
83
|
+
`U` *extends* `JWTPayload`
|
|
76
84
|
|
|
77
85
|
#### Parameters
|
|
78
86
|
|
|
@@ -112,11 +120,11 @@ Decode a token.
|
|
|
112
120
|
|
|
113
121
|
##### T
|
|
114
122
|
|
|
115
|
-
`T` *extends*
|
|
123
|
+
`T` *extends* `JWTHeaderParameters`
|
|
116
124
|
|
|
117
125
|
##### U
|
|
118
126
|
|
|
119
|
-
`U` *extends*
|
|
127
|
+
`U` *extends* `JWTPayload`
|
|
120
128
|
|
|
121
129
|
#### Parameters
|
|
122
130
|
|
|
@@ -144,11 +152,11 @@ Verify a token.
|
|
|
144
152
|
|
|
145
153
|
##### T
|
|
146
154
|
|
|
147
|
-
`T` *extends*
|
|
155
|
+
`T` *extends* `JWTHeaderParameters`
|
|
148
156
|
|
|
149
157
|
##### U
|
|
150
158
|
|
|
151
|
-
`U` *extends*
|
|
159
|
+
`U` *extends* `JWTPayload`
|
|
152
160
|
|
|
153
161
|
#### Parameters
|
|
154
162
|
|
|
@@ -182,11 +190,11 @@ Verify a token.
|
|
|
182
190
|
|
|
183
191
|
##### T
|
|
184
192
|
|
|
185
|
-
`T` *extends*
|
|
193
|
+
`T` *extends* `JWTHeaderParameters`
|
|
186
194
|
|
|
187
195
|
##### U
|
|
188
196
|
|
|
189
|
-
`U` *extends*
|
|
197
|
+
`U` *extends* `JWTPayload`
|
|
190
198
|
|
|
191
199
|
#### Parameters
|
|
192
200
|
|
|
@@ -220,11 +228,11 @@ Verify a token by parts.
|
|
|
220
228
|
|
|
221
229
|
##### T
|
|
222
230
|
|
|
223
|
-
`T` *extends*
|
|
231
|
+
`T` *extends* `JWTHeaderParameters`
|
|
224
232
|
|
|
225
233
|
##### U
|
|
226
234
|
|
|
227
|
-
`U` *extends*
|
|
235
|
+
`U` *extends* `JWTPayload`
|
|
228
236
|
|
|
229
237
|
#### Parameters
|
|
230
238
|
|
|
@@ -264,13 +272,13 @@ The default signer for the JWT.
|
|
|
264
272
|
|
|
265
273
|
##### header
|
|
266
274
|
|
|
267
|
-
|
|
275
|
+
`JWTHeaderParameters`
|
|
268
276
|
|
|
269
277
|
The header to sign.
|
|
270
278
|
|
|
271
279
|
##### payload
|
|
272
280
|
|
|
273
|
-
|
|
281
|
+
`JWTPayload`
|
|
274
282
|
|
|
275
283
|
The payload to sign.
|
|
276
284
|
|
|
@@ -278,7 +286,7 @@ The payload to sign.
|
|
|
278
286
|
|
|
279
287
|
The optional key to sign with.
|
|
280
288
|
|
|
281
|
-
|
|
289
|
+
[`JwkCryptoKey`](../type-aliases/JwkCryptoKey.md) | `undefined`
|
|
282
290
|
|
|
283
291
|
#### Returns
|
|
284
292
|
|
|
@@ -298,11 +306,11 @@ The default verifier for the JWT.
|
|
|
298
306
|
|
|
299
307
|
##### T
|
|
300
308
|
|
|
301
|
-
`T` *extends*
|
|
309
|
+
`T` *extends* `JWTHeaderParameters`
|
|
302
310
|
|
|
303
311
|
##### U
|
|
304
312
|
|
|
305
|
-
`U` *extends*
|
|
313
|
+
`U` *extends* `JWTPayload`
|
|
306
314
|
|
|
307
315
|
#### Parameters
|
|
308
316
|
|
|
@@ -316,7 +324,7 @@ The token to verify.
|
|
|
316
324
|
|
|
317
325
|
The key to verify with.
|
|
318
326
|
|
|
319
|
-
|
|
327
|
+
[`JwkCryptoKey`](../type-aliases/JwkCryptoKey.md) | `undefined`
|
|
320
328
|
|
|
321
329
|
#### Returns
|
|
322
330
|
|
|
@@ -336,11 +344,11 @@ Create bytes for signing from header and payload.
|
|
|
336
344
|
|
|
337
345
|
##### T
|
|
338
346
|
|
|
339
|
-
`T` *extends*
|
|
347
|
+
`T` *extends* `JWTHeaderParameters`
|
|
340
348
|
|
|
341
349
|
##### U
|
|
342
350
|
|
|
343
|
-
`U` *extends*
|
|
351
|
+
`U` *extends* `JWTPayload`
|
|
344
352
|
|
|
345
353
|
#### Parameters
|
|
346
354
|
|
|
@@ -374,11 +382,11 @@ Create header and payload from signing bytes.
|
|
|
374
382
|
|
|
375
383
|
##### T
|
|
376
384
|
|
|
377
|
-
`T` *extends*
|
|
385
|
+
`T` *extends* `JWTHeaderParameters`
|
|
378
386
|
|
|
379
387
|
##### U
|
|
380
388
|
|
|
381
|
-
`U` *extends*
|
|
389
|
+
`U` *extends* `JWTPayload`
|
|
382
390
|
|
|
383
391
|
#### Parameters
|
|
384
392
|
|