@wildo-ai/platform-config-lib 1.0.1 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +34 -0
- package/dist/esm/.builder.pid +9 -0
- package/dist/esm/_unimplemented/index.d.ts +3 -0
- package/dist/esm/_unimplemented/index.d.ts.map +1 -0
- package/dist/esm/_unimplemented/index.js +3 -0
- package/dist/esm/_unimplemented/index.js.map +1 -0
- package/dist/esm/_unimplemented/soft-warn.d.ts +124 -0
- package/dist/esm/_unimplemented/soft-warn.d.ts.map +1 -0
- package/dist/esm/_unimplemented/soft-warn.js +170 -0
- package/dist/esm/_unimplemented/soft-warn.js.map +1 -0
- package/dist/esm/_unimplemented/unimplemented-field-warning.d.ts +137 -0
- package/dist/esm/_unimplemented/unimplemented-field-warning.d.ts.map +1 -0
- package/dist/esm/_unimplemented/unimplemented-field-warning.js +153 -0
- package/dist/esm/_unimplemented/unimplemented-field-warning.js.map +1 -0
- package/dist/esm/bootstrap/application-backend-env.contracts.d.ts.map +1 -1
- package/dist/esm/bootstrap/application-backend-env.contracts.js +1 -1
- package/dist/esm/bootstrap/application-backend-env.contracts.js.map +1 -1
- package/dist/esm/bootstrap/application-creation-verification-env.contracts.d.ts +13 -0
- package/dist/esm/bootstrap/application-creation-verification-env.contracts.d.ts.map +1 -0
- package/dist/esm/bootstrap/application-creation-verification-env.contracts.js +14 -0
- package/dist/esm/bootstrap/application-creation-verification-env.contracts.js.map +1 -0
- package/dist/esm/bootstrap/bootstrap-planner.d.ts +1 -1
- package/dist/esm/bootstrap/bootstrap-planner.d.ts.map +1 -1
- package/dist/esm/bootstrap/bootstrap-planner.js +1 -1
- package/dist/esm/bootstrap/bootstrap-planner.js.map +1 -1
- package/dist/esm/bootstrap/bootstrap.contracts.d.ts +141 -37
- package/dist/esm/bootstrap/bootstrap.contracts.d.ts.map +1 -1
- package/dist/esm/bootstrap/bootstrap.contracts.js +104 -18
- package/dist/esm/bootstrap/bootstrap.contracts.js.map +1 -1
- package/dist/esm/bootstrap/bootstrap.schemas.d.ts +430 -421
- package/dist/esm/bootstrap/bootstrap.schemas.d.ts.map +1 -1
- package/dist/esm/bootstrap/bootstrap.schemas.js +383 -21
- package/dist/esm/bootstrap/bootstrap.schemas.js.map +1 -1
- package/dist/esm/bootstrap/platform-runtime-env.contracts.d.ts +213 -8
- package/dist/esm/bootstrap/platform-runtime-env.contracts.d.ts.map +1 -1
- package/dist/esm/bootstrap/platform-runtime-env.contracts.js +230 -5
- package/dist/esm/bootstrap/platform-runtime-env.contracts.js.map +1 -1
- package/dist/esm/bootstrap/runtime-backing-service-access.d.ts +79 -0
- package/dist/esm/bootstrap/runtime-backing-service-access.d.ts.map +1 -0
- package/dist/esm/bootstrap/runtime-backing-service-access.js +83 -0
- package/dist/esm/bootstrap/runtime-backing-service-access.js.map +1 -0
- package/dist/esm/bootstrap/runtime-network-policy.d.ts +63 -0
- package/dist/esm/bootstrap/runtime-network-policy.d.ts.map +1 -0
- package/dist/esm/bootstrap/runtime-network-policy.js +104 -0
- package/dist/esm/bootstrap/runtime-network-policy.js.map +1 -0
- package/dist/esm/bootstrap/runtime-network-topology.d.ts +78 -0
- package/dist/esm/bootstrap/runtime-network-topology.d.ts.map +1 -0
- package/dist/esm/bootstrap/runtime-network-topology.js +134 -0
- package/dist/esm/bootstrap/runtime-network-topology.js.map +1 -0
- package/dist/esm/bootstrap/runtime-platform-access.d.ts +67 -0
- package/dist/esm/bootstrap/runtime-platform-access.d.ts.map +1 -0
- package/dist/esm/bootstrap/runtime-platform-access.js +57 -0
- package/dist/esm/bootstrap/runtime-platform-access.js.map +1 -0
- package/dist/esm/bootstrap/runtime-principal.contracts.d.ts +173 -0
- package/dist/esm/bootstrap/runtime-principal.contracts.d.ts.map +1 -0
- package/dist/esm/bootstrap/runtime-principal.contracts.js +218 -0
- package/dist/esm/bootstrap/runtime-principal.contracts.js.map +1 -0
- package/dist/esm/bootstrap/runtime-topology.contracts.d.ts +112 -1
- package/dist/esm/bootstrap/runtime-topology.contracts.d.ts.map +1 -1
- package/dist/esm/bootstrap/runtime-topology.contracts.js +141 -8
- package/dist/esm/bootstrap/runtime-topology.contracts.js.map +1 -1
- package/dist/esm/config-authoring.entry.d.ts +3 -0
- package/dist/esm/config-authoring.entry.d.ts.map +1 -0
- package/dist/esm/config-authoring.entry.js +5 -0
- package/dist/esm/config-authoring.entry.js.map +1 -0
- package/dist/esm/credentials/credential-generator.service.d.ts.map +1 -1
- package/dist/esm/credentials/credential-generator.service.js +1 -1
- package/dist/esm/credentials/credential-generator.service.js.map +1 -1
- package/dist/esm/index.d.ts +30 -15
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +16 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/lockfile/canonical-json.d.ts +41 -0
- package/dist/esm/lockfile/canonical-json.d.ts.map +1 -0
- package/dist/esm/lockfile/canonical-json.js +56 -0
- package/dist/esm/lockfile/canonical-json.js.map +1 -0
- package/dist/esm/lockfile/lockfile-io.d.ts +231 -0
- package/dist/esm/lockfile/lockfile-io.d.ts.map +1 -0
- package/dist/esm/lockfile/lockfile-io.js +303 -0
- package/dist/esm/lockfile/lockfile-io.js.map +1 -0
- package/dist/esm/lockfile/materialize-infra-section.d.ts +99 -0
- package/dist/esm/lockfile/materialize-infra-section.d.ts.map +1 -0
- package/dist/esm/lockfile/materialize-infra-section.js +153 -0
- package/dist/esm/lockfile/materialize-infra-section.js.map +1 -0
- package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.d.ts +522 -0
- package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.d.ts.map +1 -0
- package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.js +116 -0
- package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.js.map +1 -0
- package/dist/esm/project-config/define-framework-config.d.ts +36 -10
- package/dist/esm/project-config/define-framework-config.d.ts.map +1 -1
- package/dist/esm/project-config/define-framework-config.js +67 -3
- package/dist/esm/project-config/define-framework-config.js.map +1 -1
- package/dist/esm/project-config/define-infra-env-config.d.ts +570 -0
- package/dist/esm/project-config/define-infra-env-config.d.ts.map +1 -0
- package/dist/esm/project-config/define-infra-env-config.js +726 -0
- package/dist/esm/project-config/define-infra-env-config.js.map +1 -0
- package/dist/esm/project-config/define-minion-config.d.ts +221 -23
- package/dist/esm/project-config/define-minion-config.d.ts.map +1 -1
- package/dist/esm/project-config/define-minion-config.js +228 -11
- package/dist/esm/project-config/define-minion-config.js.map +1 -1
- package/dist/esm/project-config/define-saas-config.d.ts +427 -218
- package/dist/esm/project-config/define-saas-config.d.ts.map +1 -1
- package/dist/esm/project-config/define-saas-config.js +704 -75
- package/dist/esm/project-config/define-saas-config.js.map +1 -1
- package/dist/esm/project-config/define-worker-config.d.ts +106 -10
- package/dist/esm/project-config/define-worker-config.d.ts.map +1 -1
- package/dist/esm/project-config/define-worker-config.js +99 -9
- package/dist/esm/project-config/define-worker-config.js.map +1 -1
- package/dist/esm/project-config/index.d.ts +28 -21
- package/dist/esm/project-config/index.d.ts.map +1 -1
- package/dist/esm/project-config/index.js +14 -7
- package/dist/esm/project-config/index.js.map +1 -1
- package/dist/esm/project-config/loader.d.ts +120 -10
- package/dist/esm/project-config/loader.d.ts.map +1 -1
- package/dist/esm/project-config/loader.js +290 -38
- package/dist/esm/project-config/loader.js.map +1 -1
- package/dist/esm/project-config/minion-local-provider-registration.d.ts +69 -0
- package/dist/esm/project-config/minion-local-provider-registration.d.ts.map +1 -0
- package/dist/esm/project-config/minion-local-provider-registration.js +72 -0
- package/dist/esm/project-config/minion-local-provider-registration.js.map +1 -0
- package/dist/esm/project-config/provider-catalog-types.d.ts +12 -0
- package/dist/esm/project-config/provider-catalog-types.d.ts.map +1 -0
- package/dist/esm/project-config/provider-catalog-types.js +49 -0
- package/dist/esm/project-config/provider-catalog-types.js.map +1 -0
- package/dist/esm/project-config/provider-companion-discovery.d.ts +24 -0
- package/dist/esm/project-config/provider-companion-discovery.d.ts.map +1 -0
- package/dist/esm/project-config/provider-companion-discovery.js +244 -0
- package/dist/esm/project-config/provider-companion-discovery.js.map +1 -0
- package/dist/esm/project-config/provider-runtime-artifacts.d.ts +297 -0
- package/dist/esm/project-config/provider-runtime-artifacts.d.ts.map +1 -0
- package/dist/esm/project-config/provider-runtime-artifacts.js +860 -0
- package/dist/esm/project-config/provider-runtime-artifacts.js.map +1 -0
- package/dist/esm/project-config/shared/application-creation-verification.schemas.d.ts +18 -0
- package/dist/esm/project-config/shared/application-creation-verification.schemas.d.ts.map +1 -0
- package/dist/esm/project-config/shared/application-creation-verification.schemas.js +25 -0
- package/dist/esm/project-config/shared/application-creation-verification.schemas.js.map +1 -0
- package/dist/esm/project-config/shared/application-modules.schemas.d.ts +10 -2
- package/dist/esm/project-config/shared/application-modules.schemas.d.ts.map +1 -1
- package/dist/esm/project-config/shared/application-modules.schemas.js +12 -1
- package/dist/esm/project-config/shared/application-modules.schemas.js.map +1 -1
- package/dist/esm/project-config/shared/application-modules.utils.d.ts +2 -1
- package/dist/esm/project-config/shared/application-modules.utils.d.ts.map +1 -1
- package/dist/esm/project-config/shared/application-modules.utils.js +6 -1
- package/dist/esm/project-config/shared/application-modules.utils.js.map +1 -1
- package/dist/esm/project-config/shared/auth.schemas.d.ts +102 -0
- package/dist/esm/project-config/shared/auth.schemas.d.ts.map +1 -0
- package/dist/esm/project-config/shared/auth.schemas.js +100 -0
- package/dist/esm/project-config/shared/auth.schemas.js.map +1 -0
- package/dist/esm/project-config/shared/backing-services.schemas.d.ts +316 -39
- package/dist/esm/project-config/shared/backing-services.schemas.d.ts.map +1 -1
- package/dist/esm/project-config/shared/backing-services.schemas.js +359 -24
- package/dist/esm/project-config/shared/backing-services.schemas.js.map +1 -1
- package/dist/esm/project-config/shared/cdn.example.d.ts +14 -0
- package/dist/esm/project-config/shared/cdn.example.d.ts.map +1 -0
- package/dist/esm/project-config/shared/cdn.example.js +38 -0
- package/dist/esm/project-config/shared/cdn.example.js.map +1 -0
- package/dist/esm/project-config/shared/cdn.schemas.d.ts +182 -0
- package/dist/esm/project-config/shared/cdn.schemas.d.ts.map +1 -0
- package/dist/esm/project-config/shared/cdn.schemas.js +151 -0
- package/dist/esm/project-config/shared/cdn.schemas.js.map +1 -0
- package/dist/esm/project-config/shared/csp-defaults.d.ts +92 -0
- package/dist/esm/project-config/shared/csp-defaults.d.ts.map +1 -0
- package/dist/esm/project-config/shared/csp-defaults.js +195 -0
- package/dist/esm/project-config/shared/csp-defaults.js.map +1 -0
- package/dist/esm/project-config/shared/csp-emit.d.ts +106 -0
- package/dist/esm/project-config/shared/csp-emit.d.ts.map +1 -0
- package/dist/esm/project-config/shared/csp-emit.js +305 -0
- package/dist/esm/project-config/shared/csp-emit.js.map +1 -0
- package/dist/esm/project-config/shared/csp.schemas.d.ts +266 -0
- package/dist/esm/project-config/shared/csp.schemas.d.ts.map +1 -0
- package/dist/esm/project-config/shared/csp.schemas.js +281 -0
- package/dist/esm/project-config/shared/csp.schemas.js.map +1 -0
- package/dist/esm/project-config/shared/data-services.schemas.d.ts +45 -9
- package/dist/esm/project-config/shared/data-services.schemas.d.ts.map +1 -1
- package/dist/esm/project-config/shared/data-services.schemas.js +45 -9
- package/dist/esm/project-config/shared/data-services.schemas.js.map +1 -1
- package/dist/esm/project-config/shared/env-example-defaults.d.ts +0 -1
- package/dist/esm/project-config/shared/env-example-defaults.d.ts.map +1 -1
- package/dist/esm/project-config/shared/env-example-defaults.js +1 -2
- package/dist/esm/project-config/shared/env-example-defaults.js.map +1 -1
- package/dist/esm/project-config/shared/environment.schemas.d.ts +134 -8
- package/dist/esm/project-config/shared/environment.schemas.d.ts.map +1 -1
- package/dist/esm/project-config/shared/environment.schemas.js +185 -2
- package/dist/esm/project-config/shared/environment.schemas.js.map +1 -1
- package/dist/esm/project-config/shared/infra-providers.schemas.d.ts +779 -0
- package/dist/esm/project-config/shared/infra-providers.schemas.d.ts.map +1 -0
- package/dist/esm/project-config/shared/infra-providers.schemas.js +210 -0
- package/dist/esm/project-config/shared/infra-providers.schemas.js.map +1 -0
- package/dist/esm/project-config/shared/infra-service.schemas.d.ts +18 -0
- package/dist/esm/project-config/shared/infra-service.schemas.d.ts.map +1 -0
- package/dist/esm/project-config/shared/infra-service.schemas.js +16 -0
- package/dist/esm/project-config/shared/infra-service.schemas.js.map +1 -0
- package/dist/esm/project-config/shared/infrastructure-defaults.schemas.d.ts +83 -1
- package/dist/esm/project-config/shared/infrastructure-defaults.schemas.d.ts.map +1 -1
- package/dist/esm/project-config/shared/infrastructure-defaults.schemas.js +99 -2
- package/dist/esm/project-config/shared/infrastructure-defaults.schemas.js.map +1 -1
- package/dist/esm/project-config/shared/k8s-utils.d.ts +51 -7
- package/dist/esm/project-config/shared/k8s-utils.d.ts.map +1 -1
- package/dist/esm/project-config/shared/k8s-utils.js +59 -12
- package/dist/esm/project-config/shared/k8s-utils.js.map +1 -1
- package/dist/esm/project-config/shared/minion-platform-access.vocabulary.d.ts +31 -0
- package/dist/esm/project-config/shared/minion-platform-access.vocabulary.d.ts.map +1 -0
- package/dist/esm/project-config/shared/minion-platform-access.vocabulary.js +32 -0
- package/dist/esm/project-config/shared/minion-platform-access.vocabulary.js.map +1 -0
- package/dist/esm/project-config/shared/minion-resource-access.validation.d.ts +142 -0
- package/dist/esm/project-config/shared/minion-resource-access.validation.d.ts.map +1 -0
- package/dist/esm/project-config/shared/minion-resource-access.validation.js +159 -0
- package/dist/esm/project-config/shared/minion-resource-access.validation.js.map +1 -0
- package/dist/esm/project-config/shared/object-storage-session-policy.d.ts +100 -0
- package/dist/esm/project-config/shared/object-storage-session-policy.d.ts.map +1 -0
- package/dist/esm/project-config/shared/object-storage-session-policy.js +130 -0
- package/dist/esm/project-config/shared/object-storage-session-policy.js.map +1 -0
- package/dist/esm/project-config/shared/platform-services.schemas.d.ts +9 -14
- package/dist/esm/project-config/shared/platform-services.schemas.d.ts.map +1 -1
- package/dist/esm/project-config/shared/platform-services.schemas.js +13 -9
- package/dist/esm/project-config/shared/platform-services.schemas.js.map +1 -1
- package/dist/esm/project-config/shared/schema-version.schemas.d.ts +15 -0
- package/dist/esm/project-config/shared/schema-version.schemas.d.ts.map +1 -0
- package/dist/esm/project-config/shared/schema-version.schemas.js +40 -0
- package/dist/esm/project-config/shared/schema-version.schemas.js.map +1 -0
- package/dist/esm/project-config/shared/service-definitions.schemas.d.ts +283 -8
- package/dist/esm/project-config/shared/service-definitions.schemas.d.ts.map +1 -1
- package/dist/esm/project-config/shared/service-definitions.schemas.js +325 -8
- package/dist/esm/project-config/shared/service-definitions.schemas.js.map +1 -1
- package/dist/esm/registry/artifact-domain.schemas.d.ts +54 -0
- package/dist/esm/registry/artifact-domain.schemas.d.ts.map +1 -0
- package/dist/esm/registry/artifact-domain.schemas.js +40 -0
- package/dist/esm/registry/artifact-domain.schemas.js.map +1 -0
- package/dist/esm/registry/companion-api.schemas.d.ts +176 -0
- package/dist/esm/registry/companion-api.schemas.d.ts.map +1 -0
- package/dist/esm/registry/companion-api.schemas.js +165 -0
- package/dist/esm/registry/companion-api.schemas.js.map +1 -0
- package/dist/esm/registry/digest.schemas.d.ts +20 -0
- package/dist/esm/registry/digest.schemas.d.ts.map +1 -0
- package/dist/esm/registry/digest.schemas.js +21 -0
- package/dist/esm/registry/digest.schemas.js.map +1 -0
- package/dist/esm/registry/index.d.ts +33 -0
- package/dist/esm/registry/index.d.ts.map +1 -0
- package/dist/esm/registry/index.js +33 -0
- package/dist/esm/registry/index.js.map +1 -0
- package/dist/esm/registry/lockfile-modules-section.schemas.d.ts +107 -0
- package/dist/esm/registry/lockfile-modules-section.schemas.d.ts.map +1 -0
- package/dist/esm/registry/lockfile-modules-section.schemas.js +67 -0
- package/dist/esm/registry/lockfile-modules-section.schemas.js.map +1 -0
- package/dist/esm/registry/module-artifact.schemas.d.ts +94 -0
- package/dist/esm/registry/module-artifact.schemas.d.ts.map +1 -0
- package/dist/esm/registry/module-artifact.schemas.js +69 -0
- package/dist/esm/registry/module-artifact.schemas.js.map +1 -0
- package/dist/esm/registry/module-manifest.schemas.d.ts +134 -0
- package/dist/esm/registry/module-manifest.schemas.d.ts.map +1 -0
- package/dist/esm/registry/module-manifest.schemas.js +155 -0
- package/dist/esm/registry/module-manifest.schemas.js.map +1 -0
- package/dist/esm/registry/registry-config.schemas.d.ts +31 -0
- package/dist/esm/registry/registry-config.schemas.d.ts.map +1 -0
- package/dist/esm/registry/registry-config.schemas.js +24 -0
- package/dist/esm/registry/registry-config.schemas.js.map +1 -0
- package/dist/esm/registry/registry-defaults.constants.d.ts +37 -0
- package/dist/esm/registry/registry-defaults.constants.d.ts.map +1 -0
- package/dist/esm/registry/registry-defaults.constants.js +37 -0
- package/dist/esm/registry/registry-defaults.constants.js.map +1 -0
- package/dist/esm/registry/registry-errors.d.ts +109 -0
- package/dist/esm/registry/registry-errors.d.ts.map +1 -0
- package/dist/esm/registry/registry-errors.js +185 -0
- package/dist/esm/registry/registry-errors.js.map +1 -0
- package/dist/esm/registry/registry-section-schemas.constants.d.ts +39 -0
- package/dist/esm/registry/registry-section-schemas.constants.d.ts.map +1 -0
- package/dist/esm/registry/registry-section-schemas.constants.js +22 -0
- package/dist/esm/registry/registry-section-schemas.constants.js.map +1 -0
- package/dist/esm/release/framework-release.constants.d.ts +26 -1
- package/dist/esm/release/framework-release.constants.d.ts.map +1 -1
- package/dist/esm/release/framework-release.constants.js +27 -2
- package/dist/esm/release/framework-release.constants.js.map +1 -1
- package/dist/esm/schemas/framework-info.schemas.d.ts +1 -1
- package/dist/esm/schemas/framework-info.schemas.d.ts.map +1 -1
- package/dist/esm/schemas/framework-info.schemas.js +1 -1
- package/dist/esm/schemas/framework-info.schemas.js.map +1 -1
- package/dist/esm/schemas/framework-secrets.schemas.d.ts +5 -5
- package/dist/esm/schemas/framework-secrets.schemas.d.ts.map +1 -1
- package/dist/esm/schemas/framework-secrets.schemas.js +1 -1
- package/dist/esm/schemas/framework-secrets.schemas.js.map +1 -1
- package/dist/esm/schemas/platform-application-config.schemas.d.ts +1 -1
- package/dist/esm/schemas/platform-application-config.schemas.d.ts.map +1 -1
- package/dist/esm/schemas/platform-application-config.schemas.js +11 -2
- package/dist/esm/schemas/platform-application-config.schemas.js.map +1 -1
- package/dist/esm/schemas/platform-application-secrets.schemas.d.ts +7 -7
- package/dist/esm/schemas/platform-application-secrets.schemas.d.ts.map +1 -1
- package/dist/esm/schemas/platform-application-secrets.schemas.js +17 -2
- package/dist/esm/schemas/platform-application-secrets.schemas.js.map +1 -1
- package/dist/esm/schemas/platform-config.schemas.d.ts +12 -13
- package/dist/esm/schemas/platform-config.schemas.d.ts.map +1 -1
- package/dist/esm/schemas/platform-config.schemas.js +15 -3
- package/dist/esm/schemas/platform-config.schemas.js.map +1 -1
- package/dist/esm/workspace-scope/application-subject-manifest.d.ts +26 -0
- package/dist/esm/workspace-scope/application-subject-manifest.d.ts.map +1 -0
- package/dist/esm/workspace-scope/application-subject-manifest.js +43 -0
- package/dist/esm/workspace-scope/application-subject-manifest.js.map +1 -0
- package/dist/esm/workspace-scope/index.d.ts +5 -2
- package/dist/esm/workspace-scope/index.d.ts.map +1 -1
- package/dist/esm/workspace-scope/index.js +4 -1
- package/dist/esm/workspace-scope/index.js.map +1 -1
- package/dist/esm/workspace-scope/resolve-homes.d.ts +20 -0
- package/dist/esm/workspace-scope/resolve-homes.d.ts.map +1 -0
- package/dist/esm/workspace-scope/resolve-homes.js +62 -0
- package/dist/esm/workspace-scope/resolve-homes.js.map +1 -0
- package/dist/esm/workspace-scope/workspace-homes.schemas.d.ts +211 -0
- package/dist/esm/workspace-scope/workspace-homes.schemas.d.ts.map +1 -0
- package/dist/esm/workspace-scope/workspace-homes.schemas.js +113 -0
- package/dist/esm/workspace-scope/workspace-homes.schemas.js.map +1 -0
- package/dist/esm/workspace-scope/workspace-scope-detector.d.ts +10 -5
- package/dist/esm/workspace-scope/workspace-scope-detector.d.ts.map +1 -1
- package/dist/esm/workspace-scope/workspace-scope-detector.js +22 -36
- package/dist/esm/workspace-scope/workspace-scope-detector.js.map +1 -1
- package/dist/esm/workspace-scope/workspace-scope.schemas.d.ts +147 -58
- package/dist/esm/workspace-scope/workspace-scope.schemas.d.ts.map +1 -1
- package/dist/esm/workspace-scope/workspace-scope.schemas.js +174 -78
- package/dist/esm/workspace-scope/workspace-scope.schemas.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +31 -17
- package/dist/esm/credentials/credentials-provisioner.service.d.ts +0 -190
- package/dist/esm/credentials/credentials-provisioner.service.d.ts.map +0 -1
- package/dist/esm/credentials/credentials-provisioner.service.js +0 -278
- package/dist/esm/credentials/credentials-provisioner.service.js.map +0 -1
- package/dist/esm/infra-managers/infra-manager.models.d.ts +0 -146
- package/dist/esm/infra-managers/infra-manager.models.d.ts.map +0 -1
- package/dist/esm/infra-managers/infra-manager.models.js +0 -2
- package/dist/esm/infra-managers/infra-manager.models.js.map +0 -1
- package/dist/esm/infra-managers/mongo-atlas-manager.service.d.ts +0 -64
- package/dist/esm/infra-managers/mongo-atlas-manager.service.d.ts.map +0 -1
- package/dist/esm/infra-managers/mongo-atlas-manager.service.js +0 -307
- package/dist/esm/infra-managers/mongo-atlas-manager.service.js.map +0 -1
- package/dist/esm/infra-managers/postgresql-manager.service.d.ts +0 -115
- package/dist/esm/infra-managers/postgresql-manager.service.d.ts.map +0 -1
- package/dist/esm/infra-managers/postgresql-manager.service.js +0 -403
- package/dist/esm/infra-managers/postgresql-manager.service.js.map +0 -1
- package/dist/esm/infra-managers/rabbitmq-manager.service.d.ts +0 -64
- package/dist/esm/infra-managers/rabbitmq-manager.service.d.ts.map +0 -1
- package/dist/esm/infra-managers/rabbitmq-manager.service.js +0 -288
- package/dist/esm/infra-managers/rabbitmq-manager.service.js.map +0 -1
- package/dist/esm/infra-managers/redis-manager.service.d.ts +0 -78
- package/dist/esm/infra-managers/redis-manager.service.d.ts.map +0 -1
- package/dist/esm/infra-managers/redis-manager.service.js +0 -326
- package/dist/esm/infra-managers/redis-manager.service.js.map +0 -1
- package/dist/esm/project-config/define-infra-config.d.ts +0 -128
- package/dist/esm/project-config/define-infra-config.d.ts.map +0 -1
- package/dist/esm/project-config/define-infra-config.js +0 -87
- package/dist/esm/project-config/define-infra-config.js.map +0 -1
- package/dist/esm/project-config/define-platform-config.d.ts +0 -65
- package/dist/esm/project-config/define-platform-config.d.ts.map +0 -1
- package/dist/esm/project-config/define-platform-config.js +0 -22
- package/dist/esm/project-config/define-platform-config.js.map +0 -1
- package/dist/esm/project-config/define-platform-env-config.d.ts +0 -41
- package/dist/esm/project-config/define-platform-env-config.d.ts.map +0 -1
- package/dist/esm/project-config/define-platform-env-config.js +0 -45
- package/dist/esm/project-config/define-platform-env-config.js.map +0 -1
- package/dist/esm/project-config/define-project-config.d.ts +0 -38
- package/dist/esm/project-config/define-project-config.d.ts.map +0 -1
- package/dist/esm/project-config/define-project-config.js +0 -57
- package/dist/esm/project-config/define-project-config.js.map +0 -1
- package/dist/esm/project-config/define-sharing-policy.d.ts +0 -35
- package/dist/esm/project-config/define-sharing-policy.d.ts.map +0 -1
- package/dist/esm/project-config/define-sharing-policy.js +0 -30
- package/dist/esm/project-config/define-sharing-policy.js.map +0 -1
- package/dist/esm/project-config/sharing-policy-validation.d.ts +0 -40
- package/dist/esm/project-config/sharing-policy-validation.d.ts.map +0 -1
- package/dist/esm/project-config/sharing-policy-validation.js +0 -143
- package/dist/esm/project-config/sharing-policy-validation.js.map +0 -1
- package/dist/esm/runtime-bridge/platform-runtime-bridge.contracts.d.ts +0 -23
- package/dist/esm/runtime-bridge/platform-runtime-bridge.contracts.d.ts.map +0 -1
- package/dist/esm/runtime-bridge/platform-runtime-bridge.contracts.js +0 -13
- package/dist/esm/runtime-bridge/platform-runtime-bridge.contracts.js.map +0 -1
- package/src/bootstrap/application-backend-env.contracts.ts +0 -17
- package/src/bootstrap/bootstrap-planner.ts +0 -46
- package/src/bootstrap/bootstrap.contracts.ts +0 -251
- package/src/bootstrap/bootstrap.schemas.ts +0 -164
- package/src/bootstrap/platform-runtime-env.contracts.ts +0 -99
- package/src/bootstrap/runtime-topology.contracts.ts +0 -102
- package/src/credentials/credential-generator.service.ts +0 -39
- package/src/index.ts +0 -16
- package/src/project-config/__tests__/application-modules.utils.test.ts +0 -53
- package/src/project-config/__tests__/define-framework-config.test.ts +0 -43
- package/src/project-config/__tests__/define-saas-config.test.ts +0 -210
- package/src/project-config/__tests__/loader.test.ts +0 -100
- package/src/project-config/define-framework-config.ts +0 -44
- package/src/project-config/define-infra-config.ts +0 -168
- package/src/project-config/define-minion-config.ts +0 -27
- package/src/project-config/define-platform-config.ts +0 -28
- package/src/project-config/define-platform-env-config.ts +0 -59
- package/src/project-config/define-project-config.ts +0 -63
- package/src/project-config/define-saas-config.ts +0 -171
- package/src/project-config/define-sharing-policy.ts +0 -36
- package/src/project-config/define-worker-config.ts +0 -27
- package/src/project-config/index.ts +0 -23
- package/src/project-config/loader.ts +0 -220
- package/src/project-config/shared/application-modules.schemas.ts +0 -12
- package/src/project-config/shared/application-modules.utils.ts +0 -65
- package/src/project-config/shared/backing-services.schemas.ts +0 -59
- package/src/project-config/shared/data-services.schemas.ts +0 -58
- package/src/project-config/shared/env-example-defaults.ts +0 -50
- package/src/project-config/shared/environment.schemas.ts +0 -136
- package/src/project-config/shared/infrastructure-defaults.schemas.ts +0 -47
- package/src/project-config/shared/k8s-utils.ts +0 -56
- package/src/project-config/shared/platform-services.schemas.ts +0 -33
- package/src/project-config/shared/service-definitions.schemas.ts +0 -38
- package/src/project-config/sharing-policy-validation.ts +0 -159
- package/src/release/framework-release.constants.ts +0 -2
- package/src/schemas/__tests__/platform-config.schemas.test.ts +0 -90
- package/src/schemas/framework-info.schemas.ts +0 -13
- package/src/schemas/framework-secrets.schemas.ts +0 -19
- package/src/schemas/platform-application-config.schemas.ts +0 -25
- package/src/schemas/platform-application-secrets.schemas.ts +0 -78
- package/src/schemas/platform-config.schemas.ts +0 -45
- package/src/workspace-scope/index.ts +0 -2
- package/src/workspace-scope/workspace-scope-detector.ts +0 -98
- package/src/workspace-scope/workspace-scope.schemas.ts +0 -224
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The object-storage session policy — ONE description, shared by the party that
|
|
3
|
+
* MINTS the credential and the party that VALIDATES a declaration against the
|
|
4
|
+
* size limit.
|
|
5
|
+
*
|
|
6
|
+
* ## Why this lives here rather than on the broker
|
|
7
|
+
*
|
|
8
|
+
* It was a method on `ObjectStorageStsBrokerService` in apps-manager. Pure — no
|
|
9
|
+
* I/O, no state — but unreachable from `minion-resource-access.validation.ts`,
|
|
10
|
+
* which must refuse a `resourceAccess` declaration whose policy would not fit.
|
|
11
|
+
* A validator computing length from its OWN model of the policy shape is a second
|
|
12
|
+
* copy: change the entries here and the estimate silently drifts, so a declaration
|
|
13
|
+
* passes validation and then fails at issuance — the very failure the check exists
|
|
14
|
+
* to prevent, arriving through the check itself.
|
|
15
|
+
*
|
|
16
|
+
* `platform-config-lib` is contracts-and-helpers only, and both consumers already
|
|
17
|
+
* depend on it (`saas-backend-lib` and `platform-infra-providers`), so no new
|
|
18
|
+
* dependency edge was needed.
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
21
|
+
* The largest inline session policy an `AssumeRole` call will accept.
|
|
22
|
+
*
|
|
23
|
+
* **This is the MINIMUM across supported providers, not "the MinIO limit".** A
|
|
24
|
+
* declaration valid anywhere must be valid everywhere, so the validator enforces
|
|
25
|
+
* the tightest known ceiling. Today that is MinIO's, measured 2026-08-12 against a
|
|
26
|
+
* live server by growing a policy until it refused:
|
|
27
|
+
*
|
|
28
|
+
* InvalidParameterValue Session policy should not exceed 2048 characters
|
|
29
|
+
*
|
|
30
|
+
* AWS S3 is NOT yet measured. Whoever measures it must LOWER this if AWS is
|
|
31
|
+
* tighter — the name says "session policy max", not "MinIO limit", precisely so
|
|
32
|
+
* that obligation is not read as somebody else's.
|
|
33
|
+
*/
|
|
34
|
+
export declare const OBJECT_STORAGE_SESSION_POLICY_MAX_CHARS = 2048;
|
|
35
|
+
export interface ObjectStorageSessionPolicyInput {
|
|
36
|
+
bucket: string;
|
|
37
|
+
/** Platform-minted. The application cannot influence it; that is the whole confinement. */
|
|
38
|
+
applicationId: string;
|
|
39
|
+
/**
|
|
40
|
+
* Storage names (from `resolveGrantStorageNames`) to confine to, one prefix each.
|
|
41
|
+
*
|
|
42
|
+
* Omitted or empty ⇒ confine to the whole application subtree, which is what a
|
|
43
|
+
* runtime holding an application-wide credential gets. Supplying names narrows
|
|
44
|
+
* it per declared resource.
|
|
45
|
+
*/
|
|
46
|
+
storageNames?: readonly string[];
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Build the inline session policy document.
|
|
50
|
+
*
|
|
51
|
+
* ## The `*applications/` collapse
|
|
52
|
+
*
|
|
53
|
+
* One pattern per confinement, not two. An application may author a
|
|
54
|
+
* `bucketPrefix`, so a key is either `applications/<id>/…` or
|
|
55
|
+
* `<authored>/applications/<id>/…`. This used to be covered by TWO entries; a
|
|
56
|
+
* single leading `*` (which matches zero-or-more characters) covers both.
|
|
57
|
+
*
|
|
58
|
+
* That halves the policy — measured 308 → 154 characters per declared resource,
|
|
59
|
+
* which against the 2048 ceiling is the difference between ~5 and ~12 resources.
|
|
60
|
+
* At the two-entry size a plausible minion (todos, lists, tags, users,
|
|
61
|
+
* organizations) is already at the limit, so this is a PREREQUISITE for
|
|
62
|
+
* per-resource confinement rather than an optimisation.
|
|
63
|
+
*
|
|
64
|
+
* Accepted residual: `*applications/` also matches `…/xapplications/<id>/`, so
|
|
65
|
+
* another application could deliberately place an object inside its OWN subtree at
|
|
66
|
+
* a crafted path that this credential could read. That is one application choosing
|
|
67
|
+
* to expose its own bytes — reachable by any other channel too — and the direction
|
|
68
|
+
* that would matter (writing INTO another application's read path) stays closed,
|
|
69
|
+
* because a writer can only produce keys containing its own id.
|
|
70
|
+
*
|
|
71
|
+
* ## Why it keys on `applicationId` and never on the authored prefix
|
|
72
|
+
*
|
|
73
|
+
* `applicationId` is platform-minted and the application cannot influence it. The
|
|
74
|
+
* authored `bucketPrefix` is app-owned, so deriving the policy from it would let an
|
|
75
|
+
* application move its own boundary — and would create a second, independently
|
|
76
|
+
* updated copy of a value the client already derives for itself.
|
|
77
|
+
*
|
|
78
|
+
* ## Enumeration is confined separately
|
|
79
|
+
*
|
|
80
|
+
* A prefix on the object ARNs does not restrict `ListBucket`. Without the
|
|
81
|
+
* `s3:prefix` condition below, a principal could enumerate every key in the bucket
|
|
82
|
+
* — filenames, application ids, file ids — while unable to read any of them.
|
|
83
|
+
*
|
|
84
|
+
* NOTE `s3:ListBucketMultipartUploads` is deliberately absent: MinIO rejects
|
|
85
|
+
* `s3:prefix` as a condition key for it outright, so it cannot be confined at all.
|
|
86
|
+
* The storage provider avoids the multipart branch instead of authorising it.
|
|
87
|
+
*/
|
|
88
|
+
export declare function buildObjectStorageSessionPolicy(input: ObjectStorageSessionPolicyInput): string;
|
|
89
|
+
/**
|
|
90
|
+
* Whether a declaration's policy would fit, and by how much.
|
|
91
|
+
*
|
|
92
|
+
* Exposed so a declaration validator measures the REAL document rather than
|
|
93
|
+
* modelling its shape — the whole reason this module exists.
|
|
94
|
+
*/
|
|
95
|
+
export declare function measureObjectStorageSessionPolicy(input: ObjectStorageSessionPolicyInput): {
|
|
96
|
+
characters: number;
|
|
97
|
+
limit: number;
|
|
98
|
+
fits: boolean;
|
|
99
|
+
};
|
|
100
|
+
//# sourceMappingURL=object-storage-session-policy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"object-storage-session-policy.d.ts","sourceRoot":"","sources":["../../../../../src/project-config/shared/object-storage-session-policy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,uCAAuC,OAAO,CAAC;AAE5D,MAAM,WAAW,+BAA+B;IAC9C,MAAM,EAAE,MAAM,CAAC;IACf,2FAA2F;IAC3F,aAAa,EAAE,MAAM,CAAC;IACtB;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAClC;AA4BD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,+BAA+B,GAAG,MAAM,CAyB9F;AAED;;;;;GAKG;AACH,wBAAgB,iCAAiC,CAAC,KAAK,EAAE,+BAA+B,GAAG;IACzF,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;CACf,CAGA"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The object-storage session policy — ONE description, shared by the party that
|
|
3
|
+
* MINTS the credential and the party that VALIDATES a declaration against the
|
|
4
|
+
* size limit.
|
|
5
|
+
*
|
|
6
|
+
* ## Why this lives here rather than on the broker
|
|
7
|
+
*
|
|
8
|
+
* It was a method on `ObjectStorageStsBrokerService` in apps-manager. Pure — no
|
|
9
|
+
* I/O, no state — but unreachable from `minion-resource-access.validation.ts`,
|
|
10
|
+
* which must refuse a `resourceAccess` declaration whose policy would not fit.
|
|
11
|
+
* A validator computing length from its OWN model of the policy shape is a second
|
|
12
|
+
* copy: change the entries here and the estimate silently drifts, so a declaration
|
|
13
|
+
* passes validation and then fails at issuance — the very failure the check exists
|
|
14
|
+
* to prevent, arriving through the check itself.
|
|
15
|
+
*
|
|
16
|
+
* `platform-config-lib` is contracts-and-helpers only, and both consumers already
|
|
17
|
+
* depend on it (`saas-backend-lib` and `platform-infra-providers`), so no new
|
|
18
|
+
* dependency edge was needed.
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
21
|
+
* The largest inline session policy an `AssumeRole` call will accept.
|
|
22
|
+
*
|
|
23
|
+
* **This is the MINIMUM across supported providers, not "the MinIO limit".** A
|
|
24
|
+
* declaration valid anywhere must be valid everywhere, so the validator enforces
|
|
25
|
+
* the tightest known ceiling. Today that is MinIO's, measured 2026-08-12 against a
|
|
26
|
+
* live server by growing a policy until it refused:
|
|
27
|
+
*
|
|
28
|
+
* InvalidParameterValue Session policy should not exceed 2048 characters
|
|
29
|
+
*
|
|
30
|
+
* AWS S3 is NOT yet measured. Whoever measures it must LOWER this if AWS is
|
|
31
|
+
* tighter — the name says "session policy max", not "MinIO limit", precisely so
|
|
32
|
+
* that obligation is not read as somebody else's.
|
|
33
|
+
*/
|
|
34
|
+
export const OBJECT_STORAGE_SESSION_POLICY_MAX_CHARS = 2048;
|
|
35
|
+
function assertPolicySafeBucket(bucket) {
|
|
36
|
+
if (!/^[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]$/.test(bucket)) {
|
|
37
|
+
throw new Error(`Refusing to build a storage session policy for an invalid bucket name '${bucket}'.`);
|
|
38
|
+
}
|
|
39
|
+
return bucket;
|
|
40
|
+
}
|
|
41
|
+
function assertPolicySafeApplicationId(applicationId) {
|
|
42
|
+
if (!/^[a-f0-9]{24}$/i.test(applicationId)) {
|
|
43
|
+
throw new Error('Refusing to build a storage session policy for a non-ObjectId application id '
|
|
44
|
+
+ '— an unconstrained value could widen the policy resource and grant cross-application access.');
|
|
45
|
+
}
|
|
46
|
+
return applicationId;
|
|
47
|
+
}
|
|
48
|
+
function assertPolicySafeStorageName(name) {
|
|
49
|
+
// Same reasoning as the two above: anything reaching a policy resource must be
|
|
50
|
+
// shape-constrained, or a crafted name widens the grant.
|
|
51
|
+
if (!/^[a-z0-9][a-z0-9_-]{0,62}$/i.test(name)) {
|
|
52
|
+
throw new Error(`Refusing to build a storage session policy for an invalid storage name '${name}'.`);
|
|
53
|
+
}
|
|
54
|
+
return name;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Build the inline session policy document.
|
|
58
|
+
*
|
|
59
|
+
* ## The `*applications/` collapse
|
|
60
|
+
*
|
|
61
|
+
* One pattern per confinement, not two. An application may author a
|
|
62
|
+
* `bucketPrefix`, so a key is either `applications/<id>/…` or
|
|
63
|
+
* `<authored>/applications/<id>/…`. This used to be covered by TWO entries; a
|
|
64
|
+
* single leading `*` (which matches zero-or-more characters) covers both.
|
|
65
|
+
*
|
|
66
|
+
* That halves the policy — measured 308 → 154 characters per declared resource,
|
|
67
|
+
* which against the 2048 ceiling is the difference between ~5 and ~12 resources.
|
|
68
|
+
* At the two-entry size a plausible minion (todos, lists, tags, users,
|
|
69
|
+
* organizations) is already at the limit, so this is a PREREQUISITE for
|
|
70
|
+
* per-resource confinement rather than an optimisation.
|
|
71
|
+
*
|
|
72
|
+
* Accepted residual: `*applications/` also matches `…/xapplications/<id>/`, so
|
|
73
|
+
* another application could deliberately place an object inside its OWN subtree at
|
|
74
|
+
* a crafted path that this credential could read. That is one application choosing
|
|
75
|
+
* to expose its own bytes — reachable by any other channel too — and the direction
|
|
76
|
+
* that would matter (writing INTO another application's read path) stays closed,
|
|
77
|
+
* because a writer can only produce keys containing its own id.
|
|
78
|
+
*
|
|
79
|
+
* ## Why it keys on `applicationId` and never on the authored prefix
|
|
80
|
+
*
|
|
81
|
+
* `applicationId` is platform-minted and the application cannot influence it. The
|
|
82
|
+
* authored `bucketPrefix` is app-owned, so deriving the policy from it would let an
|
|
83
|
+
* application move its own boundary — and would create a second, independently
|
|
84
|
+
* updated copy of a value the client already derives for itself.
|
|
85
|
+
*
|
|
86
|
+
* ## Enumeration is confined separately
|
|
87
|
+
*
|
|
88
|
+
* A prefix on the object ARNs does not restrict `ListBucket`. Without the
|
|
89
|
+
* `s3:prefix` condition below, a principal could enumerate every key in the bucket
|
|
90
|
+
* — filenames, application ids, file ids — while unable to read any of them.
|
|
91
|
+
*
|
|
92
|
+
* NOTE `s3:ListBucketMultipartUploads` is deliberately absent: MinIO rejects
|
|
93
|
+
* `s3:prefix` as a condition key for it outright, so it cannot be confined at all.
|
|
94
|
+
* The storage provider avoids the multipart branch instead of authorising it.
|
|
95
|
+
*/
|
|
96
|
+
export function buildObjectStorageSessionPolicy(input) {
|
|
97
|
+
const bucket = assertPolicySafeBucket(input.bucket);
|
|
98
|
+
const applicationId = assertPolicySafeApplicationId(input.applicationId);
|
|
99
|
+
const names = (input.storageNames ?? []).map(assertPolicySafeStorageName);
|
|
100
|
+
const confinements = names.length > 0
|
|
101
|
+
? names.map((name) => `*applications/${applicationId}/files/${name}/`)
|
|
102
|
+
: [`*applications/${applicationId}/`];
|
|
103
|
+
return JSON.stringify({
|
|
104
|
+
Version: '2012-10-17',
|
|
105
|
+
Statement: [
|
|
106
|
+
{
|
|
107
|
+
Effect: 'Allow',
|
|
108
|
+
Action: ['s3:GetObject', 's3:PutObject', 's3:DeleteObject'],
|
|
109
|
+
Resource: confinements.map((prefix) => `arn:aws:s3:::${bucket}/${prefix}*`),
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
Effect: 'Allow',
|
|
113
|
+
Action: ['s3:ListBucket'],
|
|
114
|
+
Resource: [`arn:aws:s3:::${bucket}`],
|
|
115
|
+
Condition: { StringLike: { 's3:prefix': confinements.map((prefix) => `${prefix}*`) } },
|
|
116
|
+
},
|
|
117
|
+
],
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Whether a declaration's policy would fit, and by how much.
|
|
122
|
+
*
|
|
123
|
+
* Exposed so a declaration validator measures the REAL document rather than
|
|
124
|
+
* modelling its shape — the whole reason this module exists.
|
|
125
|
+
*/
|
|
126
|
+
export function measureObjectStorageSessionPolicy(input) {
|
|
127
|
+
const characters = buildObjectStorageSessionPolicy(input).length;
|
|
128
|
+
return { characters, limit: OBJECT_STORAGE_SESSION_POLICY_MAX_CHARS, fits: characters <= OBJECT_STORAGE_SESSION_POLICY_MAX_CHARS };
|
|
129
|
+
}
|
|
130
|
+
//# sourceMappingURL=object-storage-session-policy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"object-storage-session-policy.js","sourceRoot":"","sources":["../../../../../src/project-config/shared/object-storage-session-policy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,uCAAuC,GAAG,IAAI,CAAC;AAgB5D,SAAS,sBAAsB,CAAC,MAAc;IAC5C,IAAI,CAAC,oCAAoC,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;QACvD,MAAM,IAAI,KAAK,CAAC,0EAA0E,MAAM,IAAI,CAAC,CAAC;IACxG,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAS,6BAA6B,CAAC,aAAqB;IAC1D,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,aAAa,CAAC,EAAE,CAAC;QAC3C,MAAM,IAAI,KAAK,CACb,+EAA+E;cAC7E,8FAA8F,CACjG,CAAC;IACJ,CAAC;IACD,OAAO,aAAa,CAAC;AACvB,CAAC;AAED,SAAS,2BAA2B,CAAC,IAAY;IAC/C,+EAA+E;IAC/E,yDAAyD;IACzD,IAAI,CAAC,6BAA6B,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QAC9C,MAAM,IAAI,KAAK,CAAC,2EAA2E,IAAI,IAAI,CAAC,CAAC;IACvG,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,MAAM,UAAU,+BAA+B,CAAC,KAAsC;IACpF,MAAM,MAAM,GAAG,sBAAsB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACpD,MAAM,aAAa,GAAG,6BAA6B,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;IACzE,MAAM,KAAK,GAAG,CAAC,KAAK,CAAC,YAAY,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC;IAE1E,MAAM,YAAY,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC;QACnC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,iBAAiB,aAAa,UAAU,IAAI,GAAG,CAAC;QACtE,CAAC,CAAC,CAAC,iBAAiB,aAAa,GAAG,CAAC,CAAC;IAExC,OAAO,IAAI,CAAC,SAAS,CAAC;QACpB,OAAO,EAAE,YAAY;QACrB,SAAS,EAAE;YACT;gBACE,MAAM,EAAE,OAAO;gBACf,MAAM,EAAE,CAAC,cAAc,EAAE,cAAc,EAAE,iBAAiB,CAAC;gBAC3D,QAAQ,EAAE,YAAY,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,gBAAgB,MAAM,IAAI,MAAM,GAAG,CAAC;aAC5E;YACD;gBACE,MAAM,EAAE,OAAO;gBACf,MAAM,EAAE,CAAC,eAAe,CAAC;gBACzB,QAAQ,EAAE,CAAC,gBAAgB,MAAM,EAAE,CAAC;gBACpC,SAAS,EAAE,EAAE,UAAU,EAAE,EAAE,WAAW,EAAE,YAAY,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,MAAM,GAAG,CAAC,EAAE,EAAE;aACvF;SACF;KACF,CAAC,CAAC;AACL,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,iCAAiC,CAAC,KAAsC;IAKtF,MAAM,UAAU,GAAG,+BAA+B,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC;IACjE,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,uCAAuC,EAAE,IAAI,EAAE,UAAU,IAAI,uCAAuC,EAAE,CAAC;AACrI,CAAC","sourcesContent":["/**\n * The object-storage session policy — ONE description, shared by the party that\n * MINTS the credential and the party that VALIDATES a declaration against the\n * size limit.\n *\n * ## Why this lives here rather than on the broker\n *\n * It was a method on `ObjectStorageStsBrokerService` in apps-manager. Pure — no\n * I/O, no state — but unreachable from `minion-resource-access.validation.ts`,\n * which must refuse a `resourceAccess` declaration whose policy would not fit.\n * A validator computing length from its OWN model of the policy shape is a second\n * copy: change the entries here and the estimate silently drifts, so a declaration\n * passes validation and then fails at issuance — the very failure the check exists\n * to prevent, arriving through the check itself.\n *\n * `platform-config-lib` is contracts-and-helpers only, and both consumers already\n * depend on it (`saas-backend-lib` and `platform-infra-providers`), so no new\n * dependency edge was needed.\n */\n\n/**\n * The largest inline session policy an `AssumeRole` call will accept.\n *\n * **This is the MINIMUM across supported providers, not \"the MinIO limit\".** A\n * declaration valid anywhere must be valid everywhere, so the validator enforces\n * the tightest known ceiling. Today that is MinIO's, measured 2026-08-12 against a\n * live server by growing a policy until it refused:\n *\n * InvalidParameterValue Session policy should not exceed 2048 characters\n *\n * AWS S3 is NOT yet measured. Whoever measures it must LOWER this if AWS is\n * tighter — the name says \"session policy max\", not \"MinIO limit\", precisely so\n * that obligation is not read as somebody else's.\n */\nexport const OBJECT_STORAGE_SESSION_POLICY_MAX_CHARS = 2048;\n\nexport interface ObjectStorageSessionPolicyInput {\n bucket: string;\n /** Platform-minted. The application cannot influence it; that is the whole confinement. */\n applicationId: string;\n /**\n * Storage names (from `resolveGrantStorageNames`) to confine to, one prefix each.\n *\n * Omitted or empty ⇒ confine to the whole application subtree, which is what a\n * runtime holding an application-wide credential gets. Supplying names narrows\n * it per declared resource.\n */\n storageNames?: readonly string[];\n}\n\nfunction assertPolicySafeBucket(bucket: string): string {\n if (!/^[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]$/.test(bucket)) {\n throw new Error(`Refusing to build a storage session policy for an invalid bucket name '${bucket}'.`);\n }\n return bucket;\n}\n\nfunction assertPolicySafeApplicationId(applicationId: string): string {\n if (!/^[a-f0-9]{24}$/i.test(applicationId)) {\n throw new Error(\n 'Refusing to build a storage session policy for a non-ObjectId application id '\n + '— an unconstrained value could widen the policy resource and grant cross-application access.',\n );\n }\n return applicationId;\n}\n\nfunction assertPolicySafeStorageName(name: string): string {\n // Same reasoning as the two above: anything reaching a policy resource must be\n // shape-constrained, or a crafted name widens the grant.\n if (!/^[a-z0-9][a-z0-9_-]{0,62}$/i.test(name)) {\n throw new Error(`Refusing to build a storage session policy for an invalid storage name '${name}'.`);\n }\n return name;\n}\n\n/**\n * Build the inline session policy document.\n *\n * ## The `*applications/` collapse\n *\n * One pattern per confinement, not two. An application may author a\n * `bucketPrefix`, so a key is either `applications/<id>/…` or\n * `<authored>/applications/<id>/…`. This used to be covered by TWO entries; a\n * single leading `*` (which matches zero-or-more characters) covers both.\n *\n * That halves the policy — measured 308 → 154 characters per declared resource,\n * which against the 2048 ceiling is the difference between ~5 and ~12 resources.\n * At the two-entry size a plausible minion (todos, lists, tags, users,\n * organizations) is already at the limit, so this is a PREREQUISITE for\n * per-resource confinement rather than an optimisation.\n *\n * Accepted residual: `*applications/` also matches `…/xapplications/<id>/`, so\n * another application could deliberately place an object inside its OWN subtree at\n * a crafted path that this credential could read. That is one application choosing\n * to expose its own bytes — reachable by any other channel too — and the direction\n * that would matter (writing INTO another application's read path) stays closed,\n * because a writer can only produce keys containing its own id.\n *\n * ## Why it keys on `applicationId` and never on the authored prefix\n *\n * `applicationId` is platform-minted and the application cannot influence it. The\n * authored `bucketPrefix` is app-owned, so deriving the policy from it would let an\n * application move its own boundary — and would create a second, independently\n * updated copy of a value the client already derives for itself.\n *\n * ## Enumeration is confined separately\n *\n * A prefix on the object ARNs does not restrict `ListBucket`. Without the\n * `s3:prefix` condition below, a principal could enumerate every key in the bucket\n * — filenames, application ids, file ids — while unable to read any of them.\n *\n * NOTE `s3:ListBucketMultipartUploads` is deliberately absent: MinIO rejects\n * `s3:prefix` as a condition key for it outright, so it cannot be confined at all.\n * The storage provider avoids the multipart branch instead of authorising it.\n */\nexport function buildObjectStorageSessionPolicy(input: ObjectStorageSessionPolicyInput): string {\n const bucket = assertPolicySafeBucket(input.bucket);\n const applicationId = assertPolicySafeApplicationId(input.applicationId);\n const names = (input.storageNames ?? []).map(assertPolicySafeStorageName);\n\n const confinements = names.length > 0\n ? names.map((name) => `*applications/${applicationId}/files/${name}/`)\n : [`*applications/${applicationId}/`];\n\n return JSON.stringify({\n Version: '2012-10-17',\n Statement: [\n {\n Effect: 'Allow',\n Action: ['s3:GetObject', 's3:PutObject', 's3:DeleteObject'],\n Resource: confinements.map((prefix) => `arn:aws:s3:::${bucket}/${prefix}*`),\n },\n {\n Effect: 'Allow',\n Action: ['s3:ListBucket'],\n Resource: [`arn:aws:s3:::${bucket}`],\n Condition: { StringLike: { 's3:prefix': confinements.map((prefix) => `${prefix}*`) } },\n },\n ],\n });\n}\n\n/**\n * Whether a declaration's policy would fit, and by how much.\n *\n * Exposed so a declaration validator measures the REAL document rather than\n * modelling its shape — the whole reason this module exists.\n */\nexport function measureObjectStorageSessionPolicy(input: ObjectStorageSessionPolicyInput): {\n characters: number;\n limit: number;\n fits: boolean;\n} {\n const characters = buildObjectStorageSessionPolicy(input).length;\n return { characters, limit: OBJECT_STORAGE_SESSION_POLICY_MAX_CHARS, fits: characters <= OBJECT_STORAGE_SESSION_POLICY_MAX_CHARS };\n}\n"]}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
1
|
/**
|
|
3
2
|
* Platform microservices. All use the same Docker image (wildo-platform)
|
|
4
3
|
* differentiated at runtime via PLATFORM_SERVICE env var.
|
|
@@ -10,21 +9,17 @@ export declare enum PlatformWildoServices {
|
|
|
10
9
|
PLATFORM_INIT = "platform-init",
|
|
11
10
|
APPS_MANAGER = "platform-apps-manager",
|
|
12
11
|
CRONTABS_BATCHES_MANAGER = "platform-crontabs-batches-manager",
|
|
13
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Module-registry server (`platform-module-registry`, KD-7).
|
|
14
|
+
* Hosts the central `wildo registry *` HTTP surface; pinned port
|
|
15
|
+
* `PLATFORM_DEFAULT_PORTS.MODULE_REGISTRY` (5154).
|
|
16
|
+
*/
|
|
17
|
+
MODULE_REGISTRY = "platform-module-registry"
|
|
14
18
|
}
|
|
19
|
+
export declare const BOOTSTRAP_PLATFORM_SERVICES: readonly [PlatformWildoServices.CRONTABS_BATCHES_MANAGER, PlatformWildoServices.MODULE_REGISTRY];
|
|
20
|
+
export type BootstrapPlatformService = (typeof BOOTSTRAP_PLATFORM_SERVICES)[number];
|
|
15
21
|
export declare enum AppsManagerMode {
|
|
16
22
|
NORMAL = "normal",
|
|
17
|
-
INIT = "init"
|
|
18
|
-
MAINT = "maint"
|
|
23
|
+
INIT = "init"
|
|
19
24
|
}
|
|
20
|
-
export declare const PlatformServiceConfigSchema: z.ZodObject<{
|
|
21
|
-
serviceName: z.ZodString;
|
|
22
|
-
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
23
|
-
}, z.core.$strip, core.$ZodObjectExtra>;
|
|
24
|
-
export type PlatformServiceConfig = z.infer<typeof PlatformServiceConfigSchema>;
|
|
25
|
-
export declare const PlatformServicesDeclarationSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
26
|
-
serviceName: z.ZodString;
|
|
27
|
-
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
28
|
-
}, z.core.$strip, core.$ZodObjectExtra>>;
|
|
29
|
-
export type PlatformServicesDeclaration = z.infer<typeof PlatformServicesDeclarationSchema>;
|
|
30
25
|
//# sourceMappingURL=platform-services.schemas.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform-services.schemas.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"platform-services.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/project-config/shared/platform-services.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,oBAAY,qBAAqB;IAC/B,aAAa,kBAAkB;IAC/B,YAAY,0BAA0B;IACtC,wBAAwB,sCAAsC;IAC9D;;;;OAIG;IACH,eAAe,6BAA6B;CAC7C;AA4BD,eAAO,MAAM,2BAA2B,kGAGyB,CAAC;AAElE,MAAM,MAAM,wBAAwB,GAAG,CAAC,OAAO,2BAA2B,CAAC,CAAC,MAAM,CAAC,CAAC;AAepF,oBAAY,eAAe;IACzB,MAAM,WAAW;IACjB,IAAI,SAAS;CACd"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
1
|
/**
|
|
3
2
|
* Platform microservices. All use the same Docker image (wildo-platform)
|
|
4
3
|
* differentiated at runtime via PLATFORM_SERVICE env var.
|
|
@@ -11,17 +10,22 @@ export var PlatformWildoServices;
|
|
|
11
10
|
PlatformWildoServices["PLATFORM_INIT"] = "platform-init";
|
|
12
11
|
PlatformWildoServices["APPS_MANAGER"] = "platform-apps-manager";
|
|
13
12
|
PlatformWildoServices["CRONTABS_BATCHES_MANAGER"] = "platform-crontabs-batches-manager";
|
|
14
|
-
|
|
13
|
+
/**
|
|
14
|
+
* Module-registry server (`platform-module-registry`, KD-7).
|
|
15
|
+
* Hosts the central `wildo registry *` HTTP surface; pinned port
|
|
16
|
+
* `PLATFORM_DEFAULT_PORTS.MODULE_REGISTRY` (5154).
|
|
17
|
+
*/
|
|
18
|
+
PlatformWildoServices["MODULE_REGISTRY"] = "platform-module-registry";
|
|
15
19
|
})(PlatformWildoServices || (PlatformWildoServices = {}));
|
|
20
|
+
export const BOOTSTRAP_PLATFORM_SERVICES = [
|
|
21
|
+
PlatformWildoServices.CRONTABS_BATCHES_MANAGER,
|
|
22
|
+
PlatformWildoServices.MODULE_REGISTRY,
|
|
23
|
+
];
|
|
24
|
+
const _assertExhaustiveBootstrapCoverage = true;
|
|
25
|
+
void _assertExhaustiveBootstrapCoverage;
|
|
16
26
|
export var AppsManagerMode;
|
|
17
27
|
(function (AppsManagerMode) {
|
|
18
28
|
AppsManagerMode["NORMAL"] = "normal";
|
|
19
29
|
AppsManagerMode["INIT"] = "init";
|
|
20
|
-
AppsManagerMode["MAINT"] = "maint";
|
|
21
30
|
})(AppsManagerMode || (AppsManagerMode = {}));
|
|
22
|
-
|
|
23
|
-
serviceName: z.string().min(1),
|
|
24
|
-
enabled: z.boolean().default(true),
|
|
25
|
-
});
|
|
26
|
-
export const PlatformServicesDeclarationSchema = z.record(z.string(), PlatformServiceConfigSchema);
|
|
27
|
-
//# sourceMappingURL=platform-services.schemas.js.map
|
|
31
|
+
//# sourceMappingURL=platform-services.schemas.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform-services.schemas.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"platform-services.schemas.js","sourceRoot":"","sources":["../../../../../src/project-config/shared/platform-services.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,CAAN,IAAY,qBAUX;AAVD,WAAY,qBAAqB;IAC/B,wDAA+B,CAAA;IAC/B,+DAAsC,CAAA;IACtC,uFAA8D,CAAA;IAC9D;;;;OAIG;IACH,qEAA4C,CAAA;AAC9C,CAAC,EAVW,qBAAqB,KAArB,qBAAqB,QAUhC;AA4BD,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,qBAAqB,CAAC,wBAAwB;IAC9C,qBAAqB,CAAC,eAAe;CAC0B,CAAC;AAclE,MAAM,kCAAkC,GAAuC,IAAI,CAAC;AACpF,KAAK,kCAAkC,CAAC;AAExC,MAAM,CAAN,IAAY,eAGX;AAHD,WAAY,eAAe;IACzB,oCAAiB,CAAA;IACjB,gCAAa,CAAA;AACf,CAAC,EAHW,eAAe,KAAf,eAAe,QAG1B","sourcesContent":["/**\n * Platform microservices. All use the same Docker image (wildo-platform)\n * differentiated at runtime via PLATFORM_SERVICE env var.\n *\n * For app developers: deployed as Docker containers.\n * For framework developers: run natively from source (hot-reload).\n */\nexport enum PlatformWildoServices {\n PLATFORM_INIT = 'platform-init',\n APPS_MANAGER = 'platform-apps-manager',\n CRONTABS_BATCHES_MANAGER = 'platform-crontabs-batches-manager',\n /**\n * Module-registry server (`platform-module-registry`, KD-7).\n * Hosts the central `wildo registry *` HTTP surface; pinned port\n * `PLATFORM_DEFAULT_PORTS.MODULE_REGISTRY` (5154).\n */\n MODULE_REGISTRY = 'platform-module-registry',\n}\n\n/**\n * Bootstrap platform services — long-running platform microservices that boot\n * from the same env contract via `PlatformEnvVarsBuilder.buildBootstrapEnv`.\n *\n * Excludes:\n * - `PLATFORM_INIT` — one-shot initialization job, not a long-running service.\n * - `APPS_MANAGER` — has its own dedicated full-env builder\n * (`PlatformEnvVarsBuilder.buildAppsManagerFullEnv`) with extra wiring\n * (Atlas creds, GitHub provisioning keys, etc.).\n *\n * Single source of truth for everything that iterates \"all bootstrap services\":\n * K8s Secret/ConfigMap emit (`k8s-secrets-generator.service.ts`), Compose\n * runtime catalog, and tests asserting cross-service env contracts.\n *\n * The `satisfies` clause below forces this list to cover every member of\n * `PlatformWildoServices` other than the two explicitly excluded ones —\n * adding a new enum member without listing it here is a compile error.\n * Without that coupling, the previous `Exclude<…>`-based local type alias\n * silently widened to include any future enum member, which masked the\n * \"service in enum but not yet handled by the bootstrap path\" drift class.\n */\ntype BootstrapPlatformServiceCandidate = Exclude<\n PlatformWildoServices,\n PlatformWildoServices.PLATFORM_INIT | PlatformWildoServices.APPS_MANAGER\n>;\n\nexport const BOOTSTRAP_PLATFORM_SERVICES = [\n PlatformWildoServices.CRONTABS_BATCHES_MANAGER,\n PlatformWildoServices.MODULE_REGISTRY,\n] as const satisfies readonly BootstrapPlatformServiceCandidate[];\n\nexport type BootstrapPlatformService = (typeof BOOTSTRAP_PLATFORM_SERVICES)[number];\n\n/**\n * Compile-time assertion: every non-excluded `PlatformWildoServices` member\n * MUST appear in `BOOTSTRAP_PLATFORM_SERVICES`. Adding a new member to the\n * enum without listing it above triggers a `Type 'X' is not assignable to\n * type 'never'` error pointing here, so the exhaustiveness check the\n * `addServiceExtras` switch used to provide for `Exclude<…>`-derived types\n * is preserved.\n */\ntype _AssertExhaustiveBootstrapCoverage =\n Exclude<BootstrapPlatformServiceCandidate, BootstrapPlatformService> extends never ? true : never;\nconst _assertExhaustiveBootstrapCoverage: _AssertExhaustiveBootstrapCoverage = true;\nvoid _assertExhaustiveBootstrapCoverage;\n\nexport enum AppsManagerMode {\n NORMAL = 'normal',\n INIT = 'init',\n}\n\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Semver-string schema for the `version` field on
|
|
4
|
+
* `WildoSaasConfigSchema` and `WildoInfraEnvConfigInputSchema`.
|
|
5
|
+
*
|
|
6
|
+
* Always `.optional()` at the call site — see the `@unimplemented` D-5
|
|
7
|
+
* JSDoc on each schema field for the warner contract (silence when
|
|
8
|
+
* unauthored, loud warn when explicit).
|
|
9
|
+
*
|
|
10
|
+
* The error message names the format and shows a canonical example so
|
|
11
|
+
* authors who hit it can fix their config without grepping for the
|
|
12
|
+
* regex source.
|
|
13
|
+
*/
|
|
14
|
+
export declare const WildoSchemaVersionSchema: z.ZodString;
|
|
15
|
+
//# sourceMappingURL=schema-version.schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema-version.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/project-config/shared/schema-version.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA4BxB;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,wBAAwB,aAGpC,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Canonical SemVer 2.0.0 regex from https://semver.org (the "official"
|
|
4
|
+
* suggested regex; identical to the snippet published in the
|
|
5
|
+
* `Is there a suggested regular expression (RegEx) to check a SemVer string?`
|
|
6
|
+
* FAQ entry).
|
|
7
|
+
*
|
|
8
|
+
* Captures `MAJOR.MINOR.PATCH` plus optional `-prerelease` and
|
|
9
|
+
* `+buildmetadata` segments. Used as the strict shape for the
|
|
10
|
+
* `WildoSaasConfig.version` and `WildoInfraEnvConfig.version` fields
|
|
11
|
+
* (Slice 3.5; backlog **D-5** for the migration tooling that will
|
|
12
|
+
* actually consume the value).
|
|
13
|
+
*
|
|
14
|
+
* Strictness rationale:
|
|
15
|
+
* - We could accept `'1'` or `'1.0'` to be lenient, but the field is
|
|
16
|
+
* a forward-compatibility reservation — when the migration tooling
|
|
17
|
+
* ships under D-5 it MUST be able to compare two versions
|
|
18
|
+
* deterministically. Accepting partial semver shapes today would
|
|
19
|
+
* create migration ambiguity later (`'1'` vs `'1.0.0'` — same? newer?
|
|
20
|
+
* older?). Strict from day one keeps the contract honest.
|
|
21
|
+
* - Pre-release / build-metadata are accepted because they are part of
|
|
22
|
+
* the SemVer 2.0.0 spec; if migration tooling ever needs to reject
|
|
23
|
+
* them it can layer a stricter check on top without re-shaping the
|
|
24
|
+
* schema.
|
|
25
|
+
*/
|
|
26
|
+
const SEMVER_PATTERN = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/;
|
|
27
|
+
/**
|
|
28
|
+
* Semver-string schema for the `version` field on
|
|
29
|
+
* `WildoSaasConfigSchema` and `WildoInfraEnvConfigInputSchema`.
|
|
30
|
+
*
|
|
31
|
+
* Always `.optional()` at the call site — see the `@unimplemented` D-5
|
|
32
|
+
* JSDoc on each schema field for the warner contract (silence when
|
|
33
|
+
* unauthored, loud warn when explicit).
|
|
34
|
+
*
|
|
35
|
+
* The error message names the format and shows a canonical example so
|
|
36
|
+
* authors who hit it can fix their config without grepping for the
|
|
37
|
+
* regex source.
|
|
38
|
+
*/
|
|
39
|
+
export const WildoSchemaVersionSchema = z.string().regex(SEMVER_PATTERN, 'must be a SemVer 2.0.0 string (e.g. "1.0.0", "2.3.1-rc.1", "1.0.0+build.42")');
|
|
40
|
+
//# sourceMappingURL=schema-version.schemas.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema-version.schemas.js","sourceRoot":"","sources":["../../../../../src/project-config/shared/schema-version.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,cAAc,GAAG,qLAAqL,CAAC;AAE7M;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CACtD,cAAc,EACd,8EAA8E,CAC/E,CAAC","sourcesContent":["import { z } from 'zod';\n\n/**\n * Canonical SemVer 2.0.0 regex from https://semver.org (the \"official\"\n * suggested regex; identical to the snippet published in the\n * `Is there a suggested regular expression (RegEx) to check a SemVer string?`\n * FAQ entry).\n *\n * Captures `MAJOR.MINOR.PATCH` plus optional `-prerelease` and\n * `+buildmetadata` segments. Used as the strict shape for the\n * `WildoSaasConfig.version` and `WildoInfraEnvConfig.version` fields\n * (Slice 3.5; backlog **D-5** for the migration tooling that will\n * actually consume the value).\n *\n * Strictness rationale:\n * - We could accept `'1'` or `'1.0'` to be lenient, but the field is\n * a forward-compatibility reservation — when the migration tooling\n * ships under D-5 it MUST be able to compare two versions\n * deterministically. Accepting partial semver shapes today would\n * create migration ambiguity later (`'1'` vs `'1.0.0'` — same? newer?\n * older?). Strict from day one keeps the contract honest.\n * - Pre-release / build-metadata are accepted because they are part of\n * the SemVer 2.0.0 spec; if migration tooling ever needs to reject\n * them it can layer a stricter check on top without re-shaping the\n * schema.\n */\nconst SEMVER_PATTERN = /^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$/;\n\n/**\n * Semver-string schema for the `version` field on\n * `WildoSaasConfigSchema` and `WildoInfraEnvConfigInputSchema`.\n *\n * Always `.optional()` at the call site — see the `@unimplemented` D-5\n * JSDoc on each schema field for the warner contract (silence when\n * unauthored, loud warn when explicit).\n *\n * The error message names the format and shows a canonical example so\n * authors who hit it can fix their config without grepping for the\n * regex source.\n */\nexport const WildoSchemaVersionSchema = z.string().regex(\n SEMVER_PATTERN,\n 'must be a SemVer 2.0.0 string (e.g. \"1.0.0\", \"2.3.1-rc.1\", \"1.0.0+build.42\")',\n);\n"]}
|