@zudojs/core 1.2.4 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -2
- package/dist/application/application.d.ts +29 -1
- package/dist/application/application.js +70 -1
- package/dist/application/applicationContext.context.d.ts +0 -1
- package/dist/application/applicationContext.context.js +0 -1
- package/dist/application/applicationState.state.d.ts +0 -1
- package/dist/application/applicationState.state.js +0 -1
- package/dist/application/createApplication.d.ts +0 -1
- package/dist/application/createApplication.js +0 -1
- package/dist/application/index.d.ts +0 -1
- package/dist/application/index.js +0 -1
- package/dist/configuration/configurationManager.manager.d.ts +0 -1
- package/dist/configuration/configurationManager.manager.js +0 -1
- package/dist/configuration/core/configuration.d.ts +0 -1
- package/dist/configuration/core/configuration.js +0 -1
- package/dist/configuration/core/configurationKey.key.d.ts +0 -1
- package/dist/configuration/core/configurationKey.key.js +0 -1
- package/dist/configuration/core/configurationPath.path.d.ts +0 -1
- package/dist/configuration/core/configurationPath.path.js +0 -1
- package/dist/configuration/core/configurationSource.source.d.ts +0 -1
- package/dist/configuration/core/configurationSource.source.js +0 -1
- package/dist/configuration/core/index.d.ts +0 -1
- package/dist/configuration/core/index.js +0 -1
- package/dist/configuration/error/configurationError.error.d.ts +0 -1
- package/dist/configuration/error/configurationError.error.js +0 -1
- package/dist/configuration/error/configurationRedactor.redactor.d.ts +0 -1
- package/dist/configuration/error/configurationRedactor.redactor.js +0 -1
- package/dist/configuration/error/index.d.ts +0 -1
- package/dist/configuration/error/index.js +0 -1
- package/dist/configuration/events/configurationEvents.events.d.ts +0 -1
- package/dist/configuration/events/configurationEvents.events.js +0 -1
- package/dist/configuration/events/index.d.ts +0 -1
- package/dist/configuration/events/index.js +0 -1
- package/dist/configuration/index.d.ts +0 -1
- package/dist/configuration/index.js +0 -1
- package/dist/configuration/loader/configurationLoader.loader.d.ts +0 -1
- package/dist/configuration/loader/configurationLoader.loader.js +0 -1
- package/dist/configuration/loader/index.d.ts +0 -1
- package/dist/configuration/loader/index.js +0 -1
- package/dist/configuration/registry/configurationProvider.provider.d.ts +0 -1
- package/dist/configuration/registry/configurationProvider.provider.js +0 -1
- package/dist/configuration/registry/configurationRegistry.registry.d.ts +0 -1
- package/dist/configuration/registry/configurationRegistry.registry.js +0 -1
- package/dist/configuration/registry/index.d.ts +0 -1
- package/dist/configuration/registry/index.js +0 -1
- package/dist/configuration/schema/configurationSchema.schema.d.ts +0 -1
- package/dist/configuration/schema/configurationSchema.schema.js +0 -1
- package/dist/configuration/schema/configurationValidation.validator.d.ts +0 -1
- package/dist/configuration/schema/configurationValidation.validator.js +0 -1
- package/dist/configuration/schema/index.d.ts +0 -1
- package/dist/configuration/schema/index.js +0 -1
- package/dist/container/container.d.ts +0 -1
- package/dist/container/container.js +0 -1
- package/dist/container/container.lifetime.d.ts +0 -1
- package/dist/container/container.lifetime.js +0 -1
- package/dist/container/index.d.ts +0 -1
- package/dist/container/index.js +0 -1
- package/dist/container/provider.d.ts +0 -1
- package/dist/container/provider.js +0 -1
- package/dist/container/scope.d.ts +0 -1
- package/dist/container/scope.js +0 -1
- package/dist/container/token.d.ts +0 -1
- package/dist/container/token.js +0 -1
- package/dist/context/core/contextAliases.deprecated.d.ts +0 -1
- package/dist/context/core/contextAliases.deprecated.js +0 -1
- package/dist/context/core/contextKey.key.d.ts +0 -1
- package/dist/context/core/contextKey.key.js +4 -3
- package/dist/context/core/executionContext.context.d.ts +0 -1
- package/dist/context/core/executionContext.context.js +0 -1
- package/dist/context/core/index.d.ts +0 -1
- package/dist/context/core/index.js +0 -1
- package/dist/context/index.d.ts +0 -1
- package/dist/context/index.js +0 -1
- package/dist/context/provider/contextProvider.provider.d.ts +0 -1
- package/dist/context/provider/contextProvider.provider.js +0 -1
- package/dist/context/provider/contextStorage.storage.d.ts +0 -1
- package/dist/context/provider/contextStorage.storage.js +0 -1
- package/dist/context/provider/defaultContextStorage.storage.d.ts +0 -1
- package/dist/context/provider/defaultContextStorage.storage.js +0 -1
- package/dist/context/provider/index.d.ts +0 -1
- package/dist/context/provider/index.js +0 -1
- package/dist/context/snapshot/contextSnapshot.snapshot.d.ts +0 -1
- package/dist/context/snapshot/contextSnapshot.snapshot.js +0 -1
- package/dist/context/snapshot/index.d.ts +0 -1
- package/dist/context/snapshot/index.js +0 -1
- package/dist/context/values/contextValues.values.d.ts +0 -1
- package/dist/context/values/contextValues.values.js +0 -1
- package/dist/context/values/index.d.ts +0 -1
- package/dist/context/values/index.js +0 -1
- package/dist/contracts/adapter.d.ts +0 -1
- package/dist/contracts/adapter.js +0 -1
- package/dist/contracts/disposable.d.ts +0 -1
- package/dist/contracts/disposable.js +0 -1
- package/dist/contracts/handler.d.ts +0 -1
- package/dist/contracts/handler.js +0 -1
- package/dist/contracts/index.d.ts +0 -1
- package/dist/contracts/index.js +0 -1
- package/dist/errors/contextValueNotFound.error.d.ts +15 -0
- package/dist/errors/contextValueNotFound.error.js +23 -0
- package/dist/errors/errorCode.code.d.ts +1 -1
- package/dist/errors/errorCode.code.js +1 -1
- package/dist/errors/exceptions.d.ts +0 -1
- package/dist/errors/exceptions.js +0 -1
- package/dist/errors/frameworkError.error.d.ts +0 -1
- package/dist/errors/frameworkError.error.js +0 -1
- package/dist/errors/index.d.ts +1 -1
- package/dist/errors/index.js +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +16 -1
- package/dist/lifecycle/core/index.d.ts +0 -1
- package/dist/lifecycle/core/index.js +0 -1
- package/dist/lifecycle/core/lifecycle.d.ts +12 -2
- package/dist/lifecycle/core/lifecycle.js +12 -2
- package/dist/lifecycle/core/lifecycle.rollback.d.ts +0 -1
- package/dist/lifecycle/core/lifecycle.rollback.js +0 -1
- package/dist/lifecycle/core/lifecycleHook.hook.d.ts +0 -1
- package/dist/lifecycle/core/lifecycleHook.hook.js +0 -1
- package/dist/lifecycle/core/lifecycleRegistry.registry.d.ts +0 -1
- package/dist/lifecycle/core/lifecycleRegistry.registry.js +0 -1
- package/dist/lifecycle/index.d.ts +0 -1
- package/dist/lifecycle/index.js +0 -1
- package/dist/lifecycle/manager/index.d.ts +0 -1
- package/dist/lifecycle/manager/index.js +0 -1
- package/dist/lifecycle/manager/lifecycleManager.manager.d.ts +0 -1
- package/dist/lifecycle/manager/lifecycleManager.manager.js +0 -1
- package/dist/lifecycle/scope/index.d.ts +0 -1
- package/dist/lifecycle/scope/index.js +0 -1
- package/dist/lifecycle/scope/lifecycleScope.scope.d.ts +0 -1
- package/dist/lifecycle/scope/lifecycleScope.scope.js +0 -1
- package/dist/logging/console/consoleLogger.logger.d.ts +0 -1
- package/dist/logging/console/consoleLogger.logger.js +6 -2
- package/dist/logging/console/index.d.ts +0 -1
- package/dist/logging/console/index.js +0 -1
- package/dist/logging/console/loggerFactory.factory.d.ts +0 -1
- package/dist/logging/console/loggerFactory.factory.js +0 -1
- package/dist/logging/core/index.d.ts +0 -1
- package/dist/logging/core/index.js +0 -1
- package/dist/logging/core/logEntry.entry.d.ts +0 -1
- package/dist/logging/core/logEntry.entry.js +0 -1
- package/dist/logging/core/logLevel.level.d.ts +0 -1
- package/dist/logging/core/logLevel.level.js +0 -1
- package/dist/logging/core/logRedaction.redaction.d.ts +0 -1
- package/dist/logging/core/logRedaction.redaction.js +0 -1
- package/dist/logging/core/logger.d.ts +7 -2
- package/dist/logging/core/logger.js +22 -3
- package/dist/logging/core/loggerContext.context.d.ts +0 -1
- package/dist/logging/core/loggerContext.context.js +0 -1
- package/dist/logging/core/loggerOptions.options.d.ts +6 -3
- package/dist/logging/core/loggerOptions.options.js +0 -1
- package/dist/logging/index.d.ts +0 -1
- package/dist/logging/index.js +0 -1
- package/dist/modules/index.d.ts +0 -1
- package/dist/modules/index.js +0 -1
- package/dist/modules/module.d.ts +0 -1
- package/dist/modules/module.js +0 -1
- package/dist/modules/moduleContext.context.d.ts +0 -1
- package/dist/modules/moduleContext.context.js +0 -1
- package/dist/modules/moduleDefinition.definition.d.ts +0 -1
- package/dist/modules/moduleDefinition.definition.js +0 -1
- package/dist/modules/moduleDependency/index.d.ts +0 -1
- package/dist/modules/moduleDependency/index.js +0 -1
- package/dist/modules/moduleDependency/moduleDependency.graph.d.ts +0 -1
- package/dist/modules/moduleDependency/moduleDependency.graph.js +0 -1
- package/dist/modules/moduleDependency/moduleDependency.ordering.d.ts +0 -1
- package/dist/modules/moduleDependency/moduleDependency.ordering.js +0 -1
- package/dist/modules/moduleDependency/moduleDependency.type.d.ts +0 -1
- package/dist/modules/moduleDependency/moduleDependency.type.js +0 -1
- package/dist/modules/moduleError/index.d.ts +0 -1
- package/dist/modules/moduleError/index.js +0 -1
- package/dist/modules/moduleError/moduleError.base.d.ts +0 -1
- package/dist/modules/moduleError/moduleError.base.js +0 -1
- package/dist/modules/moduleError/moduleError.dependency.d.ts +19 -3
- package/dist/modules/moduleError/moduleError.dependency.js +16 -4
- package/dist/modules/moduleError/moduleError.helpers.d.ts +0 -1
- package/dist/modules/moduleError/moduleError.helpers.js +0 -1
- package/dist/modules/moduleError/moduleError.lifecycle.d.ts +0 -1
- package/dist/modules/moduleError/moduleError.lifecycle.js +0 -1
- package/dist/modules/moduleError/moduleError.registration.d.ts +0 -1
- package/dist/modules/moduleError/moduleError.registration.js +0 -1
- package/dist/modules/moduleLifecycle/index.d.ts +0 -1
- package/dist/modules/moduleLifecycle/index.js +0 -1
- package/dist/modules/moduleLifecycle/moduleLifecycle.exclusive.d.ts +25 -0
- package/dist/modules/moduleLifecycle/moduleLifecycle.exclusive.js +63 -0
- package/dist/modules/moduleLifecycle/moduleLifecycle.lifecycle.d.ts +20 -2
- package/dist/modules/moduleLifecycle/moduleLifecycle.lifecycle.js +52 -20
- package/dist/modules/moduleLifecycle/moduleLifecycle.stateMachine.d.ts +0 -1
- package/dist/modules/moduleLifecycle/moduleLifecycle.stateMachine.js +4 -3
- package/dist/modules/moduleLifecycle/moduleLifecycle.type.d.ts +0 -1
- package/dist/modules/moduleLifecycle/moduleLifecycle.type.js +0 -1
- package/dist/modules/moduleLoader/index.d.ts +0 -1
- package/dist/modules/moduleLoader/index.js +0 -1
- package/dist/modules/moduleLoader/moduleLoader.loader.d.ts +0 -1
- package/dist/modules/moduleLoader/moduleLoader.loader.js +0 -1
- package/dist/modules/moduleLoader/moduleLoader.type.d.ts +0 -1
- package/dist/modules/moduleLoader/moduleLoader.type.js +0 -1
- package/dist/modules/moduleMetadata.metadata.d.ts +0 -1
- package/dist/modules/moduleMetadata.metadata.js +0 -1
- package/dist/modules/moduleRegistry/index.d.ts +0 -1
- package/dist/modules/moduleRegistry/index.js +0 -1
- package/dist/modules/moduleRegistry/moduleRegistry.registry.d.ts +0 -1
- package/dist/modules/moduleRegistry/moduleRegistry.registry.js +0 -1
- package/dist/modules/moduleRegistry/moduleRegistry.type.d.ts +0 -1
- package/dist/modules/moduleRegistry/moduleRegistry.type.js +0 -1
- package/dist/runtime/index.d.ts +1 -2
- package/dist/runtime/index.js +0 -1
- package/dist/runtime/runtime.d.ts +18 -2
- package/dist/runtime/runtime.js +23 -1
- package/dist/runtime/runtimeBootstrap/index.d.ts +0 -1
- package/dist/runtime/runtimeBootstrap/index.js +0 -1
- package/dist/runtime/runtimeBootstrap/pipeline/index.d.ts +0 -1
- package/dist/runtime/runtimeBootstrap/pipeline/index.js +0 -1
- package/dist/runtime/runtimeBootstrap/pipeline/runtimeBootstrap.pipeline.d.ts +0 -1
- package/dist/runtime/runtimeBootstrap/pipeline/runtimeBootstrap.pipeline.js +0 -1
- package/dist/runtime/runtimeBootstrap/runtimeBootstrap.core.d.ts +0 -1
- package/dist/runtime/runtimeBootstrap/runtimeBootstrap.core.js +8 -2
- package/dist/runtime/runtimeBootstrap/runtimeBootstrap.type.d.ts +0 -1
- package/dist/runtime/runtimeBootstrap/runtimeBootstrap.type.js +0 -1
- package/dist/runtime/runtimeContext/index.d.ts +0 -1
- package/dist/runtime/runtimeContext/index.js +0 -1
- package/dist/runtime/runtimeContext/runtimeContext.factory.d.ts +0 -1
- package/dist/runtime/runtimeContext/runtimeContext.factory.js +0 -1
- package/dist/runtime/runtimeContext/runtimeContext.type.d.ts +0 -1
- package/dist/runtime/runtimeContext/runtimeContext.type.js +0 -1
- package/dist/runtime/runtimeEnvironment/detection/index.d.ts +0 -1
- package/dist/runtime/runtimeEnvironment/detection/index.js +0 -1
- package/dist/runtime/runtimeEnvironment/detection/runtimeEnvironment.detection.d.ts +0 -1
- package/dist/runtime/runtimeEnvironment/detection/runtimeEnvironment.detection.js +0 -1
- package/dist/runtime/runtimeEnvironment/detection/runtimeEnvironment.env.d.ts +0 -1
- package/dist/runtime/runtimeEnvironment/detection/runtimeEnvironment.env.js +0 -1
- package/dist/runtime/runtimeEnvironment/detection/runtimeEnvironment.os.d.ts +0 -1
- package/dist/runtime/runtimeEnvironment/detection/runtimeEnvironment.os.js +0 -1
- package/dist/runtime/runtimeEnvironment/index.d.ts +0 -1
- package/dist/runtime/runtimeEnvironment/index.js +0 -1
- package/dist/runtime/runtimeEnvironment/runtimeEnvironment.core.d.ts +0 -1
- package/dist/runtime/runtimeEnvironment/runtimeEnvironment.core.js +0 -1
- package/dist/runtime/runtimeEnvironment/runtimeEnvironment.type.d.ts +0 -1
- package/dist/runtime/runtimeEnvironment/runtimeEnvironment.type.js +0 -1
- package/dist/runtime/runtimeError/index.d.ts +0 -1
- package/dist/runtime/runtimeError/index.js +0 -1
- package/dist/runtime/runtimeError/runtimeError.base.d.ts +0 -1
- package/dist/runtime/runtimeError/runtimeError.base.js +0 -1
- package/dist/runtime/runtimeError/runtimeError.lifecycle.d.ts +0 -1
- package/dist/runtime/runtimeError/runtimeError.lifecycle.js +0 -1
- package/dist/runtime/runtimeError/runtimeError.specialized.d.ts +0 -1
- package/dist/runtime/runtimeError/runtimeError.specialized.js +0 -1
- package/dist/runtime/runtimeError/runtimeError.type.d.ts +0 -1
- package/dist/runtime/runtimeError/runtimeError.type.js +0 -1
- package/dist/runtime/runtimeLogger.d.ts +0 -1
- package/dist/runtime/runtimeLogger.js +5 -2
- package/dist/runtime/runtimeOptions/index.d.ts +0 -1
- package/dist/runtime/runtimeOptions/index.js +0 -1
- package/dist/runtime/runtimeOptions/runtimeOptions.defaults.d.ts +0 -1
- package/dist/runtime/runtimeOptions/runtimeOptions.defaults.js +0 -1
- package/dist/runtime/runtimeOptions/runtimeOptions.mode.d.ts +0 -1
- package/dist/runtime/runtimeOptions/runtimeOptions.mode.js +0 -1
- package/dist/runtime/runtimeOptions/runtimeOptions.resolver.d.ts +0 -1
- package/dist/runtime/runtimeOptions/runtimeOptions.resolver.js +0 -1
- package/dist/runtime/runtimeOptions/runtimeOptions.type.d.ts +0 -1
- package/dist/runtime/runtimeOptions/runtimeOptions.type.js +0 -1
- package/dist/runtime/runtimeOptions/runtimeOptions.validation.d.ts +0 -1
- package/dist/runtime/runtimeOptions/runtimeOptions.validation.js +0 -1
- package/dist/runtime/runtimeShutdown/index.d.ts +0 -1
- package/dist/runtime/runtimeShutdown/index.js +0 -1
- package/dist/runtime/runtimeShutdown/pipeline/index.d.ts +0 -1
- package/dist/runtime/runtimeShutdown/pipeline/index.js +0 -1
- package/dist/runtime/runtimeShutdown/pipeline/runtimeShutdown.pipeline.d.ts +0 -1
- package/dist/runtime/runtimeShutdown/pipeline/runtimeShutdown.pipeline.js +0 -1
- package/dist/runtime/runtimeShutdown/runtimeShutdown.core.d.ts +0 -1
- package/dist/runtime/runtimeShutdown/runtimeShutdown.core.js +4 -2
- package/dist/runtime/runtimeShutdown/runtimeShutdown.type.d.ts +0 -1
- package/dist/runtime/runtimeShutdown/runtimeShutdown.type.js +0 -1
- package/dist/runtime/runtimeSignals/index.d.ts +0 -1
- package/dist/runtime/runtimeSignals/index.js +0 -1
- package/dist/runtime/runtimeSignals/runtimeSignals.d.ts +7 -3
- package/dist/runtime/runtimeSignals/runtimeSignals.fatal.d.ts +0 -1
- package/dist/runtime/runtimeSignals/runtimeSignals.fatal.js +0 -1
- package/dist/runtime/runtimeSignals/runtimeSignals.js +4 -5
- package/dist/runtime/runtimeState.state.d.ts +0 -1
- package/dist/runtime/runtimeState.state.js +0 -1
- package/dist/runtime/runtimeTimeout.d.ts +0 -1
- package/dist/runtime/runtimeTimeout.js +0 -1
- package/package.json +3 -3
|
@@ -32,4 +32,3 @@ export declare class RuntimeUnsupportedOperationError extends RuntimeError {
|
|
|
32
32
|
export declare class RuntimeCancellationError extends RuntimeError {
|
|
33
33
|
constructor(message?: string, options?: Omit<RuntimeErrorOptions, "code">);
|
|
34
34
|
}
|
|
35
|
-
//# sourceMappingURL=runtimeError.specialized.d.ts.map
|
|
@@ -2,4 +2,3 @@ import type { RuntimeIdentity } from "./runtimeContext/index.js";
|
|
|
2
2
|
import type { RuntimeEnvironment } from "./runtimeEnvironment/index.js";
|
|
3
3
|
import type { Logger } from "../logging/core/logger.js";
|
|
4
4
|
export declare function logRuntimeEvent(logger: Logger, identity: RuntimeIdentity, environment: RuntimeEnvironment, level: "debug" | "info" | "warn" | "error", message: string, metadata?: Record<string, unknown>): void;
|
|
5
|
-
//# sourceMappingURL=runtimeLogger.d.ts.map
|
|
@@ -6,7 +6,11 @@ export function logRuntimeEvent(logger, identity, environment, level, message, m
|
|
|
6
6
|
method.call(logger, message, {
|
|
7
7
|
runtimeId: identity.id,
|
|
8
8
|
runtimeName: identity.name,
|
|
9
|
-
environment
|
|
9
|
+
// `environment` is the runtime mode (development/test/production),
|
|
10
|
+
// as everywhere else in the framework; the JavaScript engine used
|
|
11
|
+
// to be logged under that key and read as "environment=node".
|
|
12
|
+
environment: environment.mode,
|
|
13
|
+
engine: environment.engine,
|
|
10
14
|
...metadata,
|
|
11
15
|
});
|
|
12
16
|
}
|
|
@@ -15,4 +19,3 @@ export function logRuntimeEvent(logger, identity, environment, level, message, m
|
|
|
15
19
|
/* Logging must never break runtime operations. */
|
|
16
20
|
}
|
|
17
21
|
}
|
|
18
|
-
//# sourceMappingURL=runtimeLogger.js.map
|
|
@@ -7,4 +7,3 @@ export { DEFAULT_RUNTIME_OPTIONS } from "./runtimeOptions.defaults.js";
|
|
|
7
7
|
export { resolveRuntimeOptions, validateRuntimeOptions, } from "./runtimeOptions.resolver.js";
|
|
8
8
|
export { isRuntimeMode, isRuntimeRole, assertRuntimeMode, assertRuntimeRole, } from "./runtimeOptions.validation.js";
|
|
9
9
|
export type { RuntimeMode, RuntimeRole, RuntimeStartupOptions, RuntimeShutdownOptions, RuntimeSignalOptions, RuntimeDiagnosticsOptions, RuntimeEnvironmentOverrides, RuntimeOptions, ResolvedRuntimeOptions, } from "./runtimeOptions.type.js";
|
|
10
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -6,4 +6,3 @@
|
|
|
6
6
|
export { DEFAULT_RUNTIME_OPTIONS } from "./runtimeOptions.defaults.js";
|
|
7
7
|
export { resolveRuntimeOptions, validateRuntimeOptions, } from "./runtimeOptions.resolver.js";
|
|
8
8
|
export { isRuntimeMode, isRuntimeRole, assertRuntimeMode, assertRuntimeRole, } from "./runtimeOptions.validation.js";
|
|
9
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -3,4 +3,3 @@ import type { ResolvedRuntimeOptions } from "./runtimeOptions.type.js";
|
|
|
3
3
|
* Default runtime configuration.
|
|
4
4
|
*/
|
|
5
5
|
export declare const DEFAULT_RUNTIME_OPTIONS: Readonly<Omit<ResolvedRuntimeOptions, "environment" | "metadata">>;
|
|
6
|
-
//# sourceMappingURL=runtimeOptions.defaults.d.ts.map
|
|
@@ -11,4 +11,3 @@ import type { RuntimeMode } from "./runtimeOptions.type.js";
|
|
|
11
11
|
* @param variables - Environment variables to read instead of `process.env`.
|
|
12
12
|
*/
|
|
13
13
|
export declare function resolveDefaultRuntimeMode(variables?: RuntimeEnvironmentVariables): RuntimeMode;
|
|
14
|
-
//# sourceMappingURL=runtimeOptions.mode.d.ts.map
|
|
@@ -13,4 +13,3 @@ export function resolveDefaultRuntimeMode(variables) {
|
|
|
13
13
|
const environment = resolveEnvironment(variables === undefined ? undefined : { ...variables });
|
|
14
14
|
return environment === "staging" ? "production" : environment;
|
|
15
15
|
}
|
|
16
|
-
//# sourceMappingURL=runtimeOptions.mode.js.map
|
|
@@ -23,4 +23,3 @@ export declare function validateRuntimeName(name: string | undefined): void;
|
|
|
23
23
|
* Validates a runtime timeout.
|
|
24
24
|
*/
|
|
25
25
|
export declare function validateRuntimeTimeout(timeout: number | undefined, field: "startup" | "shutdown" | "fatal exit"): void;
|
|
26
|
-
//# sourceMappingURL=runtimeOptions.validation.d.ts.map
|
|
@@ -8,4 +8,3 @@ export { DefaultRuntimeShutdown } from "./runtimeShutdown.core.js";
|
|
|
8
8
|
export { executeShutdownPipeline, createShutdownPipelineState, createShutdownResult, } from "./pipeline/index.js";
|
|
9
9
|
export type { ShutdownCounters, ShutdownPipelineState, } from "./pipeline/index.js";
|
|
10
10
|
export type { RuntimeShutdownDependencies, RuntimeShutdownConfig, RuntimeShutdownPhase, RuntimeShutdownErrorInfo, RuntimeShutdownResult, RuntimeShutdown, ResolvedShutdownOptions, } from "./runtimeShutdown.type.js";
|
|
11
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -5,4 +5,3 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export { executeShutdownPipeline, createShutdownPipelineState, createShutdownResult, } from "./runtimeShutdown.pipeline.js";
|
|
7
7
|
export type { ShutdownCounters, ShutdownLogFn, ShutdownPipelineServices, ShutdownPipelineState, } from "./runtimeShutdown.pipeline.js";
|
|
8
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -36,4 +36,3 @@ export interface ShutdownPipelineServices {
|
|
|
36
36
|
}
|
|
37
37
|
export declare function executeShutdownPipeline(options: ResolvedShutdownOptions, services: ShutdownPipelineServices, state: ShutdownPipelineState, signal: AbortSignal, setPhase: (phase: RuntimeShutdownPhase) => void, log: ShutdownLogFn): Promise<void>;
|
|
38
38
|
export declare function createShutdownResult(success: boolean, phase: RuntimeShutdownPhase, counters: ShutdownCounters, errors: readonly RuntimeShutdownErrorInfo[], startedAt: Date, completedAt: Date): RuntimeShutdownResult;
|
|
39
|
-
//# sourceMappingURL=runtimeShutdown.pipeline.d.ts.map
|
|
@@ -47,8 +47,11 @@ export class DefaultRuntimeShutdown {
|
|
|
47
47
|
const diagnostics = this._runtimeOptions.diagnostics;
|
|
48
48
|
try {
|
|
49
49
|
if (diagnostics.shutdownLogging) {
|
|
50
|
+
// The phase about to run, not the pipeline's resting "created".
|
|
50
51
|
this.log("info", "Runtime shutdown started.", {
|
|
51
|
-
...(diagnostics.includeState && {
|
|
52
|
+
...(diagnostics.includeState && {
|
|
53
|
+
phase: configuration.stopModules ? "stopping" : "destroying",
|
|
54
|
+
}),
|
|
52
55
|
...(diagnostics.includeModules && {
|
|
53
56
|
modules: this._moduleRegistry
|
|
54
57
|
.getLoadedModules()
|
|
@@ -142,4 +145,3 @@ export class DefaultRuntimeShutdown {
|
|
|
142
145
|
logRuntimeEvent(this._logger, this._identity, this._environment, level, message, metadata);
|
|
143
146
|
}
|
|
144
147
|
}
|
|
145
|
-
//# sourceMappingURL=runtimeShutdown.core.js.map
|
|
@@ -18,10 +18,15 @@ export type RuntimeProcessEvent = RuntimeTerminationSignal | "uncaughtException"
|
|
|
18
18
|
* Minimal `process`-like target. Defaults to the global process; tests
|
|
19
19
|
* inject an EventEmitter so nothing is registered on the real process
|
|
20
20
|
* and `exit` can be observed instead of executed.
|
|
21
|
+
*
|
|
22
|
+
* Listeners are typed `(...args: unknown[]) => void`: the previous
|
|
23
|
+
* `never[]` rest made `process` and `EventEmitter` (whose listeners are
|
|
24
|
+
* `(...args: any[]) => void`) fail to type-check against this target
|
|
25
|
+
* under current `@types/node`.
|
|
21
26
|
*/
|
|
22
27
|
export interface RuntimeSignalTarget {
|
|
23
|
-
on(event: string, listener: (...args:
|
|
24
|
-
off(event: string, listener: (...args:
|
|
28
|
+
on(event: string, listener: (...args: unknown[]) => void): unknown;
|
|
29
|
+
off(event: string, listener: (...args: unknown[]) => void): unknown;
|
|
25
30
|
exit?(code?: number): void;
|
|
26
31
|
}
|
|
27
32
|
/**
|
|
@@ -101,4 +106,3 @@ export declare class RuntimeSignalManager {
|
|
|
101
106
|
private run;
|
|
102
107
|
}
|
|
103
108
|
export {};
|
|
104
|
-
//# sourceMappingURL=runtimeSignals.d.ts.map
|
|
@@ -26,4 +26,3 @@ export interface RuntimeFatalExitPolicy {
|
|
|
26
26
|
* `exitOnFatalError` is off.
|
|
27
27
|
*/
|
|
28
28
|
export declare function runFatalHandler(handler: () => void | Promise<void> | undefined, target: RuntimeSignalTarget | undefined, policy: RuntimeFatalExitPolicy, logger: Logger | undefined, event: string): void;
|
|
29
|
-
//# sourceMappingURL=runtimeSignals.fatal.d.ts.map
|
|
@@ -94,13 +94,13 @@ export class RuntimeSignalManager {
|
|
|
94
94
|
this.handleSignal(event);
|
|
95
95
|
};
|
|
96
96
|
case "uncaughtException":
|
|
97
|
-
return (
|
|
97
|
+
return (error) => {
|
|
98
98
|
this.runFatal(() => this._handlers?.onUncaughtException(error), "uncaughtException");
|
|
99
|
-
}
|
|
99
|
+
};
|
|
100
100
|
case "unhandledRejection":
|
|
101
|
-
return (
|
|
101
|
+
return (reason) => {
|
|
102
102
|
this.runFatal(() => this._handlers?.onUnhandledRejection(reason), "unhandledRejection");
|
|
103
|
-
}
|
|
103
|
+
};
|
|
104
104
|
default:
|
|
105
105
|
return () => { };
|
|
106
106
|
}
|
|
@@ -157,4 +157,3 @@ function getGlobalProcess() {
|
|
|
157
157
|
}
|
|
158
158
|
return undefined;
|
|
159
159
|
}
|
|
160
|
-
//# sourceMappingURL=runtimeSignals.js.map
|
|
@@ -75,4 +75,3 @@ export declare function createRuntimeStateTransition(from: RuntimeState, to: Run
|
|
|
75
75
|
export declare function getRuntimeStateLabel(state: RuntimeState): string;
|
|
76
76
|
export declare function getRuntimeStates(): readonly RuntimeState[];
|
|
77
77
|
export declare function getNextRuntimeStates(state: RuntimeState): readonly RuntimeState[];
|
|
78
|
-
//# sourceMappingURL=runtimeState.state.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zudojs/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Application lifecycle management, execution context propagation, and runtime orchestration for Zudojs applications.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
"vitest": "^5.0.1"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@zudojs/errors": "1.
|
|
59
|
-
"@zudojs/constants": "1.
|
|
58
|
+
"@zudojs/errors": "1.4.0",
|
|
59
|
+
"@zudojs/constants": "1.2.0"
|
|
60
60
|
},
|
|
61
61
|
"license": "MIT",
|
|
62
62
|
"author": {
|