@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,115 @@
1
+ /**
2
+ * Registry responsible for lifecycle component registration
3
+ * and deterministic ordering.
4
+ */
5
+ export class LifecycleRegistry {
6
+ registrations = [];
7
+ sequence = 0;
8
+ /**
9
+ * Registers a lifecycle component.
10
+ *
11
+ * Components are executed in registration order during
12
+ * initialization and startup.
13
+ *
14
+ * Components are executed in reverse registration order
15
+ * during stopping and destruction.
16
+ */
17
+ register(component, name) {
18
+ const registration = {
19
+ id: this.createId(),
20
+ name: name ?? this.resolveComponentName(component),
21
+ component,
22
+ order: this.sequence,
23
+ isParticipant: this.isLifecycleParticipant(component),
24
+ };
25
+ this.sequence += 1;
26
+ this.registrations.push(registration);
27
+ return registration;
28
+ }
29
+ /**
30
+ * Unregisters a component by registration ID.
31
+ */
32
+ unregister(id) {
33
+ const index = this.registrations.findIndex((registration) => registration.id === id);
34
+ if (index === -1) {
35
+ return false;
36
+ }
37
+ this.registrations.splice(index, 1);
38
+ return true;
39
+ }
40
+ /**
41
+ * Returns all registrations in initialization/startup order.
42
+ */
43
+ getAll() {
44
+ return [...this.registrations].sort((a, b) => a.order - b.order);
45
+ }
46
+ /**
47
+ * Returns all registrations in shutdown/destruction order.
48
+ */
49
+ getReverse() {
50
+ return [...this.registrations].sort((a, b) => b.order - a.order);
51
+ }
52
+ /**
53
+ * Finds a registration by ID.
54
+ */
55
+ getById(id) {
56
+ return this.registrations.find((registration) => registration.id === id);
57
+ }
58
+ /**
59
+ * Finds a registration by component name.
60
+ */
61
+ getByName(name) {
62
+ return this.registrations.find((registration) => registration.name === name);
63
+ }
64
+ /**
65
+ * Checks whether a component is registered.
66
+ */
67
+ has(component) {
68
+ return this.registrations.some((registration) => registration.component === component);
69
+ }
70
+ /**
71
+ * Returns the number of registered components.
72
+ */
73
+ size() {
74
+ return this.registrations.length;
75
+ }
76
+ /**
77
+ * Removes all registrations.
78
+ */
79
+ clear() {
80
+ this.registrations.length = 0;
81
+ }
82
+ /**
83
+ * Creates a stable registration ID.
84
+ */
85
+ createId() {
86
+ return `lifecycle:${this.sequence}`;
87
+ }
88
+ /**
89
+ * Determines whether a component is a full
90
+ * LifecycleParticipant.
91
+ */
92
+ isLifecycleParticipant(component) {
93
+ return (typeof component === "object" &&
94
+ component !== null &&
95
+ "name" in component &&
96
+ typeof component.name === "string");
97
+ }
98
+ /**
99
+ * Resolves a readable component name.
100
+ */
101
+ resolveComponentName(component) {
102
+ if (this.isLifecycleParticipant(component)) {
103
+ return component.name;
104
+ }
105
+ if (typeof component === "object" &&
106
+ component !== null &&
107
+ "constructor" in component &&
108
+ typeof component.constructor === "function" &&
109
+ component.constructor.name) {
110
+ return component.constructor.name;
111
+ }
112
+ return "anonymous";
113
+ }
114
+ }
115
+ //# sourceMappingURL=lifecycleRegistry.registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lifecycleRegistry.registry.js","sourceRoot":"","sources":["../../../src/lifecycle/core/lifecycleRegistry.registry.ts"],"names":[],"mappings":"AA4CA;;;GAGG;AACH,MAAM,OAAO,iBAAiB;IACX,aAAa,GAA4B,EAAE,CAAC;IAErD,QAAQ,GAAG,CAAC,CAAC;IAErB;;;;;;;;OAQG;IACI,QAAQ,CACb,SAA6B,EAC7B,IAAa;QAEb,MAAM,YAAY,GAA0B;YAC1C,EAAE,EAAE,IAAI,CAAC,QAAQ,EAAE;YACn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"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=lifecycleState.state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lifecycleState.state.d.ts","sourceRoot":"","sources":["../../../src/lifecycle/core/lifecycleState.state.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=lifecycleState.state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lifecycleState.state.js","sourceRoot":"","sources":["../../../src/lifecycle/core/lifecycleState.state.ts"],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Core lifecycle state machine and participant contracts.
3
+ *
4
+ * Lifecycle is the internal implementation used by LifecycleManager.
5
+ * Consumers should use LifecycleManager as the primary API.
6
+ */
7
+ export * from "./core/index.js";
8
+ export * from "./manager/index.js";
9
+ export * from "./scope/index.js";
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lifecycle/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,cAAc,iBAAiB,CAAC;AAEhC,cAAc,oBAAoB,CAAC;AAEnC,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Core lifecycle state machine and participant contracts.
3
+ *
4
+ * Lifecycle is the internal implementation used by LifecycleManager.
5
+ * Consumers should use LifecycleManager as the primary API.
6
+ */
7
+ export * from "./core/index.js";
8
+ export * from "./manager/index.js";
9
+ export * from "./scope/index.js";
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/lifecycle/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,cAAc,iBAAiB,CAAC;AAEhC,cAAc,oBAAoB,CAAC;AAEnC,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @zudojs/core/lifecycle/manager
3
+ *
4
+ * Lifecycle orchestration.
5
+ */
6
+ export { LifecycleManager, type LifecycleManagerOptions, type ManagedLifecycleComponent, } from "./lifecycleManager.manager.js";
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lifecycle/manager/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,gBAAgB,EAChB,KAAK,uBAAuB,EAC5B,KAAK,yBAAyB,GAC/B,MAAM,+BAA+B,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @zudojs/core/lifecycle/manager
3
+ *
4
+ * Lifecycle orchestration.
5
+ */
6
+ export { LifecycleManager, } from "./lifecycleManager.manager.js";
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lifecycle/manager/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,gBAAgB,GAGjB,MAAM,+BAA+B,CAAC"}
@@ -0,0 +1,33 @@
1
+ import type { Logger } from "../../logging/core/logger.js";
2
+ import { type LifecycleHook } from "../core/lifecycleHook.hook.js";
3
+ import { LifecycleState, type LifecycleParticipant } from "../core/lifecycle.js";
4
+ /** Anything that can participate in the managed application lifecycle. */
5
+ export type ManagedLifecycleComponent = LifecycleParticipant | LifecycleHook;
6
+ /** Options for LifecycleManager. */
7
+ export interface LifecycleManagerOptions {
8
+ readonly logger?: Logger;
9
+ readonly continueOnShutdownError?: boolean;
10
+ }
11
+ /**
12
+ * Coordinates lifecycle hooks and lifecycle participants.
13
+ * Primary API for application-level lifecycle management.
14
+ */
15
+ export declare class LifecycleManager {
16
+ private readonly lifecycle;
17
+ private readonly components;
18
+ private readonly logger?;
19
+ private readonly continueOnShutdownError;
20
+ constructor(options?: LifecycleManagerOptions);
21
+ getState(): LifecycleState;
22
+ getComponents(): readonly ManagedLifecycleComponent[];
23
+ register(component: ManagedLifecycleComponent): void;
24
+ initialize(): Promise<void>;
25
+ start(): Promise<void>;
26
+ stop(): Promise<void>;
27
+ destroy(): Promise<void>;
28
+ shutdown(): Promise<void>;
29
+ private runHook;
30
+ private isLifecycleParticipant;
31
+ private getComponentName;
32
+ }
33
+ //# sourceMappingURL=lifecycleManager.manager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lifecycleManager.manager.d.ts","sourceRoot":"","sources":["../../../src/lifecycle/manager/lifecycleManager.manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAKL,KAAK,aAAa,EACnB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAEL,cAAc,EACd,KAAK,oBAAoB,EAC1B,MAAM,sBAAsB,CAAC;AAE9B,0EAA0E;AAC1E,MAAM,MAAM,yBAAyB,GAAG,oBAAoB,GAAG,aAAa,CAAC;AAE7E,oCAAoC;AACpC,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,uBAAuB,CAAC,EAAE,OAAO,CAAC;CAC5C;AAED;;;GAGG;AACH,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAY;IACtC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAmC;IAC9D,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,uBAAuB,CAAU;IAElD,YAAmB,OAAO,GAAE,uBAA4B,EAOvD;IAEM,QAAQ,IAAI,cAAc,CAEhC;IACM,aAAa,IAAI,SAAS,yBAAyB,EAAE,CAE3D;IAEM,QAAQ,CAAC,SAAS,EAAE,yBAAyB,GAAG,IAAI,CAI1D;IAEY,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC,CAcvC;IAEY,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAclC;IAEY,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAwBjC;IAEY,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAwBpC;IAEY,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CAiBrC;YAEa,OAAO;IAWrB,OAAO,CAAC,sBAAsB;IAW9B,OAAO,CAAC,gBAAgB;CAYzB"}
@@ -0,0 +1,157 @@
1
+ import { hasDestroyHook, hasInitializeHook, hasStartHook, hasStopHook, } from "../core/lifecycleHook.hook.js";
2
+ import { Lifecycle, LifecycleState, } from "../core/lifecycle.js";
3
+ /**
4
+ * Coordinates lifecycle hooks and lifecycle participants.
5
+ * Primary API for application-level lifecycle management.
6
+ */
7
+ export class LifecycleManager {
8
+ lifecycle;
9
+ components = [];
10
+ logger;
11
+ continueOnShutdownError;
12
+ constructor(options = {}) {
13
+ this.logger = options.logger;
14
+ this.continueOnShutdownError = options.continueOnShutdownError ?? true;
15
+ this.lifecycle = new Lifecycle({
16
+ logger: this.logger,
17
+ continueOnShutdownError: this.continueOnShutdownError,
18
+ });
19
+ }
20
+ getState() {
21
+ return this.lifecycle.getState();
22
+ }
23
+ getComponents() {
24
+ return [...this.components];
25
+ }
26
+ register(component) {
27
+ this.components.push(component);
28
+ if (this.isLifecycleParticipant(component))
29
+ this.lifecycle.register(component);
30
+ }
31
+ async initialize() {
32
+ if (this.getState() !== LifecycleState.CREATED)
33
+ return;
34
+ this.logger?.debug("Lifecycle manager initialization started");
35
+ try {
36
+ for (const component of this.components) {
37
+ if (hasInitializeHook(component))
38
+ await this.runHook(component, "onInitialize", "initialize");
39
+ }
40
+ await this.lifecycle.initialize();
41
+ this.logger?.debug("Lifecycle manager initialization completed");
42
+ }
43
+ catch (error) {
44
+ this.logger?.error("Lifecycle manager initialization failed", error);
45
+ throw error;
46
+ }
47
+ }
48
+ async start() {
49
+ if (this.getState() === LifecycleState.CREATED)
50
+ await this.initialize();
51
+ this.logger?.debug("Lifecycle manager startup started");
52
+ try {
53
+ for (const component of this.components) {
54
+ if (hasStartHook(component))
55
+ await this.runHook(component, "onStart", "start");
56
+ }
57
+ await this.lifecycle.start();
58
+ this.logger?.debug("Lifecycle manager startup completed");
59
+ }
60
+ catch (error) {
61
+ this.logger?.error("Lifecycle manager startup failed", error);
62
+ throw error;
63
+ }
64
+ }
65
+ async stop() {
66
+ const errors = [];
67
+ this.logger?.debug("Lifecycle manager shutdown started");
68
+ for (let i = this.components.length - 1; i >= 0; i--) {
69
+ const component = this.components[i];
70
+ if (!hasStopHook(component))
71
+ continue;
72
+ try {
73
+ await this.runHook(component, "onStop", "stop");
74
+ }
75
+ catch (error) {
76
+ errors.push(error);
77
+ if (!this.continueOnShutdownError)
78
+ break;
79
+ }
80
+ }
81
+ try {
82
+ await this.lifecycle.stop();
83
+ }
84
+ catch (error) {
85
+ errors.push(error);
86
+ }
87
+ if (errors.length > 0)
88
+ throw new AggregateError(errors, "Lifecycle shutdown completed with errors.");
89
+ this.logger?.debug("Lifecycle manager shutdown completed");
90
+ }
91
+ async destroy() {
92
+ const errors = [];
93
+ this.logger?.debug("Lifecycle manager destruction started");
94
+ for (let i = this.components.length - 1; i >= 0; i--) {
95
+ const component = this.components[i];
96
+ if (!hasDestroyHook(component))
97
+ continue;
98
+ try {
99
+ await this.runHook(component, "onDestroy", "destroy");
100
+ }
101
+ catch (error) {
102
+ errors.push(error);
103
+ if (!this.continueOnShutdownError)
104
+ break;
105
+ }
106
+ }
107
+ try {
108
+ await this.lifecycle.dispose();
109
+ }
110
+ catch (error) {
111
+ errors.push(error);
112
+ }
113
+ if (errors.length > 0)
114
+ throw new AggregateError(errors, "Lifecycle destruction completed with errors.");
115
+ this.logger?.debug("Lifecycle manager destruction completed");
116
+ }
117
+ async shutdown() {
118
+ const errors = [];
119
+ try {
120
+ await this.stop();
121
+ }
122
+ catch (error) {
123
+ errors.push(error);
124
+ }
125
+ try {
126
+ await this.destroy();
127
+ }
128
+ catch (error) {
129
+ errors.push(error);
130
+ }
131
+ if (errors.length > 0)
132
+ throw new AggregateError(errors, "Application shutdown completed with errors.");
133
+ }
134
+ async runHook(component, hook, label) {
135
+ this.logger?.debug(`Running lifecycle ${label} hook`, {
136
+ component: this.getComponentName(component),
137
+ });
138
+ await component[hook]?.();
139
+ }
140
+ isLifecycleParticipant(component) {
141
+ return (typeof component === "object" &&
142
+ component !== null &&
143
+ "name" in component &&
144
+ typeof component.name === "string");
145
+ }
146
+ getComponentName(component) {
147
+ if ("name" in component && typeof component.name === "string")
148
+ return component.name;
149
+ if (typeof component === "object" &&
150
+ component !== null &&
151
+ "constructor" in component &&
152
+ typeof component.constructor === "function")
153
+ return component.constructor.name;
154
+ return "anonymous";
155
+ }
156
+ }
157
+ //# sourceMappingURL=lifecycleManager.manager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lifecycleManager.manager.js","sourceRoot":"","sources":["../../../src/lifecycle/manager/lifecycleManager.manager.ts"],"names":[],"mappings":"AACA,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,WAAW,GAEZ,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,SAAS,EACT,cAAc,GAEf,MAAM,sBAAsB,CAAC;AAW9B;;;GAGG;AACH,MAAM,OAAO,gBAAgB;IACV,SAAS,CAAY;IACrB,UAAU,GAAgC,EAAE,CAAC;IAC7C,MAAM,CAAU;IAChB,uBAAuB,CAAU;IAElD,YAAmB,OAAO,GAA4B,EAAE;QACtD,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;QAC7B,IAAI,CAAC,uBAAuB,GAAG,OAAO,CAAC,uBAAuB,IAAI,IAAI,CAAC;QACvE,IAAI,CAAC,SAAS,GAAG,IAAI,SAAS,CAAC;YAC7B,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,uBAAuB,EAAE,IAAI,CAAC,uBAAuB;SACtD,CAAC,CAAC;IACL,CAAC;IAEM,QAAQ;QACb,OAAO,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,C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 +1,8 @@
1
+ /**
2
+ * @zudojs/core/lifecycle/scope
3
+ *
4
+ * Isolated lifecycle boundaries for applications,
5
+ * modules, plugins, workers, and services.
6
+ */
7
+ export { LifecycleScope, LifecycleScopeState, type LifecycleScopeOptions, } from "./lifecycleScope.scope.js";
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lifecycle/scope/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,KAAK,qBAAqB,GAC3B,MAAM,2BAA2B,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @zudojs/core/lifecycle/scope
3
+ *
4
+ * Isolated lifecycle boundaries for applications,
5
+ * modules, plugins, workers, and services.
6
+ */
7
+ export { LifecycleScope, LifecycleScopeState, } from "./lifecycleScope.scope.js";
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lifecycle/scope/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,cAAc,EACd,mBAAmB,GAEpB,MAAM,2BAA2B,CAAC"}
@@ -0,0 +1,49 @@
1
+ import type { Logger } from "../../logging/core/logger.js";
2
+ import type { LifecycleComponent, LifecycleRegistration } from "../core/lifecycleRegistry.registry.js";
3
+ /** Lifecycle scope state. */
4
+ export declare const LifecycleScopeState: {
5
+ readonly CREATED: "created";
6
+ readonly INITIALIZING: "initializing";
7
+ readonly INITIALIZED: "initialized";
8
+ readonly STARTING: "starting";
9
+ readonly RUNNING: "running";
10
+ readonly STOPPING: "stopping";
11
+ readonly STOPPED: "stopped";
12
+ readonly FAILED: "failed";
13
+ };
14
+ export type LifecycleScopeState = (typeof LifecycleScopeState)[keyof typeof LifecycleScopeState];
15
+ /** Options used when creating a lifecycle scope. */
16
+ export interface LifecycleScopeOptions {
17
+ readonly name: string;
18
+ readonly parent?: LifecycleScope;
19
+ readonly logger?: Logger;
20
+ readonly continueOnShutdownError?: boolean;
21
+ }
22
+ /**
23
+ * Represents an independently managed lifecycle boundary.
24
+ * Can represent an Application, Module, Plugin, Worker, Service, or Feature.
25
+ */
26
+ export declare class LifecycleScope {
27
+ private state;
28
+ private readonly name;
29
+ private readonly parent?;
30
+ private readonly logger?;
31
+ private readonly continueOnShutdownError;
32
+ private readonly registry;
33
+ private readonly children;
34
+ constructor(options: LifecycleScopeOptions);
35
+ getName(): string;
36
+ getState(): LifecycleScopeState;
37
+ getParent(): LifecycleScope | undefined;
38
+ getChildren(): readonly LifecycleScope[];
39
+ getRegistrations(): readonly LifecycleRegistration[];
40
+ register(component: LifecycleComponent, name?: string): LifecycleRegistration;
41
+ unregister(id: string): boolean;
42
+ initialize(): Promise<void>;
43
+ start(): Promise<void>;
44
+ stop(): Promise<void>;
45
+ destroy(): Promise<void>;
46
+ shutdown(): Promise<void>;
47
+ private addChild;
48
+ }
49
+ //# sourceMappingURL=lifecycleScope.scope.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lifecycleScope.scope.d.ts","sourceRoot":"","sources":["../../../src/lifecycle/scope/lifecycleScope.scope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,KAAK,EACV,kBAAkB,EAClB,qBAAqB,EACtB,MAAM,uCAAuC,CAAC;AAG/C,6BAA6B;AAC7B,eAAO,MAAM,mBAAmB;aAC9B,OAAO,EAAE,SAAS;aAClB,YAAY,EAAE,cAAc;aAC5B,WAAW,EAAE,aAAa;aAC1B,QAAQ,EAAE,UAAU;aACpB,OAAO,EAAE,SAAS;aAClB,QAAQ,EAAE,UAAU;aACpB,OAAO,EAAE,SAAS;aAClB,MAAM,EAAE,QAAQ;CACR,CAAC;AAEX,MAAM,MAAM,mBAAmB,GAC7B,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,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