@wildo-ai/wildo-cli 1.1.2 → 1.1.4

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 (1002) hide show
  1. package/dist/bin/wildo.d.ts.map +1 -1
  2. package/dist/src/__tests__/sandbox-dependencies.test-helpers.d.ts.map +1 -1
  3. package/dist/src/commands/acp/probe.command.d.ts.map +1 -1
  4. package/dist/src/commands/acp/probe.command.js +13 -0
  5. package/dist/src/commands/acp/probe.command.js.map +1 -1
  6. package/dist/src/commands/align-deps.command.d.ts.map +1 -1
  7. package/dist/src/commands/assets/sync.command.d.ts +6 -0
  8. package/dist/src/commands/assets/sync.command.d.ts.map +1 -1
  9. package/dist/src/commands/assets/sync.command.js +13 -3
  10. package/dist/src/commands/assets/sync.command.js.map +1 -1
  11. package/dist/src/commands/brand/propagate.command.d.ts.map +1 -1
  12. package/dist/src/commands/compose.command.d.ts.map +1 -1
  13. package/dist/src/commands/compose.command.js +16 -0
  14. package/dist/src/commands/compose.command.js.map +1 -1
  15. package/dist/src/commands/config/__tests__/reapply-declaration.command.test.d.ts.map +1 -1
  16. package/dist/src/commands/config/__tests__/reapply-declaration.command.test.js +1 -1
  17. package/dist/src/commands/config/__tests__/reapply-declaration.command.test.js.map +1 -1
  18. package/dist/src/commands/config/__tests__/sync.command.test.d.ts.map +1 -1
  19. package/dist/src/commands/config/__tests__/sync.command.test.js +115 -8
  20. package/dist/src/commands/config/__tests__/sync.command.test.js.map +1 -1
  21. package/dist/src/commands/config/__tests__/validate.command.test.d.ts.map +1 -1
  22. package/dist/src/commands/config/mutate.command.d.ts.map +1 -1
  23. package/dist/src/commands/config/reapply-declaration.command.d.ts.map +1 -1
  24. package/dist/src/commands/config/sync.command.d.ts +36 -0
  25. package/dist/src/commands/config/sync.command.d.ts.map +1 -1
  26. package/dist/src/commands/config/sync.command.js +61 -7
  27. package/dist/src/commands/config/sync.command.js.map +1 -1
  28. package/dist/src/commands/config/validate.command.d.ts.map +1 -1
  29. package/dist/src/commands/context/__tests__/assurance-basis.command.test.d.ts +2 -0
  30. package/dist/src/commands/context/__tests__/assurance-basis.command.test.d.ts.map +1 -0
  31. package/dist/src/commands/context/__tests__/assurance-basis.command.test.js +63 -0
  32. package/dist/src/commands/context/__tests__/assurance-basis.command.test.js.map +1 -0
  33. package/dist/src/commands/context/__tests__/jurisdictions.command.test.d.ts +19 -0
  34. package/dist/src/commands/context/__tests__/jurisdictions.command.test.d.ts.map +1 -0
  35. package/dist/src/commands/context/__tests__/jurisdictions.command.test.js +106 -0
  36. package/dist/src/commands/context/__tests__/jurisdictions.command.test.js.map +1 -0
  37. package/dist/src/commands/context/assurance-basis.command.d.ts +61 -0
  38. package/dist/src/commands/context/assurance-basis.command.d.ts.map +1 -0
  39. package/dist/src/commands/context/assurance-basis.command.js +166 -0
  40. package/dist/src/commands/context/assurance-basis.command.js.map +1 -0
  41. package/dist/src/commands/context/coherence.command.d.ts.map +1 -1
  42. package/dist/src/commands/context/context-command.utils.d.ts.map +1 -1
  43. package/dist/src/commands/context/health.command.d.ts.map +1 -1
  44. package/dist/src/commands/context/info.command.d.ts.map +1 -1
  45. package/dist/src/commands/context/journey.command.d.ts +6 -2
  46. package/dist/src/commands/context/journey.command.d.ts.map +1 -1
  47. package/dist/src/commands/context/journey.command.js +8 -4
  48. package/dist/src/commands/context/journey.command.js.map +1 -1
  49. package/dist/src/commands/context/jurisdictions.command.d.ts +36 -0
  50. package/dist/src/commands/context/jurisdictions.command.d.ts.map +1 -0
  51. package/dist/src/commands/context/jurisdictions.command.js +115 -0
  52. package/dist/src/commands/context/jurisdictions.command.js.map +1 -0
  53. package/dist/src/commands/context/list.command.d.ts.map +1 -1
  54. package/dist/src/commands/db/db-schema-plan.utils.d.ts.map +1 -1
  55. package/dist/src/commands/db/diff.command.d.ts.map +1 -1
  56. package/dist/src/commands/db/generate.command.d.ts.map +1 -1
  57. package/dist/src/commands/db/migrate.command.d.ts.map +1 -1
  58. package/dist/src/commands/db/resolve.command.d.ts.map +1 -1
  59. package/dist/src/commands/dev/__tests__/design-tokens.command.test.d.ts.map +1 -1
  60. package/dist/src/commands/dev/__tests__/start.command.test.d.ts.map +1 -1
  61. package/dist/src/commands/dev/__tests__/start.command.test.js +6 -6
  62. package/dist/src/commands/dev/__tests__/start.command.test.js.map +1 -1
  63. package/dist/src/commands/dev/__tests__/stop.command.test.d.ts.map +1 -1
  64. package/dist/src/commands/dev/__tests__/sync-csp.command.test.d.ts.map +1 -1
  65. package/dist/src/commands/dev/__tests__/sync-csp.command.test.js +71 -0
  66. package/dist/src/commands/dev/__tests__/sync-csp.command.test.js.map +1 -1
  67. package/dist/src/commands/dev/charts-audit.command.d.ts +5 -3
  68. package/dist/src/commands/dev/charts-audit.command.d.ts.map +1 -1
  69. package/dist/src/commands/dev/charts-audit.command.js +36 -7
  70. package/dist/src/commands/dev/charts-audit.command.js.map +1 -1
  71. package/dist/src/commands/dev/design-tokens-generate.command.d.ts.map +1 -1
  72. package/dist/src/commands/dev/design-tokens-init.command.d.ts.map +1 -1
  73. package/dist/src/commands/dev/design-tokens-validate.command.d.ts.map +1 -1
  74. package/dist/src/commands/dev/force-stop.command.d.ts.map +1 -1
  75. package/dist/src/commands/dev/resources.command.d.ts.map +1 -1
  76. package/dist/src/commands/dev/start.command.d.ts.map +1 -1
  77. package/dist/src/commands/dev/start.command.js +8 -7
  78. package/dist/src/commands/dev/start.command.js.map +1 -1
  79. package/dist/src/commands/dev/stop-all.command.d.ts.map +1 -1
  80. package/dist/src/commands/dev/sync-csp.command.d.ts.map +1 -1
  81. package/dist/src/commands/dev/sync-csp.command.js +35 -7
  82. package/dist/src/commands/dev/sync-csp.command.js.map +1 -1
  83. package/dist/src/commands/docs/__tests__/publish.command.test.d.ts +2 -0
  84. package/dist/src/commands/docs/__tests__/publish.command.test.d.ts.map +1 -0
  85. package/dist/src/commands/docs/__tests__/publish.command.test.js +101 -0
  86. package/dist/src/commands/docs/__tests__/publish.command.test.js.map +1 -0
  87. package/dist/src/commands/docs/publish.command.d.ts +29 -0
  88. package/dist/src/commands/docs/publish.command.d.ts.map +1 -0
  89. package/dist/src/commands/docs/publish.command.js +82 -0
  90. package/dist/src/commands/docs/publish.command.js.map +1 -0
  91. package/dist/src/commands/frontend/publish.command.d.ts.map +1 -1
  92. package/dist/src/commands/fwk/__tests__/dev-skills.command.test.d.ts.map +1 -1
  93. package/dist/src/commands/fwk/__tests__/generate-docs.command.test.d.ts.map +1 -1
  94. package/dist/src/commands/fwk/__tests__/generate-docs.command.test.js.map +1 -1
  95. package/dist/src/commands/fwk/audit.command.d.ts.map +1 -1
  96. package/dist/src/commands/fwk/dev-skills.command.d.ts.map +1 -1
  97. package/dist/src/commands/fwk/dev-skills.command.js +12 -0
  98. package/dist/src/commands/fwk/dev-skills.command.js.map +1 -1
  99. package/dist/src/commands/fwk/generate-docs.command.d.ts.map +1 -1
  100. package/dist/src/commands/fwk/generate-providers.command.d.ts +21 -0
  101. package/dist/src/commands/fwk/generate-providers.command.d.ts.map +1 -0
  102. package/dist/src/commands/fwk/generate-providers.command.js +325 -0
  103. package/dist/src/commands/fwk/generate-providers.command.js.map +1 -0
  104. package/dist/src/commands/fwk/graph.command.d.ts.map +1 -1
  105. package/dist/src/commands/fwk/publish-all.command.d.ts.map +1 -1
  106. package/dist/src/commands/fwk/publish-docker.command.d.ts.map +1 -1
  107. package/dist/src/commands/fwk/publish-npm.command.d.ts.map +1 -1
  108. package/dist/src/commands/fwk/version-bump.command.d.ts.map +1 -1
  109. package/dist/src/commands/fwk/version-set.command.d.ts.map +1 -1
  110. package/dist/src/commands/fwk/version-show.command.d.ts.map +1 -1
  111. package/dist/src/commands/fwk/version-show.command.js +9 -1
  112. package/dist/src/commands/fwk/version-show.command.js.map +1 -1
  113. package/dist/src/commands/fwk/version-sync.command.d.ts.map +1 -1
  114. package/dist/src/commands/fwk/what-touches.command.d.ts.map +1 -1
  115. package/dist/src/commands/fwk/wt-status.command.d.ts +13 -4
  116. package/dist/src/commands/fwk/wt-status.command.d.ts.map +1 -1
  117. package/dist/src/commands/fwk/wt-status.command.js +34 -5
  118. package/dist/src/commands/fwk/wt-status.command.js.map +1 -1
  119. package/dist/src/commands/fwk/wt-tail.command.d.ts +12 -6
  120. package/dist/src/commands/fwk/wt-tail.command.d.ts.map +1 -1
  121. package/dist/src/commands/fwk/wt-tail.command.js +40 -10
  122. package/dist/src/commands/fwk/wt-tail.command.js.map +1 -1
  123. package/dist/src/commands/generate/__tests__/email-command.utils.test.d.ts.map +1 -1
  124. package/dist/src/commands/generate/__tests__/email-command.utils.test.js +0 -1
  125. package/dist/src/commands/generate/__tests__/email-command.utils.test.js.map +1 -1
  126. package/dist/src/commands/generate/email-command.utils.d.ts.map +1 -1
  127. package/dist/src/commands/generate/email-command.utils.js +1 -0
  128. package/dist/src/commands/generate/email-command.utils.js.map +1 -1
  129. package/dist/src/commands/generate/email-preview.command.d.ts +8 -0
  130. package/dist/src/commands/generate/email-preview.command.d.ts.map +1 -1
  131. package/dist/src/commands/generate/email-preview.command.js +57 -0
  132. package/dist/src/commands/generate/email-preview.command.js.map +1 -1
  133. package/dist/src/commands/generate/email-status.command.d.ts.map +1 -1
  134. package/dist/src/commands/generate/email-test-send.command.d.ts.map +1 -1
  135. package/dist/src/commands/generate/email-translate.command.d.ts.map +1 -1
  136. package/dist/src/commands/generate/email.command.d.ts.map +1 -1
  137. package/dist/src/commands/generate/labelling-command.utils.d.ts.map +1 -1
  138. package/dist/src/commands/generate/labelling-command.utils.js +1 -0
  139. package/dist/src/commands/generate/labelling-command.utils.js.map +1 -1
  140. package/dist/src/commands/generate/labels-plan.command.d.ts.map +1 -1
  141. package/dist/src/commands/generate/labels.command.d.ts.map +1 -1
  142. package/dist/src/commands/generate/translate.command.d.ts.map +1 -1
  143. package/dist/src/commands/help.command.d.ts.map +1 -1
  144. package/dist/src/commands/help.command.js +2 -0
  145. package/dist/src/commands/help.command.js.map +1 -1
  146. package/dist/src/commands/init.command.d.ts +17 -0
  147. package/dist/src/commands/init.command.d.ts.map +1 -1
  148. package/dist/src/commands/init.command.js +89 -4
  149. package/dist/src/commands/init.command.js.map +1 -1
  150. package/dist/src/commands/local/__tests__/dev-status.command.test.d.ts.map +1 -1
  151. package/dist/src/commands/local/__tests__/dev.command.test.d.ts.map +1 -1
  152. package/dist/src/commands/local/__tests__/dev.command.test.js +60 -0
  153. package/dist/src/commands/local/__tests__/dev.command.test.js.map +1 -1
  154. package/dist/src/commands/local/__tests__/doctor.command.test.d.ts.map +1 -1
  155. package/dist/src/commands/local/__tests__/doctor.command.test.js +16 -2
  156. package/dist/src/commands/local/__tests__/doctor.command.test.js.map +1 -1
  157. package/dist/src/commands/local/__tests__/init.command.test.d.ts.map +1 -1
  158. package/dist/src/commands/local/__tests__/init.command.test.js +28 -1
  159. package/dist/src/commands/local/__tests__/init.command.test.js.map +1 -1
  160. package/dist/src/commands/local/__tests__/reinit.command.test.d.ts.map +1 -1
  161. package/dist/src/commands/local/__tests__/reset.command.test.d.ts.map +1 -1
  162. package/dist/src/commands/local/__tests__/up.command.test.d.ts.map +1 -1
  163. package/dist/src/commands/local/__tests__/up.command.test.js +7 -0
  164. package/dist/src/commands/local/__tests__/up.command.test.js.map +1 -1
  165. package/dist/src/commands/local/dev-status.command.d.ts.map +1 -1
  166. package/dist/src/commands/local/dev.command.d.ts +6 -3
  167. package/dist/src/commands/local/dev.command.d.ts.map +1 -1
  168. package/dist/src/commands/local/dev.command.js +13 -4
  169. package/dist/src/commands/local/dev.command.js.map +1 -1
  170. package/dist/src/commands/local/doctor.command.d.ts +9 -0
  171. package/dist/src/commands/local/doctor.command.d.ts.map +1 -1
  172. package/dist/src/commands/local/doctor.command.js +24 -6
  173. package/dist/src/commands/local/doctor.command.js.map +1 -1
  174. package/dist/src/commands/local/down.command.d.ts.map +1 -1
  175. package/dist/src/commands/local/init.command.d.ts.map +1 -1
  176. package/dist/src/commands/local/init.command.js +11 -2
  177. package/dist/src/commands/local/init.command.js.map +1 -1
  178. package/dist/src/commands/local/logs.command.d.ts.map +1 -1
  179. package/dist/src/commands/local/reinit.command.d.ts.map +1 -1
  180. package/dist/src/commands/local/reset.command.d.ts.map +1 -1
  181. package/dist/src/commands/local/status.command.d.ts.map +1 -1
  182. package/dist/src/commands/local/up.command.d.ts.map +1 -1
  183. package/dist/src/commands/local/up.command.js.map +1 -1
  184. package/dist/src/commands/lock/__tests__/check.command.test.d.ts.map +1 -1
  185. package/dist/src/commands/lock/__tests__/check.live.contract.test.d.ts.map +1 -1
  186. package/dist/src/commands/lock/check.command.d.ts.map +1 -1
  187. package/dist/src/commands/lock/check.command.js +4 -10
  188. package/dist/src/commands/lock/check.command.js.map +1 -1
  189. package/dist/src/commands/market/__tests__/generate.command.test.d.ts.map +1 -1
  190. package/dist/src/commands/market/__tests__/market-command.utils.test.d.ts.map +1 -1
  191. package/dist/src/commands/market/__tests__/market-command.utils.test.js +0 -1
  192. package/dist/src/commands/market/__tests__/market-command.utils.test.js.map +1 -1
  193. package/dist/src/commands/market/generate.command.d.ts.map +1 -1
  194. package/dist/src/commands/market/market-command.utils.d.ts.map +1 -1
  195. package/dist/src/commands/market/market-command.utils.js +1 -0
  196. package/dist/src/commands/market/market-command.utils.js.map +1 -1
  197. package/dist/src/commands/providers/__tests__/required-inputs.test.d.ts +2 -0
  198. package/dist/src/commands/providers/__tests__/required-inputs.test.d.ts.map +1 -0
  199. package/dist/src/commands/providers/__tests__/required-inputs.test.js +35 -0
  200. package/dist/src/commands/providers/__tests__/required-inputs.test.js.map +1 -0
  201. package/dist/src/commands/providers/show.command.d.ts +51 -0
  202. package/dist/src/commands/providers/show.command.d.ts.map +1 -0
  203. package/dist/src/commands/providers/show.command.js +152 -0
  204. package/dist/src/commands/providers/show.command.js.map +1 -0
  205. package/dist/src/commands/registry/add.command.d.ts.map +1 -1
  206. package/dist/src/commands/registry/info.command.d.ts.map +1 -1
  207. package/dist/src/commands/registry/lockfile-smoke.command.d.ts.map +1 -1
  208. package/dist/src/commands/registry/login.command.d.ts.map +1 -1
  209. package/dist/src/commands/registry/login.command.js +2 -0
  210. package/dist/src/commands/registry/login.command.js.map +1 -1
  211. package/dist/src/commands/registry/logout.command.d.ts.map +1 -1
  212. package/dist/src/commands/registry/ping.command.d.ts.map +1 -1
  213. package/dist/src/commands/registry/publish.command.d.ts.map +1 -1
  214. package/dist/src/commands/registry/publish.command.js +2 -0
  215. package/dist/src/commands/registry/publish.command.js.map +1 -1
  216. package/dist/src/commands/registry/registry-transport.constants.d.ts +33 -0
  217. package/dist/src/commands/registry/registry-transport.constants.d.ts.map +1 -0
  218. package/dist/src/commands/registry/registry-transport.constants.js +33 -0
  219. package/dist/src/commands/registry/registry-transport.constants.js.map +1 -0
  220. package/dist/src/commands/registry/remove.command.d.ts.map +1 -1
  221. package/dist/src/commands/registry/repair-lockfile.command.d.ts.map +1 -1
  222. package/dist/src/commands/registry/search.command.d.ts.map +1 -1
  223. package/dist/src/commands/registry/update.command.d.ts.map +1 -1
  224. package/dist/src/commands/registry/whoami.command.d.ts.map +1 -1
  225. package/dist/src/commands/registry/whoami.command.js +2 -0
  226. package/dist/src/commands/registry/whoami.command.js.map +1 -1
  227. package/dist/src/commands/remote/__tests__/remote-commands.test.d.ts.map +1 -1
  228. package/dist/src/commands/remote/create.command.d.ts.map +1 -1
  229. package/dist/src/commands/remote/list.command.d.ts.map +1 -1
  230. package/dist/src/commands/remote/status.command.d.ts.map +1 -1
  231. package/dist/src/commands/remote/sync.command.d.ts.map +1 -1
  232. package/dist/src/commands/setup.command.d.ts.map +1 -1
  233. package/dist/src/commands/version.command.d.ts.map +1 -1
  234. package/dist/src/commands/website/__tests__/audit.command.test.d.ts.map +1 -1
  235. package/dist/src/commands/website/audit.command.d.ts.map +1 -1
  236. package/dist/src/commands/workbench/__tests__/workbench.commands.test.d.ts.map +1 -1
  237. package/dist/src/commands/workbench/open.command.d.ts.map +1 -1
  238. package/dist/src/commands/workbench/status.command.d.ts.map +1 -1
  239. package/dist/src/infrastructure/errors/error.utils.d.ts.map +1 -1
  240. package/dist/src/infrastructure/io/file.utils.d.ts.map +1 -1
  241. package/dist/src/infrastructure/io/io.schemas.d.ts.map +1 -1
  242. package/dist/src/infrastructure/io/template-processor.d.ts.map +1 -1
  243. package/dist/src/infrastructure/logger/logger.service.d.ts.map +1 -1
  244. package/dist/src/infrastructure/process/__tests__/spawn.utils.test.d.ts.map +1 -1
  245. package/dist/src/infrastructure/process/spawn.utils.d.ts.map +1 -1
  246. package/dist/src/infrastructure/ui/formatting.service.d.ts.map +1 -1
  247. package/dist/src/infrastructure/ui/interaction-engine.service.d.ts.map +1 -1
  248. package/dist/src/infrastructure/ui/markdown-renderer.service.d.ts.map +1 -1
  249. package/dist/src/infrastructure/ui/ui.schemas.d.ts.map +1 -1
  250. package/dist/src/infrastructure/utils/string.utils.d.ts.map +1 -1
  251. package/dist/src/infrastructure/validation/validator.service.d.ts.map +1 -1
  252. package/dist/src/kernel/__tests__/bootstrap.test.d.ts.map +1 -1
  253. package/dist/src/kernel/__tests__/command-registry.test.d.ts.map +1 -1
  254. package/dist/src/kernel/__tests__/command-registry.test.js +9 -0
  255. package/dist/src/kernel/__tests__/command-registry.test.js.map +1 -1
  256. package/dist/src/kernel/__tests__/command-runner.test.d.ts.map +1 -1
  257. package/dist/src/kernel/__tests__/command-scope-utils.test.d.ts.map +1 -1
  258. package/dist/src/kernel/__tests__/flag-utils.test.d.ts.map +1 -1
  259. package/dist/src/kernel/__tests__/hooks.test.d.ts.map +1 -1
  260. package/dist/src/kernel/base-command.d.ts.map +1 -1
  261. package/dist/src/kernel/bootstrap.d.ts.map +1 -1
  262. package/dist/src/kernel/command-registry.d.ts.map +1 -1
  263. package/dist/src/kernel/command-registry.js +6 -0
  264. package/dist/src/kernel/command-registry.js.map +1 -1
  265. package/dist/src/kernel/command-runner.d.ts.map +1 -1
  266. package/dist/src/kernel/command-scope-utils.d.ts.map +1 -1
  267. package/dist/src/kernel/flag-utils.d.ts.map +1 -1
  268. package/dist/src/kernel/hooks.d.ts.map +1 -1
  269. package/dist/src/kernel/logger.d.ts.map +1 -1
  270. package/dist/src/kernel/types.d.ts +17 -1
  271. package/dist/src/kernel/types.d.ts.map +1 -1
  272. package/dist/src/kernel/types.js +16 -0
  273. package/dist/src/kernel/types.js.map +1 -1
  274. package/dist/src/main.d.ts.map +1 -1
  275. package/dist/src/modules/domain/credentials/__tests__/admin-user.module.test.d.ts.map +1 -1
  276. package/dist/src/modules/domain/credentials/__tests__/approver-user.module.test.d.ts +2 -0
  277. package/dist/src/modules/domain/credentials/__tests__/approver-user.module.test.d.ts.map +1 -0
  278. package/dist/src/modules/domain/credentials/__tests__/approver-user.module.test.js +146 -0
  279. package/dist/src/modules/domain/credentials/__tests__/approver-user.module.test.js.map +1 -0
  280. package/dist/src/modules/domain/credentials/__tests__/providers-config.module.test.d.ts.map +1 -1
  281. package/dist/src/modules/domain/credentials/__tests__/providers-config.module.test.js +2 -2
  282. package/dist/src/modules/domain/credentials/__tests__/providers-config.module.test.js.map +1 -1
  283. package/dist/src/modules/domain/credentials/admin-user.module.d.ts.map +1 -1
  284. package/dist/src/modules/domain/credentials/approver-user.module.d.ts +85 -0
  285. package/dist/src/modules/domain/credentials/approver-user.module.d.ts.map +1 -0
  286. package/dist/src/modules/domain/credentials/approver-user.module.js +92 -0
  287. package/dist/src/modules/domain/credentials/approver-user.module.js.map +1 -0
  288. package/dist/src/modules/domain/credentials/module.types.d.ts.map +1 -1
  289. package/dist/src/modules/domain/credentials/providers-config.module.d.ts +17 -9
  290. package/dist/src/modules/domain/credentials/providers-config.module.d.ts.map +1 -1
  291. package/dist/src/modules/domain/credentials/providers-config.module.js +18 -10
  292. package/dist/src/modules/domain/credentials/providers-config.module.js.map +1 -1
  293. package/dist/src/modules/domain/environment/__tests__/database-config.module.test.d.ts.map +1 -1
  294. package/dist/src/modules/domain/environment/database-config.module.d.ts.map +1 -1
  295. package/dist/src/modules/domain/environment/module.types.d.ts.map +1 -1
  296. package/dist/src/modules/domain/environment/paths-config.module.d.ts.map +1 -1
  297. package/dist/src/modules/domain/environment/runtime-selector.module.d.ts.map +1 -1
  298. package/dist/src/modules/domain/environment/runtime-semantics.module.d.ts.map +1 -1
  299. package/dist/src/modules/domain/module.types.d.ts.map +1 -1
  300. package/dist/src/services/application/__tests__/app-bootstrap.approving-administrator.test.d.ts +2 -0
  301. package/dist/src/services/application/__tests__/app-bootstrap.approving-administrator.test.d.ts.map +1 -0
  302. package/dist/src/services/application/__tests__/app-bootstrap.approving-administrator.test.js +111 -0
  303. package/dist/src/services/application/__tests__/app-bootstrap.approving-administrator.test.js.map +1 -0
  304. package/dist/src/services/application/__tests__/app-bootstrap.service.apps-manager-reconnect.test.d.ts.map +1 -1
  305. package/dist/src/services/application/__tests__/app-bootstrap.service.degraded-env.test.d.ts.map +1 -1
  306. package/dist/src/services/application/__tests__/app-bootstrap.service.operation-timeout.test.d.ts.map +1 -1
  307. package/dist/src/services/application/__tests__/app-bootstrap.service.operation-timeout.test.js +1 -1
  308. package/dist/src/services/application/__tests__/app-bootstrap.service.operation-timeout.test.js.map +1 -1
  309. package/dist/src/services/application/__tests__/app-bootstrap.service.test.d.ts.map +1 -1
  310. package/dist/src/services/application/__tests__/app-bootstrap.service.test.js +22 -29
  311. package/dist/src/services/application/__tests__/app-bootstrap.service.test.js.map +1 -1
  312. package/dist/src/services/application/__tests__/app-bootstrap.two-phase-seeding.test.d.ts.map +1 -1
  313. package/dist/src/services/application/__tests__/app-bootstrap.two-phase-seeding.test.js +1 -1
  314. package/dist/src/services/application/__tests__/app-bootstrap.two-phase-seeding.test.js.map +1 -1
  315. package/dist/src/services/application/__tests__/app-runtime-targets.service.test.d.ts.map +1 -1
  316. package/dist/src/services/application/__tests__/app-runtime-targets.service.test.js +2 -2
  317. package/dist/src/services/application/__tests__/app-runtime-targets.service.test.js.map +1 -1
  318. package/dist/src/services/application/__tests__/application-assets-delivery.service.test.d.ts.map +1 -1
  319. package/dist/src/services/application/__tests__/application-assets-delivery.service.test.js +19 -0
  320. package/dist/src/services/application/__tests__/application-assets-delivery.service.test.js.map +1 -1
  321. package/dist/src/services/application/__tests__/application-dependency-alignment.service.test.d.ts.map +1 -1
  322. package/dist/src/services/application/__tests__/application-initialization-verification.service.test.d.ts.map +1 -1
  323. package/dist/src/services/application/__tests__/application-runtime-bootstrap.service.test.d.ts.map +1 -1
  324. package/dist/src/services/application/__tests__/apps-manager-unavailable-classification.test.d.ts.map +1 -1
  325. package/dist/src/services/application/__tests__/apps-manager-unavailable-classification.test.js.map +1 -1
  326. package/dist/src/services/application/__tests__/audit-provider-immudb-backing.test.d.ts.map +1 -1
  327. package/dist/src/services/application/__tests__/dev-orchestrator.service.test.d.ts.map +1 -1
  328. package/dist/src/services/application/__tests__/dev-schema-drift.service.test.d.ts.map +1 -1
  329. package/dist/src/services/application/__tests__/existing-app-bootstrap.service.test.d.ts.map +1 -1
  330. package/dist/src/services/application/__tests__/existing-app-bootstrap.service.test.js +0 -1
  331. package/dist/src/services/application/__tests__/existing-app-bootstrap.service.test.js.map +1 -1
  332. package/dist/src/services/application/__tests__/local-app-reinit.service.test.d.ts.map +1 -1
  333. package/dist/src/services/application/__tests__/local-app-reinit.service.test.js +8 -1
  334. package/dist/src/services/application/__tests__/local-app-reinit.service.test.js.map +1 -1
  335. package/dist/src/services/application/__tests__/local-application-initialization.guard.test.d.ts.map +1 -1
  336. package/dist/src/services/application/__tests__/local-application-initialization.service.test.d.ts.map +1 -1
  337. package/dist/src/services/application/__tests__/local-application-initialization.service.test.js +35 -0
  338. package/dist/src/services/application/__tests__/local-application-initialization.service.test.js.map +1 -1
  339. package/dist/src/services/application/__tests__/provider-package-links.service.test.d.ts +2 -0
  340. package/dist/src/services/application/__tests__/provider-package-links.service.test.d.ts.map +1 -0
  341. package/dist/src/services/application/__tests__/provider-package-links.service.test.js +224 -0
  342. package/dist/src/services/application/__tests__/provider-package-links.service.test.js.map +1 -0
  343. package/dist/src/services/application/__tests__/provider-runtime-sync.service.test.d.ts.map +1 -1
  344. package/dist/src/services/application/__tests__/provider-runtime-sync.service.test.js +28 -0
  345. package/dist/src/services/application/__tests__/provider-runtime-sync.service.test.js.map +1 -1
  346. package/dist/src/services/application/__tests__/saas-and-infra-contracts.test.d.ts.map +1 -1
  347. package/dist/src/services/application/__tests__/saas-and-infra-contracts.test.js +0 -1
  348. package/dist/src/services/application/__tests__/saas-and-infra-contracts.test.js.map +1 -1
  349. package/dist/src/services/application/__tests__/saas-scaffold.service.test.d.ts.map +1 -1
  350. package/dist/src/services/application/__tests__/saas-skeleton.service.test.d.ts.map +1 -1
  351. package/dist/src/services/application/__tests__/saas-skeleton.service.test.js.map +1 -1
  352. package/dist/src/services/application/app-bootstrap.service.d.ts +43 -10
  353. package/dist/src/services/application/app-bootstrap.service.d.ts.map +1 -1
  354. package/dist/src/services/application/app-bootstrap.service.js +92 -49
  355. package/dist/src/services/application/app-bootstrap.service.js.map +1 -1
  356. package/dist/src/services/application/app-env.service.d.ts.map +1 -1
  357. package/dist/src/services/application/app-local-runtime-addresses.service.d.ts.map +1 -1
  358. package/dist/src/services/application/app-runtime-targets.service.d.ts.map +1 -1
  359. package/dist/src/services/application/app-schema-bootstrap.service.d.ts.map +1 -1
  360. package/dist/src/services/application/application-assets-delivery.service.d.ts +22 -1
  361. package/dist/src/services/application/application-assets-delivery.service.d.ts.map +1 -1
  362. package/dist/src/services/application/application-assets-delivery.service.js +35 -7
  363. package/dist/src/services/application/application-assets-delivery.service.js.map +1 -1
  364. package/dist/src/services/application/application-dependency-alignment.service.d.ts.map +1 -1
  365. package/dist/src/services/application/application-dev-port-offsets.d.ts.map +1 -1
  366. package/dist/src/services/application/application-initialization-verification.service.d.ts.map +1 -1
  367. package/dist/src/services/application/application-root.utils.d.ts.map +1 -1
  368. package/dist/src/services/application/application-runtime-bootstrap.service.d.ts +6 -0
  369. package/dist/src/services/application/application-runtime-bootstrap.service.d.ts.map +1 -1
  370. package/dist/src/services/application/application-runtime-bootstrap.service.js +41 -2
  371. package/dist/src/services/application/application-runtime-bootstrap.service.js.map +1 -1
  372. package/dist/src/services/application/dev-orchestrator.service.d.ts.map +1 -1
  373. package/dist/src/services/application/dev-schema-drift.service.d.ts.map +1 -1
  374. package/dist/src/services/application/existing-app-bootstrap.service.d.ts.map +1 -1
  375. package/dist/src/services/application/local-app-reinit.service.d.ts.map +1 -1
  376. package/dist/src/services/application/local-application-initialization.service.d.ts.map +1 -1
  377. package/dist/src/services/application/local-application-initialization.service.js +22 -6
  378. package/dist/src/services/application/local-application-initialization.service.js.map +1 -1
  379. package/dist/src/services/application/provider-package-links.service.d.ts +160 -0
  380. package/dist/src/services/application/provider-package-links.service.d.ts.map +1 -0
  381. package/dist/src/services/application/provider-package-links.service.js +312 -0
  382. package/dist/src/services/application/provider-package-links.service.js.map +1 -0
  383. package/dist/src/services/application/provider-runtime-sync.service.d.ts.map +1 -1
  384. package/dist/src/services/application/provider-runtime-sync.service.js +7 -20
  385. package/dist/src/services/application/provider-runtime-sync.service.js.map +1 -1
  386. package/dist/src/services/application/saas-scaffold.service.d.ts.map +1 -1
  387. package/dist/src/services/application/saas-scaffold.service.js +11 -2
  388. package/dist/src/services/application/saas-scaffold.service.js.map +1 -1
  389. package/dist/src/services/application/saas-skeleton.service.d.ts.map +1 -1
  390. package/dist/src/services/application/saas-skeleton.service.js +46 -26
  391. package/dist/src/services/application/saas-skeleton.service.js.map +1 -1
  392. package/dist/src/services/brand/__tests__/brand-asset-delivery.test.d.ts.map +1 -1
  393. package/dist/src/services/brand/brand-asset-projection.d.ts.map +1 -1
  394. package/dist/src/services/brand/brand-destination-utils.d.ts.map +1 -1
  395. package/dist/src/services/brand/brand-propagation.types.d.ts.map +1 -1
  396. package/dist/src/services/brand/brand-ssot-reader.d.ts.map +1 -1
  397. package/dist/src/services/brand/destinations/app-public.destination.d.ts.map +1 -1
  398. package/dist/src/services/brand/destinations/runtime-app-config.destination.d.ts.map +1 -1
  399. package/dist/src/services/brand/destinations/technical-doc-static.destination.d.ts.map +1 -1
  400. package/dist/src/services/brand/destinations/website-og.destination.d.ts.map +1 -1
  401. package/dist/src/services/brand/destinations/website-public.destination.d.ts.map +1 -1
  402. package/dist/src/services/catalog/__tests__/durable-state-classification.test.d.ts +2 -0
  403. package/dist/src/services/catalog/__tests__/durable-state-classification.test.d.ts.map +1 -0
  404. package/dist/src/services/catalog/__tests__/durable-state-classification.test.js +93 -0
  405. package/dist/src/services/catalog/__tests__/durable-state-classification.test.js.map +1 -0
  406. package/dist/src/services/catalog/__tests__/service-address-resolver.service.test.d.ts.map +1 -1
  407. package/dist/src/services/catalog/__tests__/service-address-resolver.service.test.js +25 -5
  408. package/dist/src/services/catalog/__tests__/service-address-resolver.service.test.js.map +1 -1
  409. package/dist/src/services/catalog/__tests__/service-catalog.schemas.test.d.ts.map +1 -1
  410. package/dist/src/services/catalog/__tests__/service-catalog.schemas.test.js +109 -51
  411. package/dist/src/services/catalog/__tests__/service-catalog.schemas.test.js.map +1 -1
  412. package/dist/src/services/catalog/service-address-resolver.service.d.ts +0 -1
  413. package/dist/src/services/catalog/service-address-resolver.service.d.ts.map +1 -1
  414. package/dist/src/services/catalog/service-address-resolver.service.js +23 -7
  415. package/dist/src/services/catalog/service-address-resolver.service.js.map +1 -1
  416. package/dist/src/services/catalog/service-catalog.schemas.d.ts +148 -51
  417. package/dist/src/services/catalog/service-catalog.schemas.d.ts.map +1 -1
  418. package/dist/src/services/catalog/service-catalog.schemas.js +230 -78
  419. package/dist/src/services/catalog/service-catalog.schemas.js.map +1 -1
  420. package/dist/src/services/coding-agents/__tests__/acp-conformance-probe.service.test.d.ts +2 -0
  421. package/dist/src/services/coding-agents/__tests__/acp-conformance-probe.service.test.d.ts.map +1 -0
  422. package/dist/src/services/coding-agents/__tests__/acp-conformance-probe.service.test.js +110 -0
  423. package/dist/src/services/coding-agents/__tests__/acp-conformance-probe.service.test.js.map +1 -0
  424. package/dist/src/services/coding-agents/acp-conformance-probe.service.d.ts +32 -0
  425. package/dist/src/services/coding-agents/acp-conformance-probe.service.d.ts.map +1 -1
  426. package/dist/src/services/coding-agents/acp-conformance-probe.service.js +165 -7
  427. package/dist/src/services/coding-agents/acp-conformance-probe.service.js.map +1 -1
  428. package/dist/src/services/companion/__tests__/companion-client.service.test.d.ts.map +1 -1
  429. package/dist/src/services/companion/__tests__/companion-client.service.test.js +96 -0
  430. package/dist/src/services/companion/__tests__/companion-client.service.test.js.map +1 -1
  431. package/dist/src/services/companion/__tests__/companion-lifecycle.service.test.d.ts.map +1 -1
  432. package/dist/src/services/companion/__tests__/workbench-browser-launcher.service.test.d.ts.map +1 -1
  433. package/dist/src/services/companion/__tests__/workbench-cli.service.test.d.ts.map +1 -1
  434. package/dist/src/services/companion/companion-client-options.utils.d.ts.map +1 -1
  435. package/dist/src/services/companion/companion-client-options.utils.js +6 -0
  436. package/dist/src/services/companion/companion-client-options.utils.js.map +1 -1
  437. package/dist/src/services/companion/companion-client.service.d.ts.map +1 -1
  438. package/dist/src/services/companion/companion-client.service.js +34 -0
  439. package/dist/src/services/companion/companion-client.service.js.map +1 -1
  440. package/dist/src/services/companion/companion-lifecycle.service.d.ts.map +1 -1
  441. package/dist/src/services/companion/companion-local-token.utils.d.ts +20 -0
  442. package/dist/src/services/companion/companion-local-token.utils.d.ts.map +1 -0
  443. package/dist/src/services/companion/companion-local-token.utils.js +62 -0
  444. package/dist/src/services/companion/companion-local-token.utils.js.map +1 -0
  445. package/dist/src/services/companion/companion.schemas.d.ts +12 -0
  446. package/dist/src/services/companion/companion.schemas.d.ts.map +1 -1
  447. package/dist/src/services/companion/companion.schemas.js.map +1 -1
  448. package/dist/src/services/companion/git-helper.service.d.ts.map +1 -1
  449. package/dist/src/services/companion/local-companion-authority.service.d.ts.map +1 -1
  450. package/dist/src/services/companion/local-companion-authority.service.js +9 -30
  451. package/dist/src/services/companion/local-companion-authority.service.js.map +1 -1
  452. package/dist/src/services/companion/workbench-browser-launcher.service.d.ts.map +1 -1
  453. package/dist/src/services/companion/workbench-cli.service.d.ts.map +1 -1
  454. package/dist/src/services/companion/workbench-cli.service.js +10 -1
  455. package/dist/src/services/companion/workbench-cli.service.js.map +1 -1
  456. package/dist/src/services/context/__tests__/context-manager.installed-assets.test.d.ts.map +1 -1
  457. package/dist/src/services/context/__tests__/context-manager.installed-assets.test.js +7 -0
  458. package/dist/src/services/context/__tests__/context-manager.installed-assets.test.js.map +1 -1
  459. package/dist/src/services/context/__tests__/context-manager.service.test.d.ts.map +1 -1
  460. package/dist/src/services/context/context-manager.service.d.ts +9 -0
  461. package/dist/src/services/context/context-manager.service.d.ts.map +1 -1
  462. package/dist/src/services/context/context-manager.service.js +13 -1
  463. package/dist/src/services/context/context-manager.service.js.map +1 -1
  464. package/dist/src/services/context/context.schemas.d.ts.map +1 -1
  465. package/dist/src/services/context/state-manager.service.d.ts.map +1 -1
  466. package/dist/src/services/credentials/__tests__/ci-secrets-mapping.test.d.ts +28 -0
  467. package/dist/src/services/credentials/__tests__/ci-secrets-mapping.test.d.ts.map +1 -0
  468. package/dist/src/services/credentials/__tests__/ci-secrets-mapping.test.js +197 -0
  469. package/dist/src/services/credentials/__tests__/ci-secrets-mapping.test.js.map +1 -0
  470. package/dist/src/services/credentials/__tests__/composed-provider-secrets.guard.test.d.ts +2 -0
  471. package/dist/src/services/credentials/__tests__/composed-provider-secrets.guard.test.d.ts.map +1 -0
  472. package/dist/src/services/credentials/__tests__/composed-provider-secrets.guard.test.js +327 -0
  473. package/dist/src/services/credentials/__tests__/composed-provider-secrets.guard.test.js.map +1 -0
  474. package/dist/src/services/credentials/__tests__/framework-managed-secrets.test.d.ts.map +1 -1
  475. package/dist/src/services/credentials/__tests__/provider-contribution-registration.guard.test.d.ts +2 -0
  476. package/dist/src/services/credentials/__tests__/provider-contribution-registration.guard.test.d.ts.map +1 -0
  477. package/dist/src/services/credentials/__tests__/provider-contribution-registration.guard.test.js +94 -0
  478. package/dist/src/services/credentials/__tests__/provider-contribution-registration.guard.test.js.map +1 -0
  479. package/dist/src/services/credentials/__tests__/secrets-contracts.test.d.ts.map +1 -1
  480. package/dist/src/services/credentials/ci-secrets-adapter.service.d.ts.map +1 -1
  481. package/dist/src/services/credentials/ci-secrets-adapter.service.js +114 -37
  482. package/dist/src/services/credentials/ci-secrets-adapter.service.js.map +1 -1
  483. package/dist/src/services/credentials/composed-provider-catalogue.d.ts +209 -0
  484. package/dist/src/services/credentials/composed-provider-catalogue.d.ts.map +1 -0
  485. package/dist/src/services/credentials/composed-provider-catalogue.js +263 -0
  486. package/dist/src/services/credentials/composed-provider-catalogue.js.map +1 -0
  487. package/dist/src/services/credentials/credentials.schemas.d.ts +29 -22
  488. package/dist/src/services/credentials/credentials.schemas.d.ts.map +1 -1
  489. package/dist/src/services/credentials/credentials.schemas.js +67 -5
  490. package/dist/src/services/credentials/credentials.schemas.js.map +1 -1
  491. package/dist/src/services/credentials/credentials.service.d.ts.map +1 -1
  492. package/dist/src/services/credentials/framework-managed-secrets.d.ts +105 -1
  493. package/dist/src/services/credentials/framework-managed-secrets.d.ts.map +1 -1
  494. package/dist/src/services/credentials/framework-managed-secrets.js +51 -8
  495. package/dist/src/services/credentials/framework-managed-secrets.js.map +1 -1
  496. package/dist/src/services/credentials/provider-env-vars.utils.d.ts +127 -7
  497. package/dist/src/services/credentials/provider-env-vars.utils.d.ts.map +1 -1
  498. package/dist/src/services/credentials/provider-env-vars.utils.js +189 -45
  499. package/dist/src/services/credentials/provider-env-vars.utils.js.map +1 -1
  500. package/dist/src/services/credentials/secrets-provisioning.service.d.ts.map +1 -1
  501. package/dist/src/services/credentials/secrets-reader.service.d.ts.map +1 -1
  502. package/dist/src/services/credentials/secrets-rotation.service.d.ts.map +1 -1
  503. package/dist/src/services/credentials/secrets-writer.service.d.ts.map +1 -1
  504. package/dist/src/services/data-services/data-services.schemas.d.ts +0 -1
  505. package/dist/src/services/data-services/data-services.schemas.d.ts.map +1 -1
  506. package/dist/src/services/data-services/data-services.schemas.js +0 -1
  507. package/dist/src/services/data-services/data-services.schemas.js.map +1 -1
  508. package/dist/src/services/data-services/data-services.service.d.ts.map +1 -1
  509. package/dist/src/services/deployment/__tests__/apps-manager-diagnostics.service.test.d.ts.map +1 -1
  510. package/dist/src/services/deployment/__tests__/ci-deploy-generator.service.test.d.ts.map +1 -1
  511. package/dist/src/services/deployment/__tests__/ci-deploy-generator.service.test.js +91 -1
  512. package/dist/src/services/deployment/__tests__/ci-deploy-generator.service.test.js.map +1 -1
  513. package/dist/src/services/deployment/__tests__/ci-workflow-generator.service.test.d.ts.map +1 -1
  514. package/dist/src/services/deployment/__tests__/deployment-template-contracts.test.d.ts.map +1 -1
  515. package/dist/src/services/deployment/__tests__/deployment-template-contracts.test.js +45 -15
  516. package/dist/src/services/deployment/__tests__/deployment-template-contracts.test.js.map +1 -1
  517. package/dist/src/services/deployment/__tests__/host-toolchain-readiness.service.test.d.ts.map +1 -1
  518. package/dist/src/services/deployment/__tests__/host-toolchain-readiness.service.test.js +33 -1
  519. package/dist/src/services/deployment/__tests__/host-toolchain-readiness.service.test.js.map +1 -1
  520. package/dist/src/services/deployment/__tests__/infra-templates-render-smoke.test.d.ts.map +1 -1
  521. package/dist/src/services/deployment/__tests__/local-dev-observer-lifecycle.test.d.ts.map +1 -1
  522. package/dist/src/services/deployment/__tests__/local-dev-output-boundary.test.d.ts.map +1 -1
  523. package/dist/src/services/deployment/__tests__/local-dev-session-lease.service.test.d.ts.map +1 -1
  524. package/dist/src/services/deployment/__tests__/local-dev-shutdown-coordinator.test.d.ts.map +1 -1
  525. package/dist/src/services/deployment/__tests__/local-precondition-checks.service.test.d.ts.map +1 -1
  526. package/dist/src/services/deployment/__tests__/local-precondition-checks.service.test.js +44 -1
  527. package/dist/src/services/deployment/__tests__/local-precondition-checks.service.test.js.map +1 -1
  528. package/dist/src/services/deployment/__tests__/local-runtime-process-cleanup.service.test.d.ts.map +1 -1
  529. package/dist/src/services/deployment/__tests__/parity.compose-vs-k8s.test.d.ts.map +1 -1
  530. package/dist/src/services/deployment/__tests__/parity.compose-vs-k8s.test.js +82 -87
  531. package/dist/src/services/deployment/__tests__/parity.compose-vs-k8s.test.js.map +1 -1
  532. package/dist/src/services/deployment/__tests__/platform-lifecycle.service.test.d.ts.map +1 -1
  533. package/dist/src/services/deployment/__tests__/platform-runtime-policy.service.test.d.ts.map +1 -1
  534. package/dist/src/services/deployment/apps-manager-diagnostics.service.d.ts.map +1 -1
  535. package/dist/src/services/deployment/ci-deploy-generator.service.d.ts.map +1 -1
  536. package/dist/src/services/deployment/ci-deploy-generator.service.js +11 -1
  537. package/dist/src/services/deployment/ci-deploy-generator.service.js.map +1 -1
  538. package/dist/src/services/deployment/ci-workflow-generator.service.d.ts.map +1 -1
  539. package/dist/src/services/deployment/ci-workflow-generator.service.js +23 -4
  540. package/dist/src/services/deployment/ci-workflow-generator.service.js.map +1 -1
  541. package/dist/src/services/deployment/docker/__tests__/compose-env-value-encoding.test.d.ts.map +1 -1
  542. package/dist/src/services/deployment/docker/__tests__/compose-host-mounted-artifact.test.d.ts.map +1 -1
  543. package/dist/src/services/deployment/docker/__tests__/docker-compose-generator.service.test.d.ts.map +1 -1
  544. package/dist/src/services/deployment/docker/__tests__/docker-compose-generator.service.test.js +150 -7
  545. package/dist/src/services/deployment/docker/__tests__/docker-compose-generator.service.test.js.map +1 -1
  546. package/dist/src/services/deployment/docker/__tests__/docker-compose-readiness.service.test.d.ts.map +1 -1
  547. package/dist/src/services/deployment/docker/docker-compose-generator.service.d.ts +1 -1
  548. package/dist/src/services/deployment/docker/docker-compose-generator.service.d.ts.map +1 -1
  549. package/dist/src/services/deployment/docker/docker-compose-generator.service.js +60 -12
  550. package/dist/src/services/deployment/docker/docker-compose-generator.service.js.map +1 -1
  551. package/dist/src/services/deployment/docker/docker-compose-readiness.service.d.ts.map +1 -1
  552. package/dist/src/services/deployment/docker/docker.schemas.d.ts.map +1 -1
  553. package/dist/src/services/deployment/docker/docker.service.d.ts.map +1 -1
  554. package/dist/src/services/deployment/host-toolchain-readiness.service.d.ts.map +1 -1
  555. package/dist/src/services/deployment/infra-writer.service.d.ts.map +1 -1
  556. package/dist/src/services/deployment/infra-writer.service.js +34 -7
  557. package/dist/src/services/deployment/infra-writer.service.js.map +1 -1
  558. package/dist/src/services/deployment/k8s/__tests__/k8s-bootstrap.service.test.d.ts.map +1 -1
  559. package/dist/src/services/deployment/k8s/__tests__/k8s-bootstrap.service.test.js +45 -2
  560. package/dist/src/services/deployment/k8s/__tests__/k8s-bootstrap.service.test.js.map +1 -1
  561. package/dist/src/services/deployment/k8s/__tests__/k8s-manifest-generator.service.test.d.ts.map +1 -1
  562. package/dist/src/services/deployment/k8s/__tests__/k8s-manifest-generator.service.test.js +110 -9
  563. package/dist/src/services/deployment/k8s/__tests__/k8s-manifest-generator.service.test.js.map +1 -1
  564. package/dist/src/services/deployment/k8s/__tests__/k8s-operations.service.test.d.ts.map +1 -1
  565. package/dist/src/services/deployment/k8s/__tests__/k8s-runtime-env-secrets.test.d.ts +2 -0
  566. package/dist/src/services/deployment/k8s/__tests__/k8s-runtime-env-secrets.test.d.ts.map +1 -0
  567. package/dist/src/services/deployment/k8s/__tests__/k8s-runtime-env-secrets.test.js +226 -0
  568. package/dist/src/services/deployment/k8s/__tests__/k8s-runtime-env-secrets.test.js.map +1 -0
  569. package/dist/src/services/deployment/k8s/__tests__/k8s-secrets-generator.service.test.d.ts.map +1 -1
  570. package/dist/src/services/deployment/k8s/__tests__/k8s-secrets-generator.service.test.js +132 -12
  571. package/dist/src/services/deployment/k8s/__tests__/k8s-secrets-generator.service.test.js.map +1 -1
  572. package/dist/src/services/deployment/k8s/__tests__/kind.service.test.d.ts.map +1 -1
  573. package/dist/src/services/deployment/k8s/__tests__/local-k8s-application-pruning.service.test.d.ts.map +1 -1
  574. package/dist/src/services/deployment/k8s/k8s-bootstrap.service.d.ts +23 -0
  575. package/dist/src/services/deployment/k8s/k8s-bootstrap.service.d.ts.map +1 -1
  576. package/dist/src/services/deployment/k8s/k8s-bootstrap.service.js +52 -6
  577. package/dist/src/services/deployment/k8s/k8s-bootstrap.service.js.map +1 -1
  578. package/dist/src/services/deployment/k8s/k8s-local-infra-readiness.service.d.ts.map +1 -1
  579. package/dist/src/services/deployment/k8s/k8s-manifest-generator.service.d.ts.map +1 -1
  580. package/dist/src/services/deployment/k8s/k8s-manifest-generator.service.js +45 -9
  581. package/dist/src/services/deployment/k8s/k8s-manifest-generator.service.js.map +1 -1
  582. package/dist/src/services/deployment/k8s/k8s-manifest.schemas.d.ts +4 -3
  583. package/dist/src/services/deployment/k8s/k8s-manifest.schemas.d.ts.map +1 -1
  584. package/dist/src/services/deployment/k8s/k8s-manifest.schemas.js +0 -4
  585. package/dist/src/services/deployment/k8s/k8s-manifest.schemas.js.map +1 -1
  586. package/dist/src/services/deployment/k8s/k8s-operations.service.d.ts.map +1 -1
  587. package/dist/src/services/deployment/k8s/k8s-secrets-generator.service.d.ts +10 -1
  588. package/dist/src/services/deployment/k8s/k8s-secrets-generator.service.d.ts.map +1 -1
  589. package/dist/src/services/deployment/k8s/k8s-secrets-generator.service.js +193 -33
  590. package/dist/src/services/deployment/k8s/k8s-secrets-generator.service.js.map +1 -1
  591. package/dist/src/services/deployment/k8s/k8s.schemas.d.ts.map +1 -1
  592. package/dist/src/services/deployment/k8s/kind.service.d.ts.map +1 -1
  593. package/dist/src/services/deployment/k8s/local-k8s-application-pruning.service.d.ts.map +1 -1
  594. package/dist/src/services/deployment/local-dev-observer-lifecycle.d.ts.map +1 -1
  595. package/dist/src/services/deployment/local-dev-output-boundary.d.ts.map +1 -1
  596. package/dist/src/services/deployment/local-dev-session-lease.service.d.ts.map +1 -1
  597. package/dist/src/services/deployment/local-dev-shutdown-coordinator.d.ts.map +1 -1
  598. package/dist/src/services/deployment/local-infrastructure-initialization.service.d.ts.map +1 -1
  599. package/dist/src/services/deployment/local-precondition-checks.schemas.d.ts.map +1 -1
  600. package/dist/src/services/deployment/local-precondition-checks.service.d.ts +28 -17
  601. package/dist/src/services/deployment/local-precondition-checks.service.d.ts.map +1 -1
  602. package/dist/src/services/deployment/local-precondition-checks.service.js +83 -3
  603. package/dist/src/services/deployment/local-precondition-checks.service.js.map +1 -1
  604. package/dist/src/services/deployment/local-runtime-process-cleanup.service.d.ts.map +1 -1
  605. package/dist/src/services/deployment/platform-lifecycle.service.d.ts.map +1 -1
  606. package/dist/src/services/deployment/platform-runtime-policy.service.d.ts.map +1 -1
  607. package/dist/src/services/deployment/version-compare.utils.d.ts.map +1 -1
  608. package/dist/src/services/design-tokens/design-tokens-command.service.d.ts.map +1 -1
  609. package/dist/src/services/design-tokens/design-tokens-config.service.d.ts.map +1 -1
  610. package/dist/src/services/design-tokens/design-tokens-config.template.d.ts.map +1 -1
  611. package/dist/src/services/design-tokens/design-tokens-css-block.service.d.ts.map +1 -1
  612. package/dist/src/services/design-tokens/design-tokens-paths.service.d.ts.map +1 -1
  613. package/dist/src/services/design-tokens/design-tokens.constants.d.ts.map +1 -1
  614. package/dist/src/services/design-tokens/design-tokens.models.d.ts.map +1 -1
  615. package/dist/src/services/environment/__tests__/compose-converge-args.test.d.ts.map +1 -1
  616. package/dist/src/services/environment/__tests__/config-hydration-seam.test.d.ts.map +1 -1
  617. package/dist/src/services/environment/__tests__/env-configuration-generator.service.test.d.ts.map +1 -1
  618. package/dist/src/services/environment/__tests__/env-configuration-generator.service.test.js +36 -20
  619. package/dist/src/services/environment/__tests__/env-configuration-generator.service.test.js.map +1 -1
  620. package/dist/src/services/environment/__tests__/env-sync.service.test.d.ts.map +1 -1
  621. package/dist/src/services/environment/__tests__/env-sync.service.test.js +6 -4
  622. package/dist/src/services/environment/__tests__/env-sync.service.test.js.map +1 -1
  623. package/dist/src/services/environment/__tests__/env-vars-builder.service.test.d.ts.map +1 -1
  624. package/dist/src/services/environment/__tests__/env-vars-builder.service.test.js +89 -8
  625. package/dist/src/services/environment/__tests__/env-vars-builder.service.test.js.map +1 -1
  626. package/dist/src/services/environment/__tests__/environment-hydration.utils.test.d.ts.map +1 -1
  627. package/dist/src/services/environment/__tests__/environment-lifecycle.needs-local-mongodb.test.d.ts.map +1 -1
  628. package/dist/src/services/environment/__tests__/environment-lifecycle.needs-local-postgresql.test.d.ts.map +1 -1
  629. package/dist/src/services/environment/__tests__/environment-lifecycle.self-hosts-backing-service.test.d.ts +2 -0
  630. package/dist/src/services/environment/__tests__/environment-lifecycle.self-hosts-backing-service.test.d.ts.map +1 -0
  631. package/dist/src/services/environment/__tests__/environment-lifecycle.self-hosts-backing-service.test.js +136 -0
  632. package/dist/src/services/environment/__tests__/environment-lifecycle.self-hosts-backing-service.test.js.map +1 -0
  633. package/dist/src/services/environment/__tests__/environment-paths.service.test.d.ts.map +1 -1
  634. package/dist/src/services/environment/__tests__/environment-registry.service.test.d.ts.map +1 -1
  635. package/dist/src/services/environment/__tests__/environment-setup.non-interactive.test.d.ts.map +1 -1
  636. package/dist/src/services/environment/__tests__/environment-setup.non-interactive.test.js +23 -0
  637. package/dist/src/services/environment/__tests__/environment-setup.non-interactive.test.js.map +1 -1
  638. package/dist/src/services/environment/__tests__/platform-engine-change.utils.test.d.ts.map +1 -1
  639. package/dist/src/services/environment/__tests__/platform-image-ref.test.d.ts.map +1 -1
  640. package/dist/src/services/environment/__tests__/platform-image-ref.test.js.map +1 -1
  641. package/dist/src/services/environment/__tests__/platform-runtime-state.service.test.d.ts.map +1 -1
  642. package/dist/src/services/environment/__tests__/provider-secrets-env.service.test.d.ts.map +1 -1
  643. package/dist/src/services/environment/__tests__/runtime-bootstrap.authored-database-refresh.test.d.ts.map +1 -1
  644. package/dist/src/services/environment/authored-infra-config.utils.d.ts.map +1 -1
  645. package/dist/src/services/environment/env-configuration-generator.service.d.ts +52 -14
  646. package/dist/src/services/environment/env-configuration-generator.service.d.ts.map +1 -1
  647. package/dist/src/services/environment/env-configuration-generator.service.js +41 -38
  648. package/dist/src/services/environment/env-configuration-generator.service.js.map +1 -1
  649. package/dist/src/services/environment/env-sync.service.d.ts.map +1 -1
  650. package/dist/src/services/environment/env-sync.service.js +13 -13
  651. package/dist/src/services/environment/env-sync.service.js.map +1 -1
  652. package/dist/src/services/environment/env-vars-builder.service.d.ts +28 -0
  653. package/dist/src/services/environment/env-vars-builder.service.d.ts.map +1 -1
  654. package/dist/src/services/environment/env-vars-builder.service.js +188 -41
  655. package/dist/src/services/environment/env-vars-builder.service.js.map +1 -1
  656. package/dist/src/services/environment/environment-hydration.utils.d.ts.map +1 -1
  657. package/dist/src/services/environment/environment-lifecycle.service.d.ts +53 -1
  658. package/dist/src/services/environment/environment-lifecycle.service.d.ts.map +1 -1
  659. package/dist/src/services/environment/environment-lifecycle.service.js +65 -1
  660. package/dist/src/services/environment/environment-lifecycle.service.js.map +1 -1
  661. package/dist/src/services/environment/environment-paths.service.d.ts +2 -1
  662. package/dist/src/services/environment/environment-paths.service.d.ts.map +1 -1
  663. package/dist/src/services/environment/environment-paths.service.js +5 -3
  664. package/dist/src/services/environment/environment-paths.service.js.map +1 -1
  665. package/dist/src/services/environment/environment-registry.service.d.ts.map +1 -1
  666. package/dist/src/services/environment/environment-setup.service.d.ts.map +1 -1
  667. package/dist/src/services/environment/environment-setup.service.js +23 -9
  668. package/dist/src/services/environment/environment-setup.service.js.map +1 -1
  669. package/dist/src/services/environment/environment.schemas.d.ts.map +1 -1
  670. package/dist/src/services/environment/environment.service.d.ts +6 -1
  671. package/dist/src/services/environment/environment.service.d.ts.map +1 -1
  672. package/dist/src/services/environment/environment.service.js +2 -0
  673. package/dist/src/services/environment/environment.service.js.map +1 -1
  674. package/dist/src/services/environment/platform-engine-change.utils.d.ts.map +1 -1
  675. package/dist/src/services/environment/platform-runtime-state.service.d.ts.map +1 -1
  676. package/dist/src/services/environment/platform-runtime.schemas.d.ts.map +1 -1
  677. package/dist/src/services/environment/platform-runtime.schemas.js.map +1 -1
  678. package/dist/src/services/environment/runtime-bootstrap.service.d.ts.map +1 -1
  679. package/dist/src/services/framework/__tests__/application-rule-imports.test.d.ts +2 -0
  680. package/dist/src/services/framework/__tests__/application-rule-imports.test.d.ts.map +1 -0
  681. package/dist/src/services/framework/__tests__/application-rule-imports.test.js +58 -0
  682. package/dist/src/services/framework/__tests__/application-rule-imports.test.js.map +1 -0
  683. package/dist/src/services/framework/__tests__/engine-provider-specifications.reconciliation.test.d.ts +2 -0
  684. package/dist/src/services/framework/__tests__/engine-provider-specifications.reconciliation.test.d.ts.map +1 -0
  685. package/dist/src/services/framework/__tests__/engine-provider-specifications.reconciliation.test.js +55 -0
  686. package/dist/src/services/framework/__tests__/engine-provider-specifications.reconciliation.test.js.map +1 -0
  687. package/dist/src/services/framework/__tests__/fixtures/framework-knowledge-package-only.fixture.d.ts.map +1 -1
  688. package/dist/src/services/framework/__tests__/fixtures/framework-knowledge-package-only.fixture.js.map +1 -1
  689. package/dist/src/services/framework/__tests__/framework-development-skills-sync.installed-package.test.d.ts.map +1 -1
  690. package/dist/src/services/framework/__tests__/framework-development-skills-sync.installed-package.test.js.map +1 -1
  691. package/dist/src/services/framework/__tests__/framework-development-skills-sync.package-only.test.d.ts.map +1 -1
  692. package/dist/src/services/framework/__tests__/framework-development-skills-sync.service.test.d.ts.map +1 -1
  693. package/dist/src/services/framework/__tests__/framework-docker-publish.service.test.d.ts.map +1 -1
  694. package/dist/src/services/framework/__tests__/framework-docker-publish.service.test.js.map +1 -1
  695. package/dist/src/services/framework/__tests__/framework-knowledge-application-guidance.validator.test.d.ts.map +1 -1
  696. package/dist/src/services/framework/__tests__/framework-knowledge-audit.live.contract.test.d.ts.map +1 -1
  697. package/dist/src/services/framework/__tests__/framework-knowledge-audit.live.contract.test.js +17 -0
  698. package/dist/src/services/framework/__tests__/framework-knowledge-audit.live.contract.test.js.map +1 -1
  699. package/dist/src/services/framework/__tests__/framework-knowledge-audit.service.test.d.ts.map +1 -1
  700. package/dist/src/services/framework/__tests__/framework-knowledge-audit.service.test.js +101 -0
  701. package/dist/src/services/framework/__tests__/framework-knowledge-audit.service.test.js.map +1 -1
  702. package/dist/src/services/framework/__tests__/framework-knowledge-generation.service.test.d.ts.map +1 -1
  703. package/dist/src/services/framework/__tests__/framework-knowledge-generation.service.test.js +4 -70
  704. package/dist/src/services/framework/__tests__/framework-knowledge-generation.service.test.js.map +1 -1
  705. package/dist/src/services/framework/__tests__/framework-npm-publish.service.test.d.ts.map +1 -1
  706. package/dist/src/services/framework/__tests__/framework-npm-publish.service.test.js.map +1 -1
  707. package/dist/src/services/framework/__tests__/framework-publish-manifest.service.test.d.ts.map +1 -1
  708. package/dist/src/services/framework/__tests__/framework-publish-manifest.service.test.js +78 -6
  709. package/dist/src/services/framework/__tests__/framework-publish-manifest.service.test.js.map +1 -1
  710. package/dist/src/services/framework/__tests__/framework-release.service.test.d.ts.map +1 -1
  711. package/dist/src/services/framework/__tests__/framework-release.service.test.js.map +1 -1
  712. package/dist/src/services/framework/__tests__/framework-secrets-writer.test.d.ts.map +1 -1
  713. package/dist/src/services/framework/__tests__/framework-version.service.test.d.ts.map +1 -1
  714. package/dist/src/services/framework/__tests__/framework-version.service.test.js.map +1 -1
  715. package/dist/src/services/framework/__tests__/installed-framework-assets.service.test.d.ts.map +1 -1
  716. package/dist/src/services/framework/application-rule-imports.d.ts +36 -0
  717. package/dist/src/services/framework/application-rule-imports.d.ts.map +1 -0
  718. package/dist/src/services/framework/application-rule-imports.js +77 -0
  719. package/dist/src/services/framework/application-rule-imports.js.map +1 -0
  720. package/dist/src/services/framework/framework-development-skills-sync.service.d.ts +23 -0
  721. package/dist/src/services/framework/framework-development-skills-sync.service.d.ts.map +1 -1
  722. package/dist/src/services/framework/framework-development-skills-sync.service.js +51 -0
  723. package/dist/src/services/framework/framework-development-skills-sync.service.js.map +1 -1
  724. package/dist/src/services/framework/framework-docker-publish.service.d.ts.map +1 -1
  725. package/dist/src/services/framework/framework-docker-publish.service.js.map +1 -1
  726. package/dist/src/services/framework/framework-knowledge-application-guidance.validator.d.ts.map +1 -1
  727. package/dist/src/services/framework/framework-knowledge-audit.service.d.ts +86 -1
  728. package/dist/src/services/framework/framework-knowledge-audit.service.d.ts.map +1 -1
  729. package/dist/src/services/framework/framework-knowledge-audit.service.js +212 -1
  730. package/dist/src/services/framework/framework-knowledge-audit.service.js.map +1 -1
  731. package/dist/src/services/framework/framework-knowledge-generation.service.d.ts +0 -1
  732. package/dist/src/services/framework/framework-knowledge-generation.service.d.ts.map +1 -1
  733. package/dist/src/services/framework/framework-knowledge-generation.service.js +29 -215
  734. package/dist/src/services/framework/framework-knowledge-generation.service.js.map +1 -1
  735. package/dist/src/services/framework/framework-knowledge-scan.constants.d.ts.map +1 -1
  736. package/dist/src/services/framework/framework-npm-publish.service.d.ts.map +1 -1
  737. package/dist/src/services/framework/framework-npm-publish.service.js +7 -3
  738. package/dist/src/services/framework/framework-npm-publish.service.js.map +1 -1
  739. package/dist/src/services/framework/framework-publish-manifest.service.d.ts +44 -1
  740. package/dist/src/services/framework/framework-publish-manifest.service.d.ts.map +1 -1
  741. package/dist/src/services/framework/framework-publish-manifest.service.js +79 -4
  742. package/dist/src/services/framework/framework-publish-manifest.service.js.map +1 -1
  743. package/dist/src/services/framework/framework-release.service.d.ts.map +1 -1
  744. package/dist/src/services/framework/framework-version.service.d.ts +13 -0
  745. package/dist/src/services/framework/framework-version.service.d.ts.map +1 -1
  746. package/dist/src/services/framework/framework-version.service.js +23 -24
  747. package/dist/src/services/framework/framework-version.service.js.map +1 -1
  748. package/dist/src/services/framework/installed-framework-assets.service.d.ts.map +1 -1
  749. package/dist/src/services/framework/provider-transposition/__tests__/base-url-is-a-declared-env-slot.test.d.ts +2 -0
  750. package/dist/src/services/framework/provider-transposition/__tests__/base-url-is-a-declared-env-slot.test.d.ts.map +1 -0
  751. package/dist/src/services/framework/provider-transposition/__tests__/base-url-is-a-declared-env-slot.test.js +100 -0
  752. package/dist/src/services/framework/provider-transposition/__tests__/base-url-is-a-declared-env-slot.test.js.map +1 -0
  753. package/dist/src/services/framework/provider-transposition/__tests__/client-and-schema-agree.test.d.ts +2 -0
  754. package/dist/src/services/framework/provider-transposition/__tests__/client-and-schema-agree.test.d.ts.map +1 -0
  755. package/dist/src/services/framework/provider-transposition/__tests__/client-and-schema-agree.test.js +92 -0
  756. package/dist/src/services/framework/provider-transposition/__tests__/client-and-schema-agree.test.js.map +1 -0
  757. package/dist/src/services/framework/provider-transposition/__tests__/decision-projection.test.d.ts +2 -0
  758. package/dist/src/services/framework/provider-transposition/__tests__/decision-projection.test.d.ts.map +1 -0
  759. package/dist/src/services/framework/provider-transposition/__tests__/decision-projection.test.js +83 -0
  760. package/dist/src/services/framework/provider-transposition/__tests__/decision-projection.test.js.map +1 -0
  761. package/dist/src/services/framework/provider-transposition/__tests__/plan-matches-emit.test.d.ts +2 -0
  762. package/dist/src/services/framework/provider-transposition/__tests__/plan-matches-emit.test.d.ts.map +1 -0
  763. package/dist/src/services/framework/provider-transposition/__tests__/plan-matches-emit.test.js +219 -0
  764. package/dist/src/services/framework/provider-transposition/__tests__/plan-matches-emit.test.js.map +1 -0
  765. package/dist/src/services/framework/provider-transposition/__tests__/provider-catalogue-record.test.d.ts +2 -0
  766. package/dist/src/services/framework/provider-transposition/__tests__/provider-catalogue-record.test.d.ts.map +1 -0
  767. package/dist/src/services/framework/provider-transposition/__tests__/provider-catalogue-record.test.js +372 -0
  768. package/dist/src/services/framework/provider-transposition/__tests__/provider-catalogue-record.test.js.map +1 -0
  769. package/dist/src/services/framework/provider-transposition/__tests__/transposition-contract.test.d.ts +2 -0
  770. package/dist/src/services/framework/provider-transposition/__tests__/transposition-contract.test.d.ts.map +1 -0
  771. package/dist/src/services/framework/provider-transposition/__tests__/transposition-contract.test.js +794 -0
  772. package/dist/src/services/framework/provider-transposition/__tests__/transposition-contract.test.js.map +1 -0
  773. package/dist/src/services/framework/provider-transposition/activepieces-source.reader.d.ts +14 -0
  774. package/dist/src/services/framework/provider-transposition/activepieces-source.reader.d.ts.map +1 -0
  775. package/dist/src/services/framework/provider-transposition/activepieces-source.reader.js +1047 -0
  776. package/dist/src/services/framework/provider-transposition/activepieces-source.reader.js.map +1 -0
  777. package/dist/src/services/framework/provider-transposition/openapi-enrichment.d.ts +26 -0
  778. package/dist/src/services/framework/provider-transposition/openapi-enrichment.d.ts.map +1 -0
  779. package/dist/src/services/framework/provider-transposition/openapi-enrichment.js +57 -0
  780. package/dist/src/services/framework/provider-transposition/openapi-enrichment.js.map +1 -0
  781. package/dist/src/services/framework/provider-transposition/openapi-source.reader.d.ts +35 -0
  782. package/dist/src/services/framework/provider-transposition/openapi-source.reader.d.ts.map +1 -0
  783. package/dist/src/services/framework/provider-transposition/openapi-source.reader.js +204 -0
  784. package/dist/src/services/framework/provider-transposition/openapi-source.reader.js.map +1 -0
  785. package/dist/src/services/framework/provider-transposition/provider-catalogue-record.d.ts +410 -0
  786. package/dist/src/services/framework/provider-transposition/provider-catalogue-record.d.ts.map +1 -0
  787. package/dist/src/services/framework/provider-transposition/provider-catalogue-record.js +434 -0
  788. package/dist/src/services/framework/provider-transposition/provider-catalogue-record.js.map +1 -0
  789. package/dist/src/services/framework/provider-transposition/provider-merge.d.ts +39 -0
  790. package/dist/src/services/framework/provider-transposition/provider-merge.d.ts.map +1 -0
  791. package/dist/src/services/framework/provider-transposition/provider-merge.js +274 -0
  792. package/dist/src/services/framework/provider-transposition/provider-merge.js.map +1 -0
  793. package/dist/src/services/framework/provider-transposition/provider-package.emitter.d.ts +139 -0
  794. package/dist/src/services/framework/provider-transposition/provider-package.emitter.d.ts.map +1 -0
  795. package/dist/src/services/framework/provider-transposition/provider-package.emitter.js +1586 -0
  796. package/dist/src/services/framework/provider-transposition/provider-package.emitter.js.map +1 -0
  797. package/dist/src/services/framework/provider-transposition/sim-source.reader.d.ts +35 -0
  798. package/dist/src/services/framework/provider-transposition/sim-source.reader.d.ts.map +1 -0
  799. package/dist/src/services/framework/provider-transposition/sim-source.reader.js +527 -0
  800. package/dist/src/services/framework/provider-transposition/sim-source.reader.js.map +1 -0
  801. package/dist/src/services/framework/provider-transposition/transposed-provider.model.d.ts +229 -0
  802. package/dist/src/services/framework/provider-transposition/transposed-provider.model.d.ts.map +1 -0
  803. package/dist/src/services/framework/provider-transposition/transposed-provider.model.js +96 -0
  804. package/dist/src/services/framework/provider-transposition/transposed-provider.model.js.map +1 -0
  805. package/dist/src/services/framework/provider-transposition/url-template.extractor.d.ts +55 -0
  806. package/dist/src/services/framework/provider-transposition/url-template.extractor.d.ts.map +1 -0
  807. package/dist/src/services/framework/provider-transposition/url-template.extractor.js +196 -0
  808. package/dist/src/services/framework/provider-transposition/url-template.extractor.js.map +1 -0
  809. package/dist/src/services/frontend/__tests__/cloudflare-cdn.service.test.d.ts.map +1 -1
  810. package/dist/src/services/frontend/__tests__/frontend-dist-uploader.service.test.d.ts.map +1 -1
  811. package/dist/src/services/frontend/__tests__/frontend-publish.service.test.d.ts.map +1 -1
  812. package/dist/src/services/frontend/cloudflare-cdn.service.d.ts.map +1 -1
  813. package/dist/src/services/frontend/cloudflare-cdn.service.js +33 -2
  814. package/dist/src/services/frontend/cloudflare-cdn.service.js.map +1 -1
  815. package/dist/src/services/frontend/frontend-dist-uploader.service.d.ts.map +1 -1
  816. package/dist/src/services/frontend/frontend-publish.service.d.ts.map +1 -1
  817. package/dist/src/services/frontend/frontend-publish.service.js +1 -1
  818. package/dist/src/services/frontend/frontend-publish.service.js.map +1 -1
  819. package/dist/src/services/generation/domain-generator.service.d.ts.map +1 -1
  820. package/dist/src/services/generation/generator.schemas.d.ts.map +1 -1
  821. package/dist/src/services/generation/operation-generator.service.d.ts.map +1 -1
  822. package/dist/src/services/generation/resource-generator.service.d.ts.map +1 -1
  823. package/dist/src/services/generation/template-registry.service.d.ts.map +1 -1
  824. package/dist/src/services/registry/artifact-extractor.utils.d.ts.map +1 -1
  825. package/dist/src/services/registry/boundary-fanout.utils.d.ts.map +1 -1
  826. package/dist/src/services/registry/index.d.ts.map +1 -1
  827. package/dist/src/services/registry/registry-command.utils.d.ts.map +1 -1
  828. package/dist/src/services/registry/registry-config-resolver.service.d.ts.map +1 -1
  829. package/dist/src/services/registry/registry-credentials.service.d.ts.map +1 -1
  830. package/dist/src/services/registry/saas-root-required.error.d.ts.map +1 -1
  831. package/dist/src/services/security/__tests__/csp-artifact-currency.live.contract.test.d.ts +67 -0
  832. package/dist/src/services/security/__tests__/csp-artifact-currency.live.contract.test.d.ts.map +1 -0
  833. package/dist/src/services/security/__tests__/csp-artifact-currency.live.contract.test.js +212 -0
  834. package/dist/src/services/security/__tests__/csp-artifact-currency.live.contract.test.js.map +1 -0
  835. package/dist/src/services/security/__tests__/csp-boundary.test.d.ts.map +1 -1
  836. package/dist/src/services/security/__tests__/csp-sync.service.test.d.ts.map +1 -1
  837. package/dist/src/services/security/__tests__/csp-sync.service.test.js +411 -5
  838. package/dist/src/services/security/__tests__/csp-sync.service.test.js.map +1 -1
  839. package/dist/src/services/security/csp-sync.service.d.ts +27 -5
  840. package/dist/src/services/security/csp-sync.service.d.ts.map +1 -1
  841. package/dist/src/services/security/csp-sync.service.js +204 -16
  842. package/dist/src/services/security/csp-sync.service.js.map +1 -1
  843. package/dist/src/services/tools/utility-tools.service.d.ts.map +1 -1
  844. package/dist/src/services/website/__tests__/website-structured-data-audit.adapter-seam.test.d.ts +2 -0
  845. package/dist/src/services/website/__tests__/website-structured-data-audit.adapter-seam.test.d.ts.map +1 -0
  846. package/dist/src/services/website/__tests__/website-structured-data-audit.adapter-seam.test.js +94 -0
  847. package/dist/src/services/website/__tests__/website-structured-data-audit.adapter-seam.test.js.map +1 -0
  848. package/dist/src/services/website/website-structured-data-audit.service.d.ts +9 -0
  849. package/dist/src/services/website/website-structured-data-audit.service.d.ts.map +1 -1
  850. package/dist/src/services/website/website-structured-data-audit.service.js +72 -11
  851. package/dist/src/services/website/website-structured-data-audit.service.js.map +1 -1
  852. package/dist/src/test-utils/resolved-homes.test.utils.d.ts.map +1 -1
  853. package/dist/tsconfig.build.tsbuildinfo +1 -1
  854. package/dist/tsconfig.tsbuildinfo +1 -1
  855. package/framework-root-package.json +2 -0
  856. package/package.json +19 -17
  857. package/scripts/app-dependency-alignment/propagated-engine-overrides.json +15 -0
  858. package/templates/infra/ci/deploy-docker-compose.yml.hbs +1 -1
  859. package/templates/infra/ci/deploy-k8s.yml.hbs +1 -1
  860. package/templates/infra/docker-compose/docker-compose.wildo-platform.yml.hbs +394 -90
  861. package/templates/infra/docker-images/backend/Dockerfile.backend-base +7 -1
  862. package/templates/infra/docker-images/backend/Dockerfile.backend-base-java +7 -1
  863. package/templates/infra/docker-images/platform/Dockerfile.platform-base.dockerignore +23 -0
  864. package/templates/infra/k8s/applications/wildo-ai-application/backend.deployment.yaml.hbs +8 -5
  865. package/templates/infra/k8s/applications/wildo-ai-application/ingress.yaml.hbs +3 -2
  866. package/templates/infra/k8s/applications/wildo-ai-application/minion.deployment.yaml.hbs +22 -6
  867. package/templates/infra/k8s/applications/wildo-ai-application/worker.deployment.yaml.hbs +17 -13
  868. package/templates/infra/k8s/platform/platform-crontabs-batches-manager/deployment.yaml.hbs +11 -0
  869. package/templates/infra/k8s/storage/local/persistent-volumes.yaml.hbs +18 -4
  870. package/templates/saas/engine-peer-closure.json +12 -0
  871. package/templates/saas/i18n/email/components/EmailHeader.tsx +9 -0
  872. package/templates/saas/i18n/email/components/EmailLayout.tsx +14 -0
  873. package/templates/saas/i18n/email/resources/applicationApiKeys/create.application-administrator/template.tsx +1 -1
  874. package/templates/saas/i18n/email/resources/applicationApiKeys/deactivate.application-administrator/template.tsx +1 -1
  875. package/templates/saas/i18n/email/resources/applicationApiKeys/reactivate.application-administrator/template.tsx +1 -1
  876. package/templates/saas/i18n/email/resources/applicationApiKeys/regenerate.application-administrator/template.tsx +1 -1
  877. package/templates/saas/i18n/email/resources/applicationApiKeys/rotate.application-administrator/template.tsx +1 -1
  878. package/templates/saas/i18n/email/resources/applicationOAuthClients/create.application-administrator/template.tsx +1 -1
  879. package/templates/saas/i18n/email/resources/applicationOAuthClients/regenerate.application-administrator/template.tsx +1 -1
  880. package/templates/saas/i18n/email/resources/applicationOAuthClients/rotate.application-administrator/template.tsx +1 -1
  881. package/templates/saas/i18n/email/resources/applicationVersions/create.organization-administrative/template.tsx +1 -1
  882. package/templates/saas/i18n/email/resources/applicationVersions/delete.organization-administrative/template.tsx +1 -1
  883. package/templates/saas/i18n/email/resources/applicationVersions/deprecate.organization-administrative/template.tsx +1 -1
  884. package/templates/saas/i18n/email/resources/applicationVersions/promote.organization-administrative/template.tsx +1 -1
  885. package/templates/saas/i18n/email/resources/applicationVersions/rollback.organization-administrative/template.tsx +1 -1
  886. package/templates/saas/i18n/email/resources/applications/create.admin.organization-administrative/template.tsx +1 -1
  887. package/templates/saas/i18n/email/resources/applications/create.organization-administrative/template.tsx +1 -1
  888. package/templates/saas/i18n/email/resources/applications/delete.admin.organization-administrative/template.tsx +1 -1
  889. package/templates/saas/i18n/email/resources/applications/delete.organization-administrative/template.tsx +1 -1
  890. package/templates/saas/i18n/email/resources/applications/transfer.admin.organization-administrative/template.tsx +1 -1
  891. package/templates/saas/i18n/email/resources/applications/transfer.organization-administrative/template.tsx +1 -1
  892. package/templates/saas/i18n/email/resources/applications/update.admin.organization-administrative/template.tsx +1 -1
  893. package/templates/saas/i18n/email/resources/applications/update.organization-administrative/template.tsx +1 -1
  894. package/templates/saas/i18n/email/resources/organizationApiKeys/create.admin.organization-administrative/template.tsx +1 -1
  895. package/templates/saas/i18n/email/resources/organizationApiKeys/create.organization-administrative/template.tsx +1 -1
  896. package/templates/saas/i18n/email/resources/organizationApiKeys/deactivate.admin.organization-administrative/template.tsx +1 -1
  897. package/templates/saas/i18n/email/resources/organizationApiKeys/deactivate.organization-administrative/template.tsx +1 -1
  898. package/templates/saas/i18n/email/resources/organizationApiKeys/delete.admin.organization-administrative/template.tsx +1 -1
  899. package/templates/saas/i18n/email/resources/organizationApiKeys/delete.organization-administrative/template.tsx +1 -1
  900. package/templates/saas/i18n/email/resources/organizationApiKeys/reactivate.admin.organization-administrative/template.tsx +1 -1
  901. package/templates/saas/i18n/email/resources/organizationApiKeys/reactivate.organization-administrative/template.tsx +1 -1
  902. package/templates/saas/i18n/email/resources/organizationApiKeys/regenerate.admin.organization-administrative/template.tsx +1 -1
  903. package/templates/saas/i18n/email/resources/organizationApiKeys/regenerate.organization-administrative/template.tsx +1 -1
  904. package/templates/saas/i18n/email/resources/organizationApiKeys/rotate.admin.organization-administrative/template.tsx +1 -1
  905. package/templates/saas/i18n/email/resources/organizationApiKeys/rotate.organization-administrative/template.tsx +1 -1
  906. package/templates/saas/i18n/email/resources/organizationFeatures/disable_feature.organization-users/template.tsx +1 -1
  907. package/templates/saas/i18n/email/resources/organizationFeatures/enable_feature.organization-users/template.tsx +1 -1
  908. package/templates/saas/i18n/email/resources/organizationFeatures/reset_features.organization-administrative/template.tsx +1 -1
  909. package/templates/saas/i18n/email/resources/organizationFeatures/update.organization-users/template.tsx +1 -1
  910. package/templates/saas/i18n/email/resources/organizationMembers/create.user-self/template.tsx +1 -1
  911. package/templates/saas/i18n/email/resources/organizationMembers/delete.organization-users/template.tsx +1 -1
  912. package/templates/saas/i18n/email/resources/organizationMembers/grantOwnership.organization-users/template.tsx +1 -1
  913. package/templates/saas/i18n/email/resources/organizationMembers/reactivate.organization-users/template.tsx +1 -1
  914. package/templates/saas/i18n/email/resources/organizationMembers/reactivate.user-self/template.tsx +1 -1
  915. package/templates/saas/i18n/email/resources/organizationMembers/resend.user-self/template.tsx +1 -1
  916. package/templates/saas/i18n/email/resources/organizationMembers/revoke.user-self_admin/template.tsx +1 -1
  917. package/templates/saas/i18n/email/resources/organizationMembers/revoke.user-self_invitee/template.tsx +1 -1
  918. package/templates/saas/i18n/email/resources/organizationMembers/suspend.organization-users/template.tsx +1 -1
  919. package/templates/saas/i18n/email/resources/organizationMembers/suspend.user-self/template.tsx +1 -1
  920. package/templates/saas/i18n/email/resources/organizationMembers/update.organization-users/template.tsx +1 -1
  921. package/templates/saas/i18n/email/resources/organizationOAuthClients/create.admin.organization-administrative/template.tsx +1 -1
  922. package/templates/saas/i18n/email/resources/organizationOAuthClients/create.organization-administrative/template.tsx +1 -1
  923. package/templates/saas/i18n/email/resources/organizationOAuthClients/delete.admin.organization-administrative/template.tsx +1 -1
  924. package/templates/saas/i18n/email/resources/organizationOAuthClients/delete.organization-administrative/template.tsx +1 -1
  925. package/templates/saas/i18n/email/resources/organizationOAuthClients/regenerate.admin.organization-administrative/template.tsx +1 -1
  926. package/templates/saas/i18n/email/resources/organizationOAuthClients/regenerate.organization-administrative/template.tsx +1 -1
  927. package/templates/saas/i18n/email/resources/organizationOAuthClients/rotate.admin.organization-administrative/template.tsx +1 -1
  928. package/templates/saas/i18n/email/resources/organizationOAuthClients/rotate.organization-administrative/template.tsx +1 -1
  929. package/templates/saas/i18n/email/resources/organizationUnits/archive.organization-administrative/template.tsx +1 -1
  930. package/templates/saas/i18n/email/resources/organizationUnits/create.organization-administrative/template.tsx +1 -1
  931. package/templates/saas/i18n/email/resources/organizationUnits/delete.organization-administrative/template.tsx +1 -1
  932. package/templates/saas/i18n/email/resources/organizationUnits/move.organization-administrative/template.tsx +1 -1
  933. package/templates/saas/i18n/email/resources/organizationUnits/restore.organization-administrative/template.tsx +1 -1
  934. package/templates/saas/i18n/email/resources/organizationUnits/update.organization-administrative/template.tsx +1 -1
  935. package/templates/saas/i18n/email/resources/organizations/activate.organization-administrative/template.tsx +1 -1
  936. package/templates/saas/i18n/email/resources/organizations/create.admin.user-self/template.tsx +1 -1
  937. package/templates/saas/i18n/email/resources/organizations/create.user-self/template.tsx +1 -1
  938. package/templates/saas/i18n/email/resources/organizations/request_deletion.admin.organization-users/template.tsx +1 -1
  939. package/templates/saas/i18n/email/resources/organizations/request_deletion.organization-users/template.tsx +1 -1
  940. package/templates/saas/i18n/email/resources/organizations/restore.organization-users/template.tsx +1 -1
  941. package/templates/saas/i18n/email/resources/organizations/suspend.organization-users/template.tsx +1 -1
  942. package/templates/saas/i18n/email/resources/organizations/update.admin.organization-administrative/template.tsx +1 -1
  943. package/templates/saas/i18n/email/resources/organizations/update.organization-administrative/template.tsx +1 -1
  944. package/templates/saas/i18n/email/resources/platformAccessGrants/requestAccess.organization-users/template.tsx +1 -1
  945. package/templates/saas/i18n/email/resources/user_self/deactivate_account.user-self/template.tsx +1 -1
  946. package/templates/saas/i18n/email/resources/user_self/reactivate_account.user-self/template.tsx +1 -1
  947. package/templates/saas/i18n/email/resources/users/assign_roles.application-administrator/template.tsx +1 -1
  948. package/templates/saas/i18n/email/resources/users/create.application-administrator/template.tsx +1 -1
  949. package/templates/saas/i18n/email/resources/users/delete.application-administrator/template.tsx +1 -1
  950. package/templates/saas/i18n/email/resources/users/force_password_reset.application-administrator/template.tsx +1 -1
  951. package/templates/saas/i18n/email/resources/users/revoke_roles.application-administrator/template.tsx +1 -1
  952. package/templates/saas/i18n/email/resources/users/send_invitation.application-administrator/template.tsx +1 -1
  953. package/templates/saas/i18n/email/resources/users/suspend_user.application-administrator/template.tsx +1 -1
  954. package/templates/saas/i18n/email/resources/users/unsuspend_user.application-administrator/template.tsx +1 -1
  955. package/templates/saas/i18n/email/resources/users/update.application-administrator/template.tsx +1 -1
  956. package/templates/saas/i18n/email/system/email-otp/template.tsx +1 -0
  957. package/templates/saas/i18n/email/system/email-verification/template.tsx +1 -1
  958. package/templates/saas/i18n/email/system/magic-link/template.tsx +1 -1
  959. package/templates/saas/i18n/email/system/new-device-login/template.tsx +1 -1
  960. package/templates/saas/i18n/email/system/organization-invitation/template.tsx +1 -0
  961. package/templates/saas/i18n/email/system/organization-member-removed/template.tsx +1 -0
  962. package/templates/saas/i18n/email/system/password-reset/template.tsx +1 -1
  963. package/templates/saas/i18n/email/system/payment-failed/template.tsx +1 -1
  964. package/templates/saas/i18n/email/system/security-alert/template.tsx +1 -0
  965. package/templates/saas/i18n/email/system/subscription-cancelled/template.tsx +1 -1
  966. package/templates/saas/i18n/email/system/subscription-confirmation/template.tsx +1 -0
  967. package/templates/saas/i18n/email/system/welcome-email/template.tsx +1 -1
  968. package/templates/saas/scenarios/add-file-picker-provider/files/frontend/src/engine/providers/__providerRef__.frontend-app.module.ts.hbs +10 -4
  969. package/templates/saas/scenarios/add-minion/files/minions/__minionDir__/src/index.ts.hbs +9 -5
  970. package/templates/saas/scenarios/add-module/scenario.json +3 -3
  971. package/templates/saas/scenarios/add-provider/scenario.json +36 -0
  972. package/templates/saas/scenarios/add-technical-doc/files/technical-doc/docusaurus.config.ts.hbs +52 -2
  973. package/templates/saas/scenarios/add-technical-doc/files/technical-doc/src/csp.config.ts +20 -3
  974. package/templates/saas/scenarios/add-technical-doc/files/technical-doc/src/pages/auth/exchange.tsx +75 -0
  975. package/templates/saas/scenarios/add-technical-doc/files/technical-doc/src/pages/search.tsx.hbs +47 -3
  976. package/templates/saas/scenarios/add-technical-doc/files/technical-doc/src/theme/Root.tsx +46 -4
  977. package/templates/saas/scenarios/add-technical-doc/files/technical-doc/static/img/favicon.svg +5 -4
  978. package/templates/saas/scenarios/add-technical-doc/files/technical-doc/static/img/logo.svg +11 -5
  979. package/templates/saas/scenarios/add-technical-doc/files/technical-doc/wildo.tech-doc.config.ts.hbs +18 -7
  980. package/templates/saas/scenarios/add-website/files/website/src/app-origin.ts.hbs +32 -16
  981. package/templates/saas/scenarios/add-website/files/website/src/components/HeaderComponent.tsx +2 -2
  982. package/templates/saas/scenarios/add-website/files/website/src/pages/index.astro +1 -0
  983. package/templates/saas/scenarios/add-website/files/website/src/sections/landing.sections.tsx +2 -2
  984. package/templates/saas/scenarios/add-worker-node/files/workers/__workerDir__/src/index.ts.hbs +9 -5
  985. package/templates/saas/skeleton/.wildo-saas/dev-framework-scripts/sync-engine.sh +46 -14
  986. package/templates/saas/skeleton/CLAUDE.md.hbs +12 -0
  987. package/templates/saas/skeleton/backend-api/package.json.hbs +1 -1
  988. package/templates/saas/skeleton/backend-api/src/companion-exports.ts +13 -2
  989. package/templates/saas/skeleton/backend-api/src/index.ts +16 -0
  990. package/templates/saas/skeleton/frontend/src/config/settings-hub.config.ts +11 -5
  991. package/templates/saas/skeleton/frontend/src/engine/app-level-views/app-level-views.definitions.module.frontend.ts +1 -1
  992. package/templates/saas/skeleton/frontend/src/generated/csp.generated.json.hbs +17 -0
  993. package/templates/saas/skeleton/infrastructure/local/wildo.infra.local.config.ts.hbs +19 -0
  994. package/templates/saas/skeleton/wildo.saas.config.ts.init.hbs +59 -2
  995. package/wildo-framework.info.json +1 -1
  996. package/templates/infra/k8s/internal/gotenberg/deployment.yaml.hbs +0 -46
  997. package/templates/infra/k8s/internal/gotenberg/service.yaml.hbs +0 -19
  998. package/templates/infra/k8s/middleware.yaml.hbs +0 -101
  999. package/templates/saas/scenarios/add-backend-provider/scenario.json +0 -17
  1000. package/templates/saas/scenarios/add-technical-doc/files/technical-doc/static/img/favicon.png +0 -0
  1001. package/templates/saas/scenarios/add-technical-doc/files/technical-doc/static/img/logo.png +0 -0
  1002. package/templates/saas/skeleton/backend-api/src/provider-contributions.ts +0 -44
@@ -1 +1 @@
1
- {"version":3,"file":"app-bootstrap.service.test.js","sourceRoot":"","sources":["../../../../../../../src/services/application/__tests__/app-bootstrap.service.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AACnE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC;AAC5B,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAC7D,OAAO,EACL,eAAe,EACf,qCAAqC,EACrC,SAAS,EACT,sBAAsB,EACtB,iBAAiB,EACjB,+BAA+B,EAC/B,0BAA0B,EAC1B,gCAAgC,EAChC,qCAAqC,GACtC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC7E,OAAO,EAAE,qCAAqC,EAAE,MAAM,qEAAqE,CAAC;AAE5H,MAAM,EAAE,kBAAkB,EAAE,G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AC,eAAe,CAAC,CAAC;QAChD,MAAM,CAAC,YAAY,CAAC,CAAC,SAAS,CAAC,qBAAqB,CAAC,CAAC;QACtD,MAAM,CAAC,YAAY,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QAE/C,uEAAuE;QACvE,2EAA2E;QAC3E,yEAAyE;QACzE,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,sBAAsB,CAAC,EAAE,SAAS,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;IACtG,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from 'fs';\nimport { join } from 'path';\nimport { tmpdir } from 'os';\nimport { describe, expect, it, vi, afterEach } from 'vitest';\nimport {\n AppFrontendType,\n ApplicationCreationVerificationEnvKey,\n CdnVendor,\n WildoDeploymentRuntime,\n WildoLocationType,\n APP_BACKEND_DEFAULT_RUNTIME_UID,\n RUNTIME_DEFAULT_PIDS_LIMIT,\n APP_FRONTEND_DEFAULT_RUNTIME_UID,\n APP_FRONTEND_MANDATORY_WRITABLE_PATHS,\n} from '@wildo-ai/platform-config-lib';\nimport { EngineCapability, RuntimeEnvironment } from '@wildo-ai/saas-models';\nimport { ApplicationOperatorEnvFileDisposition } from '~wildo-cli/services/environment/env-configuration-generator.service';\n\nconst { loadConfigJsonMock } = vi.hoisted(() => ({\n loadConfigJsonMock: vi.fn(),\n}));\n\nvi.mock('~wildo-cli/services/environment/environment.service', () => ({\n EnvironmentUtils: {\n loadConfigJson: loadConfigJsonMock,\n saveApplicationRuntimeIdentity: vi.fn(),\n },\n}));\n\nimport { AppBootstrapService } from '../app-bootstrap.service';\nimport { AppRuntimeTargetsService } from '../app-runtime-targets.service';\n\n/**\n * Effective isolation as `resolveAppServiceIsolation` produces it — these\n * fixtures stand in for a parsed `wildo.saas.config.ts` row, so they carry the\n * RESOLVED shape (kind-correct uid + nginx mounts already merged), not an\n * authored partial. Using the real constants keeps them honest if a default\n * changes.\n */\nconst BACKEND_ISOLATION_FIXTURE = {\n runAsUser: APP_BACKEND_DEFAULT_RUNTIME_UID,\n runAsGroup: APP_BACKEND_DEFAULT_RUNTIME_UID,\n writablePaths: [],\n pidsLimit: RUNTIME_DEFAULT_PIDS_LIMIT,\n};\nconst FRONTEND_ISOLATION_FIXTURE = {\n runAsUser: APP_FRONTEND_DEFAULT_RUNTIME_UID,\n runAsGroup: APP_FRONTEND_DEFAULT_RUNTIME_UID,\n writablePaths: [...APP_FRONTEND_MANDATORY_WRITABLE_PATHS],\n pidsLimit: RUNTIME_DEFAULT_PIDS_LIMIT,\n};\n\nconst tempDirs: string[] = [];\n\ndescribe('AppBootstrapService.buildApplicationFrontendTargets', () => {\n afterEach(() => {\n vi.restoreAllMocks();\n loadConfigJsonMock.mockReset();\n for (const dir of tempDirs.splice(0)) {\n rmSync(dir, { recursive: true, force: true });\n }\n });\n\n it('builds frontend .env.example targets from frontend service identity', async () => {\n vi.spyOn(AppRuntimeTargetsService, 'resolve').mockResolvedValue({\n appSlug: 'wonder-todos',\n appDisplayName: 'Wonder Todos',\n appRoot: '/repo/examples/wonder-todos',\n backendScopedProviderRefs: [],\n saasConfigPath: '/repo/examples/wonder-todos/wildo.saas.config.ts',\n managedDeclaration: {\n app: {\n name: 'wonder-todos',\n slug: 'wonder-todos',\n displayName: 'Wonder Todos',\n description: 'A collaborative task management platform',\n type: 'saas',\n },\n frontendServices: [\n {\n serviceName: 'wonder-todos-app',\n frontendType: AppFrontendType.SAAS_APP,\n },\n {\n serviceName: 'wonder-todos-website',\n frontendType: AppFrontendType.STATIC_WEBSITE,\n },\n ],\n engineCapabilities: {\n [EngineCapability.EMAIL_TRANSACTIONAL]: {\n enabled: true,\n },\n },\n minions: {},\n workers: {},\n providers: { scopes: {} },\n providerConfigurations: {},\n },\n firstAdminSeed: {\n userTypes: ['member'],\n },\n backendServices: [\n {\n key: 'backendApi',\n path: 'backend-api',\n serviceName: 'wonder-todos-api',\n defaultPort: 4241,\n isolation: BACKEND_ISOLATION_FIXTURE,\n },\n ],\n frontendServices: [\n {\n key: 'app',\n path: 'frontend',\n serviceName: 'wonder-todos-app',\n defaultPort: 4242,\n frontendType: AppFrontendType.SAAS_APP,\n isolation: FRONTEND_ISOLATION_FIXTURE,\n },\n {\n key: 'website',\n path: 'website',\n serviceName: 'wonder-todos-website',\n defaultPort: 4243,\n frontendType: AppFrontendType.STATIC_WEBSITE,\n isolation: FRONTEND_ISOLATION_FIXTURE,\n },\n ],\n requiresJavaBackendBase: false,\n libraries: {},\n declaredModules: {},\n moduleIdsByService: {},\n moduleIds: [],\n });\n\n const targets = await AppBootstrapService.buildApplicationFrontendTargets({\n frameworkPath: '/repo',\n saasRoot: '/repo/examples/wonder-todos',\n requestedAppSlug: 'wonder-todos',\n });\n\n expect(targets).toEqual([\n {\n serviceName: 'wonder-todos-app',\n relativeDir: 'examples/wonder-todos/frontend',\n envExample: {\n NODE_ENV: 'development',\n VITE_APP_SLUG: 'wonder-todos',\n VITE_APP_NAME: 'Wonder Todos',\n VITE_PORT: '4242',\n VITE_HMR_HOST: 'localhost',\n VITE_HMR_CLIENT_PORT: '4242',\n VITE_HMR_PROTOCOL: 'ws',\n VITE_API_BASE_URL: 'http://localhost:4241',\n VITE_FRONTEND_SERVICE_NAME: 'wonder-todos-app',\n },\n },\n {\n serviceName: 'wonder-todos-website',\n relativeDir: 'examples/wonder-todos/website',\n envExample: {\n NODE_ENV: 'development',\n VITE_APP_SLUG: 'wonder-todos',\n VITE_APP_NAME: 'Wonder Todos',\n VITE_PORT: '4243',\n VITE_HMR_HOST: 'localhost',\n VITE_HMR_CLIENT_PORT: '4243',\n VITE_HMR_PROTOCOL: 'ws',\n },\n },\n ]);\n });\n});\n\ndescribe('AppBootstrapService.buildApplicationOperatorEnvTargets', () => {\n it('projects generated config into one app-root operator env without a run id', () => {\n const frameworkRoot = '/repo';\n const targets = AppBootstrapService.buildApplicationOperatorEnvTargets({\n env: { locationType: WildoLocationType.LOCAL } as never,\n config: {\n applicationCreationVerification: {\n evidenceDirectory: '.wildo-saas/logs/application-creation-evidence',\n silent: true,\n },\n } as never,\n frameworkPath: frameworkRoot,\n saasRoot: '/repo/examples/wonder-todos',\n });\n\n expect(targets).toEqual([{\n relativeDir: 'examples/wonder-todos',\n disposition: ApplicationOperatorEnvFileDisposition.WRITE,\n env: {\n [ApplicationCreationVerificationEnvKey.EVIDENCE_DIRECTORY]: '.wildo-saas/logs/application-creation-evidence',\n [ApplicationCreationVerificationEnvKey.SILENT]: 'true',\n },\n }]);\n expect(targets[0]).toEqual(expect.objectContaining({\n env: expect.not.objectContaining({\n [ApplicationCreationVerificationEnvKey.RUN_ID]: expect.anything(),\n }),\n }));\n });\n\n it('emits an explicit removal target when the generated config revokes the authored posture', () => {\n expect(AppBootstrapService.buildApplicationOperatorEnvTargets({\n env: { locationType: WildoLocationType.LOCAL } as never,\n config: {} as never,\n frameworkPath: '/repo',\n saasRoot: '/repo/examples/wonder-todos',\n })).toEqual([{\n relativeDir: 'examples/wonder-todos',\n disposition: ApplicationOperatorEnvFileDisposition.REMOVE,\n }]);\n });\n\n it('refuses remote and repository-escaping operator targets', () => {\n const config = {\n applicationCreationVerification: {\n evidenceDirectory: '.wildo-saas/logs/application-creation-evidence',\n silent: false,\n },\n } as never;\n expect(() => AppBootstrapService.buildApplicationOperatorEnvTargets({\n env: { locationType: WildoLocationType.REMOTE } as never,\n config,\n frameworkPath: '/repo',\n saasRoot: '/repo/examples/wonder-todos',\n })).toThrow('local-only');\n expect(() => AppBootstrapService.buildApplicationOperatorEnvTargets({\n env: { locationType: WildoLocationType.LOCAL } as never,\n config,\n frameworkPath: '/repo',\n saasRoot: '/outside',\n })).toThrow('must remain below');\n expect(AppBootstrapService.buildApplicationOperatorEnvTargets({\n env: { locationType: WildoLocationType.REMOTE } as never,\n config: {} as never,\n frameworkPath: '/repo',\n saasRoot: '/repo/examples/wonder-todos',\n })).toEqual([]);\n });\n});\n\ndescribe('AppBootstrapService application env targets', () => {\n afterEach(() => {\n vi.restoreAllMocks();\n for (const dir of tempDirs.splice(0)) {\n rmSync(dir, { recursive: true, force: true });\n }\n });\n\n it('keeps companion targets separate from application backend env targets', async () => {\n const sandboxRoot = mkdtempSync(join(tmpdir(), 'wildo-cli-app-bootstrap-'));\n tempDirs.push(sandboxRoot);\n const appRoot = join(sandboxRoot, 'wonder-todos');\n const backendConfigDir = join(appRoot, 'services', 'backend-api', 'src', 'config');\n mkdirSync(join(appRoot, '.wildo-saas', 'wildo-dev-companion'), { recursive: true });\n mkdirSync(backendConfigDir, { recursive: true });\n writeFileSync(\n join(backendConfigDir, 'app-config.backend.ts'),\n \"export default { userTypes: { member: {} } };\\n\",\n 'utf8',\n );\n\n vi.spyOn(AppRuntimeTargetsService, 'resolve').mockResolvedValue({\n appSlug: 'wonder-todos',\n appDisplayName: 'Wonder Todos',\n appRoot,\n backendScopedProviderRefs: [],\n saasConfigPath: '/repo/examples/wonder-todos/wildo.saas.config.ts',\n appDatabaseName: 'wonder-todos',\n managedDeclaration: {\n app: {\n name: 'wonder-todos',\n slug: 'wonder-todos',\n displayName: 'Wonder Todos',\n description: 'A collaborative task management platform',\n type: 'saas',\n },\n frontendServices: [\n {\n serviceName: 'wonder-todos-app',\n frontendType: AppFrontendType.SAAS_APP,\n },\n ],\n engineCapabilities: {\n [EngineCapability.EMAIL_TRANSACTIONAL]: {\n enabled: true,\n },\n },\n minions: {},\n workers: {},\n providers: { scopes: {} },\n providerConfigurations: {},\n },\n firstAdminSeed: {\n userTypes: ['member'],\n },\n backendServices: [\n {\n key: 'backendApi',\n path: 'services/backend-api',\n serviceName: 'wonder-todos-api',\n defaultPort: 4241,\n isolation: BACKEND_ISOLATION_FIXTURE,\n },\n ],\n frontendServices: [\n {\n key: 'app',\n path: 'frontend',\n serviceName: 'wonder-todos-app',\n defaultPort: 4242,\n frontendType: AppFrontendType.SAAS_APP,\n isolation: FRONTEND_ISOLATION_FIXTURE,\n },\n ],\n localServiceAddresses: {\n devCompanion: {\n host: '0.0.0.0',\n port: 4341,\n url: 'http://localhost:4341',\n },\n },\n requiresJavaBackendBase: false,\n libraries: {},\n declaredModules: {},\n moduleIdsByService: {},\n moduleIds: [],\n });\n loadConfigJsonMock.mockReturnValue({\n runtimeEnvironment: RuntimeEnvironment.DEVELOPMENT,\n } as never);\n vi.spyOn(AppBootstrapService, 'ensureApplicationRegistered')\n // `undefined` = an apps-manager that reported no seeding outcome. These fixtures author no\n // migrations directory, so bootstrap stays single-phase and never reads the value.\n .mockResolvedValue(undefined);\n vi.spyOn(AppBootstrapService, 'fetchBootstrapCredentials').mockResolvedValue({\n success: true,\n appSlug: 'wonder-todos',\n environment: RuntimeEnvironment.DEVELOPMENT,\n credentials: {\n APPLICATION_ID: 'app-id',\n PLATFORM_APPLICATION_PRIMARY_SECRET: 'primary-secret',\n PLATFORM_APPS_MANAGER_URL: 'http://localhost:3001',\n APPLICATION_ENV: RuntimeEnvironment.DEVELOPMENT,\n },\n });\n\n const backendTargets = await AppBootstrapService.buildApplicationBackendTargets({\n env: {\n name: 'local',\n runtimeEnvironment: RuntimeEnvironment.DEVELOPMENT,\n } as never,\n credentials: {\n admin: {\n email: 'admin@example.com',\n firstName: 'Ada',\n lastName: 'Lovelace',\n password: 'password',\n },\n } as never,\n frameworkPath: sandboxRoot,\n saasRoot: sandboxRoot,\n });\n\n expect(backendTargets).toContainEqual(\n expect.objectContaining({\n serviceName: 'wonder-todos-api',\n applicationRuntimeSignalsHome: join(sandboxRoot, 'wonder-todos', '.wildo-saas', 'runtime-signals'),\n runtimeEndpoints: expect.objectContaining({\n 'wonder-todos-api': {\n publicUrl: 'http://localhost:4241',\n internalUrl: 'http://localhost:4241',\n },\n 'wonder-todos-dev-companion': {\n publicUrl: 'http://localhost:4341',\n internalUrl: 'http://localhost:4341',\n },\n }),\n }),\n );\n\n expect(backendTargets).not.toContainEqual(\n expect.objectContaining({\n serviceName: 'wonder-todos-dev-companion',\n }),\n );\n\n const companionTargets = await AppBootstrapService.buildApplicationCompanionTargets({\n env: {\n name: 'local',\n runtimeEnvironment: RuntimeEnvironment.DEVELOPMENT,\n } as never,\n credentials: {\n admin: {\n email: 'admin@example.com',\n firstName: 'Ada',\n lastName: 'Lovelace',\n password: 'password',\n },\n } as never,\n frameworkPath: sandboxRoot,\n saasRoot: sandboxRoot,\n });\n\n expect(companionTargets).toEqual([\n expect.objectContaining({\n serviceName: 'wonder-todos-dev-companion',\n relativeDir: expect.stringMatching(/\\.wildo-saas\\/wildo-dev-companion$/),\n runtimeEndpoints: {\n 'wonder-todos-api': {\n publicUrl: 'http://localhost:4241',\n internalUrl: 'http://localhost:4241',\n },\n 'wonder-todos-app': {\n publicUrl: 'http://localhost:4242',\n internalUrl: 'http://localhost:4242',\n },\n 'wonder-todos-dev-companion': {\n publicUrl: 'http://localhost:4341',\n internalUrl: 'http://localhost:4341',\n },\n main_backend_api: {\n publicUrl: 'http://localhost:4241',\n internalUrl: 'http://localhost:4241',\n },\n health_check_api: {\n publicUrl: 'http://localhost:4240',\n internalUrl: 'http://localhost:4240',\n },\n main_webhook_api: {\n publicUrl: 'http://localhost:4239',\n internalUrl: 'http://localhost:4239',\n },\n oauth2_provider_api: {\n publicUrl: 'http://localhost:4238',\n internalUrl: 'http://localhost:4238',\n },\n mcp_api: {\n publicUrl: 'http://localhost:4237',\n internalUrl: 'http://localhost:4237',\n },\n },\n extraEnv: {\n HOST: '0.0.0.0',\n PORT: '4341',\n },\n }),\n ]);\n\n const companionTarget = companionTargets[0];\n expect(companionTarget?.extraEnv).not.toHaveProperty('APP_SLUG');\n expect(companionTarget?.extraEnv).not.toHaveProperty('APP_NAME');\n expect(companionTarget?.extraEnv).not.toHaveProperty('LOG_LEVEL');\n expect(companionTarget?.extraEnv).not.toHaveProperty('WILDO_FORMATTED_CONSOLE_ERRORS');\n expect(AppBootstrapService.ensureApplicationRegistered).toHaveBeenCalledWith(\n expect.anything(),\n expect.anything(),\n expect.objectContaining({\n appSlug: 'wonder-todos',\n appDisplayName: 'Wonder Todos',\n firstAdminSeed: {\n userTypes: ['member'],\n },\n managedDeclaration: {\n app: {\n name: 'wonder-todos',\n slug: 'wonder-todos',\n displayName: 'Wonder Todos',\n description: 'A collaborative task management platform',\n type: 'saas',\n },\n frontendServices: [\n {\n serviceName: 'wonder-todos-app',\n frontendType: AppFrontendType.SAAS_APP,\n },\n ],\n engineCapabilities: {\n [EngineCapability.EMAIL_TRANSACTIONAL]: {\n enabled: true,\n },\n },\n minions: {},\n workers: {},\n providers: { scopes: {} },\n providerConfigurations: {},\n },\n }),\n );\n });\n\n it('carries the canonical app-root runtime-signals home through a nested minion target', async () => {\n const sandboxRoot = mkdtempSync(join(tmpdir(), 'wildo-cli-nested-minion-'));\n tempDirs.push(sandboxRoot);\n const appRoot = join(sandboxRoot, 'wonder-todos');\n const saasConfigPath = join(appRoot, 'wildo.saas.config.ts');\n const minionRoot = join(appRoot, 'services', 'minions', 'marketing-scrapper');\n mkdirSync(minionRoot, { recursive: true });\n writeFileSync(\n saasConfigPath,\n \"export default { minions: { marketingScrapper: { path: 'services/minions/marketing-scrapper' } } };\\n\",\n 'utf8',\n );\n writeFileSync(\n join(minionRoot, 'wildo.minion.config.ts'),\n \"export default { version: 1, name: 'marketing-scrapper', displayName: 'Marketing Scrapper', runtime: { type: 'docker', language: 'typescript' }, mode: 'always-up' };\\n\",\n 'utf8',\n );\n\n const targets = await AppBootstrapService.buildApplicationMinionTargets({\n env: { name: 'local', locationType: WildoLocationType.LOCAL } as never,\n credentials: {} as never,\n frameworkPath: sandboxRoot,\n saasRoot: appRoot,\n prepared: {\n runtimeTarget: {\n appRoot,\n appSlug: 'wonder-todos',\n saasConfigPath,\n appDatabaseName: 'wonder-todos',\n },\n bootstrapCredentials: {} as never,\n runtimeEndpoints: {},\n // Each declared runtime's OWN identity (Step 1 / F11). Required rather\n // than optional on purpose: a hand-built `prepared` must state what each\n // runtime holds, because the alternative — an absent map falling back to\n // the application backend's credentials — is the exact collapse this\n // step removes, and it would pass silently.\n runtimePrincipalCredentials: {\n 'minion:marketingScrapper': { PLATFORM_APPLICATION_PRIMARY_SECRET: 'minion-own-secret' } as never,\n },\n } as never,\n });\n\n expect(targets).toEqual([\n expect.objectContaining({\n minionName: 'marketingScrapper',\n serviceName: 'marketing-scrapper',\n relativeDir: 'wonder-todos/services/minions/marketing-scrapper',\n applicationRuntimeSignalsHome: join(appRoot, '.wildo-saas', 'runtime-signals'),\n }),\n ]);\n });\n\n it('builds worker .env targets from authored worker folders without requiring generated provider modules', async () => {\n const sandboxRoot = mkdtempSync(join(tmpdir(), 'wildo-cli-app-bootstrap-workers-'));\n tempDirs.push(sandboxRoot);\n const appRoot = join(sandboxRoot, 'wonder-todos');\n const backendConfigDir = join(appRoot, 'backend-api', 'src');\n const workerRoot = join(appRoot, 'workers', 'my-rust-worker');\n mkdirSync(backendConfigDir, { recursive: true });\n mkdirSync(workerRoot, { recursive: true });\n writeFileSync(\n join(backendConfigDir, 'saas-config.backend.ts'),\n \"export default { userTypes: { member: {} } };\\n\",\n 'utf8',\n );\n writeFileSync(\n join(appRoot, 'wildo.saas.config.ts'),\n [\n 'export default {',\n ' bootstrap: { firstAdmin: { userTypes: [\\'member\\'] } },',\n ' workers: {',\n \" rustWorker: { path: './workers/my-rust-worker' },\",\n ' },',\n '};',\n '',\n ].join('\\n'),\n 'utf8',\n );\n writeFileSync(\n join(workerRoot, 'wildo.worker.config.ts'),\n [\n // Complete, schema-valid worker config (name + displayName + runtime +\n // auth are all required by WildoWorkerConfigSchema; http/replicas\n // default). buildApplicationWorkerTargets parses through the schema.\n 'export default {',\n \" name: 'my-rust-worker',\",\n \" displayName: 'My Rust Worker',\",\n \" runtime: { type: 'docker', language: 'rust' },\",\n \" http: { port: 8080, healthPath: '/healthz', readyPath: '/readyz' },\",\n \" auth: 'wildo-jwt',\",\n '};',\n '',\n ].join('\\n'),\n 'utf8',\n );\n\n vi.spyOn(AppRuntimeTargetsService, 'resolve').mockResolvedValue({\n appSlug: 'wonder-todos',\n appDisplayName: 'Wonder Todos',\n appRoot,\n backendScopedProviderRefs: [],\n saasConfigPath: join(appRoot, 'wildo.saas.config.ts'),\n appDatabaseName: 'wonder-todos',\n managedDeclaration: {\n app: {\n name: 'wonder-todos',\n slug: 'wonder-todos',\n displayName: 'Wonder Todos',\n description: 'A collaborative task management platform',\n type: 'saas',\n },\n frontendServices: [],\n engineCapabilities: {},\n minions: {},\n // Must match the workers the sandbox `wildo.saas.config.ts` below\n // declares. In production these cannot diverge — the declaration is\n // BUILT from that config — and `prepare` mints one identity per declared\n // principal while the target builder iterates the config. A fixture that\n // disagreed would trip the fail-closed guard that refuses to hand a\n // worker the application backend's credentials.\n workers: { rustWorker: {} as never },\n providers: { scopes: {} },\n providerConfigurations: {},\n },\n firstAdminSeed: {\n userTypes: ['member'],\n },\n backendServices: [\n {\n key: 'backendApi',\n path: 'backend-api',\n serviceName: 'wonder-todos-api',\n defaultPort: 4241,\n isolation: BACKEND_ISOLATION_FIXTURE,\n },\n ],\n frontendServices: [],\n requiresJavaBackendBase: false,\n libraries: {},\n declaredModules: {},\n moduleIdsByService: {},\n moduleIds: [],\n });\n loadConfigJsonMock.mockReturnValue({\n runtimeEnvironment: RuntimeEnvironment.DEVELOPMENT,\n } as never);\n vi.spyOn(AppBootstrapService, 'ensureApplicationRegistered')\n // `undefined` = an apps-manager that reported no seeding outcome. These fixtures author no\n // migrations directory, so bootstrap stays single-phase and never reads the value.\n .mockResolvedValue(undefined);\n vi.spyOn(AppBootstrapService, 'fetchBootstrapCredentials').mockResolvedValue({\n success: true,\n appSlug: 'wonder-todos',\n environment: RuntimeEnvironment.DEVELOPMENT,\n credentials: {\n APPLICATION_ID: 'app-id',\n PLATFORM_APPLICATION_PRIMARY_SECRET: 'primary-secret',\n PLATFORM_APPS_MANAGER_URL: 'http://localhost:3001',\n APPLICATION_ENV: RuntimeEnvironment.DEVELOPMENT,\n },\n });\n\n const workerTargets = await AppBootstrapService.buildApplicationWorkerTargets({\n env: {\n name: 'local',\n runtimeEnvironment: RuntimeEnvironment.DEVELOPMENT,\n } as never,\n credentials: {\n admin: {\n email: 'admin@example.com',\n firstName: 'Ada',\n lastName: 'Lovelace',\n password: 'password',\n },\n } as never,\n frameworkPath: sandboxRoot,\n saasRoot: appRoot,\n });\n\n expect(workerTargets).toEqual([\n expect.objectContaining({\n workerName: 'rustWorker',\n serviceName: 'my-rust-worker',\n relativeDir: 'wonder-todos/workers/my-rust-worker',\n runtimeEndpoints: expect.objectContaining({\n 'wonder-todos-api': {\n publicUrl: 'http://localhost:4241',\n internalUrl: 'http://localhost:4241',\n },\n }),\n }),\n ]);\n });\n\n it('fails when bootstrap first-admin userTypes drift from backend config', async () => {\n const sandboxRoot = mkdtempSync(join(tmpdir(), 'wildo-cli-app-bootstrap-invalid-seed-'));\n tempDirs.push(sandboxRoot);\n const appRoot = join(sandboxRoot, 'wonder-todos');\n const backendConfigDir = join(appRoot, 'backend-api', 'src', 'config');\n mkdirSync(backendConfigDir, { recursive: true });\n writeFileSync(\n join(backendConfigDir, 'app-config.backend.ts'),\n \"export default { userTypes: { member: {} } };\\n\",\n 'utf8',\n );\n\n vi.spyOn(AppRuntimeTargetsService, 'resolve').mockResolvedValue({\n appSlug: 'wonder-todos',\n appDisplayName: 'Wonder Todos',\n appRoot,\n backendScopedProviderRefs: [],\n saasConfigPath: '/repo/examples/wonder-todos/wildo.saas.config.ts',\n appDatabaseName: 'wonder-todos',\n managedDeclaration: {\n app: {\n name: 'wonder-todos',\n slug: 'wonder-todos',\n displayName: 'Wonder Todos',\n description: 'A collaborative task management platform',\n type: 'saas',\n },\n frontendServices: [],\n engineCapabilities: {},\n minions: {},\n workers: {},\n providers: { scopes: {} },\n providerConfigurations: {},\n },\n firstAdminSeed: {\n userTypes: ['admin'],\n },\n backendServices: [\n {\n key: 'backendApi',\n path: 'backend-api',\n serviceName: 'wonder-todos-api',\n defaultPort: 4241,\n isolation: BACKEND_ISOLATION_FIXTURE,\n },\n ],\n frontendServices: [],\n requiresJavaBackendBase: false,\n libraries: {},\n declaredModules: {},\n moduleIdsByService: {},\n moduleIds: [],\n });\n loadConfigJsonMock.mockReturnValue({\n runtimeEnvironment: RuntimeEnvironment.DEVELOPMENT,\n } as never);\n\n await expect(\n AppBootstrapService.buildApplicationBackendTargets({\n env: {\n name: 'local',\n runtimeEnvironment: RuntimeEnvironment.DEVELOPMENT,\n } as never,\n credentials: {\n admin: {\n email: 'admin@example.com',\n firstName: 'Ada',\n lastName: 'Lovelace',\n password: 'password',\n },\n } as never,\n frameworkPath: sandboxRoot,\n saasRoot: sandboxRoot,\n }),\n ).rejects.toThrow(/bootstrap\\.firstAdmin\\.userTypes/);\n });\n\n it('fails when bootstrap first-admin userTypes are missing', async () => {\n const sandboxRoot = mkdtempSync(join(tmpdir(), 'wildo-cli-app-bootstrap-missing-seed-'));\n tempDirs.push(sandboxRoot);\n const appRoot = join(sandboxRoot, 'wonder-todos');\n\n vi.spyOn(AppRuntimeTargetsService, 'resolve').mockResolvedValue({\n appSlug: 'wonder-todos',\n appDisplayName: 'Wonder Todos',\n appRoot,\n backendScopedProviderRefs: [],\n saasConfigPath: '/repo/examples/wonder-todos/wildo.saas.config.ts',\n appDatabaseName: 'wonder-todos',\n managedDeclaration: {\n app: {\n name: 'wonder-todos',\n slug: 'wonder-todos',\n displayName: 'Wonder Todos',\n description: 'A collaborative task management platform',\n type: 'saas',\n },\n frontendServices: [],\n engineCapabilities: {},\n minions: {},\n workers: {},\n providers: { scopes: {} },\n providerConfigurations: {},\n },\n backendServices: [\n {\n key: 'backendApi',\n path: 'backend-api',\n serviceName: 'wonder-todos-api',\n defaultPort: 4241,\n isolation: BACKEND_ISOLATION_FIXTURE,\n },\n ],\n frontendServices: [],\n requiresJavaBackendBase: false,\n libraries: {},\n declaredModules: {},\n moduleIdsByService: {},\n moduleIds: [],\n });\n loadConfigJsonMock.mockReturnValue({\n runtimeEnvironment: RuntimeEnvironment.DEVELOPMENT,\n } as never);\n\n await expect(\n AppBootstrapService.buildApplicationBackendTargets({\n env: {\n name: 'local',\n runtimeEnvironment: RuntimeEnvironment.DEVELOPMENT,\n } as never,\n credentials: {\n admin: {\n email: 'admin@example.com',\n firstName: 'Ada',\n lastName: 'Lovelace',\n password: 'password',\n },\n } as never,\n frameworkPath: sandboxRoot,\n saasRoot: sandboxRoot,\n }),\n ).rejects.toThrow(/missing bootstrap\\.firstAdmin\\.userTypes/);\n });\n\n it('drops a CDN-served frontend from nginx deploy targets + ingress routes but keeps it in runtime endpoints', async () => {\n const sandboxRoot = mkdtempSync(join(tmpdir(), 'wildo-cli-app-bootstrap-cdn-'));\n tempDirs.push(sandboxRoot);\n const appRoot = join(sandboxRoot, 'wonder-todos');\n const backendConfigDir = join(appRoot, 'backend-api', 'src', 'config');\n mkdirSync(backendConfigDir, { recursive: true });\n writeFileSync(\n join(backendConfigDir, 'app-config.backend.ts'),\n 'export default { userTypes: { member: {} } };\\n',\n 'utf8',\n );\n // REMOTE builds worker dispatch URLs, which loads the saas config to read\n // `workers` — write a minimal one (no workers) so that path is a no-op.\n writeFileSync(\n join(appRoot, 'wildo.saas.config.ts'),\n 'export default { workers: {} };\\n',\n 'utf8',\n );\n\n vi.spyOn(AppRuntimeTargetsService, 'resolve').mockResolvedValue({\n appSlug: 'wonder-todos',\n appDisplayName: 'Wonder Todos',\n appRoot,\n backendScopedProviderRefs: [],\n saasConfigPath: join(appRoot, 'wildo.saas.config.ts'),\n appDatabaseName: 'wonder-todos',\n managedDeclaration: {\n app: {\n name: 'wonder-todos',\n slug: 'wonder-todos',\n displayName: 'Wonder Todos',\n description: 'A collaborative task management platform',\n type: 'saas',\n },\n frontendServices: [\n { serviceName: 'wonder-todos-app', frontendType: AppFrontendType.SAAS_APP },\n { serviceName: 'wonder-todos-website', frontendType: AppFrontendType.STATIC_WEBSITE },\n { serviceName: 'wonder-todos-docs', frontendType: AppFrontendType.TECH_DOC },\n ],\n engineCapabilities: {},\n minions: {},\n workers: {},\n providers: { scopes: {} },\n providerConfigurations: {},\n },\n firstAdminSeed: { userTypes: ['member'] },\n backendServices: [\n { key: 'backendApi', path: 'backend-api', serviceName: 'wonder-todos-api', defaultPort: 4241, isolation: BACKEND_ISOLATION_FIXTURE },\n ],\n frontendServices: [\n { key: 'app', path: 'frontend', serviceName: 'wonder-todos-app', defaultPort: 4242, frontendType: AppFrontendType.SAAS_APP, isolation: FRONTEND_ISOLATION_FIXTURE },\n { key: 'website', path: 'website', serviceName: 'wonder-todos-website', defaultPort: 4243, frontendType: AppFrontendType.STATIC_WEBSITE, isolation: FRONTEND_ISOLATION_FIXTURE },\n { key: 'docs', path: 'technical-doc', serviceName: 'wonder-todos-docs', defaultPort: 4244, frontendType: AppFrontendType.TECH_DOC, isolation: FRONTEND_ISOLATION_FIXTURE },\n ],\n requiresJavaBackendBase: false,\n libraries: {},\n declaredModules: {},\n moduleIdsByService: {},\n moduleIds: [],\n } as never);\n loadConfigJsonMock.mockReturnValue({\n runtimeEnvironment: RuntimeEnvironment.PRODUCTION,\n } as never);\n vi.spyOn(AppBootstrapService, 'ensureApplicationRegistered')\n // `undefined` = an apps-manager that reported no seeding outcome. These fixtures author no\n // migrations directory, so bootstrap stays single-phase and never reads the value.\n .mockResolvedValue(undefined);\n vi.spyOn(AppBootstrapService, 'fetchBootstrapCredentials').mockResolvedValue({\n success: true,\n appSlug: 'wonder-todos',\n environment: RuntimeEnvironment.PRODUCTION,\n credentials: {\n APPLICATION_ID: 'app-id',\n PLATFORM_APPLICATION_PRIMARY_SECRET: 'primary-secret',\n PLATFORM_APPS_MANAGER_URL: 'http://localhost:3001',\n APPLICATION_ENV: RuntimeEnvironment.PRODUCTION,\n },\n } as never);\n\n const [backendTarget] = await AppBootstrapService.buildApplicationBackendTargets({\n env: {\n name: 'production',\n runtimeEnvironment: RuntimeEnvironment.PRODUCTION,\n locationType: WildoLocationType.REMOTE,\n runtime: WildoDeploymentRuntime.KUBERNETES,\n publicDomain: 'acme.com',\n serviceHosts: { app: 'app', website: '', docs: 'docs' },\n // Only the website opts into the CDN.\n cdn: { website: { enabled: true, vendor: { kind: CdnVendor.GENERIC } } },\n kubernetes: { namespace: 'wonder-todos' },\n } as never,\n credentials: {\n admin: { email: 'admin@example.com', firstName: 'Ada', lastName: 'Lovelace', password: 'password' },\n } as never,\n frameworkPath: sandboxRoot,\n saasRoot: sandboxRoot,\n });\n\n // (1) The CDN'd website gets NO nginx Deployment/Service target; app + docs do.\n // Each surviving target carries its resolved container isolation — the\n // pod that WILL exist has to be hardened, and the CDN'd one has no pod at\n // all, so dropping it here is what makes the isolation list exactly the\n // set of containers the cluster runs.\n expect(backendTarget?.frontends).toEqual([\n {\n serviceName: 'wonder-todos-app',\n port: 4242,\n isolation: {\n runAsUser: FRONTEND_ISOLATION_FIXTURE.runAsUser,\n runAsGroup: FRONTEND_ISOLATION_FIXTURE.runAsGroup,\n writablePaths: [...FRONTEND_ISOLATION_FIXTURE.writablePaths],\n },\n },\n {\n serviceName: 'wonder-todos-docs',\n port: 4244,\n isolation: {\n runAsUser: FRONTEND_ISOLATION_FIXTURE.runAsUser,\n runAsGroup: FRONTEND_ISOLATION_FIXTURE.runAsGroup,\n writablePaths: [...FRONTEND_ISOLATION_FIXTURE.writablePaths],\n },\n },\n ]);\n\n // (2) The CDN'd website host (apex `acme.com`) gets NO ingress route; app,\n // docs, and the api are still routed on-cluster.\n const ingressHosts = (backendTarget?.ingressRoutes ?? []).map((route) => route.host);\n expect(ingressHosts).toContain('app.acme.com');\n expect(ingressHosts).toContain('docs.acme.com');\n expect(ingressHosts).toContain('backendapi.acme.com');\n expect(ingressHosts).not.toContain('acme.com');\n\n // (3) But the website STAYS advertised in runtime.endPoints (publicUrl\n // preserved — the browser gets `https://acme.com`, it just resolves to\n // the CDN). This is the advertised-but-not-ingress-routed asymmetry.\n expect(backendTarget?.runtimeEndpoints['wonder-todos-website']?.publicUrl).toBe('https://acme.com');\n });\n});\n"]}
1
+ {"version":3,"file":"app-bootstrap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IAAI,EAAE,IAAI;gBACV,SAAS,EAAE;oBACT,SAAS,EAAE,0BAA0B,CAAC,SAAS;oBAC/C,UAAU,EAAE,0BAA0B,CAAC,UAAU;oBACjD,aAAa,EAAE,CAAC,GAAG,0BAA0B,CAAC,aAAa,CAAC;iBAC7D;aACF;YACD;gBACE,WAAW,EAAE,mBAAmB;gBAChC,IAAI,EAAE,IAAI;gBACV,SAAS,EAAE;oBACT,SAAS,EAAE,0BAA0B,CAAC,SAAS;oBAC/C,UAAU,EAAE,0BAA0B,CAAC,UAAU;oBACjD,aAAa,EAAE,CAAC,GAAG,0BAA0B,CAAC,aAAa,CAAC;iBAC7D;aACF;SACF,CAAC,CAAC;QAEH,2EAA2E;QAC3E,qDAAqD;QACrD,MAAM,YAAY,GAAG,CAAC,aAAa,EAAE,aAAa,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACrF,MAAM,CAAC,YAAY,CAAC,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;QAC/C,MAAM,CAAC,YAAY,CAAC,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;QAChD,MAAM,CAAC,YAAY,CAAC,CAAC,SAAS,CAAC,qBAAqB,CAAC,CAAC;QACtD,MAAM,CAAC,YAAY,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QAE/C,uEAAuE;QACvE,2EAA2E;QAC3E,yEAAyE;QACzE,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,sBAAsB,CAAC,EAAE,SAAS,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;IACtG,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from 'fs';\nimport { join } from 'path';\nimport { tmpdir } from 'os';\nimport { describe, expect, it, vi, afterEach } from 'vitest';\nimport {\n AppFrontendType,\n ApplicationCreationVerificationEnvKey,\n CdnVendor,\n WildoDeploymentRuntime,\n WildoLocationType,\n APP_BACKEND_DEFAULT_RUNTIME_UID,\n RUNTIME_DEFAULT_PIDS_LIMIT,\n APP_FRONTEND_DEFAULT_RUNTIME_UID,\n APP_FRONTEND_MANDATORY_WRITABLE_PATHS,\n} from '@wildo-ai/platform-config-lib';\nimport { EngineCapability, RuntimeEnvironment } from '@wildo-ai/saas-models';\nimport { ApplicationOperatorEnvFileDisposition } from '~wildo-cli/services/environment/env-configuration-generator.service';\n\nconst { loadConfigJsonMock } = vi.hoisted(() => ({\n loadConfigJsonMock: vi.fn(),\n}));\n\nvi.mock('~wildo-cli/services/environment/environment.service', () => ({\n EnvironmentUtils: {\n loadConfigJson: loadConfigJsonMock,\n saveApplicationRuntimeIdentity: vi.fn(),\n },\n}));\n\nimport { AppBootstrapService } from '../app-bootstrap.service';\nimport { AppRuntimeTargetsService } from '../app-runtime-targets.service';\n\n/**\n * Effective isolation as `resolveAppServiceIsolation` produces it — these\n * fixtures stand in for a parsed `wildo.saas.config.ts` row, so they carry the\n * RESOLVED shape (kind-correct uid + nginx mounts already merged), not an\n * authored partial. Using the real constants keeps them honest if a default\n * changes.\n */\nconst BACKEND_ISOLATION_FIXTURE = {\n runAsUser: APP_BACKEND_DEFAULT_RUNTIME_UID,\n runAsGroup: APP_BACKEND_DEFAULT_RUNTIME_UID,\n writablePaths: [],\n pidsLimit: RUNTIME_DEFAULT_PIDS_LIMIT,\n};\nconst FRONTEND_ISOLATION_FIXTURE = {\n runAsUser: APP_FRONTEND_DEFAULT_RUNTIME_UID,\n runAsGroup: APP_FRONTEND_DEFAULT_RUNTIME_UID,\n writablePaths: [...APP_FRONTEND_MANDATORY_WRITABLE_PATHS],\n pidsLimit: RUNTIME_DEFAULT_PIDS_LIMIT,\n};\n\nconst tempDirs: string[] = [];\n\ndescribe('AppBootstrapService.buildApplicationFrontendTargets', () => {\n afterEach(() => {\n vi.restoreAllMocks();\n loadConfigJsonMock.mockReset();\n for (const dir of tempDirs.splice(0)) {\n rmSync(dir, { recursive: true, force: true });\n }\n });\n\n it('builds frontend .env.example targets from frontend service identity', async () => {\n vi.spyOn(AppRuntimeTargetsService, 'resolve').mockResolvedValue({\n appSlug: 'wonder-todos',\n appDisplayName: 'Wonder Todos',\n appRoot: '/repo/examples/wonder-todos',\n backendScopedProviderRefs: [],\n saasConfigPath: '/repo/examples/wonder-todos/wildo.saas.config.ts',\n managedDeclaration: {\n app: {\n name: 'wonder-todos',\n slug: 'wonder-todos',\n displayName: 'Wonder Todos',\n description: 'A collaborative task management platform',\n type: 'saas',\n },\n frontendServices: [\n {\n serviceName: 'wonder-todos-app',\n frontendType: AppFrontendType.SAAS_APP,\n },\n {\n serviceName: 'wonder-todos-website',\n frontendType: AppFrontendType.STATIC_WEBSITE,\n },\n ],\n engineCapabilities: {\n [EngineCapability.EMAIL_TRANSACTIONAL]: {\n enabled: true,\n },\n },\n minions: {},\n workers: {},\n providers: { scopes: {}, connections: {} },\n providerConfigurations: {},\n },\n firstAdminSeed: {\n userTypes: ['member'],\n },\n backendServices: [\n {\n key: 'backendApi',\n path: 'backend-api',\n serviceName: 'wonder-todos-api',\n defaultPort: 4241,\n isolation: BACKEND_ISOLATION_FIXTURE,\n },\n ],\n frontendServices: [\n {\n key: 'app',\n path: 'frontend',\n serviceName: 'wonder-todos-app',\n defaultPort: 4242,\n frontendType: AppFrontendType.SAAS_APP,\n isolation: FRONTEND_ISOLATION_FIXTURE,\n },\n {\n key: 'website',\n path: 'website',\n serviceName: 'wonder-todos-website',\n defaultPort: 4243,\n frontendType: AppFrontendType.STATIC_WEBSITE,\n isolation: FRONTEND_ISOLATION_FIXTURE,\n },\n ],\n requiresJavaBackendBase: false,\n libraries: {},\n declaredModules: {},\n moduleIdsByService: {},\n moduleIds: [],\n });\n\n const targets = await AppBootstrapService.buildApplicationFrontendTargets({\n saasRoot: '/repo/examples/wonder-todos',\n requestedAppSlug: 'wonder-todos',\n });\n\n expect(targets).toEqual([\n {\n serviceName: 'wonder-todos-app',\n applicationRoot: '/repo/examples/wonder-todos',\n relativeDir: 'frontend',\n envExample: {\n NODE_ENV: 'development',\n VITE_APP_SLUG: 'wonder-todos',\n VITE_APP_NAME: 'Wonder Todos',\n VITE_PORT: '4242',\n VITE_HMR_HOST: 'localhost',\n VITE_HMR_CLIENT_PORT: '4242',\n VITE_HMR_PROTOCOL: 'ws',\n VITE_API_BASE_URL: 'http://localhost:4241',\n VITE_FRONTEND_SERVICE_NAME: 'wonder-todos-app',\n },\n },\n {\n serviceName: 'wonder-todos-website',\n applicationRoot: '/repo/examples/wonder-todos',\n relativeDir: 'website',\n envExample: {\n NODE_ENV: 'development',\n VITE_APP_SLUG: 'wonder-todos',\n VITE_APP_NAME: 'Wonder Todos',\n VITE_PORT: '4243',\n VITE_HMR_HOST: 'localhost',\n VITE_HMR_CLIENT_PORT: '4243',\n VITE_HMR_PROTOCOL: 'ws',\n },\n },\n ]);\n });\n});\n\ndescribe('AppBootstrapService.buildApplicationOperatorEnvTargets', () => {\n it('projects generated config into one app-root operator env without a run id', () => {\n const frameworkRoot = '/repo';\n const targets = AppBootstrapService.buildApplicationOperatorEnvTargets({\n env: { locationType: WildoLocationType.LOCAL } as never,\n config: {\n applicationCreationVerification: {\n evidenceDirectory: '.wildo-saas/logs/application-creation-evidence',\n silent: true,\n },\n } as never,\n saasRoot: '/repo/examples/wonder-todos',\n });\n\n expect(targets).toEqual([{\n applicationRoot: '/repo/examples/wonder-todos',\n disposition: ApplicationOperatorEnvFileDisposition.WRITE,\n env: {\n [ApplicationCreationVerificationEnvKey.EVIDENCE_DIRECTORY]: '.wildo-saas/logs/application-creation-evidence',\n [ApplicationCreationVerificationEnvKey.SILENT]: 'true',\n },\n }]);\n expect(targets[0]).toEqual(expect.objectContaining({\n env: expect.not.objectContaining({\n [ApplicationCreationVerificationEnvKey.RUN_ID]: expect.anything(),\n }),\n }));\n });\n\n it('emits an explicit removal target when the generated config revokes the authored posture', () => {\n expect(AppBootstrapService.buildApplicationOperatorEnvTargets({\n env: { locationType: WildoLocationType.LOCAL } as never,\n config: {} as never,\n saasRoot: '/repo/examples/wonder-todos',\n })).toEqual([{\n applicationRoot: '/repo/examples/wonder-todos',\n disposition: ApplicationOperatorEnvFileDisposition.REMOVE,\n }]);\n });\n\n it('refuses remote operator targets and anchors a local one on the application root wherever it lives', () => {\n const config = {\n applicationCreationVerification: {\n evidenceDirectory: '.wildo-saas/logs/application-creation-evidence',\n silent: false,\n },\n } as never;\n expect(() => AppBootstrapService.buildApplicationOperatorEnvTargets({\n env: { locationType: WildoLocationType.REMOTE } as never,\n config,\n saasRoot: '/repo/examples/wonder-todos',\n })).toThrow('local-only');\n // An application is not required to live under the framework checkout (an app-creator\n // application never does): the target is anchored on the application root, wherever it is.\n expect(AppBootstrapService.buildApplicationOperatorEnvTargets({\n env: { locationType: WildoLocationType.LOCAL } as never,\n config,\n saasRoot: '/outside',\n })).toEqual([expect.objectContaining({ applicationRoot: '/outside' })]);\n expect(AppBootstrapService.buildApplicationOperatorEnvTargets({\n env: { locationType: WildoLocationType.REMOTE } as never,\n config: {} as never,\n saasRoot: '/repo/examples/wonder-todos',\n })).toEqual([]);\n });\n});\n\ndescribe('AppBootstrapService application env targets', () => {\n afterEach(() => {\n vi.restoreAllMocks();\n for (const dir of tempDirs.splice(0)) {\n rmSync(dir, { recursive: true, force: true });\n }\n });\n\n it('keeps companion targets separate from application backend env targets', async () => {\n const sandboxRoot = mkdtempSync(join(tmpdir(), 'wildo-cli-app-bootstrap-'));\n tempDirs.push(sandboxRoot);\n const appRoot = join(sandboxRoot, 'wonder-todos');\n const backendConfigDir = join(appRoot, 'services', 'backend-api', 'src', 'config');\n mkdirSync(join(appRoot, '.wildo-saas', 'wildo-dev-companion'), { recursive: true });\n mkdirSync(backendConfigDir, { recursive: true });\n writeFileSync(\n join(backendConfigDir, 'app-config.backend.ts'),\n \"export default { userTypes: { member: {} } };\\n\",\n 'utf8',\n );\n\n vi.spyOn(AppRuntimeTargetsService, 'resolve').mockResolvedValue({\n appSlug: 'wonder-todos',\n appDisplayName: 'Wonder Todos',\n appRoot,\n backendScopedProviderRefs: [],\n saasConfigPath: '/repo/examples/wonder-todos/wildo.saas.config.ts',\n appDatabaseName: 'wonder-todos',\n managedDeclaration: {\n app: {\n name: 'wonder-todos',\n slug: 'wonder-todos',\n displayName: 'Wonder Todos',\n description: 'A collaborative task management platform',\n type: 'saas',\n },\n frontendServices: [\n {\n serviceName: 'wonder-todos-app',\n frontendType: AppFrontendType.SAAS_APP,\n },\n ],\n engineCapabilities: {\n [EngineCapability.EMAIL_TRANSACTIONAL]: {\n enabled: true,\n },\n },\n minions: {},\n workers: {},\n providers: { scopes: {}, connections: {} },\n providerConfigurations: {},\n },\n firstAdminSeed: {\n userTypes: ['member'],\n },\n backendServices: [\n {\n key: 'backendApi',\n path: 'services/backend-api',\n serviceName: 'wonder-todos-api',\n defaultPort: 4241,\n isolation: BACKEND_ISOLATION_FIXTURE,\n },\n ],\n frontendServices: [\n {\n key: 'app',\n path: 'frontend',\n serviceName: 'wonder-todos-app',\n defaultPort: 4242,\n frontendType: AppFrontendType.SAAS_APP,\n isolation: FRONTEND_ISOLATION_FIXTURE,\n },\n ],\n localServiceAddresses: {\n devCompanion: {\n host: '0.0.0.0',\n port: 4341,\n url: 'http://localhost:4341',\n },\n },\n requiresJavaBackendBase: false,\n libraries: {},\n declaredModules: {},\n moduleIdsByService: {},\n moduleIds: [],\n });\n loadConfigJsonMock.mockReturnValue({\n runtimeEnvironment: RuntimeEnvironment.DEVELOPMENT,\n } as never);\n vi.spyOn(AppBootstrapService, 'ensureApplicationRegistered')\n // `undefined` = an apps-manager that reported no seeding outcome. These fixtures author no\n // migrations directory, so bootstrap stays single-phase and never reads the value.\n .mockResolvedValue(undefined);\n vi.spyOn(AppBootstrapService, 'fetchBootstrapCredentials').mockResolvedValue({\n success: true,\n appSlug: 'wonder-todos',\n environment: RuntimeEnvironment.DEVELOPMENT,\n credentials: {\n APPLICATION_ID: 'app-id',\n PLATFORM_APPLICATION_PRIMARY_SECRET: 'primary-secret',\n PLATFORM_APPS_MANAGER_URL: 'http://localhost:3001',\n APPLICATION_ENV: RuntimeEnvironment.DEVELOPMENT,\n },\n });\n\n const backendTargets = await AppBootstrapService.buildApplicationBackendTargets({\n env: {\n name: 'local',\n runtimeEnvironment: RuntimeEnvironment.DEVELOPMENT,\n } as never,\n credentials: {\n admin: {\n email: 'admin@example.com',\n firstName: 'Ada',\n lastName: 'Lovelace',\n password: 'password',\n },\n } as never,\n saasRoot: sandboxRoot,\n });\n\n expect(backendTargets).toContainEqual(\n expect.objectContaining({\n serviceName: 'wonder-todos-api',\n applicationRuntimeSignalsHome: join(sandboxRoot, 'wonder-todos', '.wildo-saas', 'runtime-signals'),\n runtimeEndpoints: expect.objectContaining({\n 'wonder-todos-api': {\n publicUrl: 'http://localhost:4241',\n internalUrl: 'http://localhost:4241',\n },\n 'wonder-todos-dev-companion': {\n publicUrl: 'http://localhost:4341',\n internalUrl: 'http://localhost:4341',\n },\n }),\n }),\n );\n\n expect(backendTargets).not.toContainEqual(\n expect.objectContaining({\n serviceName: 'wonder-todos-dev-companion',\n }),\n );\n\n const companionTargets = await AppBootstrapService.buildApplicationCompanionTargets({\n env: {\n name: 'local',\n runtimeEnvironment: RuntimeEnvironment.DEVELOPMENT,\n } as never,\n credentials: {\n admin: {\n email: 'admin@example.com',\n firstName: 'Ada',\n lastName: 'Lovelace',\n password: 'password',\n },\n } as never,\n saasRoot: sandboxRoot,\n });\n\n expect(companionTargets).toEqual([\n expect.objectContaining({\n serviceName: 'wonder-todos-dev-companion',\n relativeDir: expect.stringMatching(/\\.wildo-saas\\/wildo-dev-companion$/),\n runtimeEndpoints: {\n 'wonder-todos-api': {\n publicUrl: 'http://localhost:4241',\n internalUrl: 'http://localhost:4241',\n },\n 'wonder-todos-app': {\n publicUrl: 'http://localhost:4242',\n internalUrl: 'http://localhost:4242',\n },\n 'wonder-todos-dev-companion': {\n publicUrl: 'http://localhost:4341',\n internalUrl: 'http://localhost:4341',\n },\n main_backend_api: {\n publicUrl: 'http://localhost:4241',\n internalUrl: 'http://localhost:4241',\n },\n health_check_api: {\n publicUrl: 'http://localhost:4240',\n internalUrl: 'http://localhost:4240',\n },\n main_webhook_api: {\n publicUrl: 'http://localhost:4239',\n internalUrl: 'http://localhost:4239',\n },\n oauth2_provider_api: {\n publicUrl: 'http://localhost:4238',\n internalUrl: 'http://localhost:4238',\n },\n mcp_api: {\n publicUrl: 'http://localhost:4237',\n internalUrl: 'http://localhost:4237',\n },\n },\n extraEnv: {\n HOST: '0.0.0.0',\n PORT: '4341',\n },\n }),\n ]);\n\n const companionTarget = companionTargets[0];\n expect(companionTarget?.extraEnv).not.toHaveProperty('APP_SLUG');\n expect(companionTarget?.extraEnv).not.toHaveProperty('APP_NAME');\n expect(companionTarget?.extraEnv).not.toHaveProperty('LOG_LEVEL');\n expect(companionTarget?.extraEnv).not.toHaveProperty('WILDO_FORMATTED_CONSOLE_ERRORS');\n expect(AppBootstrapService.ensureApplicationRegistered).toHaveBeenCalledWith(\n expect.anything(),\n expect.anything(),\n expect.objectContaining({\n appSlug: 'wonder-todos',\n appDisplayName: 'Wonder Todos',\n firstAdminSeed: {\n userTypes: ['member'],\n },\n managedDeclaration: {\n app: {\n name: 'wonder-todos',\n slug: 'wonder-todos',\n displayName: 'Wonder Todos',\n description: 'A collaborative task management platform',\n type: 'saas',\n },\n frontendServices: [\n {\n serviceName: 'wonder-todos-app',\n frontendType: AppFrontendType.SAAS_APP,\n },\n ],\n engineCapabilities: {\n [EngineCapability.EMAIL_TRANSACTIONAL]: {\n enabled: true,\n },\n },\n minions: {},\n workers: {},\n providers: { scopes: {}, connections: {} },\n providerConfigurations: {},\n },\n }),\n );\n });\n\n it('carries the canonical app-root runtime-signals home through a nested minion target', async () => {\n const sandboxRoot = mkdtempSync(join(tmpdir(), 'wildo-cli-nested-minion-'));\n tempDirs.push(sandboxRoot);\n const appRoot = join(sandboxRoot, 'wonder-todos');\n const saasConfigPath = join(appRoot, 'wildo.saas.config.ts');\n const minionRoot = join(appRoot, 'services', 'minions', 'marketing-scrapper');\n mkdirSync(minionRoot, { recursive: true });\n writeFileSync(\n saasConfigPath,\n \"export default { minions: { marketingScrapper: { path: 'services/minions/marketing-scrapper' } } };\\n\",\n 'utf8',\n );\n writeFileSync(\n join(minionRoot, 'wildo.minion.config.ts'),\n \"export default { version: 1, name: 'marketing-scrapper', displayName: 'Marketing Scrapper', runtime: { type: 'docker', language: 'typescript' }, mode: 'always-up' };\\n\",\n 'utf8',\n );\n\n const targets = await AppBootstrapService.buildApplicationMinionTargets({\n env: { name: 'local', locationType: WildoLocationType.LOCAL } as never,\n credentials: {} as never,\n saasRoot: appRoot,\n prepared: {\n runtimeTarget: {\n appRoot,\n appSlug: 'wonder-todos',\n saasConfigPath,\n appDatabaseName: 'wonder-todos',\n },\n bootstrapCredentials: {} as never,\n runtimeEndpoints: {},\n // Each declared runtime's OWN identity (Step 1 / F11). Required rather\n // than optional on purpose: a hand-built `prepared` must state what each\n // runtime holds, because the alternative — an absent map falling back to\n // the application backend's credentials — is the exact collapse this\n // step removes, and it would pass silently.\n runtimePrincipalCredentials: {\n 'minion:marketingScrapper': { PLATFORM_APPLICATION_PRIMARY_SECRET: 'minion-own-secret' } as never,\n },\n } as never,\n });\n\n expect(targets).toEqual([\n expect.objectContaining({\n minionName: 'marketingScrapper',\n serviceName: 'marketing-scrapper',\n applicationRoot: appRoot,\n relativeDir: 'services/minions/marketing-scrapper',\n applicationRuntimeSignalsHome: join(appRoot, '.wildo-saas', 'runtime-signals'),\n }),\n ]);\n });\n\n it('builds worker .env targets from authored worker folders without requiring generated provider modules', async () => {\n const sandboxRoot = mkdtempSync(join(tmpdir(), 'wildo-cli-app-bootstrap-workers-'));\n tempDirs.push(sandboxRoot);\n const appRoot = join(sandboxRoot, 'wonder-todos');\n const backendConfigDir = join(appRoot, 'backend-api', 'src');\n const workerRoot = join(appRoot, 'workers', 'my-rust-worker');\n mkdirSync(backendConfigDir, { recursive: true });\n mkdirSync(workerRoot, { recursive: true });\n writeFileSync(\n join(backendConfigDir, 'saas-config.backend.ts'),\n \"export default { userTypes: { member: {} } };\\n\",\n 'utf8',\n );\n writeFileSync(\n join(appRoot, 'wildo.saas.config.ts'),\n [\n 'export default {',\n ' bootstrap: { firstAdmin: { userTypes: [\\'member\\'] } },',\n ' workers: {',\n \" rustWorker: { path: './workers/my-rust-worker' },\",\n ' },',\n '};',\n '',\n ].join('\\n'),\n 'utf8',\n );\n writeFileSync(\n join(workerRoot, 'wildo.worker.config.ts'),\n [\n // Complete, schema-valid worker config (name + displayName + runtime +\n // auth are all required by WildoWorkerConfigSchema; http/replicas\n // default). buildApplicationWorkerTargets parses through the schema.\n 'export default {',\n \" name: 'my-rust-worker',\",\n \" displayName: 'My Rust Worker',\",\n \" runtime: { type: 'docker', language: 'rust' },\",\n \" http: { port: 8080, healthPath: '/healthz', readyPath: '/readyz' },\",\n \" auth: 'wildo-jwt',\",\n '};',\n '',\n ].join('\\n'),\n 'utf8',\n );\n\n vi.spyOn(AppRuntimeTargetsService, 'resolve').mockResolvedValue({\n appSlug: 'wonder-todos',\n appDisplayName: 'Wonder Todos',\n appRoot,\n backendScopedProviderRefs: [],\n saasConfigPath: join(appRoot, 'wildo.saas.config.ts'),\n appDatabaseName: 'wonder-todos',\n managedDeclaration: {\n app: {\n name: 'wonder-todos',\n slug: 'wonder-todos',\n displayName: 'Wonder Todos',\n description: 'A collaborative task management platform',\n type: 'saas',\n },\n frontendServices: [],\n engineCapabilities: {},\n minions: {},\n // Must match the workers the sandbox `wildo.saas.config.ts` below\n // declares. In production these cannot diverge — the declaration is\n // BUILT from that config — and `prepare` mints one identity per declared\n // principal while the target builder iterates the config. A fixture that\n // disagreed would trip the fail-closed guard that refuses to hand a\n // worker the application backend's credentials.\n workers: { rustWorker: {} as never },\n providers: { scopes: {}, connections: {} },\n providerConfigurations: {},\n },\n firstAdminSeed: {\n userTypes: ['member'],\n },\n backendServices: [\n {\n key: 'backendApi',\n path: 'backend-api',\n serviceName: 'wonder-todos-api',\n defaultPort: 4241,\n isolation: BACKEND_ISOLATION_FIXTURE,\n },\n ],\n frontendServices: [],\n requiresJavaBackendBase: false,\n libraries: {},\n declaredModules: {},\n moduleIdsByService: {},\n moduleIds: [],\n });\n loadConfigJsonMock.mockReturnValue({\n runtimeEnvironment: RuntimeEnvironment.DEVELOPMENT,\n } as never);\n vi.spyOn(AppBootstrapService, 'ensureApplicationRegistered')\n // `undefined` = an apps-manager that reported no seeding outcome. These fixtures author no\n // migrations directory, so bootstrap stays single-phase and never reads the value.\n .mockResolvedValue(undefined);\n vi.spyOn(AppBootstrapService, 'fetchBootstrapCredentials').mockResolvedValue({\n success: true,\n appSlug: 'wonder-todos',\n environment: RuntimeEnvironment.DEVELOPMENT,\n credentials: {\n APPLICATION_ID: 'app-id',\n PLATFORM_APPLICATION_PRIMARY_SECRET: 'primary-secret',\n PLATFORM_APPS_MANAGER_URL: 'http://localhost:3001',\n APPLICATION_ENV: RuntimeEnvironment.DEVELOPMENT,\n },\n });\n\n const workerTargets = await AppBootstrapService.buildApplicationWorkerTargets({\n env: {\n name: 'local',\n runtimeEnvironment: RuntimeEnvironment.DEVELOPMENT,\n } as never,\n credentials: {\n admin: {\n email: 'admin@example.com',\n firstName: 'Ada',\n lastName: 'Lovelace',\n password: 'password',\n },\n } as never,\n saasRoot: appRoot,\n });\n\n expect(workerTargets).toEqual([\n expect.objectContaining({\n workerName: 'rustWorker',\n serviceName: 'my-rust-worker',\n applicationRoot: appRoot,\n relativeDir: 'workers/my-rust-worker',\n runtimeEndpoints: expect.objectContaining({\n 'wonder-todos-api': {\n publicUrl: 'http://localhost:4241',\n internalUrl: 'http://localhost:4241',\n },\n }),\n }),\n ]);\n });\n\n it('fails when bootstrap first-admin userTypes drift from backend config', async () => {\n const sandboxRoot = mkdtempSync(join(tmpdir(), 'wildo-cli-app-bootstrap-invalid-seed-'));\n tempDirs.push(sandboxRoot);\n const appRoot = join(sandboxRoot, 'wonder-todos');\n const backendConfigDir = join(appRoot, 'backend-api', 'src', 'config');\n mkdirSync(backendConfigDir, { recursive: true });\n writeFileSync(\n join(backendConfigDir, 'app-config.backend.ts'),\n \"export default { userTypes: { member: {} } };\\n\",\n 'utf8',\n );\n\n vi.spyOn(AppRuntimeTargetsService, 'resolve').mockResolvedValue({\n appSlug: 'wonder-todos',\n appDisplayName: 'Wonder Todos',\n appRoot,\n backendScopedProviderRefs: [],\n saasConfigPath: '/repo/examples/wonder-todos/wildo.saas.config.ts',\n appDatabaseName: 'wonder-todos',\n managedDeclaration: {\n app: {\n name: 'wonder-todos',\n slug: 'wonder-todos',\n displayName: 'Wonder Todos',\n description: 'A collaborative task management platform',\n type: 'saas',\n },\n frontendServices: [],\n engineCapabilities: {},\n minions: {},\n workers: {},\n providers: { scopes: {}, connections: {} },\n providerConfigurations: {},\n },\n firstAdminSeed: {\n userTypes: ['admin'],\n },\n backendServices: [\n {\n key: 'backendApi',\n path: 'backend-api',\n serviceName: 'wonder-todos-api',\n defaultPort: 4241,\n isolation: BACKEND_ISOLATION_FIXTURE,\n },\n ],\n frontendServices: [],\n requiresJavaBackendBase: false,\n libraries: {},\n declaredModules: {},\n moduleIdsByService: {},\n moduleIds: [],\n });\n loadConfigJsonMock.mockReturnValue({\n runtimeEnvironment: RuntimeEnvironment.DEVELOPMENT,\n } as never);\n\n await expect(\n AppBootstrapService.buildApplicationBackendTargets({\n env: {\n name: 'local',\n runtimeEnvironment: RuntimeEnvironment.DEVELOPMENT,\n } as never,\n credentials: {\n admin: {\n email: 'admin@example.com',\n firstName: 'Ada',\n lastName: 'Lovelace',\n password: 'password',\n },\n } as never,\n saasRoot: sandboxRoot,\n }),\n ).rejects.toThrow(/bootstrap\\.firstAdmin\\.userTypes/);\n });\n\n it('fails when bootstrap first-admin userTypes are missing', async () => {\n const sandboxRoot = mkdtempSync(join(tmpdir(), 'wildo-cli-app-bootstrap-missing-seed-'));\n tempDirs.push(sandboxRoot);\n const appRoot = join(sandboxRoot, 'wonder-todos');\n\n vi.spyOn(AppRuntimeTargetsService, 'resolve').mockResolvedValue({\n appSlug: 'wonder-todos',\n appDisplayName: 'Wonder Todos',\n appRoot,\n backendScopedProviderRefs: [],\n saasConfigPath: '/repo/examples/wonder-todos/wildo.saas.config.ts',\n appDatabaseName: 'wonder-todos',\n managedDeclaration: {\n app: {\n name: 'wonder-todos',\n slug: 'wonder-todos',\n displayName: 'Wonder Todos',\n description: 'A collaborative task management platform',\n type: 'saas',\n },\n frontendServices: [],\n engineCapabilities: {},\n minions: {},\n workers: {},\n providers: { scopes: {}, connections: {} },\n providerConfigurations: {},\n },\n backendServices: [\n {\n key: 'backendApi',\n path: 'backend-api',\n serviceName: 'wonder-todos-api',\n defaultPort: 4241,\n isolation: BACKEND_ISOLATION_FIXTURE,\n },\n ],\n frontendServices: [],\n requiresJavaBackendBase: false,\n libraries: {},\n declaredModules: {},\n moduleIdsByService: {},\n moduleIds: [],\n });\n loadConfigJsonMock.mockReturnValue({\n runtimeEnvironment: RuntimeEnvironment.DEVELOPMENT,\n } as never);\n\n await expect(\n AppBootstrapService.buildApplicationBackendTargets({\n env: {\n name: 'local',\n runtimeEnvironment: RuntimeEnvironment.DEVELOPMENT,\n } as never,\n credentials: {\n admin: {\n email: 'admin@example.com',\n firstName: 'Ada',\n lastName: 'Lovelace',\n password: 'password',\n },\n } as never,\n saasRoot: sandboxRoot,\n }),\n ).rejects.toThrow(/missing bootstrap\\.firstAdmin\\.userTypes/);\n });\n\n it('drops a CDN-served frontend from nginx deploy targets + ingress routes but keeps it in runtime endpoints', async () => {\n const sandboxRoot = mkdtempSync(join(tmpdir(), 'wildo-cli-app-bootstrap-cdn-'));\n tempDirs.push(sandboxRoot);\n const appRoot = join(sandboxRoot, 'wonder-todos');\n const backendConfigDir = join(appRoot, 'backend-api', 'src', 'config');\n mkdirSync(backendConfigDir, { recursive: true });\n writeFileSync(\n join(backendConfigDir, 'app-config.backend.ts'),\n 'export default { userTypes: { member: {} } };\\n',\n 'utf8',\n );\n // REMOTE builds worker dispatch URLs, which loads the saas config to read\n // `workers` — write a minimal one (no workers) so that path is a no-op.\n writeFileSync(\n join(appRoot, 'wildo.saas.config.ts'),\n 'export default { workers: {} };\\n',\n 'utf8',\n );\n\n vi.spyOn(AppRuntimeTargetsService, 'resolve').mockResolvedValue({\n appSlug: 'wonder-todos',\n appDisplayName: 'Wonder Todos',\n appRoot,\n backendScopedProviderRefs: [],\n saasConfigPath: join(appRoot, 'wildo.saas.config.ts'),\n appDatabaseName: 'wonder-todos',\n managedDeclaration: {\n app: {\n name: 'wonder-todos',\n slug: 'wonder-todos',\n displayName: 'Wonder Todos',\n description: 'A collaborative task management platform',\n type: 'saas',\n },\n frontendServices: [\n { serviceName: 'wonder-todos-app', frontendType: AppFrontendType.SAAS_APP },\n { serviceName: 'wonder-todos-website', frontendType: AppFrontendType.STATIC_WEBSITE },\n { serviceName: 'wonder-todos-docs', frontendType: AppFrontendType.TECH_DOC },\n ],\n engineCapabilities: {},\n minions: {},\n workers: {},\n providers: { scopes: {}, connections: {} },\n providerConfigurations: {},\n },\n firstAdminSeed: { userTypes: ['member'] },\n backendServices: [\n { key: 'backendApi', path: 'backend-api', serviceName: 'wonder-todos-api', defaultPort: 4241, isolation: BACKEND_ISOLATION_FIXTURE },\n ],\n frontendServices: [\n { key: 'app', path: 'frontend', serviceName: 'wonder-todos-app', defaultPort: 4242, frontendType: AppFrontendType.SAAS_APP, isolation: FRONTEND_ISOLATION_FIXTURE },\n { key: 'website', path: 'website', serviceName: 'wonder-todos-website', defaultPort: 4243, frontendType: AppFrontendType.STATIC_WEBSITE, isolation: FRONTEND_ISOLATION_FIXTURE },\n { key: 'docs', path: 'technical-doc', serviceName: 'wonder-todos-docs', defaultPort: 4244, frontendType: AppFrontendType.TECH_DOC, isolation: FRONTEND_ISOLATION_FIXTURE },\n ],\n requiresJavaBackendBase: false,\n libraries: {},\n declaredModules: {},\n moduleIdsByService: {},\n moduleIds: [],\n } as never);\n loadConfigJsonMock.mockReturnValue({\n runtimeEnvironment: RuntimeEnvironment.PRODUCTION,\n } as never);\n vi.spyOn(AppBootstrapService, 'ensureApplicationRegistered')\n // `undefined` = an apps-manager that reported no seeding outcome. These fixtures author no\n // migrations directory, so bootstrap stays single-phase and never reads the value.\n .mockResolvedValue(undefined);\n vi.spyOn(AppBootstrapService, 'fetchBootstrapCredentials').mockResolvedValue({\n success: true,\n appSlug: 'wonder-todos',\n environment: RuntimeEnvironment.PRODUCTION,\n credentials: {\n APPLICATION_ID: 'app-id',\n PLATFORM_APPLICATION_PRIMARY_SECRET: 'primary-secret',\n PLATFORM_APPS_MANAGER_URL: 'http://localhost:3001',\n APPLICATION_ENV: RuntimeEnvironment.PRODUCTION,\n },\n } as never);\n\n const [backendTarget] = await AppBootstrapService.buildApplicationBackendTargets({\n env: {\n name: 'production',\n runtimeEnvironment: RuntimeEnvironment.PRODUCTION,\n locationType: WildoLocationType.REMOTE,\n runtime: WildoDeploymentRuntime.KUBERNETES,\n publicDomain: 'acme.com',\n serviceHosts: { app: 'app', website: '', docs: 'docs' },\n // Only the website opts into the CDN.\n cdn: { website: { enabled: true, vendor: { kind: CdnVendor.GENERIC } } },\n kubernetes: { namespace: 'wonder-todos' },\n } as never,\n credentials: {\n admin: { email: 'admin@example.com', firstName: 'Ada', lastName: 'Lovelace', password: 'password' },\n } as never,\n saasRoot: sandboxRoot,\n });\n\n // (1) The CDN'd website gets NO nginx Deployment/Service target; app + docs do.\n // Each surviving target carries its resolved container isolation — the\n // pod that WILL exist has to be hardened, and the CDN'd one has no pod at\n // all, so dropping it here is what makes the isolation list exactly the\n // set of containers the cluster runs.\n expect(backendTarget?.frontends).toEqual([\n {\n serviceName: 'wonder-todos-app',\n port: 4242,\n isolation: {\n runAsUser: FRONTEND_ISOLATION_FIXTURE.runAsUser,\n runAsGroup: FRONTEND_ISOLATION_FIXTURE.runAsGroup,\n writablePaths: [...FRONTEND_ISOLATION_FIXTURE.writablePaths],\n },\n },\n {\n serviceName: 'wonder-todos-docs',\n port: 4244,\n isolation: {\n runAsUser: FRONTEND_ISOLATION_FIXTURE.runAsUser,\n runAsGroup: FRONTEND_ISOLATION_FIXTURE.runAsGroup,\n writablePaths: [...FRONTEND_ISOLATION_FIXTURE.writablePaths],\n },\n },\n ]);\n\n // (2) The CDN'd website host (apex `acme.com`) gets NO ingress route; app,\n // docs, and the api are still routed on-cluster.\n const ingressHosts = (backendTarget?.ingressRoutes ?? []).map((route) => route.host);\n expect(ingressHosts).toContain('app.acme.com');\n expect(ingressHosts).toContain('docs.acme.com');\n expect(ingressHosts).toContain('backendapi.acme.com');\n expect(ingressHosts).not.toContain('acme.com');\n\n // (3) But the website STAYS advertised in runtime.endPoints (publicUrl\n // preserved — the browser gets `https://acme.com`, it just resolves to\n // the CDN). This is the advertised-but-not-ingress-routed asymmetry.\n expect(backendTarget?.runtimeEndpoints['wonder-todos-website']?.publicUrl).toBe('https://acme.com');\n });\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"app-bootstrap.two-phase-seeding.test.d.ts","sourceRoot":"","sources":["../../../../../../../src/services/application/__tests__/app-bootstrap.two-phase-seeding.test.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"app-bootstrap.two-phase-seeding.test.d.ts","sourceRoot":"","sources":["../../../../../src/services/application/__tests__/app-bootstrap.two-phase-seeding.test.ts"],"names":[],"mappings":""}
@@ -70,7 +70,7 @@ function mockRuntimeTarget(appRoot) {
70
70
  engineCapabilities: {},
71
71
  minions: {},
72
72
  workers: {},
73
- providers: { scopes: {} },
73
+ providers: { scopes: {}, connections: {} },
74
74
  providerConfigurations: {},
75
75
  },
76
76
  firstAdminSeed: { userTypes: ['member'] },
@@ -1 +1 @@
1
- {"version":3,"file":"app-bootstrap.two-phase-seeding.test.js","sourceRoot":"","sources":["../../../../../../../src/services/application/__tests__/app-bootstrap.two-phase-seeding.test.ts"],"names":[],"mappings":"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;aACzD,iBAAiB,CAAC,yBAAyB,CAAC,qBAAqB,CAAC,CAAC;QAEtE,MAAM,mBAAmB,CAAC,4BAA4B,CAAC,aAAsB,CAAC,CAAC;QAE/E,MAAM,CAAC,4BAA4B,CAAC,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAC;IAC9D,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from 'fs';\nimport { join } from 'path';\nimport { tmpdir } from 'os';\nimport { describe, expect, it, vi, afterEach } from 'vitest';\nimport { AppFrontendType, AppDatabaseSeedingOutcome, AppDatabaseSeedingPhase, DatabaseEngine } from '@wildo-ai/platform-config-lib';\nimport { RuntimeEnvironment } from '@wildo-ai/saas-models';\n\n/**\n * Provisioning an application whose own resources persist to PostgreSQL.\n *\n * ## The cycle\n *\n * apps-manager seeds the application's own database during provisioning. Those rows need tables;\n * the tables come from the application's `migrations/`; those migrations are applied by the\n * application backend at boot; and the backend refuses to boot unseeded, because its\n * execution-context creator requires exactly one APPLICATION row.\n *\n * Nothing INSIDE the cycle can break it — apps-manager cannot read the application's migration\n * files, and the backend does not hold the authored first-admin seed. Only the tooling holds both.\n *\n * Observed 2026-08-23 on the first PostgreSQL install: provisioning aborted with\n * `relation \"applications\" does not exist` and `wildo local dev` failed. The same order holds on\n * every lane, so per-application PostgreSQL provisioning had never completed anywhere.\n *\n * ## What these pin\n *\n * ORDER, and the fail-closed. A test that merely counted the calls would pass against an\n * implementation that migrated AFTER seeding — which is the defect, spelled differently.\n */\nconst { loadConfigJsonMock, applyAppSchemaMigrationsMock, resolveAppMigrationsDirectoryMock } = vi.hoisted(() => ({\n loadConfigJsonMock: vi.fn(),\n applyAppSchemaMigrationsMock: vi.fn(),\n resolveAppMigrationsDirectoryMock: vi.fn(),\n}));\n\nvi.mock('~wildo-cli/services/environment/environment.service', () => ({\n EnvironmentUtils: {\n loadConfigJson: loadConfigJsonMock,\n saveApplicationRuntimeIdentity: vi.fn(),\n getCurrentName: () => 'local',\n },\n}));\n\nvi.mock('../app-schema-bootstrap.service', () => ({\n applyAppSchemaMigrations: applyAppSchemaMigrationsMock,\n resolveAppMigrationsDirectory: resolveAppMigrationsDirectoryMock,\n}));\n\nimport { AppBootstrapService } from '../app-bootstrap.service';\nimport { AppRuntimeTargetsService } from '../app-runtime-targets.service';\n\nconst tempDirs: string[] = [];\n\n/** Every call the orchestration makes, in the order it made them. Order IS the assertion. */\nlet timeline: string[] = [];\n\nfunction buildSandbox(): string {\n const sandboxRoot = mkdtempSync(join(tmpdir(), 'wildo-cli-two-phase-'));\n tempDirs.push(sandboxRoot);\n const appRoot = join(sandboxRoot, 'wonder-todos');\n const backendConfigDir = join(appRoot, 'services', 'backend-api', 'src', 'config');\n mkdirSync(backendConfigDir, { recursive: true });\n writeFileSync(join(backendConfigDir, 'app-config.backend.ts'), 'export default { userTypes: { member: {} } };\\n', 'utf8');\n return appRoot;\n}\n\nfunction mockRuntimeTarget(appRoot: string): void {\n vi.spyOn(AppRuntimeTargetsService, 'resolve').mockResolvedValue({\n appSlug: 'wonder-todos',\n appDisplayName: 'Wonder Todos',\n appRoot,\n backendScopedProviderRefs: [],\n saasConfigPath: join(appRoot, 'wildo.saas.config.ts'),\n appDatabaseName: 'wonder-todos',\n managedDeclaration: {\n app: { name: 'wonder-todos', slug: 'wonder-todos', displayName: 'Wonder Todos', type: 'saas' },\n frontendServices: [],\n engineCapabilities: {},\n minions: {},\n workers: {},\n providers: { scopes: {} },\n providerConfigurations: {},\n },\n firstAdminSeed: { userTypes: ['member'] },\n backendServices: [{\n key: 'backendApi',\n path: 'services/backend-api',\n serviceName: 'wonder-todos-api',\n defaultPort: 4241,\n isolation: { runAsUser: 1000, runAsGroup: 1000, writablePaths: [], pidsLimit: 100 },\n }],\n frontendServices: [],\n localServiceAddresses: { devCompanion: { host: '0.0.0.0', port: 4341, url: 'http://localhost:4341' } },\n requiresJavaBackendBase: false,\n libraries: {},\n declaredModules: {},\n moduleIdsByService: {},\n moduleIds: [],\n } as never);\n\n loadConfigJsonMock.mockReturnValue({\n runtimeEnvironment: RuntimeEnvironment.DEVELOPMENT,\n applicationDatabase: { engine: DatabaseEngine.POSTGRESQL },\n backingServices: { postgresql: { database: 'wonder-todos-db' } },\n } as never);\n\n vi.spyOn(AppBootstrapService, 'fetchBootstrapCredentials').mockImplementation(async () => {\n timeline.push('fetch-credentials');\n return {\n success: true,\n appSlug: 'wonder-todos',\n environment: RuntimeEnvironment.DEVELOPMENT,\n credentials: {\n APPLICATION_ID: 'app-id',\n PLATFORM_APPLICATION_PRIMARY_SECRET: 'primary-secret',\n PLATFORM_APPS_MANAGER_URL: 'http://localhost:3001',\n APPLICATION_ENV: RuntimeEnvironment.DEVELOPMENT,\n },\n } as never;\n });\n\n /**\n * PRIVATE, so it is reached through a structural cast rather than the class type. It performs a\n * network fetch that has nothing to do with the seeding phase under test, and leaving it live\n * would make these pins depend on apps-manager being up.\n *\n * The cast is deliberately narrow — it names the one member being stubbed, so it cannot silently\n * keep compiling if that member is renamed or its arity changes.\n */\n vi.spyOn(\n AppBootstrapService as unknown as { fetchDeclaredRuntimePrincipalCredentials: (...args: never[]) => Promise<unknown> },\n 'fetchDeclaredRuntimePrincipalCredentials',\n ).mockResolvedValue(undefined);\n}\n\nconst PREPARE_INPUT = {\n env: { name: 'local', runtimeEnvironment: RuntimeEnvironment.DEVELOPMENT } as never,\n credentials: {\n admin: { email: 'admin@example.com', firstName: 'Ada', lastName: 'Lovelace', password: 'pw' },\n } as never,\n};\n\ndescribe('AppBootstrapService.prepareApplicationEnvTargets — provisioning ↔ schema cycle', () => {\n afterEach(() => {\n vi.restoreAllMocks();\n loadConfigJsonMock.mockReset();\n applyAppSchemaMigrationsMock.mockReset();\n resolveAppMigrationsDirectoryMock.mockReset();\n timeline = [];\n for (const dir of tempDirs.splice(0)) rmSync(dir, { recursive: true, force: true });\n });\n\n it('DEFERS the seed, applies the schema, then seeds — in that order', async () => {\n const appRoot = buildSandbox();\n mockRuntimeTarget(appRoot);\n resolveAppMigrationsDirectoryMock.mockReturnValue(join(appRoot, 'backend-api', 'migrations'));\n applyAppSchemaMigrationsMock.mockImplementation(async () => {\n timeline.push('apply-migrations');\n return { outcome: 'APPLIED', appliedCount: 2, verifiedCount: 0 };\n });\n vi.spyOn(AppBootstrapService, 'ensureApplicationRegistered').mockImplementation(async (_env, _creds, input) => {\n timeline.push(`register:${input.appDatabaseSeeding}`);\n return input.appDatabaseSeeding === AppDatabaseSeedingPhase.DEFERRED\n ? AppDatabaseSeedingOutcome.DEFERRED\n : AppDatabaseSeedingOutcome.SEEDED;\n });\n\n await AppBootstrapService.prepareApplicationEnvTargets(PREPARE_INPUT as never);\n\n /**\n * The exact sequence, not a set. Migrating after the seed would satisfy any count-based or\n * membership-based assertion while reproducing the original deadlock precisely.\n */\n expect(timeline.slice(0, 3)).toEqual([\n `register:${AppDatabaseSeedingPhase.DEFERRED}`,\n 'apply-migrations',\n `register:${AppDatabaseSeedingPhase.REQUIRED}`,\n ]);\n });\n\n /**\n * The case the FIRST revision of this feature got wrong, and the reason the whole MongoDB control\n * run failed on 2026-08-23.\n *\n * The trigger keyed solely on the migrations directory. That directory is COMMITTED, so it survives\n * a flip back to MongoDB — two-phase provisioning engaged on a MongoDB application, deferred the\n * seed, then tried to migrate a PostgreSQL database that a MongoDB install never creates.\n * `wildo local dev` aborted during application bootstrap, leaving the application deliberately\n * unseeded: strictly worse than the deadlock the feature exists to break, and on the engine that\n * never had that deadlock.\n *\n * The engine declaration is what decides whether a PostgreSQL schema is needed at all. Pinned with\n * the directory PRESENT, because a fixture without it would pass against the defect.\n */\n it('stays SINGLE-phase for a MongoDB application that still HAS a migrations directory', async () => {\n const appRoot = buildSandbox();\n mockRuntimeTarget(appRoot);\n // MongoDB application …\n loadConfigJsonMock.mockReturnValue({\n runtimeEnvironment: RuntimeEnvironment.DEVELOPMENT,\n applicationDatabase: { engine: DatabaseEngine.MONGODB },\n backingServices: { postgresql: { database: 'wonder-todos-db' } },\n } as never);\n // … whose PostgreSQL-era migrations directory is still on disk.\n resolveAppMigrationsDirectoryMock.mockReturnValue(join(appRoot, 'backend-api', 'migrations'));\n vi.spyOn(AppBootstrapService, 'ensureApplicationRegistered').mockImplementation(async (_env, _creds, input) => {\n timeline.push(`register:${input.appDatabaseSeeding}`);\n return AppDatabaseSeedingOutcome.SEEDED;\n });\n\n await AppBootstrapService.prepareApplicationEnvTargets(PREPARE_INPUT as never);\n\n expect(timeline.filter((entry) => entry.startsWith('register:'))).toEqual([\n `register:${AppDatabaseSeedingPhase.REQUIRED}`,\n ]);\n expect(applyAppSchemaMigrationsMock).not.toHaveBeenCalled();\n });\n\n it('stays SINGLE-phase when the application authors no migrations — MongoDB is untouched', async () => {\n const appRoot = buildSandbox();\n mockRuntimeTarget(appRoot);\n resolveAppMigrationsDirectoryMock.mockReturnValue(undefined);\n vi.spyOn(AppBootstrapService, 'ensureApplicationRegistered').mockImplementation(async (_env, _creds, input) => {\n timeline.push(`register:${input.appDatabaseSeeding}`);\n return AppDatabaseSeedingOutcome.SEEDED;\n });\n\n await AppBootstrapService.prepareApplicationEnvTargets(PREPARE_INPUT as never);\n\n expect(timeline.filter((entry) => entry.startsWith('register:'))).toEqual([\n `register:${AppDatabaseSeedingPhase.REQUIRED}`,\n ]);\n expect(applyAppSchemaMigrationsMock).not.toHaveBeenCalled();\n });\n\n it('FAILS when the application is still unseeded after its schema was applied', async () => {\n const appRoot = buildSandbox();\n mockRuntimeTarget(appRoot);\n resolveAppMigrationsDirectoryMock.mockReturnValue(join(appRoot, 'backend-api', 'migrations'));\n applyAppSchemaMigrationsMock.mockResolvedValue({ outcome: 'APPLIED', appliedCount: 1, verifiedCount: 0 });\n // The provisioner honoured the phase but never completed the seed. Continuing here would report\n // an application as ready that cannot boot — its backend requires exactly one APPLICATION row.\n vi.spyOn(AppBootstrapService, 'ensureApplicationRegistered').mockResolvedValue(AppDatabaseSeedingOutcome.DEFERRED);\n\n await expect(AppBootstrapService.prepareApplicationEnvTargets(PREPARE_INPUT as never))\n .rejects.toThrow(/was not seeded after its schema was applied/);\n });\n\n it('does NOT migrate when the application has no resolved persistence target', async () => {\n const appRoot = buildSandbox();\n mockRuntimeTarget(appRoot);\n resolveAppMigrationsDirectoryMock.mockReturnValue(join(appRoot, 'backend-api', 'migrations'));\n /**\n * apps-manager could not resolve where this application's rows go, and has already said so.\n * Migrating would fail on a database that was never provisioned, replacing an accurate diagnosis\n * with a connectivity error.\n */\n vi.spyOn(AppBootstrapService, 'ensureApplicationRegistered')\n .mockResolvedValue(AppDatabaseSeedingOutcome.NO_PERSISTENCE_TARGET);\n\n await AppBootstrapService.prepareApplicationEnvTargets(PREPARE_INPUT as never);\n\n expect(applyAppSchemaMigrationsMock).not.toHaveBeenCalled();\n });\n});\n"]}
1
+ {"version":3,"file":"app-bootstrap.two-phase-seeding.test.js","sourceRoot":"","sources":["../../../../../src/services/application/__tests__/app-bootstrap.two-phase-seeding.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AACnE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC;AAC5B,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAC7D,OAAO,EAAmB,yBAAyB,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AACpI,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,EAAE,kBAAkB,EAAE,4BAA4B,EAAE,iCAAiC,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;IAChH,kBAAkB,EAAE,EAAE,CAAC,EAA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YAAY,EAAE,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,CAAC,CAAC;QAC1G,gGAAgG;QAChG,+FAA+F;QAC/F,EAAE,CAAC,KAAK,CAAC,mBAAmB,EAAE,6BAA6B,CAAC,CAAC,iBAAiB,CAAC,yBAAyB,CAAC,QAAQ,CAAC,CAAC;QAEnH,MAAM,MAAM,CAAC,mBAAmB,CAAC,4BAA4B,CAAC,aAAsB,CAAC,CAAC;aACnF,OAAO,CAAC,OAAO,CAAC,6CAA6C,CAAC,CAAC;IACpE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,0EAA0E,EAAE,KAAK,IAAI,EAAE;QACxF,MAAM,OAAO,GAAG,YAAY,EAAE,CAAC;QAC/B,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC3B,iCAAiC,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,EAAE,aAAa,EAAE,YAAY,CAAC,CAAC,CAAC;QAC9F;;;;WAIG;QACH,EAAE,CAAC,KAAK,CAAC,mBAAmB,EAAE,6BAA6B,CAAC;aACzD,iBAAiB,CAAC,yBAAyB,CAAC,qBAAqB,CAAC,CAAC;QAEtE,MAAM,mBAAmB,CAAC,4BAA4B,CAAC,aAAsB,CAAC,CAAC;QAE/E,MAAM,CAAC,4BAA4B,CAAC,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAC;IAC9D,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from 'fs';\nimport { join } from 'path';\nimport { tmpdir } from 'os';\nimport { describe, expect, it, vi, afterEach } from 'vitest';\nimport { AppFrontendType, AppDatabaseSeedingOutcome, AppDatabaseSeedingPhase, DatabaseEngine } from '@wildo-ai/platform-config-lib';\nimport { RuntimeEnvironment } from '@wildo-ai/saas-models';\n\n/**\n * Provisioning an application whose own resources persist to PostgreSQL.\n *\n * ## The cycle\n *\n * apps-manager seeds the application's own database during provisioning. Those rows need tables;\n * the tables come from the application's `migrations/`; those migrations are applied by the\n * application backend at boot; and the backend refuses to boot unseeded, because its\n * execution-context creator requires exactly one APPLICATION row.\n *\n * Nothing INSIDE the cycle can break it — apps-manager cannot read the application's migration\n * files, and the backend does not hold the authored first-admin seed. Only the tooling holds both.\n *\n * Observed 2026-08-23 on the first PostgreSQL install: provisioning aborted with\n * `relation \"applications\" does not exist` and `wildo local dev` failed. The same order holds on\n * every lane, so per-application PostgreSQL provisioning had never completed anywhere.\n *\n * ## What these pin\n *\n * ORDER, and the fail-closed. A test that merely counted the calls would pass against an\n * implementation that migrated AFTER seeding — which is the defect, spelled differently.\n */\nconst { loadConfigJsonMock, applyAppSchemaMigrationsMock, resolveAppMigrationsDirectoryMock } = vi.hoisted(() => ({\n loadConfigJsonMock: vi.fn(),\n applyAppSchemaMigrationsMock: vi.fn(),\n resolveAppMigrationsDirectoryMock: vi.fn(),\n}));\n\nvi.mock('~wildo-cli/services/environment/environment.service', () => ({\n EnvironmentUtils: {\n loadConfigJson: loadConfigJsonMock,\n saveApplicationRuntimeIdentity: vi.fn(),\n getCurrentName: () => 'local',\n },\n}));\n\nvi.mock('../app-schema-bootstrap.service', () => ({\n applyAppSchemaMigrations: applyAppSchemaMigrationsMock,\n resolveAppMigrationsDirectory: resolveAppMigrationsDirectoryMock,\n}));\n\nimport { AppBootstrapService } from '../app-bootstrap.service';\nimport { AppRuntimeTargetsService } from '../app-runtime-targets.service';\n\nconst tempDirs: string[] = [];\n\n/** Every call the orchestration makes, in the order it made them. Order IS the assertion. */\nlet timeline: string[] = [];\n\nfunction buildSandbox(): string {\n const sandboxRoot = mkdtempSync(join(tmpdir(), 'wildo-cli-two-phase-'));\n tempDirs.push(sandboxRoot);\n const appRoot = join(sandboxRoot, 'wonder-todos');\n const backendConfigDir = join(appRoot, 'services', 'backend-api', 'src', 'config');\n mkdirSync(backendConfigDir, { recursive: true });\n writeFileSync(join(backendConfigDir, 'app-config.backend.ts'), 'export default { userTypes: { member: {} } };\\n', 'utf8');\n return appRoot;\n}\n\nfunction mockRuntimeTarget(appRoot: string): void {\n vi.spyOn(AppRuntimeTargetsService, 'resolve').mockResolvedValue({\n appSlug: 'wonder-todos',\n appDisplayName: 'Wonder Todos',\n appRoot,\n backendScopedProviderRefs: [],\n saasConfigPath: join(appRoot, 'wildo.saas.config.ts'),\n appDatabaseName: 'wonder-todos',\n managedDeclaration: {\n app: { name: 'wonder-todos', slug: 'wonder-todos', displayName: 'Wonder Todos', type: 'saas' },\n frontendServices: [],\n engineCapabilities: {},\n minions: {},\n workers: {},\n providers: { scopes: {}, connections: {} },\n providerConfigurations: {},\n },\n firstAdminSeed: { userTypes: ['member'] },\n backendServices: [{\n key: 'backendApi',\n path: 'services/backend-api',\n serviceName: 'wonder-todos-api',\n defaultPort: 4241,\n isolation: { runAsUser: 1000, runAsGroup: 1000, writablePaths: [], pidsLimit: 100 },\n }],\n frontendServices: [],\n localServiceAddresses: { devCompanion: { host: '0.0.0.0', port: 4341, url: 'http://localhost:4341' } },\n requiresJavaBackendBase: false,\n libraries: {},\n declaredModules: {},\n moduleIdsByService: {},\n moduleIds: [],\n } as never);\n\n loadConfigJsonMock.mockReturnValue({\n runtimeEnvironment: RuntimeEnvironment.DEVELOPMENT,\n applicationDatabase: { engine: DatabaseEngine.POSTGRESQL },\n backingServices: { postgresql: { database: 'wonder-todos-db' } },\n } as never);\n\n vi.spyOn(AppBootstrapService, 'fetchBootstrapCredentials').mockImplementation(async () => {\n timeline.push('fetch-credentials');\n return {\n success: true,\n appSlug: 'wonder-todos',\n environment: RuntimeEnvironment.DEVELOPMENT,\n credentials: {\n APPLICATION_ID: 'app-id',\n PLATFORM_APPLICATION_PRIMARY_SECRET: 'primary-secret',\n PLATFORM_APPS_MANAGER_URL: 'http://localhost:3001',\n APPLICATION_ENV: RuntimeEnvironment.DEVELOPMENT,\n },\n } as never;\n });\n\n /**\n * PRIVATE, so it is reached through a structural cast rather than the class type. It performs a\n * network fetch that has nothing to do with the seeding phase under test, and leaving it live\n * would make these pins depend on apps-manager being up.\n *\n * The cast is deliberately narrow — it names the one member being stubbed, so it cannot silently\n * keep compiling if that member is renamed or its arity changes.\n */\n vi.spyOn(\n AppBootstrapService as unknown as { fetchDeclaredRuntimePrincipalCredentials: (...args: never[]) => Promise<unknown> },\n 'fetchDeclaredRuntimePrincipalCredentials',\n ).mockResolvedValue(undefined);\n}\n\nconst PREPARE_INPUT = {\n env: { name: 'local', runtimeEnvironment: RuntimeEnvironment.DEVELOPMENT } as never,\n credentials: {\n admin: { email: 'admin@example.com', firstName: 'Ada', lastName: 'Lovelace', password: 'pw' },\n } as never,\n};\n\ndescribe('AppBootstrapService.prepareApplicationEnvTargets — provisioning ↔ schema cycle', () => {\n afterEach(() => {\n vi.restoreAllMocks();\n loadConfigJsonMock.mockReset();\n applyAppSchemaMigrationsMock.mockReset();\n resolveAppMigrationsDirectoryMock.mockReset();\n timeline = [];\n for (const dir of tempDirs.splice(0)) rmSync(dir, { recursive: true, force: true });\n });\n\n it('DEFERS the seed, applies the schema, then seeds — in that order', async () => {\n const appRoot = buildSandbox();\n mockRuntimeTarget(appRoot);\n resolveAppMigrationsDirectoryMock.mockReturnValue(join(appRoot, 'backend-api', 'migrations'));\n applyAppSchemaMigrationsMock.mockImplementation(async () => {\n timeline.push('apply-migrations');\n return { outcome: 'APPLIED', appliedCount: 2, verifiedCount: 0 };\n });\n vi.spyOn(AppBootstrapService, 'ensureApplicationRegistered').mockImplementation(async (_env, _creds, input) => {\n timeline.push(`register:${input.appDatabaseSeeding}`);\n return input.appDatabaseSeeding === AppDatabaseSeedingPhase.DEFERRED\n ? AppDatabaseSeedingOutcome.DEFERRED\n : AppDatabaseSeedingOutcome.SEEDED;\n });\n\n await AppBootstrapService.prepareApplicationEnvTargets(PREPARE_INPUT as never);\n\n /**\n * The exact sequence, not a set. Migrating after the seed would satisfy any count-based or\n * membership-based assertion while reproducing the original deadlock precisely.\n */\n expect(timeline.slice(0, 3)).toEqual([\n `register:${AppDatabaseSeedingPhase.DEFERRED}`,\n 'apply-migrations',\n `register:${AppDatabaseSeedingPhase.REQUIRED}`,\n ]);\n });\n\n /**\n * The case the FIRST revision of this feature got wrong, and the reason the whole MongoDB control\n * run failed on 2026-08-23.\n *\n * The trigger keyed solely on the migrations directory. That directory is COMMITTED, so it survives\n * a flip back to MongoDB — two-phase provisioning engaged on a MongoDB application, deferred the\n * seed, then tried to migrate a PostgreSQL database that a MongoDB install never creates.\n * `wildo local dev` aborted during application bootstrap, leaving the application deliberately\n * unseeded: strictly worse than the deadlock the feature exists to break, and on the engine that\n * never had that deadlock.\n *\n * The engine declaration is what decides whether a PostgreSQL schema is needed at all. Pinned with\n * the directory PRESENT, because a fixture without it would pass against the defect.\n */\n it('stays SINGLE-phase for a MongoDB application that still HAS a migrations directory', async () => {\n const appRoot = buildSandbox();\n mockRuntimeTarget(appRoot);\n // MongoDB application …\n loadConfigJsonMock.mockReturnValue({\n runtimeEnvironment: RuntimeEnvironment.DEVELOPMENT,\n applicationDatabase: { engine: DatabaseEngine.MONGODB },\n backingServices: { postgresql: { database: 'wonder-todos-db' } },\n } as never);\n // … whose PostgreSQL-era migrations directory is still on disk.\n resolveAppMigrationsDirectoryMock.mockReturnValue(join(appRoot, 'backend-api', 'migrations'));\n vi.spyOn(AppBootstrapService, 'ensureApplicationRegistered').mockImplementation(async (_env, _creds, input) => {\n timeline.push(`register:${input.appDatabaseSeeding}`);\n return AppDatabaseSeedingOutcome.SEEDED;\n });\n\n await AppBootstrapService.prepareApplicationEnvTargets(PREPARE_INPUT as never);\n\n expect(timeline.filter((entry) => entry.startsWith('register:'))).toEqual([\n `register:${AppDatabaseSeedingPhase.REQUIRED}`,\n ]);\n expect(applyAppSchemaMigrationsMock).not.toHaveBeenCalled();\n });\n\n it('stays SINGLE-phase when the application authors no migrations — MongoDB is untouched', async () => {\n const appRoot = buildSandbox();\n mockRuntimeTarget(appRoot);\n resolveAppMigrationsDirectoryMock.mockReturnValue(undefined);\n vi.spyOn(AppBootstrapService, 'ensureApplicationRegistered').mockImplementation(async (_env, _creds, input) => {\n timeline.push(`register:${input.appDatabaseSeeding}`);\n return AppDatabaseSeedingOutcome.SEEDED;\n });\n\n await AppBootstrapService.prepareApplicationEnvTargets(PREPARE_INPUT as never);\n\n expect(timeline.filter((entry) => entry.startsWith('register:'))).toEqual([\n `register:${AppDatabaseSeedingPhase.REQUIRED}`,\n ]);\n expect(applyAppSchemaMigrationsMock).not.toHaveBeenCalled();\n });\n\n it('FAILS when the application is still unseeded after its schema was applied', async () => {\n const appRoot = buildSandbox();\n mockRuntimeTarget(appRoot);\n resolveAppMigrationsDirectoryMock.mockReturnValue(join(appRoot, 'backend-api', 'migrations'));\n applyAppSchemaMigrationsMock.mockResolvedValue({ outcome: 'APPLIED', appliedCount: 1, verifiedCount: 0 });\n // The provisioner honoured the phase but never completed the seed. Continuing here would report\n // an application as ready that cannot boot — its backend requires exactly one APPLICATION row.\n vi.spyOn(AppBootstrapService, 'ensureApplicationRegistered').mockResolvedValue(AppDatabaseSeedingOutcome.DEFERRED);\n\n await expect(AppBootstrapService.prepareApplicationEnvTargets(PREPARE_INPUT as never))\n .rejects.toThrow(/was not seeded after its schema was applied/);\n });\n\n it('does NOT migrate when the application has no resolved persistence target', async () => {\n const appRoot = buildSandbox();\n mockRuntimeTarget(appRoot);\n resolveAppMigrationsDirectoryMock.mockReturnValue(join(appRoot, 'backend-api', 'migrations'));\n /**\n * apps-manager could not resolve where this application's rows go, and has already said so.\n * Migrating would fail on a database that was never provisioned, replacing an accurate diagnosis\n * with a connectivity error.\n */\n vi.spyOn(AppBootstrapService, 'ensureApplicationRegistered')\n .mockResolvedValue(AppDatabaseSeedingOutcome.NO_PERSISTENCE_TARGET);\n\n await AppBootstrapService.prepareApplicationEnvTargets(PREPARE_INPUT as never);\n\n expect(applyAppSchemaMigrationsMock).not.toHaveBeenCalled();\n });\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"app-runtime-targets.service.test.d.ts","sourceRoot":"","sources":["../../../../../../../src/services/application/__tests__/app-runtime-targets.service.test.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"app-runtime-targets.service.test.d.ts","sourceRoot":"","sources":["../../../../../src/services/application/__tests__/app-runtime-targets.service.test.ts"],"names":[],"mappings":""}
@@ -61,7 +61,7 @@ vi.mock('@wildo-ai/platform-config-lib', () => ({
61
61
  minions: input.minions ?? {},
62
62
  workers: input.workers ?? {},
63
63
  engineCapabilities: input.engineCapabilities ?? {},
64
- providers: input.providers ?? { scopes: {} },
64
+ providers: input.providers ?? { scopes: {}, connections: {} },
65
65
  providerConfigurations: input.providerConfigurations ?? {},
66
66
  },
67
67
  firstAdminSeed: input.bootstrap?.firstAdmin,
@@ -207,7 +207,7 @@ describe('AppRuntimeTargetsService', () => {
207
207
  replicas: 2,
208
208
  },
209
209
  },
210
- providers: { scopes: {} },
210
+ providers: { scopes: {}, connections: {} },
211
211
  providerConfigurations: {
212
212
  anthropic: {
213
213
  cli_runtime: {
@@ -1 +1 @@
1
- {"version":3,"file":"app-runtime-targets.service.test.js","sourceRoot":"","sources":["../../../../../../../src/services/application/__tests__/app-runtime-targets.service.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AACnE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAE7D,MAAM,EAAE,cAAc,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;IACtF,cAAc,EAAE,EAAE,CAAC,EAAE,EAAE;IACvB,kBAAkB,EAAE,EAAE,CAAC,EAAE,EAAE;IAC3B,qBAAqB,EAAE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CAAC,CAAC,CAAC","sourcesContent":["import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from 'fs';\nimport { join } from 'path';\nimport { tmpdir } from 'os';\nimport { afterEach, describe, expect, it, vi } from 'vitest';\n\nconst { loadConfigMock, loadSaasConfigMock, loadWorkerConfigsMock } = vi.hoisted(() => ({\n loadConfigMock: vi.fn(),\n loadSaasConfigMock: vi.fn(),\n loadWorkerConfigsMock: vi.fn(),\n}));\n\nvi.mock('@wildo-ai/platform-config-lib', () => ({\n WORKSPACE_CONFIG_NAMES: {\n SAAS: 'wildo.saas.config.ts',\n },\n resolveAppLayout: (appRoot: string) => ({\n runtimeEnvironmentsHome: join(appRoot, '.wildo-saas', 'infrastructure', 'environments'),\n authoredInfrastructureHome: join(appRoot, 'infrastructure'),\n }),\n loadConfig: loadConfigMock,\n loadSaasConfig: loadSaasConfigMock,\n loadWorkerConfigs: loadWorkerConfigsMock,\n loadMinionConfigs: vi.fn(async () => []),\n normalizeSaasRuntimeDescriptor: (input: {\n name?: string;\n slug: string;\n displayName: string;\n description?: string;\n type?: 'saas';\n minions?: Record<string, { resourceAccess?: { read: string[]; write: string[] } }>;\n workers?: Record<string, unknown>;\n engineCapabilities?: Record<string, unknown>;\n providers?: Record<string, unknown>;\n providerConfigurations?: Record<string, unknown>;\n modules?: Record<string, { services: string[]; haveSamlIntegration?: boolean }>;\n bootstrap?: { firstAdmin?: { userTypes: string[] } };\n services: Record<string, { path: string; serviceName: string; defaultPort?: number; frontendType?: string }>;\n }) => ({\n appSlug: input.slug,\n appDisplayName: input.displayName,\n requiresJavaBackendBase: Object.entries(input.modules ?? {}).some(\n ([, binding]) => binding.haveSamlIntegration === true &&\n binding.services.some((serviceKey) => {\n const service = input.services[serviceKey];\n return service !== undefined && service.frontendType === undefined;\n }),\n ),\n backendServices: Object.entries(input.services)\n .filter(([, service]) => service.frontendType === undefined)\n .map(([key, service]) => ({\n key,\n path: service.path,\n serviceName: service.serviceName,\n defaultPort: service.defaultPort,\n })),\n frontendServices: Object.entries(input.services)\n .filter(([, service]) => service.frontendType !== undefined)\n .map(([key, service]) => ({\n key,\n path: service.path,\n serviceName: service.serviceName,\n defaultPort: service.defaultPort,\n frontendType: service.frontendType!,\n })),\n managedDeclaration: {\n app: {\n name: input.name ?? input.slug,\n slug: input.slug,\n displayName: input.displayName,\n description: input.description,\n type: input.type ?? 'saas',\n },\n frontendServices: Object.values(input.services)\n .filter((service) => service.frontendType !== undefined)\n .map((service) => ({\n serviceName: service.serviceName,\n frontendType: service.frontendType!,\n })),\n minions: input.minions ?? {},\n workers: input.workers ?? {},\n engineCapabilities: input.engineCapabilities ?? {},\n providers: input.providers ?? { scopes: {} },\n providerConfigurations: input.providerConfigurations ?? {},\n },\n firstAdminSeed: input.bootstrap?.firstAdmin,\n declaredModules: input.modules ?? {},\n moduleIds: Object.keys(input.modules ?? {}),\n moduleIdsByService: Object.fromEntries(\n Object.keys(input.services).map((serviceKey) => [\n serviceKey,\n Object.entries(input.modules ?? {})\n .filter(([, binding]) => binding.services.includes(serviceKey))\n .map(([moduleId]) => moduleId),\n ]),\n ),\n }),\n}));\n\nimport * as PlatformConfigLib from '@wildo-ai/platform-config-lib';\nimport { AppRuntimeTargetsService } from '../app-runtime-targets.service';\n\nconst tempDirs: string[] = [];\n\ndescribe('AppRuntimeTargetsService', () => {\n afterEach(() => {\n vi.restoreAllMocks();\n loadConfigMock.mockReset();\n loadSaasConfigMock.mockReset();\n loadWorkerConfigsMock.mockReset();\n for (const dir of tempDirs.splice(0)) {\n rmSync(dir, { recursive: true, force: true });\n }\n });\n\n it('keeps only supplemental local service addressing from the flattened local infra descriptor', async () => {\n const sandboxRoot = mkdtempSync(join(tmpdir(), 'wildo-cli-runtime-targets-'));\n tempDirs.push(sandboxRoot);\n\n const appRoot = join(sandboxRoot, 'wonder-todos');\n const appLocalInfraDir = join(appRoot, 'infrastructure', 'local');\n mkdirSync(appRoot, { recursive: true });\n mkdirSync(appLocalInfraDir, { recursive: true });\n\n const saasConfigPath = join(appRoot, PlatformConfigLib.WORKSPACE_CONFIG_NAMES.SAAS);\n const infraConfigPath = join(appLocalInfraDir, 'wildo.infra.local.config.ts');\n writeFileSync(saasConfigPath, 'export default {};', 'utf8');\n writeFileSync(infraConfigPath, 'export default {};', 'utf8');\n\n loadConfigMock.mockImplementation(async (configPath: string) => {\n if (configPath === infraConfigPath) {\n return {\n environment: 'local',\n devCompanion: {\n host: '0.0.0.0',\n port: 4341,\n },\n };\n }\n\n throw new Error(`Unexpected config path ${configPath}`);\n });\n loadSaasConfigMock.mockImplementation(async (configPath: string) => {\n if (configPath === saasConfigPath) {\n return {\n name: 'wonder-todos',\n slug: 'wonder-todos',\n displayName: 'Wonder Todos',\n description: 'A collaborative task management platform',\n type: 'saas',\n engineCapabilities: {\n EMAIL_TRANSACTIONAL: {\n enabled: true,\n },\n },\n providerConfigurations: {\n anthropic: {\n cli_runtime: {\n enabled: true,\n },\n },\n },\n bootstrap: {\n firstAdmin: {\n userTypes: ['member'],\n },\n },\n services: {\n backendApi: {\n path: './backend-api',\n serviceName: 'wonder-todos-api',\n defaultPort: 4241,\n },\n app: {\n path: './app',\n serviceName: 'wonder-todos-app',\n defaultPort: 4242,\n frontendType: 'spa',\n },\n },\n modules: {\n 'tasks-manager': {\n services: ['backendApi', 'app'],\n haveSamlIntegration: true,\n },\n },\n };\n }\n\n throw new Error(`Unexpected config path ${configPath}`);\n });\n loadWorkerConfigsMock.mockResolvedValue([\n {\n key: 'rustWorker',\n absolutePath: join(appRoot, 'workers', 'my-rust-worker', 'wildo.worker.config.ts'),\n config: {\n name: 'my-rust-worker',\n displayName: 'My Rust Worker',\n description: 'Heavy processing worker',\n runtime: { type: 'docker', language: 'rust' },\n http: { port: 8080, healthPath: '/healthz', readyPath: '/readyz' },\n auth: 'wildo-jwt',\n replicas: 2,\n },\n },\n ]);\n\n const target = await AppRuntimeTargetsService.resolve(appRoot, 'wonder-todos');\n\n expect(target?.appSlug).toBe('wonder-todos');\n expect(target?.managedDeclaration).toEqual({\n app: {\n name: 'wonder-todos',\n slug: 'wonder-todos',\n displayName: 'Wonder Todos',\n description: 'A collaborative task management platform',\n type: 'saas',\n },\n frontendServices: [\n {\n serviceName: 'wonder-todos-app',\n frontendType: 'spa',\n },\n ],\n engineCapabilities: {\n EMAIL_TRANSACTIONAL: {\n enabled: true,\n },\n },\n minions: {},\n workers: {\n rustWorker: {\n name: 'my-rust-worker',\n displayName: 'My Rust Worker',\n description: 'Heavy processing worker',\n runtime: { type: 'docker', language: 'rust' },\n http: { port: 8080, healthPath: '/healthz', readyPath: '/readyz' },\n auth: 'wildo-jwt',\n replicas: 2,\n },\n },\n providers: { scopes: {} },\n providerConfigurations: {\n anthropic: {\n cli_runtime: {\n enabled: true,\n },\n },\n },\n });\n expect(target?.firstAdminSeed).toEqual({\n userTypes: ['member'],\n });\n expect(target?.localServiceAddresses).toEqual({\n devCompanion: {\n host: '0.0.0.0',\n port: 4341,\n url: 'http://localhost:4341',\n },\n });\n expect(target?.localServiceAddresses).not.toHaveProperty('backendApi');\n expect(target?.declaredModules).toEqual({\n 'tasks-manager': {\n services: ['backendApi', 'app'],\n haveSamlIntegration: true,\n },\n });\n expect(target?.requiresJavaBackendBase).toBe(true);\n expect(target?.moduleIds).toEqual(['tasks-manager']);\n expect(target?.moduleIdsByService).toEqual({\n backendApi: ['tasks-manager'],\n app: ['tasks-manager'],\n });\n });\n});\n"]}
1
+ {"version":3,"file":"app-runtime-targets.service.test.js","sourceRoot":"","sources":["../../../../../src/services/application/__tests__/app-runtime-targets.service.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AACnE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,EAA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I,CAAC,IAAI,CAAC,CAAC;QACnD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,OAAO,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC;QACrD,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC,OAAO,CAAC;YACzC,UAAU,EAAE,CAAC,eAAe,CAAC;YAC7B,GAAG,EAAE,CAAC,eAAe,CAAC;SACvB,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from 'fs';\nimport { join } from 'path';\nimport { tmpdir } from 'os';\nimport { afterEach, describe, expect, it, vi } from 'vitest';\n\nconst { loadConfigMock, loadSaasConfigMock, loadWorkerConfigsMock } = vi.hoisted(() => ({\n loadConfigMock: vi.fn(),\n loadSaasConfigMock: vi.fn(),\n loadWorkerConfigsMock: vi.fn(),\n}));\n\nvi.mock('@wildo-ai/platform-config-lib', () => ({\n WORKSPACE_CONFIG_NAMES: {\n SAAS: 'wildo.saas.config.ts',\n },\n resolveAppLayout: (appRoot: string) => ({\n runtimeEnvironmentsHome: join(appRoot, '.wildo-saas', 'infrastructure', 'environments'),\n authoredInfrastructureHome: join(appRoot, 'infrastructure'),\n }),\n loadConfig: loadConfigMock,\n loadSaasConfig: loadSaasConfigMock,\n loadWorkerConfigs: loadWorkerConfigsMock,\n loadMinionConfigs: vi.fn(async () => []),\n normalizeSaasRuntimeDescriptor: (input: {\n name?: string;\n slug: string;\n displayName: string;\n description?: string;\n type?: 'saas';\n minions?: Record<string, { resourceAccess?: { read: string[]; write: string[] } }>;\n workers?: Record<string, unknown>;\n engineCapabilities?: Record<string, unknown>;\n providers?: Record<string, unknown>;\n providerConfigurations?: Record<string, unknown>;\n modules?: Record<string, { services: string[]; haveSamlIntegration?: boolean }>;\n bootstrap?: { firstAdmin?: { userTypes: string[] } };\n services: Record<string, { path: string; serviceName: string; defaultPort?: number; frontendType?: string }>;\n }) => ({\n appSlug: input.slug,\n appDisplayName: input.displayName,\n requiresJavaBackendBase: Object.entries(input.modules ?? {}).some(\n ([, binding]) => binding.haveSamlIntegration === true &&\n binding.services.some((serviceKey) => {\n const service = input.services[serviceKey];\n return service !== undefined && service.frontendType === undefined;\n }),\n ),\n backendServices: Object.entries(input.services)\n .filter(([, service]) => service.frontendType === undefined)\n .map(([key, service]) => ({\n key,\n path: service.path,\n serviceName: service.serviceName,\n defaultPort: service.defaultPort,\n })),\n frontendServices: Object.entries(input.services)\n .filter(([, service]) => service.frontendType !== undefined)\n .map(([key, service]) => ({\n key,\n path: service.path,\n serviceName: service.serviceName,\n defaultPort: service.defaultPort,\n frontendType: service.frontendType!,\n })),\n managedDeclaration: {\n app: {\n name: input.name ?? input.slug,\n slug: input.slug,\n displayName: input.displayName,\n description: input.description,\n type: input.type ?? 'saas',\n },\n frontendServices: Object.values(input.services)\n .filter((service) => service.frontendType !== undefined)\n .map((service) => ({\n serviceName: service.serviceName,\n frontendType: service.frontendType!,\n })),\n minions: input.minions ?? {},\n workers: input.workers ?? {},\n engineCapabilities: input.engineCapabilities ?? {},\n providers: input.providers ?? { scopes: {}, connections: {} },\n providerConfigurations: input.providerConfigurations ?? {},\n },\n firstAdminSeed: input.bootstrap?.firstAdmin,\n declaredModules: input.modules ?? {},\n moduleIds: Object.keys(input.modules ?? {}),\n moduleIdsByService: Object.fromEntries(\n Object.keys(input.services).map((serviceKey) => [\n serviceKey,\n Object.entries(input.modules ?? {})\n .filter(([, binding]) => binding.services.includes(serviceKey))\n .map(([moduleId]) => moduleId),\n ]),\n ),\n }),\n}));\n\nimport * as PlatformConfigLib from '@wildo-ai/platform-config-lib';\nimport { AppRuntimeTargetsService } from '../app-runtime-targets.service';\n\nconst tempDirs: string[] = [];\n\ndescribe('AppRuntimeTargetsService', () => {\n afterEach(() => {\n vi.restoreAllMocks();\n loadConfigMock.mockReset();\n loadSaasConfigMock.mockReset();\n loadWorkerConfigsMock.mockReset();\n for (const dir of tempDirs.splice(0)) {\n rmSync(dir, { recursive: true, force: true });\n }\n });\n\n it('keeps only supplemental local service addressing from the flattened local infra descriptor', async () => {\n const sandboxRoot = mkdtempSync(join(tmpdir(), 'wildo-cli-runtime-targets-'));\n tempDirs.push(sandboxRoot);\n\n const appRoot = join(sandboxRoot, 'wonder-todos');\n const appLocalInfraDir = join(appRoot, 'infrastructure', 'local');\n mkdirSync(appRoot, { recursive: true });\n mkdirSync(appLocalInfraDir, { recursive: true });\n\n const saasConfigPath = join(appRoot, PlatformConfigLib.WORKSPACE_CONFIG_NAMES.SAAS);\n const infraConfigPath = join(appLocalInfraDir, 'wildo.infra.local.config.ts');\n writeFileSync(saasConfigPath, 'export default {};', 'utf8');\n writeFileSync(infraConfigPath, 'export default {};', 'utf8');\n\n loadConfigMock.mockImplementation(async (configPath: string) => {\n if (configPath === infraConfigPath) {\n return {\n environment: 'local',\n devCompanion: {\n host: '0.0.0.0',\n port: 4341,\n },\n };\n }\n\n throw new Error(`Unexpected config path ${configPath}`);\n });\n loadSaasConfigMock.mockImplementation(async (configPath: string) => {\n if (configPath === saasConfigPath) {\n return {\n name: 'wonder-todos',\n slug: 'wonder-todos',\n displayName: 'Wonder Todos',\n description: 'A collaborative task management platform',\n type: 'saas',\n engineCapabilities: {\n EMAIL_TRANSACTIONAL: {\n enabled: true,\n },\n },\n providerConfigurations: {\n anthropic: {\n cli_runtime: {\n enabled: true,\n },\n },\n },\n bootstrap: {\n firstAdmin: {\n userTypes: ['member'],\n },\n },\n services: {\n backendApi: {\n path: './backend-api',\n serviceName: 'wonder-todos-api',\n defaultPort: 4241,\n },\n app: {\n path: './app',\n serviceName: 'wonder-todos-app',\n defaultPort: 4242,\n frontendType: 'spa',\n },\n },\n modules: {\n 'tasks-manager': {\n services: ['backendApi', 'app'],\n haveSamlIntegration: true,\n },\n },\n };\n }\n\n throw new Error(`Unexpected config path ${configPath}`);\n });\n loadWorkerConfigsMock.mockResolvedValue([\n {\n key: 'rustWorker',\n absolutePath: join(appRoot, 'workers', 'my-rust-worker', 'wildo.worker.config.ts'),\n config: {\n name: 'my-rust-worker',\n displayName: 'My Rust Worker',\n description: 'Heavy processing worker',\n runtime: { type: 'docker', language: 'rust' },\n http: { port: 8080, healthPath: '/healthz', readyPath: '/readyz' },\n auth: 'wildo-jwt',\n replicas: 2,\n },\n },\n ]);\n\n const target = await AppRuntimeTargetsService.resolve(appRoot, 'wonder-todos');\n\n expect(target?.appSlug).toBe('wonder-todos');\n expect(target?.managedDeclaration).toEqual({\n app: {\n name: 'wonder-todos',\n slug: 'wonder-todos',\n displayName: 'Wonder Todos',\n description: 'A collaborative task management platform',\n type: 'saas',\n },\n frontendServices: [\n {\n serviceName: 'wonder-todos-app',\n frontendType: 'spa',\n },\n ],\n engineCapabilities: {\n EMAIL_TRANSACTIONAL: {\n enabled: true,\n },\n },\n minions: {},\n workers: {\n rustWorker: {\n name: 'my-rust-worker',\n displayName: 'My Rust Worker',\n description: 'Heavy processing worker',\n runtime: { type: 'docker', language: 'rust' },\n http: { port: 8080, healthPath: '/healthz', readyPath: '/readyz' },\n auth: 'wildo-jwt',\n replicas: 2,\n },\n },\n providers: { scopes: {}, connections: {} },\n providerConfigurations: {\n anthropic: {\n cli_runtime: {\n enabled: true,\n },\n },\n },\n });\n expect(target?.firstAdminSeed).toEqual({\n userTypes: ['member'],\n });\n expect(target?.localServiceAddresses).toEqual({\n devCompanion: {\n host: '0.0.0.0',\n port: 4341,\n url: 'http://localhost:4341',\n },\n });\n expect(target?.localServiceAddresses).not.toHaveProperty('backendApi');\n expect(target?.declaredModules).toEqual({\n 'tasks-manager': {\n services: ['backendApi', 'app'],\n haveSamlIntegration: true,\n },\n });\n expect(target?.requiresJavaBackendBase).toBe(true);\n expect(target?.moduleIds).toEqual(['tasks-manager']);\n expect(target?.moduleIdsByService).toEqual({\n backendApi: ['tasks-manager'],\n app: ['tasks-manager'],\n });\n });\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"application-assets-delivery.service.test.d.ts","sourceRoot":"","sources":["../../../../../../../src/services/application/__tests__/application-assets-delivery.service.test.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"application-assets-delivery.service.test.d.ts","sourceRoot":"","sources":["../../../../../src/services/application/__tests__/application-assets-delivery.service.test.ts"],"names":[],"mappings":""}
@@ -78,4 +78,23 @@ describe('ApplicationAssetsDeliveryService', () => {
78
78
  expect(result.skills.status).toBe('delivered');
79
79
  });
80
80
  });
81
+ describe('ApplicationAssetsDeliveryService.describeFrameworkVersionSkew', () => {
82
+ it('is silent when the CLI and the installed knowledge package agree, or when either is unknown', () => {
83
+ expect(ApplicationAssetsDeliveryService.describeFrameworkVersionSkew('1.1.2', '1.1.2')).toBeNull();
84
+ expect(ApplicationAssetsDeliveryService.describeFrameworkVersionSkew(null, '1.1.2')).toBeNull();
85
+ expect(ApplicationAssetsDeliveryService.describeFrameworkVersionSkew('1.1.2', null)).toBeNull();
86
+ });
87
+ /**
88
+ * The upgrade sequence bumps the application's `@wildo-ai/*` pins and re-runs `assets sync`;
89
+ * nothing in it replaces the CLI. The templates and the platform image tag travel with the CLI,
90
+ * so after such an upgrade the application runs 1.1.3 on templates from 1.1.2 — and until this
91
+ * warning existed, nothing said so (issue #278 review, 2026-09-06).
92
+ */
93
+ it('names both versions and the installer remedy when they disagree', () => {
94
+ const sentence = ApplicationAssetsDeliveryService.describeFrameworkVersionSkew('1.1.2', '1.1.3');
95
+ expect(sentence).toContain('this CLI is 1.1.2');
96
+ expect(sentence).toContain('@wildo-ai/framework-knowledge 1.1.3');
97
+ expect(sentence).toContain('--cli-version=1.1.3');
98
+ });
99
+ });
81
100
  //# sourceMappingURL=application-assets-delivery.service.test.js.map