@zudojs/core 1.2.3 → 1.3.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 (282) hide show
  1. package/README.md +13 -2
  2. package/dist/application/application.d.ts +29 -1
  3. package/dist/application/application.js +70 -1
  4. package/dist/application/applicationContext.context.d.ts +0 -1
  5. package/dist/application/applicationContext.context.js +0 -1
  6. package/dist/application/applicationState.state.d.ts +0 -1
  7. package/dist/application/applicationState.state.js +0 -1
  8. package/dist/application/createApplication.d.ts +0 -1
  9. package/dist/application/createApplication.js +0 -1
  10. package/dist/application/index.d.ts +0 -1
  11. package/dist/application/index.js +0 -1
  12. package/dist/configuration/configurationManager.manager.d.ts +0 -1
  13. package/dist/configuration/configurationManager.manager.js +0 -1
  14. package/dist/configuration/core/configuration.d.ts +0 -1
  15. package/dist/configuration/core/configuration.js +0 -1
  16. package/dist/configuration/core/configurationKey.key.d.ts +0 -1
  17. package/dist/configuration/core/configurationKey.key.js +0 -1
  18. package/dist/configuration/core/configurationPath.path.d.ts +0 -1
  19. package/dist/configuration/core/configurationPath.path.js +0 -1
  20. package/dist/configuration/core/configurationSource.source.d.ts +0 -1
  21. package/dist/configuration/core/configurationSource.source.js +0 -1
  22. package/dist/configuration/core/index.d.ts +0 -1
  23. package/dist/configuration/core/index.js +0 -1
  24. package/dist/configuration/error/configurationError.error.d.ts +0 -1
  25. package/dist/configuration/error/configurationError.error.js +0 -1
  26. package/dist/configuration/error/configurationRedactor.redactor.d.ts +0 -1
  27. package/dist/configuration/error/configurationRedactor.redactor.js +0 -1
  28. package/dist/configuration/error/index.d.ts +0 -1
  29. package/dist/configuration/error/index.js +0 -1
  30. package/dist/configuration/events/configurationEvents.events.d.ts +0 -1
  31. package/dist/configuration/events/configurationEvents.events.js +0 -1
  32. package/dist/configuration/events/index.d.ts +0 -1
  33. package/dist/configuration/events/index.js +0 -1
  34. package/dist/configuration/index.d.ts +0 -1
  35. package/dist/configuration/index.js +0 -1
  36. package/dist/configuration/loader/configurationLoader.loader.d.ts +0 -1
  37. package/dist/configuration/loader/configurationLoader.loader.js +0 -1
  38. package/dist/configuration/loader/index.d.ts +0 -1
  39. package/dist/configuration/loader/index.js +0 -1
  40. package/dist/configuration/registry/configurationProvider.provider.d.ts +0 -1
  41. package/dist/configuration/registry/configurationProvider.provider.js +0 -1
  42. package/dist/configuration/registry/configurationRegistry.registry.d.ts +0 -1
  43. package/dist/configuration/registry/configurationRegistry.registry.js +0 -1
  44. package/dist/configuration/registry/index.d.ts +0 -1
  45. package/dist/configuration/registry/index.js +0 -1
  46. package/dist/configuration/schema/configurationSchema.schema.d.ts +0 -1
  47. package/dist/configuration/schema/configurationSchema.schema.js +0 -1
  48. package/dist/configuration/schema/configurationValidation.validator.d.ts +0 -1
  49. package/dist/configuration/schema/configurationValidation.validator.js +0 -1
  50. package/dist/configuration/schema/index.d.ts +0 -1
  51. package/dist/configuration/schema/index.js +0 -1
  52. package/dist/container/container.d.ts +0 -1
  53. package/dist/container/container.js +0 -1
  54. package/dist/container/container.lifetime.d.ts +0 -1
  55. package/dist/container/container.lifetime.js +0 -1
  56. package/dist/container/index.d.ts +0 -1
  57. package/dist/container/index.js +0 -1
  58. package/dist/container/provider.d.ts +0 -1
  59. package/dist/container/provider.js +0 -1
  60. package/dist/container/scope.d.ts +0 -1
  61. package/dist/container/scope.js +0 -1
  62. package/dist/container/token.d.ts +0 -1
  63. package/dist/container/token.js +0 -1
  64. package/dist/context/core/contextAliases.deprecated.d.ts +0 -1
  65. package/dist/context/core/contextAliases.deprecated.js +0 -1
  66. package/dist/context/core/contextKey.key.d.ts +0 -1
  67. package/dist/context/core/contextKey.key.js +4 -3
  68. package/dist/context/core/executionContext.context.d.ts +0 -1
  69. package/dist/context/core/executionContext.context.js +0 -1
  70. package/dist/context/core/index.d.ts +0 -1
  71. package/dist/context/core/index.js +0 -1
  72. package/dist/context/index.d.ts +0 -1
  73. package/dist/context/index.js +0 -1
  74. package/dist/context/provider/contextProvider.provider.d.ts +0 -1
  75. package/dist/context/provider/contextProvider.provider.js +0 -1
  76. package/dist/context/provider/contextStorage.storage.d.ts +0 -1
  77. package/dist/context/provider/contextStorage.storage.js +0 -1
  78. package/dist/context/provider/defaultContextStorage.storage.d.ts +0 -1
  79. package/dist/context/provider/defaultContextStorage.storage.js +0 -1
  80. package/dist/context/provider/index.d.ts +0 -1
  81. package/dist/context/provider/index.js +0 -1
  82. package/dist/context/snapshot/contextSnapshot.snapshot.d.ts +0 -1
  83. package/dist/context/snapshot/contextSnapshot.snapshot.js +0 -1
  84. package/dist/context/snapshot/index.d.ts +0 -1
  85. package/dist/context/snapshot/index.js +0 -1
  86. package/dist/context/values/contextValues.values.d.ts +0 -1
  87. package/dist/context/values/contextValues.values.js +0 -1
  88. package/dist/context/values/index.d.ts +0 -1
  89. package/dist/context/values/index.js +0 -1
  90. package/dist/contracts/adapter.d.ts +0 -1
  91. package/dist/contracts/adapter.js +0 -1
  92. package/dist/contracts/disposable.d.ts +0 -1
  93. package/dist/contracts/disposable.js +0 -1
  94. package/dist/contracts/handler.d.ts +0 -1
  95. package/dist/contracts/handler.js +0 -1
  96. package/dist/contracts/index.d.ts +0 -1
  97. package/dist/contracts/index.js +0 -1
  98. package/dist/errors/contextValueNotFound.error.d.ts +15 -0
  99. package/dist/errors/contextValueNotFound.error.js +23 -0
  100. package/dist/errors/errorCode.code.d.ts +1 -1
  101. package/dist/errors/errorCode.code.js +1 -1
  102. package/dist/errors/exceptions.d.ts +0 -1
  103. package/dist/errors/exceptions.js +0 -1
  104. package/dist/errors/frameworkError.error.d.ts +0 -1
  105. package/dist/errors/frameworkError.error.js +0 -1
  106. package/dist/errors/index.d.ts +1 -1
  107. package/dist/errors/index.js +1 -1
  108. package/dist/index.d.ts +4 -1
  109. package/dist/index.js +16 -1
  110. package/dist/lifecycle/core/index.d.ts +0 -1
  111. package/dist/lifecycle/core/index.js +0 -1
  112. package/dist/lifecycle/core/lifecycle.d.ts +12 -2
  113. package/dist/lifecycle/core/lifecycle.js +12 -2
  114. package/dist/lifecycle/core/lifecycle.rollback.d.ts +0 -1
  115. package/dist/lifecycle/core/lifecycle.rollback.js +0 -1
  116. package/dist/lifecycle/core/lifecycleHook.hook.d.ts +0 -1
  117. package/dist/lifecycle/core/lifecycleHook.hook.js +0 -1
  118. package/dist/lifecycle/core/lifecycleRegistry.registry.d.ts +0 -1
  119. package/dist/lifecycle/core/lifecycleRegistry.registry.js +0 -1
  120. package/dist/lifecycle/index.d.ts +0 -1
  121. package/dist/lifecycle/index.js +0 -1
  122. package/dist/lifecycle/manager/index.d.ts +0 -1
  123. package/dist/lifecycle/manager/index.js +0 -1
  124. package/dist/lifecycle/manager/lifecycleManager.manager.d.ts +0 -1
  125. package/dist/lifecycle/manager/lifecycleManager.manager.js +0 -1
  126. package/dist/lifecycle/scope/index.d.ts +0 -1
  127. package/dist/lifecycle/scope/index.js +0 -1
  128. package/dist/lifecycle/scope/lifecycleScope.scope.d.ts +0 -1
  129. package/dist/lifecycle/scope/lifecycleScope.scope.js +0 -1
  130. package/dist/logging/console/consoleLogger.logger.d.ts +0 -1
  131. package/dist/logging/console/consoleLogger.logger.js +6 -2
  132. package/dist/logging/console/index.d.ts +0 -1
  133. package/dist/logging/console/index.js +0 -1
  134. package/dist/logging/console/loggerFactory.factory.d.ts +0 -1
  135. package/dist/logging/console/loggerFactory.factory.js +0 -1
  136. package/dist/logging/core/index.d.ts +0 -1
  137. package/dist/logging/core/index.js +0 -1
  138. package/dist/logging/core/logEntry.entry.d.ts +0 -1
  139. package/dist/logging/core/logEntry.entry.js +0 -1
  140. package/dist/logging/core/logLevel.level.d.ts +0 -1
  141. package/dist/logging/core/logLevel.level.js +0 -1
  142. package/dist/logging/core/logRedaction.redaction.d.ts +0 -1
  143. package/dist/logging/core/logRedaction.redaction.js +0 -1
  144. package/dist/logging/core/logger.d.ts +7 -2
  145. package/dist/logging/core/logger.js +22 -3
  146. package/dist/logging/core/loggerContext.context.d.ts +0 -1
  147. package/dist/logging/core/loggerContext.context.js +0 -1
  148. package/dist/logging/core/loggerOptions.options.d.ts +6 -3
  149. package/dist/logging/core/loggerOptions.options.js +0 -1
  150. package/dist/logging/index.d.ts +0 -1
  151. package/dist/logging/index.js +0 -1
  152. package/dist/modules/index.d.ts +0 -1
  153. package/dist/modules/index.js +0 -1
  154. package/dist/modules/module.d.ts +0 -1
  155. package/dist/modules/module.js +0 -1
  156. package/dist/modules/moduleContext.context.d.ts +0 -1
  157. package/dist/modules/moduleContext.context.js +0 -1
  158. package/dist/modules/moduleDefinition.definition.d.ts +0 -1
  159. package/dist/modules/moduleDefinition.definition.js +0 -1
  160. package/dist/modules/moduleDependency/index.d.ts +0 -1
  161. package/dist/modules/moduleDependency/index.js +0 -1
  162. package/dist/modules/moduleDependency/moduleDependency.graph.d.ts +0 -1
  163. package/dist/modules/moduleDependency/moduleDependency.graph.js +0 -1
  164. package/dist/modules/moduleDependency/moduleDependency.ordering.d.ts +0 -1
  165. package/dist/modules/moduleDependency/moduleDependency.ordering.js +0 -1
  166. package/dist/modules/moduleDependency/moduleDependency.type.d.ts +0 -1
  167. package/dist/modules/moduleDependency/moduleDependency.type.js +0 -1
  168. package/dist/modules/moduleError/index.d.ts +0 -1
  169. package/dist/modules/moduleError/index.js +0 -1
  170. package/dist/modules/moduleError/moduleError.base.d.ts +0 -1
  171. package/dist/modules/moduleError/moduleError.base.js +0 -1
  172. package/dist/modules/moduleError/moduleError.dependency.d.ts +19 -3
  173. package/dist/modules/moduleError/moduleError.dependency.js +16 -4
  174. package/dist/modules/moduleError/moduleError.helpers.d.ts +0 -1
  175. package/dist/modules/moduleError/moduleError.helpers.js +0 -1
  176. package/dist/modules/moduleError/moduleError.lifecycle.d.ts +0 -1
  177. package/dist/modules/moduleError/moduleError.lifecycle.js +0 -1
  178. package/dist/modules/moduleError/moduleError.registration.d.ts +0 -1
  179. package/dist/modules/moduleError/moduleError.registration.js +0 -1
  180. package/dist/modules/moduleLifecycle/index.d.ts +0 -1
  181. package/dist/modules/moduleLifecycle/index.js +0 -1
  182. package/dist/modules/moduleLifecycle/moduleLifecycle.exclusive.d.ts +25 -0
  183. package/dist/modules/moduleLifecycle/moduleLifecycle.exclusive.js +63 -0
  184. package/dist/modules/moduleLifecycle/moduleLifecycle.lifecycle.d.ts +20 -2
  185. package/dist/modules/moduleLifecycle/moduleLifecycle.lifecycle.js +52 -20
  186. package/dist/modules/moduleLifecycle/moduleLifecycle.stateMachine.d.ts +0 -1
  187. package/dist/modules/moduleLifecycle/moduleLifecycle.stateMachine.js +4 -3
  188. package/dist/modules/moduleLifecycle/moduleLifecycle.type.d.ts +0 -1
  189. package/dist/modules/moduleLifecycle/moduleLifecycle.type.js +0 -1
  190. package/dist/modules/moduleLoader/index.d.ts +0 -1
  191. package/dist/modules/moduleLoader/index.js +0 -1
  192. package/dist/modules/moduleLoader/moduleLoader.loader.d.ts +0 -1
  193. package/dist/modules/moduleLoader/moduleLoader.loader.js +0 -1
  194. package/dist/modules/moduleLoader/moduleLoader.type.d.ts +0 -1
  195. package/dist/modules/moduleLoader/moduleLoader.type.js +0 -1
  196. package/dist/modules/moduleMetadata.metadata.d.ts +0 -1
  197. package/dist/modules/moduleMetadata.metadata.js +0 -1
  198. package/dist/modules/moduleRegistry/index.d.ts +0 -1
  199. package/dist/modules/moduleRegistry/index.js +0 -1
  200. package/dist/modules/moduleRegistry/moduleRegistry.registry.d.ts +0 -1
  201. package/dist/modules/moduleRegistry/moduleRegistry.registry.js +0 -1
  202. package/dist/modules/moduleRegistry/moduleRegistry.type.d.ts +0 -1
  203. package/dist/modules/moduleRegistry/moduleRegistry.type.js +0 -1
  204. package/dist/runtime/index.d.ts +1 -2
  205. package/dist/runtime/index.js +0 -1
  206. package/dist/runtime/runtime.d.ts +18 -2
  207. package/dist/runtime/runtime.js +23 -1
  208. package/dist/runtime/runtimeBootstrap/index.d.ts +0 -1
  209. package/dist/runtime/runtimeBootstrap/index.js +0 -1
  210. package/dist/runtime/runtimeBootstrap/pipeline/index.d.ts +0 -1
  211. package/dist/runtime/runtimeBootstrap/pipeline/index.js +0 -1
  212. package/dist/runtime/runtimeBootstrap/pipeline/runtimeBootstrap.pipeline.d.ts +0 -1
  213. package/dist/runtime/runtimeBootstrap/pipeline/runtimeBootstrap.pipeline.js +0 -1
  214. package/dist/runtime/runtimeBootstrap/runtimeBootstrap.core.d.ts +0 -1
  215. package/dist/runtime/runtimeBootstrap/runtimeBootstrap.core.js +8 -2
  216. package/dist/runtime/runtimeBootstrap/runtimeBootstrap.type.d.ts +0 -1
  217. package/dist/runtime/runtimeBootstrap/runtimeBootstrap.type.js +0 -1
  218. package/dist/runtime/runtimeContext/index.d.ts +0 -1
  219. package/dist/runtime/runtimeContext/index.js +0 -1
  220. package/dist/runtime/runtimeContext/runtimeContext.factory.d.ts +0 -1
  221. package/dist/runtime/runtimeContext/runtimeContext.factory.js +0 -1
  222. package/dist/runtime/runtimeContext/runtimeContext.type.d.ts +0 -1
  223. package/dist/runtime/runtimeContext/runtimeContext.type.js +0 -1
  224. package/dist/runtime/runtimeEnvironment/detection/index.d.ts +0 -1
  225. package/dist/runtime/runtimeEnvironment/detection/index.js +0 -1
  226. package/dist/runtime/runtimeEnvironment/detection/runtimeEnvironment.detection.d.ts +0 -1
  227. package/dist/runtime/runtimeEnvironment/detection/runtimeEnvironment.detection.js +0 -1
  228. package/dist/runtime/runtimeEnvironment/detection/runtimeEnvironment.env.d.ts +0 -1
  229. package/dist/runtime/runtimeEnvironment/detection/runtimeEnvironment.env.js +0 -1
  230. package/dist/runtime/runtimeEnvironment/detection/runtimeEnvironment.os.d.ts +0 -1
  231. package/dist/runtime/runtimeEnvironment/detection/runtimeEnvironment.os.js +0 -1
  232. package/dist/runtime/runtimeEnvironment/index.d.ts +0 -1
  233. package/dist/runtime/runtimeEnvironment/index.js +0 -1
  234. package/dist/runtime/runtimeEnvironment/runtimeEnvironment.core.d.ts +0 -1
  235. package/dist/runtime/runtimeEnvironment/runtimeEnvironment.core.js +0 -1
  236. package/dist/runtime/runtimeEnvironment/runtimeEnvironment.type.d.ts +0 -1
  237. package/dist/runtime/runtimeEnvironment/runtimeEnvironment.type.js +0 -1
  238. package/dist/runtime/runtimeError/index.d.ts +0 -1
  239. package/dist/runtime/runtimeError/index.js +0 -1
  240. package/dist/runtime/runtimeError/runtimeError.base.d.ts +0 -1
  241. package/dist/runtime/runtimeError/runtimeError.base.js +0 -1
  242. package/dist/runtime/runtimeError/runtimeError.lifecycle.d.ts +0 -1
  243. package/dist/runtime/runtimeError/runtimeError.lifecycle.js +0 -1
  244. package/dist/runtime/runtimeError/runtimeError.specialized.d.ts +0 -1
  245. package/dist/runtime/runtimeError/runtimeError.specialized.js +0 -1
  246. package/dist/runtime/runtimeError/runtimeError.type.d.ts +0 -1
  247. package/dist/runtime/runtimeError/runtimeError.type.js +0 -1
  248. package/dist/runtime/runtimeLogger.d.ts +0 -1
  249. package/dist/runtime/runtimeLogger.js +5 -2
  250. package/dist/runtime/runtimeOptions/index.d.ts +0 -1
  251. package/dist/runtime/runtimeOptions/index.js +0 -1
  252. package/dist/runtime/runtimeOptions/runtimeOptions.defaults.d.ts +0 -1
  253. package/dist/runtime/runtimeOptions/runtimeOptions.defaults.js +0 -1
  254. package/dist/runtime/runtimeOptions/runtimeOptions.mode.d.ts +0 -1
  255. package/dist/runtime/runtimeOptions/runtimeOptions.mode.js +0 -1
  256. package/dist/runtime/runtimeOptions/runtimeOptions.resolver.d.ts +0 -1
  257. package/dist/runtime/runtimeOptions/runtimeOptions.resolver.js +0 -1
  258. package/dist/runtime/runtimeOptions/runtimeOptions.type.d.ts +0 -1
  259. package/dist/runtime/runtimeOptions/runtimeOptions.type.js +0 -1
  260. package/dist/runtime/runtimeOptions/runtimeOptions.validation.d.ts +0 -1
  261. package/dist/runtime/runtimeOptions/runtimeOptions.validation.js +0 -1
  262. package/dist/runtime/runtimeShutdown/index.d.ts +0 -1
  263. package/dist/runtime/runtimeShutdown/index.js +0 -1
  264. package/dist/runtime/runtimeShutdown/pipeline/index.d.ts +0 -1
  265. package/dist/runtime/runtimeShutdown/pipeline/index.js +0 -1
  266. package/dist/runtime/runtimeShutdown/pipeline/runtimeShutdown.pipeline.d.ts +0 -1
  267. package/dist/runtime/runtimeShutdown/pipeline/runtimeShutdown.pipeline.js +0 -1
  268. package/dist/runtime/runtimeShutdown/runtimeShutdown.core.d.ts +0 -1
  269. package/dist/runtime/runtimeShutdown/runtimeShutdown.core.js +4 -2
  270. package/dist/runtime/runtimeShutdown/runtimeShutdown.type.d.ts +0 -1
  271. package/dist/runtime/runtimeShutdown/runtimeShutdown.type.js +0 -1
  272. package/dist/runtime/runtimeSignals/index.d.ts +0 -1
  273. package/dist/runtime/runtimeSignals/index.js +0 -1
  274. package/dist/runtime/runtimeSignals/runtimeSignals.d.ts +7 -3
  275. package/dist/runtime/runtimeSignals/runtimeSignals.fatal.d.ts +0 -1
  276. package/dist/runtime/runtimeSignals/runtimeSignals.fatal.js +0 -1
  277. package/dist/runtime/runtimeSignals/runtimeSignals.js +4 -5
  278. package/dist/runtime/runtimeState.state.d.ts +0 -1
  279. package/dist/runtime/runtimeState.state.js +0 -1
  280. package/dist/runtime/runtimeTimeout.d.ts +0 -1
  281. package/dist/runtime/runtimeTimeout.js +0 -1
  282. package/package.json +3 -3
@@ -98,4 +98,3 @@ export class RuntimeLoadError extends RuntimeError {
98
98
  this.name = "RuntimeLoadError";
99
99
  }
100
100
  }
101
- //# sourceMappingURL=runtimeError.lifecycle.js.map
@@ -32,4 +32,3 @@ export declare class RuntimeUnsupportedOperationError extends RuntimeError {
32
32
  export declare class RuntimeCancellationError extends RuntimeError {
33
33
  constructor(message?: string, options?: Omit<RuntimeErrorOptions, "code">);
34
34
  }
35
- //# sourceMappingURL=runtimeError.specialized.d.ts.map
@@ -76,4 +76,3 @@ export class RuntimeCancellationError extends RuntimeError {
76
76
  this.name = "RuntimeCancellationError";
77
77
  }
78
78
  }
79
- //# sourceMappingURL=runtimeError.specialized.js.map
@@ -67,4 +67,3 @@ export type RuntimeErrorJSON = SerializedBaseError & {
67
67
  readonly errorMetadata: RuntimeErrorMetadata;
68
68
  readonly recoverable: boolean;
69
69
  };
70
- //# sourceMappingURL=runtimeError.type.d.ts.map
@@ -25,4 +25,3 @@ export const RuntimeErrorCode = {
25
25
  UNSUPPORTED_OPERATION: ErrorCode.RUNTIME_UNSUPPORTED_OPERATION,
26
26
  OPERATION_CANCELLED: ErrorCode.RUNTIME_OPERATION_CANCELLED,
27
27
  };
28
- //# sourceMappingURL=runtimeError.type.js.map
@@ -2,4 +2,3 @@ import type { RuntimeIdentity } from "./runtimeContext/index.js";
2
2
  import type { RuntimeEnvironment } from "./runtimeEnvironment/index.js";
3
3
  import type { Logger } from "../logging/core/logger.js";
4
4
  export declare function logRuntimeEvent(logger: Logger, identity: RuntimeIdentity, environment: RuntimeEnvironment, level: "debug" | "info" | "warn" | "error", message: string, metadata?: Record<string, unknown>): void;
5
- //# sourceMappingURL=runtimeLogger.d.ts.map
@@ -6,7 +6,11 @@ export function logRuntimeEvent(logger, identity, environment, level, message, m
6
6
  method.call(logger, message, {
7
7
  runtimeId: identity.id,
8
8
  runtimeName: identity.name,
9
- environment: environment.engine,
9
+ // `environment` is the runtime mode (development/test/production),
10
+ // as everywhere else in the framework; the JavaScript engine used
11
+ // to be logged under that key and read as "environment=node".
12
+ environment: environment.mode,
13
+ engine: environment.engine,
10
14
  ...metadata,
11
15
  });
12
16
  }
@@ -15,4 +19,3 @@ export function logRuntimeEvent(logger, identity, environment, level, message, m
15
19
  /* Logging must never break runtime operations. */
16
20
  }
17
21
  }
18
- //# sourceMappingURL=runtimeLogger.js.map
@@ -7,4 +7,3 @@ export { DEFAULT_RUNTIME_OPTIONS } from "./runtimeOptions.defaults.js";
7
7
  export { resolveRuntimeOptions, validateRuntimeOptions, } from "./runtimeOptions.resolver.js";
8
8
  export { isRuntimeMode, isRuntimeRole, assertRuntimeMode, assertRuntimeRole, } from "./runtimeOptions.validation.js";
9
9
  export type { RuntimeMode, RuntimeRole, RuntimeStartupOptions, RuntimeShutdownOptions, RuntimeSignalOptions, RuntimeDiagnosticsOptions, RuntimeEnvironmentOverrides, RuntimeOptions, ResolvedRuntimeOptions, } from "./runtimeOptions.type.js";
10
- //# sourceMappingURL=index.d.ts.map
@@ -6,4 +6,3 @@
6
6
  export { DEFAULT_RUNTIME_OPTIONS } from "./runtimeOptions.defaults.js";
7
7
  export { resolveRuntimeOptions, validateRuntimeOptions, } from "./runtimeOptions.resolver.js";
8
8
  export { isRuntimeMode, isRuntimeRole, assertRuntimeMode, assertRuntimeRole, } from "./runtimeOptions.validation.js";
9
- //# sourceMappingURL=index.js.map
@@ -3,4 +3,3 @@ import type { ResolvedRuntimeOptions } from "./runtimeOptions.type.js";
3
3
  * Default runtime configuration.
4
4
  */
5
5
  export declare const DEFAULT_RUNTIME_OPTIONS: Readonly<Omit<ResolvedRuntimeOptions, "environment" | "metadata">>;
6
- //# sourceMappingURL=runtimeOptions.defaults.d.ts.map
@@ -38,4 +38,3 @@ export const DEFAULT_RUNTIME_OPTIONS = Object.freeze({
38
38
  includeModules: true,
39
39
  },
40
40
  });
41
- //# sourceMappingURL=runtimeOptions.defaults.js.map
@@ -11,4 +11,3 @@ import type { RuntimeMode } from "./runtimeOptions.type.js";
11
11
  * @param variables - Environment variables to read instead of `process.env`.
12
12
  */
13
13
  export declare function resolveDefaultRuntimeMode(variables?: RuntimeEnvironmentVariables): RuntimeMode;
14
- //# sourceMappingURL=runtimeOptions.mode.d.ts.map
@@ -13,4 +13,3 @@ export function resolveDefaultRuntimeMode(variables) {
13
13
  const environment = resolveEnvironment(variables === undefined ? undefined : { ...variables });
14
14
  return environment === "staging" ? "production" : environment;
15
15
  }
16
- //# sourceMappingURL=runtimeOptions.mode.js.map
@@ -7,4 +7,3 @@ export declare function resolveRuntimeOptions(options?: RuntimeOptions): Resolve
7
7
  * Validates runtime options.
8
8
  */
9
9
  export declare function validateRuntimeOptions(options: RuntimeOptions): void;
10
- //# sourceMappingURL=runtimeOptions.resolver.d.ts.map
@@ -96,4 +96,3 @@ export function validateRuntimeOptions(options) {
96
96
  validateRuntimeTimeout(options.shutdown?.timeoutMs, "shutdown");
97
97
  validateRuntimeTimeout(options.signals?.fatalExitTimeout, "fatal exit");
98
98
  }
99
- //# sourceMappingURL=runtimeOptions.resolver.js.map
@@ -136,4 +136,3 @@ export interface ResolvedRuntimeOptions {
136
136
  readonly environment: RuntimeEnvironmentOverrides;
137
137
  readonly metadata: Readonly<Record<string, unknown>>;
138
138
  }
139
- //# sourceMappingURL=runtimeOptions.type.d.ts.map
@@ -1,2 +1 @@
1
1
  export {};
2
- //# sourceMappingURL=runtimeOptions.type.js.map
@@ -23,4 +23,3 @@ export declare function validateRuntimeName(name: string | undefined): void;
23
23
  * Validates a runtime timeout.
24
24
  */
25
25
  export declare function validateRuntimeTimeout(timeout: number | undefined, field: "startup" | "shutdown" | "fatal exit"): void;
26
- //# sourceMappingURL=runtimeOptions.validation.d.ts.map
@@ -55,4 +55,3 @@ export function validateRuntimeTimeout(timeout, field) {
55
55
  throw new TypeError(`${field} timeout must be a finite number greater than or equal to 0.`);
56
56
  }
57
57
  }
58
- //# sourceMappingURL=runtimeOptions.validation.js.map
@@ -8,4 +8,3 @@ export { DefaultRuntimeShutdown } from "./runtimeShutdown.core.js";
8
8
  export { executeShutdownPipeline, createShutdownPipelineState, createShutdownResult, } from "./pipeline/index.js";
9
9
  export type { ShutdownCounters, ShutdownPipelineState, } from "./pipeline/index.js";
10
10
  export type { RuntimeShutdownDependencies, RuntimeShutdownConfig, RuntimeShutdownPhase, RuntimeShutdownErrorInfo, RuntimeShutdownResult, RuntimeShutdown, ResolvedShutdownOptions, } from "./runtimeShutdown.type.js";
11
- //# sourceMappingURL=index.d.ts.map
@@ -6,4 +6,3 @@
6
6
  */
7
7
  export { DefaultRuntimeShutdown } from "./runtimeShutdown.core.js";
8
8
  export { executeShutdownPipeline, createShutdownPipelineState, createShutdownResult, } from "./pipeline/index.js";
9
- //# sourceMappingURL=index.js.map
@@ -5,4 +5,3 @@
5
5
  */
6
6
  export { executeShutdownPipeline, createShutdownPipelineState, createShutdownResult, } from "./runtimeShutdown.pipeline.js";
7
7
  export type { ShutdownCounters, ShutdownLogFn, ShutdownPipelineServices, ShutdownPipelineState, } from "./runtimeShutdown.pipeline.js";
8
- //# sourceMappingURL=index.d.ts.map
@@ -4,4 +4,3 @@
4
4
  * Module stopping and destruction stages.
5
5
  */
6
6
  export { executeShutdownPipeline, createShutdownPipelineState, createShutdownResult, } from "./runtimeShutdown.pipeline.js";
7
- //# sourceMappingURL=index.js.map
@@ -36,4 +36,3 @@ export interface ShutdownPipelineServices {
36
36
  }
37
37
  export declare function executeShutdownPipeline(options: ResolvedShutdownOptions, services: ShutdownPipelineServices, state: ShutdownPipelineState, signal: AbortSignal, setPhase: (phase: RuntimeShutdownPhase) => void, log: ShutdownLogFn): Promise<void>;
38
38
  export declare function createShutdownResult(success: boolean, phase: RuntimeShutdownPhase, counters: ShutdownCounters, errors: readonly RuntimeShutdownErrorInfo[], startedAt: Date, completedAt: Date): RuntimeShutdownResult;
39
- //# sourceMappingURL=runtimeShutdown.pipeline.d.ts.map
@@ -98,4 +98,3 @@ export function createShutdownResult(success, phase, counters, errors, startedAt
98
98
  durationMs: completedAt.getTime() - startedAt.getTime(),
99
99
  });
100
100
  }
101
- //# sourceMappingURL=runtimeShutdown.pipeline.js.map
@@ -24,4 +24,3 @@ export declare class DefaultRuntimeShutdown implements RuntimeShutdown {
24
24
  private errorContext;
25
25
  private log;
26
26
  }
27
- //# sourceMappingURL=runtimeShutdown.core.d.ts.map
@@ -47,8 +47,11 @@ export class DefaultRuntimeShutdown {
47
47
  const diagnostics = this._runtimeOptions.diagnostics;
48
48
  try {
49
49
  if (diagnostics.shutdownLogging) {
50
+ // The phase about to run, not the pipeline's resting "created".
50
51
  this.log("info", "Runtime shutdown started.", {
51
- ...(diagnostics.includeState && { phase: this._phase }),
52
+ ...(diagnostics.includeState && {
53
+ phase: configuration.stopModules ? "stopping" : "destroying",
54
+ }),
52
55
  ...(diagnostics.includeModules && {
53
56
  modules: this._moduleRegistry
54
57
  .getLoadedModules()
@@ -142,4 +145,3 @@ export class DefaultRuntimeShutdown {
142
145
  logRuntimeEvent(this._logger, this._identity, this._environment, level, message, metadata);
143
146
  }
144
147
  }
145
- //# sourceMappingURL=runtimeShutdown.core.js.map
@@ -75,4 +75,3 @@ export interface ResolvedShutdownOptions {
75
75
  readonly continueOnDestroyError: boolean;
76
76
  readonly timeoutMs: number;
77
77
  }
78
- //# sourceMappingURL=runtimeShutdown.type.d.ts.map
@@ -1,2 +1 @@
1
1
  export {};
2
- //# sourceMappingURL=runtimeShutdown.type.js.map
@@ -5,4 +5,3 @@
5
5
  */
6
6
  export { RuntimeSignalManager } from "./runtimeSignals.js";
7
7
  export type { RuntimeTerminationSignal, RuntimeProcessEvent, RuntimeSignalTarget, RuntimeSignalHandlers, RuntimeSignalManagerOptions, } from "./runtimeSignals.js";
8
- //# sourceMappingURL=index.d.ts.map
@@ -4,4 +4,3 @@
4
4
  * Process signal and exception handling for graceful shutdown.
5
5
  */
6
6
  export { RuntimeSignalManager } from "./runtimeSignals.js";
7
- //# sourceMappingURL=index.js.map
@@ -18,10 +18,15 @@ export type RuntimeProcessEvent = RuntimeTerminationSignal | "uncaughtException"
18
18
  * Minimal `process`-like target. Defaults to the global process; tests
19
19
  * inject an EventEmitter so nothing is registered on the real process
20
20
  * and `exit` can be observed instead of executed.
21
+ *
22
+ * Listeners are typed `(...args: unknown[]) => void`: the previous
23
+ * `never[]` rest made `process` and `EventEmitter` (whose listeners are
24
+ * `(...args: any[]) => void`) fail to type-check against this target
25
+ * under current `@types/node`.
21
26
  */
22
27
  export interface RuntimeSignalTarget {
23
- on(event: string, listener: (...args: never[]) => void): unknown;
24
- off(event: string, listener: (...args: never[]) => void): unknown;
28
+ on(event: string, listener: (...args: unknown[]) => void): unknown;
29
+ off(event: string, listener: (...args: unknown[]) => void): unknown;
25
30
  exit?(code?: number): void;
26
31
  }
27
32
  /**
@@ -101,4 +106,3 @@ export declare class RuntimeSignalManager {
101
106
  private run;
102
107
  }
103
108
  export {};
104
- //# sourceMappingURL=runtimeSignals.d.ts.map
@@ -26,4 +26,3 @@ export interface RuntimeFatalExitPolicy {
26
26
  * `exitOnFatalError` is off.
27
27
  */
28
28
  export declare function runFatalHandler(handler: () => void | Promise<void> | undefined, target: RuntimeSignalTarget | undefined, policy: RuntimeFatalExitPolicy, logger: Logger | undefined, event: string): void;
29
- //# sourceMappingURL=runtimeSignals.fatal.d.ts.map
@@ -48,4 +48,3 @@ export function runFatalHandler(handler, target, policy, logger, event) {
48
48
  })
49
49
  .finally(finish);
50
50
  }
51
- //# sourceMappingURL=runtimeSignals.fatal.js.map
@@ -94,13 +94,13 @@ export class RuntimeSignalManager {
94
94
  this.handleSignal(event);
95
95
  };
96
96
  case "uncaughtException":
97
- return ((error) => {
97
+ return (error) => {
98
98
  this.runFatal(() => this._handlers?.onUncaughtException(error), "uncaughtException");
99
- });
99
+ };
100
100
  case "unhandledRejection":
101
- return ((reason) => {
101
+ return (reason) => {
102
102
  this.runFatal(() => this._handlers?.onUnhandledRejection(reason), "unhandledRejection");
103
- });
103
+ };
104
104
  default:
105
105
  return () => { };
106
106
  }
@@ -157,4 +157,3 @@ function getGlobalProcess() {
157
157
  }
158
158
  return undefined;
159
159
  }
160
- //# sourceMappingURL=runtimeSignals.js.map
@@ -75,4 +75,3 @@ export declare function createRuntimeStateTransition(from: RuntimeState, to: Run
75
75
  export declare function getRuntimeStateLabel(state: RuntimeState): string;
76
76
  export declare function getRuntimeStates(): readonly RuntimeState[];
77
77
  export declare function getNextRuntimeStates(state: RuntimeState): readonly RuntimeState[];
78
- //# sourceMappingURL=runtimeState.state.d.ts.map
@@ -161,4 +161,3 @@ export function getNextRuntimeStates(state) {
161
161
  return Object.freeze([]);
162
162
  }
163
163
  }
164
- //# sourceMappingURL=runtimeState.state.js.map
@@ -37,4 +37,3 @@ export interface RuntimeTimeoutOptions {
37
37
  * rejection.
38
38
  */
39
39
  export declare function withRuntimeTimeout<T>(operation: TimeoutAwareOperation<T>, timeoutMs: number, options?: RuntimeTimeoutOptions): Promise<T>;
40
- //# sourceMappingURL=runtimeTimeout.d.ts.map
@@ -39,4 +39,3 @@ export async function withRuntimeTimeout(operation, timeoutMs, options = {}) {
39
39
  clearTimeout(timer);
40
40
  }
41
41
  }
42
- //# sourceMappingURL=runtimeTimeout.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zudojs/core",
3
- "version": "1.2.3",
3
+ "version": "1.3.0",
4
4
  "description": "Application lifecycle management, execution context propagation, and runtime orchestration for Zudojs applications.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -55,8 +55,8 @@
55
55
  "vitest": "^5.0.1"
56
56
  },
57
57
  "dependencies": {
58
- "@zudojs/errors": "1.3.1",
59
- "@zudojs/constants": "1.1.3"
58
+ "@zudojs/errors": "1.4.0",
59
+ "@zudojs/constants": "1.2.0"
60
60
  },
61
61
  "license": "MIT",
62
62
  "author": {