@wildo-ai/platform-config-lib 1.1.11 → 1.1.12
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/dist/esm/_unimplemented/soft-warn.d.ts +24 -49
- package/dist/esm/_unimplemented/soft-warn.d.ts.map +1 -1
- package/dist/esm/_unimplemented/soft-warn.js +24 -49
- package/dist/esm/_unimplemented/soft-warn.js.map +1 -1
- package/dist/esm/blueprint/anchored-region.d.ts.map +1 -1
- package/dist/esm/blueprint/anchored-region.js.map +1 -1
- package/dist/esm/blueprint/blueprint.schemas.d.ts +0 -89
- package/dist/esm/blueprint/blueprint.schemas.d.ts.map +1 -1
- package/dist/esm/blueprint/blueprint.schemas.js.map +1 -1
- package/dist/esm/bootstrap/application-backend-env.contracts.d.ts.map +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.map +1 -1
- package/dist/esm/bootstrap/application-creation-verification-env.contracts.js.map +1 -1
- package/dist/esm/bootstrap/bootstrap-planner.d.ts.map +1 -1
- package/dist/esm/bootstrap/bootstrap-planner.js.map +1 -1
- package/dist/esm/bootstrap/bootstrap.contracts.d.ts.map +1 -1
- package/dist/esm/bootstrap/bootstrap.contracts.js.map +1 -1
- package/dist/esm/bootstrap/bootstrap.schemas.d.ts +8 -1
- package/dist/esm/bootstrap/bootstrap.schemas.d.ts.map +1 -1
- package/dist/esm/bootstrap/bootstrap.schemas.js +15 -1
- package/dist/esm/bootstrap/bootstrap.schemas.js.map +1 -1
- package/dist/esm/bootstrap/platform-runtime-env.contracts.d.ts +10 -2
- package/dist/esm/bootstrap/platform-runtime-env.contracts.d.ts.map +1 -1
- package/dist/esm/bootstrap/platform-runtime-env.contracts.js +10 -2
- package/dist/esm/bootstrap/platform-runtime-env.contracts.js.map +1 -1
- package/dist/esm/bootstrap/platform-store-preconnect.d.ts +21 -0
- package/dist/esm/bootstrap/platform-store-preconnect.d.ts.map +1 -1
- package/dist/esm/bootstrap/platform-store-preconnect.js +25 -0
- package/dist/esm/bootstrap/platform-store-preconnect.js.map +1 -1
- package/dist/esm/bootstrap/postgresql-owed-grants.contracts.d.ts +80 -0
- package/dist/esm/bootstrap/postgresql-owed-grants.contracts.d.ts.map +1 -0
- package/dist/esm/bootstrap/postgresql-owed-grants.contracts.js +81 -0
- package/dist/esm/bootstrap/postgresql-owed-grants.contracts.js.map +1 -0
- package/dist/esm/bootstrap/runtime-backing-service-access.d.ts +41 -9
- package/dist/esm/bootstrap/runtime-backing-service-access.d.ts.map +1 -1
- package/dist/esm/bootstrap/runtime-backing-service-access.js +77 -28
- package/dist/esm/bootstrap/runtime-backing-service-access.js.map +1 -1
- package/dist/esm/bootstrap/runtime-network-policy.d.ts +117 -12
- package/dist/esm/bootstrap/runtime-network-policy.d.ts.map +1 -1
- package/dist/esm/bootstrap/runtime-network-policy.js +222 -23
- package/dist/esm/bootstrap/runtime-network-policy.js.map +1 -1
- package/dist/esm/bootstrap/runtime-network-topology.d.ts +31 -4
- package/dist/esm/bootstrap/runtime-network-topology.d.ts.map +1 -1
- package/dist/esm/bootstrap/runtime-network-topology.js +43 -2
- package/dist/esm/bootstrap/runtime-network-topology.js.map +1 -1
- package/dist/esm/bootstrap/runtime-platform-access.d.ts.map +1 -1
- package/dist/esm/bootstrap/runtime-platform-access.js.map +1 -1
- package/dist/esm/bootstrap/runtime-principal.contracts.d.ts +40 -2
- package/dist/esm/bootstrap/runtime-principal.contracts.d.ts.map +1 -1
- package/dist/esm/bootstrap/runtime-principal.contracts.js +66 -3
- package/dist/esm/bootstrap/runtime-principal.contracts.js.map +1 -1
- package/dist/esm/bootstrap/runtime-response-integrity.d.ts.map +1 -1
- package/dist/esm/bootstrap/runtime-response-integrity.js +3 -3
- package/dist/esm/bootstrap/runtime-response-integrity.js.map +1 -1
- package/dist/esm/bootstrap/runtime-secret-env.contracts.d.ts.map +1 -1
- package/dist/esm/bootstrap/runtime-secret-env.contracts.js.map +1 -1
- package/dist/esm/bootstrap/runtime-topology.contracts.d.ts.map +1 -1
- package/dist/esm/bootstrap/runtime-topology.contracts.js.map +1 -1
- package/dist/esm/bootstrap/wildo-owner-organization.contracts.d.ts.map +1 -1
- package/dist/esm/bootstrap/wildo-owner-organization.contracts.js.map +1 -1
- package/dist/esm/canonical-json/rfc8785-canonical-json.d.ts.map +1 -1
- package/dist/esm/canonical-json/rfc8785-canonical-json.js.map +1 -1
- package/dist/esm/config-authoring.entry.d.ts.map +1 -1
- package/dist/esm/config-authoring.entry.js.map +1 -1
- package/dist/esm/credentials/credential-generator.service.d.ts.map +1 -1
- package/dist/esm/credentials/credential-generator.service.js.map +1 -1
- package/dist/esm/index.d.ts +5 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +5 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/key-management/application-legacy-envelope-key.contracts.d.ts +119 -0
- package/dist/esm/key-management/application-legacy-envelope-key.contracts.d.ts.map +1 -0
- package/dist/esm/key-management/application-legacy-envelope-key.contracts.js +109 -0
- package/dist/esm/key-management/application-legacy-envelope-key.contracts.js.map +1 -0
- package/dist/esm/key-management/application-signing-key-rotation.contracts.d.ts +182 -0
- package/dist/esm/key-management/application-signing-key-rotation.contracts.d.ts.map +1 -0
- package/dist/esm/key-management/application-signing-key-rotation.contracts.js +145 -0
- package/dist/esm/key-management/application-signing-key-rotation.contracts.js.map +1 -0
- package/dist/esm/key-management/approval-seal-manifested-copy.d.ts +156 -0
- package/dist/esm/key-management/approval-seal-manifested-copy.d.ts.map +1 -0
- package/dist/esm/key-management/approval-seal-manifested-copy.js +617 -0
- package/dist/esm/key-management/approval-seal-manifested-copy.js.map +1 -0
- package/dist/esm/key-management/approval-seal-verifier.d.ts +101 -39
- package/dist/esm/key-management/approval-seal-verifier.d.ts.map +1 -1
- package/dist/esm/key-management/approval-seal-verifier.js +134 -12
- package/dist/esm/key-management/approval-seal-verifier.js.map +1 -1
- package/dist/esm/key-management/approval-seal.contracts.d.ts +12 -15
- package/dist/esm/key-management/approval-seal.contracts.d.ts.map +1 -1
- package/dist/esm/key-management/approval-seal.contracts.js +20 -0
- package/dist/esm/key-management/approval-seal.contracts.js.map +1 -1
- package/dist/esm/key-management/data-key.contracts.d.ts +0 -2
- package/dist/esm/key-management/data-key.contracts.d.ts.map +1 -1
- package/dist/esm/key-management/data-key.contracts.js.map +1 -1
- package/dist/esm/key-management/es256-jws.d.ts.map +1 -1
- package/dist/esm/key-management/es256-jws.js.map +1 -1
- package/dist/esm/key-management/key-provider.spi.d.ts +8 -1
- package/dist/esm/key-management/key-provider.spi.d.ts.map +1 -1
- package/dist/esm/key-management/key-provider.spi.js.map +1 -1
- package/dist/esm/key-management/keyring-rotation.contracts.d.ts +2 -12
- package/dist/esm/key-management/keyring-rotation.contracts.d.ts.map +1 -1
- package/dist/esm/key-management/keyring-rotation.contracts.js +3 -3
- package/dist/esm/key-management/keyring-rotation.contracts.js.map +1 -1
- package/dist/esm/key-management/keyring-status.contracts.d.ts +0 -7
- package/dist/esm/key-management/keyring-status.contracts.d.ts.map +1 -1
- package/dist/esm/key-management/keyring-status.contracts.js.map +1 -1
- package/dist/esm/key-management/pdf-incremental-update.d.ts +158 -0
- package/dist/esm/key-management/pdf-incremental-update.d.ts.map +1 -0
- package/dist/esm/key-management/pdf-incremental-update.js +730 -0
- package/dist/esm/key-management/pdf-incremental-update.js.map +1 -0
- package/dist/esm/key-management/pdf-truetype-font.d.ts +35 -0
- package/dist/esm/key-management/pdf-truetype-font.d.ts.map +1 -0
- package/dist/esm/key-management/pdf-truetype-font.js +152 -0
- package/dist/esm/key-management/pdf-truetype-font.js.map +1 -0
- package/dist/esm/key-management/qr-code.d.ts +38 -0
- package/dist/esm/key-management/qr-code.d.ts.map +1 -0
- package/dist/esm/key-management/qr-code.js +325 -0
- package/dist/esm/key-management/qr-code.js.map +1 -0
- package/dist/esm/key-management/signature-request.contracts.d.ts +0 -4
- package/dist/esm/key-management/signature-request.contracts.d.ts.map +1 -1
- package/dist/esm/key-management/signature-request.contracts.js.map +1 -1
- package/dist/esm/key-management/signing-log-export.contracts.d.ts +0 -1
- package/dist/esm/key-management/signing-log-export.contracts.d.ts.map +1 -1
- package/dist/esm/key-management/signing-log-export.contracts.js.map +1 -1
- package/dist/esm/key-management/vault-custody.contracts.d.ts +43 -0
- package/dist/esm/key-management/vault-custody.contracts.d.ts.map +1 -1
- package/dist/esm/key-management/vault-custody.contracts.js +66 -0
- package/dist/esm/key-management/vault-custody.contracts.js.map +1 -1
- package/dist/esm/lockfile/build-parallelism.d.ts.map +1 -1
- package/dist/esm/lockfile/build-parallelism.js.map +1 -1
- package/dist/esm/lockfile/canonical-json.d.ts +1 -1
- package/dist/esm/lockfile/canonical-json.d.ts.map +1 -1
- package/dist/esm/lockfile/canonical-json.js +1 -1
- package/dist/esm/lockfile/canonical-json.js.map +1 -1
- package/dist/esm/lockfile/file-lock-hold.d.ts.map +1 -1
- package/dist/esm/lockfile/file-lock-hold.js +2 -1
- package/dist/esm/lockfile/file-lock-hold.js.map +1 -1
- package/dist/esm/lockfile/lockfile-io.d.ts +6 -8
- package/dist/esm/lockfile/lockfile-io.d.ts.map +1 -1
- package/dist/esm/lockfile/lockfile-io.js +6 -8
- package/dist/esm/lockfile/lockfile-io.js.map +1 -1
- package/dist/esm/lockfile/materialize-infra-section.d.ts +5 -6
- package/dist/esm/lockfile/materialize-infra-section.d.ts.map +1 -1
- package/dist/esm/lockfile/materialize-infra-section.js +4 -5
- package/dist/esm/lockfile/materialize-infra-section.js.map +1 -1
- package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.d.ts +1 -247
- package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.d.ts.map +1 -1
- package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.js +1 -1
- package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.js.map +1 -1
- package/dist/esm/pnpm-settings/application-pnpm-settings.d.ts +146 -0
- package/dist/esm/pnpm-settings/application-pnpm-settings.d.ts.map +1 -0
- package/dist/esm/pnpm-settings/application-pnpm-settings.js +573 -0
- package/dist/esm/pnpm-settings/application-pnpm-settings.js.map +1 -0
- package/dist/esm/project-config/application-public-pricing-catalog.loader.d.ts.map +1 -1
- package/dist/esm/project-config/application-public-pricing-catalog.loader.js +15 -3
- package/dist/esm/project-config/application-public-pricing-catalog.loader.js.map +1 -1
- package/dist/esm/project-config/application-served-public-documents.loader.d.ts.map +1 -1
- package/dist/esm/project-config/application-served-public-documents.loader.js +16 -8
- package/dist/esm/project-config/application-served-public-documents.loader.js.map +1 -1
- package/dist/esm/project-config/backend-compliance-section.reader.d.ts +35 -0
- package/dist/esm/project-config/backend-compliance-section.reader.d.ts.map +1 -0
- package/dist/esm/project-config/backend-compliance-section.reader.js +123 -0
- package/dist/esm/project-config/backend-compliance-section.reader.js.map +1 -0
- package/dist/esm/project-config/backend-compliance-section.worker.d.ts +20 -0
- package/dist/esm/project-config/backend-compliance-section.worker.d.ts.map +1 -0
- package/dist/esm/project-config/backend-compliance-section.worker.js +78 -0
- package/dist/esm/project-config/backend-compliance-section.worker.js.map +1 -0
- package/dist/esm/project-config/config-module-resolution.d.ts +32 -0
- package/dist/esm/project-config/config-module-resolution.d.ts.map +1 -0
- package/dist/esm/project-config/config-module-resolution.js +33 -0
- package/dist/esm/project-config/config-module-resolution.js.map +1 -0
- package/dist/esm/project-config/define-framework-config.d.ts.map +1 -1
- package/dist/esm/project-config/define-framework-config.js.map +1 -1
- package/dist/esm/project-config/define-infra-env-config.d.ts +109 -55
- package/dist/esm/project-config/define-infra-env-config.d.ts.map +1 -1
- package/dist/esm/project-config/define-infra-env-config.js +108 -70
- package/dist/esm/project-config/define-infra-env-config.js.map +1 -1
- package/dist/esm/project-config/define-minion-config.d.ts +26 -36
- package/dist/esm/project-config/define-minion-config.d.ts.map +1 -1
- package/dist/esm/project-config/define-minion-config.js +64 -25
- package/dist/esm/project-config/define-minion-config.js.map +1 -1
- package/dist/esm/project-config/define-saas-config.d.ts +41 -437
- package/dist/esm/project-config/define-saas-config.d.ts.map +1 -1
- package/dist/esm/project-config/define-saas-config.js +102 -94
- package/dist/esm/project-config/define-saas-config.js.map +1 -1
- package/dist/esm/project-config/define-worker-config.d.ts +10 -20
- package/dist/esm/project-config/define-worker-config.d.ts.map +1 -1
- package/dist/esm/project-config/define-worker-config.js +10 -12
- package/dist/esm/project-config/define-worker-config.js.map +1 -1
- package/dist/esm/project-config/hosted-infra-env-config.d.ts.map +1 -1
- package/dist/esm/project-config/hosted-infra-env-config.js +1 -1
- package/dist/esm/project-config/hosted-infra-env-config.js.map +1 -1
- package/dist/esm/project-config/index.d.ts +2 -0
- package/dist/esm/project-config/index.d.ts.map +1 -1
- package/dist/esm/project-config/index.js +2 -0
- package/dist/esm/project-config/index.js.map +1 -1
- package/dist/esm/project-config/loader-instances-zod.d.ts +19 -0
- package/dist/esm/project-config/loader-instances-zod.d.ts.map +1 -0
- package/dist/esm/project-config/loader-instances-zod.js +40 -0
- package/dist/esm/project-config/loader-instances-zod.js.map +1 -0
- package/dist/esm/project-config/loader.d.ts +131 -14
- package/dist/esm/project-config/loader.d.ts.map +1 -1
- package/dist/esm/project-config/loader.js +226 -12
- package/dist/esm/project-config/loader.js.map +1 -1
- package/dist/esm/project-config/minion-liveness.contracts.d.ts +131 -0
- package/dist/esm/project-config/minion-liveness.contracts.d.ts.map +1 -0
- package/dist/esm/project-config/minion-liveness.contracts.js +167 -0
- package/dist/esm/project-config/minion-liveness.contracts.js.map +1 -0
- package/dist/esm/project-config/minion-local-provider-registration.d.ts.map +1 -1
- package/dist/esm/project-config/minion-local-provider-registration.js.map +1 -1
- package/dist/esm/project-config/npm-version-range.d.ts.map +1 -1
- package/dist/esm/project-config/npm-version-range.js.map +1 -1
- package/dist/esm/project-config/owning-package-tsconfig.d.ts +7 -7
- package/dist/esm/project-config/owning-package-tsconfig.d.ts.map +1 -1
- package/dist/esm/project-config/owning-package-tsconfig.js +7 -7
- package/dist/esm/project-config/owning-package-tsconfig.js.map +1 -1
- package/dist/esm/project-config/provider-catalog-types.d.ts.map +1 -1
- package/dist/esm/project-config/provider-catalog-types.js.map +1 -1
- package/dist/esm/project-config/provider-companion-discovery.d.ts.map +1 -1
- package/dist/esm/project-config/provider-companion-discovery.js +3 -1
- package/dist/esm/project-config/provider-companion-discovery.js.map +1 -1
- package/dist/esm/project-config/provider-runtime-artifacts.d.ts +71 -46
- package/dist/esm/project-config/provider-runtime-artifacts.d.ts.map +1 -1
- package/dist/esm/project-config/provider-runtime-artifacts.js +150 -4
- package/dist/esm/project-config/provider-runtime-artifacts.js.map +1 -1
- package/dist/esm/project-config/shared/application-creation-verification.schemas.d.ts +0 -2
- package/dist/esm/project-config/shared/application-creation-verification.schemas.d.ts.map +1 -1
- package/dist/esm/project-config/shared/application-creation-verification.schemas.js.map +1 -1
- package/dist/esm/project-config/shared/application-modules.schemas.d.ts.map +1 -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.map +1 -1
- package/dist/esm/project-config/shared/application-modules.utils.js.map +1 -1
- package/dist/esm/project-config/shared/auth.schemas.d.ts +0 -17
- package/dist/esm/project-config/shared/auth.schemas.d.ts.map +1 -1
- package/dist/esm/project-config/shared/auth.schemas.js.map +1 -1
- package/dist/esm/project-config/shared/backing-service-servability.d.ts.map +1 -1
- package/dist/esm/project-config/shared/backing-service-servability.js.map +1 -1
- package/dist/esm/project-config/shared/backing-services.schemas.d.ts +9 -10
- package/dist/esm/project-config/shared/backing-services.schemas.d.ts.map +1 -1
- package/dist/esm/project-config/shared/backing-services.schemas.js +13 -15
- package/dist/esm/project-config/shared/backing-services.schemas.js.map +1 -1
- package/dist/esm/project-config/shared/cdn.schemas.d.ts +0 -51
- package/dist/esm/project-config/shared/cdn.schemas.d.ts.map +1 -1
- package/dist/esm/project-config/shared/cdn.schemas.js.map +1 -1
- package/dist/esm/project-config/shared/csp-defaults.d.ts +34 -6
- package/dist/esm/project-config/shared/csp-defaults.d.ts.map +1 -1
- package/dist/esm/project-config/shared/csp-defaults.js +52 -8
- package/dist/esm/project-config/shared/csp-defaults.js.map +1 -1
- package/dist/esm/project-config/shared/csp-emit.d.ts +60 -13
- package/dist/esm/project-config/shared/csp-emit.d.ts.map +1 -1
- package/dist/esm/project-config/shared/csp-emit.js +77 -24
- package/dist/esm/project-config/shared/csp-emit.js.map +1 -1
- package/dist/esm/project-config/shared/csp.schemas.d.ts +72 -84
- package/dist/esm/project-config/shared/csp.schemas.d.ts.map +1 -1
- package/dist/esm/project-config/shared/csp.schemas.js +40 -12
- package/dist/esm/project-config/shared/csp.schemas.js.map +1 -1
- package/dist/esm/project-config/shared/data-services.schemas.d.ts +0 -8
- package/dist/esm/project-config/shared/data-services.schemas.d.ts.map +1 -1
- package/dist/esm/project-config/shared/data-services.schemas.js.map +1 -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.map +1 -1
- package/dist/esm/project-config/shared/environment.schemas.d.ts +95 -8
- package/dist/esm/project-config/shared/environment.schemas.d.ts.map +1 -1
- package/dist/esm/project-config/shared/environment.schemas.js +122 -10
- package/dist/esm/project-config/shared/environment.schemas.js.map +1 -1
- package/dist/esm/project-config/shared/infra-providers.schemas.d.ts +10 -4
- package/dist/esm/project-config/shared/infra-providers.schemas.d.ts.map +1 -1
- package/dist/esm/project-config/shared/infra-providers.schemas.js.map +1 -1
- package/dist/esm/project-config/shared/infra-service.schemas.d.ts.map +1 -1
- package/dist/esm/project-config/shared/infra-service.schemas.js.map +1 -1
- package/dist/esm/project-config/shared/infrastructure-defaults.schemas.d.ts +1 -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 +1 -1
- package/dist/esm/project-config/shared/infrastructure-defaults.schemas.js.map +1 -1
- package/dist/esm/project-config/shared/k8s-utils.d.ts.map +1 -1
- package/dist/esm/project-config/shared/k8s-utils.js.map +1 -1
- package/dist/esm/project-config/shared/minion-platform-access.vocabulary.d.ts.map +1 -1
- package/dist/esm/project-config/shared/minion-platform-access.vocabulary.js.map +1 -1
- package/dist/esm/project-config/shared/minion-resource-access.validation.d.ts +20 -0
- package/dist/esm/project-config/shared/minion-resource-access.validation.d.ts.map +1 -1
- package/dist/esm/project-config/shared/minion-resource-access.validation.js +21 -2
- package/dist/esm/project-config/shared/minion-resource-access.validation.js.map +1 -1
- package/dist/esm/project-config/shared/object-storage-session-policy.d.ts.map +1 -1
- package/dist/esm/project-config/shared/object-storage-session-policy.js.map +1 -1
- package/dist/esm/project-config/shared/platform-key-management.schemas.d.ts +62 -36
- package/dist/esm/project-config/shared/platform-key-management.schemas.d.ts.map +1 -1
- package/dist/esm/project-config/shared/platform-key-management.schemas.js +105 -3
- package/dist/esm/project-config/shared/platform-key-management.schemas.js.map +1 -1
- package/dist/esm/project-config/shared/platform-services.schemas.d.ts.map +1 -1
- package/dist/esm/project-config/shared/platform-services.schemas.js.map +1 -1
- package/dist/esm/project-config/shared/platform-storage.schemas.d.ts +2 -2
- package/dist/esm/project-config/shared/platform-storage.schemas.d.ts.map +1 -1
- package/dist/esm/project-config/shared/platform-storage.schemas.js +16 -2
- package/dist/esm/project-config/shared/platform-storage.schemas.js.map +1 -1
- package/dist/esm/project-config/shared/service-definitions.schemas.d.ts +21 -23
- package/dist/esm/project-config/shared/service-definitions.schemas.d.ts.map +1 -1
- package/dist/esm/project-config/shared/service-definitions.schemas.js +4 -5
- package/dist/esm/project-config/shared/service-definitions.schemas.js.map +1 -1
- package/dist/esm/project-config/shared/systems-of-record-env.schemas.d.ts +0 -18
- package/dist/esm/project-config/shared/systems-of-record-env.schemas.d.ts.map +1 -1
- package/dist/esm/project-config/shared/systems-of-record-env.schemas.js.map +1 -1
- package/dist/esm/project-config/static-asset-import-noop.d.ts +20 -3
- package/dist/esm/project-config/static-asset-import-noop.d.ts.map +1 -1
- package/dist/esm/project-config/static-asset-import-noop.js +36 -20
- package/dist/esm/project-config/static-asset-import-noop.js.map +1 -1
- package/dist/esm/registry/artifact-domain.schemas.d.ts +0 -5
- package/dist/esm/registry/artifact-domain.schemas.d.ts.map +1 -1
- package/dist/esm/registry/artifact-domain.schemas.js.map +1 -1
- package/dist/esm/registry/digest.schemas.d.ts.map +1 -1
- package/dist/esm/registry/digest.schemas.js.map +1 -1
- package/dist/esm/registry/index.d.ts +2 -3
- package/dist/esm/registry/index.d.ts.map +1 -1
- package/dist/esm/registry/index.js +2 -3
- package/dist/esm/registry/index.js.map +1 -1
- package/dist/esm/registry/local-checkout-source.d.ts.map +1 -1
- package/dist/esm/registry/local-checkout-source.js.map +1 -1
- package/dist/esm/registry/lockfile-modules-section.schemas.d.ts +1 -98
- package/dist/esm/registry/lockfile-modules-section.schemas.d.ts.map +1 -1
- package/dist/esm/registry/lockfile-modules-section.schemas.js +1 -2
- package/dist/esm/registry/lockfile-modules-section.schemas.js.map +1 -1
- package/dist/esm/registry/module-artifact.schemas.d.ts +17 -17
- package/dist/esm/registry/module-artifact.schemas.d.ts.map +1 -1
- package/dist/esm/registry/module-artifact.schemas.js.map +1 -1
- package/dist/esm/registry/module-manifest.schemas.d.ts +151 -219
- package/dist/esm/registry/module-manifest.schemas.d.ts.map +1 -1
- package/dist/esm/registry/module-manifest.schemas.js +145 -13
- package/dist/esm/registry/module-manifest.schemas.js.map +1 -1
- package/dist/esm/registry/module-search.schemas.d.ts.map +1 -1
- package/dist/esm/registry/module-search.schemas.js.map +1 -1
- package/dist/esm/registry/registry-config.schemas.d.ts +0 -18
- package/dist/esm/registry/registry-config.schemas.d.ts.map +1 -1
- package/dist/esm/registry/registry-config.schemas.js.map +1 -1
- package/dist/esm/registry/registry-defaults.constants.d.ts.map +1 -1
- package/dist/esm/registry/registry-defaults.constants.js.map +1 -1
- package/dist/esm/registry/registry-errors.d.ts +81 -3
- package/dist/esm/registry/registry-errors.d.ts.map +1 -1
- package/dist/esm/registry/registry-errors.js +185 -4
- package/dist/esm/registry/registry-errors.js.map +1 -1
- package/dist/esm/registry/registry-keys.schemas.d.ts.map +1 -1
- package/dist/esm/registry/registry-keys.schemas.js.map +1 -1
- package/dist/esm/registry/registry-section-schemas.constants.d.ts.map +1 -1
- package/dist/esm/registry/registry-section-schemas.constants.js.map +1 -1
- package/dist/esm/registry/registry-url-resolution.d.ts.map +1 -1
- package/dist/esm/registry/registry-url-resolution.js.map +1 -1
- package/dist/esm/release/framework-release.constants.d.ts.map +1 -1
- package/dist/esm/release/framework-release.constants.js.map +1 -1
- package/dist/esm/schemas/framework-info.schemas.d.ts.map +1 -1
- package/dist/esm/schemas/framework-info.schemas.js.map +1 -1
- package/dist/esm/schemas/framework-secrets.schemas.d.ts +0 -7
- package/dist/esm/schemas/framework-secrets.schemas.d.ts.map +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.map +1 -1
- package/dist/esm/schemas/platform-application-secrets.schemas.d.ts +1 -1
- package/dist/esm/schemas/platform-application-secrets.schemas.d.ts.map +1 -1
- package/dist/esm/schemas/platform-application-secrets.schemas.js.map +1 -1
- package/dist/esm/schemas/platform-config.schemas.d.ts +2 -2
- package/dist/esm/schemas/platform-config.schemas.d.ts.map +1 -1
- package/dist/esm/schemas/platform-config.schemas.js.map +1 -1
- package/dist/esm/workspace-scope/application-subject-manifest.d.ts.map +1 -1
- package/dist/esm/workspace-scope/application-subject-manifest.js.map +1 -1
- package/dist/esm/workspace-scope/index.d.ts.map +1 -1
- package/dist/esm/workspace-scope/index.js.map +1 -1
- package/dist/esm/workspace-scope/resolve-homes.d.ts.map +1 -1
- package/dist/esm/workspace-scope/resolve-homes.js.map +1 -1
- package/dist/esm/workspace-scope/workspace-homes.schemas.d.ts.map +1 -1
- package/dist/esm/workspace-scope/workspace-homes.schemas.js.map +1 -1
- package/dist/esm/workspace-scope/workspace-scope-detector.d.ts.map +1 -1
- package/dist/esm/workspace-scope/workspace-scope-detector.js.map +1 -1
- package/dist/esm/workspace-scope/workspace-scope.schemas.d.ts.map +1 -1
- package/dist/esm/workspace-scope/workspace-scope.schemas.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +12 -12
- package/dist/esm/_unimplemented/index.d.ts +0 -3
- package/dist/esm/_unimplemented/index.d.ts.map +0 -1
- package/dist/esm/_unimplemented/index.js +0 -3
- package/dist/esm/_unimplemented/index.js.map +0 -1
- package/dist/esm/_unimplemented/unimplemented-field-warning.d.ts +0 -137
- package/dist/esm/_unimplemented/unimplemented-field-warning.d.ts.map +0 -1
- package/dist/esm/_unimplemented/unimplemented-field-warning.js +0 -153
- package/dist/esm/_unimplemented/unimplemented-field-warning.js.map +0 -1
- package/dist/esm/project-config/shared/cdn.example.d.ts +0 -14
- package/dist/esm/project-config/shared/cdn.example.d.ts.map +0 -1
- package/dist/esm/project-config/shared/cdn.example.js +0 -38
- package/dist/esm/project-config/shared/cdn.example.js.map +0 -1
- package/dist/esm/project-config/shared/schema-version.schemas.d.ts +0 -15
- package/dist/esm/project-config/shared/schema-version.schemas.d.ts.map +0 -1
- package/dist/esm/project-config/shared/schema-version.schemas.js +0 -40
- package/dist/esm/project-config/shared/schema-version.schemas.js.map +0 -1
|
@@ -3,8 +3,7 @@ import { z } from 'zod';
|
|
|
3
3
|
* Worker authentication strategy on the inbound HTTP surface.
|
|
4
4
|
*
|
|
5
5
|
* Only `'wildo-jwt'` is supported in v1 — the worker validates the
|
|
6
|
-
* incoming bearer against the dynamically-resolved Wildo public key
|
|
7
|
-
* (Q3 LOCKED in `.cursor/plans/minions-and-workers-implementation.md`),
|
|
6
|
+
* incoming bearer against the dynamically-resolved Wildo public key,
|
|
8
7
|
* exactly mirroring the existing `applicationAuthMode: 'dynamic'`
|
|
9
8
|
* default in `platform-service-auth.shared.platform.middleware.ts`.
|
|
10
9
|
*
|
|
@@ -20,7 +19,7 @@ export type WorkerAuth = z.infer<typeof WorkerAuthSchema>;
|
|
|
20
19
|
/**
|
|
21
20
|
* Inbound HTTP surface for a worker subprocess.
|
|
22
21
|
*
|
|
23
|
-
*
|
|
22
|
+
* Every worker MUST expose
|
|
24
23
|
* `/healthz` (liveness) and `/readyz` (readiness) so K8s probes have
|
|
25
24
|
* a uniform contract across Rust / Node / Java implementations. The
|
|
26
25
|
* `metrics?` path is opt-in (Prometheus scrape) — defaulting it to
|
|
@@ -43,12 +42,11 @@ export type WorkerHttp = z.infer<typeof WorkerHttpSchema>;
|
|
|
43
42
|
/**
|
|
44
43
|
* Per-folder worker configuration.
|
|
45
44
|
*
|
|
46
|
-
*
|
|
47
|
-
* `.cursor/plans/minions-and-workers-implementation.md`):
|
|
45
|
+
* Schema honesty:
|
|
48
46
|
*
|
|
49
47
|
* - The legacy `queue` block is REMOVED. Workers are HTTP-only in
|
|
50
48
|
* v1 — backend-to-worker communication goes through the inbound
|
|
51
|
-
* `http` surface, not via direct queue consumption
|
|
49
|
+
* `http` surface, not via direct queue consumption. When
|
|
52
50
|
* queue-driven workers land post-v1 they will re-enter the schema
|
|
53
51
|
* via a deliberate, explicit field (probably `inboundQueue?`) so
|
|
54
52
|
* the "HTTP-only today" contract stays visible.
|
|
@@ -57,17 +55,17 @@ export type WorkerHttp = z.infer<typeof WorkerHttpSchema>;
|
|
|
57
55
|
* `WorkerHttpSchema` JSDoc.
|
|
58
56
|
*
|
|
59
57
|
* - `auth` (required) declares the inbound authentication strategy —
|
|
60
|
-
* `'wildo-jwt'` only in v1
|
|
58
|
+
* `'wildo-jwt'` only in v1.
|
|
61
59
|
*
|
|
62
|
-
* - `replicas` (default 1) is authored explicitly
|
|
63
|
-
*
|
|
60
|
+
* - `replicas` (default 1) is authored explicitly —
|
|
61
|
+
* the K8s manifest emitter reads this field directly. HPA wiring is
|
|
64
62
|
* NOT modelled here (deferred); fixed `replicas` is the only
|
|
65
63
|
* scaling primitive in v1.
|
|
66
64
|
*
|
|
67
65
|
* - `dataAccess` is RETAINED for forward compatibility but stays
|
|
68
66
|
* inert in v1 — workers have NO database / cache / queue access
|
|
69
|
-
* by default
|
|
70
|
-
* by the soft-warn machinery
|
|
67
|
+
* by default. Authoring the field today will be flagged
|
|
68
|
+
* by the soft-warn machinery once
|
|
71
69
|
* `start-worker-application` lands.
|
|
72
70
|
*
|
|
73
71
|
* The schema is `z.strictObject` so a typo (`hht:` instead of `http:`)
|
|
@@ -111,14 +109,6 @@ export declare const WildoWorkerConfigSchema: z.ZodObject<{
|
|
|
111
109
|
both: "both";
|
|
112
110
|
}>>;
|
|
113
111
|
}, z.core.$strip>>;
|
|
114
|
-
/**
|
|
115
|
-
* Container isolation. `.prefault({})` — NOT `.optional()` — because an absent
|
|
116
|
-
* block must still yield the secure defaults: "authored nothing" is the common
|
|
117
|
-
* case and is exactly the one that must come out hardened.
|
|
118
|
-
*
|
|
119
|
-
* Only image-dependent and ADDITIVE knobs are authorable; the security floor is
|
|
120
|
-
* emitted unconditionally by the renderers. See {@link RuntimeIsolationSchema}.
|
|
121
|
-
*/
|
|
122
112
|
isolation: z.ZodPrefault<z.ZodObject<{
|
|
123
113
|
runAsUser: z.ZodDefault<z.ZodNumber>;
|
|
124
114
|
runAsGroup: z.ZodDefault<z.ZodNumber>;
|
|
@@ -131,7 +121,7 @@ export type WildoWorkerConfigInput = z.input<typeof WildoWorkerConfigSchema>;
|
|
|
131
121
|
/**
|
|
132
122
|
* Define a worker service configuration.
|
|
133
123
|
* Workers are HTTP-only subprocesses — no queue consumption, no DB / cache
|
|
134
|
-
* by default
|
|
124
|
+
* by default. Backend-to-worker communication uses the
|
|
135
125
|
* declared `http` surface with `auth='wildo-jwt'` bearers.
|
|
136
126
|
*/
|
|
137
127
|
export declare function defineWorkerConfig(config: WildoWorkerConfigInput): WildoWorkerConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define-worker-config.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"define-worker-config.d.ts","sourceRoot":"","sources":["../../../src/project-config/define-worker-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,gBAAgB;;EAAwB,CAAC;AACtD,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,gBAAgB;;;;;kBAK3B,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA8BlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAE7E;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,sBAAsB,GAAG,iBAAiB,CAEpF"}
|
|
@@ -4,8 +4,7 @@ import { WorkerRuntimeSchema, ResourceLimitsSchema, DataAccessSchema, RuntimeIso
|
|
|
4
4
|
* Worker authentication strategy on the inbound HTTP surface.
|
|
5
5
|
*
|
|
6
6
|
* Only `'wildo-jwt'` is supported in v1 — the worker validates the
|
|
7
|
-
* incoming bearer against the dynamically-resolved Wildo public key
|
|
8
|
-
* (Q3 LOCKED in `.cursor/plans/minions-and-workers-implementation.md`),
|
|
7
|
+
* incoming bearer against the dynamically-resolved Wildo public key,
|
|
9
8
|
* exactly mirroring the existing `applicationAuthMode: 'dynamic'`
|
|
10
9
|
* default in `platform-service-auth.shared.platform.middleware.ts`.
|
|
11
10
|
*
|
|
@@ -18,7 +17,7 @@ export const WorkerAuthSchema = z.enum(['wildo-jwt']);
|
|
|
18
17
|
/**
|
|
19
18
|
* Inbound HTTP surface for a worker subprocess.
|
|
20
19
|
*
|
|
21
|
-
*
|
|
20
|
+
* Every worker MUST expose
|
|
22
21
|
* `/healthz` (liveness) and `/readyz` (readiness) so K8s probes have
|
|
23
22
|
* a uniform contract across Rust / Node / Java implementations. The
|
|
24
23
|
* `metrics?` path is opt-in (Prometheus scrape) — defaulting it to
|
|
@@ -40,12 +39,11 @@ export const WorkerHttpSchema = z.strictObject({
|
|
|
40
39
|
/**
|
|
41
40
|
* Per-folder worker configuration.
|
|
42
41
|
*
|
|
43
|
-
*
|
|
44
|
-
* `.cursor/plans/minions-and-workers-implementation.md`):
|
|
42
|
+
* Schema honesty:
|
|
45
43
|
*
|
|
46
44
|
* - The legacy `queue` block is REMOVED. Workers are HTTP-only in
|
|
47
45
|
* v1 — backend-to-worker communication goes through the inbound
|
|
48
|
-
* `http` surface, not via direct queue consumption
|
|
46
|
+
* `http` surface, not via direct queue consumption. When
|
|
49
47
|
* queue-driven workers land post-v1 they will re-enter the schema
|
|
50
48
|
* via a deliberate, explicit field (probably `inboundQueue?`) so
|
|
51
49
|
* the "HTTP-only today" contract stays visible.
|
|
@@ -54,17 +52,17 @@ export const WorkerHttpSchema = z.strictObject({
|
|
|
54
52
|
* `WorkerHttpSchema` JSDoc.
|
|
55
53
|
*
|
|
56
54
|
* - `auth` (required) declares the inbound authentication strategy —
|
|
57
|
-
* `'wildo-jwt'` only in v1
|
|
55
|
+
* `'wildo-jwt'` only in v1.
|
|
58
56
|
*
|
|
59
|
-
* - `replicas` (default 1) is authored explicitly
|
|
60
|
-
*
|
|
57
|
+
* - `replicas` (default 1) is authored explicitly —
|
|
58
|
+
* the K8s manifest emitter reads this field directly. HPA wiring is
|
|
61
59
|
* NOT modelled here (deferred); fixed `replicas` is the only
|
|
62
60
|
* scaling primitive in v1.
|
|
63
61
|
*
|
|
64
62
|
* - `dataAccess` is RETAINED for forward compatibility but stays
|
|
65
63
|
* inert in v1 — workers have NO database / cache / queue access
|
|
66
|
-
* by default
|
|
67
|
-
* by the soft-warn machinery
|
|
64
|
+
* by default. Authoring the field today will be flagged
|
|
65
|
+
* by the soft-warn machinery once
|
|
68
66
|
* `start-worker-application` lands.
|
|
69
67
|
*
|
|
70
68
|
* The schema is `z.strictObject` so a typo (`hht:` instead of `http:`)
|
|
@@ -105,7 +103,7 @@ export const WildoWorkerConfigSchema = z.strictObject({
|
|
|
105
103
|
/**
|
|
106
104
|
* Define a worker service configuration.
|
|
107
105
|
* Workers are HTTP-only subprocesses — no queue consumption, no DB / cache
|
|
108
|
-
* by default
|
|
106
|
+
* by default. Backend-to-worker communication uses the
|
|
109
107
|
* declared `http` surface with `auth='wildo-jwt'` bearers.
|
|
110
108
|
*/
|
|
111
109
|
export function defineWorkerConfig(config) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define-worker-config.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"define-worker-config.js","sourceRoot":"","sources":["../../../src/project-config/define-worker-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,gBAAgB,EAChB,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,sCAAsC,CAAC;AAE9C;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;AAGtD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,YAAY,CAAC;IAC7C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,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BAAoB,CAAC,QAAQ,EAAE;IAC1C,UAAU,EAAE,gBAAgB,CAAC,QAAQ,EAAE;IACvC;;;;;;;OAOG;IACH,SAAS,EAAE,sBAAsB,CAAC,QAAQ,CAAC,EAAE,CAAC;CAC/C,CAAC,CAAC,WAAW,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;IAC1B,sBAAsB,CAAC,GAAG,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC;AAC7C,CAAC,CAAC,CAAC;AAIH;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAAC,MAA8B;IAC/D,OAAO,uBAAuB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;AAC/C,CAAC","sourcesContent":["import { z } from 'zod';\nimport {\n WorkerRuntimeSchema,\n ResourceLimitsSchema,\n DataAccessSchema,\n RuntimeIsolationSchema,\n refineRuntimeIsolation,\n} from './shared/service-definitions.schemas';\n\n/**\n * Worker authentication strategy on the inbound HTTP surface.\n *\n * Only `'wildo-jwt'` is supported in v1 — the worker validates the\n * incoming bearer against the dynamically-resolved Wildo public key,\n * exactly mirroring the existing `applicationAuthMode: 'dynamic'`\n * default in `platform-service-auth.shared.platform.middleware.ts`.\n *\n * Authoring this as an enum (rather than a bare string) front-loads the\n * decision — a future `'mtls'` / `'static-token'` variant will require\n * a deliberate schema bump and a corresponding registry entry, never an\n * accidental \"any string accepted\" weakening.\n */\nexport const WorkerAuthSchema = z.enum(['wildo-jwt']);\nexport type WorkerAuth = z.infer<typeof WorkerAuthSchema>;\n\n/**\n * Inbound HTTP surface for a worker subprocess.\n *\n * Every worker MUST expose\n * `/healthz` (liveness) and `/readyz` (readiness) so K8s probes have\n * a uniform contract across Rust / Node / Java implementations. The\n * `metrics?` path is opt-in (Prometheus scrape) — defaulting it to\n * `/metrics` would force every worker to ship a metrics surface,\n * which is out of scope for v1's \"acknowledge service\" implementations.\n *\n * Defaults are baked into the schema so the example\n * `wildo.worker.config.ts` files stay terse:\n * - `port` → 8080 (industry-standard worker default)\n * - `healthPath` → '/healthz'\n * - `readyPath` → '/readyz'\n */\nexport const WorkerHttpSchema = z.strictObject({\n port: z.number().int().positive().default(8080),\n healthPath: z.string().min(1).startsWith('/').default('/healthz'),\n readyPath: z.string().min(1).startsWith('/').default('/readyz'),\n metricsPath: z.string().min(1).startsWith('/').optional(),\n});\nexport type WorkerHttp = z.infer<typeof WorkerHttpSchema>;\n\n/**\n * Per-folder worker configuration.\n *\n * Schema honesty:\n *\n * - The legacy `queue` block is REMOVED. Workers are HTTP-only in\n * v1 — backend-to-worker communication goes through the inbound\n * `http` surface, not via direct queue consumption. When\n * queue-driven workers land post-v1 they will re-enter the schema\n * via a deliberate, explicit field (probably `inboundQueue?`) so\n * the \"HTTP-only today\" contract stays visible.\n *\n * - `http` (required) declares the inbound surface contract — see\n * `WorkerHttpSchema` JSDoc.\n *\n * - `auth` (required) declares the inbound authentication strategy —\n * `'wildo-jwt'` only in v1.\n *\n * - `replicas` (default 1) is authored explicitly —\n * the K8s manifest emitter reads this field directly. HPA wiring is\n * NOT modelled here (deferred); fixed `replicas` is the only\n * scaling primitive in v1.\n *\n * - `dataAccess` is RETAINED for forward compatibility but stays\n * inert in v1 — workers have NO database / cache / queue access\n * by default. Authoring the field today will be flagged\n * by the soft-warn machinery once\n * `start-worker-application` lands.\n *\n * The schema is `z.strictObject` so a typo (`hht:` instead of `http:`)\n * fails fast rather than being silently dropped — same posture as\n * `WildoSaasConfigSchema` (Slice 3 deep-review H-1).\n */\nexport const WildoWorkerConfigSchema = z.strictObject({\n version: z.number().int().positive().default(1),\n name: z.string().min(1),\n displayName: z.string().min(1),\n description: z.string().optional(),\n runtime: WorkerRuntimeSchema,\n // `.prefault({})` (NOT `.default({})`) so the empty input flows\n // through `WorkerHttpSchema` and the inner field defaults\n // (`port: 8080`, `healthPath: '/healthz'`, `readyPath: '/readyz'`)\n // are applied. Zod v4's `.default(x)` is an OUTPUT default — it\n // returns `x` as-is without re-parsing — which would yield the bare\n // `{}` and silently lose every inner default. The `prefault` form\n // is the Zod v4 idiom for \"use this value if input is undefined,\n // and route it through the schema like any other input\".\n http: WorkerHttpSchema.prefault({}),\n auth: WorkerAuthSchema,\n replicas: z.number().int().positive().default(1),\n resources: ResourceLimitsSchema.optional(),\n dataAccess: DataAccessSchema.optional(),\n /**\n * Container isolation. `.prefault({})` — NOT `.optional()` — because an absent\n * block must still yield the secure defaults: \"authored nothing\" is the common\n * case and is exactly the one that must come out hardened.\n *\n * Only image-dependent and ADDITIVE knobs are authorable; the security floor is\n * emitted unconditionally by the renderers. See {@link RuntimeIsolationSchema}.\n */\n isolation: RuntimeIsolationSchema.prefault({}),\n}).superRefine((cfg, ctx) => {\n refineRuntimeIsolation(cfg.isolation, ctx);\n});\nexport type WildoWorkerConfig = z.infer<typeof WildoWorkerConfigSchema>;\nexport type WildoWorkerConfigInput = z.input<typeof WildoWorkerConfigSchema>;\n\n/**\n * Define a worker service configuration.\n * Workers are HTTP-only subprocesses — no queue consumption, no DB / cache\n * by default. Backend-to-worker communication uses the\n * declared `http` surface with `auth='wildo-jwt'` bearers.\n */\nexport function defineWorkerConfig(config: WildoWorkerConfigInput): WildoWorkerConfig {\n return WildoWorkerConfigSchema.parse(config);\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hosted-infra-env-config.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"hosted-infra-env-config.d.ts","sourceRoot":"","sources":["../../../src/project-config/hosted-infra-env-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,2BAA2B,EAChC,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EAEzB,MAAM,2BAA2B,CAAC;AAInC;;;GAGG;AACH,MAAM,WAAW,mCAAmC;IAClD,MAAM,EAAE,yBAAyB,CAAC;IAClC,gBAAgB,EAAE,MAAM,CAAC;IACzB,2EAA2E;IAC3E,IAAI,EAAE,2BAA2B,CAAC;IAClC,gBAAgB;IAChB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,gBAAgB;IAChB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED;;;GAGG;AACH,qBAAa,mCAAoC,SAAQ,KAAK;IAC5D,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;gBAEvB,gBAAgB,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,MAAM,EAAE;CAQxF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,mCAAmC,GAAG,mBAAmB,CAqE3G"}
|
|
@@ -73,11 +73,11 @@ export function resolveHostedInfraEnvConfig(input) {
|
|
|
73
73
|
if (issues.length > 0)
|
|
74
74
|
fail(issues);
|
|
75
75
|
const merged = {
|
|
76
|
-
version: hosted.version,
|
|
77
76
|
environment: hosted.environment,
|
|
78
77
|
locationType: owningHost.locationType,
|
|
79
78
|
runtimeEnvironment: owningHost.runtimeEnvironment,
|
|
80
79
|
runtime: owningHost.runtime,
|
|
80
|
+
serviceProfile: owningHost.serviceProfile,
|
|
81
81
|
database: owningHost.database,
|
|
82
82
|
applicationDatabase: hosted.applicationDatabase,
|
|
83
83
|
publicDomain: hosted.publicDomain,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hosted-infra-env-config.js","sourceRoot":"","sources":["../../../../src/project-config/hosted-infra-env-config.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uCAAuC,EACvC,sBAAsB,EACtB,yBAAyB,GAK1B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,kBAAkB,EAAiC,MAAM,mCAAmC,CAAC;AACtG,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAiBtE;;;GAGG;AACH,MAAM,OAAO,mCAAoC,SAAQ,KAAK;IACnD,MAAM,CAAoB;IAEnC,YAAY,gBAAwB,EAAE,cAAsB,EAAE,MAAyB;QACrF,KAA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AAK,SAAS,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,QAAQ,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACpG,CAAC;AACJ,CAAC","sourcesContent":["import {\n BACKING_SERVICE_APPLICATION_NAME_FIELDS,\n isHostedInfraEnvConfig,\n WildoInfraEnvConfigSchema,\n type WildoAuthoredInfraEnvConfig,\n type WildoHostedInfraEnvConfig,\n type WildoInfraEnvConfig,\n type WildoInfraEnvConfigInput,\n} from './define-infra-env-config';\nimport { BackingServiceKind, type BackingServicesEnvConfig } from './shared/backing-services.schemas';\nimport { WildoDeploymentRuntime } from './shared/environment.schemas';\n\n/**\n * Everything {@link resolveHostedInfraEnvConfig} needs, with the file paths kept so every refusal can name\n * BOTH descriptors — the one being resolved and the one it depends on.\n */\nexport interface HostedInfraEnvConfigResolutionInput {\n hosted: WildoHostedInfraEnvConfig;\n hostedConfigPath: string;\n /** The host's descriptor as evaluated — refused if it is itself hosted. */\n host: WildoAuthoredInfraEnvConfig;\n /** Absolute. */\n hostApplicationRoot: string;\n /** Absolute. */\n hostConfigPath: string;\n}\n\n/**\n * A hosted descriptor that cannot be resolved against its host. Carries every issue at once: an author\n * fixing a descriptor should not have to rediscover the next problem one load at a time.\n */\nexport class HostedInfraEnvConfigResolutionError extends Error {\n readonly issues: readonly string[];\n\n constructor(hostedConfigPath: string, hostConfigPath: string, issues: readonly string[]) {\n super([\n `Cannot resolve the hosted environment descriptor ${hostedConfigPath} against its infrastructure host ${hostConfigPath}:`,\n ...issues.map((issue) => ` - ${issue}`),\n ].join('\\n'));\n this.name = 'HostedInfraEnvConfigResolutionError';\n this.issues = issues;\n }\n}\n\n/**\n * Turn a hosted descriptor into the environment it actually runs in: the host's platform, the\n * application's own settings.\n *\n * A PURE function of the two evaluated descriptors — no filesystem — so the whole merge contract is\n * testable without a checkout. `loadInfraEnvConfig` does the reading and calls this.\n *\n * ## What comes from where\n *\n * Decided per member by `INFRA_ENV_FIELD_OWNERSHIP`:\n * - HOST members (runtime, location, runtime environment, platform database, remote provider, platform\n * storage) are the host's, verbatim;\n * - APPLICATION members are the hosted descriptor's, verbatim;\n * - `backingServices`: the kinds are the ones the HOSTED application lists (its needs), each of which the\n * host must declare; each entry is the host's server with the host's own name removed, overlaid with the\n * application's name;\n * - `kubernetes`: the host's namespace and ingress class, the application's replica counts;\n * - `deployment`: the host's runtime, the application's branch and tagging. The image registry is the host's\n * `remoteProvider.registryEndpoint` like everything else about where images live (#1165).\n *\n * ## Why the kinds are the application's, not the host's\n *\n * Rejected: handing a hosted application every store its host declares. That would give Wonder CRM a\n * MongoDB address it never asked for, named by the shared `'wildo_app'` fallback — the exact collision\n * the name rule exists to prevent. Declaring a kind stays how an application says it needs a store; what\n * changes is that it cannot say where that store is.\n *\n * ## The merged result is re-validated\n *\n * The merge is parsed through the STANDALONE schema, so every cross-field rule that holds for an owning\n * environment (an application on PostgreSQL needs `backingServices.postgresql`; a local environment cannot\n * author `cdn`; …) holds for the effective hosted one. Validating the hosted descriptor alone could not do\n * that: it does not know whether its host is local or remote.\n */\nexport function resolveHostedInfraEnvConfig(input: HostedInfraEnvConfigResolutionInput): WildoInfraEnvConfig {\n const { hosted, host, hostedConfigPath, hostConfigPath } = input;\n const fail = (issues: readonly string[]): never => {\n throw new HostedInfraEnvConfigResolutionError(hostedConfigPath, hostConfigPath, issues);\n };\n\n if (isHostedInfraEnvConfig(host)) {\n fail([\n `the host is itself hosted (its infrastructureHost is '${host.infrastructureHost.applicationRoot}'). An infrastructure `\n + 'host must OWN its infrastructure: point infrastructureHost at the application that does.',\n ]);\n }\n const owningHost = host as WildoInfraEnvConfig;\n const issues: string[] = [];\n\n if (owningHost.environment !== hosted.environment) {\n issues.push(`the host describes environment '${owningHost.environment}', this descriptor '${hosted.environment}'. A hosted `\n + 'application shares its host\\'s platform for ONE environment at a time, so both must describe the same one.');\n }\n\n const backingServices = resolveBackingServices(hosted, owningHost, hostConfigPath, issues);\n const kubernetes = resolveKubernetes(hosted, owningHost, issues);\n const deployment = resolveDeployment(hosted, owningHost, issues);\n\n if (issues.length > 0) fail(issues);\n\n const merged: WildoInfraEnvConfigInput = {\n version: hosted.version,\n environment: hosted.environment,\n locationType: owningHost.locationType,\n runtimeEnvironment: owningHost.runtimeEnvironment,\n runtime: owningHost.runtime,\n database: owningHost.database,\n applicationDatabase: hosted.applicationDatabase,\n publicDomain: hosted.publicDomain,\n serviceHosts: hosted.serviceHosts,\n kubernetes,\n remoteProvider: owningHost.remoteProvider,\n deployment,\n backingServices,\n logging: hosted.logging,\n observability: hosted.observability,\n providerSelection: hosted.providerSelection,\n providerConfigurations: hosted.providerConfigurations,\n email: hosted.email,\n ownershipDnsStandIn: hosted.ownershipDnsStandIn,\n systemsOfRecord: hosted.systemsOfRecord,\n documentationSite: hosted.documentationSite,\n applicationCreationVerification: hosted.applicationCreationVerification,\n serviceAuth: hosted.serviceAuth,\n csp: hosted.csp,\n cdn: hosted.cdn,\n platformStorage: owningHost.platformStorage,\n platformKeyManagement: owningHost.platformKeyManagement,\n devCompanion: hosted.devCompanion,\n infrastructureHost: {\n applicationRoot: input.hostApplicationRoot,\n infraConfigPath: hostConfigPath,\n },\n };\n\n const parsed = WildoInfraEnvConfigSchema.safeParse(merged);\n if (!parsed.success) {\n fail(parsed.error.issues.map((issue) => {\n const path = issue.path.length > 0 ? `${issue.path.join('.')}: ` : '';\n return `the effective environment (host platform + this application) is invalid — ${path}${issue.message}`;\n }));\n }\n return (parsed as { data: WildoInfraEnvConfig }).data;\n}\n\nfunction resolveBackingServices(\n hosted: WildoHostedInfraEnvConfig,\n host: WildoInfraEnvConfig,\n hostConfigPath: string,\n issues: string[],\n): BackingServicesEnvConfig {\n const resolved: Record<string, Record<string, unknown>> = {};\n for (const kind of Object.values(BackingServiceKind)) {\n const hostedEntry = hosted.backingServices?.[kind] as Record<string, unknown> | undefined;\n if (hostedEntry === undefined) continue;\n\n const hostEntry = host.backingServices[kind] as Record<string, unknown> | undefined;\n if (hostEntry === undefined) {\n issues.push(`this application uses backingServices.${kind}, which its host does not declare. Every backing service a `\n + `hosted application needs is declared by its host: add backingServices.${kind} to ${hostConfigPath}.`);\n continue;\n }\n\n const nameField = BACKING_SERVICE_APPLICATION_NAME_FIELDS[kind];\n const server = { ...hostEntry };\n if (nameField !== null) delete server[nameField.field];\n\n if (nameField?.mustDifferFromHost) {\n const hostName = hostEntry[nameField.field];\n if (hostName === undefined) {\n /*\n * An unnamed host slice uses the framework's SHARED fallback (`'wildo_app'`, the default vhost `/`, the\n * fixed bucket). Those constants live with the env generators, not here, so the collision cannot be\n * decided by value — and refusing is the only answer that stays right when a fallback changes. A host\n * whose store is shared names its own slice.\n */\n issues.push(`the host declares backingServices.${kind} without a ${nameField.field}, so it uses the framework's `\n + `shared fallback name — which an application on its platform could collide with without either naming it. `\n + `A host whose ${kind} is shared must name its own ${nameField.field}: add it to ${hostConfigPath}.`);\n } else if (hostName === hostedEntry[nameField.field]) {\n issues.push(`backingServices.${kind}.${nameField.field} is '${String(hostedEntry[nameField.field])}', the same as the `\n + `host's. Both applications would read and write one ${kind} ${nameField.field}: name this application's own.`);\n }\n }\n\n resolved[kind] = { ...server, ...hostedEntry };\n }\n return resolved as BackingServicesEnvConfig;\n}\n\nfunction resolveKubernetes(\n hosted: WildoHostedInfraEnvConfig,\n host: WildoInfraEnvConfig,\n issues: string[],\n): WildoInfraEnvConfigInput['kubernetes'] {\n const services = hosted.kubernetes?.services;\n if (host.kubernetes === undefined) {\n if (services !== undefined) {\n issues.push('kubernetes.services sets replica counts, but the host declares no kubernetes block: there is no cluster '\n + 'for them to apply to. Remove them, or run the host on Kubernetes.');\n }\n return undefined;\n }\n return {\n namespace: host.kubernetes.namespace,\n ...(host.kubernetes.ingressClass !== undefined ? { ingressClass: host.kubernetes.ingressClass } : {}),\n ...(services !== undefined ? { services } : {}),\n };\n}\n\nfunction resolveDeployment(\n hosted: WildoHostedInfraEnvConfig,\n host: WildoInfraEnvConfig,\n issues: string[],\n): WildoInfraEnvConfigInput['deployment'] {\n const authored = hosted.deployment;\n if (authored === undefined) return undefined;\n\n if (host.runtime === WildoDeploymentRuntime.KUBERNETES) {\n const hostNamespace = host.deployment?.runtime === WildoDeploymentRuntime.KUBERNETES ? host.deployment.namespace : undefined;\n return {\n runtime: WildoDeploymentRuntime.KUBERNETES,\n branch: authored.branch,\n ...(authored.imageTagStrategy !== undefined ? { imageTagStrategy: authored.imageTagStrategy } : {}),\n ...(hostNamespace !== undefined ? { namespace: hostNamespace } : {}),\n };\n }\n\n return {\n runtime: WildoDeploymentRuntime.DOCKER_COMPOSE,\n branch: authored.branch,\n ...(authored.imageTagStrategy !== undefined ? { imageTagStrategy: authored.imageTagStrategy } : {}),\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"hosted-infra-env-config.js","sourceRoot":"","sources":["../../../src/project-config/hosted-infra-env-config.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uCAAuC,EACvC,sBAAsB,EACtB,yBAAyB,GAK1B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,kBAAkB,EAAiC,MAAM,mCAAmC,CAAC;AACtG,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAiBtE;;;GAGG;AACH,MAAM,OAAO,mCAAoC,SAAQ,KAAK;IACnD,MAAM,CAAoB;IAEnC,YAAY,gBAAwB,EAAE,cAAsB,EAAE,MAAyB;QACrF,KAAK,CAAC;YACJ,oDAAoD,gBAAgB,oCAAoC,cAAc,GAAG;YACzH,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,KAAK,EAAE,CAAC;SACzC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QACd,IAAI,CAAC,IAAI,GAAG,qCAAqC,CAAC;QAClD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;CACF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MA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AiB,CACxB,MAAiC,EACjC,IAAyB,EACzB,MAAgB;IAEhB,MAAM,QAAQ,GAAG,MAAM,CAAC,UAAU,CAAC;IACnC,IAAI,QAAQ,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAE7C,IAAI,IAAI,CAAC,OAAO,KAAK,sBAAsB,CAAC,UAAU,EAAE,CAAC;QACvD,MAAM,aAAa,GAAG,IAAI,CAAC,UAAU,EAAE,OAAO,KAAK,sBAAsB,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;QAC7H,OAAO;YACL,OAAO,EAAE,sBAAsB,CAAC,UAAU;YAC1C,MAAM,EAAE,QAAQ,CAAC,MAAM;YACvB,GAAG,CAAC,QAAQ,CAAC,gBAAgB,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,QAAQ,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACnG,GAAG,CAAC,aAAa,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACrE,CAAC;IACJ,CAAC;IAED,OAAO;QACL,OAAO,EAAE,sBAAsB,CAAC,cAAc;QAC9C,MAAM,EAAE,QAAQ,CAAC,MAAM;QACvB,GAAG,CAAC,QAAQ,CAAC,gBAAgB,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,QAAQ,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACpG,CAAC;AACJ,CAAC","sourcesContent":["import {\n BACKING_SERVICE_APPLICATION_NAME_FIELDS,\n isHostedInfraEnvConfig,\n WildoInfraEnvConfigSchema,\n type WildoAuthoredInfraEnvConfig,\n type WildoHostedInfraEnvConfig,\n type WildoInfraEnvConfig,\n type WildoInfraEnvConfigInput,\n} from './define-infra-env-config';\nimport { BackingServiceKind, type BackingServicesEnvConfig } from './shared/backing-services.schemas';\nimport { WildoDeploymentRuntime } from './shared/environment.schemas';\n\n/**\n * Everything {@link resolveHostedInfraEnvConfig} needs, with the file paths kept so every refusal can name\n * BOTH descriptors — the one being resolved and the one it depends on.\n */\nexport interface HostedInfraEnvConfigResolutionInput {\n hosted: WildoHostedInfraEnvConfig;\n hostedConfigPath: string;\n /** The host's descriptor as evaluated — refused if it is itself hosted. */\n host: WildoAuthoredInfraEnvConfig;\n /** Absolute. */\n hostApplicationRoot: string;\n /** Absolute. */\n hostConfigPath: string;\n}\n\n/**\n * A hosted descriptor that cannot be resolved against its host. Carries every issue at once: an author\n * fixing a descriptor should not have to rediscover the next problem one load at a time.\n */\nexport class HostedInfraEnvConfigResolutionError extends Error {\n readonly issues: readonly string[];\n\n constructor(hostedConfigPath: string, hostConfigPath: string, issues: readonly string[]) {\n super([\n `Cannot resolve the hosted environment descriptor ${hostedConfigPath} against its infrastructure host ${hostConfigPath}:`,\n ...issues.map((issue) => ` - ${issue}`),\n ].join('\\n'));\n this.name = 'HostedInfraEnvConfigResolutionError';\n this.issues = issues;\n }\n}\n\n/**\n * Turn a hosted descriptor into the environment it actually runs in: the host's platform, the\n * application's own settings.\n *\n * A PURE function of the two evaluated descriptors — no filesystem — so the whole merge contract is\n * testable without a checkout. `loadInfraEnvConfig` does the reading and calls this.\n *\n * ## What comes from where\n *\n * Decided per member by `INFRA_ENV_FIELD_OWNERSHIP`:\n * - HOST members (runtime, location, runtime environment, platform database, remote provider, platform\n * storage) are the host's, verbatim;\n * - APPLICATION members are the hosted descriptor's, verbatim;\n * - `backingServices`: the kinds are the ones the HOSTED application lists (its needs), each of which the\n * host must declare; each entry is the host's server with the host's own name removed, overlaid with the\n * application's name;\n * - `kubernetes`: the host's namespace and ingress class, the application's replica counts;\n * - `deployment`: the host's runtime, the application's branch and tagging. The image registry is the host's\n * `remoteProvider.registryEndpoint` like everything else about where images live (#1165).\n *\n * ## Why the kinds are the application's, not the host's\n *\n * Rejected: handing a hosted application every store its host declares. That would give Wonder CRM a\n * MongoDB address it never asked for, named by the shared `'wildo_app'` fallback — the exact collision\n * the name rule exists to prevent. Declaring a kind stays how an application says it needs a store; what\n * changes is that it cannot say where that store is.\n *\n * ## The merged result is re-validated\n *\n * The merge is parsed through the STANDALONE schema, so every cross-field rule that holds for an owning\n * environment (an application on PostgreSQL needs `backingServices.postgresql`; a local environment cannot\n * author `cdn`; …) holds for the effective hosted one. Validating the hosted descriptor alone could not do\n * that: it does not know whether its host is local or remote.\n */\nexport function resolveHostedInfraEnvConfig(input: HostedInfraEnvConfigResolutionInput): WildoInfraEnvConfig {\n const { hosted, host, hostedConfigPath, hostConfigPath } = input;\n const fail = (issues: readonly string[]): never => {\n throw new HostedInfraEnvConfigResolutionError(hostedConfigPath, hostConfigPath, issues);\n };\n\n if (isHostedInfraEnvConfig(host)) {\n fail([\n `the host is itself hosted (its infrastructureHost is '${host.infrastructureHost.applicationRoot}'). An infrastructure `\n + 'host must OWN its infrastructure: point infrastructureHost at the application that does.',\n ]);\n }\n const owningHost = host as WildoInfraEnvConfig;\n const issues: string[] = [];\n\n if (owningHost.environment !== hosted.environment) {\n issues.push(`the host describes environment '${owningHost.environment}', this descriptor '${hosted.environment}'. A hosted `\n + 'application shares its host\\'s platform for ONE environment at a time, so both must describe the same one.');\n }\n\n const backingServices = resolveBackingServices(hosted, owningHost, hostConfigPath, issues);\n const kubernetes = resolveKubernetes(hosted, owningHost, issues);\n const deployment = resolveDeployment(hosted, owningHost, issues);\n\n if (issues.length > 0) fail(issues);\n\n const merged: WildoInfraEnvConfigInput = {\n environment: hosted.environment,\n locationType: owningHost.locationType,\n runtimeEnvironment: owningHost.runtimeEnvironment,\n runtime: owningHost.runtime,\n serviceProfile: owningHost.serviceProfile,\n database: owningHost.database,\n applicationDatabase: hosted.applicationDatabase,\n publicDomain: hosted.publicDomain,\n serviceHosts: hosted.serviceHosts,\n kubernetes,\n remoteProvider: owningHost.remoteProvider,\n deployment,\n backingServices,\n logging: hosted.logging,\n observability: hosted.observability,\n providerSelection: hosted.providerSelection,\n providerConfigurations: hosted.providerConfigurations,\n email: hosted.email,\n ownershipDnsStandIn: hosted.ownershipDnsStandIn,\n systemsOfRecord: hosted.systemsOfRecord,\n documentationSite: hosted.documentationSite,\n applicationCreationVerification: hosted.applicationCreationVerification,\n serviceAuth: hosted.serviceAuth,\n csp: hosted.csp,\n cdn: hosted.cdn,\n platformStorage: owningHost.platformStorage,\n platformKeyManagement: owningHost.platformKeyManagement,\n devCompanion: hosted.devCompanion,\n infrastructureHost: {\n applicationRoot: input.hostApplicationRoot,\n infraConfigPath: hostConfigPath,\n },\n };\n\n const parsed = WildoInfraEnvConfigSchema.safeParse(merged);\n if (!parsed.success) {\n fail(parsed.error.issues.map((issue) => {\n const path = issue.path.length > 0 ? `${issue.path.join('.')}: ` : '';\n return `the effective environment (host platform + this application) is invalid — ${path}${issue.message}`;\n }));\n }\n return (parsed as { data: WildoInfraEnvConfig }).data;\n}\n\nfunction resolveBackingServices(\n hosted: WildoHostedInfraEnvConfig,\n host: WildoInfraEnvConfig,\n hostConfigPath: string,\n issues: string[],\n): BackingServicesEnvConfig {\n const resolved: Record<string, Record<string, unknown>> = {};\n for (const kind of Object.values(BackingServiceKind)) {\n const hostedEntry = hosted.backingServices?.[kind] as Record<string, unknown> | undefined;\n if (hostedEntry === undefined) continue;\n\n const hostEntry = host.backingServices[kind] as Record<string, unknown> | undefined;\n if (hostEntry === undefined) {\n issues.push(`this application uses backingServices.${kind}, which its host does not declare. Every backing service a `\n + `hosted application needs is declared by its host: add backingServices.${kind} to ${hostConfigPath}.`);\n continue;\n }\n\n const nameField = BACKING_SERVICE_APPLICATION_NAME_FIELDS[kind];\n const server = { ...hostEntry };\n if (nameField !== null) delete server[nameField.field];\n\n if (nameField?.mustDifferFromHost) {\n const hostName = hostEntry[nameField.field];\n if (hostName === undefined) {\n /*\n * An unnamed host slice uses the framework's SHARED fallback (`'wildo_app'`, the default vhost `/`, the\n * fixed bucket). Those constants live with the env generators, not here, so the collision cannot be\n * decided by value — and refusing is the only answer that stays right when a fallback changes. A host\n * whose store is shared names its own slice.\n */\n issues.push(`the host declares backingServices.${kind} without a ${nameField.field}, so it uses the framework's `\n + `shared fallback name — which an application on its platform could collide with without either naming it. `\n + `A host whose ${kind} is shared must name its own ${nameField.field}: add it to ${hostConfigPath}.`);\n } else if (hostName === hostedEntry[nameField.field]) {\n issues.push(`backingServices.${kind}.${nameField.field} is '${String(hostedEntry[nameField.field])}', the same as the `\n + `host's. Both applications would read and write one ${kind} ${nameField.field}: name this application's own.`);\n }\n }\n\n resolved[kind] = { ...server, ...hostedEntry };\n }\n return resolved as BackingServicesEnvConfig;\n}\n\nfunction resolveKubernetes(\n hosted: WildoHostedInfraEnvConfig,\n host: WildoInfraEnvConfig,\n issues: string[],\n): WildoInfraEnvConfigInput['kubernetes'] {\n const services = hosted.kubernetes?.services;\n if (host.kubernetes === undefined) {\n if (services !== undefined) {\n issues.push('kubernetes.services sets replica counts, but the host declares no kubernetes block: there is no cluster '\n + 'for them to apply to. Remove them, or run the host on Kubernetes.');\n }\n return undefined;\n }\n return {\n namespace: host.kubernetes.namespace,\n ...(host.kubernetes.ingressClass !== undefined ? { ingressClass: host.kubernetes.ingressClass } : {}),\n ...(services !== undefined ? { services } : {}),\n };\n}\n\nfunction resolveDeployment(\n hosted: WildoHostedInfraEnvConfig,\n host: WildoInfraEnvConfig,\n issues: string[],\n): WildoInfraEnvConfigInput['deployment'] {\n const authored = hosted.deployment;\n if (authored === undefined) return undefined;\n\n if (host.runtime === WildoDeploymentRuntime.KUBERNETES) {\n const hostNamespace = host.deployment?.runtime === WildoDeploymentRuntime.KUBERNETES ? host.deployment.namespace : undefined;\n return {\n runtime: WildoDeploymentRuntime.KUBERNETES,\n branch: authored.branch,\n ...(authored.imageTagStrategy !== undefined ? { imageTagStrategy: authored.imageTagStrategy } : {}),\n ...(hostNamespace !== undefined ? { namespace: hostNamespace } : {}),\n };\n }\n\n return {\n runtime: WildoDeploymentRuntime.DOCKER_COMPOSE,\n branch: authored.branch,\n ...(authored.imageTagStrategy !== undefined ? { imageTagStrategy: authored.imageTagStrategy } : {}),\n };\n}\n"]}
|
|
@@ -20,6 +20,7 @@ export * from './shared/environment.schemas';
|
|
|
20
20
|
export * from './shared/infrastructure-defaults.schemas';
|
|
21
21
|
export * from './shared/k8s-utils';
|
|
22
22
|
export * from './shared/env-example-defaults';
|
|
23
|
+
export * from './config-module-resolution';
|
|
23
24
|
export * from './loader';
|
|
24
25
|
export * from './static-asset-import-noop';
|
|
25
26
|
export * from './owning-package-tsconfig';
|
|
@@ -35,4 +36,5 @@ export * from './provider-catalog-types';
|
|
|
35
36
|
export * from './provider-runtime-artifacts';
|
|
36
37
|
export * from './define-worker-config';
|
|
37
38
|
export * from './define-minion-config';
|
|
39
|
+
export * from './minion-liveness.contracts';
|
|
38
40
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/project-config/index.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC;AAClD,cAAc,sCAAsC,CAAC;AACrD,cAAc,uBAAuB,CAAC;AACtC,cAAc,oDAAoD,CAAC;AACnE,cAAc,sBAAsB,CAAC;AACrC,cAAc,wCAAwC,CAAC;AACvD,cAAc,mCAAmC,CAAC;AAClD,cAAc,0CAA0C,CAAC;AACzD,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kCAAkC,CAAC;AACjD,cAAc,oCAAoC,CAAC;AACnD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,sCAAsC,CAAC;AACrD,cAAc,oCAAoC,CAAC;AACnD,cAAc,sCAAsC,CAAC;AACrD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0CAA0C,CAAC;AACzD,cAAc,oBAAoB,CAAC;AACnC,cAAc,+BAA+B,CAAC;AAE9C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,UAAU,CAAC;AACzB,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6CAA6C,CAAC;AAC5D,cAAc,8CAA8C,CAAC;AAE7D,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4CAA4C,CAAC;AAC3D,cAAc,sBAAsB,CAAC;AACrC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC"}
|
|
@@ -20,6 +20,7 @@ export * from './shared/environment.schemas.js';
|
|
|
20
20
|
export * from './shared/infrastructure-defaults.schemas.js';
|
|
21
21
|
export * from './shared/k8s-utils.js';
|
|
22
22
|
export * from './shared/env-example-defaults.js';
|
|
23
|
+
export * from './config-module-resolution.js';
|
|
23
24
|
export * from './loader.js';
|
|
24
25
|
export * from './static-asset-import-noop.js';
|
|
25
26
|
export * from './owning-package-tsconfig.js';
|
|
@@ -35,4 +36,5 @@ export * from './provider-catalog-types.js';
|
|
|
35
36
|
export * from './provider-runtime-artifacts.js';
|
|
36
37
|
export * from './define-worker-config.js';
|
|
37
38
|
export * from './define-minion-config.js';
|
|
39
|
+
export * from './minion-liveness.contracts.js';
|
|
38
40
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/project-config/index.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC;AAClD,cAAc,sCAAsC,CAAC;AACrD,cAAc,uBAAuB,CAAC;AACtC,cAAc,oDAAoD,CAAC;AACnE,cAAc,sBAAsB,CAAC;AACrC,cAAc,wCAAwC,CAAC;AACvD,cAAc,mCAAmC,CAAC;AAClD,cAAc,0CAA0C,CAAC;AACzD,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kCAAkC,CAAC;AACjD,cAAc,oCAAoC,CAAC;AACnD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,sCAAsC,CAAC;AACrD,cAAc,oCAAoC,CAAC;AACnD,cAAc,sCAAsC,CAAC;AACrD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0CAA0C,CAAC;AACzD,cAAc,oBAAoB,CAAC;AACnC,cAAc,+BAA+B,CAAC;AAE9C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,UAAU,CAAC;AACzB,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6CAA6C,CAAC;AAC5D,cAAc,8CAA8C,CAAC;AAE7D,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4CAA4C,CAAC;AAC3D,cAAc,sBAAsB,CAAC;AACrC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC","sourcesContent":["export * from './shared/backing-services.schemas';\nexport * from './shared/backing-service-servability';\nexport * from './shared/auth.schemas';\nexport * from './shared/application-creation-verification.schemas';\nexport * from './shared/cdn.schemas';\nexport * from './shared/systems-of-record-env.schemas';\nexport * from './shared/platform-storage.schemas';\nexport * from './shared/platform-key-management.schemas';\nexport * from './shared/csp.schemas';\nexport * from './shared/csp-defaults';\nexport * from './shared/csp-emit';\nexport * from './shared/infra-service.schemas';\nexport * from './shared/infra-providers.schemas';\nexport * from './shared/platform-services.schemas';\nexport * from './shared/data-services.schemas';\nexport * from './shared/application-modules.schemas';\nexport * from './shared/application-modules.utils';\nexport * from './shared/service-definitions.schemas';\nexport * from './shared/environment.schemas';\nexport * from './shared/infrastructure-defaults.schemas';\nexport * from './shared/k8s-utils';\nexport * from './shared/env-example-defaults';\n\nexport * from './config-module-resolution';\nexport * from './loader';\nexport * from './static-asset-import-noop';\nexport * from './owning-package-tsconfig';\nexport * from './application-public-pricing-catalog.loader';\nexport * from './application-served-public-documents.loader';\n\nexport * from './define-framework-config';\nexport * from './define-infra-env-config';\nexport * from './hosted-infra-env-config';\nexport * from './shared/minion-platform-access.vocabulary';\nexport * from './define-saas-config';\nexport * from './provider-companion-discovery';\nexport * from './provider-catalog-types';\nexport * from './provider-runtime-artifacts';\nexport * from './define-worker-config';\nexport * from './define-minion-config';\nexport * from './minion-liveness.contracts';\n"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether modules in `fromDirectory` (a package root, or a directory inside one) resolve the very `zod` that THIS
|
|
3
|
+
* package's `@wildo-ai/zod-decorators` decorates, so that they may be evaluated against this package's built framework
|
|
4
|
+
* packages (#3440).
|
|
5
|
+
*
|
|
6
|
+
* Asked by every read that evaluates an application's own modules with `ConfigModuleResolution.LOADER_INSTANCES`: the
|
|
7
|
+
* shared library behind the pricing catalogue, and the backend configuration whose `compliance` section the website
|
|
8
|
+
* reads (#2998). Not exported from the package: it answers a question about THIS copy's own resolution.
|
|
9
|
+
*
|
|
10
|
+
* Under `loader-instances` the decorators come from the copy this package resolves, already evaluated and patched onto
|
|
11
|
+
* ITS `zod`; the fresh module graph cannot reach them, since they are imported natively. The library's own
|
|
12
|
+
* `import { z } from 'zod'` is resolved from the library. When the two `zod` files differ, the library's schemas lack
|
|
13
|
+
* the decorators and fail with `z.literal(...).systemEnum is not a function`, which is #2598 by another road. A
|
|
14
|
+
* website's copy of this package and its application's shared library share one `zod` (one package store); the CLI's
|
|
15
|
+
* copy, in a framework checkout, does not. Any doubt (a `zod` that does not resolve) answers no, and the read keeps the
|
|
16
|
+
* inferred resolution, whose fresh graph evaluates the decorators onto the library's `zod`.
|
|
17
|
+
*/
|
|
18
|
+
export declare function sharesThisPackagesZod(fromDirectory: string): boolean;
|
|
19
|
+
//# sourceMappingURL=loader-instances-zod.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loader-instances-zod.d.ts","sourceRoot":"","sources":["../../../src/project-config/loader-instances-zod.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,qBAAqB,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAMpE"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { realpathSync } from 'node:fs';
|
|
2
|
+
import { findPackageJSON } from 'node:module';
|
|
3
|
+
import { join } from 'node:path';
|
|
4
|
+
import { pathToFileURL } from 'node:url';
|
|
5
|
+
/**
|
|
6
|
+
* Whether modules in `fromDirectory` (a package root, or a directory inside one) resolve the very `zod` that THIS
|
|
7
|
+
* package's `@wildo-ai/zod-decorators` decorates, so that they may be evaluated against this package's built framework
|
|
8
|
+
* packages (#3440).
|
|
9
|
+
*
|
|
10
|
+
* Asked by every read that evaluates an application's own modules with `ConfigModuleResolution.LOADER_INSTANCES`: the
|
|
11
|
+
* shared library behind the pricing catalogue, and the backend configuration whose `compliance` section the website
|
|
12
|
+
* reads (#2998). Not exported from the package: it answers a question about THIS copy's own resolution.
|
|
13
|
+
*
|
|
14
|
+
* Under `loader-instances` the decorators come from the copy this package resolves, already evaluated and patched onto
|
|
15
|
+
* ITS `zod`; the fresh module graph cannot reach them, since they are imported natively. The library's own
|
|
16
|
+
* `import { z } from 'zod'` is resolved from the library. When the two `zod` files differ, the library's schemas lack
|
|
17
|
+
* the decorators and fail with `z.literal(...).systemEnum is not a function`, which is #2598 by another road. A
|
|
18
|
+
* website's copy of this package and its application's shared library share one `zod` (one package store); the CLI's
|
|
19
|
+
* copy, in a framework checkout, does not. Any doubt (a `zod` that does not resolve) answers no, and the read keeps the
|
|
20
|
+
* inferred resolution, whose fresh graph evaluates the decorators onto the library's `zod`.
|
|
21
|
+
*/
|
|
22
|
+
export function sharesThisPackagesZod(fromDirectory) {
|
|
23
|
+
const zodDecoratorsPackageJson = resolvedPackageJson('@wildo-ai/zod-decorators', import.meta.url);
|
|
24
|
+
if (zodDecoratorsPackageJson === undefined)
|
|
25
|
+
return false;
|
|
26
|
+
const decoratedZod = resolvedPackageJson('zod', pathToFileURL(zodDecoratorsPackageJson).href);
|
|
27
|
+
const libraryZod = resolvedPackageJson('zod', pathToFileURL(join(fromDirectory, 'package.json')).href);
|
|
28
|
+
return decoratedZod !== undefined && decoratedZod === libraryZod;
|
|
29
|
+
}
|
|
30
|
+
/** The real path of `specifier`'s `package.json` as ESM resolution from `parentURL` finds it, or `undefined`. */
|
|
31
|
+
function resolvedPackageJson(specifier, parentURL) {
|
|
32
|
+
try {
|
|
33
|
+
const packageJson = findPackageJSON(specifier, parentURL);
|
|
34
|
+
return packageJson === undefined ? undefined : realpathSync(packageJson);
|
|
35
|
+
}
|
|
36
|
+
catch {
|
|
37
|
+
return undefined;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=loader-instances-zod.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loader-instances-zod.js","sourceRoot":"","sources":["../../../src/project-config/loader-instances-zod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,qBAAqB,CAAC,aAAqB;IACzD,MAAM,wBAAwB,GAAG,mBAAmB,CAAC,0BAA0B,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAClG,IAAI,wBAAwB,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC;IACzD,MAAM,YAAY,GAAG,mBAAmB,CAAC,KAAK,EAAE,aAAa,CAAC,wBAAwB,CAAC,CAAC,IAAI,CAAC,CAAC;IAC9F,MAAM,UAAU,GAAG,mBAAmB,CAAC,KAAK,EAAE,aAAa,CAAC,IAAI,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IACvG,OAAO,YAAY,KAAK,SAAS,IAAI,YAAY,KAAK,UAAU,CAAC;AACnE,CAAC;AAED,iHAAiH;AACjH,SAAS,mBAAmB,CAAC,SAAiB,EAAE,SAAiB;IAC/D,IAAI,CAAC;QACH,MAAM,WAAW,GAAG,eAAe,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;QAC1D,OAAO,WAAW,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC;IAC3E,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC","sourcesContent":["import { realpathSync } from 'node:fs';\nimport { findPackageJSON } from 'node:module';\nimport { join } from 'node:path';\nimport { pathToFileURL } from 'node:url';\n\n/**\n * Whether modules in `fromDirectory` (a package root, or a directory inside one) resolve the very `zod` that THIS\n * package's `@wildo-ai/zod-decorators` decorates, so that they may be evaluated against this package's built framework\n * packages (#3440).\n *\n * Asked by every read that evaluates an application's own modules with `ConfigModuleResolution.LOADER_INSTANCES`: the\n * shared library behind the pricing catalogue, and the backend configuration whose `compliance` section the website\n * reads (#2998). Not exported from the package: it answers a question about THIS copy's own resolution.\n *\n * Under `loader-instances` the decorators come from the copy this package resolves, already evaluated and patched onto\n * ITS `zod`; the fresh module graph cannot reach them, since they are imported natively. The library's own\n * `import { z } from 'zod'` is resolved from the library. When the two `zod` files differ, the library's schemas lack\n * the decorators and fail with `z.literal(...).systemEnum is not a function`, which is #2598 by another road. A\n * website's copy of this package and its application's shared library share one `zod` (one package store); the CLI's\n * copy, in a framework checkout, does not. Any doubt (a `zod` that does not resolve) answers no, and the read keeps the\n * inferred resolution, whose fresh graph evaluates the decorators onto the library's `zod`.\n */\nexport function sharesThisPackagesZod(fromDirectory: string): boolean {\n const zodDecoratorsPackageJson = resolvedPackageJson('@wildo-ai/zod-decorators', import.meta.url);\n if (zodDecoratorsPackageJson === undefined) return false;\n const decoratedZod = resolvedPackageJson('zod', pathToFileURL(zodDecoratorsPackageJson).href);\n const libraryZod = resolvedPackageJson('zod', pathToFileURL(join(fromDirectory, 'package.json')).href);\n return decoratedZod !== undefined && decoratedZod === libraryZod;\n}\n\n/** The real path of `specifier`'s `package.json` as ESM resolution from `parentURL` finds it, or `undefined`. */\nfunction resolvedPackageJson(specifier: string, parentURL: string): string | undefined {\n try {\n const packageJson = findPackageJSON(specifier, parentURL);\n return packageJson === undefined ? undefined : realpathSync(packageJson);\n } catch {\n return undefined;\n }\n}\n"]}
|