@twin.org/context 0.0.4-next.7 → 0.9.0-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.
@@ -20,6 +20,10 @@ export const ContextIdKeys = {
20
20
  /**
21
21
  * Standard property type definition for user.
22
22
  */
23
- User: "user"
23
+ User: "user",
24
+ /**
25
+ * Standard property type definition for user organization.
26
+ */
27
+ UserOrganization: "userOrganization"
24
28
  };
25
29
  //# sourceMappingURL=contextIdKeys.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"contextIdKeys.js","sourceRoot":"","sources":["../../../src/models/contextIdKeys.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,aAAa,GAAG;IAC5B;;OAEG;IACH,IAAI,EAAE,MAAM;IAEZ;;OAEG;IACH,MAAM,EAAE,QAAQ;IAEhB;;OAEG;IACH,YAAY,EAAE,cAAc;IAE5B;;OAEG;IACH,IAAI,EAAE,MAAM;CACH,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Default definition of some context keys.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const ContextIdKeys = {\n\t/**\n\t * Standard property type definition for node.\n\t */\n\tNode: \"node\",\n\n\t/**\n\t * Standard property type definition for tenant.\n\t */\n\tTenant: \"tenant\",\n\n\t/**\n\t * Standard property type definition for organization.\n\t */\n\tOrganization: \"organization\",\n\n\t/**\n\t * Standard property type definition for user.\n\t */\n\tUser: \"user\"\n} as const;\n\n/**\n * Default definition of some context keys.\n */\nexport type ContextIdKeys = (typeof ContextIdKeys)[keyof typeof ContextIdKeys];\n"]}
1
+ {"version":3,"file":"contextIdKeys.js","sourceRoot":"","sources":["../../../src/models/contextIdKeys.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,aAAa,GAAG;IAC5B;;OAEG;IACH,IAAI,EAAE,MAAM;IAEZ;;OAEG;IACH,MAAM,EAAE,QAAQ;IAEhB;;OAEG;IACH,YAAY,EAAE,cAAc;IAE5B;;OAEG;IACH,IAAI,EAAE,MAAM;IAEZ;;OAEG;IACH,gBAAgB,EAAE,kBAAkB;CAC3B,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Default definition of some context keys.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const ContextIdKeys = {\n\t/**\n\t * Standard property type definition for node.\n\t */\n\tNode: \"node\",\n\n\t/**\n\t * Standard property type definition for tenant.\n\t */\n\tTenant: \"tenant\",\n\n\t/**\n\t * Standard property type definition for organization.\n\t */\n\tOrganization: \"organization\",\n\n\t/**\n\t * Standard property type definition for user.\n\t */\n\tUser: \"user\",\n\n\t/**\n\t * Standard property type definition for user organization.\n\t */\n\tUserOrganization: \"userOrganization\"\n} as const;\n\n/**\n * Default definition of some context keys.\n */\nexport type ContextIdKeys = (typeof ContextIdKeys)[keyof typeof ContextIdKeys];\n"]}
@@ -11,7 +11,7 @@ export class ContextIdStore {
11
11
  * Execute the method wrapped in the context.
12
12
  * @param contextIds The context IDs.
13
13
  * @param asyncMethod The async method to run.
14
- * @returns Nothing.
14
+ * @returns A promise that resolves with the result of the async method.
15
15
  */
16
16
  static async run(contextIds, asyncMethod) {
17
17
  const storage = await ContextIdStore.getStorage();
@@ -1 +1 @@
1
- {"version":3,"file":"contextIdStore.js","sourceRoot":"","sources":["../../../src/utils/contextIdStore.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,EAAE,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAI1E;;GAEG;AACH,MAAM,OAAO,cAAc;IAC1B;;OAEG;IACI,MAAM,CAAU,UAAU,oBAAoC;IAErE;;;;;OAKG;IACI,MAAM,CAAC,KAAK,CAAC,GAAG,CAAc,UAAuB,EAAE,WAAoB;QACjF,MAAM,OAAO,GAAG,MAAM,cAAc,CAAC,UAAU,EAAE,CAAC;QAClD,OAAO,OAAO,CAAC,GAAG,CAAI,UAAU,EAAE,WAAW,CAAC,CAAC;IAChD,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,KAAK,CAAC,aAAa;QAChC,MAAM,OAAO,GAAG,MAAM,cAAc,CAAC,UAAU,EAAE,CAAC;QAClD,OAAO,OAAO,CAAC,QAAQ,EAAE,CAAC;IAC3B,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,KAAK,CAAC,UAAU;QAC7B,IAAI,eAAe,GAAG,WAAW,CAAC,GAAG,CACpC,YAAY,CACZ,CAAC;QAEF,IAAI,EAAE,CAAC,KAAK,CAAC,eAAe,EAAE,UAAU,CAAC,EAAE,CAAC;YAC3C,IAAI,CAAC;gBACJ,MAAM,KAAK,GAAG,MAAM,MAAM,CAAC,kBAAkB,CAAC,CAAC;gBAC/C,eAAe,GAAG,eAAe,IAAI,EAAE,CAAC;gBACxC,eAAe,CAAC,UAAU,GAAG,IAAI,KAAK,CAAC,iBAAiB,CAAc;oBACrE,IAAI,EAAE,wBAAwB;iBAC9B,CAAC,CAAC;YACJ,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACd,MAAM,IAAI,YAAY,CACrB,cAAc,CAAC,UAAU,EACzB,wBAAwB,EACxB,SAAS,EACT,SAAS,CAAC,SAAS,CAAC,GAAG,CAAC,CACxB,CAAC;YACH,CAAC;YACD,WAAW,CAAC,GAAG,CAAC,YAAY,EAAE,eAAe,CAAC,CAAC;QAChD,CAAC;QACD,OAAO,eAAe,CAAC,UAAU,CAAC;IACnC,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { AsyncLocalStorage } from \"node:async_hooks\";\nimport { BaseError, GeneralError, Is, SharedStore } from \"@twin.org/core\";\nimport { nameof } from \"@twin.org/nameof\";\nimport type { IContextIds } from \"../models/IContextIds.js\";\n\n/**\n * Class to maintain context ids and execute an async method.\n */\nexport class ContextIdStore {\n\t/**\n\t * Runtime name for the class.\n\t */\n\tpublic static readonly CLASS_NAME: string = nameof<ContextIdStore>();\n\n\t/**\n\t * Execute the method wrapped in the context.\n\t * @param contextIds The context IDs.\n\t * @param asyncMethod The async method to run.\n\t * @returns Nothing.\n\t */\n\tpublic static async run<T = unknown>(contextIds: IContextIds, asyncMethod: () => T): Promise<T> {\n\t\tconst storage = await ContextIdStore.getStorage();\n\t\treturn storage.run<T>(contextIds, asyncMethod);\n\t}\n\n\t/**\n\t * Get the context IDs.\n\t * @returns The context IDs.\n\t */\n\tpublic static async getContextIds(): Promise<IContextIds | undefined> {\n\t\tconst storage = await ContextIdStore.getStorage();\n\t\treturn storage.getStore();\n\t}\n\n\t/**\n\t * Get the storage and create it if it doesn't exist.\n\t * @returns The storage.\n\t */\n\tpublic static async getStorage(): Promise<AsyncLocalStorage<IContextIds>> {\n\t\tlet asyncHooksStore = SharedStore.get<{ contextIds?: AsyncLocalStorage<IContextIds> }>(\n\t\t\t\"asyncHooks\"\n\t\t);\n\n\t\tif (Is.empty(asyncHooksStore?.contextIds)) {\n\t\t\ttry {\n\t\t\t\tconst hooks = await import(\"node:async_hooks\");\n\t\t\t\tasyncHooksStore = asyncHooksStore ?? {};\n\t\t\t\tasyncHooksStore.contextIds = new hooks.AsyncLocalStorage<IContextIds>({\n\t\t\t\t\tname: \"AsyncContextIdsStorage\"\n\t\t\t\t});\n\t\t\t} catch (err) {\n\t\t\t\tthrow new GeneralError(\n\t\t\t\t\tContextIdStore.CLASS_NAME,\n\t\t\t\t\t\"asyncHooksNotAvailable\",\n\t\t\t\t\tundefined,\n\t\t\t\t\tBaseError.fromError(err)\n\t\t\t\t);\n\t\t\t}\n\t\t\tSharedStore.set(\"asyncHooks\", asyncHooksStore);\n\t\t}\n\t\treturn asyncHooksStore.contextIds;\n\t}\n}\n"]}
1
+ {"version":3,"file":"contextIdStore.js","sourceRoot":"","sources":["../../../src/utils/contextIdStore.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,EAAE,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAI1E;;GAEG;AACH,MAAM,OAAO,cAAc;IAC1B;;OAEG;IACI,MAAM,CAAU,UAAU,oBAAoC;IAErE;;;;;OAKG;IACI,MAAM,CAAC,KAAK,CAAC,GAAG,CAAc,UAAuB,EAAE,WAAoB;QACjF,MAAM,OAAO,GAAG,MAAM,cAAc,CAAC,UAAU,EAAE,CAAC;QAClD,OAAO,OAAO,CAAC,GAAG,CAAI,UAAU,EAAE,WAAW,CAAC,CAAC;IAChD,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,KAAK,CAAC,aAAa;QAChC,MAAM,OAAO,GAAG,MAAM,cAAc,CAAC,UAAU,EAAE,CAAC;QAClD,OAAO,OAAO,CAAC,QAAQ,EAAE,CAAC;IAC3B,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,KAAK,CAAC,UAAU;QAC7B,IAAI,eAAe,GAAG,WAAW,CAAC,GAAG,CACpC,YAAY,CACZ,CAAC;QAEF,IAAI,EAAE,CAAC,KAAK,CAAC,eAAe,EAAE,UAAU,CAAC,EAAE,CAAC;YAC3C,IAAI,CAAC;gBACJ,MAAM,KAAK,GAAG,MAAM,MAAM,CAAC,kBAAkB,CAAC,CAAC;gBAC/C,eAAe,GAAG,eAAe,IAAI,EAAE,CAAC;gBACxC,eAAe,CAAC,UAAU,GAAG,IAAI,KAAK,CAAC,iBAAiB,CAAc;oBACrE,IAAI,EAAE,wBAAwB;iBAC9B,CAAC,CAAC;YACJ,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACd,MAAM,IAAI,YAAY,CACrB,cAAc,CAAC,UAAU,EACzB,wBAAwB,EACxB,SAAS,EACT,SAAS,CAAC,SAAS,CAAC,GAAG,CAAC,CACxB,CAAC;YACH,CAAC;YACD,WAAW,CAAC,GAAG,CAAC,YAAY,EAAE,eAAe,CAAC,CAAC;QAChD,CAAC;QACD,OAAO,eAAe,CAAC,UAAU,CAAC;IACnC,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { AsyncLocalStorage } from \"node:async_hooks\";\nimport { BaseError, GeneralError, Is, SharedStore } from \"@twin.org/core\";\nimport { nameof } from \"@twin.org/nameof\";\nimport type { IContextIds } from \"../models/IContextIds.js\";\n\n/**\n * Class to maintain context ids and execute an async method.\n */\nexport class ContextIdStore {\n\t/**\n\t * Runtime name for the class.\n\t */\n\tpublic static readonly CLASS_NAME: string = nameof<ContextIdStore>();\n\n\t/**\n\t * Execute the method wrapped in the context.\n\t * @param contextIds The context IDs.\n\t * @param asyncMethod The async method to run.\n\t * @returns A promise that resolves with the result of the async method.\n\t */\n\tpublic static async run<T = unknown>(contextIds: IContextIds, asyncMethod: () => T): Promise<T> {\n\t\tconst storage = await ContextIdStore.getStorage();\n\t\treturn storage.run<T>(contextIds, asyncMethod);\n\t}\n\n\t/**\n\t * Get the context IDs.\n\t * @returns The context IDs.\n\t */\n\tpublic static async getContextIds(): Promise<IContextIds | undefined> {\n\t\tconst storage = await ContextIdStore.getStorage();\n\t\treturn storage.getStore();\n\t}\n\n\t/**\n\t * Get the storage and create it if it doesn't exist.\n\t * @returns The storage.\n\t */\n\tpublic static async getStorage(): Promise<AsyncLocalStorage<IContextIds>> {\n\t\tlet asyncHooksStore = SharedStore.get<{ contextIds?: AsyncLocalStorage<IContextIds> }>(\n\t\t\t\"asyncHooks\"\n\t\t);\n\n\t\tif (Is.empty(asyncHooksStore?.contextIds)) {\n\t\t\ttry {\n\t\t\t\tconst hooks = await import(\"node:async_hooks\");\n\t\t\t\tasyncHooksStore = asyncHooksStore ?? {};\n\t\t\t\tasyncHooksStore.contextIds = new hooks.AsyncLocalStorage<IContextIds>({\n\t\t\t\t\tname: \"AsyncContextIdsStorage\"\n\t\t\t\t});\n\t\t\t} catch (err) {\n\t\t\t\tthrow new GeneralError(\n\t\t\t\t\tContextIdStore.CLASS_NAME,\n\t\t\t\t\t\"asyncHooksNotAvailable\",\n\t\t\t\t\tundefined,\n\t\t\t\t\tBaseError.fromError(err)\n\t\t\t\t);\n\t\t\t}\n\t\t\tSharedStore.set(\"asyncHooks\", asyncHooksStore);\n\t\t}\n\t\treturn asyncHooksStore.contextIds;\n\t}\n}\n"]}
@@ -18,6 +18,10 @@ export declare const ContextIdKeys: {
18
18
  * Standard property type definition for user.
19
19
  */
20
20
  readonly User: "user";
21
+ /**
22
+ * Standard property type definition for user organization.
23
+ */
24
+ readonly UserOrganization: "userOrganization";
21
25
  };
22
26
  /**
23
27
  * Default definition of some context keys.
@@ -12,7 +12,7 @@ export declare class ContextIdStore {
12
12
  * Execute the method wrapped in the context.
13
13
  * @param contextIds The context IDs.
14
14
  * @param asyncMethod The async method to run.
15
- * @returns Nothing.
15
+ * @returns A promise that resolves with the result of the async method.
16
16
  */
17
17
  static run<T = unknown>(contextIds: IContextIds, asyncMethod: () => T): Promise<T>;
18
18
  /**
package/docs/changelog.md CHANGED
@@ -1,5 +1,198 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.9.0-next.1](https://github.com/iotaledger/twin-framework/compare/context-v0.9.0-next.0...context-v0.9.0-next.1) (2026-06-22)
4
+
5
+
6
+ ### Features
7
+
8
+ * add context id features ([#206](https://github.com/iotaledger/twin-framework/issues/206)) ([ef0d4ee](https://github.com/iotaledger/twin-framework/commit/ef0d4ee11a4f5fc6cc6f52a4958ce905c04ee13b))
9
+ * add user organization context key ([a3da436](https://github.com/iotaledger/twin-framework/commit/a3da4360451860052a508bdc147255a0b9ca8410))
10
+ * context id handler derives from component ([c868ec2](https://github.com/iotaledger/twin-framework/commit/c868ec21d3a576d4faa222bf130270a21936e50e))
11
+ * typescript 6 update ([1d10f31](https://github.com/iotaledger/twin-framework/commit/1d10f31e6516ec622773f45e88af82fe749b384a))
12
+ * update dependencies ([4da77ab](https://github.com/iotaledger/twin-framework/commit/4da77ab30f499e52825ac5a76f51436ceb59c26e))
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * ensure __decorate is defined for decorators ([103a563](https://github.com/iotaledger/twin-framework/commit/103a563ce01ebdef6240d2e590e7b026e8692684))
18
+ * use singleton pattern for context storage ([c69f358](https://github.com/iotaledger/twin-framework/commit/c69f358e45361b45d4e46f19846cd5b8c99b0ccd))
19
+ * use singleton pattern for context storage ([5cc706a](https://github.com/iotaledger/twin-framework/commit/5cc706a2bbfc601fa3d00f3efd8b764052e9f91d))
20
+
21
+
22
+ ### Dependencies
23
+
24
+ * The following workspace dependencies were updated
25
+ * dependencies
26
+ * @twin.org/core bumped from 0.9.0-next.0 to 0.9.0-next.1
27
+ * @twin.org/nameof bumped from 0.9.0-next.0 to 0.9.0-next.1
28
+ * devDependencies
29
+ * @twin.org/nameof-transformer bumped from 0.9.0-next.0 to 0.9.0-next.1
30
+ * @twin.org/nameof-vitest-plugin bumped from 0.9.0-next.0 to 0.9.0-next.1
31
+ * @twin.org/validate-locales bumped from 0.9.0-next.0 to 0.9.0-next.1
32
+
33
+ ## [0.0.4-next.15](https://github.com/iotaledger/twin-framework/compare/context-v0.0.4-next.14...context-v0.0.4-next.15) (2026-06-19)
34
+
35
+
36
+ ### Miscellaneous Chores
37
+
38
+ * **context:** Synchronize repo versions
39
+
40
+
41
+ ### Dependencies
42
+
43
+ * The following workspace dependencies were updated
44
+ * dependencies
45
+ * @twin.org/core bumped from 0.0.4-next.14 to 0.0.4-next.15
46
+ * @twin.org/nameof bumped from 0.0.4-next.14 to 0.0.4-next.15
47
+ * devDependencies
48
+ * @twin.org/nameof-transformer bumped from 0.0.4-next.14 to 0.0.4-next.15
49
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.4-next.14 to 0.0.4-next.15
50
+ * @twin.org/validate-locales bumped from 0.0.4-next.14 to 0.0.4-next.15
51
+
52
+ ## [0.0.4-next.14](https://github.com/iotaledger/twin-framework/compare/context-v0.0.4-next.13...context-v0.0.4-next.14) (2026-06-18)
53
+
54
+
55
+ ### Miscellaneous Chores
56
+
57
+ * **context:** Synchronize repo versions
58
+
59
+
60
+ ### Dependencies
61
+
62
+ * The following workspace dependencies were updated
63
+ * dependencies
64
+ * @twin.org/core bumped from 0.0.4-next.13 to 0.0.4-next.14
65
+ * @twin.org/nameof bumped from 0.0.4-next.13 to 0.0.4-next.14
66
+ * devDependencies
67
+ * @twin.org/nameof-transformer bumped from 0.0.4-next.13 to 0.0.4-next.14
68
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.4-next.13 to 0.0.4-next.14
69
+ * @twin.org/validate-locales bumped from 0.0.4-next.13 to 0.0.4-next.14
70
+
71
+ ## [0.0.4-next.13](https://github.com/iotaledger/twin-framework/compare/context-v0.0.4-next.12...context-v0.0.4-next.13) (2026-06-18)
72
+
73
+
74
+ ### Miscellaneous Chores
75
+
76
+ * **context:** Synchronize repo versions
77
+
78
+
79
+ ### Dependencies
80
+
81
+ * The following workspace dependencies were updated
82
+ * dependencies
83
+ * @twin.org/core bumped from 0.0.4-next.12 to 0.0.4-next.13
84
+ * @twin.org/nameof bumped from 0.0.4-next.12 to 0.0.4-next.13
85
+ * devDependencies
86
+ * @twin.org/nameof-transformer bumped from 0.0.4-next.12 to 0.0.4-next.13
87
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.4-next.12 to 0.0.4-next.13
88
+ * @twin.org/validate-locales bumped from 0.0.4-next.12 to 0.0.4-next.13
89
+
90
+ ## [0.0.4-next.12](https://github.com/iotaledger/twin-framework/compare/context-v0.0.4-next.11...context-v0.0.4-next.12) (2026-06-18)
91
+
92
+
93
+ ### Miscellaneous Chores
94
+
95
+ * **context:** Synchronize repo versions
96
+
97
+
98
+ ### Dependencies
99
+
100
+ * The following workspace dependencies were updated
101
+ * dependencies
102
+ * @twin.org/core bumped from 0.0.4-next.11 to 0.0.4-next.12
103
+ * @twin.org/nameof bumped from 0.0.4-next.11 to 0.0.4-next.12
104
+ * devDependencies
105
+ * @twin.org/nameof-transformer bumped from 0.0.4-next.11 to 0.0.4-next.12
106
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.4-next.11 to 0.0.4-next.12
107
+ * @twin.org/validate-locales bumped from 0.0.4-next.11 to 0.0.4-next.12
108
+
109
+ ## [0.0.4-next.11](https://github.com/iotaledger/twin-framework/compare/context-v0.0.4-next.10...context-v0.0.4-next.11) (2026-06-15)
110
+
111
+
112
+ ### Miscellaneous Chores
113
+
114
+ * **context:** Synchronize repo versions
115
+
116
+
117
+ ### Dependencies
118
+
119
+ * The following workspace dependencies were updated
120
+ * dependencies
121
+ * @twin.org/core bumped from 0.0.4-next.10 to 0.0.4-next.11
122
+ * @twin.org/nameof bumped from 0.0.4-next.10 to 0.0.4-next.11
123
+ * devDependencies
124
+ * @twin.org/nameof-transformer bumped from 0.0.4-next.10 to 0.0.4-next.11
125
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.4-next.10 to 0.0.4-next.11
126
+ * @twin.org/validate-locales bumped from 0.0.4-next.10 to 0.0.4-next.11
127
+
128
+ ## [0.0.4-next.10](https://github.com/iotaledger/twin-framework/compare/context-v0.0.4-next.9...context-v0.0.4-next.10) (2026-06-15)
129
+
130
+
131
+ ### Features
132
+
133
+ * add context id features ([#206](https://github.com/iotaledger/twin-framework/issues/206)) ([ef0d4ee](https://github.com/iotaledger/twin-framework/commit/ef0d4ee11a4f5fc6cc6f52a4958ce905c04ee13b))
134
+ * add user organization context key ([a3da436](https://github.com/iotaledger/twin-framework/commit/a3da4360451860052a508bdc147255a0b9ca8410))
135
+ * context id handler derives from component ([c868ec2](https://github.com/iotaledger/twin-framework/commit/c868ec21d3a576d4faa222bf130270a21936e50e))
136
+ * typescript 6 update ([1d10f31](https://github.com/iotaledger/twin-framework/commit/1d10f31e6516ec622773f45e88af82fe749b384a))
137
+ * update dependencies ([4da77ab](https://github.com/iotaledger/twin-framework/commit/4da77ab30f499e52825ac5a76f51436ceb59c26e))
138
+
139
+
140
+ ### Bug Fixes
141
+
142
+ * ensure __decorate is defined for decorators ([103a563](https://github.com/iotaledger/twin-framework/commit/103a563ce01ebdef6240d2e590e7b026e8692684))
143
+ * use singleton pattern for context storage ([c69f358](https://github.com/iotaledger/twin-framework/commit/c69f358e45361b45d4e46f19846cd5b8c99b0ccd))
144
+ * use singleton pattern for context storage ([5cc706a](https://github.com/iotaledger/twin-framework/commit/5cc706a2bbfc601fa3d00f3efd8b764052e9f91d))
145
+
146
+
147
+ ### Dependencies
148
+
149
+ * The following workspace dependencies were updated
150
+ * dependencies
151
+ * @twin.org/core bumped from 0.0.4-next.9 to 0.0.4-next.10
152
+ * @twin.org/nameof bumped from 0.0.4-next.9 to 0.0.4-next.10
153
+ * devDependencies
154
+ * @twin.org/nameof-transformer bumped from 0.0.4-next.9 to 0.0.4-next.10
155
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.4-next.9 to 0.0.4-next.10
156
+ * @twin.org/validate-locales bumped from 0.0.4-next.9 to 0.0.4-next.10
157
+
158
+ ## [0.0.4-next.9](https://github.com/iotaledger/twin-framework/compare/context-v0.0.4-next.8...context-v0.0.4-next.9) (2026-06-15)
159
+
160
+
161
+ ### Miscellaneous Chores
162
+
163
+ * **context:** Synchronize repo versions
164
+
165
+
166
+ ### Dependencies
167
+
168
+ * The following workspace dependencies were updated
169
+ * dependencies
170
+ * @twin.org/core bumped from 0.0.4-next.8 to 0.0.4-next.9
171
+ * @twin.org/nameof bumped from 0.0.4-next.8 to 0.0.4-next.9
172
+ * devDependencies
173
+ * @twin.org/nameof-transformer bumped from 0.0.4-next.8 to 0.0.4-next.9
174
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.4-next.8 to 0.0.4-next.9
175
+ * @twin.org/validate-locales bumped from 0.0.4-next.8 to 0.0.4-next.9
176
+
177
+ ## [0.0.4-next.8](https://github.com/iotaledger/twin-framework/compare/context-v0.0.4-next.7...context-v0.0.4-next.8) (2026-06-10)
178
+
179
+
180
+ ### Features
181
+
182
+ * add user organization context key ([a3da436](https://github.com/iotaledger/twin-framework/commit/a3da4360451860052a508bdc147255a0b9ca8410))
183
+
184
+
185
+ ### Dependencies
186
+
187
+ * The following workspace dependencies were updated
188
+ * dependencies
189
+ * @twin.org/core bumped from 0.0.4-next.7 to 0.0.4-next.8
190
+ * @twin.org/nameof bumped from 0.0.4-next.7 to 0.0.4-next.8
191
+ * devDependencies
192
+ * @twin.org/nameof-transformer bumped from 0.0.4-next.7 to 0.0.4-next.8
193
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.4-next.7 to 0.0.4-next.8
194
+ * @twin.org/validate-locales bumped from 0.0.4-next.7 to 0.0.4-next.8
195
+
3
196
  ## [0.0.4-next.7](https://github.com/iotaledger/twin-framework/compare/context-v0.0.4-next.6...context-v0.0.4-next.7) (2026-06-10)
4
197
 
5
198
 
@@ -52,7 +52,7 @@ The async method to run.
52
52
 
53
53
  `Promise`\<`T`\>
54
54
 
55
- Nothing.
55
+ A promise that resolves with the result of the async method.
56
56
 
57
57
  ***
58
58
 
@@ -142,7 +142,7 @@ The node logging component type.
142
142
 
143
143
  `Promise`\<`void`\>
144
144
 
145
- Nothing.
145
+ A promise that resolves when the component has started.
146
146
 
147
147
  #### Inherited from
148
148
 
@@ -168,7 +168,7 @@ The node logging component type.
168
168
 
169
169
  `Promise`\<`void`\>
170
170
 
171
- Nothing.
171
+ A promise that resolves when the component has stopped.
172
172
 
173
173
  #### Inherited from
174
174
 
@@ -29,3 +29,9 @@ Standard property type definition for organization.
29
29
  > `readonly` **User**: `"user"` = `"user"`
30
30
 
31
31
  Standard property type definition for user.
32
+
33
+ ### UserOrganization {#userorganization}
34
+
35
+ > `readonly` **UserOrganization**: `"userOrganization"` = `"userOrganization"`
36
+
37
+ Standard property type definition for user organization.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/context",
3
- "version": "0.0.4-next.7",
3
+ "version": "0.9.0-next.1",
4
4
  "description": "Helper methods/classes for context handling",
5
5
  "repository": {
6
6
  "type": "git",
@@ -14,8 +14,8 @@
14
14
  "node": ">=20.0.0"
15
15
  },
16
16
  "dependencies": {
17
- "@twin.org/core": "0.0.4-next.7",
18
- "@twin.org/nameof": "0.0.4-next.7"
17
+ "@twin.org/core": "0.9.0-next.1",
18
+ "@twin.org/nameof": "0.9.0-next.1"
19
19
  },
20
20
  "main": "./dist/es/index.js",
21
21
  "types": "./dist/types/index.d.ts",