@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,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @zudojs/core/errors
|
|
3
|
+
*
|
|
4
|
+
* Core error types and error handling utilities.
|
|
5
|
+
*/
|
|
6
|
+
export { ErrorCode } from "./errorCode.code.js";
|
|
7
|
+
export type { ErrorCode as ErrorCodeType } from "./errorCode.code.js";
|
|
8
|
+
export { FrameworkError, type FrameworkErrorJSON, } from "./frameworkError.error.js";
|
|
9
|
+
export { InvalidArgumentError, InvalidStateError, ProviderNotFoundError, ProviderAlreadyRegisteredError, ConfigurationNotFoundError, ExecutionContextNotFoundError, AdapterNotFoundError, } from "./exceptions.js";
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,YAAY,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEtE,OAAO,EACL,cAAc,EACd,KAAK,kBAAkB,GACxB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,qBAAqB,EACrB,8BAA8B,EAC9B,0BAA0B,EAC1B,6BAA6B,EAC7B,oBAAoB,GACrB,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @zudojs/core/errors
|
|
3
|
+
*
|
|
4
|
+
* Core error types and error handling utilities.
|
|
5
|
+
*/
|
|
6
|
+
export { ErrorCode } from "./errorCode.code.js";
|
|
7
|
+
export { FrameworkError, } from "./frameworkError.error.js";
|
|
8
|
+
export { InvalidArgumentError, InvalidStateError, ProviderNotFoundError, ProviderAlreadyRegisteredError, ConfigurationNotFoundError, ExecutionContextNotFoundError, AdapterNotFoundError, } from "./exceptions.js";
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAIhD,OAAO,EACL,cAAc,GAEf,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,qBAAqB,EACrB,8BAA8B,EAC9B,0BAA0B,EAC1B,6BAA6B,EAC7B,oBAAoB,GACrB,MAAM,iBAAiB,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @zudojs/core
|
|
3
|
+
*
|
|
4
|
+
* Core framework primitives and runtime infrastructure.
|
|
5
|
+
*
|
|
6
|
+
* Public API
|
|
7
|
+
* ----------
|
|
8
|
+
*
|
|
9
|
+
* contracts
|
|
10
|
+
* errors
|
|
11
|
+
* logging
|
|
12
|
+
* lifecycle
|
|
13
|
+
* context
|
|
14
|
+
* configuration
|
|
15
|
+
* modules
|
|
16
|
+
* runtime
|
|
17
|
+
*
|
|
18
|
+
* Internal implementation details should not be imported directly
|
|
19
|
+
* by consumers when a public export is available here.
|
|
20
|
+
*/
|
|
21
|
+
export * from "./container/index.js";
|
|
22
|
+
export * from "./contracts/index.js";
|
|
23
|
+
export * from "./errors/index.js";
|
|
24
|
+
export * from "./logging/index.js";
|
|
25
|
+
export * from "./lifecycle/index.js";
|
|
26
|
+
export * from "./context/index.js";
|
|
27
|
+
export * from "./configuration/index.js";
|
|
28
|
+
export * from "./modules/index.js";
|
|
29
|
+
export * from "./runtime/index.js";
|
|
30
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAQH,cAAc,sBAAsB,CAAC;AAQrC,cAAc,sBAAsB,CAAC;AAQrC,cAAc,mBAAmB,CAAC;AAQlC,cAAc,oBAAoB,CAAC;AAQnC,cAAc,sBAAsB,CAAC;AAQrC,cAAc,oBAAoB,CAAC;AAQnC,cAAc,0BAA0B,CAAC;AAQzC,cAAc,oBAAoB,CAAC;AAQnC,cAAc,oBAAoB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @zudojs/core
|
|
3
|
+
*
|
|
4
|
+
* Core framework primitives and runtime infrastructure.
|
|
5
|
+
*
|
|
6
|
+
* Public API
|
|
7
|
+
* ----------
|
|
8
|
+
*
|
|
9
|
+
* contracts
|
|
10
|
+
* errors
|
|
11
|
+
* logging
|
|
12
|
+
* lifecycle
|
|
13
|
+
* context
|
|
14
|
+
* configuration
|
|
15
|
+
* modules
|
|
16
|
+
* runtime
|
|
17
|
+
*
|
|
18
|
+
* Internal implementation details should not be imported directly
|
|
19
|
+
* by consumers when a public export is available here.
|
|
20
|
+
*/
|
|
21
|
+
/*
|
|
22
|
+
* ============================================================
|
|
23
|
+
* Container
|
|
24
|
+
* ============================================================
|
|
25
|
+
*/
|
|
26
|
+
export * from "./container/index.js";
|
|
27
|
+
/*
|
|
28
|
+
* ============================================================
|
|
29
|
+
* Contracts
|
|
30
|
+
* ============================================================
|
|
31
|
+
*/
|
|
32
|
+
export * from "./contracts/index.js";
|
|
33
|
+
/*
|
|
34
|
+
* ============================================================
|
|
35
|
+
* Errors
|
|
36
|
+
* ============================================================
|
|
37
|
+
*/
|
|
38
|
+
export * from "./errors/index.js";
|
|
39
|
+
/*
|
|
40
|
+
* ============================================================
|
|
41
|
+
* Logging
|
|
42
|
+
* ============================================================
|
|
43
|
+
*/
|
|
44
|
+
export * from "./logging/index.js";
|
|
45
|
+
/*
|
|
46
|
+
* ============================================================
|
|
47
|
+
* Lifecycle
|
|
48
|
+
* ============================================================
|
|
49
|
+
*/
|
|
50
|
+
export * from "./lifecycle/index.js";
|
|
51
|
+
/*
|
|
52
|
+
* ============================================================
|
|
53
|
+
* Context
|
|
54
|
+
* ============================================================
|
|
55
|
+
*/
|
|
56
|
+
export * from "./context/index.js";
|
|
57
|
+
/*
|
|
58
|
+
* ============================================================
|
|
59
|
+
* Configuration
|
|
60
|
+
* ============================================================
|
|
61
|
+
*/
|
|
62
|
+
export * from "./configuration/index.js";
|
|
63
|
+
/*
|
|
64
|
+
* ============================================================
|
|
65
|
+
* Modules
|
|
66
|
+
* ============================================================
|
|
67
|
+
*/
|
|
68
|
+
export * from "./modules/index.js";
|
|
69
|
+
/*
|
|
70
|
+
* ============================================================
|
|
71
|
+
* Runtime
|
|
72
|
+
* ============================================================
|
|
73
|
+
*/
|
|
74
|
+
export * from "./runtime/index.js";
|
|
75
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;;;GAIG;AAEH,cAAc,sBAAsB,CAAC;AAErC;;;;GAIG;AAEH,cAAc,sBAAsB,CAAC;AAErC;;;;GAIG;AAEH,cAAc,mBAAmB,CAAC;AAElC;;;;GAIG;AAEH,cAAc,oBAAoB,CAAC;AAEnC;;;;GAIG;AAEH,cAAc,sBAAsB,CAAC;AAErC;;;;GAIG;AAEH,cAAc,oBAAoB,CAAC;AAEnC;;;;GAIG;AAEH,cAAc,0BAA0B,CAAC;AAEzC;;;;GAIG;AAEH,cAAc,oBAAoB,CAAC;AAEnC;;;;GAIG;AAEH,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @zudojs/core/lifecycle/core
|
|
3
|
+
*
|
|
4
|
+
* Core lifecycle state machine, hooks, and registry.
|
|
5
|
+
*/
|
|
6
|
+
export { LifecycleState, type LifecycleParticipant } from "./lifecycle.js";
|
|
7
|
+
export { hasInitializeHook, hasStartHook, hasStopHook, hasDestroyHook, type OnInitialize, type OnStart, type OnStop, type OnDestroy, type LifecycleHook, } from "./lifecycleHook.hook.js";
|
|
8
|
+
export { LifecycleRegistry, type LifecycleComponent, type LifecycleRegistration, } from "./lifecycleRegistry.registry.js";
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lifecycle/core/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,KAAK,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAE3E,OAAO,EACL,iBAAiB,EACjB,YAAY,EACZ,WAAW,EACX,cAAc,EACd,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,MAAM,EACX,KAAK,SAAS,EACd,KAAK,aAAa,GACnB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EACL,iBAAiB,EACjB,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,GAC3B,MAAM,iCAAiC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @zudojs/core/lifecycle/core
|
|
3
|
+
*
|
|
4
|
+
* Core lifecycle state machine, hooks, and registry.
|
|
5
|
+
*/
|
|
6
|
+
export { LifecycleState } from "./lifecycle.js";
|
|
7
|
+
export { hasInitializeHook, hasStartHook, hasStopHook, hasDestroyHook, } from "./lifecycleHook.hook.js";
|
|
8
|
+
export { LifecycleRegistry, } from "./lifecycleRegistry.registry.js";
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lifecycle/core/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAA6B,MAAM,gBAAgB,CAAC;AAE3E,OAAO,EACL,iBAAiB,EACjB,YAAY,EACZ,WAAW,EACX,cAAc,GAMf,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EACL,iBAAiB,GAGlB,MAAM,iCAAiC,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { Logger } from "../../logging/core/logger.js";
|
|
2
|
+
/** Lifecycle states supported by the Zudojs application runtime. */
|
|
3
|
+
export declare const LifecycleState: {
|
|
4
|
+
readonly CREATED: "created";
|
|
5
|
+
readonly INITIALIZING: "initializing";
|
|
6
|
+
readonly INITIALIZED: "initialized";
|
|
7
|
+
readonly STARTING: "starting";
|
|
8
|
+
readonly RUNNING: "running";
|
|
9
|
+
readonly STOPPING: "stopping";
|
|
10
|
+
readonly STOPPED: "stopped";
|
|
11
|
+
readonly FAILED: "failed";
|
|
12
|
+
};
|
|
13
|
+
export type LifecycleState = (typeof LifecycleState)[keyof typeof LifecycleState];
|
|
14
|
+
/** A lifecycle participant can participate in application initialization and shutdown. */
|
|
15
|
+
export interface LifecycleParticipant {
|
|
16
|
+
readonly name: string;
|
|
17
|
+
initialize?(): Promise<void> | void;
|
|
18
|
+
start?(): Promise<void> | void;
|
|
19
|
+
stop?(): Promise<void> | void;
|
|
20
|
+
dispose?(): Promise<void> | void;
|
|
21
|
+
}
|
|
22
|
+
/** Options used by the lifecycle manager. */
|
|
23
|
+
export interface LifecycleOptions {
|
|
24
|
+
readonly logger?: Logger;
|
|
25
|
+
readonly continueOnShutdownError?: boolean;
|
|
26
|
+
}
|
|
27
|
+
/** Coordinates initialization, startup, shutdown, and disposal of application resources. */
|
|
28
|
+
export declare class Lifecycle {
|
|
29
|
+
private state;
|
|
30
|
+
private readonly participants;
|
|
31
|
+
private readonly logger?;
|
|
32
|
+
private readonly continueOnShutdownError;
|
|
33
|
+
constructor(options?: LifecycleOptions);
|
|
34
|
+
getState(): LifecycleState;
|
|
35
|
+
getParticipants(): readonly LifecycleParticipant[];
|
|
36
|
+
register(participant: LifecycleParticipant): void;
|
|
37
|
+
initialize(): Promise<void>;
|
|
38
|
+
start(): Promise<void>;
|
|
39
|
+
private waitForInitialization;
|
|
40
|
+
stop(): Promise<void>;
|
|
41
|
+
dispose(): Promise<void>;
|
|
42
|
+
shutdown(): Promise<void>;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=lifecycle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../../../src/lifecycle/core/lifecycle.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAE3D,oEAAoE;AACpE,eAAO,MAAM,cAAc;aACzB,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,cAAc,GACxB,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC;AAEvD,0FAA0F;AAC1F,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IACpC,KAAK,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAC/B,IAAI,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAC9B,OAAO,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;CAClC;AAED,6CAA6C;AAC7C,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,uBAAuB,CAAC,EAAE,OAAO,CAAC;CAC5C;AAED,4FAA4F;AAC5F,qBAAa,SAAS;IACpB,OAAO,CAAC,KAAK,CAA0C;IACvD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAA8B;IAC3D,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,uBAAuB,CAAU;IAElD,YAAmB,OAAO,GAAE,gBAAqB,EAGhD;IAEM,QAAQ,IAAI,cAAc,CAEhC;IACM,eAAe,IAAI,SAAS,oBAAoB,EAAE,CAExD;IAEM,QAAQ,CAAC,WAAW,EAAE,oBAAoB,GAAG,IAAI,CAcvD;IAEY,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC,CAyBvC;IAEY,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CA8BlC;YAEa,qBAAqB;IAetB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAqCjC;IAEY,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAsBpC;IAEY,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CAoBrC;CACF"}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
/** Lifecycle states supported by the Zudojs application runtime. */
|
|
2
|
+
export const LifecycleState = {
|
|
3
|
+
CREATED: "created",
|
|
4
|
+
INITIALIZING: "initializing",
|
|
5
|
+
INITIALIZED: "initialized",
|
|
6
|
+
STARTING: "starting",
|
|
7
|
+
RUNNING: "running",
|
|
8
|
+
STOPPING: "stopping",
|
|
9
|
+
STOPPED: "stopped",
|
|
10
|
+
FAILED: "failed",
|
|
11
|
+
};
|
|
12
|
+
/** Coordinates initialization, startup, shutdown, and disposal of application resources. */
|
|
13
|
+
export class Lifecycle {
|
|
14
|
+
state = LifecycleState.CREATED;
|
|
15
|
+
participants = [];
|
|
16
|
+
logger;
|
|
17
|
+
continueOnShutdownError;
|
|
18
|
+
constructor(options = {}) {
|
|
19
|
+
this.logger = options.logger;
|
|
20
|
+
this.continueOnShutdownError = options.continueOnShutdownError ?? true;
|
|
21
|
+
}
|
|
22
|
+
getState() {
|
|
23
|
+
return this.state;
|
|
24
|
+
}
|
|
25
|
+
getParticipants() {
|
|
26
|
+
return [...this.participants];
|
|
27
|
+
}
|
|
28
|
+
register(participant) {
|
|
29
|
+
if (this.state !== LifecycleState.CREATED &&
|
|
30
|
+
this.state !== LifecycleState.INITIALIZING &&
|
|
31
|
+
this.state !== LifecycleState.INITIALIZED) {
|
|
32
|
+
throw new Error(`Cannot register lifecycle participant "${participant.name}" while application is "${this.state}".`);
|
|
33
|
+
}
|
|
34
|
+
this.participants.push(participant);
|
|
35
|
+
this.logger?.debug("Lifecycle participant registered", {
|
|
36
|
+
participant: participant.name,
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
async initialize() {
|
|
40
|
+
if (this.state === LifecycleState.INITIALIZED)
|
|
41
|
+
return;
|
|
42
|
+
if (this.state === LifecycleState.INITIALIZING)
|
|
43
|
+
return this.waitForInitialization();
|
|
44
|
+
if (this.state !== LifecycleState.CREATED)
|
|
45
|
+
throw new Error(`Cannot initialize application while state is "${this.state}".`);
|
|
46
|
+
this.state = LifecycleState.INITIALIZING;
|
|
47
|
+
this.logger?.debug("Application initialization started");
|
|
48
|
+
try {
|
|
49
|
+
for (const participant of this.participants) {
|
|
50
|
+
this.logger?.debug("Initializing lifecycle participant", {
|
|
51
|
+
participant: participant.name,
|
|
52
|
+
});
|
|
53
|
+
await participant.initialize?.();
|
|
54
|
+
}
|
|
55
|
+
this.state = LifecycleState.INITIALIZED;
|
|
56
|
+
this.logger?.info("Application initialization completed");
|
|
57
|
+
}
|
|
58
|
+
catch (error) {
|
|
59
|
+
this.state = LifecycleState.FAILED;
|
|
60
|
+
this.logger?.error("Application initialization failed", error);
|
|
61
|
+
throw error;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
async start() {
|
|
65
|
+
if (this.state === LifecycleState.RUNNING ||
|
|
66
|
+
this.state === LifecycleState.STARTING)
|
|
67
|
+
return;
|
|
68
|
+
if (this.state === LifecycleState.CREATED)
|
|
69
|
+
await this.initialize();
|
|
70
|
+
if (this.state === LifecycleState.INITIALIZING)
|
|
71
|
+
await this.waitForInitialization();
|
|
72
|
+
if (this.state !== LifecycleState.INITIALIZED)
|
|
73
|
+
throw new Error(`Cannot start application while state is "${this.state}".`);
|
|
74
|
+
this.state = LifecycleState.STARTING;
|
|
75
|
+
this.logger?.debug("Application startup started");
|
|
76
|
+
try {
|
|
77
|
+
for (const participant of this.participants) {
|
|
78
|
+
this.logger?.debug("Starting lifecycle participant", {
|
|
79
|
+
participant: participant.name,
|
|
80
|
+
});
|
|
81
|
+
await participant.start?.();
|
|
82
|
+
}
|
|
83
|
+
this.state = LifecycleState.RUNNING;
|
|
84
|
+
this.logger?.info("Application startup completed");
|
|
85
|
+
}
|
|
86
|
+
catch (error) {
|
|
87
|
+
this.state = LifecycleState.FAILED;
|
|
88
|
+
this.logger?.error("Application startup failed", error);
|
|
89
|
+
throw error;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
async waitForInitialization() {
|
|
93
|
+
for (let attempt = 0; attempt < 100; attempt++) {
|
|
94
|
+
if (this.state === LifecycleState.INITIALIZED ||
|
|
95
|
+
this.state === LifecycleState.FAILED)
|
|
96
|
+
return;
|
|
97
|
+
if (this.state !== LifecycleState.INITIALIZING)
|
|
98
|
+
return;
|
|
99
|
+
await new Promise((resolve) => setTimeout(resolve, 10));
|
|
100
|
+
}
|
|
101
|
+
throw new Error(`Timed out waiting for initialization to complete. Current state: "${this.state}".`);
|
|
102
|
+
}
|
|
103
|
+
async stop() {
|
|
104
|
+
if (this.state === LifecycleState.STOPPED)
|
|
105
|
+
return;
|
|
106
|
+
if (this.state !== LifecycleState.RUNNING &&
|
|
107
|
+
this.state !== LifecycleState.FAILED)
|
|
108
|
+
throw new Error(`Cannot stop application while state is "${this.state}".`);
|
|
109
|
+
this.state = LifecycleState.STOPPING;
|
|
110
|
+
this.logger?.debug("Application shutdown started");
|
|
111
|
+
const errors = [];
|
|
112
|
+
for (let i = this.participants.length - 1; i >= 0; i--) {
|
|
113
|
+
const participant = this.participants[i];
|
|
114
|
+
try {
|
|
115
|
+
this.logger?.debug("Stopping lifecycle participant", {
|
|
116
|
+
participant: participant.name,
|
|
117
|
+
});
|
|
118
|
+
await participant.stop?.();
|
|
119
|
+
}
|
|
120
|
+
catch (error) {
|
|
121
|
+
errors.push(error);
|
|
122
|
+
this.logger?.error("Failed to stop lifecycle participant", error, {
|
|
123
|
+
participant: participant.name,
|
|
124
|
+
});
|
|
125
|
+
if (!this.continueOnShutdownError)
|
|
126
|
+
break;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
this.state = LifecycleState.STOPPED;
|
|
130
|
+
this.logger?.info("Application shutdown completed");
|
|
131
|
+
if (errors.length > 0)
|
|
132
|
+
throw new AggregateError(errors, "One or more lifecycle participants failed to stop.");
|
|
133
|
+
}
|
|
134
|
+
async dispose() {
|
|
135
|
+
const errors = [];
|
|
136
|
+
for (let i = this.participants.length - 1; i >= 0; i--) {
|
|
137
|
+
const participant = this.participants[i];
|
|
138
|
+
try {
|
|
139
|
+
this.logger?.debug("Disposing lifecycle participant", {
|
|
140
|
+
participant: participant.name,
|
|
141
|
+
});
|
|
142
|
+
await participant.dispose?.();
|
|
143
|
+
}
|
|
144
|
+
catch (error) {
|
|
145
|
+
errors.push(error);
|
|
146
|
+
this.logger?.error("Failed to dispose lifecycle participant", error, {
|
|
147
|
+
participant: participant.name,
|
|
148
|
+
});
|
|
149
|
+
if (!this.continueOnShutdownError)
|
|
150
|
+
break;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
if (errors.length > 0)
|
|
154
|
+
throw new AggregateError(errors, "One or more lifecycle participants failed to dispose.");
|
|
155
|
+
}
|
|
156
|
+
async shutdown() {
|
|
157
|
+
let stopError;
|
|
158
|
+
try {
|
|
159
|
+
await this.stop();
|
|
160
|
+
}
|
|
161
|
+
catch (error) {
|
|
162
|
+
stopError = error;
|
|
163
|
+
}
|
|
164
|
+
let disposeError;
|
|
165
|
+
try {
|
|
166
|
+
await this.dispose();
|
|
167
|
+
}
|
|
168
|
+
catch (error) {
|
|
169
|
+
disposeError = error;
|
|
170
|
+
}
|
|
171
|
+
if (stopError && disposeError)
|
|
172
|
+
throw new AggregateError([stopError, disposeError], "Application shutdown completed with errors.");
|
|
173
|
+
if (stopError)
|
|
174
|
+
throw stopError;
|
|
175
|
+
if (disposeError)
|
|
176
|
+
throw disposeError;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
//# sourceMappingURL=lifecycle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lifecycle.js","sourceRoot":"","sources":["../../../src/lifecycle/core/lifecycle.ts"],"names":[],"mappings":"AAGA,oEAAoE;AACpE,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,OAAO,EAAE,SAAS;IAClB,YAAY,EAAE,cAAc;IAC5B,WAAW,EAAE,aAAa;IAC1B,QAAQ,EAAE,UAAU;IACpB,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,UAAU;IACpB,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;CACR,CAAC;AAoBX,4FAA4F;AAC5F,MAAM,OAAO,SAAS;IACZ,KAAK,GAAmB,cAAc,CAAC,OAAO,CAAC;IACtC,YAAY,GAA2B,EAAE,CAAC;IAC1C,MAAM,CAAU;IAChB,uBAAuB,CAAU;IAElD,YAAmB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;QAC/B,IAAI,YAAY;YAAE,MAAM,YAAY,CAAC;IACvC,CAAC;CACF"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Called when the application is being initialized.
|
|
3
|
+
*
|
|
4
|
+
* Use this hook for preparing dependencies, validating configuration,
|
|
5
|
+
* registering resources, or performing other initialization work.
|
|
6
|
+
*/
|
|
7
|
+
export interface OnInitialize {
|
|
8
|
+
onInitialize(): Promise<void> | void;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Called when the application is starting.
|
|
12
|
+
*
|
|
13
|
+
* Use this hook for starting active processes such as HTTP servers,
|
|
14
|
+
* queue consumers, schedulers, workers, or message listeners.
|
|
15
|
+
*/
|
|
16
|
+
export interface OnStart {
|
|
17
|
+
onStart(): Promise<void> | void;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Called when the application is stopping.
|
|
21
|
+
*
|
|
22
|
+
* Use this hook to stop accepting new work and gracefully terminate
|
|
23
|
+
* active processes.
|
|
24
|
+
*/
|
|
25
|
+
export interface OnStop {
|
|
26
|
+
onStop(): Promise<void> | void;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Called when the application is being destroyed.
|
|
30
|
+
*
|
|
31
|
+
* Use this hook for releasing resources such as connections,
|
|
32
|
+
* file handles, timers, subscriptions, and external clients.
|
|
33
|
+
*/
|
|
34
|
+
export interface OnDestroy {
|
|
35
|
+
onDestroy(): Promise<void> | void;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* A component that participates in one or more lifecycle phases.
|
|
39
|
+
*
|
|
40
|
+
* Components can implement only the hooks they actually need.
|
|
41
|
+
*/
|
|
42
|
+
export type LifecycleHook = Partial<OnInitialize> & Partial<OnStart> & Partial<OnStop> & Partial<OnDestroy>;
|
|
43
|
+
/**
|
|
44
|
+
* Type guard for initialization hooks.
|
|
45
|
+
*/
|
|
46
|
+
export declare function hasInitializeHook(value: unknown): value is OnInitialize;
|
|
47
|
+
/**
|
|
48
|
+
* Type guard for start hooks.
|
|
49
|
+
*/
|
|
50
|
+
export declare function hasStartHook(value: unknown): value is OnStart;
|
|
51
|
+
/**
|
|
52
|
+
* Type guard for stop hooks.
|
|
53
|
+
*/
|
|
54
|
+
export declare function hasStopHook(value: unknown): value is OnStop;
|
|
55
|
+
/**
|
|
56
|
+
* Type guard for destroy hooks.
|
|
57
|
+
*/
|
|
58
|
+
export declare function hasDestroyHook(value: unknown): value is OnDestroy;
|
|
59
|
+
//# sourceMappingURL=lifecycleHook.hook.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lifecycleHook.hook.d.ts","sourceRoot":"","sources":["../../../src/lifecycle/core/lifecycleHook.hook.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;CACtC;AAED;;;;;GAKG;AACH,MAAM,WAAW,OAAO;IACtB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;CACjC;AAED;;;;;GAKG;AACH,MAAM,WAAW,MAAM;IACrB,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;CAChC;AAED;;;;;GAKG;AACH,MAAM,WAAW,SAAS;IACxB,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;CACnC;AAED;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC,GAC/C,OAAO,CAAC,OAAO,CAAC,GAChB,OAAO,CAAC,MAAM,CAAC,GACf,OAAO,CAAC,SAAS,CAAC,CAAC;AAErB;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,YAAY,CAOvE;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,OAAO,CAO7D;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAO3D;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,SAAS,CAOjE"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type guard for initialization hooks.
|
|
3
|
+
*/
|
|
4
|
+
export function hasInitializeHook(value) {
|
|
5
|
+
return (typeof value === "object" &&
|
|
6
|
+
value !== null &&
|
|
7
|
+
"onInitialize" in value &&
|
|
8
|
+
typeof value.onInitialize === "function");
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Type guard for start hooks.
|
|
12
|
+
*/
|
|
13
|
+
export function hasStartHook(value) {
|
|
14
|
+
return (typeof value === "object" &&
|
|
15
|
+
value !== null &&
|
|
16
|
+
"onStart" in value &&
|
|
17
|
+
typeof value.onStart === "function");
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Type guard for stop hooks.
|
|
21
|
+
*/
|
|
22
|
+
export function hasStopHook(value) {
|
|
23
|
+
return (typeof value === "object" &&
|
|
24
|
+
value !== null &&
|
|
25
|
+
"onStop" in value &&
|
|
26
|
+
typeof value.onStop === "function");
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Type guard for destroy hooks.
|
|
30
|
+
*/
|
|
31
|
+
export function hasDestroyHook(value) {
|
|
32
|
+
return (typeof value === "object" &&
|
|
33
|
+
value !== null &&
|
|
34
|
+
"onDestroy" in value &&
|
|
35
|
+
typeof value.onDestroy === "function");
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=lifecycleHook.hook.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lifecycleHook.hook.js","sourceRoot":"","sources":["../../../src/lifecycle/core/lifecycleHook.hook.ts"],"names":[],"mappings":"AAkDA;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAAC,KAAc;IAC9C,OAAO,CACL,OAAO,KAAK,KAAK,QAAQ;QACzB,KAAK,KAAK,IAAI;QACd,cAAc,IAAI,KAAK;QACvB,OAAO,KAAK,CAAC,YAAY,KAAK,UAAU,CACzC,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,YAAY,CAAC,KAAc;IACzC,OAAO,CACL,OAAO,KAAK,KAAK,QAAQ;QACzB,KAAK,KAAK,IAAI;QACd,SAAS,IAAI,KAAK;QAClB,OAAO,KAAK,CAAC,OAAO,KAAK,UAAU,CACpC,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,KAAc;IACxC,OAAO,CACL,OAAO,KAAK,KAAK,QAAQ;QACzB,KAAK,KAAK,IAAI;QACd,QAAQ,IAAI,KAAK;QACjB,OAAO,KAAK,CAAC,MAAM,KAAK,UAAU,CACnC,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,KAAc;IAC3C,OAAO,CACL,OAAO,KAAK,KAAK,QAAQ;QACzB,KAAK,KAAK,IAAI;QACd,WAAW,IAAI,KAAK;QACpB,OAAO,KAAK,CAAC,SAAS,KAAK,UAAU,CACtC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import type { LifecycleHook } from "./lifecycleHook.hook.js";
|
|
2
|
+
import type { LifecycleParticipant } from "./lifecycle.js";
|
|
3
|
+
/**
|
|
4
|
+
* Any component that can participate in the application lifecycle.
|
|
5
|
+
*/
|
|
6
|
+
export type LifecycleComponent = LifecycleParticipant | LifecycleHook;
|
|
7
|
+
/**
|
|
8
|
+
* Internal lifecycle registration.
|
|
9
|
+
*
|
|
10
|
+
* The registry stores components in a normalized representation
|
|
11
|
+
* so the lifecycle manager does not need to care whether a
|
|
12
|
+
* component uses the full participant API or individual hooks.
|
|
13
|
+
*/
|
|
14
|
+
export interface LifecycleRegistration {
|
|
15
|
+
/**
|
|
16
|
+
* Unique registration identifier.
|
|
17
|
+
*/
|
|
18
|
+
readonly id: string;
|
|
19
|
+
/**
|
|
20
|
+
* Human-readable component name.
|
|
21
|
+
*/
|
|
22
|
+
readonly name: string;
|
|
23
|
+
/**
|
|
24
|
+
* Original registered component.
|
|
25
|
+
*/
|
|
26
|
+
readonly component: LifecycleComponent;
|
|
27
|
+
/**
|
|
28
|
+
* Registration order.
|
|
29
|
+
*
|
|
30
|
+
* Lower numbers are initialized first and stopped last.
|
|
31
|
+
*/
|
|
32
|
+
readonly order: number;
|
|
33
|
+
/**
|
|
34
|
+
* Whether the component exposes the full lifecycle participant API.
|
|
35
|
+
*/
|
|
36
|
+
readonly isParticipant: boolean;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Registry responsible for lifecycle component registration
|
|
40
|
+
* and deterministic ordering.
|
|
41
|
+
*/
|
|
42
|
+
export declare class LifecycleRegistry {
|
|
43
|
+
private readonly registrations;
|
|
44
|
+
private sequence;
|
|
45
|
+
/**
|
|
46
|
+
* Registers a lifecycle component.
|
|
47
|
+
*
|
|
48
|
+
* Components are executed in registration order during
|
|
49
|
+
* initialization and startup.
|
|
50
|
+
*
|
|
51
|
+
* Components are executed in reverse registration order
|
|
52
|
+
* during stopping and destruction.
|
|
53
|
+
*/
|
|
54
|
+
register(component: LifecycleComponent, name?: string): LifecycleRegistration;
|
|
55
|
+
/**
|
|
56
|
+
* Unregisters a component by registration ID.
|
|
57
|
+
*/
|
|
58
|
+
unregister(id: string): boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Returns all registrations in initialization/startup order.
|
|
61
|
+
*/
|
|
62
|
+
getAll(): readonly LifecycleRegistration[];
|
|
63
|
+
/**
|
|
64
|
+
* Returns all registrations in shutdown/destruction order.
|
|
65
|
+
*/
|
|
66
|
+
getReverse(): readonly LifecycleRegistration[];
|
|
67
|
+
/**
|
|
68
|
+
* Finds a registration by ID.
|
|
69
|
+
*/
|
|
70
|
+
getById(id: string): LifecycleRegistration | undefined;
|
|
71
|
+
/**
|
|
72
|
+
* Finds a registration by component name.
|
|
73
|
+
*/
|
|
74
|
+
getByName(name: string): LifecycleRegistration | undefined;
|
|
75
|
+
/**
|
|
76
|
+
* Checks whether a component is registered.
|
|
77
|
+
*/
|
|
78
|
+
has(component: LifecycleComponent): boolean;
|
|
79
|
+
/**
|
|
80
|
+
* Returns the number of registered components.
|
|
81
|
+
*/
|
|
82
|
+
size(): number;
|
|
83
|
+
/**
|
|
84
|
+
* Removes all registrations.
|
|
85
|
+
*/
|
|
86
|
+
clear(): void;
|
|
87
|
+
/**
|
|
88
|
+
* Creates a stable registration ID.
|
|
89
|
+
*/
|
|
90
|
+
private createId;
|
|
91
|
+
/**
|
|
92
|
+
* Determines whether a component is a full
|
|
93
|
+
* LifecycleParticipant.
|
|
94
|
+
*/
|
|
95
|
+
private isLifecycleParticipant;
|
|
96
|
+
/**
|
|
97
|
+
* Resolves a readable component name.
|
|
98
|
+
*/
|
|
99
|
+
private resolveComponentName;
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=lifecycleRegistry.registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lifecycleRegistry.registry.d.ts","sourceRoot":"","sources":["../../../src/lifecycle/core/lifecycleRegistry.registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAE3D;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,oBAAoB,GAAG,aAAa,CAAC;AAEtE;;;;;;GAMG;AACH,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,kBAAkB,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