@wildo-ai/wildo-cli 1.1.5 → 1.1.7
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/bin/wildo.ts +12 -1
- package/dist/bin/wildo.js +13 -1
- package/dist/bin/wildo.js.map +1 -1
- package/dist/src/commands/__tests__/update.command.test.js +16 -2
- package/dist/src/commands/__tests__/update.command.test.js.map +1 -1
- package/dist/src/commands/acp/probe.command.d.ts.map +1 -1
- package/dist/src/commands/acp/probe.command.js +19 -1
- package/dist/src/commands/acp/probe.command.js.map +1 -1
- package/dist/src/commands/align-deps.command.d.ts.map +1 -1
- package/dist/src/commands/align-deps.command.js +3 -0
- package/dist/src/commands/align-deps.command.js.map +1 -1
- package/dist/src/commands/brand/propagate.command.d.ts +18 -38
- package/dist/src/commands/brand/propagate.command.d.ts.map +1 -1
- package/dist/src/commands/brand/propagate.command.js +32 -106
- package/dist/src/commands/brand/propagate.command.js.map +1 -1
- package/dist/src/commands/build/__tests__/console-verbs.commands.test.d.ts +2 -0
- package/dist/src/commands/build/__tests__/console-verbs.commands.test.d.ts.map +1 -0
- package/dist/src/commands/build/__tests__/console-verbs.commands.test.js +259 -0
- package/dist/src/commands/build/__tests__/console-verbs.commands.test.js.map +1 -0
- package/dist/src/commands/build/accept.command.d.ts +16 -0
- package/dist/src/commands/build/accept.command.d.ts.map +1 -0
- package/dist/src/commands/build/accept.command.js +37 -0
- package/dist/src/commands/build/accept.command.js.map +1 -0
- package/dist/src/commands/build/dispatches.command.d.ts +8 -0
- package/dist/src/commands/build/dispatches.command.d.ts.map +1 -0
- package/dist/src/commands/build/dispatches.command.js +26 -0
- package/dist/src/commands/build/dispatches.command.js.map +1 -0
- package/dist/src/commands/build/next.command.d.ts +8 -0
- package/dist/src/commands/build/next.command.d.ts.map +1 -0
- package/dist/src/commands/build/next.command.js +31 -0
- package/dist/src/commands/build/next.command.js.map +1 -0
- package/dist/src/commands/build/rearm.command.d.ts +16 -0
- package/dist/src/commands/build/rearm.command.d.ts.map +1 -0
- package/dist/src/commands/build/rearm.command.js +48 -0
- package/dist/src/commands/build/rearm.command.js.map +1 -0
- package/dist/src/commands/build/run.command.d.ts +15 -0
- package/dist/src/commands/build/run.command.d.ts.map +1 -0
- package/dist/src/commands/build/run.command.js +41 -0
- package/dist/src/commands/build/run.command.js.map +1 -0
- package/dist/src/commands/build/tasks.command.d.ts +8 -0
- package/dist/src/commands/build/tasks.command.d.ts.map +1 -0
- package/dist/src/commands/build/tasks.command.js +24 -0
- package/dist/src/commands/build/tasks.command.js.map +1 -0
- package/dist/src/commands/config/__tests__/sync.command.test.js +233 -4
- package/dist/src/commands/config/__tests__/sync.command.test.js.map +1 -1
- package/dist/src/commands/config/__tests__/validate.command.test.js +122 -1
- package/dist/src/commands/config/__tests__/validate.command.test.js.map +1 -1
- package/dist/src/commands/config/data-retention.command.d.ts +17 -0
- package/dist/src/commands/config/data-retention.command.d.ts.map +1 -0
- package/dist/src/commands/config/data-retention.command.js +58 -0
- package/dist/src/commands/config/data-retention.command.js.map +1 -0
- package/dist/src/commands/config/subject-data-recipients.command.d.ts +17 -0
- package/dist/src/commands/config/subject-data-recipients.command.d.ts.map +1 -0
- package/dist/src/commands/config/subject-data-recipients.command.js +59 -0
- package/dist/src/commands/config/subject-data-recipients.command.js.map +1 -0
- package/dist/src/commands/config/sync.command.d.ts +18 -5
- package/dist/src/commands/config/sync.command.d.ts.map +1 -1
- package/dist/src/commands/config/sync.command.js +132 -18
- package/dist/src/commands/config/sync.command.js.map +1 -1
- package/dist/src/commands/config/validate.command.d.ts +39 -2
- package/dist/src/commands/config/validate.command.d.ts.map +1 -1
- package/dist/src/commands/config/validate.command.js +186 -8
- package/dist/src/commands/config/validate.command.js.map +1 -1
- package/dist/src/commands/context/__tests__/companion-refusal-hint.test.d.ts +2 -0
- package/dist/src/commands/context/__tests__/companion-refusal-hint.test.d.ts.map +1 -0
- package/dist/src/commands/context/__tests__/companion-refusal-hint.test.js +118 -0
- package/dist/src/commands/context/__tests__/companion-refusal-hint.test.js.map +1 -0
- package/dist/src/commands/context/__tests__/elements.command.test.js +6 -5
- package/dist/src/commands/context/__tests__/elements.command.test.js.map +1 -1
- package/dist/src/commands/context/__tests__/info.command.test.js +10 -9
- package/dist/src/commands/context/__tests__/info.command.test.js.map +1 -1
- package/dist/src/commands/context/__tests__/journey-application-line.test.d.ts +2 -0
- package/dist/src/commands/context/__tests__/journey-application-line.test.d.ts.map +1 -0
- package/dist/src/commands/context/__tests__/journey-application-line.test.js +71 -0
- package/dist/src/commands/context/__tests__/journey-application-line.test.js.map +1 -0
- package/dist/src/commands/context/__tests__/journey-attempt-history.test.d.ts +2 -0
- package/dist/src/commands/context/__tests__/journey-attempt-history.test.d.ts.map +1 -0
- package/dist/src/commands/context/__tests__/journey-attempt-history.test.js +27 -0
- package/dist/src/commands/context/__tests__/journey-attempt-history.test.js.map +1 -0
- package/dist/src/commands/context/__tests__/pipelines.command.test.d.ts +2 -0
- package/dist/src/commands/context/__tests__/pipelines.command.test.d.ts.map +1 -0
- package/dist/src/commands/context/__tests__/pipelines.command.test.js +136 -0
- package/dist/src/commands/context/__tests__/pipelines.command.test.js.map +1 -0
- package/dist/src/commands/context/__tests__/workspace.command.test.js +19 -1
- package/dist/src/commands/context/__tests__/workspace.command.test.js.map +1 -1
- package/dist/src/commands/context/assurance-basis.command.d.ts.map +1 -1
- package/dist/src/commands/context/assurance-basis.command.js +3 -2
- package/dist/src/commands/context/assurance-basis.command.js.map +1 -1
- package/dist/src/commands/context/coherence.command.d.ts.map +1 -1
- package/dist/src/commands/context/coherence.command.js +7 -5
- package/dist/src/commands/context/coherence.command.js.map +1 -1
- package/dist/src/commands/context/context-command.utils.d.ts.map +1 -1
- package/dist/src/commands/context/context-command.utils.js +9 -10
- package/dist/src/commands/context/context-command.utils.js.map +1 -1
- package/dist/src/commands/context/health.command.d.ts.map +1 -1
- package/dist/src/commands/context/health.command.js +7 -2
- package/dist/src/commands/context/health.command.js.map +1 -1
- package/dist/src/commands/context/journey.command.d.ts +123 -0
- package/dist/src/commands/context/journey.command.d.ts.map +1 -1
- package/dist/src/commands/context/journey.command.js +149 -33
- package/dist/src/commands/context/journey.command.js.map +1 -1
- package/dist/src/commands/context/jurisdictions.command.d.ts.map +1 -1
- package/dist/src/commands/context/jurisdictions.command.js +2 -1
- package/dist/src/commands/context/jurisdictions.command.js.map +1 -1
- package/dist/src/commands/context/list.command.d.ts.map +1 -1
- package/dist/src/commands/context/list.command.js +6 -3
- package/dist/src/commands/context/list.command.js.map +1 -1
- package/dist/src/commands/context/pipelines.command.d.ts +25 -0
- package/dist/src/commands/context/pipelines.command.d.ts.map +1 -0
- package/dist/src/commands/context/pipelines.command.js +149 -0
- package/dist/src/commands/context/pipelines.command.js.map +1 -0
- package/dist/src/commands/context/workspace.command.d.ts.map +1 -1
- package/dist/src/commands/context/workspace.command.js +6 -4
- package/dist/src/commands/context/workspace.command.js.map +1 -1
- package/dist/src/commands/creation/__tests__/creation.commands.test.d.ts +2 -0
- package/dist/src/commands/creation/__tests__/creation.commands.test.d.ts.map +1 -0
- package/dist/src/commands/creation/__tests__/creation.commands.test.js +294 -0
- package/dist/src/commands/creation/__tests__/creation.commands.test.js.map +1 -0
- package/dist/src/commands/creation/__tests__/revert.command.test.d.ts +2 -0
- package/dist/src/commands/creation/__tests__/revert.command.test.d.ts.map +1 -0
- package/dist/src/commands/creation/__tests__/revert.command.test.js +62 -0
- package/dist/src/commands/creation/__tests__/revert.command.test.js.map +1 -0
- package/dist/src/commands/creation/accept.command.d.ts +12 -0
- package/dist/src/commands/creation/accept.command.d.ts.map +1 -0
- package/dist/src/commands/creation/accept.command.js +34 -0
- package/dist/src/commands/creation/accept.command.js.map +1 -0
- package/dist/src/commands/creation/answer.command.d.ts +30 -0
- package/dist/src/commands/creation/answer.command.d.ts.map +1 -0
- package/dist/src/commands/creation/answer.command.js +154 -0
- package/dist/src/commands/creation/answer.command.js.map +1 -0
- package/dist/src/commands/creation/brief.command.d.ts +16 -0
- package/dist/src/commands/creation/brief.command.d.ts.map +1 -0
- package/dist/src/commands/creation/brief.command.js +50 -0
- package/dist/src/commands/creation/brief.command.js.map +1 -0
- package/dist/src/commands/creation/deliberate.command.d.ts +17 -0
- package/dist/src/commands/creation/deliberate.command.d.ts.map +1 -0
- package/dist/src/commands/creation/deliberate.command.js +55 -0
- package/dist/src/commands/creation/deliberate.command.js.map +1 -0
- package/dist/src/commands/creation/diff.command.d.ts +12 -0
- package/dist/src/commands/creation/diff.command.d.ts.map +1 -0
- package/dist/src/commands/creation/diff.command.js +33 -0
- package/dist/src/commands/creation/diff.command.js.map +1 -0
- package/dist/src/commands/creation/feed.command.d.ts +21 -0
- package/dist/src/commands/creation/feed.command.d.ts.map +1 -0
- package/dist/src/commands/creation/feed.command.js +135 -0
- package/dist/src/commands/creation/feed.command.js.map +1 -0
- package/dist/src/commands/creation/loop.command.d.ts +19 -0
- package/dist/src/commands/creation/loop.command.d.ts.map +1 -0
- package/dist/src/commands/creation/loop.command.js +52 -0
- package/dist/src/commands/creation/loop.command.js.map +1 -0
- package/dist/src/commands/creation/persona.command.d.ts +16 -0
- package/dist/src/commands/creation/persona.command.d.ts.map +1 -0
- package/dist/src/commands/creation/persona.command.js +54 -0
- package/dist/src/commands/creation/persona.command.js.map +1 -0
- package/dist/src/commands/creation/prompt-hook.command.d.ts +14 -0
- package/dist/src/commands/creation/prompt-hook.command.d.ts.map +1 -0
- package/dist/src/commands/creation/prompt-hook.command.js +24 -0
- package/dist/src/commands/creation/prompt-hook.command.js.map +1 -0
- package/dist/src/commands/creation/pulse.command.d.ts +14 -0
- package/dist/src/commands/creation/pulse.command.d.ts.map +1 -0
- package/dist/src/commands/creation/pulse.command.js +25 -0
- package/dist/src/commands/creation/pulse.command.js.map +1 -0
- package/dist/src/commands/creation/questions.command.d.ts +16 -0
- package/dist/src/commands/creation/questions.command.d.ts.map +1 -0
- package/dist/src/commands/creation/questions.command.js +57 -0
- package/dist/src/commands/creation/questions.command.js.map +1 -0
- package/dist/src/commands/creation/revert.command.d.ts +15 -0
- package/dist/src/commands/creation/revert.command.d.ts.map +1 -0
- package/dist/src/commands/creation/revert.command.js +41 -0
- package/dist/src/commands/creation/revert.command.js.map +1 -0
- package/dist/src/commands/creation/run.command.d.ts +15 -0
- package/dist/src/commands/creation/run.command.d.ts.map +1 -0
- package/dist/src/commands/creation/run.command.js +64 -0
- package/dist/src/commands/creation/run.command.js.map +1 -0
- package/dist/src/commands/creation/statusline.command.d.ts +14 -0
- package/dist/src/commands/creation/statusline.command.d.ts.map +1 -0
- package/dist/src/commands/creation/statusline.command.js +24 -0
- package/dist/src/commands/creation/statusline.command.js.map +1 -0
- package/dist/src/commands/creation/watch.command.d.ts +20 -0
- package/dist/src/commands/creation/watch.command.d.ts.map +1 -0
- package/dist/src/commands/creation/watch.command.js +54 -0
- package/dist/src/commands/creation/watch.command.js.map +1 -0
- package/dist/src/commands/creation/why.command.d.ts +15 -0
- package/dist/src/commands/creation/why.command.d.ts.map +1 -0
- package/dist/src/commands/creation/why.command.js +45 -0
- package/dist/src/commands/creation/why.command.js.map +1 -0
- package/dist/src/commands/creation/writes.command.d.ts +8 -0
- package/dist/src/commands/creation/writes.command.d.ts.map +1 -0
- package/dist/src/commands/creation/writes.command.js +29 -0
- package/dist/src/commands/creation/writes.command.js.map +1 -0
- package/dist/src/commands/db/db-schema-plan.utils.d.ts +33 -0
- package/dist/src/commands/db/db-schema-plan.utils.d.ts.map +1 -1
- package/dist/src/commands/db/db-schema-plan.utils.js +43 -17
- package/dist/src/commands/db/db-schema-plan.utils.js.map +1 -1
- package/dist/src/commands/dev/__tests__/start.command.test.js +1 -1
- package/dist/src/commands/dev/__tests__/start.command.test.js.map +1 -1
- package/dist/src/commands/dev/__tests__/sync-csp.command.test.js +6 -1
- package/dist/src/commands/dev/__tests__/sync-csp.command.test.js.map +1 -1
- package/dist/src/commands/dev/start.command.d.ts.map +1 -1
- package/dist/src/commands/dev/start.command.js +3 -1
- package/dist/src/commands/dev/start.command.js.map +1 -1
- package/dist/src/commands/dev/sync-csp.command.d.ts.map +1 -1
- package/dist/src/commands/dev/sync-csp.command.js +8 -4
- package/dist/src/commands/dev/sync-csp.command.js.map +1 -1
- package/dist/src/commands/docs/__tests__/publish.command.test.js +24 -1
- package/dist/src/commands/docs/__tests__/publish.command.test.js.map +1 -1
- package/dist/src/commands/docs/publish.command.d.ts.map +1 -1
- package/dist/src/commands/docs/publish.command.js +3 -1
- package/dist/src/commands/docs/publish.command.js.map +1 -1
- package/dist/src/commands/frontend/__tests__/publish.command.test.js +5 -1
- package/dist/src/commands/frontend/__tests__/publish.command.test.js.map +1 -1
- package/dist/src/commands/frontend/publish.command.d.ts.map +1 -1
- package/dist/src/commands/frontend/publish.command.js +6 -2
- package/dist/src/commands/frontend/publish.command.js.map +1 -1
- package/dist/src/commands/fwk/__tests__/generate-docs.command.test.js +7 -1
- package/dist/src/commands/fwk/__tests__/generate-docs.command.test.js.map +1 -1
- package/dist/src/commands/fwk/__tests__/publish-all.command.test.js +100 -7
- package/dist/src/commands/fwk/__tests__/publish-all.command.test.js.map +1 -1
- package/dist/src/commands/fwk/dev-skills.command.d.ts.map +1 -1
- package/dist/src/commands/fwk/dev-skills.command.js +8 -0
- package/dist/src/commands/fwk/dev-skills.command.js.map +1 -1
- package/dist/src/commands/fwk/generate-docs.command.d.ts.map +1 -1
- package/dist/src/commands/fwk/generate-docs.command.js +1 -0
- package/dist/src/commands/fwk/generate-docs.command.js.map +1 -1
- package/dist/src/commands/fwk/generate-providers.command.d.ts +3 -1
- package/dist/src/commands/fwk/generate-providers.command.d.ts.map +1 -1
- package/dist/src/commands/fwk/generate-providers.command.js +19 -8
- package/dist/src/commands/fwk/generate-providers.command.js.map +1 -1
- package/dist/src/commands/fwk/publish-all.command.d.ts +50 -4
- package/dist/src/commands/fwk/publish-all.command.d.ts.map +1 -1
- package/dist/src/commands/fwk/publish-all.command.js +104 -14
- package/dist/src/commands/fwk/publish-all.command.js.map +1 -1
- package/dist/src/commands/generate/__tests__/email-command.utils.test.js +2 -1
- package/dist/src/commands/generate/__tests__/email-command.utils.test.js.map +1 -1
- package/dist/src/commands/generate/labelling-command.utils.d.ts +11 -0
- package/dist/src/commands/generate/labelling-command.utils.d.ts.map +1 -1
- package/dist/src/commands/generate/labelling-command.utils.js +70 -0
- package/dist/src/commands/generate/labelling-command.utils.js.map +1 -1
- package/dist/src/commands/generate/labels-plan.command.d.ts.map +1 -1
- package/dist/src/commands/generate/labels-plan.command.js +19 -1
- package/dist/src/commands/generate/labels-plan.command.js.map +1 -1
- package/dist/src/commands/generate/translate.command.d.ts +6 -0
- package/dist/src/commands/generate/translate.command.d.ts.map +1 -1
- package/dist/src/commands/generate/translate.command.js +8 -2
- package/dist/src/commands/generate/translate.command.js.map +1 -1
- package/dist/src/commands/init.command.d.ts +5 -0
- package/dist/src/commands/init.command.d.ts.map +1 -1
- package/dist/src/commands/init.command.js +47 -3
- 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 +19 -7
- package/dist/src/commands/local/deregister.command.js.map +1 -1
- package/dist/src/commands/local/dev.command.d.ts.map +1 -1
- package/dist/src/commands/local/dev.command.js +15 -1
- package/dist/src/commands/local/dev.command.js.map +1 -1
- package/dist/src/commands/local/doctor.command.d.ts +1 -1
- package/dist/src/commands/local/doctor.command.d.ts.map +1 -1
- package/dist/src/commands/local/doctor.command.js +21 -3
- package/dist/src/commands/local/doctor.command.js.map +1 -1
- package/dist/src/commands/local/restore.command.d.ts.map +1 -1
- package/dist/src/commands/local/restore.command.js +11 -7
- package/dist/src/commands/local/restore.command.js.map +1 -1
- package/dist/src/commands/lock/check.command.d.ts.map +1 -1
- package/dist/src/commands/lock/check.command.js +21 -24
- package/dist/src/commands/lock/check.command.js.map +1 -1
- package/dist/src/commands/market/__tests__/generate.command.test.js +11 -1
- package/dist/src/commands/market/__tests__/generate.command.test.js.map +1 -1
- package/dist/src/commands/market/__tests__/market-command.utils.test.js +2 -1
- package/dist/src/commands/market/__tests__/market-command.utils.test.js.map +1 -1
- package/dist/src/commands/market/generate.command.d.ts.map +1 -1
- package/dist/src/commands/market/generate.command.js +18 -2
- package/dist/src/commands/market/generate.command.js.map +1 -1
- package/dist/src/commands/prefs/set.command.d.ts.map +1 -1
- package/dist/src/commands/prefs/set.command.js +13 -24
- package/dist/src/commands/prefs/set.command.js.map +1 -1
- package/dist/src/commands/providers/show.command.d.ts +21 -14
- package/dist/src/commands/providers/show.command.d.ts.map +1 -1
- package/dist/src/commands/providers/show.command.js +44 -24
- package/dist/src/commands/providers/show.command.js.map +1 -1
- package/dist/src/commands/registry/__tests__/edited-files-protection.test.d.ts +10 -0
- package/dist/src/commands/registry/__tests__/edited-files-protection.test.d.ts.map +1 -0
- package/dist/src/commands/registry/__tests__/edited-files-protection.test.js +232 -0
- package/dist/src/commands/registry/__tests__/edited-files-protection.test.js.map +1 -0
- package/dist/src/commands/registry/__tests__/local-checkout-install.test.d.ts +11 -0
- package/dist/src/commands/registry/__tests__/local-checkout-install.test.d.ts.map +1 -0
- package/dist/src/commands/registry/__tests__/local-checkout-install.test.js +450 -0
- package/dist/src/commands/registry/__tests__/local-checkout-install.test.js.map +1 -0
- package/dist/src/commands/registry/__tests__/publish.test.d.ts +2 -0
- package/dist/src/commands/registry/__tests__/publish.test.d.ts.map +1 -0
- package/dist/src/commands/registry/__tests__/publish.test.js +196 -0
- package/dist/src/commands/registry/__tests__/publish.test.js.map +1 -0
- package/dist/src/commands/registry/__tests__/repair-contract.test.js +34 -7
- package/dist/src/commands/registry/__tests__/repair-contract.test.js.map +1 -1
- package/dist/src/commands/registry/__tests__/requirements.test.js +395 -14
- package/dist/src/commands/registry/__tests__/requirements.test.js.map +1 -1
- package/dist/src/commands/registry/__tests__/version-resolution.test.js +9 -4
- package/dist/src/commands/registry/__tests__/version-resolution.test.js.map +1 -1
- package/dist/src/commands/registry/__tests__/yank.test.d.ts +9 -0
- package/dist/src/commands/registry/__tests__/yank.test.d.ts.map +1 -0
- package/dist/src/commands/registry/__tests__/yank.test.js +92 -0
- package/dist/src/commands/registry/__tests__/yank.test.js.map +1 -0
- package/dist/src/commands/registry/add.command.d.ts +4 -0
- package/dist/src/commands/registry/add.command.d.ts.map +1 -1
- package/dist/src/commands/registry/add.command.js +196 -116
- package/dist/src/commands/registry/add.command.js.map +1 -1
- package/dist/src/commands/registry/info.command.d.ts.map +1 -1
- package/dist/src/commands/registry/info.command.js +17 -4
- package/dist/src/commands/registry/info.command.js.map +1 -1
- package/dist/src/commands/registry/key.command.d.ts +32 -0
- package/dist/src/commands/registry/key.command.d.ts.map +1 -0
- package/dist/src/commands/registry/key.command.js +129 -0
- package/dist/src/commands/registry/key.command.js.map +1 -0
- package/dist/src/commands/registry/login.command.d.ts +5 -0
- package/dist/src/commands/registry/login.command.d.ts.map +1 -1
- package/dist/src/commands/registry/login.command.js +7 -2
- package/dist/src/commands/registry/login.command.js.map +1 -1
- package/dist/src/commands/registry/outdated.command.d.ts +21 -0
- package/dist/src/commands/registry/outdated.command.d.ts.map +1 -0
- package/dist/src/commands/registry/outdated.command.js +81 -0
- package/dist/src/commands/registry/outdated.command.js.map +1 -0
- package/dist/src/commands/registry/publish.command.d.ts.map +1 -1
- package/dist/src/commands/registry/publish.command.js +95 -20
- package/dist/src/commands/registry/publish.command.js.map +1 -1
- package/dist/src/commands/registry/remove.command.d.ts.map +1 -1
- package/dist/src/commands/registry/remove.command.js +155 -42
- package/dist/src/commands/registry/remove.command.js.map +1 -1
- package/dist/src/commands/registry/repair-lockfile.command.d.ts +9 -3
- package/dist/src/commands/registry/repair-lockfile.command.d.ts.map +1 -1
- package/dist/src/commands/registry/repair-lockfile.command.js +135 -74
- package/dist/src/commands/registry/repair-lockfile.command.js.map +1 -1
- package/dist/src/commands/registry/search.command.d.ts.map +1 -1
- package/dist/src/commands/registry/search.command.js +51 -9
- package/dist/src/commands/registry/search.command.js.map +1 -1
- package/dist/src/commands/registry/status.command.d.ts +15 -0
- package/dist/src/commands/registry/status.command.d.ts.map +1 -0
- package/dist/src/commands/registry/status.command.js +61 -0
- package/dist/src/commands/registry/status.command.js.map +1 -0
- package/dist/src/commands/registry/update.command.d.ts.map +1 -1
- package/dist/src/commands/registry/update.command.js +307 -179
- package/dist/src/commands/registry/update.command.js.map +1 -1
- package/dist/src/commands/registry/yank.command.d.ts +19 -0
- package/dist/src/commands/registry/yank.command.d.ts.map +1 -0
- package/dist/src/commands/registry/yank.command.js +80 -0
- package/dist/src/commands/registry/yank.command.js.map +1 -0
- package/dist/src/commands/secrets/__tests__/secrets-commands.flags.test.d.ts +2 -0
- package/dist/src/commands/secrets/__tests__/secrets-commands.flags.test.d.ts.map +1 -0
- package/dist/src/commands/secrets/__tests__/secrets-commands.flags.test.js +61 -0
- package/dist/src/commands/secrets/__tests__/secrets-commands.flags.test.js.map +1 -0
- package/dist/src/commands/secrets/github.command.d.ts +7 -0
- package/dist/src/commands/secrets/github.command.d.ts.map +1 -0
- package/dist/src/commands/secrets/github.command.js +89 -0
- package/dist/src/commands/secrets/github.command.js.map +1 -0
- package/dist/src/commands/secrets/list.command.d.ts +14 -0
- package/dist/src/commands/secrets/list.command.d.ts.map +1 -0
- package/dist/src/commands/secrets/list.command.js +154 -0
- package/dist/src/commands/secrets/list.command.js.map +1 -0
- package/dist/src/commands/secrets/set.command.d.ts +44 -0
- package/dist/src/commands/secrets/set.command.d.ts.map +1 -0
- package/dist/src/commands/secrets/set.command.js +131 -0
- package/dist/src/commands/secrets/set.command.js.map +1 -0
- package/dist/src/commands/secrets/unset.command.d.ts +7 -0
- package/dist/src/commands/secrets/unset.command.d.ts.map +1 -0
- package/dist/src/commands/secrets/unset.command.js +42 -0
- package/dist/src/commands/secrets/unset.command.js.map +1 -0
- package/dist/src/commands/update.command.js +10 -12
- package/dist/src/commands/update.command.js.map +1 -1
- package/dist/src/commands/website/__tests__/audit.command.test.js +58 -0
- package/dist/src/commands/website/__tests__/audit.command.test.js.map +1 -1
- package/dist/src/commands/website/audit.command.d.ts +8 -0
- package/dist/src/commands/website/audit.command.d.ts.map +1 -1
- package/dist/src/commands/website/audit.command.js +39 -2
- package/dist/src/commands/website/audit.command.js.map +1 -1
- package/dist/src/commands/workbench/open.command.d.ts +8 -0
- package/dist/src/commands/workbench/open.command.d.ts.map +1 -1
- package/dist/src/commands/workbench/open.command.js +29 -3
- package/dist/src/commands/workbench/open.command.js.map +1 -1
- package/dist/src/kernel/bootstrap.d.ts.map +1 -1
- package/dist/src/kernel/bootstrap.js +4 -1
- package/dist/src/kernel/bootstrap.js.map +1 -1
- package/dist/src/kernel/hooks.d.ts.map +1 -1
- package/dist/src/kernel/hooks.js +7 -1
- package/dist/src/kernel/hooks.js.map +1 -1
- package/dist/src/kernel/types.d.ts +7 -0
- package/dist/src/kernel/types.d.ts.map +1 -1
- package/dist/src/kernel/types.js.map +1 -1
- package/dist/src/modules/domain/credentials/creation-essentials.module.d.ts +19 -0
- package/dist/src/modules/domain/credentials/creation-essentials.module.d.ts.map +1 -0
- package/dist/src/modules/domain/credentials/creation-essentials.module.js +130 -0
- package/dist/src/modules/domain/credentials/creation-essentials.module.js.map +1 -0
- package/dist/src/services/application/__tests__/app-bootstrap.backing-service-addressing.test.js +26 -3
- package/dist/src/services/application/__tests__/app-bootstrap.backing-service-addressing.test.js.map +1 -1
- package/dist/src/services/application/__tests__/app-bootstrap.service.test.js +12 -16
- package/dist/src/services/application/__tests__/app-bootstrap.service.test.js.map +1 -1
- package/dist/src/services/application/__tests__/app-bootstrap.two-phase-seeding.test.js +5 -4
- package/dist/src/services/application/__tests__/app-bootstrap.two-phase-seeding.test.js.map +1 -1
- package/dist/src/services/application/__tests__/application-assets-delivery.service.test.js +22 -1
- package/dist/src/services/application/__tests__/application-assets-delivery.service.test.js.map +1 -1
- package/dist/src/services/application/__tests__/application-dependency-alignment.service.test.js +18 -0
- package/dist/src/services/application/__tests__/application-dependency-alignment.service.test.js.map +1 -1
- package/dist/src/services/application/__tests__/frontend-public-config-secret-screen.service.test.d.ts +2 -0
- package/dist/src/services/application/__tests__/frontend-public-config-secret-screen.service.test.d.ts.map +1 -0
- package/dist/src/services/application/__tests__/frontend-public-config-secret-screen.service.test.js +175 -0
- package/dist/src/services/application/__tests__/frontend-public-config-secret-screen.service.test.js.map +1 -0
- package/dist/src/services/application/__tests__/frontend-vite-warmup.template.test.d.ts +2 -0
- package/dist/src/services/application/__tests__/frontend-vite-warmup.template.test.d.ts.map +1 -0
- package/dist/src/services/application/__tests__/frontend-vite-warmup.template.test.js +31 -0
- package/dist/src/services/application/__tests__/frontend-vite-warmup.template.test.js.map +1 -0
- package/dist/src/services/application/__tests__/local-application-initialization.hosted.test.js +20 -1
- package/dist/src/services/application/__tests__/local-application-initialization.hosted.test.js.map +1 -1
- package/dist/src/services/application/__tests__/provider-augmentation-materialization.guard.test.d.ts +2 -0
- package/dist/src/services/application/__tests__/provider-augmentation-materialization.guard.test.d.ts.map +1 -0
- package/dist/src/services/application/__tests__/provider-augmentation-materialization.guard.test.js +76 -0
- package/dist/src/services/application/__tests__/provider-augmentation-materialization.guard.test.js.map +1 -0
- package/dist/src/services/application/__tests__/provider-package-links.service.test.js +126 -66
- package/dist/src/services/application/__tests__/provider-package-links.service.test.js.map +1 -1
- package/dist/src/services/application/__tests__/provider-runtime-sync.secret-screen.guard.test.d.ts +2 -0
- package/dist/src/services/application/__tests__/provider-runtime-sync.secret-screen.guard.test.d.ts.map +1 -0
- package/dist/src/services/application/__tests__/provider-runtime-sync.secret-screen.guard.test.js +40 -0
- package/dist/src/services/application/__tests__/provider-runtime-sync.secret-screen.guard.test.js.map +1 -0
- package/dist/src/services/application/__tests__/provider-runtime-sync.service.test.js +78 -1
- package/dist/src/services/application/__tests__/provider-runtime-sync.service.test.js.map +1 -1
- package/dist/src/services/application/__tests__/saas-skeleton.service.test.js +51 -5
- package/dist/src/services/application/__tests__/saas-skeleton.service.test.js.map +1 -1
- package/dist/src/services/application/__tests__/systems-of-record-library.service.test.d.ts +2 -0
- package/dist/src/services/application/__tests__/systems-of-record-library.service.test.d.ts.map +1 -0
- package/dist/src/services/application/__tests__/systems-of-record-library.service.test.js +79 -0
- package/dist/src/services/application/__tests__/systems-of-record-library.service.test.js.map +1 -0
- package/dist/src/services/application/app-bootstrap.service.d.ts +58 -29
- package/dist/src/services/application/app-bootstrap.service.d.ts.map +1 -1
- package/dist/src/services/application/app-bootstrap.service.js +72 -40
- package/dist/src/services/application/app-bootstrap.service.js.map +1 -1
- package/dist/src/services/application/application-assets-delivery.service.d.ts.map +1 -1
- package/dist/src/services/application/application-assets-delivery.service.js +5 -2
- package/dist/src/services/application/application-assets-delivery.service.js.map +1 -1
- package/dist/src/services/application/application-creation-readiness.service.js +2 -2
- package/dist/src/services/application/application-creation-readiness.service.js.map +1 -1
- package/dist/src/services/application/application-dependency-alignment.service.d.ts +34 -1
- package/dist/src/services/application/application-dependency-alignment.service.d.ts.map +1 -1
- package/dist/src/services/application/application-dependency-alignment.service.js +80 -13
- package/dist/src/services/application/application-dependency-alignment.service.js.map +1 -1
- package/dist/src/services/application/frontend-public-config-secret-screen.service.d.ts +83 -0
- package/dist/src/services/application/frontend-public-config-secret-screen.service.d.ts.map +1 -0
- package/dist/src/services/application/frontend-public-config-secret-screen.service.js +161 -0
- package/dist/src/services/application/frontend-public-config-secret-screen.service.js.map +1 -0
- package/dist/src/services/application/local-application-initialization.service.d.ts.map +1 -1
- package/dist/src/services/application/local-application-initialization.service.js +25 -19
- package/dist/src/services/application/local-application-initialization.service.js.map +1 -1
- package/dist/src/services/application/provider-package-links.service.d.ts +66 -26
- package/dist/src/services/application/provider-package-links.service.d.ts.map +1 -1
- package/dist/src/services/application/provider-package-links.service.js +140 -41
- package/dist/src/services/application/provider-package-links.service.js.map +1 -1
- package/dist/src/services/application/provider-runtime-sync.service.d.ts +34 -3
- package/dist/src/services/application/provider-runtime-sync.service.d.ts.map +1 -1
- package/dist/src/services/application/provider-runtime-sync.service.js +85 -28
- package/dist/src/services/application/provider-runtime-sync.service.js.map +1 -1
- package/dist/src/services/application/saas-skeleton.service.d.ts.map +1 -1
- package/dist/src/services/application/saas-skeleton.service.js +20 -11
- package/dist/src/services/application/saas-skeleton.service.js.map +1 -1
- package/dist/src/services/application/systems-of-record-library.service.d.ts +22 -0
- package/dist/src/services/application/systems-of-record-library.service.d.ts.map +1 -0
- package/dist/src/services/application/systems-of-record-library.service.js +96 -0
- package/dist/src/services/application/systems-of-record-library.service.js.map +1 -0
- package/dist/src/services/catalog/__tests__/service-address-resolver.service.test.js +10 -0
- package/dist/src/services/catalog/__tests__/service-address-resolver.service.test.js.map +1 -1
- package/dist/src/services/catalog/service-address-resolver.service.d.ts +13 -0
- package/dist/src/services/catalog/service-address-resolver.service.d.ts.map +1 -1
- package/dist/src/services/catalog/service-address-resolver.service.js +8 -0
- package/dist/src/services/catalog/service-address-resolver.service.js.map +1 -1
- package/dist/src/services/catalog/service-catalog.schemas.d.ts +41 -0
- package/dist/src/services/catalog/service-catalog.schemas.d.ts.map +1 -1
- package/dist/src/services/catalog/service-catalog.schemas.js +13 -5
- package/dist/src/services/catalog/service-catalog.schemas.js.map +1 -1
- package/dist/src/services/coding-agents/__tests__/acp-conformance-probe.service.test.js +14 -1
- package/dist/src/services/coding-agents/__tests__/acp-conformance-probe.service.test.js.map +1 -1
- package/dist/src/services/coding-agents/acp-conformance-probe.service.d.ts +17 -1
- package/dist/src/services/coding-agents/acp-conformance-probe.service.d.ts.map +1 -1
- package/dist/src/services/coding-agents/acp-conformance-probe.service.js +15 -8
- package/dist/src/services/coding-agents/acp-conformance-probe.service.js.map +1 -1
- package/dist/src/services/coding-agents/coding-agent-login.service.d.ts +44 -0
- package/dist/src/services/coding-agents/coding-agent-login.service.d.ts.map +1 -0
- package/dist/src/services/coding-agents/coding-agent-login.service.js +94 -0
- package/dist/src/services/coding-agents/coding-agent-login.service.js.map +1 -0
- package/dist/src/services/companion/__tests__/companion-client.service.test.js +23 -0
- package/dist/src/services/companion/__tests__/companion-client.service.test.js.map +1 -1
- package/dist/src/services/companion/__tests__/companion-health-hint.utils.test.d.ts +2 -0
- package/dist/src/services/companion/__tests__/companion-health-hint.utils.test.d.ts.map +1 -0
- package/dist/src/services/companion/__tests__/companion-health-hint.utils.test.js +25 -0
- package/dist/src/services/companion/__tests__/companion-health-hint.utils.test.js.map +1 -0
- package/dist/src/services/companion/__tests__/console-fast-path.test.d.ts +2 -0
- package/dist/src/services/companion/__tests__/console-fast-path.test.d.ts.map +1 -0
- package/dist/src/services/companion/__tests__/console-fast-path.test.js +138 -0
- package/dist/src/services/companion/__tests__/console-fast-path.test.js.map +1 -0
- package/dist/src/services/companion/__tests__/creation-watch.test.d.ts +2 -0
- package/dist/src/services/companion/__tests__/creation-watch.test.d.ts.map +1 -0
- package/dist/src/services/companion/__tests__/creation-watch.test.js +86 -0
- package/dist/src/services/companion/__tests__/creation-watch.test.js.map +1 -0
- package/dist/src/services/companion/__tests__/workbench-cli.service.test.js +2 -1
- package/dist/src/services/companion/__tests__/workbench-cli.service.test.js.map +1 -1
- package/dist/src/services/companion/build-console.service.d.ts +84 -0
- package/dist/src/services/companion/build-console.service.d.ts.map +1 -0
- package/dist/src/services/companion/build-console.service.js +64 -0
- package/dist/src/services/companion/build-console.service.js.map +1 -0
- package/dist/src/services/companion/companion-client.service.d.ts +28 -0
- package/dist/src/services/companion/companion-client.service.d.ts.map +1 -1
- package/dist/src/services/companion/companion-client.service.js +54 -6
- package/dist/src/services/companion/companion-client.service.js.map +1 -1
- package/dist/src/services/companion/companion-health-hint.utils.d.ts +23 -0
- package/dist/src/services/companion/companion-health-hint.utils.d.ts.map +1 -0
- package/dist/src/services/companion/companion-health-hint.utils.js +31 -0
- package/dist/src/services/companion/companion-health-hint.utils.js.map +1 -0
- package/dist/src/services/companion/companion-local-token.utils.d.ts +10 -0
- package/dist/src/services/companion/companion-local-token.utils.d.ts.map +1 -1
- package/dist/src/services/companion/companion-local-token.utils.js +19 -1
- package/dist/src/services/companion/companion-local-token.utils.js.map +1 -1
- package/dist/src/services/companion/console-fast-path.d.ts +104 -0
- package/dist/src/services/companion/console-fast-path.d.ts.map +1 -0
- package/dist/src/services/companion/console-fast-path.js +281 -0
- package/dist/src/services/companion/console-fast-path.js.map +1 -0
- package/dist/src/services/companion/console-verb.utils.d.ts +29 -0
- package/dist/src/services/companion/console-verb.utils.d.ts.map +1 -0
- package/dist/src/services/companion/console-verb.utils.js +41 -0
- package/dist/src/services/companion/console-verb.utils.js.map +1 -0
- package/dist/src/services/companion/creation-console.service.d.ts +173 -0
- package/dist/src/services/companion/creation-console.service.d.ts.map +1 -0
- package/dist/src/services/companion/creation-console.service.js +377 -0
- package/dist/src/services/companion/creation-console.service.js.map +1 -0
- package/dist/src/services/compliance/__tests__/data-retention-schedule.generator.test.d.ts +2 -0
- package/dist/src/services/compliance/__tests__/data-retention-schedule.generator.test.d.ts.map +1 -0
- package/dist/src/services/compliance/__tests__/data-retention-schedule.generator.test.js +71 -0
- package/dist/src/services/compliance/__tests__/data-retention-schedule.generator.test.js.map +1 -0
- package/dist/src/services/compliance/__tests__/subject-data-recipients.generator.test.d.ts +2 -0
- package/dist/src/services/compliance/__tests__/subject-data-recipients.generator.test.d.ts.map +1 -0
- package/dist/src/services/compliance/__tests__/subject-data-recipients.generator.test.js +109 -0
- package/dist/src/services/compliance/__tests__/subject-data-recipients.generator.test.js.map +1 -0
- package/dist/src/services/compliance/data-retention-schedule.generator.d.ts +51 -0
- package/dist/src/services/compliance/data-retention-schedule.generator.d.ts.map +1 -0
- package/dist/src/services/compliance/data-retention-schedule.generator.js +120 -0
- package/dist/src/services/compliance/data-retention-schedule.generator.js.map +1 -0
- package/dist/src/services/compliance/generated-compliance-module-wiring.d.ts +7 -2
- package/dist/src/services/compliance/generated-compliance-module-wiring.d.ts.map +1 -1
- package/dist/src/services/compliance/generated-compliance-module-wiring.js +6 -1
- package/dist/src/services/compliance/generated-compliance-module-wiring.js.map +1 -1
- package/dist/src/services/compliance/subject-data-recipients.generator.d.ts +48 -0
- package/dist/src/services/compliance/subject-data-recipients.generator.d.ts.map +1 -0
- package/dist/src/services/compliance/subject-data-recipients.generator.js +158 -0
- package/dist/src/services/compliance/subject-data-recipients.generator.js.map +1 -0
- package/dist/src/services/context/context-manager.service.d.ts.map +1 -1
- package/dist/src/services/context/context-manager.service.js +1 -0
- package/dist/src/services/context/context-manager.service.js.map +1 -1
- package/dist/src/services/context/context.schemas.d.ts +8 -0
- package/dist/src/services/context/context.schemas.d.ts.map +1 -1
- package/dist/src/services/context/context.schemas.js.map +1 -1
- package/dist/src/services/context/machine-preferences.writer.d.ts +15 -0
- package/dist/src/services/context/machine-preferences.writer.d.ts.map +1 -0
- package/dist/src/services/context/machine-preferences.writer.js +30 -0
- package/dist/src/services/context/machine-preferences.writer.js.map +1 -0
- package/dist/src/services/credentials/__tests__/application-secret-owners.service.test.d.ts +2 -0
- package/dist/src/services/credentials/__tests__/application-secret-owners.service.test.d.ts.map +1 -0
- package/dist/src/services/credentials/__tests__/application-secret-owners.service.test.js +138 -0
- package/dist/src/services/credentials/__tests__/application-secret-owners.service.test.js.map +1 -0
- package/dist/src/services/credentials/__tests__/application-secrets.service.test.d.ts +2 -0
- package/dist/src/services/credentials/__tests__/application-secrets.service.test.d.ts.map +1 -0
- package/dist/src/services/credentials/__tests__/application-secrets.service.test.js +201 -0
- package/dist/src/services/credentials/__tests__/application-secrets.service.test.js.map +1 -0
- package/dist/src/services/credentials/__tests__/ci-secrets-mapping.test.js +42 -0
- package/dist/src/services/credentials/__tests__/ci-secrets-mapping.test.js.map +1 -1
- package/dist/src/services/credentials/__tests__/framework-managed-secrets.test.js +28 -2
- package/dist/src/services/credentials/__tests__/framework-managed-secrets.test.js.map +1 -1
- package/dist/src/services/credentials/__tests__/pem-multiline-normalization.test.d.ts +2 -0
- package/dist/src/services/credentials/__tests__/pem-multiline-normalization.test.d.ts.map +1 -0
- package/dist/src/services/credentials/__tests__/pem-multiline-normalization.test.js +56 -0
- package/dist/src/services/credentials/__tests__/pem-multiline-normalization.test.js.map +1 -0
- package/dist/src/services/credentials/__tests__/provider-contribution-registration.guard.test.js +5 -4
- package/dist/src/services/credentials/__tests__/provider-contribution-registration.guard.test.js.map +1 -1
- package/dist/src/services/credentials/__tests__/remote-secrets-store.service.test.d.ts +2 -0
- package/dist/src/services/credentials/__tests__/remote-secrets-store.service.test.d.ts.map +1 -0
- package/dist/src/services/credentials/__tests__/remote-secrets-store.service.test.js +113 -0
- package/dist/src/services/credentials/__tests__/remote-secrets-store.service.test.js.map +1 -0
- package/dist/src/services/credentials/__tests__/secret-requirements.service.test.d.ts +2 -0
- package/dist/src/services/credentials/__tests__/secret-requirements.service.test.d.ts.map +1 -0
- package/dist/src/services/credentials/__tests__/secret-requirements.service.test.js +271 -0
- package/dist/src/services/credentials/__tests__/secret-requirements.service.test.js.map +1 -0
- package/dist/src/services/credentials/__tests__/secrets-section-ownership.test.js +2 -1
- package/dist/src/services/credentials/__tests__/secrets-section-ownership.test.js.map +1 -1
- package/dist/src/services/credentials/application-secret-owners.service.d.ts +55 -0
- package/dist/src/services/credentials/application-secret-owners.service.d.ts.map +1 -0
- package/dist/src/services/credentials/application-secret-owners.service.js +238 -0
- package/dist/src/services/credentials/application-secret-owners.service.js.map +1 -0
- package/dist/src/services/credentials/application-secrets.service.d.ts +93 -0
- package/dist/src/services/credentials/application-secrets.service.d.ts.map +1 -0
- package/dist/src/services/credentials/application-secrets.service.js +314 -0
- package/dist/src/services/credentials/application-secrets.service.js.map +1 -0
- package/dist/src/services/credentials/ci-secrets-adapter.service.d.ts +35 -4
- package/dist/src/services/credentials/ci-secrets-adapter.service.d.ts.map +1 -1
- package/dist/src/services/credentials/ci-secrets-adapter.service.js +98 -8
- package/dist/src/services/credentials/ci-secrets-adapter.service.js.map +1 -1
- package/dist/src/services/credentials/composed-provider-catalogue.d.ts +16 -3
- package/dist/src/services/credentials/composed-provider-catalogue.d.ts.map +1 -1
- package/dist/src/services/credentials/composed-provider-catalogue.js +6 -3
- package/dist/src/services/credentials/composed-provider-catalogue.js.map +1 -1
- package/dist/src/services/credentials/credentials.schemas.d.ts +2 -6
- package/dist/src/services/credentials/credentials.schemas.d.ts.map +1 -1
- package/dist/src/services/credentials/credentials.schemas.js +33 -0
- package/dist/src/services/credentials/credentials.schemas.js.map +1 -1
- package/dist/src/services/credentials/framework-managed-secrets.d.ts +16 -1
- package/dist/src/services/credentials/framework-managed-secrets.d.ts.map +1 -1
- package/dist/src/services/credentials/framework-managed-secrets.js +50 -1
- package/dist/src/services/credentials/framework-managed-secrets.js.map +1 -1
- package/dist/src/services/credentials/local-secrets-store.service.d.ts +59 -0
- package/dist/src/services/credentials/local-secrets-store.service.d.ts.map +1 -0
- package/dist/src/services/credentials/local-secrets-store.service.js +87 -0
- package/dist/src/services/credentials/local-secrets-store.service.js.map +1 -0
- package/dist/src/services/credentials/provider-env-vars.utils.d.ts +12 -38
- package/dist/src/services/credentials/provider-env-vars.utils.d.ts.map +1 -1
- package/dist/src/services/credentials/provider-env-vars.utils.js +15 -136
- package/dist/src/services/credentials/provider-env-vars.utils.js.map +1 -1
- package/dist/src/services/credentials/provider-secret-format.d.ts +3 -0
- package/dist/src/services/credentials/provider-secret-format.d.ts.map +1 -0
- package/dist/src/services/credentials/provider-secret-format.js +24 -0
- package/dist/src/services/credentials/provider-secret-format.js.map +1 -0
- package/dist/src/services/credentials/remote-secrets-store.service.d.ts +38 -0
- package/dist/src/services/credentials/remote-secrets-store.service.d.ts.map +1 -0
- package/dist/src/services/credentials/remote-secrets-store.service.js +115 -0
- package/dist/src/services/credentials/remote-secrets-store.service.js.map +1 -0
- package/dist/src/services/credentials/secret-requirements.service.d.ts +196 -0
- package/dist/src/services/credentials/secret-requirements.service.d.ts.map +1 -0
- package/dist/src/services/credentials/secret-requirements.service.js +402 -0
- package/dist/src/services/credentials/secret-requirements.service.js.map +1 -0
- package/dist/src/services/credentials/secrets-reader.service.d.ts +5 -0
- package/dist/src/services/credentials/secrets-reader.service.d.ts.map +1 -1
- package/dist/src/services/credentials/secrets-reader.service.js +6 -1
- package/dist/src/services/credentials/secrets-reader.service.js.map +1 -1
- package/dist/src/services/credentials/secrets-rotation.service.d.ts.map +1 -1
- package/dist/src/services/credentials/secrets-rotation.service.js +3 -0
- package/dist/src/services/credentials/secrets-rotation.service.js.map +1 -1
- package/dist/src/services/data-services/data-services.schemas.d.ts +15 -15
- package/dist/src/services/data-services/data-services.schemas.js +15 -15
- package/dist/src/services/data-services/data-services.schemas.js.map +1 -1
- package/dist/src/services/deployment/__tests__/ci-workflow-cluster-ownership.test.js +4 -0
- package/dist/src/services/deployment/__tests__/ci-workflow-cluster-ownership.test.js.map +1 -1
- package/dist/src/services/deployment/__tests__/ci-workflow-generator.service.test.js +45 -0
- package/dist/src/services/deployment/__tests__/ci-workflow-generator.service.test.js.map +1 -1
- package/dist/src/services/deployment/__tests__/coding-agent-login-check.test.d.ts +2 -0
- package/dist/src/services/deployment/__tests__/coding-agent-login-check.test.d.ts.map +1 -0
- package/dist/src/services/deployment/__tests__/coding-agent-login-check.test.js +47 -0
- package/dist/src/services/deployment/__tests__/coding-agent-login-check.test.js.map +1 -0
- package/dist/src/services/deployment/__tests__/deployment-template-contracts.test.js +32 -0
- package/dist/src/services/deployment/__tests__/deployment-template-contracts.test.js.map +1 -1
- package/dist/src/services/deployment/__tests__/local-runtime-process-cleanup.service.test.js +41 -1
- package/dist/src/services/deployment/__tests__/local-runtime-process-cleanup.service.test.js.map +1 -1
- package/dist/src/services/deployment/__tests__/platform-service-memory.test.d.ts +2 -0
- package/dist/src/services/deployment/__tests__/platform-service-memory.test.d.ts.map +1 -0
- package/dist/src/services/deployment/__tests__/platform-service-memory.test.js +88 -0
- package/dist/src/services/deployment/__tests__/platform-service-memory.test.js.map +1 -0
- package/dist/src/services/deployment/ci-workflow-generator.service.d.ts +7 -2
- package/dist/src/services/deployment/ci-workflow-generator.service.d.ts.map +1 -1
- package/dist/src/services/deployment/ci-workflow-generator.service.js +7 -4
- package/dist/src/services/deployment/ci-workflow-generator.service.js.map +1 -1
- package/dist/src/services/deployment/docker/__tests__/backing-service-health-watch.test.js +74 -4
- package/dist/src/services/deployment/docker/__tests__/backing-service-health-watch.test.js.map +1 -1
- package/dist/src/services/deployment/docker/__tests__/docker-compose-generator.service.test.js +19 -15
- package/dist/src/services/deployment/docker/__tests__/docker-compose-generator.service.test.js.map +1 -1
- package/dist/src/services/deployment/docker/__tests__/local-data-adoption.service.test.js +22 -0
- package/dist/src/services/deployment/docker/__tests__/local-data-adoption.service.test.js.map +1 -1
- package/dist/src/services/deployment/docker/backing-service-health-watch.d.ts +15 -0
- package/dist/src/services/deployment/docker/backing-service-health-watch.d.ts.map +1 -1
- package/dist/src/services/deployment/docker/backing-service-health-watch.js +78 -2
- package/dist/src/services/deployment/docker/backing-service-health-watch.js.map +1 -1
- package/dist/src/services/deployment/docker/compose-service-health.d.ts +10 -0
- package/dist/src/services/deployment/docker/compose-service-health.d.ts.map +1 -1
- package/dist/src/services/deployment/docker/compose-service-health.js +25 -0
- package/dist/src/services/deployment/docker/compose-service-health.js.map +1 -1
- package/dist/src/services/deployment/docker/docker-compose-generator.service.d.ts +28 -0
- 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 +69 -34
- package/dist/src/services/deployment/docker/docker-compose-generator.service.js.map +1 -1
- package/dist/src/services/deployment/docker/docker.service.d.ts +17 -0
- package/dist/src/services/deployment/docker/docker.service.d.ts.map +1 -1
- package/dist/src/services/deployment/docker/docker.service.js +50 -0
- package/dist/src/services/deployment/docker/docker.service.js.map +1 -1
- package/dist/src/services/deployment/docker/local-data-adoption.service.d.ts +2 -0
- package/dist/src/services/deployment/docker/local-data-adoption.service.d.ts.map +1 -1
- package/dist/src/services/deployment/docker/local-data-adoption.service.js +9 -8
- package/dist/src/services/deployment/docker/local-data-adoption.service.js.map +1 -1
- package/dist/src/services/deployment/k8s/__tests__/cluster-controller-charts.test.d.ts +2 -0
- package/dist/src/services/deployment/k8s/__tests__/cluster-controller-charts.test.d.ts.map +1 -0
- package/dist/src/services/deployment/k8s/__tests__/cluster-controller-charts.test.js +81 -0
- package/dist/src/services/deployment/k8s/__tests__/cluster-controller-charts.test.js.map +1 -0
- package/dist/src/services/deployment/k8s/__tests__/k8s-manifest-generator.service.test.js +15 -16
- package/dist/src/services/deployment/k8s/__tests__/k8s-manifest-generator.service.test.js.map +1 -1
- package/dist/src/services/deployment/k8s/__tests__/k8s-secrets-generator.service.test.js +28 -16
- package/dist/src/services/deployment/k8s/__tests__/k8s-secrets-generator.service.test.js.map +1 -1
- package/dist/src/services/deployment/k8s/cluster-controller-charts.constants.d.ts +39 -0
- package/dist/src/services/deployment/k8s/cluster-controller-charts.constants.d.ts.map +1 -0
- package/dist/src/services/deployment/k8s/cluster-controller-charts.constants.js +39 -0
- package/dist/src/services/deployment/k8s/cluster-controller-charts.constants.js.map +1 -0
- package/dist/src/services/deployment/k8s/k8s-bootstrap.service.d.ts.map +1 -1
- package/dist/src/services/deployment/k8s/k8s-bootstrap.service.js +8 -4
- package/dist/src/services/deployment/k8s/k8s-bootstrap.service.js.map +1 -1
- package/dist/src/services/deployment/k8s/k8s-manifest-generator.service.d.ts +1 -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 +18 -7
- 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 +24 -4
- package/dist/src/services/deployment/k8s/k8s-manifest.schemas.d.ts.map +1 -1
- package/dist/src/services/deployment/k8s/k8s-manifest.schemas.js +20 -4
- 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 +6 -5
- package/dist/src/services/deployment/k8s/k8s-secrets-generator.service.js.map +1 -1
- package/dist/src/services/deployment/local-precondition-checks.service.d.ts +15 -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 +48 -0
- package/dist/src/services/deployment/local-precondition-checks.service.js.map +1 -1
- package/dist/src/services/deployment/local-runtime-process-cleanup.service.d.ts +22 -1
- package/dist/src/services/deployment/local-runtime-process-cleanup.service.d.ts.map +1 -1
- package/dist/src/services/deployment/local-runtime-process-cleanup.service.js +58 -6
- package/dist/src/services/deployment/local-runtime-process-cleanup.service.js.map +1 -1
- package/dist/src/services/environment/__tests__/env-vars-builder.service.test.js +156 -5
- package/dist/src/services/environment/__tests__/env-vars-builder.service.test.js.map +1 -1
- package/dist/src/services/environment/__tests__/environment-lifecycle.self-hosts-backing-service.test.js +6 -14
- package/dist/src/services/environment/__tests__/environment-lifecycle.self-hosts-backing-service.test.js.map +1 -1
- package/dist/src/services/environment/__tests__/environment-setup.non-interactive.test.js +14 -2
- package/dist/src/services/environment/__tests__/environment-setup.non-interactive.test.js.map +1 -1
- package/dist/src/services/environment/application-backing-service-addressing.utils.d.ts +19 -1
- package/dist/src/services/environment/application-backing-service-addressing.utils.d.ts.map +1 -1
- package/dist/src/services/environment/application-backing-service-addressing.utils.js +32 -1
- package/dist/src/services/environment/application-backing-service-addressing.utils.js.map +1 -1
- package/dist/src/services/environment/env-configuration-generator.service.d.ts +5 -7
- package/dist/src/services/environment/env-configuration-generator.service.d.ts.map +1 -1
- package/dist/src/services/environment/env-configuration-generator.service.js.map +1 -1
- package/dist/src/services/environment/env-vars-builder.service.d.ts +10 -4
- package/dist/src/services/environment/env-vars-builder.service.d.ts.map +1 -1
- package/dist/src/services/environment/env-vars-builder.service.js +201 -24
- package/dist/src/services/environment/env-vars-builder.service.js.map +1 -1
- package/dist/src/services/environment/environment-lifecycle.service.d.ts +8 -4
- package/dist/src/services/environment/environment-lifecycle.service.d.ts.map +1 -1
- package/dist/src/services/environment/environment-lifecycle.service.js +8 -6
- package/dist/src/services/environment/environment-lifecycle.service.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 +23 -10
- package/dist/src/services/environment/environment-setup.service.js.map +1 -1
- package/dist/src/services/framework/__tests__/application-claude-settings.test.d.ts +2 -0
- package/dist/src/services/framework/__tests__/application-claude-settings.test.d.ts.map +1 -0
- package/dist/src/services/framework/__tests__/application-claude-settings.test.js +174 -0
- package/dist/src/services/framework/__tests__/application-claude-settings.test.js.map +1 -0
- package/dist/src/services/framework/__tests__/claude-plugin-authored-commands.test.d.ts +2 -0
- package/dist/src/services/framework/__tests__/claude-plugin-authored-commands.test.d.ts.map +1 -0
- package/dist/src/services/framework/__tests__/claude-plugin-authored-commands.test.js +152 -0
- package/dist/src/services/framework/__tests__/claude-plugin-authored-commands.test.js.map +1 -0
- package/dist/src/services/framework/__tests__/claude-plugin-compiler.test.d.ts +2 -0
- package/dist/src/services/framework/__tests__/claude-plugin-compiler.test.d.ts.map +1 -0
- package/dist/src/services/framework/__tests__/claude-plugin-compiler.test.js +81 -0
- package/dist/src/services/framework/__tests__/claude-plugin-compiler.test.js.map +1 -0
- package/dist/src/services/framework/__tests__/claude-plugin-validate.test.d.ts +2 -0
- package/dist/src/services/framework/__tests__/claude-plugin-validate.test.d.ts.map +1 -0
- package/dist/src/services/framework/__tests__/claude-plugin-validate.test.js +66 -0
- package/dist/src/services/framework/__tests__/claude-plugin-validate.test.js.map +1 -0
- package/dist/src/services/framework/__tests__/framework-knowledge-audit.service.test.js +57 -0
- package/dist/src/services/framework/__tests__/framework-knowledge-audit.service.test.js.map +1 -1
- package/dist/src/services/framework/__tests__/framework-knowledge-generation.service.test.js +8 -0
- package/dist/src/services/framework/__tests__/framework-knowledge-generation.service.test.js.map +1 -1
- package/dist/src/services/framework/__tests__/framework-publish-manifest.service.test.js +18 -1
- package/dist/src/services/framework/__tests__/framework-publish-manifest.service.test.js.map +1 -1
- package/dist/src/services/framework/__tests__/framework-update.service.test.js +24 -1
- package/dist/src/services/framework/__tests__/framework-update.service.test.js.map +1 -1
- package/dist/src/services/framework/__tests__/knowledge-skill-invocability.test.d.ts +2 -0
- package/dist/src/services/framework/__tests__/knowledge-skill-invocability.test.d.ts.map +1 -0
- package/dist/src/services/framework/__tests__/knowledge-skill-invocability.test.js +20 -0
- package/dist/src/services/framework/__tests__/knowledge-skill-invocability.test.js.map +1 -0
- package/dist/src/services/framework/application-claude-settings.d.ts +141 -0
- package/dist/src/services/framework/application-claude-settings.d.ts.map +1 -0
- package/dist/src/services/framework/application-claude-settings.js +284 -0
- package/dist/src/services/framework/application-claude-settings.js.map +1 -0
- package/dist/src/services/framework/claude-plugin-compiler.d.ts +16 -0
- package/dist/src/services/framework/claude-plugin-compiler.d.ts.map +1 -0
- package/dist/src/services/framework/claude-plugin-compiler.js +179 -0
- package/dist/src/services/framework/claude-plugin-compiler.js.map +1 -0
- package/dist/src/services/framework/framework-development-skills-sync.service.d.ts +7 -0
- package/dist/src/services/framework/framework-development-skills-sync.service.d.ts.map +1 -1
- package/dist/src/services/framework/framework-development-skills-sync.service.js +16 -0
- package/dist/src/services/framework/framework-development-skills-sync.service.js.map +1 -1
- package/dist/src/services/framework/framework-knowledge-audit.service.d.ts +13 -1
- package/dist/src/services/framework/framework-knowledge-audit.service.d.ts.map +1 -1
- package/dist/src/services/framework/framework-knowledge-audit.service.js +36 -6
- package/dist/src/services/framework/framework-knowledge-audit.service.js.map +1 -1
- package/dist/src/services/framework/framework-knowledge-generation.service.d.ts +16 -0
- package/dist/src/services/framework/framework-knowledge-generation.service.d.ts.map +1 -1
- package/dist/src/services/framework/framework-knowledge-generation.service.js +43 -6
- package/dist/src/services/framework/framework-knowledge-generation.service.js.map +1 -1
- package/dist/src/services/framework/framework-knowledge-scan.constants.d.ts +1 -1
- package/dist/src/services/framework/framework-knowledge-scan.constants.d.ts.map +1 -1
- package/dist/src/services/framework/framework-knowledge-scan.constants.js +12 -0
- package/dist/src/services/framework/framework-knowledge-scan.constants.js.map +1 -1
- package/dist/src/services/framework/framework-publish-manifest.service.d.ts +13 -0
- package/dist/src/services/framework/framework-publish-manifest.service.d.ts.map +1 -1
- package/dist/src/services/framework/framework-publish-manifest.service.js +23 -5
- package/dist/src/services/framework/framework-publish-manifest.service.js.map +1 -1
- package/dist/src/services/framework/framework-update.service.d.ts +35 -5
- package/dist/src/services/framework/framework-update.service.d.ts.map +1 -1
- package/dist/src/services/framework/framework-update.service.js +41 -6
- package/dist/src/services/framework/framework-update.service.js.map +1 -1
- package/dist/src/services/framework/frontend-component-catalog.generator.d.ts.map +1 -1
- package/dist/src/services/framework/frontend-component-catalog.generator.js +2 -0
- package/dist/src/services/framework/frontend-component-catalog.generator.js.map +1 -1
- package/dist/src/services/framework/package-install.service.d.ts +6 -0
- package/dist/src/services/framework/package-install.service.d.ts.map +1 -0
- package/dist/src/services/framework/package-install.service.js +18 -0
- package/dist/src/services/framework/package-install.service.js.map +1 -0
- package/dist/src/services/framework/provider-transposition/__tests__/compliance-profile-emission.test.d.ts +2 -0
- package/dist/src/services/framework/provider-transposition/__tests__/compliance-profile-emission.test.d.ts.map +1 -0
- package/dist/src/services/framework/provider-transposition/__tests__/compliance-profile-emission.test.js +95 -0
- package/dist/src/services/framework/provider-transposition/__tests__/compliance-profile-emission.test.js.map +1 -0
- package/dist/src/services/framework/provider-transposition/__tests__/connection-derived-operation-host.test.d.ts +2 -0
- package/dist/src/services/framework/provider-transposition/__tests__/connection-derived-operation-host.test.d.ts.map +1 -0
- package/dist/src/services/framework/provider-transposition/__tests__/connection-derived-operation-host.test.js +255 -0
- package/dist/src/services/framework/provider-transposition/__tests__/connection-derived-operation-host.test.js.map +1 -0
- package/dist/src/services/framework/provider-transposition/__tests__/frontend-facet-emission.test.d.ts +2 -0
- package/dist/src/services/framework/provider-transposition/__tests__/frontend-facet-emission.test.d.ts.map +1 -0
- package/dist/src/services/framework/provider-transposition/__tests__/frontend-facet-emission.test.js +114 -0
- package/dist/src/services/framework/provider-transposition/__tests__/frontend-facet-emission.test.js.map +1 -0
- package/dist/src/services/framework/provider-transposition/__tests__/oauth2-endpoint-host-allowances.test.js +2 -0
- package/dist/src/services/framework/provider-transposition/__tests__/oauth2-endpoint-host-allowances.test.js.map +1 -1
- package/dist/src/services/framework/provider-transposition/__tests__/oauth2-scope-placeholders-and-deployment-hosts.test.js +8 -0
- package/dist/src/services/framework/provider-transposition/__tests__/oauth2-scope-placeholders-and-deployment-hosts.test.js.map +1 -1
- package/dist/src/services/framework/provider-transposition/__tests__/plan-matches-emit.test.js +12 -5
- package/dist/src/services/framework/provider-transposition/__tests__/plan-matches-emit.test.js.map +1 -1
- package/dist/src/services/framework/provider-transposition/__tests__/systems-of-record-door-withdrawn.test.d.ts +2 -0
- package/dist/src/services/framework/provider-transposition/__tests__/systems-of-record-door-withdrawn.test.d.ts.map +1 -0
- package/dist/src/services/framework/provider-transposition/__tests__/systems-of-record-door-withdrawn.test.js +48 -0
- package/dist/src/services/framework/provider-transposition/__tests__/systems-of-record-door-withdrawn.test.js.map +1 -0
- package/dist/src/services/framework/provider-transposition/__tests__/vendor-grouping-and-engine-augmentation.test.d.ts +2 -0
- package/dist/src/services/framework/provider-transposition/__tests__/vendor-grouping-and-engine-augmentation.test.d.ts.map +1 -0
- package/dist/src/services/framework/provider-transposition/__tests__/vendor-grouping-and-engine-augmentation.test.js +221 -0
- package/dist/src/services/framework/provider-transposition/__tests__/vendor-grouping-and-engine-augmentation.test.js.map +1 -0
- package/dist/src/services/framework/provider-transposition/__tests__/vendor-unsupported-connection-values.test.d.ts +2 -0
- package/dist/src/services/framework/provider-transposition/__tests__/vendor-unsupported-connection-values.test.d.ts.map +1 -0
- package/dist/src/services/framework/provider-transposition/__tests__/vendor-unsupported-connection-values.test.js +144 -0
- package/dist/src/services/framework/provider-transposition/__tests__/vendor-unsupported-connection-values.test.js.map +1 -0
- package/dist/src/services/framework/provider-transposition/activepieces-source.reader.d.ts.map +1 -1
- package/dist/src/services/framework/provider-transposition/activepieces-source.reader.js +287 -33
- package/dist/src/services/framework/provider-transposition/activepieces-source.reader.js.map +1 -1
- package/dist/src/services/framework/provider-transposition/openapi-enrichment.d.ts +1 -1
- package/dist/src/services/framework/provider-transposition/openapi-enrichment.js.map +1 -1
- package/dist/src/services/framework/provider-transposition/provider-catalogue-record.d.ts +197 -4
- package/dist/src/services/framework/provider-transposition/provider-catalogue-record.d.ts.map +1 -1
- package/dist/src/services/framework/provider-transposition/provider-catalogue-record.js +158 -3
- package/dist/src/services/framework/provider-transposition/provider-catalogue-record.js.map +1 -1
- package/dist/src/services/framework/provider-transposition/provider-merge.d.ts.map +1 -1
- package/dist/src/services/framework/provider-transposition/provider-merge.js +63 -1
- package/dist/src/services/framework/provider-transposition/provider-merge.js.map +1 -1
- package/dist/src/services/framework/provider-transposition/provider-package.emitter.d.ts +172 -21
- package/dist/src/services/framework/provider-transposition/provider-package.emitter.d.ts.map +1 -1
- package/dist/src/services/framework/provider-transposition/provider-package.emitter.js +796 -143
- package/dist/src/services/framework/provider-transposition/provider-package.emitter.js.map +1 -1
- package/dist/src/services/framework/provider-transposition/request-helper-url.d.ts +15 -0
- package/dist/src/services/framework/provider-transposition/request-helper-url.d.ts.map +1 -1
- package/dist/src/services/framework/provider-transposition/request-helper-url.js +32 -0
- package/dist/src/services/framework/provider-transposition/request-helper-url.js.map +1 -1
- package/dist/src/services/framework/provider-transposition/source-static-evaluator.d.ts +9 -3
- package/dist/src/services/framework/provider-transposition/source-static-evaluator.d.ts.map +1 -1
- package/dist/src/services/framework/provider-transposition/source-static-evaluator.js +45 -4
- package/dist/src/services/framework/provider-transposition/source-static-evaluator.js.map +1 -1
- package/dist/src/services/framework/provider-transposition/transposed-provider.model.d.ts +44 -0
- package/dist/src/services/framework/provider-transposition/transposed-provider.model.d.ts.map +1 -1
- package/dist/src/services/framework/provider-transposition/transposed-provider.model.js.map +1 -1
- package/dist/src/services/framework/provider-transposition/url-template.extractor.d.ts +7 -0
- package/dist/src/services/framework/provider-transposition/url-template.extractor.d.ts.map +1 -1
- package/dist/src/services/framework/provider-transposition/url-template.extractor.js.map +1 -1
- package/dist/src/services/registry/__tests__/boundary-fanout.utils.test.d.ts +2 -0
- package/dist/src/services/registry/__tests__/boundary-fanout.utils.test.d.ts.map +1 -0
- package/dist/src/services/registry/__tests__/boundary-fanout.utils.test.js +85 -0
- package/dist/src/services/registry/__tests__/boundary-fanout.utils.test.js.map +1 -0
- package/dist/src/services/registry/__tests__/git-ignored-paths.utils.test.d.ts +2 -0
- package/dist/src/services/registry/__tests__/git-ignored-paths.utils.test.d.ts.map +1 -0
- package/dist/src/services/registry/__tests__/git-ignored-paths.utils.test.js +159 -0
- package/dist/src/services/registry/__tests__/git-ignored-paths.utils.test.js.map +1 -0
- package/dist/src/services/registry/__tests__/local-checkout-module-source.service.test.d.ts +8 -0
- package/dist/src/services/registry/__tests__/local-checkout-module-source.service.test.d.ts.map +1 -0
- package/dist/src/services/registry/__tests__/local-checkout-module-source.service.test.js +148 -0
- package/dist/src/services/registry/__tests__/local-checkout-module-source.service.test.js.map +1 -0
- package/dist/src/services/registry/__tests__/module-acquisition.utils.test.d.ts +2 -0
- package/dist/src/services/registry/__tests__/module-acquisition.utils.test.d.ts.map +1 -0
- package/dist/src/services/registry/__tests__/module-acquisition.utils.test.js +50 -0
- package/dist/src/services/registry/__tests__/module-acquisition.utils.test.js.map +1 -0
- package/dist/src/services/registry/__tests__/module-registration.service.test.d.ts +2 -0
- package/dist/src/services/registry/__tests__/module-registration.service.test.d.ts.map +1 -0
- package/dist/src/services/registry/__tests__/module-registration.service.test.js +302 -0
- package/dist/src/services/registry/__tests__/module-registration.service.test.js.map +1 -0
- package/dist/src/services/registry/__tests__/provider-module-checks.service.test.d.ts +2 -0
- package/dist/src/services/registry/__tests__/provider-module-checks.service.test.d.ts.map +1 -0
- package/dist/src/services/registry/__tests__/provider-module-checks.service.test.js +68 -0
- package/dist/src/services/registry/__tests__/provider-module-checks.service.test.js.map +1 -0
- package/dist/src/services/registry/__tests__/provider-module-identity.service.test.d.ts +2 -0
- package/dist/src/services/registry/__tests__/provider-module-identity.service.test.d.ts.map +1 -0
- package/dist/src/services/registry/__tests__/provider-module-identity.service.test.js +91 -0
- package/dist/src/services/registry/__tests__/provider-module-identity.service.test.js.map +1 -0
- package/dist/src/services/registry/__tests__/registry-config-resolver.service.test.d.ts +2 -0
- package/dist/src/services/registry/__tests__/registry-config-resolver.service.test.d.ts.map +1 -0
- package/dist/src/services/registry/__tests__/registry-config-resolver.service.test.js +67 -0
- package/dist/src/services/registry/__tests__/registry-config-resolver.service.test.js.map +1 -0
- package/dist/src/services/registry/artifact-trust.utils.d.ts +43 -0
- package/dist/src/services/registry/artifact-trust.utils.d.ts.map +1 -0
- package/dist/src/services/registry/artifact-trust.utils.js +46 -0
- package/dist/src/services/registry/artifact-trust.utils.js.map +1 -0
- package/dist/src/services/registry/boundary-fanout.utils.d.ts +52 -1
- package/dist/src/services/registry/boundary-fanout.utils.d.ts.map +1 -1
- package/dist/src/services/registry/boundary-fanout.utils.js +128 -31
- package/dist/src/services/registry/boundary-fanout.utils.js.map +1 -1
- package/dist/src/services/registry/git-ignored-paths.utils.d.ts +66 -0
- package/dist/src/services/registry/git-ignored-paths.utils.d.ts.map +1 -0
- package/dist/src/services/registry/git-ignored-paths.utils.js +175 -0
- package/dist/src/services/registry/git-ignored-paths.utils.js.map +1 -0
- package/dist/src/services/registry/installed-file-state.utils.d.ts +137 -0
- package/dist/src/services/registry/installed-file-state.utils.d.ts.map +1 -0
- package/dist/src/services/registry/installed-file-state.utils.js +209 -0
- package/dist/src/services/registry/installed-file-state.utils.js.map +1 -0
- package/dist/src/services/registry/local-checkout-module-source.service.d.ts +83 -0
- package/dist/src/services/registry/local-checkout-module-source.service.d.ts.map +1 -0
- package/dist/src/services/registry/local-checkout-module-source.service.js +227 -0
- package/dist/src/services/registry/local-checkout-module-source.service.js.map +1 -0
- package/dist/src/services/registry/migration-obligation.utils.d.ts +52 -0
- package/dist/src/services/registry/migration-obligation.utils.d.ts.map +1 -0
- package/dist/src/services/registry/migration-obligation.utils.js +77 -0
- package/dist/src/services/registry/migration-obligation.utils.js.map +1 -0
- package/dist/src/services/registry/module-acquisition.utils.d.ts +46 -0
- package/dist/src/services/registry/module-acquisition.utils.d.ts.map +1 -0
- package/dist/src/services/registry/module-acquisition.utils.js +78 -0
- package/dist/src/services/registry/module-acquisition.utils.js.map +1 -0
- package/dist/src/services/registry/module-artifact-files.utils.d.ts +39 -0
- package/dist/src/services/registry/module-artifact-files.utils.d.ts.map +1 -0
- package/dist/src/services/registry/module-artifact-files.utils.js +57 -0
- package/dist/src/services/registry/module-artifact-files.utils.js.map +1 -0
- package/dist/src/services/registry/module-registration.service.d.ts +171 -0
- package/dist/src/services/registry/module-registration.service.d.ts.map +1 -0
- package/dist/src/services/registry/module-registration.service.js +788 -0
- package/dist/src/services/registry/module-registration.service.js.map +1 -0
- package/dist/src/services/registry/provider-install-step.d.ts +23 -0
- package/dist/src/services/registry/provider-install-step.d.ts.map +1 -0
- package/dist/src/services/registry/provider-install-step.js +21 -0
- package/dist/src/services/registry/provider-install-step.js.map +1 -0
- package/dist/src/services/registry/provider-module-checks.service.d.ts +40 -0
- package/dist/src/services/registry/provider-module-checks.service.d.ts.map +1 -0
- package/dist/src/services/registry/provider-module-checks.service.js +194 -0
- package/dist/src/services/registry/provider-module-checks.service.js.map +1 -0
- package/dist/src/services/registry/provider-module-identity.service.d.ts +20 -0
- package/dist/src/services/registry/provider-module-identity.service.d.ts.map +1 -0
- package/dist/src/services/registry/provider-module-identity.service.js +146 -0
- package/dist/src/services/registry/provider-module-identity.service.js.map +1 -0
- package/dist/src/services/registry/provider-wiring.service.d.ts +49 -0
- package/dist/src/services/registry/provider-wiring.service.d.ts.map +1 -0
- package/dist/src/services/registry/provider-wiring.service.js +164 -0
- package/dist/src/services/registry/provider-wiring.service.js.map +1 -0
- package/dist/src/services/registry/registry-command.utils.d.ts +49 -2
- package/dist/src/services/registry/registry-command.utils.d.ts.map +1 -1
- package/dist/src/services/registry/registry-command.utils.js +75 -2
- package/dist/src/services/registry/registry-command.utils.js.map +1 -1
- package/dist/src/services/registry/registry-config-resolver.service.d.ts +12 -0
- package/dist/src/services/registry/registry-config-resolver.service.d.ts.map +1 -1
- package/dist/src/services/registry/registry-config-resolver.service.js +60 -0
- package/dist/src/services/registry/registry-config-resolver.service.js.map +1 -1
- package/dist/src/services/registry/registry-credentials.service.d.ts.map +1 -1
- package/dist/src/services/registry/registry-credentials.service.js +5 -2
- package/dist/src/services/registry/registry-credentials.service.js.map +1 -1
- package/dist/src/services/security/__tests__/csp-sync.service.test.js +42 -0
- package/dist/src/services/security/__tests__/csp-sync.service.test.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 +5 -9
- package/dist/src/services/security/csp-sync.service.js.map +1 -1
- package/dist/src/services/website/__tests__/website-structured-data-audit.adapter-seam.test.js +24 -1
- package/dist/src/services/website/__tests__/website-structured-data-audit.adapter-seam.test.js.map +1 -1
- package/dist/src/services/website/website-label-pack-audit.service.d.ts +31 -0
- package/dist/src/services/website/website-label-pack-audit.service.d.ts.map +1 -0
- package/dist/src/services/website/website-label-pack-audit.service.js +36 -0
- package/dist/src/services/website/website-label-pack-audit.service.js.map +1 -0
- package/dist/src/services/website/website-structured-data-audit.service.d.ts +10 -0
- package/dist/src/services/website/website-structured-data-audit.service.d.ts.map +1 -1
- package/dist/src/services/website/website-structured-data-audit.service.js +19 -54
- package/dist/src/services/website/website-structured-data-audit.service.js.map +1 -1
- package/dist/src/services/website/website-workspace.service.d.ts +15 -0
- package/dist/src/services/website/website-workspace.service.d.ts.map +1 -0
- package/dist/src/services/website/website-workspace.service.js +26 -0
- package/dist/src/services/website/website-workspace.service.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/framework-root-package.json +7 -1
- package/package.json +24 -18
- package/scripts/app-dependency-alignment/propagated-engine-overrides.json +47 -7
- package/templates/infra/ci/deploy-docker-compose.yml.hbs +9 -0
- package/templates/infra/ci/deploy-k8s.yml.hbs +11 -2
- package/templates/infra/docker-compose/docker-compose.wildo-platform.yml.hbs +48 -14
- package/templates/infra/docker-images/platform/Dockerfile.platform-base +5 -2
- package/templates/infra/k8s/applications/wildo-ai-application/backend.deployment.yaml.hbs +8 -7
- package/templates/infra/k8s/applications/wildo-ai-application/backend.service.yaml.hbs +2 -3
- package/templates/infra/k8s/applications/wildo-ai-application/minion.deployment.yaml.hbs +8 -10
- package/templates/infra/k8s/ingress/traefik/local/values.yaml +17 -12
- package/templates/infra/k8s/ingress/traefik/values.yaml.hbs +35 -15
- package/templates/infra/k8s/internal/immudb/deployment.yaml.hbs +15 -15
- package/templates/infra/k8s/platform/platform-apps-manager/deployment.yaml.hbs +13 -4
- package/templates/infra/k8s/platform/platform-crontabs-batches-manager/deployment.yaml.hbs +13 -4
- package/templates/infra/k8s/platform/platform-module-registry/deployment.yaml.hbs +7 -4
- package/templates/saas/engine-peer-closure.json +15 -3
- package/templates/saas/i18n/email/resources/applicationApiKeys/create.application-administrator/labels.fr.ts +20 -0
- package/templates/saas/i18n/email/resources/applicationApiKeys/deactivate.application-administrator/labels.fr.ts +20 -0
- package/templates/saas/i18n/email/resources/applicationApiKeys/reactivate.application-administrator/labels.fr.ts +20 -0
- package/templates/saas/i18n/email/resources/applicationApiKeys/regenerate.application-administrator/labels.fr.ts +20 -0
- package/templates/saas/i18n/email/resources/applicationApiKeys/rotate.application-administrator/labels.fr.ts +20 -0
- package/templates/saas/i18n/email/resources/applicationOAuthClients/create.application-administrator/labels.fr.ts +21 -0
- package/templates/saas/i18n/email/resources/applicationOAuthClients/regenerate.application-administrator/labels.fr.ts +21 -0
- package/templates/saas/i18n/email/resources/applicationOAuthClients/rotate.application-administrator/labels.fr.ts +21 -0
- package/templates/saas/i18n/email/resources/applicationVersions/create.organization-administrative/labels.fr.ts +23 -0
- package/templates/saas/i18n/email/resources/applicationVersions/delete.organization-administrative/labels.fr.ts +20 -0
- package/templates/saas/i18n/email/resources/applicationVersions/deprecate.organization-administrative/labels.fr.ts +21 -0
- package/templates/saas/i18n/email/resources/applicationVersions/promote.organization-administrative/labels.fr.ts +21 -0
- package/templates/saas/i18n/email/resources/applicationVersions/rollback.organization-administrative/labels.fr.ts +21 -0
- package/templates/saas/i18n/email/resources/applications/create.admin.organization-administrative/labels.fr.ts +21 -0
- package/templates/saas/i18n/email/resources/applications/create.organization-administrative/labels.fr.ts +23 -0
- package/templates/saas/i18n/email/resources/applications/delete.admin.organization-administrative/labels.fr.ts +20 -0
- package/templates/saas/i18n/email/resources/applications/delete.organization-administrative/labels.fr.ts +20 -0
- package/templates/saas/i18n/email/resources/applications/transfer.admin.organization-administrative/labels.fr.ts +21 -0
- package/templates/saas/i18n/email/resources/applications/transfer.organization-administrative/labels.fr.ts +21 -0
- package/templates/saas/i18n/email/resources/applications/update.admin.organization-administrative/labels.fr.ts +21 -0
- package/templates/saas/i18n/email/resources/applications/update.organization-administrative/labels.fr.ts +23 -0
- package/templates/saas/i18n/email/resources/organizationApiKeys/create.admin.organization-administrative/labels.fr.ts +20 -0
- package/templates/saas/i18n/email/resources/organizationApiKeys/create.organization-administrative/labels.fr.ts +20 -0
- package/templates/saas/i18n/email/resources/organizationApiKeys/deactivate.admin.organization-administrative/labels.fr.ts +20 -0
- package/templates/saas/i18n/email/resources/organizationApiKeys/deactivate.organization-administrative/labels.fr.ts +20 -0
- package/templates/saas/i18n/email/resources/organizationApiKeys/delete.admin.organization-administrative/labels.fr.ts +20 -0
- package/templates/saas/i18n/email/resources/organizationApiKeys/delete.organization-administrative/labels.fr.ts +20 -0
- package/templates/saas/i18n/email/resources/organizationApiKeys/reactivate.admin.organization-administrative/labels.fr.ts +20 -0
- package/templates/saas/i18n/email/resources/organizationApiKeys/reactivate.organization-administrative/labels.fr.ts +20 -0
- package/templates/saas/i18n/email/resources/organizationApiKeys/regenerate.admin.organization-administrative/labels.fr.ts +20 -0
- package/templates/saas/i18n/email/resources/organizationApiKeys/regenerate.organization-administrative/labels.fr.ts +20 -0
- package/templates/saas/i18n/email/resources/organizationApiKeys/rotate.admin.organization-administrative/labels.fr.ts +20 -0
- package/templates/saas/i18n/email/resources/organizationApiKeys/rotate.organization-administrative/labels.fr.ts +20 -0
- package/templates/saas/i18n/email/resources/organizationFeatures/disable_feature.organization-users/labels.en.ts +2 -1
- package/templates/saas/i18n/email/resources/organizationFeatures/disable_feature.organization-users/labels.fr.ts +26 -0
- package/templates/saas/i18n/email/resources/organizationFeatures/enable_feature.organization-users/labels.en.ts +2 -1
- package/templates/saas/i18n/email/resources/organizationFeatures/enable_feature.organization-users/labels.fr.ts +26 -0
- package/templates/saas/i18n/email/resources/organizationFeatures/reset_features.organization-administrative/labels.en.ts +2 -1
- package/templates/saas/i18n/email/resources/organizationFeatures/reset_features.organization-administrative/labels.fr.ts +20 -0
- package/templates/saas/i18n/email/resources/organizationFeatures/update.organization-users/labels.en.ts +2 -1
- package/templates/saas/i18n/email/resources/organizationFeatures/update.organization-users/labels.fr.ts +26 -0
- package/templates/saas/i18n/email/resources/organizationMembers/create.user-self/labels.en.ts +2 -1
- package/templates/saas/i18n/email/resources/organizationMembers/create.user-self/labels.fr.ts +25 -0
- package/templates/saas/i18n/email/resources/organizationMembers/delete.organization-users/labels.en.ts +2 -1
- package/templates/saas/i18n/email/resources/organizationMembers/delete.organization-users/labels.fr.ts +24 -0
- package/templates/saas/i18n/email/resources/organizationMembers/grantOwnership.organization-users/labels.en.ts +2 -1
- package/templates/saas/i18n/email/resources/organizationMembers/grantOwnership.organization-users/labels.fr.ts +25 -0
- package/templates/saas/i18n/email/resources/organizationMembers/reactivate.organization-users/labels.en.ts +2 -1
- package/templates/saas/i18n/email/resources/organizationMembers/reactivate.organization-users/labels.fr.ts +24 -0
- package/templates/saas/i18n/email/resources/organizationMembers/{reactivate.user-self → reactivate.users-custom}/labels.en.ts +2 -1
- package/templates/saas/i18n/email/resources/organizationMembers/reactivate.users-custom/labels.fr.ts +22 -0
- package/templates/saas/i18n/email/resources/organizationMembers/resend.user-self/labels.en.ts +2 -1
- package/templates/saas/i18n/email/resources/organizationMembers/resend.user-self/labels.fr.ts +21 -0
- package/templates/saas/i18n/email/resources/organizationMembers/revoke.user-self_admin/labels.en.ts +2 -1
- package/templates/saas/i18n/email/resources/organizationMembers/revoke.user-self_admin/labels.fr.ts +21 -0
- package/templates/saas/i18n/email/resources/organizationMembers/revoke.user-self_invitee/labels.en.ts +2 -1
- package/templates/saas/i18n/email/resources/organizationMembers/revoke.user-self_invitee/labels.fr.ts +20 -0
- package/templates/saas/i18n/email/resources/organizationMembers/suspend.organization-users/labels.en.ts +2 -1
- package/templates/saas/i18n/email/resources/organizationMembers/suspend.organization-users/labels.fr.ts +24 -0
- package/templates/saas/i18n/email/resources/organizationMembers/{suspend.user-self → suspend.users-custom}/labels.en.ts +2 -1
- package/templates/saas/i18n/email/resources/organizationMembers/suspend.users-custom/labels.fr.ts +20 -0
- package/templates/saas/i18n/email/resources/organizationMembers/update.organization-users/labels.en.ts +2 -1
- package/templates/saas/i18n/email/resources/organizationMembers/update.organization-users/labels.fr.ts +24 -0
- package/templates/saas/i18n/email/resources/organizationOAuthClients/create.admin.organization-administrative/labels.fr.ts +21 -0
- package/templates/saas/i18n/email/resources/organizationOAuthClients/create.organization-administrative/labels.fr.ts +21 -0
- package/templates/saas/i18n/email/resources/organizationOAuthClients/delete.admin.organization-administrative/labels.fr.ts +21 -0
- package/templates/saas/i18n/email/resources/organizationOAuthClients/delete.organization-administrative/labels.fr.ts +21 -0
- package/templates/saas/i18n/email/resources/organizationOAuthClients/regenerate.admin.organization-administrative/labels.fr.ts +21 -0
- package/templates/saas/i18n/email/resources/organizationOAuthClients/regenerate.organization-administrative/labels.fr.ts +21 -0
- package/templates/saas/i18n/email/resources/organizationOAuthClients/rotate.admin.organization-administrative/labels.fr.ts +21 -0
- package/templates/saas/i18n/email/resources/organizationOAuthClients/rotate.organization-administrative/labels.fr.ts +21 -0
- package/templates/saas/i18n/email/resources/organizationUnits/archive.organization-administrative/labels.fr.ts +23 -0
- package/templates/saas/i18n/email/resources/organizationUnits/create.organization-administrative/labels.fr.ts +23 -0
- package/templates/saas/i18n/email/resources/organizationUnits/delete.organization-administrative/labels.fr.ts +22 -0
- package/templates/saas/i18n/email/resources/organizationUnits/move.organization-administrative/labels.fr.ts +23 -0
- package/templates/saas/i18n/email/resources/organizationUnits/restore.organization-administrative/labels.fr.ts +21 -0
- package/templates/saas/i18n/email/resources/organizationUnits/update.organization-administrative/labels.fr.ts +23 -0
- package/templates/saas/i18n/email/resources/organizations/activate.organization-administrative/labels.fr.ts +20 -0
- package/templates/saas/i18n/email/resources/organizations/create.admin.user-self/labels.fr.ts +22 -0
- package/templates/saas/i18n/email/resources/organizations/create.user-self/labels.fr.ts +21 -0
- package/templates/saas/i18n/email/resources/organizations/request_deletion.admin.organization-users/labels.fr.ts +21 -0
- package/templates/saas/i18n/email/resources/organizations/request_deletion.organization-users/labels.fr.ts +21 -0
- package/templates/saas/i18n/email/resources/organizations/restore.organization-users/labels.fr.ts +18 -0
- package/templates/saas/i18n/email/resources/organizations/suspend.organization-users/labels.fr.ts +18 -0
- package/templates/saas/i18n/email/resources/organizations/update.admin.organization-administrative/labels.fr.ts +20 -0
- package/templates/saas/i18n/email/resources/organizations/update.organization-administrative/labels.fr.ts +20 -0
- package/templates/saas/i18n/email/resources/platformAccessGrants/requestAccess.organization-users/labels.en.ts +2 -1
- package/templates/saas/i18n/email/resources/platformAccessGrants/requestAccess.organization-users/labels.fr.ts +30 -0
- package/templates/saas/i18n/email/resources/user_self/deactivate_account.user-self/labels.fr.ts +19 -0
- package/templates/saas/i18n/email/resources/user_self/reactivate_account.user-self/labels.fr.ts +19 -0
- package/templates/saas/i18n/email/resources/users/assign_roles.application-administrator/labels.fr.ts +20 -0
- package/templates/saas/i18n/email/resources/users/create.application-administrator/labels.fr.ts +21 -0
- package/templates/saas/i18n/email/resources/users/delete.application-administrator/labels.fr.ts +20 -0
- package/templates/saas/i18n/email/resources/users/force_password_reset.application-administrator/labels.fr.ts +20 -0
- package/templates/saas/i18n/email/resources/users/reactivate_user.application-administrator/labels.en.ts +13 -0
- package/templates/saas/i18n/email/resources/users/reactivate_user.application-administrator/labels.fr.ts +20 -0
- package/templates/saas/i18n/email/resources/users/reactivate_user.application-administrator/template.tsx +50 -0
- package/templates/saas/i18n/email/resources/users/reactivate_user.users-custom/labels.en.ts +14 -0
- package/templates/saas/i18n/email/resources/users/reactivate_user.users-custom/labels.fr.ts +21 -0
- package/templates/saas/i18n/email/resources/users/reactivate_user.users-custom/template.tsx +49 -0
- package/templates/saas/i18n/email/resources/users/revoke_roles.application-administrator/labels.fr.ts +20 -0
- package/templates/saas/i18n/email/resources/users/send_invitation.application-administrator/labels.fr.ts +20 -0
- package/templates/saas/i18n/email/resources/users/suspend_user.application-administrator/labels.fr.ts +20 -0
- package/templates/saas/i18n/email/resources/users/suspend_user.users-custom/labels.en.ts +16 -0
- package/templates/saas/i18n/email/resources/users/suspend_user.users-custom/labels.fr.ts +23 -0
- package/templates/saas/i18n/email/resources/users/suspend_user.users-custom/template.tsx +53 -0
- package/templates/saas/i18n/email/resources/users/unsuspend_user.application-administrator/labels.fr.ts +20 -0
- package/templates/saas/i18n/email/resources/users/unsuspend_user.users-custom/labels.en.ts +14 -0
- package/templates/saas/i18n/email/resources/users/unsuspend_user.users-custom/labels.fr.ts +21 -0
- package/templates/saas/i18n/email/resources/users/unsuspend_user.users-custom/template.tsx +49 -0
- package/templates/saas/i18n/email/resources/users/update.application-administrator/labels.fr.ts +20 -0
- package/templates/saas/i18n/email/system/email-otp/labels.fr.ts +17 -0
- package/templates/saas/i18n/email/system/email-verification/labels.fr.ts +18 -0
- package/templates/saas/i18n/email/system/human-decision-deadline/labels.en.ts +47 -0
- package/templates/saas/i18n/email/system/human-decision-deadline/labels.fr.ts +49 -0
- package/templates/saas/i18n/email/system/human-decision-deadline/template.tsx +80 -0
- package/templates/saas/i18n/email/system/magic-link/labels.fr.ts +17 -0
- package/templates/saas/i18n/email/system/new-device-login/labels.fr.ts +24 -0
- package/templates/saas/i18n/email/system/organization-invitation/labels.fr.ts +21 -0
- package/templates/saas/i18n/email/system/organization-member-removed/labels.fr.ts +20 -0
- package/templates/saas/i18n/email/system/password-reset/labels.fr.ts +17 -0
- package/templates/saas/i18n/email/system/payment-failed/labels.fr.ts +21 -0
- package/templates/saas/i18n/email/system/security-alert/labels.fr.ts +68 -0
- package/templates/saas/i18n/email/system/subscription-cancelled/labels.fr.ts +20 -0
- package/templates/saas/i18n/email/system/subscription-confirmation/labels.fr.ts +21 -0
- package/templates/saas/i18n/email/system/welcome-email/labels.fr.ts +18 -0
- package/templates/saas/i18n/engine/components/APPLICATION_LEVEL_NOTIFICATION_CENTER.en.ts +2 -1
- package/templates/saas/i18n/engine/components/APPLICATION_LEVEL_NOTIFICATION_CENTER.fr.ts +3 -10
- package/templates/saas/i18n/engine/components/APPLICATION_LEVEL_USER_DROPDOWN.en.ts +3 -1
- package/templates/saas/i18n/engine/components/APPLICATION_LEVEL_USER_DROPDOWN.fr.ts +3 -1
- package/templates/saas/i18n/engine/components/APP_LAYOUTS_AGENT_WORK_OVERRIDE_RATE_SETTINGS.en.ts +31 -0
- package/templates/saas/i18n/engine/components/APP_LAYOUTS_AGENT_WORK_OVERRIDE_RATE_SETTINGS.fr.ts +31 -0
- package/templates/saas/i18n/engine/components/APP_LAYOUTS_APPEARANCE_SETTINGS.en.ts +0 -1
- package/templates/saas/i18n/engine/components/APP_LAYOUTS_APPEARANCE_SETTINGS.fr.ts +0 -1
- package/templates/saas/i18n/engine/components/APP_LAYOUTS_BILLING_SETTINGS.en.ts +0 -7
- package/templates/saas/i18n/engine/components/APP_LAYOUTS_BILLING_SETTINGS.fr.ts +0 -7
- package/templates/saas/i18n/engine/components/APP_LAYOUTS_CONNECTED_ACCOUNTS_SETTINGS.en.ts +31 -5
- package/templates/saas/i18n/engine/components/APP_LAYOUTS_CONNECTED_ACCOUNTS_SETTINGS.fr.ts +31 -5
- package/templates/saas/i18n/engine/components/APP_LAYOUTS_INVITATIONS_SETTINGS.en.ts +0 -2
- package/templates/saas/i18n/engine/components/APP_LAYOUTS_INVITATIONS_SETTINGS.fr.ts +0 -2
- package/templates/saas/i18n/engine/components/APP_LAYOUTS_MAIN_CONTAINER.en.ts +6 -1
- package/templates/saas/i18n/engine/components/APP_LAYOUTS_MAIN_CONTAINER.fr.ts +6 -1
- package/templates/saas/i18n/engine/components/APP_LAYOUTS_SECURITY_SETTINGS.en.ts +2 -16
- package/templates/saas/i18n/engine/components/APP_LAYOUTS_SECURITY_SETTINGS.fr.ts +2 -16
- package/templates/saas/i18n/engine/components/LOW_LEVEL_AI_AGENT_CONFIG.en.ts +0 -3
- package/templates/saas/i18n/engine/components/LOW_LEVEL_AI_AGENT_CONFIG.fr.ts +3 -6
- package/templates/saas/i18n/engine/components/LOW_LEVEL_AI_APPROVAL.en.ts +49 -16
- package/templates/saas/i18n/engine/components/LOW_LEVEL_AI_APPROVAL.fr.ts +51 -18
- package/templates/saas/i18n/engine/components/LOW_LEVEL_AI_SYSTEM_CATALOG.en.ts +0 -6
- package/templates/saas/i18n/engine/components/LOW_LEVEL_AI_SYSTEM_CATALOG.fr.ts +6 -12
- package/templates/saas/i18n/engine/components/LOW_LEVEL_BILLING_PLAN_CHANGE_PREVIEW.en.ts +4 -1
- package/templates/saas/i18n/engine/components/LOW_LEVEL_BILLING_PLAN_CHANGE_PREVIEW.fr.ts +4 -1
- package/templates/saas/i18n/engine/components/LOW_LEVEL_BILLING_PRICING_TABLE.en.ts +8 -2
- package/templates/saas/i18n/engine/components/LOW_LEVEL_BILLING_PRICING_TABLE.fr.ts +8 -2
- package/templates/saas/i18n/engine/components/LOW_LEVEL_BILLING_USAGE_DASHBOARD.en.ts +2 -1
- package/templates/saas/i18n/engine/components/LOW_LEVEL_BILLING_USAGE_DASHBOARD.fr.ts +2 -1
- package/templates/saas/i18n/engine/components/LOW_LEVEL_DISPLAY_FIELD_FILE.en.ts +2 -1
- package/templates/saas/i18n/engine/components/LOW_LEVEL_DISPLAY_FIELD_FILE.fr.ts +2 -1
- package/templates/saas/i18n/engine/components/LOW_LEVEL_DISPLAY_FIELD_NUMBER.en.ts +11 -0
- package/templates/saas/i18n/engine/components/LOW_LEVEL_DISPLAY_FIELD_NUMBER.fr.ts +11 -0
- package/templates/saas/i18n/engine/components/LOW_LEVEL_FORM_FIELD.en.ts +2 -1
- package/templates/saas/i18n/engine/components/LOW_LEVEL_FORM_FIELD.fr.ts +2 -1
- package/templates/saas/i18n/engine/components/LOW_LEVEL_FORM_FIELD_ADDRESS.en.ts +11 -1
- package/templates/saas/i18n/engine/components/LOW_LEVEL_FORM_FIELD_ADDRESS.fr.ts +11 -1
- package/templates/saas/i18n/engine/components/LOW_LEVEL_FORM_FIELD_FILE.en.ts +9 -1
- package/templates/saas/i18n/engine/components/LOW_LEVEL_FORM_FIELD_FILE.fr.ts +9 -1
- package/templates/saas/i18n/engine/components/LOW_LEVEL_FORM_FIELD_STRING.en.ts +4 -1
- package/templates/saas/i18n/engine/components/LOW_LEVEL_FORM_FIELD_STRING.fr.ts +4 -1
- package/templates/saas/i18n/engine/components/RESOURCES_LAYOUTS_LIST.en.ts +3 -2
- package/templates/saas/i18n/engine/components/RESOURCES_LAYOUTS_LIST.fr.ts +4 -3
- package/templates/saas/i18n/engine/components/RESOURCES_LAYOUTS_OPERATIONS_BULK.en.ts +7 -1
- package/templates/saas/i18n/engine/components/RESOURCES_LAYOUTS_OPERATIONS_BULK.fr.ts +7 -1
- package/templates/saas/i18n/engine/components/RESOURCES_LAYOUTS_OPERATIONS_ITEMS.en.ts +2 -1
- package/templates/saas/i18n/engine/components/RESOURCES_LAYOUTS_OPERATIONS_ITEMS.fr.ts +2 -1
- package/templates/saas/i18n/engine/components/progression_milestone_tracker.en.ts +0 -2
- package/templates/saas/i18n/engine/components/progression_milestone_tracker.fr.ts +3 -5
- package/templates/saas/i18n/engine/resources/agentWorkCaptureSettings.en.ts +115 -0
- package/templates/saas/i18n/engine/resources/agentWorkCaptureSettings.fr.ts +115 -0
- package/templates/saas/i18n/engine/resources/anonymous_users.en.ts +86 -77
- package/templates/saas/i18n/engine/resources/anonymous_users.fr.ts +20 -11
- package/templates/saas/i18n/engine/resources/applicationA2aPushDeliveryLog.en.ts +6 -68
- package/templates/saas/i18n/engine/resources/applicationA2aPushDeliveryLog.fr.ts +1 -63
- package/templates/saas/i18n/engine/resources/applicationA2aTokenBudgetState.en.ts +16 -70
- package/templates/saas/i18n/engine/resources/applicationA2aTokenBudgetState.fr.ts +1 -55
- package/templates/saas/i18n/engine/resources/applicationAccessGrants.en.ts +19 -37
- package/templates/saas/i18n/engine/resources/applicationAccessGrants.fr.ts +11 -29
- package/templates/saas/i18n/engine/resources/applicationAgentWorkDecisionContents.en.ts +182 -0
- package/templates/saas/i18n/engine/resources/applicationAgentWorkDecisionContents.fr.ts +182 -0
- package/templates/saas/i18n/engine/resources/applicationAgentWorkDecisions.en.ts +334 -0
- package/templates/saas/i18n/engine/resources/applicationAgentWorkDecisions.fr.ts +334 -0
- package/templates/saas/i18n/engine/resources/applicationApiKeys.en.ts +64 -75
- package/templates/saas/i18n/engine/resources/applicationApiKeys.fr.ts +31 -42
- package/templates/saas/i18n/engine/resources/applicationAuditLogs.en.ts +116 -16
- package/templates/saas/i18n/engine/resources/applicationAuditLogs.fr.ts +108 -8
- package/templates/saas/i18n/engine/resources/applicationFeatures.en.ts +53 -97
- package/templates/saas/i18n/engine/resources/applicationFeatures.fr.ts +2 -46
- package/templates/saas/i18n/engine/resources/applicationFlowActorExecutions.en.ts +346 -32
- package/templates/saas/i18n/engine/resources/applicationFlowActorExecutions.fr.ts +348 -34
- package/templates/saas/i18n/engine/resources/applicationFlowActorTasks.en.ts +6 -67
- package/templates/saas/i18n/engine/resources/applicationFlowActorTasks.fr.ts +1 -62
- package/templates/saas/i18n/engine/resources/applicationInboundDeliveries.en.ts +613 -0
- package/templates/saas/i18n/engine/resources/applicationInboundDeliveries.fr.ts +613 -0
- package/templates/saas/i18n/engine/resources/applicationM2mWebhookDeliveryLog.en.ts +51 -71
- package/templates/saas/i18n/engine/resources/applicationM2mWebhookDeliveryLog.fr.ts +3 -23
- package/templates/saas/i18n/engine/resources/applicationMetadata.en.ts +23 -45
- package/templates/saas/i18n/engine/resources/applicationMetadata.fr.ts +0 -22
- package/templates/saas/i18n/engine/resources/applicationOAuthClients.en.ts +56 -57
- package/templates/saas/i18n/engine/resources/applicationOAuthClients.fr.ts +22 -23
- package/templates/saas/i18n/engine/resources/applicationScimProvisioningConfig.en.ts +36 -55
- package/templates/saas/i18n/engine/resources/applicationScimProvisioningConfig.fr.ts +3 -22
- package/templates/saas/i18n/engine/resources/applicationSiemDeliveryDlq.en.ts +64 -81
- package/templates/saas/i18n/engine/resources/applicationSiemDeliveryDlq.fr.ts +4 -21
- package/templates/saas/i18n/engine/resources/applicationSiemDeliveryOutbox.en.ts +3 -13
- package/templates/saas/i18n/engine/resources/applicationSiemDeliveryOutbox.fr.ts +1 -11
- package/templates/saas/i18n/engine/resources/applicationSiemExportConfig.en.ts +43 -67
- package/templates/saas/i18n/engine/resources/applicationSiemExportConfig.fr.ts +8 -32
- package/templates/saas/i18n/engine/resources/applicationSsoConfig.en.ts +98 -271
- package/templates/saas/i18n/engine/resources/applicationSsoConfig.fr.ts +10 -31
- package/templates/saas/i18n/engine/resources/applicationSsoConnections.en.ts +227 -249
- package/templates/saas/i18n/engine/resources/applicationSsoConnections.fr.ts +80 -102
- package/templates/saas/i18n/engine/resources/applicationVersions.en.ts +41 -53
- package/templates/saas/i18n/engine/resources/applicationVersions.fr.ts +3 -15
- package/templates/saas/i18n/engine/resources/applicationWebhookConfig.en.ts +42 -61
- package/templates/saas/i18n/engine/resources/applicationWebhookConfig.fr.ts +3 -22
- package/templates/saas/i18n/engine/resources/applications.en.ts +2645 -1242
- package/templates/saas/i18n/engine/resources/applications.fr.ts +1450 -47
- package/templates/saas/i18n/engine/resources/auditLogs.en.ts +419 -224
- package/templates/saas/i18n/engine/resources/auditLogs.fr.ts +204 -9
- package/templates/saas/i18n/engine/resources/billingEffectOutbox.en.ts +0 -8
- package/templates/saas/i18n/engine/resources/billingEffectOutbox.fr.ts +0 -8
- package/templates/saas/i18n/engine/resources/billingProviderEventSettlements.en.ts +0 -8
- package/templates/saas/i18n/engine/resources/billingProviderEventSettlements.fr.ts +0 -8
- package/templates/saas/i18n/engine/resources/billingSubscriptionMutationCompletions.en.ts +2 -9
- package/templates/saas/i18n/engine/resources/billingSubscriptionMutationCompletions.fr.ts +2 -9
- package/templates/saas/i18n/engine/resources/billingSubscriptionMutationIntents.en.ts +123 -130
- package/templates/saas/i18n/engine/resources/billingSubscriptionMutationIntents.fr.ts +2 -9
- package/templates/saas/i18n/engine/resources/clientMailboxes.en.ts +169 -0
- package/templates/saas/i18n/engine/resources/clientMailboxes.fr.ts +169 -0
- package/templates/saas/i18n/engine/resources/consumableTokens.en.ts +91 -93
- package/templates/saas/i18n/engine/resources/consumableTokens.fr.ts +17 -19
- package/templates/saas/i18n/engine/resources/conversationMessages.en.ts +332 -0
- package/templates/saas/i18n/engine/resources/conversationMessages.fr.ts +332 -0
- package/templates/saas/i18n/engine/resources/conversationReplyTokens.en.ts +196 -0
- package/templates/saas/i18n/engine/resources/conversationReplyTokens.fr.ts +196 -0
- package/templates/saas/i18n/engine/resources/conversationThreads.en.ts +224 -0
- package/templates/saas/i18n/engine/resources/conversationThreads.fr.ts +224 -0
- package/templates/saas/i18n/engine/resources/dataSeedRuns.en.ts +359 -201
- package/templates/saas/i18n/engine/resources/dataSeedRuns.fr.ts +173 -15
- package/templates/saas/i18n/engine/resources/etlPipelineStates.en.ts +278 -14
- package/templates/saas/i18n/engine/resources/etlPipelineStates.fr.ts +276 -12
- package/templates/saas/i18n/engine/resources/evaluationDatasetExports.en.ts +222 -0
- package/templates/saas/i18n/engine/resources/evaluationDatasetExports.fr.ts +222 -0
- package/templates/saas/i18n/engine/resources/evaluationExportAuthorizations.en.ts +163 -0
- package/templates/saas/i18n/engine/resources/evaluationExportAuthorizations.fr.ts +163 -0
- package/templates/saas/i18n/engine/resources/externalDataErasureSuppressions.en.ts +169 -0
- package/templates/saas/i18n/engine/resources/externalDataErasureSuppressions.fr.ts +169 -0
- package/templates/saas/i18n/engine/resources/externalDataOutboundChanges.en.ts +254 -0
- package/templates/saas/i18n/engine/resources/externalDataOutboundChanges.fr.ts +254 -0
- package/templates/saas/i18n/engine/resources/externalDataPendingReferences.en.ts +155 -0
- package/templates/saas/i18n/engine/resources/externalDataPendingReferences.fr.ts +155 -0
- package/templates/saas/i18n/engine/resources/externalDataPipelineMembershipKeys.en.ts +131 -0
- package/templates/saas/i18n/engine/resources/externalDataPipelineMembershipKeys.fr.ts +131 -0
- package/templates/saas/i18n/engine/resources/externalDataPipelineMemberships.en.ts +8 -24
- package/templates/saas/i18n/engine/resources/externalDataPipelineMemberships.fr.ts +8 -24
- package/templates/saas/i18n/engine/resources/externalDataPipelineRunRecords.en.ts +693 -0
- package/templates/saas/i18n/engine/resources/externalDataPipelineRunRecords.fr.ts +693 -0
- package/templates/saas/i18n/engine/resources/externalDataRemoteVersions.en.ts +126 -0
- package/templates/saas/i18n/engine/resources/externalDataRemoteVersions.fr.ts +126 -0
- package/templates/saas/i18n/engine/resources/files.en.ts +60 -72
- package/templates/saas/i18n/engine/resources/files.fr.ts +1 -11
- package/templates/saas/i18n/engine/resources/inboundAddressTombstones.en.ts +120 -0
- package/templates/saas/i18n/engine/resources/inboundAddressTombstones.fr.ts +120 -0
- package/templates/saas/i18n/engine/resources/inboundContacts.en.ts +27 -81
- package/templates/saas/i18n/engine/resources/inboundContacts.fr.ts +1 -55
- package/templates/saas/i18n/engine/resources/inboundEmails.en.ts +548 -0
- package/templates/saas/i18n/engine/resources/inboundEmails.fr.ts +548 -0
- package/templates/saas/i18n/engine/resources/jobExecutions.en.ts +282 -208
- package/templates/saas/i18n/engine/resources/jobExecutions.fr.ts +87 -13
- package/templates/saas/i18n/engine/resources/jobPayloadStorage.en.ts +46 -64
- package/templates/saas/i18n/engine/resources/jobPayloadStorage.fr.ts +1 -19
- package/templates/saas/i18n/engine/resources/legalHolds.en.ts +283 -0
- package/templates/saas/i18n/engine/resources/legalHolds.fr.ts +283 -0
- package/templates/saas/i18n/engine/resources/modelCallAttributions.en.ts +403 -0
- package/templates/saas/i18n/engine/resources/modelCallAttributions.fr.ts +403 -0
- package/templates/saas/i18n/engine/resources/modelCostPeriodAggregates.en.ts +273 -0
- package/templates/saas/i18n/engine/resources/modelCostPeriodAggregates.fr.ts +273 -0
- package/templates/saas/i18n/engine/resources/oauthConsentGrants.en.ts +6 -60
- package/templates/saas/i18n/engine/resources/oauthConsentGrants.fr.ts +1 -55
- package/templates/saas/i18n/engine/resources/organizationA2aPushDeliveryLog.en.ts +6 -68
- package/templates/saas/i18n/engine/resources/organizationA2aPushDeliveryLog.fr.ts +1 -63
- package/templates/saas/i18n/engine/resources/organizationA2aTokenBudgetState.en.ts +16 -70
- package/templates/saas/i18n/engine/resources/organizationA2aTokenBudgetState.fr.ts +1 -55
- package/templates/saas/i18n/engine/resources/organizationAgentWorkDecisionContents.en.ts +182 -0
- package/templates/saas/i18n/engine/resources/organizationAgentWorkDecisionContents.fr.ts +182 -0
- package/templates/saas/i18n/engine/resources/organizationAgentWorkDecisions.en.ts +334 -0
- package/templates/saas/i18n/engine/resources/organizationAgentWorkDecisions.fr.ts +334 -0
- package/templates/saas/i18n/engine/resources/organizationApiKeys.en.ts +86 -97
- package/templates/saas/i18n/engine/resources/organizationApiKeys.fr.ts +31 -42
- package/templates/saas/i18n/engine/resources/organizationBillingAccounts.en.ts +453 -561
- package/templates/saas/i18n/engine/resources/organizationBillingAccounts.fr.ts +304 -412
- package/templates/saas/i18n/engine/resources/organizationCreditPools.en.ts +41 -71
- package/templates/saas/i18n/engine/resources/organizationCreditPools.fr.ts +7 -37
- package/templates/saas/i18n/engine/resources/organizationEmailDomains.en.ts +339 -0
- package/templates/saas/i18n/engine/resources/organizationEmailDomains.fr.ts +339 -0
- package/templates/saas/i18n/engine/resources/organizationFeatures.en.ts +30 -51
- package/templates/saas/i18n/engine/resources/organizationFeatures.fr.ts +2 -22
- package/templates/saas/i18n/engine/resources/organizationFlowActorExecutions.en.ts +343 -29
- package/templates/saas/i18n/engine/resources/organizationFlowActorExecutions.fr.ts +348 -34
- package/templates/saas/i18n/engine/resources/organizationFlowActorTasks.en.ts +6 -67
- package/templates/saas/i18n/engine/resources/organizationFlowActorTasks.fr.ts +1 -62
- package/templates/saas/i18n/engine/resources/organizationGuidanceState.en.ts +15 -25
- package/templates/saas/i18n/engine/resources/organizationGuidanceState.fr.ts +1 -11
- package/templates/saas/i18n/engine/resources/organizationInboundDeliveries.en.ts +613 -0
- package/templates/saas/i18n/engine/resources/organizationInboundDeliveries.fr.ts +613 -0
- package/templates/saas/i18n/engine/resources/organizationInvoiceRefs.en.ts +71 -158
- package/templates/saas/i18n/engine/resources/organizationInvoiceRefs.fr.ts +2 -89
- package/templates/saas/i18n/engine/resources/organizationLifecycleState.en.ts +23 -33
- package/templates/saas/i18n/engine/resources/organizationLifecycleState.fr.ts +1 -11
- package/templates/saas/i18n/engine/resources/organizationM2mWebhookDeliveryLog.en.ts +51 -71
- package/templates/saas/i18n/engine/resources/organizationM2mWebhookDeliveryLog.fr.ts +3 -23
- package/templates/saas/i18n/engine/resources/organizationMembers.en.ts +133 -179
- package/templates/saas/i18n/engine/resources/organizationMembers.fr.ts +58 -102
- package/templates/saas/i18n/engine/resources/organizationNotificationBadges.en.ts +11 -29
- package/templates/saas/i18n/engine/resources/organizationNotificationBadges.fr.ts +1 -19
- package/templates/saas/i18n/engine/resources/organizationNotifications.en.ts +18 -26
- package/templates/saas/i18n/engine/resources/organizationNotifications.fr.ts +0 -8
- package/templates/saas/i18n/engine/resources/organizationOAuthClients.en.ts +67 -44
- package/templates/saas/i18n/engine/resources/organizationOAuthClients.fr.ts +48 -25
- package/templates/saas/i18n/engine/resources/organizationOnboardingOperations.en.ts +0 -16
- package/templates/saas/i18n/engine/resources/organizationOnboardingOperations.fr.ts +0 -16
- package/templates/saas/i18n/engine/resources/organizationPreferences.en.ts +23 -32
- package/templates/saas/i18n/engine/resources/organizationPreferences.fr.ts +0 -8
- package/templates/saas/i18n/engine/resources/organizationProfiles.en.ts +33 -50
- package/templates/saas/i18n/engine/resources/organizationProfiles.fr.ts +0 -16
- package/templates/saas/i18n/engine/resources/organizationProgressionState.en.ts +23 -33
- package/templates/saas/i18n/engine/resources/organizationProgressionState.fr.ts +1 -11
- package/templates/saas/i18n/engine/resources/organizationProviderCredentials.en.ts +9 -55
- package/templates/saas/i18n/engine/resources/organizationProviderCredentials.fr.ts +11 -57
- package/templates/saas/i18n/engine/resources/organizationScimProvisioningConfig.en.ts +50 -62
- package/templates/saas/i18n/engine/resources/organizationScimProvisioningConfig.fr.ts +3 -14
- package/templates/saas/i18n/engine/resources/organizationScimTokens.en.ts +67 -72
- package/templates/saas/i18n/engine/resources/organizationScimTokens.fr.ts +11 -15
- package/templates/saas/i18n/engine/resources/organizationSiemDeliveryDlq.en.ts +64 -81
- package/templates/saas/i18n/engine/resources/organizationSiemDeliveryDlq.fr.ts +4 -21
- package/templates/saas/i18n/engine/resources/organizationSiemDeliveryOutbox.en.ts +3 -13
- package/templates/saas/i18n/engine/resources/organizationSiemDeliveryOutbox.fr.ts +1 -11
- package/templates/saas/i18n/engine/resources/organizationSiemExportConfig.en.ts +54 -70
- package/templates/saas/i18n/engine/resources/organizationSiemExportConfig.fr.ts +8 -24
- package/templates/saas/i18n/engine/resources/organizationSsoConfig.en.ts +99 -265
- package/templates/saas/i18n/engine/resources/organizationSsoConfig.fr.ts +10 -23
- package/templates/saas/i18n/engine/resources/organizationSsoConnections.en.ts +229 -252
- package/templates/saas/i18n/engine/resources/organizationSsoConnections.fr.ts +80 -102
- package/templates/saas/i18n/engine/resources/organizationSubscriptions.en.ts +285 -240
- package/templates/saas/i18n/engine/resources/organizationSubscriptions.fr.ts +166 -121
- package/templates/saas/i18n/engine/resources/organizationUnitMembers.en.ts +13 -32
- package/templates/saas/i18n/engine/resources/organizationUnitMembers.fr.ts +11 -30
- package/templates/saas/i18n/engine/resources/organizationUnits.en.ts +34 -53
- package/templates/saas/i18n/engine/resources/organizationUnits.fr.ts +3 -22
- package/templates/saas/i18n/engine/resources/organizationUsageRecords.en.ts +89 -152
- package/templates/saas/i18n/engine/resources/organizationUsageRecords.fr.ts +2 -65
- package/templates/saas/i18n/engine/resources/organizationWebhookConfig.en.ts +59 -71
- package/templates/saas/i18n/engine/resources/organizationWebhookConfig.fr.ts +3 -14
- package/templates/saas/i18n/engine/resources/organizations.en.ts +860 -879
- package/templates/saas/i18n/engine/resources/organizations.fr.ts +54 -73
- package/templates/saas/i18n/engine/resources/platformAccessGrants.en.ts +15 -74
- package/templates/saas/i18n/engine/resources/platformAccessGrants.fr.ts +8 -67
- package/templates/saas/i18n/engine/resources/prices.en.ts +148 -233
- package/templates/saas/i18n/engine/resources/prices.fr.ts +36 -121
- package/templates/saas/i18n/engine/resources/products.en.ts +135 -157
- package/templates/saas/i18n/engine/resources/products.fr.ts +45 -67
- package/templates/saas/i18n/engine/resources/promotions.en.ts +136 -161
- package/templates/saas/i18n/engine/resources/promotions.fr.ts +48 -73
- package/templates/saas/i18n/engine/resources/providerCallRecords.en.ts +283 -0
- package/templates/saas/i18n/engine/resources/providerCallRecords.fr.ts +283 -0
- package/templates/saas/i18n/engine/resources/referrals.en.ts +117 -83
- package/templates/saas/i18n/engine/resources/referrals.fr.ts +67 -33
- package/templates/saas/i18n/engine/resources/retentionEnforcementRecords.en.ts +235 -0
- package/templates/saas/i18n/engine/resources/retentionEnforcementRecords.fr.ts +235 -0
- package/templates/saas/i18n/engine/resources/serviceEngagementAssignments.en.ts +368 -0
- package/templates/saas/i18n/engine/resources/serviceEngagementAssignments.fr.ts +368 -0
- package/templates/saas/i18n/engine/resources/serviceEngagements.en.ts +321 -0
- package/templates/saas/i18n/engine/resources/serviceEngagements.fr.ts +321 -0
- package/templates/saas/i18n/engine/resources/serviceProviderActivityFeed.en.ts +237 -0
- package/templates/saas/i18n/engine/resources/serviceProviderActivityFeed.fr.ts +237 -0
- package/templates/saas/i18n/engine/resources/serviceProviderActivityFeedSettings.en.ts +209 -0
- package/templates/saas/i18n/engine/resources/serviceProviderActivityFeedSettings.fr.ts +209 -0
- package/templates/saas/i18n/engine/resources/serviceProviderCapabilityGrants.en.ts +275 -0
- package/templates/saas/i18n/engine/resources/serviceProviderCapabilityGrants.fr.ts +275 -0
- package/templates/saas/i18n/engine/resources/serviceProviderRelationships.en.ts +431 -0
- package/templates/saas/i18n/engine/resources/serviceProviderRelationships.fr.ts +431 -0
- package/templates/saas/i18n/engine/resources/systemOfRecordPartitionAssignments.en.ts +180 -0
- package/templates/saas/i18n/engine/resources/systemOfRecordPartitionAssignments.fr.ts +180 -0
- package/templates/saas/i18n/engine/resources/systemOfRecordWriteAdmissions.en.ts +118 -0
- package/templates/saas/i18n/engine/resources/systemOfRecordWriteAdmissions.fr.ts +118 -0
- package/templates/saas/i18n/engine/resources/userA2aPushDeliveryLog.en.ts +6 -68
- package/templates/saas/i18n/engine/resources/userA2aPushDeliveryLog.fr.ts +1 -63
- package/templates/saas/i18n/engine/resources/userA2aTokenBudgetState.en.ts +19 -73
- package/templates/saas/i18n/engine/resources/userA2aTokenBudgetState.fr.ts +1 -55
- package/templates/saas/i18n/engine/resources/userAgentWorkDecisionContents.en.ts +182 -0
- package/templates/saas/i18n/engine/resources/userAgentWorkDecisionContents.fr.ts +182 -0
- package/templates/saas/i18n/engine/resources/userAgentWorkDecisions.en.ts +334 -0
- package/templates/saas/i18n/engine/resources/userAgentWorkDecisions.fr.ts +334 -0
- package/templates/saas/i18n/engine/resources/userBillingAccounts.en.ts +513 -620
- package/templates/saas/i18n/engine/resources/userBillingAccounts.fr.ts +301 -408
- package/templates/saas/i18n/engine/resources/userCredentials.en.ts +62 -116
- package/templates/saas/i18n/engine/resources/userCredentials.fr.ts +1 -55
- package/templates/saas/i18n/engine/resources/userCreditPools.en.ts +49 -79
- package/templates/saas/i18n/engine/resources/userCreditPools.fr.ts +7 -37
- package/templates/saas/i18n/engine/resources/userFeatures.en.ts +19 -68
- package/templates/saas/i18n/engine/resources/userFeatures.fr.ts +1 -50
- package/templates/saas/i18n/engine/resources/userFlowActorExecutions.en.ts +343 -29
- package/templates/saas/i18n/engine/resources/userFlowActorExecutions.fr.ts +348 -34
- package/templates/saas/i18n/engine/resources/userFlowActorTasks.en.ts +6 -67
- package/templates/saas/i18n/engine/resources/userFlowActorTasks.fr.ts +1 -62
- package/templates/saas/i18n/engine/resources/userGovernedDocumentAcceptances.en.ts +1 -3
- package/templates/saas/i18n/engine/resources/userGovernedDocumentAcceptances.fr.ts +1 -3
- package/templates/saas/i18n/engine/resources/userGuidanceState.en.ts +17 -71
- package/templates/saas/i18n/engine/resources/userGuidanceState.fr.ts +1 -55
- package/templates/saas/i18n/engine/resources/userIdentityLinks.en.ts +84 -118
- package/templates/saas/i18n/engine/resources/userIdentityLinks.fr.ts +1 -35
- package/templates/saas/i18n/engine/resources/userInvoiceRefs.en.ts +50 -136
- package/templates/saas/i18n/engine/resources/userInvoiceRefs.fr.ts +1 -87
- package/templates/saas/i18n/engine/resources/userLifecycleState.en.ts +17 -71
- package/templates/saas/i18n/engine/resources/userLifecycleState.fr.ts +1 -55
- package/templates/saas/i18n/engine/resources/userNotificationBadges.en.ts +11 -68
- package/templates/saas/i18n/engine/resources/userNotificationBadges.fr.ts +1 -58
- package/templates/saas/i18n/engine/resources/userPreferences.en.ts +67 -129
- package/templates/saas/i18n/engine/resources/userPreferences.fr.ts +5 -67
- package/templates/saas/i18n/engine/resources/userProfiles.en.ts +15 -280
- package/templates/saas/i18n/engine/resources/userProfiles.fr.ts +1 -266
- package/templates/saas/i18n/engine/resources/userProgressionState.en.ts +28 -62
- package/templates/saas/i18n/engine/resources/userProgressionState.fr.ts +1 -35
- package/templates/saas/i18n/engine/resources/userProviderCredentials.en.ts +9 -58
- package/templates/saas/i18n/engine/resources/userProviderCredentials.fr.ts +11 -60
- package/templates/saas/i18n/engine/resources/userSelfPreferences.en.ts +72 -125
- package/templates/saas/i18n/engine/resources/userSelfPreferences.fr.ts +5 -58
- package/templates/saas/i18n/engine/resources/userSelfProfiles.en.ts +57 -314
- package/templates/saas/i18n/engine/resources/userSelfProfiles.fr.ts +1 -258
- package/templates/saas/i18n/engine/resources/userSubscriptions.en.ts +262 -216
- package/templates/saas/i18n/engine/resources/userSubscriptions.fr.ts +165 -119
- package/templates/saas/i18n/engine/resources/userUsageRecords.en.ts +72 -134
- package/templates/saas/i18n/engine/resources/userUsageRecords.fr.ts +1 -63
- package/templates/saas/i18n/engine/resources/user_self.en.ts +140 -320
- package/templates/saas/i18n/engine/resources/user_self.fr.ts +26 -205
- package/templates/saas/i18n/engine/resources/users.en.ts +174 -413
- package/templates/saas/i18n/engine/resources/users.fr.ts +41 -280
- package/templates/saas/i18n/engine/resources/workbenchApplicationSecrets.en.ts +246 -0
- package/templates/saas/i18n/engine/resources/workbenchApplicationSecrets.fr.ts +246 -0
- package/templates/saas/i18n/engine/resources/workbenchAuthoredDocumentFactDeclarations.en.ts +59 -11
- package/templates/saas/i18n/engine/resources/workbenchAuthoredDocumentFactDeclarations.fr.ts +59 -11
- package/templates/saas/i18n/engine/resources/workbenchBrandAssets.fr.ts +0 -8
- package/templates/saas/i18n/engine/resources/workbenchBrandAudiences.en.ts +174 -0
- package/templates/saas/i18n/engine/resources/workbenchBrandAudiences.fr.ts +174 -0
- package/templates/saas/i18n/engine/resources/workbenchBrandLogoDirections.fr.ts +0 -8
- package/templates/saas/i18n/engine/resources/workbenchBrandNames.fr.ts +0 -8
- package/templates/saas/i18n/engine/resources/workbenchBrandVisualTones.fr.ts +0 -8
- package/templates/saas/i18n/engine/resources/workbenchBuildDispatchPlan.en.ts +56 -0
- package/templates/saas/i18n/engine/resources/workbenchBuildDispatchPlan.fr.ts +56 -0
- package/templates/saas/i18n/engine/resources/workbenchBuildDispatches.en.ts +24 -8
- package/templates/saas/i18n/engine/resources/workbenchBuildDispatches.fr.ts +24 -0
- package/templates/saas/i18n/engine/resources/workbenchBuildPlanTasks.en.ts +140 -16
- package/templates/saas/i18n/engine/resources/workbenchBuildPlanTasks.fr.ts +140 -16
- package/templates/saas/i18n/engine/resources/workbenchBuildTasks.en.ts +347 -67
- package/templates/saas/i18n/engine/resources/workbenchBuildTasks.fr.ts +347 -67
- package/templates/saas/i18n/engine/resources/workbenchCodingLaneStatus.en.ts +32 -8
- package/templates/saas/i18n/engine/resources/workbenchCodingLaneStatus.fr.ts +32 -0
- package/templates/saas/i18n/engine/resources/workbenchComplianceApplicabilityDecisions.en.ts +206 -0
- package/templates/saas/i18n/engine/resources/workbenchComplianceApplicabilityDecisions.fr.ts +206 -0
- package/templates/saas/i18n/engine/resources/workbenchComplianceCandidateSections.fr.ts +0 -8
- package/templates/saas/i18n/engine/resources/workbenchComplianceCandidateSetSections.en.ts +254 -0
- package/templates/saas/i18n/engine/resources/workbenchComplianceCandidateSetSections.fr.ts +254 -0
- package/templates/saas/i18n/engine/resources/workbenchComplianceCandidateVariantSelections.fr.ts +0 -8
- package/templates/saas/i18n/engine/resources/workbenchComplianceCandidates.en.ts +107 -11
- package/templates/saas/i18n/engine/resources/workbenchComplianceCandidates.fr.ts +107 -11
- package/templates/saas/i18n/engine/resources/workbenchComplianceCoverageDecisions.en.ts +246 -0
- package/templates/saas/i18n/engine/resources/workbenchComplianceCoverageDecisions.fr.ts +246 -0
- package/templates/saas/i18n/engine/resources/workbenchComplianceDocumentationRequirements.en.ts +174 -0
- package/templates/saas/i18n/engine/resources/workbenchComplianceDocumentationRequirements.fr.ts +174 -0
- package/templates/saas/i18n/engine/resources/workbenchComplianceGaps.en.ts +278 -0
- package/templates/saas/i18n/engine/resources/workbenchComplianceGaps.fr.ts +278 -0
- package/templates/saas/i18n/engine/resources/workbenchComplianceImplementationDecisions.en.ts +214 -0
- package/templates/saas/i18n/engine/resources/workbenchComplianceImplementationDecisions.fr.ts +214 -0
- package/templates/saas/i18n/engine/resources/workbenchComplianceObligations.en.ts +518 -0
- package/templates/saas/i18n/engine/resources/workbenchComplianceObligations.fr.ts +518 -0
- package/templates/saas/i18n/engine/resources/workbenchComplianceResponsibilityAssignments.en.ts +246 -0
- package/templates/saas/i18n/engine/resources/workbenchComplianceResponsibilityAssignments.fr.ts +246 -0
- package/templates/saas/i18n/engine/resources/workbenchComplianceRoleAuthorities.en.ts +326 -0
- package/templates/saas/i18n/engine/resources/workbenchComplianceRoleAuthorities.fr.ts +326 -0
- package/templates/saas/i18n/engine/resources/workbenchComplianceScopeSelectors.en.ts +326 -0
- package/templates/saas/i18n/engine/resources/workbenchComplianceScopeSelectors.fr.ts +326 -0
- package/templates/saas/i18n/engine/resources/workbenchComplianceSharedResponsibilityRules.en.ts +246 -0
- package/templates/saas/i18n/engine/resources/workbenchComplianceSharedResponsibilityRules.fr.ts +246 -0
- package/templates/saas/i18n/engine/resources/workbenchCompositionDecisions.en.ts +134 -0
- package/templates/saas/i18n/engine/resources/workbenchCompositionDecisions.fr.ts +134 -0
- package/templates/saas/i18n/engine/resources/workbenchCreationHomeLines.en.ts +198 -0
- package/templates/saas/i18n/engine/resources/workbenchCreationHomeLines.fr.ts +198 -0
- package/templates/saas/i18n/engine/resources/workbenchCreationOutcomes.en.ts +190 -0
- package/templates/saas/i18n/engine/resources/workbenchCreationOutcomes.fr.ts +190 -0
- package/templates/saas/i18n/engine/resources/workbenchDocumentFactDeclarations.en.ts +59 -11
- package/templates/saas/i18n/engine/resources/workbenchDocumentFactDeclarations.fr.ts +59 -11
- package/templates/saas/i18n/engine/resources/workbenchDocumentPublicationVariants.fr.ts +0 -8
- package/templates/saas/i18n/engine/resources/workbenchDocumentReleases.fr.ts +0 -8
- package/templates/saas/i18n/engine/resources/workbenchDocumentationChapters.en.ts +134 -0
- package/templates/saas/i18n/engine/resources/workbenchDocumentationChapters.fr.ts +134 -0
- package/templates/saas/i18n/engine/resources/workbenchDomainPlanModules.en.ts +187 -11
- package/templates/saas/i18n/engine/resources/workbenchDomainPlanModules.fr.ts +187 -11
- package/templates/saas/i18n/engine/resources/workbenchDomainPlanRelationships.en.ts +67 -11
- package/templates/saas/i18n/engine/resources/workbenchDomainPlanRelationships.fr.ts +67 -11
- package/templates/saas/i18n/engine/resources/workbenchDomainPlanResources.en.ts +366 -0
- package/templates/saas/i18n/engine/resources/workbenchDomainPlanResources.fr.ts +366 -0
- package/templates/saas/i18n/engine/resources/workbenchDomainResources.en.ts +8 -16
- package/templates/saas/i18n/engine/resources/workbenchDomainResources.fr.ts +8 -16
- package/templates/saas/i18n/engine/resources/workbenchDossierEntries.en.ts +273 -0
- package/templates/saas/i18n/engine/resources/workbenchDossierEntries.fr.ts +273 -0
- package/templates/saas/i18n/engine/resources/workbenchExperienceConfigurations.en.ts +134 -0
- package/templates/saas/i18n/engine/resources/workbenchExperienceConfigurations.fr.ts +134 -0
- package/templates/saas/i18n/engine/resources/workbenchExperienceGuidance.en.ts +486 -0
- package/templates/saas/i18n/engine/resources/workbenchExperienceGuidance.fr.ts +486 -0
- package/templates/saas/i18n/engine/resources/workbenchExperienceMilestones.en.ts +478 -0
- package/templates/saas/i18n/engine/resources/workbenchExperienceMilestones.fr.ts +478 -0
- package/templates/saas/i18n/engine/resources/workbenchExperienceViews.en.ts +478 -0
- package/templates/saas/i18n/engine/resources/workbenchExperienceViews.fr.ts +478 -0
- package/templates/saas/i18n/engine/resources/workbenchFeatureDrafts.en.ts +217 -17
- package/templates/saas/i18n/engine/resources/workbenchFeatureDrafts.fr.ts +217 -17
- package/templates/saas/i18n/engine/resources/workbenchFunctionalRequirements.en.ts +210 -42
- package/templates/saas/i18n/engine/resources/workbenchFunctionalRequirements.fr.ts +210 -42
- package/templates/saas/i18n/engine/resources/workbenchGovernanceDocuments.en.ts +182 -0
- package/templates/saas/i18n/engine/resources/workbenchGovernanceDocuments.fr.ts +182 -0
- package/templates/saas/i18n/engine/resources/workbenchGovernanceQuestions.en.ts +32 -0
- package/templates/saas/i18n/engine/resources/workbenchGovernanceQuestions.fr.ts +32 -0
- package/templates/saas/i18n/engine/resources/workbenchIntegrationInboundChannels.en.ts +334 -0
- package/templates/saas/i18n/engine/resources/workbenchIntegrationInboundChannels.fr.ts +334 -0
- package/templates/saas/i18n/engine/resources/workbenchIntegrationMinions.en.ts +414 -0
- package/templates/saas/i18n/engine/resources/workbenchIntegrationMinions.fr.ts +414 -0
- package/templates/saas/i18n/engine/resources/workbenchIntegrationProviderBindings.en.ts +134 -0
- package/templates/saas/i18n/engine/resources/workbenchIntegrationProviderBindings.fr.ts +134 -0
- package/templates/saas/i18n/engine/resources/workbenchIntegrationWorkers.en.ts +334 -0
- package/templates/saas/i18n/engine/resources/workbenchIntegrationWorkers.fr.ts +334 -0
- package/templates/saas/i18n/engine/resources/workbenchMarketAlternatives.fr.ts +0 -8
- package/templates/saas/i18n/engine/resources/workbenchMarketBenefits.fr.ts +0 -8
- package/templates/saas/i18n/engine/resources/workbenchMarketBuyingJourneys.fr.ts +0 -8
- package/templates/saas/i18n/engine/resources/workbenchMarketCategories.fr.ts +0 -8
- package/templates/saas/i18n/engine/resources/workbenchMarketChannels.fr.ts +0 -8
- package/templates/saas/i18n/engine/resources/workbenchMarketGains.fr.ts +0 -8
- package/templates/saas/i18n/engine/resources/workbenchMarketIcps.en.ts +127 -167
- package/templates/saas/i18n/engine/resources/workbenchMarketIcps.fr.ts +127 -167
- package/templates/saas/i18n/engine/resources/workbenchMarketJobs.fr.ts +0 -8
- package/templates/saas/i18n/engine/resources/workbenchMarketMessageTemplates.fr.ts +0 -8
- package/templates/saas/i18n/engine/resources/workbenchMarketObjections.fr.ts +0 -8
- package/templates/saas/i18n/engine/resources/workbenchMarketPains.fr.ts +0 -8
- package/templates/saas/i18n/engine/resources/workbenchMarketPersonas.fr.ts +0 -8
- package/templates/saas/i18n/engine/resources/workbenchMarketPositionings.fr.ts +0 -8
- package/templates/saas/i18n/engine/resources/workbenchMarketProofs.fr.ts +0 -8
- package/templates/saas/i18n/engine/resources/workbenchMarketTonesOfVoice.en.ts +26 -42
- package/templates/saas/i18n/engine/resources/workbenchMarketTonesOfVoice.fr.ts +26 -42
- package/templates/saas/i18n/engine/resources/workbenchMarketTriggers.fr.ts +0 -8
- package/templates/saas/i18n/engine/resources/workbenchNonFunctionalRequirements.en.ts +210 -42
- package/templates/saas/i18n/engine/resources/workbenchNonFunctionalRequirements.fr.ts +210 -42
- package/templates/saas/i18n/engine/resources/workbenchParkedCodingQuestions.en.ts +30 -0
- package/templates/saas/i18n/engine/resources/workbenchParkedCodingQuestions.fr.ts +30 -0
- package/templates/saas/i18n/engine/resources/workbenchPlacementDecisions.en.ts +75 -19
- package/templates/saas/i18n/engine/resources/workbenchPlacementDecisions.fr.ts +75 -19
- package/templates/saas/i18n/engine/resources/workbenchPlacementGroups.fr.ts +0 -8
- package/templates/saas/i18n/engine/resources/workbenchPlaybookRuns.en.ts +16 -0
- package/templates/saas/i18n/engine/resources/workbenchPlaybookRuns.fr.ts +16 -0
- package/templates/saas/i18n/engine/resources/workbenchPlaybooks.en.ts +90 -22
- package/templates/saas/i18n/engine/resources/workbenchPlaybooks.fr.ts +90 -22
- package/templates/saas/i18n/engine/resources/workbenchPricingPlans.en.ts +27 -35
- package/templates/saas/i18n/engine/resources/workbenchPricingPlans.fr.ts +27 -35
- package/templates/saas/i18n/engine/resources/workbenchProcessorRegisterEntries.fr.ts +0 -8
- package/templates/saas/i18n/engine/resources/workbenchReleasePolicySelections.fr.ts +0 -8
- package/templates/saas/i18n/engine/resources/workbenchRequirementMaturities.en.ts +294 -0
- package/templates/saas/i18n/engine/resources/workbenchRequirementMaturities.fr.ts +294 -0
- package/templates/saas/i18n/engine/resources/workbenchRoadmapPhases.en.ts +182 -38
- package/templates/saas/i18n/engine/resources/workbenchRoadmapPhases.fr.ts +182 -38
- package/templates/saas/i18n/engine/resources/workbenchRunWriteRecords.en.ts +146 -28
- package/templates/saas/i18n/engine/resources/workbenchRunWriteRecords.fr.ts +146 -28
- package/templates/saas/i18n/engine/resources/workbenchSpecificationArtifacts.en.ts +24 -29
- package/templates/saas/i18n/engine/resources/workbenchSpecificationArtifacts.fr.ts +24 -29
- package/templates/saas/i18n/engine/resources/workbenchTraceSessions.en.ts +165 -17
- package/templates/saas/i18n/engine/resources/workbenchTraceSessions.fr.ts +165 -17
- package/templates/saas/i18n/engine/resources/workbenchVisionConstraints.fr.ts +0 -8
- package/templates/saas/i18n/engine/resources/workbenchVisionIdeas.fr.ts +0 -8
- package/templates/saas/i18n/engine/resources/workbenchVisionMissions.fr.ts +0 -8
- package/templates/saas/i18n/engine/resources/workbenchVisionProblems.fr.ts +0 -8
- package/templates/saas/i18n/engine/resources/workbenchVisionSuccessCriteria.en.ts +182 -22
- package/templates/saas/i18n/engine/resources/workbenchVisionSuccessCriteria.fr.ts +182 -22
- package/templates/saas/i18n/engine/resources/workbenchWaitingPlaybookRuns.en.ts +8 -0
- package/templates/saas/i18n/engine/resources/workbenchWaitingPlaybookRuns.fr.ts +8 -0
- package/templates/saas/i18n/engine/resources/workbenchWebsitePages.en.ts +214 -0
- package/templates/saas/i18n/engine/resources/workbenchWebsitePages.fr.ts +214 -0
- package/templates/saas/scenarios/add-3d-layout/scenario.json +52 -0
- package/templates/saas/scenarios/add-custom-operation/files/backend-api/src/modules/__moduleDir__/resources/__resourceDir__/__resourceDir__.__operationIdentifier__.default.operation.ts.hbs +6 -1
- package/templates/saas/scenarios/add-custom-operation/scenario.json +1 -1
- package/templates/saas/scenarios/add-file-picker-provider/files/frontend/src/engine/providers/__providerRef__.frontend-app.module.ts.hbs +45 -5
- package/templates/saas/scenarios/add-file-picker-provider/scenario.json +3 -3
- package/templates/saas/scenarios/add-locale/files/website/src/pages/__localePath__/index.astro +12 -0
- package/templates/saas/scenarios/add-marketing-page/files/website/src/pages/__pageRef__.astro.hbs +12 -0
- package/templates/saas/scenarios/add-module/scenario.json +8 -1
- package/templates/saas/scenarios/add-provider/scenario.json +10 -16
- package/templates/saas/scenarios/add-technical-doc/files/technical-doc/docusaurus.config.ts.hbs +6 -4
- package/templates/saas/scenarios/add-technical-doc/files/technical-doc/i18n/en/code.json +678 -0
- package/templates/saas/scenarios/add-technical-doc/files/technical-doc/src/components/ApiReferenceIndexPage.tsx +32 -0
- package/templates/saas/scenarios/add-technical-doc/files/technical-doc/src/components/ApiResourcePage.tsx +33 -0
- package/templates/saas/scenarios/add-technical-doc/files/technical-doc/src/components/documentation-site-words.ts +43 -0
- package/templates/saas/scenarios/add-technical-doc/files/technical-doc/src/pages/auth/exchange.tsx +6 -4
- package/templates/saas/scenarios/add-technical-doc/files/technical-doc/src/pages/search.tsx +212 -0
- package/templates/saas/scenarios/add-technical-doc/files/technical-doc/src/plugins/api-reference-pages.ts +104 -0
- package/templates/saas/scenarios/add-technical-doc/files/technical-doc/src/theme/SearchBar/index.tsx +8 -4
- package/templates/saas/scenarios/add-technical-doc/scenario.json +1 -1
- package/templates/saas/scenarios/add-website/files/website/src/app-origin.ts.hbs +8 -0
- package/templates/saas/scenarios/add-website/files/website/src/content/llms.txt.hbs +11 -0
- package/templates/saas/scenarios/add-website/files/website/src/i18n/en.json.hbs +4 -1
- package/templates/saas/scenarios/add-website/files/website/src/pages/index.astro +11 -0
- package/templates/saas/scenarios/add-website/files/website/src/pages/llms.txt.ts +19 -0
- package/templates/saas/scenarios/add-website/files/website/src/website-site-context.ts +18 -68
- package/templates/saas/scenarios/add-website/scenario.json +3 -4
- package/templates/saas/skeleton/CLAUDE.md.hbs +44 -49
- package/templates/saas/skeleton/backend-api/Dockerfile +2 -2
- package/templates/saas/skeleton/backend-api/src/brand-assets.generated.ts +12 -0
- package/templates/saas/skeleton/backend-api/src/saas-config.backend.ts.hbs +9 -0
- package/templates/saas/skeleton/frontend/package.json.hbs +0 -1
- package/templates/saas/skeleton/frontend/src/config/navigation.config.ts +37 -7
- package/templates/saas/skeleton/frontend/src/config/settings-hub.config.ts +9 -6
- package/templates/saas/skeleton/frontend/src/engine/component-registrations.frontend.ts +5 -10
- package/templates/saas/skeleton/frontend/src/provider-contributions.ts.hbs +8 -0
- package/templates/saas/skeleton/frontend/vite.config.ts.hbs +27 -1
- package/templates/saas/skeleton/gitignore +4 -0
- package/templates/saas/skeleton/prettierignore +7 -0
- package/templates/saas/skeleton/shared-lib/src/engine/product.ts +4 -2
- package/templates/saas/skeleton/specifications/src/module-registry.specification.ts.hbs +2 -2
- package/wildo-framework.info.json +1 -1
- package/dist/src/commands/workbench/rearm-task.command.d.ts +0 -16
- package/dist/src/commands/workbench/rearm-task.command.d.ts.map +0 -1
- package/dist/src/commands/workbench/rearm-task.command.js +0 -61
- package/dist/src/commands/workbench/rearm-task.command.js.map +0 -1
- package/dist/src/modules/domain/credentials/__tests__/providers-config.module.test.d.ts +0 -2
- package/dist/src/modules/domain/credentials/__tests__/providers-config.module.test.d.ts.map +0 -1
- package/dist/src/modules/domain/credentials/__tests__/providers-config.module.test.js +0 -96
- package/dist/src/modules/domain/credentials/__tests__/providers-config.module.test.js.map +0 -1
- package/dist/src/modules/domain/credentials/providers-config.module.d.ts +0 -39
- package/dist/src/modules/domain/credentials/providers-config.module.d.ts.map +0 -1
- package/dist/src/modules/domain/credentials/providers-config.module.js +0 -154
- package/dist/src/modules/domain/credentials/providers-config.module.js.map +0 -1
- package/dist/src/services/brand/__tests__/brand-asset-delivery.test.d.ts +0 -23
- package/dist/src/services/brand/__tests__/brand-asset-delivery.test.d.ts.map +0 -1
- package/dist/src/services/brand/__tests__/brand-asset-delivery.test.js +0 -190
- package/dist/src/services/brand/__tests__/brand-asset-delivery.test.js.map +0 -1
- package/dist/src/services/brand/brand-asset-projection.d.ts +0 -39
- package/dist/src/services/brand/brand-asset-projection.d.ts.map +0 -1
- package/dist/src/services/brand/brand-asset-projection.js +0 -68
- package/dist/src/services/brand/brand-asset-projection.js.map +0 -1
- package/dist/src/services/brand/brand-destination-utils.d.ts +0 -137
- package/dist/src/services/brand/brand-destination-utils.d.ts.map +0 -1
- package/dist/src/services/brand/brand-destination-utils.js +0 -227
- package/dist/src/services/brand/brand-destination-utils.js.map +0 -1
- package/dist/src/services/brand/brand-propagation.types.d.ts +0 -101
- package/dist/src/services/brand/brand-propagation.types.d.ts.map +0 -1
- package/dist/src/services/brand/brand-propagation.types.js +0 -22
- package/dist/src/services/brand/brand-propagation.types.js.map +0 -1
- package/dist/src/services/brand/brand-ssot-reader.d.ts +0 -52
- package/dist/src/services/brand/brand-ssot-reader.d.ts.map +0 -1
- package/dist/src/services/brand/brand-ssot-reader.js +0 -146
- package/dist/src/services/brand/brand-ssot-reader.js.map +0 -1
- package/dist/src/services/brand/destinations/app-public.destination.d.ts +0 -30
- package/dist/src/services/brand/destinations/app-public.destination.d.ts.map +0 -1
- package/dist/src/services/brand/destinations/app-public.destination.js +0 -79
- package/dist/src/services/brand/destinations/app-public.destination.js.map +0 -1
- package/dist/src/services/brand/destinations/runtime-app-config.destination.d.ts +0 -61
- package/dist/src/services/brand/destinations/runtime-app-config.destination.d.ts.map +0 -1
- package/dist/src/services/brand/destinations/runtime-app-config.destination.js +0 -149
- package/dist/src/services/brand/destinations/runtime-app-config.destination.js.map +0 -1
- package/dist/src/services/brand/destinations/technical-doc-static.destination.d.ts +0 -22
- package/dist/src/services/brand/destinations/technical-doc-static.destination.d.ts.map +0 -1
- package/dist/src/services/brand/destinations/technical-doc-static.destination.js +0 -84
- package/dist/src/services/brand/destinations/technical-doc-static.destination.js.map +0 -1
- package/dist/src/services/brand/destinations/website-og.destination.d.ts +0 -34
- package/dist/src/services/brand/destinations/website-og.destination.d.ts.map +0 -1
- package/dist/src/services/brand/destinations/website-og.destination.js +0 -80
- package/dist/src/services/brand/destinations/website-og.destination.js.map +0 -1
- package/dist/src/services/brand/destinations/website-public.destination.d.ts +0 -40
- package/dist/src/services/brand/destinations/website-public.destination.d.ts.map +0 -1
- package/dist/src/services/brand/destinations/website-public.destination.js +0 -122
- package/dist/src/services/brand/destinations/website-public.destination.js.map +0 -1
- package/dist/src/services/deployment/docker/__tests__/zz-dump2.test.d.ts.map +0 -0
- package/dist/src/services/deployment/docker/__tests__/zz-dump2.test.js.map +0 -0
- package/dist/src/services/deployment/docker/__tests__/zz-storage-render-dump.test.d.ts +0 -0
- package/dist/src/services/deployment/docker/__tests__/zz-storage-render-dump.test.d.ts.map +0 -0
- package/dist/src/services/deployment/docker/__tests__/zz-storage-render-dump.test.js.map +0 -0
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/templates/saas/scenarios/add-technical-doc/files/technical-doc/src/components/VerifiedApiReference.tsx +0 -72
- package/templates/saas/scenarios/add-technical-doc/files/technical-doc/src/pages/api/application-administration.tsx +0 -5
- package/templates/saas/scenarios/add-technical-doc/files/technical-doc/src/pages/api/index.tsx +0 -5
- package/templates/saas/scenarios/add-technical-doc/files/technical-doc/src/pages/search.tsx.hbs +0 -127
- package/templates/saas/scenarios/add-website/files/website/src/api-origin.ts.hbs +0 -25
- /package/templates/saas/i18n/email/resources/organizationMembers/{reactivate.user-self → reactivate.users-custom}/template.tsx +0 -0
- /package/templates/saas/i18n/email/resources/organizationMembers/{suspend.user-self → suspend.users-custom}/template.tsx +0 -0
- /package/{dist/src/services/deployment/docker/__tests__/zz-dump2.test.d.ts → templates/saas/scenarios/add-website/files/website/public/.gitkeep} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"csp-sync.service.test.js","sourceRoot":"","sources":["../../../../../../../src/services/security/__tests__/csp-sync.service.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACvF,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,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,EAAE;;;QAGR;YACF,OAAO,EAAE,oCAAoC;SAC9C,CAAC,CAAC;QAEH,MAAM,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC;YAC/B,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,OAAO;YAChB,UAAU,EAAE,MAAM;YAClB,GAAG,EAAE,EAAE,iBAAiB,EAAE,uBAAuB,EAAuB;SACzE,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAChC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { existsSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs';\nimport { mkdir } from 'node:fs/promises';\nimport { tmpdir } from 'node:os';\nimport { join } from 'node:path';\nimport { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';\n\nimport {\n PROVIDER_RUNTIME_ARTIFACT_AUTOGENERATED_WARNING,\n PROVIDER_RUNTIME_ARTIFACT_GENERATOR,\n PROVIDER_RUNTIME_ARTIFACT_RELATIVE_PATHS,\n DatabaseEngine,\n} from '@wildo-ai/platform-config-lib';\nimport {\n ENGINE_PROVIDER_ORIGIN,\n ProviderTier,\n defineProviderMetadata,\n} from '@wildo-ai/saas-models/public-runtime';\n\nimport { CspSyncService } from '../csp-sync.service';\n\ninterface FixtureInput {\n readonly infraCsp: string;\n /**\n * The `csp` block authored on the SAAS_APP service, verbatim, or `null` to author NONE — which\n * is the shape a freshly scaffolded application has: neither the skeleton template nor Wonder\n * CRM authors one. Defaults to the enabled/report-only block Wonder Todos ships, so every\n * pre-existing case is unchanged.\n */\n readonly appCsp?: string | null;\n /**\n * The `csp` block a hand-written `technical-doc/wildo.tech-doc.config.ts` authors, verbatim, or\n * `undefined` to write no such file at all — which is what every pre-existing case here does.\n *\n * A per-service config file is loaded by a bare cast with NO validation, so this is the only way\n * to reach `resolveAppCsp`'s second branch with a block the schema has never seen (#442).\n */\n readonly docsCsp?: string;\n}\n\n/**\n * Writes the materialized frontend-services artifact `wildo config sync`\n * emits, carrying one provider per service key with its declared CSP footprint.\n *\n * This is the ONLY channel the CSP composition can read a provider's origins\n * from: the CLI is a Node process and a frontend provider module is\n * browser-bound, so the footprint has to be data by the time it gets here.\n */\nasync function writeFrontendProvidersArtifact(\n root: string,\n bootstrapsByServiceKey: Record<string, Record<string, { readonly csp?: unknown; readonly publicConfig?: unknown }>>,\n): Promise<void> {\n const entry = (ref: string, csp: unknown, publicConfig: unknown): Record<string, unknown> => ({\n metadata: defineProviderMetadata({\n ref,\n packageName: `@wildo-ai/provider-${ref}`,\n tier: ProviderTier.CATALOGUE,\n origin: ENGINE_PROVIDER_ORIGIN,\n }),\n providerCapabilities: [],\n protocols: [],\n ...(csp === undefined ? {} : { csp }),\n ...(publicConfig === undefined ? {} : { publicConfig }),\n });\n\n await writeFile(\n join(root, PROVIDER_RUNTIME_ARTIFACT_RELATIVE_PATHS.frontendServices),\n `${JSON.stringify(\n {\n __AUTOGENERATED__: PROVIDER_RUNTIME_ARTIFACT_AUTOGENERATED_WARNING,\n generatedBy: PROVIDER_RUNTIME_ARTIFACT_GENERATOR,\n generatedAt: '2026-09-06T00:00:00.000Z',\n sourceDigest: 'test-source-digest',\n providerRefs: [],\n providerGraphDigest: 'test-graph-digest',\n lockfileSectionDigest: 'test-lock-digest',\n artifactKind: 'frontendServices',\n modules: {},\n frontendProviderBootstraps: Object.fromEntries(\n Object.entries(bootstrapsByServiceKey).map(([serviceKey, providers]) => [\n serviceKey,\n {\n providers: Object.fromEntries(\n Object.entries(providers).map(([ref, provider]) => [ref, entry(ref, provider.csp, provider.publicConfig)]),\n ),\n },\n ]),\n ),\n },\n null,\n 2,\n )}\\n`,\n );\n}\n\nconst ACME_DERIVED_FOOTPRINT = {\n scriptOrigins: [],\n connectOrigins: [],\n frameOrigins: [],\n imgOrigins: [],\n styleOrigins: [],\n fontOrigins: [],\n derivedOrigins: [{ publicConfigKey: 'dsn', bucket: 'connectOrigins' }],\n};\n\nconst ACME_FOOTPRINT = {\n scriptOrigins: ['https://js.acme.com'],\n connectOrigins: ['https://api.acme.com'],\n frameOrigins: [],\n imgOrigins: [],\n styleOrigins: [],\n fontOrigins: [],\n derivedOrigins: [],\n};\n\nlet tempRoots: string[] = [];\n\nasync function writeFile(path: string, source: string): Promise<void> {\n await mkdir(join(path, '..'), { recursive: true });\n writeFileSync(path, source);\n}\n\nasync function createFixture(input: FixtureInput): Promise<string> {\n const root = mkdtempSync(join(tmpdir(), 'wildo-csp-sync-'));\n tempRoots.push(root);\n\n const authoredAppCsp = input.appCsp === undefined ? '{ enabled: true, reportOnly: true }' : input.appCsp;\n const appCspLine = authoredAppCsp === null ? '' : `\\n csp: ${authoredAppCsp},`;\n\n await mkdir(join(root, 'app', 'nginx-config'), { recursive: true });\n await mkdir(join(root, 'technical-doc'), { recursive: true });\n await mkdir(join(root, 'backend-api'), { recursive: true });\n await mkdir(join(root, 'infrastructure', 'local'), { recursive: true });\n\n await writeFile(\n join(root, 'wildo.saas.config.ts'),\n `import { AppFrontendType, defineSaaSProviders, defineSaasConfig } from '@wildo-ai/platform-config-lib';\n\nexport default defineSaasConfig({\n name: 'wonder-todos',\n slug: 'wonder-todos',\n displayName: 'Wonder Todos',\n type: 'saas',\n organizationTypes: { workspace: { userTypes: ['member'] } },\n services: {\n backendApi: { path: './backend-api', serviceName: 'wonder-todos-backend-api', defaultPort: 4241 },\n app: {\n path: './app',\n serviceName: 'wonder-todos-app',\n defaultPort: 4242,\n frontendType: AppFrontendType.SAAS_APP,${appCspLine}\n },\n docs: {\n path: './technical-doc',\n serviceName: 'wonder-todos-docs',\n defaultPort: 4244,\n frontendType: AppFrontendType.TECH_DOC,\n },\n },\n // REQUIRED since #1032, and every test in this file failed at config PARSE without it — before\n // reaching a line of CSP logic. One workstream's new mandatory field arrived as this suite's\n // sixteen red tests, all reporting a zod issue about organizationTypes. (No backticks in this\n // comment on purpose — it lives inside a template literal, so one would terminate the string.)\n //\n // The minimum a config can declare: one type, granting the user type the app registers.\n organizationTypes: {\n workspace: { userTypes: ['member'] },\n },\n engineCapabilities: {},\n providerConfigurations: {},\n providers: defineSaaSProviders({\n scopes: {\n backend: { providers: {} },\n frontendServices: {\n app: { providers: {} },\n docs: { providers: {} },\n },\n },\n }),\n dataServices: {\n mongodb: { databasePrefix: 'wonder-todos' },\n redis: { keyPrefix: 'wonder-todos:' },\n s3: { bucketPrefix: 'wonder-todos' },\n },\n});\n`,\n );\n\n await writeFile(\n join(root, 'infrastructure', 'local', 'wildo.infra.local.config.ts'),\n `import { BackingServiceSource, DatabaseEngine, WildoDeploymentRuntime, WildoEnvironment, defineInfraEnvConfig } from '@wildo-ai/platform-config-lib';\n\nexport default defineInfraEnvConfig({\n environment: WildoEnvironment.LOCAL,\n runtime: WildoDeploymentRuntime.DOCKER_COMPOSE,\n publicDomain: 'localhost',\n applicationDatabase: { engine: DatabaseEngine.MONGODB },\n backingServices: {\n mongodb: { source: BackingServiceSource.SELF, database: 'wonder-todos-db', host: 'localhost', port: 27017 },\n redis: { source: BackingServiceSource.SELF, host: 'localhost', port: 6379, database: 0 },\n rabbitmq: { source: BackingServiceSource.SELF, host: 'localhost', port: 5672, vhost: 'wonder-todos' },\n s3: { source: BackingServiceSource.SELF, provider: 'minio', endpoint: 'http://localhost:9000', bucket: 'wonder-todos-local' },\n },\n csp: ${input.infraCsp},\n});\n`,\n );\n\n if (input.docsCsp !== undefined) {\n await writeFile(\n join(root, 'technical-doc', 'wildo.tech-doc.config.ts'),\n `export default { csp: ${input.docsCsp} };\\n`,\n );\n await mkdir(join(root, 'technical-doc', 'nginx-config'), { recursive: true });\n await writeFile(\n join(root, 'technical-doc', 'nginx-config', 'default.conf'),\n `server {\\n # >>> wildo csp begin\\n # stale\\n # <<< wildo csp end\\n}\\n`,\n );\n }\n\n await writeFile(\n join(root, 'app', 'nginx-config', 'default.conf'),\n `server {\n # >>> wildo csp begin\n # stale\n # <<< wildo csp end\n}\n`,\n );\n\n return root;\n}\n\ndescribe('CspSyncService', () => {\n let stderrWriteSpy: ReturnType<typeof vi.spyOn>;\n\n beforeEach(() => {\n stderrWriteSpy = vi.spyOn(process.stderr, 'write').mockImplementation(() => true);\n });\n\n afterEach(() => {\n stderrWriteSpy.mockRestore();\n for (const root of tempRoots) {\n rmSync(root, { recursive: true, force: true });\n }\n tempRoots = [];\n });\n\n it('generates artifacts and rewrites nginx marker pairs for the requested frontend service', async () => {\n const root = await createFixture({\n infraCsp: `{\n app: { extraDirectives: { 'connect-src': ['http://localhost:4241'] } },\n docs: { extraDirectives: { 'connect-src': ['http://localhost:4241'] } },\n }`,\n });\n\n const result = await CspSyncService.sync({\n saasRoot: root,\n envName: 'local',\n serviceKey: 'app',\n env: { VITE_API_BASE_URL: 'http://localhost:4241' } as NodeJS.ProcessEnv,\n });\n\n expect(result.services).toEqual([\n expect.objectContaining({\n serviceKey: 'app',\n generatedArtifactPath: 'app/src/generated/csp.generated.json',\n generatedArtifactOutOfDate: true,\n outOfDateNginxFiles: ['app/nginx-config/default.conf'],\n wroteChanges: true,\n }),\n ]);\n\n const generated = JSON.parse(\n readFileSync(join(root, 'app', 'src', 'generated', 'csp.generated.json'), 'utf-8'),\n ) as { connectSrc: string[]; nginxHeaderName: string };\n expect(generated.connectSrc).toContain('http://localhost:4241');\n // The resolver auto-derives the WebSocket-scheme companion origin so the\n // Socket.IO transport upgrade against the backend origin is not blocked by\n // `connect-src`. See `augmentConnectSrcWithWebSocketOrigins` in csp-emit.\n expect(generated.connectSrc).toContain('ws://localhost:4241');\n expect(generated.nginxHeaderName).toBe('Content-Security-Policy-Report-Only');\n\n const nginxConfig = readFileSync(join(root, 'app', 'nginx-config', 'default.conf'), 'utf-8');\n expect(nginxConfig).toContain('add_header Content-Security-Policy-Report-Only');\n expect(nginxConfig).toContain(\"connect-src 'self' http://localhost:4241 ws://localhost:4241\");\n });\n\n /**\n * The two things a check mode can silently get wrong, pinned together (#513).\n *\n * A check that WRITES is not a check — it repairs the drift it was asked to report, so CI passes\n * and the artifact in the repository stays wrong until someone commits the repair by accident.\n * And a check that reports nothing is indistinguishable from a repository with no drift, which is\n * the false-green shape every rule in `.claude/rules/` about search results exists for.\n *\n * So this asserts BOTH halves against the same fixture: the drift is reported, and the files are\n * byte-identical afterwards. Mutation-proven — making `checkOnly` write reddens the byte\n * assertions, and making it skip the comparison reddens the reporting one.\n */\n it('CHECKS without writing: reports the drift and leaves every file byte-identical', async () => {\n const root = await createFixture({\n infraCsp: `{\n app: { extraDirectives: { 'connect-src': ['http://localhost:4241'] } },\n }`,\n });\n\n const artifactPath = join(root, 'app', 'src', 'generated', 'csp.generated.json');\n const nginxPath = join(root, 'app', 'nginx-config', 'default.conf');\n const artifactBefore = existsSync(artifactPath) ? readFileSync(artifactPath, 'utf-8') : null;\n const nginxBefore = readFileSync(nginxPath, 'utf-8');\n\n const checked = await CspSyncService.sync({\n saasRoot: root,\n envName: 'local',\n serviceKey: 'app',\n env: { VITE_API_BASE_URL: 'http://localhost:4241' } as NodeJS.ProcessEnv,\n checkOnly: true,\n });\n\n expect(checked.services).toEqual([\n expect.objectContaining({\n serviceKey: 'app',\n generatedArtifactOutOfDate: true,\n outOfDateNginxFiles: ['app/nginx-config/default.conf'],\n // The whole point: it saw the drift and touched nothing.\n wroteChanges: false,\n }),\n ]);\n\n expect(existsSync(artifactPath) ? readFileSync(artifactPath, 'utf-8') : null).toBe(artifactBefore);\n expect(readFileSync(nginxPath, 'utf-8')).toBe(nginxBefore);\n });\n\n /**\n * The CLEAN control, and it is not optional.\n *\n * Without it, a check stuck on \"everything is out of date\" passes the test above — and would fail\n * CI forever on a repository that is perfectly current, which trains everyone to pass `--no-verify`.\n * Syncing first and then checking is also the exact sequence a developer runs, so this pins the\n * contract that matters: `sync` then `--check` is quiet.\n */\n it('reports nothing once the artifacts have been synced, so a current repository passes', async () => {\n const root = await createFixture({\n infraCsp: `{\n app: { extraDirectives: { 'connect-src': ['http://localhost:4241'] } },\n }`,\n });\n const env = { VITE_API_BASE_URL: 'http://localhost:4241' } as NodeJS.ProcessEnv;\n\n await CspSyncService.sync({ saasRoot: root, envName: 'local', serviceKey: 'app', env });\n const checked = await CspSyncService.sync({\n saasRoot: root, envName: 'local', serviceKey: 'app', env, checkOnly: true,\n });\n\n expect(checked.services).toEqual([\n expect.objectContaining({\n serviceKey: 'app',\n generatedArtifactOutOfDate: false,\n outOfDateNginxFiles: [],\n wroteChanges: false,\n }),\n ]);\n });\n\n /**\n * The shape a FRESHLY SCAFFOLDED application has (#417).\n *\n * `resolveAppCsp` used to throw for a SAAS_APP service authoring no `csp` block, and neither the\n * skeleton template nor Wonder CRM authors one — so `wildo dev start` refused on Wonder CRM and\n * on every application `wildo init` had just produced. The default is taken from\n * `WildoCspConfigSchema` rather than written as a literal here, so this pin asserts the SCHEMA'S\n * posture (CSP off until an author opts in) and not a second copy of it.\n *\n * Isolating: reverting `?? WildoCspConfigSchema.parse({})` to the throw reddens exactly this test\n * and nothing else in the file, because every other case authors a block.\n */\n it('SYNCS a SaaS app that authors no csp block, defaulting to the pilot posture instead of refusing', async () => {\n // Wonder CRM's exact shape: an infra layer that names the backend origin, and NO app-static\n // `services.app.csp` block. That is what made it the cheapest reproduction of #417 — Wonder\n // Todos authors both layers and cannot reproduce it at all.\n const root = await createFixture({\n infraCsp: `{\n app: { extraDirectives: { 'connect-src': ['http://localhost:4241'] } },\n }`,\n appCsp: null,\n });\n\n const result = await CspSyncService.sync({\n saasRoot: root,\n envName: 'local',\n serviceKey: 'app',\n env: { VITE_API_BASE_URL: 'http://localhost:4241' } as NodeJS.ProcessEnv,\n });\n\n expect(result.services).toEqual([\n expect.objectContaining({ serviceKey: 'app', wroteChanges: true }),\n ]);\n\n // Report-only, which is the posture the schema's JSDoc prescribes for a first-time author and\n // the one the skeleton's shipped artifact already claims. NOT the schema's bare `{}` default:\n // that resolves to `enabled: false`, and `resolveServicePolicies` refuses a CSP-capable\n // frontend whose policy resolves to null — a SECOND refusal #417's measurement did not name.\n const generated = JSON.parse(\n readFileSync(join(root, 'app', 'src', 'generated', 'csp.generated.json'), 'utf-8'),\n ) as { connectSrc: string[]; nginxHeaderName: string };\n expect(generated.nginxHeaderName).toBe('Content-Security-Policy-Report-Only');\n // The app can still reach its own backend: report-only would not block it either way, but a\n // policy that omits the API origin is one flip of `reportOnly` away from breaking the app.\n expect(generated.connectSrc).toContain('http://localhost:4241');\n });\n\n /**\n * The SCAFFOLDED shape end to end: no app-static block, and the infra `csp` block the skeleton\n * template now ships (#417). Distinct from the pin above, which fixes only the app-static layer —\n * this one asserts the whole chain a fresh `wildo init` produces.\n *\n * Written because the first fix passed its own pin and still left the scaffold broken: the\n * refusal has THREE sites, not the one the issue named. `resolveAppCsp` (fixed), the\n * disabled-policy guard in `resolveServicePolicies` (which is why the default is enabled rather\n * than the schema's bare `{}`), and `assertRuntimeOriginsAllowed`, which demands the API origin\n * and is what the skeleton's infra block now supplies.\n *\n * Scoped to `app` because that IS the bare skeleton: a scaffolded application has one CSP-capable\n * frontend until `add-website` or `add-technical-doc` gives it another, and each of those\n * scenarios ships its own `csp` block.\n */\n it('SYNCS the shape a fresh scaffold produces — infra names the backend origin, nothing authors an app-static block', async () => {\n const root = await createFixture({\n infraCsp: `{\n app: { extraDirectives: { 'connect-src': ['http://localhost:4241'] } },\n }`,\n appCsp: null,\n });\n\n const result = await CspSyncService.sync({\n saasRoot: root,\n envName: 'local',\n serviceKey: 'app',\n env: { VITE_API_BASE_URL: 'http://localhost:4241' } as NodeJS.ProcessEnv,\n });\n\n expect(result.services.map((service) => service.serviceKey)).toContain('app');\n const generated = JSON.parse(\n readFileSync(join(root, 'app', 'src', 'generated', 'csp.generated.json'), 'utf-8'),\n ) as { connectSrc: string[]; nginxHeaderName: string };\n expect(generated.nginxHeaderName).toBe('Content-Security-Policy-Report-Only');\n expect(generated.connectSrc).toContain('http://localhost:4241');\n });\n\n it('marks every CSP-capable frontend key as consumed when syncing a single service', async () => {\n const root = await createFixture({\n infraCsp: `{\n app: { extraDirectives: { 'connect-src': ['http://localhost:4241'] } },\n docs: { extraDirectives: { 'connect-src': ['http://localhost:4241'] } },\n }`,\n });\n\n await CspSyncService.sync({\n saasRoot: root,\n envName: 'local',\n serviceKey: 'app',\n env: { VITE_API_BASE_URL: 'http://localhost:4241' } as NodeJS.ProcessEnv,\n });\n\n const warnings = stderrWriteSpy.mock.calls.map(([message]) => String(message)).join('\\n');\n expect(warnings).not.toContain(\"field 'csp.app'\");\n expect(warnings).not.toContain(\"field 'csp.docs'\");\n });\n\n it('rejects infra CSP overrides for services that are not CSP-capable frontends', async () => {\n const root = await createFixture({\n infraCsp: `{\n backendApi: { extraDirectives: { 'connect-src': ['http://localhost:4241'] } },\n }`,\n });\n\n await expect(\n CspSyncService.sync({\n saasRoot: root,\n envName: 'local',\n serviceKey: 'app',\n env: { VITE_API_BASE_URL: 'http://localhost:4241' } as NodeJS.ProcessEnv,\n }),\n ).rejects.toThrow('services that are not CSP-capable frontends: backendApi');\n });\n\n it(\"admits a declared provider's origins into the service's composed policy\", async () => {\n const root = await createFixture({\n infraCsp: `{\n app: { extraDirectives: { 'connect-src': ['http://localhost:4241'] } },\n docs: { extraDirectives: { 'connect-src': ['http://localhost:4241'] } },\n }`,\n });\n await writeFrontendProvidersArtifact(root, { app: { acme: { csp: ACME_FOOTPRINT } } });\n\n await CspSyncService.sync({\n saasRoot: root,\n envName: 'local',\n serviceKey: 'app',\n env: { VITE_API_BASE_URL: 'http://localhost:4241' } as NodeJS.ProcessEnv,\n });\n\n const generated = JSON.parse(\n readFileSync(join(root, 'app', 'src', 'generated', 'csp.generated.json'), 'utf-8'),\n ) as { connectSrc: string[]; nginxPolicyValue: string };\n\n expect(generated.connectSrc).toContain('https://api.acme.com');\n expect(generated.nginxPolicyValue).toContain('https://js.acme.com');\n // The provider layer runs before the WebSocket derivation, so a provider's\n // realtime origin is authorized without anyone authoring the wss:// form.\n expect(generated.connectSrc).toContain('wss://api.acme.com');\n });\n\n it(\"keeps one service's provider origins out of another service's policy\", async () => {\n // The isolation that makes the layer safe. The provider is declared for the\n // docs service only; the app's policy must not gain a single one of its\n // origins. Paired with the test above — same footprint, declared under the\n // app, reaching the app's policy — this pins that the SERVICE KEY is what\n // selects, and not merely that some artifact was read.\n const root = await createFixture({\n infraCsp: `{\n app: { extraDirectives: { 'connect-src': ['http://localhost:4241'] } },\n docs: { extraDirectives: { 'connect-src': ['http://localhost:4241'] } },\n }`,\n });\n await writeFrontendProvidersArtifact(root, { docs: { acme: { csp: ACME_FOOTPRINT } } });\n\n await CspSyncService.sync({\n saasRoot: root,\n envName: 'local',\n serviceKey: 'app',\n env: { VITE_API_BASE_URL: 'http://localhost:4241' } as NodeJS.ProcessEnv,\n });\n\n const appPolicy = JSON.parse(\n readFileSync(join(root, 'app', 'src', 'generated', 'csp.generated.json'), 'utf-8'),\n ) as { nginxPolicyValue: string; connectSrc: string[] };\n\n expect(appPolicy.nginxPolicyValue).not.toContain('https://js.acme.com');\n expect(appPolicy.connectSrc).not.toContain('https://api.acme.com');\n });\n\n it('syncs normally when no provider artifact exists at all', async () => {\n // A clean checkout, or an application declaring no frontend provider, has\n // none. Refusing here would make `sync-csp` depend on a sync having run.\n const root = await createFixture({\n infraCsp: `{\n app: { extraDirectives: { 'connect-src': ['http://localhost:4241'] } },\n docs: { extraDirectives: { 'connect-src': ['http://localhost:4241'] } },\n }`,\n });\n\n await expect(\n CspSyncService.sync({\n saasRoot: root,\n envName: 'local',\n serviceKey: 'app',\n env: { VITE_API_BASE_URL: 'http://localhost:4241' } as NodeJS.ProcessEnv,\n }),\n ).resolves.toBeDefined();\n });\n\n it('syncs normally when a declared provider carries no footprint', async () => {\n const root = await createFixture({\n infraCsp: `{\n app: { extraDirectives: { 'connect-src': ['http://localhost:4241'] } },\n docs: { extraDirectives: { 'connect-src': ['http://localhost:4241'] } },\n }`,\n });\n await writeFrontendProvidersArtifact(root, { app: { acme: {} } });\n\n const result = await CspSyncService.sync({\n saasRoot: root,\n envName: 'local',\n serviceKey: 'app',\n env: { VITE_API_BASE_URL: 'http://localhost:4241' } as NodeJS.ProcessEnv,\n });\n\n expect(result.services).toHaveLength(1);\n });\n\n it(\"reads a provider's DERIVED origin out of its own public config\", async () => {\n // The endpoint a provider cannot know: an error-monitoring DSN, an\n // analytics api host, a self-hosted deployment. The provider declares WHERE\n // the origin is; this is the one place that has both the footprint and the\n // config to read it from.\n const root = await createFixture({\n infraCsp: `{\n app: { extraDirectives: { 'connect-src': ['http://localhost:4241'] } },\n docs: { extraDirectives: { 'connect-src': ['http://localhost:4241'] } },\n }`,\n });\n await writeFrontendProvidersArtifact(root, {\n app: {\n acme: {\n csp: ACME_DERIVED_FOOTPRINT,\n publicConfig: { dsn: 'https://public-key@o42.ingest.example.com/7' },\n },\n },\n });\n\n await CspSyncService.sync({\n saasRoot: root,\n envName: 'local',\n serviceKey: 'app',\n env: { VITE_API_BASE_URL: 'http://localhost:4241' } as NodeJS.ProcessEnv,\n });\n\n const generated = JSON.parse(\n readFileSync(join(root, 'app', 'src', 'generated', 'csp.generated.json'), 'utf-8'),\n ) as { connectSrc: string[] };\n\n // The origin only — never the DSN, which carries a key in its userinfo.\n expect(generated.connectSrc).toContain('https://o42.ingest.example.com');\n expect(generated.connectSrc.join(' ')).not.toContain('public-key');\n expect(generated.connectSrc).toContain('wss://o42.ingest.example.com');\n });\n\n it('contributes nothing when the derived key is not configured', async () => {\n // An application that has not turned that provider on needs no origin for\n // it, and refusing would make an unconfigured optional provider break sync.\n const root = await createFixture({\n infraCsp: `{\n app: { extraDirectives: { 'connect-src': ['http://localhost:4241'] } },\n docs: { extraDirectives: { 'connect-src': ['http://localhost:4241'] } },\n }`,\n });\n await writeFrontendProvidersArtifact(root, { app: { acme: { csp: ACME_DERIVED_FOOTPRINT } } });\n\n const result = await CspSyncService.sync({\n saasRoot: root,\n envName: 'local',\n serviceKey: 'app',\n env: { VITE_API_BASE_URL: 'http://localhost:4241' } as NodeJS.ProcessEnv,\n });\n\n expect(result.services).toHaveLength(1);\n });\n\n it('REFUSES a derived key that is configured but is not an absolute URL', async () => {\n // The one case where the application said something and the framework\n // cannot honour it. Dropping it silently is the blocked-in-production-only\n // failure this whole layer exists to remove.\n const root = await createFixture({\n infraCsp: `{\n app: { extraDirectives: { 'connect-src': ['http://localhost:4241'] } },\n docs: { extraDirectives: { 'connect-src': ['http://localhost:4241'] } },\n }`,\n });\n await writeFrontendProvidersArtifact(root, {\n app: { acme: { csp: ACME_DERIVED_FOOTPRINT, publicConfig: { dsn: 'not-a-url' } } },\n });\n\n await expect(\n CspSyncService.sync({\n saasRoot: root,\n envName: 'local',\n serviceKey: 'app',\n env: { VITE_API_BASE_URL: 'http://localhost:4241' } as NodeJS.ProcessEnv,\n }),\n ).rejects.toThrow(/is not an absolute URL/);\n });\n});\n\n/**\n * A per-service CSP block reaches the resolver through a bare cast with NO validation (#442).\n *\n * `resolveAppCsp` returned it verbatim, so a hand-written PARTIAL block — the shape an author who\n * does not use the `define*Config` helper naturally writes — arrived without the schema's defaults\n * and killed the sync with `TypeError: Cannot convert undefined or null to object`: a stack trace\n * naming neither their file nor the missing field.\n *\n * The config surface PERMITS hand-authoring, so \"use the helper\" is not an answer. Parsing here is.\n */\ndescribe('CspSyncService — a hand-authored per-service block', () => {\n it('ACCEPTS a partial block, defaulting the rest, instead of crashing on a missing directive map', async () => {\n const root = await createFixture({\n infraCsp: `{\n app: { extraDirectives: { 'connect-src': ['http://localhost:4241'] } },\n docs: { extraDirectives: { 'connect-src': ['http://localhost:4241'] } },\n }`,\n // Enabled and report-only, and NOTHING else: no `directives`, no `mergeStrategy`. Every field\n // the resolver goes on to read has to come from the schema.\n docsCsp: `{ enabled: true, reportOnly: true }`,\n });\n\n const result = await CspSyncService.sync({\n saasRoot: root,\n envName: 'local',\n serviceKey: 'docs',\n env: { VITE_API_BASE_URL: 'http://localhost:4241' } as NodeJS.ProcessEnv,\n });\n\n expect(result.services).toEqual([\n expect.objectContaining({ serviceKey: 'docs', wroteChanges: true }),\n ]);\n });\n\n it('REFUSES a typo with a message naming the key, rather than silently turning CSP off', async () => {\n /*\n * `WildoCspConfigSchema` is a `z.strictObject`, and that is the second thing parsing buys.\n * `enable: true` is not `enabled: true`; unparsed it resolves to `enabled: false` — what the\n * schema's own JSDoc calls \"CSP off, the worst possible default\" — and the sync reports success.\n */\n const root = await createFixture({\n infraCsp: `{\n app: { extraDirectives: { 'connect-src': ['http://localhost:4241'] } },\n docs: { extraDirectives: { 'connect-src': ['http://localhost:4241'] } },\n }`,\n docsCsp: `{ enable: true, reportOnly: true }`,\n });\n\n await expect(CspSyncService.sync({\n saasRoot: root,\n envName: 'local',\n serviceKey: 'docs',\n env: { VITE_API_BASE_URL: 'http://localhost:4241' } as NodeJS.ProcessEnv,\n })).rejects.toThrow(/enable/);\n });\n});\n"]}
|
|
1
|
+
{"version":3,"file":"csp-sync.service.test.js","sourceRoot":"","sources":["../../../../../../../src/services/security/__tests__/csp-sync.service.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACvF,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAEzE,OAAO,EACL,+CAA+C,EAC/C,mCAAmC,EACnC,wCAAwC,GAEzC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,sBAAsB,EACtB,YAAY,EACZ,sBAAsB,GACvB,MAAM,sCAAsC,CAAC;AAE9C,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAqBrD;;;;;;;GAOG;AACH,KAAK,UAAU,8BAA8B,CAC3C,IAAY,EACZ,sBAAmH;IAEnH,MAAM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;;WAIG;QACH,MAAM,IAAI,GAAG,MAAM,aAAa,CAAC;YAC/B,QAAQ,EAAE;;;QAGR;YACF,OAAO,EAAE,oCAAoC;SAC9C,CAAC,CAAC;QAEH,MAAM,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC;YAC/B,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,OAAO;YAChB,UAAU,EAAE,MAAM;YAClB,GAAG,EAAE,EAAE,iBAAiB,EAAE,uBAAuB,EAAuB;SACzE,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAChC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { existsSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs';\nimport { mkdir } from 'node:fs/promises';\nimport { tmpdir } from 'node:os';\nimport { join } from 'node:path';\nimport { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';\n\nimport {\n PROVIDER_RUNTIME_ARTIFACT_AUTOGENERATED_WARNING,\n PROVIDER_RUNTIME_ARTIFACT_GENERATOR,\n PROVIDER_RUNTIME_ARTIFACT_RELATIVE_PATHS,\n DatabaseEngine,\n} from '@wildo-ai/platform-config-lib';\nimport {\n ENGINE_PROVIDER_ORIGIN,\n ProviderTier,\n defineProviderMetadata,\n} from '@wildo-ai/saas-models/public-runtime';\n\nimport { CspSyncService } from '../csp-sync.service';\n\ninterface FixtureInput {\n readonly infraCsp: string;\n /**\n * The `csp` block authored on the SAAS_APP service, verbatim, or `null` to author NONE — which\n * is the shape a freshly scaffolded application has: neither the skeleton template nor Wonder\n * CRM authors one. Defaults to the enabled/report-only block Wonder Todos ships, so every\n * pre-existing case is unchanged.\n */\n readonly appCsp?: string | null;\n /**\n * The `csp` block a hand-written `technical-doc/wildo.tech-doc.config.ts` authors, verbatim, or\n * `undefined` to write no such file at all — which is what every pre-existing case here does.\n *\n * A per-service config file is loaded by a bare cast with NO validation, so this is the only way\n * to reach `resolveAppCsp`'s second branch with a block the schema has never seen (#442).\n */\n readonly docsCsp?: string;\n}\n\n/**\n * Writes the materialized frontend-services artifact `wildo config sync`\n * emits, carrying one provider per service key with its declared CSP footprint.\n *\n * This is the ONLY channel the CSP composition can read a provider's origins\n * from: the CLI is a Node process and a frontend provider module is\n * browser-bound, so the footprint has to be data by the time it gets here.\n */\nasync function writeFrontendProvidersArtifact(\n root: string,\n bootstrapsByServiceKey: Record<string, Record<string, { readonly csp?: unknown; readonly publicConfig?: unknown }>>,\n): Promise<void> {\n const entry = (ref: string, csp: unknown, publicConfig: unknown): Record<string, unknown> => ({\n metadata: defineProviderMetadata({\n ref,\n packageName: `@wildo-ai/provider-${ref}`,\n tier: ProviderTier.CATALOGUE,\n origin: ENGINE_PROVIDER_ORIGIN,\n }),\n providerCapabilities: [],\n protocols: [],\n ...(csp === undefined ? {} : { csp }),\n ...(publicConfig === undefined ? {} : { publicConfig }),\n // Every served entry carries its key list (#1705): the artifact reader refuses one that does not.\n publicConfigKeys: Object.keys((publicConfig ?? {}) as Record<string, unknown>),\n });\n\n await writeFile(\n join(root, PROVIDER_RUNTIME_ARTIFACT_RELATIVE_PATHS.frontendServices),\n `${JSON.stringify(\n {\n __AUTOGENERATED__: PROVIDER_RUNTIME_ARTIFACT_AUTOGENERATED_WARNING,\n generatedBy: PROVIDER_RUNTIME_ARTIFACT_GENERATOR,\n generatedAt: '2026-09-06T00:00:00.000Z',\n sourceDigest: 'test-source-digest',\n providerRefs: [],\n providerGraphDigest: 'test-graph-digest',\n lockfileSectionDigest: 'test-lock-digest',\n artifactKind: 'frontendServices',\n modules: {},\n frontendProviderBootstraps: Object.fromEntries(\n Object.entries(bootstrapsByServiceKey).map(([serviceKey, providers]) => [\n serviceKey,\n {\n providers: Object.fromEntries(\n Object.entries(providers).map(([ref, provider]) => [ref, entry(ref, provider.csp, provider.publicConfig)]),\n ),\n },\n ]),\n ),\n },\n null,\n 2,\n )}\\n`,\n );\n}\n\nconst ACME_DERIVED_FOOTPRINT = {\n scriptOrigins: [],\n connectOrigins: [],\n frameOrigins: [],\n imgOrigins: [],\n styleOrigins: [],\n fontOrigins: [],\n workerOrigins: [],\n mediaOrigins: [],\n derivedOrigins: [{ publicConfigKey: 'dsn', bucket: 'connectOrigins' }],\n};\n\nconst ACME_FOOTPRINT = {\n scriptOrigins: ['https://js.acme.com'],\n connectOrigins: ['https://api.acme.com'],\n frameOrigins: [],\n imgOrigins: [],\n styleOrigins: [],\n fontOrigins: [],\n workerOrigins: [],\n mediaOrigins: [],\n derivedOrigins: [],\n};\n\nlet tempRoots: string[] = [];\n\nasync function writeFile(path: string, source: string): Promise<void> {\n await mkdir(join(path, '..'), { recursive: true });\n writeFileSync(path, source);\n}\n\nasync function createFixture(input: FixtureInput): Promise<string> {\n const root = mkdtempSync(join(tmpdir(), 'wildo-csp-sync-'));\n tempRoots.push(root);\n\n const authoredAppCsp = input.appCsp === undefined ? '{ enabled: true, reportOnly: true }' : input.appCsp;\n const appCspLine = authoredAppCsp === null ? '' : `\\n csp: ${authoredAppCsp},`;\n\n await mkdir(join(root, 'app', 'nginx-config'), { recursive: true });\n await mkdir(join(root, 'technical-doc'), { recursive: true });\n await mkdir(join(root, 'backend-api'), { recursive: true });\n await mkdir(join(root, 'infrastructure', 'local'), { recursive: true });\n\n await writeFile(\n join(root, 'wildo.saas.config.ts'),\n `import { AppFrontendType, defineSaaSProviders, defineSaasConfig } from '@wildo-ai/platform-config-lib';\n\nexport default defineSaasConfig({\n name: 'wonder-todos',\n slug: 'wonder-todos',\n displayName: 'Wonder Todos',\n type: 'saas',\n organizationTypes: { workspace: { userTypes: ['member'] } },\n services: {\n backendApi: { path: './backend-api', serviceName: 'wonder-todos-backend-api', defaultPort: 4241 },\n app: {\n path: './app',\n serviceName: 'wonder-todos-app',\n defaultPort: 4242,\n frontendType: AppFrontendType.SAAS_APP,${appCspLine}\n },\n docs: {\n path: './technical-doc',\n serviceName: 'wonder-todos-docs',\n defaultPort: 4244,\n frontendType: AppFrontendType.TECH_DOC,\n },\n },\n // REQUIRED since #1032, and every test in this file failed at config PARSE without it — before\n // reaching a line of CSP logic. One workstream's new mandatory field arrived as this suite's\n // sixteen red tests, all reporting a zod issue about organizationTypes. (No backticks in this\n // comment on purpose — it lives inside a template literal, so one would terminate the string.)\n //\n // The minimum a config can declare: one type, granting the user type the app registers.\n organizationTypes: {\n workspace: { userTypes: ['member'] },\n },\n engineCapabilities: {},\n providerConfigurations: {},\n providers: defineSaaSProviders({\n scopes: {\n backend: { providers: {} },\n frontendServices: {\n app: { providers: {} },\n docs: { providers: {} },\n },\n },\n }),\n dataServices: {\n mongodb: { databasePrefix: 'wonder-todos' },\n redis: { keyPrefix: 'wonder-todos:' },\n s3: { bucketPrefix: 'wonder-todos' },\n },\n});\n`,\n );\n\n await writeFile(\n join(root, 'infrastructure', 'local', 'wildo.infra.local.config.ts'),\n `import { BackingServiceSource, DatabaseEngine, WildoDeploymentRuntime, WildoEnvironment, defineInfraEnvConfig } from '@wildo-ai/platform-config-lib';\n\nexport default defineInfraEnvConfig({\n environment: WildoEnvironment.LOCAL,\n runtime: WildoDeploymentRuntime.DOCKER_COMPOSE,\n publicDomain: 'localhost',\n applicationDatabase: { engine: DatabaseEngine.MONGODB },\n backingServices: {\n mongodb: { source: BackingServiceSource.SELF, database: 'wonder-todos-db', host: 'localhost', port: 27017 },\n redis: { source: BackingServiceSource.SELF, host: 'localhost', port: 6379, database: 0 },\n rabbitmq: { source: BackingServiceSource.SELF, host: 'localhost', port: 5672, vhost: 'wonder-todos' },\n s3: { source: BackingServiceSource.SELF, provider: 'minio', endpoint: 'http://localhost:9000', bucket: 'wonder-todos-local' },\n },\n csp: ${input.infraCsp},\n});\n`,\n );\n\n if (input.docsCsp !== undefined) {\n await writeFile(\n join(root, 'technical-doc', 'wildo.tech-doc.config.ts'),\n `export default { csp: ${input.docsCsp} };\\n`,\n );\n await mkdir(join(root, 'technical-doc', 'nginx-config'), { recursive: true });\n await writeFile(\n join(root, 'technical-doc', 'nginx-config', 'default.conf'),\n `server {\\n # >>> wildo csp begin\\n # stale\\n # <<< wildo csp end\\n}\\n`,\n );\n }\n\n await writeFile(\n join(root, 'app', 'nginx-config', 'default.conf'),\n `server {\n # >>> wildo csp begin\n # stale\n # <<< wildo csp end\n}\n`,\n );\n\n return root;\n}\n\ndescribe('CspSyncService', () => {\n let stderrWriteSpy: ReturnType<typeof vi.spyOn>;\n\n beforeEach(() => {\n stderrWriteSpy = vi.spyOn(process.stderr, 'write').mockImplementation(() => true);\n });\n\n afterEach(() => {\n stderrWriteSpy.mockRestore();\n for (const root of tempRoots) {\n rmSync(root, { recursive: true, force: true });\n }\n tempRoots = [];\n });\n\n it('generates artifacts and rewrites nginx marker pairs for the requested frontend service', async () => {\n const root = await createFixture({\n infraCsp: `{\n app: { extraDirectives: { 'connect-src': ['http://localhost:4241'] } },\n docs: { extraDirectives: { 'connect-src': ['http://localhost:4241'] } },\n }`,\n });\n\n const result = await CspSyncService.sync({\n saasRoot: root,\n envName: 'local',\n serviceKey: 'app',\n env: { VITE_API_BASE_URL: 'http://localhost:4241' } as NodeJS.ProcessEnv,\n });\n\n expect(result.services).toEqual([\n expect.objectContaining({\n serviceKey: 'app',\n generatedArtifactPath: 'app/src/generated/csp.generated.json',\n generatedArtifactOutOfDate: true,\n outOfDateNginxFiles: ['app/nginx-config/default.conf'],\n wroteChanges: true,\n }),\n ]);\n\n const generated = JSON.parse(\n readFileSync(join(root, 'app', 'src', 'generated', 'csp.generated.json'), 'utf-8'),\n ) as { connectSrc: string[]; nginxHeaderName: string };\n expect(generated.connectSrc).toContain('http://localhost:4241');\n // The resolver auto-derives the WebSocket-scheme companion origin so the\n // Socket.IO transport upgrade against the backend origin is not blocked by\n // `connect-src`. See `augmentConnectSrcWithWebSocketOrigins` in csp-emit.\n expect(generated.connectSrc).toContain('ws://localhost:4241');\n expect(generated.nginxHeaderName).toBe('Content-Security-Policy-Report-Only');\n\n const nginxConfig = readFileSync(join(root, 'app', 'nginx-config', 'default.conf'), 'utf-8');\n expect(nginxConfig).toContain('add_header Content-Security-Policy-Report-Only');\n expect(nginxConfig).toContain(\"connect-src 'self' http://localhost:4241 ws://localhost:4241\");\n });\n\n /**\n * The two things a check mode can silently get wrong, pinned together (#513).\n *\n * A check that WRITES is not a check — it repairs the drift it was asked to report, so CI passes\n * and the artifact in the repository stays wrong until someone commits the repair by accident.\n * And a check that reports nothing is indistinguishable from a repository with no drift, which is\n * the false-green shape every rule in `.claude/rules/` about search results exists for.\n *\n * So this asserts BOTH halves against the same fixture: the drift is reported, and the files are\n * byte-identical afterwards. Mutation-proven — making `checkOnly` write reddens the byte\n * assertions, and making it skip the comparison reddens the reporting one.\n */\n it('CHECKS without writing: reports the drift and leaves every file byte-identical', async () => {\n const root = await createFixture({\n infraCsp: `{\n app: { extraDirectives: { 'connect-src': ['http://localhost:4241'] } },\n }`,\n });\n\n const artifactPath = join(root, 'app', 'src', 'generated', 'csp.generated.json');\n const nginxPath = join(root, 'app', 'nginx-config', 'default.conf');\n const artifactBefore = existsSync(artifactPath) ? readFileSync(artifactPath, 'utf-8') : null;\n const nginxBefore = readFileSync(nginxPath, 'utf-8');\n\n const checked = await CspSyncService.sync({\n saasRoot: root,\n envName: 'local',\n serviceKey: 'app',\n env: { VITE_API_BASE_URL: 'http://localhost:4241' } as NodeJS.ProcessEnv,\n checkOnly: true,\n });\n\n expect(checked.services).toEqual([\n expect.objectContaining({\n serviceKey: 'app',\n generatedArtifactOutOfDate: true,\n outOfDateNginxFiles: ['app/nginx-config/default.conf'],\n // The whole point: it saw the drift and touched nothing.\n wroteChanges: false,\n }),\n ]);\n\n expect(existsSync(artifactPath) ? readFileSync(artifactPath, 'utf-8') : null).toBe(artifactBefore);\n expect(readFileSync(nginxPath, 'utf-8')).toBe(nginxBefore);\n });\n\n /**\n * The CLEAN control, and it is not optional.\n *\n * Without it, a check stuck on \"everything is out of date\" passes the test above — and would fail\n * CI forever on a repository that is perfectly current, which trains everyone to pass `--no-verify`.\n * Syncing first and then checking is also the exact sequence a developer runs, so this pins the\n * contract that matters: `sync` then `--check` is quiet.\n */\n it('reports nothing once the artifacts have been synced, so a current repository passes', async () => {\n const root = await createFixture({\n infraCsp: `{\n app: { extraDirectives: { 'connect-src': ['http://localhost:4241'] } },\n }`,\n });\n const env = { VITE_API_BASE_URL: 'http://localhost:4241' } as NodeJS.ProcessEnv;\n\n await CspSyncService.sync({ saasRoot: root, envName: 'local', serviceKey: 'app', env });\n const checked = await CspSyncService.sync({\n saasRoot: root, envName: 'local', serviceKey: 'app', env, checkOnly: true,\n });\n\n expect(checked.services).toEqual([\n expect.objectContaining({\n serviceKey: 'app',\n generatedArtifactOutOfDate: false,\n outOfDateNginxFiles: [],\n wroteChanges: false,\n }),\n ]);\n });\n\n /**\n * The shape a FRESHLY SCAFFOLDED application has (#417).\n *\n * `resolveAppCsp` used to throw for a SAAS_APP service authoring no `csp` block, and neither the\n * skeleton template nor Wonder CRM authors one — so `wildo dev start` refused on Wonder CRM and\n * on every application `wildo init` had just produced. The default is taken from\n * `WildoCspConfigSchema` rather than written as a literal here, so this pin asserts the SCHEMA'S\n * posture (CSP off until an author opts in) and not a second copy of it.\n *\n * Isolating: reverting `?? WildoCspConfigSchema.parse({})` to the throw reddens exactly this test\n * and nothing else in the file, because every other case authors a block.\n */\n it('SYNCS a SaaS app that authors no csp block, defaulting to the pilot posture instead of refusing', async () => {\n // Wonder CRM's exact shape: an infra layer that names the backend origin, and NO app-static\n // `services.app.csp` block. That is what made it the cheapest reproduction of #417 — Wonder\n // Todos authors both layers and cannot reproduce it at all.\n const root = await createFixture({\n infraCsp: `{\n app: { extraDirectives: { 'connect-src': ['http://localhost:4241'] } },\n }`,\n appCsp: null,\n });\n\n const result = await CspSyncService.sync({\n saasRoot: root,\n envName: 'local',\n serviceKey: 'app',\n env: { VITE_API_BASE_URL: 'http://localhost:4241' } as NodeJS.ProcessEnv,\n });\n\n expect(result.services).toEqual([\n expect.objectContaining({ serviceKey: 'app', wroteChanges: true }),\n ]);\n\n // Report-only, which is the posture the schema's JSDoc prescribes for a first-time author and\n // the one the skeleton's shipped artifact already claims. NOT the schema's bare `{}` default:\n // that resolves to `enabled: false`, and `resolveServicePolicies` refuses a CSP-capable\n // frontend whose policy resolves to null — a SECOND refusal #417's measurement did not name.\n const generated = JSON.parse(\n readFileSync(join(root, 'app', 'src', 'generated', 'csp.generated.json'), 'utf-8'),\n ) as { connectSrc: string[]; nginxHeaderName: string };\n expect(generated.nginxHeaderName).toBe('Content-Security-Policy-Report-Only');\n // The app can still reach its own backend: report-only would not block it either way, but a\n // policy that omits the API origin is one flip of `reportOnly` away from breaking the app.\n expect(generated.connectSrc).toContain('http://localhost:4241');\n });\n\n /**\n * The SCAFFOLDED shape end to end: no app-static block, and the infra `csp` block the skeleton\n * template now ships (#417). Distinct from the pin above, which fixes only the app-static layer —\n * this one asserts the whole chain a fresh `wildo init` produces.\n *\n * Written because the first fix passed its own pin and still left the scaffold broken: the\n * refusal has THREE sites, not the one the issue named. `resolveAppCsp` (fixed), the\n * disabled-policy guard in `resolveServicePolicies` (which is why the default is enabled rather\n * than the schema's bare `{}`), and `assertRuntimeOriginsAllowed`, which demands the API origin\n * and is what the skeleton's infra block now supplies.\n *\n * Scoped to `app` because that IS the bare skeleton: a scaffolded application has one CSP-capable\n * frontend until `add-website` or `add-technical-doc` gives it another, and each of those\n * scenarios ships its own `csp` block.\n */\n it('SYNCS the shape a fresh scaffold produces — infra names the backend origin, nothing authors an app-static block', async () => {\n const root = await createFixture({\n infraCsp: `{\n app: { extraDirectives: { 'connect-src': ['http://localhost:4241'] } },\n }`,\n appCsp: null,\n });\n\n const result = await CspSyncService.sync({\n saasRoot: root,\n envName: 'local',\n serviceKey: 'app',\n env: { VITE_API_BASE_URL: 'http://localhost:4241' } as NodeJS.ProcessEnv,\n });\n\n expect(result.services.map((service) => service.serviceKey)).toContain('app');\n const generated = JSON.parse(\n readFileSync(join(root, 'app', 'src', 'generated', 'csp.generated.json'), 'utf-8'),\n ) as { connectSrc: string[]; nginxHeaderName: string };\n expect(generated.nginxHeaderName).toBe('Content-Security-Policy-Report-Only');\n expect(generated.connectSrc).toContain('http://localhost:4241');\n });\n\n it('marks every CSP-capable frontend key as consumed when syncing a single service', async () => {\n const root = await createFixture({\n infraCsp: `{\n app: { extraDirectives: { 'connect-src': ['http://localhost:4241'] } },\n docs: { extraDirectives: { 'connect-src': ['http://localhost:4241'] } },\n }`,\n });\n\n await CspSyncService.sync({\n saasRoot: root,\n envName: 'local',\n serviceKey: 'app',\n env: { VITE_API_BASE_URL: 'http://localhost:4241' } as NodeJS.ProcessEnv,\n });\n\n const warnings = stderrWriteSpy.mock.calls.map(([message]) => String(message)).join('\\n');\n expect(warnings).not.toContain(\"field 'csp.app'\");\n expect(warnings).not.toContain(\"field 'csp.docs'\");\n });\n\n it('rejects infra CSP overrides for services that are not CSP-capable frontends', async () => {\n const root = await createFixture({\n infraCsp: `{\n backendApi: { extraDirectives: { 'connect-src': ['http://localhost:4241'] } },\n }`,\n });\n\n await expect(\n CspSyncService.sync({\n saasRoot: root,\n envName: 'local',\n serviceKey: 'app',\n env: { VITE_API_BASE_URL: 'http://localhost:4241' } as NodeJS.ProcessEnv,\n }),\n ).rejects.toThrow('services that are not CSP-capable frontends: backendApi');\n });\n\n it(\"admits a declared provider's origins into the service's composed policy\", async () => {\n const root = await createFixture({\n infraCsp: `{\n app: { extraDirectives: { 'connect-src': ['http://localhost:4241'] } },\n docs: { extraDirectives: { 'connect-src': ['http://localhost:4241'] } },\n }`,\n });\n await writeFrontendProvidersArtifact(root, { app: { acme: { csp: ACME_FOOTPRINT } } });\n\n await CspSyncService.sync({\n saasRoot: root,\n envName: 'local',\n serviceKey: 'app',\n env: { VITE_API_BASE_URL: 'http://localhost:4241' } as NodeJS.ProcessEnv,\n });\n\n const generated = JSON.parse(\n readFileSync(join(root, 'app', 'src', 'generated', 'csp.generated.json'), 'utf-8'),\n ) as { connectSrc: string[]; nginxPolicyValue: string };\n\n expect(generated.connectSrc).toContain('https://api.acme.com');\n expect(generated.nginxPolicyValue).toContain('https://js.acme.com');\n // The provider layer runs before the WebSocket derivation, so a provider's\n // realtime origin is authorized without anyone authoring the wss:// form.\n expect(generated.connectSrc).toContain('wss://api.acme.com');\n });\n\n it(\"keeps one service's provider origins out of another service's policy\", async () => {\n // The isolation that makes the layer safe. The provider is declared for the\n // docs service only; the app's policy must not gain a single one of its\n // origins. Paired with the test above — same footprint, declared under the\n // app, reaching the app's policy — this pins that the SERVICE KEY is what\n // selects, and not merely that some artifact was read.\n const root = await createFixture({\n infraCsp: `{\n app: { extraDirectives: { 'connect-src': ['http://localhost:4241'] } },\n docs: { extraDirectives: { 'connect-src': ['http://localhost:4241'] } },\n }`,\n });\n await writeFrontendProvidersArtifact(root, { docs: { acme: { csp: ACME_FOOTPRINT } } });\n\n await CspSyncService.sync({\n saasRoot: root,\n envName: 'local',\n serviceKey: 'app',\n env: { VITE_API_BASE_URL: 'http://localhost:4241' } as NodeJS.ProcessEnv,\n });\n\n const appPolicy = JSON.parse(\n readFileSync(join(root, 'app', 'src', 'generated', 'csp.generated.json'), 'utf-8'),\n ) as { nginxPolicyValue: string; connectSrc: string[] };\n\n expect(appPolicy.nginxPolicyValue).not.toContain('https://js.acme.com');\n expect(appPolicy.connectSrc).not.toContain('https://api.acme.com');\n });\n\n it('syncs normally when no provider artifact exists at all', async () => {\n // A clean checkout, or an application declaring no frontend provider, has\n // none. Refusing here would make `sync-csp` depend on a sync having run.\n const root = await createFixture({\n infraCsp: `{\n app: { extraDirectives: { 'connect-src': ['http://localhost:4241'] } },\n docs: { extraDirectives: { 'connect-src': ['http://localhost:4241'] } },\n }`,\n });\n\n await expect(\n CspSyncService.sync({\n saasRoot: root,\n envName: 'local',\n serviceKey: 'app',\n env: { VITE_API_BASE_URL: 'http://localhost:4241' } as NodeJS.ProcessEnv,\n }),\n ).resolves.toBeDefined();\n });\n\n it('syncs normally when a declared provider carries no footprint', async () => {\n const root = await createFixture({\n infraCsp: `{\n app: { extraDirectives: { 'connect-src': ['http://localhost:4241'] } },\n docs: { extraDirectives: { 'connect-src': ['http://localhost:4241'] } },\n }`,\n });\n await writeFrontendProvidersArtifact(root, { app: { acme: {} } });\n\n const result = await CspSyncService.sync({\n saasRoot: root,\n envName: 'local',\n serviceKey: 'app',\n env: { VITE_API_BASE_URL: 'http://localhost:4241' } as NodeJS.ProcessEnv,\n });\n\n expect(result.services).toHaveLength(1);\n });\n\n it(\"reads a provider's DERIVED origin out of its own public config\", async () => {\n // The endpoint a provider cannot know: an error-monitoring DSN, an\n // analytics api host, a self-hosted deployment. The provider declares WHERE\n // the origin is; this is the one place that has both the footprint and the\n // config to read it from.\n const root = await createFixture({\n infraCsp: `{\n app: { extraDirectives: { 'connect-src': ['http://localhost:4241'] } },\n docs: { extraDirectives: { 'connect-src': ['http://localhost:4241'] } },\n }`,\n });\n await writeFrontendProvidersArtifact(root, {\n app: {\n acme: {\n csp: ACME_DERIVED_FOOTPRINT,\n publicConfig: { dsn: 'https://public-key@o42.ingest.example.com/7' },\n },\n },\n });\n\n await CspSyncService.sync({\n saasRoot: root,\n envName: 'local',\n serviceKey: 'app',\n env: { VITE_API_BASE_URL: 'http://localhost:4241' } as NodeJS.ProcessEnv,\n });\n\n const generated = JSON.parse(\n readFileSync(join(root, 'app', 'src', 'generated', 'csp.generated.json'), 'utf-8'),\n ) as { connectSrc: string[] };\n\n // The origin only — never the DSN, which carries a key in its userinfo.\n expect(generated.connectSrc).toContain('https://o42.ingest.example.com');\n expect(generated.connectSrc.join(' ')).not.toContain('public-key');\n expect(generated.connectSrc).toContain('wss://o42.ingest.example.com');\n });\n\n it('composes the worker and media buckets, including an origin DERIVED into one (#1702)', async () => {\n // The derived-origin resolver used to re-list the six original buckets by hand, so an origin derived\n // into a newer bucket crashed the sync, and a declared one beside a derived origin was erased.\n const root = await createFixture({\n infraCsp: `{\n app: { extraDirectives: { 'connect-src': ['http://localhost:4241'] } },\n docs: { extraDirectives: { 'connect-src': ['http://localhost:4241'] } },\n }`,\n });\n await writeFrontendProvidersArtifact(root, {\n app: {\n maps: {\n csp: {\n ...ACME_FOOTPRINT,\n workerOrigins: ['blob:'],\n mediaOrigins: ['https://media.maps.example.com'],\n derivedOrigins: [{ publicConfigKey: 'tileHost', bucket: 'workerOrigins' }],\n },\n publicConfig: { tileHost: 'https://tiles.maps.example.com/v1' },\n },\n },\n });\n\n await CspSyncService.sync({\n saasRoot: root,\n envName: 'local',\n serviceKey: 'app',\n env: { VITE_API_BASE_URL: 'http://localhost:4241' } as NodeJS.ProcessEnv,\n });\n\n const generated = JSON.parse(\n readFileSync(join(root, 'app', 'src', 'generated', 'csp.generated.json'), 'utf-8'),\n ) as { nginxPolicyValue: string };\n const directive = (name: string): string | undefined =>\n generated.nginxPolicyValue.split(';').map((part) => part.trim()).find((part) => part.startsWith(`${name} `));\n\n expect(directive('worker-src')).toContain('blob:');\n expect(directive('worker-src')).toContain('https://tiles.maps.example.com');\n // Seeded from the directive it was falling back to, so the page keeps its own workers.\n expect(directive('worker-src')).toContain(\"'self'\");\n expect(directive('media-src')).toContain('https://media.maps.example.com');\n });\n\n it('contributes nothing when the derived key is not configured', async () => {\n // An application that has not turned that provider on needs no origin for\n // it, and refusing would make an unconfigured optional provider break sync.\n const root = await createFixture({\n infraCsp: `{\n app: { extraDirectives: { 'connect-src': ['http://localhost:4241'] } },\n docs: { extraDirectives: { 'connect-src': ['http://localhost:4241'] } },\n }`,\n });\n await writeFrontendProvidersArtifact(root, { app: { acme: { csp: ACME_DERIVED_FOOTPRINT } } });\n\n const result = await CspSyncService.sync({\n saasRoot: root,\n envName: 'local',\n serviceKey: 'app',\n env: { VITE_API_BASE_URL: 'http://localhost:4241' } as NodeJS.ProcessEnv,\n });\n\n expect(result.services).toHaveLength(1);\n });\n\n it('REFUSES a derived key that is configured but is not an absolute URL', async () => {\n // The one case where the application said something and the framework\n // cannot honour it. Dropping it silently is the blocked-in-production-only\n // failure this whole layer exists to remove.\n const root = await createFixture({\n infraCsp: `{\n app: { extraDirectives: { 'connect-src': ['http://localhost:4241'] } },\n docs: { extraDirectives: { 'connect-src': ['http://localhost:4241'] } },\n }`,\n });\n await writeFrontendProvidersArtifact(root, {\n app: { acme: { csp: ACME_DERIVED_FOOTPRINT, publicConfig: { dsn: 'not-a-url' } } },\n });\n\n await expect(\n CspSyncService.sync({\n saasRoot: root,\n envName: 'local',\n serviceKey: 'app',\n env: { VITE_API_BASE_URL: 'http://localhost:4241' } as NodeJS.ProcessEnv,\n }),\n ).rejects.toThrow(/is not an absolute URL/);\n });\n});\n\n/**\n * A per-service CSP block reaches the resolver through a bare cast with NO validation (#442).\n *\n * `resolveAppCsp` returned it verbatim, so a hand-written PARTIAL block — the shape an author who\n * does not use the `define*Config` helper naturally writes — arrived without the schema's defaults\n * and killed the sync with `TypeError: Cannot convert undefined or null to object`: a stack trace\n * naming neither their file nor the missing field.\n *\n * The config surface PERMITS hand-authoring, so \"use the helper\" is not an answer. Parsing here is.\n */\ndescribe('CspSyncService — a hand-authored per-service block', () => {\n it('ACCEPTS a partial block, defaulting the rest, instead of crashing on a missing directive map', async () => {\n const root = await createFixture({\n infraCsp: `{\n app: { extraDirectives: { 'connect-src': ['http://localhost:4241'] } },\n docs: { extraDirectives: { 'connect-src': ['http://localhost:4241'] } },\n }`,\n // Enabled and report-only, and NOTHING else: no `directives`, no `mergeStrategy`. Every field\n // the resolver goes on to read has to come from the schema.\n docsCsp: `{ enabled: true, reportOnly: true }`,\n });\n\n const result = await CspSyncService.sync({\n saasRoot: root,\n envName: 'local',\n serviceKey: 'docs',\n env: { VITE_API_BASE_URL: 'http://localhost:4241' } as NodeJS.ProcessEnv,\n });\n\n expect(result.services).toEqual([\n expect.objectContaining({ serviceKey: 'docs', wroteChanges: true }),\n ]);\n });\n\n it('REFUSES a typo with a message naming the key, rather than silently turning CSP off', async () => {\n /*\n * `WildoCspConfigSchema` is a `z.strictObject`, and that is the second thing parsing buys.\n * `enable: true` is not `enabled: true`; unparsed it resolves to `enabled: false` — what the\n * schema's own JSDoc calls \"CSP off, the worst possible default\" — and the sync reports success.\n */\n const root = await createFixture({\n infraCsp: `{\n app: { extraDirectives: { 'connect-src': ['http://localhost:4241'] } },\n docs: { extraDirectives: { 'connect-src': ['http://localhost:4241'] } },\n }`,\n docsCsp: `{ enable: true, reportOnly: true }`,\n });\n\n await expect(CspSyncService.sync({\n saasRoot: root,\n envName: 'local',\n serviceKey: 'docs',\n env: { VITE_API_BASE_URL: 'http://localhost:4241' } as NodeJS.ProcessEnv,\n })).rejects.toThrow(/enable/);\n });\n});\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"csp-sync.service.d.ts","sourceRoot":"","sources":["../../../../../../src/services/security/csp-sync.service.ts"],"names":[],"mappings":"AASA,OAAO,EACL,eAAe,EAaf,KAAK,iBAAiB,EAIvB,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"csp-sync.service.d.ts","sourceRoot":"","sources":["../../../../../../src/services/security/csp-sync.service.ts"],"names":[],"mappings":"AASA,OAAO,EACL,eAAe,EAaf,KAAK,iBAAiB,EAIvB,MAAM,+BAA+B,CAAC;AAWvC,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,CAAC;IAC9B,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,OAAO,EAAE;QAChB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;QACzB,QAAQ,CAAC,UAAU,EAAE;YACnB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;YAC9B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;SAC1B,CAAC;KACH,GA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CAkD7E"}
|
|
@@ -4,7 +4,7 @@ import { AppFrontendType, ConfigArtifactsZone, EnvCspOverrideSchema, NGINX_CSP_B
|
|
|
4
4
|
import { loadInfraEnvConfig, withConsumedInfraCspServiceKeys } from '@wildo-ai/platform-config-lib';
|
|
5
5
|
// The footprint type is owned by the package that puts it on the wire, and is
|
|
6
6
|
// read here through the same public door every browser-bound consumer uses.
|
|
7
|
-
import { normalizeProviderFrontendCspFootprint, } from '@wildo-ai/saas-models/public-runtime';
|
|
7
|
+
import { normalizeProviderFrontendCspFootprint, PROVIDER_FRONTEND_CSP_ORIGIN_BUCKETS, } from '@wildo-ai/saas-models/public-runtime';
|
|
8
8
|
const FRONTEND_TYPES_WITH_CSP = new Set([
|
|
9
9
|
AppFrontendType.SAAS_APP,
|
|
10
10
|
AppFrontendType.TECH_DOC,
|
|
@@ -320,14 +320,10 @@ function resolveProviderCspFootprint(provider, serviceKey) {
|
|
|
320
320
|
// Resolved here, so nothing downstream has to know the bucket existed.
|
|
321
321
|
derivedOrigins: [],
|
|
322
322
|
});
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
imgOrigins: [...resolved.imgOrigins],
|
|
328
|
-
styleOrigins: [...resolved.styleOrigins],
|
|
329
|
-
fontOrigins: [...resolved.fontOrigins],
|
|
330
|
-
};
|
|
323
|
+
// Every bucket, from the enum (#1702). This used to be a hand-written list of six, so a provider that
|
|
324
|
+
// derived an origin into a bucket added later (worker, media) would have crashed here, and one that
|
|
325
|
+
// merely declared such a bucket beside a derived origin would have had it silently erased.
|
|
326
|
+
const buckets = Object.fromEntries(PROVIDER_FRONTEND_CSP_ORIGIN_BUCKETS.map((bucket) => [bucket, [...resolved[bucket]]]));
|
|
331
327
|
for (const derived of footprint.derivedOrigins) {
|
|
332
328
|
const configured = provider.publicConfig?.[derived.publicConfigKey];
|
|
333
329
|
if (configured === undefined || configured === null || configured === '')
|
|
@@ -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,oBAAoB,EACpB,sBAAsB,EACtB,gBAAgB,EAChB,UAAU,EACV,iCAAiC,EACjC,yBAAyB,EACzB,gBAAgB,EAChB,mCAAmC,EACnC,0BAA0B,EAC1B,gCAAgC,EAChC,oBAAoB,GAKrB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,kBAAkB,EAAE,+BAA+B,EAAE,MAAM,+BAA+B,CAAC;AACpG,8EAA8E;AAC9E,4EAA4E;AAC5E,OAAO,EACL,qCAAqC,GAEtC,MAAM,sCAAsC,CAAC;AA+D9C,MAAM,uBAAuB,GAAG,IAAI,GAAG,CAAkB;IACvD,eAAe,CAAC,QAAQ;IACxB,eAAe,CAAC,QAAQ;IACxB,eAAe,CAAC,cAAc;CAC/B,CAAC,CAAC;AAEH,SAAS,0BAA0B,CAAC,KAAc;IAChD,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QAChD,MAAM,IAAI,KAAK,CAAC,6DAA6D,CAAC,CAAC;IACjF,CAAC;IAED,OAAO,KAA8B,CAAC;AACxC,CAAC;AAED;;;;;;;GAOG;AACH,SAAS,8BAA8B,CACrC,KAA4B,EAC5B,QAAgB,EAChB,OAAoC;IAEpC,MAAM,UAAU,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC;IACzD,IAAI,aAAa,GAAkB,IAAI,CAAC;IAExC,IAAI,CAAC;QACH,aAAa,G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W,EAAE,KAAK,EAAE,WAAW,EAAE,oBAAoB,CAAC,CAAC;YAC7F,MAAM,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,kBAAkB,CAAC,CAAC,WAAW;oBAChG,CAAC,CAAC,+BAA+B,CAAC,eAAe,EAAE,kBAAkB,CAAC,kBAAkB,CAAC,CAAC;gBAC5F,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 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 type ResolvedCspPolicy,\n type WildoCspConfig,\n type WildoInfraEnvConfig,\n type WildoSaasConfig,\n} from '@wildo-ai/platform-config-lib';\nimport { loadInfraEnvConfig, withConsumedInfraCspServiceKeys } 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 type ProviderFrontendCspFootprint,\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 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, addHeaderLine: string): boolean {\n const original = readFileSync(filePath, 'utf-8');\n const { rewritten } = rewriteNginxCspMarkerPairsString(original, addHeaderLine, 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\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 });\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(\n saasRoot: string,\n envName: string,\n consumedCspServiceKeys: Iterable<string>,\n): Promise<WildoInfraEnvConfig> {\n const consumedKeys = [...consumedCspServiceKeys];\n const previousEnvValue = process.env.WILDO_CONSUMED_INFRA_CSP_SERVICE_KEYS;\n process.env.WILDO_CONSUMED_INFRA_CSP_SERVICE_KEYS = [\n ...(previousEnvValue ?? '').split(',').map((value) => value.trim()).filter(Boolean),\n ...consumedKeys,\n ].join(',');\n\n try {\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 return await withConsumedInfraCspServiceKeys(consumedKeys, async () => {\n const loaded = await loadInfraEnvConfig(saasRoot, envName);\n if (loaded === null) {\n throw new Error(`Config file not found: ${resolveAuthoredInfraConfigPath(saasRoot, envName)}`);\n }\n return loaded.config;\n });\n } finally {\n if (previousEnvValue === undefined) {\n delete process.env.WILDO_CONSUMED_INFRA_CSP_SERVICE_KEYS;\n } else {\n process.env.WILDO_CONSUMED_INFRA_CSP_SERVICE_KEYS = previousEnvValue;\n }\n }\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 const buckets: Record<string, string[]> = {\n scriptOrigins: [...resolved.scriptOrigins],\n connectOrigins: [...resolved.connectOrigins],\n frameOrigins: [...resolved.frameOrigins],\n imgOrigins: [...resolved.imgOrigins],\n styleOrigins: [...resolved.styleOrigins],\n fontOrigins: [...resolved.fontOrigins],\n };\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 * 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 allCspServiceEntries = resolveFrontendServiceEntries(saasConfig, undefined);\n const serviceEntries = resolveFrontendServiceEntries(saasConfig, input.serviceKey);\n const consumedCspServiceKeys = allCspServiceEntries.map(([serviceKey]) => serviceKey);\n const infraConfig = await loadInfraConfig(saasRoot, input.envName, consumedCspServiceKeys);\n\n assertInfraCspKeysExistAsServices(\n infraConfig,\n saasConfig,\n new Set(consumedCspServiceKeys),\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 });\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 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.nginxAddHeaderLine).fileWritten\n : nginxCspMarkerPairsAreOutOfDate(nginxConfigFile, generatedArtifacts.nginxAddHeaderLine);\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,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7D,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,oBAAoB,EACpB,sBAAsB,EACtB,gBAAgB,EAChB,UAAU,EACV,iCAAiC,EACjC,yBAAyB,EACzB,gBAAgB,EAChB,mC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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 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 type ResolvedCspPolicy,\n type WildoCspConfig,\n type WildoInfraEnvConfig,\n type WildoSaasConfig,\n} from '@wildo-ai/platform-config-lib';\nimport { loadInfraEnvConfig, withConsumedInfraCspServiceKeys } 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 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, addHeaderLine: string): boolean {\n const original = readFileSync(filePath, 'utf-8');\n const { rewritten } = rewriteNginxCspMarkerPairsString(original, addHeaderLine, 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\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 });\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(\n saasRoot: string,\n envName: string,\n consumedCspServiceKeys: Iterable<string>,\n): Promise<WildoInfraEnvConfig> {\n const consumedKeys = [...consumedCspServiceKeys];\n const previousEnvValue = process.env.WILDO_CONSUMED_INFRA_CSP_SERVICE_KEYS;\n process.env.WILDO_CONSUMED_INFRA_CSP_SERVICE_KEYS = [\n ...(previousEnvValue ?? '').split(',').map((value) => value.trim()).filter(Boolean),\n ...consumedKeys,\n ].join(',');\n\n try {\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 return await withConsumedInfraCspServiceKeys(consumedKeys, async () => {\n const loaded = await loadInfraEnvConfig(saasRoot, envName);\n if (loaded === null) {\n throw new Error(`Config file not found: ${resolveAuthoredInfraConfigPath(saasRoot, envName)}`);\n }\n return loaded.config;\n });\n } finally {\n if (previousEnvValue === undefined) {\n delete process.env.WILDO_CONSUMED_INFRA_CSP_SERVICE_KEYS;\n } else {\n process.env.WILDO_CONSUMED_INFRA_CSP_SERVICE_KEYS = previousEnvValue;\n }\n }\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 * 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 allCspServiceEntries = resolveFrontendServiceEntries(saasConfig, undefined);\n const serviceEntries = resolveFrontendServiceEntries(saasConfig, input.serviceKey);\n const consumedCspServiceKeys = allCspServiceEntries.map(([serviceKey]) => serviceKey);\n const infraConfig = await loadInfraConfig(saasRoot, input.envName, consumedCspServiceKeys);\n\n assertInfraCspKeysExistAsServices(\n infraConfig,\n saasConfig,\n new Set(consumedCspServiceKeys),\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 });\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 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.nginxAddHeaderLine).fileWritten\n : nginxCspMarkerPairsAreOutOfDate(nginxConfigFile, generatedArtifacts.nginxAddHeaderLine);\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"]}
|
package/dist/src/services/website/__tests__/website-structured-data-audit.adapter-seam.test.js
CHANGED
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
import { mkdtempSync, mkdirSync, rmSync, writeFileSync } from 'node:fs';
|
|
2
2
|
import { tmpdir } from 'node:os';
|
|
3
3
|
import { join } from 'node:path';
|
|
4
|
-
import { afterEach, describe, expect, it } from 'vitest';
|
|
4
|
+
import { afterEach, describe, expect, it, vi } from 'vitest';
|
|
5
5
|
import { WebsiteStructuredDataAuditService } from '../website-structured-data-audit.service.js';
|
|
6
|
+
/*
|
|
7
|
+
* The fallback loads the specifications ROOT lazily, and what is under test is the CHOICE, not the
|
|
8
|
+
* catalog's contents — so the root is substituted with a sentinel. Loading the real root here would
|
|
9
|
+
* make this file's result depend on every module that barrel initialises.
|
|
10
|
+
*/
|
|
11
|
+
const ENGINE_CATALOG_SENTINEL = vi.hoisted(() => [{ type: 'EngineCatalogSentinel' }]);
|
|
12
|
+
/*
|
|
13
|
+
* The resolver is a spy returning a sentinel: what this file pins is that the CLI DELEGATES the whole
|
|
14
|
+
* decision, not what the resolver decides (that is pinned beside the resolver, in saas-specifications).
|
|
15
|
+
* A mock that re-implemented the resolver here would let the CLI grow its own copy unnoticed.
|
|
16
|
+
*/
|
|
17
|
+
const resolveApplicationSchemaOrgCatalog = vi.hoisted(() => vi.fn(() => ENGINE_CATALOG_SENTINEL));
|
|
18
|
+
vi.mock('@wildo-ai/saas-specifications', () => ({ resolveApplicationSchemaOrgCatalog }));
|
|
6
19
|
/**
|
|
7
20
|
* The application-owned composition seam is USED, and the generic path survives it (#493).
|
|
8
21
|
*
|
|
@@ -91,4 +104,14 @@ describe('website structured-data audit — the application composition seam', (
|
|
|
91
104
|
await expect(selectComposition(root, [])).rejects.toThrow(/delete the file/);
|
|
92
105
|
});
|
|
93
106
|
});
|
|
107
|
+
describe('website structured-data audit — which catalog is the authority', () => {
|
|
108
|
+
it('delegates the choice to resolveApplicationSchemaOrgCatalog, whatever the application declares', async () => {
|
|
109
|
+
const { resolveWebsiteSchemaOrgCatalog } = await import('../website-structured-data-audit.service.js');
|
|
110
|
+
for (const exports of [{ catalogSpecifications: { schemaOrg: [{ type: 'AppOverrideSentinel' }] } }, {}, { catalogSpecifications: {} }]) {
|
|
111
|
+
resolveApplicationSchemaOrgCatalog.mockClear();
|
|
112
|
+
expect(await resolveWebsiteSchemaOrgCatalog(exports)).toBe(ENGINE_CATALOG_SENTINEL);
|
|
113
|
+
expect(resolveApplicationSchemaOrgCatalog).toHaveBeenCalledWith(exports);
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
});
|
|
94
117
|
//# sourceMappingURL=website-structured-data-audit.adapter-seam.test.js.map
|
package/dist/src/services/website/__tests__/website-structured-data-audit.adapter-seam.test.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"website-structured-data-audit.adapter-seam.test.js","sourceRoot":"","sources":["../../../../../../../src/services/website/__tests__/website-structured-data-audit.adapter-seam.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxE,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,SAA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MAAM,MAAM,CAAC,iBAAiB,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,oCAAoC,CAAC,CAAC;QAChG,MAAM,MAAM,CAAC,iBAAiB,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAC/E,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { mkdtempSync, mkdirSync, rmSync, writeFileSync } from 'node:fs';\nimport { tmpdir } from 'node:os';\nimport { join } from 'node:path';\nimport { afterEach, describe, expect, it } from 'vitest';\n\nimport { WebsiteStructuredDataAuditService } from '../website-structured-data-audit.service';\n\n/**\n * The application-owned composition seam is USED, and the generic path survives it (#493).\n *\n * `structured-data/reconcile-structured-data.ts` was written so a website could own the assembly of\n * its own page, section and page-payload registries — and the audit loaded all three sources itself\n * instead, so the adapter had no caller. Two compositions of one thing, and only one of them was\n * ever run.\n *\n * These drive the selection directly rather than through `audit()`, which needs a resolvable SaaS\n * root, a specifications companion and a website service. The selection IS the change; going through\n * `audit()` would have proved that a whole application still audits, which is a different claim and\n * one the end-to-end run against `wonder-todos` already carries.\n */\nconst temporaryRoots: string[] = [];\n\nfunction makeWebsiteSourceRoot(adapterSource?: string): string {\n const root = mkdtempSync(join(tmpdir(), 'wildo-website-seam-'));\n temporaryRoots.push(root);\n /*\n * `\"type\": \"module\"` is NOT decoration, and finding out why cost a debugging round.\n *\n * `loadWebsiteSourceModule` goes through `tsImport`, which decides ESM-vs-CJS from the nearest\n * `package.json`. A fixture without one is loaded as CJS, its module namespace comes back as\n * `{ default, 'module.exports' }`, and every NAMED export disappears — so the seam reports\n * \"exports no reconcileStructuredData()\" against a file that plainly exports it.\n *\n * A real website source root always sits inside an ESM package, which is why the end-to-end run\n * against `wonder-todos` works. The fixture has to model that or it tests the loader's CJS\n * fallback rather than the seam. The same constraint governs the generic path's three loads, and\n * is the reason neither handles CJS interop.\n */\n writeFileSync(join(root, 'package.json'), JSON.stringify({ name: 'seam-fixture', type: 'module' }), 'utf8');\n if (adapterSource !== undefined) {\n mkdirSync(join(root, 'structured-data'), { recursive: true });\n writeFileSync(join(root, 'structured-data', 'reconcile-structured-data.ts'), adapterSource, 'utf8');\n }\n return root;\n}\n\n/** The private selection method — `private` is a compile-time claim, and the seam is what is under test. */\nfunction selectComposition(websiteSourceRoot: string, catalog: readonly unknown[]): Promise<unknown> {\n return (WebsiteStructuredDataAuditService as unknown as {\n reconcileThroughApplicationAdapter: (root: string, catalog: readonly unknown[]) => Promise<unknown>;\n }).reconcileThroughApplicationAdapter(websiteSourceRoot, catalog);\n}\n\nafterEach(() => {\n while (temporaryRoots.length > 0) {\n rmSync(temporaryRoots.pop() as string, { recursive: true, force: true });\n }\n});\n\ndescribe('website structured-data audit — the application composition seam', () => {\n it('calls the application adapter and returns ITS report', async () => {\n const root = makeWebsiteSourceRoot(`\n export function reconcileStructuredData(catalog: readonly unknown[]) {\n return { result: { findings: [], pages: [] }, pageCount: catalog.length, sectionCount: 7 };\n }\n `);\n\n const report = await selectComposition(root, ['a', 'b', 'c']);\n\n expect(report).toMatchObject({ sectionCount: 7 });\n // `pageCount` is derived from the catalog the audit handed over, so this also pins that the\n // catalog REACHES the adapter — the audit keeps owning which specification is authoritative and\n // delegates only \"which declarations does this site have\".\n expect(report).toMatchObject({ pageCount: 3 });\n });\n\n it('awaits an adapter that composes asynchronously', async () => {\n // A site whose page payloads come from content files has every reason to be async. The generic\n // path already awaited its payload resolver; the seam must not be narrower than the path it\n // replaces.\n const root = makeWebsiteSourceRoot(`\n export async function reconcileStructuredData() {\n return { result: { findings: [], pages: [] }, pageCount: 1, sectionCount: 1 };\n }\n `);\n\n await expect(selectComposition(root, [])).resolves.toMatchObject({ pageCount: 1 });\n });\n\n it('returns UNDEFINED when the site has no adapter, so the generic path stays reachable', async () => {\n /*\n * Load-bearing. The `add-website` scenario template ships no `structured-data/` directory at\n * all, so every freshly scaffolded site takes this branch — making the adapter mandatory would\n * have made those sites un-auditable the moment the preference landed.\n */\n const root = makeWebsiteSourceRoot();\n\n await expect(selectComposition(root, [])).resolves.toBeUndefined();\n });\n\n it('REFUSES an adapter file that exports no reconcileStructuredData, naming both ways out', async () => {\n // Present-but-wrong is not the same as absent. Falling back silently here would audit the site\n // through a composition its author did not write, while believing they had opted out of it.\n const root = makeWebsiteSourceRoot(`export const somethingElse = 1;`);\n\n await expect(selectComposition(root, [])).rejects.toThrow(/exports no reconcileStructuredData/);\n await expect(selectComposition(root, [])).rejects.toThrow(/delete the file/);\n });\n});\n"]}
|
|
1
|
+
{"version":3,"file":"website-structured-data-audit.adapter-seam.test.js","sourceRoot":"","sources":["../../../../../../../src/services/website/__tests__/website-structured-data-audit.adapter-seam.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxE,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAE7D,OAAO,EAAE,iCAAiC,EAAE,MAAM,0CAA0C,CAAC;AAE7F;;;;GAIG;AACH,MAAM,uBAAuB,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,uBAAuB,EAAE,CAAC,CAAC,CAAC;AACtF;;;;GAIG;AACH,MAAM,kCAAkC,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,uBAAuB,CAAC,CAAC,CAAC;AAClG,EAAE,CAAC,IAAI,CAAC,+BAA+B,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,kCAAkC,EAAE,CAAC,C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AAC;QAChG,MAAM,MAAM,CAAC,iBAAiB,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAC/E,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,QAAQ,CAAC,gEAAgE,EAAE,GAAG,EAAE;IAC9E,EAAE,CAAC,+FAA+F,EAAE,KAAK,IAAI,EAAE;QAC7G,MAAM,EAAE,8BAA8B,EAAE,GAAG,MAAM,MAAM,CAAC,0CAA0C,CAAC,CAAC;QACpG,KAAK,MAAM,OAAO,IAAI,CAAC,EAAE,qBAAqB,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,qBAAqB,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,qBAAqB,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC;YACvI,kCAAkC,CAAC,SAAS,EAAE,CAAC;YAC/C,MAAM,CAAC,MAAM,8BAA8B,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC;YACpF,MAAM,CAAC,kCAAkC,CAAC,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC;QAC3E,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { mkdtempSync, mkdirSync, rmSync, writeFileSync } from 'node:fs';\nimport { tmpdir } from 'node:os';\nimport { join } from 'node:path';\nimport { afterEach, describe, expect, it, vi } from 'vitest';\n\nimport { WebsiteStructuredDataAuditService } from '../website-structured-data-audit.service';\n\n/*\n * The fallback loads the specifications ROOT lazily, and what is under test is the CHOICE, not the\n * catalog's contents — so the root is substituted with a sentinel. Loading the real root here would\n * make this file's result depend on every module that barrel initialises.\n */\nconst ENGINE_CATALOG_SENTINEL = vi.hoisted(() => [{ type: 'EngineCatalogSentinel' }]);\n/*\n * The resolver is a spy returning a sentinel: what this file pins is that the CLI DELEGATES the whole\n * decision, not what the resolver decides (that is pinned beside the resolver, in saas-specifications).\n * A mock that re-implemented the resolver here would let the CLI grow its own copy unnoticed.\n */\nconst resolveApplicationSchemaOrgCatalog = vi.hoisted(() => vi.fn(() => ENGINE_CATALOG_SENTINEL));\nvi.mock('@wildo-ai/saas-specifications', () => ({ resolveApplicationSchemaOrgCatalog }));\n\n/**\n * The application-owned composition seam is USED, and the generic path survives it (#493).\n *\n * `structured-data/reconcile-structured-data.ts` was written so a website could own the assembly of\n * its own page, section and page-payload registries — and the audit loaded all three sources itself\n * instead, so the adapter had no caller. Two compositions of one thing, and only one of them was\n * ever run.\n *\n * These drive the selection directly rather than through `audit()`, which needs a resolvable SaaS\n * root, a specifications companion and a website service. The selection IS the change; going through\n * `audit()` would have proved that a whole application still audits, which is a different claim and\n * one the end-to-end run against `wonder-todos` already carries.\n */\nconst temporaryRoots: string[] = [];\n\nfunction makeWebsiteSourceRoot(adapterSource?: string): string {\n const root = mkdtempSync(join(tmpdir(), 'wildo-website-seam-'));\n temporaryRoots.push(root);\n /*\n * `\"type\": \"module\"` is NOT decoration, and finding out why cost a debugging round.\n *\n * `loadWebsiteSourceModule` goes through `tsImport`, which decides ESM-vs-CJS from the nearest\n * `package.json`. A fixture without one is loaded as CJS, its module namespace comes back as\n * `{ default, 'module.exports' }`, and every NAMED export disappears — so the seam reports\n * \"exports no reconcileStructuredData()\" against a file that plainly exports it.\n *\n * A real website source root always sits inside an ESM package, which is why the end-to-end run\n * against `wonder-todos` works. The fixture has to model that or it tests the loader's CJS\n * fallback rather than the seam. The same constraint governs the generic path's three loads, and\n * is the reason neither handles CJS interop.\n */\n writeFileSync(join(root, 'package.json'), JSON.stringify({ name: 'seam-fixture', type: 'module' }), 'utf8');\n if (adapterSource !== undefined) {\n mkdirSync(join(root, 'structured-data'), { recursive: true });\n writeFileSync(join(root, 'structured-data', 'reconcile-structured-data.ts'), adapterSource, 'utf8');\n }\n return root;\n}\n\n/** The private selection method — `private` is a compile-time claim, and the seam is what is under test. */\nfunction selectComposition(websiteSourceRoot: string, catalog: readonly unknown[]): Promise<unknown> {\n return (WebsiteStructuredDataAuditService as unknown as {\n reconcileThroughApplicationAdapter: (root: string, catalog: readonly unknown[]) => Promise<unknown>;\n }).reconcileThroughApplicationAdapter(websiteSourceRoot, catalog);\n}\n\nafterEach(() => {\n while (temporaryRoots.length > 0) {\n rmSync(temporaryRoots.pop() as string, { recursive: true, force: true });\n }\n});\n\ndescribe('website structured-data audit — the application composition seam', () => {\n it('calls the application adapter and returns ITS report', async () => {\n const root = makeWebsiteSourceRoot(`\n export function reconcileStructuredData(catalog: readonly unknown[]) {\n return { result: { findings: [], pages: [] }, pageCount: catalog.length, sectionCount: 7 };\n }\n `);\n\n const report = await selectComposition(root, ['a', 'b', 'c']);\n\n expect(report).toMatchObject({ sectionCount: 7 });\n // `pageCount` is derived from the catalog the audit handed over, so this also pins that the\n // catalog REACHES the adapter — the audit keeps owning which specification is authoritative and\n // delegates only \"which declarations does this site have\".\n expect(report).toMatchObject({ pageCount: 3 });\n });\n\n it('awaits an adapter that composes asynchronously', async () => {\n // A site whose page payloads come from content files has every reason to be async. The generic\n // path already awaited its payload resolver; the seam must not be narrower than the path it\n // replaces.\n const root = makeWebsiteSourceRoot(`\n export async function reconcileStructuredData() {\n return { result: { findings: [], pages: [] }, pageCount: 1, sectionCount: 1 };\n }\n `);\n\n await expect(selectComposition(root, [])).resolves.toMatchObject({ pageCount: 1 });\n });\n\n it('returns UNDEFINED when the site has no adapter, so the generic path stays reachable', async () => {\n /*\n * Load-bearing. The `add-website` scenario template ships no `structured-data/` directory at\n * all, so every freshly scaffolded site takes this branch — making the adapter mandatory would\n * have made those sites un-auditable the moment the preference landed.\n */\n const root = makeWebsiteSourceRoot();\n\n await expect(selectComposition(root, [])).resolves.toBeUndefined();\n });\n\n it('REFUSES an adapter file that exports no reconcileStructuredData, naming both ways out', async () => {\n // Present-but-wrong is not the same as absent. Falling back silently here would audit the site\n // through a composition its author did not write, while believing they had opted out of it.\n const root = makeWebsiteSourceRoot(`export const somethingElse = 1;`);\n\n await expect(selectComposition(root, [])).rejects.toThrow(/exports no reconcileStructuredData/);\n await expect(selectComposition(root, [])).rejects.toThrow(/delete the file/);\n });\n});\n\ndescribe('website structured-data audit — which catalog is the authority', () => {\n it('delegates the choice to resolveApplicationSchemaOrgCatalog, whatever the application declares', async () => {\n const { resolveWebsiteSchemaOrgCatalog } = await import('../website-structured-data-audit.service');\n for (const exports of [{ catalogSpecifications: { schemaOrg: [{ type: 'AppOverrideSentinel' }] } }, {}, { catalogSpecifications: {} }]) {\n resolveApplicationSchemaOrgCatalog.mockClear();\n expect(await resolveWebsiteSchemaOrgCatalog(exports)).toBe(ENGINE_CATALOG_SENTINEL);\n expect(resolveApplicationSchemaOrgCatalog).toHaveBeenCalledWith(exports);\n }\n });\n});\n"]}
|