@wildo-ai/wildo-cli 1.1.9 → 1.1.10

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 (833) hide show
  1. package/dist/bin/wildo.d.ts.map +1 -1
  2. package/dist/bin/wildo.js +0 -0
  3. package/dist/bin/wildo.js.map +1 -1
  4. package/dist/src/commands/acp/probe.command.d.ts.map +1 -1
  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/align-deps.command.js.map +1 -1
  8. package/dist/src/commands/assets/sync.command.d.ts.map +1 -1
  9. package/dist/src/commands/assets/sync.command.js.map +1 -1
  10. package/dist/src/commands/brand/propagate.command.d.ts.map +1 -1
  11. package/dist/src/commands/brand/propagate.command.js.map +1 -1
  12. package/dist/src/commands/build/accept.command.d.ts.map +1 -1
  13. package/dist/src/commands/build/accept.command.js.map +1 -1
  14. package/dist/src/commands/build/dispatches.command.d.ts.map +1 -1
  15. package/dist/src/commands/build/dispatches.command.js.map +1 -1
  16. package/dist/src/commands/build/next.command.d.ts.map +1 -1
  17. package/dist/src/commands/build/next.command.js.map +1 -1
  18. package/dist/src/commands/build/rearm.command.d.ts.map +1 -1
  19. package/dist/src/commands/build/rearm.command.js.map +1 -1
  20. package/dist/src/commands/build/run.command.d.ts.map +1 -1
  21. package/dist/src/commands/build/run.command.js.map +1 -1
  22. package/dist/src/commands/build/tasks.command.d.ts.map +1 -1
  23. package/dist/src/commands/build/tasks.command.js.map +1 -1
  24. package/dist/src/commands/compose.command.d.ts.map +1 -1
  25. package/dist/src/commands/compose.command.js.map +1 -1
  26. package/dist/src/commands/config/check-resources.command.d.ts +50 -0
  27. package/dist/src/commands/config/check-resources.command.d.ts.map +1 -0
  28. package/dist/src/commands/config/check-resources.command.js +121 -0
  29. package/dist/src/commands/config/check-resources.command.js.map +1 -0
  30. package/dist/src/commands/config/data-retention.command.d.ts.map +1 -1
  31. package/dist/src/commands/config/data-retention.command.js.map +1 -1
  32. package/dist/src/commands/config/document-releases.command.d.ts.map +1 -1
  33. package/dist/src/commands/config/document-releases.command.js.map +1 -1
  34. package/dist/src/commands/config/legal-notice.command.d.ts +17 -0
  35. package/dist/src/commands/config/legal-notice.command.d.ts.map +1 -0
  36. package/dist/src/commands/config/legal-notice.command.js +59 -0
  37. package/dist/src/commands/config/legal-notice.command.js.map +1 -0
  38. package/dist/src/commands/config/mutate.command.d.ts.map +1 -1
  39. package/dist/src/commands/config/mutate.command.js.map +1 -1
  40. package/dist/src/commands/config/reapply-declaration.command.d.ts.map +1 -1
  41. package/dist/src/commands/config/reapply-declaration.command.js.map +1 -1
  42. package/dist/src/commands/config/service-consent.command.d.ts.map +1 -1
  43. package/dist/src/commands/config/service-consent.command.js.map +1 -1
  44. package/dist/src/commands/config/subject-data-recipients.command.d.ts.map +1 -1
  45. package/dist/src/commands/config/subject-data-recipients.command.js.map +1 -1
  46. package/dist/src/commands/config/sync.command.d.ts.map +1 -1
  47. package/dist/src/commands/config/sync.command.js.map +1 -1
  48. package/dist/src/commands/config/validate.command.d.ts +8 -0
  49. package/dist/src/commands/config/validate.command.d.ts.map +1 -1
  50. package/dist/src/commands/config/validate.command.js +65 -4
  51. package/dist/src/commands/config/validate.command.js.map +1 -1
  52. package/dist/src/commands/context/assurance-basis.command.d.ts.map +1 -1
  53. package/dist/src/commands/context/assurance-basis.command.js.map +1 -1
  54. package/dist/src/commands/context/coherence.command.d.ts.map +1 -1
  55. package/dist/src/commands/context/coherence.command.js.map +1 -1
  56. package/dist/src/commands/context/context-command.utils.d.ts.map +1 -1
  57. package/dist/src/commands/context/context-command.utils.js.map +1 -1
  58. package/dist/src/commands/context/elements.command.d.ts.map +1 -1
  59. package/dist/src/commands/context/elements.command.js.map +1 -1
  60. package/dist/src/commands/context/health.command.d.ts.map +1 -1
  61. package/dist/src/commands/context/health.command.js.map +1 -1
  62. package/dist/src/commands/context/info.command.d.ts.map +1 -1
  63. package/dist/src/commands/context/info.command.js.map +1 -1
  64. package/dist/src/commands/context/journey.command.d.ts +8 -2
  65. package/dist/src/commands/context/journey.command.d.ts.map +1 -1
  66. package/dist/src/commands/context/journey.command.js +102 -12
  67. package/dist/src/commands/context/journey.command.js.map +1 -1
  68. package/dist/src/commands/context/jurisdictions.command.d.ts.map +1 -1
  69. package/dist/src/commands/context/jurisdictions.command.js.map +1 -1
  70. package/dist/src/commands/context/launch-blockers.command.d.ts +2 -1
  71. package/dist/src/commands/context/launch-blockers.command.d.ts.map +1 -1
  72. package/dist/src/commands/context/launch-blockers.command.js +3 -2
  73. package/dist/src/commands/context/launch-blockers.command.js.map +1 -1
  74. package/dist/src/commands/context/list.command.d.ts.map +1 -1
  75. package/dist/src/commands/context/list.command.js.map +1 -1
  76. package/dist/src/commands/context/pipelines.command.d.ts.map +1 -1
  77. package/dist/src/commands/context/pipelines.command.js.map +1 -1
  78. package/dist/src/commands/context/workspace.command.d.ts.map +1 -1
  79. package/dist/src/commands/context/workspace.command.js.map +1 -1
  80. package/dist/src/commands/creation/accept.command.d.ts +4 -0
  81. package/dist/src/commands/creation/accept.command.d.ts.map +1 -1
  82. package/dist/src/commands/creation/accept.command.js +29 -4
  83. package/dist/src/commands/creation/accept.command.js.map +1 -1
  84. package/dist/src/commands/creation/answer.command.d.ts.map +1 -1
  85. package/dist/src/commands/creation/answer.command.js.map +1 -1
  86. package/dist/src/commands/creation/brand-logo.command.d.ts +18 -0
  87. package/dist/src/commands/creation/brand-logo.command.d.ts.map +1 -0
  88. package/dist/src/commands/creation/brand-logo.command.js +43 -0
  89. package/dist/src/commands/creation/brand-logo.command.js.map +1 -0
  90. package/dist/src/commands/creation/brief.command.d.ts.map +1 -1
  91. package/dist/src/commands/creation/brief.command.js.map +1 -1
  92. package/dist/src/commands/creation/deliberate.command.d.ts +2 -2
  93. package/dist/src/commands/creation/deliberate.command.d.ts.map +1 -1
  94. package/dist/src/commands/creation/deliberate.command.js +2 -2
  95. package/dist/src/commands/creation/deliberate.command.js.map +1 -1
  96. package/dist/src/commands/creation/depth.command.d.ts.map +1 -1
  97. package/dist/src/commands/creation/depth.command.js +1 -1
  98. package/dist/src/commands/creation/depth.command.js.map +1 -1
  99. package/dist/src/commands/creation/diff.command.d.ts.map +1 -1
  100. package/dist/src/commands/creation/diff.command.js.map +1 -1
  101. package/dist/src/commands/creation/feed.command.d.ts.map +1 -1
  102. package/dist/src/commands/creation/feed.command.js.map +1 -1
  103. package/dist/src/commands/creation/loop.command.d.ts.map +1 -1
  104. package/dist/src/commands/creation/loop.command.js.map +1 -1
  105. package/dist/src/commands/creation/persona.command.d.ts +3 -2
  106. package/dist/src/commands/creation/persona.command.d.ts.map +1 -1
  107. package/dist/src/commands/creation/persona.command.js +10 -3
  108. package/dist/src/commands/creation/persona.command.js.map +1 -1
  109. package/dist/src/commands/creation/preflight.command.d.ts.map +1 -1
  110. package/dist/src/commands/creation/preflight.command.js.map +1 -1
  111. package/dist/src/commands/creation/prompt-hook.command.d.ts.map +1 -1
  112. package/dist/src/commands/creation/prompt-hook.command.js.map +1 -1
  113. package/dist/src/commands/creation/propose.command.d.ts.map +1 -1
  114. package/dist/src/commands/creation/propose.command.js.map +1 -1
  115. package/dist/src/commands/creation/pulse.command.d.ts.map +1 -1
  116. package/dist/src/commands/creation/pulse.command.js.map +1 -1
  117. package/dist/src/commands/creation/questions.command.d.ts.map +1 -1
  118. package/dist/src/commands/creation/questions.command.js.map +1 -1
  119. package/dist/src/commands/creation/reason.command.d.ts.map +1 -1
  120. package/dist/src/commands/creation/reason.command.js.map +1 -1
  121. package/dist/src/commands/creation/report.command.d.ts.map +1 -1
  122. package/dist/src/commands/creation/report.command.js.map +1 -1
  123. package/dist/src/commands/creation/revert.command.d.ts.map +1 -1
  124. package/dist/src/commands/creation/revert.command.js.map +1 -1
  125. package/dist/src/commands/creation/run.command.d.ts.map +1 -1
  126. package/dist/src/commands/creation/run.command.js.map +1 -1
  127. package/dist/src/commands/creation/statusline.command.d.ts.map +1 -1
  128. package/dist/src/commands/creation/statusline.command.js.map +1 -1
  129. package/dist/src/commands/creation/watch.command.d.ts.map +1 -1
  130. package/dist/src/commands/creation/watch.command.js.map +1 -1
  131. package/dist/src/commands/creation/why.command.d.ts +3 -1
  132. package/dist/src/commands/creation/why.command.d.ts.map +1 -1
  133. package/dist/src/commands/creation/why.command.js +28 -9
  134. package/dist/src/commands/creation/why.command.js.map +1 -1
  135. package/dist/src/commands/creation/writes.command.d.ts.map +1 -1
  136. package/dist/src/commands/creation/writes.command.js.map +1 -1
  137. package/dist/src/commands/db/db-schema-plan-migration.utils.d.ts.map +1 -1
  138. package/dist/src/commands/db/db-schema-plan-migration.utils.js.map +1 -1
  139. package/dist/src/commands/db/db-schema-plan.utils.d.ts.map +1 -1
  140. package/dist/src/commands/db/db-schema-plan.utils.js.map +1 -1
  141. package/dist/src/commands/db/diff.command.d.ts.map +1 -1
  142. package/dist/src/commands/db/diff.command.js.map +1 -1
  143. package/dist/src/commands/db/generate.command.d.ts.map +1 -1
  144. package/dist/src/commands/db/generate.command.js.map +1 -1
  145. package/dist/src/commands/db/migrate.command.d.ts.map +1 -1
  146. package/dist/src/commands/db/migrate.command.js.map +1 -1
  147. package/dist/src/commands/db/resolve.command.d.ts.map +1 -1
  148. package/dist/src/commands/db/resolve.command.js.map +1 -1
  149. package/dist/src/commands/dev/charts-audit.command.d.ts.map +1 -1
  150. package/dist/src/commands/dev/charts-audit.command.js.map +1 -1
  151. package/dist/src/commands/dev/design-tokens-generate.command.d.ts.map +1 -1
  152. package/dist/src/commands/dev/design-tokens-generate.command.js.map +1 -1
  153. package/dist/src/commands/dev/design-tokens-init.command.d.ts.map +1 -1
  154. package/dist/src/commands/dev/design-tokens-init.command.js.map +1 -1
  155. package/dist/src/commands/dev/design-tokens-validate.command.d.ts.map +1 -1
  156. package/dist/src/commands/dev/design-tokens-validate.command.js.map +1 -1
  157. package/dist/src/commands/dev/force-stop.command.d.ts.map +1 -1
  158. package/dist/src/commands/dev/force-stop.command.js.map +1 -1
  159. package/dist/src/commands/dev/resources.command.d.ts.map +1 -1
  160. package/dist/src/commands/dev/resources.command.js.map +1 -1
  161. package/dist/src/commands/dev/start.command.d.ts.map +1 -1
  162. package/dist/src/commands/dev/start.command.js.map +1 -1
  163. package/dist/src/commands/dev/stop-all.command.d.ts.map +1 -1
  164. package/dist/src/commands/dev/stop-all.command.js.map +1 -1
  165. package/dist/src/commands/dev/sync-csp.command.d.ts.map +1 -1
  166. package/dist/src/commands/dev/sync-csp.command.js.map +1 -1
  167. package/dist/src/commands/docs/publish.command.d.ts.map +1 -1
  168. package/dist/src/commands/docs/publish.command.js.map +1 -1
  169. package/dist/src/commands/frontend/publish.command.d.ts.map +1 -1
  170. package/dist/src/commands/frontend/publish.command.js.map +1 -1
  171. package/dist/src/commands/fwk/audit.command.d.ts.map +1 -1
  172. package/dist/src/commands/fwk/audit.command.js.map +1 -1
  173. package/dist/src/commands/fwk/dev-skills.command.d.ts.map +1 -1
  174. package/dist/src/commands/fwk/dev-skills.command.js.map +1 -1
  175. package/dist/src/commands/fwk/generate-docs.command.d.ts.map +1 -1
  176. package/dist/src/commands/fwk/generate-docs.command.js.map +1 -1
  177. package/dist/src/commands/fwk/generate-providers.command.d.ts.map +1 -1
  178. package/dist/src/commands/fwk/generate-providers.command.js.map +1 -1
  179. package/dist/src/commands/fwk/graph.command.d.ts.map +1 -1
  180. package/dist/src/commands/fwk/graph.command.js.map +1 -1
  181. package/dist/src/commands/fwk/publish-all.command.d.ts.map +1 -1
  182. package/dist/src/commands/fwk/publish-all.command.js.map +1 -1
  183. package/dist/src/commands/fwk/publish-docker.command.d.ts.map +1 -1
  184. package/dist/src/commands/fwk/publish-docker.command.js.map +1 -1
  185. package/dist/src/commands/fwk/publish-npm.command.d.ts.map +1 -1
  186. package/dist/src/commands/fwk/publish-npm.command.js.map +1 -1
  187. package/dist/src/commands/fwk/version-bump.command.d.ts.map +1 -1
  188. package/dist/src/commands/fwk/version-bump.command.js.map +1 -1
  189. package/dist/src/commands/fwk/version-set.command.d.ts.map +1 -1
  190. package/dist/src/commands/fwk/version-set.command.js.map +1 -1
  191. package/dist/src/commands/fwk/version-show.command.d.ts.map +1 -1
  192. package/dist/src/commands/fwk/version-show.command.js.map +1 -1
  193. package/dist/src/commands/fwk/version-sync.command.d.ts.map +1 -1
  194. package/dist/src/commands/fwk/version-sync.command.js.map +1 -1
  195. package/dist/src/commands/fwk/what-touches.command.d.ts.map +1 -1
  196. package/dist/src/commands/fwk/what-touches.command.js.map +1 -1
  197. package/dist/src/commands/fwk/wt-status.command.d.ts.map +1 -1
  198. package/dist/src/commands/fwk/wt-status.command.js.map +1 -1
  199. package/dist/src/commands/fwk/wt-tail.command.d.ts.map +1 -1
  200. package/dist/src/commands/fwk/wt-tail.command.js.map +1 -1
  201. package/dist/src/commands/generate/email-command.utils.d.ts.map +1 -1
  202. package/dist/src/commands/generate/email-command.utils.js.map +1 -1
  203. package/dist/src/commands/generate/email-preview.command.d.ts.map +1 -1
  204. package/dist/src/commands/generate/email-preview.command.js.map +1 -1
  205. package/dist/src/commands/generate/email-status.command.d.ts.map +1 -1
  206. package/dist/src/commands/generate/email-status.command.js.map +1 -1
  207. package/dist/src/commands/generate/email-test-send.command.d.ts.map +1 -1
  208. package/dist/src/commands/generate/email-test-send.command.js.map +1 -1
  209. package/dist/src/commands/generate/email-translate.command.d.ts.map +1 -1
  210. package/dist/src/commands/generate/email-translate.command.js.map +1 -1
  211. package/dist/src/commands/generate/email.command.d.ts.map +1 -1
  212. package/dist/src/commands/generate/email.command.js.map +1 -1
  213. package/dist/src/commands/generate/labelling-command.utils.d.ts.map +1 -1
  214. package/dist/src/commands/generate/labelling-command.utils.js.map +1 -1
  215. package/dist/src/commands/generate/labels-plan.command.d.ts.map +1 -1
  216. package/dist/src/commands/generate/labels-plan.command.js.map +1 -1
  217. package/dist/src/commands/generate/labels.command.d.ts.map +1 -1
  218. package/dist/src/commands/generate/labels.command.js.map +1 -1
  219. package/dist/src/commands/generate/translate.command.d.ts.map +1 -1
  220. package/dist/src/commands/generate/translate.command.js.map +1 -1
  221. package/dist/src/commands/help.command.d.ts.map +1 -1
  222. package/dist/src/commands/help.command.js.map +1 -1
  223. package/dist/src/commands/init.command.d.ts.map +1 -1
  224. package/dist/src/commands/init.command.js.map +1 -1
  225. package/dist/src/commands/local/deregister.command.d.ts.map +1 -1
  226. package/dist/src/commands/local/deregister.command.js.map +1 -1
  227. package/dist/src/commands/local/dev-status.command.d.ts.map +1 -1
  228. package/dist/src/commands/local/dev-status.command.js.map +1 -1
  229. package/dist/src/commands/local/dev.command.d.ts.map +1 -1
  230. package/dist/src/commands/local/dev.command.js.map +1 -1
  231. package/dist/src/commands/local/doctor.command.d.ts.map +1 -1
  232. package/dist/src/commands/local/doctor.command.js.map +1 -1
  233. package/dist/src/commands/local/down.command.d.ts.map +1 -1
  234. package/dist/src/commands/local/down.command.js.map +1 -1
  235. package/dist/src/commands/local/init.command.d.ts.map +1 -1
  236. package/dist/src/commands/local/init.command.js.map +1 -1
  237. package/dist/src/commands/local/logs.command.d.ts.map +1 -1
  238. package/dist/src/commands/local/logs.command.js.map +1 -1
  239. package/dist/src/commands/local/reinit.command.d.ts.map +1 -1
  240. package/dist/src/commands/local/reinit.command.js.map +1 -1
  241. package/dist/src/commands/local/reset.command.d.ts.map +1 -1
  242. package/dist/src/commands/local/reset.command.js.map +1 -1
  243. package/dist/src/commands/local/restore.command.d.ts.map +1 -1
  244. package/dist/src/commands/local/restore.command.js.map +1 -1
  245. package/dist/src/commands/local/smoke.command.d.ts.map +1 -1
  246. package/dist/src/commands/local/smoke.command.js.map +1 -1
  247. package/dist/src/commands/local/status.command.d.ts.map +1 -1
  248. package/dist/src/commands/local/status.command.js.map +1 -1
  249. package/dist/src/commands/local/up.command.d.ts.map +1 -1
  250. package/dist/src/commands/local/up.command.js.map +1 -1
  251. package/dist/src/commands/local-defaults/capture.command.d.ts.map +1 -1
  252. package/dist/src/commands/local-defaults/capture.command.js.map +1 -1
  253. package/dist/src/commands/lock/check.command.d.ts.map +1 -1
  254. package/dist/src/commands/lock/check.command.js.map +1 -1
  255. package/dist/src/commands/market/generate.command.d.ts.map +1 -1
  256. package/dist/src/commands/market/generate.command.js.map +1 -1
  257. package/dist/src/commands/market/market-command.utils.d.ts.map +1 -1
  258. package/dist/src/commands/market/market-command.utils.js.map +1 -1
  259. package/dist/src/commands/prefs/set.command.d.ts.map +1 -1
  260. package/dist/src/commands/prefs/set.command.js.map +1 -1
  261. package/dist/src/commands/providers/show.command.d.ts.map +1 -1
  262. package/dist/src/commands/providers/show.command.js.map +1 -1
  263. package/dist/src/commands/registry/add.command.d.ts.map +1 -1
  264. package/dist/src/commands/registry/add.command.js.map +1 -1
  265. package/dist/src/commands/registry/info.command.d.ts.map +1 -1
  266. package/dist/src/commands/registry/info.command.js.map +1 -1
  267. package/dist/src/commands/registry/key.command.d.ts.map +1 -1
  268. package/dist/src/commands/registry/key.command.js.map +1 -1
  269. package/dist/src/commands/registry/lockfile-smoke.command.d.ts.map +1 -1
  270. package/dist/src/commands/registry/lockfile-smoke.command.js.map +1 -1
  271. package/dist/src/commands/registry/login.command.d.ts.map +1 -1
  272. package/dist/src/commands/registry/login.command.js.map +1 -1
  273. package/dist/src/commands/registry/logout.command.d.ts.map +1 -1
  274. package/dist/src/commands/registry/logout.command.js.map +1 -1
  275. package/dist/src/commands/registry/outdated.command.d.ts.map +1 -1
  276. package/dist/src/commands/registry/outdated.command.js.map +1 -1
  277. package/dist/src/commands/registry/ping.command.d.ts.map +1 -1
  278. package/dist/src/commands/registry/ping.command.js.map +1 -1
  279. package/dist/src/commands/registry/publish.command.d.ts.map +1 -1
  280. package/dist/src/commands/registry/publish.command.js.map +1 -1
  281. package/dist/src/commands/registry/registry-transport.constants.d.ts.map +1 -1
  282. package/dist/src/commands/registry/registry-transport.constants.js.map +1 -1
  283. package/dist/src/commands/registry/remove.command.d.ts.map +1 -1
  284. package/dist/src/commands/registry/remove.command.js.map +1 -1
  285. package/dist/src/commands/registry/repair-lockfile.command.d.ts.map +1 -1
  286. package/dist/src/commands/registry/repair-lockfile.command.js.map +1 -1
  287. package/dist/src/commands/registry/search.command.d.ts.map +1 -1
  288. package/dist/src/commands/registry/search.command.js.map +1 -1
  289. package/dist/src/commands/registry/status.command.d.ts.map +1 -1
  290. package/dist/src/commands/registry/status.command.js.map +1 -1
  291. package/dist/src/commands/registry/update.command.d.ts.map +1 -1
  292. package/dist/src/commands/registry/update.command.js.map +1 -1
  293. package/dist/src/commands/registry/whoami.command.d.ts.map +1 -1
  294. package/dist/src/commands/registry/whoami.command.js.map +1 -1
  295. package/dist/src/commands/registry/yank.command.d.ts.map +1 -1
  296. package/dist/src/commands/registry/yank.command.js.map +1 -1
  297. package/dist/src/commands/remote/create.command.d.ts.map +1 -1
  298. package/dist/src/commands/remote/create.command.js.map +1 -1
  299. package/dist/src/commands/remote/list.command.d.ts.map +1 -1
  300. package/dist/src/commands/remote/list.command.js.map +1 -1
  301. package/dist/src/commands/remote/status.command.d.ts.map +1 -1
  302. package/dist/src/commands/remote/status.command.js.map +1 -1
  303. package/dist/src/commands/remote/sync.command.d.ts.map +1 -1
  304. package/dist/src/commands/remote/sync.command.js.map +1 -1
  305. package/dist/src/commands/secrets/github.command.d.ts.map +1 -1
  306. package/dist/src/commands/secrets/github.command.js.map +1 -1
  307. package/dist/src/commands/secrets/list.command.d.ts.map +1 -1
  308. package/dist/src/commands/secrets/list.command.js.map +1 -1
  309. package/dist/src/commands/secrets/set.command.d.ts.map +1 -1
  310. package/dist/src/commands/secrets/set.command.js.map +1 -1
  311. package/dist/src/commands/secrets/unset.command.d.ts.map +1 -1
  312. package/dist/src/commands/secrets/unset.command.js.map +1 -1
  313. package/dist/src/commands/setup.command.d.ts.map +1 -1
  314. package/dist/src/commands/setup.command.js.map +1 -1
  315. package/dist/src/commands/update.command.d.ts.map +1 -1
  316. package/dist/src/commands/update.command.js.map +1 -1
  317. package/dist/src/commands/version.command.d.ts.map +1 -1
  318. package/dist/src/commands/version.command.js.map +1 -1
  319. package/dist/src/commands/website/audit.command.d.ts.map +1 -1
  320. package/dist/src/commands/website/audit.command.js.map +1 -1
  321. package/dist/src/commands/workbench/open.command.d.ts.map +1 -1
  322. package/dist/src/commands/workbench/open.command.js.map +1 -1
  323. package/dist/src/commands/workbench/parallelism.command.d.ts.map +1 -1
  324. package/dist/src/commands/workbench/parallelism.command.js.map +1 -1
  325. package/dist/src/commands/workbench/status.command.d.ts.map +1 -1
  326. package/dist/src/commands/workbench/status.command.js.map +1 -1
  327. package/dist/src/infrastructure/errors/error.utils.d.ts.map +1 -1
  328. package/dist/src/infrastructure/errors/error.utils.js.map +1 -1
  329. package/dist/src/infrastructure/io/file.utils.d.ts.map +1 -1
  330. package/dist/src/infrastructure/io/file.utils.js.map +1 -1
  331. package/dist/src/infrastructure/io/io.schemas.d.ts.map +1 -1
  332. package/dist/src/infrastructure/io/io.schemas.js.map +1 -1
  333. package/dist/src/infrastructure/io/template-processor.d.ts.map +1 -1
  334. package/dist/src/infrastructure/io/template-processor.js.map +1 -1
  335. package/dist/src/infrastructure/logger/logger.service.d.ts.map +1 -1
  336. package/dist/src/infrastructure/logger/logger.service.js.map +1 -1
  337. package/dist/src/infrastructure/process/spawn.utils.d.ts.map +1 -1
  338. package/dist/src/infrastructure/process/spawn.utils.js.map +1 -1
  339. package/dist/src/infrastructure/ui/formatting.service.d.ts.map +1 -1
  340. package/dist/src/infrastructure/ui/formatting.service.js.map +1 -1
  341. package/dist/src/infrastructure/ui/interaction-engine.service.d.ts.map +1 -1
  342. package/dist/src/infrastructure/ui/interaction-engine.service.js.map +1 -1
  343. package/dist/src/infrastructure/ui/markdown-renderer.service.d.ts.map +1 -1
  344. package/dist/src/infrastructure/ui/markdown-renderer.service.js.map +1 -1
  345. package/dist/src/infrastructure/ui/ui.schemas.d.ts.map +1 -1
  346. package/dist/src/infrastructure/ui/ui.schemas.js.map +1 -1
  347. package/dist/src/infrastructure/utils/string.utils.d.ts.map +1 -1
  348. package/dist/src/infrastructure/utils/string.utils.js.map +1 -1
  349. package/dist/src/infrastructure/validation/validator.service.d.ts.map +1 -1
  350. package/dist/src/infrastructure/validation/validator.service.js.map +1 -1
  351. package/dist/src/kernel/base-command.d.ts.map +1 -1
  352. package/dist/src/kernel/base-command.js.map +1 -1
  353. package/dist/src/kernel/bootstrap.d.ts.map +1 -1
  354. package/dist/src/kernel/bootstrap.js.map +1 -1
  355. package/dist/src/kernel/command-index-cache.d.ts.map +1 -1
  356. package/dist/src/kernel/command-index-cache.js.map +1 -1
  357. package/dist/src/kernel/command-registry.d.ts.map +1 -1
  358. package/dist/src/kernel/command-registry.js.map +1 -1
  359. package/dist/src/kernel/command-runner.d.ts.map +1 -1
  360. package/dist/src/kernel/command-runner.js.map +1 -1
  361. package/dist/src/kernel/command-scope-utils.d.ts.map +1 -1
  362. package/dist/src/kernel/command-scope-utils.js.map +1 -1
  363. package/dist/src/kernel/flag-utils.d.ts.map +1 -1
  364. package/dist/src/kernel/flag-utils.js.map +1 -1
  365. package/dist/src/kernel/hooks.d.ts.map +1 -1
  366. package/dist/src/kernel/hooks.js.map +1 -1
  367. package/dist/src/kernel/logger.d.ts.map +1 -1
  368. package/dist/src/kernel/logger.js.map +1 -1
  369. package/dist/src/kernel/types.d.ts.map +1 -1
  370. package/dist/src/kernel/types.js.map +1 -1
  371. package/dist/src/main.d.ts.map +1 -1
  372. package/dist/src/main.js.map +1 -1
  373. package/dist/src/modules/domain/credentials/admin-user.module.d.ts.map +1 -1
  374. package/dist/src/modules/domain/credentials/admin-user.module.js.map +1 -1
  375. package/dist/src/modules/domain/credentials/approver-user.module.d.ts.map +1 -1
  376. package/dist/src/modules/domain/credentials/approver-user.module.js.map +1 -1
  377. package/dist/src/modules/domain/credentials/creation-essentials.module.d.ts.map +1 -1
  378. package/dist/src/modules/domain/credentials/creation-essentials.module.js.map +1 -1
  379. package/dist/src/modules/domain/credentials/module.types.d.ts.map +1 -1
  380. package/dist/src/modules/domain/credentials/module.types.js.map +1 -1
  381. package/dist/src/modules/domain/environment/database-config.module.d.ts.map +1 -1
  382. package/dist/src/modules/domain/environment/database-config.module.js.map +1 -1
  383. package/dist/src/modules/domain/environment/module.types.d.ts.map +1 -1
  384. package/dist/src/modules/domain/environment/module.types.js.map +1 -1
  385. package/dist/src/modules/domain/environment/paths-config.module.d.ts.map +1 -1
  386. package/dist/src/modules/domain/environment/paths-config.module.js.map +1 -1
  387. package/dist/src/modules/domain/environment/runtime-selector.module.d.ts.map +1 -1
  388. package/dist/src/modules/domain/environment/runtime-selector.module.js.map +1 -1
  389. package/dist/src/modules/domain/environment/runtime-semantics.module.d.ts.map +1 -1
  390. package/dist/src/modules/domain/environment/runtime-semantics.module.js.map +1 -1
  391. package/dist/src/modules/domain/module.types.d.ts.map +1 -1
  392. package/dist/src/modules/domain/module.types.js.map +1 -1
  393. package/dist/src/services/application/app-bootstrap.service.d.ts.map +1 -1
  394. package/dist/src/services/application/app-bootstrap.service.js.map +1 -1
  395. package/dist/src/services/application/app-env.service.d.ts.map +1 -1
  396. package/dist/src/services/application/app-env.service.js.map +1 -1
  397. package/dist/src/services/application/app-local-runtime-addresses.service.d.ts.map +1 -1
  398. package/dist/src/services/application/app-local-runtime-addresses.service.js.map +1 -1
  399. package/dist/src/services/application/app-runtime-targets.service.d.ts.map +1 -1
  400. package/dist/src/services/application/app-runtime-targets.service.js.map +1 -1
  401. package/dist/src/services/application/app-schema-bootstrap.service.d.ts.map +1 -1
  402. package/dist/src/services/application/app-schema-bootstrap.service.js.map +1 -1
  403. package/dist/src/services/application/application-assets-delivery.service.d.ts.map +1 -1
  404. package/dist/src/services/application/application-assets-delivery.service.js.map +1 -1
  405. package/dist/src/services/application/application-browser-smoke.service.d.ts.map +1 -1
  406. package/dist/src/services/application/application-browser-smoke.service.js.map +1 -1
  407. package/dist/src/services/application/application-creation-readiness.service.d.ts.map +1 -1
  408. package/dist/src/services/application/application-creation-readiness.service.js.map +1 -1
  409. package/dist/src/services/application/application-dependency-alignment.service.d.ts.map +1 -1
  410. package/dist/src/services/application/application-dependency-alignment.service.js.map +1 -1
  411. package/dist/src/services/application/application-dev-port-offsets.d.ts.map +1 -1
  412. package/dist/src/services/application/application-dev-port-offsets.js.map +1 -1
  413. package/dist/src/services/application/application-initialization-verification.service.d.ts.map +1 -1
  414. package/dist/src/services/application/application-initialization-verification.service.js.map +1 -1
  415. package/dist/src/services/application/application-root.utils.d.ts.map +1 -1
  416. package/dist/src/services/application/application-root.utils.js.map +1 -1
  417. package/dist/src/services/application/application-runtime-bootstrap.service.d.ts.map +1 -1
  418. package/dist/src/services/application/application-runtime-bootstrap.service.js.map +1 -1
  419. package/dist/src/services/application/backend-config.paths.d.ts.map +1 -1
  420. package/dist/src/services/application/backend-config.paths.js.map +1 -1
  421. package/dist/src/services/application/composition-provider-plan.service.d.ts.map +1 -1
  422. package/dist/src/services/application/composition-provider-plan.service.js.map +1 -1
  423. package/dist/src/services/application/creation-host-readiness.service.d.ts.map +1 -1
  424. package/dist/src/services/application/creation-host-readiness.service.js.map +1 -1
  425. package/dist/src/services/application/creation-preflight.service.d.ts.map +1 -1
  426. package/dist/src/services/application/creation-preflight.service.js.map +1 -1
  427. package/dist/src/services/application/degraded-registration-declaration-convergence.service.d.ts.map +1 -1
  428. package/dist/src/services/application/degraded-registration-declaration-convergence.service.js.map +1 -1
  429. package/dist/src/services/application/dev-orchestrator.service.d.ts.map +1 -1
  430. package/dist/src/services/application/dev-orchestrator.service.js.map +1 -1
  431. package/dist/src/services/application/dev-schema-drift.service.d.ts.map +1 -1
  432. package/dist/src/services/application/dev-schema-drift.service.js.map +1 -1
  433. package/dist/src/services/application/environment-provider-configurations.service.d.ts.map +1 -1
  434. package/dist/src/services/application/environment-provider-configurations.service.js.map +1 -1
  435. package/dist/src/services/application/existing-app-bootstrap.service.d.ts.map +1 -1
  436. package/dist/src/services/application/existing-app-bootstrap.service.js.map +1 -1
  437. package/dist/src/services/application/frontend-provider-source.service.d.ts.map +1 -1
  438. package/dist/src/services/application/frontend-provider-source.service.js.map +1 -1
  439. package/dist/src/services/application/frontend-public-config-secret-screen.service.d.ts.map +1 -1
  440. package/dist/src/services/application/frontend-public-config-secret-screen.service.js.map +1 -1
  441. package/dist/src/services/application/local-app-reinit.service.d.ts.map +1 -1
  442. package/dist/src/services/application/local-app-reinit.service.js.map +1 -1
  443. package/dist/src/services/application/local-application-initialization.service.d.ts.map +1 -1
  444. package/dist/src/services/application/local-application-initialization.service.js.map +1 -1
  445. package/dist/src/services/application/provider-package-links.service.d.ts.map +1 -1
  446. package/dist/src/services/application/provider-package-links.service.js.map +1 -1
  447. package/dist/src/services/application/provider-runtime-sync.service.d.ts.map +1 -1
  448. package/dist/src/services/application/provider-runtime-sync.service.js.map +1 -1
  449. package/dist/src/services/application/saas-scaffold.service.d.ts.map +1 -1
  450. package/dist/src/services/application/saas-scaffold.service.js.map +1 -1
  451. package/dist/src/services/application/saas-skeleton.service.d.ts.map +1 -1
  452. package/dist/src/services/application/saas-skeleton.service.js.map +1 -1
  453. package/dist/src/services/application/stored-declaration-currency.service.d.ts.map +1 -1
  454. package/dist/src/services/application/stored-declaration-currency.service.js.map +1 -1
  455. package/dist/src/services/application/systems-of-record-library.service.d.ts.map +1 -1
  456. package/dist/src/services/application/systems-of-record-library.service.js.map +1 -1
  457. package/dist/src/services/catalog/service-address-resolver.service.d.ts.map +1 -1
  458. package/dist/src/services/catalog/service-address-resolver.service.js.map +1 -1
  459. package/dist/src/services/catalog/service-catalog.schemas.d.ts.map +1 -1
  460. package/dist/src/services/catalog/service-catalog.schemas.js.map +1 -1
  461. package/dist/src/services/coding-agents/acp-conformance-probe.service.d.ts.map +1 -1
  462. package/dist/src/services/coding-agents/acp-conformance-probe.service.js.map +1 -1
  463. package/dist/src/services/coding-agents/coding-agent-login.service.d.ts.map +1 -1
  464. package/dist/src/services/coding-agents/coding-agent-login.service.js.map +1 -1
  465. package/dist/src/services/companion/build-console.service.d.ts +62 -2
  466. package/dist/src/services/companion/build-console.service.d.ts.map +1 -1
  467. package/dist/src/services/companion/build-console.service.js +70 -5
  468. package/dist/src/services/companion/build-console.service.js.map +1 -1
  469. package/dist/src/services/companion/companion-client-options.utils.d.ts.map +1 -1
  470. package/dist/src/services/companion/companion-client-options.utils.js.map +1 -1
  471. package/dist/src/services/companion/companion-client.service.d.ts.map +1 -1
  472. package/dist/src/services/companion/companion-client.service.js.map +1 -1
  473. package/dist/src/services/companion/companion-health-hint.utils.d.ts.map +1 -1
  474. package/dist/src/services/companion/companion-health-hint.utils.js.map +1 -1
  475. package/dist/src/services/companion/companion-lifecycle.service.d.ts.map +1 -1
  476. package/dist/src/services/companion/companion-lifecycle.service.js.map +1 -1
  477. package/dist/src/services/companion/companion-local-token.utils.d.ts.map +1 -1
  478. package/dist/src/services/companion/companion-local-token.utils.js.map +1 -1
  479. package/dist/src/services/companion/companion.schemas.d.ts.map +1 -1
  480. package/dist/src/services/companion/companion.schemas.js.map +1 -1
  481. package/dist/src/services/companion/console-fast-path.d.ts +21 -3
  482. package/dist/src/services/companion/console-fast-path.d.ts.map +1 -1
  483. package/dist/src/services/companion/console-fast-path.js +57 -12
  484. package/dist/src/services/companion/console-fast-path.js.map +1 -1
  485. package/dist/src/services/companion/console-verb.utils.d.ts.map +1 -1
  486. package/dist/src/services/companion/console-verb.utils.js.map +1 -1
  487. package/dist/src/services/companion/creation-console.service.d.ts +76 -0
  488. package/dist/src/services/companion/creation-console.service.d.ts.map +1 -1
  489. package/dist/src/services/companion/creation-console.service.js +124 -11
  490. package/dist/src/services/companion/creation-console.service.js.map +1 -1
  491. package/dist/src/services/companion/creation-run-report.models.d.ts.map +1 -1
  492. package/dist/src/services/companion/creation-run-report.models.js.map +1 -1
  493. package/dist/src/services/companion/git-helper.service.d.ts.map +1 -1
  494. package/dist/src/services/companion/git-helper.service.js.map +1 -1
  495. package/dist/src/services/companion/local-companion-authority.service.d.ts.map +1 -1
  496. package/dist/src/services/companion/local-companion-authority.service.js.map +1 -1
  497. package/dist/src/services/companion/workbench-browser-launcher.service.d.ts.map +1 -1
  498. package/dist/src/services/companion/workbench-browser-launcher.service.js.map +1 -1
  499. package/dist/src/services/companion/workbench-cli.service.d.ts.map +1 -1
  500. package/dist/src/services/companion/workbench-cli.service.js.map +1 -1
  501. package/dist/src/services/compliance/data-retention-schedule.generator.d.ts.map +1 -1
  502. package/dist/src/services/compliance/data-retention-schedule.generator.js.map +1 -1
  503. package/dist/src/services/compliance/generated-compliance-module-wiring.d.ts +5 -3
  504. package/dist/src/services/compliance/generated-compliance-module-wiring.d.ts.map +1 -1
  505. package/dist/src/services/compliance/generated-compliance-module-wiring.js +4 -2
  506. package/dist/src/services/compliance/generated-compliance-module-wiring.js.map +1 -1
  507. package/dist/src/services/compliance/governed-document-releases.generator.d.ts.map +1 -1
  508. package/dist/src/services/compliance/governed-document-releases.generator.js.map +1 -1
  509. package/dist/src/services/compliance/legal-notice.generator.d.ts +45 -0
  510. package/dist/src/services/compliance/legal-notice.generator.d.ts.map +1 -0
  511. package/dist/src/services/compliance/legal-notice.generator.js +97 -0
  512. package/dist/src/services/compliance/legal-notice.generator.js.map +1 -0
  513. package/dist/src/services/compliance/service-consent-requirement.generator.d.ts.map +1 -1
  514. package/dist/src/services/compliance/service-consent-requirement.generator.js.map +1 -1
  515. package/dist/src/services/compliance/subject-data-recipients.generator.d.ts.map +1 -1
  516. package/dist/src/services/compliance/subject-data-recipients.generator.js.map +1 -1
  517. package/dist/src/services/context/context-manager.service.d.ts.map +1 -1
  518. package/dist/src/services/context/context-manager.service.js.map +1 -1
  519. package/dist/src/services/context/context.schemas.d.ts.map +1 -1
  520. package/dist/src/services/context/context.schemas.js.map +1 -1
  521. package/dist/src/services/context/machine-preferences.writer.d.ts.map +1 -1
  522. package/dist/src/services/context/machine-preferences.writer.js.map +1 -1
  523. package/dist/src/services/context/state-manager.service.d.ts.map +1 -1
  524. package/dist/src/services/context/state-manager.service.js.map +1 -1
  525. package/dist/src/services/credentials/application-secret-owners.service.d.ts.map +1 -1
  526. package/dist/src/services/credentials/application-secret-owners.service.js.map +1 -1
  527. package/dist/src/services/credentials/application-secrets.service.d.ts.map +1 -1
  528. package/dist/src/services/credentials/application-secrets.service.js.map +1 -1
  529. package/dist/src/services/credentials/ci-secrets-adapter.service.d.ts.map +1 -1
  530. package/dist/src/services/credentials/ci-secrets-adapter.service.js.map +1 -1
  531. package/dist/src/services/credentials/composed-provider-catalogue.d.ts.map +1 -1
  532. package/dist/src/services/credentials/composed-provider-catalogue.js.map +1 -1
  533. package/dist/src/services/credentials/credentials.schemas.d.ts.map +1 -1
  534. package/dist/src/services/credentials/credentials.schemas.js.map +1 -1
  535. package/dist/src/services/credentials/credentials.service.d.ts.map +1 -1
  536. package/dist/src/services/credentials/credentials.service.js.map +1 -1
  537. package/dist/src/services/credentials/framework-managed-secrets.d.ts.map +1 -1
  538. package/dist/src/services/credentials/framework-managed-secrets.js.map +1 -1
  539. package/dist/src/services/credentials/local-defaults.service.d.ts.map +1 -1
  540. package/dist/src/services/credentials/local-defaults.service.js.map +1 -1
  541. package/dist/src/services/credentials/local-secrets-store.service.d.ts.map +1 -1
  542. package/dist/src/services/credentials/local-secrets-store.service.js.map +1 -1
  543. package/dist/src/services/credentials/provider-env-vars.utils.d.ts.map +1 -1
  544. package/dist/src/services/credentials/provider-env-vars.utils.js.map +1 -1
  545. package/dist/src/services/credentials/provider-secret-format.d.ts.map +1 -1
  546. package/dist/src/services/credentials/provider-secret-format.js.map +1 -1
  547. package/dist/src/services/credentials/remote-secrets-store.service.d.ts.map +1 -1
  548. package/dist/src/services/credentials/remote-secrets-store.service.js.map +1 -1
  549. package/dist/src/services/credentials/secret-requirements.service.d.ts.map +1 -1
  550. package/dist/src/services/credentials/secret-requirements.service.js.map +1 -1
  551. package/dist/src/services/credentials/secrets-provisioning.service.d.ts.map +1 -1
  552. package/dist/src/services/credentials/secrets-provisioning.service.js.map +1 -1
  553. package/dist/src/services/credentials/secrets-reader.service.d.ts.map +1 -1
  554. package/dist/src/services/credentials/secrets-reader.service.js.map +1 -1
  555. package/dist/src/services/credentials/secrets-rotation.service.d.ts.map +1 -1
  556. package/dist/src/services/credentials/secrets-rotation.service.js.map +1 -1
  557. package/dist/src/services/credentials/secrets-writer.service.d.ts.map +1 -1
  558. package/dist/src/services/credentials/secrets-writer.service.js.map +1 -1
  559. package/dist/src/services/data-services/data-services.schemas.d.ts.map +1 -1
  560. package/dist/src/services/data-services/data-services.schemas.js.map +1 -1
  561. package/dist/src/services/data-services/data-services.service.d.ts.map +1 -1
  562. package/dist/src/services/data-services/data-services.service.js.map +1 -1
  563. package/dist/src/services/deployment/apps-manager-diagnostics.service.d.ts.map +1 -1
  564. package/dist/src/services/deployment/apps-manager-diagnostics.service.js.map +1 -1
  565. package/dist/src/services/deployment/ci-deploy-generator.service.d.ts.map +1 -1
  566. package/dist/src/services/deployment/ci-deploy-generator.service.js.map +1 -1
  567. package/dist/src/services/deployment/ci-workflow-generator.service.d.ts.map +1 -1
  568. package/dist/src/services/deployment/ci-workflow-generator.service.js.map +1 -1
  569. package/dist/src/services/deployment/docker/backing-service-health-watch.d.ts.map +1 -1
  570. package/dist/src/services/deployment/docker/backing-service-health-watch.js.map +1 -1
  571. package/dist/src/services/deployment/docker/compose-service-health.d.ts.map +1 -1
  572. package/dist/src/services/deployment/docker/compose-service-health.js.map +1 -1
  573. package/dist/src/services/deployment/docker/docker-compose-generator.service.d.ts.map +1 -1
  574. package/dist/src/services/deployment/docker/docker-compose-generator.service.js.map +1 -1
  575. package/dist/src/services/deployment/docker/docker-compose-readiness.service.d.ts.map +1 -1
  576. package/dist/src/services/deployment/docker/docker-compose-readiness.service.js.map +1 -1
  577. package/dist/src/services/deployment/docker/docker.schemas.d.ts.map +1 -1
  578. package/dist/src/services/deployment/docker/docker.schemas.js.map +1 -1
  579. package/dist/src/services/deployment/docker/docker.service.d.ts.map +1 -1
  580. package/dist/src/services/deployment/docker/docker.service.js.map +1 -1
  581. package/dist/src/services/deployment/docker/local-data-adoption.service.d.ts.map +1 -1
  582. package/dist/src/services/deployment/docker/local-data-adoption.service.js.map +1 -1
  583. package/dist/src/services/deployment/host-toolchain-readiness.service.d.ts.map +1 -1
  584. package/dist/src/services/deployment/host-toolchain-readiness.service.js.map +1 -1
  585. package/dist/src/services/deployment/infra-writer.service.d.ts.map +1 -1
  586. package/dist/src/services/deployment/infra-writer.service.js.map +1 -1
  587. package/dist/src/services/deployment/k8s/cluster-controller-charts.constants.d.ts.map +1 -1
  588. package/dist/src/services/deployment/k8s/cluster-controller-charts.constants.js.map +1 -1
  589. package/dist/src/services/deployment/k8s/k8s-bootstrap.service.d.ts.map +1 -1
  590. package/dist/src/services/deployment/k8s/k8s-bootstrap.service.js.map +1 -1
  591. package/dist/src/services/deployment/k8s/k8s-local-infra-readiness.service.d.ts.map +1 -1
  592. package/dist/src/services/deployment/k8s/k8s-local-infra-readiness.service.js.map +1 -1
  593. package/dist/src/services/deployment/k8s/k8s-manifest-generator.service.d.ts.map +1 -1
  594. package/dist/src/services/deployment/k8s/k8s-manifest-generator.service.js.map +1 -1
  595. package/dist/src/services/deployment/k8s/k8s-manifest.schemas.d.ts.map +1 -1
  596. package/dist/src/services/deployment/k8s/k8s-manifest.schemas.js.map +1 -1
  597. package/dist/src/services/deployment/k8s/k8s-operations.service.d.ts.map +1 -1
  598. package/dist/src/services/deployment/k8s/k8s-operations.service.js.map +1 -1
  599. package/dist/src/services/deployment/k8s/k8s-secrets-generator.service.d.ts.map +1 -1
  600. package/dist/src/services/deployment/k8s/k8s-secrets-generator.service.js.map +1 -1
  601. package/dist/src/services/deployment/k8s/k8s.schemas.d.ts.map +1 -1
  602. package/dist/src/services/deployment/k8s/k8s.schemas.js.map +1 -1
  603. package/dist/src/services/deployment/k8s/kind.service.d.ts.map +1 -1
  604. package/dist/src/services/deployment/k8s/kind.service.js.map +1 -1
  605. package/dist/src/services/deployment/k8s/local-k8s-application-pruning.service.d.ts.map +1 -1
  606. package/dist/src/services/deployment/k8s/local-k8s-application-pruning.service.js.map +1 -1
  607. package/dist/src/services/deployment/local-dev-observer-lifecycle.d.ts.map +1 -1
  608. package/dist/src/services/deployment/local-dev-observer-lifecycle.js.map +1 -1
  609. package/dist/src/services/deployment/local-dev-output-boundary.d.ts.map +1 -1
  610. package/dist/src/services/deployment/local-dev-output-boundary.js.map +1 -1
  611. package/dist/src/services/deployment/local-dev-session-lease.service.d.ts.map +1 -1
  612. package/dist/src/services/deployment/local-dev-session-lease.service.js.map +1 -1
  613. package/dist/src/services/deployment/local-dev-shutdown-coordinator.d.ts.map +1 -1
  614. package/dist/src/services/deployment/local-dev-shutdown-coordinator.js.map +1 -1
  615. package/dist/src/services/deployment/local-infrastructure-initialization.service.d.ts.map +1 -1
  616. package/dist/src/services/deployment/local-infrastructure-initialization.service.js.map +1 -1
  617. package/dist/src/services/deployment/local-precondition-checks.schemas.d.ts.map +1 -1
  618. package/dist/src/services/deployment/local-precondition-checks.schemas.js.map +1 -1
  619. package/dist/src/services/deployment/local-precondition-checks.service.d.ts.map +1 -1
  620. package/dist/src/services/deployment/local-precondition-checks.service.js.map +1 -1
  621. package/dist/src/services/deployment/local-runtime-process-cleanup.service.d.ts.map +1 -1
  622. package/dist/src/services/deployment/local-runtime-process-cleanup.service.js.map +1 -1
  623. package/dist/src/services/deployment/platform-lifecycle.service.d.ts.map +1 -1
  624. package/dist/src/services/deployment/platform-lifecycle.service.js.map +1 -1
  625. package/dist/src/services/deployment/platform-runtime-policy.service.d.ts.map +1 -1
  626. package/dist/src/services/deployment/platform-runtime-policy.service.js.map +1 -1
  627. package/dist/src/services/deployment/version-compare.utils.d.ts.map +1 -1
  628. package/dist/src/services/deployment/version-compare.utils.js.map +1 -1
  629. package/dist/src/services/design-tokens/design-tokens-command.service.d.ts.map +1 -1
  630. package/dist/src/services/design-tokens/design-tokens-command.service.js.map +1 -1
  631. package/dist/src/services/design-tokens/design-tokens-config.service.d.ts.map +1 -1
  632. package/dist/src/services/design-tokens/design-tokens-config.service.js.map +1 -1
  633. package/dist/src/services/design-tokens/design-tokens-config.template.d.ts.map +1 -1
  634. package/dist/src/services/design-tokens/design-tokens-config.template.js.map +1 -1
  635. package/dist/src/services/design-tokens/design-tokens-css-block.service.d.ts.map +1 -1
  636. package/dist/src/services/design-tokens/design-tokens-css-block.service.js.map +1 -1
  637. package/dist/src/services/design-tokens/design-tokens-paths.service.d.ts.map +1 -1
  638. package/dist/src/services/design-tokens/design-tokens-paths.service.js.map +1 -1
  639. package/dist/src/services/design-tokens/design-tokens.constants.d.ts.map +1 -1
  640. package/dist/src/services/design-tokens/design-tokens.constants.js.map +1 -1
  641. package/dist/src/services/design-tokens/design-tokens.models.d.ts.map +1 -1
  642. package/dist/src/services/design-tokens/design-tokens.models.js.map +1 -1
  643. package/dist/src/services/environment/application-backing-service-addressing.utils.d.ts.map +1 -1
  644. package/dist/src/services/environment/application-backing-service-addressing.utils.js.map +1 -1
  645. package/dist/src/services/environment/authored-infra-config.utils.d.ts.map +1 -1
  646. package/dist/src/services/environment/authored-infra-config.utils.js.map +1 -1
  647. package/dist/src/services/environment/env-configuration-generator.service.d.ts.map +1 -1
  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.map +1 -1
  651. package/dist/src/services/environment/env-vars-builder.service.d.ts.map +1 -1
  652. package/dist/src/services/environment/env-vars-builder.service.js.map +1 -1
  653. package/dist/src/services/environment/environment-hydration.utils.d.ts.map +1 -1
  654. package/dist/src/services/environment/environment-hydration.utils.js.map +1 -1
  655. package/dist/src/services/environment/environment-lifecycle.service.d.ts.map +1 -1
  656. package/dist/src/services/environment/environment-lifecycle.service.js.map +1 -1
  657. package/dist/src/services/environment/environment-paths.service.d.ts.map +1 -1
  658. package/dist/src/services/environment/environment-paths.service.js.map +1 -1
  659. package/dist/src/services/environment/environment-registry.service.d.ts.map +1 -1
  660. package/dist/src/services/environment/environment-registry.service.js.map +1 -1
  661. package/dist/src/services/environment/environment-setup.service.d.ts.map +1 -1
  662. package/dist/src/services/environment/environment-setup.service.js.map +1 -1
  663. package/dist/src/services/environment/environment.schemas.d.ts.map +1 -1
  664. package/dist/src/services/environment/environment.schemas.js.map +1 -1
  665. package/dist/src/services/environment/environment.service.d.ts.map +1 -1
  666. package/dist/src/services/environment/environment.service.js.map +1 -1
  667. package/dist/src/services/environment/hosted-infrastructure-leftovers.service.d.ts.map +1 -1
  668. package/dist/src/services/environment/hosted-infrastructure-leftovers.service.js.map +1 -1
  669. package/dist/src/services/environment/infrastructure-host.service.d.ts.map +1 -1
  670. package/dist/src/services/environment/infrastructure-host.service.js.map +1 -1
  671. package/dist/src/services/environment/platform-engine-change.utils.d.ts.map +1 -1
  672. package/dist/src/services/environment/platform-engine-change.utils.js.map +1 -1
  673. package/dist/src/services/environment/platform-runtime-state.service.d.ts.map +1 -1
  674. package/dist/src/services/environment/platform-runtime-state.service.js.map +1 -1
  675. package/dist/src/services/environment/platform-runtime.schemas.d.ts.map +1 -1
  676. package/dist/src/services/environment/platform-runtime.schemas.js.map +1 -1
  677. package/dist/src/services/environment/runtime-bootstrap.service.d.ts.map +1 -1
  678. package/dist/src/services/environment/runtime-bootstrap.service.js.map +1 -1
  679. package/dist/src/services/framework/application-claude-settings.d.ts +39 -5
  680. package/dist/src/services/framework/application-claude-settings.d.ts.map +1 -1
  681. package/dist/src/services/framework/application-claude-settings.js +100 -25
  682. package/dist/src/services/framework/application-claude-settings.js.map +1 -1
  683. package/dist/src/services/framework/application-rule-imports.d.ts.map +1 -1
  684. package/dist/src/services/framework/application-rule-imports.js.map +1 -1
  685. package/dist/src/services/framework/claude-plugin-compiler.d.ts.map +1 -1
  686. package/dist/src/services/framework/claude-plugin-compiler.js +3 -2
  687. package/dist/src/services/framework/claude-plugin-compiler.js.map +1 -1
  688. package/dist/src/services/framework/dev-compile-status.paths.d.ts.map +1 -1
  689. package/dist/src/services/framework/dev-compile-status.paths.js.map +1 -1
  690. package/dist/src/services/framework/framework-development-skills-sync.service.d.ts.map +1 -1
  691. package/dist/src/services/framework/framework-development-skills-sync.service.js.map +1 -1
  692. package/dist/src/services/framework/framework-docker-publish.service.d.ts.map +1 -1
  693. package/dist/src/services/framework/framework-docker-publish.service.js.map +1 -1
  694. package/dist/src/services/framework/framework-knowledge-application-guidance.validator.d.ts.map +1 -1
  695. package/dist/src/services/framework/framework-knowledge-application-guidance.validator.js.map +1 -1
  696. package/dist/src/services/framework/framework-knowledge-audit.service.d.ts.map +1 -1
  697. package/dist/src/services/framework/framework-knowledge-audit.service.js.map +1 -1
  698. package/dist/src/services/framework/framework-knowledge-generation.service.d.ts.map +1 -1
  699. package/dist/src/services/framework/framework-knowledge-generation.service.js.map +1 -1
  700. package/dist/src/services/framework/framework-knowledge-scan.constants.d.ts.map +1 -1
  701. package/dist/src/services/framework/framework-knowledge-scan.constants.js.map +1 -1
  702. package/dist/src/services/framework/framework-npm-publish.service.d.ts.map +1 -1
  703. package/dist/src/services/framework/framework-npm-publish.service.js.map +1 -1
  704. package/dist/src/services/framework/framework-publish-manifest.service.d.ts.map +1 -1
  705. package/dist/src/services/framework/framework-publish-manifest.service.js.map +1 -1
  706. package/dist/src/services/framework/framework-release.service.d.ts.map +1 -1
  707. package/dist/src/services/framework/framework-release.service.js.map +1 -1
  708. package/dist/src/services/framework/framework-update.service.d.ts.map +1 -1
  709. package/dist/src/services/framework/framework-update.service.js.map +1 -1
  710. package/dist/src/services/framework/framework-version.service.d.ts.map +1 -1
  711. package/dist/src/services/framework/framework-version.service.js.map +1 -1
  712. package/dist/src/services/framework/frontend-component-catalog.generator.d.ts.map +1 -1
  713. package/dist/src/services/framework/frontend-component-catalog.generator.js.map +1 -1
  714. package/dist/src/services/framework/frontend-library-root-exports.d.ts.map +1 -1
  715. package/dist/src/services/framework/frontend-library-root-exports.js.map +1 -1
  716. package/dist/src/services/framework/installed-framework-assets.service.d.ts.map +1 -1
  717. package/dist/src/services/framework/installed-framework-assets.service.js.map +1 -1
  718. package/dist/src/services/framework/npm-registry-output.d.ts.map +1 -1
  719. package/dist/src/services/framework/npm-registry-output.js.map +1 -1
  720. package/dist/src/services/framework/package-install.service.d.ts.map +1 -1
  721. package/dist/src/services/framework/package-install.service.js.map +1 -1
  722. package/dist/src/services/framework/provider-transposition/activepieces-source.reader.d.ts.map +1 -1
  723. package/dist/src/services/framework/provider-transposition/activepieces-source.reader.js.map +1 -1
  724. package/dist/src/services/framework/provider-transposition/api-version-settlement.d.ts.map +1 -1
  725. package/dist/src/services/framework/provider-transposition/api-version-settlement.js.map +1 -1
  726. package/dist/src/services/framework/provider-transposition/base-url-settlement.d.ts.map +1 -1
  727. package/dist/src/services/framework/provider-transposition/base-url-settlement.js.map +1 -1
  728. package/dist/src/services/framework/provider-transposition/openapi-enrichment.d.ts.map +1 -1
  729. package/dist/src/services/framework/provider-transposition/openapi-enrichment.js.map +1 -1
  730. package/dist/src/services/framework/provider-transposition/openapi-source.reader.d.ts.map +1 -1
  731. package/dist/src/services/framework/provider-transposition/openapi-source.reader.js.map +1 -1
  732. package/dist/src/services/framework/provider-transposition/provider-catalogue-record.d.ts.map +1 -1
  733. package/dist/src/services/framework/provider-transposition/provider-catalogue-record.js.map +1 -1
  734. package/dist/src/services/framework/provider-transposition/provider-merge.d.ts.map +1 -1
  735. package/dist/src/services/framework/provider-transposition/provider-merge.js.map +1 -1
  736. package/dist/src/services/framework/provider-transposition/provider-package.emitter.d.ts.map +1 -1
  737. package/dist/src/services/framework/provider-transposition/provider-package.emitter.js.map +1 -1
  738. package/dist/src/services/framework/provider-transposition/request-helper-url.d.ts.map +1 -1
  739. package/dist/src/services/framework/provider-transposition/request-helper-url.js.map +1 -1
  740. package/dist/src/services/framework/provider-transposition/sim-source.reader.d.ts.map +1 -1
  741. package/dist/src/services/framework/provider-transposition/sim-source.reader.js.map +1 -1
  742. package/dist/src/services/framework/provider-transposition/source-static-evaluator.d.ts.map +1 -1
  743. package/dist/src/services/framework/provider-transposition/source-static-evaluator.js.map +1 -1
  744. package/dist/src/services/framework/provider-transposition/transposed-provider.model.d.ts.map +1 -1
  745. package/dist/src/services/framework/provider-transposition/transposed-provider.model.js.map +1 -1
  746. package/dist/src/services/framework/provider-transposition/url-template.extractor.d.ts.map +1 -1
  747. package/dist/src/services/framework/provider-transposition/url-template.extractor.js.map +1 -1
  748. package/dist/src/services/frontend/cloudflare-cdn.service.d.ts.map +1 -1
  749. package/dist/src/services/frontend/cloudflare-cdn.service.js.map +1 -1
  750. package/dist/src/services/frontend/frontend-dist-uploader.service.d.ts.map +1 -1
  751. package/dist/src/services/frontend/frontend-dist-uploader.service.js.map +1 -1
  752. package/dist/src/services/frontend/frontend-publish.service.d.ts.map +1 -1
  753. package/dist/src/services/frontend/frontend-publish.service.js.map +1 -1
  754. package/dist/src/services/generation/domain-generator.service.d.ts.map +1 -1
  755. package/dist/src/services/generation/domain-generator.service.js.map +1 -1
  756. package/dist/src/services/generation/generator.schemas.d.ts.map +1 -1
  757. package/dist/src/services/generation/generator.schemas.js.map +1 -1
  758. package/dist/src/services/generation/operation-generator.service.d.ts.map +1 -1
  759. package/dist/src/services/generation/operation-generator.service.js.map +1 -1
  760. package/dist/src/services/generation/resource-generator.service.d.ts.map +1 -1
  761. package/dist/src/services/generation/resource-generator.service.js.map +1 -1
  762. package/dist/src/services/generation/template-registry.service.d.ts.map +1 -1
  763. package/dist/src/services/generation/template-registry.service.js.map +1 -1
  764. package/dist/src/services/registry/artifact-extractor.utils.d.ts.map +1 -1
  765. package/dist/src/services/registry/artifact-extractor.utils.js.map +1 -1
  766. package/dist/src/services/registry/artifact-trust.utils.d.ts.map +1 -1
  767. package/dist/src/services/registry/artifact-trust.utils.js.map +1 -1
  768. package/dist/src/services/registry/boundary-fanout.utils.d.ts.map +1 -1
  769. package/dist/src/services/registry/boundary-fanout.utils.js.map +1 -1
  770. package/dist/src/services/registry/git-ignored-paths.utils.d.ts.map +1 -1
  771. package/dist/src/services/registry/git-ignored-paths.utils.js.map +1 -1
  772. package/dist/src/services/registry/index.d.ts.map +1 -1
  773. package/dist/src/services/registry/index.js.map +1 -1
  774. package/dist/src/services/registry/installed-file-state.utils.d.ts.map +1 -1
  775. package/dist/src/services/registry/installed-file-state.utils.js.map +1 -1
  776. package/dist/src/services/registry/local-checkout-module-source.service.d.ts.map +1 -1
  777. package/dist/src/services/registry/local-checkout-module-source.service.js.map +1 -1
  778. package/dist/src/services/registry/migration-obligation.utils.d.ts.map +1 -1
  779. package/dist/src/services/registry/migration-obligation.utils.js.map +1 -1
  780. package/dist/src/services/registry/module-acquisition.utils.d.ts.map +1 -1
  781. package/dist/src/services/registry/module-acquisition.utils.js.map +1 -1
  782. package/dist/src/services/registry/module-artifact-files.utils.d.ts.map +1 -1
  783. package/dist/src/services/registry/module-artifact-files.utils.js.map +1 -1
  784. package/dist/src/services/registry/module-registration.service.d.ts.map +1 -1
  785. package/dist/src/services/registry/module-registration.service.js.map +1 -1
  786. package/dist/src/services/registry/module-requirements.service.d.ts.map +1 -1
  787. package/dist/src/services/registry/module-requirements.service.js.map +1 -1
  788. package/dist/src/services/registry/provider-install-step.d.ts.map +1 -1
  789. package/dist/src/services/registry/provider-install-step.js.map +1 -1
  790. package/dist/src/services/registry/provider-module-checks.service.d.ts.map +1 -1
  791. package/dist/src/services/registry/provider-module-checks.service.js.map +1 -1
  792. package/dist/src/services/registry/provider-module-identity.service.d.ts.map +1 -1
  793. package/dist/src/services/registry/provider-module-identity.service.js.map +1 -1
  794. package/dist/src/services/registry/provider-wiring.service.d.ts.map +1 -1
  795. package/dist/src/services/registry/provider-wiring.service.js.map +1 -1
  796. package/dist/src/services/registry/registry-command.utils.d.ts.map +1 -1
  797. package/dist/src/services/registry/registry-command.utils.js.map +1 -1
  798. package/dist/src/services/registry/registry-config-resolver.service.d.ts.map +1 -1
  799. package/dist/src/services/registry/registry-config-resolver.service.js.map +1 -1
  800. package/dist/src/services/registry/registry-credentials.service.d.ts.map +1 -1
  801. package/dist/src/services/registry/registry-credentials.service.js.map +1 -1
  802. package/dist/src/services/registry/saas-root-required.error.d.ts.map +1 -1
  803. package/dist/src/services/registry/saas-root-required.error.js.map +1 -1
  804. package/dist/src/services/security/csp-sync.service.d.ts.map +1 -1
  805. package/dist/src/services/security/csp-sync.service.js.map +1 -1
  806. package/dist/src/services/tools/utility-tools.service.d.ts.map +1 -1
  807. package/dist/src/services/tools/utility-tools.service.js.map +1 -1
  808. package/dist/src/services/tracker/creation-run-tracker.service.d.ts.map +1 -1
  809. package/dist/src/services/tracker/creation-run-tracker.service.js.map +1 -1
  810. package/dist/src/services/website/website-label-pack-audit.service.d.ts.map +1 -1
  811. package/dist/src/services/website/website-label-pack-audit.service.js.map +1 -1
  812. package/dist/src/services/website/website-structured-data-audit.service.d.ts.map +1 -1
  813. package/dist/src/services/website/website-structured-data-audit.service.js.map +1 -1
  814. package/dist/src/services/website/website-workspace.service.d.ts.map +1 -1
  815. package/dist/src/services/website/website-workspace.service.js.map +1 -1
  816. package/dist/tsconfig.build.tsbuildinfo +1 -0
  817. package/dist/tsconfig.tsbuildinfo +1 -0
  818. package/package.json +17 -17
  819. package/templates/saas/i18n/email/email-template-definitions.ts +5 -1
  820. package/templates/saas/scenarios/add-locale/files/website/src/i18n/__localePath__.json.hbs +21 -1
  821. package/templates/saas/scenarios/add-locale/files/website/src/pages/__localePath__/index.astro +1 -0
  822. package/templates/saas/scenarios/add-marketing-page/files/website/src/pages/__pageRef__.astro.hbs +1 -0
  823. package/templates/saas/scenarios/add-module/scenario.json +5 -0
  824. package/templates/saas/scenarios/add-website/files/website/src/components/FooterComponent.tsx.hbs +14 -6
  825. package/templates/saas/scenarios/add-website/files/website/src/content/llms.txt.hbs +3 -3
  826. package/templates/saas/scenarios/add-website/files/website/src/i18n/en.json.hbs +4 -0
  827. package/templates/saas/scenarios/add-website/files/website/src/pages/index.astro +1 -0
  828. package/templates/saas/scenarios/add-website/files/website/src/pages/llms.txt.ts +3 -1
  829. package/templates/saas/scenarios/add-website/files/website/src/styles/website.css +14 -0
  830. package/templates/saas/skeleton/backend-api/src/engine/email/email-template-definitions.ts +5 -1
  831. package/templates/saas/skeleton/shared-lib/src/engine/roles.ts +10 -2
  832. package/templates/saas/skeleton/specifications/src/companion-exports.ts +28 -3
  833. package/wildo-framework.info.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"diff.command.js","sourceRoot":"","sources":["../../../../../../src/commands/db/diff.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AACxE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACvB,oBAAoB,GAGrB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,EAAE,UAAU,EAAE,MAAM,8CAA8C,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,qDAAqD,CAAC;AACtF,OAAO,EAAE,0BAA0B,EAAE,sBAAsB,EAAE,MAAM,6CAA6C,CAAC;AAEjH,MAAM,iBAAiB,GAAqF;IAC1G,CAAC,oBAAoB,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE;IAClE,CAAC,oBAAoB,CAAC,WAAW,CAAC,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,GAAG,EAAE,KAAK,EAAE,aAAa,EAAE;IAC9E,CAAC,oBAAoB,CAAC,uBAAuB,CAAC,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,EAAE,KAAK,EAAE,gBAAgB,EAAE;CACjG,CAA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AA4B,KAAK,CAAC,YAAY,0CAA0C;kBACtF,2GAA2G;kBAC3G,6BAA6B,CAChC,CAAC;YACF,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;QAC5B,CAAC;QACD,GAAG,CAAC,GAAG,CAAC,IAAI,CACV,8CAA8C,UAAU,WAAW;cACjE,qHAAqH,CACxH,CAAC;QACF,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC3B,CAAC;IAEO,YAAY,CAAC,GAAmB,EAAE,OAA2B;QACnE,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACjB,IAAI,YAAY,GAAG,EAAE,CAAC;QACtB,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;YAC7B,IAAI,MAAM,CAAC,SAAS,KAAK,YAAY,EAAE,CAAC;gBACtC,YAAY,GAAG,MAAM,CAAC,SAAS,CAAC;gBAChC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,YAAY,EAAE,CAAC,CAAC,CAAC;YAChD,CAAC;YACD,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,iBAAiB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YACxD,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,IAAI,MAAM,CAAC,UAAU,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;QACnH,CAAC;IACH,CAAC;CACF","sourcesContent":["/**\n * `wildo db diff` — compare the application's CURRENT resource model against its committed\n * schema-plan lockfile, and report the physical changes that separate them.\n *\n * Phase 1 of `.claude/plans/postgresql-incremental-schema-migrations.md`. Three modes:\n *\n * - **plain** — print the change set (or \"in sync\"). Reports, generates nothing, applies nothing.\n * - **`--check`** — exit non-zero when drift exists (or no lockfile is committed). This is the CI\n * ratchet: it does not decide what is correct, it refuses to let the answer stay implicit — the\n * same trade `check:browser-wait-gating` makes. Without it the lockfile rots like every\n * unenforced snapshot.\n * - **`--update-lockfile`** — accept the current model as the new baseline and write the canonical\n * lockfile bytes WITHOUT a migration. `wildo db generate` owns the lockfile write, including the\n * INITIAL baseline, which it writes beside the migration that creates the tables (#1144). This flag\n * remains for absorbing a planner-contract bump that changed nothing physical, and for replacing a\n * corrupt lockfile. Used as a first baseline it records a plan whose tables no migration created.\n *\n * ## Why the model is computed in a SPAWNED node process inside the app workspace\n *\n * The current model is the app's OWN modules (shared + backend) merged with the engine core — code\n * that lives in the app's dependency universe, not the CLI's. Importing it here would bind the app\n * to the CLI's engine version and its zod instance (decorator state lives on the zod instance, so\n * two copies silently produce a registry with no decorators). The runner resolves everything\n * through the APP's `node_modules`, exactly as the app's own boot does, and hands back only JSON.\n *\n * The runner imports `<backend-api>/dist/modules-registry.backend.js` — the scaffold's canonical\n * module-assembly file — and feeds `buildApplicationInitializationConfig()`'s six resource fields\n * into the engine's `createStandaloneSchemaPlanning` (real registry classes, no runtime, no\n * database). Parsing and DIFFING then happen back here in-process: both are pure functions over the\n * two lockfiles, and the CLI's own `@wildo-ai/saas-backend-lib` provides them.\n */\n\nimport chalk from 'chalk';\nimport { existsSync, mkdirSync, readFileSync, writeFileSync } from 'fs';\nimport { join } from 'path';\nimport {\n diffSchemaPlanLockfiles,\n parseSchemaPlanLockfile,\n SchemaPlanChangeRisk,\n type SchemaPlanChange,\n type SchemaPlanLockfile,\n} from '@wildo-ai/saas-backend-lib';\nimport { BaseCommand } from '~wildo-cli/kernel/base-command';\nimport { CommandCategory } from '~wildo-cli/kernel/types';\nimport type { CommandMeta, CommandContext, CommandResult } from '~wildo-cli/kernel/types';\nimport { ErrorUtils } from '~wildo-cli/infrastructure/errors/error.utils';\nimport { requireSaasRoot } from '~wildo-cli/services/registry/registry-command.utils';\nimport { computeCurrentLockfileJson, LOCKFILE_RELATIVE_PATH } from '~wildo-cli/commands/db/db-schema-plan.utils';\n\nconst RISK_PRESENTATION: Record<SchemaPlanChangeRisk, { paint: (text: string) => string; label: string }> = {\n [SchemaPlanChangeRisk.SAFE]: { paint: chalk.green, label: 'SAFE' },\n [SchemaPlanChangeRisk.DESTRUCTIVE]: { paint: chalk.red, label: 'DESTRUCTIVE' },\n [SchemaPlanChangeRisk.REQUIRES_DATA_MIGRATION]: { paint: chalk.yellow, label: 'DATA-MIGRATION' },\n};\n\nexport default class DbDiffCommand extends BaseCommand {\n readonly meta: CommandMeta = {\n name: 'db diff',\n description: 'Diff the resource model against the committed schema-plan lockfile (PostgreSQL migrations, Phase 1).',\n category: CommandCategory.Config,\n flags: {\n check: {\n type: 'boolean',\n description: 'Exit non-zero on any drift (CI ratchet). Reports only; never writes.',\n default: false,\n },\n 'update-lockfile': {\n type: 'boolean',\n description: 'Accept the current model as the new baseline and write the canonical lockfile.',\n default: false,\n },\n },\n };\n\n async run(ctx: CommandContext): Promise<CommandResult> {\n const saasRoot = requireSaasRoot(ctx, 'db-diff');\n if (!saasRoot) return { success: false };\n\n const check = ctx.flags.check === true;\n const updateLockfile = ctx.flags['update-lockfile'] === true;\n if (check && updateLockfile) {\n ctx.log.error('`--check` and `--update-lockfile` are mutually exclusive: a CI gate that rewrites its own baseline gates nothing.');\n return { success: false };\n }\n\n const currentJson = computeCurrentLockfileJson(ctx, saasRoot);\n if (currentJson === undefined) return { success: false };\n const current = parseSchemaPlanLockfile(currentJson);\n\n const lockfilePath = join(saasRoot, LOCKFILE_RELATIVE_PATH);\n if (!existsSync(lockfilePath)) {\n return this.handleMissingBaseline(ctx, { lockfilePath, currentJson, current, check, updateLockfile });\n }\n\n let accepted: SchemaPlanLockfile;\n try {\n accepted = parseSchemaPlanLockfile(readFileSync(lockfilePath, 'utf-8'));\n } catch (error) {\n ctx.log.error(\n `Committed lockfile at ${lockfilePath} fails strict parsing — ${ErrorUtils.extractErrorMessage(error)}.\\n`\n + ' A lockfile written by a NEWER engine refuses to narrow under an older one; upgrade the engine, or '\n + 're-accept the baseline with `wildo db diff --update-lockfile` if the file is genuinely corrupt.',\n );\n return { success: false };\n }\n\n /**\n * A planner-contract mismatch is NOT drift — it is the engine having changed its mapping rules\n * (C2), a different state with its own workflow (Phase 4). Reporting it as a wall of column\n * changes would bury the one fact that explains all of them.\n */\n if (accepted.plannerContractVersion !== current.plannerContractVersion) {\n ctx.log.error(\n `Planner contract mismatch: the lockfile was accepted under version ${accepted.plannerContractVersion}, `\n + `the engine now plans under version ${current.plannerContractVersion}. This is an ENGINE upgrade event, `\n + 'not application drift. Generate the upgrade migration with `wildo db generate '\n + '--accept-planner-contract --name engine-upgrade` (physical consequences become a reviewed migration); '\n + 'use `wildo db diff --update-lockfile` ONLY if the bump changed nothing physical for this application.',\n );\n return { success: false };\n }\n\n const changes = diffSchemaPlanLockfiles(accepted, current);\n if (changes.length === 0) {\n ctx.log.success(` Schema plan in sync — ${Object.keys(current.tables).length} tables, no drift.`);\n return { success: true };\n }\n\n this.printChanges(ctx, changes);\n\n if (updateLockfile) {\n writeFileSync(lockfilePath, currentJson);\n ctx.log.success(` Baseline updated: ${lockfilePath} now reflects the current model (${changes.length} change(s) accepted).`);\n ctx.log.info(' NOTE: accepting the baseline records the intent; it does NOT migrate any database. Migration generation is Phase 2.');\n return { success: true };\n }\n if (check) {\n ctx.log.error(` ${changes.length} ungenerated schema change(s) — the model has drifted from the committed lockfile.`);\n return { success: false };\n }\n ctx.log.info(`\\n ${changes.length} change(s). Generate the migration with \\`wildo db generate --name <label>\\` (it advances the lockfile beside it), or gate with \\`--check\\`.`);\n return { success: true };\n }\n\n private handleMissingBaseline(ctx: CommandContext, input: {\n lockfilePath: string;\n currentJson: string;\n current: SchemaPlanLockfile;\n check: boolean;\n updateLockfile: boolean;\n }): CommandResult {\n const tableCount = Object.keys(input.current.tables).length;\n if (input.updateLockfile) {\n mkdirSync(join(input.lockfilePath, '..'), { recursive: true });\n writeFileSync(input.lockfilePath, input.currentJson);\n ctx.log.success(` Initial baseline written: ${input.lockfilePath} (${tableCount} tables). Commit it.`);\n return { success: true };\n }\n if (input.check) {\n ctx.log.error(\n `No committed lockfile at ${input.lockfilePath} — the ratchet has no baseline to hold. `\n + 'Generate the initial migration with `wildo db generate --name initial-schema`, which writes the baseline '\n + 'beside it, and commit both.',\n );\n return { success: false };\n }\n ctx.log.info(\n ` No lockfile yet. The current model plans ${tableCount} tables; `\n + 'generate the initial migration with `wildo db generate --name initial-schema`, which writes the baseline beside it.',\n );\n return { success: true };\n }\n\n private printChanges(ctx: CommandContext, changes: SchemaPlanChange[]): void {\n ctx.log.info('');\n let currentTable = '';\n for (const change of changes) {\n if (change.tableName !== currentTable) {\n currentTable = change.tableName;\n ctx.log.info(chalk.bold(` ${currentTable}`));\n }\n const { paint, label } = RISK_PRESENTATION[change.risk];\n ctx.log.info(` ${paint(`[${label}]`)} ${change.changeType} ${chalk.cyan(change.subject)} — ${change.detail}`);\n }\n }\n}\n"]}
1
+ {"version":3,"file":"diff.command.js","sourceRoot":"","sources":["../../../../src/commands/db/diff.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AACxE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACvB,oBAAoB,GAGrB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,EAAE,UAAU,EAAE,MAAM,8CAA8C,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,qDAAqD,CAAC;AACtF,OAAO,EAAE,0BAA0B,EAAE,sBAAsB,EAAE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IAAI,KAAK,GAAG,CAAC,IAAI,MAAM,CAAC,UAAU,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;QACnH,CAAC;IACH,CAAC;CACF","sourcesContent":["/**\n * `wildo db diff` — compare the application's CURRENT resource model against its committed\n * schema-plan lockfile, and report the physical changes that separate them.\n *\n * Phase 1 of `.claude/plans/postgresql-incremental-schema-migrations.md`. Three modes:\n *\n * - **plain** — print the change set (or \"in sync\"). Reports, generates nothing, applies nothing.\n * - **`--check`** — exit non-zero when drift exists (or no lockfile is committed). This is the CI\n * ratchet: it does not decide what is correct, it refuses to let the answer stay implicit — the\n * same trade `check:browser-wait-gating` makes. Without it the lockfile rots like every\n * unenforced snapshot.\n * - **`--update-lockfile`** — accept the current model as the new baseline and write the canonical\n * lockfile bytes WITHOUT a migration. `wildo db generate` owns the lockfile write, including the\n * INITIAL baseline, which it writes beside the migration that creates the tables (#1144). This flag\n * remains for absorbing a planner-contract bump that changed nothing physical, and for replacing a\n * corrupt lockfile. Used as a first baseline it records a plan whose tables no migration created.\n *\n * ## Why the model is computed in a SPAWNED node process inside the app workspace\n *\n * The current model is the app's OWN modules (shared + backend) merged with the engine core — code\n * that lives in the app's dependency universe, not the CLI's. Importing it here would bind the app\n * to the CLI's engine version and its zod instance (decorator state lives on the zod instance, so\n * two copies silently produce a registry with no decorators). The runner resolves everything\n * through the APP's `node_modules`, exactly as the app's own boot does, and hands back only JSON.\n *\n * The runner imports `<backend-api>/dist/modules-registry.backend.js` — the scaffold's canonical\n * module-assembly file — and feeds `buildApplicationInitializationConfig()`'s six resource fields\n * into the engine's `createStandaloneSchemaPlanning` (real registry classes, no runtime, no\n * database). Parsing and DIFFING then happen back here in-process: both are pure functions over the\n * two lockfiles, and the CLI's own `@wildo-ai/saas-backend-lib` provides them.\n */\n\nimport chalk from 'chalk';\nimport { existsSync, mkdirSync, readFileSync, writeFileSync } from 'fs';\nimport { join } from 'path';\nimport {\n diffSchemaPlanLockfiles,\n parseSchemaPlanLockfile,\n SchemaPlanChangeRisk,\n type SchemaPlanChange,\n type SchemaPlanLockfile,\n} from '@wildo-ai/saas-backend-lib';\nimport { BaseCommand } from '~wildo-cli/kernel/base-command';\nimport { CommandCategory } from '~wildo-cli/kernel/types';\nimport type { CommandMeta, CommandContext, CommandResult } from '~wildo-cli/kernel/types';\nimport { ErrorUtils } from '~wildo-cli/infrastructure/errors/error.utils';\nimport { requireSaasRoot } from '~wildo-cli/services/registry/registry-command.utils';\nimport { computeCurrentLockfileJson, LOCKFILE_RELATIVE_PATH } from '~wildo-cli/commands/db/db-schema-plan.utils';\n\nconst RISK_PRESENTATION: Record<SchemaPlanChangeRisk, { paint: (text: string) => string; label: string }> = {\n [SchemaPlanChangeRisk.SAFE]: { paint: chalk.green, label: 'SAFE' },\n [SchemaPlanChangeRisk.DESTRUCTIVE]: { paint: chalk.red, label: 'DESTRUCTIVE' },\n [SchemaPlanChangeRisk.REQUIRES_DATA_MIGRATION]: { paint: chalk.yellow, label: 'DATA-MIGRATION' },\n};\n\nexport default class DbDiffCommand extends BaseCommand {\n readonly meta: CommandMeta = {\n name: 'db diff',\n description: 'Diff the resource model against the committed schema-plan lockfile (PostgreSQL migrations, Phase 1).',\n category: CommandCategory.Config,\n flags: {\n check: {\n type: 'boolean',\n description: 'Exit non-zero on any drift (CI ratchet). Reports only; never writes.',\n default: false,\n },\n 'update-lockfile': {\n type: 'boolean',\n description: 'Accept the current model as the new baseline and write the canonical lockfile.',\n default: false,\n },\n },\n };\n\n async run(ctx: CommandContext): Promise<CommandResult> {\n const saasRoot = requireSaasRoot(ctx, 'db-diff');\n if (!saasRoot) return { success: false };\n\n const check = ctx.flags.check === true;\n const updateLockfile = ctx.flags['update-lockfile'] === true;\n if (check && updateLockfile) {\n ctx.log.error('`--check` and `--update-lockfile` are mutually exclusive: a CI gate that rewrites its own baseline gates nothing.');\n return { success: false };\n }\n\n const currentJson = computeCurrentLockfileJson(ctx, saasRoot);\n if (currentJson === undefined) return { success: false };\n const current = parseSchemaPlanLockfile(currentJson);\n\n const lockfilePath = join(saasRoot, LOCKFILE_RELATIVE_PATH);\n if (!existsSync(lockfilePath)) {\n return this.handleMissingBaseline(ctx, { lockfilePath, currentJson, current, check, updateLockfile });\n }\n\n let accepted: SchemaPlanLockfile;\n try {\n accepted = parseSchemaPlanLockfile(readFileSync(lockfilePath, 'utf-8'));\n } catch (error) {\n ctx.log.error(\n `Committed lockfile at ${lockfilePath} fails strict parsing — ${ErrorUtils.extractErrorMessage(error)}.\\n`\n + ' A lockfile written by a NEWER engine refuses to narrow under an older one; upgrade the engine, or '\n + 're-accept the baseline with `wildo db diff --update-lockfile` if the file is genuinely corrupt.',\n );\n return { success: false };\n }\n\n /**\n * A planner-contract mismatch is NOT drift — it is the engine having changed its mapping rules\n * (C2), a different state with its own workflow (Phase 4). Reporting it as a wall of column\n * changes would bury the one fact that explains all of them.\n */\n if (accepted.plannerContractVersion !== current.plannerContractVersion) {\n ctx.log.error(\n `Planner contract mismatch: the lockfile was accepted under version ${accepted.plannerContractVersion}, `\n + `the engine now plans under version ${current.plannerContractVersion}. This is an ENGINE upgrade event, `\n + 'not application drift. Generate the upgrade migration with `wildo db generate '\n + '--accept-planner-contract --name engine-upgrade` (physical consequences become a reviewed migration); '\n + 'use `wildo db diff --update-lockfile` ONLY if the bump changed nothing physical for this application.',\n );\n return { success: false };\n }\n\n const changes = diffSchemaPlanLockfiles(accepted, current);\n if (changes.length === 0) {\n ctx.log.success(` Schema plan in sync — ${Object.keys(current.tables).length} tables, no drift.`);\n return { success: true };\n }\n\n this.printChanges(ctx, changes);\n\n if (updateLockfile) {\n writeFileSync(lockfilePath, currentJson);\n ctx.log.success(` Baseline updated: ${lockfilePath} now reflects the current model (${changes.length} change(s) accepted).`);\n ctx.log.info(' NOTE: accepting the baseline records the intent; it does NOT migrate any database. Migration generation is Phase 2.');\n return { success: true };\n }\n if (check) {\n ctx.log.error(` ${changes.length} ungenerated schema change(s) — the model has drifted from the committed lockfile.`);\n return { success: false };\n }\n ctx.log.info(`\\n ${changes.length} change(s). Generate the migration with \\`wildo db generate --name <label>\\` (it advances the lockfile beside it), or gate with \\`--check\\`.`);\n return { success: true };\n }\n\n private handleMissingBaseline(ctx: CommandContext, input: {\n lockfilePath: string;\n currentJson: string;\n current: SchemaPlanLockfile;\n check: boolean;\n updateLockfile: boolean;\n }): CommandResult {\n const tableCount = Object.keys(input.current.tables).length;\n if (input.updateLockfile) {\n mkdirSync(join(input.lockfilePath, '..'), { recursive: true });\n writeFileSync(input.lockfilePath, input.currentJson);\n ctx.log.success(` Initial baseline written: ${input.lockfilePath} (${tableCount} tables). Commit it.`);\n return { success: true };\n }\n if (input.check) {\n ctx.log.error(\n `No committed lockfile at ${input.lockfilePath} — the ratchet has no baseline to hold. `\n + 'Generate the initial migration with `wildo db generate --name initial-schema`, which writes the baseline '\n + 'beside it, and commit both.',\n );\n return { success: false };\n }\n ctx.log.info(\n ` No lockfile yet. The current model plans ${tableCount} tables; `\n + 'generate the initial migration with `wildo db generate --name initial-schema`, which writes the baseline beside it.',\n );\n return { success: true };\n }\n\n private printChanges(ctx: CommandContext, changes: SchemaPlanChange[]): void {\n ctx.log.info('');\n let currentTable = '';\n for (const change of changes) {\n if (change.tableName !== currentTable) {\n currentTable = change.tableName;\n ctx.log.info(chalk.bold(` ${currentTable}`));\n }\n const { paint, label } = RISK_PRESENTATION[change.risk];\n ctx.log.info(` ${paint(`[${label}]`)} ${change.changeType} ${chalk.cyan(change.subject)} — ${change.detail}`);\n }\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"generate.command.d.ts","sourceRoot":"","sources":["../../../../../../src/commands/db/generate.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAUH,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7D,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAU1F,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,WAAW;IACxD,QAAQ,CAAC,IAAI,EAAE,WAAW,CAgBxB;IAEI,GAAG,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;CAmFvD"}
1
+ {"version":3,"file":"generate.command.d.ts","sourceRoot":"","sources":["../../../../src/commands/db/generate.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAUH,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7D,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAU1F,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,WAAW;IACxD,QAAQ,CAAC,IAAI,EAAE,WAAW,CAgBxB;IAEI,GAAG,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;CAmFvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"generate.command.js","sourceRoot":"","sources":["../../../../../../src/commands/db/generate.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EACL,uBAAuB,EACvB,oBAAoB,GAErB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,EAAE,UAAU,EAAE,MAAM,8CAA8C,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,qDAAqD,CAAC;AACtF,OAAO,EACL,0BAA0B,EAC1B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CAAC;IAC3B,CAAC;CACF","sourcesContent":["/**\n * `wildo db generate --name <name>` — turn the current drift into a committed migration DRAFT.\n *\n * Phase 2 of `.claude/plans/postgresql-incremental-schema-migrations.md`. The generation half of\n * the two-door design: this produces the artifact; the RUNNER (backend-api boot in production,\n * `wildo db migrate` manually) applies it.\n *\n * What one invocation does, atomically from the author's point of view:\n *\n * 1. compute the CURRENT model's lockfile (same spawned-runner architecture as `wildo db diff` —\n * one shared implementation, so the diff you reviewed and the migration you generate cannot\n * come from different models);\n * 2. diff it against the committed lockfile (an ABSENT lockfile means this is the INITIAL\n * migration: the whole model becomes migration one, which doubles as the baseline artifact);\n * 3. render the change set as `migrations/<timestamp>_<name>/migration.sql` — a DRAFT: editable\n * until first applied, SHA-256-locked after (Phase 3′);\n * 4. write the new lockfile BESIDE it, in the same invocation — the accepted state advances with\n * the migration that realizes it, or neither moves.\n *\n * Refusals surface, they are not softened: a `CHANGE_PRIMARY_KEY` — a primary key MOVING to another\n * column, or being dropped — aborts generation with the renderer's own explanation (hand-authored\n * only), and nothing is written. `ADD_PRIMARY_KEY`, where a table that has none gains one, is a\n * different change type and is generated normally: nothing can reference a constraint that does not\n * exist, so there is no rebuild for a skeleton to get wrong.\n */\n\nimport chalk from 'chalk';\nimport { existsSync, readFileSync } from 'fs';\nimport { join } from 'path';\nimport {\n parseSchemaPlanLockfile,\n SchemaPlanChangeRisk,\n type SchemaPlanLockfile,\n} from '@wildo-ai/saas-backend-lib';\nimport { BaseCommand } from '~wildo-cli/kernel/base-command';\nimport { CommandCategory } from '~wildo-cli/kernel/types';\nimport type { CommandMeta, CommandContext, CommandResult } from '~wildo-cli/kernel/types';\nimport { ErrorUtils } from '~wildo-cli/infrastructure/errors/error.utils';\nimport { requireSaasRoot } from '~wildo-cli/services/registry/registry-command.utils';\nimport {\n computeCurrentLockfileJson,\n LOCKFILE_RELATIVE_PATH,\n MIGRATIONS_RELATIVE_DIR,\n} from '~wildo-cli/commands/db/db-schema-plan.utils';\nimport { writeSchemaPlanMigration, type SchemaPlanMigrationWritten } from '~wildo-cli/commands/db/db-schema-plan-migration.utils';\n\nexport default class DbGenerateCommand extends BaseCommand {\n readonly meta: CommandMeta = {\n name: 'db generate',\n description: 'Generate a migration draft from the current schema drift, and advance the lockfile (PostgreSQL migrations, Phase 2).',\n category: CommandCategory.Config,\n flags: {\n name: {\n type: 'string',\n description: 'Short kebab-case label for the migration folder: <timestamp>_<name>.',\n default: undefined,\n },\n 'accept-planner-contract': {\n type: 'boolean',\n description: 'Generate ACROSS a planner-contract version bump (engine upgrade): the migration realizes the rule change physically, and the lockfile advances to the new version.',\n default: false,\n },\n },\n };\n\n async run(ctx: CommandContext): Promise<CommandResult> {\n const saasRoot = requireSaasRoot(ctx, 'db-generate');\n if (!saasRoot) return { success: false };\n\n const name = typeof ctx.flags.name === 'string' ? ctx.flags.name.trim() : '';\n if (!/^[a-z0-9][a-z0-9-]*$/.test(name)) {\n ctx.log.error('`--name <kebab-case>` is required — it names the migration folder a reviewer will read.');\n return { success: false };\n }\n\n const currentJson = computeCurrentLockfileJson(ctx, saasRoot);\n if (currentJson === undefined) return { success: false };\n const current = parseSchemaPlanLockfile(currentJson);\n\n const lockfilePath = join(saasRoot, LOCKFILE_RELATIVE_PATH);\n /**\n * No committed lockfile ⇒ the INITIAL migration: previous is the empty model and every table is\n * an ADD_TABLE. Because the renderer emits idempotent DDL, this migration is also the BASELINE\n * artifact — applying it over a dev-provisioned database is harmless, and `wildo db migrate\n * --baseline` can record it without executing on adopted databases.\n */\n const accepted: SchemaPlanLockfile = existsSync(lockfilePath)\n ? parseSchemaPlanLockfile(readFileSync(lockfilePath, 'utf-8'))\n : { lockfileFormatVersion: current.lockfileFormatVersion, plannerContractVersion: current.plannerContractVersion, tables: {} };\n\n /**\n * The Phase-4 lineage door. A contract mismatch is an ENGINE upgrade event (C2): the mapping\n * rules changed, so the diff below is full of changes nobody authored. Two legitimate exits:\n *\n * - `--accept-planner-contract` HERE — the correct one when the rule change has physical\n * consequences: the generated migration REALIZES them (the whole point of C2's \"an engine\n * upgrade must not silently rewrite an app's schema\" is that it rewrites it VISIBLY, as a\n * reviewed migration), and the lockfile advances to the new version with it.\n * - `wildo db diff --update-lockfile` — absorbs the new baseline WITHOUT a migration. Correct\n * only when the bump changed no physical output for this application; the boot gate is what\n * catches choosing it wrongly.\n */\n if (accepted.plannerContractVersion !== current.plannerContractVersion) {\n if (ctx.flags['accept-planner-contract'] !== true) {\n ctx.log.error(\n `Planner contract mismatch (lockfile ${accepted.plannerContractVersion}, engine ${current.plannerContractVersion}) — `\n + 'an ENGINE upgrade event, not application drift. Review the engine changelog, then EITHER generate the '\n + 'upgrade migration with `wildo db generate --accept-planner-contract --name engine-upgrade` (physical '\n + 'changes become a reviewed migration), or — only if the bump changed nothing physical for this app — '\n + 'absorb the baseline with `wildo db diff --update-lockfile`.',\n );\n return { success: false };\n }\n ctx.log.info(\n ` Generating ACROSS planner-contract versions ${accepted.plannerContractVersion} → ${current.plannerContractVersion}: `\n + 'the changes below are the engine upgrade\\'s physical consequences for this application.',\n );\n }\n\n // Rendering and BOTH writes live in `writeSchemaPlanMigration`, so this command and `wildo init`'s\n // initial migration cannot drift about the invariant that the folder and the lockfile land together.\n let written: SchemaPlanMigrationWritten | null;\n try {\n written = writeSchemaPlanMigration({ saasRoot, name, accepted, current, currentJson });\n } catch (error) {\n // The renderer's refusals (a primary-key MOVE or DROP) carry their own reasoning — verbatim.\n ctx.log.error(ErrorUtils.extractErrorMessage(error));\n return { success: false };\n }\n if (written === null) {\n ctx.log.success(' Schema plan in sync — nothing to generate.');\n return { success: true };\n }\n const { folderName, changes } = written;\n\n const destructive = changes.filter((change) => change.risk === SchemaPlanChangeRisk.DESTRUCTIVE).length;\n const dataMigrations = changes.filter((change) => change.risk === SchemaPlanChangeRisk.REQUIRES_DATA_MIGRATION).length;\n ctx.log.success(` Generated ${join(MIGRATIONS_RELATIVE_DIR, folderName, 'migration.sql')} (${changes.length} change(s)) and advanced the lockfile.`);\n ctx.log.info(' The file is a DRAFT until first applied — review it; the runner locks its bytes after APPLIED.');\n if (destructive > 0) {\n ctx.log.info(chalk.red(` ${destructive} DESTRUCTIVE change(s): the runner will refuse until you add the acknowledgement annotation (instructions are in the file).`));\n }\n if (dataMigrations > 0) {\n ctx.log.info(chalk.yellow(` ${dataMigrations} DATA-MIGRATION change(s): generated skeletons need your review before applying.`));\n }\n ctx.log.info(' Commit the migration folder AND the lockfile together.');\n return { success: true };\n }\n}\n"]}
1
+ {"version":3,"file":"generate.command.js","sourceRoot":"","sources":["../../../../src/commands/db/generate.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EACL,uBAAuB,EACvB,oBAAoB,GAErB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,EAAE,UAAU,EAAE,MAAM,8CAA8C,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,qDAAqD,CAAC;AACtF,OAAO,EACL,0BAA0B,EAC1B,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAAE,wBAAwB,EAAmC,MAAM,uDAAuD,CAAC;AAElI,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,WAAW;IAC/C,IAAI,GAAgB;QAC3B,IAAI,EAAE,aAAa;QACnB,WAAW,EAAE,sHAAsH;QACnI,QAAQ,EAAE,eAAe,CAAC,MAAM;QAChC,KAAK,EAAE;YACL,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,sEAAsE;g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C,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,oBAAoB,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC;QACxG,MAAM,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,oBAAoB,CAAC,uBAAuB,CAAC,CAAC,MAAM,CAAC;QACvH,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,eAAe,IAAI,CAAC,uBAAuB,EAAE,UAAU,EAAE,eAAe,CAAC,KAAK,OAAO,CAAC,MAAM,wCAAwC,CAAC,CAAC;QACtJ,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,kGAAkG,CAAC,CAAC;QACjH,IAAI,WAAW,GAAG,CAAC,EAAE,CAAC;YACpB,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,WAAW,6HAA6H,CAAC,CAAC,CAAC;QACzK,CAAC;QACD,IAAI,cAAc,GAAG,CAAC,EAAE,CAAC;YACvB,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,cAAc,kFAAkF,CAAC,CAAC,CAAC;QACpI,CAAC;QACD,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,0DAA0D,CAAC,CAAC;QACzE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC3B,CAAC;CACF","sourcesContent":["/**\n * `wildo db generate --name <name>` — turn the current drift into a committed migration DRAFT.\n *\n * Phase 2 of `.claude/plans/postgresql-incremental-schema-migrations.md`. The generation half of\n * the two-door design: this produces the artifact; the RUNNER (backend-api boot in production,\n * `wildo db migrate` manually) applies it.\n *\n * What one invocation does, atomically from the author's point of view:\n *\n * 1. compute the CURRENT model's lockfile (same spawned-runner architecture as `wildo db diff` —\n * one shared implementation, so the diff you reviewed and the migration you generate cannot\n * come from different models);\n * 2. diff it against the committed lockfile (an ABSENT lockfile means this is the INITIAL\n * migration: the whole model becomes migration one, which doubles as the baseline artifact);\n * 3. render the change set as `migrations/<timestamp>_<name>/migration.sql` — a DRAFT: editable\n * until first applied, SHA-256-locked after (Phase 3′);\n * 4. write the new lockfile BESIDE it, in the same invocation — the accepted state advances with\n * the migration that realizes it, or neither moves.\n *\n * Refusals surface, they are not softened: a `CHANGE_PRIMARY_KEY` — a primary key MOVING to another\n * column, or being dropped — aborts generation with the renderer's own explanation (hand-authored\n * only), and nothing is written. `ADD_PRIMARY_KEY`, where a table that has none gains one, is a\n * different change type and is generated normally: nothing can reference a constraint that does not\n * exist, so there is no rebuild for a skeleton to get wrong.\n */\n\nimport chalk from 'chalk';\nimport { existsSync, readFileSync } from 'fs';\nimport { join } from 'path';\nimport {\n parseSchemaPlanLockfile,\n SchemaPlanChangeRisk,\n type SchemaPlanLockfile,\n} from '@wildo-ai/saas-backend-lib';\nimport { BaseCommand } from '~wildo-cli/kernel/base-command';\nimport { CommandCategory } from '~wildo-cli/kernel/types';\nimport type { CommandMeta, CommandContext, CommandResult } from '~wildo-cli/kernel/types';\nimport { ErrorUtils } from '~wildo-cli/infrastructure/errors/error.utils';\nimport { requireSaasRoot } from '~wildo-cli/services/registry/registry-command.utils';\nimport {\n computeCurrentLockfileJson,\n LOCKFILE_RELATIVE_PATH,\n MIGRATIONS_RELATIVE_DIR,\n} from '~wildo-cli/commands/db/db-schema-plan.utils';\nimport { writeSchemaPlanMigration, type SchemaPlanMigrationWritten } from '~wildo-cli/commands/db/db-schema-plan-migration.utils';\n\nexport default class DbGenerateCommand extends BaseCommand {\n readonly meta: CommandMeta = {\n name: 'db generate',\n description: 'Generate a migration draft from the current schema drift, and advance the lockfile (PostgreSQL migrations, Phase 2).',\n category: CommandCategory.Config,\n flags: {\n name: {\n type: 'string',\n description: 'Short kebab-case label for the migration folder: <timestamp>_<name>.',\n default: undefined,\n },\n 'accept-planner-contract': {\n type: 'boolean',\n description: 'Generate ACROSS a planner-contract version bump (engine upgrade): the migration realizes the rule change physically, and the lockfile advances to the new version.',\n default: false,\n },\n },\n };\n\n async run(ctx: CommandContext): Promise<CommandResult> {\n const saasRoot = requireSaasRoot(ctx, 'db-generate');\n if (!saasRoot) return { success: false };\n\n const name = typeof ctx.flags.name === 'string' ? ctx.flags.name.trim() : '';\n if (!/^[a-z0-9][a-z0-9-]*$/.test(name)) {\n ctx.log.error('`--name <kebab-case>` is required — it names the migration folder a reviewer will read.');\n return { success: false };\n }\n\n const currentJson = computeCurrentLockfileJson(ctx, saasRoot);\n if (currentJson === undefined) return { success: false };\n const current = parseSchemaPlanLockfile(currentJson);\n\n const lockfilePath = join(saasRoot, LOCKFILE_RELATIVE_PATH);\n /**\n * No committed lockfile ⇒ the INITIAL migration: previous is the empty model and every table is\n * an ADD_TABLE. Because the renderer emits idempotent DDL, this migration is also the BASELINE\n * artifact — applying it over a dev-provisioned database is harmless, and `wildo db migrate\n * --baseline` can record it without executing on adopted databases.\n */\n const accepted: SchemaPlanLockfile = existsSync(lockfilePath)\n ? parseSchemaPlanLockfile(readFileSync(lockfilePath, 'utf-8'))\n : { lockfileFormatVersion: current.lockfileFormatVersion, plannerContractVersion: current.plannerContractVersion, tables: {} };\n\n /**\n * The Phase-4 lineage door. A contract mismatch is an ENGINE upgrade event (C2): the mapping\n * rules changed, so the diff below is full of changes nobody authored. Two legitimate exits:\n *\n * - `--accept-planner-contract` HERE — the correct one when the rule change has physical\n * consequences: the generated migration REALIZES them (the whole point of C2's \"an engine\n * upgrade must not silently rewrite an app's schema\" is that it rewrites it VISIBLY, as a\n * reviewed migration), and the lockfile advances to the new version with it.\n * - `wildo db diff --update-lockfile` — absorbs the new baseline WITHOUT a migration. Correct\n * only when the bump changed no physical output for this application; the boot gate is what\n * catches choosing it wrongly.\n */\n if (accepted.plannerContractVersion !== current.plannerContractVersion) {\n if (ctx.flags['accept-planner-contract'] !== true) {\n ctx.log.error(\n `Planner contract mismatch (lockfile ${accepted.plannerContractVersion}, engine ${current.plannerContractVersion}) — `\n + 'an ENGINE upgrade event, not application drift. Review the engine changelog, then EITHER generate the '\n + 'upgrade migration with `wildo db generate --accept-planner-contract --name engine-upgrade` (physical '\n + 'changes become a reviewed migration), or — only if the bump changed nothing physical for this app — '\n + 'absorb the baseline with `wildo db diff --update-lockfile`.',\n );\n return { success: false };\n }\n ctx.log.info(\n ` Generating ACROSS planner-contract versions ${accepted.plannerContractVersion} → ${current.plannerContractVersion}: `\n + 'the changes below are the engine upgrade\\'s physical consequences for this application.',\n );\n }\n\n // Rendering and BOTH writes live in `writeSchemaPlanMigration`, so this command and `wildo init`'s\n // initial migration cannot drift about the invariant that the folder and the lockfile land together.\n let written: SchemaPlanMigrationWritten | null;\n try {\n written = writeSchemaPlanMigration({ saasRoot, name, accepted, current, currentJson });\n } catch (error) {\n // The renderer's refusals (a primary-key MOVE or DROP) carry their own reasoning — verbatim.\n ctx.log.error(ErrorUtils.extractErrorMessage(error));\n return { success: false };\n }\n if (written === null) {\n ctx.log.success(' Schema plan in sync — nothing to generate.');\n return { success: true };\n }\n const { folderName, changes } = written;\n\n const destructive = changes.filter((change) => change.risk === SchemaPlanChangeRisk.DESTRUCTIVE).length;\n const dataMigrations = changes.filter((change) => change.risk === SchemaPlanChangeRisk.REQUIRES_DATA_MIGRATION).length;\n ctx.log.success(` Generated ${join(MIGRATIONS_RELATIVE_DIR, folderName, 'migration.sql')} (${changes.length} change(s)) and advanced the lockfile.`);\n ctx.log.info(' The file is a DRAFT until first applied — review it; the runner locks its bytes after APPLIED.');\n if (destructive > 0) {\n ctx.log.info(chalk.red(` ${destructive} DESTRUCTIVE change(s): the runner will refuse until you add the acknowledgement annotation (instructions are in the file).`));\n }\n if (dataMigrations > 0) {\n ctx.log.info(chalk.yellow(` ${dataMigrations} DATA-MIGRATION change(s): generated skeletons need your review before applying.`));\n }\n ctx.log.info(' Commit the migration folder AND the lockfile together.');\n return { success: true };\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"migrate.command.d.ts","sourceRoot":"","sources":["../../../../../../src/commands/db/migrate.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAIH,OAAO,EAML,KAAK,2BAA2B,EACjC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7D,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAO1F;;;;;;;;;GASG;AACH,wBAAsB,wBAAwB,CAAC,GAAG,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,2BAA2B,GAAG,SAAS,CAAC,CAMtI;AAED,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,WAAW;IACvD,QAAQ,CAAC,IAAI,EAAE,WAAW,CAWxB;IAEI,GAAG,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;CA+CvD"}
1
+ {"version":3,"file":"migrate.command.d.ts","sourceRoot":"","sources":["../../../../src/commands/db/migrate.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAIH,OAAO,EAML,KAAK,2BAA2B,EACjC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7D,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAO1F;;;;;;;;;GASG;AACH,wBAAsB,wBAAwB,CAAC,GAAG,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,2BAA2B,GAAG,SAAS,CAAC,CAMtI;AAED,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,WAAW;IACvD,QAAQ,CAAC,IAAI,EAAE,WAAW,CAWxB;IAEI,GAAG,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;CA+CvD"}
@@ -1 +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**\n * `wildo db migrate [--baseline]` — the MANUAL door onto the one migration runner.\n *\n * The production door is the application's own boot (`applyStartupPostgresMigrations`), and in the\n * dev loop \"restart the backend\" is usually the answer. This command exists for the moments a\n * human wants the apply WITHOUT a boot: baselining an adopted database, applying before a first\n * boot, or watching a refusal's message directly. Same runner, same ledger, same lock — a second\n * implementation here would be the drift the two-door design exists to prevent (K7).\n *\n * ## Where the connection comes from\n *\n * Address topology from the authored env (`backingServices.postgresql` in\n * `wildo.infra.<env>.config.ts` — host/port/database), credentials from the env's `secrets.json`\n * (`postgresql.adminUser/adminPassword` — the same credentials the CLI provisioned the server\n * with). Admin credentials are correct for the MANUAL door: it is an operator tool, and the local\n * server is CLI-provisioned; the application's own runtime credentials belong to the boot door.\n *\n * Connecting as the admin is not the same as CREATING AS the admin, and conflating the two broke the\n * application: tables owned by `wildo_admin` are unusable by the application's own role, which is what\n * the backend connects with. `createObjectsAsDatabaseOwner` keeps the operator connectivity and hands\n * ownership to the database's owner, so both doors produce the same schema.\n */\n\nimport { existsSync } from 'fs';\nimport { join } from 'path';\nimport {\n applyPostgresMigrations,\n baselinePostgresMigrations,\n loadMigrationsFromDirectory,\n MigrationApplyRole,\n openPostgresMigrationConnection,\n type PostgresMigrationConnection,\n} from '@wildo-ai/saas-backend-lib';\nimport { BaseCommand } from '~wildo-cli/kernel/base-command';\nimport { CommandCategory } from '~wildo-cli/kernel/types';\nimport type { CommandMeta, CommandContext, CommandResult } from '~wildo-cli/kernel/types';\nimport { ErrorUtils } from '~wildo-cli/infrastructure/errors/error.utils';\nimport { EnvironmentUtils } from '~wildo-cli/services/environment/environment.service';\nimport { requireSaasRoot } from '~wildo-cli/services/registry/registry-command.utils';\nimport { resolveAppMigrationConnection } from '~wildo-cli/services/application/app-schema-bootstrap.service';\nimport { MIGRATIONS_RELATIVE_DIR } from '~wildo-cli/commands/db/db-schema-plan.utils';\n\n/**\n * The manual door's connection. Exported for `wildo db resolve`, which needs the identical\n * resolution — two spellings of \"which database, as whom\" would eventually disagree about it.\n *\n * The resolution itself lives in `app-schema-bootstrap.service`, because a THIRD caller appeared:\n * application bootstrap applies the schema automatically between provisioning's two phases (see\n * `AppDatabaseSeedingPhase`). Had that caller re-derived topology and credentials, the automatic\n * apply and the operator's `wildo db migrate` would have disagreed exactly when it mattered — on a\n * first install, which is the only time the automatic apply runs against an empty database.\n */\nexport async function openManualDoorConnection(ctx: CommandContext, saasRoot: string): Promise<PostgresMigrationConnection | undefined> {\n return await resolveAppMigrationConnection({\n envName: EnvironmentUtils.getCurrentName(),\n saasRoot,\n reportMissing: (message) => ctx.log.error(message),\n });\n}\n\nexport default class DbMigrateCommand extends BaseCommand {\n readonly meta: CommandMeta = {\n name: 'db migrate',\n description: 'Apply pending PostgreSQL migrations through the shared runner (manual door; the boot applies them too).',\n category: CommandCategory.Config,\n flags: {\n baseline: {\n type: 'boolean',\n description: 'Record all pending migrations as APPLIED without executing (adopted / dev-provisioned databases).',\n default: false,\n },\n },\n };\n\n async run(ctx: CommandContext): Promise<CommandResult> {\n const saasRoot = requireSaasRoot(ctx, 'db-migrate');\n if (!saasRoot) return { success: false };\n\n const migrationsDirectory = join(saasRoot, MIGRATIONS_RELATIVE_DIR);\n if (!existsSync(migrationsDirectory)) {\n ctx.log.error(`No migrations directory at ${migrationsDirectory} — generate one with \\`wildo db generate\\`.`);\n return { success: false };\n }\n const migrations = loadMigrationsFromDirectory(migrationsDirectory);\n if (migrations.length === 0) {\n ctx.log.info(' Migrations directory is empty — nothing to do.');\n return { success: true };\n }\n\n const connection = await openManualDoorConnection(ctx, saasRoot);\n if (!connection) return { success: false };\n\n try {\n if (ctx.flags.baseline === true) {\n const recorded = await baselinePostgresMigrations({\n db: connection.db, migrations, baselinedBy: `cli:${process.env.USER ?? 'operator'}`,\n });\n ctx.log.success(recorded.length > 0\n ? ` Baselined ${recorded.length} migration(s) — recorded as APPLIED without executing: ${recorded.join(', ')}`\n : ' Nothing to baseline — every migration is already recorded.');\n return { success: true };\n }\n\n const report = await applyPostgresMigrations({\n db: connection.db, migrations, appliedBy: `cli:${process.env.USER ?? 'operator'}`,\n });\n if (report.outOfOrder?.length) {\n ctx.log.info(` ⚠️ out-of-order (applied in sorted position): ${report.outOfOrder.join(', ')} — review against the newer migrations they sorted before.`);\n }\n ctx.log.success(report.role === MigrationApplyRole.APPLIED\n ? ` Applied ${report.applied.length} migration(s), verified ${report.verified.length}.`\n : ` Another process held the migration lock; waited and verified ${report.verified.length}.`);\n return { success: true };\n } catch (error) {\n // The runner's refusals carry their remedies — surface verbatim, never summarized.\n ctx.log.error(ErrorUtils.extractErrorMessage(error));\n return { success: false };\n } finally {\n await connection.close().catch(() => undefined);\n }\n }\n}\n"]}
1
+ {"version":3,"file":"migrate.command.js","sourceRoot":"","sources":["../../../../src/commands/db/migrate.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EACL,uBAAuB,EACvB,0BAA0B,EAC1B,2BAA2B,EAC3B,kBAAkB,GAGnB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,EAAE,UAAU,EAAE,MAAM,8CAA8C,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,qDAAqD,CAAC;AACvF,OAAO,EAAE,eAAe,EAAE,MAAM,qDAAqD,CAAC;AACtF,OAAO,EAAE,6BAA6B,EAAE,MAAM,8DAA8D,CAAC;AAC7G,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AAEtF;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAAC,GAAmB,EAAE,QAAgB;IAClF,OAAO,MAAM,6BAA6B,CAAC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AAC,MAAM,GAAG,CAAC,CAAC;YACjG,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;QAC3B,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,mFAAmF;YACnF,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC,CAAC;YACrD,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;QAC5B,CAAC;gBAAS,CAAC;YACT,MAAM,UAAU,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;QAClD,CAAC;IACH,CAAC;CACF","sourcesContent":["/**\n * `wildo db migrate [--baseline]` — the MANUAL door onto the one migration runner.\n *\n * The production door is the application's own boot (`applyStartupPostgresMigrations`), and in the\n * dev loop \"restart the backend\" is usually the answer. This command exists for the moments a\n * human wants the apply WITHOUT a boot: baselining an adopted database, applying before a first\n * boot, or watching a refusal's message directly. Same runner, same ledger, same lock — a second\n * implementation here would be the drift the two-door design exists to prevent (K7).\n *\n * ## Where the connection comes from\n *\n * Address topology from the authored env (`backingServices.postgresql` in\n * `wildo.infra.<env>.config.ts` — host/port/database), credentials from the env's `secrets.json`\n * (`postgresql.adminUser/adminPassword` — the same credentials the CLI provisioned the server\n * with). Admin credentials are correct for the MANUAL door: it is an operator tool, and the local\n * server is CLI-provisioned; the application's own runtime credentials belong to the boot door.\n *\n * Connecting as the admin is not the same as CREATING AS the admin, and conflating the two broke the\n * application: tables owned by `wildo_admin` are unusable by the application's own role, which is what\n * the backend connects with. `createObjectsAsDatabaseOwner` keeps the operator connectivity and hands\n * ownership to the database's owner, so both doors produce the same schema.\n */\n\nimport { existsSync } from 'fs';\nimport { join } from 'path';\nimport {\n applyPostgresMigrations,\n baselinePostgresMigrations,\n loadMigrationsFromDirectory,\n MigrationApplyRole,\n openPostgresMigrationConnection,\n type PostgresMigrationConnection,\n} from '@wildo-ai/saas-backend-lib';\nimport { BaseCommand } from '~wildo-cli/kernel/base-command';\nimport { CommandCategory } from '~wildo-cli/kernel/types';\nimport type { CommandMeta, CommandContext, CommandResult } from '~wildo-cli/kernel/types';\nimport { ErrorUtils } from '~wildo-cli/infrastructure/errors/error.utils';\nimport { EnvironmentUtils } from '~wildo-cli/services/environment/environment.service';\nimport { requireSaasRoot } from '~wildo-cli/services/registry/registry-command.utils';\nimport { resolveAppMigrationConnection } from '~wildo-cli/services/application/app-schema-bootstrap.service';\nimport { MIGRATIONS_RELATIVE_DIR } from '~wildo-cli/commands/db/db-schema-plan.utils';\n\n/**\n * The manual door's connection. Exported for `wildo db resolve`, which needs the identical\n * resolution — two spellings of \"which database, as whom\" would eventually disagree about it.\n *\n * The resolution itself lives in `app-schema-bootstrap.service`, because a THIRD caller appeared:\n * application bootstrap applies the schema automatically between provisioning's two phases (see\n * `AppDatabaseSeedingPhase`). Had that caller re-derived topology and credentials, the automatic\n * apply and the operator's `wildo db migrate` would have disagreed exactly when it mattered — on a\n * first install, which is the only time the automatic apply runs against an empty database.\n */\nexport async function openManualDoorConnection(ctx: CommandContext, saasRoot: string): Promise<PostgresMigrationConnection | undefined> {\n return await resolveAppMigrationConnection({\n envName: EnvironmentUtils.getCurrentName(),\n saasRoot,\n reportMissing: (message) => ctx.log.error(message),\n });\n}\n\nexport default class DbMigrateCommand extends BaseCommand {\n readonly meta: CommandMeta = {\n name: 'db migrate',\n description: 'Apply pending PostgreSQL migrations through the shared runner (manual door; the boot applies them too).',\n category: CommandCategory.Config,\n flags: {\n baseline: {\n type: 'boolean',\n description: 'Record all pending migrations as APPLIED without executing (adopted / dev-provisioned databases).',\n default: false,\n },\n },\n };\n\n async run(ctx: CommandContext): Promise<CommandResult> {\n const saasRoot = requireSaasRoot(ctx, 'db-migrate');\n if (!saasRoot) return { success: false };\n\n const migrationsDirectory = join(saasRoot, MIGRATIONS_RELATIVE_DIR);\n if (!existsSync(migrationsDirectory)) {\n ctx.log.error(`No migrations directory at ${migrationsDirectory} — generate one with \\`wildo db generate\\`.`);\n return { success: false };\n }\n const migrations = loadMigrationsFromDirectory(migrationsDirectory);\n if (migrations.length === 0) {\n ctx.log.info(' Migrations directory is empty — nothing to do.');\n return { success: true };\n }\n\n const connection = await openManualDoorConnection(ctx, saasRoot);\n if (!connection) return { success: false };\n\n try {\n if (ctx.flags.baseline === true) {\n const recorded = await baselinePostgresMigrations({\n db: connection.db, migrations, baselinedBy: `cli:${process.env.USER ?? 'operator'}`,\n });\n ctx.log.success(recorded.length > 0\n ? ` Baselined ${recorded.length} migration(s) — recorded as APPLIED without executing: ${recorded.join(', ')}`\n : ' Nothing to baseline — every migration is already recorded.');\n return { success: true };\n }\n\n const report = await applyPostgresMigrations({\n db: connection.db, migrations, appliedBy: `cli:${process.env.USER ?? 'operator'}`,\n });\n if (report.outOfOrder?.length) {\n ctx.log.info(` ⚠️ out-of-order (applied in sorted position): ${report.outOfOrder.join(', ')} — review against the newer migrations they sorted before.`);\n }\n ctx.log.success(report.role === MigrationApplyRole.APPLIED\n ? ` Applied ${report.applied.length} migration(s), verified ${report.verified.length}.`\n : ` Another process held the migration lock; waited and verified ${report.verified.length}.`);\n return { success: true };\n } catch (error) {\n // The runner's refusals carry their remedies — surface verbatim, never summarized.\n ctx.log.error(ErrorUtils.extractErrorMessage(error));\n return { success: false };\n } finally {\n await connection.close().catch(() => undefined);\n }\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"resolve.command.d.ts","sourceRoot":"","sources":["../../../../../../src/commands/db/resolve.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AASH,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7D,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAM1F,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,WAAW;IACvD,QAAQ,CAAC,IAAI,EAAE,WAAW,CAmBxB;IAEI,GAAG,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;CAkDvD"}
1
+ {"version":3,"file":"resolve.command.d.ts","sourceRoot":"","sources":["../../../../src/commands/db/resolve.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AASH,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7D,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAM1F,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,WAAW;IACvD,QAAQ,CAAC,IAAI,EAAE,WAAW,CAmBxB;IAEI,GAAG,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;CAkDvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"resolve.command.js","sourceRoot":"","sources":["../../../../../../src/commands/db/resolve.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EACL,mBAAmB,EACnB,mCAAmC,EACnC,iBAAiB,GAClB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,EAAE,UAAU,EAAE,MAAM,8CAA8C,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,qDAAqD,CAAC;AACtF,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AAElF,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,WAAW;IAC9C,IAAI,GAAgB;QAC3B,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,6GAA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C,KAAK,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;QAClD,CAAC;IACH,CAAC;CACF","sourcesContent":["/**\n * `wildo db resolve (--applied | --rolled-back) <migration-name>` — the K8 remediation verbs.\n *\n * Each verb is the documented remedy of one runner refusal, and the refusal messages name this\n * command — the pairing is the whole point (a refusal that does not carry its remedy just moves\n * the derivation to a human who may get it wrong):\n *\n * - `--applied` re-accepts a migration's CURRENT bytes as the applied truth — the remedy for the\n * edited-after-apply refusal when the edit was deliberate. Records the file's SHA-256 WITHOUT\n * executing anything; resolving is a statement about history, never a way to run SQL.\n * - `--rolled-back` declares an applied migration never-happened — terminal evidence, not a row\n * deletion, so the ledger keeps who resolved it and when. A same-name file applies fresh after.\n *\n * Both are recorded with the resolver's identity (`resolve:<user>` in `appliedBy`).\n */\n\nimport { existsSync, readFileSync } from 'fs';\nimport { join } from 'path';\nimport {\n MigrationResolution,\n resolvePostgresMigrationLedgerEntry,\n sha256OfMigration,\n} from '@wildo-ai/saas-backend-lib';\nimport { BaseCommand } from '~wildo-cli/kernel/base-command';\nimport { CommandCategory } from '~wildo-cli/kernel/types';\nimport type { CommandMeta, CommandContext, CommandResult } from '~wildo-cli/kernel/types';\nimport { ErrorUtils } from '~wildo-cli/infrastructure/errors/error.utils';\nimport { requireSaasRoot } from '~wildo-cli/services/registry/registry-command.utils';\nimport { MIGRATIONS_RELATIVE_DIR } from '~wildo-cli/commands/db/db-schema-plan.utils';\nimport { openManualDoorConnection } from '~wildo-cli/commands/db/migrate.command';\n\nexport default class DbResolveCommand extends BaseCommand {\n readonly meta: CommandMeta = {\n name: 'db resolve',\n description: 'Correct the migration ledger: re-accept edited bytes (--applied) or declare never-happened (--rolled-back).',\n category: CommandCategory.Config,\n args: [\n { name: 'migration', description: 'The migration folder name, e.g. 20260811T120000_add-slug.', required: true },\n ],\n flags: {\n applied: {\n type: 'boolean',\n description: 'Re-accept the migration file\\'s CURRENT bytes as the applied truth (records its sha256; executes nothing).',\n default: false,\n },\n 'rolled-back': {\n type: 'boolean',\n description: 'Declare the migration never-happened (terminal ROLLED_BACK evidence; a same-name file applies fresh).',\n default: false,\n },\n },\n };\n\n async run(ctx: CommandContext): Promise<CommandResult> {\n const saasRoot = requireSaasRoot(ctx, 'db-resolve');\n if (!saasRoot) return { success: false };\n\n const applied = ctx.flags.applied === true;\n const rolledBack = ctx.flags['rolled-back'] === true;\n if (applied === rolledBack) {\n ctx.log.error('Exactly ONE of --applied / --rolled-back is required — they are opposite statements about history.');\n return { success: false };\n }\n const name = (ctx.args.migration ?? '').trim();\n if (!name) {\n ctx.log.error('The migration name (its folder name) is required: `wildo db resolve --applied 20260811T120000_add-slug`.');\n return { success: false };\n }\n\n let sha256: string | undefined;\n if (applied) {\n // The sha comes from the FILE, not from a flag: what is being accepted is exactly what is\n // committed, and asking the operator to paste a hash invites accepting something else.\n const migrationPath = join(saasRoot, MIGRATIONS_RELATIVE_DIR, name, 'migration.sql');\n if (!existsSync(migrationPath)) {\n ctx.log.error(`Cannot resolve --applied: ${migrationPath} does not exist — the bytes being accepted must be the committed ones.`);\n return { success: false };\n }\n sha256 = sha256OfMigration(readFileSync(migrationPath, 'utf-8'));\n }\n\n const connection = await openManualDoorConnection(ctx, saasRoot);\n if (!connection) return { success: false };\n\n try {\n await resolvePostgresMigrationLedgerEntry({\n db: connection.db,\n name,\n resolution: applied ? MigrationResolution.APPLIED : MigrationResolution.ROLLED_BACK,\n sha256,\n resolvedBy: process.env.USER ?? 'operator',\n });\n ctx.log.success(applied\n ? ` \"${name}\" re-accepted as APPLIED at the committed bytes' sha256 (nothing was executed).`\n : ` \"${name}\" recorded ROLLED_BACK — terminal evidence; a same-name migration now applies fresh.`);\n return { success: true };\n } catch (error) {\n ctx.log.error(ErrorUtils.extractErrorMessage(error));\n return { success: false };\n } finally {\n await connection.close().catch(() => undefined);\n }\n }\n}\n"]}
1
+ {"version":3,"file":"resolve.command.js","sourceRoot":"","sources":["../../../../src/commands/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,mCAAmC,CAAC;gBACxC,EAAE,EAAE,UAAU,CAAC,EAAE;gBACjB,IAAI;gBACJ,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC,CAAC,mBAAmB,CAAC,WAAW;gBACnF,MAAM;gBACN,UAAU,EAAE,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,UAAU;aAC3C,CAAC,CAAC;YACH,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO;gBACrB,CAAC,CAAC,MAAM,IAAI,iFAAiF;gBAC7F,CAAC,CAAC,MAAM,IAAI,sFAAsF,CAAC,CAAC;YACtG,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;QAC3B,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC,CAAC;YACrD,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;QAC5B,CAAC;gBAAS,CAAC;YACT,MAAM,UAAU,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;QAClD,CAAC;IACH,CAAC;CACF","sourcesContent":["/**\n * `wildo db resolve (--applied | --rolled-back) <migration-name>` — the K8 remediation verbs.\n *\n * Each verb is the documented remedy of one runner refusal, and the refusal messages name this\n * command — the pairing is the whole point (a refusal that does not carry its remedy just moves\n * the derivation to a human who may get it wrong):\n *\n * - `--applied` re-accepts a migration's CURRENT bytes as the applied truth — the remedy for the\n * edited-after-apply refusal when the edit was deliberate. Records the file's SHA-256 WITHOUT\n * executing anything; resolving is a statement about history, never a way to run SQL.\n * - `--rolled-back` declares an applied migration never-happened — terminal evidence, not a row\n * deletion, so the ledger keeps who resolved it and when. A same-name file applies fresh after.\n *\n * Both are recorded with the resolver's identity (`resolve:<user>` in `appliedBy`).\n */\n\nimport { existsSync, readFileSync } from 'fs';\nimport { join } from 'path';\nimport {\n MigrationResolution,\n resolvePostgresMigrationLedgerEntry,\n sha256OfMigration,\n} from '@wildo-ai/saas-backend-lib';\nimport { BaseCommand } from '~wildo-cli/kernel/base-command';\nimport { CommandCategory } from '~wildo-cli/kernel/types';\nimport type { CommandMeta, CommandContext, CommandResult } from '~wildo-cli/kernel/types';\nimport { ErrorUtils } from '~wildo-cli/infrastructure/errors/error.utils';\nimport { requireSaasRoot } from '~wildo-cli/services/registry/registry-command.utils';\nimport { MIGRATIONS_RELATIVE_DIR } from '~wildo-cli/commands/db/db-schema-plan.utils';\nimport { openManualDoorConnection } from '~wildo-cli/commands/db/migrate.command';\n\nexport default class DbResolveCommand extends BaseCommand {\n readonly meta: CommandMeta = {\n name: 'db resolve',\n description: 'Correct the migration ledger: re-accept edited bytes (--applied) or declare never-happened (--rolled-back).',\n category: CommandCategory.Config,\n args: [\n { name: 'migration', description: 'The migration folder name, e.g. 20260811T120000_add-slug.', required: true },\n ],\n flags: {\n applied: {\n type: 'boolean',\n description: 'Re-accept the migration file\\'s CURRENT bytes as the applied truth (records its sha256; executes nothing).',\n default: false,\n },\n 'rolled-back': {\n type: 'boolean',\n description: 'Declare the migration never-happened (terminal ROLLED_BACK evidence; a same-name file applies fresh).',\n default: false,\n },\n },\n };\n\n async run(ctx: CommandContext): Promise<CommandResult> {\n const saasRoot = requireSaasRoot(ctx, 'db-resolve');\n if (!saasRoot) return { success: false };\n\n const applied = ctx.flags.applied === true;\n const rolledBack = ctx.flags['rolled-back'] === true;\n if (applied === rolledBack) {\n ctx.log.error('Exactly ONE of --applied / --rolled-back is required — they are opposite statements about history.');\n return { success: false };\n }\n const name = (ctx.args.migration ?? '').trim();\n if (!name) {\n ctx.log.error('The migration name (its folder name) is required: `wildo db resolve --applied 20260811T120000_add-slug`.');\n return { success: false };\n }\n\n let sha256: string | undefined;\n if (applied) {\n // The sha comes from the FILE, not from a flag: what is being accepted is exactly what is\n // committed, and asking the operator to paste a hash invites accepting something else.\n const migrationPath = join(saasRoot, MIGRATIONS_RELATIVE_DIR, name, 'migration.sql');\n if (!existsSync(migrationPath)) {\n ctx.log.error(`Cannot resolve --applied: ${migrationPath} does not exist — the bytes being accepted must be the committed ones.`);\n return { success: false };\n }\n sha256 = sha256OfMigration(readFileSync(migrationPath, 'utf-8'));\n }\n\n const connection = await openManualDoorConnection(ctx, saasRoot);\n if (!connection) return { success: false };\n\n try {\n await resolvePostgresMigrationLedgerEntry({\n db: connection.db,\n name,\n resolution: applied ? MigrationResolution.APPLIED : MigrationResolution.ROLLED_BACK,\n sha256,\n resolvedBy: process.env.USER ?? 'operator',\n });\n ctx.log.success(applied\n ? ` \"${name}\" re-accepted as APPLIED at the committed bytes' sha256 (nothing was executed).`\n : ` \"${name}\" recorded ROLLED_BACK — terminal evidence; a same-name migration now applies fresh.`);\n return { success: true };\n } catch (error) {\n ctx.log.error(ErrorUtils.extractErrorMessage(error));\n return { success: false };\n } finally {\n await connection.close().catch(() => undefined);\n }\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"charts-audit.command.d.ts","sourceRoot":"","sources":["../../../../../../src/commands/dev/charts-audit.command.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAG7D,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AA4C1F;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,WAAW;IAC5D,QAAQ,CAAC,IAAI,EAAE,WAAW,CAaxB;IAEI,GAAG,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;CAyEvD"}
1
+ {"version":3,"file":"charts-audit.command.d.ts","sourceRoot":"","sources":["../../../../src/commands/dev/charts-audit.command.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAG7D,OAAO,KAAK,EAAE,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BAAkB,mBAAmB,CAAC,MAAM,UAAU;oBAC3H,CAAC,CAAC,oEAAoE,0BAA0B,CAAC,MAAM,kBAAkB,mBAAmB,CAAC,MAAM,iCAAiC,CACvL,CAAC;YACJ,CAAC;YACD,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YAEjB,OAAO,EAAE,OAAO,EAAE,CAAC,MAAM,EAAE,CAAC;QAC9B,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,oCAAoC,UAAU,CAAC,mBAAmB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YAC3F,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;QAC5B,CAAC;IACH,CAAC;CACF","sourcesContent":["import chalk from 'chalk';\n\nimport { BaseCommand } from '~wildo-cli/kernel/base-command';\nimport { CommandCategory } from '~wildo-cli/kernel/types';\nimport { ErrorUtils } from '~wildo-cli/infrastructure/errors/error.utils';\nimport type { CommandMeta, CommandContext, CommandResult } from '~wildo-cli/kernel/types';\nimport { ensureSaasAppScope } from '~wildo-cli/kernel/command-scope-utils';\nimport { CompanionClient } from '~wildo-cli/services/companion/companion-client.service';\nimport { loadAppLocalRuntimeServiceAddresses } from '~wildo-cli/services/application/app-local-runtime-addresses.service';\n\n/**\n * Report shape returned by the companion `POST /api/companion/charts/audit`\n * route (the pure `ChartRegistrationAlignmentReport` from\n * `@wildo-ai/saas-models`, serialized). The CLI only formats + gates on it — the\n * companion does the cross-process composition (frontend chartView refs from the\n * frontend subprocess × backend-registered refs from the merged backend modules).\n */\ninterface ChartRegistrationAuditReport {\n /**\n * WHICH backend set the companion compared against — the serialized\n * `ChartRegistrationBackendRefsProvenance`. Only `'effective-initialization-config'` is the set\n * the backend registers; `'module-declarations'` is what the modules DECLARE, which an\n * application's `ApplicationInitializationOverrides.chartDefinitions` REPLACES rather than merges.\n */\n backendRefsProvenance?: string;\n /** Serialized `ChartRegistrationAlignmentVerdict` — `'aligned' | 'misaligned' | 'cannot-vouch'`. */\n verdict?: string;\n unregisteredFrontendCharts: Array<{\n chartDefinitionRef: string;\n resourceType: string;\n chartViewRef: string;\n }>;\n orphanBackendCharts: string[];\n}\n\n/**\n * The one verdict that entitles this command to print \"aligned\".\n *\n * A string literal rather than an import: the CLI reads a SERIALIZED report off an HTTP response, so\n * this is a wire value being pinned at the boundary that decodes it, not a vocabulary this package\n * owns. Kept in step by `ChartRegistrationAlignmentVerdict.ALIGNED` in `@wildo-ai/saas-models`.\n */\n// semantic-literal-boundary: serialized companion-route verdict, decoded here\nconst VERDICT_ALIGNED = 'aligned';\n// semantic-literal-boundary: serialized companion-route verdict, decoded here\nconst VERDICT_CANNOT_VOUCH = 'cannot-vouch';\n\nconst CHARTS_AUDIT_TIMEOUT_MS = 60_000;\n\n/**\n * `wildo charts audit` — fail-fast drift guard for resource-owned charts.\n *\n * A chart authored in a frontend `chartViews[].chartDefinition` but NOT\n * registered in the owning backend module's `chartDefinitions` produces a runtime\n * `chart_not_found` 404 — the host renders but the data fetch fails, showing an\n * error card with a retry action. That failure is LOUD but LATE: it is visible only\n * to whoever opens the chart, so a chart on a rarely-visited surface ships broken.\n * This command moves the discovery to authoring time. Two channels:\n * - FAIL: `unregisteredFrontendCharts` — a chartView with no backend registration\n * (always a runtime 404). Exits non-zero.\n * - WARN: `orphanBackendCharts` — a backend chart no frontend view references\n * (valid for API/programmatic charts). `--strict` escalates it to a failure.\n */\nexport default class DevChartsAuditCommand extends BaseCommand {\n readonly meta: CommandMeta = {\n name: 'charts audit',\n description:\n 'Audit chart-registration alignment: every frontend chartView must have a backend '\n + 'registration, else its data fetch 404s (chart_not_found) for whoever opens it.',\n category: CommandCategory.Dev,\n flags: {\n strict: {\n type: 'boolean',\n description: 'Escalate orphan-backend-chart warnings (backend charts with no frontend view) to failures.',\n default: false,\n },\n },\n };\n\n async run(ctx: CommandContext): Promise<CommandResult> {\n if (!ensureSaasAppScope(ctx)) {\n return { success: false };\n }\n\n try {\n ctx.log.info(chalk.cyan('\\n Auditing chart registration via dev companion...\\n'));\n\n const saasRoot = ctx.cliContext.resolvedHomes.app.declarationRoot;\n const serviceAddresses = saasRoot ? await loadAppLocalRuntimeServiceAddresses(saasRoot) : undefined;\n const devCompanion = serviceAddresses?.devCompanion;\n\n const report = await CompanionClient.post<ChartRegistrationAuditReport>(\n '/api/companion/charts/audit',\n {},\n { appRoot: saasRoot, baseUrl: devCompanion?.url, port: devCompanion?.port, timeoutMs: CHARTS_AUDIT_TIMEOUT_MS },\n );\n\n const strict = ctx.flags.strict === true;\n const { unregisteredFrontendCharts, orphanBackendCharts } = report;\n\n if (unregisteredFrontendCharts.length > 0) {\n ctx.log.error(\n ` FAIL — ${unregisteredFrontendCharts.length} chart view(s) reference a chart NOT registered backend-side (each 404s at runtime):`,\n );\n for (const chart of unregisteredFrontendCharts) {\n ctx.log.error(` • ${chart.resourceType}.${chart.chartViewRef} → chartDefinition.ref '${chart.chartDefinitionRef}'`);\n }\n ctx.log.info(\" Fix: add the shared ChartDefinition to the owning backend module's `chartDefinitions`.\");\n }\n\n if (orphanBackendCharts.length > 0) {\n const label = strict ? 'FAIL (--strict)' : 'WARN';\n ctx.log.warn(\n ` ${label} — ${orphanBackendCharts.length} backend chart(s) with no frontend chartView (valid for API/programmatic charts):`,\n );\n for (const ref of orphanBackendCharts) {\n ctx.log.warn(` • '${ref}'`);\n }\n }\n\n // A clean FAIL channel is evidence of alignment ONLY if the companion compared against the set\n // the backend actually registers. Printing \"aligned\" off a comparison that used the module\n // DECLARATIONS is the defect this command shipped with: an application override that dropped a\n // declared chart produced a green line and a 404 for whoever opened the chart.\n const cannotVouch = report.verdict === VERDICT_CANNOT_VOUCH\n || (report.verdict === undefined && report.backendRefsProvenance === undefined);\n const failed = unregisteredFrontendCharts.length > 0\n || (strict && orphanBackendCharts.length > 0)\n || (strict && cannotVouch);\n if (cannotVouch) {\n ctx.log.warn(\n ` ${strict ? 'FAIL (--strict)' : 'WARN'} — cannot vouch for alignment: the companion compared against `\n + `'${report.backendRefsProvenance ?? 'unknown'}', not the set the backend registers. An application `\n + 'supplying `ApplicationInitializationOverrides.chartDefinitions` REPLACES the declared array, so a '\n + 'dropped chart would read as aligned here and 404 at runtime.',\n );\n }\n if (!failed) {\n ctx.log.success(\n report.verdict === VERDICT_ALIGNED\n ? ` Chart registration aligned — ${unregisteredFrontendCharts.length} unregistered, ${orphanBackendCharts.length} orphan.`\n : ` Chart registration audit completed WITHOUT a vouched verdict — ${unregisteredFrontendCharts.length} unregistered, ${orphanBackendCharts.length} orphan. See the warning above.`,\n );\n }\n ctx.log.info('');\n\n return { success: !failed };\n } catch (error) {\n ctx.log.error(`Chart registration audit failed: ${ErrorUtils.extractErrorMessage(error)}`);\n return { success: false };\n }\n }\n}\n"]}
1
+ {"version":3,"file":"charts-audit.command.js","sourceRoot":"","sources":["../../../../src/commands/dev/charts-audit.command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,8CAA8C,CAAC;AAE1E,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,MAAM,wDAAwD,CAAC;AACzF,OAAO,EAAE,mCAAmC,EAAE,MAAM,qEAAqE,CAAC;AA2B1H;;;;;;GAMG;AACH,8EAA8E;AAC9E,MAAM,eAAe,GAAG,SAAS,CAAC;AAClC,8EAA8E;AAC9E,MAAM,oBAAoB,GAAG,cAAc,CAAC;AAE5C,MAAM,uBAAuB,GAAG,MAAM,CAAC;AAEvC;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,WAAW;IACnD,IAAI,GAAgB;QAC3B,IAAI,EAAE,cAA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qB,IAAI,SAAS,uDAAuD;sBACpG,oGAAoG;sBACpG,8DAA8D,CACjE,CAAC;YACJ,CAAC;YACD,IAAI,CAAC,MAAM,EAAE,CAAC;gBACZ,GAAG,CAAC,GAAG,CAAC,OAAO,CACb,MAAM,CAAC,OAAO,KAAK,eAAe;oBAChC,CAAC,CAAC,kCAAkC,0BAA0B,CAAC,MAAM,kBAAkB,mBAAmB,CAAC,MAAM,UAAU;oBAC3H,CAAC,CAAC,oEAAoE,0BAA0B,CAAC,MAAM,kBAAkB,mBAAmB,CAAC,MAAM,iCAAiC,CACvL,CAAC;YACJ,CAAC;YACD,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YAEjB,OAAO,EAAE,OAAO,EAAE,CAAC,MAAM,EAAE,CAAC;QAC9B,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,oCAAoC,UAAU,CAAC,mBAAmB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YAC3F,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;QAC5B,CAAC;IACH,CAAC;CACF","sourcesContent":["import chalk from 'chalk';\n\nimport { BaseCommand } from '~wildo-cli/kernel/base-command';\nimport { CommandCategory } from '~wildo-cli/kernel/types';\nimport { ErrorUtils } from '~wildo-cli/infrastructure/errors/error.utils';\nimport type { CommandMeta, CommandContext, CommandResult } from '~wildo-cli/kernel/types';\nimport { ensureSaasAppScope } from '~wildo-cli/kernel/command-scope-utils';\nimport { CompanionClient } from '~wildo-cli/services/companion/companion-client.service';\nimport { loadAppLocalRuntimeServiceAddresses } from '~wildo-cli/services/application/app-local-runtime-addresses.service';\n\n/**\n * Report shape returned by the companion `POST /api/companion/charts/audit`\n * route (the pure `ChartRegistrationAlignmentReport` from\n * `@wildo-ai/saas-models`, serialized). The CLI only formats + gates on it — the\n * companion does the cross-process composition (frontend chartView refs from the\n * frontend subprocess × backend-registered refs from the merged backend modules).\n */\ninterface ChartRegistrationAuditReport {\n /**\n * WHICH backend set the companion compared against — the serialized\n * `ChartRegistrationBackendRefsProvenance`. Only `'effective-initialization-config'` is the set\n * the backend registers; `'module-declarations'` is what the modules DECLARE, which an\n * application's `ApplicationInitializationOverrides.chartDefinitions` REPLACES rather than merges.\n */\n backendRefsProvenance?: string;\n /** Serialized `ChartRegistrationAlignmentVerdict` — `'aligned' | 'misaligned' | 'cannot-vouch'`. */\n verdict?: string;\n unregisteredFrontendCharts: Array<{\n chartDefinitionRef: string;\n resourceType: string;\n chartViewRef: string;\n }>;\n orphanBackendCharts: string[];\n}\n\n/**\n * The one verdict that entitles this command to print \"aligned\".\n *\n * A string literal rather than an import: the CLI reads a SERIALIZED report off an HTTP response, so\n * this is a wire value being pinned at the boundary that decodes it, not a vocabulary this package\n * owns. Kept in step by `ChartRegistrationAlignmentVerdict.ALIGNED` in `@wildo-ai/saas-models`.\n */\n// semantic-literal-boundary: serialized companion-route verdict, decoded here\nconst VERDICT_ALIGNED = 'aligned';\n// semantic-literal-boundary: serialized companion-route verdict, decoded here\nconst VERDICT_CANNOT_VOUCH = 'cannot-vouch';\n\nconst CHARTS_AUDIT_TIMEOUT_MS = 60_000;\n\n/**\n * `wildo charts audit` — fail-fast drift guard for resource-owned charts.\n *\n * A chart authored in a frontend `chartViews[].chartDefinition` but NOT\n * registered in the owning backend module's `chartDefinitions` produces a runtime\n * `chart_not_found` 404 — the host renders but the data fetch fails, showing an\n * error card with a retry action. That failure is LOUD but LATE: it is visible only\n * to whoever opens the chart, so a chart on a rarely-visited surface ships broken.\n * This command moves the discovery to authoring time. Two channels:\n * - FAIL: `unregisteredFrontendCharts` — a chartView with no backend registration\n * (always a runtime 404). Exits non-zero.\n * - WARN: `orphanBackendCharts` — a backend chart no frontend view references\n * (valid for API/programmatic charts). `--strict` escalates it to a failure.\n */\nexport default class DevChartsAuditCommand extends BaseCommand {\n readonly meta: CommandMeta = {\n name: 'charts audit',\n description:\n 'Audit chart-registration alignment: every frontend chartView must have a backend '\n + 'registration, else its data fetch 404s (chart_not_found) for whoever opens it.',\n category: CommandCategory.Dev,\n flags: {\n strict: {\n type: 'boolean',\n description: 'Escalate orphan-backend-chart warnings (backend charts with no frontend view) to failures.',\n default: false,\n },\n },\n };\n\n async run(ctx: CommandContext): Promise<CommandResult> {\n if (!ensureSaasAppScope(ctx)) {\n return { success: false };\n }\n\n try {\n ctx.log.info(chalk.cyan('\\n Auditing chart registration via dev companion...\\n'));\n\n const saasRoot = ctx.cliContext.resolvedHomes.app.declarationRoot;\n const serviceAddresses = saasRoot ? await loadAppLocalRuntimeServiceAddresses(saasRoot) : undefined;\n const devCompanion = serviceAddresses?.devCompanion;\n\n const report = await CompanionClient.post<ChartRegistrationAuditReport>(\n '/api/companion/charts/audit',\n {},\n { appRoot: saasRoot, baseUrl: devCompanion?.url, port: devCompanion?.port, timeoutMs: CHARTS_AUDIT_TIMEOUT_MS },\n );\n\n const strict = ctx.flags.strict === true;\n const { unregisteredFrontendCharts, orphanBackendCharts } = report;\n\n if (unregisteredFrontendCharts.length > 0) {\n ctx.log.error(\n ` FAIL — ${unregisteredFrontendCharts.length} chart view(s) reference a chart NOT registered backend-side (each 404s at runtime):`,\n );\n for (const chart of unregisteredFrontendCharts) {\n ctx.log.error(` • ${chart.resourceType}.${chart.chartViewRef} → chartDefinition.ref '${chart.chartDefinitionRef}'`);\n }\n ctx.log.info(\" Fix: add the shared ChartDefinition to the owning backend module's `chartDefinitions`.\");\n }\n\n if (orphanBackendCharts.length > 0) {\n const label = strict ? 'FAIL (--strict)' : 'WARN';\n ctx.log.warn(\n ` ${label} — ${orphanBackendCharts.length} backend chart(s) with no frontend chartView (valid for API/programmatic charts):`,\n );\n for (const ref of orphanBackendCharts) {\n ctx.log.warn(` • '${ref}'`);\n }\n }\n\n // A clean FAIL channel is evidence of alignment ONLY if the companion compared against the set\n // the backend actually registers. Printing \"aligned\" off a comparison that used the module\n // DECLARATIONS is the defect this command shipped with: an application override that dropped a\n // declared chart produced a green line and a 404 for whoever opened the chart.\n const cannotVouch = report.verdict === VERDICT_CANNOT_VOUCH\n || (report.verdict === undefined && report.backendRefsProvenance === undefined);\n const failed = unregisteredFrontendCharts.length > 0\n || (strict && orphanBackendCharts.length > 0)\n || (strict && cannotVouch);\n if (cannotVouch) {\n ctx.log.warn(\n ` ${strict ? 'FAIL (--strict)' : 'WARN'} — cannot vouch for alignment: the companion compared against `\n + `'${report.backendRefsProvenance ?? 'unknown'}', not the set the backend registers. An application `\n + 'supplying `ApplicationInitializationOverrides.chartDefinitions` REPLACES the declared array, so a '\n + 'dropped chart would read as aligned here and 404 at runtime.',\n );\n }\n if (!failed) {\n ctx.log.success(\n report.verdict === VERDICT_ALIGNED\n ? ` Chart registration aligned — ${unregisteredFrontendCharts.length} unregistered, ${orphanBackendCharts.length} orphan.`\n : ` Chart registration audit completed WITHOUT a vouched verdict — ${unregisteredFrontendCharts.length} unregistered, ${orphanBackendCharts.length} orphan. See the warning above.`,\n );\n }\n ctx.log.info('');\n\n return { success: !failed };\n } catch (error) {\n ctx.log.error(`Chart registration audit failed: ${ErrorUtils.extractErrorMessage(error)}`);\n return { success: false };\n }\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"design-tokens-generate.command.d.ts","sourceRoot":"","sources":["../../../../../../src/commands/dev/design-tokens-generate.command.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7D,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAG1F,MAAM,CAAC,OAAO,OAAO,8BAA+B,SAAQ,WAAW;IACrE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAWxB;IAEI,GAAG,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;CAGvD"}
1
+ {"version":3,"file":"design-tokens-generate.command.d.ts","sourceRoot":"","sources":["../../../../src/commands/dev/design-tokens-generate.command.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7D,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAG1F,MAAM,CAAC,OAAO,OAAO,8BAA+B,SAAQ,WAAW;IACrE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAWxB;IAEI,GAAG,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;CAGvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"design-tokens-generate.command.js","sourceRoot":"","sources":["../../../../../../src/commands/dev/design-tokens-generate.command.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,iEAAiE,CAAC;AAE1G,MAAM,CAAC,OAAO,OAAO,8BAA+B,SAAQ,WAAW;IAC5D,IAAI,GAAgB;QAC3B,IAAI,EAAE,wBAAwB;QAC9B,WAAW,EAAE,wBAAwB;QACrC,QAAQ,EAAE,eAAe,CAAC,GAAG;QAC7B,IAAI,EAAE;YACJ;gBACE,IAAI,EAAE,MAAM;gBACZ,WAAW,EAAE,6CAA6C;gBAC1D,QAAQ,EAAE,KAAK;aAChB;SACF;KACF,CAAC;IAEF,KAAK,CAAC,GAAG,CAAC,GAAmB;QAC3B,OAAO,uBAAuB,CAAC,GAAG,CAAC,CAAC;IACtC,CAAC;CACF","sourcesContent":["/**\n * design-tokens generate — Generate design tokens.\n */\n\nimport { BaseCommand } from '~wildo-cli/kernel/base-command';\nimport { CommandCategory } from '~wildo-cli/kernel/types';\nimport type { CommandMeta, CommandContext, CommandResult } from '~wildo-cli/kernel/types';\nimport { runDesignTokensGenerate } from '~wildo-cli/services/design-tokens/design-tokens-command.service';\n\nexport default class FwkDesignTokensGenerateCommand extends BaseCommand {\n readonly meta: CommandMeta = {\n name: 'design-tokens generate',\n description: 'Generate design tokens',\n category: CommandCategory.Dev,\n args: [\n {\n name: 'path',\n description: 'Optional frontend app root or src directory',\n required: false,\n },\n ],\n };\n\n async run(ctx: CommandContext): Promise<CommandResult> {\n return runDesignTokensGenerate(ctx);\n }\n}\n"]}
1
+ {"version":3,"file":"design-tokens-generate.command.js","sourceRoot":"","sources":["../../../../src/commands/dev/design-tokens-generate.command.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,iEAAiE,CAAC;AAE1G,MAAM,CAAC,OAAO,OAAO,8BAA+B,SAAQ,WAAW;IAC5D,IAAI,GAAgB;QAC3B,IAAI,EAAE,wBAAwB;QAC9B,WAAW,EAAE,wBAAwB;QACrC,QAAQ,EAAE,eAAe,CAAC,GAAG;QAC7B,IAAI,EAAE;YACJ;gBACE,IAAI,EAAE,MAAM;gBACZ,WAAW,EAAE,6CAA6C;gBAC1D,QAAQ,EAAE,KAAK;aAChB;SACF;KACF,CAAC;IAEF,KAAK,CAAC,GAAG,CAAC,GAAmB;QAC3B,OAAO,uBAAuB,CAAC,GAAG,CAAC,CAAC;IACtC,CAAC;CACF","sourcesContent":["/**\n * design-tokens generate — Generate design tokens.\n */\n\nimport { BaseCommand } from '~wildo-cli/kernel/base-command';\nimport { CommandCategory } from '~wildo-cli/kernel/types';\nimport type { CommandMeta, CommandContext, CommandResult } from '~wildo-cli/kernel/types';\nimport { runDesignTokensGenerate } from '~wildo-cli/services/design-tokens/design-tokens-command.service';\n\nexport default class FwkDesignTokensGenerateCommand extends BaseCommand {\n readonly meta: CommandMeta = {\n name: 'design-tokens generate',\n description: 'Generate design tokens',\n category: CommandCategory.Dev,\n args: [\n {\n name: 'path',\n description: 'Optional frontend app root or src directory',\n required: false,\n },\n ],\n };\n\n async run(ctx: CommandContext): Promise<CommandResult> {\n return runDesignTokensGenerate(ctx);\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"design-tokens-init.command.d.ts","sourceRoot":"","sources":["../../../../../../src/commands/dev/design-tokens-init.command.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7D,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAG1F,MAAM,CAAC,OAAO,OAAO,0BAA2B,SAAQ,WAAW;IACjE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAWxB;IAEI,GAAG,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;CAGvD"}
1
+ {"version":3,"file":"design-tokens-init.command.d.ts","sourceRoot":"","sources":["../../../../src/commands/dev/design-tokens-init.command.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7D,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAG1F,MAAM,CAAC,OAAO,OAAO,0BAA2B,SAAQ,WAAW;IACjE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAWxB;IAEI,GAAG,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;CAGvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"design-tokens-init.command.js","sourceRoot":"","sources":["../../../../../../src/commands/dev/design-tokens-init.command.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,iEAAiE,CAAC;AAEtG,MAAM,CAAC,OAAO,OAAO,0BAA2B,SAAQ,WAAW;IACxD,IAAI,GAAgB;QAC3B,IAAI,EAAE,oBAAoB;QAC1B,WAAW,EAAE,wCAAwC;QACrD,QAAQ,EAAE,eAAe,CAAC,GAAG;QAC7B,IAAI,EAAE;YACJ;gBACE,IAAI,EAAE,MAAM;gBACZ,WAAW,EAAE,6CAA6C;gBAC1D,QAAQ,EAAE,KAAK;aAChB;SACF;KACF,CAAC;IAEF,KAAK,CAAC,GAAG,CAAC,GAAmB;QAC3B,OAAO,mBAAmB,CAAC,GAAG,CAAC,CAAC;IAClC,CAAC;CACF","sourcesContent":["/**\n * design-tokens init — Initialize design tokens configuration.\n */\n\nimport { BaseCommand } from '~wildo-cli/kernel/base-command';\nimport { CommandCategory } from '~wildo-cli/kernel/types';\nimport type { CommandMeta, CommandContext, CommandResult } from '~wildo-cli/kernel/types';\nimport { runDesignTokensInit } from '~wildo-cli/services/design-tokens/design-tokens-command.service';\n\nexport default class FwkDesignTokensInitCommand extends BaseCommand {\n readonly meta: CommandMeta = {\n name: 'design-tokens init',\n description: 'Initialize design tokens configuration',\n category: CommandCategory.Dev,\n args: [\n {\n name: 'path',\n description: 'Optional frontend app root or src directory',\n required: false,\n },\n ],\n };\n\n async run(ctx: CommandContext): Promise<CommandResult> {\n return runDesignTokensInit(ctx);\n }\n}\n"]}
1
+ {"version":3,"file":"design-tokens-init.command.js","sourceRoot":"","sources":["../../../../src/commands/dev/design-tokens-init.command.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,iEAAiE,CAAC;AAEtG,MAAM,CAAC,OAAO,OAAO,0BAA2B,SAAQ,WAAW;IACxD,IAAI,GAAgB;QAC3B,IAAI,EAAE,oBAAoB;QAC1B,WAAW,EAAE,wCAAwC;QACrD,QAAQ,EAAE,eAAe,CAAC,GAAG;QAC7B,IAAI,EAAE;YACJ;gBACE,IAAI,EAAE,MAAM;gBACZ,WAAW,EAAE,6CAA6C;gBAC1D,QAAQ,EAAE,KAAK;aAChB;SACF;KACF,CAAC;IAEF,KAAK,CAAC,GAAG,CAAC,GAAmB;QAC3B,OAAO,mBAAmB,CAAC,GAAG,CAAC,CAAC;IAClC,CAAC;CACF","sourcesContent":["/**\n * design-tokens init — Initialize design tokens configuration.\n */\n\nimport { BaseCommand } from '~wildo-cli/kernel/base-command';\nimport { CommandCategory } from '~wildo-cli/kernel/types';\nimport type { CommandMeta, CommandContext, CommandResult } from '~wildo-cli/kernel/types';\nimport { runDesignTokensInit } from '~wildo-cli/services/design-tokens/design-tokens-command.service';\n\nexport default class FwkDesignTokensInitCommand extends BaseCommand {\n readonly meta: CommandMeta = {\n name: 'design-tokens init',\n description: 'Initialize design tokens configuration',\n category: CommandCategory.Dev,\n args: [\n {\n name: 'path',\n description: 'Optional frontend app root or src directory',\n required: false,\n },\n ],\n };\n\n async run(ctx: CommandContext): Promise<CommandResult> {\n return runDesignTokensInit(ctx);\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"design-tokens-validate.command.d.ts","sourceRoot":"","sources":["../../../../../../src/commands/dev/design-tokens-validate.command.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7D,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAG1F,MAAM,CAAC,OAAO,OAAO,8BAA+B,SAAQ,WAAW;IACrE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAWxB;IAEI,GAAG,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;CAGvD"}
1
+ {"version":3,"file":"design-tokens-validate.command.d.ts","sourceRoot":"","sources":["../../../../src/commands/dev/design-tokens-validate.command.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7D,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAG1F,MAAM,CAAC,OAAO,OAAO,8BAA+B,SAAQ,WAAW;IACrE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAWxB;IAEI,GAAG,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;CAGvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"design-tokens-validate.command.js","sourceRoot":"","sources":["../../../../../../src/commands/dev/design-tokens-validate.command.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,iEAAiE,CAAC;AAE1G,MAAM,CAAC,OAAO,OAAO,8BAA+B,SAAQ,WAAW;IAC5D,IAAI,GAAgB;QAC3B,IAAI,EAAE,wBAAwB;QAC9B,WAAW,EAAE,wBAAwB;QACrC,QAAQ,EAAE,eAAe,CAAC,GAAG;QAC7B,IAAI,EAAE;YACJ;gBACE,IAAI,EAAE,MAAM;gBACZ,WAAW,EAAE,6CAA6C;gBAC1D,QAAQ,EAAE,KAAK;aAChB;SACF;KACF,CAAC;IAEF,KAAK,CAAC,GAAG,CAAC,GAAmB;QAC3B,OAAO,uBAAuB,CAAC,GAAG,CAAC,CAAC;IACtC,CAAC;CACF","sourcesContent":["/**\n * design-tokens validate — Validate design tokens.\n */\n\nimport { BaseCommand } from '~wildo-cli/kernel/base-command';\nimport { CommandCategory } from '~wildo-cli/kernel/types';\nimport type { CommandMeta, CommandContext, CommandResult } from '~wildo-cli/kernel/types';\nimport { runDesignTokensValidate } from '~wildo-cli/services/design-tokens/design-tokens-command.service';\n\nexport default class FwkDesignTokensValidateCommand extends BaseCommand {\n readonly meta: CommandMeta = {\n name: 'design-tokens validate',\n description: 'Validate design tokens',\n category: CommandCategory.Dev,\n args: [\n {\n name: 'path',\n description: 'Optional frontend app root or src directory',\n required: false,\n },\n ],\n };\n\n async run(ctx: CommandContext): Promise<CommandResult> {\n return runDesignTokensValidate(ctx);\n }\n}\n"]}
1
+ {"version":3,"file":"design-tokens-validate.command.js","sourceRoot":"","sources":["../../../../src/commands/dev/design-tokens-validate.command.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,iEAAiE,CAAC;AAE1G,MAAM,CAAC,OAAO,OAAO,8BAA+B,SAAQ,WAAW;IAC5D,IAAI,GAAgB;QAC3B,IAAI,EAAE,wBAAwB;QAC9B,WAAW,EAAE,wBAAwB;QACrC,QAAQ,EAAE,eAAe,CAAC,GAAG;QAC7B,IAAI,EAAE;YACJ;gBACE,IAAI,EAAE,MAAM;gBACZ,WAAW,EAAE,6CAA6C;gBAC1D,QAAQ,EAAE,KAAK;aAChB;SACF;KACF,CAAC;IAEF,KAAK,CAAC,GAAG,CAAC,GAAmB;QAC3B,OAAO,uBAAuB,CAAC,GAAG,CAAC,CAAC;IACtC,CAAC;CACF","sourcesContent":["/**\n * design-tokens validate — Validate design tokens.\n */\n\nimport { BaseCommand } from '~wildo-cli/kernel/base-command';\nimport { CommandCategory } from '~wildo-cli/kernel/types';\nimport type { CommandMeta, CommandContext, CommandResult } from '~wildo-cli/kernel/types';\nimport { runDesignTokensValidate } from '~wildo-cli/services/design-tokens/design-tokens-command.service';\n\nexport default class FwkDesignTokensValidateCommand extends BaseCommand {\n readonly meta: CommandMeta = {\n name: 'design-tokens validate',\n description: 'Validate design tokens',\n category: CommandCategory.Dev,\n args: [\n {\n name: 'path',\n description: 'Optional frontend app root or src directory',\n required: false,\n },\n ],\n };\n\n async run(ctx: CommandContext): Promise<CommandResult> {\n return runDesignTokensValidate(ctx);\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"force-stop.command.d.ts","sourceRoot":"","sources":["../../../../../../src/commands/dev/force-stop.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7D,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAM1F,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,WAAW;IAC1D,QAAQ,CAAC,IAAI,EAAE,WAAW,CAIxB;IAEI,GAAG,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;CAuDvD"}
1
+ {"version":3,"file":"force-stop.command.d.ts","sourceRoot":"","sources":["../../../../src/commands/dev/force-stop.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7D,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAM1F,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,WAAW;IAC1D,QAAQ,CAAC,IAAI,EAAE,WAAW,CAIxB;IAEI,GAAG,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;CAuDvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"force-stop.command.js","sourceRoot":"","sources":["../../../../../../src/commands/dev/force-stop.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,eAA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","sourcesContent":["/**\n * dev force-stop — Kill all pnpm dev processes.\n *\n * Stops dev watchers only. Does NOT stop local infrastructure.\n *\n * Two DIFFERENT populations have to be reaped, and reaping only the first is\n * what made this command unable to fix the situation it exists for:\n *\n * 1. The supervisor recorded in the app's dev pid file — `DevOrchestratorService`.\n * 2. Graph-supervised watchers/runtimes that OUTLIVED their supervisor. When a\n * `local dev` session dies without unwinding, its `tsc-watch` single-writer\n * processes are reparented to init and keep holding their\n * `dist/**\\/.builder.pid` locks. The pid file is gone (or points at a dead\n * supervisor), so population 1 reports \"Dev process is not running\" and exits\n * 0 while the orphan still owns the dist. Every subsequent `local dev` then\n * blocks at `dependency-compile-status-<pkg>-watcher-exited`, because the new\n * watcher correctly refuses to become a second writer to the same dist.\n *\n * `LocalRuntimeProcessCleanupService` is the same root-scoped reaper `local dev`\n * runs at startup, so both entry points converge on one matching authority\n * rather than this command growing a second, drifting process-matching rule.\n */\n\nimport { BaseCommand } from '~wildo-cli/kernel/base-command';\nimport { CommandCategory } from '~wildo-cli/kernel/types';\nimport type { CommandMeta, CommandContext, CommandResult } from '~wildo-cli/kernel/types';\nimport { ErrorUtils } from '~wildo-cli/infrastructure/errors/error.utils';\nimport { DevOrchestratorService } from '~wildo-cli/services/application/dev-orchestrator.service';\nimport { LocalRuntimeProcessCleanupService } from '~wildo-cli/services/deployment/local-runtime-process-cleanup.service';\nimport { InfrastructureHost } from '~wildo-cli/services/environment/infrastructure-host.service';\n\nexport default class DevForceStopCommand extends BaseCommand {\n readonly meta: CommandMeta = {\n name: 'dev force-stop',\n description: 'Kill all pnpm dev processes',\n category: CommandCategory.Dev,\n };\n\n async run(ctx: CommandContext): Promise<CommandResult> {\n const saasRoot = ctx.cliContext.resolvedHomes.app.declarationRoot;\n if (!saasRoot) {\n ctx.log.error('No targeted app root detected. Navigate to a directory containing wildo.saas.config.ts.');\n return { success: false };\n }\n\n const ok = await DevOrchestratorService.stop(saasRoot, ctx.log);\n\n // Reap orphaned watchers/runtimes even when the supervisor pid file was\n // already gone — that is the ONLY state in which this command is reached for\n // the orphan case, so it must not be gated on `ok` or on the supervisor\n // having been found. The framework root is included for a framework\n // developer because the blocking dist locks live under `engine/**` there;\n // without it an orphaned engine watcher stays unreachable from the app root.\n const frameworkPath = ctx.cliContext.resolvedHomes.framework.repositoryRoot;\n const isFrameworkDeveloper = ctx.preferences?.isFrameworkDeveloper ?? false;\n /*\n * A HOSTED application owns no process under the framework root: the platform supervisor and engine\n * watchers there belong to its infrastructure host's session, and reaping them would stop the host's\n * platform. When the host cannot be resolved, the framework root is left alone too — the least\n * destructive reading of \"cannot tell whose these are\".\n */\n let reapsFrameworkRoot = Boolean(frameworkPath && isFrameworkDeveloper);\n if (reapsFrameworkRoot && ctx.activeEnv) {\n try {\n const hostedBy = await InfrastructureHost.resolveForCommand(saasRoot, ctx.activeEnv);\n if (hostedBy !== null) {\n reapsFrameworkRoot = false;\n ctx.log.info(` Framework processes left running: they belong to the platform of ${hostedBy.applicationRoot}.`);\n }\n } catch (error) {\n reapsFrameworkRoot = false;\n ctx.log.warn(` Framework processes left running: this environment's infrastructure owner could not be resolved (${ErrorUtils.extractErrorMessage(error)}).`);\n }\n }\n const cleanupRoots = [saasRoot, ...(reapsFrameworkRoot && frameworkPath ? [frameworkPath] : [])];\n\n let reaped = 0;\n try {\n reaped = await LocalRuntimeProcessCleanupService.stop(cleanupRoots, ctx.log);\n } catch (error) {\n // The reaper throws when the process table cannot be read. That is worth\n // surfacing, but it must not turn a successful supervisor stop into a\n // failure — the caller's stated goal (no dev processes running) may\n // already be satisfied.\n ctx.log.warn(` Could not inspect local processes for orphaned dev watchers: ${ErrorUtils.extractErrorMessage(error)}`);\n return { success: ok };\n }\n\n if (reaped > 0) {\n ctx.log.success(` Reaped ${reaped} orphaned dev process(es) left by a prior session.`);\n }\n return { success: ok };\n }\n}\n"]}
1
+ {"version":3,"file":"force-stop.command.js","sourceRoot":"","sources":["../../../../src/commands/dev/force-stop.command.ts"],"names":[],"mappings":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AC,YAAY,MAAM,oDAAoD,CAAC,CAAC;QAC1F,CAAC;QACD,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IACzB,CAAC;CACF","sourcesContent":["/**\n * dev force-stop — Kill all pnpm dev processes.\n *\n * Stops dev watchers only. Does NOT stop local infrastructure.\n *\n * Two DIFFERENT populations have to be reaped, and reaping only the first is\n * what made this command unable to fix the situation it exists for:\n *\n * 1. The supervisor recorded in the app's dev pid file — `DevOrchestratorService`.\n * 2. Graph-supervised watchers/runtimes that OUTLIVED their supervisor. When a\n * `local dev` session dies without unwinding, its `tsc-watch` single-writer\n * processes are reparented to init and keep holding their\n * `dist/**\\/.builder.pid` locks. The pid file is gone (or points at a dead\n * supervisor), so population 1 reports \"Dev process is not running\" and exits\n * 0 while the orphan still owns the dist. Every subsequent `local dev` then\n * blocks at `dependency-compile-status-<pkg>-watcher-exited`, because the new\n * watcher correctly refuses to become a second writer to the same dist.\n *\n * `LocalRuntimeProcessCleanupService` is the same root-scoped reaper `local dev`\n * runs at startup, so both entry points converge on one matching authority\n * rather than this command growing a second, drifting process-matching rule.\n */\n\nimport { BaseCommand } from '~wildo-cli/kernel/base-command';\nimport { CommandCategory } from '~wildo-cli/kernel/types';\nimport type { CommandMeta, CommandContext, CommandResult } from '~wildo-cli/kernel/types';\nimport { ErrorUtils } from '~wildo-cli/infrastructure/errors/error.utils';\nimport { DevOrchestratorService } from '~wildo-cli/services/application/dev-orchestrator.service';\nimport { LocalRuntimeProcessCleanupService } from '~wildo-cli/services/deployment/local-runtime-process-cleanup.service';\nimport { InfrastructureHost } from '~wildo-cli/services/environment/infrastructure-host.service';\n\nexport default class DevForceStopCommand extends BaseCommand {\n readonly meta: CommandMeta = {\n name: 'dev force-stop',\n description: 'Kill all pnpm dev processes',\n category: CommandCategory.Dev,\n };\n\n async run(ctx: CommandContext): Promise<CommandResult> {\n const saasRoot = ctx.cliContext.resolvedHomes.app.declarationRoot;\n if (!saasRoot) {\n ctx.log.error('No targeted app root detected. Navigate to a directory containing wildo.saas.config.ts.');\n return { success: false };\n }\n\n const ok = await DevOrchestratorService.stop(saasRoot, ctx.log);\n\n // Reap orphaned watchers/runtimes even when the supervisor pid file was\n // already gone — that is the ONLY state in which this command is reached for\n // the orphan case, so it must not be gated on `ok` or on the supervisor\n // having been found. The framework root is included for a framework\n // developer because the blocking dist locks live under `engine/**` there;\n // without it an orphaned engine watcher stays unreachable from the app root.\n const frameworkPath = ctx.cliContext.resolvedHomes.framework.repositoryRoot;\n const isFrameworkDeveloper = ctx.preferences?.isFrameworkDeveloper ?? false;\n /*\n * A HOSTED application owns no process under the framework root: the platform supervisor and engine\n * watchers there belong to its infrastructure host's session, and reaping them would stop the host's\n * platform. When the host cannot be resolved, the framework root is left alone too — the least\n * destructive reading of \"cannot tell whose these are\".\n */\n let reapsFrameworkRoot = Boolean(frameworkPath && isFrameworkDeveloper);\n if (reapsFrameworkRoot && ctx.activeEnv) {\n try {\n const hostedBy = await InfrastructureHost.resolveForCommand(saasRoot, ctx.activeEnv);\n if (hostedBy !== null) {\n reapsFrameworkRoot = false;\n ctx.log.info(` Framework processes left running: they belong to the platform of ${hostedBy.applicationRoot}.`);\n }\n } catch (error) {\n reapsFrameworkRoot = false;\n ctx.log.warn(` Framework processes left running: this environment's infrastructure owner could not be resolved (${ErrorUtils.extractErrorMessage(error)}).`);\n }\n }\n const cleanupRoots = [saasRoot, ...(reapsFrameworkRoot && frameworkPath ? [frameworkPath] : [])];\n\n let reaped = 0;\n try {\n reaped = await LocalRuntimeProcessCleanupService.stop(cleanupRoots, ctx.log);\n } catch (error) {\n // The reaper throws when the process table cannot be read. That is worth\n // surfacing, but it must not turn a successful supervisor stop into a\n // failure — the caller's stated goal (no dev processes running) may\n // already be satisfied.\n ctx.log.warn(` Could not inspect local processes for orphaned dev watchers: ${ErrorUtils.extractErrorMessage(error)}`);\n return { success: ok };\n }\n\n if (reaped > 0) {\n ctx.log.success(` Reaped ${reaped} orphaned dev process(es) left by a prior session.`);\n }\n return { success: ok };\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"resources.command.d.ts","sourceRoot":"","sources":["../../../../../../src/commands/dev/resources.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7D,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAI1F,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,WAAW;IAC1D,QAAQ,CAAC,IAAI,EAAE,WAAW,CAOxB;IAEI,GAAG,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;CA4BvD"}
1
+ {"version":3,"file":"resources.command.d.ts","sourceRoot":"","sources":["../../../../src/commands/dev/resources.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7D,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAI1F,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,WAAW;IAC1D,QAAQ,CAAC,IAAI,EAAE,WAAW,CAOxB;IAEI,GAAG,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;CA4BvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"resources.command.js","sourceRoot":"","sources":["../../../../../../src/commands/dev/resources.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,mCAAmC,EAAE,MAAM,gCAAgC,CAAC;A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,GAAG,CAAC,aAAa,IAAI,GAAG,CAAC;gBACxC,MAAM,WAAW,GAAG,GAAG,GAAG,CAAC,YAAY,IAAI,GAAG,IAAI,GAAG,CAAC,YAAY,IAAI,GAAG,EAAE,CAAC;gBAC5E,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC;YACtI,CAAC;YAED,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,cAAc,mCAAmC,CAAC,MAAM,kBAAkB,CAAC,CAAC,CAAC;QACtG,CAAC;QAED,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC3B,CAAC;CACF","sourcesContent":["/**\n * dev resources — List all registered platform resource types and their relationships.\n *\n * Reads `CustomShared_ResourceType` and `customShared_ResourcesRelationships`\n * directly from `@wildo-ai/platform-core-shared` via static enum imports — no\n * DI container, no backend bootstrap. The data is shared-layer constants, so\n * static imports are sufficient and avoid spinning up an inversify container\n * for a pure introspection command.\n */\n\nimport chalk from 'chalk';\nimport { BaseCommand } from '~wildo-cli/kernel/base-command';\nimport { CommandCategory } from '~wildo-cli/kernel/types';\nimport type { CommandMeta, CommandContext, CommandResult } from '~wildo-cli/kernel/types';\nimport { CustomShared_ResourceType } from '@wildo-ai/platform-core-shared';\nimport { customShared_ResourcesRelationships } from '@wildo-ai/platform-core-shared';\n\nexport default class DevResourcesCommand extends BaseCommand {\n readonly meta: CommandMeta = {\n name: 'dev resources',\n description: 'List all registered platform resource types and relationships',\n category: CommandCategory.Dev,\n flags: {\n relationships: { type: 'boolean', description: 'Show relationships between resources', default: false },\n },\n };\n\n async run(ctx: CommandContext): Promise<CommandResult> {\n const showRelationships = ctx.flags.relationships === true;\n\n const resourceTypes = Object.entries(CustomShared_ResourceType);\n\n ctx.log.info(chalk.cyan('\\n Platform Resource Types:\\n'));\n\n for (const [key, value] of resourceTypes) {\n ctx.log.info(` ${chalk.green('•')} ${chalk.bold(key)} ${chalk.dim(`(${value})`)}`);\n }\n\n ctx.log.info(chalk.dim(`\\n Total: ${resourceTypes.length} resource types\\n`));\n\n if (showRelationships) {\n ctx.log.info(chalk.cyan(' Resource Relationships:\\n'));\n\n for (const rel of customShared_ResourcesRelationships) {\n const source = rel.resourceType1 ?? '?';\n const target = rel.resourceType2 ?? '?';\n const cardinality = `${rel.cardinality1 ?? '?'}:${rel.cardinality2 ?? '?'}`;\n ctx.log.info(` ${chalk.green('→')} ${chalk.bold(String(source))} ${chalk.dim(String(cardinality))} ${chalk.bold(String(target))}`);\n }\n\n ctx.log.info(chalk.dim(`\\n Total: ${customShared_ResourcesRelationships.length} relationships\\n`));\n }\n\n return { success: true };\n }\n}\n"]}
1
+ {"version":3,"file":"resources.command.js","sourceRoot":"","sources":["../../../../src/commands/dev/resources.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,mCAAmC,EAAE,MAAM,gCAAgC,CAAC;AAErF,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,WAAW;IACjD,IAAI,GAAgB;QAC3B,IAAI,EAAE,eAAe;QACrB,WAAW,EAAE,+DAA+D;QAC5E,QAAQ,EAAE,eAAe,CAAC,GAAG;QAC7B,KAAK,EAAE;YACL,aAAa,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EA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AAI,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC;YACtI,CAAC;YAED,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,cAAc,mCAAmC,CAAC,MAAM,kBAAkB,CAAC,CAAC,CAAC;QACtG,CAAC;QAED,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC3B,CAAC;CACF","sourcesContent":["/**\n * dev resources — List all registered platform resource types and their relationships.\n *\n * Reads `CustomShared_ResourceType` and `customShared_ResourcesRelationships`\n * directly from `@wildo-ai/platform-core-shared` via static enum imports — no\n * DI container, no backend bootstrap. The data is shared-layer constants, so\n * static imports are sufficient and avoid spinning up an inversify container\n * for a pure introspection command.\n */\n\nimport chalk from 'chalk';\nimport { BaseCommand } from '~wildo-cli/kernel/base-command';\nimport { CommandCategory } from '~wildo-cli/kernel/types';\nimport type { CommandMeta, CommandContext, CommandResult } from '~wildo-cli/kernel/types';\nimport { CustomShared_ResourceType } from '@wildo-ai/platform-core-shared';\nimport { customShared_ResourcesRelationships } from '@wildo-ai/platform-core-shared';\n\nexport default class DevResourcesCommand extends BaseCommand {\n readonly meta: CommandMeta = {\n name: 'dev resources',\n description: 'List all registered platform resource types and relationships',\n category: CommandCategory.Dev,\n flags: {\n relationships: { type: 'boolean', description: 'Show relationships between resources', default: false },\n },\n };\n\n async run(ctx: CommandContext): Promise<CommandResult> {\n const showRelationships = ctx.flags.relationships === true;\n\n const resourceTypes = Object.entries(CustomShared_ResourceType);\n\n ctx.log.info(chalk.cyan('\\n Platform Resource Types:\\n'));\n\n for (const [key, value] of resourceTypes) {\n ctx.log.info(` ${chalk.green('•')} ${chalk.bold(key)} ${chalk.dim(`(${value})`)}`);\n }\n\n ctx.log.info(chalk.dim(`\\n Total: ${resourceTypes.length} resource types\\n`));\n\n if (showRelationships) {\n ctx.log.info(chalk.cyan(' Resource Relationships:\\n'));\n\n for (const rel of customShared_ResourcesRelationships) {\n const source = rel.resourceType1 ?? '?';\n const target = rel.resourceType2 ?? '?';\n const cardinality = `${rel.cardinality1 ?? '?'}:${rel.cardinality2 ?? '?'}`;\n ctx.log.info(` ${chalk.green('→')} ${chalk.bold(String(source))} ${chalk.dim(String(cardinality))} ${chalk.bold(String(target))}`);\n }\n\n ctx.log.info(chalk.dim(`\\n Total: ${customShared_ResourcesRelationships.length} relationships\\n`));\n }\n\n return { success: true };\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"start.command.d.ts","sourceRoot":"","sources":["../../../../../../src/commands/dev/start.command.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7D,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAoG1F,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,WAAW;IACtD,QAAQ,CAAC,IAAI,EAAE,WAAW,CASxB;IAEI,GAAG,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;YAkQxC,eAAe;YAaf,gBAAgB;YAsDhB,aAAa;CA+E5B"}
1
+ {"version":3,"file":"start.command.d.ts","sourceRoot":"","sources":["../../../../src/commands/dev/start.command.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7D,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAoG1F,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,WAAW;IACtD,QAAQ,CAAC,IAAI,EAAE,WAAW,CASxB;IAEI,GAAG,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;YAkQxC,eAAe;YAaf,gBAAgB;YAsDhB,aAAa;CA+E5B"}