@endora-commerce/platform 0.100.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +58 -0
- package/dist/cli/dispatch.d.ts +146 -0
- package/dist/cli/dispatch.d.ts.map +1 -0
- package/dist/cli/dispatch.js +259 -0
- package/dist/cli/dispatch.js.map +1 -0
- package/dist/cli/index.d.ts +58 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +58 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/module-commands.d.ts +118 -0
- package/dist/cli/module-commands.d.ts.map +1 -0
- package/dist/cli/module-commands.js +120 -0
- package/dist/cli/module-commands.js.map +1 -0
- package/dist/commands/actor.d.ts +19 -0
- package/dist/commands/actor.d.ts.map +1 -0
- package/dist/commands/actor.js +45 -0
- package/dist/commands/actor.js.map +1 -0
- package/dist/commands/audit-from-context.d.ts +24 -0
- package/dist/commands/audit-from-context.d.ts.map +1 -0
- package/dist/commands/audit-from-context.js +28 -0
- package/dist/commands/audit-from-context.js.map +1 -0
- package/dist/commands/command-bus.d.ts +40 -0
- package/dist/commands/command-bus.d.ts.map +1 -0
- package/dist/commands/command-bus.js +46 -0
- package/dist/commands/command-bus.js.map +1 -0
- package/dist/commands/command.d.ts +76 -0
- package/dist/commands/command.d.ts.map +1 -0
- package/dist/commands/command.js +2 -0
- package/dist/commands/command.js.map +1 -0
- package/dist/commands/index.d.ts +65 -0
- package/dist/commands/index.d.ts.map +1 -0
- package/dist/commands/index.js +57 -0
- package/dist/commands/index.js.map +1 -0
- package/dist/commands/reversible.d.ts +66 -0
- package/dist/commands/reversible.d.ts.map +1 -0
- package/dist/commands/reversible.js +41 -0
- package/dist/commands/reversible.js.map +1 -0
- package/dist/composition/compose-app.d.ts +305 -0
- package/dist/composition/compose-app.d.ts.map +1 -0
- package/dist/composition/compose-app.js +939 -0
- package/dist/composition/compose-app.js.map +1 -0
- package/dist/composition/index.d.ts +92 -0
- package/dist/composition/index.d.ts.map +1 -0
- package/dist/composition/index.js +175 -0
- package/dist/composition/index.js.map +1 -0
- package/dist/composition/newsletter-token-secret.d.ts +19 -0
- package/dist/composition/newsletter-token-secret.d.ts.map +1 -0
- package/dist/composition/newsletter-token-secret.js +24 -0
- package/dist/composition/newsletter-token-secret.js.map +1 -0
- package/dist/composition/process-runs-workers.d.ts +17 -0
- package/dist/composition/process-runs-workers.d.ts.map +1 -0
- package/dist/composition/process-runs-workers.js +19 -0
- package/dist/composition/process-runs-workers.js.map +1 -0
- package/dist/db/baseline-migration-inventory.d.ts +15 -0
- package/dist/db/baseline-migration-inventory.d.ts.map +1 -0
- package/dist/db/baseline-migration-inventory.js +115 -0
- package/dist/db/baseline-migration-inventory.js.map +1 -0
- package/dist/db/configured-entities.d.ts +74 -0
- package/dist/db/configured-entities.d.ts.map +1 -0
- package/dist/db/configured-entities.js +20 -0
- package/dist/db/configured-entities.js.map +1 -0
- package/dist/db/configured-migrations.d.ts +199 -0
- package/dist/db/configured-migrations.d.ts.map +1 -0
- package/dist/db/configured-migrations.js +181 -0
- package/dist/db/configured-migrations.js.map +1 -0
- package/dist/db/index.d.ts +54 -0
- package/dist/db/index.d.ts.map +1 -0
- package/dist/db/index.js +54 -0
- package/dist/db/index.js.map +1 -0
- package/dist/db/migrate.d.ts +21 -0
- package/dist/db/migrate.d.ts.map +1 -0
- package/dist/db/migrate.js +48 -0
- package/dist/db/migrate.js.map +1 -0
- package/dist/db/migration-order.d.ts +159 -0
- package/dist/db/migration-order.d.ts.map +1 -0
- package/dist/db/migration-order.js +273 -0
- package/dist/db/migration-order.js.map +1 -0
- package/dist/db/mikro-orm.config.d.ts +51 -0
- package/dist/db/mikro-orm.config.d.ts.map +1 -0
- package/dist/db/mikro-orm.config.js +64 -0
- package/dist/db/mikro-orm.config.js.map +1 -0
- package/dist/db/orm.d.ts +40 -0
- package/dist/db/orm.d.ts.map +1 -0
- package/dist/db/orm.js +25 -0
- package/dist/db/orm.js.map +1 -0
- package/dist/db/platform-schema.d.ts +102 -0
- package/dist/db/platform-schema.d.ts.map +1 -0
- package/dist/db/platform-schema.js +79 -0
- package/dist/db/platform-schema.js.map +1 -0
- package/dist/db/pluralizing-naming-strategy.d.ts +16 -0
- package/dist/db/pluralizing-naming-strategy.d.ts.map +1 -0
- package/dist/db/pluralizing-naming-strategy.js +66 -0
- package/dist/db/pluralizing-naming-strategy.js.map +1 -0
- package/dist/demo/guard.d.ts +101 -0
- package/dist/demo/guard.d.ts.map +1 -0
- package/dist/demo/guard.js +168 -0
- package/dist/demo/guard.js.map +1 -0
- package/dist/demo/host-command.d.ts +133 -0
- package/dist/demo/host-command.d.ts.map +1 -0
- package/dist/demo/host-command.js +113 -0
- package/dist/demo/host-command.js.map +1 -0
- package/dist/demo/index.d.ts +82 -0
- package/dist/demo/index.d.ts.map +1 -0
- package/dist/demo/index.js +82 -0
- package/dist/demo/index.js.map +1 -0
- package/dist/demo/packages.d.ts +67 -0
- package/dist/demo/packages.d.ts.map +1 -0
- package/dist/demo/packages.js +132 -0
- package/dist/demo/packages.js.map +1 -0
- package/dist/demo/plan.d.ts +111 -0
- package/dist/demo/plan.d.ts.map +1 -0
- package/dist/demo/plan.js +74 -0
- package/dist/demo/plan.js.map +1 -0
- package/dist/demo/report.d.ts +17 -0
- package/dist/demo/report.d.ts.map +1 -0
- package/dist/demo/report.js +85 -0
- package/dist/demo/report.js.map +1 -0
- package/dist/demo/runner.d.ts +207 -0
- package/dist/demo/runner.d.ts.map +1 -0
- package/dist/demo/runner.js +169 -0
- package/dist/demo/runner.js.map +1 -0
- package/dist/demo/scope.d.ts +44 -0
- package/dist/demo/scope.d.ts.map +1 -0
- package/dist/demo/scope.js +44 -0
- package/dist/demo/scope.js.map +1 -0
- package/dist/env/index.d.ts +68 -0
- package/dist/env/index.d.ts.map +1 -0
- package/dist/env/index.js +427 -0
- package/dist/env/index.js.map +1 -0
- package/dist/events/bus.d.ts +29 -0
- package/dist/events/bus.d.ts.map +1 -0
- package/dist/events/bus.js +67 -0
- package/dist/events/bus.js.map +1 -0
- package/dist/events/index.d.ts +19 -0
- package/dist/events/index.d.ts.map +1 -0
- package/dist/events/index.js +19 -0
- package/dist/events/index.js.map +1 -0
- package/dist/http/cursor.d.ts +10 -0
- package/dist/http/cursor.d.ts.map +1 -0
- package/dist/http/cursor.js +20 -0
- package/dist/http/cursor.js.map +1 -0
- package/dist/http/error-envelope.d.ts +127 -0
- package/dist/http/error-envelope.d.ts.map +1 -0
- package/dist/http/error-envelope.js +402 -0
- package/dist/http/error-envelope.js.map +1 -0
- package/dist/http/health.d.ts +88 -0
- package/dist/http/health.d.ts.map +1 -0
- package/dist/http/health.js +77 -0
- package/dist/http/health.js.map +1 -0
- package/dist/http/index.d.ts +50 -0
- package/dist/http/index.d.ts.map +1 -0
- package/dist/http/index.js +50 -0
- package/dist/http/index.js.map +1 -0
- package/dist/http/interceptors/dispatch.d.ts +14 -0
- package/dist/http/interceptors/dispatch.d.ts.map +1 -0
- package/dist/http/interceptors/dispatch.js +113 -0
- package/dist/http/interceptors/dispatch.js.map +1 -0
- package/dist/http/interceptors/index.d.ts +6 -0
- package/dist/http/interceptors/index.d.ts.map +1 -0
- package/dist/http/interceptors/index.js +5 -0
- package/dist/http/interceptors/index.js.map +1 -0
- package/dist/http/interceptors/registry.d.ts +44 -0
- package/dist/http/interceptors/registry.d.ts.map +1 -0
- package/dist/http/interceptors/registry.js +123 -0
- package/dist/http/interceptors/registry.js.map +1 -0
- package/dist/http/interceptors/route-table.d.ts +33 -0
- package/dist/http/interceptors/route-table.d.ts.map +1 -0
- package/dist/http/interceptors/route-table.js +39 -0
- package/dist/http/interceptors/route-table.js.map +1 -0
- package/dist/http/interceptors/types.d.ts +101 -0
- package/dist/http/interceptors/types.d.ts.map +1 -0
- package/dist/http/interceptors/types.js +2 -0
- package/dist/http/interceptors/types.js.map +1 -0
- package/dist/http/interceptors/validation.d.ts +22 -0
- package/dist/http/interceptors/validation.d.ts.map +1 -0
- package/dist/http/interceptors/validation.js +39 -0
- package/dist/http/interceptors/validation.js.map +1 -0
- package/dist/http/logger.d.ts +9 -0
- package/dist/http/logger.d.ts.map +1 -0
- package/dist/http/logger.js +25 -0
- package/dist/http/logger.js.map +1 -0
- package/dist/http/openapi.d.ts +21 -0
- package/dist/http/openapi.d.ts.map +1 -0
- package/dist/http/openapi.js +114 -0
- package/dist/http/openapi.js.map +1 -0
- package/dist/http/product-audience.d.ts +78 -0
- package/dist/http/product-audience.d.ts.map +1 -0
- package/dist/http/product-audience.js +92 -0
- package/dist/http/product-audience.js.map +1 -0
- package/dist/http/request-actor.d.ts +82 -0
- package/dist/http/request-actor.d.ts.map +1 -0
- package/dist/http/request-actor.js +2 -0
- package/dist/http/request-actor.js.map +1 -0
- package/dist/http/server.d.ts +60 -0
- package/dist/http/server.d.ts.map +1 -0
- package/dist/http/server.js +117 -0
- package/dist/http/server.js.map +1 -0
- package/dist/http/storefront-revalidator.d.ts +29 -0
- package/dist/http/storefront-revalidator.d.ts.map +1 -0
- package/dist/http/storefront-revalidator.js +34 -0
- package/dist/http/storefront-revalidator.js.map +1 -0
- package/dist/http/test-actor-carrier.d.ts +28 -0
- package/dist/http/test-actor-carrier.d.ts.map +1 -0
- package/dist/http/test-actor-carrier.js +10 -0
- package/dist/http/test-actor-carrier.js.map +1 -0
- package/dist/http/trusted-proxy.d.ts +48 -0
- package/dist/http/trusted-proxy.d.ts.map +1 -0
- package/dist/http/trusted-proxy.js +136 -0
- package/dist/http/trusted-proxy.js.map +1 -0
- package/dist/kernel/audit/audit-log-entry.entity.d.ts +33 -0
- package/dist/kernel/audit/audit-log-entry.entity.d.ts.map +1 -0
- package/dist/kernel/audit/audit-log-entry.entity.js +102 -0
- package/dist/kernel/audit/audit-log-entry.entity.js.map +1 -0
- package/dist/kernel/audit/audit-log-service.d.ts +63 -0
- package/dist/kernel/audit/audit-log-service.d.ts.map +1 -0
- package/dist/kernel/audit/audit-log-service.js +107 -0
- package/dist/kernel/audit/audit-log-service.js.map +1 -0
- package/dist/kernel/cache/in-process-cache-registry.d.ts +93 -0
- package/dist/kernel/cache/in-process-cache-registry.d.ts.map +1 -0
- package/dist/kernel/cache/in-process-cache-registry.js +78 -0
- package/dist/kernel/cache/in-process-cache-registry.js.map +1 -0
- package/dist/kernel/cache/shared-drop-marks.d.ts +39 -0
- package/dist/kernel/cache/shared-drop-marks.d.ts.map +1 -0
- package/dist/kernel/cache/shared-drop-marks.js +68 -0
- package/dist/kernel/cache/shared-drop-marks.js.map +1 -0
- package/dist/kernel/compose.d.ts +234 -0
- package/dist/kernel/compose.d.ts.map +1 -0
- package/dist/kernel/compose.js +279 -0
- package/dist/kernel/compose.js.map +1 -0
- package/dist/kernel/container.d.ts +95 -0
- package/dist/kernel/container.d.ts.map +1 -0
- package/dist/kernel/container.js +90 -0
- package/dist/kernel/container.js.map +1 -0
- package/dist/kernel/contribution-sinks.d.ts +106 -0
- package/dist/kernel/contribution-sinks.d.ts.map +1 -0
- package/dist/kernel/contribution-sinks.js +153 -0
- package/dist/kernel/contribution-sinks.js.map +1 -0
- package/dist/kernel/crypto/password-hasher.d.ts +3 -0
- package/dist/kernel/crypto/password-hasher.d.ts.map +1 -0
- package/dist/kernel/crypto/password-hasher.js +44 -0
- package/dist/kernel/crypto/password-hasher.js.map +1 -0
- package/dist/kernel/i18n/error-envelope-options.d.ts +56 -0
- package/dist/kernel/i18n/error-envelope-options.d.ts.map +1 -0
- package/dist/kernel/i18n/error-envelope-options.js +46 -0
- package/dist/kernel/i18n/error-envelope-options.js.map +1 -0
- package/dist/kernel/i18n/error-translation.d.ts +144 -0
- package/dist/kernel/i18n/error-translation.d.ts.map +1 -0
- package/dist/kernel/i18n/error-translation.js +84 -0
- package/dist/kernel/i18n/error-translation.js.map +1 -0
- package/dist/kernel/i18n/request-language.d.ts +80 -0
- package/dist/kernel/i18n/request-language.d.ts.map +1 -0
- package/dist/kernel/i18n/request-language.js +168 -0
- package/dist/kernel/i18n/request-language.js.map +1 -0
- package/dist/kernel/index.d.ts +142 -0
- package/dist/kernel/index.d.ts.map +1 -0
- package/dist/kernel/index.js +160 -0
- package/dist/kernel/index.js.map +1 -0
- package/dist/kernel/lazy-port.d.ts +59 -0
- package/dist/kernel/lazy-port.d.ts.map +1 -0
- package/dist/kernel/lazy-port.js +78 -0
- package/dist/kernel/lazy-port.js.map +1 -0
- package/dist/kernel/lifecycle/activation-resolver.d.ts +63 -0
- package/dist/kernel/lifecycle/activation-resolver.d.ts.map +1 -0
- package/dist/kernel/lifecycle/activation-resolver.js +70 -0
- package/dist/kernel/lifecycle/activation-resolver.js.map +1 -0
- package/dist/kernel/lifecycle/capability-registry.d.ts +145 -0
- package/dist/kernel/lifecycle/capability-registry.d.ts.map +1 -0
- package/dist/kernel/lifecycle/capability-registry.js +170 -0
- package/dist/kernel/lifecycle/capability-registry.js.map +1 -0
- package/dist/kernel/lifecycle/effective-state.d.ts +126 -0
- package/dist/kernel/lifecycle/effective-state.d.ts.map +1 -0
- package/dist/kernel/lifecycle/effective-state.js +111 -0
- package/dist/kernel/lifecycle/effective-state.js.map +1 -0
- package/dist/kernel/lifecycle/module-registration.entity.d.ts +57 -0
- package/dist/kernel/lifecycle/module-registration.entity.d.ts.map +1 -0
- package/dist/kernel/lifecycle/module-registration.entity.js +111 -0
- package/dist/kernel/lifecycle/module-registration.entity.js.map +1 -0
- package/dist/kernel/lifecycle/plugin-helpers.d.ts +165 -0
- package/dist/kernel/lifecycle/plugin-helpers.d.ts.map +1 -0
- package/dist/kernel/lifecycle/plugin-helpers.js +395 -0
- package/dist/kernel/lifecycle/plugin-helpers.js.map +1 -0
- package/dist/kernel/lifecycle/registry-cache.d.ts +318 -0
- package/dist/kernel/lifecycle/registry-cache.d.ts.map +1 -0
- package/dist/kernel/lifecycle/registry-cache.js +509 -0
- package/dist/kernel/lifecycle/registry-cache.js.map +1 -0
- package/dist/kernel/lifecycle/required-modules.d.ts +137 -0
- package/dist/kernel/lifecycle/required-modules.d.ts.map +1 -0
- package/dist/kernel/lifecycle/required-modules.js +80 -0
- package/dist/kernel/lifecycle/required-modules.js.map +1 -0
- package/dist/kernel/lifecycle/unique-module-ids.d.ts +58 -0
- package/dist/kernel/lifecycle/unique-module-ids.d.ts.map +1 -0
- package/dist/kernel/lifecycle/unique-module-ids.js +82 -0
- package/dist/kernel/lifecycle/unique-module-ids.js.map +1 -0
- package/dist/kernel/logging.d.ts +116 -0
- package/dist/kernel/logging.d.ts.map +1 -0
- package/dist/kernel/logging.js +71 -0
- package/dist/kernel/logging.js.map +1 -0
- package/dist/kernel/module-context.d.ts +563 -0
- package/dist/kernel/module-context.d.ts.map +1 -0
- package/dist/kernel/module-context.js +670 -0
- package/dist/kernel/module-context.js.map +1 -0
- package/dist/kernel/ports/audit.d.ts +115 -0
- package/dist/kernel/ports/audit.d.ts.map +1 -0
- package/dist/kernel/ports/audit.js +2 -0
- package/dist/kernel/ports/audit.js.map +1 -0
- package/dist/kernel/ports/organizations.d.ts +56 -0
- package/dist/kernel/ports/organizations.d.ts.map +1 -0
- package/dist/kernel/ports/organizations.js +2 -0
- package/dist/kernel/ports/organizations.js.map +1 -0
- package/dist/kernel/ports/provide.d.ts +14 -0
- package/dist/kernel/ports/provide.d.ts.map +1 -0
- package/dist/kernel/ports/provide.js +50 -0
- package/dist/kernel/ports/provide.js.map +1 -0
- package/dist/kernel/ports/require-admin.d.ts +61 -0
- package/dist/kernel/ports/require-admin.d.ts.map +1 -0
- package/dist/kernel/ports/require-admin.js +2 -0
- package/dist/kernel/ports/require-admin.js.map +1 -0
- package/dist/kernel/ports/require-customer.d.ts +17 -0
- package/dist/kernel/ports/require-customer.d.ts.map +1 -0
- package/dist/kernel/ports/require-customer.js +2 -0
- package/dist/kernel/ports/require-customer.js.map +1 -0
- package/dist/kernel/ports/sales-channel.d.ts +84 -0
- package/dist/kernel/ports/sales-channel.d.ts.map +1 -0
- package/dist/kernel/ports/sales-channel.js +2 -0
- package/dist/kernel/ports/sales-channel.js.map +1 -0
- package/dist/kernel/ports/settings.d.ts +59 -0
- package/dist/kernel/ports/settings.d.ts.map +1 -0
- package/dist/kernel/ports/settings.js +2 -0
- package/dist/kernel/ports/settings.js.map +1 -0
- package/dist/kernel/public-api-base-url.d.ts +98 -0
- package/dist/kernel/public-api-base-url.d.ts.map +1 -0
- package/dist/kernel/public-api-base-url.js +144 -0
- package/dist/kernel/public-api-base-url.js.map +1 -0
- package/dist/kernel/request-scope-hook.d.ts +63 -0
- package/dist/kernel/request-scope-hook.d.ts.map +1 -0
- package/dist/kernel/request-scope-hook.js +67 -0
- package/dist/kernel/request-scope-hook.js.map +1 -0
- package/dist/kernel/sales-channels/channel-bridge-registry.d.ts +109 -0
- package/dist/kernel/sales-channels/channel-bridge-registry.d.ts.map +1 -0
- package/dist/kernel/sales-channels/channel-bridge-registry.js +75 -0
- package/dist/kernel/sales-channels/channel-bridge-registry.js.map +1 -0
- package/dist/kernel/sales-channels/compose.d.ts +69 -0
- package/dist/kernel/sales-channels/compose.d.ts.map +1 -0
- package/dist/kernel/sales-channels/compose.js +43 -0
- package/dist/kernel/sales-channels/compose.js.map +1 -0
- package/dist/kernel/sales-channels/default-channel-reconciler.d.ts +66 -0
- package/dist/kernel/sales-channels/default-channel-reconciler.d.ts.map +1 -0
- package/dist/kernel/sales-channels/default-channel-reconciler.js +91 -0
- package/dist/kernel/sales-channels/default-channel-reconciler.js.map +1 -0
- package/dist/kernel/sales-channels/no-system-default-channel.error.d.ts +28 -0
- package/dist/kernel/sales-channels/no-system-default-channel.error.d.ts.map +1 -0
- package/dist/kernel/sales-channels/no-system-default-channel.error.js +33 -0
- package/dist/kernel/sales-channels/no-system-default-channel.error.js.map +1 -0
- package/dist/kernel/sales-channels/request-channel-assortment.d.ts +72 -0
- package/dist/kernel/sales-channels/request-channel-assortment.d.ts.map +1 -0
- package/dist/kernel/sales-channels/request-channel-assortment.js +83 -0
- package/dist/kernel/sales-channels/request-channel-assortment.js.map +1 -0
- package/dist/kernel/sales-channels/sales-channel-membership.service.d.ts +157 -0
- package/dist/kernel/sales-channels/sales-channel-membership.service.d.ts.map +1 -0
- package/dist/kernel/sales-channels/sales-channel-membership.service.js +302 -0
- package/dist/kernel/sales-channels/sales-channel-membership.service.js.map +1 -0
- package/dist/kernel/sales-channels/sales-channel-resolver.middleware.d.ts +76 -0
- package/dist/kernel/sales-channels/sales-channel-resolver.middleware.d.ts.map +1 -0
- package/dist/kernel/sales-channels/sales-channel-resolver.middleware.js +184 -0
- package/dist/kernel/sales-channels/sales-channel-resolver.middleware.js.map +1 -0
- package/dist/kernel/sales-channels/sales-channel-resolver.service.d.ts +82 -0
- package/dist/kernel/sales-channels/sales-channel-resolver.service.d.ts.map +1 -0
- package/dist/kernel/sales-channels/sales-channel-resolver.service.js +126 -0
- package/dist/kernel/sales-channels/sales-channel-resolver.service.js.map +1 -0
- package/dist/kernel/sales-channels/sales-channel.entity.d.ts +50 -0
- package/dist/kernel/sales-channels/sales-channel.entity.d.ts.map +1 -0
- package/dist/kernel/sales-channels/sales-channel.entity.js +132 -0
- package/dist/kernel/sales-channels/sales-channel.entity.js.map +1 -0
- package/dist/kernel/sales-channels/sales-channels-cache.d.ts +170 -0
- package/dist/kernel/sales-channels/sales-channels-cache.d.ts.map +1 -0
- package/dist/kernel/sales-channels/sales-channels-cache.js +243 -0
- package/dist/kernel/sales-channels/sales-channels-cache.js.map +1 -0
- package/dist/kernel/scope.d.ts +153 -0
- package/dist/kernel/scope.d.ts.map +1 -0
- package/dist/kernel/scope.js +172 -0
- package/dist/kernel/scope.js.map +1 -0
- package/dist/kernel/settings/compose.d.ts +49 -0
- package/dist/kernel/settings/compose.d.ts.map +1 -0
- package/dist/kernel/settings/compose.js +21 -0
- package/dist/kernel/settings/compose.js.map +1 -0
- package/dist/kernel/settings/manifest-reconciler.d.ts +78 -0
- package/dist/kernel/settings/manifest-reconciler.d.ts.map +1 -0
- package/dist/kernel/settings/manifest-reconciler.js +343 -0
- package/dist/kernel/settings/manifest-reconciler.js.map +1 -0
- package/dist/kernel/settings/secret-value-codec.d.ts +52 -0
- package/dist/kernel/settings/secret-value-codec.d.ts.map +1 -0
- package/dist/kernel/settings/secret-value-codec.js +102 -0
- package/dist/kernel/settings/secret-value-codec.js.map +1 -0
- package/dist/kernel/settings/setting-group.entity.d.ts +25 -0
- package/dist/kernel/settings/setting-group.entity.d.ts.map +1 -0
- package/dist/kernel/settings/setting-group.entity.js +79 -0
- package/dist/kernel/settings/setting-group.entity.js.map +1 -0
- package/dist/kernel/settings/setting-value.entity.d.ts +23 -0
- package/dist/kernel/settings/setting-value.entity.d.ts.map +1 -0
- package/dist/kernel/settings/setting-value.entity.js +66 -0
- package/dist/kernel/settings/setting-value.entity.js.map +1 -0
- package/dist/kernel/settings/setting.entity.d.ts +56 -0
- package/dist/kernel/settings/setting.entity.d.ts.map +1 -0
- package/dist/kernel/settings/setting.entity.js +147 -0
- package/dist/kernel/settings/setting.entity.js.map +1 -0
- package/dist/kernel/settings/settings-cache.d.ts +158 -0
- package/dist/kernel/settings/settings-cache.d.ts.map +1 -0
- package/dist/kernel/settings/settings-cache.js +253 -0
- package/dist/kernel/settings/settings-cache.js.map +1 -0
- package/dist/kernel/settings/settings.service.d.ts +142 -0
- package/dist/kernel/settings/settings.service.d.ts.map +1 -0
- package/dist/kernel/settings/settings.service.js +294 -0
- package/dist/kernel/settings/settings.service.js.map +1 -0
- package/dist/lifecycle/backend.d.ts +51 -0
- package/dist/lifecycle/backend.d.ts.map +1 -0
- package/dist/lifecycle/backend.js +40 -0
- package/dist/lifecycle/backend.js.map +1 -0
- package/dist/lifecycle/commands/activation.commands.d.ts +97 -0
- package/dist/lifecycle/commands/activation.commands.d.ts.map +1 -0
- package/dist/lifecycle/commands/activation.commands.js +142 -0
- package/dist/lifecycle/commands/activation.commands.js.map +1 -0
- package/dist/lifecycle/commands/disable.d.ts +3 -0
- package/dist/lifecycle/commands/disable.d.ts.map +1 -0
- package/dist/lifecycle/commands/disable.js +126 -0
- package/dist/lifecycle/commands/disable.js.map +1 -0
- package/dist/lifecycle/commands/enable.d.ts +3 -0
- package/dist/lifecycle/commands/enable.d.ts.map +1 -0
- package/dist/lifecycle/commands/enable.js +102 -0
- package/dist/lifecycle/commands/enable.js.map +1 -0
- package/dist/lifecycle/commands/install.d.ts +3 -0
- package/dist/lifecycle/commands/install.d.ts.map +1 -0
- package/dist/lifecycle/commands/install.js +263 -0
- package/dist/lifecycle/commands/install.js.map +1 -0
- package/dist/lifecycle/commands/operator-entry.d.ts +104 -0
- package/dist/lifecycle/commands/operator-entry.d.ts.map +1 -0
- package/dist/lifecycle/commands/operator-entry.js +127 -0
- package/dist/lifecycle/commands/operator-entry.js.map +1 -0
- package/dist/lifecycle/commands/operator-runtime.d.ts +147 -0
- package/dist/lifecycle/commands/operator-runtime.d.ts.map +1 -0
- package/dist/lifecycle/commands/operator-runtime.js +40 -0
- package/dist/lifecycle/commands/operator-runtime.js.map +1 -0
- package/dist/lifecycle/commands/status.d.ts +3 -0
- package/dist/lifecycle/commands/status.d.ts.map +1 -0
- package/dist/lifecycle/commands/status.js +108 -0
- package/dist/lifecycle/commands/status.js.map +1 -0
- package/dist/lifecycle/commands/uninstall.d.ts +3 -0
- package/dist/lifecycle/commands/uninstall.d.ts.map +1 -0
- package/dist/lifecycle/commands/uninstall.js +223 -0
- package/dist/lifecycle/commands/uninstall.js.map +1 -0
- package/dist/lifecycle/divergence-declaration.d.ts +74 -0
- package/dist/lifecycle/divergence-declaration.d.ts.map +1 -0
- package/dist/lifecycle/divergence-declaration.js +92 -0
- package/dist/lifecycle/divergence-declaration.js.map +1 -0
- package/dist/lifecycle/i18n/en.json +4 -0
- package/dist/lifecycle/i18n/pl.json +4 -0
- package/dist/lifecycle/index.d.ts +110 -0
- package/dist/lifecycle/index.d.ts.map +1 -0
- package/dist/lifecycle/index.js +189 -0
- package/dist/lifecycle/index.js.map +1 -0
- package/dist/lifecycle/manifest-registry.d.ts +244 -0
- package/dist/lifecycle/manifest-registry.d.ts.map +1 -0
- package/dist/lifecycle/manifest-registry.js +223 -0
- package/dist/lifecycle/manifest-registry.js.map +1 -0
- package/dist/lifecycle/manifest.d.ts +166 -0
- package/dist/lifecycle/manifest.d.ts.map +1 -0
- package/dist/lifecycle/manifest.js +121 -0
- package/dist/lifecycle/manifest.js.map +1 -0
- package/dist/lifecycle/plugin.d.ts +56 -0
- package/dist/lifecycle/plugin.d.ts.map +1 -0
- package/dist/lifecycle/plugin.js +59 -0
- package/dist/lifecycle/plugin.js.map +1 -0
- package/dist/lifecycle/resident.d.ts +16 -0
- package/dist/lifecycle/resident.d.ts.map +1 -0
- package/dist/lifecycle/resident.js +59 -0
- package/dist/lifecycle/resident.js.map +1 -0
- package/dist/lifecycle/routes.admin.d.ts +57 -0
- package/dist/lifecycle/routes.admin.d.ts.map +1 -0
- package/dist/lifecycle/routes.admin.js +162 -0
- package/dist/lifecycle/routes.admin.js.map +1 -0
- package/dist/lifecycle/routes.storefront.d.ts +26 -0
- package/dist/lifecycle/routes.storefront.d.ts.map +1 -0
- package/dist/lifecycle/routes.storefront.js +36 -0
- package/dist/lifecycle/routes.storefront.js.map +1 -0
- package/dist/lifecycle/services/deactivation-ledger.d.ts +216 -0
- package/dist/lifecycle/services/deactivation-ledger.d.ts.map +1 -0
- package/dist/lifecycle/services/deactivation-ledger.js +171 -0
- package/dist/lifecycle/services/deactivation-ledger.js.map +1 -0
- package/dist/lifecycle/services/dep-graph.d.ts +119 -0
- package/dist/lifecycle/services/dep-graph.d.ts.map +1 -0
- package/dist/lifecycle/services/dep-graph.js +334 -0
- package/dist/lifecycle/services/dep-graph.js.map +1 -0
- package/dist/lifecycle/services/gating-graph.d.ts +164 -0
- package/dist/lifecycle/services/gating-graph.d.ts.map +1 -0
- package/dist/lifecycle/services/gating-graph.js +203 -0
- package/dist/lifecycle/services/gating-graph.js.map +1 -0
- package/dist/lifecycle/services/lock.d.ts +27 -0
- package/dist/lifecycle/services/lock.d.ts.map +1 -0
- package/dist/lifecycle/services/lock.js +82 -0
- package/dist/lifecycle/services/lock.js.map +1 -0
- package/dist/lifecycle/services/manifest-loader.d.ts +125 -0
- package/dist/lifecycle/services/manifest-loader.d.ts.map +1 -0
- package/dist/lifecycle/services/manifest-loader.js +210 -0
- package/dist/lifecycle/services/manifest-loader.js.map +1 -0
- package/dist/lifecycle/services/migration-ownership.d.ts +36 -0
- package/dist/lifecycle/services/migration-ownership.d.ts.map +1 -0
- package/dist/lifecycle/services/migration-ownership.js +15 -0
- package/dist/lifecycle/services/migration-ownership.js.map +1 -0
- package/dist/lifecycle/services/module-id-claims.d.ts +38 -0
- package/dist/lifecycle/services/module-id-claims.d.ts.map +1 -0
- package/dist/lifecycle/services/module-id-claims.js +123 -0
- package/dist/lifecycle/services/module-id-claims.js.map +1 -0
- package/dist/lifecycle/services/module-origin.d.ts +55 -0
- package/dist/lifecycle/services/module-origin.d.ts.map +1 -0
- package/dist/lifecycle/services/module-origin.js +47 -0
- package/dist/lifecycle/services/module-origin.js.map +1 -0
- package/dist/lifecycle/services/orchestrator.d.ts +235 -0
- package/dist/lifecycle/services/orchestrator.d.ts.map +1 -0
- package/dist/lifecycle/services/orchestrator.js +954 -0
- package/dist/lifecycle/services/orchestrator.js.map +1 -0
- package/dist/lifecycle/services/presence-load.d.ts +281 -0
- package/dist/lifecycle/services/presence-load.d.ts.map +1 -0
- package/dist/lifecycle/services/presence-load.js +437 -0
- package/dist/lifecycle/services/presence-load.js.map +1 -0
- package/dist/lifecycle/services/static-registry.d.ts +47 -0
- package/dist/lifecycle/services/static-registry.d.ts.map +1 -0
- package/dist/lifecycle/services/static-registry.js +41 -0
- package/dist/lifecycle/services/static-registry.js.map +1 -0
- package/dist/migrations/20260424T165847_core_foundation_init.d.ts +25 -0
- package/dist/migrations/20260424T165847_core_foundation_init.d.ts.map +1 -0
- package/dist/migrations/20260424T165847_core_foundation_init.js +238 -0
- package/dist/migrations/20260424T165847_core_foundation_init.js.map +1 -0
- package/dist/migrations/20260425T050720_core_commerce_init.d.ts +19 -0
- package/dist/migrations/20260425T050720_core_commerce_init.d.ts.map +1 -0
- package/dist/migrations/20260425T050720_core_commerce_init.js +200 -0
- package/dist/migrations/20260425T050720_core_commerce_init.js.map +1 -0
- package/dist/migrations/20260430T101450_core_settings_init.d.ts +25 -0
- package/dist/migrations/20260430T101450_core_settings_init.d.ts.map +1 -0
- package/dist/migrations/20260430T101450_core_settings_init.js +113 -0
- package/dist/migrations/20260430T101450_core_settings_init.js.map +1 -0
- package/dist/migrations/20260430T170044_core_sales_channels_promote.d.ts +67 -0
- package/dist/migrations/20260430T170044_core_sales_channels_promote.d.ts.map +1 -0
- package/dist/migrations/20260430T170044_core_sales_channels_promote.js +101 -0
- package/dist/migrations/20260430T170044_core_sales_channels_promote.js.map +1 -0
- package/dist/migrations/20260506T200657_core_module_lifecycle_init.d.ts +21 -0
- package/dist/migrations/20260506T200657_core_module_lifecycle_init.d.ts.map +1 -0
- package/dist/migrations/20260506T200657_core_module_lifecycle_init.js +41 -0
- package/dist/migrations/20260506T200657_core_module_lifecycle_init.js.map +1 -0
- package/dist/migrations/20260514T111329_core_settings_global_value.d.ts +30 -0
- package/dist/migrations/20260514T111329_core_settings_global_value.d.ts.map +1 -0
- package/dist/migrations/20260514T111329_core_settings_global_value.js +34 -0
- package/dist/migrations/20260514T111329_core_settings_global_value.js.map +1 -0
- package/dist/migrations/20260611T140411_core_settings_secret_value_type.d.ts +26 -0
- package/dist/migrations/20260611T140411_core_settings_secret_value_type.d.ts.map +1 -0
- package/dist/migrations/20260611T140411_core_settings_secret_value_type.js +63 -0
- package/dist/migrations/20260611T140411_core_settings_secret_value_type.js.map +1 -0
- package/dist/migrations/20260611T140419_core_settings_enum_options.d.ts +19 -0
- package/dist/migrations/20260611T140419_core_settings_enum_options.d.ts.map +1 -0
- package/dist/migrations/20260611T140419_core_settings_enum_options.js +23 -0
- package/dist/migrations/20260611T140419_core_settings_enum_options.js.map +1 -0
- package/dist/migrations/20260629T090100_core_settings_hidden_flag.d.ts +20 -0
- package/dist/migrations/20260629T090100_core_settings_hidden_flag.d.ts.map +1 -0
- package/dist/migrations/20260629T090100_core_settings_hidden_flag.js +24 -0
- package/dist/migrations/20260629T090100_core_settings_hidden_flag.js.map +1 -0
- package/dist/migrations/20260717T134752_core_tenant_scope_indexes.d.ts +27 -0
- package/dist/migrations/20260717T134752_core_tenant_scope_indexes.d.ts.map +1 -0
- package/dist/migrations/20260717T134752_core_tenant_scope_indexes.js +32 -0
- package/dist/migrations/20260717T134752_core_tenant_scope_indexes.js.map +1 -0
- package/dist/migrations/20260721T011510_core_settings_credential_ref_value_type.d.ts +24 -0
- package/dist/migrations/20260721T011510_core_settings_credential_ref_value_type.d.ts.map +1 -0
- package/dist/migrations/20260721T011510_core_settings_credential_ref_value_type.js +57 -0
- package/dist/migrations/20260721T011510_core_settings_credential_ref_value_type.js.map +1 -0
- package/dist/migrations/20260816T203339_core_retire_core_activation_settings.d.ts +39 -0
- package/dist/migrations/20260816T203339_core_retire_core_activation_settings.d.ts.map +1 -0
- package/dist/migrations/20260816T203339_core_retire_core_activation_settings.js +59 -0
- package/dist/migrations/20260816T203339_core_retire_core_activation_settings.js.map +1 -0
- package/dist/migrations/20260919T101500_core_module_registrations_boot_converged.d.ts +34 -0
- package/dist/migrations/20260919T101500_core_module_registrations_boot_converged.d.ts.map +1 -0
- package/dist/migrations/20260919T101500_core_module_registrations_boot_converged.js +38 -0
- package/dist/migrations/20260919T101500_core_module_registrations_boot_converged.js.map +1 -0
- package/dist/migrations/baseline-migrations.generated.d.ts +2 -0
- package/dist/migrations/baseline-migrations.generated.d.ts.map +1 -0
- package/dist/migrations/baseline-migrations.generated.js +136 -0
- package/dist/migrations/baseline-migrations.generated.js.map +1 -0
- package/dist/migrations/index.d.ts +62 -0
- package/dist/migrations/index.d.ts.map +1 -0
- package/dist/migrations/index.js +75 -0
- package/dist/migrations/index.js.map +1 -0
- package/dist/overlay/deployment-roots.d.ts +37 -0
- package/dist/overlay/deployment-roots.d.ts.map +1 -0
- package/dist/overlay/deployment-roots.js +90 -0
- package/dist/overlay/deployment-roots.js.map +1 -0
- package/dist/overlay/index.d.ts +62 -0
- package/dist/overlay/index.d.ts.map +1 -0
- package/dist/overlay/index.js +62 -0
- package/dist/overlay/index.js.map +1 -0
- package/dist/overlay/overlay-runtime.d.ts +173 -0
- package/dist/overlay/overlay-runtime.d.ts.map +1 -0
- package/dist/overlay/overlay-runtime.js +281 -0
- package/dist/overlay/overlay-runtime.js.map +1 -0
- package/dist/overlay/resolve-overlay.d.ts +41 -0
- package/dist/overlay/resolve-overlay.d.ts.map +1 -0
- package/dist/overlay/resolve-overlay.js +72 -0
- package/dist/overlay/resolve-overlay.js.map +1 -0
- package/dist/packages/index.d.ts +57 -0
- package/dist/packages/index.d.ts.map +1 -0
- package/dist/packages/index.js +57 -0
- package/dist/packages/index.js.map +1 -0
- package/dist/packages/installed-packages.d.ts +79 -0
- package/dist/packages/installed-packages.d.ts.map +1 -0
- package/dist/packages/installed-packages.js +312 -0
- package/dist/packages/installed-packages.js.map +1 -0
- package/dist/packages/package-entity-lookup.d.ts +120 -0
- package/dist/packages/package-entity-lookup.d.ts.map +1 -0
- package/dist/packages/package-entity-lookup.js +17 -0
- package/dist/packages/package-entity-lookup.js.map +1 -0
- package/dist/packages/package-runtime.d.ts +177 -0
- package/dist/packages/package-runtime.d.ts.map +1 -0
- package/dist/packages/package-runtime.js +386 -0
- package/dist/packages/package-runtime.js.map +1 -0
- package/dist/tenancy/derived-scope.d.ts +43 -0
- package/dist/tenancy/derived-scope.d.ts.map +1 -0
- package/dist/tenancy/derived-scope.js +76 -0
- package/dist/tenancy/derived-scope.js.map +1 -0
- package/dist/tenancy/escape-hatch.d.ts +30 -0
- package/dist/tenancy/escape-hatch.d.ts.map +1 -0
- package/dist/tenancy/escape-hatch.js +50 -0
- package/dist/tenancy/escape-hatch.js.map +1 -0
- package/dist/tenancy/filters.d.ts +87 -0
- package/dist/tenancy/filters.d.ts.map +1 -0
- package/dist/tenancy/filters.js +126 -0
- package/dist/tenancy/filters.js.map +1 -0
- package/dist/tenancy/index.d.ts +63 -0
- package/dist/tenancy/index.d.ts.map +1 -0
- package/dist/tenancy/index.js +61 -0
- package/dist/tenancy/index.js.map +1 -0
- package/dist/tenancy/org-scoped.decorator.d.ts +150 -0
- package/dist/tenancy/org-scoped.decorator.d.ts.map +1 -0
- package/dist/tenancy/org-scoped.decorator.js +339 -0
- package/dist/tenancy/org-scoped.decorator.js.map +1 -0
- package/dist/tenancy/org-write-guard.d.ts +106 -0
- package/dist/tenancy/org-write-guard.d.ts.map +1 -0
- package/dist/tenancy/org-write-guard.js +141 -0
- package/dist/tenancy/org-write-guard.js.map +1 -0
- package/dist/tenancy/resolve-tenant-context.d.ts +91 -0
- package/dist/tenancy/resolve-tenant-context.d.ts.map +1 -0
- package/dist/tenancy/resolve-tenant-context.js +85 -0
- package/dist/tenancy/resolve-tenant-context.js.map +1 -0
- package/dist/tenancy/scoped-em.d.ts +10 -0
- package/dist/tenancy/scoped-em.d.ts.map +1 -0
- package/dist/tenancy/scoped-em.js +11 -0
- package/dist/tenancy/scoped-em.js.map +1 -0
- package/dist/tenancy/tenant-context.d.ts +154 -0
- package/dist/tenancy/tenant-context.d.ts.map +1 -0
- package/dist/tenancy/tenant-context.js +109 -0
- package/dist/tenancy/tenant-context.js.map +1 -0
- package/package.json +123 -0
|
@@ -0,0 +1,437 @@
|
|
|
1
|
+
import { ModuleRegistration } from '../../kernel/lifecycle/module-registration.entity.js';
|
|
2
|
+
import { platformLogger } from '../../kernel/logging.js';
|
|
3
|
+
import { activationDeclarationsFrom } from '../../kernel/lifecycle/activation-resolver.js';
|
|
4
|
+
import { capabilityRegistryFrom } from '../../kernel/lifecycle/capability-registry.js';
|
|
5
|
+
import { installGatingGraph } from './gating-graph.js';
|
|
6
|
+
import { registryCache } from '../../kernel/lifecycle/registry-cache.js';
|
|
7
|
+
import { deploymentShippedEntries, } from './module-origin.js';
|
|
8
|
+
/**
|
|
9
|
+
* The boot refuses: this deployment composes modules that need modules it does
|
|
10
|
+
* not have, and has not said so (D-101).
|
|
11
|
+
*
|
|
12
|
+
* A distinct type from every deactivation refusal on purpose. `assertDeactivatable`
|
|
13
|
+
* refuses a **transition** an operator asked for and answers them with an HTTP
|
|
14
|
+
* envelope; this refuses an **initial state** nobody asked about, and answers the
|
|
15
|
+
* person who composed the deployment, at their terminal, before anything serves.
|
|
16
|
+
* Merging the two would re-make exactly the conflation D-100 exists to stop.
|
|
17
|
+
*
|
|
18
|
+
* It keeps its name after D-205 renamed the file it points at. The declaration
|
|
19
|
+
* is `divergence.ts` because it grew past omissions; this refusal did not — all
|
|
20
|
+
* three of its findings are about a module set that is *reduced*, which is what
|
|
21
|
+
* `omittedModules` still declares.
|
|
22
|
+
*/
|
|
23
|
+
export class ReducedDeploymentError extends Error {
|
|
24
|
+
findings;
|
|
25
|
+
constructor(findings) {
|
|
26
|
+
super(refusalMessage(findings));
|
|
27
|
+
this.name = 'ReducedDeploymentError';
|
|
28
|
+
this.findings = findings;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
const LEDGER_PATH = 'backend/src/apps/<deployment>/divergence.ts';
|
|
32
|
+
function refusalMessage(findings) {
|
|
33
|
+
const lines = [
|
|
34
|
+
'This deployment will not boot: it composes modules whose declarations it does not satisfy.',
|
|
35
|
+
'',
|
|
36
|
+
];
|
|
37
|
+
for (const finding of findings) {
|
|
38
|
+
if (finding.kind === 'not-shipped') {
|
|
39
|
+
lines.push(` ${finding.moduleId} — not shipped by this deployment, and it is needed:`);
|
|
40
|
+
for (const needer of finding.neededBy) {
|
|
41
|
+
lines.push(` ${needer.moduleId} — ${needer.via}` +
|
|
42
|
+
(needer.port === null ? '' : `, port \`${needer.port}\``));
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
else if (finding.kind === 'not-installed') {
|
|
46
|
+
lines.push(` ${finding.moduleId} — shipped, but \`module_registrations\` says \`${finding.state}\`,`, ` and the platform cannot run without it: ${finding.reason}`, ` remedy: pnpm --filter backend run module:enable ${finding.moduleId}`);
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
lines.push(` ${finding.moduleId} — declared as omitted, but this deployment ships it and its row is fine.`, ` Remove the entry from the \`omittedModules\` of ${LEDGER_PATH}; a declaration`, ' nothing omits is how a deployment silently reacquires the hazard it once declared.');
|
|
50
|
+
}
|
|
51
|
+
lines.push('');
|
|
52
|
+
}
|
|
53
|
+
lines.push('Ship the modules, or — if the omission is deliberate — declare each one, with a reason,', `in the \`omittedModules\` of ${LEDGER_PATH}. The declaration is reviewed in the merge`, 'request that assembles the deployment, which a flag set at 2 a.m. is not (D-69, D-101).');
|
|
54
|
+
return lines.join('\n');
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Refuse a composition that never shipped what it composes against — D-101,
|
|
58
|
+
* the owner's E1 ruling: *"the failure belongs to whoever composes the
|
|
59
|
+
* deployment, loudly and immediately — not to a user who meets it as a 503 at
|
|
60
|
+
* login."*
|
|
61
|
+
*
|
|
62
|
+
* **Pure, and that is load-bearing rather than stylistic.** The harness never
|
|
63
|
+
* calls {@link loadModulePresence} — it seeds the registry cache directly — so a
|
|
64
|
+
* refusal that only existed inside the boot step would have no proof that runs.
|
|
65
|
+
* Its whole input is the three things a composition has: what it ships, what the
|
|
66
|
+
* registry says, and what it declared.
|
|
67
|
+
*
|
|
68
|
+
* `rows === null` means *the registry has not been read yet*. The shipping
|
|
69
|
+
* question is answerable without it, so it is asked first, before
|
|
70
|
+
* `reconcileExistingModules` touches the database.
|
|
71
|
+
*
|
|
72
|
+
* **What it does not read: the absent module's manifest.** The decision is
|
|
73
|
+
* framed around `activation.nonDeactivatable`, and for the "shipped but not
|
|
74
|
+
* installed" trigger that is exactly what it asks. For the *not shipped* trigger
|
|
75
|
+
* it cannot: a packaging split that drops `admin_users` drops its manifest with
|
|
76
|
+
* it, so "was it locked?" has no answer at the seam that has to refuse. What
|
|
77
|
+
* survives the split is the **declaration in the module that stays** —
|
|
78
|
+
* `admin_roles`' `acknowledgedDependencies` entry — and that is what this rests
|
|
79
|
+
* on. It is deliberately wider than "locked modules only", and D-100 points the
|
|
80
|
+
* same way: an argument from a lock nothing here can re-derive is the shape that
|
|
81
|
+
* goes stale. `nonBindingDependencies` is left out, because that array is the
|
|
82
|
+
* declaration that the owner's absence is expected and handled (D-44).
|
|
83
|
+
*/
|
|
84
|
+
export function assertLockedModulesPresent(manifests, rows, declared) {
|
|
85
|
+
const shipped = new Set(manifests.map((manifest) => manifest.id));
|
|
86
|
+
const findings = [];
|
|
87
|
+
// 1 — not shipped. Both ends of every missing edge, because a message naming
|
|
88
|
+
// only the absentee sends the reader hunting across three arrays in 65
|
|
89
|
+
// manifests.
|
|
90
|
+
const neededBy = new Map();
|
|
91
|
+
const need = (moduleId, entry) => {
|
|
92
|
+
if (shipped.has(moduleId) || declared.has(moduleId))
|
|
93
|
+
return;
|
|
94
|
+
const list = neededBy.get(moduleId) ?? [];
|
|
95
|
+
list.push(entry);
|
|
96
|
+
neededBy.set(moduleId, list);
|
|
97
|
+
};
|
|
98
|
+
for (const manifest of manifests) {
|
|
99
|
+
for (const dependency of manifest.dependencies ?? []) {
|
|
100
|
+
need(dependency, { moduleId: manifest.id, via: 'dependencies', port: null });
|
|
101
|
+
}
|
|
102
|
+
for (const edge of manifest.acknowledgedDependencies ?? []) {
|
|
103
|
+
need(edge.moduleId, {
|
|
104
|
+
moduleId: manifest.id,
|
|
105
|
+
via: 'acknowledgedDependencies',
|
|
106
|
+
port: edge.port,
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
for (const [moduleId, needers] of [...neededBy.entries()].sort()) {
|
|
111
|
+
findings.push({ kind: 'not-shipped', moduleId, neededBy: needers });
|
|
112
|
+
}
|
|
113
|
+
if (rows !== null) {
|
|
114
|
+
// 2 — shipped, but carrying a row the boot reconciler will not repair. By
|
|
115
|
+
// construction this is not an operator's choice: since D-69 the orchestrator
|
|
116
|
+
// refuses to disable or uninstall a `nonDeactivatable` module, with no
|
|
117
|
+
// `--force`, so the only way to hold one is to have written it before that
|
|
118
|
+
// refusal landed. The reconciler must not repair it — it inserts only, and
|
|
119
|
+
// deciding a state rather than converging to one is the orchestrator's job —
|
|
120
|
+
// so the refusal names the remedy instead.
|
|
121
|
+
for (const manifest of manifests) {
|
|
122
|
+
const activation = manifest.activation;
|
|
123
|
+
if (activation === undefined || !('nonDeactivatable' in activation))
|
|
124
|
+
continue;
|
|
125
|
+
if (declared.has(manifest.id))
|
|
126
|
+
continue;
|
|
127
|
+
const state = rows.get(manifest.id);
|
|
128
|
+
if (state === undefined || state === 'installed')
|
|
129
|
+
continue;
|
|
130
|
+
findings.push({
|
|
131
|
+
kind: 'not-installed',
|
|
132
|
+
moduleId: manifest.id,
|
|
133
|
+
state,
|
|
134
|
+
reason: activation.reason,
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
// 3 — the declaration is two-way. An entry for a module this deployment
|
|
138
|
+
// ships, in the state it should be in, describes a deployment that no longer
|
|
139
|
+
// exists. Asked only once the registry has been read: a shipped module with a
|
|
140
|
+
// legacy row is a live declaration, not a stale one.
|
|
141
|
+
for (const moduleId of [...declared].sort()) {
|
|
142
|
+
if (!shipped.has(moduleId))
|
|
143
|
+
continue;
|
|
144
|
+
const state = rows.get(moduleId);
|
|
145
|
+
if (state !== undefined && state !== 'installed')
|
|
146
|
+
continue;
|
|
147
|
+
findings.push({ kind: 'stale-declaration', moduleId });
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
if (findings.length > 0)
|
|
151
|
+
throw new ReducedDeploymentError(findings);
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* The composition step that gives module presence an answer (feature 072,
|
|
155
|
+
* D-38).
|
|
156
|
+
*
|
|
157
|
+
* It used to live in `_lifecycle`'s Fastify plugin body, which runs inside
|
|
158
|
+
* `buildServer` — after `composeApp()` has registered every module and run every
|
|
159
|
+
* boot hook. Eleven boot hooks resolve a gated port, so they all asked a cache
|
|
160
|
+
* nothing had loaded, all got "not installed", and the first one reached threw
|
|
161
|
+
* `ModuleCompositionError` before the process could listen. The ordering was the
|
|
162
|
+
* bug; the cache, the gate and the composer were each doing exactly their job.
|
|
163
|
+
*
|
|
164
|
+
* So this is called from the composition root **before the first module
|
|
165
|
+
* registers**, and it is awaited and fatal: its two inputs are the EntityManager
|
|
166
|
+
* factory and the manifest list, and a root has both before it composes
|
|
167
|
+
* anything. Redis is not involved — arming the notification channel is
|
|
168
|
+
* `registryCache.watch()`, which happens after composition and cannot fail a
|
|
169
|
+
* boot.
|
|
170
|
+
*
|
|
171
|
+
* It lives under `lifecycle/` rather than in `kernel/` even though D-37 A1 moved
|
|
172
|
+
* the cache, the resolver and the gating wrappers into the kernel. The reason is
|
|
173
|
+
* `installGatingGraph` below: the graph's *fallback* is the host's manifest
|
|
174
|
+
* registry, which the harness relies on without ever calling this function, so
|
|
175
|
+
* the two belong to the same subsystem. D-37 §2.3 records the call as deliberate
|
|
176
|
+
* and arguable; the call site is already where it needs to be either way.
|
|
177
|
+
*/
|
|
178
|
+
export async function loadModulePresence(opts) {
|
|
179
|
+
const manifests = opts.entries.map((entry) => entry.manifest);
|
|
180
|
+
// D-101 — two refusals, in the order the two questions can be answered.
|
|
181
|
+
//
|
|
182
|
+
// The **shipping** question needs no database, so it is asked first: a
|
|
183
|
+
// deployment that never shipped what it composes fails before a connection is
|
|
184
|
+
// used, and the person who assembled it reads the failure instead of a user
|
|
185
|
+
// meeting it as a 503 at login. The **registry** question needs the rows, and
|
|
186
|
+
// is asked once they are read.
|
|
187
|
+
//
|
|
188
|
+
// Both are one line here because the analysis is a pure function beside this
|
|
189
|
+
// one: the harness never calls `loadModulePresence`, so a refusal written into
|
|
190
|
+
// this body would have no proof that runs.
|
|
191
|
+
const declared = new Set(opts.declaredOmissions ?? []);
|
|
192
|
+
assertLockedModulesPresent(manifests, null, declared);
|
|
193
|
+
// D-157.6(b) — and this is the one place the resolved set is narrowed. The
|
|
194
|
+
// insert converges the registry to what this **build** ships; a package is
|
|
195
|
+
// converged by `module:install`, which is also what runs its migrations.
|
|
196
|
+
const rows = await reconcileExistingModules(opts.em, firstBootInsertPopulation(opts.entries));
|
|
197
|
+
// …and it stops being silent about the one thing convergence cannot do. A
|
|
198
|
+
// **warning, not a refusal**: this must not break a first boot, and the
|
|
199
|
+
// remedy is a command the operator can run afterwards. One line here for the
|
|
200
|
+
// reason the two refusals are one line each — the analysis is a pure function
|
|
201
|
+
// beside this one, because the harness never calls `loadModulePresence`.
|
|
202
|
+
for (const warning of bootConvergenceWarnings(opts.entries, new Set(rows.keys()))) {
|
|
203
|
+
(opts.log ?? platformLogger()).warn({ moduleId: warning.moduleId }, warning.message);
|
|
204
|
+
}
|
|
205
|
+
assertLockedModulesPresent(manifests, rows, declared);
|
|
206
|
+
// Feature 073 (T045/T046) — the graph the flip-time refusals read. Installed
|
|
207
|
+
// from the same manifest list as the activation declarations, so an overlay
|
|
208
|
+
// module's edges count for a refusal exactly as a core module's do (FR-027).
|
|
209
|
+
installGatingGraph(manifests);
|
|
210
|
+
await registryCache.load({
|
|
211
|
+
em: opts.em,
|
|
212
|
+
// Feature 073 — the operator-activation axis. Declarations come from the
|
|
213
|
+
// shipped manifests, so there is no hand-maintained list: a module that
|
|
214
|
+
// declares no control is governed by the platform axis alone.
|
|
215
|
+
activationDeclarations: activationDeclarationsFrom(manifests),
|
|
216
|
+
// Feature 132 — the capability families, from the **same** manifest list and
|
|
217
|
+
// in the **same** call, which is the Redis cache-invalidation design rather
|
|
218
|
+
// than a convenience (`data-model.md` §2.2). A family owner's exclusion reads
|
|
219
|
+
// membership and activation together on every refusal, and this cache is
|
|
220
|
+
// refreshed by the `b2b:module:state-changed` channel; installed here, the
|
|
221
|
+
// two are refreshed by one event and cannot disagree. Cached anywhere else,
|
|
222
|
+
// the family would need a second invalidation path and would be stale for
|
|
223
|
+
// exactly the window in which an operator is flipping a connector.
|
|
224
|
+
//
|
|
225
|
+
// Same list, so the same three populations declare on identical terms (R2.1):
|
|
226
|
+
// a core module, this deployment's overlay modules and every installed Endora
|
|
227
|
+
// module package. That is the property the three arrays this replaces could
|
|
228
|
+
// not have — an overlay module had to be written into a core contracts file
|
|
229
|
+
// to join its family, which is Principle XV failing quietly.
|
|
230
|
+
capabilityRegistry: capabilityRegistryFrom(manifests),
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* The first-boot reconciler's insert population: **core plus this deployment's
|
|
235
|
+
* overlay**, never the instance-resolved set (D-157.6(b)).
|
|
236
|
+
*
|
|
237
|
+
* T031 made `composeApp` hand the resolved set — which since then includes every
|
|
238
|
+
* installed Endora module package — to {@link loadModulePresence}, and the
|
|
239
|
+
* reconciler inserts `state='installed'` for every manifest with no row. So the
|
|
240
|
+
* next boot after `pnpm add @vendor/some-module` converged that package before
|
|
241
|
+
* one migration of its had run, `module:install` answered `already-installed`
|
|
242
|
+
* and returned 0, and the operator was left with a module whose tables do not
|
|
243
|
+
* exist. A package is installed by `install` — the mechanism that applies its
|
|
244
|
+
* migrations, reconciles its settings and runs its install hook — and
|
|
245
|
+
* converging it silently is the one thing that mechanism cannot survive.
|
|
246
|
+
*
|
|
247
|
+
* **Only the insert is narrowed.** The presence *cache* still loads over the
|
|
248
|
+
* full resolved set, so a package that **has** been installed is present, gated
|
|
249
|
+
* and deactivatable exactly like a core module. Narrowing the cache too would
|
|
250
|
+
* trade a silent install for a silent absence.
|
|
251
|
+
*
|
|
252
|
+
* Pure, and separate from the boot step for the same reason
|
|
253
|
+
* {@link assertLockedModulesPresent} is: the harness never calls
|
|
254
|
+
* {@link loadModulePresence}, so a rule written into that body would be proved
|
|
255
|
+
* by nothing that runs.
|
|
256
|
+
*
|
|
257
|
+
* The origin split itself is `deploymentShippedEntries` and is deliberately not
|
|
258
|
+
* spelled here (feature 080, T046): the boot settings reconcile has to stop at
|
|
259
|
+
* the same line, for reasons of its own, and a second copy of an origin test is
|
|
260
|
+
* two answers waiting to disagree (D-100).
|
|
261
|
+
*
|
|
262
|
+
* **It answers with entries and not with manifests**, which it used to. Two
|
|
263
|
+
* readers now need the population and one of them —
|
|
264
|
+
* {@link bootConvergenceWarnings} — asks about `installHook`, which lives on the
|
|
265
|
+
* entry. Returning manifests would have made that reader re-derive the origin
|
|
266
|
+
* split for itself, which is the D-100 shape this function exists to prevent.
|
|
267
|
+
*/
|
|
268
|
+
export function firstBootInsertPopulation(entries) {
|
|
269
|
+
return deploymentShippedEntries(entries);
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* The convergence stops being silent: one warning per manifest this boot is
|
|
273
|
+
* about to converge that declares an `installHook`.
|
|
274
|
+
*
|
|
275
|
+
* ## What it is about
|
|
276
|
+
*
|
|
277
|
+
* {@link reconcileExistingModules} writes `state='installed'` for a shipped
|
|
278
|
+
* manifest with no row and runs no hook. Before the `bootConvergedAt` marker,
|
|
279
|
+
* `install` could not tell that row from one it had written itself, so it
|
|
280
|
+
* answered `already-installed` and the hook never ran and never would. The
|
|
281
|
+
* marker makes the repair possible; this makes it **findable**, which is the
|
|
282
|
+
* half a marker cannot do on its own: nobody runs a command they have not been
|
|
283
|
+
* told to run.
|
|
284
|
+
*
|
|
285
|
+
* ## A warning and not a refusal
|
|
286
|
+
*
|
|
287
|
+
* Deliberate, and the direction matters. A refusal here would break a first
|
|
288
|
+
* boot, which is the one boot a fresh deployment cannot route around, and it
|
|
289
|
+
* would make **presence a function of hook declaration** — presence being
|
|
290
|
+
* Constitution XVII's platform-availability axis. The codebase has refused that
|
|
291
|
+
* trade twice in writing: `firstBootInsertPopulation` above (*"would trade a
|
|
292
|
+
* silent install for a silent absence"*) and
|
|
293
|
+
* `backend/test/unit/_lifecycle/first-boot-package-reconcile.test.ts` (*"the same
|
|
294
|
+
* defect wearing the other sign"*). Whether a boot-first database should instead
|
|
295
|
+
* be **refused** is an open owner question; `ModuleRegistration.bootConvergedAt`
|
|
296
|
+
* is the datum such a refusal would read, so that ruling costs a branch rather
|
|
297
|
+
* than a redesign.
|
|
298
|
+
*
|
|
299
|
+
* ## And not "run the hook here"
|
|
300
|
+
*
|
|
301
|
+
* Three reasons that each resolve in this tree. `loadModulePresence` runs
|
|
302
|
+
* **before** `DefaultChannelReconciler` in `compose-app.ts`, so a hook here has
|
|
303
|
+
* strictly *less* context than at install. `install` takes `acquireLock()` and
|
|
304
|
+
* this takes nothing, while an instance runs `start` and `worker` as two
|
|
305
|
+
* processes that both compose — two racing the same seed writes. And `install`
|
|
306
|
+
* turns a hook failure into `install-failed` with that run's migrations reverted
|
|
307
|
+
* and the error persisted, where at boot a seeding problem becomes a platform
|
|
308
|
+
* that will not start; `backend/src/lifecycle/scripts/install.ts` already names
|
|
309
|
+
* the neighbouring hazard in its D-157.2 comment.
|
|
310
|
+
*
|
|
311
|
+
* ## Pure, for the reason its two neighbours are
|
|
312
|
+
*
|
|
313
|
+
* The harness never calls {@link loadModulePresence} — it seeds the registry
|
|
314
|
+
* cache directly — so a rule written into that body would be proved by nothing
|
|
315
|
+
* that runs. It reads the population by **calling**
|
|
316
|
+
* {@link firstBootInsertPopulation} rather than restating the origin test, so
|
|
317
|
+
* the warning and the insert cannot disagree about who is converged.
|
|
318
|
+
*
|
|
319
|
+
* @param entries the instance-resolved set, exactly as the boot step has it
|
|
320
|
+
* @param existingModuleIds the ids that **already** had a row — so a converged
|
|
321
|
+
* database, which is the steady state and boots many times a day, says nothing
|
|
322
|
+
*/
|
|
323
|
+
export function bootConvergenceWarnings(entries, existingModuleIds) {
|
|
324
|
+
const warnings = [];
|
|
325
|
+
for (const entry of firstBootInsertPopulation(entries)) {
|
|
326
|
+
if (entry.installHook === undefined)
|
|
327
|
+
continue;
|
|
328
|
+
if (existingModuleIds.has(entry.manifest.id))
|
|
329
|
+
continue;
|
|
330
|
+
const id = entry.manifest.id;
|
|
331
|
+
warnings.push({
|
|
332
|
+
moduleId: id,
|
|
333
|
+
message: `module "${id}" was marked installed by boot convergence, which cannot run its ` +
|
|
334
|
+
'install hook — so the rows that hook seeds are absent. Run ' +
|
|
335
|
+
`\`module:install ${id}\` (or \`module:install --all\`) to complete it; both are ` +
|
|
336
|
+
'idempotent, and the platform serves normally in the meantime.',
|
|
337
|
+
});
|
|
338
|
+
}
|
|
339
|
+
return warnings;
|
|
340
|
+
}
|
|
341
|
+
/**
|
|
342
|
+
* First-boot reconciler — idempotent.
|
|
343
|
+
*
|
|
344
|
+
* For every shipped manifest with NO row in `module_registrations`, inserts one
|
|
345
|
+
* with `state='installed'`. This lets feature 018 land on a running platform
|
|
346
|
+
* without breaking the gating wrappers (`defineModuleRoutes`,
|
|
347
|
+
* `defineModuleWorker`, `subscribeForModule`) — pre-existing modules continue
|
|
348
|
+
* serving traffic because their auto-created row marks them
|
|
349
|
+
* installed-and-enabled.
|
|
350
|
+
*
|
|
351
|
+
* Modules added AFTER feature 018 ships go through the explicit
|
|
352
|
+
* `module:install <id>` flow.
|
|
353
|
+
*
|
|
354
|
+
* command-coverage-ignore: boot convergence of the registry to the shipped
|
|
355
|
+
* manifest list — a system-invariant repair with no operator behind it. Spelled
|
|
356
|
+
* out, because "a reconcile is not a write" is exactly the argument that lets a
|
|
357
|
+
* real unaudited write through next time:
|
|
358
|
+
*
|
|
359
|
+
* **Why the hatch appears only now.** The write is feature 018's, unchanged
|
|
360
|
+
* since 2026-05-06. It lived in `_lifecycle/plugin.ts`, which
|
|
361
|
+
* `check-command-coverage` did not scan at the time — it judged
|
|
362
|
+
* `modules/<m>/services/*.ts` and nothing else, one level deep (issue #122
|
|
363
|
+
* widened it to every file a module owns) — and D-38 moved it here, into a
|
|
364
|
+
* services file, when presence became a composition step. So what changed in
|
|
365
|
+
* feature 072 is the check's line of sight, not the decision being made;
|
|
366
|
+
* nothing about the reconcile became sensitive on the way across.
|
|
367
|
+
*
|
|
368
|
+
* **What it writes.** One `module_registrations` row per shipped manifest that
|
|
369
|
+
* has none, carrying `state='installed'`, the manifest's version and
|
|
370
|
+
* `bootConvergedAt` — the marker saying *"boot wrote this and no install has
|
|
371
|
+
* run"*. Inserts only: it skips every id that already has a row, so it never
|
|
372
|
+
* updates a state, never bumps a version, never deletes. It therefore cannot
|
|
373
|
+
* overwrite an operator's platform-availability choice, and it does not touch the
|
|
374
|
+
* operator activation axis at all — that lives in the settings store (Principle
|
|
375
|
+
* XVII). On a converged database it writes nothing.
|
|
376
|
+
*
|
|
377
|
+
* **The marker changes nothing about the decision this function makes**, which
|
|
378
|
+
* is why the hatch above still covers it verbatim: it is a second field on a row
|
|
379
|
+
* this function was already inserting, recording *who wrote it* rather than
|
|
380
|
+
* deriving *what to write*. `install` reads it, completes the row it describes
|
|
381
|
+
* and clears it. Before it existed, `install` short-circuited on
|
|
382
|
+
* `state === 'installed'` and answered `already-installed` over a converged row,
|
|
383
|
+
* so a database whose first action after the migrations was a boot could never
|
|
384
|
+
* run any `installHook` — invisible until feature 134's W7, because until then
|
|
385
|
+
* the tree had no `installHook` at all. The marker is on **every** converged row
|
|
386
|
+
* and not only a hook-bearing one: it is true of both, and narrowing it to the
|
|
387
|
+
* hook-bearing set would leave a module that gains a hook later unmarked, which
|
|
388
|
+
* is the residual case all over again one release on.
|
|
389
|
+
*
|
|
390
|
+
* **Why no actor exists.** It runs from `composeApp()` before the first module
|
|
391
|
+
* registers, inside
|
|
392
|
+
* `enterSystemScope('boot: load module presence', …, { entryPoint: 'boot' })`.
|
|
393
|
+
* There is no admin user and no request to attribute it to; the identity the
|
|
394
|
+
* path does have is that scope, and `enterSystemScope` already reports it
|
|
395
|
+
* through `recordEscapeHatchAudit` (`tenant.escape_hatch`, with the reason and
|
|
396
|
+
* `entryPoint: 'boot'`). A Command would add one `actorAdminUserId: null` entry
|
|
397
|
+
* per boot per deployment, diluting the `module.*` trail the orchestrator
|
|
398
|
+
* writes for the transitions an operator really did request.
|
|
399
|
+
*
|
|
400
|
+
* **What would make a future change need a Command.** Any write here that
|
|
401
|
+
* *decides* rather than converges: updating `state` or `version` on an existing
|
|
402
|
+
* row, deleting the row of a manifest this deployment no longer ships, or
|
|
403
|
+
* deriving what to write from anything other than the shipped manifest list.
|
|
404
|
+
* Each of those changes an operator's platform-availability answer, and those
|
|
405
|
+
* transitions belong to `LifecycleOrchestrator`, which audits every one of them
|
|
406
|
+
* (`module.installed`, `module.enabled`, `module.disabled`, …). If this
|
|
407
|
+
* function ever needs one of them, the write moves there — the hatch does not
|
|
408
|
+
* stretch to cover it.
|
|
409
|
+
*/
|
|
410
|
+
async function reconcileExistingModules(emFactory, entries) {
|
|
411
|
+
const em = emFactory();
|
|
412
|
+
const existing = await em.find(ModuleRegistration, {});
|
|
413
|
+
const existingIds = new Set(existing.map((r) => r.moduleId));
|
|
414
|
+
const now = new Date();
|
|
415
|
+
for (const { manifest } of entries) {
|
|
416
|
+
if (existingIds.has(manifest.id))
|
|
417
|
+
continue;
|
|
418
|
+
em.create(ModuleRegistration, {
|
|
419
|
+
moduleId: manifest.id,
|
|
420
|
+
state: 'installed',
|
|
421
|
+
version: manifest.version,
|
|
422
|
+
installedAt: now,
|
|
423
|
+
lastStateChangeAt: now,
|
|
424
|
+
lastInstallFailedAt: null,
|
|
425
|
+
lastInstallError: null,
|
|
426
|
+
// The marker, on the row and on the same timestamp as the rest of it.
|
|
427
|
+
bootConvergedAt: now,
|
|
428
|
+
});
|
|
429
|
+
}
|
|
430
|
+
await em.flush();
|
|
431
|
+
// The rows as they were **before** this converged them, which is what D-101's
|
|
432
|
+
// second trigger asks about: a row it just inserted says `installed` by
|
|
433
|
+
// construction, and a row it left alone is the one the reconciler will not
|
|
434
|
+
// repair.
|
|
435
|
+
return new Map(existing.map((row) => [row.moduleId, row.state]));
|
|
436
|
+
}
|
|
437
|
+
//# sourceMappingURL=presence-load.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presence-load.js","sourceRoot":"","sources":["../../../src/lifecycle/services/presence-load.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sDAAsD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AkB,EAAE,EAAE,CAAC,CAAC;IACvD,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC7D,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;IACvB,KAAK,MAAM,EAAE,QAAQ,EAAE,IAAI,OAAO,EAAE,CAAC;QACnC,IAAI,WAAW,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC;YAAE,SAAS;QAC3C,EAAE,CAAC,MAAM,CAAC,kBAAkB,EAAE;YAC5B,QAAQ,EAAE,QAAQ,CAAC,EAAE;YACrB,KAAK,EAAE,WAAW;YAClB,OAAO,EAAE,QAAQ,CAAC,OAAO;YACzB,WAAW,EAAE,GAAG;YAChB,iBAAiB,EAAE,GAAG;YACtB,mBAAmB,EAAE,IAAI;YACzB,gBAAgB,EAAE,IAAI;YACtB,sEAAsE;YACtE,eAAe,EAAE,GAAG;SACrB,CAAC,CAAC;IACL,CAAC;IACD,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC;IACjB,8EAA8E;IAC9E,wEAAwE;IACxE,2EAA2E;IAC3E,UAAU;IACV,OAAO,IAAI,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACnE,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { ModuleInstallHook, ModuleLifecycleParticipant, ModuleManifest, ModuleRecentActivity, ModuleUninstallHook } from '@endora-commerce/contracts';
|
|
2
|
+
import type { LoadedManifestRegistry } from './manifest-loader.js';
|
|
3
|
+
/**
|
|
4
|
+
* Build a `LoadedManifestRegistry` from static imports — what the
|
|
5
|
+
* production composition root uses instead of filesystem discovery.
|
|
6
|
+
*
|
|
7
|
+
* Why a separate path? `composition.ts` already imports every module's
|
|
8
|
+
* plugin via static `import` statements (so the build picks them up).
|
|
9
|
+
* Asking the same code to do filesystem discovery in production would
|
|
10
|
+
* require shipping the source tree alongside `dist/`, which we don't.
|
|
11
|
+
* The CLI scripts (which run via `tsx` against the source tree) and
|
|
12
|
+
* tests (which run via vitest, ditto) use the dynamic discovery loader.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* What {@link buildStaticRegistry} accepts.
|
|
16
|
+
*
|
|
17
|
+
* **Hand the resolved entries straight in; do not re-map them.** Five CLI
|
|
18
|
+
* scripts, `composition.ts` and the test harness each carried a hand-written
|
|
19
|
+
* identity map from `RegisteredManifestEntry` into this shape, field by field —
|
|
20
|
+
* seven copies of one function, of which `status.ts` had already dropped
|
|
21
|
+
* `filePath` and every one of them would have dropped the
|
|
22
|
+
* `lifecycleParticipant` added in feature 080's T036a. The two types are
|
|
23
|
+
* structurally compatible on purpose, so there is nothing to copy.
|
|
24
|
+
*
|
|
25
|
+
* Every optional field spells `| undefined` explicitly, and that is what makes
|
|
26
|
+
* the compatibility hold: under `exactOptionalPropertyTypes` a bare `?:`
|
|
27
|
+
* refuses a value whose own property is typed `T | undefined`, which is what
|
|
28
|
+
* every carrier of these fields has.
|
|
29
|
+
*/
|
|
30
|
+
export interface StaticRegistryEntry {
|
|
31
|
+
manifest: ModuleManifest;
|
|
32
|
+
installHook?: ModuleInstallHook | undefined;
|
|
33
|
+
uninstallHook?: ModuleUninstallHook | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* This module's interest in every *other* module's install and hard
|
|
36
|
+
* uninstall (feature 080, T036a / D-159).
|
|
37
|
+
*/
|
|
38
|
+
lifecycleParticipant?: ModuleLifecycleParticipant | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* The module's recent-activity eligibility (feature 080, T042j / D-163.1).
|
|
41
|
+
*/
|
|
42
|
+
recentActivity?: ModuleRecentActivity | undefined;
|
|
43
|
+
/** Optional source-file path for diagnostics; defaults to `'<static>'`. */
|
|
44
|
+
filePath?: string | undefined;
|
|
45
|
+
}
|
|
46
|
+
export declare function buildStaticRegistry(entries: ReadonlyArray<StaticRegistryEntry>): LoadedManifestRegistry;
|
|
47
|
+
//# sourceMappingURL=static-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"static-registry.d.ts","sourceRoot":"","sources":["../../../src/lifecycle/services/static-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,0BAA0B,EAC1B,cAAc,EACd,oBAAoB,EACpB,mBAAmB,EACpB,MAAM,4BAA4B,CAAC;AAGpC,OAAO,KAAK,EAAE,sBAAsB,EAAqB,MAAM,sBAAsB,CAAC;AAEtF;;;;;;;;;;GAUG;AACH;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,cAAc,CAAC;IACzB,WAAW,CAAC,EAAE,iBAAiB,GAAG,SAAS,CAAC;IAC5C,aAAa,CAAC,EAAE,mBAAmB,GAAG,SAAS,CAAC;IAChD;;;OAGG;IACH,oBAAoB,CAAC,EAAE,0BAA0B,GAAG,SAAS,CAAC;IAC9D;;OAEG;IACH,cAAc,CAAC,EAAE,oBAAoB,GAAG,SAAS,CAAC;IAClD,2EAA2E;IAC3E,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC/B;AAED,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,aAAa,CAAC,mBAAmB,CAAC,GAC1C,sBAAsB,CA8CxB"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ModuleDepGraph } from './dep-graph.js';
|
|
2
|
+
import { collectLifecycleParticipants } from './manifest-loader.js';
|
|
3
|
+
export function buildStaticRegistry(entries) {
|
|
4
|
+
const modules = new Map();
|
|
5
|
+
for (const e of entries) {
|
|
6
|
+
if (modules.has(e.manifest.id)) {
|
|
7
|
+
throw new Error(`[static-registry] duplicate manifest id "${e.manifest.id}" — ` +
|
|
8
|
+
`composition root must declare each module exactly once.`);
|
|
9
|
+
}
|
|
10
|
+
modules.set(e.manifest.id, {
|
|
11
|
+
manifest: e.manifest,
|
|
12
|
+
filePath: e.filePath ?? '<static>',
|
|
13
|
+
...(e.installHook ? { installHook: e.installHook } : {}),
|
|
14
|
+
...(e.uninstallHook ? { uninstallHook: e.uninstallHook } : {}),
|
|
15
|
+
...(e.lifecycleParticipant ? { lifecycleParticipant: e.lifecycleParticipant } : {}),
|
|
16
|
+
...(e.recentActivity ? { recentActivity: e.recentActivity } : {}),
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
// Orphan deps: per research §R7, BOOT IS TOLERANT — modules whose
|
|
20
|
+
// dependencies haven't been retrofitted yet (Pass B is a separate
|
|
21
|
+
// feature) are accepted with a warning. The orchestrator's install/
|
|
22
|
+
// enable validation re-checks against the registry at command time
|
|
23
|
+
// and refuses misconfigured installs.
|
|
24
|
+
for (const e of modules.values()) {
|
|
25
|
+
for (const dep of e.manifest.dependencies) {
|
|
26
|
+
if (!modules.has(dep)) {
|
|
27
|
+
console.warn(`[static-registry] manifest "${e.manifest.id}" depends on ` +
|
|
28
|
+
`"${dep}" which is not in the static registry — ` +
|
|
29
|
+
`treating as always-installed (Pass B retrofit pending).`);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
const graph = new ModuleDepGraph([...modules.values()].map((m) => m.manifest));
|
|
34
|
+
const cycle = graph.hasCycle();
|
|
35
|
+
if (cycle) {
|
|
36
|
+
throw new Error(`[static-registry] cycle in module dependency graph: ` +
|
|
37
|
+
`[${cycle.cycle.join(' → ')}]`);
|
|
38
|
+
}
|
|
39
|
+
return { modules, graph, participants: collectLifecycleParticipants(modules.values()) };
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=static-registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"static-registry.js","sourceRoot":"","sources":["../../../src/lifecycle/services/static-regist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AsC;IACtC,KAAK,MAAM,CAAC,IAAI,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC;QACjC,KAAK,MAAM,GAAG,IAAI,CAAC,CAAC,QAAQ,CAAC,YAAY,EAAE,CAAC;YAC1C,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;gBAEtB,OAAO,CAAC,IAAI,CACV,+BAA+B,CAAC,CAAC,QAAQ,CAAC,EAAE,eAAe;oBACzD,IAAI,GAAG,0CAA0C;oBACjD,yDAAyD,CAC5D,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC;IACD,MAAM,KAAK,GAAG,IAAI,cAAc,CAC9B,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAC7C,CAAC;IACF,MAAM,KAAK,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC;IAC/B,IAAI,KAAK,EAAE,CAAC;QACV,MAAM,IAAI,KAAK,CACb,sDAAsD;YACpD,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CACjC,CAAC;IACJ,CAAC;IACD,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,4BAA4B,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC;AAC1F,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Migration } from '@mikro-orm/migrations';
|
|
2
|
+
/**
|
|
3
|
+
* Initial foundation migration — consolidates Phase 2 (sessions, audit_log_entries)
|
|
4
|
+
* and Phase 3.4 catalog / assets / inventory tables, plus the M:N bridge tables the
|
|
5
|
+
* Catalog module needs for category membership and asset attachment.
|
|
6
|
+
*
|
|
7
|
+
* It created `sales_channel_products` too until
|
|
8
|
+
* `specs/120-migration-closure-bridge-ownership/` Phase 2 moved it to `catalog`,
|
|
9
|
+
* which is the module that owns its far side (D-226).
|
|
10
|
+
*
|
|
11
|
+
* Naming follows Principle VI:
|
|
12
|
+
* - Plural snake_case table names.
|
|
13
|
+
* - snake_case columns.
|
|
14
|
+
* - Foreign-key columns named `{singular}_id`.
|
|
15
|
+
* - Bridge tables named by joining the two singulars alphabetically
|
|
16
|
+
* (e.g. `product_categories` for product ↔ category).
|
|
17
|
+
*
|
|
18
|
+
* Generated from entity metadata and then enriched with bridges. Kept in
|
|
19
|
+
* `src/db/migrations/` (module-agnostic) because it spans several modules.
|
|
20
|
+
*/
|
|
21
|
+
export declare class Migration20260424T165847CoreFoundationInit extends Migration {
|
|
22
|
+
up(): Promise<void>;
|
|
23
|
+
down(): Promise<void>;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=20260424T165847_core_foundation_init.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"20260424T165847_core_foundation_init.d.ts","sourceRoot":"","sources":["../../src/migrations/20260424T165847_core_foundation_init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,0CAA2C,SAAQ,SAAS;IACxD,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;IAwNnB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAarC"}
|