@zudojs/core 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -0
- package/dist/.tsbuildinfo +1 -0
- package/dist/application/application.d.ts +25 -0
- package/dist/application/application.d.ts.map +1 -0
- package/dist/application/application.js +86 -0
- package/dist/application/application.js.map +1 -0
- package/dist/application/applicationContext.context.d.ts +40 -0
- package/dist/application/applicationContext.context.d.ts.map +1 -0
- package/dist/application/applicationContext.context.js +43 -0
- package/dist/application/applicationContext.context.js.map +1 -0
- package/dist/application/applicationState.state.d.ts +5 -0
- package/dist/application/applicationState.state.d.ts.map +1 -0
- package/dist/application/applicationState.state.js +2 -0
- package/dist/application/applicationState.state.js.map +1 -0
- package/dist/application/index.d.ts +10 -0
- package/dist/application/index.d.ts.map +1 -0
- package/dist/application/index.js +10 -0
- package/dist/application/index.js.map +1 -0
- package/dist/configuration/configurationManager.manager.d.ts +68 -0
- package/dist/configuration/configurationManager.manager.d.ts.map +1 -0
- package/dist/configuration/configurationManager.manager.js +157 -0
- package/dist/configuration/configurationManager.manager.js.map +1 -0
- package/dist/configuration/core/configuration.d.ts +53 -0
- package/dist/configuration/core/configuration.d.ts.map +1 -0
- package/dist/configuration/core/configuration.js +206 -0
- package/dist/configuration/core/configuration.js.map +1 -0
- package/dist/configuration/core/configurationKey.key.d.ts +43 -0
- package/dist/configuration/core/configurationKey.key.d.ts.map +1 -0
- package/dist/configuration/core/configurationKey.key.js +27 -0
- package/dist/configuration/core/configurationKey.key.js.map +1 -0
- package/dist/configuration/core/configurationSource.source.d.ts +114 -0
- package/dist/configuration/core/configurationSource.source.d.ts.map +1 -0
- package/dist/configuration/core/configurationSource.source.js +55 -0
- package/dist/configuration/core/configurationSource.source.js.map +1 -0
- package/dist/configuration/core/index.d.ts +12 -0
- package/dist/configuration/core/index.d.ts.map +1 -0
- package/dist/configuration/core/index.js +9 -0
- package/dist/configuration/core/index.js.map +1 -0
- package/dist/configuration/error/configurationError.error.d.ts +108 -0
- package/dist/configuration/error/configurationError.error.d.ts.map +1 -0
- package/dist/configuration/error/configurationError.error.js +168 -0
- package/dist/configuration/error/configurationError.error.js.map +1 -0
- package/dist/configuration/error/configurationRedactor.redactor.d.ts +111 -0
- package/dist/configuration/error/configurationRedactor.redactor.d.ts.map +1 -0
- package/dist/configuration/error/configurationRedactor.redactor.js +176 -0
- package/dist/configuration/error/configurationRedactor.redactor.js.map +1 -0
- package/dist/configuration/error/index.d.ts +10 -0
- package/dist/configuration/error/index.d.ts.map +1 -0
- package/dist/configuration/error/index.js +8 -0
- package/dist/configuration/error/index.js.map +1 -0
- package/dist/configuration/events/configurationEvents.events.d.ts +174 -0
- package/dist/configuration/events/configurationEvents.events.d.ts.map +1 -0
- package/dist/configuration/events/configurationEvents.events.js +99 -0
- package/dist/configuration/events/configurationEvents.events.js.map +1 -0
- package/dist/configuration/events/index.d.ts +8 -0
- package/dist/configuration/events/index.d.ts.map +1 -0
- package/dist/configuration/events/index.js +7 -0
- package/dist/configuration/events/index.js.map +1 -0
- package/dist/configuration/index.d.ts +30 -0
- package/dist/configuration/index.d.ts.map +1 -0
- package/dist/configuration/index.js +29 -0
- package/dist/configuration/index.js.map +1 -0
- package/dist/configuration/loader/configurationLoader.loader.d.ts +113 -0
- package/dist/configuration/loader/configurationLoader.loader.d.ts.map +1 -0
- package/dist/configuration/loader/configurationLoader.loader.js +155 -0
- package/dist/configuration/loader/configurationLoader.loader.js.map +1 -0
- package/dist/configuration/loader/index.d.ts +8 -0
- package/dist/configuration/loader/index.d.ts.map +1 -0
- package/dist/configuration/loader/index.js +7 -0
- package/dist/configuration/loader/index.js.map +1 -0
- package/dist/configuration/registry/configurationProvider.provider.d.ts +130 -0
- package/dist/configuration/registry/configurationProvider.provider.d.ts.map +1 -0
- package/dist/configuration/registry/configurationProvider.provider.js +113 -0
- package/dist/configuration/registry/configurationProvider.provider.js.map +1 -0
- package/dist/configuration/registry/configurationRegistry.registry.d.ts +143 -0
- package/dist/configuration/registry/configurationRegistry.registry.d.ts.map +1 -0
- package/dist/configuration/registry/configurationRegistry.registry.js +157 -0
- package/dist/configuration/registry/configurationRegistry.registry.js.map +1 -0
- package/dist/configuration/registry/index.d.ts +10 -0
- package/dist/configuration/registry/index.d.ts.map +1 -0
- package/dist/configuration/registry/index.js +8 -0
- package/dist/configuration/registry/index.js.map +1 -0
- package/dist/configuration/schema/configurationSchema.schema.d.ts +159 -0
- package/dist/configuration/schema/configurationSchema.schema.d.ts.map +1 -0
- package/dist/configuration/schema/configurationSchema.schema.js +155 -0
- package/dist/configuration/schema/configurationSchema.schema.js.map +1 -0
- package/dist/configuration/schema/configurationValidation.validator.d.ts +82 -0
- package/dist/configuration/schema/configurationValidation.validator.d.ts.map +1 -0
- package/dist/configuration/schema/configurationValidation.validator.js +110 -0
- package/dist/configuration/schema/configurationValidation.validator.js.map +1 -0
- package/dist/configuration/schema/index.d.ts +10 -0
- package/dist/configuration/schema/index.d.ts.map +1 -0
- package/dist/configuration/schema/index.js +8 -0
- package/dist/configuration/schema/index.js.map +1 -0
- package/dist/container/container.d.ts +43 -0
- package/dist/container/container.d.ts.map +1 -0
- package/dist/container/container.js +91 -0
- package/dist/container/container.js.map +1 -0
- package/dist/container/index.d.ts +8 -0
- package/dist/container/index.d.ts.map +1 -0
- package/dist/container/index.js +8 -0
- package/dist/container/index.js.map +1 -0
- package/dist/container/provider.d.ts +28 -0
- package/dist/container/provider.d.ts.map +1 -0
- package/dist/container/provider.js +2 -0
- package/dist/container/provider.js.map +1 -0
- package/dist/container/scope.d.ts +24 -0
- package/dist/container/scope.d.ts.map +1 -0
- package/dist/container/scope.js +2 -0
- package/dist/container/scope.js.map +1 -0
- package/dist/container/token.d.ts +18 -0
- package/dist/container/token.d.ts.map +1 -0
- package/dist/container/token.js +10 -0
- package/dist/container/token.js.map +1 -0
- package/dist/context/core/context.d.ts +95 -0
- package/dist/context/core/context.d.ts.map +1 -0
- package/dist/context/core/context.js +103 -0
- package/dist/context/core/context.js.map +1 -0
- package/dist/context/core/contextKey.key.d.ts +60 -0
- package/dist/context/core/contextKey.key.d.ts.map +1 -0
- package/dist/context/core/contextKey.key.js +58 -0
- package/dist/context/core/contextKey.key.js.map +1 -0
- package/dist/context/core/executionContext.context.d.ts +131 -0
- package/dist/context/core/executionContext.context.d.ts.map +1 -0
- package/dist/context/core/executionContext.context.js +81 -0
- package/dist/context/core/executionContext.context.js.map +1 -0
- package/dist/context/core/index.d.ts +9 -0
- package/dist/context/core/index.d.ts.map +1 -0
- package/dist/context/core/index.js +9 -0
- package/dist/context/core/index.js.map +1 -0
- package/dist/context/index.d.ts +8 -0
- package/dist/context/index.d.ts.map +1 -0
- package/dist/context/index.js +8 -0
- package/dist/context/index.js.map +1 -0
- package/dist/context/provider/contextProvider.provider.d.ts +61 -0
- package/dist/context/provider/contextProvider.provider.d.ts.map +1 -0
- package/dist/context/provider/contextProvider.provider.js +44 -0
- package/dist/context/provider/contextProvider.provider.js.map +1 -0
- package/dist/context/provider/contextStorage.storage.d.ts +54 -0
- package/dist/context/provider/contextStorage.storage.d.ts.map +1 -0
- package/dist/context/provider/contextStorage.storage.js +74 -0
- package/dist/context/provider/contextStorage.storage.js.map +1 -0
- package/dist/context/provider/index.d.ts +8 -0
- package/dist/context/provider/index.d.ts.map +1 -0
- package/dist/context/provider/index.js +8 -0
- package/dist/context/provider/index.js.map +1 -0
- package/dist/context/snapshot/contextSnapshot.snapshot.d.ts +48 -0
- package/dist/context/snapshot/contextSnapshot.snapshot.d.ts.map +1 -0
- package/dist/context/snapshot/contextSnapshot.snapshot.js +33 -0
- package/dist/context/snapshot/contextSnapshot.snapshot.js.map +1 -0
- package/dist/context/snapshot/index.d.ts +8 -0
- package/dist/context/snapshot/index.d.ts.map +1 -0
- package/dist/context/snapshot/index.js +8 -0
- package/dist/context/snapshot/index.js.map +1 -0
- package/dist/context/values/contextValues.values.d.ts +84 -0
- package/dist/context/values/contextValues.values.d.ts.map +1 -0
- package/dist/context/values/contextValues.values.js +120 -0
- package/dist/context/values/contextValues.values.js.map +1 -0
- package/dist/context/values/index.d.ts +7 -0
- package/dist/context/values/index.d.ts.map +1 -0
- package/dist/context/values/index.js +7 -0
- package/dist/context/values/index.js.map +1 -0
- package/dist/contracts/adapter.d.ts +44 -0
- package/dist/contracts/adapter.d.ts.map +1 -0
- package/dist/contracts/adapter.js +2 -0
- package/dist/contracts/adapter.js.map +1 -0
- package/dist/contracts/disposable.d.ts +23 -0
- package/dist/contracts/disposable.d.ts.map +1 -0
- package/dist/contracts/disposable.js +2 -0
- package/dist/contracts/disposable.js.map +1 -0
- package/dist/contracts/handler.d.ts +32 -0
- package/dist/contracts/handler.d.ts.map +1 -0
- package/dist/contracts/handler.js +9 -0
- package/dist/contracts/handler.js.map +1 -0
- package/dist/contracts/index.d.ts +7 -0
- package/dist/contracts/index.d.ts.map +1 -0
- package/dist/contracts/index.js +7 -0
- package/dist/contracts/index.js.map +1 -0
- package/dist/errors/errorCode.code.d.ts +78 -0
- package/dist/errors/errorCode.code.d.ts.map +1 -0
- package/dist/errors/errorCode.code.js +84 -0
- package/dist/errors/errorCode.code.js.map +1 -0
- package/dist/errors/exceptions.d.ts +52 -0
- package/dist/errors/exceptions.d.ts.map +1 -0
- package/dist/errors/exceptions.js +125 -0
- package/dist/errors/exceptions.js.map +1 -0
- package/dist/errors/frameworkError.error.d.ts +51 -0
- package/dist/errors/frameworkError.error.d.ts.map +1 -0
- package/dist/errors/frameworkError.error.js +54 -0
- package/dist/errors/frameworkError.error.js.map +1 -0
- package/dist/errors/index.d.ts +10 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/index.js +9 -0
- package/dist/errors/index.js.map +1 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +75 -0
- package/dist/index.js.map +1 -0
- package/dist/lifecycle/core/index.d.ts +9 -0
- package/dist/lifecycle/core/index.d.ts.map +1 -0
- package/dist/lifecycle/core/index.js +9 -0
- package/dist/lifecycle/core/index.js.map +1 -0
- package/dist/lifecycle/core/lifecycle.d.ts +44 -0
- package/dist/lifecycle/core/lifecycle.d.ts.map +1 -0
- package/dist/lifecycle/core/lifecycle.js +179 -0
- package/dist/lifecycle/core/lifecycle.js.map +1 -0
- package/dist/lifecycle/core/lifecycleHook.hook.d.ts +59 -0
- package/dist/lifecycle/core/lifecycleHook.hook.d.ts.map +1 -0
- package/dist/lifecycle/core/lifecycleHook.hook.js +37 -0
- package/dist/lifecycle/core/lifecycleHook.hook.js.map +1 -0
- package/dist/lifecycle/core/lifecycleRegistry.registry.d.ts +101 -0
- package/dist/lifecycle/core/lifecycleRegistry.registry.d.ts.map +1 -0
- package/dist/lifecycle/core/lifecycleRegistry.registry.js +115 -0
- package/dist/lifecycle/core/lifecycleRegistry.registry.js.map +1 -0
- package/dist/lifecycle/core/lifecycleState.state.d.ts +2 -0
- package/dist/lifecycle/core/lifecycleState.state.d.ts.map +1 -0
- package/dist/lifecycle/core/lifecycleState.state.js +2 -0
- package/dist/lifecycle/core/lifecycleState.state.js.map +1 -0
- package/dist/lifecycle/index.d.ts +10 -0
- package/dist/lifecycle/index.d.ts.map +1 -0
- package/dist/lifecycle/index.js +10 -0
- package/dist/lifecycle/index.js.map +1 -0
- package/dist/lifecycle/manager/index.d.ts +7 -0
- package/dist/lifecycle/manager/index.d.ts.map +1 -0
- package/dist/lifecycle/manager/index.js +7 -0
- package/dist/lifecycle/manager/index.js.map +1 -0
- package/dist/lifecycle/manager/lifecycleManager.manager.d.ts +33 -0
- package/dist/lifecycle/manager/lifecycleManager.manager.d.ts.map +1 -0
- package/dist/lifecycle/manager/lifecycleManager.manager.js +157 -0
- package/dist/lifecycle/manager/lifecycleManager.manager.js.map +1 -0
- package/dist/lifecycle/scope/index.d.ts +8 -0
- package/dist/lifecycle/scope/index.d.ts.map +1 -0
- package/dist/lifecycle/scope/index.js +8 -0
- package/dist/lifecycle/scope/index.js.map +1 -0
- package/dist/lifecycle/scope/lifecycleScope.scope.d.ts +49 -0
- package/dist/lifecycle/scope/lifecycleScope.scope.d.ts.map +1 -0
- package/dist/lifecycle/scope/lifecycleScope.scope.js +234 -0
- package/dist/lifecycle/scope/lifecycleScope.scope.js.map +1 -0
- package/dist/logging/console/consoleLogger.logger.d.ts +59 -0
- package/dist/logging/console/consoleLogger.logger.d.ts.map +1 -0
- package/dist/logging/console/consoleLogger.logger.js +180 -0
- package/dist/logging/console/consoleLogger.logger.js.map +1 -0
- package/dist/logging/console/index.d.ts +8 -0
- package/dist/logging/console/index.d.ts.map +1 -0
- package/dist/logging/console/index.js +8 -0
- package/dist/logging/console/index.js.map +1 -0
- package/dist/logging/console/loggerFactory.factory.d.ts +45 -0
- package/dist/logging/console/loggerFactory.factory.d.ts.map +1 -0
- package/dist/logging/console/loggerFactory.factory.js +37 -0
- package/dist/logging/console/loggerFactory.factory.js.map +1 -0
- package/dist/logging/core/index.d.ts +11 -0
- package/dist/logging/core/index.d.ts.map +1 -0
- package/dist/logging/core/index.js +11 -0
- package/dist/logging/core/index.js.map +1 -0
- package/dist/logging/core/logEntry.entry.d.ts +73 -0
- package/dist/logging/core/logEntry.entry.d.ts.map +1 -0
- package/dist/logging/core/logEntry.entry.js +38 -0
- package/dist/logging/core/logEntry.entry.js.map +1 -0
- package/dist/logging/core/logLevel.level.d.ts +29 -0
- package/dist/logging/core/logLevel.level.d.ts.map +1 -0
- package/dist/logging/core/logLevel.level.js +34 -0
- package/dist/logging/core/logLevel.level.js.map +1 -0
- package/dist/logging/core/logger.d.ts +80 -0
- package/dist/logging/core/logger.d.ts.map +1 -0
- package/dist/logging/core/logger.js +39 -0
- package/dist/logging/core/logger.js.map +1 -0
- package/dist/logging/core/loggerContext.context.d.ts +62 -0
- package/dist/logging/core/loggerContext.context.d.ts.map +1 -0
- package/dist/logging/core/loggerContext.context.js +19 -0
- package/dist/logging/core/loggerContext.context.js.map +1 -0
- package/dist/logging/core/loggerOptions.options.d.ts +69 -0
- package/dist/logging/core/loggerOptions.options.d.ts.map +1 -0
- package/dist/logging/core/loggerOptions.options.js +10 -0
- package/dist/logging/core/loggerOptions.options.js.map +1 -0
- package/dist/logging/index.d.ts +8 -0
- package/dist/logging/index.d.ts.map +1 -0
- package/dist/logging/index.js +8 -0
- package/dist/logging/index.js.map +1 -0
- package/dist/modules/index.d.ts +20 -0
- package/dist/modules/index.d.ts.map +1 -0
- package/dist/modules/index.js +52 -0
- package/dist/modules/index.js.map +1 -0
- package/dist/modules/module.d.ts +171 -0
- package/dist/modules/module.d.ts.map +1 -0
- package/dist/modules/module.js +99 -0
- package/dist/modules/module.js.map +1 -0
- package/dist/modules/moduleContext.context.d.ts +170 -0
- package/dist/modules/moduleContext.context.d.ts.map +1 -0
- package/dist/modules/moduleContext.context.js +82 -0
- package/dist/modules/moduleContext.context.js.map +1 -0
- package/dist/modules/moduleDefinition.definition.d.ts +112 -0
- package/dist/modules/moduleDefinition.definition.d.ts.map +1 -0
- package/dist/modules/moduleDefinition.definition.js +101 -0
- package/dist/modules/moduleDefinition.definition.js.map +1 -0
- package/dist/modules/moduleDependency/index.d.ts +10 -0
- package/dist/modules/moduleDependency/index.d.ts.map +1 -0
- package/dist/modules/moduleDependency/index.js +10 -0
- package/dist/modules/moduleDependency/index.js.map +1 -0
- package/dist/modules/moduleDependency/moduleDependency.graph.d.ts +43 -0
- package/dist/modules/moduleDependency/moduleDependency.graph.d.ts.map +1 -0
- package/dist/modules/moduleDependency/moduleDependency.graph.js +175 -0
- package/dist/modules/moduleDependency/moduleDependency.graph.js.map +1 -0
- package/dist/modules/moduleDependency/moduleDependency.ordering.d.ts +38 -0
- package/dist/modules/moduleDependency/moduleDependency.ordering.d.ts.map +1 -0
- package/dist/modules/moduleDependency/moduleDependency.ordering.js +112 -0
- package/dist/modules/moduleDependency/moduleDependency.ordering.js.map +1 -0
- package/dist/modules/moduleDependency/moduleDependency.type.d.ts +66 -0
- package/dist/modules/moduleDependency/moduleDependency.type.d.ts.map +1 -0
- package/dist/modules/moduleDependency/moduleDependency.type.js +2 -0
- package/dist/modules/moduleDependency/moduleDependency.type.js.map +1 -0
- package/dist/modules/moduleError/index.d.ts +11 -0
- package/dist/modules/moduleError/index.d.ts.map +1 -0
- package/dist/modules/moduleError/index.js +11 -0
- package/dist/modules/moduleError/index.js.map +1 -0
- package/dist/modules/moduleError/moduleError.base.d.ts +119 -0
- package/dist/modules/moduleError/moduleError.base.d.ts.map +1 -0
- package/dist/modules/moduleError/moduleError.base.js +105 -0
- package/dist/modules/moduleError/moduleError.base.js.map +1 -0
- package/dist/modules/moduleError/moduleError.dependency.d.ts +45 -0
- package/dist/modules/moduleError/moduleError.dependency.d.ts.map +1 -0
- package/dist/modules/moduleError/moduleError.dependency.js +55 -0
- package/dist/modules/moduleError/moduleError.dependency.js.map +1 -0
- package/dist/modules/moduleError/moduleError.helpers.d.ts +22 -0
- package/dist/modules/moduleError/moduleError.helpers.d.ts.map +1 -0
- package/dist/modules/moduleError/moduleError.helpers.js +32 -0
- package/dist/modules/moduleError/moduleError.helpers.js.map +1 -0
- package/dist/modules/moduleError/moduleError.lifecycle.d.ts +61 -0
- package/dist/modules/moduleError/moduleError.lifecycle.d.ts.map +1 -0
- package/dist/modules/moduleError/moduleError.lifecycle.js +107 -0
- package/dist/modules/moduleError/moduleError.lifecycle.js.map +1 -0
- package/dist/modules/moduleError/moduleError.registration.d.ts +21 -0
- package/dist/modules/moduleError/moduleError.registration.d.ts.map +1 -0
- package/dist/modules/moduleError/moduleError.registration.js +39 -0
- package/dist/modules/moduleError/moduleError.registration.js.map +1 -0
- package/dist/modules/moduleLifecycle/index.d.ts +10 -0
- package/dist/modules/moduleLifecycle/index.d.ts.map +1 -0
- package/dist/modules/moduleLifecycle/index.js +10 -0
- package/dist/modules/moduleLifecycle/index.js.map +1 -0
- package/dist/modules/moduleLifecycle/moduleLifecycle.lifecycle.d.ts +41 -0
- package/dist/modules/moduleLifecycle/moduleLifecycle.lifecycle.d.ts.map +1 -0
- package/dist/modules/moduleLifecycle/moduleLifecycle.lifecycle.js +116 -0
- package/dist/modules/moduleLifecycle/moduleLifecycle.lifecycle.js.map +1 -0
- package/dist/modules/moduleLifecycle/moduleLifecycle.stateMachine.d.ts +21 -0
- package/dist/modules/moduleLifecycle/moduleLifecycle.stateMachine.d.ts.map +1 -0
- package/dist/modules/moduleLifecycle/moduleLifecycle.stateMachine.js +107 -0
- package/dist/modules/moduleLifecycle/moduleLifecycle.stateMachine.js.map +1 -0
- package/dist/modules/moduleLifecycle/moduleLifecycle.type.d.ts +94 -0
- package/dist/modules/moduleLifecycle/moduleLifecycle.type.d.ts.map +1 -0
- package/dist/modules/moduleLifecycle/moduleLifecycle.type.js +11 -0
- package/dist/modules/moduleLifecycle/moduleLifecycle.type.js.map +1 -0
- package/dist/modules/moduleLoader/index.d.ts +9 -0
- package/dist/modules/moduleLoader/index.d.ts.map +1 -0
- package/dist/modules/moduleLoader/index.js +9 -0
- package/dist/modules/moduleLoader/index.js.map +1 -0
- package/dist/modules/moduleLoader/moduleLoader.loader.d.ts +36 -0
- package/dist/modules/moduleLoader/moduleLoader.loader.d.ts.map +1 -0
- package/dist/modules/moduleLoader/moduleLoader.loader.js +164 -0
- package/dist/modules/moduleLoader/moduleLoader.loader.js.map +1 -0
- package/dist/modules/moduleLoader/moduleLoader.type.d.ts +57 -0
- package/dist/modules/moduleLoader/moduleLoader.type.d.ts.map +1 -0
- package/dist/modules/moduleLoader/moduleLoader.type.js +11 -0
- package/dist/modules/moduleLoader/moduleLoader.type.js.map +1 -0
- package/dist/modules/moduleMetadata.metadata.d.ts +36 -0
- package/dist/modules/moduleMetadata.metadata.d.ts.map +1 -0
- package/dist/modules/moduleMetadata.metadata.js +105 -0
- package/dist/modules/moduleMetadata.metadata.js.map +1 -0
- package/dist/modules/moduleRegistry/index.d.ts +8 -0
- package/dist/modules/moduleRegistry/index.d.ts.map +1 -0
- package/dist/modules/moduleRegistry/index.js +8 -0
- package/dist/modules/moduleRegistry/index.js.map +1 -0
- package/dist/modules/moduleRegistry/moduleRegistry.registry.d.ts +35 -0
- package/dist/modules/moduleRegistry/moduleRegistry.registry.d.ts.map +1 -0
- package/dist/modules/moduleRegistry/moduleRegistry.registry.js +155 -0
- package/dist/modules/moduleRegistry/moduleRegistry.registry.js.map +1 -0
- package/dist/modules/moduleRegistry/moduleRegistry.type.d.ts +134 -0
- package/dist/modules/moduleRegistry/moduleRegistry.type.d.ts.map +1 -0
- package/dist/modules/moduleRegistry/moduleRegistry.type.js +2 -0
- package/dist/modules/moduleRegistry/moduleRegistry.type.js.map +1 -0
- package/dist/runtime/index.d.ts +24 -0
- package/dist/runtime/index.d.ts.map +1 -0
- package/dist/runtime/index.js +42 -0
- package/dist/runtime/index.js.map +1 -0
- package/dist/runtime/runtime.d.ts +89 -0
- package/dist/runtime/runtime.d.ts.map +1 -0
- package/dist/runtime/runtime.js +179 -0
- package/dist/runtime/runtime.js.map +1 -0
- package/dist/runtime/runtimeBootstrap/index.d.ts +10 -0
- package/dist/runtime/runtimeBootstrap/index.d.ts.map +1 -0
- package/dist/runtime/runtimeBootstrap/index.js +9 -0
- package/dist/runtime/runtimeBootstrap/index.js.map +1 -0
- package/dist/runtime/runtimeBootstrap/pipeline/index.d.ts +8 -0
- package/dist/runtime/runtimeBootstrap/pipeline/index.d.ts.map +1 -0
- package/dist/runtime/runtimeBootstrap/pipeline/index.js +8 -0
- package/dist/runtime/runtimeBootstrap/pipeline/index.js.map +1 -0
- package/dist/runtime/runtimeBootstrap/pipeline/runtimeBootstrap.invoke.d.ts +6 -0
- package/dist/runtime/runtimeBootstrap/pipeline/runtimeBootstrap.invoke.d.ts.map +1 -0
- package/dist/runtime/runtimeBootstrap/pipeline/runtimeBootstrap.invoke.js +27 -0
- package/dist/runtime/runtimeBootstrap/pipeline/runtimeBootstrap.invoke.js.map +1 -0
- package/dist/runtime/runtimeBootstrap/pipeline/runtimeBootstrap.pipeline.d.ts +19 -0
- package/dist/runtime/runtimeBootstrap/pipeline/runtimeBootstrap.pipeline.d.ts.map +1 -0
- package/dist/runtime/runtimeBootstrap/pipeline/runtimeBootstrap.pipeline.js +107 -0
- package/dist/runtime/runtimeBootstrap/pipeline/runtimeBootstrap.pipeline.js.map +1 -0
- package/dist/runtime/runtimeBootstrap/runtimeBootstrap.core.d.ts +25 -0
- package/dist/runtime/runtimeBootstrap/runtimeBootstrap.core.d.ts.map +1 -0
- package/dist/runtime/runtimeBootstrap/runtimeBootstrap.core.js +122 -0
- package/dist/runtime/runtimeBootstrap/runtimeBootstrap.core.js.map +1 -0
- package/dist/runtime/runtimeBootstrap/runtimeBootstrap.type.d.ts +78 -0
- package/dist/runtime/runtimeBootstrap/runtimeBootstrap.type.d.ts.map +1 -0
- package/dist/runtime/runtimeBootstrap/runtimeBootstrap.type.js +2 -0
- package/dist/runtime/runtimeBootstrap/runtimeBootstrap.type.js.map +1 -0
- package/dist/runtime/runtimeContext/index.d.ts +10 -0
- package/dist/runtime/runtimeContext/index.d.ts.map +1 -0
- package/dist/runtime/runtimeContext/index.js +9 -0
- package/dist/runtime/runtimeContext/index.js.map +1 -0
- package/dist/runtime/runtimeContext/runtimeContext.core.d.ts +38 -0
- package/dist/runtime/runtimeContext/runtimeContext.core.d.ts.map +1 -0
- package/dist/runtime/runtimeContext/runtimeContext.core.js +99 -0
- package/dist/runtime/runtimeContext/runtimeContext.core.js.map +1 -0
- package/dist/runtime/runtimeContext/runtimeContext.factory.d.ts +22 -0
- package/dist/runtime/runtimeContext/runtimeContext.factory.d.ts.map +1 -0
- package/dist/runtime/runtimeContext/runtimeContext.factory.js +43 -0
- package/dist/runtime/runtimeContext/runtimeContext.factory.js.map +1 -0
- package/dist/runtime/runtimeContext/runtimeContext.type.d.ts +68 -0
- package/dist/runtime/runtimeContext/runtimeContext.type.d.ts.map +1 -0
- package/dist/runtime/runtimeContext/runtimeContext.type.js +2 -0
- package/dist/runtime/runtimeContext/runtimeContext.type.js.map +1 -0
- package/dist/runtime/runtimeEnvironment/detection/index.d.ts +9 -0
- package/dist/runtime/runtimeEnvironment/detection/index.d.ts.map +1 -0
- package/dist/runtime/runtimeEnvironment/detection/index.js +9 -0
- package/dist/runtime/runtimeEnvironment/detection/index.js.map +1 -0
- package/dist/runtime/runtimeEnvironment/detection/runtimeEnvironment.detection.d.ts +8 -0
- package/dist/runtime/runtimeEnvironment/detection/runtimeEnvironment.detection.d.ts.map +1 -0
- package/dist/runtime/runtimeEnvironment/detection/runtimeEnvironment.detection.js +92 -0
- package/dist/runtime/runtimeEnvironment/detection/runtimeEnvironment.detection.js.map +1 -0
- package/dist/runtime/runtimeEnvironment/detection/runtimeEnvironment.env.d.ts +4 -0
- package/dist/runtime/runtimeEnvironment/detection/runtimeEnvironment.env.d.ts.map +1 -0
- package/dist/runtime/runtimeEnvironment/detection/runtimeEnvironment.env.js +51 -0
- package/dist/runtime/runtimeEnvironment/detection/runtimeEnvironment.env.js.map +1 -0
- package/dist/runtime/runtimeEnvironment/detection/runtimeEnvironment.os.d.ts +4 -0
- package/dist/runtime/runtimeEnvironment/detection/runtimeEnvironment.os.d.ts.map +1 -0
- package/dist/runtime/runtimeEnvironment/detection/runtimeEnvironment.os.js +26 -0
- package/dist/runtime/runtimeEnvironment/detection/runtimeEnvironment.os.js.map +1 -0
- package/dist/runtime/runtimeEnvironment/index.d.ts +10 -0
- package/dist/runtime/runtimeEnvironment/index.d.ts.map +1 -0
- package/dist/runtime/runtimeEnvironment/index.js +9 -0
- package/dist/runtime/runtimeEnvironment/index.js.map +1 -0
- package/dist/runtime/runtimeEnvironment/runtimeEnvironment.core.d.ts +41 -0
- package/dist/runtime/runtimeEnvironment/runtimeEnvironment.core.d.ts.map +1 -0
- package/dist/runtime/runtimeEnvironment/runtimeEnvironment.core.js +105 -0
- package/dist/runtime/runtimeEnvironment/runtimeEnvironment.core.js.map +1 -0
- package/dist/runtime/runtimeEnvironment/runtimeEnvironment.type.d.ts +108 -0
- package/dist/runtime/runtimeEnvironment/runtimeEnvironment.type.d.ts.map +1 -0
- package/dist/runtime/runtimeEnvironment/runtimeEnvironment.type.js +2 -0
- package/dist/runtime/runtimeEnvironment/runtimeEnvironment.type.js.map +1 -0
- package/dist/runtime/runtimeError/index.d.ts +29 -0
- package/dist/runtime/runtimeError/index.d.ts.map +1 -0
- package/dist/runtime/runtimeError/index.js +47 -0
- package/dist/runtime/runtimeError/index.js.map +1 -0
- package/dist/runtime/runtimeError/runtimeError.base.d.ts +30 -0
- package/dist/runtime/runtimeError/runtimeError.base.d.ts.map +1 -0
- package/dist/runtime/runtimeError/runtimeError.base.js +81 -0
- package/dist/runtime/runtimeError/runtimeError.base.js.map +1 -0
- package/dist/runtime/runtimeError/runtimeError.lifecycle.d.ts +35 -0
- package/dist/runtime/runtimeError/runtimeError.lifecycle.d.ts.map +1 -0
- package/dist/runtime/runtimeError/runtimeError.lifecycle.js +77 -0
- package/dist/runtime/runtimeError/runtimeError.lifecycle.js.map +1 -0
- package/dist/runtime/runtimeError/runtimeError.specialized.d.ts +35 -0
- package/dist/runtime/runtimeError/runtimeError.specialized.d.ts.map +1 -0
- package/dist/runtime/runtimeError/runtimeError.specialized.js +79 -0
- package/dist/runtime/runtimeError/runtimeError.specialized.js.map +1 -0
- package/dist/runtime/runtimeError/runtimeError.type.d.ts +74 -0
- package/dist/runtime/runtimeError/runtimeError.type.d.ts.map +1 -0
- package/dist/runtime/runtimeError/runtimeError.type.js +28 -0
- package/dist/runtime/runtimeError/runtimeError.type.js.map +1 -0
- package/dist/runtime/runtimeLogger.d.ts +5 -0
- package/dist/runtime/runtimeLogger.d.ts.map +1 -0
- package/dist/runtime/runtimeLogger.js +18 -0
- package/dist/runtime/runtimeLogger.js.map +1 -0
- package/dist/runtime/runtimeManager/index.d.ts +12 -0
- package/dist/runtime/runtimeManager/index.d.ts.map +1 -0
- package/dist/runtime/runtimeManager/index.js +11 -0
- package/dist/runtime/runtimeManager/index.js.map +1 -0
- package/dist/runtime/runtimeManager/runtimeManager.core.d.ts +31 -0
- package/dist/runtime/runtimeManager/runtimeManager.core.d.ts.map +1 -0
- package/dist/runtime/runtimeManager/runtimeManager.core.js +136 -0
- package/dist/runtime/runtimeManager/runtimeManager.core.js.map +1 -0
- package/dist/runtime/runtimeManager/runtimeManager.error.d.ts +14 -0
- package/dist/runtime/runtimeManager/runtimeManager.error.d.ts.map +1 -0
- package/dist/runtime/runtimeManager/runtimeManager.error.js +21 -0
- package/dist/runtime/runtimeManager/runtimeManager.error.js.map +1 -0
- package/dist/runtime/runtimeManager/runtimeManager.factory.d.ts +7 -0
- package/dist/runtime/runtimeManager/runtimeManager.factory.d.ts.map +1 -0
- package/dist/runtime/runtimeManager/runtimeManager.factory.js +8 -0
- package/dist/runtime/runtimeManager/runtimeManager.factory.js.map +1 -0
- package/dist/runtime/runtimeManager/runtimeManager.lifecycle.d.ts +16 -0
- package/dist/runtime/runtimeManager/runtimeManager.lifecycle.d.ts.map +1 -0
- package/dist/runtime/runtimeManager/runtimeManager.lifecycle.js +49 -0
- package/dist/runtime/runtimeManager/runtimeManager.lifecycle.js.map +1 -0
- package/dist/runtime/runtimeManager/runtimeManager.type.d.ts +54 -0
- package/dist/runtime/runtimeManager/runtimeManager.type.d.ts.map +1 -0
- package/dist/runtime/runtimeManager/runtimeManager.type.js +2 -0
- package/dist/runtime/runtimeManager/runtimeManager.type.js.map +1 -0
- package/dist/runtime/runtimeOptions/index.d.ts +10 -0
- package/dist/runtime/runtimeOptions/index.d.ts.map +1 -0
- package/dist/runtime/runtimeOptions/index.js +9 -0
- package/dist/runtime/runtimeOptions/index.js.map +1 -0
- package/dist/runtime/runtimeOptions/runtimeOptions.defaults.d.ts +6 -0
- package/dist/runtime/runtimeOptions/runtimeOptions.defaults.d.ts.map +1 -0
- package/dist/runtime/runtimeOptions/runtimeOptions.defaults.js +37 -0
- package/dist/runtime/runtimeOptions/runtimeOptions.defaults.js.map +1 -0
- package/dist/runtime/runtimeOptions/runtimeOptions.resolver.d.ts +10 -0
- package/dist/runtime/runtimeOptions/runtimeOptions.resolver.d.ts.map +1 -0
- package/dist/runtime/runtimeOptions/runtimeOptions.resolver.js +80 -0
- package/dist/runtime/runtimeOptions/runtimeOptions.resolver.js.map +1 -0
- package/dist/runtime/runtimeOptions/runtimeOptions.type.d.ts +94 -0
- package/dist/runtime/runtimeOptions/runtimeOptions.type.d.ts.map +1 -0
- package/dist/runtime/runtimeOptions/runtimeOptions.type.js +2 -0
- package/dist/runtime/runtimeOptions/runtimeOptions.type.js.map +1 -0
- package/dist/runtime/runtimeOptions/runtimeOptions.validation.d.ts +26 -0
- package/dist/runtime/runtimeOptions/runtimeOptions.validation.d.ts.map +1 -0
- package/dist/runtime/runtimeOptions/runtimeOptions.validation.js +59 -0
- package/dist/runtime/runtimeOptions/runtimeOptions.validation.js.map +1 -0
- package/dist/runtime/runtimeShutdown/index.d.ts +10 -0
- package/dist/runtime/runtimeShutdown/index.d.ts.map +1 -0
- package/dist/runtime/runtimeShutdown/index.js +9 -0
- package/dist/runtime/runtimeShutdown/index.js.map +1 -0
- package/dist/runtime/runtimeShutdown/pipeline/index.d.ts +7 -0
- package/dist/runtime/runtimeShutdown/pipeline/index.d.ts.map +1 -0
- package/dist/runtime/runtimeShutdown/pipeline/index.js +7 -0
- package/dist/runtime/runtimeShutdown/pipeline/index.js.map +1 -0
- package/dist/runtime/runtimeShutdown/pipeline/runtimeShutdown.pipeline.d.ts +9 -0
- package/dist/runtime/runtimeShutdown/pipeline/runtimeShutdown.pipeline.d.ts.map +1 -0
- package/dist/runtime/runtimeShutdown/pipeline/runtimeShutdown.pipeline.js +67 -0
- package/dist/runtime/runtimeShutdown/pipeline/runtimeShutdown.pipeline.js.map +1 -0
- package/dist/runtime/runtimeShutdown/runtimeShutdown.core.d.ts +35 -0
- package/dist/runtime/runtimeShutdown/runtimeShutdown.core.d.ts.map +1 -0
- package/dist/runtime/runtimeShutdown/runtimeShutdown.core.js +147 -0
- package/dist/runtime/runtimeShutdown/runtimeShutdown.core.js.map +1 -0
- package/dist/runtime/runtimeShutdown/runtimeShutdown.type.d.ts +74 -0
- package/dist/runtime/runtimeShutdown/runtimeShutdown.type.d.ts.map +1 -0
- package/dist/runtime/runtimeShutdown/runtimeShutdown.type.js +2 -0
- package/dist/runtime/runtimeShutdown/runtimeShutdown.type.js.map +1 -0
- package/dist/runtime/runtimeState.state.d.ts +60 -0
- package/dist/runtime/runtimeState.state.d.ts.map +1 -0
- package/dist/runtime/runtimeState.state.js +157 -0
- package/dist/runtime/runtimeState.state.js.map +1 -0
- package/package.json +85 -0
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Registry responsible for lifecycle component registration
|
|
3
|
+
* and deterministic ordering.
|
|
4
|
+
*/
|
|
5
|
+
export class LifecycleRegistry {
|
|
6
|
+
registrations = [];
|
|
7
|
+
sequence = 0;
|
|
8
|
+
/**
|
|
9
|
+
* Registers a lifecycle component.
|
|
10
|
+
*
|
|
11
|
+
* Components are executed in registration order during
|
|
12
|
+
* initialization and startup.
|
|
13
|
+
*
|
|
14
|
+
* Components are executed in reverse registration order
|
|
15
|
+
* during stopping and destruction.
|
|
16
|
+
*/
|
|
17
|
+
register(component, name) {
|
|
18
|
+
const registration = {
|
|
19
|
+
id: this.createId(),
|
|
20
|
+
name: name ?? this.resolveComponentName(component),
|
|
21
|
+
component,
|
|
22
|
+
order: this.sequence,
|
|
23
|
+
isParticipant: this.isLifecycleParticipant(component),
|
|
24
|
+
};
|
|
25
|
+
this.sequence += 1;
|
|
26
|
+
this.registrations.push(registration);
|
|
27
|
+
return registration;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Unregisters a component by registration ID.
|
|
31
|
+
*/
|
|
32
|
+
unregister(id) {
|
|
33
|
+
const index = this.registrations.findIndex((registration) => registration.id === id);
|
|
34
|
+
if (index === -1) {
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
this.registrations.splice(index, 1);
|
|
38
|
+
return true;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Returns all registrations in initialization/startup order.
|
|
42
|
+
*/
|
|
43
|
+
getAll() {
|
|
44
|
+
return [...this.registrations].sort((a, b) => a.order - b.order);
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Returns all registrations in shutdown/destruction order.
|
|
48
|
+
*/
|
|
49
|
+
getReverse() {
|
|
50
|
+
return [...this.registrations].sort((a, b) => b.order - a.order);
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Finds a registration by ID.
|
|
54
|
+
*/
|
|
55
|
+
getById(id) {
|
|
56
|
+
return this.registrations.find((registration) => registration.id === id);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Finds a registration by component name.
|
|
60
|
+
*/
|
|
61
|
+
getByName(name) {
|
|
62
|
+
return this.registrations.find((registration) => registration.name === name);
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Checks whether a component is registered.
|
|
66
|
+
*/
|
|
67
|
+
has(component) {
|
|
68
|
+
return this.registrations.some((registration) => registration.component === component);
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Returns the number of registered components.
|
|
72
|
+
*/
|
|
73
|
+
size() {
|
|
74
|
+
return this.registrations.length;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Removes all registrations.
|
|
78
|
+
*/
|
|
79
|
+
clear() {
|
|
80
|
+
this.registrations.length = 0;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Creates a stable registration ID.
|
|
84
|
+
*/
|
|
85
|
+
createId() {
|
|
86
|
+
return `lifecycle:${this.sequence}`;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Determines whether a component is a full
|
|
90
|
+
* LifecycleParticipant.
|
|
91
|
+
*/
|
|
92
|
+
isLifecycleParticipant(component) {
|
|
93
|
+
return (typeof component === "object" &&
|
|
94
|
+
component !== null &&
|
|
95
|
+
"name" in component &&
|
|
96
|
+
typeof component.name === "string");
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Resolves a readable component name.
|
|
100
|
+
*/
|
|
101
|
+
resolveComponentName(component) {
|
|
102
|
+
if (this.isLifecycleParticipant(component)) {
|
|
103
|
+
return component.name;
|
|
104
|
+
}
|
|
105
|
+
if (typeof component === "object" &&
|
|
106
|
+
component !== null &&
|
|
107
|
+
"constructor" in component &&
|
|
108
|
+
typeof component.constructor === "function" &&
|
|
109
|
+
component.constructor.name) {
|
|
110
|
+
return component.constructor.name;
|
|
111
|
+
}
|
|
112
|
+
return "anonymous";
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
//# sourceMappingURL=lifecycleRegistry.registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lifecycleRegistry.registry.js","sourceRoot":"","sources":["../../../src/lifecycle/core/lifecycleRegistry.registry.ts"],"names":[],"mappings":"AA4CA;;;GAGG;AACH,MAAM,OAAO,iBAAiB;IACX,aAAa,GAA4B,EAAE,CAAC;IAErD,QAAQ,GAAG,CAAC,CAAC;IAErB;;;;;;;;OAQG;IACI,QAAQ,CACb,SAA6B,EAC7B,IAAa;QAEb,MAAM,YAAY,GAA0B;YAC1C,EAAE,EAAE,IAAI,CAAC,QAAQ,EAAE;YACnB,IAAI,EAAE,IAAI,IAAI,IAAI,CAAC,oBAAoB,CAAC,SAAS,CAAC;YAClD,SAAS;YACT,KAAK,EAAE,IAAI,CAAC,QAAQ;YACpB,aAAa,EAAE,IAAI,CAAC,sBAAsB,CAAC,SAAS,CAAC;SACtD,CAAC;QAEF,IAAI,CAAC,QAAQ,IAAI,CAAC,CAAC;QAEnB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAEtC,OAAO,YAAY,CAAC;IACtB,CAAC;IAED;;OAEG;IACI,UAAU,CAAC,EAAU;QAC1B,MAAM,KAAK,GAAG,IAAI,CAAC,aAAa,CAAC,SAAS,CACxC,CAAC,YAAY,EAAE,EAAE,CAAC,YAAY,CAAC,EA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I,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC;IAChC,CAAC;IAED;;OAEG;IACK,QAAQ;QACd,OAAO,aAAa,IAAI,CAAC,QAAQ,EAAE,CAAC;IACtC,CAAC;IAED;;;OAGG;IACK,sBAAsB,CAC5B,SAA6B;QAE7B,OAAO,CACL,OAAO,SAAS,KAAK,QAAQ;YAC7B,SAAS,KAAK,IAAI;YAClB,MAAM,IAAI,SAAS;YACnB,OAAO,SAAS,CAAC,IAAI,KAAK,QAAQ,CACnC,CAAC;IACJ,CAAC;IAED;;OAEG;IACK,oBAAoB,CAAC,SAA6B;QACxD,IAAI,IAAI,CAAC,sBAAsB,CAAC,SAAS,CAAC,EAAE,CAAC;YAC3C,OAAO,SAAS,CAAC,IAAI,CAAC;QACxB,CAAC;QAED,IACE,OAAO,SAAS,KAAK,QAAQ;YAC7B,SAAS,KAAK,IAAI;YAClB,aAAa,IAAI,SAAS;YAC1B,OAAO,SAAS,CAAC,WAAW,KAAK,UAAU;YAC3C,SAAS,CAAC,WAAW,CAAC,IAAI,EAC1B,CAAC;YACD,OAAO,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC;QACpC,CAAC;QAED,OAAO,WAAW,CAAC;IACrB,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lifecycleState.state.d.ts","sourceRoot":"","sources":["../../../src/lifecycle/core/lifecycleState.state.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lifecycleState.state.js","sourceRoot":"","sources":["../../../src/lifecycle/core/lifecycleState.state.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Core lifecycle state machine and participant contracts.
|
|
3
|
+
*
|
|
4
|
+
* Lifecycle is the internal implementation used by LifecycleManager.
|
|
5
|
+
* Consumers should use LifecycleManager as the primary API.
|
|
6
|
+
*/
|
|
7
|
+
export * from "./core/index.js";
|
|
8
|
+
export * from "./manager/index.js";
|
|
9
|
+
export * from "./scope/index.js";
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lifecycle/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,cAAc,iBAAiB,CAAC;AAEhC,cAAc,oBAAoB,CAAC;AAEnC,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Core lifecycle state machine and participant contracts.
|
|
3
|
+
*
|
|
4
|
+
* Lifecycle is the internal implementation used by LifecycleManager.
|
|
5
|
+
* Consumers should use LifecycleManager as the primary API.
|
|
6
|
+
*/
|
|
7
|
+
export * from "./core/index.js";
|
|
8
|
+
export * from "./manager/index.js";
|
|
9
|
+
export * from "./scope/index.js";
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/lifecycle/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,cAAc,iBAAiB,CAAC;AAEhC,cAAc,oBAAoB,CAAC;AAEnC,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lifecycle/manager/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,gBAAgB,EAChB,KAAK,uBAAuB,EAC5B,KAAK,yBAAyB,GAC/B,MAAM,+BAA+B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lifecycle/manager/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,gBAAgB,GAGjB,MAAM,+BAA+B,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { Logger } from "../../logging/core/logger.js";
|
|
2
|
+
import { type LifecycleHook } from "../core/lifecycleHook.hook.js";
|
|
3
|
+
import { LifecycleState, type LifecycleParticipant } from "../core/lifecycle.js";
|
|
4
|
+
/** Anything that can participate in the managed application lifecycle. */
|
|
5
|
+
export type ManagedLifecycleComponent = LifecycleParticipant | LifecycleHook;
|
|
6
|
+
/** Options for LifecycleManager. */
|
|
7
|
+
export interface LifecycleManagerOptions {
|
|
8
|
+
readonly logger?: Logger;
|
|
9
|
+
readonly continueOnShutdownError?: boolean;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Coordinates lifecycle hooks and lifecycle participants.
|
|
13
|
+
* Primary API for application-level lifecycle management.
|
|
14
|
+
*/
|
|
15
|
+
export declare class LifecycleManager {
|
|
16
|
+
private readonly lifecycle;
|
|
17
|
+
private readonly components;
|
|
18
|
+
private readonly logger?;
|
|
19
|
+
private readonly continueOnShutdownError;
|
|
20
|
+
constructor(options?: LifecycleManagerOptions);
|
|
21
|
+
getState(): LifecycleState;
|
|
22
|
+
getComponents(): readonly ManagedLifecycleComponent[];
|
|
23
|
+
register(component: ManagedLifecycleComponent): void;
|
|
24
|
+
initialize(): Promise<void>;
|
|
25
|
+
start(): Promise<void>;
|
|
26
|
+
stop(): Promise<void>;
|
|
27
|
+
destroy(): Promise<void>;
|
|
28
|
+
shutdown(): Promise<void>;
|
|
29
|
+
private runHook;
|
|
30
|
+
private isLifecycleParticipant;
|
|
31
|
+
private getComponentName;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=lifecycleManager.manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lifecycleManager.manager.d.ts","sourceRoot":"","sources":["../../../src/lifecycle/manager/lifecycleManager.manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAKL,KAAK,aAAa,EACnB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAEL,cAAc,EACd,KAAK,oBAAoB,EAC1B,MAAM,sBAAsB,CAAC;AAE9B,0EAA0E;AAC1E,MAAM,MAAM,yBAAyB,GAAG,oBAAoB,GAAG,aAAa,CAAC;AAE7E,oCAAoC;AACpC,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,uBAAuB,CAAC,EAAE,OAAO,CAAC;CAC5C;AAED;;;GAGG;AACH,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAY;IACtC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAmC;IAC9D,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,uBAAuB,CAAU;IAElD,YAAmB,OAAO,GAAE,uBAA4B,EAOvD;IAEM,QAAQ,IAAI,cAAc,CAEhC;IACM,aAAa,IAAI,SAAS,yBAAyB,EAAE,CAE3D;IAEM,QAAQ,CAAC,SAAS,EAAE,yBAAyB,GAAG,IAAI,CAI1D;IAEY,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC,CAcvC;IAEY,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAclC;IAEY,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAwBjC;IAEY,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAwBpC;IAEY,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CAiBrC;YAEa,OAAO;IAWrB,OAAO,CAAC,sBAAsB;IAW9B,OAAO,CAAC,gBAAgB;CAYzB"}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { hasDestroyHook, hasInitializeHook, hasStartHook, hasStopHook, } from "../core/lifecycleHook.hook.js";
|
|
2
|
+
import { Lifecycle, LifecycleState, } from "../core/lifecycle.js";
|
|
3
|
+
/**
|
|
4
|
+
* Coordinates lifecycle hooks and lifecycle participants.
|
|
5
|
+
* Primary API for application-level lifecycle management.
|
|
6
|
+
*/
|
|
7
|
+
export class LifecycleManager {
|
|
8
|
+
lifecycle;
|
|
9
|
+
components = [];
|
|
10
|
+
logger;
|
|
11
|
+
continueOnShutdownError;
|
|
12
|
+
constructor(options = {}) {
|
|
13
|
+
this.logger = options.logger;
|
|
14
|
+
this.continueOnShutdownError = options.continueOnShutdownError ?? true;
|
|
15
|
+
this.lifecycle = new Lifecycle({
|
|
16
|
+
logger: this.logger,
|
|
17
|
+
continueOnShutdownError: this.continueOnShutdownError,
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
getState() {
|
|
21
|
+
return this.lifecycle.getState();
|
|
22
|
+
}
|
|
23
|
+
getComponents() {
|
|
24
|
+
return [...this.components];
|
|
25
|
+
}
|
|
26
|
+
register(component) {
|
|
27
|
+
this.components.push(component);
|
|
28
|
+
if (this.isLifecycleParticipant(component))
|
|
29
|
+
this.lifecycle.register(component);
|
|
30
|
+
}
|
|
31
|
+
async initialize() {
|
|
32
|
+
if (this.getState() !== LifecycleState.CREATED)
|
|
33
|
+
return;
|
|
34
|
+
this.logger?.debug("Lifecycle manager initialization started");
|
|
35
|
+
try {
|
|
36
|
+
for (const component of this.components) {
|
|
37
|
+
if (hasInitializeHook(component))
|
|
38
|
+
await this.runHook(component, "onInitialize", "initialize");
|
|
39
|
+
}
|
|
40
|
+
await this.lifecycle.initialize();
|
|
41
|
+
this.logger?.debug("Lifecycle manager initialization completed");
|
|
42
|
+
}
|
|
43
|
+
catch (error) {
|
|
44
|
+
this.logger?.error("Lifecycle manager initialization failed", error);
|
|
45
|
+
throw error;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
async start() {
|
|
49
|
+
if (this.getState() === LifecycleState.CREATED)
|
|
50
|
+
await this.initialize();
|
|
51
|
+
this.logger?.debug("Lifecycle manager startup started");
|
|
52
|
+
try {
|
|
53
|
+
for (const component of this.components) {
|
|
54
|
+
if (hasStartHook(component))
|
|
55
|
+
await this.runHook(component, "onStart", "start");
|
|
56
|
+
}
|
|
57
|
+
await this.lifecycle.start();
|
|
58
|
+
this.logger?.debug("Lifecycle manager startup completed");
|
|
59
|
+
}
|
|
60
|
+
catch (error) {
|
|
61
|
+
this.logger?.error("Lifecycle manager startup failed", error);
|
|
62
|
+
throw error;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
async stop() {
|
|
66
|
+
const errors = [];
|
|
67
|
+
this.logger?.debug("Lifecycle manager shutdown started");
|
|
68
|
+
for (let i = this.components.length - 1; i >= 0; i--) {
|
|
69
|
+
const component = this.components[i];
|
|
70
|
+
if (!hasStopHook(component))
|
|
71
|
+
continue;
|
|
72
|
+
try {
|
|
73
|
+
await this.runHook(component, "onStop", "stop");
|
|
74
|
+
}
|
|
75
|
+
catch (error) {
|
|
76
|
+
errors.push(error);
|
|
77
|
+
if (!this.continueOnShutdownError)
|
|
78
|
+
break;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
try {
|
|
82
|
+
await this.lifecycle.stop();
|
|
83
|
+
}
|
|
84
|
+
catch (error) {
|
|
85
|
+
errors.push(error);
|
|
86
|
+
}
|
|
87
|
+
if (errors.length > 0)
|
|
88
|
+
throw new AggregateError(errors, "Lifecycle shutdown completed with errors.");
|
|
89
|
+
this.logger?.debug("Lifecycle manager shutdown completed");
|
|
90
|
+
}
|
|
91
|
+
async destroy() {
|
|
92
|
+
const errors = [];
|
|
93
|
+
this.logger?.debug("Lifecycle manager destruction started");
|
|
94
|
+
for (let i = this.components.length - 1; i >= 0; i--) {
|
|
95
|
+
const component = this.components[i];
|
|
96
|
+
if (!hasDestroyHook(component))
|
|
97
|
+
continue;
|
|
98
|
+
try {
|
|
99
|
+
await this.runHook(component, "onDestroy", "destroy");
|
|
100
|
+
}
|
|
101
|
+
catch (error) {
|
|
102
|
+
errors.push(error);
|
|
103
|
+
if (!this.continueOnShutdownError)
|
|
104
|
+
break;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
try {
|
|
108
|
+
await this.lifecycle.dispose();
|
|
109
|
+
}
|
|
110
|
+
catch (error) {
|
|
111
|
+
errors.push(error);
|
|
112
|
+
}
|
|
113
|
+
if (errors.length > 0)
|
|
114
|
+
throw new AggregateError(errors, "Lifecycle destruction completed with errors.");
|
|
115
|
+
this.logger?.debug("Lifecycle manager destruction completed");
|
|
116
|
+
}
|
|
117
|
+
async shutdown() {
|
|
118
|
+
const errors = [];
|
|
119
|
+
try {
|
|
120
|
+
await this.stop();
|
|
121
|
+
}
|
|
122
|
+
catch (error) {
|
|
123
|
+
errors.push(error);
|
|
124
|
+
}
|
|
125
|
+
try {
|
|
126
|
+
await this.destroy();
|
|
127
|
+
}
|
|
128
|
+
catch (error) {
|
|
129
|
+
errors.push(error);
|
|
130
|
+
}
|
|
131
|
+
if (errors.length > 0)
|
|
132
|
+
throw new AggregateError(errors, "Application shutdown completed with errors.");
|
|
133
|
+
}
|
|
134
|
+
async runHook(component, hook, label) {
|
|
135
|
+
this.logger?.debug(`Running lifecycle ${label} hook`, {
|
|
136
|
+
component: this.getComponentName(component),
|
|
137
|
+
});
|
|
138
|
+
await component[hook]?.();
|
|
139
|
+
}
|
|
140
|
+
isLifecycleParticipant(component) {
|
|
141
|
+
return (typeof component === "object" &&
|
|
142
|
+
component !== null &&
|
|
143
|
+
"name" in component &&
|
|
144
|
+
typeof component.name === "string");
|
|
145
|
+
}
|
|
146
|
+
getComponentName(component) {
|
|
147
|
+
if ("name" in component && typeof component.name === "string")
|
|
148
|
+
return component.name;
|
|
149
|
+
if (typeof component === "object" &&
|
|
150
|
+
component !== null &&
|
|
151
|
+
"constructor" in component &&
|
|
152
|
+
typeof component.constructor === "function")
|
|
153
|
+
return component.constructor.name;
|
|
154
|
+
return "anonymous";
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
//# sourceMappingURL=lifecycleManager.manager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"l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AC,qBAAqB,KAAK,OAAO,EAAE;YACpD,SAAS,EAAE,IAAI,CAAC,gBAAgB,CAAC,SAAS,CAAC;SAC5C,CAAC,CAAC;QACH,MAAM,SAAS,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC;IAC5B,CAAC;IAEO,sBAAsB,CAC5B,SAAoC;QAEpC,OAAO,CACL,OAAO,SAAS,KAAK,QAAQ;YAC7B,SAAS,KAAK,IAAI;YAClB,MAAM,IAAI,SAAS;YACnB,OAAO,SAAS,CAAC,IAAI,KAAK,QAAQ,CACnC,CAAC;IACJ,CAAC;IAEO,gBAAgB,CAAC,SAAoC;QAC3D,IAAI,MAAM,IAAI,SAAS,IAAI,OAAO,SAAS,CAAC,IAAI,KAAK,QAAQ;YAC3D,OAAO,SAAS,CAAC,IAAI,CAAC;QACxB,IACE,OAAO,SAAS,KAAK,QAAQ;YAC7B,SAAS,KAAK,IAAI;YAClB,aAAa,IAAI,SAAS;YAC1B,OAAO,SAAS,CAAC,WAAW,KAAK,UAAU;YAE3C,OAAO,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC;QACpC,OAAO,WAAW,CAAC;IACrB,CAAC;CACF"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @zudojs/core/lifecycle/scope
|
|
3
|
+
*
|
|
4
|
+
* Isolated lifecycle boundaries for applications,
|
|
5
|
+
* modules, plugins, workers, and services.
|
|
6
|
+
*/
|
|
7
|
+
export { LifecycleScope, LifecycleScopeState, type LifecycleScopeOptions, } from "./lifecycleScope.scope.js";
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lifecycle/scope/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,KAAK,qBAAqB,GAC3B,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lifecycle/scope/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,cAAc,EACd,mBAAmB,GAEpB,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { Logger } from "../../logging/core/logger.js";
|
|
2
|
+
import type { LifecycleComponent, LifecycleRegistration } from "../core/lifecycleRegistry.registry.js";
|
|
3
|
+
/** Lifecycle scope state. */
|
|
4
|
+
export declare const LifecycleScopeState: {
|
|
5
|
+
readonly CREATED: "created";
|
|
6
|
+
readonly INITIALIZING: "initializing";
|
|
7
|
+
readonly INITIALIZED: "initialized";
|
|
8
|
+
readonly STARTING: "starting";
|
|
9
|
+
readonly RUNNING: "running";
|
|
10
|
+
readonly STOPPING: "stopping";
|
|
11
|
+
readonly STOPPED: "stopped";
|
|
12
|
+
readonly FAILED: "failed";
|
|
13
|
+
};
|
|
14
|
+
export type LifecycleScopeState = (typeof LifecycleScopeState)[keyof typeof LifecycleScopeState];
|
|
15
|
+
/** Options used when creating a lifecycle scope. */
|
|
16
|
+
export interface LifecycleScopeOptions {
|
|
17
|
+
readonly name: string;
|
|
18
|
+
readonly parent?: LifecycleScope;
|
|
19
|
+
readonly logger?: Logger;
|
|
20
|
+
readonly continueOnShutdownError?: boolean;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Represents an independently managed lifecycle boundary.
|
|
24
|
+
* Can represent an Application, Module, Plugin, Worker, Service, or Feature.
|
|
25
|
+
*/
|
|
26
|
+
export declare class LifecycleScope {
|
|
27
|
+
private state;
|
|
28
|
+
private readonly name;
|
|
29
|
+
private readonly parent?;
|
|
30
|
+
private readonly logger?;
|
|
31
|
+
private readonly continueOnShutdownError;
|
|
32
|
+
private readonly registry;
|
|
33
|
+
private readonly children;
|
|
34
|
+
constructor(options: LifecycleScopeOptions);
|
|
35
|
+
getName(): string;
|
|
36
|
+
getState(): LifecycleScopeState;
|
|
37
|
+
getParent(): LifecycleScope | undefined;
|
|
38
|
+
getChildren(): readonly LifecycleScope[];
|
|
39
|
+
getRegistrations(): readonly LifecycleRegistration[];
|
|
40
|
+
register(component: LifecycleComponent, name?: string): LifecycleRegistration;
|
|
41
|
+
unregister(id: string): boolean;
|
|
42
|
+
initialize(): Promise<void>;
|
|
43
|
+
start(): Promise<void>;
|
|
44
|
+
stop(): Promise<void>;
|
|
45
|
+
destroy(): Promise<void>;
|
|
46
|
+
shutdown(): Promise<void>;
|
|
47
|
+
private addChild;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=lifecycleScope.scope.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lifecycleScope.scope.d.ts","sourceRoot":"","sources":["../../../src/lifecycle/scope/lifecycleScope.scope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,KAAK,EACV,kBAAkB,EAClB,qBAAqB,EACtB,MAAM,uCAAuC,CAAC;AAG/C,6BAA6B;AAC7B,eAAO,MAAM,mBAAmB;aAC9B,OAAO,EAAE,SAAS;aAClB,YAAY,EAAE,cAAc;aAC5B,WAAW,EAAE,aAAa;aAC1B,QAAQ,EAAE,UAAU;aACpB,OAAO,EAAE,SAAS;aAClB,QAAQ,EAAE,UAAU;aACpB,OAAO,EAAE,SAAS;aAClB,MAAM,EAAE,QAAQ;CACR,CAAC;AAEX,MAAM,MAAM,mBAAmB,GAC7B,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAC;AAEjE,oDAAoD;AACpD,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,CAAC,EAAE,cAAc,CAAC;IACjC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,C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