@twin.org/context 0.0.3-next.4 → 0.0.3-next.40

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # TWIN Framework Context
2
2
 
3
- This package contains helper methods and classes for using contexts.
3
+ This package is part of the framework workspace and provides helper methods/classes for context handling to support consistent development workflows across the ecosystem.
4
4
 
5
5
  ## Installation
6
6
 
@@ -1,4 +1,2 @@
1
- // Copyright 2024 IOTA Stiftung.
2
- // SPDX-License-Identifier: Apache-2.0.
3
1
  export {};
4
2
  //# sourceMappingURL=IContextIdHandler.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"IContextIdHandler.js","sourceRoot":"","sources":["../../../src/models/IContextIdHandler.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Interface describing a context ID handler.\n */\nexport interface IContextIdHandler {\n\t/**\n\t * The short form version of the context ID, should be unique enough to partition data.\n\t * @param value The full context ID value.\n\t * @returns The short form version of the context ID.\n\t */\n\tshort?(value: string): string;\n\n\t/**\n\t * Performs a runtime guard on the provided context ID value.\n\t * @param value The context ID value to guard.\n\t * @throws Guard error if the value is invalid.\n\t */\n\tguard?(value: string): void;\n}\n"]}
1
+ {"version":3,"file":"IContextIdHandler.js","sourceRoot":"","sources":["../../../src/models/IContextIdHandler.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IComponent } from \"@twin.org/core\";\n\n/**\n * Interface describing a context ID handler.\n */\nexport interface IContextIdHandler extends IComponent {\n\t/**\n\t * The short form version of the context ID, should be unique enough to partition data.\n\t * @param value The full context ID value.\n\t * @returns The short form version of the context ID.\n\t */\n\tshort?(value: string): string;\n\n\t/**\n\t * Performs a runtime guard on the provided context ID value.\n\t * @param value The context ID value to guard.\n\t * @throws Guard error if the value is invalid.\n\t */\n\tguard?(value: string): void;\n}\n"]}
@@ -1,7 +1,8 @@
1
+ import type { IComponent } from "@twin.org/core";
1
2
  /**
2
3
  * Interface describing a context ID handler.
3
4
  */
4
- export interface IContextIdHandler {
5
+ export interface IContextIdHandler extends IComponent {
5
6
  /**
6
7
  * The short form version of the context ID, should be unique enough to partition data.
7
8
  * @param value The full context ID value.
package/docs/changelog.md CHANGED
@@ -1,12 +1,710 @@
1
1
  # Changelog
2
2
 
3
- ## [0.0.3-next.4](https://github.com/twinfoundation/framework/compare/context-v0.0.3-next.3...context-v0.0.3-next.4) (2025-11-13)
3
+ ## [0.0.3-next.40](https://github.com/iotaledger/twin-framework/compare/context-v0.0.3-next.39...context-v0.0.3-next.40) (2026-05-13)
4
+
5
+
6
+ ### Miscellaneous Chores
7
+
8
+ * **context:** Synchronize repo versions
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * The following workspace dependencies were updated
14
+ * dependencies
15
+ * @twin.org/core bumped from 0.0.3-next.39 to 0.0.3-next.40
16
+ * @twin.org/nameof bumped from 0.0.3-next.39 to 0.0.3-next.40
17
+ * devDependencies
18
+ * @twin.org/nameof-transformer bumped from 0.0.3-next.39 to 0.0.3-next.40
19
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.39 to 0.0.3-next.40
20
+ * @twin.org/validate-locales bumped from 0.0.3-next.39 to 0.0.3-next.40
21
+
22
+ ## [0.0.3-next.39](https://github.com/iotaledger/twin-framework/compare/context-v0.0.3-next.38...context-v0.0.3-next.39) (2026-05-13)
23
+
24
+
25
+ ### Miscellaneous Chores
26
+
27
+ * **context:** Synchronize repo versions
28
+
29
+
30
+ ### Dependencies
31
+
32
+ * The following workspace dependencies were updated
33
+ * dependencies
34
+ * @twin.org/core bumped from 0.0.3-next.38 to 0.0.3-next.39
35
+ * @twin.org/nameof bumped from 0.0.3-next.38 to 0.0.3-next.39
36
+ * devDependencies
37
+ * @twin.org/nameof-transformer bumped from 0.0.3-next.38 to 0.0.3-next.39
38
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.38 to 0.0.3-next.39
39
+ * @twin.org/validate-locales bumped from 0.0.3-next.38 to 0.0.3-next.39
40
+
41
+ ## [0.0.3-next.38](https://github.com/iotaledger/twin-framework/compare/context-v0.0.3-next.37...context-v0.0.3-next.38) (2026-05-11)
42
+
43
+
44
+ ### Features
45
+
46
+ * typescript 6 update ([1d10f31](https://github.com/iotaledger/twin-framework/commit/1d10f31e6516ec622773f45e88af82fe749b384a))
47
+
48
+
49
+ ### Dependencies
50
+
51
+ * The following workspace dependencies were updated
52
+ * dependencies
53
+ * @twin.org/core bumped from 0.0.3-next.37 to 0.0.3-next.38
54
+ * @twin.org/nameof bumped from 0.0.3-next.37 to 0.0.3-next.38
55
+ * devDependencies
56
+ * @twin.org/nameof-transformer bumped from 0.0.3-next.37 to 0.0.3-next.38
57
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.37 to 0.0.3-next.38
58
+ * @twin.org/validate-locales bumped from 0.0.3-next.37 to 0.0.3-next.38
59
+
60
+ ## [0.0.3-next.37](https://github.com/iotaledger/twin-framework/compare/context-v0.0.3-next.36...context-v0.0.3-next.37) (2026-05-07)
61
+
62
+
63
+ ### Miscellaneous Chores
64
+
65
+ * **context:** Synchronize repo versions
66
+
67
+
68
+ ### Dependencies
69
+
70
+ * The following workspace dependencies were updated
71
+ * dependencies
72
+ * @twin.org/core bumped from 0.0.3-next.36 to 0.0.3-next.37
73
+ * @twin.org/nameof bumped from 0.0.3-next.36 to 0.0.3-next.37
74
+ * devDependencies
75
+ * @twin.org/nameof-transformer bumped from 0.0.3-next.36 to 0.0.3-next.37
76
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.36 to 0.0.3-next.37
77
+ * @twin.org/validate-locales bumped from 0.0.3-next.36 to 0.0.3-next.37
78
+
79
+ ## [0.0.3-next.36](https://github.com/iotaledger/twin-framework/compare/context-v0.0.3-next.35...context-v0.0.3-next.36) (2026-05-07)
80
+
81
+
82
+ ### Miscellaneous Chores
83
+
84
+ * **context:** Synchronize repo versions
85
+
86
+
87
+ ### Dependencies
88
+
89
+ * The following workspace dependencies were updated
90
+ * dependencies
91
+ * @twin.org/core bumped from 0.0.3-next.35 to 0.0.3-next.36
92
+ * @twin.org/nameof bumped from 0.0.3-next.35 to 0.0.3-next.36
93
+ * devDependencies
94
+ * @twin.org/nameof-transformer bumped from 0.0.3-next.35 to 0.0.3-next.36
95
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.35 to 0.0.3-next.36
96
+ * @twin.org/validate-locales bumped from 0.0.3-next.35 to 0.0.3-next.36
97
+
98
+ ## [0.0.3-next.35](https://github.com/iotaledger/twin-framework/compare/context-v0.0.3-next.34...context-v0.0.3-next.35) (2026-05-06)
99
+
100
+
101
+ ### Miscellaneous Chores
102
+
103
+ * **context:** Synchronize repo versions
104
+
105
+
106
+ ### Dependencies
107
+
108
+ * The following workspace dependencies were updated
109
+ * dependencies
110
+ * @twin.org/core bumped from 0.0.3-next.34 to 0.0.3-next.35
111
+ * @twin.org/nameof bumped from 0.0.3-next.34 to 0.0.3-next.35
112
+ * devDependencies
113
+ * @twin.org/nameof-transformer bumped from 0.0.3-next.34 to 0.0.3-next.35
114
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.34 to 0.0.3-next.35
115
+ * @twin.org/validate-locales bumped from 0.0.3-next.34 to 0.0.3-next.35
116
+
117
+ ## [0.0.3-next.34](https://github.com/iotaledger/twin-framework/compare/context-v0.0.3-next.33...context-v0.0.3-next.34) (2026-05-06)
118
+
119
+
120
+ ### Miscellaneous Chores
121
+
122
+ * **context:** Synchronize repo versions
123
+
124
+
125
+ ### Dependencies
126
+
127
+ * The following workspace dependencies were updated
128
+ * dependencies
129
+ * @twin.org/core bumped from 0.0.3-next.33 to 0.0.3-next.34
130
+ * @twin.org/nameof bumped from 0.0.3-next.33 to 0.0.3-next.34
131
+ * devDependencies
132
+ * @twin.org/nameof-transformer bumped from 0.0.3-next.33 to 0.0.3-next.34
133
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.33 to 0.0.3-next.34
134
+ * @twin.org/validate-locales bumped from 0.0.3-next.33 to 0.0.3-next.34
135
+
136
+ ## [0.0.3-next.33](https://github.com/iotaledger/twin-framework/compare/context-v0.0.3-next.32...context-v0.0.3-next.33) (2026-05-05)
137
+
138
+
139
+ ### Miscellaneous Chores
140
+
141
+ * **context:** Synchronize repo versions
142
+
143
+
144
+ ### Dependencies
145
+
146
+ * The following workspace dependencies were updated
147
+ * dependencies
148
+ * @twin.org/core bumped from 0.0.3-next.32 to 0.0.3-next.33
149
+ * @twin.org/nameof bumped from 0.0.3-next.32 to 0.0.3-next.33
150
+ * devDependencies
151
+ * @twin.org/nameof-transformer bumped from 0.0.3-next.32 to 0.0.3-next.33
152
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.32 to 0.0.3-next.33
153
+ * @twin.org/validate-locales bumped from 0.0.3-next.32 to 0.0.3-next.33
154
+
155
+ ## [0.0.3-next.32](https://github.com/iotaledger/twin-framework/compare/context-v0.0.3-next.31...context-v0.0.3-next.32) (2026-04-30)
156
+
157
+
158
+ ### Miscellaneous Chores
159
+
160
+ * **context:** Synchronize repo versions
161
+
162
+
163
+ ### Dependencies
164
+
165
+ * The following workspace dependencies were updated
166
+ * dependencies
167
+ * @twin.org/core bumped from 0.0.3-next.31 to 0.0.3-next.32
168
+ * @twin.org/nameof bumped from 0.0.3-next.31 to 0.0.3-next.32
169
+ * devDependencies
170
+ * @twin.org/nameof-transformer bumped from 0.0.3-next.31 to 0.0.3-next.32
171
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.31 to 0.0.3-next.32
172
+ * @twin.org/validate-locales bumped from 0.0.3-next.31 to 0.0.3-next.32
173
+
174
+ ## [0.0.3-next.31](https://github.com/iotaledger/twin-framework/compare/context-v0.0.3-next.30...context-v0.0.3-next.31) (2026-04-14)
175
+
176
+
177
+ ### Miscellaneous Chores
178
+
179
+ * **context:** Synchronize repo versions
180
+
181
+
182
+ ### Dependencies
183
+
184
+ * The following workspace dependencies were updated
185
+ * dependencies
186
+ * @twin.org/core bumped from 0.0.3-next.30 to 0.0.3-next.31
187
+ * @twin.org/nameof bumped from 0.0.3-next.30 to 0.0.3-next.31
188
+ * devDependencies
189
+ * @twin.org/nameof-transformer bumped from 0.0.3-next.30 to 0.0.3-next.31
190
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.30 to 0.0.3-next.31
191
+ * @twin.org/validate-locales bumped from 0.0.3-next.30 to 0.0.3-next.31
192
+
193
+ ## [0.0.3-next.30](https://github.com/iotaledger/twin-framework/compare/context-v0.0.3-next.29...context-v0.0.3-next.30) (2026-04-14)
194
+
195
+
196
+ ### Miscellaneous Chores
197
+
198
+ * **context:** Synchronize repo versions
199
+
200
+
201
+ ### Dependencies
202
+
203
+ * The following workspace dependencies were updated
204
+ * dependencies
205
+ * @twin.org/core bumped from 0.0.3-next.29 to 0.0.3-next.30
206
+ * @twin.org/nameof bumped from 0.0.3-next.29 to 0.0.3-next.30
207
+ * devDependencies
208
+ * @twin.org/nameof-transformer bumped from 0.0.3-next.29 to 0.0.3-next.30
209
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.29 to 0.0.3-next.30
210
+ * @twin.org/validate-locales bumped from 0.0.3-next.29 to 0.0.3-next.30
211
+
212
+ ## [0.0.3-next.29](https://github.com/iotaledger/twin-framework/compare/context-v0.0.3-next.28...context-v0.0.3-next.29) (2026-04-14)
213
+
214
+
215
+ ### Miscellaneous Chores
216
+
217
+ * **context:** Synchronize repo versions
218
+
219
+
220
+ ### Dependencies
221
+
222
+ * The following workspace dependencies were updated
223
+ * dependencies
224
+ * @twin.org/core bumped from 0.0.3-next.28 to 0.0.3-next.29
225
+ * @twin.org/nameof bumped from 0.0.3-next.28 to 0.0.3-next.29
226
+ * devDependencies
227
+ * @twin.org/nameof-transformer bumped from 0.0.3-next.28 to 0.0.3-next.29
228
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.28 to 0.0.3-next.29
229
+ * @twin.org/validate-locales bumped from 0.0.3-next.28 to 0.0.3-next.29
230
+
231
+ ## [0.0.3-next.28](https://github.com/iotaledger/twin-framework/compare/context-v0.0.3-next.27...context-v0.0.3-next.28) (2026-03-27)
232
+
233
+
234
+ ### Miscellaneous Chores
235
+
236
+ * **context:** Synchronize repo versions
237
+
238
+
239
+ ### Dependencies
240
+
241
+ * The following workspace dependencies were updated
242
+ * dependencies
243
+ * @twin.org/core bumped from 0.0.3-next.27 to 0.0.3-next.28
244
+ * @twin.org/nameof bumped from 0.0.3-next.27 to 0.0.3-next.28
245
+ * devDependencies
246
+ * @twin.org/nameof-transformer bumped from 0.0.3-next.27 to 0.0.3-next.28
247
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.27 to 0.0.3-next.28
248
+ * @twin.org/validate-locales bumped from 0.0.3-next.27 to 0.0.3-next.28
249
+
250
+ ## [0.0.3-next.27](https://github.com/iotaledger/twin-framework/compare/context-v0.0.3-next.26...context-v0.0.3-next.27) (2026-03-27)
251
+
252
+
253
+ ### Miscellaneous Chores
254
+
255
+ * **context:** Synchronize repo versions
256
+
257
+
258
+ ### Dependencies
259
+
260
+ * The following workspace dependencies were updated
261
+ * dependencies
262
+ * @twin.org/core bumped from 0.0.3-next.26 to 0.0.3-next.27
263
+ * @twin.org/nameof bumped from 0.0.3-next.26 to 0.0.3-next.27
264
+ * devDependencies
265
+ * @twin.org/nameof-transformer bumped from 0.0.3-next.26 to 0.0.3-next.27
266
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.26 to 0.0.3-next.27
267
+ * @twin.org/validate-locales bumped from 0.0.3-next.26 to 0.0.3-next.27
268
+
269
+ ## [0.0.3-next.26](https://github.com/iotaledger/twin-framework/compare/context-v0.0.3-next.25...context-v0.0.3-next.26) (2026-03-24)
270
+
271
+
272
+ ### Miscellaneous Chores
273
+
274
+ * **context:** Synchronize repo versions
275
+
276
+
277
+ ### Dependencies
278
+
279
+ * The following workspace dependencies were updated
280
+ * dependencies
281
+ * @twin.org/core bumped from 0.0.3-next.25 to 0.0.3-next.26
282
+ * @twin.org/nameof bumped from 0.0.3-next.25 to 0.0.3-next.26
283
+ * devDependencies
284
+ * @twin.org/nameof-transformer bumped from 0.0.3-next.25 to 0.0.3-next.26
285
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.25 to 0.0.3-next.26
286
+ * @twin.org/validate-locales bumped from 0.0.3-next.25 to 0.0.3-next.26
287
+
288
+ ## [0.0.3-next.25](https://github.com/iotaledger/twin-framework/compare/context-v0.0.3-next.24...context-v0.0.3-next.25) (2026-03-23)
289
+
290
+
291
+ ### Miscellaneous Chores
292
+
293
+ * **context:** Synchronize repo versions
294
+
295
+
296
+ ### Dependencies
297
+
298
+ * The following workspace dependencies were updated
299
+ * dependencies
300
+ * @twin.org/core bumped from 0.0.3-next.24 to 0.0.3-next.25
301
+ * @twin.org/nameof bumped from 0.0.3-next.24 to 0.0.3-next.25
302
+ * devDependencies
303
+ * @twin.org/nameof-transformer bumped from 0.0.3-next.24 to 0.0.3-next.25
304
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.24 to 0.0.3-next.25
305
+ * @twin.org/validate-locales bumped from 0.0.3-next.24 to 0.0.3-next.25
306
+
307
+ ## [0.0.3-next.24](https://github.com/iotaledger/twin-framework/compare/context-v0.0.3-next.23...context-v0.0.3-next.24) (2026-03-19)
308
+
309
+
310
+ ### Bug Fixes
311
+
312
+ * ensure __decorate is defined for decorators ([103a563](https://github.com/iotaledger/twin-framework/commit/103a563ce01ebdef6240d2e590e7b026e8692684))
313
+
314
+
315
+ ### Dependencies
316
+
317
+ * The following workspace dependencies were updated
318
+ * dependencies
319
+ * @twin.org/core bumped from 0.0.3-next.23 to 0.0.3-next.24
320
+ * @twin.org/nameof bumped from 0.0.3-next.23 to 0.0.3-next.24
321
+ * devDependencies
322
+ * @twin.org/nameof-transformer bumped from 0.0.3-next.23 to 0.0.3-next.24
323
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.23 to 0.0.3-next.24
324
+ * @twin.org/validate-locales bumped from 0.0.3-next.23 to 0.0.3-next.24
325
+
326
+ ## [0.0.3-next.23](https://github.com/iotaledger/twin-framework/compare/context-v0.0.3-next.22...context-v0.0.3-next.23) (2026-03-17)
327
+
328
+
329
+ ### Miscellaneous Chores
330
+
331
+ * **context:** Synchronize repo versions
332
+
333
+
334
+ ### Dependencies
335
+
336
+ * The following workspace dependencies were updated
337
+ * dependencies
338
+ * @twin.org/core bumped from 0.0.3-next.22 to 0.0.3-next.23
339
+ * @twin.org/nameof bumped from 0.0.3-next.22 to 0.0.3-next.23
340
+ * devDependencies
341
+ * @twin.org/nameof-transformer bumped from 0.0.3-next.22 to 0.0.3-next.23
342
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.22 to 0.0.3-next.23
343
+ * @twin.org/validate-locales bumped from 0.0.3-next.22 to 0.0.3-next.23
344
+
345
+ ## [0.0.3-next.22](https://github.com/iotaledger/twin-framework/compare/context-v0.0.3-next.21...context-v0.0.3-next.22) (2026-02-26)
346
+
347
+
348
+ ### Miscellaneous Chores
349
+
350
+ * **context:** Synchronize repo versions
351
+
352
+
353
+ ### Dependencies
354
+
355
+ * The following workspace dependencies were updated
356
+ * dependencies
357
+ * @twin.org/core bumped from 0.0.3-next.21 to 0.0.3-next.22
358
+ * @twin.org/nameof bumped from 0.0.3-next.21 to 0.0.3-next.22
359
+ * devDependencies
360
+ * @twin.org/nameof-transformer bumped from 0.0.3-next.21 to 0.0.3-next.22
361
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.21 to 0.0.3-next.22
362
+ * @twin.org/validate-locales bumped from 0.0.3-next.21 to 0.0.3-next.22
363
+
364
+ ## [0.0.3-next.21](https://github.com/iotaledger/twin-framework/compare/context-v0.0.3-next.20...context-v0.0.3-next.21) (2026-02-26)
365
+
366
+
367
+ ### Features
368
+
369
+ * add context id features ([#206](https://github.com/iotaledger/twin-framework/issues/206)) ([ef0d4ee](https://github.com/iotaledger/twin-framework/commit/ef0d4ee11a4f5fc6cc6f52a4958ce905c04ee13b))
370
+ * context id handler derives from component ([c868ec2](https://github.com/iotaledger/twin-framework/commit/c868ec21d3a576d4faa222bf130270a21936e50e))
371
+
372
+
373
+ ### Bug Fixes
374
+
375
+ * use singleton pattern for context storage ([c69f358](https://github.com/iotaledger/twin-framework/commit/c69f358e45361b45d4e46f19846cd5b8c99b0ccd))
376
+ * use singleton pattern for context storage ([5cc706a](https://github.com/iotaledger/twin-framework/commit/5cc706a2bbfc601fa3d00f3efd8b764052e9f91d))
377
+
378
+
379
+ ### Dependencies
380
+
381
+ * The following workspace dependencies were updated
382
+ * dependencies
383
+ * @twin.org/core bumped from 0.0.3-next.20 to 0.0.3-next.21
384
+ * @twin.org/nameof bumped from 0.0.3-next.20 to 0.0.3-next.21
385
+ * devDependencies
386
+ * @twin.org/nameof-transformer bumped from 0.0.3-next.20 to 0.0.3-next.21
387
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.20 to 0.0.3-next.21
388
+ * @twin.org/validate-locales bumped from 0.0.3-next.20 to 0.0.3-next.21
389
+
390
+ ## [0.0.3-next.20](https://github.com/iotaledger/twin-framework/compare/context-v0.0.3-next.19...context-v0.0.3-next.20) (2026-02-26)
391
+
392
+
393
+ ### Miscellaneous Chores
394
+
395
+ * **context:** Synchronize repo versions
396
+
397
+
398
+ ### Dependencies
399
+
400
+ * The following workspace dependencies were updated
401
+ * dependencies
402
+ * @twin.org/core bumped from 0.0.3-next.19 to 0.0.3-next.20
403
+ * @twin.org/nameof bumped from 0.0.3-next.19 to 0.0.3-next.20
404
+ * devDependencies
405
+ * @twin.org/nameof-transformer bumped from 0.0.3-next.19 to 0.0.3-next.20
406
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.19 to 0.0.3-next.20
407
+ * @twin.org/validate-locales bumped from 0.0.3-next.19 to 0.0.3-next.20
408
+
409
+ ## [0.0.3-next.19](https://github.com/iotaledger/twin-framework/compare/context-v0.0.3-next.18...context-v0.0.3-next.19) (2026-02-26)
410
+
411
+
412
+ ### Miscellaneous Chores
413
+
414
+ * **context:** Synchronize repo versions
415
+
416
+
417
+ ### Dependencies
418
+
419
+ * The following workspace dependencies were updated
420
+ * dependencies
421
+ * @twin.org/core bumped from 0.0.3-next.18 to 0.0.3-next.19
422
+ * @twin.org/nameof bumped from 0.0.3-next.18 to 0.0.3-next.19
423
+ * devDependencies
424
+ * @twin.org/nameof-transformer bumped from 0.0.3-next.18 to 0.0.3-next.19
425
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.18 to 0.0.3-next.19
426
+ * @twin.org/validate-locales bumped from 0.0.3-next.18 to 0.0.3-next.19
427
+
428
+ ## [0.0.3-next.18](https://github.com/iotaledger/twin-framework/compare/context-v0.0.3-next.17...context-v0.0.3-next.18) (2026-02-23)
429
+
430
+
431
+ ### Miscellaneous Chores
432
+
433
+ * **context:** Synchronize repo versions
434
+
435
+
436
+ ### Dependencies
437
+
438
+ * The following workspace dependencies were updated
439
+ * dependencies
440
+ * @twin.org/core bumped from 0.0.3-next.17 to 0.0.3-next.18
441
+ * @twin.org/nameof bumped from 0.0.3-next.17 to 0.0.3-next.18
442
+ * devDependencies
443
+ * @twin.org/nameof-transformer bumped from 0.0.3-next.17 to 0.0.3-next.18
444
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.17 to 0.0.3-next.18
445
+ * @twin.org/validate-locales bumped from 0.0.3-next.17 to 0.0.3-next.18
446
+
447
+ ## [0.0.3-next.17](https://github.com/iotaledger/twin-framework/compare/context-v0.0.3-next.16...context-v0.0.3-next.17) (2026-02-09)
448
+
449
+
450
+ ### Miscellaneous Chores
451
+
452
+ * **context:** Synchronize repo versions
453
+
454
+
455
+ ### Dependencies
456
+
457
+ * The following workspace dependencies were updated
458
+ * dependencies
459
+ * @twin.org/core bumped from 0.0.3-next.16 to 0.0.3-next.17
460
+ * @twin.org/nameof bumped from 0.0.3-next.16 to 0.0.3-next.17
461
+ * devDependencies
462
+ * @twin.org/nameof-transformer bumped from 0.0.3-next.16 to 0.0.3-next.17
463
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.16 to 0.0.3-next.17
464
+ * @twin.org/validate-locales bumped from 0.0.3-next.16 to 0.0.3-next.17
465
+
466
+ ## [0.0.3-next.16](https://github.com/iotaledger/twin-framework/compare/context-v0.0.3-next.15...context-v0.0.3-next.16) (2026-02-06)
467
+
468
+
469
+ ### Miscellaneous Chores
470
+
471
+ * **context:** Synchronize repo versions
472
+
473
+
474
+ ### Dependencies
475
+
476
+ * The following workspace dependencies were updated
477
+ * dependencies
478
+ * @twin.org/core bumped from 0.0.3-next.15 to 0.0.3-next.16
479
+ * @twin.org/nameof bumped from 0.0.3-next.15 to 0.0.3-next.16
480
+ * devDependencies
481
+ * @twin.org/nameof-transformer bumped from 0.0.3-next.15 to 0.0.3-next.16
482
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.15 to 0.0.3-next.16
483
+ * @twin.org/validate-locales bumped from 0.0.3-next.15 to 0.0.3-next.16
484
+
485
+ ## [0.0.3-next.15](https://github.com/iotaledger/twin-framework/compare/context-v0.0.3-next.14...context-v0.0.3-next.15) (2026-01-29)
486
+
487
+
488
+ ### Miscellaneous Chores
489
+
490
+ * **context:** Synchronize repo versions
491
+
492
+
493
+ ### Dependencies
494
+
495
+ * The following workspace dependencies were updated
496
+ * dependencies
497
+ * @twin.org/core bumped from 0.0.3-next.14 to 0.0.3-next.15
498
+ * @twin.org/nameof bumped from 0.0.3-next.14 to 0.0.3-next.15
499
+ * devDependencies
500
+ * @twin.org/nameof-transformer bumped from 0.0.3-next.14 to 0.0.3-next.15
501
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.14 to 0.0.3-next.15
502
+ * @twin.org/validate-locales bumped from 0.0.3-next.14 to 0.0.3-next.15
503
+
504
+ ## [0.0.3-next.14](https://github.com/iotaledger/twin-framework/compare/context-v0.0.3-next.13...context-v0.0.3-next.14) (2026-01-22)
505
+
506
+
507
+ ### Miscellaneous Chores
508
+
509
+ * **context:** Synchronize repo versions
510
+
511
+
512
+ ### Dependencies
513
+
514
+ * The following workspace dependencies were updated
515
+ * dependencies
516
+ * @twin.org/core bumped from 0.0.3-next.13 to 0.0.3-next.14
517
+ * @twin.org/nameof bumped from 0.0.3-next.13 to 0.0.3-next.14
518
+ * devDependencies
519
+ * @twin.org/nameof-transformer bumped from 0.0.3-next.13 to 0.0.3-next.14
520
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.13 to 0.0.3-next.14
521
+ * @twin.org/validate-locales bumped from 0.0.3-next.13 to 0.0.3-next.14
522
+
523
+ ## [0.0.3-next.13](https://github.com/iotaledger/twin-framework/compare/context-v0.0.3-next.12...context-v0.0.3-next.13) (2026-01-08)
524
+
525
+
526
+ ### Miscellaneous Chores
527
+
528
+ * **context:** Synchronize repo versions
529
+
530
+
531
+ ### Dependencies
532
+
533
+ * The following workspace dependencies were updated
534
+ * dependencies
535
+ * @twin.org/core bumped from 0.0.3-next.12 to 0.0.3-next.13
536
+ * @twin.org/nameof bumped from 0.0.3-next.12 to 0.0.3-next.13
537
+ * devDependencies
538
+ * @twin.org/nameof-transformer bumped from 0.0.3-next.12 to 0.0.3-next.13
539
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.12 to 0.0.3-next.13
540
+ * @twin.org/validate-locales bumped from 0.0.3-next.12 to 0.0.3-next.13
541
+
542
+ ## [0.0.3-next.12](https://github.com/iotaledger/twin-framework/compare/context-v0.0.3-next.11...context-v0.0.3-next.12) (2026-01-08)
543
+
544
+
545
+ ### Miscellaneous Chores
546
+
547
+ * **context:** Synchronize repo versions
548
+
549
+
550
+ ### Dependencies
551
+
552
+ * The following workspace dependencies were updated
553
+ * dependencies
554
+ * @twin.org/core bumped from 0.0.3-next.11 to 0.0.3-next.12
555
+ * @twin.org/nameof bumped from 0.0.3-next.11 to 0.0.3-next.12
556
+ * devDependencies
557
+ * @twin.org/nameof-transformer bumped from 0.0.3-next.11 to 0.0.3-next.12
558
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.11 to 0.0.3-next.12
559
+ * @twin.org/validate-locales bumped from 0.0.3-next.11 to 0.0.3-next.12
560
+
561
+ ## [0.0.3-next.11](https://github.com/iotaledger/twin-framework/compare/context-v0.0.3-next.10...context-v0.0.3-next.11) (2026-01-07)
562
+
563
+
564
+ ### Miscellaneous Chores
565
+
566
+ * **context:** Synchronize repo versions
567
+
568
+
569
+ ### Dependencies
570
+
571
+ * The following workspace dependencies were updated
572
+ * dependencies
573
+ * @twin.org/core bumped from 0.0.3-next.10 to 0.0.3-next.11
574
+ * @twin.org/nameof bumped from 0.0.3-next.10 to 0.0.3-next.11
575
+ * devDependencies
576
+ * @twin.org/nameof-transformer bumped from 0.0.3-next.10 to 0.0.3-next.11
577
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.10 to 0.0.3-next.11
578
+ * @twin.org/validate-locales bumped from 0.0.3-next.10 to 0.0.3-next.11
579
+
580
+ ## [0.0.3-next.10](https://github.com/iotaledger/twin-framework/compare/context-v0.0.3-next.9...context-v0.0.3-next.10) (2026-01-07)
581
+
582
+
583
+ ### Miscellaneous Chores
584
+
585
+ * **context:** Synchronize repo versions
586
+
587
+
588
+ ### Dependencies
589
+
590
+ * The following workspace dependencies were updated
591
+ * dependencies
592
+ * @twin.org/core bumped from 0.0.3-next.9 to 0.0.3-next.10
593
+ * @twin.org/nameof bumped from 0.0.3-next.9 to 0.0.3-next.10
594
+ * devDependencies
595
+ * @twin.org/nameof-transformer bumped from 0.0.3-next.9 to 0.0.3-next.10
596
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.9 to 0.0.3-next.10
597
+ * @twin.org/validate-locales bumped from 0.0.3-next.9 to 0.0.3-next.10
598
+
599
+ ## [0.0.3-next.9](https://github.com/iotaledger/twin-framework/compare/context-v0.0.3-next.8...context-v0.0.3-next.9) (2026-01-05)
600
+
601
+
602
+ ### Miscellaneous Chores
603
+
604
+ * **context:** Synchronize repo versions
605
+
606
+
607
+ ### Dependencies
608
+
609
+ * The following workspace dependencies were updated
610
+ * dependencies
611
+ * @twin.org/core bumped from 0.0.3-next.8 to 0.0.3-next.9
612
+ * @twin.org/nameof bumped from 0.0.3-next.8 to 0.0.3-next.9
613
+ * devDependencies
614
+ * @twin.org/nameof-transformer bumped from 0.0.3-next.8 to 0.0.3-next.9
615
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.8 to 0.0.3-next.9
616
+ * @twin.org/validate-locales bumped from 0.0.3-next.8 to 0.0.3-next.9
617
+
618
+ ## [0.0.3-next.8](https://github.com/iotaledger/twin-framework/compare/context-v0.0.3-next.7...context-v0.0.3-next.8) (2025-11-26)
619
+
620
+
621
+ ### Miscellaneous Chores
622
+
623
+ * **context:** Synchronize repo versions
624
+
625
+
626
+ ### Dependencies
627
+
628
+ * The following workspace dependencies were updated
629
+ * dependencies
630
+ * @twin.org/core bumped from 0.0.3-next.7 to 0.0.3-next.8
631
+ * @twin.org/nameof bumped from 0.0.3-next.7 to 0.0.3-next.8
632
+ * devDependencies
633
+ * @twin.org/nameof-transformer bumped from 0.0.3-next.7 to 0.0.3-next.8
634
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.7 to 0.0.3-next.8
635
+ * @twin.org/validate-locales bumped from 0.0.3-next.7 to 0.0.3-next.8
636
+
637
+ ## [0.0.3-next.7](https://github.com/iotaledger/twin-framework/compare/context-v0.0.3-next.6...context-v0.0.3-next.7) (2025-11-25)
638
+
639
+
640
+ ### Features
641
+
642
+ * add context id features ([#206](https://github.com/iotaledger/twin-framework/issues/206)) ([ef0d4ee](https://github.com/iotaledger/twin-framework/commit/ef0d4ee11a4f5fc6cc6f52a4958ce905c04ee13b))
643
+ * context id handler derives from component ([c868ec2](https://github.com/iotaledger/twin-framework/commit/c868ec21d3a576d4faa222bf130270a21936e50e))
644
+
645
+
646
+ ### Bug Fixes
647
+
648
+ * use singleton pattern for context storage ([c69f358](https://github.com/iotaledger/twin-framework/commit/c69f358e45361b45d4e46f19846cd5b8c99b0ccd))
649
+ * use singleton pattern for context storage ([5cc706a](https://github.com/iotaledger/twin-framework/commit/5cc706a2bbfc601fa3d00f3efd8b764052e9f91d))
650
+
651
+
652
+ ### Dependencies
653
+
654
+ * The following workspace dependencies were updated
655
+ * dependencies
656
+ * @twin.org/core bumped from 0.0.3-next.6 to 0.0.3-next.7
657
+ * @twin.org/nameof bumped from 0.0.3-next.6 to 0.0.3-next.7
658
+ * devDependencies
659
+ * @twin.org/nameof-transformer bumped from 0.0.3-next.6 to 0.0.3-next.7
660
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.6 to 0.0.3-next.7
661
+ * @twin.org/validate-locales bumped from 0.0.3-next.6 to 0.0.3-next.7
662
+
663
+ ## [0.0.3-next.6](https://github.com/iotaledger/twin-framework/compare/context-v0.0.3-next.5...context-v0.0.3-next.6) (2025-11-25)
664
+
665
+
666
+ ### Miscellaneous Chores
667
+
668
+ * **context:** Synchronize repo versions
669
+
670
+
671
+ ### Dependencies
672
+
673
+ * The following workspace dependencies were updated
674
+ * dependencies
675
+ * @twin.org/core bumped from 0.0.3-next.5 to 0.0.3-next.6
676
+ * @twin.org/nameof bumped from 0.0.3-next.5 to 0.0.3-next.6
677
+ * devDependencies
678
+ * @twin.org/nameof-transformer bumped from 0.0.3-next.5 to 0.0.3-next.6
679
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.5 to 0.0.3-next.6
680
+ * @twin.org/validate-locales bumped from 0.0.3-next.5 to 0.0.3-next.6
681
+
682
+ ## [0.0.3-next.5](https://github.com/iotaledger/twin-framework/compare/context-v0.0.3-next.4...context-v0.0.3-next.5) (2025-11-20)
683
+
684
+
685
+ ### Features
686
+
687
+ * context id handler derives from component ([c868ec2](https://github.com/iotaledger/twin-framework/commit/c868ec21d3a576d4faa222bf130270a21936e50e))
688
+
689
+
690
+ ### Dependencies
691
+
692
+ * The following workspace dependencies were updated
693
+ * dependencies
694
+ * @twin.org/core bumped from 0.0.3-next.4 to 0.0.3-next.5
695
+ * @twin.org/nameof bumped from 0.0.3-next.4 to 0.0.3-next.5
696
+ * devDependencies
697
+ * @twin.org/nameof-transformer bumped from 0.0.3-next.4 to 0.0.3-next.5
698
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.4 to 0.0.3-next.5
699
+ * @twin.org/validate-locales bumped from 0.0.3-next.4 to 0.0.3-next.5
700
+
701
+ ## [0.0.3-next.4](https://github.com/iotaledger/twin-framework/compare/context-v0.0.3-next.3...context-v0.0.3-next.4) (2025-11-13)
4
702
 
5
703
 
6
704
  ### Bug Fixes
7
705
 
8
- * use singleton pattern for context storage ([c69f358](https://github.com/twinfoundation/framework/commit/c69f358e45361b45d4e46f19846cd5b8c99b0ccd))
9
- * use singleton pattern for context storage ([5cc706a](https://github.com/twinfoundation/framework/commit/5cc706a2bbfc601fa3d00f3efd8b764052e9f91d))
706
+ * use singleton pattern for context storage ([c69f358](https://github.com/iotaledger/twin-framework/commit/c69f358e45361b45d4e46f19846cd5b8c99b0ccd))
707
+ * use singleton pattern for context storage ([5cc706a](https://github.com/iotaledger/twin-framework/commit/5cc706a2bbfc601fa3d00f3efd8b764052e9f91d))
10
708
 
11
709
 
12
710
  ### Dependencies
@@ -20,7 +718,7 @@
20
718
  * @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.3 to 0.0.3-next.4
21
719
  * @twin.org/validate-locales bumped from 0.0.3-next.3 to 0.0.3-next.4
22
720
 
23
- ## [0.0.3-next.3](https://github.com/twinfoundation/framework/compare/context-v0.0.3-next.2...context-v0.0.3-next.3) (2025-11-12)
721
+ ## [0.0.3-next.3](https://github.com/iotaledger/twin-framework/compare/context-v0.0.3-next.2...context-v0.0.3-next.3) (2025-11-12)
24
722
 
25
723
 
26
724
  ### Miscellaneous Chores
@@ -39,7 +737,7 @@
39
737
  * @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.2 to 0.0.3-next.3
40
738
  * @twin.org/validate-locales bumped from 0.0.3-next.2 to 0.0.3-next.3
41
739
 
42
- ## [0.0.3-next.2](https://github.com/twinfoundation/framework/compare/context-v0.0.3-next.1...context-v0.0.3-next.2) (2025-11-12)
740
+ ## [0.0.3-next.2](https://github.com/iotaledger/twin-framework/compare/context-v0.0.3-next.1...context-v0.0.3-next.2) (2025-11-12)
43
741
 
44
742
 
45
743
  ### Miscellaneous Chores
@@ -58,12 +756,12 @@
58
756
  * @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.1 to 0.0.3-next.2
59
757
  * @twin.org/validate-locales bumped from 0.0.3-next.1 to 0.0.3-next.2
60
758
 
61
- ## [0.0.3-next.1](https://github.com/twinfoundation/framework/compare/context-v0.0.3-next.0...context-v0.0.3-next.1) (2025-11-10)
759
+ ## [0.0.3-next.1](https://github.com/iotaledger/twin-framework/compare/context-v0.0.3-next.0...context-v0.0.3-next.1) (2025-11-10)
62
760
 
63
761
 
64
762
  ### Features
65
763
 
66
- * add context id features ([#206](https://github.com/twinfoundation/framework/issues/206)) ([ef0d4ee](https://github.com/twinfoundation/framework/commit/ef0d4ee11a4f5fc6cc6f52a4958ce905c04ee13b))
764
+ * add context id features ([#206](https://github.com/iotaledger/twin-framework/issues/206)) ([ef0d4ee](https://github.com/iotaledger/twin-framework/commit/ef0d4ee11a4f5fc6cc6f52a4958ce905c04ee13b))
67
765
 
68
766
 
69
767
  ### Dependencies
@@ -77,4 +775,4 @@
77
775
  * @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.0 to 0.0.3-next.1
78
776
  * @twin.org/validate-locales bumped from 0.0.3-next.0 to 0.0.3-next.1
79
777
 
80
- ## @twin.org/context - Changelog
778
+ ## Changelog
package/docs/examples.md CHANGED
@@ -1 +1,57 @@
1
- # @twin.org/context - Examples
1
+ # Context Examples
2
+
3
+ Use these snippets to keep trace identifiers consistent across asynchronous operations and service boundaries.
4
+
5
+ ## ContextIdHelper
6
+
7
+ ```typescript
8
+ import { ContextIdHelper } from '@twin.org/context';
9
+
10
+ const traceContext = {
11
+ traceId: 'trc-0011223344556677',
12
+ spanId: 'spn-9a8b7c6d5e4f3210'
13
+ };
14
+
15
+ ContextIdHelper.short(traceContext.traceId); // '0011223344556677'
16
+ ContextIdHelper.shortAll(traceContext); // { traceId: '0011223344556677', spanId: '9a8b7c6d5e4f3210' }
17
+ ```
18
+
19
+ ```typescript
20
+ import { ContextIdHelper } from '@twin.org/context';
21
+
22
+ const contextIds = {
23
+ traceId: 'trace-1234',
24
+ spanId: 'span-5678',
25
+ requestId: 'req-90ab'
26
+ };
27
+
28
+ const combined = ContextIdHelper.shortCombined(contextIds); // '1234:5678:90ab'
29
+ ContextIdHelper.shortSplit(combined); // ['1234', '5678', '90ab']
30
+ ```
31
+
32
+ ## ContextIdStore
33
+
34
+ ```typescript
35
+ import { ContextIdStore } from '@twin.org/context';
36
+
37
+ await ContextIdStore.run({ traceId: 'trc-01', spanId: 'spn-02' }, async () => {
38
+ ContextIdStore.getContextIds(); // { traceId: 'trc-01', spanId: 'spn-02' }
39
+ });
40
+ ```
41
+
42
+ ## ContextIdHandlerFactory
43
+
44
+ ```typescript
45
+ import { ContextIdHandlerFactory } from '@twin.org/context';
46
+ import type { IContextIdHandler } from '@twin.org/context';
47
+
48
+ class RequestContextHandler implements IContextIdHandler {
49
+ public getContextIds() {
50
+ return { traceId: 'trc-1001', spanId: 'spn-2002' };
51
+ }
52
+ }
53
+
54
+ ContextIdHandlerFactory.register('request', () => new RequestContextHandler());
55
+ const handler = ContextIdHandlerFactory.create('request');
56
+ handler.getContextIds().traceId; // 'trc-1001'
57
+ ```
@@ -14,7 +14,7 @@ Class to help with context IDs.
14
14
 
15
15
  ## Properties
16
16
 
17
- ### CLASS\_NAME
17
+ ### CLASS\_NAME {#class_name}
18
18
 
19
19
  > `readonly` `static` **CLASS\_NAME**: `string`
20
20
 
@@ -22,7 +22,7 @@ Runtime name for the class.
22
22
 
23
23
  ## Methods
24
24
 
25
- ### guard()
25
+ ### guard() {#guard}
26
26
 
27
27
  > `static` **guard**\<`T`, `K`\>(`contextIds`, `key`): `asserts contextIds is T & { [P in string]: string }`
28
28
 
@@ -42,9 +42,9 @@ Perform a runtime guard on the provided context ID value.
42
42
 
43
43
  ##### contextIds
44
44
 
45
- The context IDs to guard.
45
+ `T` \| `undefined`
46
46
 
47
- `T` | `undefined`
47
+ The context IDs to guard.
48
48
 
49
49
  ##### key
50
50
 
@@ -62,7 +62,7 @@ Guard error if the value is invalid.
62
62
 
63
63
  ***
64
64
 
65
- ### short()
65
+ ### short() {#short}
66
66
 
67
67
  > `static` **short**(`contextIds`, `key`): `string`
68
68
 
@@ -72,9 +72,9 @@ Gets the short version of a context ID.
72
72
 
73
73
  ##### contextIds
74
74
 
75
- The context IDs to get the short version from.
75
+ [`IContextIds`](../interfaces/IContextIds.md) \| `undefined`
76
76
 
77
- [`IContextIds`](../interfaces/IContextIds.md) | `undefined`
77
+ The context IDs to get the short version from.
78
78
 
79
79
  ##### key
80
80
 
@@ -94,7 +94,7 @@ Guard error if the value is invalid.
94
94
 
95
95
  ***
96
96
 
97
- ### guardAll()
97
+ ### guardAll() {#guardall}
98
98
 
99
99
  > `static` **guardAll**\<`T`, `K`\>(`contextIds`, `keys`): `asserts contextIds is T & { [P in string]: string }`
100
100
 
@@ -114,15 +114,15 @@ Perform a runtime guard on the provided context ID values.
114
114
 
115
115
  ##### contextIds
116
116
 
117
- The context IDs to guard.
117
+ `T` \| `undefined`
118
118
 
119
- `T` | `undefined`
119
+ The context IDs to guard.
120
120
 
121
121
  ##### keys
122
122
 
123
- The context ID keys to guard.
123
+ readonly `K`[] \| `undefined`
124
124
 
125
- readonly `K`[] | `undefined`
125
+ The context ID keys to guard.
126
126
 
127
127
  #### Returns
128
128
 
@@ -134,7 +134,7 @@ Guard error if the value is invalid.
134
134
 
135
135
  ***
136
136
 
137
- ### shortAll()
137
+ ### shortAll() {#shortall}
138
138
 
139
139
  > `static` **shortAll**(`contextIds`, `keys`): [`IContextIds`](../interfaces/IContextIds.md)
140
140
 
@@ -144,15 +144,15 @@ Gets the short versions of multiple context IDs.
144
144
 
145
145
  ##### contextIds
146
146
 
147
- The context IDs to get the short versions from.
147
+ [`IContextIds`](../interfaces/IContextIds.md) \| `undefined`
148
148
 
149
- [`IContextIds`](../interfaces/IContextIds.md) | `undefined`
149
+ The context IDs to get the short versions from.
150
150
 
151
151
  ##### keys
152
152
 
153
- The context ID keys to get the short versions for.
153
+ `string`[] \| `undefined`
154
154
 
155
- `string`[] | `undefined`
155
+ The context ID keys to get the short versions for.
156
156
 
157
157
  #### Returns
158
158
 
@@ -162,9 +162,9 @@ The short versions of the context IDs.
162
162
 
163
163
  ***
164
164
 
165
- ### shortCombined()
165
+ ### shortCombined() {#shortcombined}
166
166
 
167
- > `static` **shortCombined**(`contextIds`, `keys`, `separator`): `string` \| `undefined`
167
+ > `static` **shortCombined**(`contextIds`, `keys`, `separator?`): `string` \| `undefined`
168
168
 
169
169
  Gets the combined short version.
170
170
 
@@ -172,17 +172,17 @@ Gets the combined short version.
172
172
 
173
173
  ##### contextIds
174
174
 
175
- The context IDs to get the short versions from.
175
+ [`IContextIds`](../interfaces/IContextIds.md) \| `undefined`
176
176
 
177
- [`IContextIds`](../interfaces/IContextIds.md) | `undefined`
177
+ The context IDs to get the short versions from.
178
178
 
179
179
  ##### keys
180
180
 
181
- The context ID keys to get the short versions for.
181
+ `string`[] \| `undefined`
182
182
 
183
- `string`[] | `undefined`
183
+ The context ID keys to get the short versions for.
184
184
 
185
- ##### separator
185
+ ##### separator?
186
186
 
187
187
  `string` = `"/"`
188
188
 
@@ -196,9 +196,9 @@ The short version combined.
196
196
 
197
197
  ***
198
198
 
199
- ### shortSplit()
199
+ ### shortSplit() {#shortsplit}
200
200
 
201
- > `static` **shortSplit**(`keys`, `combined`, `separator`): [`IContextIds`](../interfaces/IContextIds.md)
201
+ > `static` **shortSplit**(`keys`, `combined`, `separator?`): [`IContextIds`](../interfaces/IContextIds.md)
202
202
 
203
203
  Split a combined short version in to the separate context IDs.
204
204
 
@@ -216,7 +216,7 @@ The context ID keys to get the short versions for.
216
216
 
217
217
  The combined short version to separate.
218
218
 
219
- ##### separator
219
+ ##### separator?
220
220
 
221
221
  `string` = `"/"`
222
222
 
@@ -234,9 +234,9 @@ GeneralError if the number of parts does not match the number of keys.
234
234
 
235
235
  ***
236
236
 
237
- ### combinedContextKey()
237
+ ### combinedContextKey() {#combinedcontextkey}
238
238
 
239
- > `static` **combinedContextKey**(`contextIds`, `keys`, `separator`): `string` \| `undefined`
239
+ > `static` **combinedContextKey**(`contextIds`, `keys`, `separator?`): `string` \| `undefined`
240
240
 
241
241
  Create a combined key.
242
242
 
@@ -244,17 +244,17 @@ Create a combined key.
244
244
 
245
245
  ##### contextIds
246
246
 
247
- The context IDs to create the combined key for.
247
+ [`IContextIds`](../interfaces/IContextIds.md) \| `undefined`
248
248
 
249
- [`IContextIds`](../interfaces/IContextIds.md) | `undefined`
249
+ The context IDs to create the combined key for.
250
250
 
251
251
  ##### keys
252
252
 
253
- The context ID keys to get the short versions for.
253
+ `string`[] \| `undefined`
254
254
 
255
- `string`[] | `undefined`
255
+ The context ID keys to get the short versions for.
256
256
 
257
- ##### separator
257
+ ##### separator?
258
258
 
259
259
  `string` = `"/"`
260
260
 
@@ -268,7 +268,7 @@ The short version combined.
268
268
 
269
269
  ***
270
270
 
271
- ### pickKeysFromAvailable()
271
+ ### pickKeysFromAvailable() {#pickkeysfromavailable}
272
272
 
273
273
  > `static` **pickKeysFromAvailable**(`availableKeys?`, `desiredKeys?`): `string`[]
274
274
 
@@ -14,7 +14,7 @@ Class to maintain context ids and execute an async method.
14
14
 
15
15
  ## Properties
16
16
 
17
- ### CLASS\_NAME
17
+ ### CLASS\_NAME {#class_name}
18
18
 
19
19
  > `readonly` `static` **CLASS\_NAME**: `string`
20
20
 
@@ -22,7 +22,7 @@ Runtime name for the class.
22
22
 
23
23
  ## Methods
24
24
 
25
- ### run()
25
+ ### run() {#run}
26
26
 
27
27
  > `static` **run**\<`T`\>(`contextIds`, `asyncMethod`): `Promise`\<`T`\>
28
28
 
@@ -56,7 +56,7 @@ Nothing.
56
56
 
57
57
  ***
58
58
 
59
- ### getContextIds()
59
+ ### getContextIds() {#getcontextids}
60
60
 
61
61
  > `static` **getContextIds**(): `Promise`\<[`IContextIds`](../interfaces/IContextIds.md) \| `undefined`\>
62
62
 
@@ -70,7 +70,7 @@ The context IDs.
70
70
 
71
71
  ***
72
72
 
73
- ### getStorage()
73
+ ### getStorage() {#getstorage}
74
74
 
75
75
  > `static` **getStorage**(): `Promise`\<`AsyncLocalStorage`\<[`IContextIds`](../interfaces/IContextIds.md)\>\>
76
76
 
@@ -2,9 +2,13 @@
2
2
 
3
3
  Interface describing a context ID handler.
4
4
 
5
+ ## Extends
6
+
7
+ - `IComponent`
8
+
5
9
  ## Methods
6
10
 
7
- ### short()?
11
+ ### short()? {#short}
8
12
 
9
13
  > `optional` **short**(`value`): `string`
10
14
 
@@ -26,7 +30,7 @@ The short form version of the context ID.
26
30
 
27
31
  ***
28
32
 
29
- ### guard()?
33
+ ### guard()? {#guard}
30
34
 
31
35
  > `optional` **guard**(`value`): `void`
32
36
 
@@ -47,3 +51,143 @@ The context ID value to guard.
47
51
  #### Throws
48
52
 
49
53
  Guard error if the value is invalid.
54
+
55
+ ***
56
+
57
+ ### className() {#classname}
58
+
59
+ > **className**(): `string`
60
+
61
+ Returns the class name of the component.
62
+
63
+ #### Returns
64
+
65
+ `string`
66
+
67
+ The class name of the component.
68
+
69
+ #### Inherited from
70
+
71
+ `IComponent.className`
72
+
73
+ ***
74
+
75
+ ### bootstrap()? {#bootstrap}
76
+
77
+ > `optional` **bootstrap**(`nodeLoggingComponentType?`): `Promise`\<`boolean`\>
78
+
79
+ Bootstrap the component by creating and initializing any resources it needs.
80
+
81
+ #### Parameters
82
+
83
+ ##### nodeLoggingComponentType?
84
+
85
+ `string`
86
+
87
+ The node logging component type.
88
+
89
+ #### Returns
90
+
91
+ `Promise`\<`boolean`\>
92
+
93
+ True if the bootstrapping process was successful.
94
+
95
+ #### Inherited from
96
+
97
+ `IComponent.bootstrap`
98
+
99
+ ***
100
+
101
+ ### teardown()? {#teardown}
102
+
103
+ > `optional` **teardown**(`nodeLoggingComponentType?`): `Promise`\<`boolean`\>
104
+
105
+ Teardown the component by releasing any resources it holds.
106
+
107
+ #### Parameters
108
+
109
+ ##### nodeLoggingComponentType?
110
+
111
+ `string`
112
+
113
+ The node logging component type.
114
+
115
+ #### Returns
116
+
117
+ `Promise`\<`boolean`\>
118
+
119
+ True if the teardown process was successful.
120
+
121
+ #### Inherited from
122
+
123
+ `IComponent.teardown`
124
+
125
+ ***
126
+
127
+ ### start()? {#start}
128
+
129
+ > `optional` **start**(`nodeLoggingComponentType?`): `Promise`\<`void`\>
130
+
131
+ The component needs to be started when the node is initialized.
132
+
133
+ #### Parameters
134
+
135
+ ##### nodeLoggingComponentType?
136
+
137
+ `string`
138
+
139
+ The node logging component type.
140
+
141
+ #### Returns
142
+
143
+ `Promise`\<`void`\>
144
+
145
+ Nothing.
146
+
147
+ #### Inherited from
148
+
149
+ `IComponent.start`
150
+
151
+ ***
152
+
153
+ ### stop()? {#stop}
154
+
155
+ > `optional` **stop**(`nodeLoggingComponentType?`): `Promise`\<`void`\>
156
+
157
+ The component needs to be stopped when the node is closed.
158
+
159
+ #### Parameters
160
+
161
+ ##### nodeLoggingComponentType?
162
+
163
+ `string`
164
+
165
+ The node logging component type.
166
+
167
+ #### Returns
168
+
169
+ `Promise`\<`void`\>
170
+
171
+ Nothing.
172
+
173
+ #### Inherited from
174
+
175
+ `IComponent.stop`
176
+
177
+ ***
178
+
179
+ ### health()? {#health}
180
+
181
+ > `optional` **health**(): `Promise`\<`IHealth`[]\>
182
+
183
+ Returns the health status of the component.
184
+
185
+ #### Returns
186
+
187
+ `Promise`\<`IHealth`[]\>
188
+
189
+ The health status of the component, can return multiple entries for elements within the component.
190
+
191
+ #### Inherited from
192
+
193
+ `IComponent.health`
@@ -4,6 +4,6 @@ Interface describing context ids which can be accessed async from a request.
4
4
 
5
5
  ## Indexable
6
6
 
7
- \[`id`: `string`\]: `string` \| `undefined`
7
+ > \[`id`: `string`\]: `string` \| `undefined`
8
8
 
9
9
  The context id keys and values.
@@ -6,25 +6,25 @@ Default definition of some context keys.
6
6
 
7
7
  ## Type Declaration
8
8
 
9
- ### Node
9
+ ### Node {#node}
10
10
 
11
11
  > `readonly` **Node**: `"node"` = `"node"`
12
12
 
13
13
  Standard property type definition for node.
14
14
 
15
- ### Tenant
15
+ ### Tenant {#tenant}
16
16
 
17
17
  > `readonly` **Tenant**: `"tenant"` = `"tenant"`
18
18
 
19
19
  Standard property type definition for tenant.
20
20
 
21
- ### Organization
21
+ ### Organization {#organization}
22
22
 
23
23
  > `readonly` **Organization**: `"organization"` = `"organization"`
24
24
 
25
25
  Standard property type definition for organization.
26
26
 
27
- ### User
27
+ ### User {#user}
28
28
 
29
29
  > `readonly` **User**: `"user"` = `"user"`
30
30
 
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@twin.org/context",
3
- "version": "0.0.3-next.4",
3
+ "version": "0.0.3-next.40",
4
4
  "description": "Helper methods/classes for context handling",
5
5
  "repository": {
6
6
  "type": "git",
7
- "url": "git+https://github.com/twinfoundation/framework.git",
7
+ "url": "git+https://github.com/iotaledger/framework.git",
8
8
  "directory": "packages/context"
9
9
  },
10
10
  "author": "martyn.janes@iota.org",
@@ -14,8 +14,8 @@
14
14
  "node": ">=20.0.0"
15
15
  },
16
16
  "dependencies": {
17
- "@twin.org/core": "0.0.3-next.4",
18
- "@twin.org/nameof": "0.0.3-next.4"
17
+ "@twin.org/core": "0.0.3-next.40",
18
+ "@twin.org/nameof": "0.0.3-next.40"
19
19
  },
20
20
  "main": "./dist/es/index.js",
21
21
  "types": "./dist/types/index.d.ts",
@@ -44,7 +44,7 @@
44
44
  "utilities"
45
45
  ],
46
46
  "bugs": {
47
- "url": "git+https://github.com/twinfoundation/framework/issues"
47
+ "url": "git+https://github.com/iotaledger/framework/issues"
48
48
  },
49
49
  "homepage": "https://twindev.org"
50
50
  }