@zudojs/core 0.1.0 → 1.1.0

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 (485) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +141 -7
  3. package/dist/application/application.d.ts +43 -2
  4. package/dist/application/application.js +111 -13
  5. package/dist/application/applicationContext.context.d.ts +27 -1
  6. package/dist/application/applicationContext.context.js +22 -2
  7. package/dist/application/createApplication.d.ts +78 -0
  8. package/dist/application/createApplication.js +109 -0
  9. package/dist/application/index.d.ts +2 -1
  10. package/dist/application/index.js +2 -1
  11. package/dist/configuration/configurationManager.manager.d.ts +42 -0
  12. package/dist/configuration/configurationManager.manager.js +104 -7
  13. package/dist/configuration/core/configuration.d.ts +60 -15
  14. package/dist/configuration/core/configuration.js +248 -51
  15. package/dist/configuration/core/configurationKey.key.d.ts +4 -2
  16. package/dist/configuration/core/configurationKey.key.js +2 -13
  17. package/dist/configuration/core/configurationPath.path.d.ts +17 -0
  18. package/dist/configuration/core/configurationPath.path.js +33 -0
  19. package/dist/configuration/core/index.d.ts +7 -1
  20. package/dist/configuration/core/index.js +1 -0
  21. package/dist/configuration/error/configurationError.error.d.ts +11 -0
  22. package/dist/configuration/error/configurationError.error.js +29 -1
  23. package/dist/configuration/error/configurationRedactor.redactor.d.ts +16 -0
  24. package/dist/configuration/error/configurationRedactor.redactor.js +83 -5
  25. package/dist/configuration/error/index.d.ts +2 -1
  26. package/dist/configuration/error/index.js +2 -1
  27. package/dist/configuration/index.d.ts +1 -1
  28. package/dist/configuration/loader/configurationLoader.loader.d.ts +47 -9
  29. package/dist/configuration/loader/configurationLoader.loader.js +107 -26
  30. package/dist/configuration/loader/index.d.ts +1 -1
  31. package/dist/configuration/loader/index.js +1 -1
  32. package/dist/configuration/registry/configurationProvider.provider.d.ts +26 -1
  33. package/dist/configuration/registry/configurationProvider.provider.js +33 -7
  34. package/dist/configuration/registry/configurationRegistry.registry.js +2 -1
  35. package/dist/configuration/schema/configurationSchema.schema.d.ts +0 -4
  36. package/dist/configuration/schema/configurationSchema.schema.js +11 -32
  37. package/dist/configuration/schema/configurationValidation.validator.d.ts +14 -2
  38. package/dist/configuration/schema/configurationValidation.validator.js +55 -7
  39. package/dist/configuration/schema/index.d.ts +1 -1
  40. package/dist/configuration/schema/index.js +1 -1
  41. package/dist/container/container.d.ts +51 -5
  42. package/dist/container/container.js +104 -33
  43. package/dist/container/index.d.ts +1 -1
  44. package/dist/container/index.js +1 -1
  45. package/dist/container/scope.d.ts +7 -6
  46. package/dist/context/core/contextAliases.deprecated.d.ts +32 -0
  47. package/dist/context/core/contextAliases.deprecated.js +6 -0
  48. package/dist/context/core/executionContext.context.d.ts +8 -0
  49. package/dist/context/core/executionContext.context.js +38 -15
  50. package/dist/context/core/index.d.ts +2 -2
  51. package/dist/context/core/index.js +2 -2
  52. package/dist/context/index.d.ts +20 -0
  53. package/dist/context/index.js +20 -0
  54. package/dist/context/provider/contextProvider.provider.d.ts +7 -4
  55. package/dist/context/provider/contextProvider.provider.js +9 -6
  56. package/dist/context/provider/contextStorage.storage.d.ts +47 -7
  57. package/dist/context/provider/contextStorage.storage.js +54 -12
  58. package/dist/context/provider/defaultContextStorage.storage.d.ts +18 -0
  59. package/dist/context/provider/defaultContextStorage.storage.js +20 -0
  60. package/dist/context/provider/index.d.ts +2 -1
  61. package/dist/context/provider/index.js +1 -0
  62. package/dist/errors/exceptions.d.ts +22 -0
  63. package/dist/errors/exceptions.js +38 -1
  64. package/dist/errors/frameworkError.error.d.ts +6 -9
  65. package/dist/errors/index.d.ts +1 -1
  66. package/dist/errors/index.js +1 -1
  67. package/dist/index.d.ts +4 -0
  68. package/dist/index.js +14 -0
  69. package/dist/lifecycle/core/index.d.ts +1 -1
  70. package/dist/lifecycle/core/index.js +1 -1
  71. package/dist/lifecycle/core/lifecycle.d.ts +47 -2
  72. package/dist/lifecycle/core/lifecycle.js +251 -85
  73. package/dist/lifecycle/core/lifecycleRegistry.registry.d.ts +8 -0
  74. package/dist/lifecycle/core/lifecycleRegistry.registry.js +20 -1
  75. package/dist/lifecycle/manager/lifecycleManager.manager.d.ts +21 -2
  76. package/dist/lifecycle/manager/lifecycleManager.manager.js +62 -99
  77. package/dist/lifecycle/scope/lifecycleScope.scope.d.ts +22 -1
  78. package/dist/lifecycle/scope/lifecycleScope.scope.js +85 -17
  79. package/dist/logging/console/consoleLogger.logger.d.ts +20 -1
  80. package/dist/logging/console/consoleLogger.logger.js +77 -11
  81. package/dist/logging/console/loggerFactory.factory.d.ts +6 -5
  82. package/dist/logging/console/loggerFactory.factory.js +1 -7
  83. package/dist/logging/core/index.d.ts +4 -3
  84. package/dist/logging/core/index.js +4 -3
  85. package/dist/logging/core/logEntry.entry.d.ts +41 -3
  86. package/dist/logging/core/logEntry.entry.js +125 -4
  87. package/dist/logging/core/logLevel.level.d.ts +18 -0
  88. package/dist/logging/core/logLevel.level.js +25 -1
  89. package/dist/logging/core/logRedaction.redaction.d.ts +38 -0
  90. package/dist/logging/core/logRedaction.redaction.js +19 -0
  91. package/dist/logging/core/logger.d.ts +14 -11
  92. package/dist/logging/core/logger.js +31 -6
  93. package/dist/logging/core/loggerContext.context.d.ts +12 -0
  94. package/dist/logging/core/loggerContext.context.js +19 -0
  95. package/dist/logging/core/loggerOptions.options.d.ts +17 -0
  96. package/dist/modules/index.d.ts +0 -1
  97. package/dist/modules/index.js +0 -6
  98. package/dist/modules/module.d.ts +7 -1
  99. package/dist/modules/moduleContext.context.d.ts +41 -7
  100. package/dist/modules/moduleContext.context.js +31 -8
  101. package/dist/modules/moduleDefinition.definition.d.ts +11 -7
  102. package/dist/modules/moduleDefinition.definition.js +41 -8
  103. package/dist/modules/moduleDependency/index.d.ts +2 -2
  104. package/dist/modules/moduleDependency/index.js +1 -1
  105. package/dist/modules/moduleDependency/moduleDependency.graph.d.ts +19 -2
  106. package/dist/modules/moduleDependency/moduleDependency.graph.js +122 -8
  107. package/dist/modules/moduleDependency/moduleDependency.ordering.d.ts +8 -0
  108. package/dist/modules/moduleDependency/moduleDependency.ordering.js +85 -57
  109. package/dist/modules/moduleDependency/moduleDependency.type.d.ts +28 -1
  110. package/dist/modules/moduleError/index.d.ts +1 -1
  111. package/dist/modules/moduleError/index.js +1 -1
  112. package/dist/modules/moduleError/moduleError.dependency.d.ts +11 -0
  113. package/dist/modules/moduleError/moduleError.dependency.js +15 -0
  114. package/dist/modules/moduleLifecycle/index.d.ts +5 -2
  115. package/dist/modules/moduleLifecycle/index.js +4 -1
  116. package/dist/modules/moduleLifecycle/moduleLifecycle.lifecycle.d.ts +73 -10
  117. package/dist/modules/moduleLifecycle/moduleLifecycle.lifecycle.js +204 -19
  118. package/dist/modules/moduleLifecycle/moduleLifecycle.stateMachine.d.ts +30 -5
  119. package/dist/modules/moduleLifecycle/moduleLifecycle.stateMachine.js +130 -10
  120. package/dist/modules/moduleLifecycle/moduleLifecycle.type.d.ts +78 -28
  121. package/dist/modules/moduleLifecycle/moduleLifecycle.type.js +15 -4
  122. package/dist/modules/moduleLoader/moduleLoader.loader.d.ts +39 -5
  123. package/dist/modules/moduleLoader/moduleLoader.loader.js +168 -59
  124. package/dist/modules/moduleLoader/moduleLoader.type.d.ts +4 -2
  125. package/dist/modules/moduleLoader/moduleLoader.type.js +10 -3
  126. package/dist/modules/moduleMetadata.metadata.js +15 -5
  127. package/dist/modules/moduleRegistry/index.d.ts +1 -1
  128. package/dist/modules/moduleRegistry/moduleRegistry.registry.d.ts +2 -2
  129. package/dist/modules/moduleRegistry/moduleRegistry.registry.js +38 -6
  130. package/dist/modules/moduleRegistry/moduleRegistry.type.d.ts +18 -1
  131. package/dist/runtime/index.d.ts +17 -15
  132. package/dist/runtime/index.js +14 -10
  133. package/dist/runtime/runtime.d.ts +135 -33
  134. package/dist/runtime/runtime.js +344 -114
  135. package/dist/runtime/runtimeBootstrap/index.d.ts +2 -1
  136. package/dist/runtime/runtimeBootstrap/index.js +1 -1
  137. package/dist/runtime/runtimeBootstrap/pipeline/index.d.ts +2 -2
  138. package/dist/runtime/runtimeBootstrap/pipeline/index.js +1 -2
  139. package/dist/runtime/runtimeBootstrap/pipeline/runtimeBootstrap.pipeline.d.ts +41 -15
  140. package/dist/runtime/runtimeBootstrap/pipeline/runtimeBootstrap.pipeline.js +111 -76
  141. package/dist/runtime/runtimeBootstrap/runtimeBootstrap.core.d.ts +7 -4
  142. package/dist/runtime/runtimeBootstrap/runtimeBootstrap.core.js +87 -59
  143. package/dist/runtime/runtimeBootstrap/runtimeBootstrap.type.d.ts +10 -4
  144. package/dist/runtime/runtimeContext/index.d.ts +3 -5
  145. package/dist/runtime/runtimeContext/index.js +2 -4
  146. package/dist/runtime/runtimeContext/runtimeContext.factory.d.ts +10 -4
  147. package/dist/runtime/runtimeContext/runtimeContext.factory.js +30 -7
  148. package/dist/runtime/runtimeContext/runtimeContext.type.d.ts +36 -47
  149. package/dist/runtime/runtimeEnvironment/detection/runtimeEnvironment.env.d.ts +5 -0
  150. package/dist/runtime/runtimeEnvironment/detection/runtimeEnvironment.env.js +6 -4
  151. package/dist/runtime/runtimeEnvironment/detection/runtimeEnvironment.os.d.ts +4 -0
  152. package/dist/runtime/runtimeEnvironment/detection/runtimeEnvironment.os.js +7 -9
  153. package/dist/runtime/runtimeEnvironment/index.d.ts +2 -2
  154. package/dist/runtime/runtimeEnvironment/index.js +1 -1
  155. package/dist/runtime/runtimeEnvironment/runtimeEnvironment.core.d.ts +20 -17
  156. package/dist/runtime/runtimeEnvironment/runtimeEnvironment.core.js +20 -13
  157. package/dist/runtime/runtimeEnvironment/runtimeEnvironment.type.d.ts +12 -1
  158. package/dist/runtime/runtimeError/index.d.ts +3 -3
  159. package/dist/runtime/runtimeError/index.js +1 -1
  160. package/dist/runtime/runtimeError/runtimeError.base.d.ts +15 -18
  161. package/dist/runtime/runtimeError/runtimeError.base.js +38 -36
  162. package/dist/runtime/runtimeError/runtimeError.lifecycle.d.ts +23 -8
  163. package/dist/runtime/runtimeError/runtimeError.lifecycle.js +31 -7
  164. package/dist/runtime/runtimeError/runtimeError.specialized.d.ts +1 -1
  165. package/dist/runtime/runtimeError/runtimeError.specialized.js +1 -1
  166. package/dist/runtime/runtimeError/runtimeError.type.d.ts +5 -9
  167. package/dist/runtime/runtimeLogger.d.ts +2 -2
  168. package/dist/runtime/runtimeLogger.js +3 -3
  169. package/dist/runtime/runtimeOptions/index.d.ts +1 -1
  170. package/dist/runtime/runtimeOptions/runtimeOptions.defaults.d.ts +1 -1
  171. package/dist/runtime/runtimeOptions/runtimeOptions.defaults.js +2 -0
  172. package/dist/runtime/runtimeOptions/runtimeOptions.resolver.js +13 -2
  173. package/dist/runtime/runtimeOptions/runtimeOptions.type.d.ts +45 -16
  174. package/dist/runtime/runtimeOptions/runtimeOptions.validation.js +0 -1
  175. package/dist/runtime/runtimeShutdown/index.d.ts +3 -2
  176. package/dist/runtime/runtimeShutdown/index.js +2 -2
  177. package/dist/runtime/runtimeShutdown/pipeline/index.d.ts +2 -1
  178. package/dist/runtime/runtimeShutdown/pipeline/index.js +1 -1
  179. package/dist/runtime/runtimeShutdown/pipeline/runtimeShutdown.pipeline.d.ts +37 -7
  180. package/dist/runtime/runtimeShutdown/pipeline/runtimeShutdown.pipeline.js +85 -51
  181. package/dist/runtime/runtimeShutdown/runtimeShutdown.core.d.ts +8 -16
  182. package/dist/runtime/runtimeShutdown/runtimeShutdown.core.js +85 -87
  183. package/dist/runtime/runtimeShutdown/runtimeShutdown.type.d.ts +9 -5
  184. package/dist/runtime/runtimeSignals/index.d.ts +8 -0
  185. package/dist/runtime/runtimeSignals/index.js +7 -0
  186. package/dist/runtime/runtimeSignals/runtimeSignals.d.ts +93 -0
  187. package/dist/runtime/runtimeSignals/runtimeSignals.js +149 -0
  188. package/dist/runtime/runtimeState.state.d.ts +32 -14
  189. package/dist/runtime/runtimeState.state.js +34 -27
  190. package/dist/runtime/runtimeTimeout.d.ts +40 -0
  191. package/dist/runtime/runtimeTimeout.js +42 -0
  192. package/package.json +25 -15
  193. package/dist/.tsbuildinfo +0 -1
  194. package/dist/application/application.d.ts.map +0 -1
  195. package/dist/application/application.js.map +0 -1
  196. package/dist/application/applicationContext.context.d.ts.map +0 -1
  197. package/dist/application/applicationContext.context.js.map +0 -1
  198. package/dist/application/applicationState.state.d.ts.map +0 -1
  199. package/dist/application/applicationState.state.js.map +0 -1
  200. package/dist/application/index.d.ts.map +0 -1
  201. package/dist/application/index.js.map +0 -1
  202. package/dist/configuration/configurationManager.manager.d.ts.map +0 -1
  203. package/dist/configuration/configurationManager.manager.js.map +0 -1
  204. package/dist/configuration/core/configuration.d.ts.map +0 -1
  205. package/dist/configuration/core/configuration.js.map +0 -1
  206. package/dist/configuration/core/configurationKey.key.d.ts.map +0 -1
  207. package/dist/configuration/core/configurationKey.key.js.map +0 -1
  208. package/dist/configuration/core/configurationSource.source.d.ts.map +0 -1
  209. package/dist/configuration/core/configurationSource.source.js.map +0 -1
  210. package/dist/configuration/core/index.d.ts.map +0 -1
  211. package/dist/configuration/core/index.js.map +0 -1
  212. package/dist/configuration/error/configurationError.error.d.ts.map +0 -1
  213. package/dist/configuration/error/configurationError.error.js.map +0 -1
  214. package/dist/configuration/error/configurationRedactor.redactor.d.ts.map +0 -1
  215. package/dist/configuration/error/configurationRedactor.redactor.js.map +0 -1
  216. package/dist/configuration/error/index.d.ts.map +0 -1
  217. package/dist/configuration/error/index.js.map +0 -1
  218. package/dist/configuration/events/configurationEvents.events.d.ts.map +0 -1
  219. package/dist/configuration/events/configurationEvents.events.js.map +0 -1
  220. package/dist/configuration/events/index.d.ts.map +0 -1
  221. package/dist/configuration/events/index.js.map +0 -1
  222. package/dist/configuration/index.d.ts.map +0 -1
  223. package/dist/configuration/index.js.map +0 -1
  224. package/dist/configuration/loader/configurationLoader.loader.d.ts.map +0 -1
  225. package/dist/configuration/loader/configurationLoader.loader.js.map +0 -1
  226. package/dist/configuration/loader/index.d.ts.map +0 -1
  227. package/dist/configuration/loader/index.js.map +0 -1
  228. package/dist/configuration/registry/configurationProvider.provider.d.ts.map +0 -1
  229. package/dist/configuration/registry/configurationProvider.provider.js.map +0 -1
  230. package/dist/configuration/registry/configurationRegistry.registry.d.ts.map +0 -1
  231. package/dist/configuration/registry/configurationRegistry.registry.js.map +0 -1
  232. package/dist/configuration/registry/index.d.ts.map +0 -1
  233. package/dist/configuration/registry/index.js.map +0 -1
  234. package/dist/configuration/schema/configurationSchema.schema.d.ts.map +0 -1
  235. package/dist/configuration/schema/configurationSchema.schema.js.map +0 -1
  236. package/dist/configuration/schema/configurationValidation.validator.d.ts.map +0 -1
  237. package/dist/configuration/schema/configurationValidation.validator.js.map +0 -1
  238. package/dist/configuration/schema/index.d.ts.map +0 -1
  239. package/dist/configuration/schema/index.js.map +0 -1
  240. package/dist/container/container.d.ts.map +0 -1
  241. package/dist/container/container.js.map +0 -1
  242. package/dist/container/index.d.ts.map +0 -1
  243. package/dist/container/index.js.map +0 -1
  244. package/dist/container/provider.d.ts.map +0 -1
  245. package/dist/container/provider.js.map +0 -1
  246. package/dist/container/scope.d.ts.map +0 -1
  247. package/dist/container/scope.js.map +0 -1
  248. package/dist/container/token.d.ts.map +0 -1
  249. package/dist/container/token.js.map +0 -1
  250. package/dist/context/core/context.d.ts +0 -95
  251. package/dist/context/core/context.d.ts.map +0 -1
  252. package/dist/context/core/context.js +0 -103
  253. package/dist/context/core/context.js.map +0 -1
  254. package/dist/context/core/contextKey.key.d.ts.map +0 -1
  255. package/dist/context/core/contextKey.key.js.map +0 -1
  256. package/dist/context/core/executionContext.context.d.ts.map +0 -1
  257. package/dist/context/core/executionContext.context.js.map +0 -1
  258. package/dist/context/core/index.d.ts.map +0 -1
  259. package/dist/context/core/index.js.map +0 -1
  260. package/dist/context/index.d.ts.map +0 -1
  261. package/dist/context/index.js.map +0 -1
  262. package/dist/context/provider/contextProvider.provider.d.ts.map +0 -1
  263. package/dist/context/provider/contextProvider.provider.js.map +0 -1
  264. package/dist/context/provider/contextStorage.storage.d.ts.map +0 -1
  265. package/dist/context/provider/contextStorage.storage.js.map +0 -1
  266. package/dist/context/provider/index.d.ts.map +0 -1
  267. package/dist/context/provider/index.js.map +0 -1
  268. package/dist/context/snapshot/contextSnapshot.snapshot.d.ts.map +0 -1
  269. package/dist/context/snapshot/contextSnapshot.snapshot.js.map +0 -1
  270. package/dist/context/snapshot/index.d.ts.map +0 -1
  271. package/dist/context/snapshot/index.js.map +0 -1
  272. package/dist/context/values/contextValues.values.d.ts.map +0 -1
  273. package/dist/context/values/contextValues.values.js.map +0 -1
  274. package/dist/context/values/index.d.ts.map +0 -1
  275. package/dist/context/values/index.js.map +0 -1
  276. package/dist/contracts/adapter.d.ts.map +0 -1
  277. package/dist/contracts/adapter.js.map +0 -1
  278. package/dist/contracts/disposable.d.ts.map +0 -1
  279. package/dist/contracts/disposable.js.map +0 -1
  280. package/dist/contracts/handler.d.ts.map +0 -1
  281. package/dist/contracts/handler.js.map +0 -1
  282. package/dist/contracts/index.d.ts.map +0 -1
  283. package/dist/contracts/index.js.map +0 -1
  284. package/dist/errors/errorCode.code.d.ts.map +0 -1
  285. package/dist/errors/errorCode.code.js.map +0 -1
  286. package/dist/errors/exceptions.d.ts.map +0 -1
  287. package/dist/errors/exceptions.js.map +0 -1
  288. package/dist/errors/frameworkError.error.d.ts.map +0 -1
  289. package/dist/errors/frameworkError.error.js.map +0 -1
  290. package/dist/errors/index.d.ts.map +0 -1
  291. package/dist/errors/index.js.map +0 -1
  292. package/dist/index.d.ts.map +0 -1
  293. package/dist/index.js.map +0 -1
  294. package/dist/lifecycle/core/index.d.ts.map +0 -1
  295. package/dist/lifecycle/core/index.js.map +0 -1
  296. package/dist/lifecycle/core/lifecycle.d.ts.map +0 -1
  297. package/dist/lifecycle/core/lifecycle.js.map +0 -1
  298. package/dist/lifecycle/core/lifecycleHook.hook.d.ts.map +0 -1
  299. package/dist/lifecycle/core/lifecycleHook.hook.js.map +0 -1
  300. package/dist/lifecycle/core/lifecycleRegistry.registry.d.ts.map +0 -1
  301. package/dist/lifecycle/core/lifecycleRegistry.registry.js.map +0 -1
  302. package/dist/lifecycle/core/lifecycleState.state.d.ts +0 -2
  303. package/dist/lifecycle/core/lifecycleState.state.d.ts.map +0 -1
  304. package/dist/lifecycle/core/lifecycleState.state.js +0 -2
  305. package/dist/lifecycle/core/lifecycleState.state.js.map +0 -1
  306. package/dist/lifecycle/index.d.ts.map +0 -1
  307. package/dist/lifecycle/index.js.map +0 -1
  308. package/dist/lifecycle/manager/index.d.ts.map +0 -1
  309. package/dist/lifecycle/manager/index.js.map +0 -1
  310. package/dist/lifecycle/manager/lifecycleManager.manager.d.ts.map +0 -1
  311. package/dist/lifecycle/manager/lifecycleManager.manager.js.map +0 -1
  312. package/dist/lifecycle/scope/index.d.ts.map +0 -1
  313. package/dist/lifecycle/scope/index.js.map +0 -1
  314. package/dist/lifecycle/scope/lifecycleScope.scope.d.ts.map +0 -1
  315. package/dist/lifecycle/scope/lifecycleScope.scope.js.map +0 -1
  316. package/dist/logging/console/consoleLogger.logger.d.ts.map +0 -1
  317. package/dist/logging/console/consoleLogger.logger.js.map +0 -1
  318. package/dist/logging/console/index.d.ts.map +0 -1
  319. package/dist/logging/console/index.js.map +0 -1
  320. package/dist/logging/console/loggerFactory.factory.d.ts.map +0 -1
  321. package/dist/logging/console/loggerFactory.factory.js.map +0 -1
  322. package/dist/logging/core/index.d.ts.map +0 -1
  323. package/dist/logging/core/index.js.map +0 -1
  324. package/dist/logging/core/logEntry.entry.d.ts.map +0 -1
  325. package/dist/logging/core/logEntry.entry.js.map +0 -1
  326. package/dist/logging/core/logLevel.level.d.ts.map +0 -1
  327. package/dist/logging/core/logLevel.level.js.map +0 -1
  328. package/dist/logging/core/logger.d.ts.map +0 -1
  329. package/dist/logging/core/logger.js.map +0 -1
  330. package/dist/logging/core/loggerContext.context.d.ts.map +0 -1
  331. package/dist/logging/core/loggerContext.context.js.map +0 -1
  332. package/dist/logging/core/loggerOptions.options.d.ts.map +0 -1
  333. package/dist/logging/core/loggerOptions.options.js.map +0 -1
  334. package/dist/logging/index.d.ts.map +0 -1
  335. package/dist/logging/index.js.map +0 -1
  336. package/dist/modules/index.d.ts.map +0 -1
  337. package/dist/modules/index.js.map +0 -1
  338. package/dist/modules/module.d.ts.map +0 -1
  339. package/dist/modules/module.js.map +0 -1
  340. package/dist/modules/moduleContext.context.d.ts.map +0 -1
  341. package/dist/modules/moduleContext.context.js.map +0 -1
  342. package/dist/modules/moduleDefinition.definition.d.ts.map +0 -1
  343. package/dist/modules/moduleDefinition.definition.js.map +0 -1
  344. package/dist/modules/moduleDependency/index.d.ts.map +0 -1
  345. package/dist/modules/moduleDependency/index.js.map +0 -1
  346. package/dist/modules/moduleDependency/moduleDependency.graph.d.ts.map +0 -1
  347. package/dist/modules/moduleDependency/moduleDependency.graph.js.map +0 -1
  348. package/dist/modules/moduleDependency/moduleDependency.ordering.d.ts.map +0 -1
  349. package/dist/modules/moduleDependency/moduleDependency.ordering.js.map +0 -1
  350. package/dist/modules/moduleDependency/moduleDependency.type.d.ts.map +0 -1
  351. package/dist/modules/moduleDependency/moduleDependency.type.js.map +0 -1
  352. package/dist/modules/moduleError/index.d.ts.map +0 -1
  353. package/dist/modules/moduleError/index.js.map +0 -1
  354. package/dist/modules/moduleError/moduleError.base.d.ts.map +0 -1
  355. package/dist/modules/moduleError/moduleError.base.js.map +0 -1
  356. package/dist/modules/moduleError/moduleError.dependency.d.ts.map +0 -1
  357. package/dist/modules/moduleError/moduleError.dependency.js.map +0 -1
  358. package/dist/modules/moduleError/moduleError.helpers.d.ts.map +0 -1
  359. package/dist/modules/moduleError/moduleError.helpers.js.map +0 -1
  360. package/dist/modules/moduleError/moduleError.lifecycle.d.ts.map +0 -1
  361. package/dist/modules/moduleError/moduleError.lifecycle.js.map +0 -1
  362. package/dist/modules/moduleError/moduleError.registration.d.ts.map +0 -1
  363. package/dist/modules/moduleError/moduleError.registration.js.map +0 -1
  364. package/dist/modules/moduleLifecycle/index.d.ts.map +0 -1
  365. package/dist/modules/moduleLifecycle/index.js.map +0 -1
  366. package/dist/modules/moduleLifecycle/moduleLifecycle.lifecycle.d.ts.map +0 -1
  367. package/dist/modules/moduleLifecycle/moduleLifecycle.lifecycle.js.map +0 -1
  368. package/dist/modules/moduleLifecycle/moduleLifecycle.stateMachine.d.ts.map +0 -1
  369. package/dist/modules/moduleLifecycle/moduleLifecycle.stateMachine.js.map +0 -1
  370. package/dist/modules/moduleLifecycle/moduleLifecycle.type.d.ts.map +0 -1
  371. package/dist/modules/moduleLifecycle/moduleLifecycle.type.js.map +0 -1
  372. package/dist/modules/moduleLoader/index.d.ts.map +0 -1
  373. package/dist/modules/moduleLoader/index.js.map +0 -1
  374. package/dist/modules/moduleLoader/moduleLoader.loader.d.ts.map +0 -1
  375. package/dist/modules/moduleLoader/moduleLoader.loader.js.map +0 -1
  376. package/dist/modules/moduleLoader/moduleLoader.type.d.ts.map +0 -1
  377. package/dist/modules/moduleLoader/moduleLoader.type.js.map +0 -1
  378. package/dist/modules/moduleMetadata.metadata.d.ts.map +0 -1
  379. package/dist/modules/moduleMetadata.metadata.js.map +0 -1
  380. package/dist/modules/moduleRegistry/index.d.ts.map +0 -1
  381. package/dist/modules/moduleRegistry/index.js.map +0 -1
  382. package/dist/modules/moduleRegistry/moduleRegistry.registry.d.ts.map +0 -1
  383. package/dist/modules/moduleRegistry/moduleRegistry.registry.js.map +0 -1
  384. package/dist/modules/moduleRegistry/moduleRegistry.type.d.ts.map +0 -1
  385. package/dist/modules/moduleRegistry/moduleRegistry.type.js.map +0 -1
  386. package/dist/runtime/index.d.ts.map +0 -1
  387. package/dist/runtime/index.js.map +0 -1
  388. package/dist/runtime/runtime.d.ts.map +0 -1
  389. package/dist/runtime/runtime.js.map +0 -1
  390. package/dist/runtime/runtimeBootstrap/index.d.ts.map +0 -1
  391. package/dist/runtime/runtimeBootstrap/index.js.map +0 -1
  392. package/dist/runtime/runtimeBootstrap/pipeline/index.d.ts.map +0 -1
  393. package/dist/runtime/runtimeBootstrap/pipeline/index.js.map +0 -1
  394. package/dist/runtime/runtimeBootstrap/pipeline/runtimeBootstrap.invoke.d.ts +0 -6
  395. package/dist/runtime/runtimeBootstrap/pipeline/runtimeBootstrap.invoke.d.ts.map +0 -1
  396. package/dist/runtime/runtimeBootstrap/pipeline/runtimeBootstrap.invoke.js +0 -27
  397. package/dist/runtime/runtimeBootstrap/pipeline/runtimeBootstrap.invoke.js.map +0 -1
  398. package/dist/runtime/runtimeBootstrap/pipeline/runtimeBootstrap.pipeline.d.ts.map +0 -1
  399. package/dist/runtime/runtimeBootstrap/pipeline/runtimeBootstrap.pipeline.js.map +0 -1
  400. package/dist/runtime/runtimeBootstrap/runtimeBootstrap.core.d.ts.map +0 -1
  401. package/dist/runtime/runtimeBootstrap/runtimeBootstrap.core.js.map +0 -1
  402. package/dist/runtime/runtimeBootstrap/runtimeBootstrap.type.d.ts.map +0 -1
  403. package/dist/runtime/runtimeBootstrap/runtimeBootstrap.type.js.map +0 -1
  404. package/dist/runtime/runtimeContext/index.d.ts.map +0 -1
  405. package/dist/runtime/runtimeContext/index.js.map +0 -1
  406. package/dist/runtime/runtimeContext/runtimeContext.core.d.ts +0 -38
  407. package/dist/runtime/runtimeContext/runtimeContext.core.d.ts.map +0 -1
  408. package/dist/runtime/runtimeContext/runtimeContext.core.js +0 -99
  409. package/dist/runtime/runtimeContext/runtimeContext.core.js.map +0 -1
  410. package/dist/runtime/runtimeContext/runtimeContext.factory.d.ts.map +0 -1
  411. package/dist/runtime/runtimeContext/runtimeContext.factory.js.map +0 -1
  412. package/dist/runtime/runtimeContext/runtimeContext.type.d.ts.map +0 -1
  413. package/dist/runtime/runtimeContext/runtimeContext.type.js.map +0 -1
  414. package/dist/runtime/runtimeEnvironment/detection/index.d.ts.map +0 -1
  415. package/dist/runtime/runtimeEnvironment/detection/index.js.map +0 -1
  416. package/dist/runtime/runtimeEnvironment/detection/runtimeEnvironment.detection.d.ts.map +0 -1
  417. package/dist/runtime/runtimeEnvironment/detection/runtimeEnvironment.detection.js.map +0 -1
  418. package/dist/runtime/runtimeEnvironment/detection/runtimeEnvironment.env.d.ts.map +0 -1
  419. package/dist/runtime/runtimeEnvironment/detection/runtimeEnvironment.env.js.map +0 -1
  420. package/dist/runtime/runtimeEnvironment/detection/runtimeEnvironment.os.d.ts.map +0 -1
  421. package/dist/runtime/runtimeEnvironment/detection/runtimeEnvironment.os.js.map +0 -1
  422. package/dist/runtime/runtimeEnvironment/index.d.ts.map +0 -1
  423. package/dist/runtime/runtimeEnvironment/index.js.map +0 -1
  424. package/dist/runtime/runtimeEnvironment/runtimeEnvironment.core.d.ts.map +0 -1
  425. package/dist/runtime/runtimeEnvironment/runtimeEnvironment.core.js.map +0 -1
  426. package/dist/runtime/runtimeEnvironment/runtimeEnvironment.type.d.ts.map +0 -1
  427. package/dist/runtime/runtimeEnvironment/runtimeEnvironment.type.js.map +0 -1
  428. package/dist/runtime/runtimeError/index.d.ts.map +0 -1
  429. package/dist/runtime/runtimeError/index.js.map +0 -1
  430. package/dist/runtime/runtimeError/runtimeError.base.d.ts.map +0 -1
  431. package/dist/runtime/runtimeError/runtimeError.base.js.map +0 -1
  432. package/dist/runtime/runtimeError/runtimeError.lifecycle.d.ts.map +0 -1
  433. package/dist/runtime/runtimeError/runtimeError.lifecycle.js.map +0 -1
  434. package/dist/runtime/runtimeError/runtimeError.specialized.d.ts.map +0 -1
  435. package/dist/runtime/runtimeError/runtimeError.specialized.js.map +0 -1
  436. package/dist/runtime/runtimeError/runtimeError.type.d.ts.map +0 -1
  437. package/dist/runtime/runtimeError/runtimeError.type.js.map +0 -1
  438. package/dist/runtime/runtimeLogger.d.ts.map +0 -1
  439. package/dist/runtime/runtimeLogger.js.map +0 -1
  440. package/dist/runtime/runtimeManager/index.d.ts +0 -12
  441. package/dist/runtime/runtimeManager/index.d.ts.map +0 -1
  442. package/dist/runtime/runtimeManager/index.js +0 -11
  443. package/dist/runtime/runtimeManager/index.js.map +0 -1
  444. package/dist/runtime/runtimeManager/runtimeManager.core.d.ts +0 -31
  445. package/dist/runtime/runtimeManager/runtimeManager.core.d.ts.map +0 -1
  446. package/dist/runtime/runtimeManager/runtimeManager.core.js +0 -136
  447. package/dist/runtime/runtimeManager/runtimeManager.core.js.map +0 -1
  448. package/dist/runtime/runtimeManager/runtimeManager.error.d.ts +0 -14
  449. package/dist/runtime/runtimeManager/runtimeManager.error.d.ts.map +0 -1
  450. package/dist/runtime/runtimeManager/runtimeManager.error.js +0 -21
  451. package/dist/runtime/runtimeManager/runtimeManager.error.js.map +0 -1
  452. package/dist/runtime/runtimeManager/runtimeManager.factory.d.ts +0 -7
  453. package/dist/runtime/runtimeManager/runtimeManager.factory.d.ts.map +0 -1
  454. package/dist/runtime/runtimeManager/runtimeManager.factory.js +0 -8
  455. package/dist/runtime/runtimeManager/runtimeManager.factory.js.map +0 -1
  456. package/dist/runtime/runtimeManager/runtimeManager.lifecycle.d.ts +0 -16
  457. package/dist/runtime/runtimeManager/runtimeManager.lifecycle.d.ts.map +0 -1
  458. package/dist/runtime/runtimeManager/runtimeManager.lifecycle.js +0 -49
  459. package/dist/runtime/runtimeManager/runtimeManager.lifecycle.js.map +0 -1
  460. package/dist/runtime/runtimeManager/runtimeManager.type.d.ts +0 -54
  461. package/dist/runtime/runtimeManager/runtimeManager.type.d.ts.map +0 -1
  462. package/dist/runtime/runtimeManager/runtimeManager.type.js +0 -2
  463. package/dist/runtime/runtimeManager/runtimeManager.type.js.map +0 -1
  464. package/dist/runtime/runtimeOptions/index.d.ts.map +0 -1
  465. package/dist/runtime/runtimeOptions/index.js.map +0 -1
  466. package/dist/runtime/runtimeOptions/runtimeOptions.defaults.d.ts.map +0 -1
  467. package/dist/runtime/runtimeOptions/runtimeOptions.defaults.js.map +0 -1
  468. package/dist/runtime/runtimeOptions/runtimeOptions.resolver.d.ts.map +0 -1
  469. package/dist/runtime/runtimeOptions/runtimeOptions.resolver.js.map +0 -1
  470. package/dist/runtime/runtimeOptions/runtimeOptions.type.d.ts.map +0 -1
  471. package/dist/runtime/runtimeOptions/runtimeOptions.type.js.map +0 -1
  472. package/dist/runtime/runtimeOptions/runtimeOptions.validation.d.ts.map +0 -1
  473. package/dist/runtime/runtimeOptions/runtimeOptions.validation.js.map +0 -1
  474. package/dist/runtime/runtimeShutdown/index.d.ts.map +0 -1
  475. package/dist/runtime/runtimeShutdown/index.js.map +0 -1
  476. package/dist/runtime/runtimeShutdown/pipeline/index.d.ts.map +0 -1
  477. package/dist/runtime/runtimeShutdown/pipeline/index.js.map +0 -1
  478. package/dist/runtime/runtimeShutdown/pipeline/runtimeShutdown.pipeline.d.ts.map +0 -1
  479. package/dist/runtime/runtimeShutdown/pipeline/runtimeShutdown.pipeline.js.map +0 -1
  480. package/dist/runtime/runtimeShutdown/runtimeShutdown.core.d.ts.map +0 -1
  481. package/dist/runtime/runtimeShutdown/runtimeShutdown.core.js.map +0 -1
  482. package/dist/runtime/runtimeShutdown/runtimeShutdown.type.d.ts.map +0 -1
  483. package/dist/runtime/runtimeShutdown/runtimeShutdown.type.js.map +0 -1
  484. package/dist/runtime/runtimeState.state.d.ts.map +0 -1
  485. package/dist/runtime/runtimeState.state.js.map +0 -1
@@ -4,21 +4,23 @@
4
4
  * Public API for the core runtime subsystem.
5
5
  */
6
6
  export { DefaultRuntime, createRuntime } from "./runtime.js";
7
- export type { RuntimeState as RuntimeLifecycleState, RuntimeDependencies, RuntimeStatus, Runtime, } from "./runtime.js";
7
+ export type { RuntimeLifecycleState, RuntimeDependencies, RuntimeStatus, Runtime, } from "./runtime.js";
8
8
  export { DEFAULT_RUNTIME_OPTIONS, resolveRuntimeOptions, validateRuntimeOptions, isRuntimeMode, isRuntimeRole, assertRuntimeMode, assertRuntimeRole, } from "./runtimeOptions/index.js";
9
- export type { RuntimeMode, RuntimeRole, RuntimeOptions, RuntimeStartupOptions, RuntimeShutdownOptions, RuntimeSignalOptions, RuntimeDiagnosticsOptions, RuntimeInfrastructure, ResolvedRuntimeOptions, } from "./runtimeOptions/index.js";
10
- export { RuntimeState, TERMINAL_RUNTIME_STATES, STARTABLE_RUNTIME_STATES, STOPPABLE_RUNTIME_STATES, TRANSITIONAL_RUNTIME_STATES, isRuntimeState, isRuntimeReady, isRuntimeFailed, isRuntimeTransitioning, isRuntimeTerminal, canStartRuntime, canStopRuntime, canTransitionRuntime, assertRuntimeState, assertRuntimeTransition, createRuntimeStateSnapshot, createRuntimeStateTransition, getRuntimeStateLabel, getRuntimeStates, getNextRuntimeStates, InvalidRuntimeStateError, InvalidRuntimeTransitionError, } from "./runtimeState.state.js";
11
- export type { RuntimeStateSnapshot, RuntimeStateTransition, } from "./runtimeState.state.js";
12
- export { DefaultRuntimeContext, createRuntimeId, createRuntimeIdentity, createRuntimeContext, } from "./runtimeContext/index.js";
13
- export type { RuntimeIdentity, RuntimeTiming, RuntimeContextDependencies, RuntimeContext, RuntimeContextState, } from "./runtimeContext/index.js";
14
- export { DefaultRuntimeEnvironment, createRuntimeEnvironment, detectRuntimeEngine, detectPlatform, detectProcessInfo, detectHostInfo, detectCI, detectContainer, RuntimeEnvironmentError, } from "./runtimeEnvironment/index.js";
15
- export type { RuntimePlatform, RuntimeEngine, RuntimeEnvironmentVariables, RuntimeProcessInfo, RuntimeHostInfo, RuntimeEngineInfo, RuntimeEnvironmentInfo, RuntimeEnvironment, RuntimeEnvironmentOptions, } from "./runtimeEnvironment/index.js";
16
- export { DefaultRuntimeManager, createRuntimeManager, RuntimeManagerError, } from "./runtimeManager/index.js";
17
- export type { RuntimeManagerDependencies, RuntimeManager, } from "./runtimeManager/index.js";
18
- export { DefaultRuntimeBootstrap, RuntimeBootstrapError, } from "./runtimeBootstrap/index.js";
19
- export type { RuntimeBootstrapDependencies, RuntimeBootstrapOptions, RuntimeBootstrapPhase, RuntimeBootstrapResult, RuntimeBootstrapErrorInfo, } from "./runtimeBootstrap/index.js";
20
- export { DefaultRuntimeShutdown, RuntimeShutdownError, } from "./runtimeShutdown/index.js";
21
- export type { RuntimeShutdownDependencies, RuntimeShutdownConfig, RuntimeShutdownPhase, RuntimeShutdownResult, RuntimeShutdownErrorInfo, } from "./runtimeShutdown/index.js";
22
- export { RuntimeError, RuntimeErrorCode, RuntimeStateError, RuntimeStartError, RuntimeStopError, RuntimeInitializationError, RuntimeLoadError, RuntimeTimeoutError, RuntimeDependencyError, RuntimeNotReadyError, RuntimeUnsupportedOperationError, RuntimeCancellationError, toRuntimeError, isRuntimeError, hasRuntimeErrorCode, createRuntimeError, } from "./runtimeError/index.js";
9
+ export type { RuntimeMode, RuntimeRole, RuntimeOptions, RuntimeStartupOptions, RuntimeShutdownOptions, RuntimeSignalOptions, RuntimeDiagnosticsOptions, RuntimeEnvironmentOverrides, ResolvedRuntimeOptions, } from "./runtimeOptions/index.js";
10
+ export { RuntimeState, TERMINAL_RUNTIME_STATES, STARTABLE_RUNTIME_STATES, STOPPABLE_RUNTIME_STATES, TRANSITIONAL_RUNTIME_STATES, isRuntimeState, isRuntimeReady, isRuntimeFailed, isRuntimeTransitioning, isRuntimeTerminal, canStartRuntime, canStopRuntime, canTransitionRuntime, assertRuntimeState, assertRuntimeTransition, createRuntimeStateSnapshot, createRuntimeStateTransition, getRuntimeStateLabel, getRuntimeStates, getNextRuntimeStates, } from "./runtimeState.state.js";
11
+ export type { RuntimeStateSnapshot, RuntimeStateTransition, RuntimeTiming, } from "./runtimeState.state.js";
12
+ export { createRuntimeId, createRuntimeIdentity, createRuntimeExecutionContext, createRuntimeContext, } from "./runtimeContext/index.js";
13
+ export type { RuntimeIdentity, RuntimeExecutionMetadata, RuntimeExecutionContext, RuntimeContext, } from "./runtimeContext/index.js";
14
+ export { DefaultRuntimeEnvironment, createRuntimeEnvironment, detectRuntimeEngine, detectPlatform, detectProcessInfo, detectHostInfo, detectCI, detectContainer, MissingEnvironmentVariableError, } from "./runtimeEnvironment/index.js";
15
+ export type { RuntimePlatform, RuntimeEngine, RuntimeEnvironmentVariables, RuntimeProcessInfo, RuntimeHostInfo, RuntimeEngineInfo, RuntimeEnvironmentInfo, RuntimeEnvironmentSummary, RuntimeEnvironment, RuntimeEnvironmentOptions, } from "./runtimeEnvironment/index.js";
16
+ export { DefaultRuntimeBootstrap } from "./runtimeBootstrap/index.js";
17
+ export type { RuntimeBootstrap, RuntimeBootstrapDependencies, RuntimeBootstrapOptions, RuntimeBootstrapPhase, RuntimeBootstrapResult, RuntimeBootstrapErrorInfo, } from "./runtimeBootstrap/index.js";
18
+ export { DefaultRuntimeShutdown } from "./runtimeShutdown/index.js";
19
+ export type { RuntimeShutdown, RuntimeShutdownDependencies, RuntimeShutdownConfig, RuntimeShutdownPhase, RuntimeShutdownResult, RuntimeShutdownErrorInfo, } from "./runtimeShutdown/index.js";
20
+ export { RuntimeSignalManager } from "./runtimeSignals/index.js";
21
+ export type { RuntimeTerminationSignal, RuntimeProcessEvent, RuntimeSignalTarget, RuntimeSignalHandlers, RuntimeSignalManagerOptions, } from "./runtimeSignals/index.js";
22
+ export { withRuntimeTimeout } from "./runtimeTimeout.js";
23
+ export type { TimeoutAwareOperation, RuntimeTimeoutOptions, } from "./runtimeTimeout.js";
24
+ export { RuntimeError, RuntimeErrorCode, InvalidRuntimeStateError, InvalidRuntimeTransitionError, RuntimeStartError, RuntimeStopError, RuntimeInitializationError, RuntimeLoadError, RuntimeTimeoutError, RuntimeDependencyError, RuntimeNotReadyError, RuntimeUnsupportedOperationError, RuntimeCancellationError, toRuntimeError, isRuntimeError, hasRuntimeErrorCode, createRuntimeError, } from "./runtimeError/index.js";
23
25
  export type { RuntimeOperation, RuntimeErrorPhase, RuntimeErrorMetadata, RuntimeErrorOptions, RuntimeErrorJSON, } from "./runtimeError/index.js";
24
26
  //# sourceMappingURL=index.d.ts.map
@@ -14,29 +14,33 @@ export { DEFAULT_RUNTIME_OPTIONS, resolveRuntimeOptions, validateRuntimeOptions,
14
14
  /*
15
15
  * Runtime state
16
16
  */
17
- export { RuntimeState, TERMINAL_RUNTIME_STATES, STARTABLE_RUNTIME_STATES, STOPPABLE_RUNTIME_STATES, TRANSITIONAL_RUNTIME_STATES, isRuntimeState, isRuntimeReady, isRuntimeFailed, isRuntimeTransitioning, isRuntimeTerminal, canStartRuntime, canStopRuntime, canTransitionRuntime, assertRuntimeState, assertRuntimeTransition, createRuntimeStateSnapshot, createRuntimeStateTransition, getRuntimeStateLabel, getRuntimeStates, getNextRuntimeStates, InvalidRuntimeStateError, InvalidRuntimeTransitionError, } from "./runtimeState.state.js";
17
+ export { RuntimeState, TERMINAL_RUNTIME_STATES, STARTABLE_RUNTIME_STATES, STOPPABLE_RUNTIME_STATES, TRANSITIONAL_RUNTIME_STATES, isRuntimeState, isRuntimeReady, isRuntimeFailed, isRuntimeTransitioning, isRuntimeTerminal, canStartRuntime, canStopRuntime, canTransitionRuntime, assertRuntimeState, assertRuntimeTransition, createRuntimeStateSnapshot, createRuntimeStateTransition, getRuntimeStateLabel, getRuntimeStates, getNextRuntimeStates, } from "./runtimeState.state.js";
18
18
  /*
19
19
  * Runtime context
20
20
  */
21
- export { DefaultRuntimeContext, createRuntimeId, createRuntimeIdentity, createRuntimeContext, } from "./runtimeContext/index.js";
21
+ export { createRuntimeId, createRuntimeIdentity, createRuntimeExecutionContext, createRuntimeContext, } from "./runtimeContext/index.js";
22
22
  /*
23
23
  * Runtime environment
24
24
  */
25
- export { DefaultRuntimeEnvironment, createRuntimeEnvironment, detectRuntimeEngine, detectPlatform, detectProcessInfo, detectHostInfo, detectCI, detectContainer, RuntimeEnvironmentError, } from "./runtimeEnvironment/index.js";
26
- /*
27
- * Runtime manager
28
- */
29
- export { DefaultRuntimeManager, createRuntimeManager, RuntimeManagerError, } from "./runtimeManager/index.js";
25
+ export { DefaultRuntimeEnvironment, createRuntimeEnvironment, detectRuntimeEngine, detectPlatform, detectProcessInfo, detectHostInfo, detectCI, detectContainer, MissingEnvironmentVariableError, } from "./runtimeEnvironment/index.js";
30
26
  /*
31
27
  * Runtime bootstrap
32
28
  */
33
- export { DefaultRuntimeBootstrap, RuntimeBootstrapError, } from "./runtimeBootstrap/index.js";
29
+ export { DefaultRuntimeBootstrap } from "./runtimeBootstrap/index.js";
34
30
  /*
35
31
  * Runtime shutdown
36
32
  */
37
- export { DefaultRuntimeShutdown, RuntimeShutdownError, } from "./runtimeShutdown/index.js";
33
+ export { DefaultRuntimeShutdown } from "./runtimeShutdown/index.js";
34
+ /*
35
+ * Runtime signals
36
+ */
37
+ export { RuntimeSignalManager } from "./runtimeSignals/index.js";
38
+ /*
39
+ * Runtime timeout
40
+ */
41
+ export { withRuntimeTimeout } from "./runtimeTimeout.js";
38
42
  /*
39
43
  * Runtime errors
40
44
  */
41
- export { RuntimeError, RuntimeErrorCode, RuntimeStateError, RuntimeStartError, RuntimeStopError, RuntimeInitializationError, RuntimeLoadError, RuntimeTimeoutError, RuntimeDependencyError, RuntimeNotReadyError, RuntimeUnsupportedOperationError, RuntimeCancellationError, toRuntimeError, isRuntimeError, hasRuntimeErrorCode, createRuntimeError, } from "./runtimeError/index.js";
45
+ export { RuntimeError, RuntimeErrorCode, InvalidRuntimeStateError, InvalidRuntimeTransitionError, RuntimeStartError, RuntimeStopError, RuntimeInitializationError, RuntimeLoadError, RuntimeTimeoutError, RuntimeDependencyError, RuntimeNotReadyError, RuntimeUnsupportedOperationError, RuntimeCancellationError, toRuntimeError, isRuntimeError, hasRuntimeErrorCode, createRuntimeError, } from "./runtimeError/index.js";
42
46
  //# sourceMappingURL=index.js.map
@@ -5,10 +5,28 @@ import type { Module } from "../modules/module.js";
5
5
  import type { ModuleLoader } from "../modules/moduleLoader/index.js";
6
6
  import type { ModuleLifecycleManager } from "../modules/moduleLifecycle/index.js";
7
7
  import type { ModuleRegistry } from "../modules/moduleRegistry/index.js";
8
- import { RuntimeError as BaseRuntimeError, RuntimeStateError as BaseRuntimeStateError } from "@zudojs/errors";
9
- /** Runtime lifecycle state. */
10
- export type RuntimeState = "created" | "bootstrapping" | "ready" | "stopping" | "stopped" | "failed";
11
- /** Dependencies required by the runtime. */
8
+ import type { Disposable } from "../contracts/disposable.js";
9
+ import type { ContextStorage } from "../context/provider/contextStorage.storage.js";
10
+ import { RuntimeState } from "./runtimeState.state.js";
11
+ import type { RuntimeStateSnapshot, RuntimeTiming } from "./runtimeState.state.js";
12
+ import type { RuntimeExecutionContext, RuntimeIdentity } from "./runtimeContext/index.js";
13
+ import type { RuntimeEnvironment } from "./runtimeEnvironment/index.js";
14
+ import type { RuntimeOptions, ResolvedRuntimeOptions } from "./runtimeOptions/index.js";
15
+ import type { RuntimeBootstrap, RuntimeBootstrapResult } from "./runtimeBootstrap/runtimeBootstrap.type.js";
16
+ import type { RuntimeShutdown, RuntimeShutdownResult } from "./runtimeShutdown/runtimeShutdown.type.js";
17
+ import type { RuntimeSignalTarget } from "./runtimeSignals/runtimeSignals.js";
18
+ /**
19
+ * Runtime lifecycle state as a plain string union (the values of the
20
+ * RuntimeState enum).
21
+ */
22
+ export type RuntimeLifecycleState = `${RuntimeState}`;
23
+ /**
24
+ * Dependencies required by the runtime.
25
+ *
26
+ * `bootstrap`, `shutdown`, `environment`, `signalTarget`, and
27
+ * `contextStorage` are optional overrides; the runtime creates
28
+ * defaults when omitted.
29
+ */
12
30
  export interface RuntimeDependencies {
13
31
  readonly application: ApplicationContext;
14
32
  readonly configuration: ConfigurationManager;
@@ -16,21 +34,70 @@ export interface RuntimeDependencies {
16
34
  readonly moduleRegistry: ModuleRegistry;
17
35
  readonly moduleLoader: ModuleLoader;
18
36
  readonly moduleLifecycle: ModuleLifecycleManager;
37
+ readonly environment?: RuntimeEnvironment;
38
+ readonly bootstrap?: RuntimeBootstrap;
39
+ readonly shutdown?: RuntimeShutdown;
40
+ readonly signalTarget?: RuntimeSignalTarget;
41
+ /**
42
+ * ContextStorage the runtime establishes its execution context
43
+ * in around start() and stop(). Defaults to the process-wide
44
+ * storage from getDefaultContextStorage(). Supply the same
45
+ * storage to the ModuleLifecycleManager (and the container's
46
+ * `currentScope`) when injecting a custom one.
47
+ */
48
+ readonly contextStorage?: ContextStorage;
19
49
  }
20
- /** Runtime status snapshot. */
50
+ /**
51
+ * Runtime status snapshot.
52
+ */
21
53
  export interface RuntimeStatus {
22
54
  readonly state: RuntimeState;
23
55
  readonly startedAt?: Date;
24
56
  readonly stoppedAt?: Date;
25
57
  readonly failedAt?: Date;
58
+ readonly timing: RuntimeTiming;
26
59
  readonly error?: unknown;
60
+ readonly bootstrap?: RuntimeBootstrapResult;
61
+ readonly shutdown?: RuntimeShutdownResult;
27
62
  }
28
- /** Runtime contract. */
29
- export interface Runtime {
63
+ /**
64
+ * Runtime contract.
65
+ *
66
+ * A runtime is single-use: CREATED → BOOTSTRAPPING → READY → STOPPING
67
+ * → STOPPED, with FAILED reachable from every non-terminal state. A
68
+ * stopped or failed runtime cannot be started again; create a new one.
69
+ */
70
+ export interface Runtime extends Disposable {
30
71
  readonly state: RuntimeState;
72
+ /**
73
+ * The runtime's immutable execution context. Active (via
74
+ * `contextStorage`) during start(), stop(), and every module
75
+ * lifecycle hook the runtime drives.
76
+ */
77
+ readonly context: RuntimeExecutionContext;
78
+ /** Storage in which `context` is established. */
79
+ readonly contextStorage: ContextStorage;
80
+ /** Timestamps of the state transitions observed so far. */
81
+ readonly timing: RuntimeTiming;
82
+ readonly environment: RuntimeEnvironment;
83
+ readonly identity: RuntimeIdentity;
84
+ readonly options: ResolvedRuntimeOptions;
85
+ readonly ready: boolean;
86
+ readonly stopped: boolean;
87
+ readonly failed: boolean;
88
+ /** Whether process signal handlers are currently registered. */
89
+ readonly signalHandlersRegistered: boolean;
31
90
  start(): Promise<void>;
32
91
  stop(): Promise<void>;
92
+ /**
93
+ * Marks the runtime as failed from any non-terminal state. Does not
94
+ * unwind modules by itself; call `stop()` afterwards to do so.
95
+ */
96
+ fail(error?: unknown): void;
97
+ dispose(): Promise<void>;
33
98
  getStatus(): RuntimeStatus;
99
+ getStateSnapshot(): RuntimeStateSnapshot;
100
+ getUptime(): number;
34
101
  getApplicationContext(): ApplicationContext;
35
102
  getConfiguration(): ConfigurationManager;
36
103
  getLogger(): Logger;
@@ -40,41 +107,74 @@ export interface Runtime {
40
107
  getModule(moduleId: string): Module | undefined;
41
108
  requireModule(moduleId: string): Module;
42
109
  }
43
- /** Error thrown for invalid runtime operations. */
44
- export declare class RuntimeStateError extends BaseRuntimeStateError {
45
- constructor(message: string);
46
- }
47
- /** Error thrown when runtime startup/shutdown fails. */
48
- export declare class RuntimeError extends BaseRuntimeError {
49
- readonly moduleIds: readonly string[];
50
- constructor(message: string, moduleIds?: readonly string[]);
51
- }
52
110
  /**
53
111
  * Default runtime implementation.
54
- * Orchestrates Application, Configuration, Logger, ModuleRegistry,
55
- * ModuleLoader, ModuleLifecycleManager.
112
+ *
113
+ * Owns the runtime state machine and identity, and orchestrates the
114
+ * bootstrap and shutdown services, the module subsystem, and process
115
+ * signal handling.
56
116
  */
57
117
  export declare class DefaultRuntime implements Runtime {
118
+ private readonly _options;
119
+ private readonly _identity;
120
+ private readonly _context;
121
+ private readonly _contextStorage;
122
+ private readonly _environment;
123
+ private readonly _bootstrap;
124
+ private readonly _shutdown;
125
+ private readonly _signals;
126
+ private readonly _application;
127
+ private readonly _configuration;
128
+ private readonly _logger;
129
+ private readonly _moduleRegistry;
130
+ private readonly _moduleLoader;
131
+ private readonly _moduleLifecycle;
58
132
  private _state;
59
- private startedAt;
60
- private stoppedAt;
61
- private failedAt;
62
- private error;
63
- private startPromise;
64
- private stopPromise;
65
- private readonly application;
66
- private readonly configuration;
67
- private readonly logger;
68
- private readonly moduleRegistry;
69
- private readonly moduleLoader;
70
- private readonly moduleLifecycle;
71
- constructor(dependencies: RuntimeDependencies);
133
+ private _timing;
134
+ private _error;
135
+ private _startPromise;
136
+ private _stopPromise;
137
+ private _unwound;
138
+ constructor(dependencies: RuntimeDependencies, options?: RuntimeOptions);
72
139
  get state(): RuntimeState;
140
+ get context(): RuntimeExecutionContext;
141
+ get contextStorage(): ContextStorage;
142
+ get timing(): RuntimeTiming;
143
+ get environment(): RuntimeEnvironment;
144
+ get identity(): RuntimeIdentity;
145
+ get options(): ResolvedRuntimeOptions;
146
+ get ready(): boolean;
147
+ get stopped(): boolean;
148
+ get failed(): boolean;
149
+ get signalHandlersRegistered(): boolean;
73
150
  start(): Promise<void>;
74
151
  stop(): Promise<void>;
152
+ fail(error?: unknown): void;
153
+ dispose(): Promise<void>;
75
154
  private performStart;
76
155
  private performStop;
156
+ /**
157
+ * Best-effort module unwinding used after a failure. Errors are
158
+ * logged and swallowed; the runtime stays FAILED.
159
+ */
160
+ private unwind;
161
+ /**
162
+ * Runs an operation inside the runtime's execution context so that
163
+ * module hooks, container factories, and loggers reached from it
164
+ * observe the context through `contextStorage`.
165
+ */
166
+ private inContext;
167
+ private runShutdown;
168
+ private handleSignal;
169
+ private handleFatal;
170
+ private transitionTo;
171
+ private recordTimingForState;
172
+ private recordTiming;
173
+ private logContext;
174
+ private errorContext;
77
175
  getStatus(): RuntimeStatus;
176
+ getStateSnapshot(): RuntimeStateSnapshot;
177
+ getUptime(): number;
78
178
  getApplicationContext(): ApplicationContext;
79
179
  getConfiguration(): ConfigurationManager;
80
180
  getLogger(): Logger;
@@ -84,6 +184,8 @@ export declare class DefaultRuntime implements Runtime {
84
184
  getModule(moduleId: string): Module | undefined;
85
185
  requireModule(moduleId: string): Module;
86
186
  }
87
- /** Creates a runtime. */
88
- export declare function createRuntime(dependencies: RuntimeDependencies): Runtime;
187
+ /**
188
+ * Creates a runtime.
189
+ */
190
+ export declare function createRuntime(dependencies: RuntimeDependencies, options?: RuntimeOptions): Runtime;
89
191
  //# sourceMappingURL=runtime.d.ts.map