@wildo-ai/wildo-cli 1.1.13 → 1.1.15
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/src/commands/build/approve.command.d.ts +4 -0
- package/dist/src/commands/build/approve.command.d.ts.map +1 -1
- package/dist/src/commands/build/approve.command.js +14 -3
- package/dist/src/commands/build/approve.command.js.map +1 -1
- package/dist/src/commands/build/close.command.d.ts +4 -0
- package/dist/src/commands/build/close.command.d.ts.map +1 -1
- package/dist/src/commands/build/close.command.js +17 -3
- package/dist/src/commands/build/close.command.js.map +1 -1
- package/dist/src/commands/config/sync.command.d.ts.map +1 -1
- package/dist/src/commands/config/sync.command.js +21 -1
- package/dist/src/commands/config/sync.command.js.map +1 -1
- package/dist/src/commands/creation/feed.command.d.ts.map +1 -1
- package/dist/src/commands/creation/feed.command.js +6 -3
- package/dist/src/commands/creation/feed.command.js.map +1 -1
- package/dist/src/commands/fwk/publish-all.command.d.ts +13 -0
- package/dist/src/commands/fwk/publish-all.command.d.ts.map +1 -1
- package/dist/src/commands/fwk/publish-all.command.js +57 -3
- package/dist/src/commands/fwk/publish-all.command.js.map +1 -1
- package/dist/src/commands/fwk/publish-docker.command.d.ts.map +1 -1
- package/dist/src/commands/fwk/publish-docker.command.js +16 -1
- package/dist/src/commands/fwk/publish-docker.command.js.map +1 -1
- package/dist/src/commands/fwk/registry-host.command.d.ts +19 -1
- package/dist/src/commands/fwk/registry-host.command.d.ts.map +1 -1
- package/dist/src/commands/fwk/registry-host.command.js +78 -3
- package/dist/src/commands/fwk/registry-host.command.js.map +1 -1
- package/dist/src/commands/generate/email-command.utils.d.ts +2 -0
- package/dist/src/commands/generate/email-command.utils.d.ts.map +1 -1
- package/dist/src/commands/generate/email-command.utils.js +5 -0
- package/dist/src/commands/generate/email-command.utils.js.map +1 -1
- package/dist/src/commands/init.command.d.ts +14 -0
- package/dist/src/commands/init.command.d.ts.map +1 -1
- package/dist/src/commands/init.command.js +36 -5
- package/dist/src/commands/init.command.js.map +1 -1
- package/dist/src/commands/local/deregister.command.d.ts.map +1 -1
- package/dist/src/commands/local/deregister.command.js +4 -0
- package/dist/src/commands/local/deregister.command.js.map +1 -1
- package/dist/src/commands/local/dev.command.d.ts +6 -0
- package/dist/src/commands/local/dev.command.d.ts.map +1 -1
- package/dist/src/commands/local/dev.command.js +72 -0
- package/dist/src/commands/local/dev.command.js.map +1 -1
- package/dist/src/commands/local/jobs-command.utils.d.ts +24 -0
- package/dist/src/commands/local/jobs-command.utils.d.ts.map +1 -0
- package/dist/src/commands/local/jobs-command.utils.js +44 -0
- package/dist/src/commands/local/jobs-command.utils.js.map +1 -0
- package/dist/src/commands/local/jobs-run.command.d.ts +7 -0
- package/dist/src/commands/local/jobs-run.command.d.ts.map +1 -0
- package/dist/src/commands/local/jobs-run.command.js +92 -0
- package/dist/src/commands/local/jobs-run.command.js.map +1 -0
- package/dist/src/commands/local/jobs.command.d.ts +7 -0
- package/dist/src/commands/local/jobs.command.d.ts.map +1 -0
- package/dist/src/commands/local/jobs.command.js +59 -0
- package/dist/src/commands/local/jobs.command.js.map +1 -0
- package/dist/src/commands/local/tunnel.command.d.ts +84 -0
- package/dist/src/commands/local/tunnel.command.d.ts.map +1 -0
- package/dist/src/commands/local/tunnel.command.js +274 -0
- package/dist/src/commands/local/tunnel.command.js.map +1 -0
- package/dist/src/commands/registry/repair-lockfile.command.d.ts.map +1 -1
- package/dist/src/commands/registry/repair-lockfile.command.js +1 -0
- package/dist/src/commands/registry/repair-lockfile.command.js.map +1 -1
- package/dist/src/commands/registry/update.command.d.ts.map +1 -1
- package/dist/src/commands/registry/update.command.js +1 -0
- package/dist/src/commands/registry/update.command.js.map +1 -1
- package/dist/src/commands/seal/verify.command.d.ts +18 -0
- package/dist/src/commands/seal/verify.command.d.ts.map +1 -1
- package/dist/src/commands/seal/verify.command.js +62 -1
- package/dist/src/commands/seal/verify.command.js.map +1 -1
- package/dist/src/services/application/app-bootstrap.service.d.ts +41 -1
- package/dist/src/services/application/app-bootstrap.service.d.ts.map +1 -1
- package/dist/src/services/application/app-bootstrap.service.js +49 -3
- package/dist/src/services/application/app-bootstrap.service.js.map +1 -1
- package/dist/src/services/application/app-runtime-targets.service.d.ts.map +1 -1
- package/dist/src/services/application/app-runtime-targets.service.js +9 -1
- package/dist/src/services/application/app-runtime-targets.service.js.map +1 -1
- package/dist/src/services/application/application-dependency-alignment.service.d.ts +20 -0
- package/dist/src/services/application/application-dependency-alignment.service.d.ts.map +1 -1
- package/dist/src/services/application/application-dependency-alignment.service.js +32 -2
- package/dist/src/services/application/application-dependency-alignment.service.js.map +1 -1
- package/dist/src/services/application/local-tunnel.service.d.ts +153 -0
- package/dist/src/services/application/local-tunnel.service.d.ts.map +1 -0
- package/dist/src/services/application/local-tunnel.service.js +294 -0
- package/dist/src/services/application/local-tunnel.service.js.map +1 -0
- package/dist/src/services/application/provider-runtime-sync.service.d.ts.map +1 -1
- package/dist/src/services/application/provider-runtime-sync.service.js +29 -1
- package/dist/src/services/application/provider-runtime-sync.service.js.map +1 -1
- package/dist/src/services/application/saas-skeleton.service.d.ts +7 -0
- package/dist/src/services/application/saas-skeleton.service.d.ts.map +1 -1
- package/dist/src/services/application/saas-skeleton.service.js +26 -2
- package/dist/src/services/application/saas-skeleton.service.js.map +1 -1
- package/dist/src/services/catalog/service-address-resolver.service.d.ts +7 -1
- package/dist/src/services/catalog/service-address-resolver.service.d.ts.map +1 -1
- package/dist/src/services/catalog/service-address-resolver.service.js +6 -3
- package/dist/src/services/catalog/service-address-resolver.service.js.map +1 -1
- package/dist/src/services/companion/build-console.service.d.ts +39 -2
- package/dist/src/services/companion/build-console.service.d.ts.map +1 -1
- package/dist/src/services/companion/build-console.service.js +54 -4
- package/dist/src/services/companion/build-console.service.js.map +1 -1
- package/dist/src/services/companion/creation-console.service.d.ts +6 -1
- package/dist/src/services/companion/creation-console.service.d.ts.map +1 -1
- package/dist/src/services/companion/creation-console.service.js +14 -2
- package/dist/src/services/companion/creation-console.service.js.map +1 -1
- package/dist/src/services/companion/creation-drive.service.d.ts.map +1 -1
- package/dist/src/services/companion/creation-drive.service.js +5 -2
- package/dist/src/services/companion/creation-drive.service.js.map +1 -1
- package/dist/src/services/credentials/application-secrets.service.d.ts +6 -0
- package/dist/src/services/credentials/application-secrets.service.d.ts.map +1 -1
- package/dist/src/services/credentials/application-secrets.service.js +1 -1
- package/dist/src/services/credentials/application-secrets.service.js.map +1 -1
- package/dist/src/services/credentials/composed-provider-catalogue.d.ts.map +1 -1
- package/dist/src/services/credentials/composed-provider-catalogue.js +14 -2
- package/dist/src/services/credentials/composed-provider-catalogue.js.map +1 -1
- package/dist/src/services/credentials/provider-env-vars.utils.d.ts.map +1 -1
- package/dist/src/services/credentials/provider-env-vars.utils.js +3 -1
- package/dist/src/services/credentials/provider-env-vars.utils.js.map +1 -1
- package/dist/src/services/credentials/secret-requirements.service.d.ts +2 -1
- package/dist/src/services/credentials/secret-requirements.service.d.ts.map +1 -1
- package/dist/src/services/credentials/secret-requirements.service.js +17 -1
- package/dist/src/services/credentials/secret-requirements.service.js.map +1 -1
- package/dist/src/services/credentials/secrets-writer.service.d.ts +11 -2
- package/dist/src/services/credentials/secrets-writer.service.d.ts.map +1 -1
- package/dist/src/services/credentials/secrets-writer.service.js +12 -3
- package/dist/src/services/credentials/secrets-writer.service.js.map +1 -1
- package/dist/src/services/deployment/application-runtime-environment.d.ts.map +1 -1
- package/dist/src/services/deployment/application-runtime-environment.js +3 -13
- package/dist/src/services/deployment/application-runtime-environment.js.map +1 -1
- package/dist/src/services/deployment/ci-deploy-generator.service.d.ts.map +1 -1
- package/dist/src/services/deployment/ci-deploy-generator.service.js +3 -3
- package/dist/src/services/deployment/ci-deploy-generator.service.js.map +1 -1
- package/dist/src/services/deployment/docker/docker-compose-generator.service.d.ts +3 -3
- package/dist/src/services/deployment/docker/docker-compose-generator.service.d.ts.map +1 -1
- package/dist/src/services/deployment/docker/docker-compose-generator.service.js +24 -14
- package/dist/src/services/deployment/docker/docker-compose-generator.service.js.map +1 -1
- package/dist/src/services/deployment/framework-pod-network-membership.d.ts +6 -0
- package/dist/src/services/deployment/framework-pod-network-membership.d.ts.map +1 -1
- package/dist/src/services/deployment/framework-pod-network-membership.js +12 -3
- package/dist/src/services/deployment/framework-pod-network-membership.js.map +1 -1
- package/dist/src/services/deployment/host-toolchain-readiness.service.d.ts +1 -1
- package/dist/src/services/deployment/host-toolchain-readiness.service.js +1 -1
- package/dist/src/services/deployment/host-toolchain-readiness.service.js.map +1 -1
- package/dist/src/services/deployment/k8s/k8s-manifest-generator.service.d.ts +4 -1
- package/dist/src/services/deployment/k8s/k8s-manifest-generator.service.d.ts.map +1 -1
- package/dist/src/services/deployment/k8s/k8s-manifest-generator.service.js +20 -8
- package/dist/src/services/deployment/k8s/k8s-manifest-generator.service.js.map +1 -1
- package/dist/src/services/deployment/k8s/k8s-manifest.schemas.d.ts +7 -0
- package/dist/src/services/deployment/k8s/k8s-manifest.schemas.d.ts.map +1 -1
- package/dist/src/services/deployment/k8s/k8s-manifest.schemas.js.map +1 -1
- package/dist/src/services/deployment/k8s/k8s-secrets-generator.service.d.ts.map +1 -1
- package/dist/src/services/deployment/k8s/k8s-secrets-generator.service.js +15 -9
- package/dist/src/services/deployment/k8s/k8s-secrets-generator.service.js.map +1 -1
- package/dist/src/services/deployment/k8s/kind-pod-host-gateway.d.ts +43 -0
- package/dist/src/services/deployment/k8s/kind-pod-host-gateway.d.ts.map +1 -0
- package/dist/src/services/deployment/k8s/kind-pod-host-gateway.js +12 -0
- package/dist/src/services/deployment/k8s/kind-pod-host-gateway.js.map +1 -0
- package/dist/src/services/deployment/k8s/off-cluster-backing-services.d.ts +3 -1
- package/dist/src/services/deployment/k8s/off-cluster-backing-services.d.ts.map +1 -1
- package/dist/src/services/deployment/k8s/off-cluster-backing-services.js.map +1 -1
- package/dist/src/services/deployment/local-dev-late-workspace-members.service.d.ts +124 -0
- package/dist/src/services/deployment/local-dev-late-workspace-members.service.d.ts.map +1 -0
- package/dist/src/services/deployment/local-dev-late-workspace-members.service.js +249 -0
- package/dist/src/services/deployment/local-dev-late-workspace-members.service.js.map +1 -0
- package/dist/src/services/deployment/local-precondition-checks.service.d.ts.map +1 -1
- package/dist/src/services/deployment/local-precondition-checks.service.js +4 -2
- package/dist/src/services/deployment/local-precondition-checks.service.js.map +1 -1
- package/dist/src/services/environment/authored-infra-config.utils.d.ts +9 -0
- package/dist/src/services/environment/authored-infra-config.utils.d.ts.map +1 -1
- package/dist/src/services/environment/authored-infra-config.utils.js +20 -1
- package/dist/src/services/environment/authored-infra-config.utils.js.map +1 -1
- package/dist/src/services/environment/container-host-gateway-listen-host.d.ts +6 -0
- package/dist/src/services/environment/container-host-gateway-listen-host.d.ts.map +1 -1
- package/dist/src/services/environment/container-host-gateway-listen-host.js +6 -0
- package/dist/src/services/environment/container-host-gateway-listen-host.js.map +1 -1
- package/dist/src/services/environment/env-configuration-generator.service.d.ts +12 -0
- package/dist/src/services/environment/env-configuration-generator.service.d.ts.map +1 -1
- package/dist/src/services/environment/env-configuration-generator.service.js +45 -8
- package/dist/src/services/environment/env-configuration-generator.service.js.map +1 -1
- package/dist/src/services/environment/env-vars-builder.service.d.ts +2 -1
- package/dist/src/services/environment/env-vars-builder.service.d.ts.map +1 -1
- package/dist/src/services/environment/env-vars-builder.service.js +47 -32
- package/dist/src/services/environment/env-vars-builder.service.js.map +1 -1
- package/dist/src/services/environment/environment-lifecycle.service.d.ts +7 -4
- package/dist/src/services/environment/environment-lifecycle.service.d.ts.map +1 -1
- package/dist/src/services/environment/environment-lifecycle.service.js +14 -18
- package/dist/src/services/environment/environment-lifecycle.service.js.map +1 -1
- package/dist/src/services/environment/environment-service-profile.utils.d.ts +8 -1
- package/dist/src/services/environment/environment-service-profile.utils.d.ts.map +1 -1
- package/dist/src/services/environment/environment-service-profile.utils.js +14 -1
- package/dist/src/services/environment/environment-service-profile.utils.js.map +1 -1
- package/dist/src/services/environment/environment-setup.service.d.ts.map +1 -1
- package/dist/src/services/environment/environment-setup.service.js +17 -6
- package/dist/src/services/environment/environment-setup.service.js.map +1 -1
- package/dist/src/services/environment/environment.service.d.ts +4 -3
- package/dist/src/services/environment/environment.service.d.ts.map +1 -1
- package/dist/src/services/environment/environment.service.js +0 -1
- package/dist/src/services/environment/environment.service.js.map +1 -1
- package/dist/src/services/framework/framework-docker-publish.service.d.ts +129 -0
- package/dist/src/services/framework/framework-docker-publish.service.d.ts.map +1 -1
- package/dist/src/services/framework/framework-docker-publish.service.js +271 -19
- package/dist/src/services/framework/framework-docker-publish.service.js.map +1 -1
- package/dist/src/services/framework/github-actions-annotation.d.ts +19 -0
- package/dist/src/services/framework/github-actions-annotation.d.ts.map +1 -0
- package/dist/src/services/framework/github-actions-annotation.js +25 -0
- package/dist/src/services/framework/github-actions-annotation.js.map +1 -0
- package/dist/src/services/framework/registry-host/registry-host-upgrade.d.ts +43 -0
- package/dist/src/services/framework/registry-host/registry-host-upgrade.d.ts.map +1 -0
- package/dist/src/services/framework/registry-host/registry-host-upgrade.js +117 -0
- package/dist/src/services/framework/registry-host/registry-host-upgrade.js.map +1 -0
- package/dist/src/services/framework/registry-host/registry-host.service.d.ts +1 -1
- package/dist/src/services/framework/registry-host/registry-host.service.d.ts.map +1 -1
- package/dist/src/services/framework/registry-host/registry-host.service.js +2 -0
- package/dist/src/services/framework/registry-host/registry-host.service.js.map +1 -1
- package/dist/src/services/registry/installed-file-state.utils.d.ts +8 -0
- package/dist/src/services/registry/installed-file-state.utils.d.ts.map +1 -1
- package/dist/src/services/registry/installed-file-state.utils.js +9 -1
- package/dist/src/services/registry/installed-file-state.utils.js.map +1 -1
- package/dist/src/services/registry/module-install.service.d.ts.map +1 -1
- package/dist/src/services/registry/module-install.service.js +1 -0
- package/dist/src/services/registry/module-install.service.js.map +1 -1
- package/dist/src/services/registry/provider-module-scaffold.service.d.ts.map +1 -1
- package/dist/src/services/registry/provider-module-scaffold.service.js +4 -0
- package/dist/src/services/registry/provider-module-scaffold.service.js.map +1 -1
- package/dist/src/services/security/csp-sync.service.d.ts.map +1 -1
- package/dist/src/services/security/csp-sync.service.js +21 -2
- package/dist/src/services/security/csp-sync.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/framework-root-package.json +3 -3
- package/package.json +23 -23
- package/scripts/app-dependency-alignment/propagated-engine-overrides.json +1 -1
- package/templates/infra/docker-compose/docker-compose.wildo-platform.yml.hbs +31 -9
- package/templates/infra/k8s/platform/platform-crontabs-batches-manager/deployment.yaml.hbs +13 -0
- package/templates/infra/registry-host/docker-compose.yml +9 -2
- package/templates/infra/registry-host/upgrade-image.sh +108 -0
- package/templates/saas/i18n/email/resources/dataSubjectRequests/create.users-custom_ready/labels.fr.ts +22 -0
- package/templates/saas/i18n/email/resources/dataSubjectRequests/create.users-custom_received/labels.fr.ts +23 -0
- package/templates/saas/i18n/email/resources/dataSubjectRequests/update.users-custom_extended/labels.fr.ts +23 -0
- package/templates/saas/i18n/email/resources/organizationSsoConfig/repairUnreadableConfiguration.organization-users/labels.fr.ts +23 -0
- package/templates/saas/i18n/engine/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.en.ts +28 -0
- package/templates/saas/i18n/engine/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.fr.ts +28 -0
- package/templates/saas/i18n/engine/components/LOW_LEVEL_AI_APPROVAL.en.ts +2 -1
- package/templates/saas/i18n/engine/components/LOW_LEVEL_AI_APPROVAL.fr.ts +2 -1
- package/templates/saas/i18n/engine/components/LOW_LEVEL_AI_CONVERSATION_THREAD.en.ts +6 -1
- package/templates/saas/i18n/engine/components/LOW_LEVEL_AI_CONVERSATION_THREAD.fr.ts +6 -1
- package/templates/saas/i18n/engine/components/LOW_LEVEL_APPROVAL_SEAL.en.ts +40 -0
- package/templates/saas/i18n/engine/components/LOW_LEVEL_APPROVAL_SEAL.fr.ts +40 -0
- package/templates/saas/i18n/engine/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.en.ts +2 -1
- package/templates/saas/i18n/engine/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.fr.ts +2 -1
- package/templates/saas/i18n/engine/components/LOW_LEVEL_FORM_FIELD_STRING.en.ts +2 -1
- package/templates/saas/i18n/engine/components/LOW_LEVEL_FORM_FIELD_STRING.fr.ts +2 -1
- package/templates/saas/i18n/engine/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.en.ts +2 -1
- package/templates/saas/i18n/engine/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.fr.ts +2 -1
- package/templates/saas/i18n/engine/components/PUBLIC_LAYOUTS_TERMS.en.ts +3 -1
- package/templates/saas/i18n/engine/components/PUBLIC_LAYOUTS_TERMS.fr.ts +3 -1
- package/templates/saas/i18n/engine/components/PUBLIC_LAYOUTS_USER_AUTH.en.ts +2 -1
- package/templates/saas/i18n/engine/components/PUBLIC_LAYOUTS_USER_AUTH.fr.ts +2 -1
- package/templates/saas/i18n/engine/components/RESOURCES_LAYOUTS_FILTERS.en.ts +3 -1
- package/templates/saas/i18n/engine/components/RESOURCES_LAYOUTS_FILTERS.fr.ts +4 -2
- package/templates/saas/i18n/engine/components/RESOURCES_LAYOUTS_LIST.en.ts +18 -1
- package/templates/saas/i18n/engine/components/RESOURCES_LAYOUTS_LIST.fr.ts +18 -1
- package/templates/saas/i18n/engine/resources/actorSystemExecutions.en.ts +10 -82
- package/templates/saas/i18n/engine/resources/actorSystemExecutions.fr.ts +0 -72
- package/templates/saas/i18n/engine/resources/actorTasks.en.ts +0 -33
- package/templates/saas/i18n/engine/resources/actorTasks.fr.ts +0 -33
- package/templates/saas/i18n/engine/resources/agentBehaviorReports.en.ts +0 -108
- package/templates/saas/i18n/engine/resources/agentBehaviorReports.fr.ts +0 -108
- package/templates/saas/i18n/engine/resources/agentOperationRecords.en.ts +8 -24
- package/templates/saas/i18n/engine/resources/agentOperationRecords.fr.ts +10 -26
- package/templates/saas/i18n/engine/resources/agentWorkCaptureSettings.en.ts +0 -12
- package/templates/saas/i18n/engine/resources/agentWorkCaptureSettings.fr.ts +0 -12
- package/templates/saas/i18n/engine/resources/anonymous_users.en.ts +8 -74
- package/templates/saas/i18n/engine/resources/anonymous_users.fr.ts +0 -66
- package/templates/saas/i18n/engine/resources/applicationA2aPushDeliveryLog.en.ts +3 -21
- package/templates/saas/i18n/engine/resources/applicationA2aPushDeliveryLog.fr.ts +0 -18
- package/templates/saas/i18n/engine/resources/applicationA2aTokenBudgetState.en.ts +3 -33
- package/templates/saas/i18n/engine/resources/applicationA2aTokenBudgetState.fr.ts +0 -30
- package/templates/saas/i18n/engine/resources/applicationAccessGrants.en.ts +13 -55
- package/templates/saas/i18n/engine/resources/applicationAccessGrants.fr.ts +0 -42
- package/templates/saas/i18n/engine/resources/applicationAgentPolicies.en.ts +8 -24
- package/templates/saas/i18n/engine/resources/applicationAgentPolicies.fr.ts +8 -24
- package/templates/saas/i18n/engine/resources/applicationAgentWorkDecisionContents.en.ts +0 -27
- package/templates/saas/i18n/engine/resources/applicationAgentWorkDecisionContents.fr.ts +0 -27
- package/templates/saas/i18n/engine/resources/applicationAgentWorkDecisions.en.ts +13 -43
- package/templates/saas/i18n/engine/resources/applicationAgentWorkDecisions.fr.ts +0 -30
- package/templates/saas/i18n/engine/resources/applicationApiKeys.en.ts +2 -70
- package/templates/saas/i18n/engine/resources/applicationApiKeys.fr.ts +2 -70
- package/templates/saas/i18n/engine/resources/applicationAuditLogs.en.ts +41 -94
- package/templates/saas/i18n/engine/resources/applicationAuditLogs.fr.ts +41 -94
- package/templates/saas/i18n/engine/resources/applicationDataKeys.en.ts +2 -22
- package/templates/saas/i18n/engine/resources/applicationDataKeys.fr.ts +2 -22
- package/templates/saas/i18n/engine/resources/applicationFeatures.en.ts +0 -24
- package/templates/saas/i18n/engine/resources/applicationFeatures.fr.ts +0 -24
- package/templates/saas/i18n/engine/resources/applicationFlowActorExecutions.en.ts +25 -160
- package/templates/saas/i18n/engine/resources/applicationFlowActorExecutions.fr.ts +25 -160
- package/templates/saas/i18n/engine/resources/applicationFlowActorTasks.en.ts +6 -28
- package/templates/saas/i18n/engine/resources/applicationFlowActorTasks.fr.ts +8 -30
- package/templates/saas/i18n/engine/resources/applicationInboundDeliveries.en.ts +92 -23
- package/templates/saas/i18n/engine/resources/applicationInboundDeliveries.fr.ts +95 -26
- package/templates/saas/i18n/engine/resources/applicationM2mWebhookDeliveryLog.en.ts +1 -25
- package/templates/saas/i18n/engine/resources/applicationM2mWebhookDeliveryLog.fr.ts +4 -28
- package/templates/saas/i18n/engine/resources/applicationMetadata.en.ts +0 -18
- package/templates/saas/i18n/engine/resources/applicationMetadata.fr.ts +0 -18
- package/templates/saas/i18n/engine/resources/applicationOAuthClients.en.ts +2 -58
- package/templates/saas/i18n/engine/resources/applicationOAuthClients.fr.ts +2 -58
- package/templates/saas/i18n/engine/resources/applicationProviderCredentials.en.ts +168 -0
- package/templates/saas/i18n/engine/resources/applicationProviderCredentials.fr.ts +168 -0
- package/templates/saas/i18n/engine/resources/applicationScimProvisioningConfig.en.ts +0 -30
- package/templates/saas/i18n/engine/resources/applicationScimProvisioningConfig.fr.ts +0 -30
- package/templates/saas/i18n/engine/resources/applicationSiemDeliveryDlq.en.ts +3 -42
- package/templates/saas/i18n/engine/resources/applicationSiemDeliveryDlq.fr.ts +5 -44
- package/templates/saas/i18n/engine/resources/applicationSiemDeliveryOutbox.en.ts +3 -30
- package/templates/saas/i18n/engine/resources/applicationSiemDeliveryOutbox.fr.ts +0 -27
- package/templates/saas/i18n/engine/resources/applicationSiemExportConfig.en.ts +0 -24
- package/templates/saas/i18n/engine/resources/applicationSiemExportConfig.fr.ts +0 -24
- package/templates/saas/i18n/engine/resources/applicationSsoConfig.en.ts +113 -61
- package/templates/saas/i18n/engine/resources/applicationSsoConfig.fr.ts +113 -61
- package/templates/saas/i18n/engine/resources/applicationSsoConnections.en.ts +0 -138
- package/templates/saas/i18n/engine/resources/applicationSsoConnections.fr.ts +0 -138
- package/templates/saas/i18n/engine/resources/applicationVersions.en.ts +3 -27
- package/templates/saas/i18n/engine/resources/applicationVersions.fr.ts +0 -24
- package/templates/saas/i18n/engine/resources/applicationWebhookConfig.en.ts +5 -54
- package/templates/saas/i18n/engine/resources/applicationWebhookConfig.fr.ts +5 -54
- package/templates/saas/i18n/engine/resources/applications.en.ts +39 -2177
- package/templates/saas/i18n/engine/resources/applications.fr.ts +39 -2177
- package/templates/saas/i18n/engine/resources/approvalSeals.en.ts +38 -31
- package/templates/saas/i18n/engine/resources/approvalSeals.fr.ts +38 -31
- package/templates/saas/i18n/engine/resources/auditLogs.en.ts +78 -111
- package/templates/saas/i18n/engine/resources/auditLogs.fr.ts +78 -111
- package/templates/saas/i18n/engine/resources/billingEffectOutbox.en.ts +2 -4
- package/templates/saas/i18n/engine/resources/billingEffectOutbox.fr.ts +2 -4
- package/templates/saas/i18n/engine/resources/billingSubscriptionMutationIntents.en.ts +8 -6
- package/templates/saas/i18n/engine/resources/billingSubscriptionMutationIntents.fr.ts +8 -6
- package/templates/saas/i18n/engine/resources/chatConversations.en.ts +0 -18
- package/templates/saas/i18n/engine/resources/chatConversations.fr.ts +0 -18
- package/templates/saas/i18n/engine/resources/chatIdentityLinks.en.ts +0 -44
- package/templates/saas/i18n/engine/resources/chatIdentityLinks.fr.ts +0 -44
- package/templates/saas/i18n/engine/resources/consumableTokens.en.ts +4 -43
- package/templates/saas/i18n/engine/resources/consumableTokens.fr.ts +4 -43
- package/templates/saas/i18n/engine/resources/conversationMessages.en.ts +16 -27
- package/templates/saas/i18n/engine/resources/conversationMessages.fr.ts +16 -27
- package/templates/saas/i18n/engine/resources/conversationReplyTokens.en.ts +0 -27
- package/templates/saas/i18n/engine/resources/conversationReplyTokens.fr.ts +0 -27
- package/templates/saas/i18n/engine/resources/conversationThreads.en.ts +0 -27
- package/templates/saas/i18n/engine/resources/conversationThreads.fr.ts +0 -27
- package/templates/saas/i18n/engine/resources/dataSeedRuns.en.ts +22 -17
- package/templates/saas/i18n/engine/resources/dataSeedRuns.fr.ts +22 -17
- package/templates/saas/i18n/engine/resources/dataSubjectRequests.en.ts +410 -0
- package/templates/saas/i18n/engine/resources/dataSubjectRequests.fr.ts +410 -0
- package/templates/saas/i18n/engine/resources/etlPipelineStates.en.ts +128 -146
- package/templates/saas/i18n/engine/resources/etlPipelineStates.fr.ts +0 -18
- package/templates/saas/i18n/engine/resources/evaluationDatasetExports.en.ts +13 -43
- package/templates/saas/i18n/engine/resources/evaluationDatasetExports.fr.ts +0 -30
- package/templates/saas/i18n/engine/resources/evaluationExportAuthorizations.en.ts +0 -12
- package/templates/saas/i18n/engine/resources/evaluationExportAuthorizations.fr.ts +0 -12
- package/templates/saas/i18n/engine/resources/externalDataErasureSuppressions.en.ts +0 -21
- package/templates/saas/i18n/engine/resources/externalDataErasureSuppressions.fr.ts +0 -21
- package/templates/saas/i18n/engine/resources/externalDataOutboundChanges.en.ts +24 -45
- package/templates/saas/i18n/engine/resources/externalDataOutboundChanges.fr.ts +0 -21
- package/templates/saas/i18n/engine/resources/externalDataPendingReferences.en.ts +0 -24
- package/templates/saas/i18n/engine/resources/externalDataPendingReferences.fr.ts +0 -24
- package/templates/saas/i18n/engine/resources/externalDataPipelineMembershipKeys.en.ts +0 -21
- package/templates/saas/i18n/engine/resources/externalDataPipelineMembershipKeys.fr.ts +0 -21
- package/templates/saas/i18n/engine/resources/externalDataPipelineMemberships.en.ts +8 -14
- package/templates/saas/i18n/engine/resources/externalDataPipelineMemberships.fr.ts +0 -6
- package/templates/saas/i18n/engine/resources/externalDataPipelineRequestedKeys.en.ts +0 -24
- package/templates/saas/i18n/engine/resources/externalDataPipelineRequestedKeys.fr.ts +0 -24
- package/templates/saas/i18n/engine/resources/externalDataPipelineRunRecords.en.ts +150 -174
- package/templates/saas/i18n/engine/resources/externalDataPipelineRunRecords.fr.ts +0 -24
- package/templates/saas/i18n/engine/resources/externalDataRemoteVersions.en.ts +12 -33
- package/templates/saas/i18n/engine/resources/externalDataRemoteVersions.fr.ts +0 -21
- package/templates/saas/i18n/engine/resources/externalEffectReservations.en.ts +147 -0
- package/templates/saas/i18n/engine/resources/externalEffectReservations.fr.ts +147 -0
- package/templates/saas/i18n/engine/resources/files.en.ts +0 -39
- package/templates/saas/i18n/engine/resources/files.fr.ts +0 -39
- package/templates/saas/i18n/engine/resources/humanDecisionNoticeStays.en.ts +0 -18
- package/templates/saas/i18n/engine/resources/humanDecisionNoticeStays.fr.ts +0 -18
- package/templates/saas/i18n/engine/resources/idempotentRequestOutcomes.en.ts +115 -0
- package/templates/saas/i18n/engine/resources/idempotentRequestOutcomes.fr.ts +115 -0
- package/templates/saas/i18n/engine/resources/inboundAddressTombstones.en.ts +0 -27
- package/templates/saas/i18n/engine/resources/inboundAddressTombstones.fr.ts +0 -27
- package/templates/saas/i18n/engine/resources/inboundContacts.en.ts +3 -30
- package/templates/saas/i18n/engine/resources/inboundContacts.fr.ts +0 -27
- package/templates/saas/i18n/engine/resources/inboundEmails.en.ts +0 -27
- package/templates/saas/i18n/engine/resources/inboundEmails.fr.ts +0 -27
- package/templates/saas/i18n/engine/resources/jobExecutions.en.ts +11 -25
- package/templates/saas/i18n/engine/resources/jobExecutions.fr.ts +11 -25
- package/templates/saas/i18n/engine/resources/jobPayloadStorage.en.ts +3 -30
- package/templates/saas/i18n/engine/resources/jobPayloadStorage.fr.ts +0 -27
- package/templates/saas/i18n/engine/resources/legalHolds.en.ts +0 -88
- package/templates/saas/i18n/engine/resources/legalHolds.fr.ts +0 -88
- package/templates/saas/i18n/engine/resources/modelCallAttributions.en.ts +16 -40
- package/templates/saas/i18n/engine/resources/modelCallAttributions.fr.ts +0 -24
- package/templates/saas/i18n/engine/resources/modelCostPeriodAggregates.en.ts +13 -37
- package/templates/saas/i18n/engine/resources/modelCostPeriodAggregates.fr.ts +0 -24
- package/templates/saas/i18n/engine/resources/oauthConsentGrants.en.ts +10 -40
- package/templates/saas/i18n/engine/resources/oauthConsentGrants.fr.ts +0 -30
- package/templates/saas/i18n/engine/resources/operationApprovalRequests.en.ts +120 -60
- package/templates/saas/i18n/engine/resources/operationApprovalRequests.fr.ts +120 -60
- package/templates/saas/i18n/engine/resources/organizationA2aPushDeliveryLog.en.ts +3 -21
- package/templates/saas/i18n/engine/resources/organizationA2aPushDeliveryLog.fr.ts +0 -18
- package/templates/saas/i18n/engine/resources/organizationA2aTokenBudgetState.en.ts +3 -33
- package/templates/saas/i18n/engine/resources/organizationA2aTokenBudgetState.fr.ts +0 -30
- package/templates/saas/i18n/engine/resources/organizationAgentPolicies.en.ts +0 -27
- package/templates/saas/i18n/engine/resources/organizationAgentPolicies.fr.ts +0 -27
- package/templates/saas/i18n/engine/resources/organizationAgentWorkDecisionContents.en.ts +0 -27
- package/templates/saas/i18n/engine/resources/organizationAgentWorkDecisionContents.fr.ts +0 -27
- package/templates/saas/i18n/engine/resources/organizationAgentWorkDecisions.en.ts +13 -43
- package/templates/saas/i18n/engine/resources/organizationAgentWorkDecisions.fr.ts +0 -30
- package/templates/saas/i18n/engine/resources/organizationApiKeys.en.ts +2 -79
- package/templates/saas/i18n/engine/resources/organizationApiKeys.fr.ts +2 -79
- package/templates/saas/i18n/engine/resources/organizationBillingAccounts.en.ts +0 -549
- package/templates/saas/i18n/engine/resources/organizationBillingAccounts.fr.ts +0 -549
- package/templates/saas/i18n/engine/resources/organizationChatSettings.en.ts +0 -27
- package/templates/saas/i18n/engine/resources/organizationChatSettings.fr.ts +0 -27
- package/templates/saas/i18n/engine/resources/organizationCreditPools.en.ts +13 -18
- package/templates/saas/i18n/engine/resources/organizationCreditPools.fr.ts +13 -18
- package/templates/saas/i18n/engine/resources/organizationCustomDomains.en.ts +195 -0
- package/templates/saas/i18n/engine/resources/organizationCustomDomains.fr.ts +195 -0
- package/templates/saas/i18n/engine/resources/organizationDashboardLayouts.en.ts +153 -0
- package/templates/saas/i18n/engine/resources/organizationDashboardLayouts.fr.ts +153 -0
- package/templates/saas/i18n/engine/resources/organizationEmailDomains.en.ts +0 -39
- package/templates/saas/i18n/engine/resources/organizationEmailDomains.fr.ts +0 -39
- package/templates/saas/i18n/engine/resources/organizationFeatures.en.ts +0 -34
- package/templates/saas/i18n/engine/resources/organizationFeatures.fr.ts +0 -34
- package/templates/saas/i18n/engine/resources/organizationFlowActorExecutions.en.ts +25 -160
- package/templates/saas/i18n/engine/resources/organizationFlowActorExecutions.fr.ts +25 -160
- package/templates/saas/i18n/engine/resources/organizationFlowActorTasks.en.ts +6 -28
- package/templates/saas/i18n/engine/resources/organizationFlowActorTasks.fr.ts +8 -30
- package/templates/saas/i18n/engine/resources/organizationGuidanceState.en.ts +3 -18
- package/templates/saas/i18n/engine/resources/organizationGuidanceState.fr.ts +0 -15
- package/templates/saas/i18n/engine/resources/organizationInboundDeliveries.en.ts +95 -26
- package/templates/saas/i18n/engine/resources/organizationInboundDeliveries.fr.ts +95 -26
- package/templates/saas/i18n/engine/resources/organizationInvoiceRefs.en.ts +14 -45
- package/templates/saas/i18n/engine/resources/organizationInvoiceRefs.fr.ts +14 -45
- package/templates/saas/i18n/engine/resources/organizationLifecycleState.en.ts +1 -17
- package/templates/saas/i18n/engine/resources/organizationLifecycleState.fr.ts +1 -17
- package/templates/saas/i18n/engine/resources/organizationM2mWebhookDeliveryLog.en.ts +2 -26
- package/templates/saas/i18n/engine/resources/organizationM2mWebhookDeliveryLog.fr.ts +4 -28
- package/templates/saas/i18n/engine/resources/organizationMembers.en.ts +2 -95
- package/templates/saas/i18n/engine/resources/organizationMembers.fr.ts +2 -95
- package/templates/saas/i18n/engine/resources/organizationModelUsageCeilingState.en.ts +0 -27
- package/templates/saas/i18n/engine/resources/organizationModelUsageCeilingState.fr.ts +0 -27
- package/templates/saas/i18n/engine/resources/organizationNotificationBadges.en.ts +3 -36
- package/templates/saas/i18n/engine/resources/organizationNotificationBadges.fr.ts +0 -33
- package/templates/saas/i18n/engine/resources/organizationNotifications.en.ts +0 -12
- package/templates/saas/i18n/engine/resources/organizationNotifications.fr.ts +0 -12
- package/templates/saas/i18n/engine/resources/organizationOAuthClients.en.ts +2 -67
- package/templates/saas/i18n/engine/resources/organizationOAuthClients.fr.ts +2 -67
- package/templates/saas/i18n/engine/resources/organizationOnboardingOperations.en.ts +0 -9
- package/templates/saas/i18n/engine/resources/organizationOnboardingOperations.fr.ts +0 -9
- package/templates/saas/i18n/engine/resources/organizationPersonTokenCeilingState.en.ts +0 -27
- package/templates/saas/i18n/engine/resources/organizationPersonTokenCeilingState.fr.ts +0 -27
- package/templates/saas/i18n/engine/resources/organizationPreferences.en.ts +0 -37
- package/templates/saas/i18n/engine/resources/organizationPreferences.fr.ts +0 -37
- package/templates/saas/i18n/engine/resources/organizationProfiles.en.ts +0 -37
- package/templates/saas/i18n/engine/resources/organizationProfiles.fr.ts +0 -37
- package/templates/saas/i18n/engine/resources/organizationProgressionState.en.ts +1 -17
- package/templates/saas/i18n/engine/resources/organizationProgressionState.fr.ts +1 -17
- package/templates/saas/i18n/engine/resources/organizationProviderCredentials.en.ts +0 -58
- package/templates/saas/i18n/engine/resources/organizationProviderCredentials.fr.ts +0 -58
- package/templates/saas/i18n/engine/resources/organizationRelationships.en.ts +0 -128
- package/templates/saas/i18n/engine/resources/organizationRelationships.fr.ts +0 -128
- package/templates/saas/i18n/engine/resources/organizationRepresentations.en.ts +0 -83
- package/templates/saas/i18n/engine/resources/organizationRepresentations.fr.ts +0 -83
- package/templates/saas/i18n/engine/resources/organizationScimProvisioningConfig.en.ts +0 -43
- package/templates/saas/i18n/engine/resources/organizationScimProvisioningConfig.fr.ts +0 -43
- package/templates/saas/i18n/engine/resources/organizationScimTokens.en.ts +5 -76
- package/templates/saas/i18n/engine/resources/organizationScimTokens.fr.ts +5 -76
- package/templates/saas/i18n/engine/resources/organizationSiemDeliveryDlq.en.ts +4 -43
- package/templates/saas/i18n/engine/resources/organizationSiemDeliveryDlq.fr.ts +6 -45
- package/templates/saas/i18n/engine/resources/organizationSiemDeliveryOutbox.en.ts +3 -30
- package/templates/saas/i18n/engine/resources/organizationSiemDeliveryOutbox.fr.ts +0 -27
- package/templates/saas/i18n/engine/resources/organizationSiemExportConfig.en.ts +0 -37
- package/templates/saas/i18n/engine/resources/organizationSiemExportConfig.fr.ts +0 -37
- package/templates/saas/i18n/engine/resources/organizationSsoConfig.en.ts +113 -74
- package/templates/saas/i18n/engine/resources/organizationSsoConfig.fr.ts +113 -74
- package/templates/saas/i18n/engine/resources/organizationSsoConnections.en.ts +0 -148
- package/templates/saas/i18n/engine/resources/organizationSsoConnections.fr.ts +0 -148
- package/templates/saas/i18n/engine/resources/organizationSubscriptions.en.ts +40 -78
- package/templates/saas/i18n/engine/resources/organizationSubscriptions.fr.ts +42 -80
- package/templates/saas/i18n/engine/resources/organizationUnitMembers.en.ts +2 -50
- package/templates/saas/i18n/engine/resources/organizationUnitMembers.fr.ts +2 -50
- package/templates/saas/i18n/engine/resources/organizationUnits.en.ts +0 -49
- package/templates/saas/i18n/engine/resources/organizationUnits.fr.ts +0 -49
- package/templates/saas/i18n/engine/resources/organizationUsageRecords.en.ts +13 -37
- package/templates/saas/i18n/engine/resources/organizationUsageRecords.fr.ts +13 -37
- package/templates/saas/i18n/engine/resources/organizationWebhookConfig.en.ts +5 -67
- package/templates/saas/i18n/engine/resources/organizationWebhookConfig.fr.ts +5 -67
- package/templates/saas/i18n/engine/resources/organizations.en.ts +34 -637
- package/templates/saas/i18n/engine/resources/organizations.fr.ts +32 -635
- package/templates/saas/i18n/engine/resources/platformAccessGrants.en.ts +0 -91
- package/templates/saas/i18n/engine/resources/platformAccessGrants.fr.ts +0 -91
- package/templates/saas/i18n/engine/resources/postCommitEffectOutbox.en.ts +0 -24
- package/templates/saas/i18n/engine/resources/postCommitEffectOutbox.fr.ts +0 -24
- package/templates/saas/i18n/engine/resources/prices.en.ts +47 -108
- package/templates/saas/i18n/engine/resources/prices.fr.ts +48 -109
- package/templates/saas/i18n/engine/resources/products.en.ts +24 -68
- package/templates/saas/i18n/engine/resources/products.fr.ts +24 -68
- package/templates/saas/i18n/engine/resources/professionalQualifications.en.ts +0 -87
- package/templates/saas/i18n/engine/resources/professionalQualifications.fr.ts +0 -87
- package/templates/saas/i18n/engine/resources/promotions.en.ts +4 -56
- package/templates/saas/i18n/engine/resources/promotions.fr.ts +6 -58
- package/templates/saas/i18n/engine/resources/providerCallRecords.en.ts +77 -101
- package/templates/saas/i18n/engine/resources/providerCallRecords.fr.ts +0 -24
- package/templates/saas/i18n/engine/resources/publishedVerificationKeys.en.ts +2 -25
- package/templates/saas/i18n/engine/resources/publishedVerificationKeys.fr.ts +2 -25
- package/templates/saas/i18n/engine/resources/referrals.en.ts +21 -18
- package/templates/saas/i18n/engine/resources/referrals.fr.ts +21 -18
- package/templates/saas/i18n/engine/resources/relationshipCapabilityGrants.en.ts +0 -80
- package/templates/saas/i18n/engine/resources/relationshipCapabilityGrants.fr.ts +0 -80
- package/templates/saas/i18n/engine/resources/relationshipInvitations.en.ts +0 -89
- package/templates/saas/i18n/engine/resources/relationshipInvitations.fr.ts +0 -89
- package/templates/saas/i18n/engine/resources/relationshipMailboxes.en.ts +0 -27
- package/templates/saas/i18n/engine/resources/relationshipMailboxes.fr.ts +0 -27
- package/templates/saas/i18n/engine/resources/representativeAssignments.en.ts +108 -112
- package/templates/saas/i18n/engine/resources/representativeAssignments.fr.ts +108 -112
- package/templates/saas/i18n/engine/resources/retentionEnforcementRecords.en.ts +8 -21
- package/templates/saas/i18n/engine/resources/retentionEnforcementRecords.fr.ts +8 -21
- package/templates/saas/i18n/engine/resources/signatureRequestSigners.en.ts +141 -0
- package/templates/saas/i18n/engine/resources/signatureRequestSigners.fr.ts +141 -0
- package/templates/saas/i18n/engine/resources/signatureRequests.en.ts +205 -0
- package/templates/saas/i18n/engine/resources/signatureRequests.fr.ts +205 -0
- package/templates/saas/i18n/engine/resources/smsNumberAssignments.en.ts +101 -0
- package/templates/saas/i18n/engine/resources/smsNumberAssignments.fr.ts +101 -0
- package/templates/saas/i18n/engine/resources/smsOptOuts.en.ts +166 -0
- package/templates/saas/i18n/engine/resources/smsOptOuts.fr.ts +166 -0
- package/templates/saas/i18n/engine/resources/smsProviderEvents.en.ts +195 -0
- package/templates/saas/i18n/engine/resources/smsProviderEvents.fr.ts +195 -0
- package/templates/saas/i18n/engine/resources/ssoDomainReservations.en.ts +0 -27
- package/templates/saas/i18n/engine/resources/ssoDomainReservations.fr.ts +0 -27
- package/templates/saas/i18n/engine/resources/systemOfRecordPartitionAssignments.en.ts +3 -39
- package/templates/saas/i18n/engine/resources/systemOfRecordPartitionAssignments.fr.ts +0 -36
- package/templates/saas/i18n/engine/resources/systemOfRecordWriteAdmissions.en.ts +0 -3
- package/templates/saas/i18n/engine/resources/systemOfRecordWriteAdmissions.fr.ts +0 -3
- package/templates/saas/i18n/engine/resources/transactionalCommitReceipts.en.ts +0 -6
- package/templates/saas/i18n/engine/resources/transactionalCommitReceipts.fr.ts +0 -6
- package/templates/saas/i18n/engine/resources/userA2aPushDeliveryLog.en.ts +3 -21
- package/templates/saas/i18n/engine/resources/userA2aPushDeliveryLog.fr.ts +0 -18
- package/templates/saas/i18n/engine/resources/userA2aTokenBudgetState.en.ts +3 -33
- package/templates/saas/i18n/engine/resources/userA2aTokenBudgetState.fr.ts +0 -30
- package/templates/saas/i18n/engine/resources/userAgentWorkDecisionContents.en.ts +0 -27
- package/templates/saas/i18n/engine/resources/userAgentWorkDecisionContents.fr.ts +0 -27
- package/templates/saas/i18n/engine/resources/userAgentWorkDecisions.en.ts +13 -43
- package/templates/saas/i18n/engine/resources/userAgentWorkDecisions.fr.ts +0 -30
- package/templates/saas/i18n/engine/resources/userCredentials.en.ts +3 -87
- package/templates/saas/i18n/engine/resources/userCredentials.fr.ts +0 -84
- package/templates/saas/i18n/engine/resources/userFeatures.en.ts +0 -12
- package/templates/saas/i18n/engine/resources/userFeatures.fr.ts +0 -12
- package/templates/saas/i18n/engine/resources/userFlowActorExecutions.en.ts +25 -160
- package/templates/saas/i18n/engine/resources/userFlowActorExecutions.fr.ts +25 -160
- package/templates/saas/i18n/engine/resources/userFlowActorTasks.en.ts +6 -28
- package/templates/saas/i18n/engine/resources/userFlowActorTasks.fr.ts +8 -30
- package/templates/saas/i18n/engine/resources/userGovernedDocumentAcceptances.en.ts +13 -18
- package/templates/saas/i18n/engine/resources/userGovernedDocumentAcceptances.fr.ts +13 -18
- package/templates/saas/i18n/engine/resources/userGuidanceState.en.ts +3 -18
- package/templates/saas/i18n/engine/resources/userGuidanceState.fr.ts +0 -15
- package/templates/saas/i18n/engine/resources/userIdentityLinks.en.ts +13 -40
- package/templates/saas/i18n/engine/resources/userIdentityLinks.fr.ts +0 -27
- package/templates/saas/i18n/engine/resources/userLifecycleState.en.ts +0 -15
- package/templates/saas/i18n/engine/resources/userLifecycleState.fr.ts +0 -15
- package/templates/saas/i18n/engine/resources/userNotificationBadges.en.ts +3 -36
- package/templates/saas/i18n/engine/resources/userNotificationBadges.fr.ts +0 -33
- package/templates/saas/i18n/engine/resources/userPreferences.en.ts +8 -60
- package/templates/saas/i18n/engine/resources/userPreferences.fr.ts +8 -60
- package/templates/saas/i18n/engine/resources/userProfiles.en.ts +5 -56
- package/templates/saas/i18n/engine/resources/userProfiles.fr.ts +0 -51
- package/templates/saas/i18n/engine/resources/userProgressionState.en.ts +1 -17
- package/templates/saas/i18n/engine/resources/userProgressionState.fr.ts +1 -17
- package/templates/saas/i18n/engine/resources/userProviderCredentials.en.ts +0 -52
- package/templates/saas/i18n/engine/resources/userProviderCredentials.fr.ts +0 -52
- package/templates/saas/i18n/engine/resources/userSelfPreferences.en.ts +8 -56
- package/templates/saas/i18n/engine/resources/userSelfPreferences.fr.ts +8 -56
- package/templates/saas/i18n/engine/resources/userSelfProfiles.en.ts +5 -61
- package/templates/saas/i18n/engine/resources/userSelfProfiles.fr.ts +0 -56
- package/templates/saas/i18n/engine/resources/user_self.en.ts +37 -214
- package/templates/saas/i18n/engine/resources/user_self.fr.ts +37 -214
- package/templates/saas/i18n/engine/resources/users.en.ts +53 -180
- package/templates/saas/i18n/engine/resources/users.fr.ts +53 -180
- package/templates/saas/scenarios/add-technical-doc/files/technical-doc/Dockerfile +4 -1
- package/templates/saas/scenarios/add-technical-doc/files/technical-doc/src/plugins/api-reference-pages.ts +9 -1
- package/templates/saas/scenarios/add-website/files/website/Dockerfile +4 -1
- package/templates/saas/scenarios/add-website/files/website/astro.config.ts.hbs +4 -0
- package/templates/saas/scenarios/add-website/files/website/package.json.hbs +1 -1
- package/templates/saas/scenarios/add-worker-node/files/workers/__workerDir__/Dockerfile.hbs +3 -1
- package/templates/saas/skeleton/.wildo-saas/wildo-dev-companion/scripts/dev-supervised.sh +18 -4
- package/templates/saas/skeleton/backend-api/Dockerfile +5 -2
- package/templates/saas/skeleton/frontend/Dockerfile +4 -1
- package/templates/saas/skeleton/frontend/nginx-config/default.conf.hbs +1 -1
- package/templates/saas/skeleton/frontend/src/generated/csp.generated.json.hbs +4 -4
- package/templates/saas/skeleton/frontend/vite-engine-dependency-prebundle.ts +10 -1
- package/templates/saas/skeleton/frontend/vite.config.ts.hbs +14 -3
- package/templates/saas/skeleton/infrastructure/local/wildo.infra.local.config.ts.hbs +2 -0
- package/wildo-framework.info.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"csp-sync.service.js","sourceRoot":"","sources":["../../../../src/services/security/csp-sync.service.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,SAAS,EACT,YAAY,EACZ,WAAW,EACX,QAAQ,EACR,aAAa,GACd,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7D,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,sBAAsB,EACtB,oBAAoB,EACpB,sBAAsB,EACtB,gBAAgB,EAChB,UAAU,EACV,iCAAiC,EACjC,yBAAyB,EACzB,gBAAgB,EAChB,mCAAmC,EACnC,0BAA0B,EAC1B,gCAAgC,EAChC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M,KAAK,GAAG,KAAK,CAAC,SAAS,KAAK,IAAI,CAAC;YACvC,MAAM,0BAA0B,GAAG,8BAA8B,CAC/D,kBAAkB,EAClB,qBAAqB,EACrB,EAAE,KAAK,EAAE,CACV,CAAC;YACF,MAAM,mBAAmB,GAAa,EAAE,CAAC;YAEzC,KAAK,MAAM,eAAe,IAAI,qCAAqC,CAAC,WAAW,CAAC,EAAE,CAAC;gBACjF,MAAM,SAAS,GAAG,KAAK;oBACrB,CAAC,CAAC,0BAA0B,CAAC,eAAe,EAAE,kBAAkB,CAAC,mBAAmB,CAAC,CAAC,WAAW;oBACjG,CAAC,CAAC,+BAA+B,CAAC,eAAe,EAAE,kBAAkB,CAAC,mBAAmB,CAAC,CAAC;gBAC7F,IAAI,SAAS,EAAE,CAAC;oBACd,mBAAmB,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC,CAAC,CAAC;gBAChE,CAAC;YACH,CAAC;YAED,QAAQ,CAAC,IAAI,CAAC;gBACZ,UAAU;gBACV,YAAY;gBACZ,qBAAqB,EAAE,QAAQ,CAAC,QAAQ,EAAE,qBAAqB,CAAC;gBAChE,0BAA0B;gBAC1B,mBAAmB;gBACnB,YAAY,EAAE,KAAK,IAAI,CAAC,0BAA0B,IAAI,mBAAmB,CAAC,MAAM,GAAG,CAAC,CAAC;aACtF,CAAC,CAAC;QACL,CAAC;QAED,OAAO;YACL,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,QAAQ;SACT,CAAC;IACJ,CAAC;CACF","sourcesContent":["import {\n existsSync,\n mkdirSync,\n readFileSync,\n readdirSync,\n statSync,\n writeFileSync,\n} from 'node:fs';\nimport { dirname, join, relative, resolve } from 'node:path';\nimport {\n AppFrontendType,\n ConfigArtifactsZone,\n ConfigModuleResolution,\n EnvCspOverrideSchema,\n NGINX_CSP_BEGIN_MARKER,\n emitCspArtifacts,\n loadConfig,\n loadMaterializedFrontendProviders,\n resolveInfraEnvConfigPath,\n resolveCspPolicy,\n resolveFrontendServicesArtifactPath,\n rewriteNginxCspMarkerPairs,\n rewriteNginxCspMarkerPairsString,\n WildoCspConfigSchema,\n WildoLocationType,\n buildServicePublicUrl,\n resolveLocalhostApplicationOrigins,\n selectPrimaryBackendService,\n type ResolvedCspPolicy,\n type WildoCspConfig,\n type WildoInfraEnvConfig,\n type WildoSaasConfig,\n} from '@wildo-ai/platform-config-lib';\nimport { loadInfraEnvConfig } from '@wildo-ai/platform-config-lib';\n// The footprint type is owned by the package that puts it on the wire, and is\n// read here through the same public door every browser-bound consumer uses.\nimport {\n normalizeProviderFrontendCspFootprint,\n PROVIDER_FRONTEND_CSP_ORIGIN_BUCKETS,\n type ProviderFrontendCspFootprint,\n type ProviderFrontendCspOriginBucket,\n} from '@wildo-ai/saas-models/public-runtime';\n\nexport interface GeneratedCspArtifacts {\n readonly envName: string;\n readonly serviceKey: string;\n readonly connectSrc: string[];\n readonly nginxHeaderName: string;\n readonly nginxPolicyValue: string;\n readonly nginxAddHeaderLine: string;\n /**\n * Every response header the policy needs, by name, policy first: the CSP header, then `Reporting-Endpoints` when the\n * policy's `report-to` names a collector (#2867). What a dev server sets, so a page served there reports exactly as\n * one served by nginx.\n */\n readonly responseHeaders: Readonly<Record<string, string>>;\n /** The nginx `add_header` lines for {@link responseHeaders}, in order: the body of every marker region. */\n readonly nginxAddHeaderLines: readonly string[];\n readonly metaTag: {\n readonly tagName: 'meta';\n readonly attributes: {\n readonly 'http-equiv': string;\n readonly content: string;\n };\n } | null;\n}\n\nexport interface CspSyncServiceResult {\n readonly envName: string;\n readonly services: CspSyncServiceEntryResult[];\n}\n\nexport interface CspSyncServiceEntryResult {\n readonly serviceKey: string;\n readonly frontendType: AppFrontendType;\n readonly generatedArtifactPath: string;\n /**\n * The policy resolved from this service's inputs differs from the committed artifact.\n *\n * Separate from `wroteChanges` on purpose. This is a fact about the REPOSITORY — the generated\n * file no longer describes its own inputs — and it is true whether or not this run was allowed to\n * repair it. Collapsing the two into one \"wrote\" boolean is what made a check mode impossible to\n * express: under `checkOnly` nothing is written and the interesting answer is still yes.\n */\n readonly generatedArtifactOutOfDate: boolean;\n /** Nginx marker pairs whose header line differs from the resolved policy, written or not. */\n readonly outOfDateNginxFiles: readonly string[];\n /** Whether this run actually touched the filesystem. Always false under `checkOnly`. */\n readonly wroteChanges: boolean;\n}\n\ninterface ServiceCspAuthoringConfig {\n readonly csp?: WildoCspConfig;\n}\n\ninterface CspSyncServiceInput {\n readonly saasRoot: string;\n readonly envName: string;\n readonly serviceKey?: string;\n readonly env?: NodeJS.ProcessEnv;\n /**\n * Resolve and compare, writing nothing.\n *\n * The CSP artifacts are TRACKED and generated, and until #513 nothing re-derived them: Wonder\n * Todos' website artifact was four months behind its own authored inputs and its `app` artifact\n * three weeks, each missing a directive whose author had written down what breaks without it.\n * Local CSP is report-only, so the drift produced no symptom and would have been discovered by\n * whoever flipped enforcement.\n */\n readonly checkOnly?: boolean;\n}\n\nconst FRONTEND_TYPES_WITH_CSP = new Set<AppFrontendType>([\n AppFrontendType.SAAS_APP,\n AppFrontendType.TECH_DOC,\n AppFrontendType.STATIC_WEBSITE,\n]);\n\nfunction parseGeneratedCspArtifacts(input: unknown): GeneratedCspArtifacts {\n if (typeof input !== 'object' || input === null) {\n throw new Error('[wildo-csp-sync] generated CSP artifacts must be an object.');\n }\n\n return input as GeneratedCspArtifacts;\n}\n\n/**\n * Compare the resolved artifact against what is on disk, and write it unless checking.\n *\n * Returns whether the two DIFFER, which is the answer both modes want — the sync path reports it as\n * \"updated\", the check path as \"out of date\". The comparison is on the exact serialized bytes, so a\n * reordering that changes nothing semantically still reports, which is correct for a file whose\n * whole purpose is to be the byte-for-byte output of a resolution.\n */\nfunction reconcileGeneratedCspArtifacts(\n input: GeneratedCspArtifacts,\n filePath: string,\n options: { readonly write: boolean },\n): boolean {\n const nextSource = `${JSON.stringify(input, null, 2)}\\n`;\n let currentSource: string | null = null;\n\n try {\n currentSource = readFileSync(filePath, 'utf-8');\n } catch {\n currentSource = null;\n }\n\n if (currentSource === nextSource) {\n return false;\n }\n\n if (options.write) {\n mkdirSync(dirname(filePath), { recursive: true });\n writeFileSync(filePath, nextSource);\n }\n return true;\n}\n\n/**\n * The same comparison for an nginx marker pair, without writing.\n *\n * Uses the PURE string rewriter the writing variant is itself built on, rather than re-implementing\n * the marker parsing — a second parser would answer differently the first time the marker format\n * moved, and a check that disagrees with the thing it checks is worse than no check.\n */\nfunction nginxCspMarkerPairsAreOutOfDate(filePath: string, addHeaderLines: readonly string[]): boolean {\n const original = readFileSync(filePath, 'utf-8');\n const { rewritten } = rewriteNginxCspMarkerPairsString(original, addHeaderLines, filePath);\n return rewritten !== original;\n}\n\n/** The shared authored-infra path rule (`resolveInfraEnvConfigPath`, platform-config-lib). */\nfunction resolveAuthoredInfraConfigPath(saasRoot: string, envName: string): string {\n return resolveInfraEnvConfigPath(saasRoot, envName);\n}\n\n/**\n * Every configuration this service reads is evaluated against the CLI's own built framework packages\n * ({@link ConfigModuleResolution.LOADER_INSTANCES}, #3440).\n *\n * The sync only asks what the files DECLARE (the services, their `csp` blocks, the environment's origins), and the CLI\n * composes the policy with the `platform-config-lib` build it runs. Left to the loader's inference, a framework checkout\n * aliases `@wildo-ai/platform-config-lib` to its `config-authoring.entry.ts` source, so the first read transpiled about\n * 120 framework source modules: 2.2 s on a fast host and over 5 s on the CI runner, where this service's first test\n * timed out (#3621). Same root cause and remedy as #3610 and #3615, and the mode `wildo website audit` already reads\n * `wildo.saas.config.ts` with. The files read here import framework packages and, at most, an application's role enums;\n * none defines a zod schema of its own, so the decorated-zod caveat of that mode does not arise.\n */\nconst CSP_SYNC_CONFIG_MODULE_RESOLUTION = ConfigModuleResolution.LOADER_INSTANCES;\n\nasync function loadSaasScopedConfig<T>(saasRoot: string, filePath: string): Promise<T> {\n return loadConfig<T>(filePath, {\n artifactLocation: {\n zone: ConfigArtifactsZone.SAAS,\n ownerRoot: saasRoot,\n },\n moduleResolution: CSP_SYNC_CONFIG_MODULE_RESOLUTION,\n });\n}\n\nasync function loadSaasConfig(saasRoot: string): Promise<WildoSaasConfig> {\n return loadSaasScopedConfig<WildoSaasConfig>(\n saasRoot,\n resolve(saasRoot, 'wildo.saas.config.ts'),\n );\n}\n\nasync function loadInfraConfig(saasRoot: string, envName: string): Promise<WildoInfraEnvConfig> {\n // Through the shared loader, like every other reader of the descriptor: `csp` is application-owned, but a\n // HOSTED descriptor is not an environment until it is resolved, and this function returns the environment.\n const loaded = await loadInfraEnvConfig(saasRoot, envName, { moduleResolution: CSP_SYNC_CONFIG_MODULE_RESOLUTION });\n if (loaded === null) {\n throw new Error(`Config file not found: ${resolveAuthoredInfraConfigPath(saasRoot, envName)}`);\n }\n return loaded.config;\n}\n\nfunction resolveFrontendServiceEntries(\n saasConfig: WildoSaasConfig,\n requestedServiceKey: string | undefined,\n): Array<readonly [string, WildoSaasConfig['services'][string]]> {\n const entries = Object.entries(saasConfig.services).filter(([, service]) =>\n service.frontendType !== undefined &&\n FRONTEND_TYPES_WITH_CSP.has(service.frontendType),\n );\n\n if (!requestedServiceKey) {\n return entries;\n }\n\n const match = entries.filter(([serviceKey]) => serviceKey === requestedServiceKey);\n if (match.length !== 1) {\n throw new Error(\n `[wildo-csp-sync] expected one CSP-capable frontend service named \"${requestedServiceKey}\", found ${match.length}.`,\n );\n }\n\n return match;\n}\n\nfunction assertInfraCspKeysExistAsServices(\n config: WildoInfraEnvConfig,\n saasConfig: Pick<WildoSaasConfig, 'services'>,\n cspCapableServiceKeys: ReadonlySet<string>,\n envName: string,\n): void {\n if (!config.csp) {\n return;\n }\n\n const serviceKeys = new Set(Object.keys(saasConfig.services));\n const unknownKeys = Object.keys(config.csp).filter((key) => !serviceKeys.has(key));\n if (unknownKeys.length > 0) {\n throw new Error(\n `[wildo-csp-sync] infrastructure/${envName} authored csp override keys that do not exist in wildo.saas.config.ts services: ${unknownKeys.join(', ')}.`,\n );\n }\n\n const nonFrontendKeys = Object.keys(config.csp).filter((key) => !cspCapableServiceKeys.has(key));\n if (nonFrontendKeys.length > 0) {\n throw new Error(\n `[wildo-csp-sync] infrastructure/${envName} authored csp override keys for services that are not CSP-capable frontends: ${nonFrontendKeys.join(', ')}.`,\n );\n }\n}\n\nfunction resolvePerServiceConfigPath(serviceRoot: string, frontendType: AppFrontendType): string | null {\n switch (frontendType) {\n case AppFrontendType.TECH_DOC:\n return resolve(serviceRoot, 'wildo.tech-doc.config.ts');\n case AppFrontendType.STATIC_WEBSITE:\n return resolve(serviceRoot, 'wildo.website.config.ts');\n case AppFrontendType.SAAS_APP:\n return null;\n }\n}\n\nasync function resolveAppCsp(args: {\n readonly saasRoot: string;\n readonly serviceKey: string;\n readonly serviceRoot: string;\n readonly frontendType: AppFrontendType;\n readonly service: WildoSaasConfig['services'][string];\n}): Promise<WildoCspConfig> {\n if (args.frontendType === AppFrontendType.SAAS_APP) {\n /*\n * An unauthored app-static layer DEFAULTS to the pilot posture; it is not a refusal (#417).\n *\n * The refusal fired on the ONLY path a fresh application takes. Neither the skeleton template\n * nor Wonder CRM authors a `services.<key>.csp` block — measured 2026-09-08, zero occurrences\n * of the string in either — so `wildo dev start` failed on Wonder CRM and on every application\n * `wildo init` had just produced.\n *\n * ENABLED AND REPORT-ONLY, not the schema's own `{}` default, and the reason is a SECOND\n * refusal that #417's measurement did not name. `resolveServicePolicies` below throws for any\n * CSP-capable frontend whose policy resolves to `null` — \"CSP-capable frontend services require\n * csp.enabled = true\" — while `WildoCspConfigSchema.enabled` defaults to `false`. So parsing\n * the empty object here merely moves the wall one frame down, which is what the pin for this\n * change caught. The two are not in conflict once you read what each governs: the schema's\n * default governs AUTHORING in general, and that guard governs a surface the framework has\n * already decided must carry a policy.\n *\n * So the default is the posture the schema's own JSDoc prescribes for a first-time author —\n * `reportOnly: true`, \"to triage console-surfaced violations without breaking real traffic\" —\n * and it is byte-for-byte what Wonder Todos authors and what the skeleton's shipped\n * `csp.generated.json` already CLAIMS (`Content-Security-Policy-Report-Only`). The scaffold's\n * intended posture was never \"no CSP\"; the config block to express it was simply missing.\n *\n * Everything else stays at the schema's defaults, so the merge strategy, the directive\n * overrides and the report URI have exactly one source and this is not a second copy of them.\n *\n * The cost of removing the refusal, accepted deliberately in #417: an application that DELETES\n * its `csp` block is now defaulted rather than told. It is defaulted to a policy that reports\n * and does not enforce, so the failure mode of getting this wrong is a console warning rather\n * than a broken application.\n */\n /*\n * The parse wraps the authored block too, and that half is IDEMPOTENT HARDENING rather than a\n * second fix — stated because a reader should not have to re-derive it. `wildo.saas.config.ts`\n * is loaded by a bare cast, but it is authored through `defineSaasConfig`, which already runs\n * `WildoSaasConfigSchema.parse` — and `services.<key>.csp` is `WildoCspConfigSchema.optional()`\n * there, so a partial block is already defaulted by the time it arrives. Bypassing that helper\n * is not a supported shape and would fail on other defaults first, which is why no pin reddens\n * when this parse is removed (measured, #442). What it buys is that the invariant below holds\n * unconditionally instead of by way of somebody else's helper.\n */\n return WildoCspConfigSchema.parse(args.service.csp ?? { enabled: true, reportOnly: true });\n }\n\n const configPath = resolvePerServiceConfigPath(args.serviceRoot, args.frontendType);\n if (configPath === null) {\n throw new Error(`[wildo-csp-sync] Unsupported frontend type: ${args.frontendType}`);\n }\n\n const config = await loadSaasScopedConfig<ServiceCspAuthoringConfig>(\n args.saasRoot,\n configPath,\n );\n if (config.csp === undefined) {\n throw new Error(\n `[wildo-csp-sync] ${configPath} must author a csp block so service \"${args.serviceKey}\" has an app-static layer.`,\n );\n }\n\n /*\n * ─── PARSED, not returned verbatim (#442) ────────────────────────────────────────────────────\n *\n * This branch handed the authored block straight to `resolveCspPolicy`, so a hand-written PARTIAL\n * block — `{ enabled: true, reportOnly: true }`, no `directives`, no `mergeStrategy` — arrived\n * without the schema's defaults and the sync died on `TypeError: Cannot convert undefined or null\n * to object`. A stack trace naming neither the author's file nor the missing field.\n *\n * `WildoCspConfigSchema` is a `z.strictObject`, so parsing here buys a second thing: a typo like\n * `enable: true` becomes a parse error naming the key instead of silently resolving to\n * `enabled: false` — which the schema's own JSDoc calls \"CSP off, the worst possible default\".\n *\n * The SAAS_APP branch above parses for the same reason. Both are needed and neither is redundant:\n * `wildo.saas.config.ts` is parsed by `defineSaasConfig` only when the author USES that helper,\n * and this file is loaded by a bare cast with no validation at all. So the invariant is stated\n * where it can be relied on — every block `resolveAppCsp` returns has been through the schema,\n * however it arrived.\n */\n return WildoCspConfigSchema.parse(config.csp);\n}\n\nfunction assertOriginAllowedInConnectSrc(args: {\n readonly envVarName: string;\n readonly rawUrl: string | undefined;\n readonly connectSrc: readonly string[];\n readonly envName: string;\n readonly serviceKey: string;\n}): void {\n if (!args.rawUrl) {\n return;\n }\n\n let origin: string;\n try {\n origin = new URL(args.rawUrl).origin;\n } catch {\n throw new Error(\n `[wildo-csp-sync] ${args.envVarName} must be a valid absolute URL, got \"${args.rawUrl}\".`,\n );\n }\n\n if (!args.connectSrc.includes(origin)) {\n throw new Error(\n `[wildo-csp-sync] ${args.envVarName} origin \"${origin}\" is missing from the final connect-src allowlist for service \"${args.serviceKey}\" in ${args.envName}.`,\n );\n }\n}\n\nfunction assertExplicitHmrOriginAllowed(\n env: NodeJS.ProcessEnv,\n connectSrc: readonly string[],\n envName: string,\n serviceKey: string,\n): void {\n const explicitHmrHost = env.VITE_HMR_HOST?.trim();\n const explicitHmrClientPort = env.VITE_HMR_CLIENT_PORT?.trim();\n const explicitHmrProtocol = env.VITE_HMR_PROTOCOL?.trim();\n if (!explicitHmrHost && !explicitHmrClientPort && !explicitHmrProtocol) {\n return;\n }\n\n const protocol = explicitHmrProtocol || 'ws';\n const host = explicitHmrHost || 'localhost';\n const port = explicitHmrClientPort || env.VITE_PORT?.trim() || '4242';\n const hmrOrigin = `${protocol}://${host}:${port}`;\n if (!connectSrc.includes(hmrOrigin)) {\n throw new Error(\n `[wildo-csp-sync] explicit Vite HMR origin \"${hmrOrigin}\" is missing from the final connect-src allowlist for service \"${serviceKey}\" in ${envName}.`,\n );\n }\n}\n\nfunction assertRuntimeOriginsAllowed(args: {\n readonly frontendType: AppFrontendType;\n readonly env: NodeJS.ProcessEnv;\n readonly connectSrc: readonly string[];\n readonly envName: string;\n readonly serviceKey: string;\n}): void {\n if (args.frontendType === AppFrontendType.SAAS_APP) {\n assertOriginAllowedInConnectSrc({\n envVarName: 'VITE_API_BASE_URL',\n rawUrl: args.env.VITE_API_BASE_URL,\n connectSrc: args.connectSrc,\n envName: args.envName,\n serviceKey: args.serviceKey,\n });\n assertExplicitHmrOriginAllowed(args.env, args.connectSrc, args.envName, args.serviceKey);\n }\n\n if (args.frontendType === AppFrontendType.TECH_DOC) {\n assertOriginAllowedInConnectSrc({\n envVarName: 'WILDO_DOCS_API_BASE_URL',\n rawUrl: args.env.WILDO_DOCS_API_BASE_URL,\n connectSrc: args.connectSrc,\n envName: args.envName,\n serviceKey: args.serviceKey,\n });\n }\n}\n\n/**\n * The CSP footprints of the providers DECLARED FOR ONE SERVICE (#332).\n *\n * Read from the materialized `frontend-services.runtime-providers.generated.json`\n * that `wildo config sync` writes — which is the whole reason the footprint is\n * DATA. This CLI is a Node process and a frontend provider module is\n * browser-bound; it could not execute one to ask what origins it needs, and a\n * provider whose origins had to be transcribed into every application's config\n * by hand would be wrong in production the first time anyone forgot.\n *\n * Keyed by SERVICE, not by facet: a Zoom origin the marketing site declared\n * must not be admitted for the SaaS app, which is the isolation this per-service\n * read is for.\n *\n * A missing artifact is not an error. A clean checkout, or an application that\n * declares no frontend provider at all, legitimately has none — and refusing\n * here would make `wildo dev sync-csp` depend on a sync having already run.\n */\nfunction collectProviderCspFootprints(args: {\n readonly saasRoot: string;\n readonly serviceKey: string;\n}): ReadonlyArray<ProviderFrontendCspFootprint> {\n const block = loadMaterializedFrontendProviders({\n artifactPath: resolveFrontendServicesArtifactPath(args.saasRoot),\n serviceKey: args.serviceKey,\n });\n\n if (block === undefined) {\n return [];\n }\n\n return Object.values(block.providers)\n .map((provider) => resolveProviderCspFootprint(provider, args.serviceKey))\n .filter((footprint): footprint is ProviderFrontendCspFootprint => footprint !== undefined);\n}\n\n/**\n * Fills a provider's DERIVED origins in from its own public configuration.\n *\n * Some endpoints are not knowable by the provider: an error-monitoring\n * provider sends to the host inside its DSN, an analytics provider to whatever\n * `apiHost` the application configured — a region, a reverse proxy on the\n * application's own domain, or a self-hosted deployment. The provider therefore\n * declares WHERE the origin is, and this is the one place that has both halves:\n * the served entry carries `publicConfig` and the footprint beside it.\n *\n * Without this the application would author the same host twice — once as the\n * provider's config, once in its own CSP — and the copy that drifts fails in\n * production only.\n *\n * Absent key: contributes nothing. That is the correct reading of \"this\n * application has not configured that provider\", and refusing would make an\n * unconfigured optional provider break the sync.\n *\n * Present but not a URL: FAILS, naming the provider and the key. It is the one\n * case where the application said something and the framework cannot honour it,\n * and silently dropping it produces exactly the blocked-in-production-only\n * failure the whole layer exists to remove.\n */\nfunction resolveProviderCspFootprint(\n provider: { readonly csp?: ProviderFrontendCspFootprint; readonly publicConfig?: Readonly<Record<string, unknown>>; readonly metadata: { readonly ref: string } },\n serviceKey: string,\n): ProviderFrontendCspFootprint | undefined {\n const footprint = provider.csp;\n if (footprint === undefined) return undefined;\n if (footprint.derivedOrigins.length === 0) return footprint;\n\n const resolved = normalizeProviderFrontendCspFootprint({\n ...footprint,\n // Resolved here, so nothing downstream has to know the bucket existed.\n derivedOrigins: [],\n });\n // Every bucket, from the enum (#1702). This used to be a hand-written list of six, so a provider that\n // derived an origin into a bucket added later (worker, media) would have crashed here, and one that\n // merely declared such a bucket beside a derived origin would have had it silently erased.\n const buckets = Object.fromEntries(\n PROVIDER_FRONTEND_CSP_ORIGIN_BUCKETS.map((bucket) => [bucket, [...resolved[bucket]]]),\n ) as Record<ProviderFrontendCspOriginBucket, string[]>;\n\n for (const derived of footprint.derivedOrigins) {\n const configured = provider.publicConfig?.[derived.publicConfigKey];\n if (configured === undefined || configured === null || configured === '') continue;\n\n if (typeof configured !== 'string') {\n throw new Error(\n `[wildo-csp-sync] provider \"${provider.metadata.ref}\" on service \"${serviceKey}\" declares a CSP origin `\n + `derived from publicConfig.${derived.publicConfigKey}, but that value is not a string.`,\n );\n }\n\n let origin: string;\n try {\n origin = new URL(configured).origin;\n } catch {\n throw new Error(\n `[wildo-csp-sync] provider \"${provider.metadata.ref}\" on service \"${serviceKey}\" declares a CSP origin `\n + `derived from publicConfig.${derived.publicConfigKey}, but \"${configured}\" is not an absolute URL, so `\n + 'no origin can be read from it. The provider would then be blocked by the very policy it contributes '\n + 'to — and only where CSP enforces, so the failure would first appear in production.',\n );\n }\n\n const bucket = buckets[derived.bucket];\n if (!bucket.includes(origin)) bucket.push(origin);\n }\n\n return normalizeProviderFrontendCspFootprint(buckets);\n}\n\nfunction collectNginxConfigFilesWithCspMarkers(serviceRoot: string): string[] {\n const nginxConfigRoot = resolve(serviceRoot, 'nginx-config');\n if (!existsSync(nginxConfigRoot)) {\n return [];\n }\n\n const collected: string[] = [];\n const visit = (directory: string): void => {\n for (const entry of readdirSync(directory)) {\n const path = join(directory, entry);\n const stat = statSync(path);\n if (stat.isDirectory()) {\n visit(path);\n continue;\n }\n if (stat.isFile() && readFileSync(path, 'utf-8').includes(NGINX_CSP_BEGIN_MARKER)) {\n collected.push(path);\n }\n }\n };\n\n visit(nginxConfigRoot);\n return collected.sort();\n}\n\n/**\n * The origin of the environment's main backend API, where the platform CSP violation collector is served (#2867).\n *\n * The same derivation every other browser-facing origin of an environment takes, so the policy names the backend the\n * environment actually runs: a REMOTE environment's main backend at its public URL (`buildServicePublicUrl`, which the\n * ingress, `runtime.endPoints` and CORS key on), any other at `http://localhost:<defaultPort>`\n * (`resolveLocalhostApplicationOrigins`, the origin `wildo local dev` starts it on). The main backend is\n * `selectPrimaryBackendService`'s, the one rule every such derivation shares. `undefined` when the application declares\n * no backend with a port: the policy then names no collector rather than an invented one.\n */\nexport function resolveCspViolationCollectorOrigin(\n saasConfig: Pick<WildoSaasConfig, 'services'>,\n infraConfig: Pick<WildoInfraEnvConfig, 'locationType' | 'publicDomain' | 'serviceHosts'>,\n): string | undefined {\n if (infraConfig.locationType === WildoLocationType.REMOTE) {\n const backendKeys = Object.entries(saasConfig.services)\n .filter(([, service]) => service.frontendType === undefined)\n .map(([key]) => ({ key }));\n const primaryBackend = selectPrimaryBackendService(backendKeys);\n return primaryBackend === undefined\n ? undefined\n : buildServicePublicUrl({ serviceKey: primaryBackend.key, serviceHosts: infraConfig.serviceHosts, publicDomain: infraConfig.publicDomain });\n }\n return resolveLocalhostApplicationOrigins(saasConfig.services).api;\n}\n\n/**\n * Per-service resolved CSP policy — the side-effect-free output of\n * {@link CspSyncService.resolveServicePolicies}. Both the nginx sync (write\n * side) and `wildo frontend publish` (CDN edge re-home) consume this, so the\n * layered resolution (baseline ⊕ app-static ⊕ env-override ⊕ the declared\n * providers' footprints, plus the Vite dev-loosening / companion-origin\n * auto-derivations) lives in ONE place and can never drift between the two\n * consumers.\n */\nexport interface ResolvedServiceCspPolicy {\n readonly serviceKey: string;\n readonly frontendType: AppFrontendType;\n readonly serviceRoot: string;\n readonly policy: ResolvedCspPolicy;\n}\n\nexport class CspSyncService {\n /**\n * Resolve each CSP-capable frontend's policy WITHOUT writing anything.\n *\n * Loads the saas + infra configs, validates the infra `csp` keys, resolves\n * the app-static layer (SAAS_APP inline / `wildo.website.config.ts` /\n * `wildo.tech-doc.config.ts`) merged with the per-env override, and asserts\n * the runtime origins are in `connect-src`. Returns one entry per\n * CSP-capable frontend (filtered to `input.serviceKey` when given).\n *\n * This is the shared resolution seam: {@link sync} adds the nginx-write side;\n * the CDN publish path adds the `_headers` / edge-policy side.\n */\n static async resolveServicePolicies(\n input: CspSyncServiceInput,\n ): Promise<ResolvedServiceCspPolicy[]> {\n const saasRoot = resolve(input.saasRoot);\n const env = input.env ?? process.env;\n const saasConfig = await loadSaasConfig(saasRoot);\n const serviceEntries = resolveFrontendServiceEntries(saasConfig, input.serviceKey);\n const cspCapableServiceKeys = resolveFrontendServiceEntries(saasConfig, undefined).map(([serviceKey]) => serviceKey);\n const infraConfig = await loadInfraConfig(saasRoot, input.envName);\n const violationCollectorOrigin = resolveCspViolationCollectorOrigin(saasConfig, infraConfig);\n\n assertInfraCspKeysExistAsServices(\n infraConfig,\n saasConfig,\n new Set(cspCapableServiceKeys),\n input.envName,\n );\n\n const resolved: ResolvedServiceCspPolicy[] = [];\n for (const [serviceKey, service] of serviceEntries) {\n const frontendType = service.frontendType;\n if (frontendType === undefined) {\n continue;\n }\n\n const serviceRoot = resolve(saasRoot, service.path);\n const appCsp = await resolveAppCsp({\n saasRoot,\n serviceKey,\n serviceRoot,\n frontendType,\n service,\n });\n const policy = resolveCspPolicy({\n frontendType,\n appCsp,\n envOverride: EnvCspOverrideSchema.optional().parse(infraConfig.csp?.[serviceKey]),\n // The fourth layer (#332): what the providers this service declared\n // actually need to reach. Resolved per service AND per environment\n // because both axes change the answer — a provider enabled only in\n // production contributes origins only to production's policy, and CSP\n // is enforcing there while it is report-only in development, so this is\n // the one layer whose absence shows up nowhere else.\n providerCspFootprints: collectProviderCspFootprints({ saasRoot, serviceKey }),\n // Pass the env id so the resolver can auto-apply Vite dev-mode\n // loosening for `'local'` + `SAAS_APP`. Without this the\n // framework would not know whether it's resolving for local dev\n // or prod, and apps would still have to opt-in per-env.\n environmentId: input.envName,\n // Where the platform violation collector is (#2867): this environment's main backend. Every CSP-capable surface\n // names it, unless the application authored a collector of its own.\n violationCollectorOrigin,\n });\n if (policy === null) {\n throw new Error(\n `[wildo-csp-sync] service \"${serviceKey}\" resolved to a disabled CSP. CSP-capable frontend services require csp.enabled = true.`,\n );\n }\n\n const connectSrc = [...(policy.directives['connect-src'] ?? [])];\n assertRuntimeOriginsAllowed({\n frontendType,\n env,\n connectSrc,\n envName: input.envName,\n serviceKey,\n });\n\n resolved.push({ serviceKey, frontendType, serviceRoot, policy });\n }\n\n return resolved;\n }\n\n static async sync(input: CspSyncServiceInput): Promise<CspSyncServiceResult> {\n const saasRoot = resolve(input.saasRoot);\n const resolvedServices = await CspSyncService.resolveServicePolicies(input);\n\n const services: CspSyncServiceEntryResult[] = [];\n for (const { serviceKey, frontendType, serviceRoot, policy } of resolvedServices) {\n const connectSrc = [...(policy.directives['connect-src'] ?? [])];\n const artifacts = emitCspArtifacts(policy);\n const generatedArtifacts = parseGeneratedCspArtifacts({\n envName: input.envName,\n serviceKey,\n connectSrc,\n nginxHeaderName: artifacts.nginxHeaderName,\n nginxPolicyValue: artifacts.nginxPolicyValue,\n nginxAddHeaderLine: artifacts.nginxAddHeaderLine,\n responseHeaders: Object.fromEntries(artifacts.responseHeaders.map((header) => [header.name, header.value])),\n nginxAddHeaderLines: artifacts.nginxAddHeaderLines,\n metaTag: artifacts.metaTag,\n });\n const generatedArtifactPath = resolve(serviceRoot, 'src', 'generated', 'csp.generated.json');\n const write = input.checkOnly !== true;\n const generatedArtifactOutOfDate = reconcileGeneratedCspArtifacts(\n generatedArtifacts,\n generatedArtifactPath,\n { write },\n );\n const outOfDateNginxFiles: string[] = [];\n\n for (const nginxConfigFile of collectNginxConfigFilesWithCspMarkers(serviceRoot)) {\n const outOfDate = write\n ? rewriteNginxCspMarkerPairs(nginxConfigFile, generatedArtifacts.nginxAddHeaderLines).fileWritten\n : nginxCspMarkerPairsAreOutOfDate(nginxConfigFile, generatedArtifacts.nginxAddHeaderLines);\n if (outOfDate) {\n outOfDateNginxFiles.push(relative(saasRoot, nginxConfigFile));\n }\n }\n\n services.push({\n serviceKey,\n frontendType,\n generatedArtifactPath: relative(saasRoot, generatedArtifactPath),\n generatedArtifactOutOfDate,\n outOfDateNginxFiles,\n wroteChanges: write && (generatedArtifactOutOfDate || outOfDateNginxFiles.length > 0),\n });\n }\n\n return {\n envName: input.envName,\n services,\n };\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"csp-sync.service.js","sourceRoot":"","sources":["../../../../src/services/security/csp-sync.service.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,SAAS,EACT,YAAY,EACZ,WAAW,EACX,QAAQ,EACR,aAAa,GACd,MAAM,SAAS,CAAC;AACjB,OAAO,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,CAAC,eAAe,EAAE,kBAAkB,CAAC,mBAAmB,CAAC,CAAC,WAAW;oBACjG,CAAC,CAAC,+BAA+B,CAAC,eAAe,EAAE,kBAAkB,CAAC,mBAAmB,CAAC,CAAC;gBAC7F,IAAI,SAAS,EAAE,CAAC;oBACd,mBAAmB,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC,CAAC,CAAC;gBAChE,CAAC;YACH,CAAC;YAED,QAAQ,CAAC,IAAI,CAAC;gBACZ,UAAU;gBACV,YAAY;gBACZ,qBAAqB,EAAE,QAAQ,CAAC,QAAQ,EAAE,qBAAqB,CAAC;gBAChE,0BAA0B;gBAC1B,mBAAmB;gBACnB,YAAY,EAAE,KAAK,IAAI,CAAC,0BAA0B,IAAI,mBAAmB,CAAC,MAAM,GAAG,CAAC,CAAC;aACtF,CAAC,CAAC;QACL,CAAC;QAED,OAAO;YACL,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,QAAQ;SACT,CAAC;IACJ,CAAC;CACF","sourcesContent":["import {\n existsSync,\n mkdirSync,\n readFileSync,\n readdirSync,\n statSync,\n writeFileSync,\n} from 'node:fs';\nimport { dirname, join, relative, resolve } from 'node:path';\nimport {\n AppFrontendType,\n ConfigArtifactsZone,\n ConfigModuleResolution,\n EnvCspOverrideSchema,\n NGINX_CSP_BEGIN_MARKER,\n emitCspArtifacts,\n loadConfig,\n loadMaterializedBackendProviderFrameOrigins,\n loadMaterializedFrontendProviders,\n resolveInfraEnvConfigPath,\n resolveCspPolicy,\n resolveFrontendServicesArtifactPath,\n rewriteNginxCspMarkerPairs,\n rewriteNginxCspMarkerPairsString,\n WildoCspConfigSchema,\n WildoLocationType,\n buildServicePublicUrl,\n resolveLocalhostApplicationOrigins,\n selectPrimaryBackendService,\n type ResolvedCspPolicy,\n type WildoCspConfig,\n type WildoInfraEnvConfig,\n type WildoSaasConfig,\n} from '@wildo-ai/platform-config-lib';\nimport { loadInfraEnvConfig } from '@wildo-ai/platform-config-lib';\n// The footprint type is owned by the package that puts it on the wire, and is\n// read here through the same public door every browser-bound consumer uses.\nimport {\n normalizeProviderFrontendCspFootprint,\n PROVIDER_FRONTEND_CSP_ORIGIN_BUCKETS,\n type ProviderFrontendCspFootprint,\n type ProviderFrontendCspOriginBucket,\n} from '@wildo-ai/saas-models/public-runtime';\n\nexport interface GeneratedCspArtifacts {\n readonly envName: string;\n readonly serviceKey: string;\n readonly connectSrc: string[];\n readonly nginxHeaderName: string;\n readonly nginxPolicyValue: string;\n readonly nginxAddHeaderLine: string;\n /**\n * Every response header the policy needs, by name, policy first: the CSP header, then `Reporting-Endpoints` when the\n * policy's `report-to` names a collector (#2867). What a dev server sets, so a page served there reports exactly as\n * one served by nginx.\n */\n readonly responseHeaders: Readonly<Record<string, string>>;\n /** The nginx `add_header` lines for {@link responseHeaders}, in order: the body of every marker region. */\n readonly nginxAddHeaderLines: readonly string[];\n readonly metaTag: {\n readonly tagName: 'meta';\n readonly attributes: {\n readonly 'http-equiv': string;\n readonly content: string;\n };\n } | null;\n}\n\nexport interface CspSyncServiceResult {\n readonly envName: string;\n readonly services: CspSyncServiceEntryResult[];\n}\n\nexport interface CspSyncServiceEntryResult {\n readonly serviceKey: string;\n readonly frontendType: AppFrontendType;\n readonly generatedArtifactPath: string;\n /**\n * The policy resolved from this service's inputs differs from the committed artifact.\n *\n * Separate from `wroteChanges` on purpose. This is a fact about the REPOSITORY — the generated\n * file no longer describes its own inputs — and it is true whether or not this run was allowed to\n * repair it. Collapsing the two into one \"wrote\" boolean is what made a check mode impossible to\n * express: under `checkOnly` nothing is written and the interesting answer is still yes.\n */\n readonly generatedArtifactOutOfDate: boolean;\n /** Nginx marker pairs whose header line differs from the resolved policy, written or not. */\n readonly outOfDateNginxFiles: readonly string[];\n /** Whether this run actually touched the filesystem. Always false under `checkOnly`. */\n readonly wroteChanges: boolean;\n}\n\ninterface ServiceCspAuthoringConfig {\n readonly csp?: WildoCspConfig;\n}\n\ninterface CspSyncServiceInput {\n readonly saasRoot: string;\n readonly envName: string;\n readonly serviceKey?: string;\n readonly env?: NodeJS.ProcessEnv;\n /**\n * Resolve and compare, writing nothing.\n *\n * The CSP artifacts are TRACKED and generated, and until #513 nothing re-derived them: Wonder\n * Todos' website artifact was four months behind its own authored inputs and its `app` artifact\n * three weeks, each missing a directive whose author had written down what breaks without it.\n * Local CSP is report-only, so the drift produced no symptom and would have been discovered by\n * whoever flipped enforcement.\n */\n readonly checkOnly?: boolean;\n}\n\nconst FRONTEND_TYPES_WITH_CSP = new Set<AppFrontendType>([\n AppFrontendType.SAAS_APP,\n AppFrontendType.TECH_DOC,\n AppFrontendType.STATIC_WEBSITE,\n]);\n\nfunction parseGeneratedCspArtifacts(input: unknown): GeneratedCspArtifacts {\n if (typeof input !== 'object' || input === null) {\n throw new Error('[wildo-csp-sync] generated CSP artifacts must be an object.');\n }\n\n return input as GeneratedCspArtifacts;\n}\n\n/**\n * Compare the resolved artifact against what is on disk, and write it unless checking.\n *\n * Returns whether the two DIFFER, which is the answer both modes want — the sync path reports it as\n * \"updated\", the check path as \"out of date\". The comparison is on the exact serialized bytes, so a\n * reordering that changes nothing semantically still reports, which is correct for a file whose\n * whole purpose is to be the byte-for-byte output of a resolution.\n */\nfunction reconcileGeneratedCspArtifacts(\n input: GeneratedCspArtifacts,\n filePath: string,\n options: { readonly write: boolean },\n): boolean {\n const nextSource = `${JSON.stringify(input, null, 2)}\\n`;\n let currentSource: string | null = null;\n\n try {\n currentSource = readFileSync(filePath, 'utf-8');\n } catch {\n currentSource = null;\n }\n\n if (currentSource === nextSource) {\n return false;\n }\n\n if (options.write) {\n mkdirSync(dirname(filePath), { recursive: true });\n writeFileSync(filePath, nextSource);\n }\n return true;\n}\n\n/**\n * The same comparison for an nginx marker pair, without writing.\n *\n * Uses the PURE string rewriter the writing variant is itself built on, rather than re-implementing\n * the marker parsing — a second parser would answer differently the first time the marker format\n * moved, and a check that disagrees with the thing it checks is worse than no check.\n */\nfunction nginxCspMarkerPairsAreOutOfDate(filePath: string, addHeaderLines: readonly string[]): boolean {\n const original = readFileSync(filePath, 'utf-8');\n const { rewritten } = rewriteNginxCspMarkerPairsString(original, addHeaderLines, filePath);\n return rewritten !== original;\n}\n\n/** The shared authored-infra path rule (`resolveInfraEnvConfigPath`, platform-config-lib). */\nfunction resolveAuthoredInfraConfigPath(saasRoot: string, envName: string): string {\n return resolveInfraEnvConfigPath(saasRoot, envName);\n}\n\n/**\n * Every configuration this service reads is evaluated against the CLI's own built framework packages\n * ({@link ConfigModuleResolution.LOADER_INSTANCES}, #3440).\n *\n * The sync only asks what the files DECLARE (the services, their `csp` blocks, the environment's origins), and the CLI\n * composes the policy with the `platform-config-lib` build it runs. Left to the loader's inference, a framework checkout\n * aliases `@wildo-ai/platform-config-lib` to its `config-authoring.entry.ts` source, so the first read transpiled about\n * 120 framework source modules: 2.2 s on a fast host and over 5 s on the CI runner, where this service's first test\n * timed out (#3621). Same root cause and remedy as #3610 and #3615, and the mode `wildo website audit` already reads\n * `wildo.saas.config.ts` with. The files read here import framework packages and, at most, an application's role enums;\n * none defines a zod schema of its own, so the decorated-zod caveat of that mode does not arise.\n */\nconst CSP_SYNC_CONFIG_MODULE_RESOLUTION = ConfigModuleResolution.LOADER_INSTANCES;\n\nasync function loadSaasScopedConfig<T>(saasRoot: string, filePath: string): Promise<T> {\n return loadConfig<T>(filePath, {\n artifactLocation: {\n zone: ConfigArtifactsZone.SAAS,\n ownerRoot: saasRoot,\n },\n moduleResolution: CSP_SYNC_CONFIG_MODULE_RESOLUTION,\n });\n}\n\nasync function loadSaasConfig(saasRoot: string): Promise<WildoSaasConfig> {\n return loadSaasScopedConfig<WildoSaasConfig>(\n saasRoot,\n resolve(saasRoot, 'wildo.saas.config.ts'),\n );\n}\n\nasync function loadInfraConfig(saasRoot: string, envName: string): Promise<WildoInfraEnvConfig> {\n // Through the shared loader, like every other reader of the descriptor: `csp` is application-owned, but a\n // HOSTED descriptor is not an environment until it is resolved, and this function returns the environment.\n const loaded = await loadInfraEnvConfig(saasRoot, envName, { moduleResolution: CSP_SYNC_CONFIG_MODULE_RESOLUTION });\n if (loaded === null) {\n throw new Error(`Config file not found: ${resolveAuthoredInfraConfigPath(saasRoot, envName)}`);\n }\n return loaded.config;\n}\n\nfunction resolveFrontendServiceEntries(\n saasConfig: WildoSaasConfig,\n requestedServiceKey: string | undefined,\n): Array<readonly [string, WildoSaasConfig['services'][string]]> {\n const entries = Object.entries(saasConfig.services).filter(([, service]) =>\n service.frontendType !== undefined &&\n FRONTEND_TYPES_WITH_CSP.has(service.frontendType),\n );\n\n if (!requestedServiceKey) {\n return entries;\n }\n\n const match = entries.filter(([serviceKey]) => serviceKey === requestedServiceKey);\n if (match.length !== 1) {\n throw new Error(\n `[wildo-csp-sync] expected one CSP-capable frontend service named \"${requestedServiceKey}\", found ${match.length}.`,\n );\n }\n\n return match;\n}\n\nfunction assertInfraCspKeysExistAsServices(\n config: WildoInfraEnvConfig,\n saasConfig: Pick<WildoSaasConfig, 'services'>,\n cspCapableServiceKeys: ReadonlySet<string>,\n envName: string,\n): void {\n if (!config.csp) {\n return;\n }\n\n const serviceKeys = new Set(Object.keys(saasConfig.services));\n const unknownKeys = Object.keys(config.csp).filter((key) => !serviceKeys.has(key));\n if (unknownKeys.length > 0) {\n throw new Error(\n `[wildo-csp-sync] infrastructure/${envName} authored csp override keys that do not exist in wildo.saas.config.ts services: ${unknownKeys.join(', ')}.`,\n );\n }\n\n const nonFrontendKeys = Object.keys(config.csp).filter((key) => !cspCapableServiceKeys.has(key));\n if (nonFrontendKeys.length > 0) {\n throw new Error(\n `[wildo-csp-sync] infrastructure/${envName} authored csp override keys for services that are not CSP-capable frontends: ${nonFrontendKeys.join(', ')}.`,\n );\n }\n}\n\nfunction resolvePerServiceConfigPath(serviceRoot: string, frontendType: AppFrontendType): string | null {\n switch (frontendType) {\n case AppFrontendType.TECH_DOC:\n return resolve(serviceRoot, 'wildo.tech-doc.config.ts');\n case AppFrontendType.STATIC_WEBSITE:\n return resolve(serviceRoot, 'wildo.website.config.ts');\n case AppFrontendType.SAAS_APP:\n return null;\n }\n}\n\nasync function resolveAppCsp(args: {\n readonly saasRoot: string;\n readonly serviceKey: string;\n readonly serviceRoot: string;\n readonly frontendType: AppFrontendType;\n readonly service: WildoSaasConfig['services'][string];\n}): Promise<WildoCspConfig> {\n if (args.frontendType === AppFrontendType.SAAS_APP) {\n /*\n * An unauthored app-static layer DEFAULTS to the pilot posture; it is not a refusal (#417).\n *\n * The refusal fired on the ONLY path a fresh application takes. Neither the skeleton template\n * nor Wonder CRM authors a `services.<key>.csp` block — measured 2026-09-08, zero occurrences\n * of the string in either — so `wildo dev start` failed on Wonder CRM and on every application\n * `wildo init` had just produced.\n *\n * ENABLED AND REPORT-ONLY, not the schema's own `{}` default, and the reason is a SECOND\n * refusal that #417's measurement did not name. `resolveServicePolicies` below throws for any\n * CSP-capable frontend whose policy resolves to `null` — \"CSP-capable frontend services require\n * csp.enabled = true\" — while `WildoCspConfigSchema.enabled` defaults to `false`. So parsing\n * the empty object here merely moves the wall one frame down, which is what the pin for this\n * change caught. The two are not in conflict once you read what each governs: the schema's\n * default governs AUTHORING in general, and that guard governs a surface the framework has\n * already decided must carry a policy.\n *\n * So the default is the posture the schema's own JSDoc prescribes for a first-time author —\n * `reportOnly: true`, \"to triage console-surfaced violations without breaking real traffic\" —\n * and it is byte-for-byte what Wonder Todos authors and what the skeleton's shipped\n * `csp.generated.json` already CLAIMS (`Content-Security-Policy-Report-Only`). The scaffold's\n * intended posture was never \"no CSP\"; the config block to express it was simply missing.\n *\n * Everything else stays at the schema's defaults, so the merge strategy, the directive\n * overrides and the report URI have exactly one source and this is not a second copy of them.\n *\n * The cost of removing the refusal, accepted deliberately in #417: an application that DELETES\n * its `csp` block is now defaulted rather than told. It is defaulted to a policy that reports\n * and does not enforce, so the failure mode of getting this wrong is a console warning rather\n * than a broken application.\n */\n /*\n * The parse wraps the authored block too, and that half is IDEMPOTENT HARDENING rather than a\n * second fix — stated because a reader should not have to re-derive it. `wildo.saas.config.ts`\n * is loaded by a bare cast, but it is authored through `defineSaasConfig`, which already runs\n * `WildoSaasConfigSchema.parse` — and `services.<key>.csp` is `WildoCspConfigSchema.optional()`\n * there, so a partial block is already defaulted by the time it arrives. Bypassing that helper\n * is not a supported shape and would fail on other defaults first, which is why no pin reddens\n * when this parse is removed (measured, #442). What it buys is that the invariant below holds\n * unconditionally instead of by way of somebody else's helper.\n */\n return WildoCspConfigSchema.parse(args.service.csp ?? { enabled: true, reportOnly: true });\n }\n\n const configPath = resolvePerServiceConfigPath(args.serviceRoot, args.frontendType);\n if (configPath === null) {\n throw new Error(`[wildo-csp-sync] Unsupported frontend type: ${args.frontendType}`);\n }\n\n const config = await loadSaasScopedConfig<ServiceCspAuthoringConfig>(\n args.saasRoot,\n configPath,\n );\n if (config.csp === undefined) {\n throw new Error(\n `[wildo-csp-sync] ${configPath} must author a csp block so service \"${args.serviceKey}\" has an app-static layer.`,\n );\n }\n\n /*\n * ─── PARSED, not returned verbatim (#442) ────────────────────────────────────────────────────\n *\n * This branch handed the authored block straight to `resolveCspPolicy`, so a hand-written PARTIAL\n * block — `{ enabled: true, reportOnly: true }`, no `directives`, no `mergeStrategy` — arrived\n * without the schema's defaults and the sync died on `TypeError: Cannot convert undefined or null\n * to object`. A stack trace naming neither the author's file nor the missing field.\n *\n * `WildoCspConfigSchema` is a `z.strictObject`, so parsing here buys a second thing: a typo like\n * `enable: true` becomes a parse error naming the key instead of silently resolving to\n * `enabled: false` — which the schema's own JSDoc calls \"CSP off, the worst possible default\".\n *\n * The SAAS_APP branch above parses for the same reason. Both are needed and neither is redundant:\n * `wildo.saas.config.ts` is parsed by `defineSaasConfig` only when the author USES that helper,\n * and this file is loaded by a bare cast with no validation at all. So the invariant is stated\n * where it can be relied on — every block `resolveAppCsp` returns has been through the schema,\n * however it arrived.\n */\n return WildoCspConfigSchema.parse(config.csp);\n}\n\nfunction assertOriginAllowedInConnectSrc(args: {\n readonly envVarName: string;\n readonly rawUrl: string | undefined;\n readonly connectSrc: readonly string[];\n readonly envName: string;\n readonly serviceKey: string;\n}): void {\n if (!args.rawUrl) {\n return;\n }\n\n let origin: string;\n try {\n origin = new URL(args.rawUrl).origin;\n } catch {\n throw new Error(\n `[wildo-csp-sync] ${args.envVarName} must be a valid absolute URL, got \"${args.rawUrl}\".`,\n );\n }\n\n if (!args.connectSrc.includes(origin)) {\n throw new Error(\n `[wildo-csp-sync] ${args.envVarName} origin \"${origin}\" is missing from the final connect-src allowlist for service \"${args.serviceKey}\" in ${args.envName}.`,\n );\n }\n}\n\nfunction assertExplicitHmrOriginAllowed(\n env: NodeJS.ProcessEnv,\n connectSrc: readonly string[],\n envName: string,\n serviceKey: string,\n): void {\n const explicitHmrHost = env.VITE_HMR_HOST?.trim();\n const explicitHmrClientPort = env.VITE_HMR_CLIENT_PORT?.trim();\n const explicitHmrProtocol = env.VITE_HMR_PROTOCOL?.trim();\n if (!explicitHmrHost && !explicitHmrClientPort && !explicitHmrProtocol) {\n return;\n }\n\n const protocol = explicitHmrProtocol || 'ws';\n const host = explicitHmrHost || 'localhost';\n const port = explicitHmrClientPort || env.VITE_PORT?.trim() || '4242';\n const hmrOrigin = `${protocol}://${host}:${port}`;\n if (!connectSrc.includes(hmrOrigin)) {\n throw new Error(\n `[wildo-csp-sync] explicit Vite HMR origin \"${hmrOrigin}\" is missing from the final connect-src allowlist for service \"${serviceKey}\" in ${envName}.`,\n );\n }\n}\n\nfunction assertRuntimeOriginsAllowed(args: {\n readonly frontendType: AppFrontendType;\n readonly env: NodeJS.ProcessEnv;\n readonly connectSrc: readonly string[];\n readonly envName: string;\n readonly serviceKey: string;\n}): void {\n if (args.frontendType === AppFrontendType.SAAS_APP) {\n assertOriginAllowedInConnectSrc({\n envVarName: 'VITE_API_BASE_URL',\n rawUrl: args.env.VITE_API_BASE_URL,\n connectSrc: args.connectSrc,\n envName: args.envName,\n serviceKey: args.serviceKey,\n });\n assertExplicitHmrOriginAllowed(args.env, args.connectSrc, args.envName, args.serviceKey);\n }\n\n if (args.frontendType === AppFrontendType.TECH_DOC) {\n assertOriginAllowedInConnectSrc({\n envVarName: 'WILDO_DOCS_API_BASE_URL',\n rawUrl: args.env.WILDO_DOCS_API_BASE_URL,\n connectSrc: args.connectSrc,\n envName: args.envName,\n serviceKey: args.serviceKey,\n });\n }\n}\n\n/**\n * The CSP footprints of the providers DECLARED FOR ONE SERVICE (#332).\n *\n * Read from the materialized `frontend-services.runtime-providers.generated.json`\n * that `wildo config sync` writes — which is the whole reason the footprint is\n * DATA. This CLI is a Node process and a frontend provider module is\n * browser-bound; it could not execute one to ask what origins it needs, and a\n * provider whose origins had to be transcribed into every application's config\n * by hand would be wrong in production the first time anyone forgot.\n *\n * Keyed by SERVICE, not by facet: a Zoom origin the marketing site declared\n * must not be admitted for the SaaS app, which is the isolation this per-service\n * read is for.\n *\n * A missing artifact is not an error. A clean checkout, or an application that\n * declares no frontend provider at all, legitimately has none — and refusing\n * here would make `wildo dev sync-csp` depend on a sync having already run.\n */\nfunction collectProviderCspFootprints(args: {\n readonly saasRoot: string;\n readonly serviceKey: string;\n}): ReadonlyArray<ProviderFrontendCspFootprint> {\n const block = loadMaterializedFrontendProviders({\n artifactPath: resolveFrontendServicesArtifactPath(args.saasRoot),\n serviceKey: args.serviceKey,\n });\n\n if (block === undefined) {\n return [];\n }\n\n return Object.values(block.providers)\n .map((provider) => resolveProviderCspFootprint(provider, args.serviceKey))\n .filter((footprint): footprint is ProviderFrontendCspFootprint => footprint !== undefined);\n}\n\n/**\n * The vendor pages the BACKEND's providers show in the application's own frontend (#4002): today a signing page framed\n * by `EmbeddedSigningFrame`. Recorded per provider in the backend artifact from the module's own declaration, which is\n * also what the engine checks a signing page against, so the policy admits exactly what the engine will frame.\n *\n * Only for the SAAS_APP frontends, the surface that renders the frame; a website or documentation site frames no\n * signing page and gains no origin. One footprint carrying `frameOrigins` alone, so it adds to `frame-src` and nothing\n * else.\n */\nfunction collectBackendProviderFrameFootprints(args: {\n readonly saasRoot: string;\n readonly frontendType: AppFrontendType;\n}): ReadonlyArray<ProviderFrontendCspFootprint> {\n if (args.frontendType !== AppFrontendType.SAAS_APP) return [];\n const frameOrigins = [...new Set(Object.values(loadMaterializedBackendProviderFrameOrigins(args.saasRoot)).flat())]\n .sort((left, right) => left.localeCompare(right));\n return frameOrigins.length === 0 ? [] : [normalizeProviderFrontendCspFootprint({ frameOrigins })];\n}\n\n/**\n * Fills a provider's DERIVED origins in from its own public configuration.\n *\n * Some endpoints are not knowable by the provider: an error-monitoring\n * provider sends to the host inside its DSN, an analytics provider to whatever\n * `apiHost` the application configured — a region, a reverse proxy on the\n * application's own domain, or a self-hosted deployment. The provider therefore\n * declares WHERE the origin is, and this is the one place that has both halves:\n * the served entry carries `publicConfig` and the footprint beside it.\n *\n * Without this the application would author the same host twice — once as the\n * provider's config, once in its own CSP — and the copy that drifts fails in\n * production only.\n *\n * Absent key: contributes nothing. That is the correct reading of \"this\n * application has not configured that provider\", and refusing would make an\n * unconfigured optional provider break the sync.\n *\n * Present but not a URL: FAILS, naming the provider and the key. It is the one\n * case where the application said something and the framework cannot honour it,\n * and silently dropping it produces exactly the blocked-in-production-only\n * failure the whole layer exists to remove.\n */\nfunction resolveProviderCspFootprint(\n provider: { readonly csp?: ProviderFrontendCspFootprint; readonly publicConfig?: Readonly<Record<string, unknown>>; readonly metadata: { readonly ref: string } },\n serviceKey: string,\n): ProviderFrontendCspFootprint | undefined {\n const footprint = provider.csp;\n if (footprint === undefined) return undefined;\n if (footprint.derivedOrigins.length === 0) return footprint;\n\n const resolved = normalizeProviderFrontendCspFootprint({\n ...footprint,\n // Resolved here, so nothing downstream has to know the bucket existed.\n derivedOrigins: [],\n });\n // Every bucket, from the enum (#1702). This used to be a hand-written list of six, so a provider that\n // derived an origin into a bucket added later (worker, media) would have crashed here, and one that\n // merely declared such a bucket beside a derived origin would have had it silently erased.\n const buckets = Object.fromEntries(\n PROVIDER_FRONTEND_CSP_ORIGIN_BUCKETS.map((bucket) => [bucket, [...resolved[bucket]]]),\n ) as Record<ProviderFrontendCspOriginBucket, string[]>;\n\n for (const derived of footprint.derivedOrigins) {\n const configured = provider.publicConfig?.[derived.publicConfigKey];\n if (configured === undefined || configured === null || configured === '') continue;\n\n if (typeof configured !== 'string') {\n throw new Error(\n `[wildo-csp-sync] provider \"${provider.metadata.ref}\" on service \"${serviceKey}\" declares a CSP origin `\n + `derived from publicConfig.${derived.publicConfigKey}, but that value is not a string.`,\n );\n }\n\n let origin: string;\n try {\n origin = new URL(configured).origin;\n } catch {\n throw new Error(\n `[wildo-csp-sync] provider \"${provider.metadata.ref}\" on service \"${serviceKey}\" declares a CSP origin `\n + `derived from publicConfig.${derived.publicConfigKey}, but \"${configured}\" is not an absolute URL, so `\n + 'no origin can be read from it. The provider would then be blocked by the very policy it contributes '\n + 'to — and only where CSP enforces, so the failure would first appear in production.',\n );\n }\n\n const bucket = buckets[derived.bucket];\n if (!bucket.includes(origin)) bucket.push(origin);\n }\n\n return normalizeProviderFrontendCspFootprint(buckets);\n}\n\nfunction collectNginxConfigFilesWithCspMarkers(serviceRoot: string): string[] {\n const nginxConfigRoot = resolve(serviceRoot, 'nginx-config');\n if (!existsSync(nginxConfigRoot)) {\n return [];\n }\n\n const collected: string[] = [];\n const visit = (directory: string): void => {\n for (const entry of readdirSync(directory)) {\n const path = join(directory, entry);\n const stat = statSync(path);\n if (stat.isDirectory()) {\n visit(path);\n continue;\n }\n if (stat.isFile() && readFileSync(path, 'utf-8').includes(NGINX_CSP_BEGIN_MARKER)) {\n collected.push(path);\n }\n }\n };\n\n visit(nginxConfigRoot);\n return collected.sort();\n}\n\n/**\n * The origin of the environment's main backend API, where the platform CSP violation collector is served (#2867).\n *\n * The same derivation every other browser-facing origin of an environment takes, so the policy names the backend the\n * environment actually runs: a REMOTE environment's main backend at its public URL (`buildServicePublicUrl`, which the\n * ingress, `runtime.endPoints` and CORS key on), any other at `http://localhost:<defaultPort>`\n * (`resolveLocalhostApplicationOrigins`, the origin `wildo local dev` starts it on). The main backend is\n * `selectPrimaryBackendService`'s, the one rule every such derivation shares. `undefined` when the application declares\n * no backend with a port: the policy then names no collector rather than an invented one.\n */\nexport function resolveCspViolationCollectorOrigin(\n saasConfig: Pick<WildoSaasConfig, 'services'>,\n infraConfig: Pick<WildoInfraEnvConfig, 'locationType' | 'publicDomain' | 'serviceHosts'>,\n): string | undefined {\n if (infraConfig.locationType === WildoLocationType.REMOTE) {\n const backendKeys = Object.entries(saasConfig.services)\n .filter(([, service]) => service.frontendType === undefined)\n .map(([key]) => ({ key }));\n const primaryBackend = selectPrimaryBackendService(backendKeys);\n return primaryBackend === undefined\n ? undefined\n : buildServicePublicUrl({ serviceKey: primaryBackend.key, serviceHosts: infraConfig.serviceHosts, publicDomain: infraConfig.publicDomain });\n }\n return resolveLocalhostApplicationOrigins(saasConfig.services).api;\n}\n\n/**\n * Per-service resolved CSP policy — the side-effect-free output of\n * {@link CspSyncService.resolveServicePolicies}. Both the nginx sync (write\n * side) and `wildo frontend publish` (CDN edge re-home) consume this, so the\n * layered resolution (baseline ⊕ app-static ⊕ env-override ⊕ the declared\n * providers' footprints, plus the Vite dev-loosening / companion-origin\n * auto-derivations) lives in ONE place and can never drift between the two\n * consumers.\n */\nexport interface ResolvedServiceCspPolicy {\n readonly serviceKey: string;\n readonly frontendType: AppFrontendType;\n readonly serviceRoot: string;\n readonly policy: ResolvedCspPolicy;\n}\n\nexport class CspSyncService {\n /**\n * Resolve each CSP-capable frontend's policy WITHOUT writing anything.\n *\n * Loads the saas + infra configs, validates the infra `csp` keys, resolves\n * the app-static layer (SAAS_APP inline / `wildo.website.config.ts` /\n * `wildo.tech-doc.config.ts`) merged with the per-env override, and asserts\n * the runtime origins are in `connect-src`. Returns one entry per\n * CSP-capable frontend (filtered to `input.serviceKey` when given).\n *\n * This is the shared resolution seam: {@link sync} adds the nginx-write side;\n * the CDN publish path adds the `_headers` / edge-policy side.\n */\n static async resolveServicePolicies(\n input: CspSyncServiceInput,\n ): Promise<ResolvedServiceCspPolicy[]> {\n const saasRoot = resolve(input.saasRoot);\n const env = input.env ?? process.env;\n const saasConfig = await loadSaasConfig(saasRoot);\n const serviceEntries = resolveFrontendServiceEntries(saasConfig, input.serviceKey);\n const cspCapableServiceKeys = resolveFrontendServiceEntries(saasConfig, undefined).map(([serviceKey]) => serviceKey);\n const infraConfig = await loadInfraConfig(saasRoot, input.envName);\n const violationCollectorOrigin = resolveCspViolationCollectorOrigin(saasConfig, infraConfig);\n\n assertInfraCspKeysExistAsServices(\n infraConfig,\n saasConfig,\n new Set(cspCapableServiceKeys),\n input.envName,\n );\n\n const resolved: ResolvedServiceCspPolicy[] = [];\n for (const [serviceKey, service] of serviceEntries) {\n const frontendType = service.frontendType;\n if (frontendType === undefined) {\n continue;\n }\n\n const serviceRoot = resolve(saasRoot, service.path);\n const appCsp = await resolveAppCsp({\n saasRoot,\n serviceKey,\n serviceRoot,\n frontendType,\n service,\n });\n const policy = resolveCspPolicy({\n frontendType,\n appCsp,\n envOverride: EnvCspOverrideSchema.optional().parse(infraConfig.csp?.[serviceKey]),\n // The fourth layer (#332): what the providers this service declared\n // actually need to reach. Resolved per service AND per environment\n // because both axes change the answer — a provider enabled only in\n // production contributes origins only to production's policy, and CSP\n // is enforcing there while it is report-only in development, so this is\n // the one layer whose absence shows up nowhere else.\n providerCspFootprints: [\n ...collectProviderCspFootprints({ saasRoot, serviceKey }),\n ...collectBackendProviderFrameFootprints({ saasRoot, frontendType }),\n ],\n // Pass the env id so the resolver can auto-apply Vite dev-mode\n // loosening for `'local'` + `SAAS_APP`. Without this the\n // framework would not know whether it's resolving for local dev\n // or prod, and apps would still have to opt-in per-env.\n environmentId: input.envName,\n // Where the platform violation collector is (#2867): this environment's main backend. Every CSP-capable surface\n // names it, unless the application authored a collector of its own.\n violationCollectorOrigin,\n });\n if (policy === null) {\n throw new Error(\n `[wildo-csp-sync] service \"${serviceKey}\" resolved to a disabled CSP. CSP-capable frontend services require csp.enabled = true.`,\n );\n }\n\n const connectSrc = [...(policy.directives['connect-src'] ?? [])];\n assertRuntimeOriginsAllowed({\n frontendType,\n env,\n connectSrc,\n envName: input.envName,\n serviceKey,\n });\n\n resolved.push({ serviceKey, frontendType, serviceRoot, policy });\n }\n\n return resolved;\n }\n\n static async sync(input: CspSyncServiceInput): Promise<CspSyncServiceResult> {\n const saasRoot = resolve(input.saasRoot);\n const resolvedServices = await CspSyncService.resolveServicePolicies(input);\n\n const services: CspSyncServiceEntryResult[] = [];\n for (const { serviceKey, frontendType, serviceRoot, policy } of resolvedServices) {\n const connectSrc = [...(policy.directives['connect-src'] ?? [])];\n const artifacts = emitCspArtifacts(policy);\n const generatedArtifacts = parseGeneratedCspArtifacts({\n envName: input.envName,\n serviceKey,\n connectSrc,\n nginxHeaderName: artifacts.nginxHeaderName,\n nginxPolicyValue: artifacts.nginxPolicyValue,\n nginxAddHeaderLine: artifacts.nginxAddHeaderLine,\n responseHeaders: Object.fromEntries(artifacts.responseHeaders.map((header) => [header.name, header.value])),\n nginxAddHeaderLines: artifacts.nginxAddHeaderLines,\n metaTag: artifacts.metaTag,\n });\n const generatedArtifactPath = resolve(serviceRoot, 'src', 'generated', 'csp.generated.json');\n const write = input.checkOnly !== true;\n const generatedArtifactOutOfDate = reconcileGeneratedCspArtifacts(\n generatedArtifacts,\n generatedArtifactPath,\n { write },\n );\n const outOfDateNginxFiles: string[] = [];\n\n for (const nginxConfigFile of collectNginxConfigFilesWithCspMarkers(serviceRoot)) {\n const outOfDate = write\n ? rewriteNginxCspMarkerPairs(nginxConfigFile, generatedArtifacts.nginxAddHeaderLines).fileWritten\n : nginxCspMarkerPairsAreOutOfDate(nginxConfigFile, generatedArtifacts.nginxAddHeaderLines);\n if (outOfDate) {\n outOfDateNginxFiles.push(relative(saasRoot, nginxConfigFile));\n }\n }\n\n services.push({\n serviceKey,\n frontendType,\n generatedArtifactPath: relative(saasRoot, generatedArtifactPath),\n generatedArtifactOutOfDate,\n outOfDateNginxFiles,\n wroteChanges: write && (generatedArtifactOutOfDate || outOfDateNginxFiles.length > 0),\n });\n }\n\n return {\n envName: input.envName,\n services,\n };\n }\n}\n"]}
|