@zudojs/core 0.0.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.
Files changed (547) hide show
  1. package/README.md +33 -0
  2. package/dist/.tsbuildinfo +1 -0
  3. package/dist/application/application.d.ts +25 -0
  4. package/dist/application/application.d.ts.map +1 -0
  5. package/dist/application/application.js +86 -0
  6. package/dist/application/application.js.map +1 -0
  7. package/dist/application/applicationContext.context.d.ts +40 -0
  8. package/dist/application/applicationContext.context.d.ts.map +1 -0
  9. package/dist/application/applicationContext.context.js +43 -0
  10. package/dist/application/applicationContext.context.js.map +1 -0
  11. package/dist/application/applicationState.state.d.ts +5 -0
  12. package/dist/application/applicationState.state.d.ts.map +1 -0
  13. package/dist/application/applicationState.state.js +2 -0
  14. package/dist/application/applicationState.state.js.map +1 -0
  15. package/dist/application/index.d.ts +10 -0
  16. package/dist/application/index.d.ts.map +1 -0
  17. package/dist/application/index.js +10 -0
  18. package/dist/application/index.js.map +1 -0
  19. package/dist/configuration/configurationManager.manager.d.ts +68 -0
  20. package/dist/configuration/configurationManager.manager.d.ts.map +1 -0
  21. package/dist/configuration/configurationManager.manager.js +157 -0
  22. package/dist/configuration/configurationManager.manager.js.map +1 -0
  23. package/dist/configuration/core/configuration.d.ts +53 -0
  24. package/dist/configuration/core/configuration.d.ts.map +1 -0
  25. package/dist/configuration/core/configuration.js +206 -0
  26. package/dist/configuration/core/configuration.js.map +1 -0
  27. package/dist/configuration/core/configurationKey.key.d.ts +43 -0
  28. package/dist/configuration/core/configurationKey.key.d.ts.map +1 -0
  29. package/dist/configuration/core/configurationKey.key.js +27 -0
  30. package/dist/configuration/core/configurationKey.key.js.map +1 -0
  31. package/dist/configuration/core/configurationSource.source.d.ts +114 -0
  32. package/dist/configuration/core/configurationSource.source.d.ts.map +1 -0
  33. package/dist/configuration/core/configurationSource.source.js +55 -0
  34. package/dist/configuration/core/configurationSource.source.js.map +1 -0
  35. package/dist/configuration/core/index.d.ts +12 -0
  36. package/dist/configuration/core/index.d.ts.map +1 -0
  37. package/dist/configuration/core/index.js +9 -0
  38. package/dist/configuration/core/index.js.map +1 -0
  39. package/dist/configuration/error/configurationError.error.d.ts +108 -0
  40. package/dist/configuration/error/configurationError.error.d.ts.map +1 -0
  41. package/dist/configuration/error/configurationError.error.js +168 -0
  42. package/dist/configuration/error/configurationError.error.js.map +1 -0
  43. package/dist/configuration/error/configurationRedactor.redactor.d.ts +111 -0
  44. package/dist/configuration/error/configurationRedactor.redactor.d.ts.map +1 -0
  45. package/dist/configuration/error/configurationRedactor.redactor.js +176 -0
  46. package/dist/configuration/error/configurationRedactor.redactor.js.map +1 -0
  47. package/dist/configuration/error/index.d.ts +10 -0
  48. package/dist/configuration/error/index.d.ts.map +1 -0
  49. package/dist/configuration/error/index.js +8 -0
  50. package/dist/configuration/error/index.js.map +1 -0
  51. package/dist/configuration/events/configurationEvents.events.d.ts +174 -0
  52. package/dist/configuration/events/configurationEvents.events.d.ts.map +1 -0
  53. package/dist/configuration/events/configurationEvents.events.js +99 -0
  54. package/dist/configuration/events/configurationEvents.events.js.map +1 -0
  55. package/dist/configuration/events/index.d.ts +8 -0
  56. package/dist/configuration/events/index.d.ts.map +1 -0
  57. package/dist/configuration/events/index.js +7 -0
  58. package/dist/configuration/events/index.js.map +1 -0
  59. package/dist/configuration/index.d.ts +30 -0
  60. package/dist/configuration/index.d.ts.map +1 -0
  61. package/dist/configuration/index.js +29 -0
  62. package/dist/configuration/index.js.map +1 -0
  63. package/dist/configuration/loader/configurationLoader.loader.d.ts +113 -0
  64. package/dist/configuration/loader/configurationLoader.loader.d.ts.map +1 -0
  65. package/dist/configuration/loader/configurationLoader.loader.js +155 -0
  66. package/dist/configuration/loader/configurationLoader.loader.js.map +1 -0
  67. package/dist/configuration/loader/index.d.ts +8 -0
  68. package/dist/configuration/loader/index.d.ts.map +1 -0
  69. package/dist/configuration/loader/index.js +7 -0
  70. package/dist/configuration/loader/index.js.map +1 -0
  71. package/dist/configuration/registry/configurationProvider.provider.d.ts +130 -0
  72. package/dist/configuration/registry/configurationProvider.provider.d.ts.map +1 -0
  73. package/dist/configuration/registry/configurationProvider.provider.js +113 -0
  74. package/dist/configuration/registry/configurationProvider.provider.js.map +1 -0
  75. package/dist/configuration/registry/configurationRegistry.registry.d.ts +143 -0
  76. package/dist/configuration/registry/configurationRegistry.registry.d.ts.map +1 -0
  77. package/dist/configuration/registry/configurationRegistry.registry.js +157 -0
  78. package/dist/configuration/registry/configurationRegistry.registry.js.map +1 -0
  79. package/dist/configuration/registry/index.d.ts +10 -0
  80. package/dist/configuration/registry/index.d.ts.map +1 -0
  81. package/dist/configuration/registry/index.js +8 -0
  82. package/dist/configuration/registry/index.js.map +1 -0
  83. package/dist/configuration/schema/configurationSchema.schema.d.ts +159 -0
  84. package/dist/configuration/schema/configurationSchema.schema.d.ts.map +1 -0
  85. package/dist/configuration/schema/configurationSchema.schema.js +155 -0
  86. package/dist/configuration/schema/configurationSchema.schema.js.map +1 -0
  87. package/dist/configuration/schema/configurationValidation.validator.d.ts +82 -0
  88. package/dist/configuration/schema/configurationValidation.validator.d.ts.map +1 -0
  89. package/dist/configuration/schema/configurationValidation.validator.js +110 -0
  90. package/dist/configuration/schema/configurationValidation.validator.js.map +1 -0
  91. package/dist/configuration/schema/index.d.ts +10 -0
  92. package/dist/configuration/schema/index.d.ts.map +1 -0
  93. package/dist/configuration/schema/index.js +8 -0
  94. package/dist/configuration/schema/index.js.map +1 -0
  95. package/dist/container/container.d.ts +43 -0
  96. package/dist/container/container.d.ts.map +1 -0
  97. package/dist/container/container.js +91 -0
  98. package/dist/container/container.js.map +1 -0
  99. package/dist/container/index.d.ts +8 -0
  100. package/dist/container/index.d.ts.map +1 -0
  101. package/dist/container/index.js +8 -0
  102. package/dist/container/index.js.map +1 -0
  103. package/dist/container/provider.d.ts +28 -0
  104. package/dist/container/provider.d.ts.map +1 -0
  105. package/dist/container/provider.js +2 -0
  106. package/dist/container/provider.js.map +1 -0
  107. package/dist/container/scope.d.ts +24 -0
  108. package/dist/container/scope.d.ts.map +1 -0
  109. package/dist/container/scope.js +2 -0
  110. package/dist/container/scope.js.map +1 -0
  111. package/dist/container/token.d.ts +18 -0
  112. package/dist/container/token.d.ts.map +1 -0
  113. package/dist/container/token.js +10 -0
  114. package/dist/container/token.js.map +1 -0
  115. package/dist/context/core/context.d.ts +95 -0
  116. package/dist/context/core/context.d.ts.map +1 -0
  117. package/dist/context/core/context.js +103 -0
  118. package/dist/context/core/context.js.map +1 -0
  119. package/dist/context/core/contextKey.key.d.ts +60 -0
  120. package/dist/context/core/contextKey.key.d.ts.map +1 -0
  121. package/dist/context/core/contextKey.key.js +58 -0
  122. package/dist/context/core/contextKey.key.js.map +1 -0
  123. package/dist/context/core/executionContext.context.d.ts +131 -0
  124. package/dist/context/core/executionContext.context.d.ts.map +1 -0
  125. package/dist/context/core/executionContext.context.js +81 -0
  126. package/dist/context/core/executionContext.context.js.map +1 -0
  127. package/dist/context/core/index.d.ts +9 -0
  128. package/dist/context/core/index.d.ts.map +1 -0
  129. package/dist/context/core/index.js +9 -0
  130. package/dist/context/core/index.js.map +1 -0
  131. package/dist/context/index.d.ts +8 -0
  132. package/dist/context/index.d.ts.map +1 -0
  133. package/dist/context/index.js +8 -0
  134. package/dist/context/index.js.map +1 -0
  135. package/dist/context/provider/contextProvider.provider.d.ts +61 -0
  136. package/dist/context/provider/contextProvider.provider.d.ts.map +1 -0
  137. package/dist/context/provider/contextProvider.provider.js +44 -0
  138. package/dist/context/provider/contextProvider.provider.js.map +1 -0
  139. package/dist/context/provider/contextStorage.storage.d.ts +54 -0
  140. package/dist/context/provider/contextStorage.storage.d.ts.map +1 -0
  141. package/dist/context/provider/contextStorage.storage.js +74 -0
  142. package/dist/context/provider/contextStorage.storage.js.map +1 -0
  143. package/dist/context/provider/index.d.ts +8 -0
  144. package/dist/context/provider/index.d.ts.map +1 -0
  145. package/dist/context/provider/index.js +8 -0
  146. package/dist/context/provider/index.js.map +1 -0
  147. package/dist/context/snapshot/contextSnapshot.snapshot.d.ts +48 -0
  148. package/dist/context/snapshot/contextSnapshot.snapshot.d.ts.map +1 -0
  149. package/dist/context/snapshot/contextSnapshot.snapshot.js +33 -0
  150. package/dist/context/snapshot/contextSnapshot.snapshot.js.map +1 -0
  151. package/dist/context/snapshot/index.d.ts +8 -0
  152. package/dist/context/snapshot/index.d.ts.map +1 -0
  153. package/dist/context/snapshot/index.js +8 -0
  154. package/dist/context/snapshot/index.js.map +1 -0
  155. package/dist/context/values/contextValues.values.d.ts +84 -0
  156. package/dist/context/values/contextValues.values.d.ts.map +1 -0
  157. package/dist/context/values/contextValues.values.js +120 -0
  158. package/dist/context/values/contextValues.values.js.map +1 -0
  159. package/dist/context/values/index.d.ts +7 -0
  160. package/dist/context/values/index.d.ts.map +1 -0
  161. package/dist/context/values/index.js +7 -0
  162. package/dist/context/values/index.js.map +1 -0
  163. package/dist/contracts/adapter.d.ts +44 -0
  164. package/dist/contracts/adapter.d.ts.map +1 -0
  165. package/dist/contracts/adapter.js +2 -0
  166. package/dist/contracts/adapter.js.map +1 -0
  167. package/dist/contracts/disposable.d.ts +23 -0
  168. package/dist/contracts/disposable.d.ts.map +1 -0
  169. package/dist/contracts/disposable.js +2 -0
  170. package/dist/contracts/disposable.js.map +1 -0
  171. package/dist/contracts/handler.d.ts +32 -0
  172. package/dist/contracts/handler.d.ts.map +1 -0
  173. package/dist/contracts/handler.js +9 -0
  174. package/dist/contracts/handler.js.map +1 -0
  175. package/dist/contracts/index.d.ts +7 -0
  176. package/dist/contracts/index.d.ts.map +1 -0
  177. package/dist/contracts/index.js +7 -0
  178. package/dist/contracts/index.js.map +1 -0
  179. package/dist/errors/errorCode.code.d.ts +78 -0
  180. package/dist/errors/errorCode.code.d.ts.map +1 -0
  181. package/dist/errors/errorCode.code.js +84 -0
  182. package/dist/errors/errorCode.code.js.map +1 -0
  183. package/dist/errors/exceptions.d.ts +52 -0
  184. package/dist/errors/exceptions.d.ts.map +1 -0
  185. package/dist/errors/exceptions.js +125 -0
  186. package/dist/errors/exceptions.js.map +1 -0
  187. package/dist/errors/frameworkError.error.d.ts +51 -0
  188. package/dist/errors/frameworkError.error.d.ts.map +1 -0
  189. package/dist/errors/frameworkError.error.js +54 -0
  190. package/dist/errors/frameworkError.error.js.map +1 -0
  191. package/dist/errors/index.d.ts +10 -0
  192. package/dist/errors/index.d.ts.map +1 -0
  193. package/dist/errors/index.js +9 -0
  194. package/dist/errors/index.js.map +1 -0
  195. package/dist/index.d.ts +30 -0
  196. package/dist/index.d.ts.map +1 -0
  197. package/dist/index.js +75 -0
  198. package/dist/index.js.map +1 -0
  199. package/dist/lifecycle/core/index.d.ts +9 -0
  200. package/dist/lifecycle/core/index.d.ts.map +1 -0
  201. package/dist/lifecycle/core/index.js +9 -0
  202. package/dist/lifecycle/core/index.js.map +1 -0
  203. package/dist/lifecycle/core/lifecycle.d.ts +44 -0
  204. package/dist/lifecycle/core/lifecycle.d.ts.map +1 -0
  205. package/dist/lifecycle/core/lifecycle.js +179 -0
  206. package/dist/lifecycle/core/lifecycle.js.map +1 -0
  207. package/dist/lifecycle/core/lifecycleHook.hook.d.ts +59 -0
  208. package/dist/lifecycle/core/lifecycleHook.hook.d.ts.map +1 -0
  209. package/dist/lifecycle/core/lifecycleHook.hook.js +37 -0
  210. package/dist/lifecycle/core/lifecycleHook.hook.js.map +1 -0
  211. package/dist/lifecycle/core/lifecycleRegistry.registry.d.ts +101 -0
  212. package/dist/lifecycle/core/lifecycleRegistry.registry.d.ts.map +1 -0
  213. package/dist/lifecycle/core/lifecycleRegistry.registry.js +115 -0
  214. package/dist/lifecycle/core/lifecycleRegistry.registry.js.map +1 -0
  215. package/dist/lifecycle/core/lifecycleState.state.d.ts +2 -0
  216. package/dist/lifecycle/core/lifecycleState.state.d.ts.map +1 -0
  217. package/dist/lifecycle/core/lifecycleState.state.js +2 -0
  218. package/dist/lifecycle/core/lifecycleState.state.js.map +1 -0
  219. package/dist/lifecycle/index.d.ts +10 -0
  220. package/dist/lifecycle/index.d.ts.map +1 -0
  221. package/dist/lifecycle/index.js +10 -0
  222. package/dist/lifecycle/index.js.map +1 -0
  223. package/dist/lifecycle/manager/index.d.ts +7 -0
  224. package/dist/lifecycle/manager/index.d.ts.map +1 -0
  225. package/dist/lifecycle/manager/index.js +7 -0
  226. package/dist/lifecycle/manager/index.js.map +1 -0
  227. package/dist/lifecycle/manager/lifecycleManager.manager.d.ts +33 -0
  228. package/dist/lifecycle/manager/lifecycleManager.manager.d.ts.map +1 -0
  229. package/dist/lifecycle/manager/lifecycleManager.manager.js +157 -0
  230. package/dist/lifecycle/manager/lifecycleManager.manager.js.map +1 -0
  231. package/dist/lifecycle/scope/index.d.ts +8 -0
  232. package/dist/lifecycle/scope/index.d.ts.map +1 -0
  233. package/dist/lifecycle/scope/index.js +8 -0
  234. package/dist/lifecycle/scope/index.js.map +1 -0
  235. package/dist/lifecycle/scope/lifecycleScope.scope.d.ts +49 -0
  236. package/dist/lifecycle/scope/lifecycleScope.scope.d.ts.map +1 -0
  237. package/dist/lifecycle/scope/lifecycleScope.scope.js +234 -0
  238. package/dist/lifecycle/scope/lifecycleScope.scope.js.map +1 -0
  239. package/dist/logging/console/consoleLogger.logger.d.ts +59 -0
  240. package/dist/logging/console/consoleLogger.logger.d.ts.map +1 -0
  241. package/dist/logging/console/consoleLogger.logger.js +180 -0
  242. package/dist/logging/console/consoleLogger.logger.js.map +1 -0
  243. package/dist/logging/console/index.d.ts +8 -0
  244. package/dist/logging/console/index.d.ts.map +1 -0
  245. package/dist/logging/console/index.js +8 -0
  246. package/dist/logging/console/index.js.map +1 -0
  247. package/dist/logging/console/loggerFactory.factory.d.ts +45 -0
  248. package/dist/logging/console/loggerFactory.factory.d.ts.map +1 -0
  249. package/dist/logging/console/loggerFactory.factory.js +37 -0
  250. package/dist/logging/console/loggerFactory.factory.js.map +1 -0
  251. package/dist/logging/core/index.d.ts +11 -0
  252. package/dist/logging/core/index.d.ts.map +1 -0
  253. package/dist/logging/core/index.js +11 -0
  254. package/dist/logging/core/index.js.map +1 -0
  255. package/dist/logging/core/logEntry.entry.d.ts +73 -0
  256. package/dist/logging/core/logEntry.entry.d.ts.map +1 -0
  257. package/dist/logging/core/logEntry.entry.js +38 -0
  258. package/dist/logging/core/logEntry.entry.js.map +1 -0
  259. package/dist/logging/core/logLevel.level.d.ts +29 -0
  260. package/dist/logging/core/logLevel.level.d.ts.map +1 -0
  261. package/dist/logging/core/logLevel.level.js +34 -0
  262. package/dist/logging/core/logLevel.level.js.map +1 -0
  263. package/dist/logging/core/logger.d.ts +80 -0
  264. package/dist/logging/core/logger.d.ts.map +1 -0
  265. package/dist/logging/core/logger.js +39 -0
  266. package/dist/logging/core/logger.js.map +1 -0
  267. package/dist/logging/core/loggerContext.context.d.ts +62 -0
  268. package/dist/logging/core/loggerContext.context.d.ts.map +1 -0
  269. package/dist/logging/core/loggerContext.context.js +19 -0
  270. package/dist/logging/core/loggerContext.context.js.map +1 -0
  271. package/dist/logging/core/loggerOptions.options.d.ts +69 -0
  272. package/dist/logging/core/loggerOptions.options.d.ts.map +1 -0
  273. package/dist/logging/core/loggerOptions.options.js +10 -0
  274. package/dist/logging/core/loggerOptions.options.js.map +1 -0
  275. package/dist/logging/index.d.ts +8 -0
  276. package/dist/logging/index.d.ts.map +1 -0
  277. package/dist/logging/index.js +8 -0
  278. package/dist/logging/index.js.map +1 -0
  279. package/dist/modules/index.d.ts +20 -0
  280. package/dist/modules/index.d.ts.map +1 -0
  281. package/dist/modules/index.js +52 -0
  282. package/dist/modules/index.js.map +1 -0
  283. package/dist/modules/module.d.ts +171 -0
  284. package/dist/modules/module.d.ts.map +1 -0
  285. package/dist/modules/module.js +99 -0
  286. package/dist/modules/module.js.map +1 -0
  287. package/dist/modules/moduleContext.context.d.ts +170 -0
  288. package/dist/modules/moduleContext.context.d.ts.map +1 -0
  289. package/dist/modules/moduleContext.context.js +82 -0
  290. package/dist/modules/moduleContext.context.js.map +1 -0
  291. package/dist/modules/moduleDefinition.definition.d.ts +112 -0
  292. package/dist/modules/moduleDefinition.definition.d.ts.map +1 -0
  293. package/dist/modules/moduleDefinition.definition.js +101 -0
  294. package/dist/modules/moduleDefinition.definition.js.map +1 -0
  295. package/dist/modules/moduleDependency/index.d.ts +10 -0
  296. package/dist/modules/moduleDependency/index.d.ts.map +1 -0
  297. package/dist/modules/moduleDependency/index.js +10 -0
  298. package/dist/modules/moduleDependency/index.js.map +1 -0
  299. package/dist/modules/moduleDependency/moduleDependency.graph.d.ts +43 -0
  300. package/dist/modules/moduleDependency/moduleDependency.graph.d.ts.map +1 -0
  301. package/dist/modules/moduleDependency/moduleDependency.graph.js +175 -0
  302. package/dist/modules/moduleDependency/moduleDependency.graph.js.map +1 -0
  303. package/dist/modules/moduleDependency/moduleDependency.ordering.d.ts +38 -0
  304. package/dist/modules/moduleDependency/moduleDependency.ordering.d.ts.map +1 -0
  305. package/dist/modules/moduleDependency/moduleDependency.ordering.js +112 -0
  306. package/dist/modules/moduleDependency/moduleDependency.ordering.js.map +1 -0
  307. package/dist/modules/moduleDependency/moduleDependency.type.d.ts +66 -0
  308. package/dist/modules/moduleDependency/moduleDependency.type.d.ts.map +1 -0
  309. package/dist/modules/moduleDependency/moduleDependency.type.js +2 -0
  310. package/dist/modules/moduleDependency/moduleDependency.type.js.map +1 -0
  311. package/dist/modules/moduleError/index.d.ts +11 -0
  312. package/dist/modules/moduleError/index.d.ts.map +1 -0
  313. package/dist/modules/moduleError/index.js +11 -0
  314. package/dist/modules/moduleError/index.js.map +1 -0
  315. package/dist/modules/moduleError/moduleError.base.d.ts +119 -0
  316. package/dist/modules/moduleError/moduleError.base.d.ts.map +1 -0
  317. package/dist/modules/moduleError/moduleError.base.js +105 -0
  318. package/dist/modules/moduleError/moduleError.base.js.map +1 -0
  319. package/dist/modules/moduleError/moduleError.dependency.d.ts +45 -0
  320. package/dist/modules/moduleError/moduleError.dependency.d.ts.map +1 -0
  321. package/dist/modules/moduleError/moduleError.dependency.js +55 -0
  322. package/dist/modules/moduleError/moduleError.dependency.js.map +1 -0
  323. package/dist/modules/moduleError/moduleError.helpers.d.ts +22 -0
  324. package/dist/modules/moduleError/moduleError.helpers.d.ts.map +1 -0
  325. package/dist/modules/moduleError/moduleError.helpers.js +32 -0
  326. package/dist/modules/moduleError/moduleError.helpers.js.map +1 -0
  327. package/dist/modules/moduleError/moduleError.lifecycle.d.ts +61 -0
  328. package/dist/modules/moduleError/moduleError.lifecycle.d.ts.map +1 -0
  329. package/dist/modules/moduleError/moduleError.lifecycle.js +107 -0
  330. package/dist/modules/moduleError/moduleError.lifecycle.js.map +1 -0
  331. package/dist/modules/moduleError/moduleError.registration.d.ts +21 -0
  332. package/dist/modules/moduleError/moduleError.registration.d.ts.map +1 -0
  333. package/dist/modules/moduleError/moduleError.registration.js +39 -0
  334. package/dist/modules/moduleError/moduleError.registration.js.map +1 -0
  335. package/dist/modules/moduleLifecycle/index.d.ts +10 -0
  336. package/dist/modules/moduleLifecycle/index.d.ts.map +1 -0
  337. package/dist/modules/moduleLifecycle/index.js +10 -0
  338. package/dist/modules/moduleLifecycle/index.js.map +1 -0
  339. package/dist/modules/moduleLifecycle/moduleLifecycle.lifecycle.d.ts +41 -0
  340. package/dist/modules/moduleLifecycle/moduleLifecycle.lifecycle.d.ts.map +1 -0
  341. package/dist/modules/moduleLifecycle/moduleLifecycle.lifecycle.js +116 -0
  342. package/dist/modules/moduleLifecycle/moduleLifecycle.lifecycle.js.map +1 -0
  343. package/dist/modules/moduleLifecycle/moduleLifecycle.stateMachine.d.ts +21 -0
  344. package/dist/modules/moduleLifecycle/moduleLifecycle.stateMachine.d.ts.map +1 -0
  345. package/dist/modules/moduleLifecycle/moduleLifecycle.stateMachine.js +107 -0
  346. package/dist/modules/moduleLifecycle/moduleLifecycle.stateMachine.js.map +1 -0
  347. package/dist/modules/moduleLifecycle/moduleLifecycle.type.d.ts +94 -0
  348. package/dist/modules/moduleLifecycle/moduleLifecycle.type.d.ts.map +1 -0
  349. package/dist/modules/moduleLifecycle/moduleLifecycle.type.js +11 -0
  350. package/dist/modules/moduleLifecycle/moduleLifecycle.type.js.map +1 -0
  351. package/dist/modules/moduleLoader/index.d.ts +9 -0
  352. package/dist/modules/moduleLoader/index.d.ts.map +1 -0
  353. package/dist/modules/moduleLoader/index.js +9 -0
  354. package/dist/modules/moduleLoader/index.js.map +1 -0
  355. package/dist/modules/moduleLoader/moduleLoader.loader.d.ts +36 -0
  356. package/dist/modules/moduleLoader/moduleLoader.loader.d.ts.map +1 -0
  357. package/dist/modules/moduleLoader/moduleLoader.loader.js +164 -0
  358. package/dist/modules/moduleLoader/moduleLoader.loader.js.map +1 -0
  359. package/dist/modules/moduleLoader/moduleLoader.type.d.ts +57 -0
  360. package/dist/modules/moduleLoader/moduleLoader.type.d.ts.map +1 -0
  361. package/dist/modules/moduleLoader/moduleLoader.type.js +11 -0
  362. package/dist/modules/moduleLoader/moduleLoader.type.js.map +1 -0
  363. package/dist/modules/moduleMetadata.metadata.d.ts +36 -0
  364. package/dist/modules/moduleMetadata.metadata.d.ts.map +1 -0
  365. package/dist/modules/moduleMetadata.metadata.js +105 -0
  366. package/dist/modules/moduleMetadata.metadata.js.map +1 -0
  367. package/dist/modules/moduleRegistry/index.d.ts +8 -0
  368. package/dist/modules/moduleRegistry/index.d.ts.map +1 -0
  369. package/dist/modules/moduleRegistry/index.js +8 -0
  370. package/dist/modules/moduleRegistry/index.js.map +1 -0
  371. package/dist/modules/moduleRegistry/moduleRegistry.registry.d.ts +35 -0
  372. package/dist/modules/moduleRegistry/moduleRegistry.registry.d.ts.map +1 -0
  373. package/dist/modules/moduleRegistry/moduleRegistry.registry.js +155 -0
  374. package/dist/modules/moduleRegistry/moduleRegistry.registry.js.map +1 -0
  375. package/dist/modules/moduleRegistry/moduleRegistry.type.d.ts +134 -0
  376. package/dist/modules/moduleRegistry/moduleRegistry.type.d.ts.map +1 -0
  377. package/dist/modules/moduleRegistry/moduleRegistry.type.js +2 -0
  378. package/dist/modules/moduleRegistry/moduleRegistry.type.js.map +1 -0
  379. package/dist/runtime/index.d.ts +24 -0
  380. package/dist/runtime/index.d.ts.map +1 -0
  381. package/dist/runtime/index.js +42 -0
  382. package/dist/runtime/index.js.map +1 -0
  383. package/dist/runtime/runtime.d.ts +89 -0
  384. package/dist/runtime/runtime.d.ts.map +1 -0
  385. package/dist/runtime/runtime.js +179 -0
  386. package/dist/runtime/runtime.js.map +1 -0
  387. package/dist/runtime/runtimeBootstrap/index.d.ts +10 -0
  388. package/dist/runtime/runtimeBootstrap/index.d.ts.map +1 -0
  389. package/dist/runtime/runtimeBootstrap/index.js +9 -0
  390. package/dist/runtime/runtimeBootstrap/index.js.map +1 -0
  391. package/dist/runtime/runtimeBootstrap/pipeline/index.d.ts +8 -0
  392. package/dist/runtime/runtimeBootstrap/pipeline/index.d.ts.map +1 -0
  393. package/dist/runtime/runtimeBootstrap/pipeline/index.js +8 -0
  394. package/dist/runtime/runtimeBootstrap/pipeline/index.js.map +1 -0
  395. package/dist/runtime/runtimeBootstrap/pipeline/runtimeBootstrap.invoke.d.ts +6 -0
  396. package/dist/runtime/runtimeBootstrap/pipeline/runtimeBootstrap.invoke.d.ts.map +1 -0
  397. package/dist/runtime/runtimeBootstrap/pipeline/runtimeBootstrap.invoke.js +27 -0
  398. package/dist/runtime/runtimeBootstrap/pipeline/runtimeBootstrap.invoke.js.map +1 -0
  399. package/dist/runtime/runtimeBootstrap/pipeline/runtimeBootstrap.pipeline.d.ts +19 -0
  400. package/dist/runtime/runtimeBootstrap/pipeline/runtimeBootstrap.pipeline.d.ts.map +1 -0
  401. package/dist/runtime/runtimeBootstrap/pipeline/runtimeBootstrap.pipeline.js +107 -0
  402. package/dist/runtime/runtimeBootstrap/pipeline/runtimeBootstrap.pipeline.js.map +1 -0
  403. package/dist/runtime/runtimeBootstrap/runtimeBootstrap.core.d.ts +25 -0
  404. package/dist/runtime/runtimeBootstrap/runtimeBootstrap.core.d.ts.map +1 -0
  405. package/dist/runtime/runtimeBootstrap/runtimeBootstrap.core.js +122 -0
  406. package/dist/runtime/runtimeBootstrap/runtimeBootstrap.core.js.map +1 -0
  407. package/dist/runtime/runtimeBootstrap/runtimeBootstrap.type.d.ts +78 -0
  408. package/dist/runtime/runtimeBootstrap/runtimeBootstrap.type.d.ts.map +1 -0
  409. package/dist/runtime/runtimeBootstrap/runtimeBootstrap.type.js +2 -0
  410. package/dist/runtime/runtimeBootstrap/runtimeBootstrap.type.js.map +1 -0
  411. package/dist/runtime/runtimeContext/index.d.ts +10 -0
  412. package/dist/runtime/runtimeContext/index.d.ts.map +1 -0
  413. package/dist/runtime/runtimeContext/index.js +9 -0
  414. package/dist/runtime/runtimeContext/index.js.map +1 -0
  415. package/dist/runtime/runtimeContext/runtimeContext.core.d.ts +38 -0
  416. package/dist/runtime/runtimeContext/runtimeContext.core.d.ts.map +1 -0
  417. package/dist/runtime/runtimeContext/runtimeContext.core.js +99 -0
  418. package/dist/runtime/runtimeContext/runtimeContext.core.js.map +1 -0
  419. package/dist/runtime/runtimeContext/runtimeContext.factory.d.ts +22 -0
  420. package/dist/runtime/runtimeContext/runtimeContext.factory.d.ts.map +1 -0
  421. package/dist/runtime/runtimeContext/runtimeContext.factory.js +43 -0
  422. package/dist/runtime/runtimeContext/runtimeContext.factory.js.map +1 -0
  423. package/dist/runtime/runtimeContext/runtimeContext.type.d.ts +68 -0
  424. package/dist/runtime/runtimeContext/runtimeContext.type.d.ts.map +1 -0
  425. package/dist/runtime/runtimeContext/runtimeContext.type.js +2 -0
  426. package/dist/runtime/runtimeContext/runtimeContext.type.js.map +1 -0
  427. package/dist/runtime/runtimeEnvironment/detection/index.d.ts +9 -0
  428. package/dist/runtime/runtimeEnvironment/detection/index.d.ts.map +1 -0
  429. package/dist/runtime/runtimeEnvironment/detection/index.js +9 -0
  430. package/dist/runtime/runtimeEnvironment/detection/index.js.map +1 -0
  431. package/dist/runtime/runtimeEnvironment/detection/runtimeEnvironment.detection.d.ts +8 -0
  432. package/dist/runtime/runtimeEnvironment/detection/runtimeEnvironment.detection.d.ts.map +1 -0
  433. package/dist/runtime/runtimeEnvironment/detection/runtimeEnvironment.detection.js +92 -0
  434. package/dist/runtime/runtimeEnvironment/detection/runtimeEnvironment.detection.js.map +1 -0
  435. package/dist/runtime/runtimeEnvironment/detection/runtimeEnvironment.env.d.ts +4 -0
  436. package/dist/runtime/runtimeEnvironment/detection/runtimeEnvironment.env.d.ts.map +1 -0
  437. package/dist/runtime/runtimeEnvironment/detection/runtimeEnvironment.env.js +51 -0
  438. package/dist/runtime/runtimeEnvironment/detection/runtimeEnvironment.env.js.map +1 -0
  439. package/dist/runtime/runtimeEnvironment/detection/runtimeEnvironment.os.d.ts +4 -0
  440. package/dist/runtime/runtimeEnvironment/detection/runtimeEnvironment.os.d.ts.map +1 -0
  441. package/dist/runtime/runtimeEnvironment/detection/runtimeEnvironment.os.js +26 -0
  442. package/dist/runtime/runtimeEnvironment/detection/runtimeEnvironment.os.js.map +1 -0
  443. package/dist/runtime/runtimeEnvironment/index.d.ts +10 -0
  444. package/dist/runtime/runtimeEnvironment/index.d.ts.map +1 -0
  445. package/dist/runtime/runtimeEnvironment/index.js +9 -0
  446. package/dist/runtime/runtimeEnvironment/index.js.map +1 -0
  447. package/dist/runtime/runtimeEnvironment/runtimeEnvironment.core.d.ts +41 -0
  448. package/dist/runtime/runtimeEnvironment/runtimeEnvironment.core.d.ts.map +1 -0
  449. package/dist/runtime/runtimeEnvironment/runtimeEnvironment.core.js +105 -0
  450. package/dist/runtime/runtimeEnvironment/runtimeEnvironment.core.js.map +1 -0
  451. package/dist/runtime/runtimeEnvironment/runtimeEnvironment.type.d.ts +108 -0
  452. package/dist/runtime/runtimeEnvironment/runtimeEnvironment.type.d.ts.map +1 -0
  453. package/dist/runtime/runtimeEnvironment/runtimeEnvironment.type.js +2 -0
  454. package/dist/runtime/runtimeEnvironment/runtimeEnvironment.type.js.map +1 -0
  455. package/dist/runtime/runtimeError/index.d.ts +29 -0
  456. package/dist/runtime/runtimeError/index.d.ts.map +1 -0
  457. package/dist/runtime/runtimeError/index.js +47 -0
  458. package/dist/runtime/runtimeError/index.js.map +1 -0
  459. package/dist/runtime/runtimeError/runtimeError.base.d.ts +30 -0
  460. package/dist/runtime/runtimeError/runtimeError.base.d.ts.map +1 -0
  461. package/dist/runtime/runtimeError/runtimeError.base.js +81 -0
  462. package/dist/runtime/runtimeError/runtimeError.base.js.map +1 -0
  463. package/dist/runtime/runtimeError/runtimeError.lifecycle.d.ts +35 -0
  464. package/dist/runtime/runtimeError/runtimeError.lifecycle.d.ts.map +1 -0
  465. package/dist/runtime/runtimeError/runtimeError.lifecycle.js +77 -0
  466. package/dist/runtime/runtimeError/runtimeError.lifecycle.js.map +1 -0
  467. package/dist/runtime/runtimeError/runtimeError.specialized.d.ts +35 -0
  468. package/dist/runtime/runtimeError/runtimeError.specialized.d.ts.map +1 -0
  469. package/dist/runtime/runtimeError/runtimeError.specialized.js +79 -0
  470. package/dist/runtime/runtimeError/runtimeError.specialized.js.map +1 -0
  471. package/dist/runtime/runtimeError/runtimeError.type.d.ts +74 -0
  472. package/dist/runtime/runtimeError/runtimeError.type.d.ts.map +1 -0
  473. package/dist/runtime/runtimeError/runtimeError.type.js +28 -0
  474. package/dist/runtime/runtimeError/runtimeError.type.js.map +1 -0
  475. package/dist/runtime/runtimeLogger.d.ts +5 -0
  476. package/dist/runtime/runtimeLogger.d.ts.map +1 -0
  477. package/dist/runtime/runtimeLogger.js +18 -0
  478. package/dist/runtime/runtimeLogger.js.map +1 -0
  479. package/dist/runtime/runtimeManager/index.d.ts +12 -0
  480. package/dist/runtime/runtimeManager/index.d.ts.map +1 -0
  481. package/dist/runtime/runtimeManager/index.js +11 -0
  482. package/dist/runtime/runtimeManager/index.js.map +1 -0
  483. package/dist/runtime/runtimeManager/runtimeManager.core.d.ts +31 -0
  484. package/dist/runtime/runtimeManager/runtimeManager.core.d.ts.map +1 -0
  485. package/dist/runtime/runtimeManager/runtimeManager.core.js +136 -0
  486. package/dist/runtime/runtimeManager/runtimeManager.core.js.map +1 -0
  487. package/dist/runtime/runtimeManager/runtimeManager.error.d.ts +14 -0
  488. package/dist/runtime/runtimeManager/runtimeManager.error.d.ts.map +1 -0
  489. package/dist/runtime/runtimeManager/runtimeManager.error.js +21 -0
  490. package/dist/runtime/runtimeManager/runtimeManager.error.js.map +1 -0
  491. package/dist/runtime/runtimeManager/runtimeManager.factory.d.ts +7 -0
  492. package/dist/runtime/runtimeManager/runtimeManager.factory.d.ts.map +1 -0
  493. package/dist/runtime/runtimeManager/runtimeManager.factory.js +8 -0
  494. package/dist/runtime/runtimeManager/runtimeManager.factory.js.map +1 -0
  495. package/dist/runtime/runtimeManager/runtimeManager.lifecycle.d.ts +16 -0
  496. package/dist/runtime/runtimeManager/runtimeManager.lifecycle.d.ts.map +1 -0
  497. package/dist/runtime/runtimeManager/runtimeManager.lifecycle.js +49 -0
  498. package/dist/runtime/runtimeManager/runtimeManager.lifecycle.js.map +1 -0
  499. package/dist/runtime/runtimeManager/runtimeManager.type.d.ts +54 -0
  500. package/dist/runtime/runtimeManager/runtimeManager.type.d.ts.map +1 -0
  501. package/dist/runtime/runtimeManager/runtimeManager.type.js +2 -0
  502. package/dist/runtime/runtimeManager/runtimeManager.type.js.map +1 -0
  503. package/dist/runtime/runtimeOptions/index.d.ts +10 -0
  504. package/dist/runtime/runtimeOptions/index.d.ts.map +1 -0
  505. package/dist/runtime/runtimeOptions/index.js +9 -0
  506. package/dist/runtime/runtimeOptions/index.js.map +1 -0
  507. package/dist/runtime/runtimeOptions/runtimeOptions.defaults.d.ts +6 -0
  508. package/dist/runtime/runtimeOptions/runtimeOptions.defaults.d.ts.map +1 -0
  509. package/dist/runtime/runtimeOptions/runtimeOptions.defaults.js +37 -0
  510. package/dist/runtime/runtimeOptions/runtimeOptions.defaults.js.map +1 -0
  511. package/dist/runtime/runtimeOptions/runtimeOptions.resolver.d.ts +10 -0
  512. package/dist/runtime/runtimeOptions/runtimeOptions.resolver.d.ts.map +1 -0
  513. package/dist/runtime/runtimeOptions/runtimeOptions.resolver.js +80 -0
  514. package/dist/runtime/runtimeOptions/runtimeOptions.resolver.js.map +1 -0
  515. package/dist/runtime/runtimeOptions/runtimeOptions.type.d.ts +94 -0
  516. package/dist/runtime/runtimeOptions/runtimeOptions.type.d.ts.map +1 -0
  517. package/dist/runtime/runtimeOptions/runtimeOptions.type.js +2 -0
  518. package/dist/runtime/runtimeOptions/runtimeOptions.type.js.map +1 -0
  519. package/dist/runtime/runtimeOptions/runtimeOptions.validation.d.ts +26 -0
  520. package/dist/runtime/runtimeOptions/runtimeOptions.validation.d.ts.map +1 -0
  521. package/dist/runtime/runtimeOptions/runtimeOptions.validation.js +59 -0
  522. package/dist/runtime/runtimeOptions/runtimeOptions.validation.js.map +1 -0
  523. package/dist/runtime/runtimeShutdown/index.d.ts +10 -0
  524. package/dist/runtime/runtimeShutdown/index.d.ts.map +1 -0
  525. package/dist/runtime/runtimeShutdown/index.js +9 -0
  526. package/dist/runtime/runtimeShutdown/index.js.map +1 -0
  527. package/dist/runtime/runtimeShutdown/pipeline/index.d.ts +7 -0
  528. package/dist/runtime/runtimeShutdown/pipeline/index.d.ts.map +1 -0
  529. package/dist/runtime/runtimeShutdown/pipeline/index.js +7 -0
  530. package/dist/runtime/runtimeShutdown/pipeline/index.js.map +1 -0
  531. package/dist/runtime/runtimeShutdown/pipeline/runtimeShutdown.pipeline.d.ts +9 -0
  532. package/dist/runtime/runtimeShutdown/pipeline/runtimeShutdown.pipeline.d.ts.map +1 -0
  533. package/dist/runtime/runtimeShutdown/pipeline/runtimeShutdown.pipeline.js +67 -0
  534. package/dist/runtime/runtimeShutdown/pipeline/runtimeShutdown.pipeline.js.map +1 -0
  535. package/dist/runtime/runtimeShutdown/runtimeShutdown.core.d.ts +35 -0
  536. package/dist/runtime/runtimeShutdown/runtimeShutdown.core.d.ts.map +1 -0
  537. package/dist/runtime/runtimeShutdown/runtimeShutdown.core.js +147 -0
  538. package/dist/runtime/runtimeShutdown/runtimeShutdown.core.js.map +1 -0
  539. package/dist/runtime/runtimeShutdown/runtimeShutdown.type.d.ts +74 -0
  540. package/dist/runtime/runtimeShutdown/runtimeShutdown.type.d.ts.map +1 -0
  541. package/dist/runtime/runtimeShutdown/runtimeShutdown.type.js +2 -0
  542. package/dist/runtime/runtimeShutdown/runtimeShutdown.type.js.map +1 -0
  543. package/dist/runtime/runtimeState.state.d.ts +60 -0
  544. package/dist/runtime/runtimeState.state.d.ts.map +1 -0
  545. package/dist/runtime/runtimeState.state.js +157 -0
  546. package/dist/runtime/runtimeState.state.js.map +1 -0
  547. package/package.json +85 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"token.d.ts","sourceRoot":"","sources":["../../src/container/token.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,KAAK,CAAC,CAAC,GAAG,OAAO,IAAI,gBAAgB,CAAC,CAAC,CAAC,GAAG,MAAM,GAAG,MAAM,CAAC;AAEvE;;GAEG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI,KAAK,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;AAEhE;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,CAAC,GAAG,OAAO,EAAE,WAAW,EAAE,MAAM,GAAG,KAAK,CAAC,CAAC,CAAC,CAEtE"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Creates a unique symbol token.
3
+ *
4
+ * Useful for interfaces and infrastructure contracts that do not
5
+ * exist at runtime.
6
+ */
7
+ export function createToken(description) {
8
+ return Symbol(description);
9
+ }
10
+ //# sourceMappingURL=token.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"token.js","sourceRoot":"","sources":["../../src/container/token.ts"],"names":[],"mappings":"AAYA;;;;;GAKG;AACH,MAAM,UAAU,WAAW,CAAc,WAAmB;IAC1D,OAAO,MAAM,CAAC,WAAW,CAAC,CAAC;AAC7B,CAAC"}
@@ -0,0 +1,95 @@
1
+ import type { ApplicationContext } from "../../application/applicationContext.context.js";
2
+ /**
3
+ * Represents the source through which an execution was initiated.
4
+ */
5
+ export type ContextType = "http" | "rpc" | "message" | "job" | "cli" | "worker" | "unknown";
6
+ /**
7
+ * Metadata describing a single execution.
8
+ */
9
+ export interface ExecutionMetadata {
10
+ readonly id: string;
11
+ readonly type: ContextType;
12
+ readonly createdAt: Date;
13
+ }
14
+ /**
15
+ * Represents one unit of execution inside a Zudojs application.
16
+ *
17
+ * An execution context can represent an HTTP request, background job,
18
+ * queue message, RPC call, CLI command, or another execution source.
19
+ *
20
+ * Context combines:
21
+ * - A reference to the application (via ApplicationContext)
22
+ * - Execution-specific metadata (id, type, timestamp)
23
+ * - Mutable values for the execution lifetime
24
+ *
25
+ * This is useful when you need to track execution-specific state
26
+ * alongside application-wide capabilities.
27
+ */
28
+ export declare class Context {
29
+ private readonly application;
30
+ private readonly metadata;
31
+ private readonly values;
32
+ constructor(application: ApplicationContext, metadata: ExecutionMetadata);
33
+ /**
34
+ * Returns the application context associated with this execution.
35
+ */
36
+ getApplication(): ApplicationContext;
37
+ /**
38
+ * Returns execution metadata.
39
+ */
40
+ getMetadata(): ExecutionMetadata;
41
+ /**
42
+ * Returns the unique execution ID.
43
+ */
44
+ getId(): string;
45
+ /**
46
+ * Returns the execution type.
47
+ */
48
+ getType(): ContextType;
49
+ /**
50
+ * Stores a value for the lifetime of this execution context.
51
+ */
52
+ set<T>(key: string | symbol, value: T): void;
53
+ /**
54
+ * Retrieves a value from the execution context.
55
+ */
56
+ get<T>(key: string | symbol): T | undefined;
57
+ /**
58
+ * Checks whether a value exists in the execution context.
59
+ */
60
+ has(key: string | symbol): boolean;
61
+ /**
62
+ * Removes a value from the execution context.
63
+ */
64
+ delete(key: string | symbol): boolean;
65
+ /**
66
+ * Clears all values associated with this execution.
67
+ */
68
+ clear(): void;
69
+ }
70
+ /**
71
+ * Options for creating a Context.
72
+ */
73
+ export interface CreateContextOptions {
74
+ /**
75
+ * Application context.
76
+ */
77
+ readonly application: ApplicationContext;
78
+ /**
79
+ * Execution type.
80
+ */
81
+ readonly type: ContextType;
82
+ /**
83
+ * Optional execution ID. Generated if not provided.
84
+ */
85
+ readonly id?: string;
86
+ /**
87
+ * Optional creation timestamp. Current time used if not provided.
88
+ */
89
+ readonly createdAt?: Date;
90
+ }
91
+ /**
92
+ * Creates a new execution Context.
93
+ */
94
+ export declare function createContext(options: CreateContextOptions): Context;
95
+ //# sourceMappingURL=context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/context/core/context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iDAAiD,CAAC;AAE1F;;GAEG;AACH,MAAM,MAAM,WAAW,GACrB,MAAM,GAAG,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,KAAK,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEpE;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAC3B,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC;CAC1B;AAED;;;;;;;;;;;;;GAaG;AACH,qBAAa,OAAO;IAClB,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAqB;IACjD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAoB;IAE7C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAuC;IAE9D,YACE,WAAW,EAAE,kBAAkB,EAC/B,QAAQ,EAAE,iBAAiB,EAI5B;IAED;;OAEG;IACI,cAAc,IAAI,kBAAkB,CAE1C;IAED;;OAEG;IACI,WAAW,IAAI,iBAAiB,CAEtC;IAED;;OAEG;IACI,KAAK,IAAI,MAAM,CAErB;IAED;;OAEG;IACI,OAAO,IAAI,WAAW,CAE5B;IAED;;OAEG;IACI,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI,CAElD;IAED;;OAEG;IACI,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,CAAC,GAAG,SAAS,CAEjD;IAED;;OAEG;IACI,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAExC;IAED;;OAEG;IACI,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAE3C;IAED;;OAEG;IACI,KAAK,IAAI,IAAI,CAEnB;CACF;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,QAAQ,CAAC,WAAW,EAAE,kBAAkB,CAAC;IAEzC;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAE3B;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC;CAC3B;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,oBAAoB,GAAG,OAAO,CAQpE"}
@@ -0,0 +1,103 @@
1
+ /**
2
+ * Represents one unit of execution inside a Zudojs application.
3
+ *
4
+ * An execution context can represent an HTTP request, background job,
5
+ * queue message, RPC call, CLI command, or another execution source.
6
+ *
7
+ * Context combines:
8
+ * - A reference to the application (via ApplicationContext)
9
+ * - Execution-specific metadata (id, type, timestamp)
10
+ * - Mutable values for the execution lifetime
11
+ *
12
+ * This is useful when you need to track execution-specific state
13
+ * alongside application-wide capabilities.
14
+ */
15
+ export class Context {
16
+ application;
17
+ metadata;
18
+ values = new Map();
19
+ constructor(application, metadata) {
20
+ this.application = application;
21
+ this.metadata = metadata;
22
+ }
23
+ /**
24
+ * Returns the application context associated with this execution.
25
+ */
26
+ getApplication() {
27
+ return this.application;
28
+ }
29
+ /**
30
+ * Returns execution metadata.
31
+ */
32
+ getMetadata() {
33
+ return this.metadata;
34
+ }
35
+ /**
36
+ * Returns the unique execution ID.
37
+ */
38
+ getId() {
39
+ return this.metadata.id;
40
+ }
41
+ /**
42
+ * Returns the execution type.
43
+ */
44
+ getType() {
45
+ return this.metadata.type;
46
+ }
47
+ /**
48
+ * Stores a value for the lifetime of this execution context.
49
+ */
50
+ set(key, value) {
51
+ this.values.set(key, value);
52
+ }
53
+ /**
54
+ * Retrieves a value from the execution context.
55
+ */
56
+ get(key) {
57
+ return this.values.get(key);
58
+ }
59
+ /**
60
+ * Checks whether a value exists in the execution context.
61
+ */
62
+ has(key) {
63
+ return this.values.has(key);
64
+ }
65
+ /**
66
+ * Removes a value from the execution context.
67
+ */
68
+ delete(key) {
69
+ return this.values.delete(key);
70
+ }
71
+ /**
72
+ * Clears all values associated with this execution.
73
+ */
74
+ clear() {
75
+ this.values.clear();
76
+ }
77
+ }
78
+ /**
79
+ * Creates a new execution Context.
80
+ */
81
+ export function createContext(options) {
82
+ const metadata = {
83
+ id: options.id ?? createExecutionId(),
84
+ type: options.type,
85
+ createdAt: options.createdAt ?? new Date(),
86
+ };
87
+ return new Context(options.application, metadata);
88
+ }
89
+ /**
90
+ * Creates a unique execution identifier.
91
+ */
92
+ function createExecutionId() {
93
+ if (typeof globalThis.crypto !== "undefined" &&
94
+ typeof globalThis.crypto.randomUUID === "function") {
95
+ return globalThis.crypto.randomUUID();
96
+ }
97
+ return [
98
+ Date.now().toString(36),
99
+ Math.random().toString(36).slice(2),
100
+ Math.random().toString(36).slice(2),
101
+ ].join("-");
102
+ }
103
+ //# sourceMappingURL=context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.js","sourceRoot":"","sources":["../../../src/context/core/context.ts"],"names":[],"mappings":"AAiBA;;;;;;;;;;;;;GAaG;AACH,MAAM,OAAO,OAAO;IACD,WAAW,CAAqB;IAChC,QAAQ,CAAoB;IAE5B,MAAM,GAAG,IAAI,GAAG,EAA4B,CAAC;IAE9D,YACE,WAA+B,EAC/B,QAA2B;QAE3B,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAED;;OAEG;IACI,cAAc;QACnB,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAED;;OAEG;IACI,WAAW;QAChB,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED;;OAEG;IACI,KAAK;QACV,OAAO,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;IAC1B,CAAC;IAED;;OAEG;IACI,OAAO;QACZ,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;IAC5B,CAAC;IAED;;OAEG;IACI,GAAG,CAAI,GAAoB,EAAE,KAAQ;QAC1C,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IAC9B,CAAC;IAED;;OAEG;IACI,GAAG,CAAI,GAAoB;QAChC,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAkB,CAAC;IAC/C,CAAC;IAED;;OAEG;IACI,GAAG,CAAC,GAAoB;QAC7B,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC9B,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,GAAoB;QAChC,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACjC,CAAC;IAED;;OAEG;IACI,KAAK;QACV,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;IACtB,CAAC;CACF;AA2BD;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,OAA6B;IACzD,MAAM,QAAQ,GAAsB;QAClC,EAAE,EAAE,OAAO,CAAC,EAAE,IAAI,iBAAiB,EAAE;QACrC,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,SAAS,EAAE,OAAO,CAAC,SAAS,IAAI,IAAI,IAAI,EAAE;KAC3C,CAAC;IAEF,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;AACpD,CAAC;AAED;;GAEG;AACH,SAAS,iBAAiB;IACxB,IACE,OAAO,UAAU,CAAC,MAAM,KAAK,WAAW;QACxC,OAAO,UAAU,CAAC,MAAM,CAAC,UAAU,KAAK,UAAU,EAClD,CAAC;QACD,OAAO,UAAU,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;IACxC,CAAC;IAED,OAAO;QACL,IAAI,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC;QACvB,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;QACnC,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;KACpC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACd,CAAC"}
@@ -0,0 +1,60 @@
1
+ /**
2
+ * A typed key used to store and retrieve values from
3
+ * an execution context.
4
+ *
5
+ * The generic type represents the value associated with
6
+ * the key.
7
+ */
8
+ export interface ContextKey<T> {
9
+ /**
10
+ * Unique key identifier.
11
+ */
12
+ readonly id: symbol;
13
+ /**
14
+ * Human-readable key name.
15
+ *
16
+ * Useful for debugging and diagnostics.
17
+ */
18
+ readonly name: string;
19
+ }
20
+ /**
21
+ * Creates a strongly typed ContextKey.
22
+ *
23
+ * Example:
24
+ *
25
+ * const userKey = createContextKey<User>(
26
+ * "authenticated-user",
27
+ * );
28
+ */
29
+ export declare function createContextKey<T>(name: string): ContextKey<T>;
30
+ /**
31
+ * Internal storage used by the execution context
32
+ * for strongly typed values.
33
+ */
34
+ export type ContextValueStore = Map<symbol, unknown>;
35
+ /**
36
+ * Stores a value against a context key.
37
+ */
38
+ export declare function setContextValue<T>(store: ContextValueStore, key: ContextKey<T>, value: T): void;
39
+ /**
40
+ * Retrieves a value associated with a context key.
41
+ *
42
+ * Returns undefined when the key has not been registered
43
+ * in the current context.
44
+ */
45
+ export declare function getContextValue<T>(store: ContextValueStore, key: ContextKey<T>): T | undefined;
46
+ /**
47
+ * Retrieves a required context value.
48
+ *
49
+ * Throws when the value does not exist.
50
+ */
51
+ export declare function requireContextValue<T>(store: ContextValueStore, key: ContextKey<T>): T;
52
+ /**
53
+ * Checks whether a context value exists.
54
+ */
55
+ export declare function hasContextValue<T>(store: ContextValueStore, key: ContextKey<T>): boolean;
56
+ /**
57
+ * Removes a context value.
58
+ */
59
+ export declare function deleteContextValue<T>(store: ContextValueStore, key: ContextKey<T>): boolean;
60
+ //# sourceMappingURL=contextKey.key.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contextKey.key.d.ts","sourceRoot":"","sources":["../../../src/context/core/contextKey.key.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,WAAW,UAAU,CAAC,CAAC;IAC3B;;OAEG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAEpB;;;;OAIG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,UAAU,CAAC,CAAC,CAAC,CAS/D;AAED;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAErD;;GAEG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAC/B,KAAK,EAAE,iBAAiB,EACxB,GAAG,EAAE,UAAU,CAAC,CAAC,CAAC,EAClB,KAAK,EAAE,CAAC,GACP,IAAI,CAEN;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAC/B,KAAK,EAAE,iBAAiB,EACxB,GAAG,EAAE,UAAU,CAAC,CAAC,CAAC,GACjB,CAAC,GAAG,SAAS,CAEf;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EACnC,KAAK,EAAE,iBAAiB,EACxB,GAAG,EAAE,UAAU,CAAC,CAAC,CAAC,GACjB,CAAC,CAQH;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAC/B,KAAK,EAAE,iBAAiB,EACxB,GAAG,EAAE,UAAU,CAAC,CAAC,CAAC,GACjB,OAAO,CAET;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAClC,KAAK,EAAE,iBAAiB,EACxB,GAAG,EAAE,UAAU,CAAC,CAAC,CAAC,GACjB,OAAO,CAET"}
@@ -0,0 +1,58 @@
1
+ /**
2
+ * Creates a strongly typed ContextKey.
3
+ *
4
+ * Example:
5
+ *
6
+ * const userKey = createContextKey<User>(
7
+ * "authenticated-user",
8
+ * );
9
+ */
10
+ export function createContextKey(name) {
11
+ if (!name.trim()) {
12
+ throw new Error("Context key name cannot be empty.");
13
+ }
14
+ return Object.freeze({
15
+ id: Symbol(name),
16
+ name,
17
+ });
18
+ }
19
+ /**
20
+ * Stores a value against a context key.
21
+ */
22
+ export function setContextValue(store, key, value) {
23
+ store.set(key.id, value);
24
+ }
25
+ /**
26
+ * Retrieves a value associated with a context key.
27
+ *
28
+ * Returns undefined when the key has not been registered
29
+ * in the current context.
30
+ */
31
+ export function getContextValue(store, key) {
32
+ return store.get(key.id);
33
+ }
34
+ /**
35
+ * Retrieves a required context value.
36
+ *
37
+ * Throws when the value does not exist.
38
+ */
39
+ export function requireContextValue(store, key) {
40
+ const value = getContextValue(store, key);
41
+ if (value === undefined) {
42
+ throw new Error(`Required context value "${key.name}" is not available.`);
43
+ }
44
+ return value;
45
+ }
46
+ /**
47
+ * Checks whether a context value exists.
48
+ */
49
+ export function hasContextValue(store, key) {
50
+ return store.has(key.id);
51
+ }
52
+ /**
53
+ * Removes a context value.
54
+ */
55
+ export function deleteContextValue(store, key) {
56
+ return store.delete(key.id);
57
+ }
58
+ //# sourceMappingURL=contextKey.key.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contextKey.key.js","sourceRoot":"","sources":["../../../src/context/core/contextKey.key.ts"],"names":[],"mappings":"AAqBA;;;;;;;;GAQG;AACH,MAAM,UAAU,gBAAgB,CAAI,IAAY;IAC9C,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;IACvD,CAAC;IAED,OAAO,MAAM,CAAC,MAAM,CAAC;QACnB,EAAE,EAAE,MAAM,CAAC,IAAI,CAAC;QAChB,IAAI;KACL,CAAC,CAAC;AACL,CAAC;AAQD;;GAEG;AACH,MAAM,UAAU,eAAe,CAC7B,KAAwB,EACxB,GAAkB,EAClB,KAAQ;IAER,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;AAC3B,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAC7B,KAAwB,EACxB,GAAkB;IAElB,OAAO,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAkB,CAAC;AAC5C,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,mBAAmB,CACjC,KAAwB,EACxB,GAAkB;IAElB,MAAM,KAAK,GAAG,eAAe,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAE1C,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACxB,MAAM,IAAI,KAAK,CAAC,2BAA2B,GAAG,CAAC,IAAI,qBAAqB,CAAC,CAAC;IAC5E,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAC7B,KAAwB,EACxB,GAAkB;IAElB,OAAO,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAC3B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAChC,KAAwB,EACxB,GAAkB;IAElB,OAAO,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAC9B,CAAC"}
@@ -0,0 +1,131 @@
1
+ /**
2
+ * Represents the execution context of a single operation
3
+ * within a Zudojs application.
4
+ *
5
+ * An execution can represent:
6
+ *
7
+ * HTTP request
8
+ * RPC request
9
+ * Message consumption
10
+ * Background job
11
+ * Scheduled task
12
+ * CLI command
13
+ * Internal application operation
14
+ */
15
+ export interface ExecutionContext {
16
+ /**
17
+ * Unique identifier for this execution.
18
+ */
19
+ readonly executionId: string;
20
+ /**
21
+ * Identifier used to correlate related operations.
22
+ */
23
+ readonly correlationId?: string;
24
+ /**
25
+ * Distributed tracing identifier.
26
+ */
27
+ readonly traceId?: string;
28
+ /**
29
+ * Current tracing span identifier.
30
+ */
31
+ readonly spanId?: string;
32
+ /**
33
+ * Identifier of the authenticated principal.
34
+ *
35
+ * The principal can represent a user, service account,
36
+ * API client, or another authenticated identity.
37
+ */
38
+ readonly principalId?: string;
39
+ /**
40
+ * Authentication scheme used for the execution.
41
+ *
42
+ * Examples:
43
+ *
44
+ * bearer
45
+ * api-key
46
+ * session
47
+ * service
48
+ */
49
+ readonly authenticationScheme?: string;
50
+ /**
51
+ * Name of the application or service handling the execution.
52
+ */
53
+ readonly service?: string;
54
+ /**
55
+ * Name of the module or bounded context handling the execution.
56
+ */
57
+ readonly module?: string;
58
+ /**
59
+ * Name of the operation being executed.
60
+ */
61
+ readonly operation?: string;
62
+ /**
63
+ * Origin transport of the execution.
64
+ *
65
+ * Examples:
66
+ *
67
+ * http
68
+ * rpc
69
+ * messaging
70
+ * websocket
71
+ * worker
72
+ * cli
73
+ */
74
+ readonly transport?: string;
75
+ /**
76
+ * Start time of the execution.
77
+ */
78
+ readonly startedAt: Date;
79
+ /**
80
+ * Arbitrary execution scoped metadata.
81
+ */
82
+ readonly metadata: Readonly<Record<string, unknown>>;
83
+ }
84
+ /**
85
+ * Input used to create an ExecutionContext.
86
+ *
87
+ * The execution ID and start time can be generated automatically.
88
+ */
89
+ export interface CreateExecutionContextInput extends Partial<Omit<ExecutionContext, "executionId" | "startedAt" | "metadata">> {
90
+ /**
91
+ * Optional execution identifier.
92
+ *
93
+ * When omitted, the framework generates one.
94
+ */
95
+ readonly executionId?: string;
96
+ /**
97
+ * Optional execution start time.
98
+ *
99
+ * When omitted, the current time is used.
100
+ */
101
+ readonly startedAt?: Date;
102
+ /**
103
+ * Optional execution metadata.
104
+ */
105
+ readonly metadata?: Record<string, unknown>;
106
+ }
107
+ /**
108
+ * Creates a new execution context.
109
+ */
110
+ export declare function createExecutionContext(input?: CreateExecutionContextInput): ExecutionContext;
111
+ /**
112
+ * Creates a new execution context from an existing context.
113
+ *
114
+ * Existing values are preserved unless explicitly overridden.
115
+ * Metadata is merged rather than replaced.
116
+ */
117
+ export declare function deriveExecutionContext(context: ExecutionContext, overrides?: Partial<Omit<ExecutionContext, "executionId" | "startedAt" | "metadata">> & {
118
+ readonly executionId?: string;
119
+ readonly startedAt?: Date;
120
+ readonly metadata?: Record<string, unknown>;
121
+ }): ExecutionContext;
122
+ /**
123
+ * Adds metadata to an execution context without mutating
124
+ * the existing context.
125
+ */
126
+ export declare function withExecutionMetadata(context: ExecutionContext, metadata: Record<string, unknown>): ExecutionContext;
127
+ /**
128
+ * Returns the duration of an execution in milliseconds.
129
+ */
130
+ export declare function getExecutionDuration(context: ExecutionContext, endTime?: Date): number;
131
+ //# sourceMappingURL=executionContext.context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"executionContext.context.d.ts","sourceRoot":"","sources":["../../../src/context/core/executionContext.context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAE7B;;OAEG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAEhC;;OAEG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAEzB;;;;;OAKG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAE9B;;;;;;;;;OASG;IACH,QAAQ,CAAC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAEvC;;OAEG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAE5B;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAE5B;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,IAAI,CAAC;IAEzB;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACtD;AAED;;;;GAIG;AACH,MAAM,WAAW,2BAA4B,SAAQ,OAAO,CAC1D,IAAI,CAAC,gBAAgB,EAAE,aAAa,GAAG,WAAW,GAAG,UAAU,CAAC,CACjE;IACC;;;;OAIG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAE9B;;;;OAIG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC;IAE1B;;OAEG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC7C;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,GAAE,2BAAgC,GACtC,gBAAgB,CA4BlB;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,gBAAgB,EACzB,SAAS,GAAE,OAAO,CAChB,IAAI,CAAC,gBAAgB,EAAE,aAAa,GAAG,WAAW,GAAG,UAAU,CAAC,CACjE,GAAG;IACF,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC;IAC1B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACxC,GACL,gBAAgB,CA8BlB;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,gBAAgB,EACzB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAChC,gBAAgB,CAIlB;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,gBAAgB,EACzB,OAAO,GAAE,IAAiB,GACzB,MAAM,CAER"}
@@ -0,0 +1,81 @@
1
+ /**
2
+ * Creates a new execution context.
3
+ */
4
+ export function createExecutionContext(input = {}) {
5
+ return Object.freeze({
6
+ executionId: input.executionId ?? createExecutionId(),
7
+ correlationId: input.correlationId,
8
+ traceId: input.traceId,
9
+ spanId: input.spanId,
10
+ principalId: input.principalId,
11
+ authenticationScheme: input.authenticationScheme,
12
+ service: input.service,
13
+ module: input.module,
14
+ operation: input.operation,
15
+ transport: input.transport,
16
+ startedAt: input.startedAt ?? new Date(),
17
+ metadata: Object.freeze({
18
+ ...(input.metadata ?? {}),
19
+ }),
20
+ });
21
+ }
22
+ /**
23
+ * Creates a new execution context from an existing context.
24
+ *
25
+ * Existing values are preserved unless explicitly overridden.
26
+ * Metadata is merged rather than replaced.
27
+ */
28
+ export function deriveExecutionContext(context, overrides = {}) {
29
+ return createExecutionContext({
30
+ executionId: overrides.executionId ?? context.executionId,
31
+ correlationId: overrides.correlationId ?? context.correlationId,
32
+ traceId: overrides.traceId ?? context.traceId,
33
+ spanId: overrides.spanId ?? context.spanId,
34
+ principalId: overrides.principalId ?? context.principalId,
35
+ authenticationScheme: overrides.authenticationScheme ?? context.authenticationScheme,
36
+ service: overrides.service ?? context.service,
37
+ module: overrides.module ?? context.module,
38
+ operation: overrides.operation ?? context.operation,
39
+ transport: overrides.transport ?? context.transport,
40
+ startedAt: overrides.startedAt ?? context.startedAt,
41
+ metadata: {
42
+ ...context.metadata,
43
+ ...(overrides.metadata ?? {}),
44
+ },
45
+ });
46
+ }
47
+ /**
48
+ * Adds metadata to an execution context without mutating
49
+ * the existing context.
50
+ */
51
+ export function withExecutionMetadata(context, metadata) {
52
+ return deriveExecutionContext(context, {
53
+ metadata,
54
+ });
55
+ }
56
+ /**
57
+ * Returns the duration of an execution in milliseconds.
58
+ */
59
+ export function getExecutionDuration(context, endTime = new Date()) {
60
+ return endTime.getTime() - context.startedAt.getTime();
61
+ }
62
+ /**
63
+ * Creates a framework execution identifier.
64
+ *
65
+ * Uses crypto.randomUUID when available.
66
+ */
67
+ function createExecutionId() {
68
+ if (typeof globalThis.crypto !== "undefined" &&
69
+ typeof globalThis.crypto.randomUUID === "function") {
70
+ return globalThis.crypto.randomUUID();
71
+ }
72
+ /**
73
+ * Fallback for environments where Web Crypto is unavailable.
74
+ */
75
+ return [
76
+ Date.now().toString(36),
77
+ Math.random().toString(36).slice(2),
78
+ Math.random().toString(36).slice(2),
79
+ ].join("-");
80
+ }
81
+ //# sourceMappingURL=executionContext.context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"executionContext.context.js","sourceRoot":"","sources":["../../../src/context/core/executionContext.context.ts"],"names":[],"mappings":"AA2HA;;GAEG;AACH,MAAM,UAAU,sBAAsB,CACpC,KAAK,GAAgC,EAAE;IAEvC,OAAO,MAAM,CAAC,MAAM,CAAC;QACnB,WAAW,EAAE,KAAK,CAAC,WAAW,IAAI,iBAAiB,EAAE;QAErD,aAAa,EAAE,KAAK,CAAC,aAAa;QAElC,OAAO,EAAE,KAAK,CAAC,OAAO;QAEtB,MAAM,EAAE,KAAK,CAAC,MAAM;QAEpB,WAAW,EAAE,KAAK,CAAC,WAAW;QAE9B,oBAAoB,EAAE,KAAK,CAAC,oBAAoB;QAEhD,OAAO,EAAE,KAAK,CAAC,OAAO;QAEtB,MAAM,EAAE,KAAK,CAAC,MAAM;QAEpB,SAAS,EAAE,KAAK,CAAC,SAAS;QAE1B,SAAS,EAAE,KAAK,CAAC,SAAS;QAE1B,SAAS,EAAE,KAAK,CAAC,SAAS,IAAI,IAAI,IAAI,EAAE;QAExC,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC;YACtB,GAAG,CAAC,KAAK,CAAC,QAAQ,IAAI,EAAE,CAAC;SAC1B,CAAC;KACH,CAAC,CAAC;AACL,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,sBAAsB,CACpC,OAAyB,EACzB,SAAS,GAML,EAAE;IAEN,OAAO,sBAAsB,CAAC;QAC5B,WAAW,EAAE,SAAS,CAAC,WAAW,IAAI,OAAO,CAAC,WAAW;QAEzD,aAAa,EAAE,SAAS,CAAC,aAAa,IAAI,OAAO,CAAC,aAAa;QAE/D,OAAO,EAAE,SAAS,CAAC,OAAO,IAAI,OAAO,CAAC,OAAO;QAE7C,MAAM,EAAE,SAAS,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM;QAE1C,WAAW,EAAE,SAAS,CAAC,WAAW,IAAI,OAAO,CAAC,WAAW;QAEzD,oBAAoB,EAClB,SAAS,CAAC,oBAAoB,IAAI,OAAO,CAAC,oBAAoB;QAEhE,OAAO,EAAE,SAAS,CAAC,OAAO,IAAI,OAAO,CAAC,OAAO;QAE7C,MAAM,EAAE,SAAS,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM;QAE1C,SAAS,EAAE,SAAS,CAAC,SAAS,IAAI,OAAO,CAAC,SAAS;QAEnD,SAAS,EAAE,SAAS,CAAC,SAAS,IAAI,OAAO,CAAC,SAAS;QAEnD,SAAS,EAAE,SAAS,CAAC,SAAS,IAAI,OAAO,CAAC,SAAS;QAEnD,QAAQ,EAAE;YACR,GAAG,OAAO,CAAC,QAAQ;YACnB,GAAG,CAAC,SAAS,CAAC,QAAQ,IAAI,EAAE,CAAC;SAC9B;KACF,CAAC,CAAC;AACL,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,qBAAqB,CACnC,OAAyB,EACzB,QAAiC;IAEjC,OAAO,sBAAsB,CAAC,OAAO,EAAE;QACrC,QAAQ;KACT,CAAC,CAAC;AACL,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,oBAAoB,CAClC,OAAyB,EACzB,OAAO,GAAS,IAAI,IAAI,EAAE;IAE1B,OAAO,OAAO,CAAC,OAAO,EAAE,GAAG,OAAO,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC;AACzD,CAAC;AAED;;;;GAIG;AACH,SAAS,iBAAiB;IACxB,IACE,OAAO,UAAU,CAAC,MAAM,KAAK,WAAW;QACxC,OAAO,UAAU,CAAC,MAAM,CAAC,UAAU,KAAK,UAAU,EAClD,CAAC;QACD,OAAO,UAAU,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;IACxC,CAAC;IAED;;OAEG;IACH,OAAO;QACL,IAAI,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC;QACvB,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;QACnC,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;KACpC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACd,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @zudojs/core/context/core
3
+ *
4
+ * Core context types and key management.
5
+ */
6
+ export { Context, createContext, type ContextType, type ExecutionMetadata, type CreateContextOptions, } from "./context.js";
7
+ export { createExecutionContext, deriveExecutionContext, withExecutionMetadata, getExecutionDuration, type ExecutionContext, type CreateExecutionContextInput, } from "./executionContext.context.js";
8
+ export { createContextKey, setContextValue, getContextValue, requireContextValue, hasContextValue, deleteContextValue, type ContextKey, type ContextValueStore, } from "./contextKey.key.js";
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/context/core/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,OAAO,EACP,aAAa,EACb,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,GAC1B,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,EACrB,oBAAoB,EACpB,KAAK,gBAAgB,EACrB,KAAK,2BAA2B,GACjC,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,eAAe,EACf,kBAAkB,EAClB,KAAK,UAAU,EACf,KAAK,iBAAiB,GACvB,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @zudojs/core/context/core
3
+ *
4
+ * Core context types and key management.
5
+ */
6
+ export { Context, createContext, } from "./context.js";
7
+ export { createExecutionContext, deriveExecutionContext, withExecutionMetadata, getExecutionDuration, } from "./executionContext.context.js";
8
+ export { createContextKey, setContextValue, getContextValue, requireContextValue, hasContextValue, deleteContextValue, } from "./contextKey.key.js";
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/context/core/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,OAAO,EACP,aAAa,GAId,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,EACrB,oBAAoB,GAGrB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,eAAe,EACf,kBAAkB,GAGnB,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Execution context.
3
+ */
4
+ export * from "./core/index.js";
5
+ export * from "./provider/index.js";
6
+ export * from "./values/index.js";
7
+ export * from "./snapshot/index.js";
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/context/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,iBAAiB,CAAC;AAEhC,cAAc,qBAAqB,CAAC;AAEpC,cAAc,mBAAmB,CAAC;AAElC,cAAc,qBAAqB,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Execution context.
3
+ */
4
+ export * from "./core/index.js";
5
+ export * from "./provider/index.js";
6
+ export * from "./values/index.js";
7
+ export * from "./snapshot/index.js";
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/context/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,iBAAiB,CAAC;AAEhC,cAAc,qBAAqB,CAAC;AAEpC,cAAc,mBAAmB,CAAC;AAElC,cAAc,qBAAqB,CAAC"}