@zudojs/core 0.0.1 → 1.0.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.
- package/LICENSE +21 -0
- package/README.md +141 -7
- package/dist/application/application.d.ts +43 -2
- package/dist/application/application.js +111 -13
- package/dist/application/applicationContext.context.d.ts +15 -0
- package/dist/application/applicationContext.context.js +12 -0
- package/dist/application/createApplication.d.ts +78 -0
- package/dist/application/createApplication.js +104 -0
- package/dist/application/index.d.ts +2 -1
- package/dist/application/index.js +2 -1
- package/dist/configuration/configurationManager.manager.d.ts +32 -0
- package/dist/configuration/configurationManager.manager.js +86 -7
- package/dist/configuration/core/configuration.d.ts +60 -15
- package/dist/configuration/core/configuration.js +248 -51
- package/dist/configuration/core/configurationKey.key.d.ts +4 -2
- package/dist/configuration/core/configurationKey.key.js +2 -13
- package/dist/configuration/core/configurationPath.path.d.ts +17 -0
- package/dist/configuration/core/configurationPath.path.js +33 -0
- package/dist/configuration/core/index.d.ts +7 -1
- package/dist/configuration/core/index.js +1 -0
- package/dist/configuration/error/configurationError.error.d.ts +11 -0
- package/dist/configuration/error/configurationError.error.js +29 -1
- package/dist/configuration/error/configurationRedactor.redactor.d.ts +16 -0
- package/dist/configuration/error/configurationRedactor.redactor.js +83 -5
- package/dist/configuration/error/index.d.ts +2 -1
- package/dist/configuration/error/index.js +2 -1
- package/dist/configuration/index.d.ts +1 -1
- package/dist/configuration/loader/configurationLoader.loader.d.ts +47 -9
- package/dist/configuration/loader/configurationLoader.loader.js +107 -26
- package/dist/configuration/loader/index.d.ts +1 -1
- package/dist/configuration/loader/index.js +1 -1
- package/dist/configuration/registry/configurationProvider.provider.d.ts +26 -1
- package/dist/configuration/registry/configurationProvider.provider.js +33 -7
- package/dist/configuration/registry/configurationRegistry.registry.js +2 -1
- package/dist/configuration/schema/configurationSchema.schema.d.ts +0 -4
- package/dist/configuration/schema/configurationSchema.schema.js +11 -32
- package/dist/configuration/schema/configurationValidation.validator.d.ts +14 -2
- package/dist/configuration/schema/configurationValidation.validator.js +55 -7
- package/dist/configuration/schema/index.d.ts +1 -1
- package/dist/configuration/schema/index.js +1 -1
- package/dist/container/container.d.ts +52 -5
- package/dist/container/container.js +110 -33
- package/dist/container/index.d.ts +1 -1
- package/dist/container/index.js +1 -1
- package/dist/container/scope.d.ts +7 -6
- package/dist/context/core/contextAliases.deprecated.d.ts +32 -0
- package/dist/context/core/contextAliases.deprecated.js +6 -0
- package/dist/context/core/executionContext.context.d.ts +8 -0
- package/dist/context/core/executionContext.context.js +38 -15
- package/dist/context/core/index.d.ts +2 -2
- package/dist/context/core/index.js +2 -2
- package/dist/context/index.d.ts +20 -0
- package/dist/context/index.js +20 -0
- package/dist/context/provider/contextProvider.provider.d.ts +7 -4
- package/dist/context/provider/contextProvider.provider.js +9 -6
- package/dist/context/provider/contextStorage.storage.d.ts +47 -7
- package/dist/context/provider/contextStorage.storage.js +54 -12
- package/dist/context/provider/defaultContextStorage.storage.d.ts +18 -0
- package/dist/context/provider/defaultContextStorage.storage.js +20 -0
- package/dist/context/provider/index.d.ts +2 -1
- package/dist/context/provider/index.js +1 -0
- package/dist/errors/exceptions.d.ts +22 -0
- package/dist/errors/exceptions.js +38 -1
- package/dist/errors/frameworkError.error.d.ts +6 -9
- package/dist/errors/index.d.ts +1 -1
- package/dist/errors/index.js +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +14 -0
- package/dist/lifecycle/core/index.d.ts +1 -1
- package/dist/lifecycle/core/index.js +1 -1
- package/dist/lifecycle/core/lifecycle.d.ts +47 -2
- package/dist/lifecycle/core/lifecycle.js +251 -85
- package/dist/lifecycle/core/lifecycleRegistry.registry.d.ts +8 -0
- package/dist/lifecycle/core/lifecycleRegistry.registry.js +20 -1
- package/dist/lifecycle/manager/lifecycleManager.manager.d.ts +21 -2
- package/dist/lifecycle/manager/lifecycleManager.manager.js +62 -99
- package/dist/lifecycle/scope/lifecycleScope.scope.d.ts +22 -1
- package/dist/lifecycle/scope/lifecycleScope.scope.js +85 -17
- package/dist/logging/console/consoleLogger.logger.d.ts +20 -1
- package/dist/logging/console/consoleLogger.logger.js +77 -11
- package/dist/logging/console/loggerFactory.factory.d.ts +6 -5
- package/dist/logging/console/loggerFactory.factory.js +1 -7
- package/dist/logging/core/index.d.ts +4 -3
- package/dist/logging/core/index.js +4 -3
- package/dist/logging/core/logEntry.entry.d.ts +41 -3
- package/dist/logging/core/logEntry.entry.js +114 -4
- package/dist/logging/core/logLevel.level.d.ts +18 -0
- package/dist/logging/core/logLevel.level.js +25 -1
- package/dist/logging/core/logRedaction.redaction.d.ts +38 -0
- package/dist/logging/core/logRedaction.redaction.js +19 -0
- package/dist/logging/core/logger.d.ts +14 -11
- package/dist/logging/core/logger.js +31 -6
- package/dist/logging/core/loggerContext.context.d.ts +12 -0
- package/dist/logging/core/loggerContext.context.js +19 -0
- package/dist/logging/core/loggerOptions.options.d.ts +17 -0
- package/dist/modules/index.d.ts +0 -1
- package/dist/modules/index.js +0 -6
- package/dist/modules/module.d.ts +7 -1
- package/dist/modules/moduleContext.context.d.ts +41 -7
- package/dist/modules/moduleContext.context.js +31 -8
- package/dist/modules/moduleDefinition.definition.d.ts +11 -7
- package/dist/modules/moduleDefinition.definition.js +41 -8
- package/dist/modules/moduleDependency/index.d.ts +2 -2
- package/dist/modules/moduleDependency/index.js +1 -1
- package/dist/modules/moduleDependency/moduleDependency.graph.d.ts +19 -2
- package/dist/modules/moduleDependency/moduleDependency.graph.js +122 -8
- package/dist/modules/moduleDependency/moduleDependency.ordering.d.ts +8 -0
- package/dist/modules/moduleDependency/moduleDependency.ordering.js +85 -57
- package/dist/modules/moduleDependency/moduleDependency.type.d.ts +28 -1
- package/dist/modules/moduleError/index.d.ts +1 -1
- package/dist/modules/moduleError/index.js +1 -1
- package/dist/modules/moduleError/moduleError.dependency.d.ts +11 -0
- package/dist/modules/moduleError/moduleError.dependency.js +15 -0
- package/dist/modules/moduleLifecycle/index.d.ts +5 -2
- package/dist/modules/moduleLifecycle/index.js +4 -1
- package/dist/modules/moduleLifecycle/moduleLifecycle.lifecycle.d.ts +44 -6
- package/dist/modules/moduleLifecycle/moduleLifecycle.lifecycle.js +153 -9
- package/dist/modules/moduleLifecycle/moduleLifecycle.stateMachine.d.ts +30 -5
- package/dist/modules/moduleLifecycle/moduleLifecycle.stateMachine.js +130 -10
- package/dist/modules/moduleLifecycle/moduleLifecycle.type.d.ts +65 -28
- package/dist/modules/moduleLifecycle/moduleLifecycle.type.js +15 -4
- package/dist/modules/moduleLoader/moduleLoader.loader.d.ts +39 -5
- package/dist/modules/moduleLoader/moduleLoader.loader.js +123 -50
- package/dist/modules/moduleLoader/moduleLoader.type.d.ts +4 -2
- package/dist/modules/moduleLoader/moduleLoader.type.js +10 -3
- package/dist/modules/moduleMetadata.metadata.js +15 -5
- package/dist/modules/moduleRegistry/index.d.ts +1 -1
- package/dist/modules/moduleRegistry/moduleRegistry.registry.d.ts +2 -2
- package/dist/modules/moduleRegistry/moduleRegistry.registry.js +38 -6
- package/dist/modules/moduleRegistry/moduleRegistry.type.d.ts +18 -1
- package/dist/runtime/index.d.ts +17 -15
- package/dist/runtime/index.js +14 -10
- package/dist/runtime/runtime.d.ts +135 -33
- package/dist/runtime/runtime.js +344 -114
- package/dist/runtime/runtimeBootstrap/index.d.ts +2 -1
- package/dist/runtime/runtimeBootstrap/index.js +1 -1
- package/dist/runtime/runtimeBootstrap/pipeline/index.d.ts +2 -2
- package/dist/runtime/runtimeBootstrap/pipeline/index.js +1 -2
- package/dist/runtime/runtimeBootstrap/pipeline/runtimeBootstrap.pipeline.d.ts +41 -15
- package/dist/runtime/runtimeBootstrap/pipeline/runtimeBootstrap.pipeline.js +98 -76
- package/dist/runtime/runtimeBootstrap/runtimeBootstrap.core.d.ts +7 -4
- package/dist/runtime/runtimeBootstrap/runtimeBootstrap.core.js +87 -59
- package/dist/runtime/runtimeBootstrap/runtimeBootstrap.type.d.ts +10 -4
- package/dist/runtime/runtimeContext/index.d.ts +3 -5
- package/dist/runtime/runtimeContext/index.js +2 -4
- package/dist/runtime/runtimeContext/runtimeContext.factory.d.ts +10 -4
- package/dist/runtime/runtimeContext/runtimeContext.factory.js +30 -7
- package/dist/runtime/runtimeContext/runtimeContext.type.d.ts +36 -47
- package/dist/runtime/runtimeEnvironment/detection/runtimeEnvironment.env.d.ts +5 -0
- package/dist/runtime/runtimeEnvironment/detection/runtimeEnvironment.env.js +6 -4
- package/dist/runtime/runtimeEnvironment/detection/runtimeEnvironment.os.d.ts +4 -0
- package/dist/runtime/runtimeEnvironment/detection/runtimeEnvironment.os.js +7 -9
- package/dist/runtime/runtimeEnvironment/index.d.ts +2 -2
- package/dist/runtime/runtimeEnvironment/index.js +1 -1
- package/dist/runtime/runtimeEnvironment/runtimeEnvironment.core.d.ts +20 -17
- package/dist/runtime/runtimeEnvironment/runtimeEnvironment.core.js +20 -13
- package/dist/runtime/runtimeEnvironment/runtimeEnvironment.type.d.ts +12 -1
- package/dist/runtime/runtimeError/index.d.ts +3 -3
- package/dist/runtime/runtimeError/index.js +1 -1
- package/dist/runtime/runtimeError/runtimeError.base.d.ts +15 -18
- package/dist/runtime/runtimeError/runtimeError.base.js +38 -36
- package/dist/runtime/runtimeError/runtimeError.lifecycle.d.ts +23 -8
- package/dist/runtime/runtimeError/runtimeError.lifecycle.js +31 -7
- package/dist/runtime/runtimeError/runtimeError.specialized.d.ts +1 -1
- package/dist/runtime/runtimeError/runtimeError.specialized.js +1 -1
- package/dist/runtime/runtimeError/runtimeError.type.d.ts +5 -9
- package/dist/runtime/runtimeLogger.d.ts +2 -2
- package/dist/runtime/runtimeLogger.js +3 -3
- package/dist/runtime/runtimeOptions/index.d.ts +1 -1
- package/dist/runtime/runtimeOptions/runtimeOptions.defaults.d.ts +1 -1
- package/dist/runtime/runtimeOptions/runtimeOptions.defaults.js +2 -0
- package/dist/runtime/runtimeOptions/runtimeOptions.resolver.js +5 -2
- package/dist/runtime/runtimeOptions/runtimeOptions.type.d.ts +45 -16
- package/dist/runtime/runtimeOptions/runtimeOptions.validation.js +0 -1
- package/dist/runtime/runtimeShutdown/index.d.ts +3 -2
- package/dist/runtime/runtimeShutdown/index.js +2 -2
- package/dist/runtime/runtimeShutdown/pipeline/index.d.ts +2 -1
- package/dist/runtime/runtimeShutdown/pipeline/index.js +1 -1
- package/dist/runtime/runtimeShutdown/pipeline/runtimeShutdown.pipeline.d.ts +37 -7
- package/dist/runtime/runtimeShutdown/pipeline/runtimeShutdown.pipeline.js +77 -51
- package/dist/runtime/runtimeShutdown/runtimeShutdown.core.d.ts +8 -16
- package/dist/runtime/runtimeShutdown/runtimeShutdown.core.js +85 -87
- package/dist/runtime/runtimeShutdown/runtimeShutdown.type.d.ts +9 -5
- package/dist/runtime/runtimeSignals/index.d.ts +8 -0
- package/dist/runtime/runtimeSignals/index.js +7 -0
- package/dist/runtime/runtimeSignals/runtimeSignals.d.ts +93 -0
- package/dist/runtime/runtimeSignals/runtimeSignals.js +149 -0
- package/dist/runtime/runtimeState.state.d.ts +32 -14
- package/dist/runtime/runtimeState.state.js +34 -27
- package/dist/runtime/runtimeTimeout.d.ts +40 -0
- package/dist/runtime/runtimeTimeout.js +42 -0
- package/package.json +21 -15
- package/dist/.tsbuildinfo +0 -1
- package/dist/application/application.d.ts.map +0 -1
- package/dist/application/application.js.map +0 -1
- package/dist/application/applicationContext.context.d.ts.map +0 -1
- package/dist/application/applicationContext.context.js.map +0 -1
- package/dist/application/applicationState.state.d.ts.map +0 -1
- package/dist/application/applicationState.state.js.map +0 -1
- package/dist/application/index.d.ts.map +0 -1
- package/dist/application/index.js.map +0 -1
- package/dist/configuration/configurationManager.manager.d.ts.map +0 -1
- package/dist/configuration/configurationManager.manager.js.map +0 -1
- package/dist/configuration/core/configuration.d.ts.map +0 -1
- package/dist/configuration/core/configuration.js.map +0 -1
- package/dist/configuration/core/configurationKey.key.d.ts.map +0 -1
- package/dist/configuration/core/configurationKey.key.js.map +0 -1
- package/dist/configuration/core/configurationSource.source.d.ts.map +0 -1
- package/dist/configuration/core/configurationSource.source.js.map +0 -1
- package/dist/configuration/core/index.d.ts.map +0 -1
- package/dist/configuration/core/index.js.map +0 -1
- package/dist/configuration/error/configurationError.error.d.ts.map +0 -1
- package/dist/configuration/error/configurationError.error.js.map +0 -1
- package/dist/configuration/error/configurationRedactor.redactor.d.ts.map +0 -1
- package/dist/configuration/error/configurationRedactor.redactor.js.map +0 -1
- package/dist/configuration/error/index.d.ts.map +0 -1
- package/dist/configuration/error/index.js.map +0 -1
- package/dist/configuration/events/configurationEvents.events.d.ts.map +0 -1
- package/dist/configuration/events/configurationEvents.events.js.map +0 -1
- package/dist/configuration/events/index.d.ts.map +0 -1
- package/dist/configuration/events/index.js.map +0 -1
- package/dist/configuration/index.d.ts.map +0 -1
- package/dist/configuration/index.js.map +0 -1
- package/dist/configuration/loader/configurationLoader.loader.d.ts.map +0 -1
- package/dist/configuration/loader/configurationLoader.loader.js.map +0 -1
- package/dist/configuration/loader/index.d.ts.map +0 -1
- package/dist/configuration/loader/index.js.map +0 -1
- package/dist/configuration/registry/configurationProvider.provider.d.ts.map +0 -1
- package/dist/configuration/registry/configurationProvider.provider.js.map +0 -1
- package/dist/configuration/registry/configurationRegistry.registry.d.ts.map +0 -1
- package/dist/configuration/registry/configurationRegistry.registry.js.map +0 -1
- package/dist/configuration/registry/index.d.ts.map +0 -1
- package/dist/configuration/registry/index.js.map +0 -1
- package/dist/configuration/schema/configurationSchema.schema.d.ts.map +0 -1
- package/dist/configuration/schema/configurationSchema.schema.js.map +0 -1
- package/dist/configuration/schema/configurationValidation.validator.d.ts.map +0 -1
- package/dist/configuration/schema/configurationValidation.validator.js.map +0 -1
- package/dist/configuration/schema/index.d.ts.map +0 -1
- package/dist/configuration/schema/index.js.map +0 -1
- package/dist/container/container.d.ts.map +0 -1
- package/dist/container/container.js.map +0 -1
- package/dist/container/index.d.ts.map +0 -1
- package/dist/container/index.js.map +0 -1
- package/dist/container/provider.d.ts.map +0 -1
- package/dist/container/provider.js.map +0 -1
- package/dist/container/scope.d.ts.map +0 -1
- package/dist/container/scope.js.map +0 -1
- package/dist/container/token.d.ts.map +0 -1
- package/dist/container/token.js.map +0 -1
- package/dist/context/core/context.d.ts +0 -95
- package/dist/context/core/context.d.ts.map +0 -1
- package/dist/context/core/context.js +0 -103
- package/dist/context/core/context.js.map +0 -1
- package/dist/context/core/contextKey.key.d.ts.map +0 -1
- package/dist/context/core/contextKey.key.js.map +0 -1
- package/dist/context/core/executionContext.context.d.ts.map +0 -1
- package/dist/context/core/executionContext.context.js.map +0 -1
- package/dist/context/core/index.d.ts.map +0 -1
- package/dist/context/core/index.js.map +0 -1
- package/dist/context/index.d.ts.map +0 -1
- package/dist/context/index.js.map +0 -1
- package/dist/context/provider/contextProvider.provider.d.ts.map +0 -1
- package/dist/context/provider/contextProvider.provider.js.map +0 -1
- package/dist/context/provider/contextStorage.storage.d.ts.map +0 -1
- package/dist/context/provider/contextStorage.storage.js.map +0 -1
- package/dist/context/provider/index.d.ts.map +0 -1
- package/dist/context/provider/index.js.map +0 -1
- package/dist/context/snapshot/contextSnapshot.snapshot.d.ts.map +0 -1
- package/dist/context/snapshot/contextSnapshot.snapshot.js.map +0 -1
- package/dist/context/snapshot/index.d.ts.map +0 -1
- package/dist/context/snapshot/index.js.map +0 -1
- package/dist/context/values/contextValues.values.d.ts.map +0 -1
- package/dist/context/values/contextValues.values.js.map +0 -1
- package/dist/context/values/index.d.ts.map +0 -1
- package/dist/context/values/index.js.map +0 -1
- package/dist/contracts/adapter.d.ts.map +0 -1
- package/dist/contracts/adapter.js.map +0 -1
- package/dist/contracts/disposable.d.ts.map +0 -1
- package/dist/contracts/disposable.js.map +0 -1
- package/dist/contracts/handler.d.ts.map +0 -1
- package/dist/contracts/handler.js.map +0 -1
- package/dist/contracts/index.d.ts.map +0 -1
- package/dist/contracts/index.js.map +0 -1
- package/dist/errors/errorCode.code.d.ts.map +0 -1
- package/dist/errors/errorCode.code.js.map +0 -1
- package/dist/errors/exceptions.d.ts.map +0 -1
- package/dist/errors/exceptions.js.map +0 -1
- package/dist/errors/frameworkError.error.d.ts.map +0 -1
- package/dist/errors/frameworkError.error.js.map +0 -1
- package/dist/errors/index.d.ts.map +0 -1
- package/dist/errors/index.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/lifecycle/core/index.d.ts.map +0 -1
- package/dist/lifecycle/core/index.js.map +0 -1
- package/dist/lifecycle/core/lifecycle.d.ts.map +0 -1
- package/dist/lifecycle/core/lifecycle.js.map +0 -1
- package/dist/lifecycle/core/lifecycleHook.hook.d.ts.map +0 -1
- package/dist/lifecycle/core/lifecycleHook.hook.js.map +0 -1
- package/dist/lifecycle/core/lifecycleRegistry.registry.d.ts.map +0 -1
- package/dist/lifecycle/core/lifecycleRegistry.registry.js.map +0 -1
- package/dist/lifecycle/core/lifecycleState.state.d.ts +0 -2
- package/dist/lifecycle/core/lifecycleState.state.d.ts.map +0 -1
- package/dist/lifecycle/core/lifecycleState.state.js +0 -2
- package/dist/lifecycle/core/lifecycleState.state.js.map +0 -1
- package/dist/lifecycle/index.d.ts.map +0 -1
- package/dist/lifecycle/index.js.map +0 -1
- package/dist/lifecycle/manager/index.d.ts.map +0 -1
- package/dist/lifecycle/manager/index.js.map +0 -1
- package/dist/lifecycle/manager/lifecycleManager.manager.d.ts.map +0 -1
- package/dist/lifecycle/manager/lifecycleManager.manager.js.map +0 -1
- package/dist/lifecycle/scope/index.d.ts.map +0 -1
- package/dist/lifecycle/scope/index.js.map +0 -1
- package/dist/lifecycle/scope/lifecycleScope.scope.d.ts.map +0 -1
- package/dist/lifecycle/scope/lifecycleScope.scope.js.map +0 -1
- package/dist/logging/console/consoleLogger.logger.d.ts.map +0 -1
- package/dist/logging/console/consoleLogger.logger.js.map +0 -1
- package/dist/logging/console/index.d.ts.map +0 -1
- package/dist/logging/console/index.js.map +0 -1
- package/dist/logging/console/loggerFactory.factory.d.ts.map +0 -1
- package/dist/logging/console/loggerFactory.factory.js.map +0 -1
- package/dist/logging/core/index.d.ts.map +0 -1
- package/dist/logging/core/index.js.map +0 -1
- package/dist/logging/core/logEntry.entry.d.ts.map +0 -1
- package/dist/logging/core/logEntry.entry.js.map +0 -1
- package/dist/logging/core/logLevel.level.d.ts.map +0 -1
- package/dist/logging/core/logLevel.level.js.map +0 -1
- package/dist/logging/core/logger.d.ts.map +0 -1
- package/dist/logging/core/logger.js.map +0 -1
- package/dist/logging/core/loggerContext.context.d.ts.map +0 -1
- package/dist/logging/core/loggerContext.context.js.map +0 -1
- package/dist/logging/core/loggerOptions.options.d.ts.map +0 -1
- package/dist/logging/core/loggerOptions.options.js.map +0 -1
- package/dist/logging/index.d.ts.map +0 -1
- package/dist/logging/index.js.map +0 -1
- package/dist/modules/index.d.ts.map +0 -1
- package/dist/modules/index.js.map +0 -1
- package/dist/modules/module.d.ts.map +0 -1
- package/dist/modules/module.js.map +0 -1
- package/dist/modules/moduleContext.context.d.ts.map +0 -1
- package/dist/modules/moduleContext.context.js.map +0 -1
- package/dist/modules/moduleDefinition.definition.d.ts.map +0 -1
- package/dist/modules/moduleDefinition.definition.js.map +0 -1
- package/dist/modules/moduleDependency/index.d.ts.map +0 -1
- package/dist/modules/moduleDependency/index.js.map +0 -1
- package/dist/modules/moduleDependency/moduleDependency.graph.d.ts.map +0 -1
- package/dist/modules/moduleDependency/moduleDependency.graph.js.map +0 -1
- package/dist/modules/moduleDependency/moduleDependency.ordering.d.ts.map +0 -1
- package/dist/modules/moduleDependency/moduleDependency.ordering.js.map +0 -1
- package/dist/modules/moduleDependency/moduleDependency.type.d.ts.map +0 -1
- package/dist/modules/moduleDependency/moduleDependency.type.js.map +0 -1
- package/dist/modules/moduleError/index.d.ts.map +0 -1
- package/dist/modules/moduleError/index.js.map +0 -1
- package/dist/modules/moduleError/moduleError.base.d.ts.map +0 -1
- package/dist/modules/moduleError/moduleError.base.js.map +0 -1
- package/dist/modules/moduleError/moduleError.dependency.d.ts.map +0 -1
- package/dist/modules/moduleError/moduleError.dependency.js.map +0 -1
- package/dist/modules/moduleError/moduleError.helpers.d.ts.map +0 -1
- package/dist/modules/moduleError/moduleError.helpers.js.map +0 -1
- package/dist/modules/moduleError/moduleError.lifecycle.d.ts.map +0 -1
- package/dist/modules/moduleError/moduleError.lifecycle.js.map +0 -1
- package/dist/modules/moduleError/moduleError.registration.d.ts.map +0 -1
- package/dist/modules/moduleError/moduleError.registration.js.map +0 -1
- package/dist/modules/moduleLifecycle/index.d.ts.map +0 -1
- package/dist/modules/moduleLifecycle/index.js.map +0 -1
- package/dist/modules/moduleLifecycle/moduleLifecycle.lifecycle.d.ts.map +0 -1
- package/dist/modules/moduleLifecycle/moduleLifecycle.lifecycle.js.map +0 -1
- package/dist/modules/moduleLifecycle/moduleLifecycle.stateMachine.d.ts.map +0 -1
- package/dist/modules/moduleLifecycle/moduleLifecycle.stateMachine.js.map +0 -1
- package/dist/modules/moduleLifecycle/moduleLifecycle.type.d.ts.map +0 -1
- package/dist/modules/moduleLifecycle/moduleLifecycle.type.js.map +0 -1
- package/dist/modules/moduleLoader/index.d.ts.map +0 -1
- package/dist/modules/moduleLoader/index.js.map +0 -1
- package/dist/modules/moduleLoader/moduleLoader.loader.d.ts.map +0 -1
- package/dist/modules/moduleLoader/moduleLoader.loader.js.map +0 -1
- package/dist/modules/moduleLoader/moduleLoader.type.d.ts.map +0 -1
- package/dist/modules/moduleLoader/moduleLoader.type.js.map +0 -1
- package/dist/modules/moduleMetadata.metadata.d.ts.map +0 -1
- package/dist/modules/moduleMetadata.metadata.js.map +0 -1
- package/dist/modules/moduleRegistry/index.d.ts.map +0 -1
- package/dist/modules/moduleRegistry/index.js.map +0 -1
- package/dist/modules/moduleRegistry/moduleRegistry.registry.d.ts.map +0 -1
- package/dist/modules/moduleRegistry/moduleRegistry.registry.js.map +0 -1
- package/dist/modules/moduleRegistry/moduleRegistry.type.d.ts.map +0 -1
- package/dist/modules/moduleRegistry/moduleRegistry.type.js.map +0 -1
- package/dist/runtime/index.d.ts.map +0 -1
- package/dist/runtime/index.js.map +0 -1
- package/dist/runtime/runtime.d.ts.map +0 -1
- package/dist/runtime/runtime.js.map +0 -1
- package/dist/runtime/runtimeBootstrap/index.d.ts.map +0 -1
- package/dist/runtime/runtimeBootstrap/index.js.map +0 -1
- package/dist/runtime/runtimeBootstrap/pipeline/index.d.ts.map +0 -1
- package/dist/runtime/runtimeBootstrap/pipeline/index.js.map +0 -1
- package/dist/runtime/runtimeBootstrap/pipeline/runtimeBootstrap.invoke.d.ts +0 -6
- package/dist/runtime/runtimeBootstrap/pipeline/runtimeBootstrap.invoke.d.ts.map +0 -1
- package/dist/runtime/runtimeBootstrap/pipeline/runtimeBootstrap.invoke.js +0 -27
- package/dist/runtime/runtimeBootstrap/pipeline/runtimeBootstrap.invoke.js.map +0 -1
- package/dist/runtime/runtimeBootstrap/pipeline/runtimeBootstrap.pipeline.d.ts.map +0 -1
- package/dist/runtime/runtimeBootstrap/pipeline/runtimeBootstrap.pipeline.js.map +0 -1
- package/dist/runtime/runtimeBootstrap/runtimeBootstrap.core.d.ts.map +0 -1
- package/dist/runtime/runtimeBootstrap/runtimeBootstrap.core.js.map +0 -1
- package/dist/runtime/runtimeBootstrap/runtimeBootstrap.type.d.ts.map +0 -1
- package/dist/runtime/runtimeBootstrap/runtimeBootstrap.type.js.map +0 -1
- package/dist/runtime/runtimeContext/index.d.ts.map +0 -1
- package/dist/runtime/runtimeContext/index.js.map +0 -1
- package/dist/runtime/runtimeContext/runtimeContext.core.d.ts +0 -38
- package/dist/runtime/runtimeContext/runtimeContext.core.d.ts.map +0 -1
- package/dist/runtime/runtimeContext/runtimeContext.core.js +0 -99
- package/dist/runtime/runtimeContext/runtimeContext.core.js.map +0 -1
- package/dist/runtime/runtimeContext/runtimeContext.factory.d.ts.map +0 -1
- package/dist/runtime/runtimeContext/runtimeContext.factory.js.map +0 -1
- package/dist/runtime/runtimeContext/runtimeContext.type.d.ts.map +0 -1
- package/dist/runtime/runtimeContext/runtimeContext.type.js.map +0 -1
- package/dist/runtime/runtimeEnvironment/detection/index.d.ts.map +0 -1
- package/dist/runtime/runtimeEnvironment/detection/index.js.map +0 -1
- package/dist/runtime/runtimeEnvironment/detection/runtimeEnvironment.detection.d.ts.map +0 -1
- package/dist/runtime/runtimeEnvironment/detection/runtimeEnvironment.detection.js.map +0 -1
- package/dist/runtime/runtimeEnvironment/detection/runtimeEnvironment.env.d.ts.map +0 -1
- package/dist/runtime/runtimeEnvironment/detection/runtimeEnvironment.env.js.map +0 -1
- package/dist/runtime/runtimeEnvironment/detection/runtimeEnvironment.os.d.ts.map +0 -1
- package/dist/runtime/runtimeEnvironment/detection/runtimeEnvironment.os.js.map +0 -1
- package/dist/runtime/runtimeEnvironment/index.d.ts.map +0 -1
- package/dist/runtime/runtimeEnvironment/index.js.map +0 -1
- package/dist/runtime/runtimeEnvironment/runtimeEnvironment.core.d.ts.map +0 -1
- package/dist/runtime/runtimeEnvironment/runtimeEnvironment.core.js.map +0 -1
- package/dist/runtime/runtimeEnvironment/runtimeEnvironment.type.d.ts.map +0 -1
- package/dist/runtime/runtimeEnvironment/runtimeEnvironment.type.js.map +0 -1
- package/dist/runtime/runtimeError/index.d.ts.map +0 -1
- package/dist/runtime/runtimeError/index.js.map +0 -1
- package/dist/runtime/runtimeError/runtimeError.base.d.ts.map +0 -1
- package/dist/runtime/runtimeError/runtimeError.base.js.map +0 -1
- package/dist/runtime/runtimeError/runtimeError.lifecycle.d.ts.map +0 -1
- package/dist/runtime/runtimeError/runtimeError.lifecycle.js.map +0 -1
- package/dist/runtime/runtimeError/runtimeError.specialized.d.ts.map +0 -1
- package/dist/runtime/runtimeError/runtimeError.specialized.js.map +0 -1
- package/dist/runtime/runtimeError/runtimeError.type.d.ts.map +0 -1
- package/dist/runtime/runtimeError/runtimeError.type.js.map +0 -1
- package/dist/runtime/runtimeLogger.d.ts.map +0 -1
- package/dist/runtime/runtimeLogger.js.map +0 -1
- package/dist/runtime/runtimeManager/index.d.ts +0 -12
- package/dist/runtime/runtimeManager/index.d.ts.map +0 -1
- package/dist/runtime/runtimeManager/index.js +0 -11
- package/dist/runtime/runtimeManager/index.js.map +0 -1
- package/dist/runtime/runtimeManager/runtimeManager.core.d.ts +0 -31
- package/dist/runtime/runtimeManager/runtimeManager.core.d.ts.map +0 -1
- package/dist/runtime/runtimeManager/runtimeManager.core.js +0 -136
- package/dist/runtime/runtimeManager/runtimeManager.core.js.map +0 -1
- package/dist/runtime/runtimeManager/runtimeManager.error.d.ts +0 -14
- package/dist/runtime/runtimeManager/runtimeManager.error.d.ts.map +0 -1
- package/dist/runtime/runtimeManager/runtimeManager.error.js +0 -21
- package/dist/runtime/runtimeManager/runtimeManager.error.js.map +0 -1
- package/dist/runtime/runtimeManager/runtimeManager.factory.d.ts +0 -7
- package/dist/runtime/runtimeManager/runtimeManager.factory.d.ts.map +0 -1
- package/dist/runtime/runtimeManager/runtimeManager.factory.js +0 -8
- package/dist/runtime/runtimeManager/runtimeManager.factory.js.map +0 -1
- package/dist/runtime/runtimeManager/runtimeManager.lifecycle.d.ts +0 -16
- package/dist/runtime/runtimeManager/runtimeManager.lifecycle.d.ts.map +0 -1
- package/dist/runtime/runtimeManager/runtimeManager.lifecycle.js +0 -49
- package/dist/runtime/runtimeManager/runtimeManager.lifecycle.js.map +0 -1
- package/dist/runtime/runtimeManager/runtimeManager.type.d.ts +0 -54
- package/dist/runtime/runtimeManager/runtimeManager.type.d.ts.map +0 -1
- package/dist/runtime/runtimeManager/runtimeManager.type.js +0 -2
- package/dist/runtime/runtimeManager/runtimeManager.type.js.map +0 -1
- package/dist/runtime/runtimeOptions/index.d.ts.map +0 -1
- package/dist/runtime/runtimeOptions/index.js.map +0 -1
- package/dist/runtime/runtimeOptions/runtimeOptions.defaults.d.ts.map +0 -1
- package/dist/runtime/runtimeOptions/runtimeOptions.defaults.js.map +0 -1
- package/dist/runtime/runtimeOptions/runtimeOptions.resolver.d.ts.map +0 -1
- package/dist/runtime/runtimeOptions/runtimeOptions.resolver.js.map +0 -1
- package/dist/runtime/runtimeOptions/runtimeOptions.type.d.ts.map +0 -1
- package/dist/runtime/runtimeOptions/runtimeOptions.type.js.map +0 -1
- package/dist/runtime/runtimeOptions/runtimeOptions.validation.d.ts.map +0 -1
- package/dist/runtime/runtimeOptions/runtimeOptions.validation.js.map +0 -1
- package/dist/runtime/runtimeShutdown/index.d.ts.map +0 -1
- package/dist/runtime/runtimeShutdown/index.js.map +0 -1
- package/dist/runtime/runtimeShutdown/pipeline/index.d.ts.map +0 -1
- package/dist/runtime/runtimeShutdown/pipeline/index.js.map +0 -1
- package/dist/runtime/runtimeShutdown/pipeline/runtimeShutdown.pipeline.d.ts.map +0 -1
- package/dist/runtime/runtimeShutdown/pipeline/runtimeShutdown.pipeline.js.map +0 -1
- package/dist/runtime/runtimeShutdown/runtimeShutdown.core.d.ts.map +0 -1
- package/dist/runtime/runtimeShutdown/runtimeShutdown.core.js.map +0 -1
- package/dist/runtime/runtimeShutdown/runtimeShutdown.type.d.ts.map +0 -1
- package/dist/runtime/runtimeShutdown/runtimeShutdown.type.js.map +0 -1
- package/dist/runtime/runtimeState.state.d.ts.map +0 -1
- package/dist/runtime/runtimeState.state.js.map +0 -1
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
import { createModuleContext } from "../moduleContext.context.js";
|
|
2
|
-
import { createModuleDependencyGraph, resolveModuleStartupOrder,
|
|
2
|
+
import { createModuleDependencyGraph, resolveModuleStartupOrder, } from "../moduleDependency/index.js";
|
|
3
3
|
import { ModuleLoadError } from "./moduleLoader.type.js";
|
|
4
|
+
import { ModuleError } from "../moduleError/moduleError.base.js";
|
|
5
|
+
import { MissingModuleDependencyError } from "../moduleError/moduleError.dependency.js";
|
|
6
|
+
import { InvalidModuleInstanceError, ModuleInstantiationError, } from "../moduleError/moduleError.lifecycle.js";
|
|
7
|
+
import { ModuleNotFoundError } from "../moduleError/moduleError.registration.js";
|
|
4
8
|
/**
|
|
5
9
|
* Default module loader.
|
|
6
10
|
*
|
|
7
11
|
* Reads definitions from registry, builds dependency graph,
|
|
8
12
|
* validates, resolves startup order, instantiates modules.
|
|
13
|
+
*
|
|
14
|
+
* Dependencies are always resolved against every registered
|
|
15
|
+
* definition. autoLoad filtering applies only to load roots:
|
|
16
|
+
* a module registered with autoLoad disabled is still loaded
|
|
17
|
+
* when another loading module requires it.
|
|
9
18
|
*/
|
|
10
19
|
export class ModuleLoader {
|
|
11
20
|
application;
|
|
@@ -14,6 +23,7 @@ export class ModuleLoader {
|
|
|
14
23
|
registry;
|
|
15
24
|
allowExplicitLoad;
|
|
16
25
|
contexts = new Map();
|
|
26
|
+
inFlightLoads = new Map();
|
|
17
27
|
constructor(registry, options) {
|
|
18
28
|
this.registry = registry;
|
|
19
29
|
this.application = options.application;
|
|
@@ -21,14 +31,24 @@ export class ModuleLoader {
|
|
|
21
31
|
this.logger = options.logger;
|
|
22
32
|
this.allowExplicitLoad = options.allowExplicitLoad ?? true;
|
|
23
33
|
}
|
|
24
|
-
/**
|
|
34
|
+
/**
|
|
35
|
+
* Loads every module whose definition has autoLoad enabled,
|
|
36
|
+
* plus every module those modules require (regardless of the
|
|
37
|
+
* required module's autoLoad setting).
|
|
38
|
+
*/
|
|
25
39
|
async loadAll() {
|
|
26
|
-
const
|
|
40
|
+
const roots = this.registry
|
|
27
41
|
.getDefinitions()
|
|
28
|
-
.filter((
|
|
29
|
-
|
|
42
|
+
.filter((definition) => definition.autoLoad !== false)
|
|
43
|
+
.map((definition) => definition.id);
|
|
44
|
+
return this.loadClosure(roots, { reportSkipped: true });
|
|
30
45
|
}
|
|
31
|
-
/**
|
|
46
|
+
/**
|
|
47
|
+
* Loads a specific module and all of its required dependencies.
|
|
48
|
+
*
|
|
49
|
+
* Concurrent load() calls for the same module share a single
|
|
50
|
+
* in-flight load.
|
|
51
|
+
*/
|
|
32
52
|
async load(moduleId) {
|
|
33
53
|
const registration = this.registry.require(moduleId);
|
|
34
54
|
if (registration.state === "loaded" && registration.instance)
|
|
@@ -36,24 +56,45 @@ export class ModuleLoader {
|
|
|
36
56
|
if (registration.definition.autoLoad === false && !this.allowExplicitLoad) {
|
|
37
57
|
throw new ModuleLoadError(moduleId, new Error(`Module "${moduleId}" is not configured for explicit loading.`));
|
|
38
58
|
}
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
59
|
+
const pending = this.inFlightLoads.get(moduleId);
|
|
60
|
+
if (pending)
|
|
61
|
+
return pending;
|
|
62
|
+
const loadPromise = (async () => {
|
|
63
|
+
await this.loadClosure([moduleId], { reportSkipped: false });
|
|
64
|
+
const loaded = this.registry.require(moduleId);
|
|
65
|
+
if (!loaded.instance)
|
|
66
|
+
throw new ModuleLoadError(moduleId, new Error("Module was not instantiated."));
|
|
67
|
+
return loaded.instance;
|
|
68
|
+
})().finally(() => {
|
|
69
|
+
this.inFlightLoads.delete(moduleId);
|
|
70
|
+
});
|
|
71
|
+
this.inFlightLoads.set(moduleId, loadPromise);
|
|
72
|
+
return loadPromise;
|
|
45
73
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
|
|
74
|
+
/**
|
|
75
|
+
* Loads the dependency closure of the requested module ids.
|
|
76
|
+
*/
|
|
77
|
+
async loadClosure(requested, options) {
|
|
78
|
+
const closure = this.collectClosure(requested);
|
|
79
|
+
const skipped = [];
|
|
80
|
+
if (options.reportSkipped) {
|
|
81
|
+
for (const definition of this.registry.getDefinitions()) {
|
|
82
|
+
if (definition.autoLoad === false && !closure.has(definition.id)) {
|
|
83
|
+
skipped.push(definition.id);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
if (closure.size === 0)
|
|
88
|
+
return {
|
|
89
|
+
loaded: [],
|
|
90
|
+
alreadyLoaded: [],
|
|
91
|
+
skipped: Object.freeze([...skipped]),
|
|
92
|
+
order: [],
|
|
93
|
+
};
|
|
94
|
+
const graph = this.createGraph([...closure.values()]);
|
|
53
95
|
const order = resolveModuleStartupOrder(graph);
|
|
54
96
|
const loaded = [];
|
|
55
97
|
const alreadyLoaded = [];
|
|
56
|
-
const skipped = [];
|
|
57
98
|
for (const moduleId of order) {
|
|
58
99
|
const registration = this.registry.get(moduleId);
|
|
59
100
|
if (!registration)
|
|
@@ -62,11 +103,6 @@ export class ModuleLoader {
|
|
|
62
103
|
alreadyLoaded.push(registration.instance);
|
|
63
104
|
continue;
|
|
64
105
|
}
|
|
65
|
-
if (registration.definition.autoLoad === false &&
|
|
66
|
-
!this.isExplicitlyRequested(moduleId, definitions)) {
|
|
67
|
-
skipped.push(moduleId);
|
|
68
|
-
continue;
|
|
69
|
-
}
|
|
70
106
|
const instance = await this.instantiate(registration.definition);
|
|
71
107
|
loaded.push(instance);
|
|
72
108
|
}
|
|
@@ -77,29 +113,41 @@ export class ModuleLoader {
|
|
|
77
113
|
order: Object.freeze([...order]),
|
|
78
114
|
};
|
|
79
115
|
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
116
|
+
/**
|
|
117
|
+
* Collects the dependency closure of the requested modules
|
|
118
|
+
* across every registered definition.
|
|
119
|
+
*
|
|
120
|
+
* Optional dependencies join the closure only when they are
|
|
121
|
+
* registered; missing required dependencies are reported with
|
|
122
|
+
* the module that needs them.
|
|
123
|
+
*/
|
|
124
|
+
collectClosure(requested) {
|
|
88
125
|
const collected = new Map();
|
|
89
|
-
const
|
|
126
|
+
const queue = [...requested];
|
|
127
|
+
while (queue.length > 0) {
|
|
128
|
+
const currentId = queue.shift();
|
|
90
129
|
if (collected.has(currentId))
|
|
91
|
-
|
|
130
|
+
continue;
|
|
92
131
|
const registration = this.registry.require(currentId);
|
|
93
132
|
collected.set(currentId, registration.definition);
|
|
94
133
|
for (const dependency of this.registry.getDependencies(currentId)) {
|
|
95
|
-
if (
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
134
|
+
if (!this.registry.has(dependency.id)) {
|
|
135
|
+
if (dependency.optional)
|
|
136
|
+
continue;
|
|
137
|
+
throw new MissingModuleDependencyError(currentId, dependency.id);
|
|
138
|
+
}
|
|
139
|
+
queue.push(dependency.id);
|
|
99
140
|
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
|
|
141
|
+
}
|
|
142
|
+
return collected;
|
|
143
|
+
}
|
|
144
|
+
createGraph(definitions) {
|
|
145
|
+
const nodes = definitions.map((d) => ({
|
|
146
|
+
id: d.id,
|
|
147
|
+
dependencies: this.registry.getDependencies(d.id),
|
|
148
|
+
version: d.version,
|
|
149
|
+
}));
|
|
150
|
+
return createModuleDependencyGraph(nodes);
|
|
103
151
|
}
|
|
104
152
|
async instantiate(definition) {
|
|
105
153
|
const moduleId = definition.id;
|
|
@@ -107,9 +155,9 @@ export class ModuleLoader {
|
|
|
107
155
|
try {
|
|
108
156
|
const module = await definition.factory(definition.options);
|
|
109
157
|
if (!module || typeof module !== "object")
|
|
110
|
-
throw new
|
|
158
|
+
throw new InvalidModuleInstanceError(moduleId, `Module factory for "${moduleId}" did not return a valid module.`);
|
|
111
159
|
if (module.id !== moduleId)
|
|
112
|
-
throw new
|
|
160
|
+
throw new InvalidModuleInstanceError(moduleId, `Module factory returned module "${module.id}" but expected "${moduleId}".`);
|
|
113
161
|
if (typeof module.attach === "function")
|
|
114
162
|
module.attach(this.application);
|
|
115
163
|
const moduleLogger = this.createModuleLogger(module);
|
|
@@ -121,7 +169,14 @@ export class ModuleLoader {
|
|
|
121
169
|
logger: moduleLogger,
|
|
122
170
|
},
|
|
123
171
|
metadata: definition.metadata,
|
|
124
|
-
|
|
172
|
+
/*
|
|
173
|
+
* Modules get a resolver, never the shared context map, so
|
|
174
|
+
* they cannot enumerate or reach undeclared modules.
|
|
175
|
+
*/
|
|
176
|
+
moduleContexts: (dependencyId) => this.contexts.get(dependencyId),
|
|
177
|
+
declaredDependencies: this.registry
|
|
178
|
+
.getDependencies(moduleId)
|
|
179
|
+
.map((dependency) => dependency.id),
|
|
125
180
|
});
|
|
126
181
|
this.contexts.set(moduleId, context);
|
|
127
182
|
this.registry.setState(moduleId, "loaded", { instance: module });
|
|
@@ -129,7 +184,9 @@ export class ModuleLoader {
|
|
|
129
184
|
}
|
|
130
185
|
catch (error) {
|
|
131
186
|
this.registry.setState(moduleId, "failed", { error });
|
|
132
|
-
|
|
187
|
+
if (error instanceof ModuleError)
|
|
188
|
+
throw error;
|
|
189
|
+
throw new ModuleInstantiationError(moduleId, error);
|
|
133
190
|
}
|
|
134
191
|
}
|
|
135
192
|
createModuleLogger(module) {
|
|
@@ -138,16 +195,13 @@ export class ModuleLoader {
|
|
|
138
195
|
return logger.child({ moduleId: module.id, module: module.name });
|
|
139
196
|
return this.logger;
|
|
140
197
|
}
|
|
141
|
-
isExplicitlyRequested(moduleId, definitions) {
|
|
142
|
-
return definitions.some((d) => d.id === moduleId);
|
|
143
|
-
}
|
|
144
198
|
getContext(moduleId) {
|
|
145
199
|
return this.contexts.get(moduleId);
|
|
146
200
|
}
|
|
147
201
|
requireContext(moduleId) {
|
|
148
202
|
const context = this.getContext(moduleId);
|
|
149
203
|
if (!context)
|
|
150
|
-
throw new
|
|
204
|
+
throw new ModuleNotFoundError(moduleId);
|
|
151
205
|
return context;
|
|
152
206
|
}
|
|
153
207
|
getContexts() {
|
|
@@ -156,6 +210,25 @@ export class ModuleLoader {
|
|
|
156
210
|
isLoaded(moduleId) {
|
|
157
211
|
return this.registry.get(moduleId)?.state === "loaded";
|
|
158
212
|
}
|
|
213
|
+
/**
|
|
214
|
+
* Forgets a module's runtime instance and context.
|
|
215
|
+
*
|
|
216
|
+
* The loader does not run lifecycle hooks; callers that need
|
|
217
|
+
* the instance shut down first should use
|
|
218
|
+
* ModuleLifecycleManager.unloadModule(). Returns false when the
|
|
219
|
+
* module is not registered or holds no instance.
|
|
220
|
+
*/
|
|
221
|
+
unload(moduleId) {
|
|
222
|
+
const registration = this.registry.get(moduleId);
|
|
223
|
+
if (!registration)
|
|
224
|
+
return false;
|
|
225
|
+
const hadInstance = this.contexts.delete(moduleId);
|
|
226
|
+
if (registration.state === "registered" ||
|
|
227
|
+
registration.state === "unloaded")
|
|
228
|
+
return hadInstance;
|
|
229
|
+
this.registry.setState(moduleId, "unloaded");
|
|
230
|
+
return true;
|
|
231
|
+
}
|
|
159
232
|
}
|
|
160
233
|
/** Creates a module loader. */
|
|
161
234
|
export function createModuleLoader(registry, options) {
|
|
@@ -47,11 +47,13 @@ export interface ModuleLoadResult {
|
|
|
47
47
|
*/
|
|
48
48
|
readonly order: readonly ModuleId[];
|
|
49
49
|
}
|
|
50
|
-
import {
|
|
50
|
+
import { ModuleError } from "../moduleError/moduleError.base.js";
|
|
51
51
|
/**
|
|
52
52
|
* Error thrown when one or more modules cannot be loaded.
|
|
53
|
+
*
|
|
54
|
+
* Part of the core module error taxonomy (code MODULE_LOAD_FAILED).
|
|
53
55
|
*/
|
|
54
|
-
export declare class ModuleLoadError extends
|
|
56
|
+
export declare class ModuleLoadError extends ModuleError {
|
|
55
57
|
constructor(moduleId: ModuleId, cause: unknown);
|
|
56
58
|
}
|
|
57
59
|
//# sourceMappingURL=moduleLoader.type.d.ts.map
|
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ModuleError, ModuleErrorCode, } from "../moduleError/moduleError.base.js";
|
|
2
2
|
/**
|
|
3
3
|
* Error thrown when one or more modules cannot be loaded.
|
|
4
|
+
*
|
|
5
|
+
* Part of the core module error taxonomy (code MODULE_LOAD_FAILED).
|
|
4
6
|
*/
|
|
5
|
-
export class ModuleLoadError extends
|
|
7
|
+
export class ModuleLoadError extends ModuleError {
|
|
6
8
|
constructor(moduleId, cause) {
|
|
7
9
|
const message = cause instanceof Error ? cause.message : String(cause);
|
|
8
|
-
super(
|
|
10
|
+
super(`Failed to load module "${moduleId}": ${message}`, {
|
|
11
|
+
code: ModuleErrorCode.LOAD_FAILED,
|
|
12
|
+
moduleId,
|
|
13
|
+
cause,
|
|
14
|
+
});
|
|
15
|
+
this.name = "ModuleLoadError";
|
|
9
16
|
}
|
|
10
17
|
}
|
|
11
18
|
//# sourceMappingURL=moduleLoader.type.js.map
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { InvalidModuleDefinitionError } from "./moduleError/moduleError.registration.js";
|
|
1
2
|
function normalizeOptionalString(value) {
|
|
2
3
|
if (value === undefined)
|
|
3
4
|
return undefined;
|
|
@@ -35,12 +36,12 @@ function validateModuleMetadata(metadata) {
|
|
|
35
36
|
if (metadata.deprecated &&
|
|
36
37
|
metadata.deprecationMessage === undefined &&
|
|
37
38
|
metadata.replacement === undefined) {
|
|
38
|
-
throw new
|
|
39
|
+
throw new InvalidModuleDefinitionError("Deprecated modules should provide either a deprecationMessage or replacement module.");
|
|
39
40
|
}
|
|
40
41
|
if (metadata.homepage && !isValidUrl(metadata.homepage))
|
|
41
|
-
throw new
|
|
42
|
+
throw new InvalidModuleDefinitionError(`Invalid module homepage URL: ${metadata.homepage}`);
|
|
42
43
|
if (metadata.repository && !isValidUrl(metadata.repository))
|
|
43
|
-
throw new
|
|
44
|
+
throw new InvalidModuleDefinitionError(`Invalid module repository URL: ${metadata.repository}`);
|
|
44
45
|
}
|
|
45
46
|
/** Creates immutable module metadata. */
|
|
46
47
|
export function createModuleMetadata(options = {}) {
|
|
@@ -61,13 +62,22 @@ export function createModuleMetadata(options = {}) {
|
|
|
61
62
|
validateModuleMetadata(metadata);
|
|
62
63
|
return Object.freeze(metadata);
|
|
63
64
|
}
|
|
65
|
+
/**
|
|
66
|
+
* Removes keys whose value is undefined so spreading a metadata
|
|
67
|
+
* object cannot clobber defined values with undefined.
|
|
68
|
+
*/
|
|
69
|
+
function withoutUndefinedValues(metadata) {
|
|
70
|
+
if (!metadata)
|
|
71
|
+
return {};
|
|
72
|
+
return Object.fromEntries(Object.entries(metadata).filter(([, value]) => value !== undefined));
|
|
73
|
+
}
|
|
64
74
|
/** Merges two metadata objects. Values from `override` take precedence. */
|
|
65
75
|
export function mergeModuleMetadata(base, override) {
|
|
66
76
|
if (!base && !override)
|
|
67
77
|
return createModuleMetadata();
|
|
68
78
|
return createModuleMetadata({
|
|
69
|
-
...(base
|
|
70
|
-
...(override
|
|
79
|
+
...withoutUndefinedValues(base),
|
|
80
|
+
...withoutUndefinedValues(override),
|
|
71
81
|
tags: [...(base?.tags ?? []), ...(override?.tags ?? [])],
|
|
72
82
|
environments: override?.environments ?? base?.environments,
|
|
73
83
|
extra: { ...(base?.extra ?? {}), ...(override?.extra ?? {}) },
|
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Stores module definitions and tracks their runtime state.
|
|
5
5
|
*/
|
|
6
|
-
export { type ModuleRegistrationState, type ModuleRegistration, type ModuleRegistryOptions, type ModuleRegistryEventType, type ModuleRegistryEvent, type ModuleRegistryListener, type ModuleRegistry, } from "./moduleRegistry.type.js";
|
|
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
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -2,14 +2,14 @@ import type { Module, ModuleId } from "../module.js";
|
|
|
2
2
|
import type { ModuleDefinition } from "../moduleDefinition.definition.js";
|
|
3
3
|
import type { ModuleMetadata } from "../moduleMetadata.metadata.js";
|
|
4
4
|
import type { ModuleDependency } from "../moduleDependency/moduleDependency.type.js";
|
|
5
|
-
import type { ModuleRegistrationState, ModuleRegistration, ModuleRegistryOptions, ModuleRegistryListener, ModuleRegistry } from "./moduleRegistry.type.js";
|
|
5
|
+
import type { ModuleRegistrationState, ModuleRegistration, ModuleRegistryOptions, ModuleRegistryListener, ModuleRegistry, ModuleRegisterOptions } from "./moduleRegistry.type.js";
|
|
6
6
|
/** Default in-memory module registry. */
|
|
7
7
|
export declare class DefaultModuleRegistry implements ModuleRegistry {
|
|
8
8
|
private readonly registrations;
|
|
9
9
|
private readonly listeners;
|
|
10
10
|
private readonly allowReplacement;
|
|
11
11
|
constructor(options?: ModuleRegistryOptions);
|
|
12
|
-
register<TModule extends Module>(definition: ModuleDefinition<TModule
|
|
12
|
+
register<TModule extends Module>(definition: ModuleDefinition<TModule>, options?: ModuleRegisterOptions): ModuleRegistration<TModule>;
|
|
13
13
|
registerMany(definitions: readonly ModuleDefinition[]): readonly ModuleRegistration[];
|
|
14
14
|
get(moduleId: ModuleId): ModuleRegistration | undefined;
|
|
15
15
|
require(moduleId: ModuleId): ModuleRegistration;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { isModuleDefinition } from "../moduleDefinition.definition.js";
|
|
2
|
+
import { DuplicateModuleError, InvalidModuleDefinitionError, ModuleNotFoundError, } from "../moduleError/moduleError.registration.js";
|
|
3
|
+
import { InvalidModuleStateError } from "../moduleError/moduleError.lifecycle.js";
|
|
2
4
|
/** Default in-memory module registry. */
|
|
3
5
|
export class DefaultModuleRegistry {
|
|
4
6
|
registrations = new Map();
|
|
@@ -7,13 +9,36 @@ export class DefaultModuleRegistry {
|
|
|
7
9
|
constructor(options = {}) {
|
|
8
10
|
this.allowReplacement = options.allowReplacement ?? false;
|
|
9
11
|
}
|
|
10
|
-
register(definition) {
|
|
12
|
+
register(definition, options = {}) {
|
|
11
13
|
if (!isModuleDefinition(definition))
|
|
12
|
-
throw new
|
|
13
|
-
|
|
14
|
+
throw new InvalidModuleDefinitionError("Invalid module definition.");
|
|
15
|
+
/*
|
|
16
|
+
* Ids are canonicalized when the definition is created
|
|
17
|
+
* (defineModule rejects untrimmed ids), so the registry can
|
|
18
|
+
* use definition.id directly.
|
|
19
|
+
*/
|
|
20
|
+
const moduleId = definition.id;
|
|
21
|
+
if (moduleId !== moduleId.trim())
|
|
22
|
+
throw new InvalidModuleDefinitionError(`Module id "${moduleId}" must not contain leading or trailing whitespace.`, moduleId);
|
|
14
23
|
const existing = this.registrations.get(moduleId);
|
|
15
24
|
if (existing && !this.allowReplacement)
|
|
16
|
-
throw new
|
|
25
|
+
throw new DuplicateModuleError(moduleId);
|
|
26
|
+
/*
|
|
27
|
+
* Replacing a definition whose module instance is already
|
|
28
|
+
* loaded (or currently loading) would strand the live
|
|
29
|
+
* instance: the lifecycle system would keep managing an
|
|
30
|
+
* object whose definition no longer exists. Callers must opt
|
|
31
|
+
* in explicitly with { replaceLoaded: true }.
|
|
32
|
+
*/
|
|
33
|
+
if (existing &&
|
|
34
|
+
(existing.state === "loaded" || existing.state === "loading") &&
|
|
35
|
+
options.replaceLoaded !== true) {
|
|
36
|
+
throw new InvalidModuleStateError(moduleId, existing.state, [
|
|
37
|
+
"registered",
|
|
38
|
+
"failed",
|
|
39
|
+
"unloaded",
|
|
40
|
+
]);
|
|
41
|
+
}
|
|
17
42
|
const now = new Date();
|
|
18
43
|
const registration = Object.freeze({
|
|
19
44
|
definition,
|
|
@@ -42,7 +67,7 @@ export class DefaultModuleRegistry {
|
|
|
42
67
|
require(moduleId) {
|
|
43
68
|
const registration = this.get(moduleId);
|
|
44
69
|
if (!registration)
|
|
45
|
-
throw new
|
|
70
|
+
throw new ModuleNotFoundError(moduleId);
|
|
46
71
|
return registration;
|
|
47
72
|
}
|
|
48
73
|
has(moduleId) {
|
|
@@ -78,9 +103,16 @@ export class DefaultModuleRegistry {
|
|
|
78
103
|
setState(moduleId, state, details = {}) {
|
|
79
104
|
const existing = this.require(moduleId);
|
|
80
105
|
const now = new Date();
|
|
106
|
+
/*
|
|
107
|
+
* Leaving a state that carries a live instance drops the
|
|
108
|
+
* instance reference; the registry never keeps a stale module
|
|
109
|
+
* object around once it has been unloaded.
|
|
110
|
+
*/
|
|
81
111
|
const registration = Object.freeze({
|
|
82
112
|
definition: existing.definition,
|
|
83
|
-
instance:
|
|
113
|
+
instance: state === "unloaded"
|
|
114
|
+
? undefined
|
|
115
|
+
: (details.instance ?? existing.instance),
|
|
84
116
|
state,
|
|
85
117
|
error: details.error,
|
|
86
118
|
registeredAt: existing.registeredAt,
|
|
@@ -64,6 +64,23 @@ export interface ModuleRegistryEvent {
|
|
|
64
64
|
readonly timestamp: Date;
|
|
65
65
|
}
|
|
66
66
|
export type ModuleRegistryListener = (event: ModuleRegistryEvent) => void | Promise<void>;
|
|
67
|
+
/**
|
|
68
|
+
* Options accepted when registering a module definition.
|
|
69
|
+
*/
|
|
70
|
+
export interface ModuleRegisterOptions {
|
|
71
|
+
/**
|
|
72
|
+
* Allows replacing a definition whose module instance is
|
|
73
|
+
* already loaded (or loading).
|
|
74
|
+
*
|
|
75
|
+
* Replacing a loaded module strands the live instance, so it
|
|
76
|
+
* is rejected with InvalidModuleStateError unless the caller
|
|
77
|
+
* opts in explicitly. Replacement itself additionally requires
|
|
78
|
+
* the registry's allowReplacement option.
|
|
79
|
+
*
|
|
80
|
+
* Defaults to false.
|
|
81
|
+
*/
|
|
82
|
+
readonly replaceLoaded?: boolean;
|
|
83
|
+
}
|
|
67
84
|
/**
|
|
68
85
|
* Public contract for the module registry.
|
|
69
86
|
*/
|
|
@@ -71,7 +88,7 @@ export interface ModuleRegistry {
|
|
|
71
88
|
/**
|
|
72
89
|
* Registers a module definition.
|
|
73
90
|
*/
|
|
74
|
-
register<TModule extends Module>(definition: ModuleDefinition<TModule
|
|
91
|
+
register<TModule extends Module>(definition: ModuleDefinition<TModule>, options?: ModuleRegisterOptions): ModuleRegistration<TModule>;
|
|
75
92
|
/**
|
|
76
93
|
* Registers multiple definitions.
|
|
77
94
|
*/
|
package/dist/runtime/index.d.ts
CHANGED
|
@@ -4,21 +4,23 @@
|
|
|
4
4
|
* Public API for the core runtime subsystem.
|
|
5
5
|
*/
|
|
6
6
|
export { DefaultRuntime, createRuntime } from "./runtime.js";
|
|
7
|
-
export type {
|
|
7
|
+
export type { RuntimeLifecycleState, RuntimeDependencies, RuntimeStatus, Runtime, } from "./runtime.js";
|
|
8
8
|
export { DEFAULT_RUNTIME_OPTIONS, resolveRuntimeOptions, validateRuntimeOptions, isRuntimeMode, isRuntimeRole, assertRuntimeMode, assertRuntimeRole, } from "./runtimeOptions/index.js";
|
|
9
|
-
export type { RuntimeMode, RuntimeRole, RuntimeOptions, RuntimeStartupOptions, RuntimeShutdownOptions, RuntimeSignalOptions, RuntimeDiagnosticsOptions,
|
|
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,
|
|
11
|
-
export type { RuntimeStateSnapshot, RuntimeStateTransition, } from "./runtimeState.state.js";
|
|
12
|
-
export {
|
|
13
|
-
export type { RuntimeIdentity,
|
|
14
|
-
export { DefaultRuntimeEnvironment, createRuntimeEnvironment, detectRuntimeEngine, detectPlatform, detectProcessInfo, detectHostInfo, detectCI, detectContainer,
|
|
15
|
-
export type { RuntimePlatform, RuntimeEngine, RuntimeEnvironmentVariables, RuntimeProcessInfo, RuntimeHostInfo, RuntimeEngineInfo, RuntimeEnvironmentInfo, RuntimeEnvironment, RuntimeEnvironmentOptions, } from "./runtimeEnvironment/index.js";
|
|
16
|
-
export {
|
|
17
|
-
export type {
|
|
18
|
-
export {
|
|
19
|
-
export type {
|
|
20
|
-
export {
|
|
21
|
-
export type {
|
|
22
|
-
export {
|
|
9
|
+
export type { RuntimeMode, RuntimeRole, RuntimeOptions, RuntimeStartupOptions, RuntimeShutdownOptions, RuntimeSignalOptions, RuntimeDiagnosticsOptions, RuntimeEnvironmentOverrides, ResolvedRuntimeOptions, } from "./runtimeOptions/index.js";
|
|
10
|
+
export { RuntimeState, TERMINAL_RUNTIME_STATES, STARTABLE_RUNTIME_STATES, STOPPABLE_RUNTIME_STATES, TRANSITIONAL_RUNTIME_STATES, isRuntimeState, isRuntimeReady, isRuntimeFailed, isRuntimeTransitioning, isRuntimeTerminal, canStartRuntime, canStopRuntime, canTransitionRuntime, assertRuntimeState, assertRuntimeTransition, createRuntimeStateSnapshot, createRuntimeStateTransition, getRuntimeStateLabel, getRuntimeStates, getNextRuntimeStates, } from "./runtimeState.state.js";
|
|
11
|
+
export type { RuntimeStateSnapshot, RuntimeStateTransition, RuntimeTiming, } from "./runtimeState.state.js";
|
|
12
|
+
export { createRuntimeId, createRuntimeIdentity, createRuntimeExecutionContext, createRuntimeContext, } from "./runtimeContext/index.js";
|
|
13
|
+
export type { RuntimeIdentity, RuntimeExecutionMetadata, RuntimeExecutionContext, RuntimeContext, } from "./runtimeContext/index.js";
|
|
14
|
+
export { DefaultRuntimeEnvironment, createRuntimeEnvironment, detectRuntimeEngine, detectPlatform, detectProcessInfo, detectHostInfo, detectCI, detectContainer, MissingEnvironmentVariableError, } from "./runtimeEnvironment/index.js";
|
|
15
|
+
export type { RuntimePlatform, RuntimeEngine, RuntimeEnvironmentVariables, RuntimeProcessInfo, RuntimeHostInfo, RuntimeEngineInfo, RuntimeEnvironmentInfo, RuntimeEnvironmentSummary, RuntimeEnvironment, RuntimeEnvironmentOptions, } from "./runtimeEnvironment/index.js";
|
|
16
|
+
export { DefaultRuntimeBootstrap } from "./runtimeBootstrap/index.js";
|
|
17
|
+
export type { RuntimeBootstrap, RuntimeBootstrapDependencies, RuntimeBootstrapOptions, RuntimeBootstrapPhase, RuntimeBootstrapResult, RuntimeBootstrapErrorInfo, } from "./runtimeBootstrap/index.js";
|
|
18
|
+
export { DefaultRuntimeShutdown } from "./runtimeShutdown/index.js";
|
|
19
|
+
export type { RuntimeShutdown, RuntimeShutdownDependencies, RuntimeShutdownConfig, RuntimeShutdownPhase, RuntimeShutdownResult, RuntimeShutdownErrorInfo, } from "./runtimeShutdown/index.js";
|
|
20
|
+
export { RuntimeSignalManager } from "./runtimeSignals/index.js";
|
|
21
|
+
export type { RuntimeTerminationSignal, RuntimeProcessEvent, RuntimeSignalTarget, RuntimeSignalHandlers, RuntimeSignalManagerOptions, } from "./runtimeSignals/index.js";
|
|
22
|
+
export { withRuntimeTimeout } from "./runtimeTimeout.js";
|
|
23
|
+
export type { TimeoutAwareOperation, RuntimeTimeoutOptions, } from "./runtimeTimeout.js";
|
|
24
|
+
export { RuntimeError, RuntimeErrorCode, InvalidRuntimeStateError, InvalidRuntimeTransitionError, RuntimeStartError, RuntimeStopError, RuntimeInitializationError, RuntimeLoadError, RuntimeTimeoutError, RuntimeDependencyError, RuntimeNotReadyError, RuntimeUnsupportedOperationError, RuntimeCancellationError, toRuntimeError, isRuntimeError, hasRuntimeErrorCode, createRuntimeError, } from "./runtimeError/index.js";
|
|
23
25
|
export type { RuntimeOperation, RuntimeErrorPhase, RuntimeErrorMetadata, RuntimeErrorOptions, RuntimeErrorJSON, } from "./runtimeError/index.js";
|
|
24
26
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/runtime/index.js
CHANGED
|
@@ -14,29 +14,33 @@ export { DEFAULT_RUNTIME_OPTIONS, resolveRuntimeOptions, validateRuntimeOptions,
|
|
|
14
14
|
/*
|
|
15
15
|
* Runtime state
|
|
16
16
|
*/
|
|
17
|
-
export { RuntimeState, TERMINAL_RUNTIME_STATES, STARTABLE_RUNTIME_STATES, STOPPABLE_RUNTIME_STATES, TRANSITIONAL_RUNTIME_STATES, isRuntimeState, isRuntimeReady, isRuntimeFailed, isRuntimeTransitioning, isRuntimeTerminal, canStartRuntime, canStopRuntime, canTransitionRuntime, assertRuntimeState, assertRuntimeTransition, createRuntimeStateSnapshot, createRuntimeStateTransition, getRuntimeStateLabel, getRuntimeStates, getNextRuntimeStates,
|
|
17
|
+
export { RuntimeState, TERMINAL_RUNTIME_STATES, STARTABLE_RUNTIME_STATES, STOPPABLE_RUNTIME_STATES, TRANSITIONAL_RUNTIME_STATES, isRuntimeState, isRuntimeReady, isRuntimeFailed, isRuntimeTransitioning, isRuntimeTerminal, canStartRuntime, canStopRuntime, canTransitionRuntime, assertRuntimeState, assertRuntimeTransition, createRuntimeStateSnapshot, createRuntimeStateTransition, getRuntimeStateLabel, getRuntimeStates, getNextRuntimeStates, } from "./runtimeState.state.js";
|
|
18
18
|
/*
|
|
19
19
|
* Runtime context
|
|
20
20
|
*/
|
|
21
|
-
export {
|
|
21
|
+
export { createRuntimeId, createRuntimeIdentity, createRuntimeExecutionContext, createRuntimeContext, } from "./runtimeContext/index.js";
|
|
22
22
|
/*
|
|
23
23
|
* Runtime environment
|
|
24
24
|
*/
|
|
25
|
-
export { DefaultRuntimeEnvironment, createRuntimeEnvironment, detectRuntimeEngine, detectPlatform, detectProcessInfo, detectHostInfo, detectCI, detectContainer,
|
|
26
|
-
/*
|
|
27
|
-
* Runtime manager
|
|
28
|
-
*/
|
|
29
|
-
export { DefaultRuntimeManager, createRuntimeManager, RuntimeManagerError, } from "./runtimeManager/index.js";
|
|
25
|
+
export { DefaultRuntimeEnvironment, createRuntimeEnvironment, detectRuntimeEngine, detectPlatform, detectProcessInfo, detectHostInfo, detectCI, detectContainer, MissingEnvironmentVariableError, } from "./runtimeEnvironment/index.js";
|
|
30
26
|
/*
|
|
31
27
|
* Runtime bootstrap
|
|
32
28
|
*/
|
|
33
|
-
export { DefaultRuntimeBootstrap
|
|
29
|
+
export { DefaultRuntimeBootstrap } from "./runtimeBootstrap/index.js";
|
|
34
30
|
/*
|
|
35
31
|
* Runtime shutdown
|
|
36
32
|
*/
|
|
37
|
-
export { DefaultRuntimeShutdown
|
|
33
|
+
export { DefaultRuntimeShutdown } from "./runtimeShutdown/index.js";
|
|
34
|
+
/*
|
|
35
|
+
* Runtime signals
|
|
36
|
+
*/
|
|
37
|
+
export { RuntimeSignalManager } from "./runtimeSignals/index.js";
|
|
38
|
+
/*
|
|
39
|
+
* Runtime timeout
|
|
40
|
+
*/
|
|
41
|
+
export { withRuntimeTimeout } from "./runtimeTimeout.js";
|
|
38
42
|
/*
|
|
39
43
|
* Runtime errors
|
|
40
44
|
*/
|
|
41
|
-
export { RuntimeError, RuntimeErrorCode,
|
|
45
|
+
export { RuntimeError, RuntimeErrorCode, InvalidRuntimeStateError, InvalidRuntimeTransitionError, RuntimeStartError, RuntimeStopError, RuntimeInitializationError, RuntimeLoadError, RuntimeTimeoutError, RuntimeDependencyError, RuntimeNotReadyError, RuntimeUnsupportedOperationError, RuntimeCancellationError, toRuntimeError, isRuntimeError, hasRuntimeErrorCode, createRuntimeError, } from "./runtimeError/index.js";
|
|
42
46
|
//# sourceMappingURL=index.js.map
|