@wildo-ai/platform-config-lib 1.1.10 → 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 +83 -0
- package/dist/esm/blueprint/anchored-region.d.ts.map +1 -0
- package/dist/esm/blueprint/anchored-region.js +263 -0
- package/dist/esm/blueprint/anchored-region.js.map +1 -0
- package/dist/esm/blueprint/blueprint.schemas.d.ts +600 -0
- package/dist/esm/blueprint/blueprint.schemas.d.ts.map +1 -0
- package/dist/esm/blueprint/blueprint.schemas.js +638 -0
- package/dist/esm/blueprint/blueprint.schemas.js.map +1 -0
- 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.js.map +1 -1
- package/dist/esm/bootstrap/bootstrap.contracts.d.ts +13 -1
- package/dist/esm/bootstrap/bootstrap.contracts.d.ts.map +1 -1
- package/dist/esm/bootstrap/bootstrap.contracts.js +6 -0
- package/dist/esm/bootstrap/bootstrap.contracts.js.map +1 -1
- package/dist/esm/bootstrap/bootstrap.schemas.d.ts +29 -4
- package/dist/esm/bootstrap/bootstrap.schemas.d.ts.map +1 -1
- package/dist/esm/bootstrap/bootstrap.schemas.js +29 -4
- package/dist/esm/bootstrap/bootstrap.schemas.js.map +1 -1
- package/dist/esm/bootstrap/platform-runtime-env.contracts.d.ts +131 -2
- package/dist/esm/bootstrap/platform-runtime-env.contracts.d.ts.map +1 -1
- package/dist/esm/bootstrap/platform-runtime-env.contracts.js +139 -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.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 +249 -0
- package/dist/esm/bootstrap/runtime-response-integrity.d.ts.map +1 -0
- package/dist/esm/bootstrap/runtime-response-integrity.js +353 -0
- package/dist/esm/bootstrap/runtime-response-integrity.js.map +1 -0
- package/dist/esm/bootstrap/runtime-secret-env.contracts.d.ts +32 -0
- package/dist/esm/bootstrap/runtime-secret-env.contracts.d.ts.map +1 -0
- package/dist/esm/bootstrap/runtime-secret-env.contracts.js +43 -0
- package/dist/esm/bootstrap/runtime-secret-env.contracts.js.map +1 -0
- package/dist/esm/bootstrap/runtime-topology.contracts.js.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 +51 -0
- package/dist/esm/canonical-json/rfc8785-canonical-json.d.ts.map +1 -0
- package/dist/esm/canonical-json/rfc8785-canonical-json.js +231 -0
- package/dist/esm/canonical-json/rfc8785-canonical-json.js.map +1 -0
- 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 +20 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +20 -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 +278 -0
- package/dist/esm/key-management/approval-seal-verifier.d.ts.map +1 -0
- package/dist/esm/key-management/approval-seal-verifier.js +355 -0
- package/dist/esm/key-management/approval-seal-verifier.js.map +1 -0
- package/dist/esm/key-management/approval-seal.contracts.d.ts +128 -0
- package/dist/esm/key-management/approval-seal.contracts.d.ts.map +1 -0
- package/dist/esm/key-management/approval-seal.contracts.js +135 -0
- package/dist/esm/key-management/approval-seal.contracts.js.map +1 -0
- package/dist/esm/key-management/data-key.contracts.d.ts +106 -0
- package/dist/esm/key-management/data-key.contracts.d.ts.map +1 -0
- package/dist/esm/key-management/data-key.contracts.js +54 -0
- package/dist/esm/key-management/data-key.contracts.js.map +1 -0
- package/dist/esm/key-management/es256-jws.d.ts +60 -0
- package/dist/esm/key-management/es256-jws.d.ts.map +1 -0
- package/dist/esm/key-management/es256-jws.js +135 -0
- package/dist/esm/key-management/es256-jws.js.map +1 -0
- package/dist/esm/key-management/key-provider.spi.d.ts +158 -0
- package/dist/esm/key-management/key-provider.spi.d.ts.map +1 -0
- package/dist/esm/key-management/key-provider.spi.js +38 -0
- package/dist/esm/key-management/key-provider.spi.js.map +1 -0
- package/dist/esm/key-management/keyring-rotation.contracts.d.ts +83 -0
- package/dist/esm/key-management/keyring-rotation.contracts.d.ts.map +1 -0
- package/dist/esm/key-management/keyring-rotation.contracts.js +101 -0
- package/dist/esm/key-management/keyring-rotation.contracts.js.map +1 -0
- package/dist/esm/key-management/keyring-status.contracts.d.ts +59 -0
- package/dist/esm/key-management/keyring-status.contracts.d.ts.map +1 -0
- package/dist/esm/key-management/keyring-status.contracts.js +45 -0
- package/dist/esm/key-management/keyring-status.contracts.js.map +1 -0
- 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 +91 -0
- package/dist/esm/key-management/signature-request.contracts.d.ts.map +1 -0
- package/dist/esm/key-management/signature-request.contracts.js +96 -0
- package/dist/esm/key-management/signature-request.contracts.js.map +1 -0
- package/dist/esm/key-management/signing-log-export.contracts.d.ts +215 -0
- package/dist/esm/key-management/signing-log-export.contracts.d.ts.map +1 -0
- package/dist/esm/key-management/signing-log-export.contracts.js +268 -0
- package/dist/esm/key-management/signing-log-export.contracts.js.map +1 -0
- package/dist/esm/key-management/vault-custody.contracts.d.ts +98 -0
- package/dist/esm/key-management/vault-custody.contracts.d.ts.map +1 -0
- package/dist/esm/key-management/vault-custody.contracts.js +154 -0
- package/dist/esm/key-management/vault-custody.contracts.js.map +1 -0
- 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 +13 -17
- package/dist/esm/lockfile/lockfile-io.d.ts.map +1 -1
- package/dist/esm/lockfile/lockfile-io.js +29 -30
- package/dist/esm/lockfile/lockfile-io.js.map +1 -1
- package/dist/esm/lockfile/materialize-infra-section.d.ts +22 -20
- package/dist/esm/lockfile/materialize-infra-section.d.ts.map +1 -1
- package/dist/esm/lockfile/materialize-infra-section.js +13 -14
- package/dist/esm/lockfile/materialize-infra-section.js.map +1 -1
- package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.d.ts +27 -249
- package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.d.ts.map +1 -1
- package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.js +28 -3
- 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 +22 -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 +26 -0
- package/dist/esm/project-config/application-served-public-documents.loader.d.ts.map +1 -0
- package/dist/esm/project-config/application-served-public-documents.loader.js +86 -0
- package/dist/esm/project-config/application-served-public-documents.loader.js.map +1 -0
- 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.js.map +1 -1
- package/dist/esm/project-config/define-infra-env-config.d.ts +344 -69
- package/dist/esm/project-config/define-infra-env-config.d.ts.map +1 -1
- package/dist/esm/project-config/define-infra-env-config.js +194 -143
- 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 +82 -348
- package/dist/esm/project-config/define-saas-config.d.ts.map +1 -1
- package/dist/esm/project-config/define-saas-config.js +262 -103
- 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 +4 -1
- package/dist/esm/project-config/hosted-infra-env-config.js.map +1 -1
- package/dist/esm/project-config/index.d.ts +5 -0
- package/dist/esm/project-config/index.d.ts.map +1 -1
- package/dist/esm/project-config/index.js +5 -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 +39 -16
- package/dist/esm/project-config/npm-version-range.js.map +1 -1
- package/dist/esm/project-config/owning-package-tsconfig.d.ts +15 -0
- package/dist/esm/project-config/owning-package-tsconfig.d.ts.map +1 -0
- package/dist/esm/project-config/owning-package-tsconfig.js +29 -0
- package/dist/esm/project-config/owning-package-tsconfig.js.map +1 -0
- package/dist/esm/project-config/provider-catalog-types.js.map +1 -1
- package/dist/esm/project-config/provider-companion-discovery.d.ts +4 -4
- package/dist/esm/project-config/provider-companion-discovery.d.ts.map +1 -1
- package/dist/esm/project-config/provider-companion-discovery.js +16 -10
- package/dist/esm/project-config/provider-companion-discovery.js.map +1 -1
- package/dist/esm/project-config/provider-runtime-artifacts.d.ts +103 -49
- package/dist/esm/project-config/provider-runtime-artifacts.d.ts.map +1 -1
- package/dist/esm/project-config/provider-runtime-artifacts.js +216 -16
- 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.js.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.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 +36 -9
- package/dist/esm/project-config/shared/csp-defaults.d.ts.map +1 -1
- package/dist/esm/project-config/shared/csp-defaults.js +54 -11
- 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 -85
- package/dist/esm/project-config/shared/csp.schemas.d.ts.map +1 -1
- package/dist/esm/project-config/shared/csp.schemas.js +40 -13
- 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 +101 -8
- package/dist/esm/project-config/shared/environment.schemas.d.ts.map +1 -1
- package/dist/esm/project-config/shared/environment.schemas.js +128 -9
- 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.js.map +1 -1
- package/dist/esm/project-config/shared/infrastructure-defaults.schemas.d.ts +2 -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 +4 -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 +24 -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 +25 -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 +276 -0
- package/dist/esm/project-config/shared/platform-key-management.schemas.d.ts.map +1 -0
- package/dist/esm/project-config/shared/platform-key-management.schemas.js +296 -0
- package/dist/esm/project-config/shared/platform-key-management.schemas.js.map +1 -0
- 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.js.map +1 -1
- package/dist/esm/registry/index.d.ts +3 -3
- package/dist/esm/registry/index.d.ts.map +1 -1
- package/dist/esm/registry/index.js +3 -3
- package/dist/esm/registry/index.js.map +1 -1
- package/dist/esm/registry/local-checkout-source.d.ts +22 -2
- package/dist/esm/registry/local-checkout-source.d.ts.map +1 -1
- package/dist/esm/registry/local-checkout-source.js +66 -3
- package/dist/esm/registry/local-checkout-source.js.map +1 -1
- package/dist/esm/registry/lockfile-modules-section.schemas.d.ts +11 -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 +40 -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 +324 -74
- package/dist/esm/registry/module-manifest.schemas.d.ts.map +1 -1
- package/dist/esm/registry/module-manifest.schemas.js +377 -19
- package/dist/esm/registry/module-manifest.schemas.js.map +1 -1
- package/dist/esm/registry/module-search.schemas.d.ts +2 -0
- package/dist/esm/registry/module-search.schemas.d.ts.map +1 -1
- package/dist/esm/registry/module-search.schemas.js +14 -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 +103 -5
- package/dist/esm/registry/registry-errors.d.ts.map +1 -1
- package/dist/esm/registry/registry-errors.js +213 -6
- package/dist/esm/registry/registry-errors.js.map +1 -1
- package/dist/esm/registry/registry-keys.schemas.js.map +1 -1
- package/dist/esm/registry/registry-section-schemas.constants.d.ts +5 -0
- 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 +72 -0
- package/dist/esm/registry/registry-url-resolution.d.ts.map +1 -0
- package/dist/esm/registry/registry-url-resolution.js +157 -0
- package/dist/esm/registry/registry-url-resolution.js.map +1 -0
- 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.js.map +1 -1
- package/dist/esm/schemas/framework-secrets.schemas.d.ts +48 -0
- package/dist/esm/schemas/framework-secrets.schemas.d.ts.map +1 -1
- package/dist/esm/schemas/framework-secrets.schemas.js +53 -0
- 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.js.map +1 -1
- package/dist/esm/schemas/platform-application-secrets.schemas.d.ts +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.js.map +1 -1
- package/dist/esm/workspace-scope/application-subject-manifest.js.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
|
@@ -1 +1 @@
|
|
|
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
|
|
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,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IAC/C,UAAU,EAAE,CAAC,CAAC,MAA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E;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":["../../../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,
|
|
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,
|
|
@@ -90,6 +90,8 @@ export function resolveHostedInfraEnvConfig(input) {
|
|
|
90
90
|
observability: hosted.observability,
|
|
91
91
|
providerSelection: hosted.providerSelection,
|
|
92
92
|
providerConfigurations: hosted.providerConfigurations,
|
|
93
|
+
email: hosted.email,
|
|
94
|
+
ownershipDnsStandIn: hosted.ownershipDnsStandIn,
|
|
93
95
|
systemsOfRecord: hosted.systemsOfRecord,
|
|
94
96
|
documentationSite: hosted.documentationSite,
|
|
95
97
|
applicationCreationVerification: hosted.applicationCreationVerification,
|
|
@@ -97,6 +99,7 @@ export function resolveHostedInfraEnvConfig(input) {
|
|
|
97
99
|
csp: hosted.csp,
|
|
98
100
|
cdn: hosted.cdn,
|
|
99
101
|
platformStorage: owningHost.platformStorage,
|
|
102
|
+
platformKeyManagement: owningHost.platformKeyManagement,
|
|
100
103
|
devCompanion: hosted.devCompanion,
|
|
101
104
|
infrastructureHost: {
|
|
102
105
|
applicationRoot: input.hostApplicationRoot,
|
|
@@ -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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ACpG,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 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 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,MAAM,UAAU,2BAA2B,CAAC,KAA0C;IACpF,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAgB,EAAE,cAAc,EAAE,GAAG,KAAK,CAAC;IACjE,MAAM,IAAI,GAAG,CAAC,MAAyB,EAAS,EAAE;QAChD,MAAM,IAAI,m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,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"]}
|
|
@@ -5,6 +5,7 @@ export * from './shared/application-creation-verification.schemas';
|
|
|
5
5
|
export * from './shared/cdn.schemas';
|
|
6
6
|
export * from './shared/systems-of-record-env.schemas';
|
|
7
7
|
export * from './shared/platform-storage.schemas';
|
|
8
|
+
export * from './shared/platform-key-management.schemas';
|
|
8
9
|
export * from './shared/csp.schemas';
|
|
9
10
|
export * from './shared/csp-defaults';
|
|
10
11
|
export * from './shared/csp-emit';
|
|
@@ -19,9 +20,12 @@ export * from './shared/environment.schemas';
|
|
|
19
20
|
export * from './shared/infrastructure-defaults.schemas';
|
|
20
21
|
export * from './shared/k8s-utils';
|
|
21
22
|
export * from './shared/env-example-defaults';
|
|
23
|
+
export * from './config-module-resolution';
|
|
22
24
|
export * from './loader';
|
|
23
25
|
export * from './static-asset-import-noop';
|
|
26
|
+
export * from './owning-package-tsconfig';
|
|
24
27
|
export * from './application-public-pricing-catalog.loader';
|
|
28
|
+
export * from './application-served-public-documents.loader';
|
|
25
29
|
export * from './define-framework-config';
|
|
26
30
|
export * from './define-infra-env-config';
|
|
27
31
|
export * from './hosted-infra-env-config';
|
|
@@ -32,4 +36,5 @@ export * from './provider-catalog-types';
|
|
|
32
36
|
export * from './provider-runtime-artifacts';
|
|
33
37
|
export * from './define-worker-config';
|
|
34
38
|
export * from './define-minion-config';
|
|
39
|
+
export * from './minion-liveness.contracts';
|
|
35
40
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
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,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kCA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A2B,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"}
|
|
@@ -5,6 +5,7 @@ export * from './shared/application-creation-verification.schemas.js';
|
|
|
5
5
|
export * from './shared/cdn.schemas.js';
|
|
6
6
|
export * from './shared/systems-of-record-env.schemas.js';
|
|
7
7
|
export * from './shared/platform-storage.schemas.js';
|
|
8
|
+
export * from './shared/platform-key-management.schemas.js';
|
|
8
9
|
export * from './shared/csp.schemas.js';
|
|
9
10
|
export * from './shared/csp-defaults.js';
|
|
10
11
|
export * from './shared/csp-emit.js';
|
|
@@ -19,9 +20,12 @@ export * from './shared/environment.schemas.js';
|
|
|
19
20
|
export * from './shared/infrastructure-defaults.schemas.js';
|
|
20
21
|
export * from './shared/k8s-utils.js';
|
|
21
22
|
export * from './shared/env-example-defaults.js';
|
|
23
|
+
export * from './config-module-resolution.js';
|
|
22
24
|
export * from './loader.js';
|
|
23
25
|
export * from './static-asset-import-noop.js';
|
|
26
|
+
export * from './owning-package-tsconfig.js';
|
|
24
27
|
export * from './application-public-pricing-catalog.loader.js';
|
|
28
|
+
export * from './application-served-public-documents.loader.js';
|
|
25
29
|
export * from './define-framework-config.js';
|
|
26
30
|
export * from './define-infra-env-config.js';
|
|
27
31
|
export * from './hosted-infra-env-config.js';
|
|
@@ -32,4 +36,5 @@ export * from './provider-catalog-types.js';
|
|
|
32
36
|
export * from './provider-runtime-artifacts.js';
|
|
33
37
|
export * from './define-worker-config.js';
|
|
34
38
|
export * from './define-minion-config.js';
|
|
39
|
+
export * from './minion-liveness.contracts.js';
|
|
35
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"]}
|
|
@@ -4,6 +4,7 @@ import { type WildoInfraEnvConfig } from './define-infra-env-config';
|
|
|
4
4
|
import type { WildoMinionConfig } from './define-minion-config';
|
|
5
5
|
import type { WildoWorkerConfig } from './define-worker-config';
|
|
6
6
|
import { type ConfigArtifactsLocationOptions } from '../workspace-scope/workspace-scope.schemas';
|
|
7
|
+
import { ConfigModuleResolution } from './config-module-resolution';
|
|
7
8
|
export interface LoadConfigOptions {
|
|
8
9
|
/**
|
|
9
10
|
* Optional explicit owner zone for generated loader artifacts.
|
|
@@ -13,20 +14,14 @@ export interface LoadConfigOptions {
|
|
|
13
14
|
*/
|
|
14
15
|
artifactLocation?: ConfigArtifactsLocationOptions;
|
|
15
16
|
/**
|
|
16
|
-
* Module-resolution strategy for jiti while evaluating the config file.
|
|
17
|
+
* Module-resolution strategy for jiti while evaluating the config file. See {@link ConfigModuleResolution} for what
|
|
18
|
+
* each member means.
|
|
17
19
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* - `framework-source`: resolve framework-owned packages to monorepo source
|
|
22
|
-
* files when the Wildo framework workspace is available. Intended only for
|
|
23
|
-
* internal framework development and source-first companion discovery.
|
|
24
|
-
*
|
|
25
|
-
* When omitted, the loader auto-detects the mode: configs inside a Wildo
|
|
26
|
-
* framework workspace use `framework-source`; external app repos use
|
|
27
|
-
* `package`.
|
|
20
|
+
* When omitted, the loader auto-detects the mode: configs inside a Wildo framework workspace use
|
|
21
|
+
* {@link ConfigModuleResolution.FRAMEWORK_SOURCE}; external app repos use {@link ConfigModuleResolution.PACKAGE}.
|
|
22
|
+
* {@link ConfigModuleResolution.LOADER_INSTANCES} is only ever chosen explicitly.
|
|
28
23
|
*/
|
|
29
|
-
moduleResolution?:
|
|
24
|
+
moduleResolution?: ConfigModuleResolution;
|
|
30
25
|
/**
|
|
31
26
|
* Package-owned module aliases the loaded source needs in order to resolve
|
|
32
27
|
* its own internal specifiers.
|
|
@@ -65,7 +60,83 @@ export interface LoadConfigOptions {
|
|
|
65
60
|
* a fresh read from the package's authored source, not its `dist`.
|
|
66
61
|
*/
|
|
67
62
|
freshModuleCache?: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Compile JSX in the loaded graph, with the automatic runtime from `importSource` (`react` for a website). Off by
|
|
65
|
+
* default: an application's specifications and configs contain no JSX. A website source module that builds JSX at
|
|
66
|
+
* import time (an icon map) needs it, or it fails with "React is not defined".
|
|
67
|
+
*/
|
|
68
|
+
jsx?: {
|
|
69
|
+
readonly runtime: 'automatic';
|
|
70
|
+
readonly importSource: string;
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* Give each transpiled module the loaded graph reaches its OWN evaluation boundary (#3258), so a module whose body
|
|
74
|
+
* throws is handed to {@link ModuleEvaluationBoundary.absorb} instead of failing the module that imported it — and,
|
|
75
|
+
* through it, the whole graph. Off by default: every config and every other reader keeps the ordinary all-or-nothing
|
|
76
|
+
* evaluation. See {@link ModuleEvaluationBoundary}.
|
|
77
|
+
*/
|
|
78
|
+
moduleEvaluationBoundary?: ModuleEvaluationBoundary;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* What a module boundary hands its handler when a bounded module fails: the module's file, what it threw (for a
|
|
82
|
+
* source that could not be transpiled, a `SyntaxError` naming the file, line and column), and its `exports` object —
|
|
83
|
+
* holding whatever it assigned before the throw, for the handler to keep or reset — and every bounded module it imports,
|
|
84
|
+
* directly or not, so a handler can tell a failure of its own from what a failed import did to it.
|
|
85
|
+
*/
|
|
86
|
+
export interface ModuleEvaluationFailure {
|
|
87
|
+
readonly filename: string;
|
|
88
|
+
readonly error: unknown;
|
|
89
|
+
readonly moduleExports: Record<string, unknown>;
|
|
90
|
+
readonly importedFilenames: readonly string[];
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* A per-module evaluation boundary for one load (#3258).
|
|
94
|
+
*
|
|
95
|
+
* ## Why
|
|
96
|
+
*
|
|
97
|
+
* jiti evaluates a TypeScript graph as one chain of `require`/`import` calls, so a throw in any module body propagates
|
|
98
|
+
* through every importer up to the entry and the load fails as a whole. For a reader whose input is MANY independent
|
|
99
|
+
* authored declarations aggregated by one entry (an application's specifications package: `companion-exports.ts`
|
|
100
|
+
* imports every module), that turns one broken file into "nothing can be read".
|
|
101
|
+
*
|
|
102
|
+
* ## How
|
|
103
|
+
*
|
|
104
|
+
* Every module jiti TRANSPILES whose file `appliesTo` accepts has its transpiled body wrapped in a `try`: a throw — or
|
|
105
|
+
* a transpile failure, which jiti otherwise reports after the module returns — is given to `absorb`. When `absorb`
|
|
106
|
+
* returns `true` the module completes normally with whatever its `exports` hold, and its importers carry on. When it
|
|
107
|
+
* returns anything else, the error propagates exactly as it would have without a boundary. What absorbing MEANS (what
|
|
108
|
+
* to record, whether the module's partial exports are kept) is entirely the handler's: the loader has no opinion.
|
|
109
|
+
*
|
|
110
|
+
* - **The entry is never bounded.** Its failure leaves nothing to return, so it fails the load as before.
|
|
111
|
+
* - **Only transpiled modules are reached.** A module jiti hands to Node natively (an ESM `.js` file in a
|
|
112
|
+
* `"type": "module"` package — a sibling package's compiled build) is not; its throw reaches the bounded module that
|
|
113
|
+
* imported it, which is where it is absorbed.
|
|
114
|
+
* - **The handler is per load.** It travels on the jiti options of this load (`require.options` inside a module), so
|
|
115
|
+
* two overlapping loads with different handlers never reach each other's, and the wrapped code holds no reference
|
|
116
|
+
* to any one load — which is what lets jiti's on-disk transpile cache keep it. Wrapped output is cached in a cache
|
|
117
|
+
* directory of its own, so an unbounded load never reads a wrapped module and a bounded load never reads an
|
|
118
|
+
* unwrapped one. Run without the handler (it is absent from the options), a wrapped module rethrows: identical to
|
|
119
|
+
* no boundary.
|
|
120
|
+
* - **Semantics inside the module are unchanged.** The body runs as the body of an inner function (async when jiti
|
|
121
|
+
* evaluates the module asynchronously), so its `"use strict"` directive and its hoisting are what they were, and the
|
|
122
|
+
* wrapper sits on the body's first line so stack frames keep their line numbers. One difference, without effect: the
|
|
123
|
+
* directive no longer heads jiti's own wrapper, so the `this` handed to the body is `globalThis` rather than
|
|
124
|
+
* `undefined` — but an ES module's transpiled body never reads its top-level `this` (Babel rewrites it to
|
|
125
|
+
* `undefined`).
|
|
126
|
+
*/
|
|
127
|
+
export interface ModuleEvaluationBoundary {
|
|
128
|
+
/** Whether the module at this absolute path gets a boundary. */
|
|
129
|
+
readonly appliesTo: (absolutePath: string) => boolean;
|
|
130
|
+
/** Handle a bounded module's failure. `true` absorbs it; anything else lets it propagate. */
|
|
131
|
+
readonly absorb: (failure: ModuleEvaluationFailure) => boolean;
|
|
68
132
|
}
|
|
133
|
+
/**
|
|
134
|
+
* Wrap one transpiled module body in its evaluation boundary (see {@link ModuleEvaluationBoundary}). Exported so the
|
|
135
|
+
* wrapper's shape can be pinned without a jiti instance.
|
|
136
|
+
*/
|
|
137
|
+
export declare function wrapModuleInEvaluationBoundary(code: string, options: {
|
|
138
|
+
readonly async: boolean;
|
|
139
|
+
}): string;
|
|
69
140
|
/**
|
|
70
141
|
* Load and evaluate a TypeScript config file via jiti.
|
|
71
142
|
* The file must `export default defineXxxConfig({...})`.
|
|
@@ -88,10 +159,19 @@ export declare function loadConfig<T>(filePath: string, options?: LoadConfigOpti
|
|
|
88
159
|
* application authors. Returns `undefined` when the module does not export `exportName`.
|
|
89
160
|
*/
|
|
90
161
|
export declare function loadConfigExport<T>(filePath: string, exportName: string, options?: LoadConfigOptions): Promise<T | undefined>;
|
|
162
|
+
/**
|
|
163
|
+
* Load EVERY export of an application-authored TypeScript module, through the same resolver `loadConfig`
|
|
164
|
+
* uses. For a reader that names the export it wants only after loading (a landed specification module).
|
|
165
|
+
*
|
|
166
|
+
* Exists so such a reader need not reach for `tsx`'s `tsImport`, which calls `module.register` on EVERY
|
|
167
|
+
* call: each call adds a loader-thread hook chain to the process for good, after which every module
|
|
168
|
+
* resolution in it is a synchronous round trip to that thread (#3208).
|
|
169
|
+
*/
|
|
170
|
+
export declare function loadConfigModuleExports(filePath: string, options?: LoadConfigOptions): Promise<Record<string, unknown>>;
|
|
91
171
|
/**
|
|
92
172
|
* Which file a package's companion subpath resolves to.
|
|
93
173
|
*
|
|
94
|
-
* Authored source wins when either option asks for it:
|
|
174
|
+
* Authored source wins when either option asks for it: {@link ConfigModuleResolution.FRAMEWORK_SOURCE} (a package inside the
|
|
95
175
|
* framework workspace), or `preferAuthoredSource` (a reader whose contract is the working tree, wherever the package
|
|
96
176
|
* lives — see {@link loadPackageCompanionExport}). Otherwise the declared `exports` entry wins, and authored source
|
|
97
177
|
* is only the fallback when nothing is built.
|
|
@@ -115,6 +195,40 @@ export declare function resolvePackageCompanionEntryPath(packageRoot: string, su
|
|
|
115
195
|
*/
|
|
116
196
|
export declare function normalizeCompilerPathAliasesForLoader(packageRoot: string, compilerPathAliases: Readonly<Record<string, readonly string[]>>): Record<string, string>;
|
|
117
197
|
export declare function loadPackageCompanionExport<T>(packageRoot: string, subpath?: string, options?: LoadConfigOptions): Promise<T>;
|
|
198
|
+
/**
|
|
199
|
+
* The aliases of {@link ConfigModuleResolution.LOADER_INSTANCES} (#3440): this package, and every `@wildo-ai/*` package it
|
|
200
|
+
* depends on, mapped subpath by subpath to the built file its `import` condition names, in the copy THIS package
|
|
201
|
+
* resolves. Those files are plain ES modules, which jiti hands to Node's own `import` rather than transpiling, so a
|
|
202
|
+
* process that already runs this package (the CLI does) gets back the modules it holds: evaluating a configuration
|
|
203
|
+
* costs only the configuration's own modules.
|
|
204
|
+
*
|
|
205
|
+
* ## Why it exists
|
|
206
|
+
*
|
|
207
|
+
* In a framework checkout `framework-source` evaluates every framework package a configuration imports from SOURCE,
|
|
208
|
+
* through jiti, beside the built copy the calling process already runs. Measured on Wonder Todos (2026-11-06):
|
|
209
|
+
* `wildo.saas.config.ts` imports enums from `@wildo-ai/saas-models` and `@wildo-ai/external-connectors-models`, and
|
|
210
|
+
* that evaluation transpiled 533 `saas-models` modules and kept 351 MB of heap, 1.9 s, to answer which services the
|
|
211
|
+
* application declares. With these aliases the same read keeps 7 MB, 0.1 s. One copy of each framework package per
|
|
212
|
+
* thread is also what keeps a caller's own `instanceof` and zod schemas meeting the configuration's (#2598).
|
|
213
|
+
*
|
|
214
|
+
* ## What it does not cover
|
|
215
|
+
*
|
|
216
|
+
* - A framework package this package does not depend on (`@wildo-ai/saas-backend-lib`, imported by a backend
|
|
217
|
+
* configuration) resolves from the configuration's own location, as in `package` mode: its installed build.
|
|
218
|
+
* - A package with ANY declared built file absent (an unbuilt checkout, or a watcher mid-emit that has written the root
|
|
219
|
+
* but not a new subpath yet) gets no alias at all, so the whole package resolves as in `package` mode. Aliasing only
|
|
220
|
+
* the files that exist would be worse than none: jiti matches an alias key as a prefix at a `/`, so a missing
|
|
221
|
+
* subpath would be rewritten onto the root's FILE (`…/index.js/<subpath>`) and fail as a module that does not exist.
|
|
222
|
+
* - A process running this package from SOURCE (a test runner) holds the source modules, not the build these aliases
|
|
223
|
+
* name, so there the configuration gets one more copy: correct, just not shared.
|
|
224
|
+
*
|
|
225
|
+
* Rejected: making this the default for one-shot readers. A reader that relies on `framework-source` to see a framework
|
|
226
|
+
* edit before its watcher has rebuilt (the dev companion's source-first discovery) would silently read the build.
|
|
227
|
+
* Choosing it is the caller's statement that the build its own process runs is the framework it means.
|
|
228
|
+
*
|
|
229
|
+
* Exported so the aliases can be pinned against a fixture package; nothing else should call it.
|
|
230
|
+
*/
|
|
231
|
+
export declare function buildLoaderInstanceAliases(loaderPackageRoot: string): Record<string, string>;
|
|
118
232
|
/**
|
|
119
233
|
* Load a `wildo.saas.config.ts` file.
|
|
120
234
|
* Returns `null` if the file doesn't exist (non-throwing variant for optional loading).
|
|
@@ -138,8 +252,11 @@ export declare function resolveInfraEnvConfigPath(saasRoot: string, envName: str
|
|
|
138
252
|
* does not need it; a long-lived reader whose question is "what does the file say NOW" does — the dev companion
|
|
139
253
|
* reads the application's declared store through here, and a cached evaluation would keep answering with the
|
|
140
254
|
* store the file declared when the process first read it (see {@link LoadConfigOptions.freshModuleCache}).
|
|
255
|
+
*
|
|
256
|
+
* `moduleResolution` decides how the file's own imports are evaluated (see {@link LoadConfigOptions.moduleResolution}),
|
|
257
|
+
* for the application's descriptor and, when it is hosted, for its host's alike. Omitted, the loader infers it.
|
|
141
258
|
*/
|
|
142
|
-
export declare function loadInfraEnvConfig(saasRoot: string, envName: string, options?: Pick<LoadConfigOptions, 'freshModuleCache'>): Promise<{
|
|
259
|
+
export declare function loadInfraEnvConfig(saasRoot: string, envName: string, options?: Pick<LoadConfigOptions, 'freshModuleCache' | 'moduleResolution'>): Promise<{
|
|
143
260
|
path: string;
|
|
144
261
|
config: WildoInfraEnvConfig;
|
|
145
262
|
} | null>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../../src/project-config/loader.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../../src/project-config/loader.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAIL,KAAK,mBAAmB,EACzB,MAAM,2BAA2B,CAAC;AAInC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAIL,KAAK,8BAA8B,EACpC,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAEpE,MAAM,WAAW,iBAAiB;IAChC;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,8BAA8B,CAAC;IAClD;;;;;;;OAOG;IACH,gBAAgB,CAAC,EAAE,sBAAsB,CAAC;IAC1C;;;;;;;;;;;;;;OAcG;IACH,oBAAoB,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACxD;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;;OAIG;IAEH,GAAG,CAAC,EAAE;QAAE,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;QAAC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;KAAE,CAAC;IACvE;;;;;OAKG;IACH,wBAAwB,CAAC,EAAE,wBAAwB,CAAC;CACrD;AAED;;;;;GAKG;AACH,MAAM,WAAW,u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