@wildo-ai/platform-config-lib 1.0.1 → 1.1.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 +34 -0
- package/dist/esm/.builder.pid +9 -0
- package/dist/esm/_unimplemented/index.d.ts +3 -0
- package/dist/esm/_unimplemented/index.d.ts.map +1 -0
- package/dist/esm/_unimplemented/index.js +3 -0
- package/dist/esm/_unimplemented/index.js.map +1 -0
- package/dist/esm/_unimplemented/soft-warn.d.ts +124 -0
- package/dist/esm/_unimplemented/soft-warn.d.ts.map +1 -0
- package/dist/esm/_unimplemented/soft-warn.js +170 -0
- package/dist/esm/_unimplemented/soft-warn.js.map +1 -0
- package/dist/esm/_unimplemented/unimplemented-field-warning.d.ts +137 -0
- package/dist/esm/_unimplemented/unimplemented-field-warning.d.ts.map +1 -0
- package/dist/esm/_unimplemented/unimplemented-field-warning.js +153 -0
- package/dist/esm/_unimplemented/unimplemented-field-warning.js.map +1 -0
- package/dist/esm/bootstrap/application-backend-env.contracts.d.ts.map +1 -1
- package/dist/esm/bootstrap/application-backend-env.contracts.js +1 -1
- package/dist/esm/bootstrap/application-backend-env.contracts.js.map +1 -1
- package/dist/esm/bootstrap/application-creation-verification-env.contracts.d.ts +13 -0
- package/dist/esm/bootstrap/application-creation-verification-env.contracts.d.ts.map +1 -0
- package/dist/esm/bootstrap/application-creation-verification-env.contracts.js +14 -0
- package/dist/esm/bootstrap/application-creation-verification-env.contracts.js.map +1 -0
- package/dist/esm/bootstrap/bootstrap-planner.d.ts +1 -1
- package/dist/esm/bootstrap/bootstrap-planner.d.ts.map +1 -1
- package/dist/esm/bootstrap/bootstrap-planner.js +1 -1
- package/dist/esm/bootstrap/bootstrap-planner.js.map +1 -1
- package/dist/esm/bootstrap/bootstrap.contracts.d.ts +141 -37
- package/dist/esm/bootstrap/bootstrap.contracts.d.ts.map +1 -1
- package/dist/esm/bootstrap/bootstrap.contracts.js +104 -18
- package/dist/esm/bootstrap/bootstrap.contracts.js.map +1 -1
- package/dist/esm/bootstrap/bootstrap.schemas.d.ts +430 -421
- package/dist/esm/bootstrap/bootstrap.schemas.d.ts.map +1 -1
- package/dist/esm/bootstrap/bootstrap.schemas.js +383 -21
- package/dist/esm/bootstrap/bootstrap.schemas.js.map +1 -1
- package/dist/esm/bootstrap/platform-runtime-env.contracts.d.ts +213 -8
- package/dist/esm/bootstrap/platform-runtime-env.contracts.d.ts.map +1 -1
- package/dist/esm/bootstrap/platform-runtime-env.contracts.js +230 -5
- package/dist/esm/bootstrap/platform-runtime-env.contracts.js.map +1 -1
- package/dist/esm/bootstrap/runtime-backing-service-access.d.ts +79 -0
- package/dist/esm/bootstrap/runtime-backing-service-access.d.ts.map +1 -0
- package/dist/esm/bootstrap/runtime-backing-service-access.js +83 -0
- package/dist/esm/bootstrap/runtime-backing-service-access.js.map +1 -0
- package/dist/esm/bootstrap/runtime-network-policy.d.ts +63 -0
- package/dist/esm/bootstrap/runtime-network-policy.d.ts.map +1 -0
- package/dist/esm/bootstrap/runtime-network-policy.js +104 -0
- package/dist/esm/bootstrap/runtime-network-policy.js.map +1 -0
- package/dist/esm/bootstrap/runtime-network-topology.d.ts +78 -0
- package/dist/esm/bootstrap/runtime-network-topology.d.ts.map +1 -0
- package/dist/esm/bootstrap/runtime-network-topology.js +134 -0
- package/dist/esm/bootstrap/runtime-network-topology.js.map +1 -0
- package/dist/esm/bootstrap/runtime-platform-access.d.ts +67 -0
- package/dist/esm/bootstrap/runtime-platform-access.d.ts.map +1 -0
- package/dist/esm/bootstrap/runtime-platform-access.js +57 -0
- package/dist/esm/bootstrap/runtime-platform-access.js.map +1 -0
- package/dist/esm/bootstrap/runtime-principal.contracts.d.ts +173 -0
- package/dist/esm/bootstrap/runtime-principal.contracts.d.ts.map +1 -0
- package/dist/esm/bootstrap/runtime-principal.contracts.js +218 -0
- package/dist/esm/bootstrap/runtime-principal.contracts.js.map +1 -0
- package/dist/esm/bootstrap/runtime-topology.contracts.d.ts +112 -1
- package/dist/esm/bootstrap/runtime-topology.contracts.d.ts.map +1 -1
- package/dist/esm/bootstrap/runtime-topology.contracts.js +141 -8
- package/dist/esm/bootstrap/runtime-topology.contracts.js.map +1 -1
- package/dist/esm/config-authoring.entry.d.ts +3 -0
- package/dist/esm/config-authoring.entry.d.ts.map +1 -0
- package/dist/esm/config-authoring.entry.js +5 -0
- package/dist/esm/config-authoring.entry.js.map +1 -0
- package/dist/esm/credentials/credential-generator.service.d.ts.map +1 -1
- package/dist/esm/credentials/credential-generator.service.js +1 -1
- package/dist/esm/credentials/credential-generator.service.js.map +1 -1
- package/dist/esm/index.d.ts +30 -15
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +16 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/lockfile/canonical-json.d.ts +41 -0
- package/dist/esm/lockfile/canonical-json.d.ts.map +1 -0
- package/dist/esm/lockfile/canonical-json.js +56 -0
- package/dist/esm/lockfile/canonical-json.js.map +1 -0
- package/dist/esm/lockfile/lockfile-io.d.ts +231 -0
- package/dist/esm/lockfile/lockfile-io.d.ts.map +1 -0
- package/dist/esm/lockfile/lockfile-io.js +303 -0
- package/dist/esm/lockfile/lockfile-io.js.map +1 -0
- package/dist/esm/lockfile/materialize-infra-section.d.ts +99 -0
- package/dist/esm/lockfile/materialize-infra-section.d.ts.map +1 -0
- package/dist/esm/lockfile/materialize-infra-section.js +153 -0
- package/dist/esm/lockfile/materialize-infra-section.js.map +1 -0
- package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.d.ts +522 -0
- package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.d.ts.map +1 -0
- package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.js +116 -0
- package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.js.map +1 -0
- package/dist/esm/project-config/define-framework-config.d.ts +36 -10
- package/dist/esm/project-config/define-framework-config.d.ts.map +1 -1
- package/dist/esm/project-config/define-framework-config.js +67 -3
- package/dist/esm/project-config/define-framework-config.js.map +1 -1
- package/dist/esm/project-config/define-infra-env-config.d.ts +570 -0
- package/dist/esm/project-config/define-infra-env-config.d.ts.map +1 -0
- package/dist/esm/project-config/define-infra-env-config.js +726 -0
- package/dist/esm/project-config/define-infra-env-config.js.map +1 -0
- package/dist/esm/project-config/define-minion-config.d.ts +221 -23
- package/dist/esm/project-config/define-minion-config.d.ts.map +1 -1
- package/dist/esm/project-config/define-minion-config.js +228 -11
- package/dist/esm/project-config/define-minion-config.js.map +1 -1
- package/dist/esm/project-config/define-saas-config.d.ts +427 -218
- package/dist/esm/project-config/define-saas-config.d.ts.map +1 -1
- package/dist/esm/project-config/define-saas-config.js +704 -75
- package/dist/esm/project-config/define-saas-config.js.map +1 -1
- package/dist/esm/project-config/define-worker-config.d.ts +106 -10
- package/dist/esm/project-config/define-worker-config.d.ts.map +1 -1
- package/dist/esm/project-config/define-worker-config.js +99 -9
- package/dist/esm/project-config/define-worker-config.js.map +1 -1
- package/dist/esm/project-config/index.d.ts +28 -21
- package/dist/esm/project-config/index.d.ts.map +1 -1
- package/dist/esm/project-config/index.js +14 -7
- package/dist/esm/project-config/index.js.map +1 -1
- package/dist/esm/project-config/loader.d.ts +120 -10
- package/dist/esm/project-config/loader.d.ts.map +1 -1
- package/dist/esm/project-config/loader.js +290 -38
- package/dist/esm/project-config/loader.js.map +1 -1
- package/dist/esm/project-config/minion-local-provider-registration.d.ts +69 -0
- package/dist/esm/project-config/minion-local-provider-registration.d.ts.map +1 -0
- package/dist/esm/project-config/minion-local-provider-registration.js +72 -0
- package/dist/esm/project-config/minion-local-provider-registration.js.map +1 -0
- package/dist/esm/project-config/provider-catalog-types.d.ts +12 -0
- package/dist/esm/project-config/provider-catalog-types.d.ts.map +1 -0
- package/dist/esm/project-config/provider-catalog-types.js +49 -0
- package/dist/esm/project-config/provider-catalog-types.js.map +1 -0
- package/dist/esm/project-config/provider-companion-discovery.d.ts +24 -0
- package/dist/esm/project-config/provider-companion-discovery.d.ts.map +1 -0
- package/dist/esm/project-config/provider-companion-discovery.js +244 -0
- package/dist/esm/project-config/provider-companion-discovery.js.map +1 -0
- package/dist/esm/project-config/provider-runtime-artifacts.d.ts +297 -0
- package/dist/esm/project-config/provider-runtime-artifacts.d.ts.map +1 -0
- package/dist/esm/project-config/provider-runtime-artifacts.js +860 -0
- package/dist/esm/project-config/provider-runtime-artifacts.js.map +1 -0
- package/dist/esm/project-config/shared/application-creation-verification.schemas.d.ts +18 -0
- package/dist/esm/project-config/shared/application-creation-verification.schemas.d.ts.map +1 -0
- package/dist/esm/project-config/shared/application-creation-verification.schemas.js +25 -0
- package/dist/esm/project-config/shared/application-creation-verification.schemas.js.map +1 -0
- package/dist/esm/project-config/shared/application-modules.schemas.d.ts +10 -2
- package/dist/esm/project-config/shared/application-modules.schemas.d.ts.map +1 -1
- package/dist/esm/project-config/shared/application-modules.schemas.js +12 -1
- package/dist/esm/project-config/shared/application-modules.schemas.js.map +1 -1
- package/dist/esm/project-config/shared/application-modules.utils.d.ts +2 -1
- package/dist/esm/project-config/shared/application-modules.utils.d.ts.map +1 -1
- package/dist/esm/project-config/shared/application-modules.utils.js +6 -1
- package/dist/esm/project-config/shared/application-modules.utils.js.map +1 -1
- package/dist/esm/project-config/shared/auth.schemas.d.ts +102 -0
- package/dist/esm/project-config/shared/auth.schemas.d.ts.map +1 -0
- package/dist/esm/project-config/shared/auth.schemas.js +100 -0
- package/dist/esm/project-config/shared/auth.schemas.js.map +1 -0
- package/dist/esm/project-config/shared/backing-services.schemas.d.ts +316 -39
- package/dist/esm/project-config/shared/backing-services.schemas.d.ts.map +1 -1
- package/dist/esm/project-config/shared/backing-services.schemas.js +359 -24
- package/dist/esm/project-config/shared/backing-services.schemas.js.map +1 -1
- package/dist/esm/project-config/shared/cdn.example.d.ts +14 -0
- package/dist/esm/project-config/shared/cdn.example.d.ts.map +1 -0
- package/dist/esm/project-config/shared/cdn.example.js +38 -0
- package/dist/esm/project-config/shared/cdn.example.js.map +1 -0
- package/dist/esm/project-config/shared/cdn.schemas.d.ts +182 -0
- package/dist/esm/project-config/shared/cdn.schemas.d.ts.map +1 -0
- package/dist/esm/project-config/shared/cdn.schemas.js +151 -0
- package/dist/esm/project-config/shared/cdn.schemas.js.map +1 -0
- package/dist/esm/project-config/shared/csp-defaults.d.ts +92 -0
- package/dist/esm/project-config/shared/csp-defaults.d.ts.map +1 -0
- package/dist/esm/project-config/shared/csp-defaults.js +195 -0
- package/dist/esm/project-config/shared/csp-defaults.js.map +1 -0
- package/dist/esm/project-config/shared/csp-emit.d.ts +106 -0
- package/dist/esm/project-config/shared/csp-emit.d.ts.map +1 -0
- package/dist/esm/project-config/shared/csp-emit.js +305 -0
- package/dist/esm/project-config/shared/csp-emit.js.map +1 -0
- package/dist/esm/project-config/shared/csp.schemas.d.ts +266 -0
- package/dist/esm/project-config/shared/csp.schemas.d.ts.map +1 -0
- package/dist/esm/project-config/shared/csp.schemas.js +281 -0
- package/dist/esm/project-config/shared/csp.schemas.js.map +1 -0
- package/dist/esm/project-config/shared/data-services.schemas.d.ts +45 -9
- package/dist/esm/project-config/shared/data-services.schemas.d.ts.map +1 -1
- package/dist/esm/project-config/shared/data-services.schemas.js +45 -9
- package/dist/esm/project-config/shared/data-services.schemas.js.map +1 -1
- package/dist/esm/project-config/shared/env-example-defaults.d.ts +0 -1
- package/dist/esm/project-config/shared/env-example-defaults.d.ts.map +1 -1
- package/dist/esm/project-config/shared/env-example-defaults.js +1 -2
- package/dist/esm/project-config/shared/env-example-defaults.js.map +1 -1
- package/dist/esm/project-config/shared/environment.schemas.d.ts +134 -8
- package/dist/esm/project-config/shared/environment.schemas.d.ts.map +1 -1
- package/dist/esm/project-config/shared/environment.schemas.js +185 -2
- package/dist/esm/project-config/shared/environment.schemas.js.map +1 -1
- package/dist/esm/project-config/shared/infra-providers.schemas.d.ts +779 -0
- package/dist/esm/project-config/shared/infra-providers.schemas.d.ts.map +1 -0
- package/dist/esm/project-config/shared/infra-providers.schemas.js +210 -0
- package/dist/esm/project-config/shared/infra-providers.schemas.js.map +1 -0
- package/dist/esm/project-config/shared/infra-service.schemas.d.ts +18 -0
- package/dist/esm/project-config/shared/infra-service.schemas.d.ts.map +1 -0
- package/dist/esm/project-config/shared/infra-service.schemas.js +16 -0
- package/dist/esm/project-config/shared/infra-service.schemas.js.map +1 -0
- package/dist/esm/project-config/shared/infrastructure-defaults.schemas.d.ts +83 -1
- package/dist/esm/project-config/shared/infrastructure-defaults.schemas.d.ts.map +1 -1
- package/dist/esm/project-config/shared/infrastructure-defaults.schemas.js +99 -2
- package/dist/esm/project-config/shared/infrastructure-defaults.schemas.js.map +1 -1
- package/dist/esm/project-config/shared/k8s-utils.d.ts +51 -7
- package/dist/esm/project-config/shared/k8s-utils.d.ts.map +1 -1
- package/dist/esm/project-config/shared/k8s-utils.js +59 -12
- package/dist/esm/project-config/shared/k8s-utils.js.map +1 -1
- package/dist/esm/project-config/shared/minion-platform-access.vocabulary.d.ts +31 -0
- package/dist/esm/project-config/shared/minion-platform-access.vocabulary.d.ts.map +1 -0
- package/dist/esm/project-config/shared/minion-platform-access.vocabulary.js +32 -0
- package/dist/esm/project-config/shared/minion-platform-access.vocabulary.js.map +1 -0
- package/dist/esm/project-config/shared/minion-resource-access.validation.d.ts +142 -0
- package/dist/esm/project-config/shared/minion-resource-access.validation.d.ts.map +1 -0
- package/dist/esm/project-config/shared/minion-resource-access.validation.js +159 -0
- package/dist/esm/project-config/shared/minion-resource-access.validation.js.map +1 -0
- package/dist/esm/project-config/shared/object-storage-session-policy.d.ts +100 -0
- package/dist/esm/project-config/shared/object-storage-session-policy.d.ts.map +1 -0
- package/dist/esm/project-config/shared/object-storage-session-policy.js +130 -0
- package/dist/esm/project-config/shared/object-storage-session-policy.js.map +1 -0
- package/dist/esm/project-config/shared/platform-services.schemas.d.ts +9 -14
- package/dist/esm/project-config/shared/platform-services.schemas.d.ts.map +1 -1
- package/dist/esm/project-config/shared/platform-services.schemas.js +13 -9
- package/dist/esm/project-config/shared/platform-services.schemas.js.map +1 -1
- package/dist/esm/project-config/shared/schema-version.schemas.d.ts +15 -0
- package/dist/esm/project-config/shared/schema-version.schemas.d.ts.map +1 -0
- package/dist/esm/project-config/shared/schema-version.schemas.js +40 -0
- package/dist/esm/project-config/shared/schema-version.schemas.js.map +1 -0
- package/dist/esm/project-config/shared/service-definitions.schemas.d.ts +283 -8
- package/dist/esm/project-config/shared/service-definitions.schemas.d.ts.map +1 -1
- package/dist/esm/project-config/shared/service-definitions.schemas.js +325 -8
- package/dist/esm/project-config/shared/service-definitions.schemas.js.map +1 -1
- package/dist/esm/registry/artifact-domain.schemas.d.ts +54 -0
- package/dist/esm/registry/artifact-domain.schemas.d.ts.map +1 -0
- package/dist/esm/registry/artifact-domain.schemas.js +40 -0
- package/dist/esm/registry/artifact-domain.schemas.js.map +1 -0
- package/dist/esm/registry/companion-api.schemas.d.ts +176 -0
- package/dist/esm/registry/companion-api.schemas.d.ts.map +1 -0
- package/dist/esm/registry/companion-api.schemas.js +165 -0
- package/dist/esm/registry/companion-api.schemas.js.map +1 -0
- package/dist/esm/registry/digest.schemas.d.ts +20 -0
- package/dist/esm/registry/digest.schemas.d.ts.map +1 -0
- package/dist/esm/registry/digest.schemas.js +21 -0
- package/dist/esm/registry/digest.schemas.js.map +1 -0
- package/dist/esm/registry/index.d.ts +33 -0
- package/dist/esm/registry/index.d.ts.map +1 -0
- package/dist/esm/registry/index.js +33 -0
- package/dist/esm/registry/index.js.map +1 -0
- package/dist/esm/registry/lockfile-modules-section.schemas.d.ts +107 -0
- package/dist/esm/registry/lockfile-modules-section.schemas.d.ts.map +1 -0
- package/dist/esm/registry/lockfile-modules-section.schemas.js +67 -0
- package/dist/esm/registry/lockfile-modules-section.schemas.js.map +1 -0
- package/dist/esm/registry/module-artifact.schemas.d.ts +94 -0
- package/dist/esm/registry/module-artifact.schemas.d.ts.map +1 -0
- package/dist/esm/registry/module-artifact.schemas.js +69 -0
- package/dist/esm/registry/module-artifact.schemas.js.map +1 -0
- package/dist/esm/registry/module-manifest.schemas.d.ts +134 -0
- package/dist/esm/registry/module-manifest.schemas.d.ts.map +1 -0
- package/dist/esm/registry/module-manifest.schemas.js +155 -0
- package/dist/esm/registry/module-manifest.schemas.js.map +1 -0
- package/dist/esm/registry/registry-config.schemas.d.ts +31 -0
- package/dist/esm/registry/registry-config.schemas.d.ts.map +1 -0
- package/dist/esm/registry/registry-config.schemas.js +24 -0
- package/dist/esm/registry/registry-config.schemas.js.map +1 -0
- package/dist/esm/registry/registry-defaults.constants.d.ts +37 -0
- package/dist/esm/registry/registry-defaults.constants.d.ts.map +1 -0
- package/dist/esm/registry/registry-defaults.constants.js +37 -0
- package/dist/esm/registry/registry-defaults.constants.js.map +1 -0
- package/dist/esm/registry/registry-errors.d.ts +109 -0
- package/dist/esm/registry/registry-errors.d.ts.map +1 -0
- package/dist/esm/registry/registry-errors.js +185 -0
- package/dist/esm/registry/registry-errors.js.map +1 -0
- package/dist/esm/registry/registry-section-schemas.constants.d.ts +39 -0
- package/dist/esm/registry/registry-section-schemas.constants.d.ts.map +1 -0
- package/dist/esm/registry/registry-section-schemas.constants.js +22 -0
- package/dist/esm/registry/registry-section-schemas.constants.js.map +1 -0
- package/dist/esm/release/framework-release.constants.d.ts +26 -1
- package/dist/esm/release/framework-release.constants.d.ts.map +1 -1
- package/dist/esm/release/framework-release.constants.js +27 -2
- package/dist/esm/release/framework-release.constants.js.map +1 -1
- package/dist/esm/schemas/framework-info.schemas.d.ts +1 -1
- package/dist/esm/schemas/framework-info.schemas.d.ts.map +1 -1
- package/dist/esm/schemas/framework-info.schemas.js +1 -1
- package/dist/esm/schemas/framework-info.schemas.js.map +1 -1
- package/dist/esm/schemas/framework-secrets.schemas.d.ts +5 -5
- package/dist/esm/schemas/framework-secrets.schemas.d.ts.map +1 -1
- package/dist/esm/schemas/framework-secrets.schemas.js +1 -1
- package/dist/esm/schemas/framework-secrets.schemas.js.map +1 -1
- package/dist/esm/schemas/platform-application-config.schemas.d.ts +1 -1
- package/dist/esm/schemas/platform-application-config.schemas.d.ts.map +1 -1
- package/dist/esm/schemas/platform-application-config.schemas.js +11 -2
- package/dist/esm/schemas/platform-application-config.schemas.js.map +1 -1
- package/dist/esm/schemas/platform-application-secrets.schemas.d.ts +7 -7
- package/dist/esm/schemas/platform-application-secrets.schemas.d.ts.map +1 -1
- package/dist/esm/schemas/platform-application-secrets.schemas.js +17 -2
- package/dist/esm/schemas/platform-application-secrets.schemas.js.map +1 -1
- package/dist/esm/schemas/platform-config.schemas.d.ts +12 -13
- package/dist/esm/schemas/platform-config.schemas.d.ts.map +1 -1
- package/dist/esm/schemas/platform-config.schemas.js +15 -3
- package/dist/esm/schemas/platform-config.schemas.js.map +1 -1
- package/dist/esm/workspace-scope/application-subject-manifest.d.ts +26 -0
- package/dist/esm/workspace-scope/application-subject-manifest.d.ts.map +1 -0
- package/dist/esm/workspace-scope/application-subject-manifest.js +43 -0
- package/dist/esm/workspace-scope/application-subject-manifest.js.map +1 -0
- package/dist/esm/workspace-scope/index.d.ts +5 -2
- package/dist/esm/workspace-scope/index.d.ts.map +1 -1
- package/dist/esm/workspace-scope/index.js +4 -1
- package/dist/esm/workspace-scope/index.js.map +1 -1
- package/dist/esm/workspace-scope/resolve-homes.d.ts +20 -0
- package/dist/esm/workspace-scope/resolve-homes.d.ts.map +1 -0
- package/dist/esm/workspace-scope/resolve-homes.js +62 -0
- package/dist/esm/workspace-scope/resolve-homes.js.map +1 -0
- package/dist/esm/workspace-scope/workspace-homes.schemas.d.ts +211 -0
- package/dist/esm/workspace-scope/workspace-homes.schemas.d.ts.map +1 -0
- package/dist/esm/workspace-scope/workspace-homes.schemas.js +113 -0
- package/dist/esm/workspace-scope/workspace-homes.schemas.js.map +1 -0
- package/dist/esm/workspace-scope/workspace-scope-detector.d.ts +10 -5
- package/dist/esm/workspace-scope/workspace-scope-detector.d.ts.map +1 -1
- package/dist/esm/workspace-scope/workspace-scope-detector.js +22 -36
- package/dist/esm/workspace-scope/workspace-scope-detector.js.map +1 -1
- package/dist/esm/workspace-scope/workspace-scope.schemas.d.ts +147 -58
- package/dist/esm/workspace-scope/workspace-scope.schemas.d.ts.map +1 -1
- package/dist/esm/workspace-scope/workspace-scope.schemas.js +174 -78
- package/dist/esm/workspace-scope/workspace-scope.schemas.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +31 -17
- package/dist/esm/credentials/credentials-provisioner.service.d.ts +0 -190
- package/dist/esm/credentials/credentials-provisioner.service.d.ts.map +0 -1
- package/dist/esm/credentials/credentials-provisioner.service.js +0 -278
- package/dist/esm/credentials/credentials-provisioner.service.js.map +0 -1
- package/dist/esm/infra-managers/infra-manager.models.d.ts +0 -146
- package/dist/esm/infra-managers/infra-manager.models.d.ts.map +0 -1
- package/dist/esm/infra-managers/infra-manager.models.js +0 -2
- package/dist/esm/infra-managers/infra-manager.models.js.map +0 -1
- package/dist/esm/infra-managers/mongo-atlas-manager.service.d.ts +0 -64
- package/dist/esm/infra-managers/mongo-atlas-manager.service.d.ts.map +0 -1
- package/dist/esm/infra-managers/mongo-atlas-manager.service.js +0 -307
- package/dist/esm/infra-managers/mongo-atlas-manager.service.js.map +0 -1
- package/dist/esm/infra-managers/postgresql-manager.service.d.ts +0 -115
- package/dist/esm/infra-managers/postgresql-manager.service.d.ts.map +0 -1
- package/dist/esm/infra-managers/postgresql-manager.service.js +0 -403
- package/dist/esm/infra-managers/postgresql-manager.service.js.map +0 -1
- package/dist/esm/infra-managers/rabbitmq-manager.service.d.ts +0 -64
- package/dist/esm/infra-managers/rabbitmq-manager.service.d.ts.map +0 -1
- package/dist/esm/infra-managers/rabbitmq-manager.service.js +0 -288
- package/dist/esm/infra-managers/rabbitmq-manager.service.js.map +0 -1
- package/dist/esm/infra-managers/redis-manager.service.d.ts +0 -78
- package/dist/esm/infra-managers/redis-manager.service.d.ts.map +0 -1
- package/dist/esm/infra-managers/redis-manager.service.js +0 -326
- package/dist/esm/infra-managers/redis-manager.service.js.map +0 -1
- package/dist/esm/project-config/define-infra-config.d.ts +0 -128
- package/dist/esm/project-config/define-infra-config.d.ts.map +0 -1
- package/dist/esm/project-config/define-infra-config.js +0 -87
- package/dist/esm/project-config/define-infra-config.js.map +0 -1
- package/dist/esm/project-config/define-platform-config.d.ts +0 -65
- package/dist/esm/project-config/define-platform-config.d.ts.map +0 -1
- package/dist/esm/project-config/define-platform-config.js +0 -22
- package/dist/esm/project-config/define-platform-config.js.map +0 -1
- package/dist/esm/project-config/define-platform-env-config.d.ts +0 -41
- package/dist/esm/project-config/define-platform-env-config.d.ts.map +0 -1
- package/dist/esm/project-config/define-platform-env-config.js +0 -45
- package/dist/esm/project-config/define-platform-env-config.js.map +0 -1
- package/dist/esm/project-config/define-project-config.d.ts +0 -38
- package/dist/esm/project-config/define-project-config.d.ts.map +0 -1
- package/dist/esm/project-config/define-project-config.js +0 -57
- package/dist/esm/project-config/define-project-config.js.map +0 -1
- package/dist/esm/project-config/define-sharing-policy.d.ts +0 -35
- package/dist/esm/project-config/define-sharing-policy.d.ts.map +0 -1
- package/dist/esm/project-config/define-sharing-policy.js +0 -30
- package/dist/esm/project-config/define-sharing-policy.js.map +0 -1
- package/dist/esm/project-config/sharing-policy-validation.d.ts +0 -40
- package/dist/esm/project-config/sharing-policy-validation.d.ts.map +0 -1
- package/dist/esm/project-config/sharing-policy-validation.js +0 -143
- package/dist/esm/project-config/sharing-policy-validation.js.map +0 -1
- package/dist/esm/runtime-bridge/platform-runtime-bridge.contracts.d.ts +0 -23
- package/dist/esm/runtime-bridge/platform-runtime-bridge.contracts.d.ts.map +0 -1
- package/dist/esm/runtime-bridge/platform-runtime-bridge.contracts.js +0 -13
- package/dist/esm/runtime-bridge/platform-runtime-bridge.contracts.js.map +0 -1
- package/src/bootstrap/application-backend-env.contracts.ts +0 -17
- package/src/bootstrap/bootstrap-planner.ts +0 -46
- package/src/bootstrap/bootstrap.contracts.ts +0 -251
- package/src/bootstrap/bootstrap.schemas.ts +0 -164
- package/src/bootstrap/platform-runtime-env.contracts.ts +0 -99
- package/src/bootstrap/runtime-topology.contracts.ts +0 -102
- package/src/credentials/credential-generator.service.ts +0 -39
- package/src/index.ts +0 -16
- package/src/project-config/__tests__/application-modules.utils.test.ts +0 -53
- package/src/project-config/__tests__/define-framework-config.test.ts +0 -43
- package/src/project-config/__tests__/define-saas-config.test.ts +0 -210
- package/src/project-config/__tests__/loader.test.ts +0 -100
- package/src/project-config/define-framework-config.ts +0 -44
- package/src/project-config/define-infra-config.ts +0 -168
- package/src/project-config/define-minion-config.ts +0 -27
- package/src/project-config/define-platform-config.ts +0 -28
- package/src/project-config/define-platform-env-config.ts +0 -59
- package/src/project-config/define-project-config.ts +0 -63
- package/src/project-config/define-saas-config.ts +0 -171
- package/src/project-config/define-sharing-policy.ts +0 -36
- package/src/project-config/define-worker-config.ts +0 -27
- package/src/project-config/index.ts +0 -23
- package/src/project-config/loader.ts +0 -220
- package/src/project-config/shared/application-modules.schemas.ts +0 -12
- package/src/project-config/shared/application-modules.utils.ts +0 -65
- package/src/project-config/shared/backing-services.schemas.ts +0 -59
- package/src/project-config/shared/data-services.schemas.ts +0 -58
- package/src/project-config/shared/env-example-defaults.ts +0 -50
- package/src/project-config/shared/environment.schemas.ts +0 -136
- package/src/project-config/shared/infrastructure-defaults.schemas.ts +0 -47
- package/src/project-config/shared/k8s-utils.ts +0 -56
- package/src/project-config/shared/platform-services.schemas.ts +0 -33
- package/src/project-config/shared/service-definitions.schemas.ts +0 -38
- package/src/project-config/sharing-policy-validation.ts +0 -159
- package/src/release/framework-release.constants.ts +0 -2
- package/src/schemas/__tests__/platform-config.schemas.test.ts +0 -90
- package/src/schemas/framework-info.schemas.ts +0 -13
- package/src/schemas/framework-secrets.schemas.ts +0 -19
- package/src/schemas/platform-application-config.schemas.ts +0 -25
- package/src/schemas/platform-application-secrets.schemas.ts +0 -78
- package/src/schemas/platform-config.schemas.ts +0 -45
- package/src/workspace-scope/index.ts +0 -2
- package/src/workspace-scope/workspace-scope-detector.ts +0 -98
- package/src/workspace-scope/workspace-scope.schemas.ts +0 -224
|
@@ -11,7 +11,118 @@ export interface LocalhostApplicationRuntimeEndpointsInput {
|
|
|
11
11
|
}
|
|
12
12
|
export declare function buildLocalhostApplicationRuntimeEndpoints(input: LocalhostApplicationRuntimeEndpointsInput): Record<string, RuntimeEndpointUrls>;
|
|
13
13
|
export declare function buildK8sPlatformRuntimeEndpoints(input: {
|
|
14
|
-
|
|
14
|
+
publicDomain: string;
|
|
15
15
|
namespace: string;
|
|
16
16
|
}): Record<string, RuntimeEndpointUrls>;
|
|
17
|
+
export interface K8sIngressRoute {
|
|
18
|
+
/** Public hostname Traefik/ingress routes on (from the serviceHosts resolver). */
|
|
19
|
+
host: string;
|
|
20
|
+
/**
|
|
21
|
+
* Per-service k8s Service NAME this host routes to. In the per-service deploy
|
|
22
|
+
* model each service is its OWN Deployment+Service, so the route target is the
|
|
23
|
+
* service's `serviceName` (e.g. `wonder-todos-backend-api`, `wonder-todos-app`)
|
|
24
|
+
* — NOT one shared app Service. This is the value stamped into the ingress
|
|
25
|
+
* rule's `backend.service.name`.
|
|
26
|
+
*/
|
|
27
|
+
serviceName: string;
|
|
28
|
+
/** Port on that per-service Service to route this host to. */
|
|
29
|
+
port: number;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* One public frontend in the app's service topology. `serviceName` and
|
|
33
|
+
* `serviceKey` are DECOUPLED on purpose:
|
|
34
|
+
* - `serviceName` — the `runtime.endPoints` map key (the consumer contract:
|
|
35
|
+
* `lookupFrontendPublicUrl` / X-Frontend-Service-Name key by serviceName).
|
|
36
|
+
* - `serviceKey` — the `config.services.<key>`, which is the serviceHosts
|
|
37
|
+
* authoring key. The public HOST resolves from THIS, never from serviceName.
|
|
38
|
+
* Conflating them silently ignores authored `serviceHosts` (the serviceName
|
|
39
|
+
* `wonder-todos-app` misses the authored `app` entry).
|
|
40
|
+
*/
|
|
41
|
+
export interface ApplicationPublicFrontend {
|
|
42
|
+
serviceName: string;
|
|
43
|
+
serviceKey: string;
|
|
44
|
+
port: number;
|
|
45
|
+
}
|
|
46
|
+
export interface K8sApplicationIngressRoutesInput {
|
|
47
|
+
publicDomain: string;
|
|
48
|
+
serviceHosts: Record<string, string> | undefined;
|
|
49
|
+
/** Public frontends. Host resolves from `serviceKey` (config key); route target is the frontend's own `serviceName`. */
|
|
50
|
+
frontends: ReadonlyArray<ApplicationPublicFrontend>;
|
|
51
|
+
/** Backend API `config.services.<key>` (host resolution key). */
|
|
52
|
+
mainBackendApiServiceKey?: string | undefined;
|
|
53
|
+
/** Backend API per-service k8s Service name (the ingress route target). */
|
|
54
|
+
mainBackendApiServiceName?: string | undefined;
|
|
55
|
+
/** Backend API Service port. */
|
|
56
|
+
mainBackendApiPort?: number | undefined;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Ingress routes for the app's PUBLIC services (every frontend + the main
|
|
60
|
+
* backend API), serviceHosts-driven. Every host resolves from the service's
|
|
61
|
+
* `config.services.<key>` (`serviceKey`) — so GIVEN THE SAME frontends/keys,
|
|
62
|
+
* the routes match the `runtime.endPoints.publicUrl` that
|
|
63
|
+
* {@link buildK8sApplicationRuntimeEndpoints} produces (both key public hosts on
|
|
64
|
+
* `serviceKey`). Coherence is a property of feeding both the SAME `serviceKey`s,
|
|
65
|
+
* not automatic — see the divergence guards in the domain plan. The internal-only
|
|
66
|
+
* APIs (health/webhook/oauth/mcp) are deliberately NOT routed publicly.
|
|
67
|
+
*/
|
|
68
|
+
export declare function buildK8sApplicationIngressRoutes(input: K8sApplicationIngressRoutesInput): K8sIngressRoute[];
|
|
69
|
+
/**
|
|
70
|
+
* Fields shared by every REMOTE runtime-endpoints builder (k8s + compose). The
|
|
71
|
+
* PUBLIC side (serviceHosts resolution) is runtime-agnostic; only the INTERNAL
|
|
72
|
+
* URL form differs, injected via the `internalUrlFor` callback of the core
|
|
73
|
+
* builder ({@link buildRemoteApplicationRuntimeEndpoints}).
|
|
74
|
+
*/
|
|
75
|
+
export interface RemoteApplicationRuntimeEndpointsCommon {
|
|
76
|
+
/** Operator's public domain (`WildoInfraEnvConfig.publicDomain`). */
|
|
77
|
+
publicDomain: string;
|
|
78
|
+
/** Authored per-service subdomain map (`wildo.infra.<env>.config.ts`). */
|
|
79
|
+
serviceHosts: Record<string, string> | undefined;
|
|
80
|
+
/**
|
|
81
|
+
* Public frontends. The `runtime.endPoints` map is keyed by each frontend's
|
|
82
|
+
* `serviceName` (consumer contract); the public HOST resolves from its
|
|
83
|
+
* `serviceKey` (config key / serviceHosts key). See {@link ApplicationPublicFrontend}.
|
|
84
|
+
*/
|
|
85
|
+
frontends: ReadonlyArray<ApplicationPublicFrontend>;
|
|
86
|
+
/** `serviceKey` of the STATIC_WEBSITE frontend (feeds the fixed website endpoint). */
|
|
87
|
+
websiteServiceKey?: string | undefined;
|
|
88
|
+
/** `serviceKey` of the TECH_DOC frontend (feeds the fixed technical-documentation endpoint). */
|
|
89
|
+
technicalDocumentationServiceKey?: string | undefined;
|
|
90
|
+
/** Backend API `config.services.<key>` (host resolution key). */
|
|
91
|
+
mainBackendApiServiceKey?: string | undefined;
|
|
92
|
+
/** Backend API container port (internal URL + the -1..-4 sibling API ports). */
|
|
93
|
+
mainBackendApiPort?: number | undefined;
|
|
94
|
+
}
|
|
95
|
+
export interface K8sApplicationRuntimeEndpointsInput extends RemoteApplicationRuntimeEndpointsCommon {
|
|
96
|
+
/** K8s namespace for cluster-internal service DNS. */
|
|
97
|
+
namespace: string;
|
|
98
|
+
/**
|
|
99
|
+
* K8s Service name for cluster-internal URLs. Single Service per app (all
|
|
100
|
+
* frontends + APIs ride it on different ports), so this is the app's own
|
|
101
|
+
* service name (= its slug).
|
|
102
|
+
*/
|
|
103
|
+
appServiceName: string;
|
|
104
|
+
}
|
|
105
|
+
export interface ComposeApplicationRuntimeEndpointsInput extends RemoteApplicationRuntimeEndpointsCommon {
|
|
106
|
+
/**
|
|
107
|
+
* Compose service (container) name for internal URLs. Single container per
|
|
108
|
+
* app serving all frontends + APIs on their ports, reachable by other
|
|
109
|
+
* containers on the shared network as `http://<appServiceName>:<port>`.
|
|
110
|
+
*/
|
|
111
|
+
appServiceName: string;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Build K8s application runtime endpoints — the self-hosted, single-app,
|
|
115
|
+
* `serviceHosts`-driven counterpart to {@link buildLocalhostApplicationRuntimeEndpoints}.
|
|
116
|
+
* INTERNAL URLs are the app's own cluster-DNS Service on each port.
|
|
117
|
+
*/
|
|
118
|
+
export declare function buildK8sApplicationRuntimeEndpoints(input: K8sApplicationRuntimeEndpointsInput): Record<string, RuntimeEndpointUrls>;
|
|
119
|
+
/**
|
|
120
|
+
* Build Docker-Compose application runtime endpoints — the compose counterpart
|
|
121
|
+
* of {@link buildK8sApplicationRuntimeEndpoints}. PUBLIC URLs are IDENTICAL
|
|
122
|
+
* (serviceHosts-driven, so the Traefik ingress routes and `runtime.endPoints`
|
|
123
|
+
* agree — the CORS invariant holds for compose too). INTERNAL URLs are the app
|
|
124
|
+
* container's own name on the shared compose network (`http://<appServiceName>:<port>`),
|
|
125
|
+
* NOT localhost — the remote compose stack must not advertise localhost topology.
|
|
126
|
+
*/
|
|
127
|
+
export declare function buildComposeApplicationRuntimeEndpoints(input: ComposeApplicationRuntimeEndpointsInput): Record<string, RuntimeEndpointUrls>;
|
|
17
128
|
//# sourceMappingURL=runtime-topology.contracts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-topology.contracts.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"runtime-topology.contracts.d.ts","sourceRoot":"","sources":["../../../../src/bootstrap/runtime-topology.contracts.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,mBAAmB,EACzB,MAAM,gCAAgC,CAAC;AASxC,OAAO,EACL,gCAAgC,EAChC,6BAA6B,EAC7B,2BAA2B,EAC3B,uBAAuB,EACvB,0BAA0B,EAC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gB,uCAAuC,CACrD,KAAK,EAAE,uCAAuC,GAC7C,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAErC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { buildApplicationRuntimeEndpoints, buildPlatformRuntimeEndpoints, } from '@wildo-ai/platform-core-shared';
|
|
2
|
-
import { buildK8sInternalUrl, buildK8sPublicUrl, } from '../project-config/shared/k8s-utils.js';
|
|
2
|
+
import { buildK8sInternalUrl, buildK8sPublicUrl, buildServicePublicHost, buildServicePublicUrl, } from '../project-config/shared/k8s-utils.js';
|
|
3
3
|
import { PLATFORM_DEFAULT_PORTS } from '../project-config/shared/infrastructure-defaults.schemas.js';
|
|
4
4
|
export { buildApplicationRuntimeEndpoints, buildPlatformRuntimeEndpoints, parseRuntimeEndpointsRecord, PlatformApplicationType, PlatformRuntimeEndpointKey, serializeRuntimeEndpointsRecord, } from '@wildo-ai/platform-core-shared';
|
|
5
5
|
export function buildLocalhostPlatformRuntimeEndpoints(host = 'localhost') {
|
|
@@ -10,11 +10,24 @@ export function buildLocalhostPlatformRuntimeEndpoints(host = 'localhost') {
|
|
|
10
10
|
return buildPlatformRuntimeEndpoints({
|
|
11
11
|
appsManager: buildUrl(PLATFORM_DEFAULT_PORTS.APPS_MANAGER),
|
|
12
12
|
crontabsBatchesManager: buildUrl(PLATFORM_DEFAULT_PORTS.CRONTABS_BATCHES_MANAGER),
|
|
13
|
-
|
|
13
|
+
moduleRegistry: buildUrl(PLATFORM_DEFAULT_PORTS.MODULE_REGISTRY),
|
|
14
14
|
});
|
|
15
15
|
}
|
|
16
16
|
export function buildLocalhostApplicationRuntimeEndpoints(input) {
|
|
17
17
|
const host = input.host ?? 'localhost';
|
|
18
|
+
/**
|
|
19
|
+
* Local endpoints are plain http, publicly and internally, and there is no knob.
|
|
20
|
+
*
|
|
21
|
+
* A configurable local scheme existed until 2026-08-14 and was removed: it applied ONE scheme to
|
|
22
|
+
* EVERY endpoint's own port, which is only correct when a single ingress fronts them all. Local
|
|
23
|
+
* Docker Compose has none, so declaring https made `main_backend_api.publicUrl` name a port that
|
|
24
|
+
* held no certificate, and every browser session died on its WebSocket readiness poll.
|
|
25
|
+
*
|
|
26
|
+
* Remote is unaffected and always was: `buildServicePublicUrl` hardcodes `https://` because TLS
|
|
27
|
+
* terminates at Traefik/nginx in front of one origin, where a single scheme IS true for every
|
|
28
|
+
* endpoint. That is the only place the question has a well-defined answer, and it never consulted
|
|
29
|
+
* this input.
|
|
30
|
+
*/
|
|
18
31
|
const buildUrl = (port) => ({
|
|
19
32
|
publicUrl: `http://${host}:${port}`,
|
|
20
33
|
internalUrl: `http://${host}:${port}`,
|
|
@@ -44,17 +57,137 @@ export function buildLocalhostApplicationRuntimeEndpoints(input) {
|
|
|
44
57
|
export function buildK8sPlatformRuntimeEndpoints(input) {
|
|
45
58
|
return buildPlatformRuntimeEndpoints({
|
|
46
59
|
appsManager: {
|
|
47
|
-
publicUrl: buildK8sPublicUrl('platform-apps-manager', input.
|
|
60
|
+
publicUrl: buildK8sPublicUrl('platform-apps-manager', input.publicDomain),
|
|
48
61
|
internalUrl: buildK8sInternalUrl('platform-apps-manager', PLATFORM_DEFAULT_PORTS.APPS_MANAGER, input.namespace),
|
|
49
62
|
},
|
|
50
63
|
crontabsBatchesManager: {
|
|
51
|
-
publicUrl: buildK8sPublicUrl('platform-crontabs-batches-manager', input.
|
|
64
|
+
publicUrl: buildK8sPublicUrl('platform-crontabs-batches-manager', input.publicDomain),
|
|
52
65
|
internalUrl: buildK8sInternalUrl('platform-crontabs-batches-manager', PLATFORM_DEFAULT_PORTS.CRONTABS_BATCHES_MANAGER, input.namespace),
|
|
53
66
|
},
|
|
54
|
-
|
|
55
|
-
publicUrl: buildK8sPublicUrl('platform-
|
|
56
|
-
internalUrl: buildK8sInternalUrl('platform-
|
|
67
|
+
moduleRegistry: {
|
|
68
|
+
publicUrl: buildK8sPublicUrl('platform-module-registry', input.publicDomain),
|
|
69
|
+
internalUrl: buildK8sInternalUrl('platform-module-registry', PLATFORM_DEFAULT_PORTS.MODULE_REGISTRY, input.namespace),
|
|
57
70
|
},
|
|
58
71
|
});
|
|
59
72
|
}
|
|
60
|
-
|
|
73
|
+
/**
|
|
74
|
+
* Ingress routes for the app's PUBLIC services (every frontend + the main
|
|
75
|
+
* backend API), serviceHosts-driven. Every host resolves from the service's
|
|
76
|
+
* `config.services.<key>` (`serviceKey`) — so GIVEN THE SAME frontends/keys,
|
|
77
|
+
* the routes match the `runtime.endPoints.publicUrl` that
|
|
78
|
+
* {@link buildK8sApplicationRuntimeEndpoints} produces (both key public hosts on
|
|
79
|
+
* `serviceKey`). Coherence is a property of feeding both the SAME `serviceKey`s,
|
|
80
|
+
* not automatic — see the divergence guards in the domain plan. The internal-only
|
|
81
|
+
* APIs (health/webhook/oauth/mcp) are deliberately NOT routed publicly.
|
|
82
|
+
*/
|
|
83
|
+
export function buildK8sApplicationIngressRoutes(input) {
|
|
84
|
+
const host = (serviceKey) => buildServicePublicHost({ serviceKey, serviceHosts: input.serviceHosts, publicDomain: input.publicDomain });
|
|
85
|
+
const entries = input.frontends.map((f) => ({
|
|
86
|
+
serviceKey: f.serviceKey,
|
|
87
|
+
serviceName: f.serviceName,
|
|
88
|
+
host: host(f.serviceKey),
|
|
89
|
+
port: f.port,
|
|
90
|
+
}));
|
|
91
|
+
if (input.mainBackendApiServiceKey !== undefined &&
|
|
92
|
+
input.mainBackendApiServiceName !== undefined &&
|
|
93
|
+
input.mainBackendApiPort !== undefined) {
|
|
94
|
+
entries.push({
|
|
95
|
+
serviceKey: input.mainBackendApiServiceKey,
|
|
96
|
+
serviceName: input.mainBackendApiServiceName,
|
|
97
|
+
host: host(input.mainBackendApiServiceKey),
|
|
98
|
+
port: input.mainBackendApiPort,
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
// Fail-closed host-uniqueness guard: each public host routes entirely to ONE
|
|
102
|
+
// service:port (no path-based sharing), so two distinct services resolving to
|
|
103
|
+
// the same host — e.g. both authored to the apex (`''`), or an unauthored key
|
|
104
|
+
// that collides with an authored subdomain — is an ambiguous, silently-broken
|
|
105
|
+
// ingress. Reject it at build time with the colliding keys named, rather than
|
|
106
|
+
// emitting a manifest whose routing is undefined.
|
|
107
|
+
const claimedBy = new Map();
|
|
108
|
+
for (const entry of entries) {
|
|
109
|
+
const existing = claimedBy.get(entry.host);
|
|
110
|
+
if (existing !== undefined && existing !== entry.serviceKey) {
|
|
111
|
+
throw new Error(`serviceHosts collision: services '${existing}' and '${entry.serviceKey}' both resolve to public host '${entry.host}'. ` +
|
|
112
|
+
`Each service needs a distinct 'serviceHosts' subdomain (only one service may map to the apex '').`);
|
|
113
|
+
}
|
|
114
|
+
claimedBy.set(entry.host, entry.serviceKey);
|
|
115
|
+
}
|
|
116
|
+
return entries.map(({ host: h, serviceName, port }) => ({ host: h, serviceName, port }));
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Core REMOTE application runtime-endpoints assembly, shared by the k8s and
|
|
120
|
+
* compose builders so their public-URL semantics never drift. PUBLIC URLs come
|
|
121
|
+
* from {@link buildServicePublicUrl} (so ingress hosts, `runtime.endPoints.publicUrl`,
|
|
122
|
+
* and CORS all agree — greenfield, no multi-tenant fan-out). INTERNAL URLs are
|
|
123
|
+
* supplied by `internalUrlFor` (cluster-DNS for k8s, container DNS for compose).
|
|
124
|
+
* The health/webhook/oauth/mcp APIs are internal only — their `publicUrl` is the
|
|
125
|
+
* internal URL (never publicly routed).
|
|
126
|
+
*/
|
|
127
|
+
function buildRemoteApplicationRuntimeEndpoints(input, internalUrlFor) {
|
|
128
|
+
const { publicDomain, serviceHosts } = input;
|
|
129
|
+
const pub = (serviceKey) => buildServicePublicUrl({ serviceKey, serviceHosts, publicDomain });
|
|
130
|
+
const internal = internalUrlFor;
|
|
131
|
+
// Map key = serviceName (consumer contract: lookupFrontendPublicUrl keys by
|
|
132
|
+
// serviceName); public host = serviceKey (serviceHosts key). Decoupled.
|
|
133
|
+
const frontendApplications = input.frontends.length > 0
|
|
134
|
+
? Object.fromEntries(input.frontends.map((f) => [
|
|
135
|
+
f.serviceName,
|
|
136
|
+
{ publicUrl: pub(f.serviceKey), internalUrl: internal(f.port) },
|
|
137
|
+
]))
|
|
138
|
+
: undefined;
|
|
139
|
+
const websiteFrontend = input.websiteServiceKey
|
|
140
|
+
? input.frontends.find((f) => f.serviceKey === input.websiteServiceKey)
|
|
141
|
+
: undefined;
|
|
142
|
+
const docsFrontend = input.technicalDocumentationServiceKey
|
|
143
|
+
? input.frontends.find((f) => f.serviceKey === input.technicalDocumentationServiceKey)
|
|
144
|
+
: undefined;
|
|
145
|
+
const { mainBackendApiServiceKey, mainBackendApiPort } = input;
|
|
146
|
+
return buildApplicationRuntimeEndpoints({
|
|
147
|
+
frontendApplications,
|
|
148
|
+
...(websiteFrontend
|
|
149
|
+
? { website: { publicUrl: pub(websiteFrontend.serviceKey), internalUrl: internal(websiteFrontend.port) } }
|
|
150
|
+
: {}),
|
|
151
|
+
...(docsFrontend
|
|
152
|
+
? {
|
|
153
|
+
technicalDocumentation: {
|
|
154
|
+
publicUrl: pub(docsFrontend.serviceKey),
|
|
155
|
+
internalUrl: internal(docsFrontend.port),
|
|
156
|
+
},
|
|
157
|
+
}
|
|
158
|
+
: {}),
|
|
159
|
+
...(mainBackendApiServiceKey !== undefined && mainBackendApiPort !== undefined
|
|
160
|
+
? {
|
|
161
|
+
mainBackendApi: {
|
|
162
|
+
publicUrl: pub(mainBackendApiServiceKey),
|
|
163
|
+
internalUrl: internal(mainBackendApiPort),
|
|
164
|
+
},
|
|
165
|
+
// Internal-only APIs — never publicly routed (publicUrl === internal).
|
|
166
|
+
healthCheckApi: { publicUrl: internal(mainBackendApiPort - 1), internalUrl: internal(mainBackendApiPort - 1) },
|
|
167
|
+
mainWebhookApi: { publicUrl: internal(mainBackendApiPort - 2), internalUrl: internal(mainBackendApiPort - 2) },
|
|
168
|
+
oauth2ProviderApi: { publicUrl: internal(mainBackendApiPort - 3), internalUrl: internal(mainBackendApiPort - 3) },
|
|
169
|
+
mcpApi: { publicUrl: internal(mainBackendApiPort - 4), internalUrl: internal(mainBackendApiPort - 4) },
|
|
170
|
+
}
|
|
171
|
+
: {}),
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Build K8s application runtime endpoints — the self-hosted, single-app,
|
|
176
|
+
* `serviceHosts`-driven counterpart to {@link buildLocalhostApplicationRuntimeEndpoints}.
|
|
177
|
+
* INTERNAL URLs are the app's own cluster-DNS Service on each port.
|
|
178
|
+
*/
|
|
179
|
+
export function buildK8sApplicationRuntimeEndpoints(input) {
|
|
180
|
+
return buildRemoteApplicationRuntimeEndpoints(input, (port) => buildK8sInternalUrl(input.appServiceName, port, input.namespace));
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Build Docker-Compose application runtime endpoints — the compose counterpart
|
|
184
|
+
* of {@link buildK8sApplicationRuntimeEndpoints}. PUBLIC URLs are IDENTICAL
|
|
185
|
+
* (serviceHosts-driven, so the Traefik ingress routes and `runtime.endPoints`
|
|
186
|
+
* agree — the CORS invariant holds for compose too). INTERNAL URLs are the app
|
|
187
|
+
* container's own name on the shared compose network (`http://<appServiceName>:<port>`),
|
|
188
|
+
* NOT localhost — the remote compose stack must not advertise localhost topology.
|
|
189
|
+
*/
|
|
190
|
+
export function buildComposeApplicationRuntimeEndpoints(input) {
|
|
191
|
+
return buildRemoteApplicationRuntimeEndpoints(input, (port) => `http://${input.appServiceName}:${port}`);
|
|
192
|
+
}
|
|
193
|
+
//# sourceMappingURL=runtime-topology.contracts.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-topology.contracts.js","sourceRoot":"","sources":["../../../src/bootstrap/runtime-topology.contracts.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gCAAgC,EAChC,6BAA6B,GAE9B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,mBAAmB,EACnB,iBAAiB,GACl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CAAC;SACxI;QACD,aAAa,EAAE;YACb,SAAS,EAAE,iBAAiB,CAAC,yBAAyB,EAAE,KAAK,CAAC,UAAU,CAAC;YACzE,WAAW,EAAE,mBAAmB,CAAC,yBAAyB,EAAE,sBAAsB,CAAC,cAAc,EAAE,KAAK,CAAC,SAAS,CAAC;SACpH;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
1
|
+
{"version":3,"file":"runtime-topology.contracts.js","sourceRoot":"","sources":["../../../../src/bootstrap/runtime-topology.contracts.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gCAAgC,EAChC,6BAA6B,GAE9B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,0DAA0D,CAAC;AAElG,OAAO,EACL,gCAAgC,EAChC,6BAA6B,EAC7B,2BAA2B,EAC3B,uBAAuB,EACvB,0BAA0B,EAC1B,+BAA+B,GAChC,MAAM,gCAAgC,CAAC;AAQxC,MAAM,UAAU,sCAAsC,CACpD,OAAe,WAAW;IAE1B,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAuB,EAAE,CAAC,CAAC;QACvD,SAAS,EAAE,UAAU,IAAI,IAAI,IAAI,EAAE;QACnC,WAAW,EAAE,UAAU,IAAI,IAAI,IAAI,EAAE;KACtC,CAAC,CAAC;IAEH,OAAO,6BAA6B,CAAC;QACnC,WAAW,EAAE,QAAQ,CAAC,sBAAsB,CAAC,YAAY,CAAC;QAC1D,sBAAsB,EAAE,QAAQ,CAAC,sBAAsB,CAAC,wBAAwB,CAAC;QACjF,cAAc,EAAE,QAAQ,CAAC,sBAAsB,CAAC,eAAe,CAAC;KACjE,CAAC,CAAC;AACL,CAAC;AAUD,MAAM,UAAU,yCAAyC,CACvD,KAAgD;IAEhD,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,IAAI,WAAW,C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CAAmC,CACjD,KAA0C;IAE1C,OAAO,sCAAsC,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE,CAC5D,mBAAmB,CAAC,KAAK,CAAC,cAAc,EAAE,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,CACjE,CAAC;AACJ,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,uCAAuC,CACrD,KAA8C;IAE9C,OAAO,sCAAsC,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,KAAK,CAAC,cAAc,IAAI,IAAI,EAAE,CAAC,CAAC;AAC3G,CAAC","sourcesContent":["import {\n buildApplicationRuntimeEndpoints,\n buildPlatformRuntimeEndpoints,\n type RuntimeEndpointUrls,\n} from '@wildo-ai/platform-core-shared';\nimport {\n buildK8sInternalUrl,\n buildK8sPublicUrl,\n buildServicePublicHost,\n buildServicePublicUrl,\n} from '../project-config/shared/k8s-utils';\nimport { PLATFORM_DEFAULT_PORTS } from '../project-config/shared/infrastructure-defaults.schemas';\n\nexport {\n buildApplicationRuntimeEndpoints,\n buildPlatformRuntimeEndpoints,\n parseRuntimeEndpointsRecord,\n PlatformApplicationType,\n PlatformRuntimeEndpointKey,\n serializeRuntimeEndpointsRecord,\n} from '@wildo-ai/platform-core-shared';\n\nexport type {\n ApplicationRuntimeEndpointsInput,\n PlatformRuntimeEndpointsInput,\n RuntimeEndpointUrls,\n} from '@wildo-ai/platform-core-shared';\n\nexport function buildLocalhostPlatformRuntimeEndpoints(\n host: string = 'localhost',\n): Record<string, RuntimeEndpointUrls> {\n const buildUrl = (port: number): RuntimeEndpointUrls => ({\n publicUrl: `http://${host}:${port}`,\n internalUrl: `http://${host}:${port}`,\n });\n\n return buildPlatformRuntimeEndpoints({\n appsManager: buildUrl(PLATFORM_DEFAULT_PORTS.APPS_MANAGER),\n crontabsBatchesManager: buildUrl(PLATFORM_DEFAULT_PORTS.CRONTABS_BATCHES_MANAGER),\n moduleRegistry: buildUrl(PLATFORM_DEFAULT_PORTS.MODULE_REGISTRY),\n });\n}\n\nexport interface LocalhostApplicationRuntimeEndpointsInput {\n mainBackendApiPort?: number | undefined;\n frontendApplicationPorts?: Record<string, number> | undefined;\n websitePort?: number | undefined;\n technicalDocumentationPort?: number | undefined;\n host?: string | undefined;\n}\n\nexport function buildLocalhostApplicationRuntimeEndpoints(\n input: LocalhostApplicationRuntimeEndpointsInput,\n): Record<string, RuntimeEndpointUrls> {\n const host = input.host ?? 'localhost';\n /**\n * Local endpoints are plain http, publicly and internally, and there is no knob.\n *\n * A configurable local scheme existed until 2026-08-14 and was removed: it applied ONE scheme to\n * EVERY endpoint's own port, which is only correct when a single ingress fronts them all. Local\n * Docker Compose has none, so declaring https made `main_backend_api.publicUrl` name a port that\n * held no certificate, and every browser session died on its WebSocket readiness poll.\n *\n * Remote is unaffected and always was: `buildServicePublicUrl` hardcodes `https://` because TLS\n * terminates at Traefik/nginx in front of one origin, where a single scheme IS true for every\n * endpoint. That is the only place the question has a well-defined answer, and it never consulted\n * this input.\n */\n const buildUrl = (port: number): RuntimeEndpointUrls => ({\n publicUrl: `http://${host}:${port}`,\n internalUrl: `http://${host}:${port}`,\n });\n\n return buildApplicationRuntimeEndpoints({\n frontendApplications: input.frontendApplicationPorts\n ? Object.fromEntries(\n Object.entries(input.frontendApplicationPorts).map(([frontendServiceName, port]) => [\n frontendServiceName,\n buildUrl(port),\n ]),\n )\n : undefined,\n ...(input.websitePort ? { website: buildUrl(input.websitePort) } : {}),\n ...(input.technicalDocumentationPort\n ? { technicalDocumentation: buildUrl(input.technicalDocumentationPort) }\n : {}),\n ...(input.mainBackendApiPort\n ? {\n mainBackendApi: buildUrl(input.mainBackendApiPort),\n healthCheckApi: buildUrl(input.mainBackendApiPort - 1),\n mainWebhookApi: buildUrl(input.mainBackendApiPort - 2),\n oauth2ProviderApi: buildUrl(input.mainBackendApiPort - 3),\n mcpApi: buildUrl(input.mainBackendApiPort - 4),\n }\n : {}),\n });\n}\n\nexport function buildK8sPlatformRuntimeEndpoints(input: {\n publicDomain: string;\n namespace: string;\n}): Record<string, RuntimeEndpointUrls> {\n return buildPlatformRuntimeEndpoints({\n appsManager: {\n publicUrl: buildK8sPublicUrl('platform-apps-manager', input.publicDomain),\n internalUrl: buildK8sInternalUrl('platform-apps-manager', PLATFORM_DEFAULT_PORTS.APPS_MANAGER, input.namespace),\n },\n crontabsBatchesManager: {\n publicUrl: buildK8sPublicUrl('platform-crontabs-batches-manager', input.publicDomain),\n internalUrl: buildK8sInternalUrl('platform-crontabs-batches-manager', PLATFORM_DEFAULT_PORTS.CRONTABS_BATCHES_MANAGER, input.namespace),\n },\n moduleRegistry: {\n publicUrl: buildK8sPublicUrl('platform-module-registry', input.publicDomain),\n internalUrl: buildK8sInternalUrl('platform-module-registry', PLATFORM_DEFAULT_PORTS.MODULE_REGISTRY, input.namespace),\n },\n });\n}\n\nexport interface K8sIngressRoute {\n /** Public hostname Traefik/ingress routes on (from the serviceHosts resolver). */\n host: string;\n /**\n * Per-service k8s Service NAME this host routes to. In the per-service deploy\n * model each service is its OWN Deployment+Service, so the route target is the\n * service's `serviceName` (e.g. `wonder-todos-backend-api`, `wonder-todos-app`)\n * — NOT one shared app Service. This is the value stamped into the ingress\n * rule's `backend.service.name`.\n */\n serviceName: string;\n /** Port on that per-service Service to route this host to. */\n port: number;\n}\n\n/**\n * One public frontend in the app's service topology. `serviceName` and\n * `serviceKey` are DECOUPLED on purpose:\n * - `serviceName` — the `runtime.endPoints` map key (the consumer contract:\n * `lookupFrontendPublicUrl` / X-Frontend-Service-Name key by serviceName).\n * - `serviceKey` — the `config.services.<key>`, which is the serviceHosts\n * authoring key. The public HOST resolves from THIS, never from serviceName.\n * Conflating them silently ignores authored `serviceHosts` (the serviceName\n * `wonder-todos-app` misses the authored `app` entry).\n */\nexport interface ApplicationPublicFrontend {\n serviceName: string;\n serviceKey: string;\n port: number;\n}\n\nexport interface K8sApplicationIngressRoutesInput {\n publicDomain: string;\n serviceHosts: Record<string, string> | undefined;\n /** Public frontends. Host resolves from `serviceKey` (config key); route target is the frontend's own `serviceName`. */\n frontends: ReadonlyArray<ApplicationPublicFrontend>;\n /** Backend API `config.services.<key>` (host resolution key). */\n mainBackendApiServiceKey?: string | undefined;\n /** Backend API per-service k8s Service name (the ingress route target). */\n mainBackendApiServiceName?: string | undefined;\n /** Backend API Service port. */\n mainBackendApiPort?: number | undefined;\n}\n\n/**\n * Ingress routes for the app's PUBLIC services (every frontend + the main\n * backend API), serviceHosts-driven. Every host resolves from the service's\n * `config.services.<key>` (`serviceKey`) — so GIVEN THE SAME frontends/keys,\n * the routes match the `runtime.endPoints.publicUrl` that\n * {@link buildK8sApplicationRuntimeEndpoints} produces (both key public hosts on\n * `serviceKey`). Coherence is a property of feeding both the SAME `serviceKey`s,\n * not automatic — see the divergence guards in the domain plan. The internal-only\n * APIs (health/webhook/oauth/mcp) are deliberately NOT routed publicly.\n */\nexport function buildK8sApplicationIngressRoutes(\n input: K8sApplicationIngressRoutesInput,\n): K8sIngressRoute[] {\n const host = (serviceKey: string): string =>\n buildServicePublicHost({ serviceKey, serviceHosts: input.serviceHosts, publicDomain: input.publicDomain });\n\n const entries: Array<{ serviceKey: string; serviceName: string; host: string; port: number }> =\n input.frontends.map((f) => ({\n serviceKey: f.serviceKey,\n serviceName: f.serviceName,\n host: host(f.serviceKey),\n port: f.port,\n }));\n if (\n input.mainBackendApiServiceKey !== undefined &&\n input.mainBackendApiServiceName !== undefined &&\n input.mainBackendApiPort !== undefined\n ) {\n entries.push({\n serviceKey: input.mainBackendApiServiceKey,\n serviceName: input.mainBackendApiServiceName,\n host: host(input.mainBackendApiServiceKey),\n port: input.mainBackendApiPort,\n });\n }\n\n // Fail-closed host-uniqueness guard: each public host routes entirely to ONE\n // service:port (no path-based sharing), so two distinct services resolving to\n // the same host — e.g. both authored to the apex (`''`), or an unauthored key\n // that collides with an authored subdomain — is an ambiguous, silently-broken\n // ingress. Reject it at build time with the colliding keys named, rather than\n // emitting a manifest whose routing is undefined.\n const claimedBy = new Map<string, string>();\n for (const entry of entries) {\n const existing = claimedBy.get(entry.host);\n if (existing !== undefined && existing !== entry.serviceKey) {\n throw new Error(\n `serviceHosts collision: services '${existing}' and '${entry.serviceKey}' both resolve to public host '${entry.host}'. ` +\n `Each service needs a distinct 'serviceHosts' subdomain (only one service may map to the apex '').`,\n );\n }\n claimedBy.set(entry.host, entry.serviceKey);\n }\n\n return entries.map(({ host: h, serviceName, port }) => ({ host: h, serviceName, port }));\n}\n\n/**\n * Fields shared by every REMOTE runtime-endpoints builder (k8s + compose). The\n * PUBLIC side (serviceHosts resolution) is runtime-agnostic; only the INTERNAL\n * URL form differs, injected via the `internalUrlFor` callback of the core\n * builder ({@link buildRemoteApplicationRuntimeEndpoints}).\n */\nexport interface RemoteApplicationRuntimeEndpointsCommon {\n /** Operator's public domain (`WildoInfraEnvConfig.publicDomain`). */\n publicDomain: string;\n /** Authored per-service subdomain map (`wildo.infra.<env>.config.ts`). */\n serviceHosts: Record<string, string> | undefined;\n /**\n * Public frontends. The `runtime.endPoints` map is keyed by each frontend's\n * `serviceName` (consumer contract); the public HOST resolves from its\n * `serviceKey` (config key / serviceHosts key). See {@link ApplicationPublicFrontend}.\n */\n frontends: ReadonlyArray<ApplicationPublicFrontend>;\n /** `serviceKey` of the STATIC_WEBSITE frontend (feeds the fixed website endpoint). */\n websiteServiceKey?: string | undefined;\n /** `serviceKey` of the TECH_DOC frontend (feeds the fixed technical-documentation endpoint). */\n technicalDocumentationServiceKey?: string | undefined;\n /** Backend API `config.services.<key>` (host resolution key). */\n mainBackendApiServiceKey?: string | undefined;\n /** Backend API container port (internal URL + the -1..-4 sibling API ports). */\n mainBackendApiPort?: number | undefined;\n}\n\nexport interface K8sApplicationRuntimeEndpointsInput extends RemoteApplicationRuntimeEndpointsCommon {\n /** K8s namespace for cluster-internal service DNS. */\n namespace: string;\n /**\n * K8s Service name for cluster-internal URLs. Single Service per app (all\n * frontends + APIs ride it on different ports), so this is the app's own\n * service name (= its slug).\n */\n appServiceName: string;\n}\n\nexport interface ComposeApplicationRuntimeEndpointsInput extends RemoteApplicationRuntimeEndpointsCommon {\n /**\n * Compose service (container) name for internal URLs. Single container per\n * app serving all frontends + APIs on their ports, reachable by other\n * containers on the shared network as `http://<appServiceName>:<port>`.\n */\n appServiceName: string;\n}\n\n/**\n * Core REMOTE application runtime-endpoints assembly, shared by the k8s and\n * compose builders so their public-URL semantics never drift. PUBLIC URLs come\n * from {@link buildServicePublicUrl} (so ingress hosts, `runtime.endPoints.publicUrl`,\n * and CORS all agree — greenfield, no multi-tenant fan-out). INTERNAL URLs are\n * supplied by `internalUrlFor` (cluster-DNS for k8s, container DNS for compose).\n * The health/webhook/oauth/mcp APIs are internal only — their `publicUrl` is the\n * internal URL (never publicly routed).\n */\nfunction buildRemoteApplicationRuntimeEndpoints(\n input: RemoteApplicationRuntimeEndpointsCommon,\n internalUrlFor: (port: number) => string,\n): Record<string, RuntimeEndpointUrls> {\n const { publicDomain, serviceHosts } = input;\n const pub = (serviceKey: string): string =>\n buildServicePublicUrl({ serviceKey, serviceHosts, publicDomain });\n const internal = internalUrlFor;\n\n // Map key = serviceName (consumer contract: lookupFrontendPublicUrl keys by\n // serviceName); public host = serviceKey (serviceHosts key). Decoupled.\n const frontendApplications = input.frontends.length > 0\n ? Object.fromEntries(\n input.frontends.map((f) => [\n f.serviceName,\n { publicUrl: pub(f.serviceKey), internalUrl: internal(f.port) },\n ]),\n )\n : undefined;\n\n const websiteFrontend = input.websiteServiceKey\n ? input.frontends.find((f) => f.serviceKey === input.websiteServiceKey)\n : undefined;\n const docsFrontend = input.technicalDocumentationServiceKey\n ? input.frontends.find((f) => f.serviceKey === input.technicalDocumentationServiceKey)\n : undefined;\n const { mainBackendApiServiceKey, mainBackendApiPort } = input;\n\n return buildApplicationRuntimeEndpoints({\n frontendApplications,\n ...(websiteFrontend\n ? { website: { publicUrl: pub(websiteFrontend.serviceKey), internalUrl: internal(websiteFrontend.port) } }\n : {}),\n ...(docsFrontend\n ? {\n technicalDocumentation: {\n publicUrl: pub(docsFrontend.serviceKey),\n internalUrl: internal(docsFrontend.port),\n },\n }\n : {}),\n ...(mainBackendApiServiceKey !== undefined && mainBackendApiPort !== undefined\n ? {\n mainBackendApi: {\n publicUrl: pub(mainBackendApiServiceKey),\n internalUrl: internal(mainBackendApiPort),\n },\n // Internal-only APIs — never publicly routed (publicUrl === internal).\n healthCheckApi: { publicUrl: internal(mainBackendApiPort - 1), internalUrl: internal(mainBackendApiPort - 1) },\n mainWebhookApi: { publicUrl: internal(mainBackendApiPort - 2), internalUrl: internal(mainBackendApiPort - 2) },\n oauth2ProviderApi: { publicUrl: internal(mainBackendApiPort - 3), internalUrl: internal(mainBackendApiPort - 3) },\n mcpApi: { publicUrl: internal(mainBackendApiPort - 4), internalUrl: internal(mainBackendApiPort - 4) },\n }\n : {}),\n });\n}\n\n/**\n * Build K8s application runtime endpoints — the self-hosted, single-app,\n * `serviceHosts`-driven counterpart to {@link buildLocalhostApplicationRuntimeEndpoints}.\n * INTERNAL URLs are the app's own cluster-DNS Service on each port.\n */\nexport function buildK8sApplicationRuntimeEndpoints(\n input: K8sApplicationRuntimeEndpointsInput,\n): Record<string, RuntimeEndpointUrls> {\n return buildRemoteApplicationRuntimeEndpoints(input, (port) =>\n buildK8sInternalUrl(input.appServiceName, port, input.namespace),\n );\n}\n\n/**\n * Build Docker-Compose application runtime endpoints — the compose counterpart\n * of {@link buildK8sApplicationRuntimeEndpoints}. PUBLIC URLs are IDENTICAL\n * (serviceHosts-driven, so the Traefik ingress routes and `runtime.endPoints`\n * agree — the CORS invariant holds for compose too). INTERNAL URLs are the app\n * container's own name on the shared compose network (`http://<appServiceName>:<port>`),\n * NOT localhost — the remote compose stack must not advertise localhost topology.\n */\nexport function buildComposeApplicationRuntimeEndpoints(\n input: ComposeApplicationRuntimeEndpointsInput,\n): Record<string, RuntimeEndpointUrls> {\n return buildRemoteApplicationRuntimeEndpoints(input, (port) => `http://${input.appServiceName}:${port}`);\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-authoring.entry.d.ts","sourceRoot":"","sources":["../../../src/config-authoring.entry.ts"],"names":[],"mappings":"AAIA,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-authoring.entry.js","sourceRoot":"","sources":["../../../src/config-authoring.entry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,iBAAiB,EAAE,CAAC;AAEpB,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC","sourcesContent":["import { initZodDecorators } from '@wildo-ai/zod-decorators';\n\ninitZodDecorators();\n\nexport * from './project-config';\nexport * from './workspace-scope';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credential-generator.service.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"credential-generator.service.d.ts","sourceRoot":"","sources":["../../../../src/credentials/credential-generator.service.ts"],"names":[],"mappings":"AAMA,qBAAa,mBAAmB;IAE9B,MAAM,CAAC,iBAAiB,IAAI;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE;IASrE,MAAM,CAAC,gBAAgB,CAAC,MAAM,GAAE,MAAW,GAAG,MAAM;IAIpD,MAAM,CAAC,cAAc,CAAC,MAAM,GAAE,MAAW,GAAG,MAAM;IAIlD,MAAM,CAAC,oBAAoB,IAAI,MAAM;IAIrC,MAAM,CAAC,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM;CASpE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credential-generator.service.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"credential-generator.service.js","sourceRoot":"","sources":["../../../../src/credentials/cred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C,KAAK,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;QAC/C,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;CAEF","sourcesContent":["import { generateKeyPairSync, randomBytes } from 'crypto';\n\nconst ALPHANUMERIC = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\nconst PASSWORD_CHARS = ALPHANUMERIC + '_+-';\n\n\nexport class CredentialGenerator {\n\n static generateECKeyPair(): { privateKey: string; publicKey: string } {\n const { publicKey, privateKey } = generateKeyPairSync('ec', {\n namedCurve: 'prime256v1',\n publicKeyEncoding: { type: 'spki', format: 'pem' },\n privateKeyEncoding: { type: 'sec1', format: 'pem' },\n });\n return { privateKey: privateKey.trim(), publicKey: publicKey.trim() };\n }\n\n static generatePassword(length: number = 24): string {\n return this.generateFromCharset(length, PASSWORD_CHARS);\n }\n\n static generateSecret(length: number = 48): string {\n return this.generateFromCharset(length, ALPHANUMERIC);\n }\n\n static generateErlangCookie(): string {\n return this.generateFromCharset(32, ALPHANUMERIC);\n }\n\n static generateFromCharset(length: number, charset: string): string {\n const bytes = randomBytes(length);\n let result = '';\n for (let i = 0; i < length; i++) {\n result += charset[bytes[i] % charset.length];\n }\n return result;\n }\n\n}\n"]}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,16 +1,31 @@
|
|
|
1
|
-
export * from './project-config
|
|
2
|
-
export * from './workspace-scope
|
|
3
|
-
export * from './credentials/credential-generator.service
|
|
4
|
-
export * from './schemas/platform-application-config.schemas
|
|
5
|
-
export * from './schemas/platform-application-secrets.schemas
|
|
6
|
-
export * from './schemas/platform-config.schemas
|
|
7
|
-
export * from './schemas/framework-info.schemas
|
|
8
|
-
export * from './schemas/framework-secrets.schemas
|
|
9
|
-
export * from './release/framework-release.constants
|
|
10
|
-
export * from './bootstrap/bootstrap.schemas
|
|
11
|
-
export * from './bootstrap/bootstrap.contracts
|
|
12
|
-
export * from './bootstrap/bootstrap-planner
|
|
13
|
-
export * from './bootstrap/application-backend-env.contracts
|
|
14
|
-
export * from './bootstrap/
|
|
15
|
-
export * from './bootstrap/runtime-
|
|
1
|
+
export * from './project-config';
|
|
2
|
+
export * from './workspace-scope';
|
|
3
|
+
export * from './credentials/credential-generator.service';
|
|
4
|
+
export * from './schemas/platform-application-config.schemas';
|
|
5
|
+
export * from './schemas/platform-application-secrets.schemas';
|
|
6
|
+
export * from './schemas/platform-config.schemas';
|
|
7
|
+
export * from './schemas/framework-info.schemas';
|
|
8
|
+
export * from './schemas/framework-secrets.schemas';
|
|
9
|
+
export * from './release/framework-release.constants';
|
|
10
|
+
export * from './bootstrap/bootstrap.schemas';
|
|
11
|
+
export * from './bootstrap/bootstrap.contracts';
|
|
12
|
+
export * from './bootstrap/bootstrap-planner';
|
|
13
|
+
export * from './bootstrap/application-backend-env.contracts';
|
|
14
|
+
export * from './bootstrap/application-creation-verification-env.contracts';
|
|
15
|
+
export * from './bootstrap/platform-runtime-env.contracts';
|
|
16
|
+
export * from './bootstrap/runtime-topology.contracts';
|
|
17
|
+
export * from './bootstrap/runtime-principal.contracts';
|
|
18
|
+
export * from './bootstrap/runtime-backing-service-access';
|
|
19
|
+
export * from './bootstrap/runtime-network-topology';
|
|
20
|
+
export * from './bootstrap/runtime-network-policy';
|
|
21
|
+
export * from './bootstrap/runtime-platform-access';
|
|
22
|
+
export * from './project-config/minion-local-provider-registration';
|
|
23
|
+
export * from './project-config/shared/minion-resource-access.validation';
|
|
24
|
+
export * from './project-config/shared/object-storage-session-policy';
|
|
25
|
+
export * from './lockfile/wildo-saas-lock.shared.schemas';
|
|
26
|
+
export * from './lockfile/lockfile-io';
|
|
27
|
+
export * from './lockfile/materialize-infra-section';
|
|
28
|
+
export * from './lockfile/canonical-json';
|
|
29
|
+
export * from './registry';
|
|
30
|
+
export * from './_unimplemented';
|
|
16
31
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,4CAA4C,CAAC;AAE3D,cAAc,+CAA+C,CAAC;AAC9D,cAAc,gDAAgD,CAAC;AAC/D,cAAc,mCAAmC,CAAC;AAClD,cAAc,kCAAkC,CAAC;AACjD,cAAc,qCAAqC,CAAC;AACpD,cAAc,uCAAuC,CAAC;AACtD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+CAA+C,CAAC;AAC9D,cAAc,6DAA6D,CAAC;AAC5E,cAAc,4CAA4C,CAAC;AAC3D,cAAc,wCAAwC,CAAC;AACvD,cAAc,yCAAyC,CAAC;AACxD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,sCAAsC,CAAC;AACrD,cAAc,oCAAoC,CAAC;AACnD,cAAc,qCAAqC,CAAC;AACpD,cAAc,qDAAqD,CAAC;AACpE,cAAc,2DAA2D,CAAC;AAC1E,cAAc,uDAAuD,CAAC;AACtE,cAAc,2CAA2C,CAAC;AAC1D,cAAc,wBAAwB,CAAC;AACvC,cAAc,sCAAsC,CAAC;AACrD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC"}
|
package/dist/esm/index.js
CHANGED
|
@@ -11,6 +11,21 @@ export * from './bootstrap/bootstrap.schemas.js';
|
|
|
11
11
|
export * from './bootstrap/bootstrap.contracts.js';
|
|
12
12
|
export * from './bootstrap/bootstrap-planner.js';
|
|
13
13
|
export * from './bootstrap/application-backend-env.contracts.js';
|
|
14
|
+
export * from './bootstrap/application-creation-verification-env.contracts.js';
|
|
14
15
|
export * from './bootstrap/platform-runtime-env.contracts.js';
|
|
15
16
|
export * from './bootstrap/runtime-topology.contracts.js';
|
|
16
|
-
|
|
17
|
+
export * from './bootstrap/runtime-principal.contracts.js';
|
|
18
|
+
export * from './bootstrap/runtime-backing-service-access.js';
|
|
19
|
+
export * from './bootstrap/runtime-network-topology.js';
|
|
20
|
+
export * from './bootstrap/runtime-network-policy.js';
|
|
21
|
+
export * from './bootstrap/runtime-platform-access.js';
|
|
22
|
+
export * from './project-config/minion-local-provider-registration.js';
|
|
23
|
+
export * from './project-config/shared/minion-resource-access.validation.js';
|
|
24
|
+
export * from './project-config/shared/object-storage-session-policy.js';
|
|
25
|
+
export * from './lockfile/wildo-saas-lock.shared.schemas.js';
|
|
26
|
+
export * from './lockfile/lockfile-io.js';
|
|
27
|
+
export * from './lockfile/materialize-infra-section.js';
|
|
28
|
+
export * from './lockfile/canonical-json.js';
|
|
29
|
+
export * from './registry/index.js';
|
|
30
|
+
export * from './_unimplemented/index.js';
|
|
31
|
+
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,4CAA4C,CAAC;AAE3D,cAAc,+CAA+C,CAAC;AAC9D,cAAc,gDAAgD,CAAC;AAC/D,cAAc,mCAAmC,CAAC;AAClD,cAAc,kCAAkC,CAAC;AACjD,cAAc,qCAAqC,CAAC;AACpD,cAAc,uCAAuC,CAAC;AACtD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+CAA+C,CAAC;AAC9D,cAAc,6DAA6D,CAAC;AAC5E,cAAc,4CAA4C,CAAC;AAC3D,cAAc,wCAAwC,CAAC;AACvD,cAAc,yCAAyC,CAAC;AACxD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,sCAAsC,CAAC;AACrD,cAAc,oCAAoC,CAAC;AACnD,cAAc,qCAAqC,CAAC;AACpD,cAAc,qDAAqD,CAAC;AACpE,cAAc,2DAA2D,CAAC;AAC1E,cAAc,uDAAuD,CAAC;AACtE,cAAc,2CAA2C,CAAC;AAC1D,cAAc,wBAAwB,CAAC;AACvC,cAAc,sCAAsC,CAAC;AACrD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC","sourcesContent":["export * from './project-config';\nexport * from './workspace-scope';\nexport * from './credentials/credential-generator.service';\n\nexport * from './schemas/platform-application-config.schemas';\nexport * from './schemas/platform-application-secrets.schemas';\nexport * from './schemas/platform-config.schemas';\nexport * from './schemas/framework-info.schemas';\nexport * from './schemas/framework-secrets.schemas';\nexport * from './release/framework-release.constants';\nexport * from './bootstrap/bootstrap.schemas';\nexport * from './bootstrap/bootstrap.contracts';\nexport * from './bootstrap/bootstrap-planner';\nexport * from './bootstrap/application-backend-env.contracts';\nexport * from './bootstrap/application-creation-verification-env.contracts';\nexport * from './bootstrap/platform-runtime-env.contracts';\nexport * from './bootstrap/runtime-topology.contracts';\nexport * from './bootstrap/runtime-principal.contracts';\nexport * from './bootstrap/runtime-backing-service-access';\nexport * from './bootstrap/runtime-network-topology';\nexport * from './bootstrap/runtime-network-policy';\nexport * from './bootstrap/runtime-platform-access';\nexport * from './project-config/minion-local-provider-registration';\nexport * from './project-config/shared/minion-resource-access.validation';\nexport * from './project-config/shared/object-storage-session-policy';\nexport * from './lockfile/wildo-saas-lock.shared.schemas';\nexport * from './lockfile/lockfile-io';\nexport * from './lockfile/materialize-infra-section';\nexport * from './lockfile/canonical-json';\nexport * from './registry';\nexport * from './_unimplemented';\n"]}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canonical JSON serialization helpers shared by lockfile writers and
|
|
3
|
+
* lockfile readers (Slice 4.A.1 / H2 of `infra-provider-planner.md`).
|
|
4
|
+
*
|
|
5
|
+
* `JSON.stringify`'s built-in second argument can either filter+order
|
|
6
|
+
* top-level keys (when given an array) or transform values (when given
|
|
7
|
+
* a function). To get a *recursive* canonical serialization — the
|
|
8
|
+
* SAME byte output for two semantically equal inputs regardless of
|
|
9
|
+
* property-insertion order at any nesting level — we need a transform
|
|
10
|
+
* that returns a new object with sorted keys at every layer.
|
|
11
|
+
*
|
|
12
|
+
* The legacy in-line implementation in `materialize-infra-section.ts`
|
|
13
|
+
* sorted only top-level keys. That meant nested objects (e.g.
|
|
14
|
+
* `MongoBackingService.options: {retryWrites, w, authSource}`) drifted
|
|
15
|
+
* across editor saves that re-ordered the nested keys, falsely
|
|
16
|
+
* triggering lockfile-drift CI failures.
|
|
17
|
+
*
|
|
18
|
+
* This helper is the canonical fix.
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
21
|
+
* `JSON.stringify` with sorted keys at every nesting level. Stable
|
|
22
|
+
* across platforms, editor save formats, and Node versions.
|
|
23
|
+
*
|
|
24
|
+
* Special-cases:
|
|
25
|
+
* - Arrays preserve order (semantic — array order is meaningful).
|
|
26
|
+
* - Objects sort their own keys (lexicographic).
|
|
27
|
+
* - Primitives pass through.
|
|
28
|
+
* - `undefined` values are dropped (matches `JSON.stringify` default).
|
|
29
|
+
*/
|
|
30
|
+
export declare function stableJsonStringify(value: unknown): string;
|
|
31
|
+
/**
|
|
32
|
+
* Stable sha256 digest of any JSON-serializable value. Output format:
|
|
33
|
+
* `sha256:<hex>` (matches the digest convention used elsewhere in the
|
|
34
|
+
* lockfile envelope, e.g. provider-runtime artifacts).
|
|
35
|
+
*
|
|
36
|
+
* Two inputs with the same canonical serialization (per
|
|
37
|
+
* `stableJsonStringify`) produce the same digest regardless of
|
|
38
|
+
* property-insertion order at any nesting level.
|
|
39
|
+
*/
|
|
40
|
+
export declare function stableSha256Digest(value: unknown): string;
|
|
41
|
+
//# sourceMappingURL=canonical-json.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"canonical-json.d.ts","sourceRoot":"","sources":["../../../../src/lockfile/canonical-json.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAW1D;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAGzD"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canonical JSON serialization helpers shared by lockfile writers and
|
|
3
|
+
* lockfile readers (Slice 4.A.1 / H2 of `infra-provider-planner.md`).
|
|
4
|
+
*
|
|
5
|
+
* `JSON.stringify`'s built-in second argument can either filter+order
|
|
6
|
+
* top-level keys (when given an array) or transform values (when given
|
|
7
|
+
* a function). To get a *recursive* canonical serialization — the
|
|
8
|
+
* SAME byte output for two semantically equal inputs regardless of
|
|
9
|
+
* property-insertion order at any nesting level — we need a transform
|
|
10
|
+
* that returns a new object with sorted keys at every layer.
|
|
11
|
+
*
|
|
12
|
+
* The legacy in-line implementation in `materialize-infra-section.ts`
|
|
13
|
+
* sorted only top-level keys. That meant nested objects (e.g.
|
|
14
|
+
* `MongoBackingService.options: {retryWrites, w, authSource}`) drifted
|
|
15
|
+
* across editor saves that re-ordered the nested keys, falsely
|
|
16
|
+
* triggering lockfile-drift CI failures.
|
|
17
|
+
*
|
|
18
|
+
* This helper is the canonical fix.
|
|
19
|
+
*/
|
|
20
|
+
import { createHash } from 'node:crypto';
|
|
21
|
+
/**
|
|
22
|
+
* `JSON.stringify` with sorted keys at every nesting level. Stable
|
|
23
|
+
* across platforms, editor save formats, and Node versions.
|
|
24
|
+
*
|
|
25
|
+
* Special-cases:
|
|
26
|
+
* - Arrays preserve order (semantic — array order is meaningful).
|
|
27
|
+
* - Objects sort their own keys (lexicographic).
|
|
28
|
+
* - Primitives pass through.
|
|
29
|
+
* - `undefined` values are dropped (matches `JSON.stringify` default).
|
|
30
|
+
*/
|
|
31
|
+
export function stableJsonStringify(value) {
|
|
32
|
+
return JSON.stringify(value, (_key, v) => {
|
|
33
|
+
if (v && typeof v === 'object' && !Array.isArray(v)) {
|
|
34
|
+
const sorted = {};
|
|
35
|
+
for (const k of Object.keys(v).sort()) {
|
|
36
|
+
sorted[k] = v[k];
|
|
37
|
+
}
|
|
38
|
+
return sorted;
|
|
39
|
+
}
|
|
40
|
+
return v;
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Stable sha256 digest of any JSON-serializable value. Output format:
|
|
45
|
+
* `sha256:<hex>` (matches the digest convention used elsewhere in the
|
|
46
|
+
* lockfile envelope, e.g. provider-runtime artifacts).
|
|
47
|
+
*
|
|
48
|
+
* Two inputs with the same canonical serialization (per
|
|
49
|
+
* `stableJsonStringify`) produce the same digest regardless of
|
|
50
|
+
* property-insertion order at any nesting level.
|
|
51
|
+
*/
|
|
52
|
+
export function stableSha256Digest(value) {
|
|
53
|
+
const canonical = stableJsonStringify(value);
|
|
54
|
+
return `sha256:${createHash('sha256').update(canonical).digest('hex')}`;
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=canonical-json.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"canonical-json.js","sourceRoot":"","sources":["../../../../src/lockfile/canonical-json.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC;;;;;;;;;GASG;AACH,MAAM,UAAU,mBAAmB,CAAC,KAAc;IAChD,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE;QACvC,IAAI,CAAC,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;YACpD,MAAM,MAAM,GAA4B,EAAE,CAAC;YAC3C,KAAK,MAAM,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;gBACtC,MAAM,CAAC,CAAC,CAAC,GAAI,CAA6B,CAAC,CAAC,CAAC,CAAC;YAChD,CAAC;YACD,OAAO,MAAM,CAAC;QAChB,CAAC;QACD,OAAO,CAAC,CAAC;IACX,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAAc;IAC/C,MAAM,SAAS,GAAG,mBAAmB,CAAC,KAAK,CAAC,CAAC;IAC7C,OAAO,UAAU,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;AAC1E,CAAC","sourcesContent":["/**\n * Canonical JSON serialization helpers shared by lockfile writers and\n * lockfile readers (Slice 4.A.1 / H2 of `infra-provider-planner.md`).\n *\n * `JSON.stringify`'s built-in second argument can either filter+order\n * top-level keys (when given an array) or transform values (when given\n * a function). To get a *recursive* canonical serialization — the\n * SAME byte output for two semantically equal inputs regardless of\n * property-insertion order at any nesting level — we need a transform\n * that returns a new object with sorted keys at every layer.\n *\n * The legacy in-line implementation in `materialize-infra-section.ts`\n * sorted only top-level keys. That meant nested objects (e.g.\n * `MongoBackingService.options: {retryWrites, w, authSource}`) drifted\n * across editor saves that re-ordered the nested keys, falsely\n * triggering lockfile-drift CI failures.\n *\n * This helper is the canonical fix.\n */\n\nimport { createHash } from 'node:crypto';\n\n/**\n * `JSON.stringify` with sorted keys at every nesting level. Stable\n * across platforms, editor save formats, and Node versions.\n *\n * Special-cases:\n * - Arrays preserve order (semantic — array order is meaningful).\n * - Objects sort their own keys (lexicographic).\n * - Primitives pass through.\n * - `undefined` values are dropped (matches `JSON.stringify` default).\n */\nexport function stableJsonStringify(value: unknown): string {\n return JSON.stringify(value, (_key, v) => {\n if (v && typeof v === 'object' && !Array.isArray(v)) {\n const sorted: Record<string, unknown> = {};\n for (const k of Object.keys(v).sort()) {\n sorted[k] = (v as Record<string, unknown>)[k];\n }\n return sorted;\n }\n return v;\n });\n}\n\n/**\n * Stable sha256 digest of any JSON-serializable value. Output format:\n * `sha256:<hex>` (matches the digest convention used elsewhere in the\n * lockfile envelope, e.g. provider-runtime artifacts).\n *\n * Two inputs with the same canonical serialization (per\n * `stableJsonStringify`) produce the same digest regardless of\n * property-insertion order at any nesting level.\n */\nexport function stableSha256Digest(value: unknown): string {\n const canonical = stableJsonStringify(value);\n return `sha256:${createHash('sha256').update(canonical).digest('hex')}`;\n}\n"]}
|