@wildo-ai/platform-config-lib 1.1.11 → 1.1.13

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.
Files changed (389) hide show
  1. package/dist/esm/_unimplemented/soft-warn.d.ts +24 -49
  2. package/dist/esm/_unimplemented/soft-warn.d.ts.map +1 -1
  3. package/dist/esm/_unimplemented/soft-warn.js +24 -49
  4. package/dist/esm/_unimplemented/soft-warn.js.map +1 -1
  5. package/dist/esm/blueprint/anchored-region.d.ts.map +1 -1
  6. package/dist/esm/blueprint/anchored-region.js.map +1 -1
  7. package/dist/esm/blueprint/blueprint.schemas.d.ts +0 -89
  8. package/dist/esm/blueprint/blueprint.schemas.d.ts.map +1 -1
  9. package/dist/esm/blueprint/blueprint.schemas.js.map +1 -1
  10. package/dist/esm/bootstrap/application-backend-env.contracts.d.ts.map +1 -1
  11. package/dist/esm/bootstrap/application-backend-env.contracts.js.map +1 -1
  12. package/dist/esm/bootstrap/application-creation-verification-env.contracts.d.ts.map +1 -1
  13. package/dist/esm/bootstrap/application-creation-verification-env.contracts.js.map +1 -1
  14. package/dist/esm/bootstrap/bootstrap-planner.d.ts.map +1 -1
  15. package/dist/esm/bootstrap/bootstrap-planner.js.map +1 -1
  16. package/dist/esm/bootstrap/bootstrap.contracts.d.ts.map +1 -1
  17. package/dist/esm/bootstrap/bootstrap.contracts.js.map +1 -1
  18. package/dist/esm/bootstrap/bootstrap.schemas.d.ts +8 -1
  19. package/dist/esm/bootstrap/bootstrap.schemas.d.ts.map +1 -1
  20. package/dist/esm/bootstrap/bootstrap.schemas.js +15 -1
  21. package/dist/esm/bootstrap/bootstrap.schemas.js.map +1 -1
  22. package/dist/esm/bootstrap/platform-runtime-env.contracts.d.ts +10 -2
  23. package/dist/esm/bootstrap/platform-runtime-env.contracts.d.ts.map +1 -1
  24. package/dist/esm/bootstrap/platform-runtime-env.contracts.js +10 -2
  25. package/dist/esm/bootstrap/platform-runtime-env.contracts.js.map +1 -1
  26. package/dist/esm/bootstrap/platform-store-preconnect.d.ts +21 -0
  27. package/dist/esm/bootstrap/platform-store-preconnect.d.ts.map +1 -1
  28. package/dist/esm/bootstrap/platform-store-preconnect.js +25 -0
  29. package/dist/esm/bootstrap/platform-store-preconnect.js.map +1 -1
  30. package/dist/esm/bootstrap/postgresql-owed-grants.contracts.d.ts +80 -0
  31. package/dist/esm/bootstrap/postgresql-owed-grants.contracts.d.ts.map +1 -0
  32. package/dist/esm/bootstrap/postgresql-owed-grants.contracts.js +81 -0
  33. package/dist/esm/bootstrap/postgresql-owed-grants.contracts.js.map +1 -0
  34. package/dist/esm/bootstrap/runtime-backing-service-access.d.ts +41 -9
  35. package/dist/esm/bootstrap/runtime-backing-service-access.d.ts.map +1 -1
  36. package/dist/esm/bootstrap/runtime-backing-service-access.js +77 -28
  37. package/dist/esm/bootstrap/runtime-backing-service-access.js.map +1 -1
  38. package/dist/esm/bootstrap/runtime-network-policy.d.ts +117 -12
  39. package/dist/esm/bootstrap/runtime-network-policy.d.ts.map +1 -1
  40. package/dist/esm/bootstrap/runtime-network-policy.js +222 -23
  41. package/dist/esm/bootstrap/runtime-network-policy.js.map +1 -1
  42. package/dist/esm/bootstrap/runtime-network-topology.d.ts +31 -4
  43. package/dist/esm/bootstrap/runtime-network-topology.d.ts.map +1 -1
  44. package/dist/esm/bootstrap/runtime-network-topology.js +43 -2
  45. package/dist/esm/bootstrap/runtime-network-topology.js.map +1 -1
  46. package/dist/esm/bootstrap/runtime-platform-access.d.ts.map +1 -1
  47. package/dist/esm/bootstrap/runtime-platform-access.js.map +1 -1
  48. package/dist/esm/bootstrap/runtime-principal.contracts.d.ts +40 -2
  49. package/dist/esm/bootstrap/runtime-principal.contracts.d.ts.map +1 -1
  50. package/dist/esm/bootstrap/runtime-principal.contracts.js +66 -3
  51. package/dist/esm/bootstrap/runtime-principal.contracts.js.map +1 -1
  52. package/dist/esm/bootstrap/runtime-response-integrity.d.ts.map +1 -1
  53. package/dist/esm/bootstrap/runtime-response-integrity.js +3 -3
  54. package/dist/esm/bootstrap/runtime-response-integrity.js.map +1 -1
  55. package/dist/esm/bootstrap/runtime-secret-env.contracts.d.ts.map +1 -1
  56. package/dist/esm/bootstrap/runtime-secret-env.contracts.js.map +1 -1
  57. package/dist/esm/bootstrap/runtime-topology.contracts.d.ts.map +1 -1
  58. package/dist/esm/bootstrap/runtime-topology.contracts.js.map +1 -1
  59. package/dist/esm/bootstrap/wildo-owner-organization.contracts.d.ts.map +1 -1
  60. package/dist/esm/bootstrap/wildo-owner-organization.contracts.js.map +1 -1
  61. package/dist/esm/canonical-json/rfc8785-canonical-json.d.ts.map +1 -1
  62. package/dist/esm/canonical-json/rfc8785-canonical-json.js.map +1 -1
  63. package/dist/esm/config-authoring.entry.d.ts.map +1 -1
  64. package/dist/esm/config-authoring.entry.js.map +1 -1
  65. package/dist/esm/credentials/credential-generator.service.d.ts.map +1 -1
  66. package/dist/esm/credentials/credential-generator.service.js.map +1 -1
  67. package/dist/esm/index.d.ts +5 -1
  68. package/dist/esm/index.d.ts.map +1 -1
  69. package/dist/esm/index.js +5 -1
  70. package/dist/esm/index.js.map +1 -1
  71. package/dist/esm/key-management/application-legacy-envelope-key.contracts.d.ts +119 -0
  72. package/dist/esm/key-management/application-legacy-envelope-key.contracts.d.ts.map +1 -0
  73. package/dist/esm/key-management/application-legacy-envelope-key.contracts.js +109 -0
  74. package/dist/esm/key-management/application-legacy-envelope-key.contracts.js.map +1 -0
  75. package/dist/esm/key-management/application-signing-key-rotation.contracts.d.ts +182 -0
  76. package/dist/esm/key-management/application-signing-key-rotation.contracts.d.ts.map +1 -0
  77. package/dist/esm/key-management/application-signing-key-rotation.contracts.js +145 -0
  78. package/dist/esm/key-management/application-signing-key-rotation.contracts.js.map +1 -0
  79. package/dist/esm/key-management/approval-seal-manifested-copy.d.ts +156 -0
  80. package/dist/esm/key-management/approval-seal-manifested-copy.d.ts.map +1 -0
  81. package/dist/esm/key-management/approval-seal-manifested-copy.js +617 -0
  82. package/dist/esm/key-management/approval-seal-manifested-copy.js.map +1 -0
  83. package/dist/esm/key-management/approval-seal-verifier.d.ts +114 -40
  84. package/dist/esm/key-management/approval-seal-verifier.d.ts.map +1 -1
  85. package/dist/esm/key-management/approval-seal-verifier.js +143 -12
  86. package/dist/esm/key-management/approval-seal-verifier.js.map +1 -1
  87. package/dist/esm/key-management/approval-seal.contracts.d.ts +12 -15
  88. package/dist/esm/key-management/approval-seal.contracts.d.ts.map +1 -1
  89. package/dist/esm/key-management/approval-seal.contracts.js +20 -0
  90. package/dist/esm/key-management/approval-seal.contracts.js.map +1 -1
  91. package/dist/esm/key-management/data-key.contracts.d.ts +0 -2
  92. package/dist/esm/key-management/data-key.contracts.d.ts.map +1 -1
  93. package/dist/esm/key-management/data-key.contracts.js.map +1 -1
  94. package/dist/esm/key-management/es256-jws.d.ts.map +1 -1
  95. package/dist/esm/key-management/es256-jws.js.map +1 -1
  96. package/dist/esm/key-management/key-provider.spi.d.ts +8 -1
  97. package/dist/esm/key-management/key-provider.spi.d.ts.map +1 -1
  98. package/dist/esm/key-management/key-provider.spi.js.map +1 -1
  99. package/dist/esm/key-management/keyring-rotation.contracts.d.ts +2 -12
  100. package/dist/esm/key-management/keyring-rotation.contracts.d.ts.map +1 -1
  101. package/dist/esm/key-management/keyring-rotation.contracts.js +3 -3
  102. package/dist/esm/key-management/keyring-rotation.contracts.js.map +1 -1
  103. package/dist/esm/key-management/keyring-status.contracts.d.ts +0 -7
  104. package/dist/esm/key-management/keyring-status.contracts.d.ts.map +1 -1
  105. package/dist/esm/key-management/keyring-status.contracts.js.map +1 -1
  106. package/dist/esm/key-management/pdf-incremental-update.d.ts +158 -0
  107. package/dist/esm/key-management/pdf-incremental-update.d.ts.map +1 -0
  108. package/dist/esm/key-management/pdf-incremental-update.js +730 -0
  109. package/dist/esm/key-management/pdf-incremental-update.js.map +1 -0
  110. package/dist/esm/key-management/pdf-truetype-font.d.ts +35 -0
  111. package/dist/esm/key-management/pdf-truetype-font.d.ts.map +1 -0
  112. package/dist/esm/key-management/pdf-truetype-font.js +152 -0
  113. package/dist/esm/key-management/pdf-truetype-font.js.map +1 -0
  114. package/dist/esm/key-management/qr-code.d.ts +38 -0
  115. package/dist/esm/key-management/qr-code.d.ts.map +1 -0
  116. package/dist/esm/key-management/qr-code.js +325 -0
  117. package/dist/esm/key-management/qr-code.js.map +1 -0
  118. package/dist/esm/key-management/signature-request.contracts.d.ts +0 -4
  119. package/dist/esm/key-management/signature-request.contracts.d.ts.map +1 -1
  120. package/dist/esm/key-management/signature-request.contracts.js.map +1 -1
  121. package/dist/esm/key-management/signing-log-export.contracts.d.ts +0 -1
  122. package/dist/esm/key-management/signing-log-export.contracts.d.ts.map +1 -1
  123. package/dist/esm/key-management/signing-log-export.contracts.js.map +1 -1
  124. package/dist/esm/key-management/vault-custody.contracts.d.ts +43 -0
  125. package/dist/esm/key-management/vault-custody.contracts.d.ts.map +1 -1
  126. package/dist/esm/key-management/vault-custody.contracts.js +66 -0
  127. package/dist/esm/key-management/vault-custody.contracts.js.map +1 -1
  128. package/dist/esm/lockfile/build-parallelism.d.ts.map +1 -1
  129. package/dist/esm/lockfile/build-parallelism.js.map +1 -1
  130. package/dist/esm/lockfile/canonical-json.d.ts +1 -1
  131. package/dist/esm/lockfile/canonical-json.d.ts.map +1 -1
  132. package/dist/esm/lockfile/canonical-json.js +1 -1
  133. package/dist/esm/lockfile/canonical-json.js.map +1 -1
  134. package/dist/esm/lockfile/file-lock-hold.d.ts.map +1 -1
  135. package/dist/esm/lockfile/file-lock-hold.js +2 -1
  136. package/dist/esm/lockfile/file-lock-hold.js.map +1 -1
  137. package/dist/esm/lockfile/lockfile-io.d.ts +6 -8
  138. package/dist/esm/lockfile/lockfile-io.d.ts.map +1 -1
  139. package/dist/esm/lockfile/lockfile-io.js +6 -8
  140. package/dist/esm/lockfile/lockfile-io.js.map +1 -1
  141. package/dist/esm/lockfile/materialize-infra-section.d.ts +5 -6
  142. package/dist/esm/lockfile/materialize-infra-section.d.ts.map +1 -1
  143. package/dist/esm/lockfile/materialize-infra-section.js +4 -5
  144. package/dist/esm/lockfile/materialize-infra-section.js.map +1 -1
  145. package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.d.ts +1 -247
  146. package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.d.ts.map +1 -1
  147. package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.js +1 -1
  148. package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.js.map +1 -1
  149. package/dist/esm/pnpm-settings/application-pnpm-settings.d.ts +146 -0
  150. package/dist/esm/pnpm-settings/application-pnpm-settings.d.ts.map +1 -0
  151. package/dist/esm/pnpm-settings/application-pnpm-settings.js +573 -0
  152. package/dist/esm/pnpm-settings/application-pnpm-settings.js.map +1 -0
  153. package/dist/esm/project-config/application-public-pricing-catalog.loader.d.ts.map +1 -1
  154. package/dist/esm/project-config/application-public-pricing-catalog.loader.js +15 -3
  155. package/dist/esm/project-config/application-public-pricing-catalog.loader.js.map +1 -1
  156. package/dist/esm/project-config/application-served-public-documents.loader.d.ts.map +1 -1
  157. package/dist/esm/project-config/application-served-public-documents.loader.js +16 -8
  158. package/dist/esm/project-config/application-served-public-documents.loader.js.map +1 -1
  159. package/dist/esm/project-config/backend-compliance-section.reader.d.ts +35 -0
  160. package/dist/esm/project-config/backend-compliance-section.reader.d.ts.map +1 -0
  161. package/dist/esm/project-config/backend-compliance-section.reader.js +123 -0
  162. package/dist/esm/project-config/backend-compliance-section.reader.js.map +1 -0
  163. package/dist/esm/project-config/backend-compliance-section.worker.d.ts +20 -0
  164. package/dist/esm/project-config/backend-compliance-section.worker.d.ts.map +1 -0
  165. package/dist/esm/project-config/backend-compliance-section.worker.js +78 -0
  166. package/dist/esm/project-config/backend-compliance-section.worker.js.map +1 -0
  167. package/dist/esm/project-config/config-module-resolution.d.ts +32 -0
  168. package/dist/esm/project-config/config-module-resolution.d.ts.map +1 -0
  169. package/dist/esm/project-config/config-module-resolution.js +33 -0
  170. package/dist/esm/project-config/config-module-resolution.js.map +1 -0
  171. package/dist/esm/project-config/define-framework-config.d.ts.map +1 -1
  172. package/dist/esm/project-config/define-framework-config.js.map +1 -1
  173. package/dist/esm/project-config/define-infra-env-config.d.ts +146 -55
  174. package/dist/esm/project-config/define-infra-env-config.d.ts.map +1 -1
  175. package/dist/esm/project-config/define-infra-env-config.js +124 -71
  176. package/dist/esm/project-config/define-infra-env-config.js.map +1 -1
  177. package/dist/esm/project-config/define-minion-config.d.ts +26 -36
  178. package/dist/esm/project-config/define-minion-config.d.ts.map +1 -1
  179. package/dist/esm/project-config/define-minion-config.js +64 -25
  180. package/dist/esm/project-config/define-minion-config.js.map +1 -1
  181. package/dist/esm/project-config/define-saas-config.d.ts +41 -437
  182. package/dist/esm/project-config/define-saas-config.d.ts.map +1 -1
  183. package/dist/esm/project-config/define-saas-config.js +102 -94
  184. package/dist/esm/project-config/define-saas-config.js.map +1 -1
  185. package/dist/esm/project-config/define-worker-config.d.ts +10 -20
  186. package/dist/esm/project-config/define-worker-config.d.ts.map +1 -1
  187. package/dist/esm/project-config/define-worker-config.js +10 -12
  188. package/dist/esm/project-config/define-worker-config.js.map +1 -1
  189. package/dist/esm/project-config/hosted-infra-env-config.d.ts.map +1 -1
  190. package/dist/esm/project-config/hosted-infra-env-config.js +2 -1
  191. package/dist/esm/project-config/hosted-infra-env-config.js.map +1 -1
  192. package/dist/esm/project-config/index.d.ts +2 -0
  193. package/dist/esm/project-config/index.d.ts.map +1 -1
  194. package/dist/esm/project-config/index.js +2 -0
  195. package/dist/esm/project-config/index.js.map +1 -1
  196. package/dist/esm/project-config/loader-instances-zod.d.ts +19 -0
  197. package/dist/esm/project-config/loader-instances-zod.d.ts.map +1 -0
  198. package/dist/esm/project-config/loader-instances-zod.js +40 -0
  199. package/dist/esm/project-config/loader-instances-zod.js.map +1 -0
  200. package/dist/esm/project-config/loader.d.ts +131 -14
  201. package/dist/esm/project-config/loader.d.ts.map +1 -1
  202. package/dist/esm/project-config/loader.js +226 -12
  203. package/dist/esm/project-config/loader.js.map +1 -1
  204. package/dist/esm/project-config/minion-liveness.contracts.d.ts +131 -0
  205. package/dist/esm/project-config/minion-liveness.contracts.d.ts.map +1 -0
  206. package/dist/esm/project-config/minion-liveness.contracts.js +167 -0
  207. package/dist/esm/project-config/minion-liveness.contracts.js.map +1 -0
  208. package/dist/esm/project-config/minion-local-provider-registration.d.ts.map +1 -1
  209. package/dist/esm/project-config/minion-local-provider-registration.js.map +1 -1
  210. package/dist/esm/project-config/npm-version-range.d.ts.map +1 -1
  211. package/dist/esm/project-config/npm-version-range.js.map +1 -1
  212. package/dist/esm/project-config/owning-package-tsconfig.d.ts +7 -7
  213. package/dist/esm/project-config/owning-package-tsconfig.d.ts.map +1 -1
  214. package/dist/esm/project-config/owning-package-tsconfig.js +7 -7
  215. package/dist/esm/project-config/owning-package-tsconfig.js.map +1 -1
  216. package/dist/esm/project-config/provider-catalog-types.d.ts.map +1 -1
  217. package/dist/esm/project-config/provider-catalog-types.js.map +1 -1
  218. package/dist/esm/project-config/provider-companion-discovery.d.ts.map +1 -1
  219. package/dist/esm/project-config/provider-companion-discovery.js +3 -1
  220. package/dist/esm/project-config/provider-companion-discovery.js.map +1 -1
  221. package/dist/esm/project-config/provider-runtime-artifacts.d.ts +71 -46
  222. package/dist/esm/project-config/provider-runtime-artifacts.d.ts.map +1 -1
  223. package/dist/esm/project-config/provider-runtime-artifacts.js +150 -4
  224. package/dist/esm/project-config/provider-runtime-artifacts.js.map +1 -1
  225. package/dist/esm/project-config/shared/application-creation-verification.schemas.d.ts +0 -2
  226. package/dist/esm/project-config/shared/application-creation-verification.schemas.d.ts.map +1 -1
  227. package/dist/esm/project-config/shared/application-creation-verification.schemas.js.map +1 -1
  228. package/dist/esm/project-config/shared/application-modules.schemas.d.ts.map +1 -1
  229. package/dist/esm/project-config/shared/application-modules.schemas.js.map +1 -1
  230. package/dist/esm/project-config/shared/application-modules.utils.d.ts.map +1 -1
  231. package/dist/esm/project-config/shared/application-modules.utils.js.map +1 -1
  232. package/dist/esm/project-config/shared/auth.schemas.d.ts +0 -17
  233. package/dist/esm/project-config/shared/auth.schemas.d.ts.map +1 -1
  234. package/dist/esm/project-config/shared/auth.schemas.js.map +1 -1
  235. package/dist/esm/project-config/shared/backing-service-servability.d.ts.map +1 -1
  236. package/dist/esm/project-config/shared/backing-service-servability.js.map +1 -1
  237. package/dist/esm/project-config/shared/backing-services.schemas.d.ts +9 -10
  238. package/dist/esm/project-config/shared/backing-services.schemas.d.ts.map +1 -1
  239. package/dist/esm/project-config/shared/backing-services.schemas.js +13 -15
  240. package/dist/esm/project-config/shared/backing-services.schemas.js.map +1 -1
  241. package/dist/esm/project-config/shared/cdn.schemas.d.ts +0 -51
  242. package/dist/esm/project-config/shared/cdn.schemas.d.ts.map +1 -1
  243. package/dist/esm/project-config/shared/cdn.schemas.js.map +1 -1
  244. package/dist/esm/project-config/shared/csp-defaults.d.ts +34 -6
  245. package/dist/esm/project-config/shared/csp-defaults.d.ts.map +1 -1
  246. package/dist/esm/project-config/shared/csp-defaults.js +52 -8
  247. package/dist/esm/project-config/shared/csp-defaults.js.map +1 -1
  248. package/dist/esm/project-config/shared/csp-emit.d.ts +60 -13
  249. package/dist/esm/project-config/shared/csp-emit.d.ts.map +1 -1
  250. package/dist/esm/project-config/shared/csp-emit.js +77 -24
  251. package/dist/esm/project-config/shared/csp-emit.js.map +1 -1
  252. package/dist/esm/project-config/shared/csp.schemas.d.ts +72 -84
  253. package/dist/esm/project-config/shared/csp.schemas.d.ts.map +1 -1
  254. package/dist/esm/project-config/shared/csp.schemas.js +40 -12
  255. package/dist/esm/project-config/shared/csp.schemas.js.map +1 -1
  256. package/dist/esm/project-config/shared/data-services.schemas.d.ts +0 -8
  257. package/dist/esm/project-config/shared/data-services.schemas.d.ts.map +1 -1
  258. package/dist/esm/project-config/shared/data-services.schemas.js.map +1 -1
  259. package/dist/esm/project-config/shared/env-example-defaults.d.ts.map +1 -1
  260. package/dist/esm/project-config/shared/env-example-defaults.js.map +1 -1
  261. package/dist/esm/project-config/shared/environment.schemas.d.ts +95 -8
  262. package/dist/esm/project-config/shared/environment.schemas.d.ts.map +1 -1
  263. package/dist/esm/project-config/shared/environment.schemas.js +122 -10
  264. package/dist/esm/project-config/shared/environment.schemas.js.map +1 -1
  265. package/dist/esm/project-config/shared/infra-providers.schemas.d.ts +10 -4
  266. package/dist/esm/project-config/shared/infra-providers.schemas.d.ts.map +1 -1
  267. package/dist/esm/project-config/shared/infra-providers.schemas.js.map +1 -1
  268. package/dist/esm/project-config/shared/infra-service.schemas.d.ts.map +1 -1
  269. package/dist/esm/project-config/shared/infra-service.schemas.js.map +1 -1
  270. package/dist/esm/project-config/shared/infrastructure-defaults.schemas.d.ts +1 -1
  271. package/dist/esm/project-config/shared/infrastructure-defaults.schemas.d.ts.map +1 -1
  272. package/dist/esm/project-config/shared/infrastructure-defaults.schemas.js +1 -1
  273. package/dist/esm/project-config/shared/infrastructure-defaults.schemas.js.map +1 -1
  274. package/dist/esm/project-config/shared/k8s-utils.d.ts.map +1 -1
  275. package/dist/esm/project-config/shared/k8s-utils.js.map +1 -1
  276. package/dist/esm/project-config/shared/minion-platform-access.vocabulary.d.ts.map +1 -1
  277. package/dist/esm/project-config/shared/minion-platform-access.vocabulary.js.map +1 -1
  278. package/dist/esm/project-config/shared/minion-resource-access.validation.d.ts +20 -0
  279. package/dist/esm/project-config/shared/minion-resource-access.validation.d.ts.map +1 -1
  280. package/dist/esm/project-config/shared/minion-resource-access.validation.js +21 -2
  281. package/dist/esm/project-config/shared/minion-resource-access.validation.js.map +1 -1
  282. package/dist/esm/project-config/shared/object-storage-session-policy.d.ts.map +1 -1
  283. package/dist/esm/project-config/shared/object-storage-session-policy.js.map +1 -1
  284. package/dist/esm/project-config/shared/platform-key-management.schemas.d.ts +67 -38
  285. package/dist/esm/project-config/shared/platform-key-management.schemas.d.ts.map +1 -1
  286. package/dist/esm/project-config/shared/platform-key-management.schemas.js +113 -5
  287. package/dist/esm/project-config/shared/platform-key-management.schemas.js.map +1 -1
  288. package/dist/esm/project-config/shared/platform-services.schemas.d.ts.map +1 -1
  289. package/dist/esm/project-config/shared/platform-services.schemas.js.map +1 -1
  290. package/dist/esm/project-config/shared/platform-storage.schemas.d.ts +2 -2
  291. package/dist/esm/project-config/shared/platform-storage.schemas.d.ts.map +1 -1
  292. package/dist/esm/project-config/shared/platform-storage.schemas.js +16 -2
  293. package/dist/esm/project-config/shared/platform-storage.schemas.js.map +1 -1
  294. package/dist/esm/project-config/shared/service-definitions.schemas.d.ts +21 -23
  295. package/dist/esm/project-config/shared/service-definitions.schemas.d.ts.map +1 -1
  296. package/dist/esm/project-config/shared/service-definitions.schemas.js +4 -5
  297. package/dist/esm/project-config/shared/service-definitions.schemas.js.map +1 -1
  298. package/dist/esm/project-config/shared/systems-of-record-env.schemas.d.ts +0 -18
  299. package/dist/esm/project-config/shared/systems-of-record-env.schemas.d.ts.map +1 -1
  300. package/dist/esm/project-config/shared/systems-of-record-env.schemas.js.map +1 -1
  301. package/dist/esm/project-config/static-asset-import-noop.d.ts +20 -3
  302. package/dist/esm/project-config/static-asset-import-noop.d.ts.map +1 -1
  303. package/dist/esm/project-config/static-asset-import-noop.js +36 -20
  304. package/dist/esm/project-config/static-asset-import-noop.js.map +1 -1
  305. package/dist/esm/registry/artifact-domain.schemas.d.ts +0 -5
  306. package/dist/esm/registry/artifact-domain.schemas.d.ts.map +1 -1
  307. package/dist/esm/registry/artifact-domain.schemas.js.map +1 -1
  308. package/dist/esm/registry/digest.schemas.d.ts.map +1 -1
  309. package/dist/esm/registry/digest.schemas.js.map +1 -1
  310. package/dist/esm/registry/index.d.ts +2 -3
  311. package/dist/esm/registry/index.d.ts.map +1 -1
  312. package/dist/esm/registry/index.js +2 -3
  313. package/dist/esm/registry/index.js.map +1 -1
  314. package/dist/esm/registry/local-checkout-source.d.ts.map +1 -1
  315. package/dist/esm/registry/local-checkout-source.js.map +1 -1
  316. package/dist/esm/registry/lockfile-modules-section.schemas.d.ts +1 -98
  317. package/dist/esm/registry/lockfile-modules-section.schemas.d.ts.map +1 -1
  318. package/dist/esm/registry/lockfile-modules-section.schemas.js +1 -2
  319. package/dist/esm/registry/lockfile-modules-section.schemas.js.map +1 -1
  320. package/dist/esm/registry/module-artifact.schemas.d.ts +17 -17
  321. package/dist/esm/registry/module-artifact.schemas.d.ts.map +1 -1
  322. package/dist/esm/registry/module-artifact.schemas.js.map +1 -1
  323. package/dist/esm/registry/module-manifest.schemas.d.ts +151 -219
  324. package/dist/esm/registry/module-manifest.schemas.d.ts.map +1 -1
  325. package/dist/esm/registry/module-manifest.schemas.js +145 -13
  326. package/dist/esm/registry/module-manifest.schemas.js.map +1 -1
  327. package/dist/esm/registry/module-search.schemas.d.ts.map +1 -1
  328. package/dist/esm/registry/module-search.schemas.js.map +1 -1
  329. package/dist/esm/registry/registry-config.schemas.d.ts +0 -18
  330. package/dist/esm/registry/registry-config.schemas.d.ts.map +1 -1
  331. package/dist/esm/registry/registry-config.schemas.js.map +1 -1
  332. package/dist/esm/registry/registry-defaults.constants.d.ts.map +1 -1
  333. package/dist/esm/registry/registry-defaults.constants.js.map +1 -1
  334. package/dist/esm/registry/registry-errors.d.ts +81 -3
  335. package/dist/esm/registry/registry-errors.d.ts.map +1 -1
  336. package/dist/esm/registry/registry-errors.js +185 -4
  337. package/dist/esm/registry/registry-errors.js.map +1 -1
  338. package/dist/esm/registry/registry-keys.schemas.d.ts.map +1 -1
  339. package/dist/esm/registry/registry-keys.schemas.js.map +1 -1
  340. package/dist/esm/registry/registry-section-schemas.constants.d.ts.map +1 -1
  341. package/dist/esm/registry/registry-section-schemas.constants.js.map +1 -1
  342. package/dist/esm/registry/registry-url-resolution.d.ts.map +1 -1
  343. package/dist/esm/registry/registry-url-resolution.js.map +1 -1
  344. package/dist/esm/release/framework-release.constants.d.ts.map +1 -1
  345. package/dist/esm/release/framework-release.constants.js.map +1 -1
  346. package/dist/esm/schemas/framework-info.schemas.d.ts.map +1 -1
  347. package/dist/esm/schemas/framework-info.schemas.js.map +1 -1
  348. package/dist/esm/schemas/framework-secrets.schemas.d.ts +0 -7
  349. package/dist/esm/schemas/framework-secrets.schemas.d.ts.map +1 -1
  350. package/dist/esm/schemas/framework-secrets.schemas.js.map +1 -1
  351. package/dist/esm/schemas/platform-application-config.schemas.d.ts +1 -1
  352. package/dist/esm/schemas/platform-application-config.schemas.d.ts.map +1 -1
  353. package/dist/esm/schemas/platform-application-config.schemas.js.map +1 -1
  354. package/dist/esm/schemas/platform-application-secrets.schemas.d.ts +1 -1
  355. package/dist/esm/schemas/platform-application-secrets.schemas.d.ts.map +1 -1
  356. package/dist/esm/schemas/platform-application-secrets.schemas.js.map +1 -1
  357. package/dist/esm/schemas/platform-config.schemas.d.ts +2 -2
  358. package/dist/esm/schemas/platform-config.schemas.d.ts.map +1 -1
  359. package/dist/esm/schemas/platform-config.schemas.js.map +1 -1
  360. package/dist/esm/workspace-scope/application-subject-manifest.d.ts.map +1 -1
  361. package/dist/esm/workspace-scope/application-subject-manifest.js.map +1 -1
  362. package/dist/esm/workspace-scope/index.d.ts.map +1 -1
  363. package/dist/esm/workspace-scope/index.js.map +1 -1
  364. package/dist/esm/workspace-scope/resolve-homes.d.ts.map +1 -1
  365. package/dist/esm/workspace-scope/resolve-homes.js.map +1 -1
  366. package/dist/esm/workspace-scope/workspace-homes.schemas.d.ts.map +1 -1
  367. package/dist/esm/workspace-scope/workspace-homes.schemas.js.map +1 -1
  368. package/dist/esm/workspace-scope/workspace-scope-detector.d.ts.map +1 -1
  369. package/dist/esm/workspace-scope/workspace-scope-detector.js.map +1 -1
  370. package/dist/esm/workspace-scope/workspace-scope.schemas.d.ts.map +1 -1
  371. package/dist/esm/workspace-scope/workspace-scope.schemas.js.map +1 -1
  372. package/dist/tsconfig.build.tsbuildinfo +1 -1
  373. package/package.json +12 -12
  374. package/dist/esm/_unimplemented/index.d.ts +0 -3
  375. package/dist/esm/_unimplemented/index.d.ts.map +0 -1
  376. package/dist/esm/_unimplemented/index.js +0 -3
  377. package/dist/esm/_unimplemented/index.js.map +0 -1
  378. package/dist/esm/_unimplemented/unimplemented-field-warning.d.ts +0 -137
  379. package/dist/esm/_unimplemented/unimplemented-field-warning.d.ts.map +0 -1
  380. package/dist/esm/_unimplemented/unimplemented-field-warning.js +0 -153
  381. package/dist/esm/_unimplemented/unimplemented-field-warning.js.map +0 -1
  382. package/dist/esm/project-config/shared/cdn.example.d.ts +0 -14
  383. package/dist/esm/project-config/shared/cdn.example.d.ts.map +0 -1
  384. package/dist/esm/project-config/shared/cdn.example.js +0 -38
  385. package/dist/esm/project-config/shared/cdn.example.js.map +0 -1
  386. package/dist/esm/project-config/shared/schema-version.schemas.d.ts +0 -15
  387. package/dist/esm/project-config/shared/schema-version.schemas.d.ts.map +0 -1
  388. package/dist/esm/project-config/shared/schema-version.schemas.js +0 -40
  389. package/dist/esm/project-config/shared/schema-version.schemas.js.map +0 -1
@@ -64,16 +64,7 @@ export type GenericCdnVendorConfig = z.infer<typeof GenericCdnVendorConfigSchema
64
64
  */
65
65
  export declare const CloudflareCdnVendorConfigSchema: z.ZodObject<{
66
66
  kind: z.ZodLiteral<CdnVendor.CLOUDFLARE>;
67
- /**
68
- * Cloudflare zone id that fronts this frontend's public host. The publish
69
- * path PUTs the response-header-transform ruleset entrypoint on this zone.
70
- */
71
67
  zoneId: z.ZodString;
72
- /**
73
- * NAME of the environment variable holding the Cloudflare API token (a
74
- * scoped token with `Zone.Ruleset` edit on the zone). NOT the token itself.
75
- * Default `CLOUDFLARE_API_TOKEN`.
76
- */
77
68
  apiTokenEnvVar: z.ZodDefault<z.ZodString>;
78
69
  }, z.core.$strict>;
79
70
  export type CloudflareCdnVendorConfig = z.infer<typeof CloudflareCdnVendorConfigSchema>;
@@ -86,16 +77,7 @@ export declare const CdnVendorConfigSchema: z.ZodDiscriminatedUnion<[z.ZodObject
86
77
  kind: z.ZodLiteral<CdnVendor.GENERIC>;
87
78
  }, z.core.$strict>, z.ZodObject<{
88
79
  kind: z.ZodLiteral<CdnVendor.CLOUDFLARE>;
89
- /**
90
- * Cloudflare zone id that fronts this frontend's public host. The publish
91
- * path PUTs the response-header-transform ruleset entrypoint on this zone.
92
- */
93
80
  zoneId: z.ZodString;
94
- /**
95
- * NAME of the environment variable holding the Cloudflare API token (a
96
- * scoped token with `Zone.Ruleset` edit on the zone). NOT the token itself.
97
- * Default `CLOUDFLARE_API_TOKEN`.
98
- */
99
81
  apiTokenEnvVar: z.ZodDefault<z.ZodString>;
100
82
  }, z.core.$strict>], "kind">;
101
83
  export type CdnVendorConfig = z.infer<typeof CdnVendorConfigSchema>;
@@ -132,47 +114,14 @@ export type CdnVendorConfig = z.infer<typeof CdnVendorConfigSchema>;
132
114
  * falls back to `backingServices.s3.bucket`.
133
115
  */
134
116
  export declare const WildoCdnConfigSchema: z.ZodObject<{
135
- /**
136
- * Opt-out switch WITHOUT deleting the block. `true` (default) => this
137
- * service is CDN-served in this env (nginx pod + ingress route skipped,
138
- * publish path active). `false` => authored-but-inactive: the service falls
139
- * back to normal nginx-pod serving and the publish path ignores it. The
140
- * emit-skip / publish set keys on `enabled === true`, never on mere
141
- * presence, so a disabled entry never silently drops the ingress route.
142
- */
143
117
  enabled: z.ZodDefault<z.ZodBoolean>;
144
- /**
145
- * S3 bucket holding this frontend's PUBLIC static assets. Defaults to
146
- * `backingServices.s3.bucket` when omitted, but a SEPARATE public-read
147
- * bucket is recommended (do not mix public static assets with the app's
148
- * private user-uploaded files). The S3 endpoint + credentials always come
149
- * from `backingServices.s3`.
150
- */
151
118
  bucket: z.ZodOptional<z.ZodString>;
152
- /**
153
- * Optional object-key prefix within the bucket (e.g. when one bucket serves
154
- * several frontends). Defaults to the service key. No leading/trailing
155
- * slash — the uploader joins segments.
156
- */
157
119
  bucketPrefix: z.ZodOptional<z.ZodString>;
158
- /**
159
- * CDN vendor + its live-provisioning addressing. `GENERIC` = upload +
160
- * `_headers` only; branded vendors additionally push the edge CSP policy.
161
- */
162
120
  vendor: z.ZodDiscriminatedUnion<[z.ZodObject<{
163
121
  kind: z.ZodLiteral<CdnVendor.GENERIC>;
164
122
  }, z.core.$strict>, z.ZodObject<{
165
123
  kind: z.ZodLiteral<CdnVendor.CLOUDFLARE>;
166
- /**
167
- * Cloudflare zone id that fronts this frontend's public host. The publish
168
- * path PUTs the response-header-transform ruleset entrypoint on this zone.
169
- */
170
124
  zoneId: z.ZodString;
171
- /**
172
- * NAME of the environment variable holding the Cloudflare API token (a
173
- * scoped token with `Zone.Ruleset` edit on the zone). NOT the token itself.
174
- * Default `CLOUDFLARE_API_TOKEN`.
175
- */
176
125
  apiTokenEnvVar: z.ZodDefault<z.ZodString>;
177
126
  }, z.core.$strict>], "kind">;
178
127
  }, z.core.$strict>;
@@ -1 +1 @@
1
- {"version":3,"file":"cdn.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/project-config/shared/cdn.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;GAWG;AAEH;;;;;;;;;;;;;;GAcG;AACH,oBAAY,SAAS;IACnB;;;;;;OAMG;IACH,OAAO,YAAY;IACnB;;;;;;;;OAQG;IACH,UAAU,eAAe;CAC1B;AAED;;;GAGG;AACH,eAAO,MAAM,4BAA4B;;kBAEvC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF;;;;;;;GAOG;AACH,eAAO,MAAM,+BAA+B;;IAE1C;;;OAGG;;IAEH;;;;OAIG;;kBAEH,CAAC;AACH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AAExF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB;;;;IAnBhC;;;OAGG;;IAEH;;;;OAIG;;4BAaH,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,C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H;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,YAAY,CAAC;IACjD;;;;;;;OAOG;IACH,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IAClC;;;;;;OAMG;IACH,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IACpC;;;;OAIG;IACH,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC;;;OAGG;IACH,MAAM,EAAE,qBAAqB;CAC9B,CAAC,CAAC;AAGH,iDAAiD","sourcesContent":["import { z } from 'zod';\n\n/**\n * @wildo_source:part:start platform.config.cdn facet:layer:platform facet:family:infra\n *\n * Per-service CDN publish configuration, authored per-environment under\n * `wildo.infra.<env>.config.ts > cdn?[serviceKey]` (import the schemas + the\n * `CdnVendor` enum from `@wildo-ai/platform-config-lib`). Opting a frontend\n * into CDN serving (REMOTE envs only — the schema rejects `cdn` in local)\n * makes the deploy render skip its nginx Deployment/Service + ingress route\n * (served off-cluster by the CDN) while keeping its `runtime.endPoints.publicUrl`\n * unchanged; `wildo frontend publish` then uploads the built `dist/` to the S3\n * bucket + re-homes CSP to the edge.\n */\n\n/**\n * CDN vendor brands the framework can drive a live edge-publish against.\n *\n * Imported from `@wildo-ai/platform-config-lib`. Authored per-service-key\n * under `wildo.infra.<env>.config.ts > cdn?[serviceKey].vendor.kind`.\n *\n * The catalog is intentionally small and grows one brand at a time (mirrors\n * the `InfraProvider` brand convention). Each brand that supports LIVE\n * provisioning gets its own arm in {@link CdnVendorConfigSchema} carrying its\n * addressing (`zoneId`, …). `GENERIC` is the provider-agnostic escape hatch:\n * the publish path still uploads the `dist/` + writes a portable `_headers`\n * CSP file, but performs NO live vendor API call — the operator points their\n * own CDN (any `_headers`-consuming host: Cloudflare Pages, Netlify, Vercel,\n * or a bucket fronted by a proxy) at the published bucket.\n */\nexport enum CdnVendor {\n /**\n * No live vendor call. `wildo frontend publish` uploads the built `dist/`\n * to the configured S3 bucket and writes a portable `_headers` CSP file\n * alongside it; the operator wires their own CDN to the bucket. This is the\n * lowest-fabrication path and the correct choice when the CDN is fronted by\n * a host that reads `_headers`, or when the edge policy is managed out-of-band.\n */\n GENERIC = 'generic',\n /**\n * Cloudflare. `wildo frontend publish` additionally ensures a\n * `http_response_headers_transform` ruleset on the authored zone that SETs\n * the resolved CSP response header at the edge (the header nginx would emit\n * on a pod-served frontend). The live call fires only when the API token\n * (resolved from {@link CloudflareCdnVendorConfigSchema.apiTokenEnvVar}) is\n * present at publish time; otherwise the publish emits artifacts and skips\n * the live call with a warning.\n */\n CLOUDFLARE = 'cloudflare',\n}\n\n/**\n * `GENERIC` vendor — no live provisioning, no addressing. Presence of this\n * arm still opts the service into the CDN publish path (upload + `_headers`).\n */\nexport const GenericCdnVendorConfigSchema = z.strictObject({\n kind: z.literal(CdnVendor.GENERIC),\n});\nexport type GenericCdnVendorConfig = z.infer<typeof GenericCdnVendorConfigSchema>;\n\n/**\n * `CLOUDFLARE` vendor — live edge CSP provisioning against a Cloudflare zone.\n *\n * Only the token's ENV-VAR NAME is authored here, never the token value:\n * secrets never live in a checked-in `wildo.infra.<env>.config.ts`. The\n * publish path reads `process.env[apiTokenEnvVar]` at runtime; a missing var\n * degrades to artifacts-only (no throw).\n */\nexport const CloudflareCdnVendorConfigSchema = z.strictObject({\n kind: z.literal(CdnVendor.CLOUDFLARE),\n /**\n * Cloudflare zone id that fronts this frontend's public host. The publish\n * path PUTs the response-header-transform ruleset entrypoint on this zone.\n */\n zoneId: z.string().min(1),\n /**\n * NAME of the environment variable holding the Cloudflare API token (a\n * scoped token with `Zone.Ruleset` edit on the zone). NOT the token itself.\n * Default `CLOUDFLARE_API_TOKEN`.\n */\n apiTokenEnvVar: z.string().min(1).default('CLOUDFLARE_API_TOKEN'),\n});\nexport type CloudflareCdnVendorConfig = z.infer<typeof CloudflareCdnVendorConfigSchema>;\n\n/**\n * Discriminated union over {@link CdnVendor}. Adding a brand = adding an arm\n * here (+ a live adapter in the publish path). The discriminant `kind` gives\n * exhaustive narrowing at every consumer.\n */\nexport const CdnVendorConfigSchema = z.discriminatedUnion('kind', [\n GenericCdnVendorConfigSchema,\n CloudflareCdnVendorConfigSchema,\n]);\nexport type CdnVendorConfig = z.infer<typeof CdnVendorConfigSchema>;\n\n/**\n * Per-service CDN publish config — authored under\n * `wildo.infra.<env>.config.ts > cdn?[serviceKey]`, keyed by the SaaS-config\n * service key (same keyspace as `serviceHosts`).\n *\n * # Semantics\n *\n * Opting a frontend service into CDN serving means, FOR THAT ENVIRONMENT:\n * - the deploy render emits NEITHER an nginx Deployment/Service NOR an ingress\n * / compose route for the service — its public host is served off-cluster by\n * the CDN (DNS points the `<serviceHost>.<publicDomain>` at the CDN edge);\n * - `runtime.endPoints.publicUrl` is UNCHANGED (still\n * `<serviceHost>.<publicDomain>`) — the browser gets the same URL, it just\n * resolves to the CDN. This preserves the CORS / cross-frontend-handoff\n * coherence the ingress model relied on.\n *\n * CDN-served-ness is a PER-ENV deployment decision (a service can be\n * nginx-served in staging and CDN-served in production), which is why this\n * lives in the infra env config alongside `serviceHosts` — NOT on the app\n * service definition. The CSP *content* stays app-owned via the existing\n * `csp` resolution; the publish path REUSES that resolved policy to emit the\n * edge CSP, so this surface carries only the deployment targeting.\n *\n * # Object-storage target\n *\n * The S3 endpoint + credentials come from `backingServices.s3` (the app's\n * existing object-storage authoring surface — reused, not re-declared). Only\n * the bucket (+ optional key prefix) is CDN-specific: static public assets\n * SHOULD live in a bucket separate from the app's private file-storage bucket\n * (different access policy), so `bucket` is authored here; when omitted it\n * falls back to `backingServices.s3.bucket`.\n */\nexport const WildoCdnConfigSchema = z.strictObject({\n /**\n * Opt-out switch WITHOUT deleting the block. `true` (default) => this\n * service is CDN-served in this env (nginx pod + ingress route skipped,\n * publish path active). `false` => authored-but-inactive: the service falls\n * back to normal nginx-pod serving and the publish path ignores it. The\n * emit-skip / publish set keys on `enabled === true`, never on mere\n * presence, so a disabled entry never silently drops the ingress route.\n */\n enabled: z.boolean().default(true),\n /**\n * S3 bucket holding this frontend's PUBLIC static assets. Defaults to\n * `backingServices.s3.bucket` when omitted, but a SEPARATE public-read\n * bucket is recommended (do not mix public static assets with the app's\n * private user-uploaded files). The S3 endpoint + credentials always come\n * from `backingServices.s3`.\n */\n bucket: z.string().min(1).optional(),\n /**\n * Optional object-key prefix within the bucket (e.g. when one bucket serves\n * several frontends). Defaults to the service key. No leading/trailing\n * slash — the uploader joins segments.\n */\n bucketPrefix: z.string().optional(),\n /**\n * CDN vendor + its live-provisioning addressing. `GENERIC` = upload +\n * `_headers` only; branded vendors additionally push the edge CSP policy.\n */\n vendor: CdnVendorConfigSchema,\n});\nexport type WildoCdnConfig = z.infer<typeof WildoCdnConfigSchema>;\nexport type WildoCdnConfigInput = z.input<typeof WildoCdnConfigSchema>;\n/** @wildo_source:part:end platform.config.cdn */\n"]}
1
+ {"version":3,"file":"cdn.schemas.js","sourceRoot":"","sources":["../../../../src/project-config/shared/cdn.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;GAWG;AAEH;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAN,IAAY,SAmBX;AAnBD,WAAY,SAAS;IACnB;;;;;;OAMG;IACH,gCAAmB,CAAA;IACnB;;;;;;;;OAQG;IACH,sCAAyB,CAAA;AAC3B,CAAC,EAnBW,SAAS,KAAT,SAAS,QAmBpB;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC,YAAY,CAAC;IACzD,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,OAAO,CAAC;CACnC,CAAC,CAAC;AAGH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,CAAC,YAAY,CAAC;IAC5D,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC;IACrC;;;OAGG;IACH,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACzB;;;;OAIG;IACH,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,sBAAsB,CAAC;CAClE,CAAC,CAAC;AAGH;;;;GAIG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;IAChE,4BAA4B;IAC5B,+BAA+B;CAChC,CAAC,CAAC;AAGH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,YAAY,CAAC;IACjD;;;;;;;OAOG;IACH,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IAClC;;;;;;OAMG;IACH,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IACpC;;;;OAIG;IACH,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC;;;OAGG;IACH,MAAM,EAAE,qBAAqB;CAC9B,CAAC,CAAC;AAGH,iDAAiD","sourcesContent":["import { z } from 'zod';\n\n/**\n * @wildo_source:part:start platform.config.cdn facet:layer:platform facet:family:infra\n *\n * Per-service CDN publish configuration, authored per-environment under\n * `wildo.infra.<env>.config.ts > cdn?[serviceKey]` (import the schemas + the\n * `CdnVendor` enum from `@wildo-ai/platform-config-lib`). Opting a frontend\n * into CDN serving (REMOTE envs only — the schema rejects `cdn` in local)\n * makes the deploy render skip its nginx Deployment/Service + ingress route\n * (served off-cluster by the CDN) while keeping its `runtime.endPoints.publicUrl`\n * unchanged; `wildo frontend publish` then uploads the built `dist/` to the S3\n * bucket + re-homes CSP to the edge.\n */\n\n/**\n * CDN vendor brands the framework can drive a live edge-publish against.\n *\n * Imported from `@wildo-ai/platform-config-lib`. Authored per-service-key\n * under `wildo.infra.<env>.config.ts > cdn?[serviceKey].vendor.kind`.\n *\n * The catalog is intentionally small and grows one brand at a time (mirrors\n * the `InfraProvider` brand convention). Each brand that supports LIVE\n * provisioning gets its own arm in {@link CdnVendorConfigSchema} carrying its\n * addressing (`zoneId`, …). `GENERIC` is the provider-agnostic escape hatch:\n * the publish path still uploads the `dist/` + writes a portable `_headers`\n * CSP file, but performs NO live vendor API call — the operator points their\n * own CDN (any `_headers`-consuming host: Cloudflare Pages, Netlify, Vercel,\n * or a bucket fronted by a proxy) at the published bucket.\n */\nexport enum CdnVendor {\n /**\n * No live vendor call. `wildo frontend publish` uploads the built `dist/`\n * to the configured S3 bucket and writes a portable `_headers` CSP file\n * alongside it; the operator wires their own CDN to the bucket. This is the\n * lowest-fabrication path and the correct choice when the CDN is fronted by\n * a host that reads `_headers`, or when the edge policy is managed out-of-band.\n */\n GENERIC = 'generic',\n /**\n * Cloudflare. `wildo frontend publish` additionally ensures a\n * `http_response_headers_transform` ruleset on the authored zone that SETs\n * the resolved CSP response header at the edge (the header nginx would emit\n * on a pod-served frontend). The live call fires only when the API token\n * (resolved from {@link CloudflareCdnVendorConfigSchema.apiTokenEnvVar}) is\n * present at publish time; otherwise the publish emits artifacts and skips\n * the live call with a warning.\n */\n CLOUDFLARE = 'cloudflare',\n}\n\n/**\n * `GENERIC` vendor — no live provisioning, no addressing. Presence of this\n * arm still opts the service into the CDN publish path (upload + `_headers`).\n */\nexport const GenericCdnVendorConfigSchema = z.strictObject({\n kind: z.literal(CdnVendor.GENERIC),\n});\nexport type GenericCdnVendorConfig = z.infer<typeof GenericCdnVendorConfigSchema>;\n\n/**\n * `CLOUDFLARE` vendor — live edge CSP provisioning against a Cloudflare zone.\n *\n * Only the token's ENV-VAR NAME is authored here, never the token value:\n * secrets never live in a checked-in `wildo.infra.<env>.config.ts`. The\n * publish path reads `process.env[apiTokenEnvVar]` at runtime; a missing var\n * degrades to artifacts-only (no throw).\n */\nexport const CloudflareCdnVendorConfigSchema = z.strictObject({\n kind: z.literal(CdnVendor.CLOUDFLARE),\n /**\n * Cloudflare zone id that fronts this frontend's public host. The publish\n * path PUTs the response-header-transform ruleset entrypoint on this zone.\n */\n zoneId: z.string().min(1),\n /**\n * NAME of the environment variable holding the Cloudflare API token (a\n * scoped token with `Zone.Ruleset` edit on the zone). NOT the token itself.\n * Default `CLOUDFLARE_API_TOKEN`.\n */\n apiTokenEnvVar: z.string().min(1).default('CLOUDFLARE_API_TOKEN'),\n});\nexport type CloudflareCdnVendorConfig = z.infer<typeof CloudflareCdnVendorConfigSchema>;\n\n/**\n * Discriminated union over {@link CdnVendor}. Adding a brand = adding an arm\n * here (+ a live adapter in the publish path). The discriminant `kind` gives\n * exhaustive narrowing at every consumer.\n */\nexport const CdnVendorConfigSchema = z.discriminatedUnion('kind', [\n GenericCdnVendorConfigSchema,\n CloudflareCdnVendorConfigSchema,\n]);\nexport type CdnVendorConfig = z.infer<typeof CdnVendorConfigSchema>;\n\n/**\n * Per-service CDN publish config — authored under\n * `wildo.infra.<env>.config.ts > cdn?[serviceKey]`, keyed by the SaaS-config\n * service key (same keyspace as `serviceHosts`).\n *\n * # Semantics\n *\n * Opting a frontend service into CDN serving means, FOR THAT ENVIRONMENT:\n * - the deploy render emits NEITHER an nginx Deployment/Service NOR an ingress\n * / compose route for the service — its public host is served off-cluster by\n * the CDN (DNS points the `<serviceHost>.<publicDomain>` at the CDN edge);\n * - `runtime.endPoints.publicUrl` is UNCHANGED (still\n * `<serviceHost>.<publicDomain>`) — the browser gets the same URL, it just\n * resolves to the CDN. This preserves the CORS / cross-frontend-handoff\n * coherence the ingress model relied on.\n *\n * CDN-served-ness is a PER-ENV deployment decision (a service can be\n * nginx-served in staging and CDN-served in production), which is why this\n * lives in the infra env config alongside `serviceHosts` — NOT on the app\n * service definition. The CSP *content* stays app-owned via the existing\n * `csp` resolution; the publish path REUSES that resolved policy to emit the\n * edge CSP, so this surface carries only the deployment targeting.\n *\n * # Object-storage target\n *\n * The S3 endpoint + credentials come from `backingServices.s3` (the app's\n * existing object-storage authoring surface — reused, not re-declared). Only\n * the bucket (+ optional key prefix) is CDN-specific: static public assets\n * SHOULD live in a bucket separate from the app's private file-storage bucket\n * (different access policy), so `bucket` is authored here; when omitted it\n * falls back to `backingServices.s3.bucket`.\n */\nexport const WildoCdnConfigSchema = z.strictObject({\n /**\n * Opt-out switch WITHOUT deleting the block. `true` (default) => this\n * service is CDN-served in this env (nginx pod + ingress route skipped,\n * publish path active). `false` => authored-but-inactive: the service falls\n * back to normal nginx-pod serving and the publish path ignores it. The\n * emit-skip / publish set keys on `enabled === true`, never on mere\n * presence, so a disabled entry never silently drops the ingress route.\n */\n enabled: z.boolean().default(true),\n /**\n * S3 bucket holding this frontend's PUBLIC static assets. Defaults to\n * `backingServices.s3.bucket` when omitted, but a SEPARATE public-read\n * bucket is recommended (do not mix public static assets with the app's\n * private user-uploaded files). The S3 endpoint + credentials always come\n * from `backingServices.s3`.\n */\n bucket: z.string().min(1).optional(),\n /**\n * Optional object-key prefix within the bucket (e.g. when one bucket serves\n * several frontends). Defaults to the service key. No leading/trailing\n * slash — the uploader joins segments.\n */\n bucketPrefix: z.string().optional(),\n /**\n * CDN vendor + its live-provisioning addressing. `GENERIC` = upload +\n * `_headers` only; branded vendors additionally push the edge CSP policy.\n */\n vendor: CdnVendorConfigSchema,\n});\nexport type WildoCdnConfig = z.infer<typeof WildoCdnConfigSchema>;\nexport type WildoCdnConfigInput = z.input<typeof WildoCdnConfigSchema>;\n/** @wildo_source:part:end platform.config.cdn */\n"]}
@@ -62,16 +62,44 @@
62
62
  * because the resolver does NOT know the deployment env at the engine
63
63
  * layer; per-env hostnames are an env-config concern.
64
64
  *
65
- * # `report-uri` is intentionally NOT in any baseline
65
+ * # Violation reporting is shared by every baseline (#2867)
66
66
  *
67
- * The platform doesn't ship a CSP-violation collector yet (#2867 tracks
68
- * it). Authoring a
69
- * baseline `report-uri` value would be a config lie; per-app authoring
70
- * via the `WildoCspConfigSchema.reportUri` field is the right seam
71
- * once a real collector exists.
67
+ * Every application backend serves a CSP violation collector, so every
68
+ * baseline names it: `report-uri` and `report-to`, the latter defined by a
69
+ * `Reporting-Endpoints` header. It is not in the directive maps below
70
+ * because its URL is the main backend API's ORIGIN for the environment
71
+ * being composed, which only the composer's caller knows — see
72
+ * {@link CSP_PLATFORM_VIOLATION_COLLECTOR}.
72
73
  */
73
74
  import { AppFrontendType } from '@wildo-ai/saas-models/public-runtime';
74
75
  import type { CspDirectiveName } from './csp.schemas';
76
+ /**
77
+ * The violation collector every baseline names (#2867): the route each application backend serves, and the
78
+ * Reporting API endpoint name the policy's `report-to` uses for it.
79
+ *
80
+ * The baselines cannot carry the URL itself: the collector lives on the main backend API, whose origin differs per
81
+ * environment (`http://localhost:<port>` locally, `https://<host>.<publicDomain>` remotely) and is a different origin
82
+ * from every frontend, so a relative `report-uri` would reach the frontend's own server. `resolveCspPolicy` composes the
83
+ * URL from the origin its caller supplies, and only when the application authored no collector of its own.
84
+ *
85
+ * Both mechanisms are named because CSP Level 3 §5.5 skips `report-uri` whenever `report-to` is present: a browser that
86
+ * implements the Reporting API batches through `report-to`, and one that does not still reports through `report-uri`.
87
+ * spec-cite: CSP Level 3 (W3C Working Draft, 27 October 2026) §5.5 "Report a violation", §6.5.1, §6.5.2 — https://www.w3.org/TR/CSP3/
88
+ */
89
+ export declare const CSP_PLATFORM_VIOLATION_COLLECTOR: {
90
+ /** The collector's path from the backend origin: the API base path plus the route. */
91
+ readonly path: "/api/v1/csp-violation-reports";
92
+ /** The name `report-to` uses and the `Reporting-Endpoints` header defines. */
93
+ readonly reportingEndpointName: "wildo-csp";
94
+ };
95
+ /**
96
+ * The platform collector's URL on a backend origin, or `undefined` when the origin is unknown — in which case the policy
97
+ * names no collector rather than an invented one.
98
+ *
99
+ * @param backendApiOrigin - the main backend API's origin for the environment being composed (`http://localhost:4241`).
100
+ * A trailing slash is tolerated; a path is not part of an origin and is refused.
101
+ */
102
+ export declare function resolvePlatformCspViolationCollectorUrl(backendApiOrigin: string | undefined): string | undefined;
75
103
  /**
76
104
  * Baseline directive map for one `AppFrontendType`. Internal shape — the
77
105
  * resolver in `platform-config-lib/src/project-config/shared/csp-emit.ts` produces
@@ -1 +1 @@
1
- {"version":3,"file":"csp-defaults.d.ts","sourceRoot":"","sources":["../../../../../src/project-config/shared/csp-defaults.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuEG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,MAAM,uBAAuB,GAAG,QAAQ,CAC5C,OAAO,CAAC,MAAM,CAAC,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAC,CAAC,CACrD,CAAC;AAgHF;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,EAAE,QAAQ,CAClC,MAAM,CAAC,eAAe,EAAE,uBAAuB,CAAC,CAKjD,CAAC"}
1
+ {"version":3,"file":"csp-defaults.d.ts","sourceRoot":"","sources":["../../../../src/project-config/shared/csp-defaults.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwEG;AAEH,OAAO,EACL,eAAe,EAIhB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEtD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,gCAAgC;IAC3C,sFAAsF;;IAEtF,8EAA8E;;CAEtE,CAAC;AAEX;;;;;;GAMG;AACH,wBAAgB,uCAAuC,CAAC,gBAAgB,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAOhH;AAED;;;;;GAKG;AACH,MAAM,MAAM,uBAAuB,GAAG,QAAQ,CAC5C,OAAO,CAAC,MAAM,CAAC,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAC,CAAC,CACrD,CAAC;AAwHF;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,EAAE,QAAQ,CAClC,MAAM,CAAC,eAAe,EAAE,uBAAuB,CAAC,CAKjD,CAAC"}
@@ -62,15 +62,51 @@
62
62
  * because the resolver does NOT know the deployment env at the engine
63
63
  * layer; per-env hostnames are an env-config concern.
64
64
  *
65
- * # `report-uri` is intentionally NOT in any baseline
65
+ * # Violation reporting is shared by every baseline (#2867)
66
+ *
67
+ * Every application backend serves a CSP violation collector, so every
68
+ * baseline names it: `report-uri` and `report-to`, the latter defined by a
69
+ * `Reporting-Endpoints` header. It is not in the directive maps below
70
+ * because its URL is the main backend API's ORIGIN for the environment
71
+ * being composed, which only the composer's caller knows — see
72
+ * {@link CSP_PLATFORM_VIOLATION_COLLECTOR}.
73
+ */
74
+ import { AppFrontendType, CSP_VIOLATION_REPORTING_ENDPOINT_NAME, CSP_VIOLATION_REPORTS_PATH, MAIN_API_BASE_PATH, } from '@wildo-ai/saas-models/public-runtime';
75
+ /**
76
+ * The violation collector every baseline names (#2867): the route each application backend serves, and the
77
+ * Reporting API endpoint name the policy's `report-to` uses for it.
78
+ *
79
+ * The baselines cannot carry the URL itself: the collector lives on the main backend API, whose origin differs per
80
+ * environment (`http://localhost:<port>` locally, `https://<host>.<publicDomain>` remotely) and is a different origin
81
+ * from every frontend, so a relative `report-uri` would reach the frontend's own server. `resolveCspPolicy` composes the
82
+ * URL from the origin its caller supplies, and only when the application authored no collector of its own.
66
83
  *
67
- * The platform doesn't ship a CSP-violation collector yet (#2867 tracks
68
- * it). Authoring a
69
- * baseline `report-uri` value would be a config lie; per-app authoring
70
- * via the `WildoCspConfigSchema.reportUri` field is the right seam
71
- * once a real collector exists.
84
+ * Both mechanisms are named because CSP Level 3 §5.5 skips `report-uri` whenever `report-to` is present: a browser that
85
+ * implements the Reporting API batches through `report-to`, and one that does not still reports through `report-uri`.
86
+ * spec-cite: CSP Level 3 (W3C Working Draft, 27 October 2026) §5.5 "Report a violation", §6.5.1, §6.5.2 — https://www.w3.org/TR/CSP3/
72
87
  */
73
- import { AppFrontendType } from '@wildo-ai/saas-models/public-runtime';
88
+ export const CSP_PLATFORM_VIOLATION_COLLECTOR = {
89
+ /** The collector's path from the backend origin: the API base path plus the route. */
90
+ path: `${MAIN_API_BASE_PATH}${CSP_VIOLATION_REPORTS_PATH}`,
91
+ /** The name `report-to` uses and the `Reporting-Endpoints` header defines. */
92
+ reportingEndpointName: CSP_VIOLATION_REPORTING_ENDPOINT_NAME,
93
+ };
94
+ /**
95
+ * The platform collector's URL on a backend origin, or `undefined` when the origin is unknown — in which case the policy
96
+ * names no collector rather than an invented one.
97
+ *
98
+ * @param backendApiOrigin - the main backend API's origin for the environment being composed (`http://localhost:4241`).
99
+ * A trailing slash is tolerated; a path is not part of an origin and is refused.
100
+ */
101
+ export function resolvePlatformCspViolationCollectorUrl(backendApiOrigin) {
102
+ if (backendApiOrigin === undefined || backendApiOrigin.trim() === '')
103
+ return undefined;
104
+ const parsed = new URL(backendApiOrigin.trim());
105
+ if (parsed.pathname !== '/' || parsed.search !== '' || parsed.hash !== '') {
106
+ throw new Error(`[csp] the violation collector needs a backend ORIGIN, got "${backendApiOrigin}" (it carries a path, query or fragment).`);
107
+ }
108
+ return `${parsed.origin}${CSP_PLATFORM_VIOLATION_COLLECTOR.path}`;
109
+ }
74
110
  /**
75
111
  * `SAAS_APP` baseline — tightest of the three. Vite-bundled React SPA
76
112
  * with no inline scripts (production builds emit `<script type="module">`).
@@ -112,9 +148,17 @@ import { AppFrontendType } from '@wildo-ai/saas-models/public-runtime';
112
148
  * the resource type and is what CSP grades. No `connect-src` widening
113
149
  * is needed.
114
150
  */
151
+ /*
152
+ * `script-src` carries `'wasm-unsafe-eval'` because the application's animated icons and illustrations are drawn by
153
+ * the dotLottie player, which is WebAssembly served from the application's own origin (#3095). An enforced policy
154
+ * without it refuses to compile the player, and every animation (the loading spinner, the error pages, the
155
+ * celebrations) draws nothing. The keyword permits compiling WebAssembly ONLY: it does not admit `eval()` or
156
+ * `new Function()`, which `'unsafe-eval'` would, so the SAAS_APP baseline stays free of JavaScript string compilation.
157
+ * spec-cite: CSP Level 3 §4.5.1 (WebAssembly compilation: blocked unless script-src holds 'unsafe-eval' or 'wasm-unsafe-eval') and §4.4.1 (JavaScript string compilation consults 'unsafe-eval' only), https://www.w3.org/TR/CSP3/
158
+ */
115
159
  const SAAS_APP_BASELINE = {
116
160
  'default-src': ["'self'"],
117
- 'script-src': ["'self'"],
161
+ 'script-src': ["'self'", "'wasm-unsafe-eval'"],
118
162
  'style-src': ["'self'", "'unsafe-inline'", 'https://fonts.googleapis.com'],
119
163
  'img-src': ["'self'", 'data:', 'blob:'],
120
164
  'connect-src': ["'self'"],
@@ -1 +1 @@
1
- {"version":3,"file":"csp-defaults.js","sourceRoot":"","sources":["../../../../../src/project-config/shared/csp-defaults.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuEG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAavE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,MAAM,iBAAiB,GAA4B;IACjD,aAAa,EAAE,CAAC,QAAQ,CAAC;IACzB,YAAY,EAAE,CAAC,QAAQ,CAAC;IACxB,WAAW,EAAE,CAAC,QAAQ,EAAE,iBAAiB,EAAE,8BAA8B,CAAC;IAC1E,SAAS,EAAE,CAAC,QAAQ,EAAE,OAAO,EA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Q,CAAC;IACzB,UAAU,EAAE,CAAC,QAAQ,CAAC;CACvB,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,aAAa,GAEtB;IACF,CAAC,eAAe,CAAC,QAAQ,CAAC,EAAE,iBAAiB;IAC7C,CAAC,eAAe,CAAC,cAAc,CAAC,EAAE,uBAAuB;IACzD,CAAC,eAAe,CAAC,QAAQ,CAAC,EAAE,iBAAiB;CAC9C,CAAC","sourcesContent":["/**\n * Per-`AppFrontendType` Content-Security-Policy baselines (auth-hardening\n * Slice B, B-Step 1).\n *\n * # Why one baseline per frontend kind (vs a single platform-wide one)\n *\n * The three `AppFrontendType` kinds (`SAAS_APP` / `STATIC_WEBSITE` /\n * `TECH_DOC`) genuinely have different inline-script / inline-style\n * pressure:\n *\n * - `SAAS_APP` — React SPA built with Vite. Vite's production output\n * uses ESM `<script type=\"module\">` with no inline scripts, AND\n * the runtime emits no inline styles. So the `SAAS_APP` baseline\n * is the tightest of the three: NO `'unsafe-inline'` for scripts,\n * `'unsafe-inline'` for styles ONLY because Tailwind's runtime\n * style-injection (e.g., `@apply` with arbitrary values) emits\n * short-lived inline `<style>` tags.\n * - `TECH_DOC` — Docusaurus 3.x SSG. Its hydration shim and classic-theme\n * bootstrap inject inline `<script>` (theme detection, color-mode\n * restoration and route-state seed), while generated/theme markup uses\n * inline styles. So the `TECH_DOC` baseline MUST allow `'unsafe-inline'`\n * for both scripts AND styles. Tightening\n * to nonce-based `'self'` only is a post-Slice-B follow-up that\n * would require an upstream Docusaurus runtime change OR a\n * nonce-injecting build plugin.\n * - `STATIC_WEBSITE` — Astro SSG marketing site. The marketing\n * surface typically embeds analytics / advertising / chat-widget\n * pixels (each a third-party origin), so the baseline ships an\n * intentionally-empty `script-src` / `connect-src` extension list\n * (just `'self'`) and forces the per-app config to opt into every\n * third-party origin explicitly. Per-app `directives['script-src']`\n * overrides MUST list the third-party hostnames the marketing team\n * has actually whitelisted (no implicit `'unsafe-inline'`).\n *\n * A single platform-wide baseline would force the lowest common\n * denominator (`TECH_DOC`'s `'unsafe-inline'` for everyone) and lose\n * the SAAS_APP tightness for no gain.\n *\n * # Shared posture across all three baselines\n *\n * - `default-src 'self'` — block by default; everything else opts\n * in explicitly via specific directives.\n * - `frame-ancestors 'none'` — refuse iframe embedding. Header-only\n * directive (meta channel ignores it; the `csp-emit.ts` serializer\n * strips it from the meta tag automatically).\n * - `object-src 'none'` — block `<object>` / `<embed>` plugin loading\n * entirely. None of the three frontend kinds have a use case for\n * legacy plugins.\n * - `form-action 'self'` — block `<form action=\"…\">` from POSTing\n * to a third-party origin. Closes the cross-origin form-injection\n * surface even when the rest of the policy is permissive.\n * - `base-uri 'self'` — block `<base href=\"…\">` injection from\n * redirecting relative URLs to an attacker-controlled origin.\n *\n * # Connect-src\n *\n * Every baseline ships `connect-src 'self'` — the resolver merges in\n * additional origins via the app-static `directives['connect-src']`\n * override (e.g., the SaaS backend API hostname), and via Slice B\n * Step 2's env-layer override for per-env additions (Sentry, analytics\n * collectors). The baseline does NOT include any backend hostname\n * because the resolver does NOT know the deployment env at the engine\n * layer; per-env hostnames are an env-config concern.\n *\n * # `report-uri` is intentionally NOT in any baseline\n *\n * The platform doesn't ship a CSP-violation collector yet (#2867 tracks\n * it). Authoring a\n * baseline `report-uri` value would be a config lie; per-app authoring\n * via the `WildoCspConfigSchema.reportUri` field is the right seam\n * once a real collector exists.\n */\n\nimport { AppFrontendType } from '@wildo-ai/saas-models/public-runtime';\nimport type { CspDirectiveName } from './csp.schemas';\n\n/**\n * Baseline directive map for one `AppFrontendType`. Internal shape — the\n * resolver in `platform-config-lib/src/project-config/shared/csp-emit.ts` produces\n * the same shape as its post-merge output. Distinct from the AUTHOR-side\n * `WildoCspConfig.directives` (which is partial; this is total).\n */\nexport type CspBaselineDirectiveMap = Readonly<\n Partial<Record<CspDirectiveName, readonly string[]>>\n>;\n\n/**\n * `SAAS_APP` baseline — tightest of the three. Vite-bundled React SPA\n * with no inline scripts (production builds emit `<script type=\"module\">`).\n * `style-src 'unsafe-inline'` covers Tailwind runtime style injection.\n *\n * # Google Fonts origins in `style-src` and `font-src`\n *\n * The design-token system (`saas-frontend-lib/src/core/ui/design-token.utils.ts`)\n * ships `applyGoogleFontPreset()` as the canonical web-font loader for\n * `SAAS_APP` shells. It builds a `https://fonts.googleapis.com/css2?...`\n * `<link rel=\"stylesheet\">` at runtime, which in turn pulls woff2 files\n * from `https://fonts.gstatic.com/...`. Both origins MUST be in the\n * baseline because:\n *\n * 1. The font loader is framework-shipped, not app-authored. An app\n * developer that simply uses an `OKLCH` design-token preset with a\n * Google Font family inherits the loader without writing any code,\n * and would hit CSP blocks on every shell render in production\n * (today they're masked because `reportOnly: true` is the typical\n * dev posture).\n * 2. Widening to two specific origins is dramatically safer than the\n * alternatives — `'unsafe-inline'` (which we already accept for\n * Tailwind) is orders of magnitude broader; nonces are not\n * compatible with a runtime-injected `<link>` that doesn't carry\n * our nonce attribute.\n * 3. Apps that prefer fully-local fonts (e.g., self-hosted woff2 in\n * `public/fonts/`) and never call `applyGoogleFontPreset()` can\n * tighten back via the per-app `directives['style-src']` /\n * `directives['font-src']` override — the resolver merges as a\n * union, so the per-app config can restate `[\"'self'\", \"'unsafe-inline'\"]`\n * without `fonts.googleapis.com` and CSP will warn (or block) any\n * stray Google-Fonts call.\n *\n * `preconnect` to both origins happens at the same site\n * (`design-token.utils.ts` lines 982–996). Preconnect is governed by\n * `connect-src`, not `style-src` / `font-src`, BUT modern browsers\n * treat `<link rel=\"preconnect\">` as a hint that doesn't require CSP\n * fetch directives — the actual fetch later in the pipeline carries\n * the resource type and is what CSP grades. No `connect-src` widening\n * is needed.\n */\nconst SAAS_APP_BASELINE: CspBaselineDirectiveMap = {\n 'default-src': [\"'self'\"],\n 'script-src': [\"'self'\"],\n 'style-src': [\"'self'\", \"'unsafe-inline'\", 'https://fonts.googleapis.com'],\n 'img-src': [\"'self'\", 'data:', 'blob:'],\n 'connect-src': [\"'self'\"],\n 'font-src': [\"'self'\", 'data:', 'https://fonts.gstatic.com'],\n 'frame-ancestors': [\"'none'\"],\n 'object-src': [\"'none'\"],\n 'form-action': [\"'self'\"],\n 'base-uri': [\"'self'\"],\n};\n\n/**\n * `TECH_DOC` baseline — Docusaurus 3.x SSG. `'unsafe-inline'` on both\n * `script-src` AND `style-src` is required by the Docusaurus runtime\n * (classic-theme bootstrap and hydration shim). `img-src` retains `data:` and\n * `blob:` because the documentation product supports generated/MDX images\n * expressed with those browser-native URL schemes. Fonts are self-hosted; the\n * removed OpenAPI theme's inline icon-font allowance is deliberately gone.\n *\n * Tightening to nonce-based `'self'` only is a post-Slice-B follow-up\n * (would require an upstream Docusaurus runtime change OR a\n * nonce-injecting build plugin — out of scope today).\n */\nconst TECH_DOC_BASELINE: CspBaselineDirectiveMap = {\n 'default-src': [\"'self'\"],\n 'script-src': [\"'self'\", \"'unsafe-inline'\"],\n 'style-src': [\"'self'\", \"'unsafe-inline'\"],\n 'img-src': [\"'self'\", 'data:', 'blob:'],\n 'connect-src': [\"'self'\"],\n 'font-src': [\"'self'\"],\n 'frame-ancestors': [\"'none'\"],\n 'object-src': [\"'none'\"],\n 'form-action': [\"'self'\"],\n 'base-uri': [\"'self'\"],\n};\n\n/**\n * `STATIC_WEBSITE` baseline — Astro SSG marketing site. Intentionally\n * narrow `script-src` / `connect-src` to force the per-app config to\n * opt into every third-party hostname (analytics, advertising, chat\n * widget) explicitly. NO implicit `'unsafe-inline'` — the marketing\n * team must opt in per origin (or use nonces / hashes once those are\n * wired by the marketing build plugin).\n *\n * `style-src 'unsafe-inline'` is included because Astro's view\n * transitions and inline scoped styles emit short-lived inline\n * `<style>` tags; stripping that would break the marketing animations\n * the website team relies on.\n *\n * `img-src` includes `https:` because marketing pages routinely embed\n * third-party imagery (case-study screenshots, partner logos hosted on\n * a CDN). Tightening to a closed allow-list per app is the per-app\n * `directives['img-src']` override's job.\n */\nconst STATIC_WEBSITE_BASELINE: CspBaselineDirectiveMap = {\n 'default-src': [\"'self'\"],\n 'script-src': [\"'self'\"],\n 'style-src': [\"'self'\", \"'unsafe-inline'\"],\n 'img-src': [\"'self'\", 'data:', 'blob:', 'https:'],\n 'connect-src': [\"'self'\"],\n 'font-src': [\"'self'\", 'data:'],\n 'frame-ancestors': [\"'none'\"],\n 'object-src': [\"'none'\"],\n 'form-action': [\"'self'\"],\n 'base-uri': [\"'self'\"],\n};\n\n/**\n * Per-`AppFrontendType` baseline registry. Total over the enum — adding\n * a new `AppFrontendType` value forces a baseline edit here at compile\n * time (TS error on the missing key). That coupling is the whole point\n * of the registry shape: a new frontend kind that ships without a CSP\n * baseline would silently get NO policy on any deployment until someone\n * notices.\n */\nexport const CSP_BASELINES: Readonly<\n Record<AppFrontendType, CspBaselineDirectiveMap>\n> = {\n [AppFrontendType.SAAS_APP]: SAAS_APP_BASELINE,\n [AppFrontendType.STATIC_WEBSITE]: STATIC_WEBSITE_BASELINE,\n [AppFrontendType.TECH_DOC]: TECH_DOC_BASELINE,\n};\n"]}
1
+ {"version":3,"file":"csp-defaults.js","sourceRoot":"","sources":["../../../../src/project-config/shared/csp-defaults.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwEG;AAEH,OAAO,EACL,eAAe,EACf,qCAAqC,EACrC,0BAA0B,EAC1B,kBAAkB,GACnB,MAAM,sCAAsC,CAAC;AAG9C;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG;IAC9C,sFAAsF;IACtF,IAAI,EAAE,GAAG,kBAAkB,GAAG,0BAA0B,EAAE;IAC1D,8EAA8E;IAC9E,qBAAqB,EAAE,qCAAqC;CACpD,CAAC;AAEX;;;;;;GAMG;AACH,MAAM,UAAU,uCAAuC,CAAC,gBAAoC;IAC1F,IAAI,gBAAgB,KAAK,SAAS,IAAI,gBAAgB,CAAC,IAAI,EAAE,KAAK,EAAE;QAAE,OAAO,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;IACvC,aAAa,EAAE,CAAC,QAAQ,CAAC;IACzB,UAAU,EAAE,CAAC,QAAQ,CAAC;IACtB,iBAAiB,EAAE,CAAC,QAAQ,CAAC;IAC7B,YAAY,EAAE,CAAC,QAAQ,CAAC;IACxB,aAAa,EAAE,CAAC,QAAQ,CAAC;IACzB,UAAU,EAAE,CAAC,QAAQ,CAAC;CACvB,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,uBAAuB,GAA4B;IACvD,aAAa,EAAE,CAAC,QAAQ,CAAC;IACzB,YAAY,EAAE,CAAC,QAAQ,CAAC;IACxB,WAAW,EAAE,CAAC,QAAQ,EAAE,iBAAiB,CAAC;IAC1C,SAAS,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC;IACjD,aAAa,EAAE,CAAC,QAAQ,CAAC;IACzB,UAAU,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC/B,iBAAiB,EAAE,CAAC,QAAQ,CAAC;IAC7B,YAAY,EAAE,CAAC,QAAQ,CAAC;IACxB,aAAa,EAAE,CAAC,QAAQ,CAAC;IACzB,UAAU,EAAE,CAAC,QAAQ,CAAC;CACvB,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,aAAa,GAEtB;IACF,CAAC,eAAe,CAAC,QAAQ,CAAC,EAAE,iBAAiB;IAC7C,CAAC,eAAe,CAAC,cAAc,CAAC,EAAE,uBAAuB;IACzD,CAAC,eAAe,CAAC,QAAQ,CAAC,EAAE,iBAAiB;CAC9C,CAAC","sourcesContent":["/**\n * Per-`AppFrontendType` Content-Security-Policy baselines (auth-hardening\n * Slice B, B-Step 1).\n *\n * # Why one baseline per frontend kind (vs a single platform-wide one)\n *\n * The three `AppFrontendType` kinds (`SAAS_APP` / `STATIC_WEBSITE` /\n * `TECH_DOC`) genuinely have different inline-script / inline-style\n * pressure:\n *\n * - `SAAS_APP` — React SPA built with Vite. Vite's production output\n * uses ESM `<script type=\"module\">` with no inline scripts, AND\n * the runtime emits no inline styles. So the `SAAS_APP` baseline\n * is the tightest of the three: NO `'unsafe-inline'` for scripts,\n * `'unsafe-inline'` for styles ONLY because Tailwind's runtime\n * style-injection (e.g., `@apply` with arbitrary values) emits\n * short-lived inline `<style>` tags.\n * - `TECH_DOC` — Docusaurus 3.x SSG. Its hydration shim and classic-theme\n * bootstrap inject inline `<script>` (theme detection, color-mode\n * restoration and route-state seed), while generated/theme markup uses\n * inline styles. So the `TECH_DOC` baseline MUST allow `'unsafe-inline'`\n * for both scripts AND styles. Tightening\n * to nonce-based `'self'` only is a post-Slice-B follow-up that\n * would require an upstream Docusaurus runtime change OR a\n * nonce-injecting build plugin.\n * - `STATIC_WEBSITE` — Astro SSG marketing site. The marketing\n * surface typically embeds analytics / advertising / chat-widget\n * pixels (each a third-party origin), so the baseline ships an\n * intentionally-empty `script-src` / `connect-src` extension list\n * (just `'self'`) and forces the per-app config to opt into every\n * third-party origin explicitly. Per-app `directives['script-src']`\n * overrides MUST list the third-party hostnames the marketing team\n * has actually whitelisted (no implicit `'unsafe-inline'`).\n *\n * A single platform-wide baseline would force the lowest common\n * denominator (`TECH_DOC`'s `'unsafe-inline'` for everyone) and lose\n * the SAAS_APP tightness for no gain.\n *\n * # Shared posture across all three baselines\n *\n * - `default-src 'self'` — block by default; everything else opts\n * in explicitly via specific directives.\n * - `frame-ancestors 'none'` — refuse iframe embedding. Header-only\n * directive (meta channel ignores it; the `csp-emit.ts` serializer\n * strips it from the meta tag automatically).\n * - `object-src 'none'` — block `<object>` / `<embed>` plugin loading\n * entirely. None of the three frontend kinds have a use case for\n * legacy plugins.\n * - `form-action 'self'` — block `<form action=\"…\">` from POSTing\n * to a third-party origin. Closes the cross-origin form-injection\n * surface even when the rest of the policy is permissive.\n * - `base-uri 'self'` — block `<base href=\"…\">` injection from\n * redirecting relative URLs to an attacker-controlled origin.\n *\n * # Connect-src\n *\n * Every baseline ships `connect-src 'self'` — the resolver merges in\n * additional origins via the app-static `directives['connect-src']`\n * override (e.g., the SaaS backend API hostname), and via Slice B\n * Step 2's env-layer override for per-env additions (Sentry, analytics\n * collectors). The baseline does NOT include any backend hostname\n * because the resolver does NOT know the deployment env at the engine\n * layer; per-env hostnames are an env-config concern.\n *\n * # Violation reporting is shared by every baseline (#2867)\n *\n * Every application backend serves a CSP violation collector, so every\n * baseline names it: `report-uri` and `report-to`, the latter defined by a\n * `Reporting-Endpoints` header. It is not in the directive maps below\n * because its URL is the main backend API's ORIGIN for the environment\n * being composed, which only the composer's caller knows — see\n * {@link CSP_PLATFORM_VIOLATION_COLLECTOR}.\n */\n\nimport {\n AppFrontendType,\n CSP_VIOLATION_REPORTING_ENDPOINT_NAME,\n CSP_VIOLATION_REPORTS_PATH,\n MAIN_API_BASE_PATH,\n} from '@wildo-ai/saas-models/public-runtime';\nimport type { CspDirectiveName } from './csp.schemas';\n\n/**\n * The violation collector every baseline names (#2867): the route each application backend serves, and the\n * Reporting API endpoint name the policy's `report-to` uses for it.\n *\n * The baselines cannot carry the URL itself: the collector lives on the main backend API, whose origin differs per\n * environment (`http://localhost:<port>` locally, `https://<host>.<publicDomain>` remotely) and is a different origin\n * from every frontend, so a relative `report-uri` would reach the frontend's own server. `resolveCspPolicy` composes the\n * URL from the origin its caller supplies, and only when the application authored no collector of its own.\n *\n * Both mechanisms are named because CSP Level 3 §5.5 skips `report-uri` whenever `report-to` is present: a browser that\n * implements the Reporting API batches through `report-to`, and one that does not still reports through `report-uri`.\n * spec-cite: CSP Level 3 (W3C Working Draft, 27 October 2026) §5.5 \"Report a violation\", §6.5.1, §6.5.2 — https://www.w3.org/TR/CSP3/\n */\nexport const CSP_PLATFORM_VIOLATION_COLLECTOR = {\n /** The collector's path from the backend origin: the API base path plus the route. */\n path: `${MAIN_API_BASE_PATH}${CSP_VIOLATION_REPORTS_PATH}`,\n /** The name `report-to` uses and the `Reporting-Endpoints` header defines. */\n reportingEndpointName: CSP_VIOLATION_REPORTING_ENDPOINT_NAME,\n} as const;\n\n/**\n * The platform collector's URL on a backend origin, or `undefined` when the origin is unknown — in which case the policy\n * names no collector rather than an invented one.\n *\n * @param backendApiOrigin - the main backend API's origin for the environment being composed (`http://localhost:4241`).\n * A trailing slash is tolerated; a path is not part of an origin and is refused.\n */\nexport function resolvePlatformCspViolationCollectorUrl(backendApiOrigin: string | undefined): string | undefined {\n if (backendApiOrigin === undefined || backendApiOrigin.trim() === '') return undefined;\n const parsed = new URL(backendApiOrigin.trim());\n if (parsed.pathname !== '/' || parsed.search !== '' || parsed.hash !== '') {\n throw new Error(`[csp] the violation collector needs a backend ORIGIN, got \"${backendApiOrigin}\" (it carries a path, query or fragment).`);\n }\n return `${parsed.origin}${CSP_PLATFORM_VIOLATION_COLLECTOR.path}`;\n}\n\n/**\n * Baseline directive map for one `AppFrontendType`. Internal shape — the\n * resolver in `platform-config-lib/src/project-config/shared/csp-emit.ts` produces\n * the same shape as its post-merge output. Distinct from the AUTHOR-side\n * `WildoCspConfig.directives` (which is partial; this is total).\n */\nexport type CspBaselineDirectiveMap = Readonly<\n Partial<Record<CspDirectiveName, readonly string[]>>\n>;\n\n/**\n * `SAAS_APP` baseline — tightest of the three. Vite-bundled React SPA\n * with no inline scripts (production builds emit `<script type=\"module\">`).\n * `style-src 'unsafe-inline'` covers Tailwind runtime style injection.\n *\n * # Google Fonts origins in `style-src` and `font-src`\n *\n * The design-token system (`saas-frontend-lib/src/core/ui/design-token.utils.ts`)\n * ships `applyGoogleFontPreset()` as the canonical web-font loader for\n * `SAAS_APP` shells. It builds a `https://fonts.googleapis.com/css2?...`\n * `<link rel=\"stylesheet\">` at runtime, which in turn pulls woff2 files\n * from `https://fonts.gstatic.com/...`. Both origins MUST be in the\n * baseline because:\n *\n * 1. The font loader is framework-shipped, not app-authored. An app\n * developer that simply uses an `OKLCH` design-token preset with a\n * Google Font family inherits the loader without writing any code,\n * and would hit CSP blocks on every shell render in production\n * (today they're masked because `reportOnly: true` is the typical\n * dev posture).\n * 2. Widening to two specific origins is dramatically safer than the\n * alternatives — `'unsafe-inline'` (which we already accept for\n * Tailwind) is orders of magnitude broader; nonces are not\n * compatible with a runtime-injected `<link>` that doesn't carry\n * our nonce attribute.\n * 3. Apps that prefer fully-local fonts (e.g., self-hosted woff2 in\n * `public/fonts/`) and never call `applyGoogleFontPreset()` can\n * tighten back via the per-app `directives['style-src']` /\n * `directives['font-src']` override — the resolver merges as a\n * union, so the per-app config can restate `[\"'self'\", \"'unsafe-inline'\"]`\n * without `fonts.googleapis.com` and CSP will warn (or block) any\n * stray Google-Fonts call.\n *\n * `preconnect` to both origins happens at the same site\n * (`design-token.utils.ts` lines 982–996). Preconnect is governed by\n * `connect-src`, not `style-src` / `font-src`, BUT modern browsers\n * treat `<link rel=\"preconnect\">` as a hint that doesn't require CSP\n * fetch directives — the actual fetch later in the pipeline carries\n * the resource type and is what CSP grades. No `connect-src` widening\n * is needed.\n */\n/*\n * `script-src` carries `'wasm-unsafe-eval'` because the application's animated icons and illustrations are drawn by\n * the dotLottie player, which is WebAssembly served from the application's own origin (#3095). An enforced policy\n * without it refuses to compile the player, and every animation (the loading spinner, the error pages, the\n * celebrations) draws nothing. The keyword permits compiling WebAssembly ONLY: it does not admit `eval()` or\n * `new Function()`, which `'unsafe-eval'` would, so the SAAS_APP baseline stays free of JavaScript string compilation.\n * spec-cite: CSP Level 3 §4.5.1 (WebAssembly compilation: blocked unless script-src holds 'unsafe-eval' or 'wasm-unsafe-eval') and §4.4.1 (JavaScript string compilation consults 'unsafe-eval' only), https://www.w3.org/TR/CSP3/\n */\nconst SAAS_APP_BASELINE: CspBaselineDirectiveMap = {\n 'default-src': [\"'self'\"],\n 'script-src': [\"'self'\", \"'wasm-unsafe-eval'\"],\n 'style-src': [\"'self'\", \"'unsafe-inline'\", 'https://fonts.googleapis.com'],\n 'img-src': [\"'self'\", 'data:', 'blob:'],\n 'connect-src': [\"'self'\"],\n 'font-src': [\"'self'\", 'data:', 'https://fonts.gstatic.com'],\n 'frame-ancestors': [\"'none'\"],\n 'object-src': [\"'none'\"],\n 'form-action': [\"'self'\"],\n 'base-uri': [\"'self'\"],\n};\n\n/**\n * `TECH_DOC` baseline — Docusaurus 3.x SSG. `'unsafe-inline'` on both\n * `script-src` AND `style-src` is required by the Docusaurus runtime\n * (classic-theme bootstrap and hydration shim). `img-src` retains `data:` and\n * `blob:` because the documentation product supports generated/MDX images\n * expressed with those browser-native URL schemes. Fonts are self-hosted; the\n * removed OpenAPI theme's inline icon-font allowance is deliberately gone.\n *\n * Tightening to nonce-based `'self'` only is a post-Slice-B follow-up\n * (would require an upstream Docusaurus runtime change OR a\n * nonce-injecting build plugin — out of scope today).\n */\nconst TECH_DOC_BASELINE: CspBaselineDirectiveMap = {\n 'default-src': [\"'self'\"],\n 'script-src': [\"'self'\", \"'unsafe-inline'\"],\n 'style-src': [\"'self'\", \"'unsafe-inline'\"],\n 'img-src': [\"'self'\", 'data:', 'blob:'],\n 'connect-src': [\"'self'\"],\n 'font-src': [\"'self'\"],\n 'frame-ancestors': [\"'none'\"],\n 'object-src': [\"'none'\"],\n 'form-action': [\"'self'\"],\n 'base-uri': [\"'self'\"],\n};\n\n/**\n * `STATIC_WEBSITE` baseline — Astro SSG marketing site. Intentionally\n * narrow `script-src` / `connect-src` to force the per-app config to\n * opt into every third-party hostname (analytics, advertising, chat\n * widget) explicitly. NO implicit `'unsafe-inline'` — the marketing\n * team must opt in per origin (or use nonces / hashes once those are\n * wired by the marketing build plugin).\n *\n * `style-src 'unsafe-inline'` is included because Astro's view\n * transitions and inline scoped styles emit short-lived inline\n * `<style>` tags; stripping that would break the marketing animations\n * the website team relies on.\n *\n * `img-src` includes `https:` because marketing pages routinely embed\n * third-party imagery (case-study screenshots, partner logos hosted on\n * a CDN). Tightening to a closed allow-list per app is the per-app\n * `directives['img-src']` override's job.\n */\nconst STATIC_WEBSITE_BASELINE: CspBaselineDirectiveMap = {\n 'default-src': [\"'self'\"],\n 'script-src': [\"'self'\"],\n 'style-src': [\"'self'\", \"'unsafe-inline'\"],\n 'img-src': [\"'self'\", 'data:', 'blob:', 'https:'],\n 'connect-src': [\"'self'\"],\n 'font-src': [\"'self'\", 'data:'],\n 'frame-ancestors': [\"'none'\"],\n 'object-src': [\"'none'\"],\n 'form-action': [\"'self'\"],\n 'base-uri': [\"'self'\"],\n};\n\n/**\n * Per-`AppFrontendType` baseline registry. Total over the enum — adding\n * a new `AppFrontendType` value forces a baseline edit here at compile\n * time (TS error on the missing key). That coupling is the whole point\n * of the registry shape: a new frontend kind that ships without a CSP\n * baseline would silently get NO policy on any deployment until someone\n * notices.\n */\nexport const CSP_BASELINES: Readonly<\n Record<AppFrontendType, CspBaselineDirectiveMap>\n> = {\n [AppFrontendType.SAAS_APP]: SAAS_APP_BASELINE,\n [AppFrontendType.STATIC_WEBSITE]: STATIC_WEBSITE_BASELINE,\n [AppFrontendType.TECH_DOC]: TECH_DOC_BASELINE,\n};\n"]}
@@ -4,12 +4,42 @@ export type ResolvedCspDirectiveMap = Readonly<Partial<Record<CspDirectiveName,
4
4
  export interface ResolvedCspPolicy {
5
5
  readonly directives: ResolvedCspDirectiveMap;
6
6
  readonly reportOnly: boolean;
7
+ /** The `report-uri` collector: the authored one, else the platform collector, else none (#2867). */
7
8
  readonly reportUri: string | undefined;
9
+ /**
10
+ * The Reporting API collector the policy's `report-to` names, by its URL: the authored one, else the platform
11
+ * collector, else none (#2867). The emitter declares it in a `Reporting-Endpoints` header under
12
+ * {@link CSP_REPORTING_ENDPOINT_NAME}.
13
+ */
14
+ readonly reportTo: string | undefined;
15
+ }
16
+ /** The endpoint name a composed policy's `report-to` uses, whichever collector it names. */
17
+ export declare const CSP_REPORTING_ENDPOINT_NAME: string;
18
+ /** The response header that defines a Reporting API endpoint (Reporting API §3.2). */
19
+ export declare const REPORTING_ENDPOINTS_HEADER_NAME = "Reporting-Endpoints";
20
+ /** One response header a CSP delivery channel sets. */
21
+ export interface CspResponseHeader {
22
+ readonly name: string;
23
+ readonly value: string;
8
24
  }
9
25
  export interface CspEmitArtifacts {
10
26
  readonly nginxHeaderName: string;
11
27
  readonly nginxPolicyValue: string;
12
28
  readonly nginxAddHeaderLine: string;
29
+ /**
30
+ * The `Reporting-Endpoints` value defining the endpoint the policy's `report-to` names, or `null` when the policy names
31
+ * no Reporting API collector (#2867). Delivered on the same response as the policy: a `report-to` naming an endpoint
32
+ * the response does not define reports nothing, and makes the browser ignore `report-uri` too (CSP Level 3 §5.5).
33
+ */
34
+ readonly reportingEndpointsHeaderValue: string | null;
35
+ /**
36
+ * Every header a delivery channel sets, policy first: the CSP header, then `Reporting-Endpoints` when the policy names
37
+ * a Reporting API collector. The nginx marker region, a `_headers` block, a CDN rule and a dev server all set exactly
38
+ * these, so no channel can deliver the policy without the endpoint it names.
39
+ */
40
+ readonly responseHeaders: readonly CspResponseHeader[];
41
+ /** One nginx `add_header … always;` line per {@link responseHeaders} entry, in the same order. */
42
+ readonly nginxAddHeaderLines: readonly string[];
13
43
  readonly metaTag: {
14
44
  readonly tagName: 'meta';
15
45
  readonly attributes: {
@@ -55,6 +85,13 @@ export interface ResolveCspPolicyInput {
55
85
  * `CspSyncService` already knows the env id and SHOULD pass it.
56
86
  */
57
87
  readonly environmentId?: string;
88
+ /**
89
+ * The origin of this environment's main backend API (`http://localhost:4241`, `https://api.example.com`), where the
90
+ * platform CSP violation collector is served (#2867). When the application authored no collector at any layer, the
91
+ * policy names `<origin>/api/v1/csp-violation-reports` through both `report-uri` and `report-to`. Absent, and nothing
92
+ * authored, the policy names no collector: the resolver never invents an origin.
93
+ */
94
+ readonly violationCollectorOrigin?: string;
58
95
  }
59
96
  export declare const NGINX_CSP_BEGIN_MARKER = "# >>> wildo csp begin";
60
97
  export declare const NGINX_CSP_END_MARKER = "# <<< wildo csp end";
@@ -86,11 +123,13 @@ export declare function emitCspArtifacts(policy: ResolvedCspPolicy): CspEmitArti
86
123
  * has no nginx to `add_header`) ships this file in its bucket and any
87
124
  * `_headers`-aware host applies it.
88
125
  *
89
- * Uses the FULL header value (including the header-only `frame-ancestors` and
90
- * `report-uri` directives) — a `_headers` line is a genuine response header, so
91
- * nothing is stripped (unlike the `<meta http-equiv>` fallback). Report-only
92
- * policies are honoured (the header name flips to
93
- * `Content-Security-Policy-Report-Only`, valid on a real header channel).
126
+ * Uses the FULL header value (including the header-only `frame-ancestors`,
127
+ * `report-uri` and `report-to` directives) — a `_headers` line is a genuine
128
+ * response header, so nothing is stripped (unlike the `<meta http-equiv>`
129
+ * fallback). Report-only policies are honoured (the header name flips to
130
+ * `Content-Security-Policy-Report-Only`, valid on a real header channel). The
131
+ * `Reporting-Endpoints` header the policy's `report-to` relies on follows it
132
+ * (#2867): every entry of `responseHeaders`, in order.
94
133
  *
95
134
  * The caller composes this block with any other `_headers` blocks (e.g. the
96
135
  * website's per-path `X-Robots-Tag`) into one file, separated by a blank line.
@@ -103,18 +142,21 @@ export declare function emitCspHeadersFileBlock(policy: ResolvedCspPolicy): stri
103
142
  * `http_response_headers_transform` ruleset rule whose action sets
104
143
  * `headerName` to `value`.
105
144
  *
106
- * Same FULL header name + value as the nginx / `_headers` channels (a CDN sets
107
- * a real header, so `frame-ancestors` / `report-uri` are valid and retained).
145
+ * Same FULL headers as the nginx / `_headers` channels (a CDN sets real
146
+ * headers, so `frame-ancestors` / `report-uri` / `report-to` are valid and
147
+ * retained), including the `Reporting-Endpoints` header the policy's
148
+ * `report-to` names (#2867).
108
149
  */
109
150
  export interface CspEdgeHeaderModification {
110
151
  /** Cloudflare ruleset phase this modification belongs to. */
111
152
  readonly phase: 'http_response_headers_transform';
112
153
  /** The header operation — always `set` (overwrite any origin value). */
113
154
  readonly operation: 'set';
114
- /** Response-header name (report-only-aware, same as the nginx channel). */
115
- readonly headerName: string;
116
- /** Serialized policy value (identical to `nginxPolicyValue`). */
117
- readonly value: string;
155
+ /**
156
+ * The headers to set, policy first (report-only-aware, same name and value as the nginx channel), then
157
+ * `Reporting-Endpoints` when the policy names a Reporting API collector. Identical to `CspEmitArtifacts.responseHeaders`.
158
+ */
159
+ readonly headers: readonly CspResponseHeader[];
118
160
  }
119
161
  /**
120
162
  * Derive the edge response-header modification carrying the resolved CSP, for a
@@ -128,8 +170,13 @@ export interface RewriteNginxResult {
128
170
  readonly pairsRewritten: number;
129
171
  readonly fileWritten: boolean;
130
172
  }
131
- export declare function rewriteNginxCspMarkerPairs(filePath: string, addHeaderLine: string): RewriteNginxResult;
132
- export declare function rewriteNginxCspMarkerPairsString(source: string, addHeaderLine: string, filePath?: string): {
173
+ /**
174
+ * Rewrites every `# >>> wildo csp begin` / `# <<< wildo csp end` region of an nginx file to hold exactly
175
+ * `addHeaderLines` — the lines `emitCspArtifacts` returns as `nginxAddHeaderLines`: the policy, then the
176
+ * `Reporting-Endpoints` header its `report-to` names (#2867). One string is accepted for a region holding one line.
177
+ */
178
+ export declare function rewriteNginxCspMarkerPairs(filePath: string, addHeaderLines: string | readonly string[]): RewriteNginxResult;
179
+ export declare function rewriteNginxCspMarkerPairsString(source: string, addHeaderLines: string | readonly string[], filePath?: string): {
133
180
  readonly rewritten: string;
134
181
  readonly totalPairs: number;
135
182
  readonly pairsChanged: number;
@@ -1 +1 @@
1
- {"version":3,"file":"csp-emit.d.ts","sourceRoot":"","sources":["../../../../../src/project-config/shared/csp-emit.ts"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EAEf,KAAK,4BAA4B,EAClC,MAAM,sCAAsC,CAAC;AAM9C,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,cAAc,EACpB,MAAM,eAAe,CAAC;AAGvB,MAAM,MAAM,uBAAuB,GAAG,QAAQ,CAC5C,OAAO,CAAC,MAAM,CAAC,gBAAgB,EAAE,SAAS,MAAM,EAAE,CAAC,CAAC,CACrD,CAAC;AAEF,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,UAAU,EAAE,uBAAuB,CAAC;IAC7C,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,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