@wildo-ai/wildo-cli 1.1.13 → 1.1.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (589) hide show
  1. package/dist/src/commands/build/approve.command.d.ts +4 -0
  2. package/dist/src/commands/build/approve.command.d.ts.map +1 -1
  3. package/dist/src/commands/build/approve.command.js +14 -3
  4. package/dist/src/commands/build/approve.command.js.map +1 -1
  5. package/dist/src/commands/build/close.command.d.ts +4 -0
  6. package/dist/src/commands/build/close.command.d.ts.map +1 -1
  7. package/dist/src/commands/build/close.command.js +17 -3
  8. package/dist/src/commands/build/close.command.js.map +1 -1
  9. package/dist/src/commands/config/sync.command.d.ts.map +1 -1
  10. package/dist/src/commands/config/sync.command.js +21 -1
  11. package/dist/src/commands/config/sync.command.js.map +1 -1
  12. package/dist/src/commands/creation/feed.command.d.ts.map +1 -1
  13. package/dist/src/commands/creation/feed.command.js +6 -3
  14. package/dist/src/commands/creation/feed.command.js.map +1 -1
  15. package/dist/src/commands/fwk/publish-all.command.d.ts +13 -0
  16. package/dist/src/commands/fwk/publish-all.command.d.ts.map +1 -1
  17. package/dist/src/commands/fwk/publish-all.command.js +57 -3
  18. package/dist/src/commands/fwk/publish-all.command.js.map +1 -1
  19. package/dist/src/commands/fwk/publish-docker.command.d.ts.map +1 -1
  20. package/dist/src/commands/fwk/publish-docker.command.js +16 -1
  21. package/dist/src/commands/fwk/publish-docker.command.js.map +1 -1
  22. package/dist/src/commands/fwk/registry-host.command.d.ts +19 -1
  23. package/dist/src/commands/fwk/registry-host.command.d.ts.map +1 -1
  24. package/dist/src/commands/fwk/registry-host.command.js +78 -3
  25. package/dist/src/commands/fwk/registry-host.command.js.map +1 -1
  26. package/dist/src/commands/generate/email-command.utils.d.ts +2 -0
  27. package/dist/src/commands/generate/email-command.utils.d.ts.map +1 -1
  28. package/dist/src/commands/generate/email-command.utils.js +5 -0
  29. package/dist/src/commands/generate/email-command.utils.js.map +1 -1
  30. package/dist/src/commands/init.command.d.ts +14 -0
  31. package/dist/src/commands/init.command.d.ts.map +1 -1
  32. package/dist/src/commands/init.command.js +36 -5
  33. package/dist/src/commands/init.command.js.map +1 -1
  34. package/dist/src/commands/local/deregister.command.d.ts.map +1 -1
  35. package/dist/src/commands/local/deregister.command.js +4 -0
  36. package/dist/src/commands/local/deregister.command.js.map +1 -1
  37. package/dist/src/commands/local/dev.command.d.ts +6 -0
  38. package/dist/src/commands/local/dev.command.d.ts.map +1 -1
  39. package/dist/src/commands/local/dev.command.js +72 -0
  40. package/dist/src/commands/local/dev.command.js.map +1 -1
  41. package/dist/src/commands/local/jobs-command.utils.d.ts +24 -0
  42. package/dist/src/commands/local/jobs-command.utils.d.ts.map +1 -0
  43. package/dist/src/commands/local/jobs-command.utils.js +44 -0
  44. package/dist/src/commands/local/jobs-command.utils.js.map +1 -0
  45. package/dist/src/commands/local/jobs-run.command.d.ts +7 -0
  46. package/dist/src/commands/local/jobs-run.command.d.ts.map +1 -0
  47. package/dist/src/commands/local/jobs-run.command.js +92 -0
  48. package/dist/src/commands/local/jobs-run.command.js.map +1 -0
  49. package/dist/src/commands/local/jobs.command.d.ts +7 -0
  50. package/dist/src/commands/local/jobs.command.d.ts.map +1 -0
  51. package/dist/src/commands/local/jobs.command.js +59 -0
  52. package/dist/src/commands/local/jobs.command.js.map +1 -0
  53. package/dist/src/commands/local/tunnel.command.d.ts +84 -0
  54. package/dist/src/commands/local/tunnel.command.d.ts.map +1 -0
  55. package/dist/src/commands/local/tunnel.command.js +274 -0
  56. package/dist/src/commands/local/tunnel.command.js.map +1 -0
  57. package/dist/src/commands/registry/repair-lockfile.command.d.ts.map +1 -1
  58. package/dist/src/commands/registry/repair-lockfile.command.js +1 -0
  59. package/dist/src/commands/registry/repair-lockfile.command.js.map +1 -1
  60. package/dist/src/commands/registry/update.command.d.ts.map +1 -1
  61. package/dist/src/commands/registry/update.command.js +1 -0
  62. package/dist/src/commands/registry/update.command.js.map +1 -1
  63. package/dist/src/commands/seal/verify.command.d.ts +18 -0
  64. package/dist/src/commands/seal/verify.command.d.ts.map +1 -1
  65. package/dist/src/commands/seal/verify.command.js +62 -1
  66. package/dist/src/commands/seal/verify.command.js.map +1 -1
  67. package/dist/src/services/application/app-bootstrap.service.d.ts +41 -1
  68. package/dist/src/services/application/app-bootstrap.service.d.ts.map +1 -1
  69. package/dist/src/services/application/app-bootstrap.service.js +49 -3
  70. package/dist/src/services/application/app-bootstrap.service.js.map +1 -1
  71. package/dist/src/services/application/app-runtime-targets.service.d.ts.map +1 -1
  72. package/dist/src/services/application/app-runtime-targets.service.js +9 -1
  73. package/dist/src/services/application/app-runtime-targets.service.js.map +1 -1
  74. package/dist/src/services/application/application-dependency-alignment.service.d.ts +20 -0
  75. package/dist/src/services/application/application-dependency-alignment.service.d.ts.map +1 -1
  76. package/dist/src/services/application/application-dependency-alignment.service.js +32 -2
  77. package/dist/src/services/application/application-dependency-alignment.service.js.map +1 -1
  78. package/dist/src/services/application/local-tunnel.service.d.ts +153 -0
  79. package/dist/src/services/application/local-tunnel.service.d.ts.map +1 -0
  80. package/dist/src/services/application/local-tunnel.service.js +294 -0
  81. package/dist/src/services/application/local-tunnel.service.js.map +1 -0
  82. package/dist/src/services/application/provider-runtime-sync.service.d.ts.map +1 -1
  83. package/dist/src/services/application/provider-runtime-sync.service.js +29 -1
  84. package/dist/src/services/application/provider-runtime-sync.service.js.map +1 -1
  85. package/dist/src/services/application/saas-skeleton.service.d.ts +7 -0
  86. package/dist/src/services/application/saas-skeleton.service.d.ts.map +1 -1
  87. package/dist/src/services/application/saas-skeleton.service.js +26 -2
  88. package/dist/src/services/application/saas-skeleton.service.js.map +1 -1
  89. package/dist/src/services/catalog/service-address-resolver.service.d.ts +7 -1
  90. package/dist/src/services/catalog/service-address-resolver.service.d.ts.map +1 -1
  91. package/dist/src/services/catalog/service-address-resolver.service.js +6 -3
  92. package/dist/src/services/catalog/service-address-resolver.service.js.map +1 -1
  93. package/dist/src/services/companion/build-console.service.d.ts +39 -2
  94. package/dist/src/services/companion/build-console.service.d.ts.map +1 -1
  95. package/dist/src/services/companion/build-console.service.js +54 -4
  96. package/dist/src/services/companion/build-console.service.js.map +1 -1
  97. package/dist/src/services/companion/creation-console.service.d.ts +6 -1
  98. package/dist/src/services/companion/creation-console.service.d.ts.map +1 -1
  99. package/dist/src/services/companion/creation-console.service.js +14 -2
  100. package/dist/src/services/companion/creation-console.service.js.map +1 -1
  101. package/dist/src/services/companion/creation-drive.service.d.ts.map +1 -1
  102. package/dist/src/services/companion/creation-drive.service.js +5 -2
  103. package/dist/src/services/companion/creation-drive.service.js.map +1 -1
  104. package/dist/src/services/credentials/application-secrets.service.d.ts +6 -0
  105. package/dist/src/services/credentials/application-secrets.service.d.ts.map +1 -1
  106. package/dist/src/services/credentials/application-secrets.service.js +1 -1
  107. package/dist/src/services/credentials/application-secrets.service.js.map +1 -1
  108. package/dist/src/services/credentials/composed-provider-catalogue.d.ts.map +1 -1
  109. package/dist/src/services/credentials/composed-provider-catalogue.js +14 -2
  110. package/dist/src/services/credentials/composed-provider-catalogue.js.map +1 -1
  111. package/dist/src/services/credentials/provider-env-vars.utils.d.ts.map +1 -1
  112. package/dist/src/services/credentials/provider-env-vars.utils.js +3 -1
  113. package/dist/src/services/credentials/provider-env-vars.utils.js.map +1 -1
  114. package/dist/src/services/credentials/secret-requirements.service.d.ts +2 -1
  115. package/dist/src/services/credentials/secret-requirements.service.d.ts.map +1 -1
  116. package/dist/src/services/credentials/secret-requirements.service.js +17 -1
  117. package/dist/src/services/credentials/secret-requirements.service.js.map +1 -1
  118. package/dist/src/services/credentials/secrets-writer.service.d.ts +11 -2
  119. package/dist/src/services/credentials/secrets-writer.service.d.ts.map +1 -1
  120. package/dist/src/services/credentials/secrets-writer.service.js +12 -3
  121. package/dist/src/services/credentials/secrets-writer.service.js.map +1 -1
  122. package/dist/src/services/deployment/application-runtime-environment.d.ts.map +1 -1
  123. package/dist/src/services/deployment/application-runtime-environment.js +3 -13
  124. package/dist/src/services/deployment/application-runtime-environment.js.map +1 -1
  125. package/dist/src/services/deployment/ci-deploy-generator.service.d.ts.map +1 -1
  126. package/dist/src/services/deployment/ci-deploy-generator.service.js +3 -3
  127. package/dist/src/services/deployment/ci-deploy-generator.service.js.map +1 -1
  128. package/dist/src/services/deployment/docker/docker-compose-generator.service.d.ts +3 -3
  129. package/dist/src/services/deployment/docker/docker-compose-generator.service.d.ts.map +1 -1
  130. package/dist/src/services/deployment/docker/docker-compose-generator.service.js +24 -14
  131. package/dist/src/services/deployment/docker/docker-compose-generator.service.js.map +1 -1
  132. package/dist/src/services/deployment/framework-pod-network-membership.d.ts +6 -0
  133. package/dist/src/services/deployment/framework-pod-network-membership.d.ts.map +1 -1
  134. package/dist/src/services/deployment/framework-pod-network-membership.js +12 -3
  135. package/dist/src/services/deployment/framework-pod-network-membership.js.map +1 -1
  136. package/dist/src/services/deployment/host-toolchain-readiness.service.d.ts +1 -1
  137. package/dist/src/services/deployment/host-toolchain-readiness.service.js +1 -1
  138. package/dist/src/services/deployment/host-toolchain-readiness.service.js.map +1 -1
  139. package/dist/src/services/deployment/k8s/k8s-manifest-generator.service.d.ts +4 -1
  140. package/dist/src/services/deployment/k8s/k8s-manifest-generator.service.d.ts.map +1 -1
  141. package/dist/src/services/deployment/k8s/k8s-manifest-generator.service.js +20 -8
  142. package/dist/src/services/deployment/k8s/k8s-manifest-generator.service.js.map +1 -1
  143. package/dist/src/services/deployment/k8s/k8s-manifest.schemas.d.ts +7 -0
  144. package/dist/src/services/deployment/k8s/k8s-manifest.schemas.d.ts.map +1 -1
  145. package/dist/src/services/deployment/k8s/k8s-manifest.schemas.js.map +1 -1
  146. package/dist/src/services/deployment/k8s/k8s-secrets-generator.service.d.ts.map +1 -1
  147. package/dist/src/services/deployment/k8s/k8s-secrets-generator.service.js +15 -9
  148. package/dist/src/services/deployment/k8s/k8s-secrets-generator.service.js.map +1 -1
  149. package/dist/src/services/deployment/k8s/kind-pod-host-gateway.d.ts +43 -0
  150. package/dist/src/services/deployment/k8s/kind-pod-host-gateway.d.ts.map +1 -0
  151. package/dist/src/services/deployment/k8s/kind-pod-host-gateway.js +12 -0
  152. package/dist/src/services/deployment/k8s/kind-pod-host-gateway.js.map +1 -0
  153. package/dist/src/services/deployment/k8s/off-cluster-backing-services.d.ts +3 -1
  154. package/dist/src/services/deployment/k8s/off-cluster-backing-services.d.ts.map +1 -1
  155. package/dist/src/services/deployment/k8s/off-cluster-backing-services.js.map +1 -1
  156. package/dist/src/services/deployment/local-dev-late-workspace-members.service.d.ts +124 -0
  157. package/dist/src/services/deployment/local-dev-late-workspace-members.service.d.ts.map +1 -0
  158. package/dist/src/services/deployment/local-dev-late-workspace-members.service.js +249 -0
  159. package/dist/src/services/deployment/local-dev-late-workspace-members.service.js.map +1 -0
  160. package/dist/src/services/deployment/local-precondition-checks.service.d.ts.map +1 -1
  161. package/dist/src/services/deployment/local-precondition-checks.service.js +4 -2
  162. package/dist/src/services/deployment/local-precondition-checks.service.js.map +1 -1
  163. package/dist/src/services/environment/authored-infra-config.utils.d.ts +9 -0
  164. package/dist/src/services/environment/authored-infra-config.utils.d.ts.map +1 -1
  165. package/dist/src/services/environment/authored-infra-config.utils.js +20 -1
  166. package/dist/src/services/environment/authored-infra-config.utils.js.map +1 -1
  167. package/dist/src/services/environment/container-host-gateway-listen-host.d.ts +6 -0
  168. package/dist/src/services/environment/container-host-gateway-listen-host.d.ts.map +1 -1
  169. package/dist/src/services/environment/container-host-gateway-listen-host.js +6 -0
  170. package/dist/src/services/environment/container-host-gateway-listen-host.js.map +1 -1
  171. package/dist/src/services/environment/env-configuration-generator.service.d.ts +12 -0
  172. package/dist/src/services/environment/env-configuration-generator.service.d.ts.map +1 -1
  173. package/dist/src/services/environment/env-configuration-generator.service.js +45 -8
  174. package/dist/src/services/environment/env-configuration-generator.service.js.map +1 -1
  175. package/dist/src/services/environment/env-vars-builder.service.d.ts +2 -1
  176. package/dist/src/services/environment/env-vars-builder.service.d.ts.map +1 -1
  177. package/dist/src/services/environment/env-vars-builder.service.js +47 -32
  178. package/dist/src/services/environment/env-vars-builder.service.js.map +1 -1
  179. package/dist/src/services/environment/environment-lifecycle.service.d.ts +7 -4
  180. package/dist/src/services/environment/environment-lifecycle.service.d.ts.map +1 -1
  181. package/dist/src/services/environment/environment-lifecycle.service.js +14 -18
  182. package/dist/src/services/environment/environment-lifecycle.service.js.map +1 -1
  183. package/dist/src/services/environment/environment-service-profile.utils.d.ts +8 -1
  184. package/dist/src/services/environment/environment-service-profile.utils.d.ts.map +1 -1
  185. package/dist/src/services/environment/environment-service-profile.utils.js +14 -1
  186. package/dist/src/services/environment/environment-service-profile.utils.js.map +1 -1
  187. package/dist/src/services/environment/environment-setup.service.d.ts.map +1 -1
  188. package/dist/src/services/environment/environment-setup.service.js +17 -6
  189. package/dist/src/services/environment/environment-setup.service.js.map +1 -1
  190. package/dist/src/services/environment/environment.service.d.ts +4 -3
  191. package/dist/src/services/environment/environment.service.d.ts.map +1 -1
  192. package/dist/src/services/environment/environment.service.js +0 -1
  193. package/dist/src/services/environment/environment.service.js.map +1 -1
  194. package/dist/src/services/framework/framework-docker-publish.service.d.ts +129 -0
  195. package/dist/src/services/framework/framework-docker-publish.service.d.ts.map +1 -1
  196. package/dist/src/services/framework/framework-docker-publish.service.js +271 -19
  197. package/dist/src/services/framework/framework-docker-publish.service.js.map +1 -1
  198. package/dist/src/services/framework/github-actions-annotation.d.ts +19 -0
  199. package/dist/src/services/framework/github-actions-annotation.d.ts.map +1 -0
  200. package/dist/src/services/framework/github-actions-annotation.js +25 -0
  201. package/dist/src/services/framework/github-actions-annotation.js.map +1 -0
  202. package/dist/src/services/framework/registry-host/registry-host-upgrade.d.ts +43 -0
  203. package/dist/src/services/framework/registry-host/registry-host-upgrade.d.ts.map +1 -0
  204. package/dist/src/services/framework/registry-host/registry-host-upgrade.js +117 -0
  205. package/dist/src/services/framework/registry-host/registry-host-upgrade.js.map +1 -0
  206. package/dist/src/services/framework/registry-host/registry-host.service.d.ts +1 -1
  207. package/dist/src/services/framework/registry-host/registry-host.service.d.ts.map +1 -1
  208. package/dist/src/services/framework/registry-host/registry-host.service.js +2 -0
  209. package/dist/src/services/framework/registry-host/registry-host.service.js.map +1 -1
  210. package/dist/src/services/registry/installed-file-state.utils.d.ts +8 -0
  211. package/dist/src/services/registry/installed-file-state.utils.d.ts.map +1 -1
  212. package/dist/src/services/registry/installed-file-state.utils.js +9 -1
  213. package/dist/src/services/registry/installed-file-state.utils.js.map +1 -1
  214. package/dist/src/services/registry/module-install.service.d.ts.map +1 -1
  215. package/dist/src/services/registry/module-install.service.js +1 -0
  216. package/dist/src/services/registry/module-install.service.js.map +1 -1
  217. package/dist/src/services/registry/provider-module-scaffold.service.d.ts.map +1 -1
  218. package/dist/src/services/registry/provider-module-scaffold.service.js +4 -0
  219. package/dist/src/services/registry/provider-module-scaffold.service.js.map +1 -1
  220. package/dist/src/services/security/csp-sync.service.d.ts.map +1 -1
  221. package/dist/src/services/security/csp-sync.service.js +21 -2
  222. package/dist/src/services/security/csp-sync.service.js.map +1 -1
  223. package/dist/tsconfig.build.tsbuildinfo +1 -1
  224. package/framework-root-package.json +3 -3
  225. package/package.json +23 -23
  226. package/scripts/app-dependency-alignment/propagated-engine-overrides.json +1 -1
  227. package/templates/infra/docker-compose/docker-compose.wildo-platform.yml.hbs +31 -9
  228. package/templates/infra/k8s/platform/platform-crontabs-batches-manager/deployment.yaml.hbs +13 -0
  229. package/templates/infra/registry-host/docker-compose.yml +9 -2
  230. package/templates/infra/registry-host/upgrade-image.sh +108 -0
  231. package/templates/saas/i18n/email/resources/dataSubjectRequests/create.users-custom_ready/labels.fr.ts +22 -0
  232. package/templates/saas/i18n/email/resources/dataSubjectRequests/create.users-custom_received/labels.fr.ts +23 -0
  233. package/templates/saas/i18n/email/resources/dataSubjectRequests/update.users-custom_extended/labels.fr.ts +23 -0
  234. package/templates/saas/i18n/email/resources/organizationSsoConfig/repairUnreadableConfiguration.organization-users/labels.fr.ts +23 -0
  235. package/templates/saas/i18n/engine/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.en.ts +28 -0
  236. package/templates/saas/i18n/engine/components/HIGH_LEVEL_VIEWS_CHART_DASHBOARD_LAYOUT_EDITOR.fr.ts +28 -0
  237. package/templates/saas/i18n/engine/components/LOW_LEVEL_AI_APPROVAL.en.ts +2 -1
  238. package/templates/saas/i18n/engine/components/LOW_LEVEL_AI_APPROVAL.fr.ts +2 -1
  239. package/templates/saas/i18n/engine/components/LOW_LEVEL_AI_CONVERSATION_THREAD.en.ts +6 -1
  240. package/templates/saas/i18n/engine/components/LOW_LEVEL_AI_CONVERSATION_THREAD.fr.ts +6 -1
  241. package/templates/saas/i18n/engine/components/LOW_LEVEL_APPROVAL_SEAL.en.ts +40 -0
  242. package/templates/saas/i18n/engine/components/LOW_LEVEL_APPROVAL_SEAL.fr.ts +40 -0
  243. package/templates/saas/i18n/engine/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.en.ts +2 -1
  244. package/templates/saas/i18n/engine/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.fr.ts +2 -1
  245. package/templates/saas/i18n/engine/components/LOW_LEVEL_FORM_FIELD_STRING.en.ts +2 -1
  246. package/templates/saas/i18n/engine/components/LOW_LEVEL_FORM_FIELD_STRING.fr.ts +2 -1
  247. package/templates/saas/i18n/engine/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.en.ts +2 -1
  248. package/templates/saas/i18n/engine/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.fr.ts +2 -1
  249. package/templates/saas/i18n/engine/components/PUBLIC_LAYOUTS_TERMS.en.ts +3 -1
  250. package/templates/saas/i18n/engine/components/PUBLIC_LAYOUTS_TERMS.fr.ts +3 -1
  251. package/templates/saas/i18n/engine/components/PUBLIC_LAYOUTS_USER_AUTH.en.ts +2 -1
  252. package/templates/saas/i18n/engine/components/PUBLIC_LAYOUTS_USER_AUTH.fr.ts +2 -1
  253. package/templates/saas/i18n/engine/components/RESOURCES_LAYOUTS_FILTERS.en.ts +3 -1
  254. package/templates/saas/i18n/engine/components/RESOURCES_LAYOUTS_FILTERS.fr.ts +4 -2
  255. package/templates/saas/i18n/engine/components/RESOURCES_LAYOUTS_LIST.en.ts +18 -1
  256. package/templates/saas/i18n/engine/components/RESOURCES_LAYOUTS_LIST.fr.ts +18 -1
  257. package/templates/saas/i18n/engine/resources/actorSystemExecutions.en.ts +10 -82
  258. package/templates/saas/i18n/engine/resources/actorSystemExecutions.fr.ts +0 -72
  259. package/templates/saas/i18n/engine/resources/actorTasks.en.ts +0 -33
  260. package/templates/saas/i18n/engine/resources/actorTasks.fr.ts +0 -33
  261. package/templates/saas/i18n/engine/resources/agentBehaviorReports.en.ts +0 -108
  262. package/templates/saas/i18n/engine/resources/agentBehaviorReports.fr.ts +0 -108
  263. package/templates/saas/i18n/engine/resources/agentOperationRecords.en.ts +8 -24
  264. package/templates/saas/i18n/engine/resources/agentOperationRecords.fr.ts +10 -26
  265. package/templates/saas/i18n/engine/resources/agentWorkCaptureSettings.en.ts +0 -12
  266. package/templates/saas/i18n/engine/resources/agentWorkCaptureSettings.fr.ts +0 -12
  267. package/templates/saas/i18n/engine/resources/anonymous_users.en.ts +8 -74
  268. package/templates/saas/i18n/engine/resources/anonymous_users.fr.ts +0 -66
  269. package/templates/saas/i18n/engine/resources/applicationA2aPushDeliveryLog.en.ts +3 -21
  270. package/templates/saas/i18n/engine/resources/applicationA2aPushDeliveryLog.fr.ts +0 -18
  271. package/templates/saas/i18n/engine/resources/applicationA2aTokenBudgetState.en.ts +3 -33
  272. package/templates/saas/i18n/engine/resources/applicationA2aTokenBudgetState.fr.ts +0 -30
  273. package/templates/saas/i18n/engine/resources/applicationAccessGrants.en.ts +13 -55
  274. package/templates/saas/i18n/engine/resources/applicationAccessGrants.fr.ts +0 -42
  275. package/templates/saas/i18n/engine/resources/applicationAgentPolicies.en.ts +8 -24
  276. package/templates/saas/i18n/engine/resources/applicationAgentPolicies.fr.ts +8 -24
  277. package/templates/saas/i18n/engine/resources/applicationAgentWorkDecisionContents.en.ts +0 -27
  278. package/templates/saas/i18n/engine/resources/applicationAgentWorkDecisionContents.fr.ts +0 -27
  279. package/templates/saas/i18n/engine/resources/applicationAgentWorkDecisions.en.ts +13 -43
  280. package/templates/saas/i18n/engine/resources/applicationAgentWorkDecisions.fr.ts +0 -30
  281. package/templates/saas/i18n/engine/resources/applicationApiKeys.en.ts +2 -70
  282. package/templates/saas/i18n/engine/resources/applicationApiKeys.fr.ts +2 -70
  283. package/templates/saas/i18n/engine/resources/applicationAuditLogs.en.ts +41 -94
  284. package/templates/saas/i18n/engine/resources/applicationAuditLogs.fr.ts +41 -94
  285. package/templates/saas/i18n/engine/resources/applicationDataKeys.en.ts +2 -22
  286. package/templates/saas/i18n/engine/resources/applicationDataKeys.fr.ts +2 -22
  287. package/templates/saas/i18n/engine/resources/applicationFeatures.en.ts +0 -24
  288. package/templates/saas/i18n/engine/resources/applicationFeatures.fr.ts +0 -24
  289. package/templates/saas/i18n/engine/resources/applicationFlowActorExecutions.en.ts +25 -160
  290. package/templates/saas/i18n/engine/resources/applicationFlowActorExecutions.fr.ts +25 -160
  291. package/templates/saas/i18n/engine/resources/applicationFlowActorTasks.en.ts +6 -28
  292. package/templates/saas/i18n/engine/resources/applicationFlowActorTasks.fr.ts +8 -30
  293. package/templates/saas/i18n/engine/resources/applicationInboundDeliveries.en.ts +92 -23
  294. package/templates/saas/i18n/engine/resources/applicationInboundDeliveries.fr.ts +95 -26
  295. package/templates/saas/i18n/engine/resources/applicationM2mWebhookDeliveryLog.en.ts +1 -25
  296. package/templates/saas/i18n/engine/resources/applicationM2mWebhookDeliveryLog.fr.ts +4 -28
  297. package/templates/saas/i18n/engine/resources/applicationMetadata.en.ts +0 -18
  298. package/templates/saas/i18n/engine/resources/applicationMetadata.fr.ts +0 -18
  299. package/templates/saas/i18n/engine/resources/applicationOAuthClients.en.ts +2 -58
  300. package/templates/saas/i18n/engine/resources/applicationOAuthClients.fr.ts +2 -58
  301. package/templates/saas/i18n/engine/resources/applicationProviderCredentials.en.ts +168 -0
  302. package/templates/saas/i18n/engine/resources/applicationProviderCredentials.fr.ts +168 -0
  303. package/templates/saas/i18n/engine/resources/applicationScimProvisioningConfig.en.ts +0 -30
  304. package/templates/saas/i18n/engine/resources/applicationScimProvisioningConfig.fr.ts +0 -30
  305. package/templates/saas/i18n/engine/resources/applicationSiemDeliveryDlq.en.ts +3 -42
  306. package/templates/saas/i18n/engine/resources/applicationSiemDeliveryDlq.fr.ts +5 -44
  307. package/templates/saas/i18n/engine/resources/applicationSiemDeliveryOutbox.en.ts +3 -30
  308. package/templates/saas/i18n/engine/resources/applicationSiemDeliveryOutbox.fr.ts +0 -27
  309. package/templates/saas/i18n/engine/resources/applicationSiemExportConfig.en.ts +0 -24
  310. package/templates/saas/i18n/engine/resources/applicationSiemExportConfig.fr.ts +0 -24
  311. package/templates/saas/i18n/engine/resources/applicationSsoConfig.en.ts +113 -61
  312. package/templates/saas/i18n/engine/resources/applicationSsoConfig.fr.ts +113 -61
  313. package/templates/saas/i18n/engine/resources/applicationSsoConnections.en.ts +0 -138
  314. package/templates/saas/i18n/engine/resources/applicationSsoConnections.fr.ts +0 -138
  315. package/templates/saas/i18n/engine/resources/applicationVersions.en.ts +3 -27
  316. package/templates/saas/i18n/engine/resources/applicationVersions.fr.ts +0 -24
  317. package/templates/saas/i18n/engine/resources/applicationWebhookConfig.en.ts +5 -54
  318. package/templates/saas/i18n/engine/resources/applicationWebhookConfig.fr.ts +5 -54
  319. package/templates/saas/i18n/engine/resources/applications.en.ts +39 -2177
  320. package/templates/saas/i18n/engine/resources/applications.fr.ts +39 -2177
  321. package/templates/saas/i18n/engine/resources/approvalSeals.en.ts +38 -31
  322. package/templates/saas/i18n/engine/resources/approvalSeals.fr.ts +38 -31
  323. package/templates/saas/i18n/engine/resources/auditLogs.en.ts +78 -111
  324. package/templates/saas/i18n/engine/resources/auditLogs.fr.ts +78 -111
  325. package/templates/saas/i18n/engine/resources/billingEffectOutbox.en.ts +2 -4
  326. package/templates/saas/i18n/engine/resources/billingEffectOutbox.fr.ts +2 -4
  327. package/templates/saas/i18n/engine/resources/billingSubscriptionMutationIntents.en.ts +8 -6
  328. package/templates/saas/i18n/engine/resources/billingSubscriptionMutationIntents.fr.ts +8 -6
  329. package/templates/saas/i18n/engine/resources/chatConversations.en.ts +0 -18
  330. package/templates/saas/i18n/engine/resources/chatConversations.fr.ts +0 -18
  331. package/templates/saas/i18n/engine/resources/chatIdentityLinks.en.ts +0 -44
  332. package/templates/saas/i18n/engine/resources/chatIdentityLinks.fr.ts +0 -44
  333. package/templates/saas/i18n/engine/resources/consumableTokens.en.ts +4 -43
  334. package/templates/saas/i18n/engine/resources/consumableTokens.fr.ts +4 -43
  335. package/templates/saas/i18n/engine/resources/conversationMessages.en.ts +16 -27
  336. package/templates/saas/i18n/engine/resources/conversationMessages.fr.ts +16 -27
  337. package/templates/saas/i18n/engine/resources/conversationReplyTokens.en.ts +0 -27
  338. package/templates/saas/i18n/engine/resources/conversationReplyTokens.fr.ts +0 -27
  339. package/templates/saas/i18n/engine/resources/conversationThreads.en.ts +0 -27
  340. package/templates/saas/i18n/engine/resources/conversationThreads.fr.ts +0 -27
  341. package/templates/saas/i18n/engine/resources/dataSeedRuns.en.ts +22 -17
  342. package/templates/saas/i18n/engine/resources/dataSeedRuns.fr.ts +22 -17
  343. package/templates/saas/i18n/engine/resources/dataSubjectRequests.en.ts +410 -0
  344. package/templates/saas/i18n/engine/resources/dataSubjectRequests.fr.ts +410 -0
  345. package/templates/saas/i18n/engine/resources/etlPipelineStates.en.ts +128 -146
  346. package/templates/saas/i18n/engine/resources/etlPipelineStates.fr.ts +0 -18
  347. package/templates/saas/i18n/engine/resources/evaluationDatasetExports.en.ts +13 -43
  348. package/templates/saas/i18n/engine/resources/evaluationDatasetExports.fr.ts +0 -30
  349. package/templates/saas/i18n/engine/resources/evaluationExportAuthorizations.en.ts +0 -12
  350. package/templates/saas/i18n/engine/resources/evaluationExportAuthorizations.fr.ts +0 -12
  351. package/templates/saas/i18n/engine/resources/externalDataErasureSuppressions.en.ts +0 -21
  352. package/templates/saas/i18n/engine/resources/externalDataErasureSuppressions.fr.ts +0 -21
  353. package/templates/saas/i18n/engine/resources/externalDataOutboundChanges.en.ts +24 -45
  354. package/templates/saas/i18n/engine/resources/externalDataOutboundChanges.fr.ts +0 -21
  355. package/templates/saas/i18n/engine/resources/externalDataPendingReferences.en.ts +0 -24
  356. package/templates/saas/i18n/engine/resources/externalDataPendingReferences.fr.ts +0 -24
  357. package/templates/saas/i18n/engine/resources/externalDataPipelineMembershipKeys.en.ts +0 -21
  358. package/templates/saas/i18n/engine/resources/externalDataPipelineMembershipKeys.fr.ts +0 -21
  359. package/templates/saas/i18n/engine/resources/externalDataPipelineMemberships.en.ts +8 -14
  360. package/templates/saas/i18n/engine/resources/externalDataPipelineMemberships.fr.ts +0 -6
  361. package/templates/saas/i18n/engine/resources/externalDataPipelineRequestedKeys.en.ts +0 -24
  362. package/templates/saas/i18n/engine/resources/externalDataPipelineRequestedKeys.fr.ts +0 -24
  363. package/templates/saas/i18n/engine/resources/externalDataPipelineRunRecords.en.ts +150 -174
  364. package/templates/saas/i18n/engine/resources/externalDataPipelineRunRecords.fr.ts +0 -24
  365. package/templates/saas/i18n/engine/resources/externalDataRemoteVersions.en.ts +12 -33
  366. package/templates/saas/i18n/engine/resources/externalDataRemoteVersions.fr.ts +0 -21
  367. package/templates/saas/i18n/engine/resources/externalEffectReservations.en.ts +147 -0
  368. package/templates/saas/i18n/engine/resources/externalEffectReservations.fr.ts +147 -0
  369. package/templates/saas/i18n/engine/resources/files.en.ts +0 -39
  370. package/templates/saas/i18n/engine/resources/files.fr.ts +0 -39
  371. package/templates/saas/i18n/engine/resources/humanDecisionNoticeStays.en.ts +0 -18
  372. package/templates/saas/i18n/engine/resources/humanDecisionNoticeStays.fr.ts +0 -18
  373. package/templates/saas/i18n/engine/resources/idempotentRequestOutcomes.en.ts +115 -0
  374. package/templates/saas/i18n/engine/resources/idempotentRequestOutcomes.fr.ts +115 -0
  375. package/templates/saas/i18n/engine/resources/inboundAddressTombstones.en.ts +0 -27
  376. package/templates/saas/i18n/engine/resources/inboundAddressTombstones.fr.ts +0 -27
  377. package/templates/saas/i18n/engine/resources/inboundContacts.en.ts +3 -30
  378. package/templates/saas/i18n/engine/resources/inboundContacts.fr.ts +0 -27
  379. package/templates/saas/i18n/engine/resources/inboundEmails.en.ts +0 -27
  380. package/templates/saas/i18n/engine/resources/inboundEmails.fr.ts +0 -27
  381. package/templates/saas/i18n/engine/resources/jobExecutions.en.ts +11 -25
  382. package/templates/saas/i18n/engine/resources/jobExecutions.fr.ts +11 -25
  383. package/templates/saas/i18n/engine/resources/jobPayloadStorage.en.ts +3 -30
  384. package/templates/saas/i18n/engine/resources/jobPayloadStorage.fr.ts +0 -27
  385. package/templates/saas/i18n/engine/resources/legalHolds.en.ts +0 -88
  386. package/templates/saas/i18n/engine/resources/legalHolds.fr.ts +0 -88
  387. package/templates/saas/i18n/engine/resources/modelCallAttributions.en.ts +16 -40
  388. package/templates/saas/i18n/engine/resources/modelCallAttributions.fr.ts +0 -24
  389. package/templates/saas/i18n/engine/resources/modelCostPeriodAggregates.en.ts +13 -37
  390. package/templates/saas/i18n/engine/resources/modelCostPeriodAggregates.fr.ts +0 -24
  391. package/templates/saas/i18n/engine/resources/oauthConsentGrants.en.ts +10 -40
  392. package/templates/saas/i18n/engine/resources/oauthConsentGrants.fr.ts +0 -30
  393. package/templates/saas/i18n/engine/resources/operationApprovalRequests.en.ts +120 -60
  394. package/templates/saas/i18n/engine/resources/operationApprovalRequests.fr.ts +120 -60
  395. package/templates/saas/i18n/engine/resources/organizationA2aPushDeliveryLog.en.ts +3 -21
  396. package/templates/saas/i18n/engine/resources/organizationA2aPushDeliveryLog.fr.ts +0 -18
  397. package/templates/saas/i18n/engine/resources/organizationA2aTokenBudgetState.en.ts +3 -33
  398. package/templates/saas/i18n/engine/resources/organizationA2aTokenBudgetState.fr.ts +0 -30
  399. package/templates/saas/i18n/engine/resources/organizationAgentPolicies.en.ts +0 -27
  400. package/templates/saas/i18n/engine/resources/organizationAgentPolicies.fr.ts +0 -27
  401. package/templates/saas/i18n/engine/resources/organizationAgentWorkDecisionContents.en.ts +0 -27
  402. package/templates/saas/i18n/engine/resources/organizationAgentWorkDecisionContents.fr.ts +0 -27
  403. package/templates/saas/i18n/engine/resources/organizationAgentWorkDecisions.en.ts +13 -43
  404. package/templates/saas/i18n/engine/resources/organizationAgentWorkDecisions.fr.ts +0 -30
  405. package/templates/saas/i18n/engine/resources/organizationApiKeys.en.ts +2 -79
  406. package/templates/saas/i18n/engine/resources/organizationApiKeys.fr.ts +2 -79
  407. package/templates/saas/i18n/engine/resources/organizationBillingAccounts.en.ts +0 -549
  408. package/templates/saas/i18n/engine/resources/organizationBillingAccounts.fr.ts +0 -549
  409. package/templates/saas/i18n/engine/resources/organizationChatSettings.en.ts +0 -27
  410. package/templates/saas/i18n/engine/resources/organizationChatSettings.fr.ts +0 -27
  411. package/templates/saas/i18n/engine/resources/organizationCreditPools.en.ts +13 -18
  412. package/templates/saas/i18n/engine/resources/organizationCreditPools.fr.ts +13 -18
  413. package/templates/saas/i18n/engine/resources/organizationCustomDomains.en.ts +195 -0
  414. package/templates/saas/i18n/engine/resources/organizationCustomDomains.fr.ts +195 -0
  415. package/templates/saas/i18n/engine/resources/organizationDashboardLayouts.en.ts +153 -0
  416. package/templates/saas/i18n/engine/resources/organizationDashboardLayouts.fr.ts +153 -0
  417. package/templates/saas/i18n/engine/resources/organizationEmailDomains.en.ts +0 -39
  418. package/templates/saas/i18n/engine/resources/organizationEmailDomains.fr.ts +0 -39
  419. package/templates/saas/i18n/engine/resources/organizationFeatures.en.ts +0 -34
  420. package/templates/saas/i18n/engine/resources/organizationFeatures.fr.ts +0 -34
  421. package/templates/saas/i18n/engine/resources/organizationFlowActorExecutions.en.ts +25 -160
  422. package/templates/saas/i18n/engine/resources/organizationFlowActorExecutions.fr.ts +25 -160
  423. package/templates/saas/i18n/engine/resources/organizationFlowActorTasks.en.ts +6 -28
  424. package/templates/saas/i18n/engine/resources/organizationFlowActorTasks.fr.ts +8 -30
  425. package/templates/saas/i18n/engine/resources/organizationGuidanceState.en.ts +3 -18
  426. package/templates/saas/i18n/engine/resources/organizationGuidanceState.fr.ts +0 -15
  427. package/templates/saas/i18n/engine/resources/organizationInboundDeliveries.en.ts +95 -26
  428. package/templates/saas/i18n/engine/resources/organizationInboundDeliveries.fr.ts +95 -26
  429. package/templates/saas/i18n/engine/resources/organizationInvoiceRefs.en.ts +14 -45
  430. package/templates/saas/i18n/engine/resources/organizationInvoiceRefs.fr.ts +14 -45
  431. package/templates/saas/i18n/engine/resources/organizationLifecycleState.en.ts +1 -17
  432. package/templates/saas/i18n/engine/resources/organizationLifecycleState.fr.ts +1 -17
  433. package/templates/saas/i18n/engine/resources/organizationM2mWebhookDeliveryLog.en.ts +2 -26
  434. package/templates/saas/i18n/engine/resources/organizationM2mWebhookDeliveryLog.fr.ts +4 -28
  435. package/templates/saas/i18n/engine/resources/organizationMembers.en.ts +2 -95
  436. package/templates/saas/i18n/engine/resources/organizationMembers.fr.ts +2 -95
  437. package/templates/saas/i18n/engine/resources/organizationModelUsageCeilingState.en.ts +0 -27
  438. package/templates/saas/i18n/engine/resources/organizationModelUsageCeilingState.fr.ts +0 -27
  439. package/templates/saas/i18n/engine/resources/organizationNotificationBadges.en.ts +3 -36
  440. package/templates/saas/i18n/engine/resources/organizationNotificationBadges.fr.ts +0 -33
  441. package/templates/saas/i18n/engine/resources/organizationNotifications.en.ts +0 -12
  442. package/templates/saas/i18n/engine/resources/organizationNotifications.fr.ts +0 -12
  443. package/templates/saas/i18n/engine/resources/organizationOAuthClients.en.ts +2 -67
  444. package/templates/saas/i18n/engine/resources/organizationOAuthClients.fr.ts +2 -67
  445. package/templates/saas/i18n/engine/resources/organizationOnboardingOperations.en.ts +0 -9
  446. package/templates/saas/i18n/engine/resources/organizationOnboardingOperations.fr.ts +0 -9
  447. package/templates/saas/i18n/engine/resources/organizationPersonTokenCeilingState.en.ts +0 -27
  448. package/templates/saas/i18n/engine/resources/organizationPersonTokenCeilingState.fr.ts +0 -27
  449. package/templates/saas/i18n/engine/resources/organizationPreferences.en.ts +0 -37
  450. package/templates/saas/i18n/engine/resources/organizationPreferences.fr.ts +0 -37
  451. package/templates/saas/i18n/engine/resources/organizationProfiles.en.ts +0 -37
  452. package/templates/saas/i18n/engine/resources/organizationProfiles.fr.ts +0 -37
  453. package/templates/saas/i18n/engine/resources/organizationProgressionState.en.ts +1 -17
  454. package/templates/saas/i18n/engine/resources/organizationProgressionState.fr.ts +1 -17
  455. package/templates/saas/i18n/engine/resources/organizationProviderCredentials.en.ts +0 -58
  456. package/templates/saas/i18n/engine/resources/organizationProviderCredentials.fr.ts +0 -58
  457. package/templates/saas/i18n/engine/resources/organizationRelationships.en.ts +0 -128
  458. package/templates/saas/i18n/engine/resources/organizationRelationships.fr.ts +0 -128
  459. package/templates/saas/i18n/engine/resources/organizationRepresentations.en.ts +0 -83
  460. package/templates/saas/i18n/engine/resources/organizationRepresentations.fr.ts +0 -83
  461. package/templates/saas/i18n/engine/resources/organizationScimProvisioningConfig.en.ts +0 -43
  462. package/templates/saas/i18n/engine/resources/organizationScimProvisioningConfig.fr.ts +0 -43
  463. package/templates/saas/i18n/engine/resources/organizationScimTokens.en.ts +5 -76
  464. package/templates/saas/i18n/engine/resources/organizationScimTokens.fr.ts +5 -76
  465. package/templates/saas/i18n/engine/resources/organizationSiemDeliveryDlq.en.ts +4 -43
  466. package/templates/saas/i18n/engine/resources/organizationSiemDeliveryDlq.fr.ts +6 -45
  467. package/templates/saas/i18n/engine/resources/organizationSiemDeliveryOutbox.en.ts +3 -30
  468. package/templates/saas/i18n/engine/resources/organizationSiemDeliveryOutbox.fr.ts +0 -27
  469. package/templates/saas/i18n/engine/resources/organizationSiemExportConfig.en.ts +0 -37
  470. package/templates/saas/i18n/engine/resources/organizationSiemExportConfig.fr.ts +0 -37
  471. package/templates/saas/i18n/engine/resources/organizationSsoConfig.en.ts +113 -74
  472. package/templates/saas/i18n/engine/resources/organizationSsoConfig.fr.ts +113 -74
  473. package/templates/saas/i18n/engine/resources/organizationSsoConnections.en.ts +0 -148
  474. package/templates/saas/i18n/engine/resources/organizationSsoConnections.fr.ts +0 -148
  475. package/templates/saas/i18n/engine/resources/organizationSubscriptions.en.ts +40 -78
  476. package/templates/saas/i18n/engine/resources/organizationSubscriptions.fr.ts +42 -80
  477. package/templates/saas/i18n/engine/resources/organizationUnitMembers.en.ts +2 -50
  478. package/templates/saas/i18n/engine/resources/organizationUnitMembers.fr.ts +2 -50
  479. package/templates/saas/i18n/engine/resources/organizationUnits.en.ts +0 -49
  480. package/templates/saas/i18n/engine/resources/organizationUnits.fr.ts +0 -49
  481. package/templates/saas/i18n/engine/resources/organizationUsageRecords.en.ts +13 -37
  482. package/templates/saas/i18n/engine/resources/organizationUsageRecords.fr.ts +13 -37
  483. package/templates/saas/i18n/engine/resources/organizationWebhookConfig.en.ts +5 -67
  484. package/templates/saas/i18n/engine/resources/organizationWebhookConfig.fr.ts +5 -67
  485. package/templates/saas/i18n/engine/resources/organizations.en.ts +34 -637
  486. package/templates/saas/i18n/engine/resources/organizations.fr.ts +32 -635
  487. package/templates/saas/i18n/engine/resources/platformAccessGrants.en.ts +0 -91
  488. package/templates/saas/i18n/engine/resources/platformAccessGrants.fr.ts +0 -91
  489. package/templates/saas/i18n/engine/resources/postCommitEffectOutbox.en.ts +0 -24
  490. package/templates/saas/i18n/engine/resources/postCommitEffectOutbox.fr.ts +0 -24
  491. package/templates/saas/i18n/engine/resources/prices.en.ts +47 -108
  492. package/templates/saas/i18n/engine/resources/prices.fr.ts +48 -109
  493. package/templates/saas/i18n/engine/resources/products.en.ts +24 -68
  494. package/templates/saas/i18n/engine/resources/products.fr.ts +24 -68
  495. package/templates/saas/i18n/engine/resources/professionalQualifications.en.ts +0 -87
  496. package/templates/saas/i18n/engine/resources/professionalQualifications.fr.ts +0 -87
  497. package/templates/saas/i18n/engine/resources/promotions.en.ts +4 -56
  498. package/templates/saas/i18n/engine/resources/promotions.fr.ts +6 -58
  499. package/templates/saas/i18n/engine/resources/providerCallRecords.en.ts +77 -101
  500. package/templates/saas/i18n/engine/resources/providerCallRecords.fr.ts +0 -24
  501. package/templates/saas/i18n/engine/resources/publishedVerificationKeys.en.ts +2 -25
  502. package/templates/saas/i18n/engine/resources/publishedVerificationKeys.fr.ts +2 -25
  503. package/templates/saas/i18n/engine/resources/referrals.en.ts +21 -18
  504. package/templates/saas/i18n/engine/resources/referrals.fr.ts +21 -18
  505. package/templates/saas/i18n/engine/resources/relationshipCapabilityGrants.en.ts +0 -80
  506. package/templates/saas/i18n/engine/resources/relationshipCapabilityGrants.fr.ts +0 -80
  507. package/templates/saas/i18n/engine/resources/relationshipInvitations.en.ts +0 -89
  508. package/templates/saas/i18n/engine/resources/relationshipInvitations.fr.ts +0 -89
  509. package/templates/saas/i18n/engine/resources/relationshipMailboxes.en.ts +0 -27
  510. package/templates/saas/i18n/engine/resources/relationshipMailboxes.fr.ts +0 -27
  511. package/templates/saas/i18n/engine/resources/representativeAssignments.en.ts +108 -112
  512. package/templates/saas/i18n/engine/resources/representativeAssignments.fr.ts +108 -112
  513. package/templates/saas/i18n/engine/resources/retentionEnforcementRecords.en.ts +8 -21
  514. package/templates/saas/i18n/engine/resources/retentionEnforcementRecords.fr.ts +8 -21
  515. package/templates/saas/i18n/engine/resources/signatureRequestSigners.en.ts +141 -0
  516. package/templates/saas/i18n/engine/resources/signatureRequestSigners.fr.ts +141 -0
  517. package/templates/saas/i18n/engine/resources/signatureRequests.en.ts +205 -0
  518. package/templates/saas/i18n/engine/resources/signatureRequests.fr.ts +205 -0
  519. package/templates/saas/i18n/engine/resources/smsNumberAssignments.en.ts +101 -0
  520. package/templates/saas/i18n/engine/resources/smsNumberAssignments.fr.ts +101 -0
  521. package/templates/saas/i18n/engine/resources/smsOptOuts.en.ts +166 -0
  522. package/templates/saas/i18n/engine/resources/smsOptOuts.fr.ts +166 -0
  523. package/templates/saas/i18n/engine/resources/smsProviderEvents.en.ts +195 -0
  524. package/templates/saas/i18n/engine/resources/smsProviderEvents.fr.ts +195 -0
  525. package/templates/saas/i18n/engine/resources/ssoDomainReservations.en.ts +0 -27
  526. package/templates/saas/i18n/engine/resources/ssoDomainReservations.fr.ts +0 -27
  527. package/templates/saas/i18n/engine/resources/systemOfRecordPartitionAssignments.en.ts +3 -39
  528. package/templates/saas/i18n/engine/resources/systemOfRecordPartitionAssignments.fr.ts +0 -36
  529. package/templates/saas/i18n/engine/resources/systemOfRecordWriteAdmissions.en.ts +0 -3
  530. package/templates/saas/i18n/engine/resources/systemOfRecordWriteAdmissions.fr.ts +0 -3
  531. package/templates/saas/i18n/engine/resources/transactionalCommitReceipts.en.ts +0 -6
  532. package/templates/saas/i18n/engine/resources/transactionalCommitReceipts.fr.ts +0 -6
  533. package/templates/saas/i18n/engine/resources/userA2aPushDeliveryLog.en.ts +3 -21
  534. package/templates/saas/i18n/engine/resources/userA2aPushDeliveryLog.fr.ts +0 -18
  535. package/templates/saas/i18n/engine/resources/userA2aTokenBudgetState.en.ts +3 -33
  536. package/templates/saas/i18n/engine/resources/userA2aTokenBudgetState.fr.ts +0 -30
  537. package/templates/saas/i18n/engine/resources/userAgentWorkDecisionContents.en.ts +0 -27
  538. package/templates/saas/i18n/engine/resources/userAgentWorkDecisionContents.fr.ts +0 -27
  539. package/templates/saas/i18n/engine/resources/userAgentWorkDecisions.en.ts +13 -43
  540. package/templates/saas/i18n/engine/resources/userAgentWorkDecisions.fr.ts +0 -30
  541. package/templates/saas/i18n/engine/resources/userCredentials.en.ts +3 -87
  542. package/templates/saas/i18n/engine/resources/userCredentials.fr.ts +0 -84
  543. package/templates/saas/i18n/engine/resources/userFeatures.en.ts +0 -12
  544. package/templates/saas/i18n/engine/resources/userFeatures.fr.ts +0 -12
  545. package/templates/saas/i18n/engine/resources/userFlowActorExecutions.en.ts +25 -160
  546. package/templates/saas/i18n/engine/resources/userFlowActorExecutions.fr.ts +25 -160
  547. package/templates/saas/i18n/engine/resources/userFlowActorTasks.en.ts +6 -28
  548. package/templates/saas/i18n/engine/resources/userFlowActorTasks.fr.ts +8 -30
  549. package/templates/saas/i18n/engine/resources/userGovernedDocumentAcceptances.en.ts +13 -18
  550. package/templates/saas/i18n/engine/resources/userGovernedDocumentAcceptances.fr.ts +13 -18
  551. package/templates/saas/i18n/engine/resources/userGuidanceState.en.ts +3 -18
  552. package/templates/saas/i18n/engine/resources/userGuidanceState.fr.ts +0 -15
  553. package/templates/saas/i18n/engine/resources/userIdentityLinks.en.ts +13 -40
  554. package/templates/saas/i18n/engine/resources/userIdentityLinks.fr.ts +0 -27
  555. package/templates/saas/i18n/engine/resources/userLifecycleState.en.ts +0 -15
  556. package/templates/saas/i18n/engine/resources/userLifecycleState.fr.ts +0 -15
  557. package/templates/saas/i18n/engine/resources/userNotificationBadges.en.ts +3 -36
  558. package/templates/saas/i18n/engine/resources/userNotificationBadges.fr.ts +0 -33
  559. package/templates/saas/i18n/engine/resources/userPreferences.en.ts +8 -60
  560. package/templates/saas/i18n/engine/resources/userPreferences.fr.ts +8 -60
  561. package/templates/saas/i18n/engine/resources/userProfiles.en.ts +5 -56
  562. package/templates/saas/i18n/engine/resources/userProfiles.fr.ts +0 -51
  563. package/templates/saas/i18n/engine/resources/userProgressionState.en.ts +1 -17
  564. package/templates/saas/i18n/engine/resources/userProgressionState.fr.ts +1 -17
  565. package/templates/saas/i18n/engine/resources/userProviderCredentials.en.ts +0 -52
  566. package/templates/saas/i18n/engine/resources/userProviderCredentials.fr.ts +0 -52
  567. package/templates/saas/i18n/engine/resources/userSelfPreferences.en.ts +8 -56
  568. package/templates/saas/i18n/engine/resources/userSelfPreferences.fr.ts +8 -56
  569. package/templates/saas/i18n/engine/resources/userSelfProfiles.en.ts +5 -61
  570. package/templates/saas/i18n/engine/resources/userSelfProfiles.fr.ts +0 -56
  571. package/templates/saas/i18n/engine/resources/user_self.en.ts +37 -214
  572. package/templates/saas/i18n/engine/resources/user_self.fr.ts +37 -214
  573. package/templates/saas/i18n/engine/resources/users.en.ts +53 -180
  574. package/templates/saas/i18n/engine/resources/users.fr.ts +53 -180
  575. package/templates/saas/scenarios/add-technical-doc/files/technical-doc/Dockerfile +4 -1
  576. package/templates/saas/scenarios/add-technical-doc/files/technical-doc/src/plugins/api-reference-pages.ts +9 -1
  577. package/templates/saas/scenarios/add-website/files/website/Dockerfile +4 -1
  578. package/templates/saas/scenarios/add-website/files/website/astro.config.ts.hbs +4 -0
  579. package/templates/saas/scenarios/add-website/files/website/package.json.hbs +1 -1
  580. package/templates/saas/scenarios/add-worker-node/files/workers/__workerDir__/Dockerfile.hbs +3 -1
  581. package/templates/saas/skeleton/.wildo-saas/wildo-dev-companion/scripts/dev-supervised.sh +18 -4
  582. package/templates/saas/skeleton/backend-api/Dockerfile +5 -2
  583. package/templates/saas/skeleton/frontend/Dockerfile +4 -1
  584. package/templates/saas/skeleton/frontend/nginx-config/default.conf.hbs +1 -1
  585. package/templates/saas/skeleton/frontend/src/generated/csp.generated.json.hbs +4 -4
  586. package/templates/saas/skeleton/frontend/vite-engine-dependency-prebundle.ts +10 -1
  587. package/templates/saas/skeleton/frontend/vite.config.ts.hbs +14 -3
  588. package/templates/saas/skeleton/infrastructure/local/wildo.infra.local.config.ts.hbs +2 -0
  589. package/wildo-framework.info.json +1 -1
@@ -0,0 +1,274 @@
1
+ import { existsSync, mkdirSync, utimesSync, writeFileSync } from 'fs';
2
+ import { join, resolve } from 'path';
3
+ import { WorkspaceScope, loadSaasConfig } from '@wildo-ai/platform-config-lib';
4
+ import { AppFrontendType } from '@wildo-ai/saas-models';
5
+ import { BaseCommand } from '../../kernel/base-command.js';
6
+ import { CommandCategory } from '../../kernel/types.js';
7
+ import { ErrorUtils } from '../../infrastructure/errors/error.utils.js';
8
+ import { regenerateEnvFiles, runtimeSignalFiles } from '../../services/credentials/application-secrets.service.js';
9
+ import { buildTunnelIngressYaml, cloudflaredReadiness, credentialsFileOf, ensureNamedTunnel, machineTunnelDirectory, processIsTunnel, readApplicationTunnelState, readMachineTunnelState, removeApplicationTunnelState, routeHostname, systemCloudflaredRunner, tunnelIdOfCredentialsFile, waitForTunnelConnection, waitForTunnelExit, writeApplicationTunnelState, writeMachineTunnelState, } from '../../services/application/local-tunnel.service.js';
10
+ /** The verbs of `wildo local tunnel`. */
11
+ export var LocalTunnelAction;
12
+ (function (LocalTunnelAction) {
13
+ LocalTunnelAction["UP"] = "up";
14
+ LocalTunnelAction["DOWN"] = "down";
15
+ LocalTunnelAction["STATUS"] = "status";
16
+ })(LocalTunnelAction || (LocalTunnelAction = {}));
17
+ export const systemLocalTunnelEnvironment = {
18
+ runner: systemCloudflaredRunner,
19
+ directory: machineTunnelDirectory(),
20
+ isTunnel: processIsTunnel,
21
+ cloudflaredHome: undefined,
22
+ credentialsExist: existsSync,
23
+ waitForConnection: (logPath, pid, configPath) => waitForTunnelConnection(logPath, pid, configPath),
24
+ waitForExit: (pid, configPath) => waitForTunnelExit(pid, configPath),
25
+ loadConfig: async (appRoot) => await loadSaasConfig(join(appRoot, 'wildo.saas.config.ts')),
26
+ regenerate: regenerateEnvFiles,
27
+ async signal(appRoot, runtimes) {
28
+ const now = new Date();
29
+ const signalled = [];
30
+ for (const [folder, file] of await runtimeSignalFiles(appRoot, runtimes)) {
31
+ utimesSync(file, now, now);
32
+ signalled.push(folder);
33
+ }
34
+ return signalled;
35
+ },
36
+ };
37
+ /** The application's backend port and its interactive frontend, from its own `wildo.saas.config.ts`. */
38
+ export function resolveApplicationTargets(config, frontendFlag) {
39
+ const services = Object.values(config.services ?? {});
40
+ const backends = services.filter((service) => service.frontendType === undefined && typeof service.defaultPort === 'number');
41
+ if (backends.length !== 1)
42
+ throw new Error(`Expected one backend service with a defaultPort, found ${backends.length}.`);
43
+ const interactive = services.filter((service) => service.frontendType === AppFrontendType.SAAS_APP && service.serviceName);
44
+ const frontend = frontendFlag
45
+ ? interactive.find((service) => service.serviceName === frontendFlag)
46
+ : interactive.length === 1 ? interactive[0] : undefined;
47
+ if (!frontend?.serviceName) {
48
+ throw new Error(frontendFlag
49
+ ? `No interactive frontend service is named '${frontendFlag}'.`
50
+ : `This application has ${interactive.length} interactive frontends: name the one whose public origin follows the tunnel with --frontend (it must be the backend's default frontend).`);
51
+ }
52
+ return { backendPort: backends[0].defaultPort, frontendServiceName: frontend.serviceName };
53
+ }
54
+ /** `host=url` pairs, each a local service. */
55
+ export function parseTunnelExtras(values) {
56
+ return values.map((value) => {
57
+ const [hostname, service] = value.split('=', 2);
58
+ if (!hostname || !service || !/^http:\/\/127\.0\.0\.1:\d+$/.test(service)) {
59
+ throw new Error(`--extra takes host=http://127.0.0.1:<port>, got '${value}'.`);
60
+ }
61
+ return { hostname, service };
62
+ });
63
+ }
64
+ /**
65
+ * `wildo local tunnel up | down | status` — give this application a public HTTPS origin through this machine's
66
+ * locally-managed Cloudflare tunnel, while it runs (#3907).
67
+ *
68
+ * - `up --hostname <app>-<machine>.wildo.ai [--tunnel <name>] [--frontend <service>] [--extra host=http://127.0.0.1:<port>]`:
69
+ * ensures the named tunnel (created on the first use with this machine's `cloudflared tunnel login`), routes the
70
+ * hostname to it (refusing a hostname whose record points elsewhere), writes the machine's ingress, (re)starts the ONE
71
+ * `cloudflared` process and waits for a registered connection, and only then records the state, regenerates the env
72
+ * files and restarts the backend, minions and workers through their supervisors. The companion is not restarted: its
73
+ * endpoints never follow the tunnel.
74
+ * - `down`: removes this application from the machine's tunnel, stops `cloudflared` when nothing is left (otherwise
75
+ * restarts it with the rest), regenerates and restarts the same runtimes, so the stack is back on localhost.
76
+ * - `status`: the application's and the machine's state, and whether the process is the live tunnel.
77
+ *
78
+ * When the recorded process is not the live tunnel (a crash, a reboot), `up` starts from this application alone: an
79
+ * entry another application left behind is never revived by someone else's `up` (#3907 review F3).
80
+ *
81
+ * Fail closed: only the protocol paths are forwarded (`TUNNEL_FORWARDED_API_PATHS`); everything else answers 404. Nothing
82
+ * here prints a credential. Exit codes: 0 done, 1 refused or failed.
83
+ */
84
+ export default class LocalTunnelCommand extends BaseCommand {
85
+ meta = {
86
+ name: 'local tunnel',
87
+ description: 'Give this application a public HTTPS origin through this machine\'s Cloudflare tunnel (up | down | status)',
88
+ category: CommandCategory.Local,
89
+ minimumScope: WorkspaceScope.SAAS_APP,
90
+ args: [{ name: 'action', description: 'up | down | status', required: true }],
91
+ flags: {
92
+ hostname: { type: 'string', description: 'The application\'s public hostname, e.g. todos-paul.wildo.ai (remembered after the first up)', default: undefined },
93
+ tunnel: { type: 'string', description: 'The machine\'s named tunnel (remembered while it runs)', default: undefined },
94
+ frontend: { type: 'string', description: 'The interactive frontend whose public origin follows the tunnel (needed when there are several)', default: undefined },
95
+ extra: { type: 'string[]', description: 'Another hostname the tunnel serves while it runs: host=http://127.0.0.1:<port> (a test receiver)', default: undefined },
96
+ env: { type: 'string', description: 'The environment whose env files are regenerated', default: 'local' },
97
+ 'credentials-file': {
98
+ type: 'string',
99
+ description: 'Run an existing tunnel from its credentials file, on a machine with no Cloudflare login (the QA VM). Its hostnames must already be routed by the machine that created it.',
100
+ default: undefined,
101
+ },
102
+ },
103
+ };
104
+ /** Overridable for tests. */
105
+ environment = systemLocalTunnelEnvironment;
106
+ async run(ctx) {
107
+ try {
108
+ const appRoot = ctx.cliContext.resolvedHomes.app.declarationRoot;
109
+ if (!appRoot)
110
+ throw new Error('Run `wildo local tunnel` from an application root (a directory with wildo.saas.config.ts).');
111
+ const action = ctx.args.action;
112
+ switch (action) {
113
+ case LocalTunnelAction.UP: return await this.up(ctx, appRoot);
114
+ case LocalTunnelAction.DOWN: return await this.down(ctx, appRoot);
115
+ case LocalTunnelAction.STATUS: return this.status(ctx, appRoot);
116
+ default: throw new Error(`Unknown action '${action ?? ''}': use up, down or status.`);
117
+ }
118
+ }
119
+ catch (error) {
120
+ ctx.log.error(ErrorUtils.extractErrorMessage(error));
121
+ return { success: false, exitCode: 1 };
122
+ }
123
+ }
124
+ /** The machine state, or `null` when its process is not the live tunnel (its entries are then not trusted). */
125
+ liveMachine() {
126
+ const machine = readMachineTunnelState(this.environment.directory);
127
+ return machine && this.environment.isTunnel(machine.pid, machine.configPath) ? machine : null;
128
+ }
129
+ async up(ctx, appRoot) {
130
+ // #3907 item 3: a machine with no Cloudflare login (the QA VM) is GIVEN the tunnel's credentials file. It cannot ask
131
+ // the account for the tunnel nor route a hostname, so both are the creating machine's job, done once; this machine
132
+ // only runs the tunnel. cloudflared needs no login for that: the credentials file names the tunnel (measured
133
+ // 2026-11-17, by id and by name, with an empty home).
134
+ const givenCredentials = ctx.flags['credentials-file'] ?? readMachineTunnelState(this.environment.directory)?.givenCredentialsFile;
135
+ if (!givenCredentials) {
136
+ const notReady = cloudflaredReadiness(this.environment.cloudflaredHome);
137
+ if (notReady)
138
+ throw new Error(notReady);
139
+ }
140
+ const saasConfig = await this.environment.loadConfig(appRoot);
141
+ const previous = readApplicationTunnelState(appRoot);
142
+ const live = this.liveMachine();
143
+ const hostname = ctx.flags.hostname ?? previous?.hostname;
144
+ const tunnelName = ctx.flags.tunnel ?? live?.tunnelName ?? previous?.tunnelName;
145
+ if (!hostname)
146
+ throw new Error('Name the application\'s public hostname with --hostname (e.g. todos-paul.wildo.ai).');
147
+ if (!tunnelName)
148
+ throw new Error('Name this machine\'s tunnel with --tunnel (e.g. wildo-paul).');
149
+ if (live && live.tunnelName !== tunnelName) {
150
+ throw new Error(`This machine's tunnel '${live.tunnelName}' is running for ${Object.values(live.applications).map((app) => app.hostname).join(', ')}; one machine runs one tunnel. Use it, or bring those applications down first.`);
151
+ }
152
+ const { backendPort, frontendServiceName } = resolveApplicationTargets(saasConfig, ctx.flags.frontend);
153
+ const extras = [...(live?.extras ?? []), ...parseTunnelExtras(ctx.flags.extra ?? [])]
154
+ .filter((extra, index, all) => all.findIndex((other) => other.hostname === extra.hostname) === index);
155
+ let credentialsFile;
156
+ if (givenCredentials) {
157
+ credentialsFile = resolve(givenCredentials);
158
+ if (!this.environment.credentialsExist(credentialsFile))
159
+ throw new Error(`No credentials file at ${credentialsFile}.`);
160
+ const id = tunnelIdOfCredentialsFile(credentialsFile);
161
+ ctx.log.info(` Running tunnel ${id} from its credentials file. Its hostnames are routed by the machine that created it; this one does not route ${[hostname, ...extras.map((extra) => extra.hostname)].join(', ')}.`);
162
+ }
163
+ else {
164
+ const { id } = await ensureNamedTunnel(this.environment.runner, tunnelName);
165
+ credentialsFile = credentialsFileOf(id, this.environment.cloudflaredHome);
166
+ if (!this.environment.credentialsExist(credentialsFile)) {
167
+ throw new Error(`The tunnel '${tunnelName}' has no credentials file on this machine (${credentialsFile}): it was created elsewhere. Pass it with --credentials-file, or use a tunnel this machine created.`);
168
+ }
169
+ await routeHostname(this.environment.runner, tunnelName, hostname);
170
+ for (const extra of extras)
171
+ await routeHostname(this.environment.runner, tunnelName, extra.hostname);
172
+ }
173
+ const applications = { ...(live?.applications ?? {}), [appRoot]: { hostname, backendPort } };
174
+ const next = await this.restart(live, { tunnelName, credentialsFile, applications, extras, givenCredentialsFile: givenCredentials ? credentialsFile : undefined });
175
+ writeMachineTunnelState(next, this.environment.directory);
176
+ writeApplicationTunnelState(appRoot, {
177
+ schemaVersion: 1, tunnelName, hostname, publicOrigin: `https://${hostname}`, frontendServiceName, backendPort,
178
+ });
179
+ ctx.log.success(` The tunnel serves https://${hostname} (pid ${next.pid}); its protocol paths reach :${backendPort}, everything else answers 404.`);
180
+ await this.applyToRuntimes(ctx, appRoot, saasConfig);
181
+ return { success: true };
182
+ }
183
+ async down(ctx, appRoot) {
184
+ const saasConfig = await this.environment.loadConfig(appRoot);
185
+ const recorded = readMachineTunnelState(this.environment.directory);
186
+ const live = this.liveMachine();
187
+ removeApplicationTunnelState(appRoot);
188
+ if (recorded) {
189
+ const { [appRoot]: _removed, ...applications } = recorded.applications;
190
+ if (!live || Object.keys(applications).length === 0) {
191
+ if (live?.pid) {
192
+ this.environment.runner.stop(live.pid);
193
+ if (!await this.environment.waitForExit(live.pid, live.configPath)) {
194
+ // Keep the pid on record: a process still forwarding the protocol paths must stay visible to `status`.
195
+ writeMachineTunnelState({ ...recorded, applications: {}, extras: [] }, this.environment.directory);
196
+ ctx.log.warn(` The tunnel process (pid ${live.pid}) did not exit; it may still forward. Stop it yourself, then run \`wildo local tunnel status\`.`);
197
+ await this.applyToRuntimes(ctx, appRoot, saasConfig);
198
+ return { success: false, exitCode: 1 };
199
+ }
200
+ }
201
+ // Nothing left: no application, no extras, no process. The next `up` starts clean.
202
+ writeMachineTunnelState({ ...recorded, pid: null, applications: {}, extras: [] }, this.environment.directory);
203
+ ctx.log.success(' The tunnel is stopped.');
204
+ }
205
+ else {
206
+ const credentialsFile = live.givenCredentialsFile
207
+ ?? credentialsFileOf((await ensureNamedTunnel(this.environment.runner, live.tunnelName)).id, this.environment.cloudflaredHome);
208
+ writeMachineTunnelState(await this.restart(live, { tunnelName: live.tunnelName, credentialsFile, applications, extras: live.extras, givenCredentialsFile: live.givenCredentialsFile }), this.environment.directory);
209
+ ctx.log.success(' This application left the tunnel; the others still use it.');
210
+ }
211
+ }
212
+ await this.applyToRuntimes(ctx, appRoot, saasConfig);
213
+ return { success: true };
214
+ }
215
+ status(ctx, appRoot) {
216
+ const state = readApplicationTunnelState(appRoot);
217
+ const machine = readMachineTunnelState(this.environment.directory);
218
+ const live = machine !== null && this.environment.isTunnel(machine.pid, machine.configPath);
219
+ if (!state)
220
+ ctx.log.info(' This application has no tunnel: its public origin is local.');
221
+ else
222
+ ctx.log.info(` This application's public origin: ${state.publicOrigin} (frontend ${state.frontendServiceName}, backend :${state.backendPort}).`);
223
+ if (machine) {
224
+ ctx.log.info(` Machine tunnel '${machine.tunnelName}': ${live ? `running (pid ${machine.pid})` : 'not running'}, serving ${Object.values(machine.applications).map((app) => app.hostname).join(', ') || 'no application'}${machine.extras.length ? ` and ${machine.extras.map((extra) => extra.hostname).join(', ')}` : ''}.`);
225
+ }
226
+ if (state && !live)
227
+ ctx.log.warn(' The state names a tunnel whose process is not running: env generation ignores it. Run `wildo local tunnel up` or `down`.');
228
+ return { success: true };
229
+ }
230
+ /**
231
+ * Write the ingress and (re)start the machine's one `cloudflared` process: the old one is stopped and has EXITED before
232
+ * the new one starts, so two connectors with different ingress never serve at once (review F12), and the new one has
233
+ * registered a connection before anything is recorded (review F5).
234
+ */
235
+ async restart(live, input) {
236
+ const configPath = join(this.environment.directory, `${input.tunnelName}.yml`);
237
+ const logPath = join(this.environment.directory, 'cloudflared.log');
238
+ const yaml = buildTunnelIngressYaml({ tunnelName: input.tunnelName, credentialsFile: input.credentialsFile, applications: Object.values(input.applications), extras: input.extras });
239
+ if (live?.pid) {
240
+ this.environment.runner.stop(live.pid);
241
+ if (!await this.environment.waitForExit(live.pid, live.configPath)) {
242
+ throw new Error(`The running tunnel (pid ${live.pid}) did not exit; nothing was changed. Stop it, then run this again.`);
243
+ }
244
+ }
245
+ mkdirSync(this.environment.directory, { recursive: true });
246
+ writeFileSync(configPath, yaml);
247
+ const pid = this.environment.runner.startDetached(['tunnel', '--no-autoupdate', '--config', configPath, 'run', input.tunnelName], logPath);
248
+ if (!await this.environment.waitForConnection(logPath, pid, configPath)) {
249
+ this.environment.runner.stop(pid);
250
+ const others = Object.entries(input.applications).filter(([root]) => live?.applications[root]).map(([root, app]) => `${app.hostname} (${root})`);
251
+ throw new Error(`cloudflared registered no connection (see ${logPath}); nothing was recorded and this application's public origin stays local.`
252
+ + (others.length > 0 ? ` The tunnel these applications used is now stopped, and their backends advertise it until they regenerate: ${others.join(', ')}. Run \`wildo local tunnel up\` or \`down\` in each.` : ''));
253
+ }
254
+ return {
255
+ schemaVersion: 1, tunnelName: input.tunnelName, pid, configPath, logPath, applications: input.applications, extras: [...input.extras],
256
+ ...(input.givenCredentialsFile ? { givenCredentialsFile: input.givenCredentialsFile } : {}),
257
+ };
258
+ }
259
+ /** Regenerate the env files and restart every runtime that reads the public origin, never the companion. */
260
+ async applyToRuntimes(ctx, appRoot, config) {
261
+ const env = ctx.flags.env ?? 'local';
262
+ const regeneration = this.environment.regenerate(appRoot, env);
263
+ if (!regeneration.regenerated) {
264
+ ctx.log.warn(` The env files could not be regenerated, so the runtimes still advertise the previous public origin: run \`wildo config sync --domain env-files\`, then restart the backend.${regeneration.failure ? ` (${regeneration.failure})` : ''}`);
265
+ return;
266
+ }
267
+ const runtimes = ['backend', ...Object.keys(config.minions ?? {}).map((key) => `minions.${key}`), ...Object.keys(config.workers ?? {}).map((key) => `workers.${key}`)];
268
+ const signalled = await this.environment.signal(appRoot, runtimes);
269
+ ctx.log.info(signalled.length > 0
270
+ ? ` Restarted through their supervisors: ${signalled.join(', ')}.`
271
+ : ' No supervised runtime is running: the change takes effect at the next `wildo local dev`.');
272
+ }
273
+ }
274
+ //# sourceMappingURL=tunnel.command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tunnel.command.js","sourceRoot":"","sources":["../../../../src/commands/local/tunnel.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AACtE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,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,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,6DAA6D,CAAC;AACrH,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,sBAAsB,EACtB,eAAe,E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} from 'fs';\nimport { join, resolve } from 'path';\nimport { WorkspaceScope, loadSaasConfig } from '@wildo-ai/platform-config-lib';\nimport { AppFrontendType } from '@wildo-ai/saas-models';\n\nimport { BaseCommand } from '~wildo-cli/kernel/base-command';\nimport { CommandCategory } from '~wildo-cli/kernel/types';\nimport type { CommandContext, CommandMeta, CommandResult } from '~wildo-cli/kernel/types';\nimport { ErrorUtils } from '~wildo-cli/infrastructure/errors/error.utils';\nimport { regenerateEnvFiles, runtimeSignalFiles } from '~wildo-cli/services/credentials/application-secrets.service';\nimport {\n buildTunnelIngressYaml,\n cloudflaredReadiness,\n credentialsFileOf,\n ensureNamedTunnel,\n machineTunnelDirectory,\n processIsTunnel,\n readApplicationTunnelState,\n readMachineTunnelState,\n removeApplicationTunnelState,\n routeHostname,\n systemCloudflaredRunner,\n tunnelIdOfCredentialsFile,\n waitForTunnelConnection,\n waitForTunnelExit,\n writeApplicationTunnelState,\n writeMachineTunnelState,\n type CloudflaredRunner,\n type MachineTunnelState,\n type TunnelExtraRoute,\n} from '~wildo-cli/services/application/local-tunnel.service';\n\n/** The verbs of `wildo local tunnel`. */\nexport enum LocalTunnelAction {\n UP = 'up',\n DOWN = 'down',\n STATUS = 'status',\n}\n\ninterface SaasServices {\n services?: Record<string, { path?: string; serviceName?: string; defaultPort?: number; frontendType?: string }>;\n minions?: Record<string, unknown>;\n workers?: Record<string, unknown>;\n}\n\n/** What the command reaches outside itself, injectable for tests. */\nexport interface LocalTunnelEnvironment {\n readonly runner: CloudflaredRunner;\n readonly directory: string;\n readonly isTunnel: typeof processIsTunnel;\n readonly cloudflaredHome: string | undefined;\n readonly credentialsExist: (path: string) => boolean;\n readonly waitForConnection: (logPath: string, pid: number, configPath: string) => Promise<boolean>;\n readonly waitForExit: (pid: number, configPath: string) => Promise<boolean>;\n readonly loadConfig: (appRoot: string) => Promise<SaasServices>;\n readonly regenerate: (appRoot: string, envName: string) => { readonly regenerated: boolean; readonly failure: string | null };\n readonly signal: (appRoot: string, runtimes: readonly string[]) => Promise<string[]>;\n}\n\nexport const systemLocalTunnelEnvironment: LocalTunnelEnvironment = {\n runner: systemCloudflaredRunner,\n directory: machineTunnelDirectory(),\n isTunnel: processIsTunnel,\n cloudflaredHome: undefined,\n credentialsExist: existsSync,\n waitForConnection: (logPath, pid, configPath) => waitForTunnelConnection(logPath, pid, configPath),\n waitForExit: (pid, configPath) => waitForTunnelExit(pid, configPath),\n loadConfig: async (appRoot) => await loadSaasConfig(join(appRoot, 'wildo.saas.config.ts')) as SaasServices,\n regenerate: regenerateEnvFiles,\n async signal(appRoot, runtimes) {\n const now = new Date();\n const signalled: string[] = [];\n for (const [folder, file] of await runtimeSignalFiles(appRoot, runtimes)) {\n utimesSync(file, now, now);\n signalled.push(folder);\n }\n return signalled;\n },\n};\n\n/** The application's backend port and its interactive frontend, from its own `wildo.saas.config.ts`. */\nexport function resolveApplicationTargets(config: SaasServices, frontendFlag: string | undefined): { backendPort: number; frontendServiceName: string } {\n const services = Object.values(config.services ?? {});\n const backends = services.filter((service) => service.frontendType === undefined && typeof service.defaultPort === 'number');\n if (backends.length !== 1) throw new Error(`Expected one backend service with a defaultPort, found ${backends.length}.`);\n const interactive = services.filter((service) => service.frontendType === AppFrontendType.SAAS_APP && service.serviceName);\n const frontend = frontendFlag\n ? interactive.find((service) => service.serviceName === frontendFlag)\n : interactive.length === 1 ? interactive[0] : undefined;\n if (!frontend?.serviceName) {\n throw new Error(frontendFlag\n ? `No interactive frontend service is named '${frontendFlag}'.`\n : `This application has ${interactive.length} interactive frontends: name the one whose public origin follows the tunnel with --frontend (it must be the backend's default frontend).`);\n }\n return { backendPort: backends[0]!.defaultPort!, frontendServiceName: frontend.serviceName };\n}\n\n/** `host=url` pairs, each a local service. */\nexport function parseTunnelExtras(values: readonly string[]): TunnelExtraRoute[] {\n return values.map((value) => {\n const [hostname, service] = value.split('=', 2) as [string, string | undefined];\n if (!hostname || !service || !/^http:\\/\\/127\\.0\\.0\\.1:\\d+$/.test(service)) {\n throw new Error(`--extra takes host=http://127.0.0.1:<port>, got '${value}'.`);\n }\n return { hostname, service };\n });\n}\n\n/**\n * `wildo local tunnel up | down | status` — give this application a public HTTPS origin through this machine's\n * locally-managed Cloudflare tunnel, while it runs (#3907).\n *\n * - `up --hostname <app>-<machine>.wildo.ai [--tunnel <name>] [--frontend <service>] [--extra host=http://127.0.0.1:<port>]`:\n * ensures the named tunnel (created on the first use with this machine's `cloudflared tunnel login`), routes the\n * hostname to it (refusing a hostname whose record points elsewhere), writes the machine's ingress, (re)starts the ONE\n * `cloudflared` process and waits for a registered connection, and only then records the state, regenerates the env\n * files and restarts the backend, minions and workers through their supervisors. The companion is not restarted: its\n * endpoints never follow the tunnel.\n * - `down`: removes this application from the machine's tunnel, stops `cloudflared` when nothing is left (otherwise\n * restarts it with the rest), regenerates and restarts the same runtimes, so the stack is back on localhost.\n * - `status`: the application's and the machine's state, and whether the process is the live tunnel.\n *\n * When the recorded process is not the live tunnel (a crash, a reboot), `up` starts from this application alone: an\n * entry another application left behind is never revived by someone else's `up` (#3907 review F3).\n *\n * Fail closed: only the protocol paths are forwarded (`TUNNEL_FORWARDED_API_PATHS`); everything else answers 404. Nothing\n * here prints a credential. Exit codes: 0 done, 1 refused or failed.\n */\nexport default class LocalTunnelCommand extends BaseCommand {\n readonly meta: CommandMeta = {\n name: 'local tunnel',\n description: 'Give this application a public HTTPS origin through this machine\\'s Cloudflare tunnel (up | down | status)',\n category: CommandCategory.Local,\n minimumScope: WorkspaceScope.SAAS_APP,\n args: [{ name: 'action', description: 'up | down | status', required: true }],\n flags: {\n hostname: { type: 'string', description: 'The application\\'s public hostname, e.g. todos-paul.wildo.ai (remembered after the first up)', default: undefined },\n tunnel: { type: 'string', description: 'The machine\\'s named tunnel (remembered while it runs)', default: undefined },\n frontend: { type: 'string', description: 'The interactive frontend whose public origin follows the tunnel (needed when there are several)', default: undefined },\n extra: { type: 'string[]', description: 'Another hostname the tunnel serves while it runs: host=http://127.0.0.1:<port> (a test receiver)', default: undefined },\n env: { type: 'string', description: 'The environment whose env files are regenerated', default: 'local' },\n 'credentials-file': {\n type: 'string',\n description: 'Run an existing tunnel from its credentials file, on a machine with no Cloudflare login (the QA VM). Its hostnames must already be routed by the machine that created it.',\n default: undefined,\n },\n },\n };\n\n /** Overridable for tests. */\n protected environment: LocalTunnelEnvironment = systemLocalTunnelEnvironment;\n\n async run(ctx: CommandContext): Promise<CommandResult> {\n try {\n const appRoot = ctx.cliContext.resolvedHomes.app.declarationRoot;\n if (!appRoot) throw new Error('Run `wildo local tunnel` from an application root (a directory with wildo.saas.config.ts).');\n const action = ctx.args.action as LocalTunnelAction | undefined;\n switch (action) {\n case LocalTunnelAction.UP: return await this.up(ctx, appRoot);\n case LocalTunnelAction.DOWN: return await this.down(ctx, appRoot);\n case LocalTunnelAction.STATUS: return this.status(ctx, appRoot);\n default: throw new Error(`Unknown action '${action ?? ''}': use up, down or status.`);\n }\n } catch (error) {\n ctx.log.error(ErrorUtils.extractErrorMessage(error));\n return { success: false, exitCode: 1 };\n }\n }\n\n /** The machine state, or `null` when its process is not the live tunnel (its entries are then not trusted). */\n private liveMachine(): MachineTunnelState | null {\n const machine = readMachineTunnelState(this.environment.directory);\n return machine && this.environment.isTunnel(machine.pid, machine.configPath) ? machine : null;\n }\n\n private async up(ctx: CommandContext, appRoot: string): Promise<CommandResult> {\n // #3907 item 3: a machine with no Cloudflare login (the QA VM) is GIVEN the tunnel's credentials file. It cannot ask\n // the account for the tunnel nor route a hostname, so both are the creating machine's job, done once; this machine\n // only runs the tunnel. cloudflared needs no login for that: the credentials file names the tunnel (measured\n // 2026-11-17, by id and by name, with an empty home).\n const givenCredentials = (ctx.flags['credentials-file'] as string | undefined) ?? readMachineTunnelState(this.environment.directory)?.givenCredentialsFile;\n if (!givenCredentials) {\n const notReady = cloudflaredReadiness(this.environment.cloudflaredHome);\n if (notReady) throw new Error(notReady);\n }\n const saasConfig = await this.environment.loadConfig(appRoot);\n const previous = readApplicationTunnelState(appRoot);\n const live = this.liveMachine();\n const hostname = (ctx.flags.hostname as string | undefined) ?? previous?.hostname;\n const tunnelName = (ctx.flags.tunnel as string | undefined) ?? live?.tunnelName ?? previous?.tunnelName;\n if (!hostname) throw new Error('Name the application\\'s public hostname with --hostname (e.g. todos-paul.wildo.ai).');\n if (!tunnelName) throw new Error('Name this machine\\'s tunnel with --tunnel (e.g. wildo-paul).');\n if (live && live.tunnelName !== tunnelName) {\n throw new Error(`This machine's tunnel '${live.tunnelName}' is running for ${Object.values(live.applications).map((app) => app.hostname).join(', ')}; one machine runs one tunnel. Use it, or bring those applications down first.`);\n }\n const { backendPort, frontendServiceName } = resolveApplicationTargets(saasConfig, ctx.flags.frontend as string | undefined);\n const extras = [...(live?.extras ?? []), ...parseTunnelExtras((ctx.flags.extra as string[] | undefined) ?? [])]\n .filter((extra, index, all) => all.findIndex((other) => other.hostname === extra.hostname) === index);\n\n let credentialsFile: string;\n if (givenCredentials) {\n credentialsFile = resolve(givenCredentials);\n if (!this.environment.credentialsExist(credentialsFile)) throw new Error(`No credentials file at ${credentialsFile}.`);\n const id = tunnelIdOfCredentialsFile(credentialsFile);\n ctx.log.info(` Running tunnel ${id} from its credentials file. Its hostnames are routed by the machine that created it; this one does not route ${[hostname, ...extras.map((extra) => extra.hostname)].join(', ')}.`);\n } else {\n const { id } = await ensureNamedTunnel(this.environment.runner, tunnelName);\n credentialsFile = credentialsFileOf(id, this.environment.cloudflaredHome);\n if (!this.environment.credentialsExist(credentialsFile)) {\n throw new Error(`The tunnel '${tunnelName}' has no credentials file on this machine (${credentialsFile}): it was created elsewhere. Pass it with --credentials-file, or use a tunnel this machine created.`);\n }\n await routeHostname(this.environment.runner, tunnelName, hostname);\n for (const extra of extras) await routeHostname(this.environment.runner, tunnelName, extra.hostname);\n }\n\n const applications = { ...(live?.applications ?? {}), [appRoot]: { hostname, backendPort } };\n const next = await this.restart(live, { tunnelName, credentialsFile, applications, extras, givenCredentialsFile: givenCredentials ? credentialsFile : undefined });\n writeMachineTunnelState(next, this.environment.directory);\n writeApplicationTunnelState(appRoot, {\n schemaVersion: 1, tunnelName, hostname, publicOrigin: `https://${hostname}`, frontendServiceName, backendPort,\n });\n ctx.log.success(` The tunnel serves https://${hostname} (pid ${next.pid}); its protocol paths reach :${backendPort}, everything else answers 404.`);\n await this.applyToRuntimes(ctx, appRoot, saasConfig);\n return { success: true };\n }\n\n private async down(ctx: CommandContext, appRoot: string): Promise<CommandResult> {\n const saasConfig = await this.environment.loadConfig(appRoot);\n const recorded = readMachineTunnelState(this.environment.directory);\n const live = this.liveMachine();\n removeApplicationTunnelState(appRoot);\n if (recorded) {\n const { [appRoot]: _removed, ...applications } = recorded.applications;\n if (!live || Object.keys(applications).length === 0) {\n if (live?.pid) {\n this.environment.runner.stop(live.pid);\n if (!await this.environment.waitForExit(live.pid, live.configPath)) {\n // Keep the pid on record: a process still forwarding the protocol paths must stay visible to `status`.\n writeMachineTunnelState({ ...recorded, applications: {}, extras: [] }, this.environment.directory);\n ctx.log.warn(` The tunnel process (pid ${live.pid}) did not exit; it may still forward. Stop it yourself, then run \\`wildo local tunnel status\\`.`);\n await this.applyToRuntimes(ctx, appRoot, saasConfig);\n return { success: false, exitCode: 1 };\n }\n }\n // Nothing left: no application, no extras, no process. The next `up` starts clean.\n writeMachineTunnelState({ ...recorded, pid: null, applications: {}, extras: [] }, this.environment.directory);\n ctx.log.success(' The tunnel is stopped.');\n } else {\n const credentialsFile = live.givenCredentialsFile\n ?? credentialsFileOf((await ensureNamedTunnel(this.environment.runner, live.tunnelName)).id, this.environment.cloudflaredHome);\n writeMachineTunnelState(await this.restart(live, { tunnelName: live.tunnelName, credentialsFile, applications, extras: live.extras, givenCredentialsFile: live.givenCredentialsFile }), this.environment.directory);\n ctx.log.success(' This application left the tunnel; the others still use it.');\n }\n }\n await this.applyToRuntimes(ctx, appRoot, saasConfig);\n return { success: true };\n }\n\n private status(ctx: CommandContext, appRoot: string): CommandResult {\n const state = readApplicationTunnelState(appRoot);\n const machine = readMachineTunnelState(this.environment.directory);\n const live = machine !== null && this.environment.isTunnel(machine.pid, machine.configPath);\n if (!state) ctx.log.info(' This application has no tunnel: its public origin is local.');\n else ctx.log.info(` This application's public origin: ${state.publicOrigin} (frontend ${state.frontendServiceName}, backend :${state.backendPort}).`);\n if (machine) {\n ctx.log.info(` Machine tunnel '${machine.tunnelName}': ${live ? `running (pid ${machine.pid})` : 'not running'}, serving ${Object.values(machine.applications).map((app) => app.hostname).join(', ') || 'no application'}${machine.extras.length ? ` and ${machine.extras.map((extra) => extra.hostname).join(', ')}` : ''}.`);\n }\n if (state && !live) ctx.log.warn(' The state names a tunnel whose process is not running: env generation ignores it. Run `wildo local tunnel up` or `down`.');\n return { success: true };\n }\n\n /**\n * Write the ingress and (re)start the machine's one `cloudflared` process: the old one is stopped and has EXITED before\n * the new one starts, so two connectors with different ingress never serve at once (review F12), and the new one has\n * registered a connection before anything is recorded (review F5).\n */\n private async restart(\n live: MachineTunnelState | null,\n input: { tunnelName: string; credentialsFile: string; applications: MachineTunnelState['applications']; extras: readonly TunnelExtraRoute[]; givenCredentialsFile?: string },\n ): Promise<MachineTunnelState> {\n const configPath = join(this.environment.directory, `${input.tunnelName}.yml`);\n const logPath = join(this.environment.directory, 'cloudflared.log');\n const yaml = buildTunnelIngressYaml({ tunnelName: input.tunnelName, credentialsFile: input.credentialsFile, applications: Object.values(input.applications), extras: input.extras });\n if (live?.pid) {\n this.environment.runner.stop(live.pid);\n if (!await this.environment.waitForExit(live.pid, live.configPath)) {\n throw new Error(`The running tunnel (pid ${live.pid}) did not exit; nothing was changed. Stop it, then run this again.`);\n }\n }\n mkdirSync(this.environment.directory, { recursive: true });\n writeFileSync(configPath, yaml);\n const pid = this.environment.runner.startDetached(['tunnel', '--no-autoupdate', '--config', configPath, 'run', input.tunnelName], logPath);\n if (!await this.environment.waitForConnection(logPath, pid, configPath)) {\n this.environment.runner.stop(pid);\n const others = Object.entries(input.applications).filter(([root]) => live?.applications[root]).map(([root, app]) => `${app.hostname} (${root})`);\n throw new Error(`cloudflared registered no connection (see ${logPath}); nothing was recorded and this application's public origin stays local.`\n + (others.length > 0 ? ` The tunnel these applications used is now stopped, and their backends advertise it until they regenerate: ${others.join(', ')}. Run \\`wildo local tunnel up\\` or \\`down\\` in each.` : ''));\n }\n return {\n schemaVersion: 1, tunnelName: input.tunnelName, pid, configPath, logPath, applications: input.applications, extras: [...input.extras],\n ...(input.givenCredentialsFile ? { givenCredentialsFile: input.givenCredentialsFile } : {}),\n };\n }\n\n /** Regenerate the env files and restart every runtime that reads the public origin, never the companion. */\n private async applyToRuntimes(ctx: CommandContext, appRoot: string, config: SaasServices): Promise<void> {\n const env = (ctx.flags.env as string | undefined) ?? 'local';\n const regeneration = this.environment.regenerate(appRoot, env);\n if (!regeneration.regenerated) {\n ctx.log.warn(` The env files could not be regenerated, so the runtimes still advertise the previous public origin: run \\`wildo config sync --domain env-files\\`, then restart the backend.${regeneration.failure ? ` (${regeneration.failure})` : ''}`);\n return;\n }\n const runtimes = ['backend', ...Object.keys(config.minions ?? {}).map((key) => `minions.${key}`), ...Object.keys(config.workers ?? {}).map((key) => `workers.${key}`)];\n const signalled = await this.environment.signal(appRoot, runtimes);\n ctx.log.info(signalled.length > 0\n ? ` Restarted through their supervisors: ${signalled.join(', ')}.`\n : ' No supervised runtime is running: the change takes effect at the next `wildo local dev`.');\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"repair-lockfile.command.d.ts","sourceRoot":"","sources":["../../../../src/commands/registry/repair-lockfile.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAKH,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7D,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAkG1F,MAAM,CAAC,OAAO,OAAO,6BAA8B,SAAQ,WAAW;IACpE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAexB;IAEI,GAAG,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;YAgIxC,WAAW;IAsDzB;;;OAGG;YACW,sBAAsB;CAsErC"}
1
+ {"version":3,"file":"repair-lockfile.command.d.ts","sourceRoot":"","sources":["../../../../src/commands/registry/repair-lockfile.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAKH,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7D,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAkG1F,MAAM,CAAC,OAAO,OAAO,6BAA8B,SAAQ,WAAW;IACpE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAexB;IAEI,GAAG,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;YAgIxC,WAAW;IAuDzB;;;OAGG;YACW,sBAAsB;CAsErC"}
@@ -254,6 +254,7 @@ export default class RegistryRepairLockfileCommand extends BaseCommand {
254
254
  // it used to re-apply every file and silently replace local edits.
255
255
  const writePlan = await planProtectedWrite({
256
256
  saasRoot,
257
+ extractDir: paths.extractDir,
257
258
  moduleId: entry.moduleId,
258
259
  stagedPaths: await validatedStagedAppFiles({ saasRoot, extractDir: paths.extractDir, manifest: stagedManifest }),
259
260
  recorded: entry,
@@ -1 +1 @@
1
- {"version":3,"file":"repair-lockfile.command.js","sourceRoot":"","sources":["../../../../src/commands/registry/repair-lockfile.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,uBAAuB,EAAE,MAAM,0DAA0D,CAAC;AACnG,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;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AC,OAAO,6CAA6C,CACnI,CAAC;QACJ,CAAC;QACD,2FAA2F;QAC3F,6FAA6F;QAC7F,mFAAmF;QACnF,4BAA4B,CAAC;YAC3B,QAAQ,EAAE,KAAK,CAAC,QAAQ;YACxB,OAAO;YACP,YAAY;YACZ,YAAY,EAAE,cAAc;SAC7B,CAAC,CAAC;QAEH,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,oBAAoB,CAAC,QAAQ,CAAC,aAAa,EAAE;YACnE,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,QAAQ,EAAE,KAAK,CAAC,QAAQ;YACxB,OAAO;YACP,cAAc,EAAE,YAAY;SAC7B,CAAC,CAAC;QACH,IAAI,UAAU;YAAE,MAAM,0BAA0B,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;QACpE,OAAO;YACL,YAAY,EAAE,kBAAkB,CAAC,QAAQ;YACzC,OAAO;YACP,cAAc,EAAE,YAAY;YAC5B,KAAK;YACL,QAAQ,EAAE,EAAE,GAAG,EAAE,WAAW,EAAE,EAAE,EAAE,UAAU,EAAE;SAC/C,CAAC;IACJ,CAAC;CACF","sourcesContent":["/**\n * `wildo registry repair-lockfile` — diagnose + (optionally) auto-fix\n * the `sections.modules` lockfile state.\n *\n * Read mode (default): runs `LockfileRepairService.inspect(saasRoot)`, which reads the application's effective pnpm\n * settings through the shared pnpm-settings helper (#2808), and renders every finding. Exit 0 when no `severity: 'error'`\n * findings; exit 1 otherwise.\n *\n * `--fix`: attempts auto-repair for the fixable finding kinds:\n * - `module-file-missing` → re-fetch the artifact via the recorded\n * registry URL + lockfile entry. Calls `RegistryServerClient.resolve`\n * against the stored exact version, REFUSES when the registry now\n * serves a different digest than the lockfile pins, downloads against\n * the PINNED digest, and re-extracts into the staging dir + re-fans-out\n * onto the SaaS source. The pin is never rewritten.\n * - `vendor-pin-missing` → write the recorded pin back into the overrides in\n * `pnpm-workspace.yaml` (#2789, #2808).\n * - `only-built-missing` → write the recorded install-script name back into\n * `onlyBuiltDependencies` in `pnpm-workspace.yaml`, then `pnpm rebuild -r` every\n * restored name (#2809): adding a name runs nothing for a package already installed.\n * `only-built-blocked` (a `neverBuiltDependencies` list names the package, or the\n * application declares both kinds of list, which pnpm refuses) is reported and\n * never written, as the install refuses it (#2801).\n * Both writes go through the pnpm-settings helper, which moves a copy an older\n * application keeps in `package.json` → `pnpm` into the workspace file (pnpm 10\n * would read that copy instead, and pnpm 11 reads none).\n *\n * `envelope-malformed` / `modules-section-malformed` are NOT\n * auto-fixable — those require manual correction. Repair can replace\n * local module source files and does not back up operator edits.\n */\n\nimport { existsSync } from 'node:fs';\nimport * as path from 'node:path';\nimport { checkModuleRequirements } from '~wildo-cli/services/registry/module-requirements.service';\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 {\n ApplicationInstallScriptPolicy,\n LockfileRepairService,\n RegistryLockfileService,\n RegistryServerClient,\n type LockfileRepairFinding,\n} from '@wildo-ai/wildo-module-client';\nimport {\n PROVIDER_WORKSPACE_FILE,\n PnpmSettingsFormatError,\n readApplicationPnpmSettings,\n writeApplicationPnpmSettings,\n localCheckoutProvenanceOf,\n ModuleDistribution,\n registryProvenanceOf,\n type RegistryModulesLockEntry,\n} from '@wildo-ai/platform-config-lib';\nimport { RegistryCredentialsService } from '~wildo-cli/services/registry/registry-credentials.service';\nimport { requireSaasRoot, resolveLockedRegistry, withRegistryWorkspaceMutationLock } from '~wildo-cli/services/registry/registry-command.utils';\nimport { fanOutToSaasSource, readStagedManifest, validatedStagedAppFiles } from '~wildo-cli/services/registry/boundary-fanout.utils';\nimport {\n describeProtectedFile,\n nextInstalledFileHashes,\n planProtectedWrite,\n registryForceBackupDirectory,\n} from '~wildo-cli/services/registry/installed-file-state.utils';\nimport { moduleArtifactPaths } from '~wildo-cli/services/registry/module-artifact-files.utils';\nimport { syncSkillsAfterProviderChange } from '~wildo-cli/services/registry/provider-install-step';\nimport { runPnpmRebuild } from '~wildo-cli/services/framework/package-install.service';\nimport { resolveLocalCheckoutModule } from '~wildo-cli/services/registry/local-checkout-module-source.service';\nimport {\n describeAcquisition,\n lockEntryProvenance,\n moduleRequirementsOriginOf,\n stageModuleAcquisition,\n type ModuleAcquisition,\n} from '~wildo-cli/services/registry/module-acquisition.utils';\nimport {\n assertServedDigestMatchesPin,\n assertStagedManifestMatchesRequest,\n} from '~wildo-cli/services/registry/artifact-trust.utils';\n\n\n\nfunction renderFinding(f: LockfileRepairFinding): string {\n const sev = f.severity.toUpperCase();\n switch (f.kind) {\n case 'envelope-malformed':\n case 'modules-section-malformed':\n return `[${sev}] ${f.kind}: ${f.message}${f.detail ? ` — ${f.detail}` : ''}`;\n case 'module-file-missing':\n return `[${sev}] ${f.kind}: ${f.moduleId} → missing file ${f.filePath}`;\n case 'vendor-pin-missing':\n return `[${sev}] ${f.kind}: ${f.moduleId} → its vendor pin ${f.name}@${f.version} is gone from the overrides in ${PROVIDER_WORKSPACE_FILE} (--fix restores it)`;\n case 'vendor-pin-moved':\n return `[${sev}] ${f.kind}: ${f.moduleId} pins ${f.name}@${f.version}, and the application moved it to ${f.found}; left as the application set it`;\n case 'only-built-missing':\n return `[${sev}] ${f.kind}: ${f.moduleId} → its vendor package ${f.name} runs an install script, and onlyBuiltDependencies in ${PROVIDER_WORKSPACE_FILE} no longer allows it (--fix restores it and rebuilds ${f.name})`;\n case 'only-built-blocked':\n return `[${sev}] ${f.kind}: ${f.moduleId} → its vendor package ${f.name} runs an install script, and ${describeBlockingPolicy(f.policy, f.name)}`;\n }\n}\n\n/** Where the application's own policy stops the script, and what the operator does about it. `--fix` writes nothing here (#2801). */\nfunction describeBlockingPolicy(policy: ApplicationInstallScriptPolicy, name: string): string {\n switch (policy) {\n case ApplicationInstallScriptPolicy.NEVER_BUILT_LIST:\n return `the application's neverBuiltDependencies lists it. Nothing is written: pnpm refuses to install with both an onlyBuiltDependencies and a `\n + `neverBuiltDependencies list. Take ${name} out of neverBuiltDependencies, then run \\`pnpm rebuild -r ${name}\\`.`;\n case ApplicationInstallScriptPolicy.CONFLICTING_LISTS:\n return `the application declares both an onlyBuiltDependencies and a neverBuiltDependencies list, and pnpm refuses to install with both. `\n + `Nothing is written. Keep one list, with ${name} allowed by it, then run \\`pnpm install\\` and \\`pnpm rebuild -r ${name}\\`.`;\n }\n}\n\n/**\n * Write each missing install-script name back into the application's `onlyBuiltDependencies` (#2809), in\n * `pnpm-workspace.yaml` through the pnpm-settings helper (#2808), as the install writes it. Starts from the effective list,\n * so a list an older application keeps in `package.json` is moved, not replaced. Called only for `only-built-missing`,\n * so the list is the one pnpm reads or there is no list anywhere (see `collectOnlyBuiltFindings`). A file the helper\n * cannot read faithfully refuses, with its line, and nothing is written.\n */\nfunction restoreOnlyBuiltDependencies(saasRoot: string, names: readonly string[]): void {\n const current = readApplicationPnpmSettings(saasRoot).onlyBuiltDependencies ?? [];\n writeApplicationPnpmSettings(saasRoot, { onlyBuiltDependencies: [...current, ...names.filter((name) => !current.includes(name))] });\n}\n\n/**\n * Write each missing vendor pin back into the application's overrides (#2789), in `pnpm-workspace.yaml` (#2808). A pin\n * present at another version is never touched: the application set it.\n */\nfunction restoreVendorPins(saasRoot: string, pins: ReadonlyArray<{ name: string; version: string }>): void {\n const overrides: Record<string, string> = { ...(readApplicationPnpmSettings(saasRoot).overrides ?? {}) };\n for (const { name, version } of pins) if (!Object.hasOwn(overrides, name)) overrides[name] = version;\n writeApplicationPnpmSettings(saasRoot, { overrides });\n}\n\nexport default class RegistryRepairLockfileCommand extends BaseCommand {\n readonly meta: CommandMeta = {\n name: 'registry repair-lockfile',\n description: 'Diagnose (and optionally auto-fix) the modules lockfile section.',\n category: CommandCategory.Registry,\n aliases: ['repair-lockfile'],\n flags: {\n fix: {\n type: 'boolean',\n description: 'Re-fetch modules with missing recorded files, restore missing provider vendor pins and install-script allow-list entries (and rebuild those packages). Malformed records, including invalid digests, require manual correction.',\n },\n force: {\n type: 'boolean',\n description: 'With --fix, also overwrite files you changed since install (a backup is kept under .wildo-saas/tmp/registry-backups/).',\n },\n },\n };\n\n async run(ctx: CommandContext): Promise<CommandResult> {\n const saasRoot = requireSaasRoot(ctx, 'repair-lockfile');\n const fixMode = !!ctx.flags.fix;\n\n let report: Awaited<ReturnType<typeof LockfileRepairService.inspect>>;\n try {\n report = await LockfileRepairService.inspect(saasRoot);\n } catch (error) {\n if (!(error instanceof Error) || error.name !== PnpmSettingsFormatError.name) throw error;\n // The application's pnpm settings cannot be read faithfully (#2808): nothing can be compared, nothing is written.\n ctx.log.error(` ${error.message}`);\n return { success: false, message: `${error.message} Nothing was compared and nothing was written.` };\n }\n ctx.log.info(`[repair-lockfile] ${report.lockfilePath}`);\n if (report.findings.length === 0) {\n ctx.log.success(' no findings — lockfile is healthy.');\n return { success: true, message: 'Lockfile healthy.' };\n }\n for (const f of report.findings) {\n ctx.log.info(` ${renderFinding(f)}`);\n }\n\n if (!fixMode) {\n const errs = report.findings.filter((f) => f.severity === 'error').length;\n const warns = report.findings.filter((f) => f.severity === 'warn').length;\n return {\n success: report.ok,\n message: `${errs} error(s), ${warns} warning(s). Use \\`--fix\\` for missing files, provider vendor pins and install-script allow-list entries; `\n + 'restore malformed records from a trusted lockfile revision.',\n };\n }\n\n // ---------- auto-fix path ----------\n // A missing vendor pin needs no download: written back from what the lockfile records (#2789).\n const missingPins = report.findings.flatMap((f) => (f.kind === 'vendor-pin-missing' ? [{ moduleId: f.moduleId, name: f.name, version: f.version }] : []));\n if (missingPins.length > 0) {\n await withRegistryWorkspaceMutationLock(saasRoot, async () => restoreVendorPins(saasRoot, missingPins));\n for (const pin of missingPins) ctx.log.success(` restored ${pin.name}@${pin.version} (${pin.moduleId}) in ${PROVIDER_WORKSPACE_FILE}`);\n ctx.log.info(' run `pnpm install` so the lockfile resolves the restored pins.');\n }\n // A missing install-script name is restored the same way, then its package rebuilt: this command runs no install, and with\n // none pnpm runs an already-installed package's script only on a rebuild (#2801; measured on 10.6.4 and 10.34.9 in\n // #3014, where a later install did not run it again). EVERY restored name is rebuilt: whether pnpm skipped\n // it cannot be read reliably (`.modules.yaml` → `ignoredBuilds` covers only the latest install that changed the graph,\n // measured in #2809's review), and a script run twice costs time where a script never run is a wrong result. No\n // `node_modules` → nothing is installed yet, and the next `pnpm install` runs the script of every allowed package.\n const missingBuilt = report.findings.flatMap((f) => (f.kind === 'only-built-missing' ? [{ moduleId: f.moduleId, name: f.name }] : []));\n const builtNames = [...new Set(missingBuilt.map((entry) => entry.name))];\n let rebuildFailed = false;\n // A refused restore fails the run, and does not stop the rest of the repair: a missing module file has nothing to do\n // with the allow-list (#2809 review R-L1).\n let restoreRefusal: string | undefined;\n if (builtNames.length > 0) {\n try {\n await withRegistryWorkspaceMutationLock(saasRoot, async () => restoreOnlyBuiltDependencies(saasRoot, builtNames));\n } catch (error) {\n restoreRefusal = (error as Error).message;\n ctx.log.error(` ${restoreRefusal}`);\n }\n }\n if (builtNames.length > 0 && restoreRefusal === undefined) {\n for (const name of builtNames) {\n const modules = missingBuilt.filter((entry) => entry.name === name).map((entry) => entry.moduleId);\n ctx.log.success(` allowed ${name}'s install script again (${modules.join(', ')}) in ${PROVIDER_WORKSPACE_FILE}`);\n }\n if (!existsSync(path.join(saasRoot, 'node_modules'))) {\n ctx.log.info(` nothing is installed yet: \\`pnpm install\\` runs ${builtNames.join(', ')}'s install script${builtNames.length === 1 ? '' : 's'}.`);\n } else if (!runPnpmRebuild(ctx.log, builtNames, saasRoot)) {\n ctx.log.warn(` ${builtNames.join(', ')} ${builtNames.length === 1 ? 'is' : 'are'} allowed again and did not run ${builtNames.length === 1 ? 'its install script' : 'their install scripts'}. Run \\`pnpm rebuild -r ${builtNames.join(' ')}\\` in ${saasRoot}.`);\n rebuildFailed = true;\n }\n }\n const rebuildNote = (rebuildFailed ? ' The rebuild of the allowed packages failed; see above.' : '')\n + (restoreRefusal === undefined ? '' : ` The install-script allow-list could not be restored: ${restoreRefusal}`);\n const allowListFailed = rebuildFailed || restoreRefusal !== undefined;\n const fixable = report.findings.filter(\n (f) => f.kind === 'module-file-missing',\n );\n if (fixable.length === 0) {\n const restored = [\n ...(missingPins.length > 0 ? [`${missingPins.length} vendor pin(s)`] : []),\n ...(builtNames.length > 0 && restoreRefusal === undefined ? [`${builtNames.length} install-script allow-list entr${builtNames.length === 1 ? 'y' : 'ies'}`] : []),\n ];\n return {\n success: report.ok && !allowListFailed,\n message: (restored.length > 0\n ? `Restored ${restored.join(' and ')}; no module file was missing.`\n : 'No auto-fixable findings (envelope/section errors require manual repair).') + rebuildNote,\n };\n }\n\n let fixed = 0;\n let failed = 0;\n /** A repaired provider that ships skills (#2026): its restored skill files reach `.claude/skills/` only through the sync. */\n let restoredProviderSkills = false;\n\n // The entries are read UNDER the lock: another registry command may have changed them since\n // the inspection above, and a repair must restore what the lockfile records now. Holding the lock\n // across each entry's download is accepted here (repair is a rare, operator-run recovery), unlike\n // add/update, which download before taking it.\n await withRegistryWorkspaceMutationLock(saasRoot, async () => {\n const section = await RegistryLockfileService.read(saasRoot);\n for (const f of fixable) {\n if (f.kind !== 'module-file-missing') continue;\n const entry = section.installed[f.moduleId];\n if (!entry) {\n ctx.log.warn(` skip ${f.moduleId} — no lockfile entry.`);\n continue;\n }\n try {\n await this.repairEntry(ctx, saasRoot, entry);\n ctx.log.success(` repaired ${f.moduleId}@${entry.version}`);\n if ((entry.files ?? []).some((file) => /^providers\\/[^/]+\\/skills\\//.test(file))) restoredProviderSkills = true;\n fixed += 1;\n } catch (err) {\n ctx.log.error(` ${f.moduleId} → ${(err as Error).message}`);\n failed += 1;\n }\n }\n });\n if (restoredProviderSkills) syncSkillsAfterProviderChange(ctx, saasRoot, 'the repaired providers');\n\n return {\n success: failed === 0 && !allowListFailed,\n message: `Repaired ${fixed} entry/entries; ${failed} failure(s).${rebuildNote}`,\n };\n }\n\n private async repairEntry(\n ctx: CommandContext,\n saasRoot: string,\n entry: RegistryModulesLockEntry,\n ): Promise<void> {\n const acquisition = await this.acquireRecordedVersion(ctx, saasRoot, entry);\n\n const paths = moduleArtifactPaths(saasRoot, entry.domain, entry.moduleId, acquisition.version);\n await stageModuleAcquisition(acquisition, paths, saasRoot);\n\n const stagedManifest = await readStagedManifest(paths.extractDir);\n assertStagedManifestMatchesRequest(stagedManifest, { moduleId: entry.moduleId, version: acquisition.version });\n for (const notice of await checkModuleRequirements(saasRoot, stagedManifest, moduleRequirementsOriginOf(acquisition))) ctx.log.warn(notice);\n // Repair restores what is MISSING (that is what it is for) and keeps what you changed (#2016):\n // it used to re-apply every file and silently replace local edits.\n const writePlan = await planProtectedWrite({\n saasRoot,\n moduleId: entry.moduleId,\n stagedPaths: await validatedStagedAppFiles({ saasRoot, extractDir: paths.extractDir, manifest: stagedManifest }),\n recorded: entry,\n force: ctx.flags.force === true,\n restoreMissing: true,\n backupDirectory: registryForceBackupDirectory(saasRoot, entry.moduleId),\n findOtherOwners: (candidates) => RegistryLockfileService.findFileOwners({ saasRoot, paths: candidates, excludeModuleId: entry.moduleId }),\n });\n for (const kept of writePlan.kept) ctx.log.warn(` ${describeProtectedFile(kept.path, kept.state, 'restored')}`);\n for (const forced of writePlan.forced) ctx.log.warn(` overwrote ${forced.path} (--force); your version is at ${forced.backup}`);\n // Surface placement overlaps just as add/update do.\n const fanOut = await fanOutToSaasSource({\n saasRoot,\n extractDir: paths.extractDir,\n manifest: stagedManifest,\n moduleId: entry.moduleId,\n skipPaths: writePlan.skip,\n });\n\n for (const warning of fanOut.overlapWarnings) {\n ctx.log.warn(` [overlap] \"${warning.path}\" was also claimed by \"${warning.otherModuleId}\" — overwritten by ${entry.moduleId}.`);\n }\n\n // Refresh the lockfile entry's file list. For a registry entry the provenance is the pin, unchanged\n // (verified in `acquireRecordedVersion`). For a checkout entry it is re-recorded: the bytes now come\n // from the checkout as it stands, and the entry must say which commit that is.\n // Preserves `installedAt` so the audit trail keeps the original install timestamp and source\n // field. A same-version source reapplication that keeps local edits (#2016).\n await RegistryLockfileService.upsertEntry(saasRoot, {\n ...entry,\n ...lockEntryProvenance(acquisition),\n files: fanOut.ownedFiles,\n installedFileHashes: await nextInstalledFileHashes({ saasRoot, ownedFiles: fanOut.ownedFiles, skipped: writePlan.skip, previous: entry }),\n });\n ctx.log.info(` restored ${describeAcquisition(entry.moduleId, acquisition)}`);\n }\n\n /**\n * The version the entry RECORDS, from where it was recorded: the pinned artifact from its registry, or\n * the checkout. Never a different version: a repair restores the recorded state.\n */\n private async acquireRecordedVersion(\n ctx: CommandContext,\n saasRoot: string,\n entry: RegistryModulesLockEntry,\n ): Promise<ModuleAcquisition> {\n if (entry.distribution === ModuleDistribution.LOCAL_CHECKOUT) {\n const frameworkRoot = ctx.cliContext.resolvedHomes.framework.repositoryRoot;\n if (!frameworkRoot) {\n throw new Error('it was installed from the framework checkout, and this command is not running inside one. Nothing was repaired.');\n }\n const recorded = localCheckoutProvenanceOf(entry);\n const local = await resolveLocalCheckoutModule({ frameworkRoot, domain: entry.domain, moduleId: entry.moduleId, range: 'latest' });\n if (local.version !== entry.version) {\n throw new Error(\n `the checkout now holds ${local.version}, not the recorded ${entry.version}; a repair restores the recorded version. `\n + `Use \\`wildo registry update ${entry.moduleId}\\` to move to ${local.version}.`,\n );\n }\n if (local.checkoutCommit !== recorded.checkoutCommit) {\n ctx.log.warn(` ${entry.moduleId}: restoring from checkout ${local.checkoutCommit.slice(0, 12)}; it was installed from ${recorded.checkoutCommit.slice(0, 12)}.`);\n }\n return { distribution: ModuleDistribution.LOCAL_CHECKOUT, version: local.version, local };\n }\n\n const { registryId, artifactDigest: pinnedDigest } = registryProvenanceOf(entry);\n const { url: registryUrl } = await resolveLockedRegistry(ctx, saasRoot, entry);\n const credential = await RegistryCredentialsService.get(registryUrl);\n const clientOptions = { baseUrl: registryUrl, authToken: credential?.rawToken };\n\n // Resolve against the recorded exact version so the registry hands\n // us back the same artifact the lockfile expects.\n const { version, artifactDigest, yanked } = await RegistryServerClient.resolve(clientOptions, {\n domain: entry.domain,\n moduleId: entry.moduleId,\n range: entry.version,\n });\n if (yanked) {\n // Only an exact pin reaches a yanked release (#1758); install it, but say so.\n ctx.log.warn(` ${entry.moduleId}@${version} is YANKED (${yanked.yankedAt}${yanked.reason ? `: ${yanked.reason}` : ''}). Installing the pinned release; pick a live one with a range.`);\n }\n if (version !== entry.version) {\n throw new Error(\n `Registry returned version ${version} for an exact-version request of ${entry.version}; refusing to overwrite the lockfile entry.`,\n );\n }\n // Repair restores what the lockfile PINS. It used to download against the server's current\n // digest and write that over the pin — so a registry that swapped a version's bytes had them\n // installed and re-pinned by the very command meant to restore the recorded state.\n assertServedDigestMatchesPin({\n moduleId: entry.moduleId,\n version,\n pinnedDigest,\n servedDigest: artifactDigest,\n });\n\n const { bytes } = await RegistryServerClient.download(clientOptions, {\n domain: entry.domain,\n moduleId: entry.moduleId,\n version,\n expectedDigest: pinnedDigest,\n });\n if (credential) await RegistryCredentialsService.touch(registryUrl);\n return {\n distribution: ModuleDistribution.REGISTRY,\n version,\n artifactDigest: pinnedDigest,\n bytes,\n registry: { url: registryUrl, id: registryId },\n };\n }\n}\n"]}
1
+ {"version":3,"file":"repair-lockfile.command.js","sourceRoot":"","sources":["../../../../src/commands/registry/repair-lockfile.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,uBAAuB,EAAE,MAAM,0DAA0D,CAAC;AACnG,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,EACL,8BAA8B,EAC9B,qBAAqB,EACrB,uBAAuB,EACvB,oBAAoB,GAErB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACvB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O;YACP,YAAY;YACZ,YAAY,EAAE,cAAc;SAC7B,CAAC,CAAC;QAEH,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,oBAAoB,CAAC,QAAQ,CAAC,aAAa,EAAE;YACnE,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,QAAQ,EAAE,KAAK,CAAC,QAAQ;YACxB,OAAO;YACP,cAAc,EAAE,YAAY;SAC7B,CAAC,CAAC;QACH,IAAI,UAAU;YAAE,MAAM,0BAA0B,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;QACpE,OAAO;YACL,YAAY,EAAE,kBAAkB,CAAC,QAAQ;YACzC,OAAO;YACP,cAAc,EAAE,YAAY;YAC5B,KAAK;YACL,QAAQ,EAAE,EAAE,GAAG,EAAE,WAAW,EAAE,EAAE,EAAE,UAAU,EAAE;SAC/C,CAAC;IACJ,CAAC;CACF","sourcesContent":["/**\n * `wildo registry repair-lockfile` — diagnose + (optionally) auto-fix\n * the `sections.modules` lockfile state.\n *\n * Read mode (default): runs `LockfileRepairService.inspect(saasRoot)`, which reads the application's effective pnpm\n * settings through the shared pnpm-settings helper (#2808), and renders every finding. Exit 0 when no `severity: 'error'`\n * findings; exit 1 otherwise.\n *\n * `--fix`: attempts auto-repair for the fixable finding kinds:\n * - `module-file-missing` → re-fetch the artifact via the recorded\n * registry URL + lockfile entry. Calls `RegistryServerClient.resolve`\n * against the stored exact version, REFUSES when the registry now\n * serves a different digest than the lockfile pins, downloads against\n * the PINNED digest, and re-extracts into the staging dir + re-fans-out\n * onto the SaaS source. The pin is never rewritten.\n * - `vendor-pin-missing` → write the recorded pin back into the overrides in\n * `pnpm-workspace.yaml` (#2789, #2808).\n * - `only-built-missing` → write the recorded install-script name back into\n * `onlyBuiltDependencies` in `pnpm-workspace.yaml`, then `pnpm rebuild -r` every\n * restored name (#2809): adding a name runs nothing for a package already installed.\n * `only-built-blocked` (a `neverBuiltDependencies` list names the package, or the\n * application declares both kinds of list, which pnpm refuses) is reported and\n * never written, as the install refuses it (#2801).\n * Both writes go through the pnpm-settings helper, which moves a copy an older\n * application keeps in `package.json` → `pnpm` into the workspace file (pnpm 10\n * would read that copy instead, and pnpm 11 reads none).\n *\n * `envelope-malformed` / `modules-section-malformed` are NOT\n * auto-fixable — those require manual correction. Repair can replace\n * local module source files and does not back up operator edits.\n */\n\nimport { existsSync } from 'node:fs';\nimport * as path from 'node:path';\nimport { checkModuleRequirements } from '~wildo-cli/services/registry/module-requirements.service';\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 {\n ApplicationInstallScriptPolicy,\n LockfileRepairService,\n RegistryLockfileService,\n RegistryServerClient,\n type LockfileRepairFinding,\n} from '@wildo-ai/wildo-module-client';\nimport {\n PROVIDER_WORKSPACE_FILE,\n PnpmSettingsFormatError,\n readApplicationPnpmSettings,\n writeApplicationPnpmSettings,\n localCheckoutProvenanceOf,\n ModuleDistribution,\n registryProvenanceOf,\n type RegistryModulesLockEntry,\n} from '@wildo-ai/platform-config-lib';\nimport { RegistryCredentialsService } from '~wildo-cli/services/registry/registry-credentials.service';\nimport { requireSaasRoot, resolveLockedRegistry, withRegistryWorkspaceMutationLock } from '~wildo-cli/services/registry/registry-command.utils';\nimport { fanOutToSaasSource, readStagedManifest, validatedStagedAppFiles } from '~wildo-cli/services/registry/boundary-fanout.utils';\nimport {\n describeProtectedFile,\n nextInstalledFileHashes,\n planProtectedWrite,\n registryForceBackupDirectory,\n} from '~wildo-cli/services/registry/installed-file-state.utils';\nimport { moduleArtifactPaths } from '~wildo-cli/services/registry/module-artifact-files.utils';\nimport { syncSkillsAfterProviderChange } from '~wildo-cli/services/registry/provider-install-step';\nimport { runPnpmRebuild } from '~wildo-cli/services/framework/package-install.service';\nimport { resolveLocalCheckoutModule } from '~wildo-cli/services/registry/local-checkout-module-source.service';\nimport {\n describeAcquisition,\n lockEntryProvenance,\n moduleRequirementsOriginOf,\n stageModuleAcquisition,\n type ModuleAcquisition,\n} from '~wildo-cli/services/registry/module-acquisition.utils';\nimport {\n assertServedDigestMatchesPin,\n assertStagedManifestMatchesRequest,\n} from '~wildo-cli/services/registry/artifact-trust.utils';\n\n\n\nfunction renderFinding(f: LockfileRepairFinding): string {\n const sev = f.severity.toUpperCase();\n switch (f.kind) {\n case 'envelope-malformed':\n case 'modules-section-malformed':\n return `[${sev}] ${f.kind}: ${f.message}${f.detail ? ` — ${f.detail}` : ''}`;\n case 'module-file-missing':\n return `[${sev}] ${f.kind}: ${f.moduleId} → missing file ${f.filePath}`;\n case 'vendor-pin-missing':\n return `[${sev}] ${f.kind}: ${f.moduleId} → its vendor pin ${f.name}@${f.version} is gone from the overrides in ${PROVIDER_WORKSPACE_FILE} (--fix restores it)`;\n case 'vendor-pin-moved':\n return `[${sev}] ${f.kind}: ${f.moduleId} pins ${f.name}@${f.version}, and the application moved it to ${f.found}; left as the application set it`;\n case 'only-built-missing':\n return `[${sev}] ${f.kind}: ${f.moduleId} → its vendor package ${f.name} runs an install script, and onlyBuiltDependencies in ${PROVIDER_WORKSPACE_FILE} no longer allows it (--fix restores it and rebuilds ${f.name})`;\n case 'only-built-blocked':\n return `[${sev}] ${f.kind}: ${f.moduleId} → its vendor package ${f.name} runs an install script, and ${describeBlockingPolicy(f.policy, f.name)}`;\n }\n}\n\n/** Where the application's own policy stops the script, and what the operator does about it. `--fix` writes nothing here (#2801). */\nfunction describeBlockingPolicy(policy: ApplicationInstallScriptPolicy, name: string): string {\n switch (policy) {\n case ApplicationInstallScriptPolicy.NEVER_BUILT_LIST:\n return `the application's neverBuiltDependencies lists it. Nothing is written: pnpm refuses to install with both an onlyBuiltDependencies and a `\n + `neverBuiltDependencies list. Take ${name} out of neverBuiltDependencies, then run \\`pnpm rebuild -r ${name}\\`.`;\n case ApplicationInstallScriptPolicy.CONFLICTING_LISTS:\n return `the application declares both an onlyBuiltDependencies and a neverBuiltDependencies list, and pnpm refuses to install with both. `\n + `Nothing is written. Keep one list, with ${name} allowed by it, then run \\`pnpm install\\` and \\`pnpm rebuild -r ${name}\\`.`;\n }\n}\n\n/**\n * Write each missing install-script name back into the application's `onlyBuiltDependencies` (#2809), in\n * `pnpm-workspace.yaml` through the pnpm-settings helper (#2808), as the install writes it. Starts from the effective list,\n * so a list an older application keeps in `package.json` is moved, not replaced. Called only for `only-built-missing`,\n * so the list is the one pnpm reads or there is no list anywhere (see `collectOnlyBuiltFindings`). A file the helper\n * cannot read faithfully refuses, with its line, and nothing is written.\n */\nfunction restoreOnlyBuiltDependencies(saasRoot: string, names: readonly string[]): void {\n const current = readApplicationPnpmSettings(saasRoot).onlyBuiltDependencies ?? [];\n writeApplicationPnpmSettings(saasRoot, { onlyBuiltDependencies: [...current, ...names.filter((name) => !current.includes(name))] });\n}\n\n/**\n * Write each missing vendor pin back into the application's overrides (#2789), in `pnpm-workspace.yaml` (#2808). A pin\n * present at another version is never touched: the application set it.\n */\nfunction restoreVendorPins(saasRoot: string, pins: ReadonlyArray<{ name: string; version: string }>): void {\n const overrides: Record<string, string> = { ...(readApplicationPnpmSettings(saasRoot).overrides ?? {}) };\n for (const { name, version } of pins) if (!Object.hasOwn(overrides, name)) overrides[name] = version;\n writeApplicationPnpmSettings(saasRoot, { overrides });\n}\n\nexport default class RegistryRepairLockfileCommand extends BaseCommand {\n readonly meta: CommandMeta = {\n name: 'registry repair-lockfile',\n description: 'Diagnose (and optionally auto-fix) the modules lockfile section.',\n category: CommandCategory.Registry,\n aliases: ['repair-lockfile'],\n flags: {\n fix: {\n type: 'boolean',\n description: 'Re-fetch modules with missing recorded files, restore missing provider vendor pins and install-script allow-list entries (and rebuild those packages). Malformed records, including invalid digests, require manual correction.',\n },\n force: {\n type: 'boolean',\n description: 'With --fix, also overwrite files you changed since install (a backup is kept under .wildo-saas/tmp/registry-backups/).',\n },\n },\n };\n\n async run(ctx: CommandContext): Promise<CommandResult> {\n const saasRoot = requireSaasRoot(ctx, 'repair-lockfile');\n const fixMode = !!ctx.flags.fix;\n\n let report: Awaited<ReturnType<typeof LockfileRepairService.inspect>>;\n try {\n report = await LockfileRepairService.inspect(saasRoot);\n } catch (error) {\n if (!(error instanceof Error) || error.name !== PnpmSettingsFormatError.name) throw error;\n // The application's pnpm settings cannot be read faithfully (#2808): nothing can be compared, nothing is written.\n ctx.log.error(` ${error.message}`);\n return { success: false, message: `${error.message} Nothing was compared and nothing was written.` };\n }\n ctx.log.info(`[repair-lockfile] ${report.lockfilePath}`);\n if (report.findings.length === 0) {\n ctx.log.success(' no findings — lockfile is healthy.');\n return { success: true, message: 'Lockfile healthy.' };\n }\n for (const f of report.findings) {\n ctx.log.info(` ${renderFinding(f)}`);\n }\n\n if (!fixMode) {\n const errs = report.findings.filter((f) => f.severity === 'error').length;\n const warns = report.findings.filter((f) => f.severity === 'warn').length;\n return {\n success: report.ok,\n message: `${errs} error(s), ${warns} warning(s). Use \\`--fix\\` for missing files, provider vendor pins and install-script allow-list entries; `\n + 'restore malformed records from a trusted lockfile revision.',\n };\n }\n\n // ---------- auto-fix path ----------\n // A missing vendor pin needs no download: written back from what the lockfile records (#2789).\n const missingPins = report.findings.flatMap((f) => (f.kind === 'vendor-pin-missing' ? [{ moduleId: f.moduleId, name: f.name, version: f.version }] : []));\n if (missingPins.length > 0) {\n await withRegistryWorkspaceMutationLock(saasRoot, async () => restoreVendorPins(saasRoot, missingPins));\n for (const pin of missingPins) ctx.log.success(` restored ${pin.name}@${pin.version} (${pin.moduleId}) in ${PROVIDER_WORKSPACE_FILE}`);\n ctx.log.info(' run `pnpm install` so the lockfile resolves the restored pins.');\n }\n // A missing install-script name is restored the same way, then its package rebuilt: this command runs no install, and with\n // none pnpm runs an already-installed package's script only on a rebuild (#2801; measured on 10.6.4 and 10.34.9 in\n // #3014, where a later install did not run it again). EVERY restored name is rebuilt: whether pnpm skipped\n // it cannot be read reliably (`.modules.yaml` → `ignoredBuilds` covers only the latest install that changed the graph,\n // measured in #2809's review), and a script run twice costs time where a script never run is a wrong result. No\n // `node_modules` → nothing is installed yet, and the next `pnpm install` runs the script of every allowed package.\n const missingBuilt = report.findings.flatMap((f) => (f.kind === 'only-built-missing' ? [{ moduleId: f.moduleId, name: f.name }] : []));\n const builtNames = [...new Set(missingBuilt.map((entry) => entry.name))];\n let rebuildFailed = false;\n // A refused restore fails the run, and does not stop the rest of the repair: a missing module file has nothing to do\n // with the allow-list (#2809 review R-L1).\n let restoreRefusal: string | undefined;\n if (builtNames.length > 0) {\n try {\n await withRegistryWorkspaceMutationLock(saasRoot, async () => restoreOnlyBuiltDependencies(saasRoot, builtNames));\n } catch (error) {\n restoreRefusal = (error as Error).message;\n ctx.log.error(` ${restoreRefusal}`);\n }\n }\n if (builtNames.length > 0 && restoreRefusal === undefined) {\n for (const name of builtNames) {\n const modules = missingBuilt.filter((entry) => entry.name === name).map((entry) => entry.moduleId);\n ctx.log.success(` allowed ${name}'s install script again (${modules.join(', ')}) in ${PROVIDER_WORKSPACE_FILE}`);\n }\n if (!existsSync(path.join(saasRoot, 'node_modules'))) {\n ctx.log.info(` nothing is installed yet: \\`pnpm install\\` runs ${builtNames.join(', ')}'s install script${builtNames.length === 1 ? '' : 's'}.`);\n } else if (!runPnpmRebuild(ctx.log, builtNames, saasRoot)) {\n ctx.log.warn(` ${builtNames.join(', ')} ${builtNames.length === 1 ? 'is' : 'are'} allowed again and did not run ${builtNames.length === 1 ? 'its install script' : 'their install scripts'}. Run \\`pnpm rebuild -r ${builtNames.join(' ')}\\` in ${saasRoot}.`);\n rebuildFailed = true;\n }\n }\n const rebuildNote = (rebuildFailed ? ' The rebuild of the allowed packages failed; see above.' : '')\n + (restoreRefusal === undefined ? '' : ` The install-script allow-list could not be restored: ${restoreRefusal}`);\n const allowListFailed = rebuildFailed || restoreRefusal !== undefined;\n const fixable = report.findings.filter(\n (f) => f.kind === 'module-file-missing',\n );\n if (fixable.length === 0) {\n const restored = [\n ...(missingPins.length > 0 ? [`${missingPins.length} vendor pin(s)`] : []),\n ...(builtNames.length > 0 && restoreRefusal === undefined ? [`${builtNames.length} install-script allow-list entr${builtNames.length === 1 ? 'y' : 'ies'}`] : []),\n ];\n return {\n success: report.ok && !allowListFailed,\n message: (restored.length > 0\n ? `Restored ${restored.join(' and ')}; no module file was missing.`\n : 'No auto-fixable findings (envelope/section errors require manual repair).') + rebuildNote,\n };\n }\n\n let fixed = 0;\n let failed = 0;\n /** A repaired provider that ships skills (#2026): its restored skill files reach `.claude/skills/` only through the sync. */\n let restoredProviderSkills = false;\n\n // The entries are read UNDER the lock: another registry command may have changed them since\n // the inspection above, and a repair must restore what the lockfile records now. Holding the lock\n // across each entry's download is accepted here (repair is a rare, operator-run recovery), unlike\n // add/update, which download before taking it.\n await withRegistryWorkspaceMutationLock(saasRoot, async () => {\n const section = await RegistryLockfileService.read(saasRoot);\n for (const f of fixable) {\n if (f.kind !== 'module-file-missing') continue;\n const entry = section.installed[f.moduleId];\n if (!entry) {\n ctx.log.warn(` skip ${f.moduleId} — no lockfile entry.`);\n continue;\n }\n try {\n await this.repairEntry(ctx, saasRoot, entry);\n ctx.log.success(` repaired ${f.moduleId}@${entry.version}`);\n if ((entry.files ?? []).some((file) => /^providers\\/[^/]+\\/skills\\//.test(file))) restoredProviderSkills = true;\n fixed += 1;\n } catch (err) {\n ctx.log.error(` ${f.moduleId} → ${(err as Error).message}`);\n failed += 1;\n }\n }\n });\n if (restoredProviderSkills) syncSkillsAfterProviderChange(ctx, saasRoot, 'the repaired providers');\n\n return {\n success: failed === 0 && !allowListFailed,\n message: `Repaired ${fixed} entry/entries; ${failed} failure(s).${rebuildNote}`,\n };\n }\n\n private async repairEntry(\n ctx: CommandContext,\n saasRoot: string,\n entry: RegistryModulesLockEntry,\n ): Promise<void> {\n const acquisition = await this.acquireRecordedVersion(ctx, saasRoot, entry);\n\n const paths = moduleArtifactPaths(saasRoot, entry.domain, entry.moduleId, acquisition.version);\n await stageModuleAcquisition(acquisition, paths, saasRoot);\n\n const stagedManifest = await readStagedManifest(paths.extractDir);\n assertStagedManifestMatchesRequest(stagedManifest, { moduleId: entry.moduleId, version: acquisition.version });\n for (const notice of await checkModuleRequirements(saasRoot, stagedManifest, moduleRequirementsOriginOf(acquisition))) ctx.log.warn(notice);\n // Repair restores what is MISSING (that is what it is for) and keeps what you changed (#2016):\n // it used to re-apply every file and silently replace local edits.\n const writePlan = await planProtectedWrite({\n saasRoot,\n extractDir: paths.extractDir,\n moduleId: entry.moduleId,\n stagedPaths: await validatedStagedAppFiles({ saasRoot, extractDir: paths.extractDir, manifest: stagedManifest }),\n recorded: entry,\n force: ctx.flags.force === true,\n restoreMissing: true,\n backupDirectory: registryForceBackupDirectory(saasRoot, entry.moduleId),\n findOtherOwners: (candidates) => RegistryLockfileService.findFileOwners({ saasRoot, paths: candidates, excludeModuleId: entry.moduleId }),\n });\n for (const kept of writePlan.kept) ctx.log.warn(` ${describeProtectedFile(kept.path, kept.state, 'restored')}`);\n for (const forced of writePlan.forced) ctx.log.warn(` overwrote ${forced.path} (--force); your version is at ${forced.backup}`);\n // Surface placement overlaps just as add/update do.\n const fanOut = await fanOutToSaasSource({\n saasRoot,\n extractDir: paths.extractDir,\n manifest: stagedManifest,\n moduleId: entry.moduleId,\n skipPaths: writePlan.skip,\n });\n\n for (const warning of fanOut.overlapWarnings) {\n ctx.log.warn(` [overlap] \"${warning.path}\" was also claimed by \"${warning.otherModuleId}\" — overwritten by ${entry.moduleId}.`);\n }\n\n // Refresh the lockfile entry's file list. For a registry entry the provenance is the pin, unchanged\n // (verified in `acquireRecordedVersion`). For a checkout entry it is re-recorded: the bytes now come\n // from the checkout as it stands, and the entry must say which commit that is.\n // Preserves `installedAt` so the audit trail keeps the original install timestamp and source\n // field. A same-version source reapplication that keeps local edits (#2016).\n await RegistryLockfileService.upsertEntry(saasRoot, {\n ...entry,\n ...lockEntryProvenance(acquisition),\n files: fanOut.ownedFiles,\n installedFileHashes: await nextInstalledFileHashes({ saasRoot, ownedFiles: fanOut.ownedFiles, skipped: writePlan.skip, previous: entry }),\n });\n ctx.log.info(` restored ${describeAcquisition(entry.moduleId, acquisition)}`);\n }\n\n /**\n * The version the entry RECORDS, from where it was recorded: the pinned artifact from its registry, or\n * the checkout. Never a different version: a repair restores the recorded state.\n */\n private async acquireRecordedVersion(\n ctx: CommandContext,\n saasRoot: string,\n entry: RegistryModulesLockEntry,\n ): Promise<ModuleAcquisition> {\n if (entry.distribution === ModuleDistribution.LOCAL_CHECKOUT) {\n const frameworkRoot = ctx.cliContext.resolvedHomes.framework.repositoryRoot;\n if (!frameworkRoot) {\n throw new Error('it was installed from the framework checkout, and this command is not running inside one. Nothing was repaired.');\n }\n const recorded = localCheckoutProvenanceOf(entry);\n const local = await resolveLocalCheckoutModule({ frameworkRoot, domain: entry.domain, moduleId: entry.moduleId, range: 'latest' });\n if (local.version !== entry.version) {\n throw new Error(\n `the checkout now holds ${local.version}, not the recorded ${entry.version}; a repair restores the recorded version. `\n + `Use \\`wildo registry update ${entry.moduleId}\\` to move to ${local.version}.`,\n );\n }\n if (local.checkoutCommit !== recorded.checkoutCommit) {\n ctx.log.warn(` ${entry.moduleId}: restoring from checkout ${local.checkoutCommit.slice(0, 12)}; it was installed from ${recorded.checkoutCommit.slice(0, 12)}.`);\n }\n return { distribution: ModuleDistribution.LOCAL_CHECKOUT, version: local.version, local };\n }\n\n const { registryId, artifactDigest: pinnedDigest } = registryProvenanceOf(entry);\n const { url: registryUrl } = await resolveLockedRegistry(ctx, saasRoot, entry);\n const credential = await RegistryCredentialsService.get(registryUrl);\n const clientOptions = { baseUrl: registryUrl, authToken: credential?.rawToken };\n\n // Resolve against the recorded exact version so the registry hands\n // us back the same artifact the lockfile expects.\n const { version, artifactDigest, yanked } = await RegistryServerClient.resolve(clientOptions, {\n domain: entry.domain,\n moduleId: entry.moduleId,\n range: entry.version,\n });\n if (yanked) {\n // Only an exact pin reaches a yanked release (#1758); install it, but say so.\n ctx.log.warn(` ${entry.moduleId}@${version} is YANKED (${yanked.yankedAt}${yanked.reason ? `: ${yanked.reason}` : ''}). Installing the pinned release; pick a live one with a range.`);\n }\n if (version !== entry.version) {\n throw new Error(\n `Registry returned version ${version} for an exact-version request of ${entry.version}; refusing to overwrite the lockfile entry.`,\n );\n }\n // Repair restores what the lockfile PINS. It used to download against the server's current\n // digest and write that over the pin — so a registry that swapped a version's bytes had them\n // installed and re-pinned by the very command meant to restore the recorded state.\n assertServedDigestMatchesPin({\n moduleId: entry.moduleId,\n version,\n pinnedDigest,\n servedDigest: artifactDigest,\n });\n\n const { bytes } = await RegistryServerClient.download(clientOptions, {\n domain: entry.domain,\n moduleId: entry.moduleId,\n version,\n expectedDigest: pinnedDigest,\n });\n if (credential) await RegistryCredentialsService.touch(registryUrl);\n return {\n distribution: ModuleDistribution.REGISTRY,\n version,\n artifactDigest: pinnedDigest,\n bytes,\n registry: { url: registryUrl, id: registryId },\n };\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"update.command.d.ts","sourceRoot":"","sources":["../../../../src/commands/registry/update.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAKH,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7D,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AA6F1F,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,WAAW;IAC5D,QAAQ,CAAC,IAAI,EAAE,WAAW,CAsBxB;IAEI,GAAG,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;CAwXvD"}
1
+ {"version":3,"file":"update.command.d.ts","sourceRoot":"","sources":["../../../../src/commands/registry/update.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAKH,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7D,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AA6F1F,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,WAAW;IAC5D,QAAQ,CAAC,IAAI,EAAE,WAAW,CAsBxB;IAEI,GAAG,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;CAyXvD"}
@@ -221,6 +221,7 @@ export default class RegistryUpdateCommand extends BaseCommand {
221
221
  const forceBackupDirectory = registryForceBackupDirectory(saasRoot, parsed.moduleId);
222
222
  const writePlan = await planProtectedWrite({
223
223
  saasRoot,
224
+ extractDir: paths.extractDir,
224
225
  moduleId: parsed.moduleId,
225
226
  stagedPaths: await validatedStagedAppFiles({ saasRoot, extractDir: paths.extractDir, manifest: stagedManifest }),
226
227
  recorded: existing,