@zudojs/core 1.2.4 → 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
@@ -1,6 +1,8 @@
1
1
  import { ModuleError, ModuleErrorCode, } from "../moduleError/moduleError.base.js";
2
2
  import { createModuleDependencyGraph, resolveModuleStartupOrder, resolveModuleShutdownOrder, } from "../moduleDependency/index.js";
3
+ import { MissingModuleDependencyError } from "../moduleError/moduleError.dependency.js";
3
4
  import { ModuleLifecycleError } from "./moduleLifecycle.type.js";
5
+ import { ExclusiveOperations } from "./moduleLifecycle.exclusive.js";
4
6
  import { getDefaultContextStorage } from "../../context/provider/defaultContextStorage.storage.js";
5
7
  import { ensureStateSynchronized, getLifecycleState, requireLifecycleState, getAllLifecycleStates, isModuleInitialized, isModuleStarted, isModuleDestroyed, executeLifecyclePhase, } from "./moduleLifecycle.stateMachine.js";
6
8
  /**
@@ -13,7 +15,8 @@ export class ModuleLifecycleManager {
13
15
  options;
14
16
  contextStorage;
15
17
  states = new Map();
16
- operation;
18
+ exclusive = new ExclusiveOperations();
19
+ tornDown = false;
17
20
  constructor(registry, loader, options = {}) {
18
21
  this.registry = registry;
19
22
  this.loader = loader;
@@ -27,6 +30,7 @@ export class ModuleLifecycleManager {
27
30
  }
28
31
  async initialize(options = {}) {
29
32
  return this.runExclusive(async () => {
33
+ this.tornDown = false;
30
34
  ensureStateSynchronized(this.registry, this.states);
31
35
  try {
32
36
  return await executeLifecyclePhase(this.getStartupOrder(), "initialize", "initializing", "initialized", options.continueOnError ?? this.options.continueOnInitializeError, this.registry, this.loader, this.states, this.contextStorage, options.signal);
@@ -35,7 +39,7 @@ export class ModuleLifecycleManager {
35
39
  await this.rollbackAfterFailure(error, { stopFirst: false });
36
40
  throw error;
37
41
  }
38
- });
42
+ }, options.signal);
39
43
  }
40
44
  async start(options = {}) {
41
45
  return this.runExclusive(async () => {
@@ -47,7 +51,7 @@ export class ModuleLifecycleManager {
47
51
  await this.rollbackAfterFailure(error, { stopFirst: true });
48
52
  throw error;
49
53
  }
50
- });
54
+ }, options.signal);
51
55
  }
52
56
  async stop(options = {}) {
53
57
  return this.runExclusive(async () => {
@@ -58,7 +62,12 @@ export class ModuleLifecycleManager {
58
62
  async destroy(options = {}) {
59
63
  return this.runExclusive(async () => {
60
64
  ensureStateSynchronized(this.registry, this.states);
61
- return executeLifecyclePhase(this.getShutdownOrder(), "destroy", "destroying", "destroyed", options.continueOnError ?? this.options.continueOnDestroyError, this.registry, this.loader, this.states, this.contextStorage);
65
+ try {
66
+ return await executeLifecyclePhase(this.getShutdownOrder(), "destroy", "destroying", "destroyed", options.continueOnError ?? this.options.continueOnDestroyError, this.registry, this.loader, this.states, this.contextStorage);
67
+ }
68
+ finally {
69
+ this.tornDown = true;
70
+ }
62
71
  });
63
72
  }
64
73
  /**
@@ -248,27 +257,51 @@ export class ModuleLifecycleManager {
248
257
  }));
249
258
  return createModuleDependencyGraph(nodes);
250
259
  }
260
+ /**
261
+ * Startup order over the loaded modules. A dependency that is
262
+ * registered but not loaded used to be reported as a "missing
263
+ * module", which sent people looking for a typo; it is now described
264
+ * by its registration state.
265
+ */
251
266
  getStartupOrder() {
252
- return resolveModuleStartupOrder(this.createGraph());
267
+ try {
268
+ return resolveModuleStartupOrder(this.createGraph());
269
+ }
270
+ catch (error) {
271
+ if (error instanceof MissingModuleDependencyError &&
272
+ error.moduleId !== undefined &&
273
+ error.dependencyId !== undefined) {
274
+ const registration = this.registry.get(error.dependencyId);
275
+ if (registration !== undefined) {
276
+ throw new MissingModuleDependencyError(error.moduleId, error.dependencyId, { dependencyState: registration.state });
277
+ }
278
+ }
279
+ throw error;
280
+ }
253
281
  }
254
282
  getShutdownOrder() {
255
283
  return resolveModuleShutdownOrder(this.createGraph());
256
284
  }
257
- async runExclusive(operation) {
258
- while (this.operation)
259
- await this.operation;
260
- let resolveOperation;
261
- const lock = new Promise((resolve) => {
262
- resolveOperation = resolve;
285
+ /**
286
+ * Serialises operations. One whose `signal` was aborted (a bootstrap
287
+ * abandoned by the startup timeout) is not waited for, so `stop()`
288
+ * and `destroy()` no longer queue behind a hook that may never
289
+ * settle; a module whose hook does settle later is torn down then.
290
+ */
291
+ runExclusive(operation, signal) {
292
+ return this.exclusive.run(operation, signal, () => {
293
+ this.finalizeLateModules();
263
294
  });
264
- this.operation = lock;
265
- try {
266
- return await operation();
267
- }
268
- finally {
269
- resolveOperation?.();
270
- this.operation = undefined;
271
- }
295
+ }
296
+ /**
297
+ * Best-effort teardown for modules an abandoned startup brought up
298
+ * after the runtime had already been shut down. Failures land on the
299
+ * module's lifecycle state as they would for any stop/destroy.
300
+ */
301
+ finalizeLateModules() {
302
+ if (!this.tornDown)
303
+ return;
304
+ void this.stopApplication().catch(() => undefined);
272
305
  }
273
306
  }
274
307
  /**
@@ -298,4 +331,3 @@ export function resolveRegistrationDependencies(registry, registration) {
298
331
  export function createModuleLifecycleManager(registry, loader, options = {}) {
299
332
  return new ModuleLifecycleManager(registry, loader, options);
300
333
  }
301
- //# sourceMappingURL=moduleLifecycle.lifecycle.js.map
@@ -43,4 +43,3 @@ export declare function executeLifecyclePhase(order: readonly ModuleId[], hook:
43
43
  readonly failed: readonly ModuleId[];
44
44
  readonly skipped: readonly ModuleLifecycleSkip[];
45
45
  }>;
46
- //# sourceMappingURL=moduleLifecycle.stateMachine.d.ts.map
@@ -106,9 +106,11 @@ export function canModuleEnterPhase(moduleId, hook, states) {
106
106
  case "stop":
107
107
  return state.phase === "started";
108
108
  case "destroy":
109
+ // A module still in "created" never had onInitialize invoked, so
110
+ // there is nothing for onDestroy to release. Rollback used to
111
+ // destroy every module that was never reached.
109
112
  return (state.phase === "stopped" ||
110
113
  state.phase === "initialized" ||
111
- state.phase === "created" ||
112
114
  state.phase === "started" ||
113
115
  state.phase === "failed");
114
116
  default:
@@ -136,7 +138,7 @@ const SATISFIED_PHASES = {
136
138
  initialize: ["initialized", "starting", "started"],
137
139
  start: ["started"],
138
140
  stop: ["created", "initialized", "stopped", "destroying", "destroyed"],
139
- destroy: ["destroyed"],
141
+ destroy: ["created", "destroyed"],
140
142
  };
141
143
  /**
142
144
  * Phases a required dependency must be in before a dependent
@@ -226,4 +228,3 @@ export async function executeLifecyclePhase(order, hook, activePhase, completedP
226
228
  skipped: Object.freeze([...skipped]),
227
229
  };
228
230
  }
229
- //# sourceMappingURL=moduleLifecycle.stateMachine.js.map
@@ -148,4 +148,3 @@ export interface ModuleLifecycleResult {
148
148
  * Internal lifecycle state map.
149
149
  */
150
150
  export type LifecycleStateMap = Map<ModuleId, ModuleLifecycleState>;
151
- //# sourceMappingURL=moduleLifecycle.type.d.ts.map
@@ -19,4 +19,3 @@ export class ModuleLifecycleError extends ModuleOperationError {
19
19
  this.name = "ModuleLifecycleError";
20
20
  }
21
21
  }
22
- //# sourceMappingURL=moduleLifecycle.type.js.map
@@ -6,4 +6,3 @@
6
6
  */
7
7
  export { type ModuleLoaderOptions, type ModuleLoadResult, ModuleLoadError, } from "./moduleLoader.type.js";
8
8
  export { ModuleLoader, createModuleLoader } from "./moduleLoader.loader.js";
9
- //# sourceMappingURL=index.d.ts.map
@@ -6,4 +6,3 @@
6
6
  */
7
7
  export { ModuleLoadError, } from "./moduleLoader.type.js";
8
8
  export { ModuleLoader, createModuleLoader } from "./moduleLoader.loader.js";
9
- //# sourceMappingURL=index.js.map
@@ -67,4 +67,3 @@ export declare class ModuleLoader {
67
67
  }
68
68
  /** Creates a module loader. */
69
69
  export declare function createModuleLoader(registry: ModuleRegistry, options: ModuleLoaderOptions): ModuleLoader;
70
- //# sourceMappingURL=moduleLoader.loader.d.ts.map
@@ -270,4 +270,3 @@ export class ModuleLoader {
270
270
  export function createModuleLoader(registry, options) {
271
271
  return new ModuleLoader(registry, options);
272
272
  }
273
- //# sourceMappingURL=moduleLoader.loader.js.map
@@ -56,4 +56,3 @@ import { ModuleError } from "../moduleError/moduleError.base.js";
56
56
  export declare class ModuleLoadError extends ModuleError {
57
57
  constructor(moduleId: ModuleId, cause: unknown);
58
58
  }
59
- //# sourceMappingURL=moduleLoader.type.d.ts.map
@@ -15,4 +15,3 @@ export class ModuleLoadError extends ModuleError {
15
15
  this.name = "ModuleLoadError";
16
16
  }
17
17
  }
18
- //# sourceMappingURL=moduleLoader.type.js.map
@@ -33,4 +33,3 @@ export declare function isModuleDeprecated(metadata: ModuleMetadata | undefined)
33
33
  export declare function isModuleExperimental(metadata: ModuleMetadata | undefined): boolean;
34
34
  /** Creates a compact metadata object suitable for diagnostics. */
35
35
  export declare function getModuleMetadataSummary(metadata?: ModuleMetadata): Readonly<Record<string, unknown>>;
36
- //# sourceMappingURL=moduleMetadata.metadata.d.ts.map
@@ -112,4 +112,3 @@ export function getModuleMetadataSummary(metadata) {
112
112
  replacement: metadata.replacement,
113
113
  });
114
114
  }
115
- //# sourceMappingURL=moduleMetadata.metadata.js.map
@@ -5,4 +5,3 @@
5
5
  */
6
6
  export { type ModuleRegistrationState, type ModuleRegistration, type ModuleRegistryOptions, type ModuleRegisterOptions, type ModuleRegistryEventType, type ModuleRegistryEvent, type ModuleRegistryListener, type ModuleRegistry, } from "./moduleRegistry.type.js";
7
7
  export { DefaultModuleRegistry, createModuleRegistry, isModuleRegistration, } from "./moduleRegistry.registry.js";
8
- //# sourceMappingURL=index.d.ts.map
@@ -5,4 +5,3 @@
5
5
  */
6
6
  export {} from "./moduleRegistry.type.js";
7
7
  export { DefaultModuleRegistry, createModuleRegistry, isModuleRegistration, } from "./moduleRegistry.registry.js";
8
- //# sourceMappingURL=index.js.map
@@ -32,4 +32,3 @@ export declare class DefaultModuleRegistry implements ModuleRegistry {
32
32
  export declare function createModuleRegistry(options?: ModuleRegistryOptions): ModuleRegistry;
33
33
  /** Type guard for module registrations. */
34
34
  export declare function isModuleRegistration(value: unknown): value is ModuleRegistration;
35
- //# sourceMappingURL=moduleRegistry.registry.d.ts.map
@@ -184,4 +184,3 @@ export function isModuleRegistration(value) {
184
184
  typeof registration.state === "string" &&
185
185
  registration.registeredAt instanceof Date);
186
186
  }
187
- //# sourceMappingURL=moduleRegistry.registry.js.map
@@ -148,4 +148,3 @@ export interface ModuleRegistry {
148
148
  */
149
149
  clear(): void;
150
150
  }
151
- //# sourceMappingURL=moduleRegistry.type.d.ts.map
@@ -1,2 +1 @@
1
1
  export {};
2
- //# sourceMappingURL=moduleRegistry.type.js.map
@@ -4,7 +4,7 @@
4
4
  * Public API for the core runtime subsystem.
5
5
  */
6
6
  export { DefaultRuntime, createRuntime } from "./runtime.js";
7
- export type { RuntimeLifecycleState, RuntimeDependencies, RuntimeStatus, Runtime, } from "./runtime.js";
7
+ export type { RuntimeLifecycleState, RuntimeDependencies, RuntimeStateListener, RuntimeStatus, Runtime, } from "./runtime.js";
8
8
  export { DEFAULT_RUNTIME_OPTIONS, resolveRuntimeOptions, validateRuntimeOptions, isRuntimeMode, isRuntimeRole, assertRuntimeMode, assertRuntimeRole, } from "./runtimeOptions/index.js";
9
9
  export type { RuntimeMode, RuntimeRole, RuntimeOptions, RuntimeStartupOptions, RuntimeShutdownOptions, RuntimeSignalOptions, RuntimeDiagnosticsOptions, RuntimeEnvironmentOverrides, ResolvedRuntimeOptions, } from "./runtimeOptions/index.js";
10
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";
@@ -23,4 +23,3 @@ export { withRuntimeTimeout } from "./runtimeTimeout.js";
23
23
  export type { TimeoutAwareOperation, RuntimeTimeoutOptions, } from "./runtimeTimeout.js";
24
24
  export { RuntimeError, RuntimeErrorCode, InvalidRuntimeStateError, InvalidRuntimeTransitionError, RuntimeStartError, RuntimeStopError, RuntimeInitializationError, RuntimeLoadError, RuntimeTimeoutError, RuntimeDependencyError, RuntimeNotReadyError, RuntimeUnsupportedOperationError, RuntimeCancellationError, toRuntimeError, isRuntimeError, hasRuntimeErrorCode, createRuntimeError, } from "./runtimeError/index.js";
25
25
  export type { RuntimeOperation, RuntimeErrorPhase, RuntimeErrorMetadata, RuntimeErrorOptions, RuntimeErrorJSON, } from "./runtimeError/index.js";
26
- //# sourceMappingURL=index.d.ts.map
@@ -43,4 +43,3 @@ export { withRuntimeTimeout } from "./runtimeTimeout.js";
43
43
  * Runtime errors
44
44
  */
45
45
  export { RuntimeError, RuntimeErrorCode, InvalidRuntimeStateError, InvalidRuntimeTransitionError, RuntimeStartError, RuntimeStopError, RuntimeInitializationError, RuntimeLoadError, RuntimeTimeoutError, RuntimeDependencyError, RuntimeNotReadyError, RuntimeUnsupportedOperationError, RuntimeCancellationError, toRuntimeError, isRuntimeError, hasRuntimeErrorCode, createRuntimeError, } from "./runtimeError/index.js";
46
- //# sourceMappingURL=index.js.map
@@ -8,7 +8,7 @@ import type { ModuleRegistry } from "../modules/moduleRegistry/index.js";
8
8
  import type { Disposable } from "../contracts/disposable.js";
9
9
  import type { ContextStorage } from "../context/provider/contextStorage.storage.js";
10
10
  import { RuntimeState } from "./runtimeState.state.js";
11
- import type { RuntimeStateSnapshot, RuntimeTiming } from "./runtimeState.state.js";
11
+ import type { RuntimeStateSnapshot, RuntimeStateTransition, RuntimeTiming } from "./runtimeState.state.js";
12
12
  import type { RuntimeExecutionContext, RuntimeIdentity } from "./runtimeContext/index.js";
13
13
  import type { RuntimeEnvironment } from "./runtimeEnvironment/index.js";
14
14
  import type { RuntimeOptions, ResolvedRuntimeOptions } from "./runtimeOptions/index.js";
@@ -20,6 +20,11 @@ import type { RuntimeSignalTarget } from "./runtimeSignals/runtimeSignals.js";
20
20
  * RuntimeState enum).
21
21
  */
22
22
  export type RuntimeLifecycleState = `${RuntimeState}`;
23
+ /**
24
+ * Receives every runtime state transition, synchronously, after the
25
+ * state has changed.
26
+ */
27
+ export type RuntimeStateListener = (transition: RuntimeStateTransition) => void;
23
28
  /**
24
29
  * Dependencies required by the runtime.
25
30
  *
@@ -106,6 +111,16 @@ export interface Runtime extends Disposable {
106
111
  getModuleLifecycle(): ModuleLifecycleManager;
107
112
  getModule(moduleId: string): Module | undefined;
108
113
  requireModule(moduleId: string): Module;
114
+ /**
115
+ * Subscribes to state transitions; returns the unsubscribe function.
116
+ *
117
+ * The Application uses this to follow a stop the runtime started on
118
+ * its own (a SIGTERM, a fatal error), so its own state and its
119
+ * lifecycle participants do not stay `running` behind a stopped
120
+ * runtime. Optional on the contract so hand-written runtimes keep
121
+ * compiling; without it the Application cannot follow such stops.
122
+ */
123
+ onStateChange?(listener: RuntimeStateListener): () => void;
109
124
  }
110
125
  /**
111
126
  * Default runtime implementation.
@@ -136,6 +151,7 @@ export declare class DefaultRuntime implements Runtime {
136
151
  private _stopPromise;
137
152
  private _unwound;
138
153
  private _unwindPromise;
154
+ private readonly _stateListeners;
139
155
  constructor(dependencies: RuntimeDependencies, options?: RuntimeOptions);
140
156
  get state(): RuntimeState;
141
157
  get context(): RuntimeExecutionContext;
@@ -148,6 +164,7 @@ export declare class DefaultRuntime implements Runtime {
148
164
  get stopped(): boolean;
149
165
  get failed(): boolean;
150
166
  get signalHandlersRegistered(): boolean;
167
+ onStateChange(listener: RuntimeStateListener): () => void;
151
168
  start(): Promise<void>;
152
169
  stop(): Promise<void>;
153
170
  fail(error?: unknown): void;
@@ -190,4 +207,3 @@ export declare class DefaultRuntime implements Runtime {
190
207
  * Creates a runtime.
191
208
  */
192
209
  export declare function createRuntime(dependencies: RuntimeDependencies, options?: RuntimeOptions): Runtime;
193
- //# sourceMappingURL=runtime.d.ts.map
@@ -38,6 +38,7 @@ export class DefaultRuntime {
38
38
  _stopPromise;
39
39
  _unwound = false;
40
40
  _unwindPromise;
41
+ _stateListeners = new Set();
41
42
  constructor(dependencies, options = {}) {
42
43
  this._options = resolveRuntimeOptions(options);
43
44
  this._application = dependencies.application;
@@ -122,6 +123,12 @@ export class DefaultRuntime {
122
123
  get signalHandlersRegistered() {
123
124
  return this._signals.registered;
124
125
  }
126
+ onStateChange(listener) {
127
+ this._stateListeners.add(listener);
128
+ return () => {
129
+ this._stateListeners.delete(listener);
130
+ };
131
+ }
125
132
  async start() {
126
133
  if (this._state === RuntimeState.READY)
127
134
  return;
@@ -319,6 +326,22 @@ export class DefaultRuntime {
319
326
  catch {
320
327
  /* Logging must never prevent a lifecycle transition. */
321
328
  }
329
+ if (this._stateListeners.size === 0)
330
+ return;
331
+ const transition = Object.freeze({
332
+ from: current,
333
+ to: next,
334
+ timestamp: new Date(),
335
+ reason,
336
+ });
337
+ for (const listener of this._stateListeners) {
338
+ try {
339
+ listener(transition);
340
+ }
341
+ catch {
342
+ /* A listener must never prevent a lifecycle transition. */
343
+ }
344
+ }
322
345
  }
323
346
  recordTimingForState(state) {
324
347
  const now = new Date();
@@ -417,4 +440,3 @@ export class DefaultRuntime {
417
440
  export function createRuntime(dependencies, options = {}) {
418
441
  return new DefaultRuntime(dependencies, options);
419
442
  }
420
- //# sourceMappingURL=runtime.js.map
@@ -8,4 +8,3 @@ export { DefaultRuntimeBootstrap } from "./runtimeBootstrap.core.js";
8
8
  export { executeBootstrapPipeline, createBootstrapPipelineState, createBootstrapResult, } from "./pipeline/index.js";
9
9
  export type { BootstrapCounters, BootstrapPipelineServices, BootstrapPipelineState, } from "./pipeline/index.js";
10
10
  export type { RuntimeBootstrapDependencies, RuntimeBootstrapOptions, RuntimeBootstrapPhase, RuntimeBootstrapErrorInfo, RuntimeBootstrapResult, RuntimeBootstrap, ResolvedBootstrapOptions, } from "./runtimeBootstrap.type.js";
11
- //# sourceMappingURL=index.d.ts.map
@@ -6,4 +6,3 @@
6
6
  */
7
7
  export { DefaultRuntimeBootstrap } from "./runtimeBootstrap.core.js";
8
8
  export { executeBootstrapPipeline, createBootstrapPipelineState, createBootstrapResult, } from "./pipeline/index.js";
9
- //# sourceMappingURL=index.js.map
@@ -5,4 +5,3 @@
5
5
  */
6
6
  export { executeBootstrapPipeline, createBootstrapPipelineState, createBootstrapResult, } from "./runtimeBootstrap.pipeline.js";
7
7
  export type { BootstrapCounters, BootstrapLogFn, BootstrapPipelineServices, BootstrapPipelineState, } from "./runtimeBootstrap.pipeline.js";
8
- //# sourceMappingURL=index.d.ts.map
@@ -4,4 +4,3 @@
4
4
  * Module loading, initialization, and startup stages.
5
5
  */
6
6
  export { executeBootstrapPipeline, createBootstrapPipelineState, createBootstrapResult, } from "./runtimeBootstrap.pipeline.js";
7
- //# sourceMappingURL=index.js.map
@@ -44,4 +44,3 @@ export declare function createBootstrapPipelineState(): BootstrapPipelineState;
44
44
  */
45
45
  export declare function executeBootstrapPipeline(options: ResolvedBootstrapOptions, services: BootstrapPipelineServices, state: BootstrapPipelineState, signal: AbortSignal, setPhase: (phase: RuntimeBootstrapPhase) => void, log: BootstrapLogFn): Promise<void>;
46
46
  export declare function createBootstrapResult(success: boolean, phase: RuntimeBootstrapPhase, counters: BootstrapCounters, errors: readonly RuntimeBootstrapErrorInfo[], startedAt: Date, completedAt: Date): RuntimeBootstrapResult;
47
- //# sourceMappingURL=runtimeBootstrap.pipeline.d.ts.map
@@ -150,4 +150,3 @@ export function createBootstrapResult(success, phase, counters, errors, startedA
150
150
  durationMs: completedAt.getTime() - startedAt.getTime(),
151
151
  });
152
152
  }
153
- //# sourceMappingURL=runtimeBootstrap.pipeline.js.map
@@ -25,4 +25,3 @@ export declare class DefaultRuntimeBootstrap implements RuntimeBootstrap {
25
25
  private errorContext;
26
26
  private log;
27
27
  }
28
- //# sourceMappingURL=runtimeBootstrap.core.d.ts.map
@@ -49,8 +49,15 @@ export class DefaultRuntimeBootstrap {
49
49
  const diagnostics = this._runtimeOptions.diagnostics;
50
50
  try {
51
51
  if (diagnostics.startupLogging) {
52
+ // The phase about to run, not the pipeline's resting "created".
52
53
  this.log("info", "Runtime bootstrap started.", {
53
- ...(diagnostics.includeState && { phase: this._phase }),
54
+ ...(diagnostics.includeState && {
55
+ phase: configuration.loadModules
56
+ ? "loading"
57
+ : configuration.initializeModules
58
+ ? "initializing"
59
+ : "starting",
60
+ }),
54
61
  });
55
62
  }
56
63
  await withRuntimeTimeout((signal) => executeBootstrapPipeline(configuration, {
@@ -147,4 +154,3 @@ export class DefaultRuntimeBootstrap {
147
154
  logRuntimeEvent(this._logger, this._identity, this._environment, level, message, metadata);
148
155
  }
149
156
  }
150
- //# sourceMappingURL=runtimeBootstrap.core.js.map
@@ -81,4 +81,3 @@ export interface ResolvedBootstrapOptions {
81
81
  readonly continueOnStartError: boolean;
82
82
  readonly timeoutMs: number;
83
83
  }
84
- //# sourceMappingURL=runtimeBootstrap.type.d.ts.map
@@ -1,2 +1 @@
1
1
  export {};
2
- //# sourceMappingURL=runtimeBootstrap.type.js.map
@@ -5,4 +5,3 @@
5
5
  */
6
6
  export { createRuntimeId, createRuntimeIdentity, createRuntimeExecutionContext, createRuntimeContext, } from "./runtimeContext.factory.js";
7
7
  export type { RuntimeIdentity, RuntimeExecutionMetadata, RuntimeExecutionContext, RuntimeContext, } from "./runtimeContext.type.js";
8
- //# sourceMappingURL=index.d.ts.map
@@ -4,4 +4,3 @@
4
4
  * The runtime's identity and its immutable ExecutionContext.
5
5
  */
6
6
  export { createRuntimeId, createRuntimeIdentity, createRuntimeExecutionContext, createRuntimeContext, } from "./runtimeContext.factory.js";
7
- //# sourceMappingURL=index.js.map
@@ -25,4 +25,3 @@ export declare function createRuntimeExecutionContext(identity: RuntimeIdentity,
25
25
  * @deprecated Use createRuntimeExecutionContext.
26
26
  */
27
27
  export declare const createRuntimeContext: typeof createRuntimeExecutionContext;
28
- //# sourceMappingURL=runtimeContext.factory.d.ts.map
@@ -63,4 +63,3 @@ function getProcessId() {
63
63
  const runtimeProcess = globalThis.process;
64
64
  return runtimeProcess?.pid;
65
65
  }
66
- //# sourceMappingURL=runtimeContext.factory.js.map
@@ -54,4 +54,3 @@ export interface RuntimeExecutionContext extends ExecutionContext {
54
54
  * reached through the Runtime accessors.
55
55
  */
56
56
  export type RuntimeContext = RuntimeExecutionContext;
57
- //# sourceMappingURL=runtimeContext.type.d.ts.map
@@ -1,2 +1 @@
1
1
  export {};
2
- //# sourceMappingURL=runtimeContext.type.js.map
@@ -6,4 +6,3 @@
6
6
  export { detectRuntimeEngine, detectPlatform, detectProcessInfo, detectHostInfo, readProcessEnvironment, getProcessObject, } from "./runtimeEnvironment.detection.js";
7
7
  export { getNodeOsObject, safeCall } from "./runtimeEnvironment.os.js";
8
8
  export { detectCI, detectContainer } from "./runtimeEnvironment.env.js";
9
- //# sourceMappingURL=index.d.ts.map
@@ -6,4 +6,3 @@
6
6
  export { detectRuntimeEngine, detectPlatform, detectProcessInfo, detectHostInfo, readProcessEnvironment, getProcessObject, } from "./runtimeEnvironment.detection.js";
7
7
  export { getNodeOsObject, safeCall } from "./runtimeEnvironment.os.js";
8
8
  export { detectCI, detectContainer } from "./runtimeEnvironment.env.js";
9
- //# sourceMappingURL=index.js.map
@@ -5,4 +5,3 @@ export declare function detectProcessInfo(): RuntimeProcessInfo;
5
5
  export declare function detectHostInfo(platform: RuntimePlatform): RuntimeHostInfo;
6
6
  export declare function readProcessEnvironment(): RuntimeEnvironmentVariables;
7
7
  export declare function getProcessObject(): RuntimeProcess | undefined;
8
- //# sourceMappingURL=runtimeEnvironment.detection.d.ts.map
@@ -89,4 +89,3 @@ export function readProcessEnvironment() {
89
89
  export function getProcessObject() {
90
90
  return globalThis.process;
91
91
  }
92
- //# sourceMappingURL=runtimeEnvironment.detection.js.map
@@ -6,4 +6,3 @@ export declare function detectCI(variables: RuntimeEnvironmentVariables): boolea
6
6
  * results.
7
7
  */
8
8
  export declare function detectContainer(variables: RuntimeEnvironmentVariables): boolean;
9
- //# sourceMappingURL=runtimeEnvironment.env.d.ts.map
@@ -50,4 +50,3 @@ function isTruthyEnvironmentValue(value) {
50
50
  value === "yes" ||
51
51
  value === "YES");
52
52
  }
53
- //# sourceMappingURL=runtimeEnvironment.env.js.map
@@ -5,4 +5,3 @@ import type { RuntimeOS } from "../runtimeEnvironment.type.js";
5
5
  */
6
6
  export declare function getNodeOsObject(): RuntimeOS | undefined;
7
7
  export declare function safeCall<T>(fn: (() => T) | undefined): T | undefined;
8
- //# sourceMappingURL=runtimeEnvironment.os.d.ts.map
@@ -21,4 +21,3 @@ export function safeCall(fn) {
21
21
  return undefined;
22
22
  }
23
23
  }
24
- //# sourceMappingURL=runtimeEnvironment.os.js.map
@@ -7,4 +7,3 @@
7
7
  export { DefaultRuntimeEnvironment, MissingEnvironmentVariableError, createRuntimeEnvironment, } from "./runtimeEnvironment.core.js";
8
8
  export { detectRuntimeEngine, detectPlatform, detectProcessInfo, detectHostInfo, getNodeOsObject, safeCall, detectCI, detectContainer, } from "./detection/index.js";
9
9
  export type { RuntimePlatform, RuntimeEngine, RuntimeEnvironmentVariables, RuntimeProcessInfo, RuntimeHostInfo, RuntimeEngineInfo, RuntimeEnvironmentInfo, RuntimeEnvironmentSummary, RuntimeEnvironment, RuntimeEnvironmentOptions, } from "./runtimeEnvironment.type.js";
10
- //# sourceMappingURL=index.d.ts.map
@@ -6,4 +6,3 @@
6
6
  */
7
7
  export { DefaultRuntimeEnvironment, MissingEnvironmentVariableError, createRuntimeEnvironment, } from "./runtimeEnvironment.core.js";
8
8
  export { detectRuntimeEngine, detectPlatform, detectProcessInfo, detectHostInfo, getNodeOsObject, safeCall, detectCI, detectContainer, } from "./detection/index.js";
9
- //# sourceMappingURL=index.js.map
@@ -41,4 +41,3 @@ export declare class DefaultRuntimeEnvironment implements RuntimeEnvironment {
41
41
  */
42
42
  toJSON(): RuntimeEnvironmentSummary;
43
43
  }
44
- //# sourceMappingURL=runtimeEnvironment.core.d.ts.map
@@ -109,4 +109,3 @@ export class DefaultRuntimeEnvironment {
109
109
  });
110
110
  }
111
111
  }
112
- //# sourceMappingURL=runtimeEnvironment.core.js.map
@@ -116,4 +116,3 @@ export interface RuntimeOS {
116
116
  readonly hostname?: () => string;
117
117
  readonly cpus?: () => readonly unknown[];
118
118
  }
119
- //# sourceMappingURL=runtimeEnvironment.type.d.ts.map
@@ -1,2 +1 @@
1
1
  export {};
2
- //# sourceMappingURL=runtimeEnvironment.type.js.map
@@ -26,4 +26,3 @@ export declare function hasRuntimeErrorCode(error: unknown, code: RuntimeErrorCo
26
26
  * Creates a runtime error with contextual information.
27
27
  */
28
28
  export declare function createRuntimeError(message: string, options?: RuntimeErrorOptions): RuntimeErrorType;
29
- //# sourceMappingURL=index.d.ts.map
@@ -44,4 +44,3 @@ export function hasRuntimeErrorCode(error, code) {
44
44
  export function createRuntimeError(message, options = {}) {
45
45
  return new RuntimeError(message, options);
46
46
  }
47
- //# sourceMappingURL=index.js.map
@@ -24,4 +24,3 @@ export declare class RuntimeError extends BaseRuntimeError {
24
24
  getCause(): Error | undefined;
25
25
  toJSON(): RuntimeErrorJSON;
26
26
  }
27
- //# sourceMappingURL=runtimeError.base.d.ts.map
@@ -80,4 +80,3 @@ function serializableMetadata(metadata) {
80
80
  }
81
81
  return result;
82
82
  }
83
- //# sourceMappingURL=runtimeError.base.js.map
@@ -47,4 +47,3 @@ export declare class RuntimeInitializationError extends RuntimeError {
47
47
  export declare class RuntimeLoadError extends RuntimeError {
48
48
  constructor(message: string, options?: Omit<RuntimeErrorOptions, "operation">);
49
49
  }
50
- //# sourceMappingURL=runtimeError.lifecycle.d.ts.map