@mesh-tech/mesh-cli 0.20.2 → 0.20.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (436) hide show
  1. package/dist/bin/mesh.d.ts +0 -12
  2. package/dist/bin/mesh.js +15 -13
  3. package/dist/bin/mesh.js.map +1 -2
  4. package/dist/build-info.json +2 -2
  5. package/dist/src/commands/agent-api-client.d.ts +0 -70
  6. package/dist/src/commands/agent-api-client.js +0 -80
  7. package/dist/src/commands/app-check.d.ts +0 -56
  8. package/dist/src/commands/app-check.js +0 -72
  9. package/dist/src/commands/artifacts.d.ts +0 -11
  10. package/dist/src/commands/artifacts.js +0 -33
  11. package/dist/src/commands/cluster.d.ts +0 -39
  12. package/dist/src/commands/cluster.js +0 -73
  13. package/dist/src/commands/conversations.d.ts +0 -36
  14. package/dist/src/commands/conversations.js +0 -59
  15. package/dist/src/commands/create-app.d.ts +0 -98
  16. package/dist/src/commands/create-app.js +1 -163
  17. package/dist/src/commands/db/connect.d.ts +0 -7
  18. package/dist/src/commands/db/connect.js +0 -9
  19. package/dist/src/commands/db/credentials.d.ts +0 -7
  20. package/dist/src/commands/db/credentials.js +0 -10
  21. package/dist/src/commands/db/env.d.ts +0 -6
  22. package/dist/src/commands/db/env.js +0 -14
  23. package/dist/src/commands/db/exec.d.ts +0 -43
  24. package/dist/src/commands/db/exec.js +0 -69
  25. package/dist/src/commands/db/index.d.ts +0 -10
  26. package/dist/src/commands/db/index.js +0 -10
  27. package/dist/src/commands/db/psql.d.ts +0 -7
  28. package/dist/src/commands/db/psql.js +0 -18
  29. package/dist/src/commands/deploy.d.ts +0 -38
  30. package/dist/src/commands/deploy.js +1 -76
  31. package/dist/src/commands/dev-doctor.d.ts +0 -82
  32. package/dist/src/commands/dev-doctor.js +3 -132
  33. package/dist/src/commands/dev-launch.d.ts +0 -52
  34. package/dist/src/commands/dev-launch.js +0 -56
  35. package/dist/src/commands/dev-token-server.d.ts +0 -18
  36. package/dist/src/commands/dev-token-server.js +1 -24
  37. package/dist/src/commands/dev.d.ts +0 -246
  38. package/dist/src/commands/dev.js +5 -963
  39. package/dist/src/commands/docs.d.ts +0 -1
  40. package/dist/src/commands/docs.js +0 -12
  41. package/dist/src/commands/hub/index.d.ts +0 -60
  42. package/dist/src/commands/hub/index.js +2 -139
  43. package/dist/src/commands/init/wizard.d.ts +0 -128
  44. package/dist/src/commands/init/wizard.js +0 -109
  45. package/dist/src/commands/init.d.ts +0 -55
  46. package/dist/src/commands/init.js +0 -70
  47. package/dist/src/commands/install-shim.d.ts +0 -23
  48. package/dist/src/commands/install-shim.js +2 -29
  49. package/dist/src/commands/local/auth-provision.d.ts +0 -80
  50. package/dist/src/commands/local/auth-provision.js +0 -109
  51. package/dist/src/commands/local/dev-local.d.ts +0 -91
  52. package/dist/src/commands/local/dev-local.js +0 -147
  53. package/dist/src/commands/local/docker-runner.d.ts +0 -22
  54. package/dist/src/commands/local/docker-runner.js +2 -35
  55. package/dist/src/commands/local/helpers.d.ts +0 -14
  56. package/dist/src/commands/local/helpers.js +0 -13
  57. package/dist/src/commands/local/hub-local.d.ts +0 -96
  58. package/dist/src/commands/local/hub-local.js +0 -111
  59. package/dist/src/commands/local/index.d.ts +0 -14
  60. package/dist/src/commands/local/index.js +0 -86
  61. package/dist/src/commands/local/mocks.d.ts +0 -269
  62. package/dist/src/commands/local/mocks.js +1 -274
  63. package/dist/src/commands/local/seed-hub-catalog.d.ts +0 -25
  64. package/dist/src/commands/local/seed-hub-catalog.js +0 -41
  65. package/dist/src/commands/local/seed-zitadel.d.ts +0 -82
  66. package/dist/src/commands/local/seed-zitadel.js +0 -158
  67. package/dist/src/commands/local/seed.d.ts +0 -64
  68. package/dist/src/commands/local/seed.js +0 -78
  69. package/dist/src/commands/local/stack.d.ts +0 -141
  70. package/dist/src/commands/local/stack.js +0 -153
  71. package/dist/src/commands/login.d.ts +0 -265
  72. package/dist/src/commands/login.js +4 -418
  73. package/dist/src/commands/peer-addressing.d.ts +0 -39
  74. package/dist/src/commands/peer-addressing.js +0 -37
  75. package/dist/src/commands/port-ownership.d.ts +0 -44
  76. package/dist/src/commands/port-ownership.js +0 -47
  77. package/dist/src/commands/registry-publish.d.ts +0 -1
  78. package/dist/src/commands/registry-publish.js +0 -46
  79. package/dist/src/commands/registry.d.ts +4 -237
  80. package/dist/src/commands/registry.js +2 -316
  81. package/dist/src/commands/secrets/exec.d.ts +0 -16
  82. package/dist/src/commands/secrets/exec.js +0 -24
  83. package/dist/src/commands/secrets/index.d.ts +0 -9
  84. package/dist/src/commands/secrets/index.js +0 -10
  85. package/dist/src/commands/secrets/migrate-config.d.ts +0 -17
  86. package/dist/src/commands/secrets/migrate-config.js +0 -40
  87. package/dist/src/commands/secrets/reindex.d.ts +0 -38
  88. package/dist/src/commands/secrets/reindex.js +0 -39
  89. package/dist/src/commands/secrets/set.d.ts +0 -47
  90. package/dist/src/commands/secrets/set.js +0 -107
  91. package/dist/src/commands/site.d.ts +0 -1
  92. package/dist/src/commands/site.js +0 -61
  93. package/dist/src/commands/skills.d.ts +0 -61
  94. package/dist/src/commands/skills.js +0 -83
  95. package/dist/src/commands/stack.d.ts +0 -15
  96. package/dist/src/commands/stack.js +1 -128
  97. package/dist/src/commands/temporal.d.ts +0 -30
  98. package/dist/src/commands/temporal.js +3 -1
  99. package/dist/src/commands/temporal.js.map +1 -2
  100. package/dist/src/commands/tenant.d.ts +0 -31
  101. package/dist/src/commands/tenant.js +0 -55
  102. package/dist/src/commands/tunnel/index.d.ts +0 -40
  103. package/dist/src/commands/tunnel/index.js +0 -141
  104. package/dist/src/commands/vcs/clone.d.ts +0 -1
  105. package/dist/src/commands/vcs/clone.js +0 -4
  106. package/dist/src/commands/vcs/common.d.ts +0 -32
  107. package/dist/src/commands/vcs/common.js +0 -41
  108. package/dist/src/commands/vcs/drafts.d.ts +0 -1
  109. package/dist/src/commands/vcs/drafts.js +0 -1
  110. package/dist/src/commands/vcs/get.d.ts +0 -1
  111. package/dist/src/commands/vcs/get.js +0 -11
  112. package/dist/src/commands/vcs/index.d.ts +0 -1
  113. package/dist/src/commands/vcs/index.js +0 -1
  114. package/dist/src/commands/vcs/propose.d.ts +0 -26
  115. package/dist/src/commands/vcs/propose.js +3 -34
  116. package/dist/src/commands/vcs/review.d.ts +0 -1
  117. package/dist/src/commands/vcs/review.js +0 -1
  118. package/dist/src/commands/vcs/rm.d.ts +0 -11
  119. package/dist/src/commands/vcs/rm.js +0 -14
  120. package/dist/src/commands/vcs-enrich.d.ts +0 -12
  121. package/dist/src/commands/vcs-enrich.js +0 -12
  122. package/dist/src/commands/vpn/index.d.ts +0 -17
  123. package/dist/src/commands/vpn/index.js +0 -102
  124. package/dist/src/commands/vpn/tunnel.d.ts +0 -9
  125. package/dist/src/commands/vpn/tunnel.js +0 -37
  126. package/dist/src/commands/workflow.d.ts +0 -22
  127. package/dist/src/commands/workflow.js +0 -80
  128. package/dist/src/docs/assemble.d.ts +0 -117
  129. package/dist/src/docs/assemble.js +0 -142
  130. package/dist/src/docs/cli-reference.d.ts +0 -58
  131. package/dist/src/docs/cli-reference.js +0 -77
  132. package/dist/src/docs/discover.d.ts +0 -40
  133. package/dist/src/docs/discover.js +2 -60
  134. package/dist/src/docs/portal.d.ts +0 -44
  135. package/dist/src/docs/portal.js +0 -49
  136. package/dist/src/docs/registry-docs.d.ts +0 -29
  137. package/dist/src/docs/registry-docs.js +0 -40
  138. package/dist/src/docs/schema.d.ts +0 -36
  139. package/dist/src/docs/schema.js +0 -52
  140. package/dist/src/docs/serve.d.ts +0 -18
  141. package/dist/src/docs/serve.js +2 -30
  142. package/dist/src/docs/start.d.ts +0 -42
  143. package/dist/src/docs/start.js +0 -70
  144. package/dist/src/eval/agent-eval.d.mts +0 -12
  145. package/dist/src/eval/agent-eval.mjs +0 -22
  146. package/dist/src/index.d.ts +0 -6
  147. package/dist/src/index.js.map +0 -1
  148. package/dist/src/program.d.ts +0 -20
  149. package/dist/src/program.js +0 -24
  150. package/dist/src/utils/auth-preflight.d.ts +0 -137
  151. package/dist/src/utils/auth-preflight.js +0 -149
  152. package/dist/src/utils/aws-auth.d.ts +0 -163
  153. package/dist/src/utils/aws-auth.js +3 -232
  154. package/dist/src/utils/bastion.d.ts +0 -27
  155. package/dist/src/utils/bastion.js +0 -28
  156. package/dist/src/utils/build-info.d.ts +0 -22
  157. package/dist/src/utils/build-info.js +0 -27
  158. package/dist/src/utils/cache-home.d.ts +0 -23
  159. package/dist/src/utils/cache-home.js +0 -25
  160. package/dist/src/utils/capture-history.d.ts +0 -54
  161. package/dist/src/utils/capture-history.js +1 -55
  162. package/dist/src/utils/context.d.ts +0 -23
  163. package/dist/src/utils/context.js +0 -43
  164. package/dist/src/utils/credentials.d.ts +0 -38
  165. package/dist/src/utils/credentials.js +0 -39
  166. package/dist/src/utils/deploy-preflight.d.ts +0 -38
  167. package/dist/src/utils/deploy-preflight.js +1 -71
  168. package/dist/src/utils/errors.d.ts +0 -53
  169. package/dist/src/utils/errors.js +0 -49
  170. package/dist/src/utils/first-party-contexts.d.ts +0 -38
  171. package/dist/src/utils/first-party-contexts.js +0 -44
  172. package/dist/src/utils/index.d.ts +0 -4
  173. package/dist/src/utils/index.js +0 -4
  174. package/dist/src/utils/kubeconfig.d.ts +0 -40
  175. package/dist/src/utils/kubeconfig.js +0 -44
  176. package/dist/src/utils/log.d.ts +0 -20
  177. package/dist/src/utils/log.js +0 -20
  178. package/dist/src/utils/mesh-json.d.ts +0 -46
  179. package/dist/src/utils/mesh-json.js +0 -39
  180. package/dist/src/utils/pid.d.ts +0 -42
  181. package/dist/src/utils/pid.js +0 -48
  182. package/dist/src/utils/pulumi-run.d.ts +0 -14
  183. package/dist/src/utils/pulumi-run.js +0 -42
  184. package/dist/src/utils/pulumi.d.ts +0 -34
  185. package/dist/src/utils/pulumi.js +0 -38
  186. package/dist/src/utils/reachability.d.ts +0 -27
  187. package/dist/src/utils/reachability.js +0 -40
  188. package/dist/src/utils/recover-conversation.d.ts +0 -110
  189. package/dist/src/utils/recover-conversation.js +0 -108
  190. package/dist/src/utils/registry-broker.d.ts +5 -84
  191. package/dist/src/utils/registry-broker.js +0 -62
  192. package/dist/src/utils/registry-identity.d.ts +0 -149
  193. package/dist/src/utils/registry-identity.js +0 -143
  194. package/dist/src/utils/scaffold-versions.d.ts +0 -41
  195. package/dist/src/utils/scaffold-versions.js +0 -42
  196. package/dist/src/utils/socks-forward.d.ts +0 -24
  197. package/dist/src/utils/socks-forward.js +2 -25
  198. package/dist/src/utils/stack-flag.d.ts +0 -13
  199. package/dist/src/utils/stack-flag.js +0 -21
  200. package/dist/src/utils/tailscale-targets.d.ts +0 -37
  201. package/dist/src/utils/tailscale-targets.js +0 -33
  202. package/dist/src/utils/tailscale.d.ts +0 -177
  203. package/dist/src/utils/tailscale.js +6 -337
  204. package/dist/src/utils/temporal-auth.d.ts +0 -41
  205. package/dist/src/utils/temporal-auth.js +0 -52
  206. package/dist/src/utils/temporal-codec.d.ts +0 -89
  207. package/dist/src/utils/temporal-codec.js.map +0 -1
  208. package/dist/src/utils/tunnel-ownership.d.ts +0 -79
  209. package/dist/src/utils/tunnel-ownership.js +0 -74
  210. package/dist/src/utils/vpn-join.d.ts +0 -16
  211. package/dist/src/utils/vpn-join.js +0 -17
  212. package/dist/src/utils/vpn.d.ts +0 -42
  213. package/dist/src/utils/vpn.js +0 -52
  214. package/dist/src/utils/workflow-fingerprint.d.ts +0 -39
  215. package/dist/src/utils/workflow-fingerprint.js +1 -63
  216. package/dist/src/utils/worktree-identity.d.ts +0 -62
  217. package/dist/src/utils/worktree-identity.js +0 -88
  218. package/package.json +2 -2
  219. package/skills/core/SKILL.md +9 -10
  220. package/templates/api-auth/api/src/index.ts.hbs +1 -1
  221. package/templates/api-auth/api/src/spicedb-http-provider.ts.hbs +2 -2
  222. package/templates/api-role-gating/api/src/authn.ts.hbs +2 -2
  223. package/templates/api-role-gating/index.ts.hbs +1 -1
  224. package/templates/api-role-gating/skills/develop/SKILL.md.hbs +1 -1
  225. package/templates/platform-repo/core/Pulumi.{{tenant}}-{{env}}.yaml.hbs +2 -2
  226. package/templates/platform-repo/platform/index.ts +1 -1
  227. package/dist/bin/mesh.d.ts.map +0 -1
  228. package/dist/src/commands/agent-api-client.d.ts.map +0 -1
  229. package/dist/src/commands/agent-api-client.js.map +0 -1
  230. package/dist/src/commands/app-check.d.ts.map +0 -1
  231. package/dist/src/commands/app-check.js.map +0 -1
  232. package/dist/src/commands/artifacts.d.ts.map +0 -1
  233. package/dist/src/commands/artifacts.js.map +0 -1
  234. package/dist/src/commands/cluster.d.ts.map +0 -1
  235. package/dist/src/commands/cluster.js.map +0 -1
  236. package/dist/src/commands/conversations.d.ts.map +0 -1
  237. package/dist/src/commands/conversations.js.map +0 -1
  238. package/dist/src/commands/create-app.d.ts.map +0 -1
  239. package/dist/src/commands/create-app.js.map +0 -1
  240. package/dist/src/commands/db/connect.d.ts.map +0 -1
  241. package/dist/src/commands/db/connect.js.map +0 -1
  242. package/dist/src/commands/db/credentials.d.ts.map +0 -1
  243. package/dist/src/commands/db/credentials.js.map +0 -1
  244. package/dist/src/commands/db/env.d.ts.map +0 -1
  245. package/dist/src/commands/db/env.js.map +0 -1
  246. package/dist/src/commands/db/exec.d.ts.map +0 -1
  247. package/dist/src/commands/db/exec.js.map +0 -1
  248. package/dist/src/commands/db/index.d.ts.map +0 -1
  249. package/dist/src/commands/db/index.js.map +0 -1
  250. package/dist/src/commands/db/psql.d.ts.map +0 -1
  251. package/dist/src/commands/db/psql.js.map +0 -1
  252. package/dist/src/commands/deploy.d.ts.map +0 -1
  253. package/dist/src/commands/deploy.js.map +0 -1
  254. package/dist/src/commands/dev-doctor.d.ts.map +0 -1
  255. package/dist/src/commands/dev-doctor.js.map +0 -1
  256. package/dist/src/commands/dev-launch.d.ts.map +0 -1
  257. package/dist/src/commands/dev-launch.js.map +0 -1
  258. package/dist/src/commands/dev-token-server.d.ts.map +0 -1
  259. package/dist/src/commands/dev-token-server.js.map +0 -1
  260. package/dist/src/commands/dev.d.ts.map +0 -1
  261. package/dist/src/commands/dev.js.map +0 -1
  262. package/dist/src/commands/docs.d.ts.map +0 -1
  263. package/dist/src/commands/docs.js.map +0 -1
  264. package/dist/src/commands/hub/index.d.ts.map +0 -1
  265. package/dist/src/commands/hub/index.js.map +0 -1
  266. package/dist/src/commands/init/wizard.d.ts.map +0 -1
  267. package/dist/src/commands/init/wizard.js.map +0 -1
  268. package/dist/src/commands/init.d.ts.map +0 -1
  269. package/dist/src/commands/init.js.map +0 -1
  270. package/dist/src/commands/install-shim.d.ts.map +0 -1
  271. package/dist/src/commands/install-shim.js.map +0 -1
  272. package/dist/src/commands/local/auth-provision.d.ts.map +0 -1
  273. package/dist/src/commands/local/auth-provision.js.map +0 -1
  274. package/dist/src/commands/local/dev-local.d.ts.map +0 -1
  275. package/dist/src/commands/local/dev-local.js.map +0 -1
  276. package/dist/src/commands/local/docker-runner.d.ts.map +0 -1
  277. package/dist/src/commands/local/docker-runner.js.map +0 -1
  278. package/dist/src/commands/local/helpers.d.ts.map +0 -1
  279. package/dist/src/commands/local/helpers.js.map +0 -1
  280. package/dist/src/commands/local/hub-local.d.ts.map +0 -1
  281. package/dist/src/commands/local/hub-local.js.map +0 -1
  282. package/dist/src/commands/local/index.d.ts.map +0 -1
  283. package/dist/src/commands/local/index.js.map +0 -1
  284. package/dist/src/commands/local/mocks.d.ts.map +0 -1
  285. package/dist/src/commands/local/mocks.js.map +0 -1
  286. package/dist/src/commands/local/seed-hub-catalog.d.ts.map +0 -1
  287. package/dist/src/commands/local/seed-hub-catalog.js.map +0 -1
  288. package/dist/src/commands/local/seed-zitadel.d.ts.map +0 -1
  289. package/dist/src/commands/local/seed-zitadel.js.map +0 -1
  290. package/dist/src/commands/local/seed.d.ts.map +0 -1
  291. package/dist/src/commands/local/seed.js.map +0 -1
  292. package/dist/src/commands/local/stack.d.ts.map +0 -1
  293. package/dist/src/commands/local/stack.js.map +0 -1
  294. package/dist/src/commands/login.d.ts.map +0 -1
  295. package/dist/src/commands/login.js.map +0 -1
  296. package/dist/src/commands/peer-addressing.d.ts.map +0 -1
  297. package/dist/src/commands/peer-addressing.js.map +0 -1
  298. package/dist/src/commands/port-ownership.d.ts.map +0 -1
  299. package/dist/src/commands/port-ownership.js.map +0 -1
  300. package/dist/src/commands/registry-publish.d.ts.map +0 -1
  301. package/dist/src/commands/registry-publish.js.map +0 -1
  302. package/dist/src/commands/registry.d.ts.map +0 -1
  303. package/dist/src/commands/registry.js.map +0 -1
  304. package/dist/src/commands/secrets/exec.d.ts.map +0 -1
  305. package/dist/src/commands/secrets/exec.js.map +0 -1
  306. package/dist/src/commands/secrets/index.d.ts.map +0 -1
  307. package/dist/src/commands/secrets/index.js.map +0 -1
  308. package/dist/src/commands/secrets/migrate-config.d.ts.map +0 -1
  309. package/dist/src/commands/secrets/migrate-config.js.map +0 -1
  310. package/dist/src/commands/secrets/reindex.d.ts.map +0 -1
  311. package/dist/src/commands/secrets/reindex.js.map +0 -1
  312. package/dist/src/commands/secrets/set.d.ts.map +0 -1
  313. package/dist/src/commands/secrets/set.js.map +0 -1
  314. package/dist/src/commands/site.d.ts.map +0 -1
  315. package/dist/src/commands/site.js.map +0 -1
  316. package/dist/src/commands/skills.d.ts.map +0 -1
  317. package/dist/src/commands/skills.js.map +0 -1
  318. package/dist/src/commands/stack.d.ts.map +0 -1
  319. package/dist/src/commands/stack.js.map +0 -1
  320. package/dist/src/commands/temporal.d.ts.map +0 -1
  321. package/dist/src/commands/tenant.d.ts.map +0 -1
  322. package/dist/src/commands/tenant.js.map +0 -1
  323. package/dist/src/commands/tunnel/index.d.ts.map +0 -1
  324. package/dist/src/commands/tunnel/index.js.map +0 -1
  325. package/dist/src/commands/vcs/clone.d.ts.map +0 -1
  326. package/dist/src/commands/vcs/clone.js.map +0 -1
  327. package/dist/src/commands/vcs/common.d.ts.map +0 -1
  328. package/dist/src/commands/vcs/common.js.map +0 -1
  329. package/dist/src/commands/vcs/drafts.d.ts.map +0 -1
  330. package/dist/src/commands/vcs/drafts.js.map +0 -1
  331. package/dist/src/commands/vcs/get.d.ts.map +0 -1
  332. package/dist/src/commands/vcs/get.js.map +0 -1
  333. package/dist/src/commands/vcs/index.d.ts.map +0 -1
  334. package/dist/src/commands/vcs/index.js.map +0 -1
  335. package/dist/src/commands/vcs/propose.d.ts.map +0 -1
  336. package/dist/src/commands/vcs/propose.js.map +0 -1
  337. package/dist/src/commands/vcs/review.d.ts.map +0 -1
  338. package/dist/src/commands/vcs/review.js.map +0 -1
  339. package/dist/src/commands/vcs/rm.d.ts.map +0 -1
  340. package/dist/src/commands/vcs/rm.js.map +0 -1
  341. package/dist/src/commands/vcs-enrich.d.ts.map +0 -1
  342. package/dist/src/commands/vcs-enrich.js.map +0 -1
  343. package/dist/src/commands/vpn/index.d.ts.map +0 -1
  344. package/dist/src/commands/vpn/index.js.map +0 -1
  345. package/dist/src/commands/vpn/tunnel.d.ts.map +0 -1
  346. package/dist/src/commands/vpn/tunnel.js.map +0 -1
  347. package/dist/src/commands/workflow.d.ts.map +0 -1
  348. package/dist/src/commands/workflow.js.map +0 -1
  349. package/dist/src/docs/assemble.d.ts.map +0 -1
  350. package/dist/src/docs/assemble.js.map +0 -1
  351. package/dist/src/docs/cli-reference.d.ts.map +0 -1
  352. package/dist/src/docs/cli-reference.js.map +0 -1
  353. package/dist/src/docs/discover.d.ts.map +0 -1
  354. package/dist/src/docs/discover.js.map +0 -1
  355. package/dist/src/docs/portal.d.ts.map +0 -1
  356. package/dist/src/docs/portal.js.map +0 -1
  357. package/dist/src/docs/registry-docs.d.ts.map +0 -1
  358. package/dist/src/docs/registry-docs.js.map +0 -1
  359. package/dist/src/docs/schema.d.ts.map +0 -1
  360. package/dist/src/docs/schema.js.map +0 -1
  361. package/dist/src/docs/serve.d.ts.map +0 -1
  362. package/dist/src/docs/serve.js.map +0 -1
  363. package/dist/src/docs/start.d.ts.map +0 -1
  364. package/dist/src/docs/start.js.map +0 -1
  365. package/dist/src/eval/agent-eval.d.mts.map +0 -1
  366. package/dist/src/eval/agent-eval.mjs.map +0 -1
  367. package/dist/src/index.d.ts.map +0 -1
  368. package/dist/src/program.d.ts.map +0 -1
  369. package/dist/src/program.js.map +0 -1
  370. package/dist/src/utils/auth-preflight.d.ts.map +0 -1
  371. package/dist/src/utils/auth-preflight.js.map +0 -1
  372. package/dist/src/utils/aws-auth.d.ts.map +0 -1
  373. package/dist/src/utils/aws-auth.js.map +0 -1
  374. package/dist/src/utils/bastion.d.ts.map +0 -1
  375. package/dist/src/utils/bastion.js.map +0 -1
  376. package/dist/src/utils/build-info.d.ts.map +0 -1
  377. package/dist/src/utils/build-info.js.map +0 -1
  378. package/dist/src/utils/cache-home.d.ts.map +0 -1
  379. package/dist/src/utils/cache-home.js.map +0 -1
  380. package/dist/src/utils/capture-history.d.ts.map +0 -1
  381. package/dist/src/utils/capture-history.js.map +0 -1
  382. package/dist/src/utils/context.d.ts.map +0 -1
  383. package/dist/src/utils/context.js.map +0 -1
  384. package/dist/src/utils/credentials.d.ts.map +0 -1
  385. package/dist/src/utils/credentials.js.map +0 -1
  386. package/dist/src/utils/deploy-preflight.d.ts.map +0 -1
  387. package/dist/src/utils/deploy-preflight.js.map +0 -1
  388. package/dist/src/utils/errors.d.ts.map +0 -1
  389. package/dist/src/utils/errors.js.map +0 -1
  390. package/dist/src/utils/first-party-contexts.d.ts.map +0 -1
  391. package/dist/src/utils/first-party-contexts.js.map +0 -1
  392. package/dist/src/utils/index.d.ts.map +0 -1
  393. package/dist/src/utils/index.js.map +0 -1
  394. package/dist/src/utils/kubeconfig.d.ts.map +0 -1
  395. package/dist/src/utils/kubeconfig.js.map +0 -1
  396. package/dist/src/utils/log.d.ts.map +0 -1
  397. package/dist/src/utils/log.js.map +0 -1
  398. package/dist/src/utils/mesh-json.d.ts.map +0 -1
  399. package/dist/src/utils/mesh-json.js.map +0 -1
  400. package/dist/src/utils/pid.d.ts.map +0 -1
  401. package/dist/src/utils/pid.js.map +0 -1
  402. package/dist/src/utils/pulumi-run.d.ts.map +0 -1
  403. package/dist/src/utils/pulumi-run.js.map +0 -1
  404. package/dist/src/utils/pulumi.d.ts.map +0 -1
  405. package/dist/src/utils/pulumi.js.map +0 -1
  406. package/dist/src/utils/reachability.d.ts.map +0 -1
  407. package/dist/src/utils/reachability.js.map +0 -1
  408. package/dist/src/utils/recover-conversation.d.ts.map +0 -1
  409. package/dist/src/utils/recover-conversation.js.map +0 -1
  410. package/dist/src/utils/registry-broker.d.ts.map +0 -1
  411. package/dist/src/utils/registry-broker.js.map +0 -1
  412. package/dist/src/utils/registry-identity.d.ts.map +0 -1
  413. package/dist/src/utils/registry-identity.js.map +0 -1
  414. package/dist/src/utils/scaffold-versions.d.ts.map +0 -1
  415. package/dist/src/utils/scaffold-versions.js.map +0 -1
  416. package/dist/src/utils/socks-forward.d.ts.map +0 -1
  417. package/dist/src/utils/socks-forward.js.map +0 -1
  418. package/dist/src/utils/stack-flag.d.ts.map +0 -1
  419. package/dist/src/utils/stack-flag.js.map +0 -1
  420. package/dist/src/utils/tailscale-targets.d.ts.map +0 -1
  421. package/dist/src/utils/tailscale-targets.js.map +0 -1
  422. package/dist/src/utils/tailscale.d.ts.map +0 -1
  423. package/dist/src/utils/tailscale.js.map +0 -1
  424. package/dist/src/utils/temporal-auth.d.ts.map +0 -1
  425. package/dist/src/utils/temporal-auth.js.map +0 -1
  426. package/dist/src/utils/temporal-codec.d.ts.map +0 -1
  427. package/dist/src/utils/tunnel-ownership.d.ts.map +0 -1
  428. package/dist/src/utils/tunnel-ownership.js.map +0 -1
  429. package/dist/src/utils/vpn-join.d.ts.map +0 -1
  430. package/dist/src/utils/vpn-join.js.map +0 -1
  431. package/dist/src/utils/vpn.d.ts.map +0 -1
  432. package/dist/src/utils/vpn.js.map +0 -1
  433. package/dist/src/utils/workflow-fingerprint.d.ts.map +0 -1
  434. package/dist/src/utils/workflow-fingerprint.js.map +0 -1
  435. package/dist/src/utils/worktree-identity.d.ts.map +0 -1
  436. package/dist/src/utils/worktree-identity.js.map +0 -1
@@ -1,13 +1,3 @@
1
- /**
2
- * mesh create-app - Scaffold a new tenant application
3
- *
4
- * Three modes:
5
- * 1. Legacy: `mesh create-app --template workflow --tenant x --name y`
6
- * 2. Composable (flags): `mesh create-app --tenant x --name y --primitives service,database`
7
- * 3. Interactive: `mesh create-app` (prompts when TTY detected and flags missing)
8
- *
9
- * All options can be passed as flags for agent/CI usage (no TTY required).
10
- */
11
1
  import * as fs from "fs";
12
2
  import * as os from "os";
13
3
  import * as path from "path";
@@ -22,50 +12,29 @@ import { SCAFFOLD_TOOLCHAIN, resolvePublishedRange } from "../utils/scaffold-ver
22
12
  import { registryPreflight } from "../utils/auth-preflight.js";
23
13
  import { MeshCliError } from "../utils/errors.js";
24
14
  import { findMeshJson } from "../utils/mesh-json.js";
25
- // Get package root by walking up until we find package.json with our package name.
26
- // Works from both src/commands/ (tsx) and dist/src/commands/ (compiled).
27
15
  const __filename = fileURLToPath(import.meta.url);
28
16
  const __dirname = path.dirname(__filename);
29
17
  const packageRoot = findPackageRoot(__dirname);
30
- // Available templates
31
18
  const TEMPLATES = {
32
19
  workflow: "Hono API + Temporal worker + hello workflow (Pulumi/app-kit)",
33
20
  "api-auth": "Hono API with platform auth: authn (Zitadel JWT) + authz (SpiceDB)",
34
21
  "api-role-gating": "Hono API with role-gating authz: authn (Zitadel JWT) + coarse-role checks on Zitadel project roles, in-process (no SpiceDB)",
35
22
  "external-service": "Hono API calling a third-party vendor via platform-managed credentials (ExternalService + mock for `mesh dev --externals`)",
36
23
  };
37
- /** Removed templates → what replaced them (named in the unknown-template error). */
38
24
  const REMOVED_TEMPLATES = {
39
25
  "temporal-api-worker": "renamed to 'workflow'",
40
26
  "api-web-db": "removed (SST-based) — use --primitives service,database",
41
27
  };
42
- // Available primitives for composable mode
43
28
  const PRIMITIVES = {
44
29
  service: "HTTP Service (API with Hono)",
45
30
  database: "Database (PostgreSQL via Prisma)",
46
31
  temporal: "Temporal (workflow orchestration)",
47
32
  bucket: "S3 Bucket (file storage)",
48
33
  };
49
- /**
50
- * Hub platform account IDs — the AWS account hosting a shared tenant's
51
- * `{tenant}-{env}-apps-deployer` role. Shared tenants (acme, …) deploy into the
52
- * hub account, so the generated `mesh:deployerRole` ARN resolves against this map.
53
- * `mesh` is the only hub today; add entries as new hubs come online.
54
- */
55
34
  const HUB_ACCOUNTS = {
56
35
  mesh: "159923586610",
57
36
  };
58
- /** The root `package.json` name that identifies the mesh-platform monorepo. */
59
37
  export const PLATFORM_MONOREPO_NAME = "mesh-platform";
60
- /**
61
- * True when `dir` sits inside the **mesh-platform monorepo** — the one workspace
62
- * that publishes `@mesh-tech/*`, so a scaffolded app there wants `workspace:*` +
63
- * `catalog:` (link local source) instead of published ranges.
64
- *
65
- * The test is deliberately narrow. Looking for any ancestor `pnpm-workspace.yaml`
66
- * is not enough: a tenant-apps repo is itself a pnpm workspace (`packages: [apps/*]`).
67
- * Identity comes from the root `package.json` name, which no tenant repo shares.
68
- */
69
38
  export function isInsidePlatformMonorepo(dir) {
70
39
  let cur = path.resolve(dir);
71
40
  while (cur !== path.dirname(cur)) {
@@ -76,34 +45,17 @@ export function isInsidePlatformMonorepo(dir) {
76
45
  return true;
77
46
  }
78
47
  catch {
79
- // an unreadable/absent root package.json is not the platform monorepo
80
48
  }
81
49
  }
82
50
  cur = path.dirname(cur);
83
51
  }
84
52
  return false;
85
53
  }
86
- /**
87
- * Deployer-role ARN for a shared tenant on a known hub, or a clearly-marked
88
- * `ACCOUNT_ID` placeholder when the hub account is unknown (the generated config
89
- * comments the fill-in step in that case).
90
- */
91
54
  function resolveDeployerRoleArn(tenant, platformName, env) {
92
55
  const account = HUB_ACCOUNTS[platformName] ?? "ACCOUNT_ID";
93
56
  return `arn:aws:iam::${account}:role/${tenant}-${env}-apps-deployer`;
94
57
  }
95
58
  const VALID_PRIMITIVES = Object.keys(PRIMITIVES);
96
- // =============================================================================
97
- // Standalone apps-repo bootstrap
98
- // =============================================================================
99
- /**
100
- * A fresh standalone tenant-apps repo (empty clone of {tenant}-mesh-apps) is
101
- * bootstrappable when the cwd is a git repo root that has none of the layouts
102
- * `resolveAppDir` looks for. Previously create-app exited with "Tenant
103
- * directory not found: tenants/<t>/" here — even though the app-tenant
104
- * doctor's Repo-shape check names create-app as the fix ("workspace files
105
- * included"), so the command must actually deliver them.
106
- */
107
59
  export function shouldBootstrapAppsRepo(cwd) {
108
60
  return (fs.existsSync(path.join(cwd, ".git")) &&
109
61
  !isInsidePlatformMonorepo(cwd) &&
@@ -111,12 +63,6 @@ export function shouldBootstrapAppsRepo(cwd) {
111
63
  !fs.existsSync(path.join(cwd, "tenants")) &&
112
64
  !fs.existsSync(path.join(cwd, "apps")));
113
65
  }
114
- /**
115
- * Generate the repo-level files of a standalone tenant-apps repo (the
116
- * trabian-mesh-apps shape): pnpm workspace over apps/*, private root
117
- * package.json, scoped CodeArtifact .npmrc, base tsconfig, .gitignore, README.
118
- * Only writes files that don't already exist; returns what it created.
119
- */
120
66
  export function bootstrapAppsRepo(cwd, tenant) {
121
67
  const templateDir = path.join(packageRoot, "templates", "apps-repo");
122
68
  const registryAccount = HUB_ACCOUNTS.mesh;
@@ -133,8 +79,6 @@ export function bootstrapAppsRepo(cwd, tenant) {
133
79
  const staging = fs.mkdtempSync(path.join(os.tmpdir(), "mesh-apps-repo-"));
134
80
  try {
135
81
  copyTemplate(templateDir, staging, context);
136
- // npm strips dotfiles from published tarballs, so the template ships
137
- // `gitignore`/`npmrc` and the bootstrap restores the real names.
138
82
  for (const [from, to] of [
139
83
  ["gitignore", ".gitignore"],
140
84
  ["npmrc", ".npmrc"],
@@ -159,17 +103,6 @@ export function bootstrapAppsRepo(cwd, tenant) {
159
103
  fs.rmSync(staging, { recursive: true, force: true });
160
104
  }
161
105
  }
162
- /**
163
- * A composed app puts its runnable packages one level below the app dir
164
- * (`apps/<name>/api`, `apps/<name>/worker`). pnpm only installs dependencies
165
- * for workspace MEMBERS, and an apps repo whose `pnpm-workspace.yaml` says
166
- * `packages: [apps/*]` does not match them — so the app scaffolds, the root
167
- * install reports success, and `pnpm dev` dies on `Cannot find package 'hono'`
168
- * with nothing pointing at the cause.
169
- *
170
- * Append any missing glob as a line under `packages:` (text edit, so comments
171
- * and ordering survive). Returns the globs added, empty when nothing was missing.
172
- */
173
106
  export function ensureWorkspaceGlobs(root, required) {
174
107
  const file = path.join(root, "pnpm-workspace.yaml");
175
108
  if (!fs.existsSync(file))
@@ -186,8 +119,6 @@ export function ensureWorkspaceGlobs(root, required) {
186
119
  if (missing.length === 0)
187
120
  return [];
188
121
  const lines = text.split("\n");
189
- // Insert after the last entry of the `packages:` list; bail if the file is
190
- // shaped in a way we can't edit safely by hand.
191
122
  const start = lines.findIndex((line) => /^packages:\s*$/.test(line));
192
123
  if (start === -1)
193
124
  return [];
@@ -207,18 +138,6 @@ export function ensureWorkspaceGlobs(root, required) {
207
138
  fs.writeFileSync(file, lines.join("\n"));
208
139
  return missing;
209
140
  }
210
- /**
211
- * The `pnpm-workspace.yaml` glob that makes a composed app's nested packages
212
- * (`<app>/api`, `<app>/worker`) workspace members, derived from where the app
213
- * actually landed. `resolveAppDir` picks the first existing of
214
- * `tenants/<t>/apps`, `../<t>/apps` and `apps`, so the glob is rooted at
215
- * `apps` in one layout and at `tenants/<t>/apps` in another. Returns null when
216
- * the app resolved outside `root` — nothing there is a member of this workspace.
217
- *
218
- * @example
219
- * workspaceGlobForApp("/repo", "/repo/tenants/acme/apps/billing");
220
- * // → "tenants/acme/apps" followed by two wildcard segments
221
- */
222
141
  export function workspaceGlobForApp(root, appDir) {
223
142
  const rel = path.relative(root, appDir).split(path.sep).join("/");
224
143
  if (rel === "" || rel.split("/")[0] === "..")
@@ -231,25 +150,16 @@ function maybeBootstrapAppsRepo(cwd, tenant, test) {
231
150
  const created = bootstrapAppsRepo(cwd, tenant);
232
151
  logInfo(`Standalone apps repo detected — bootstrapped workspace files: ${created.join(", ")}`);
233
152
  }
234
- // Register Handlebars helpers
235
153
  Handlebars.registerHelper("titleCase", (str) => {
236
154
  return str
237
155
  .split("-")
238
156
  .map((word) => word.charAt(0).toUpperCase() + word.slice(1))
239
157
  .join(" ");
240
158
  });
241
- /**
242
- * Check if we're in an interactive terminal
243
- */
244
159
  function isInteractive() {
245
160
  return Boolean(process.stdin.isTTY && process.stdout.isTTY);
246
161
  }
247
- /**
248
- * Run interactive prompts to gather missing options.
249
- * Only called when TTY is available and required options are missing.
250
- */
251
162
  async function promptForOptions(options) {
252
- // Dynamic imports so non-interactive usage doesn't load inquirer
253
163
  const { default: input } = await import("@inquirer/input");
254
164
  const { default: checkbox } = await import("@inquirer/checkbox");
255
165
  const tenant = options.tenant ??
@@ -273,14 +183,13 @@ async function promptForOptions(options) {
273
183
  choices: VALID_PRIMITIVES.map((p) => ({
274
184
  name: PRIMITIVES[p],
275
185
  value: p,
276
- checked: p === "service", // service checked by default
186
+ checked: p === "service",
277
187
  })),
278
188
  });
279
189
  if (primitives.length === 0) {
280
190
  primitives = ["service"];
281
191
  }
282
192
  }
283
- // Database and bucket place files in api/ — ensure service is included
284
193
  if (primitives.includes("database") && !primitives.includes("service")) {
285
194
  primitives.push("service");
286
195
  logInfo("Added 'service' — database files live in the api/ directory.");
@@ -291,19 +200,14 @@ async function promptForOptions(options) {
291
200
  }
292
201
  return { tenant, name, primitives };
293
202
  }
294
- /**
295
- * Recursively copy a directory, processing .hbs templates
296
- */
297
203
  export function copyTemplate(srcDir, destDir, context) {
298
204
  const entries = fs.readdirSync(srcDir, { withFileTypes: true });
299
205
  for (const entry of entries) {
300
206
  const srcPath = path.join(srcDir, entry.name);
301
207
  let destName = entry.name;
302
- // Remove .hbs extension for template files
303
208
  if (destName.endsWith(".hbs")) {
304
209
  destName = destName.slice(0, -4);
305
210
  }
306
- // File names can be templated too (e.g. Pulumi.{{tenant}}-{{env}}.yaml.hbs)
307
211
  if (destName.includes("{{")) {
308
212
  destName = Handlebars.compile(destName)(context);
309
213
  }
@@ -313,21 +217,16 @@ export function copyTemplate(srcDir, destDir, context) {
313
217
  copyTemplate(srcPath, destPath, context);
314
218
  }
315
219
  else if (entry.name.endsWith(".hbs")) {
316
- // Process Handlebars template
317
220
  const templateContent = fs.readFileSync(srcPath, "utf-8");
318
221
  const template = Handlebars.compile(templateContent);
319
222
  const output = template(context);
320
223
  fs.writeFileSync(destPath, output);
321
224
  }
322
225
  else {
323
- // Copy file as-is
324
226
  fs.copyFileSync(srcPath, destPath);
325
227
  }
326
228
  }
327
229
  }
328
- /**
329
- * Parse and validate primitive selections from comma-separated string
330
- */
331
230
  function parsePrimitives(input) {
332
231
  const selected = input.split(",").map((s) => s.trim().toLowerCase());
333
232
  const invalid = selected.filter((s) => !VALID_PRIMITIVES.includes(s));
@@ -338,16 +237,6 @@ function parsePrimitives(input) {
338
237
  }
339
238
  return selected;
340
239
  }
341
- /**
342
- * The refusal printed when no directory can receive the app. Inside the
343
- * platform monorepo (or with `--test`) the missing thing is a tenant
344
- * directory; anywhere else the caller is simply not in a Mesh apps repo, and
345
- * `mesh init` is what creates one — the monorepo's `tenants/<tenant>/` layout
346
- * means nothing on a tenant developer's laptop.
347
- *
348
- * @example
349
- * describeNoAppsHome("/home/dev/my-apps", "acme", "tenants", false).hint; // names `mesh init`
350
- */
351
240
  export function describeNoAppsHome(cwd, tenant, baseDir, test) {
352
241
  if (test || isInsidePlatformMonorepo(cwd)) {
353
242
  return {
@@ -360,16 +249,8 @@ export function describeNoAppsHome(cwd, tenant, baseDir, test) {
360
249
  hint: `Run: mesh init (turns this folder into your ${tenant}-mesh-apps repo), or cd into that repo and re-run mesh create-app.`,
361
250
  };
362
251
  }
363
- /**
364
- * Resolve output directory for the app
365
- */
366
252
  export function resolveAppDir(cwd, tenant, name, test) {
367
253
  const baseDir = test ? "tests/tenants" : "tenants";
368
- // `--test` names one destination, so it probes only that one. The general
369
- // search below falls back to `<cwd>/apps`, which in a monorepo root is the
370
- // REAL app directory (`apps/hub`, `apps/banking-api`) — it exists, so it won
371
- // the probe and silently swallowed `--test`, scaffolding a throwaway test app
372
- // next to the shipped ones while the log still said "Creating in tests/".
373
254
  const possiblePaths = test
374
255
  ? [path.join(cwd, baseDir, tenant, "apps")]
375
256
  : [
@@ -393,12 +274,8 @@ export function resolveAppDir(cwd, tenant, name, test) {
393
274
  }
394
275
  return path.join(appsDir, name);
395
276
  }
396
- /**
397
- * Generate a composable app from fragments
398
- */
399
277
  export function generateComposableApp(appDir, context) {
400
278
  const fragmentsDir = path.join(packageRoot, "fragments");
401
- // 1. Always copy base fragment
402
279
  const baseDir = path.join(fragmentsDir, "base");
403
280
  if (!fs.existsSync(baseDir)) {
404
281
  logError(`Fragments directory not found: ${baseDir}`);
@@ -406,7 +283,6 @@ export function generateComposableApp(appDir, context) {
406
283
  process.exit(1);
407
284
  }
408
285
  copyTemplate(baseDir, appDir, context);
409
- // 2. Copy primitive-specific fragments
410
286
  if (context.service) {
411
287
  const serviceDir = path.join(fragmentsDir, "service");
412
288
  if (!fs.existsSync(serviceDir)) {
@@ -435,7 +311,6 @@ export function generateComposableApp(appDir, context) {
435
311
  }
436
312
  copyTemplate(bucketDir, appDir, context);
437
313
  }
438
- // 3. Always generate AGENTS.md
439
314
  const agentsDir = path.join(fragmentsDir, "agents");
440
315
  if (fs.existsSync(agentsDir)) {
441
316
  copyTemplate(agentsDir, appDir, context);
@@ -453,7 +328,6 @@ export function registerCreateAppCommand(program) {
453
328
  .option("--skip-registry-check", "Scaffold without checking that this machine can install @mesh-tech packages (offline use; run `mesh registry login` before `pnpm install`)", false)
454
329
  .action(async (options) => {
455
330
  await ensureRegistryAccess(process.cwd(), options);
456
- // Legacy template mode — requires all flags
457
331
  if (options.template) {
458
332
  if (!options.tenant || !options.name) {
459
333
  logError("--tenant and --name are required with --template");
@@ -462,21 +336,17 @@ export function registerCreateAppCommand(program) {
462
336
  await runLegacyTemplate(options.tenant, options.name, options.template, options.test);
463
337
  return;
464
338
  }
465
- // Composable mode — interactive or flag-based
466
339
  let tenant;
467
340
  let name;
468
341
  let primitives;
469
342
  const needsPrompt = !options.tenant || !options.name || !options.primitives;
470
343
  if (needsPrompt && isInteractive()) {
471
- // Interactive: prompt for missing values
472
344
  const prompted = await promptForOptions(options);
473
345
  tenant = prompted.tenant;
474
346
  name = prompted.name;
475
347
  primitives = prompted.primitives;
476
348
  }
477
349
  else if (needsPrompt) {
478
- // Non-interactive but missing flags — the repo's `mesh.json` (written
479
- // by `mesh init`) supplies the tenant when the flag is omitted.
480
350
  options.tenant ??= findMeshJson(process.cwd())?.data.tenant;
481
351
  if (!options.tenant) {
482
352
  logError("--tenant is required (no TTY for interactive mode)");
@@ -497,7 +367,6 @@ export function registerCreateAppCommand(program) {
497
367
  name = options.name;
498
368
  primitives = parsePrimitives(options.primitives);
499
369
  }
500
- // Database and bucket place files in api/ — ensure service is included
501
370
  if (primitives.includes("database") && !primitives.includes("service")) {
502
371
  primitives.push("service");
503
372
  logInfo("Added 'service' — database files live in the api/ directory.");
@@ -509,25 +378,10 @@ export function registerCreateAppCommand(program) {
509
378
  await runComposable(tenant, name, primitives, options.test);
510
379
  });
511
380
  }
512
- /** Printed when the registry preflight fails — the scaffold stops before any prompt or write. */
513
381
  export const NO_REGISTRY_ACCESS_MESSAGE = "No registry access on this machine — @mesh-tech packages cannot be installed.\n" +
514
382
  " Run: mesh init\n" +
515
383
  " (sets up your tenant and signs you in to the package registry)\n" +
516
384
  " Scaffolding offline anyway? add --skip-registry-check";
517
- /**
518
- * Registry preflight, BEFORE any prompt and before any file is written.
519
- *
520
- * A scaffold whose `pnpm install` cannot resolve `@mesh-tech/*` is a trap: the
521
- * failure arrives minutes later with npm's generic E401/E404 advice, and the
522
- * fix (registry sign-in) has nothing to do with the app. So outside the
523
- * platform monorepo — where `workspace:*` links need no registry — the
524
- * command checks first and, when the machine has no access, stops and names
525
- * `mesh init`, the one place that sets a machine up. A registry that cannot
526
- * be reached is a network fault, not a missing grant: warn and carry on.
527
- *
528
- * @example
529
- * await ensureRegistryAccess(process.cwd(), { test: false }); // throws MeshCliError when access is missing
530
- */
531
385
  export async function ensureRegistryAccess(cwd, options, preflight = registryPreflight) {
532
386
  if (isInsidePlatformMonorepo(cwd))
533
387
  return;
@@ -585,11 +439,6 @@ async function runLegacyTemplate(tenant, name, template, test) {
585
439
  await checkScaffoldContract(appDir);
586
440
  printLegacyNextSteps(appDir, template);
587
441
  }
588
- /** Best-effort skills sync after scaffolding (design D1): a fresh Claude
589
- * session in the repo sees the base skills + Intent discovery immediately.
590
- * Also seeds the app's OWN skill stub — the app repo knows the app better than
591
- * any platform skill can, so the boilerplate sets the base and the developer
592
- * grows it. */
593
442
  function autoSyncSkills(appDir, appName) {
594
443
  const root = resolveTargetRoot(appDir);
595
444
  try {
@@ -607,12 +456,6 @@ function autoSyncSkills(appDir, appName) {
607
456
  logWarn(`App skill stub skipped: ${err instanceof Error ? err.message : err}`);
608
457
  }
609
458
  }
610
- /**
611
- * Run `mesh app check` on the app just scaffolded. A fresh scaffold satisfies
612
- * the Mesh app contract by construction (the template test proves it), so a
613
- * finding here is a platform defect, not the developer's: report it loudly and
614
- * fail the command so it cannot be missed, but leave the files in place.
615
- */
616
459
  async function checkScaffoldContract(appDir) {
617
460
  const root = resolveTargetRoot(appDir);
618
461
  const report = await runAppCheck(root, [path.relative(root, appDir) || "."]);
@@ -642,13 +485,9 @@ async function runComposable(tenant, name, primitives, test) {
642
485
  logError(`App directory already exists: ${appDir}`);
643
486
  process.exit(1);
644
487
  }
645
- // Platform defaults (the generated Pulumi config targets the mesh hub / dev).
646
488
  const region = "us-east-2";
647
489
  const platformName = "mesh";
648
490
  const platformEnv = "dev";
649
- // Link local source inside the platform monorepo; every other repo installs
650
- // `@mesh-tech/*` from the registry, so it gets a caret range on the current
651
- // published line (looked up here, baked floor when the lookup can't run).
652
491
  const workspaceDeps = isInsidePlatformMonorepo(appDir);
653
492
  const repoRoot = resolveTargetRoot(process.cwd());
654
493
  const mesh = workspaceDeps
@@ -746,4 +585,3 @@ function printComposableNextSteps(appDir, context) {
746
585
  console.log(" mesh dev # run locally");
747
586
  console.log("");
748
587
  }
749
- //# sourceMappingURL=create-app.js.map
@@ -1,13 +1,6 @@
1
- /**
2
- * mesh db connect - Start DB tunnel for manual psql access
3
- *
4
- * Usage:
5
- * mesh db connect --tenant mesh --env dev-temporal
6
- */
7
1
  interface ConnectOptions {
8
2
  tenant?: string;
9
3
  env?: string;
10
4
  }
11
5
  export declare function connectCommand(options: ConnectOptions): Promise<void>;
12
6
  export {};
13
- //# sourceMappingURL=connect.d.ts.map
@@ -1,13 +1,6 @@
1
- /**
2
- * mesh db connect - Start DB tunnel for manual psql access
3
- *
4
- * Usage:
5
- * mesh db connect --tenant mesh --env dev-temporal
6
- */
7
1
  import { spawn } from "child_process";
8
2
  import { detectContext, getPlatformBastionInfo, logInfo, logError, } from "../../utils/index.js";
9
3
  export async function connectCommand(options) {
10
- // Resolve tenant/env - explicit or auto-detect
11
4
  let tenant;
12
5
  let platformEnv;
13
6
  if (options.tenant && options.env) {
@@ -42,7 +35,6 @@ export async function connectCommand(options) {
42
35
  console.log("");
43
36
  logInfo("Press Ctrl+C to stop the tunnel");
44
37
  console.log("");
45
- // Start SSM tunnel
46
38
  const tunnel = spawn("aws", [
47
39
  "ssm",
48
40
  "start-session",
@@ -65,4 +57,3 @@ export async function connectCommand(options) {
65
57
  process.exit(code ?? 0);
66
58
  });
67
59
  }
68
- //# sourceMappingURL=connect.js.map
@@ -1,9 +1,3 @@
1
- /**
2
- * mesh db credentials - Print database credentials
3
- *
4
- * Usage:
5
- * mesh db credentials --tenant mesh --env dev-temporal --app rdc --app-tenant encore --app-stage dev
6
- */
7
1
  interface CredentialsOptions {
8
2
  tenant?: string;
9
3
  env?: string;
@@ -13,4 +7,3 @@ interface CredentialsOptions {
13
7
  }
14
8
  export declare function credentialsCommand(options: CredentialsOptions): Promise<void>;
15
9
  export {};
16
- //# sourceMappingURL=credentials.d.ts.map
@@ -1,12 +1,5 @@
1
- /**
2
- * mesh db credentials - Print database credentials
3
- *
4
- * Usage:
5
- * mesh db credentials --tenant mesh --env dev-temporal --app rdc --app-tenant encore --app-stage dev
6
- */
7
1
  import { detectContext, getDatabaseUrl, logInfo, logError, } from "../../utils/index.js";
8
2
  export async function credentialsCommand(options) {
9
- // Resolve platform tenant/env
10
3
  let platformTenant;
11
4
  let platformEnv;
12
5
  if (options.tenant && options.env) {
@@ -25,14 +18,12 @@ export async function credentialsCommand(options) {
25
18
  platformEnv = ctx.platformEnv;
26
19
  logInfo(`Auto-detected: Tenant=${platformTenant}, Env=${platformEnv}`);
27
20
  }
28
- // Resolve app credentials
29
21
  const appTenant = options.appTenant ?? platformTenant;
30
22
  const appStage = options.appStage ?? platformEnv;
31
23
  const appName = options.app;
32
24
  if (appName) {
33
25
  logInfo(`App credentials: tenant=${appTenant}, stage=${appStage}, app=${appName}`);
34
26
  }
35
- // Get DATABASE_URL
36
27
  const databaseUrl = await getDatabaseUrl(appTenant, appStage, { app: appName });
37
28
  const parsed = new URL(databaseUrl);
38
29
  console.log("");
@@ -53,4 +44,3 @@ export async function credentialsCommand(options) {
53
44
  console.log(` ${tunnelUrl.toString()}`);
54
45
  console.log("");
55
46
  }
56
- //# sourceMappingURL=credentials.js.map
@@ -1,8 +1,3 @@
1
- /**
2
- * mesh db env - Export DATABASE_URL for shell
3
- *
4
- * Usage: eval $(mesh db env --tenant mesh --env dev-temporal --app rdc --app-tenant encore --app-stage dev)
5
- */
6
1
  interface EnvOptions {
7
2
  tenant?: string;
8
3
  env?: string;
@@ -12,4 +7,3 @@ interface EnvOptions {
12
7
  }
13
8
  export declare function envCommand(options: EnvOptions): Promise<void>;
14
9
  export {};
15
- //# sourceMappingURL=env.d.ts.map
@@ -1,17 +1,10 @@
1
- /**
2
- * mesh db env - Export DATABASE_URL for shell
3
- *
4
- * Usage: eval $(mesh db env --tenant mesh --env dev-temporal --app rdc --app-tenant encore --app-stage dev)
5
- */
6
1
  import { detectContext, getDatabaseUrl, rewriteDatabaseUrl, logInfo, logError, } from "../../utils/index.js";
7
2
  export async function envCommand(options) {
8
- // Resolve platform tenant/env
9
3
  let platformTenant;
10
4
  let platformEnv;
11
5
  if (options.tenant && options.env) {
12
6
  platformTenant = options.tenant;
13
7
  platformEnv = options.env;
14
- // Use stderr for info so stdout is clean for eval
15
8
  console.error(`ℹ Platform: Tenant=${platformTenant}, Env=${platformEnv}`);
16
9
  }
17
10
  else if (options.tenant || options.env) {
@@ -25,21 +18,15 @@ export async function envCommand(options) {
25
18
  platformEnv = ctx.platformEnv;
26
19
  console.error(`ℹ Auto-detected: Tenant=${platformTenant}, Env=${platformEnv}`);
27
20
  }
28
- // Resolve app credentials
29
21
  const appTenant = options.appTenant ?? platformTenant;
30
22
  const appStage = options.appStage ?? platformEnv;
31
23
  const appName = options.app;
32
24
  if (appName) {
33
25
  console.error(`ℹ App credentials: tenant=${appTenant}, stage=${appStage}, app=${appName}`);
34
26
  }
35
- // Get DATABASE_URL and rewrite for tunnel
36
27
  const rawUrl = await getDatabaseUrl(appTenant, appStage, { app: appName });
37
28
  const tunnelUrl = rewriteDatabaseUrl(rawUrl, { endpoint: "localhost:5432" });
38
29
  const parsed = new URL(tunnelUrl);
39
- // Output export statements (to stdout for eval).
40
- // WARNING: Contains plaintext credentials. Use only with:
41
- // eval "$(mesh db env ...)"
42
- // Do NOT run bare — credentials will appear in terminal and shell history.
43
30
  console.log(`export DATABASE_URL="${tunnelUrl}"`);
44
31
  console.log('export DB_HOST="localhost"');
45
32
  console.log('export DB_PORT="5432"');
@@ -47,4 +34,3 @@ export async function envCommand(options) {
47
34
  console.log(`export DB_USERNAME="${parsed.username}"`);
48
35
  console.log(`export DB_PASSWORD="${decodeURIComponent(parsed.password)}"`);
49
36
  }
50
- //# sourceMappingURL=env.js.map
@@ -1,54 +1,11 @@
1
- /**
2
- * mesh db exec - Run any command with database connection
3
- *
4
- * Three modes of operation:
5
- *
6
- * 1. Explicit mode (recommended for ad-hoc use):
7
- * mesh db exec --tenant=<tenant> --env=<env> [--ssl=require] -- <command>
8
- * - Uses explicit tenant/env to find platform bastion
9
- * - Starts tunnel if needed
10
- * - Similar to: mesh tunnel --tenant mesh --env dev
11
- *
12
- * 2. Direct mode (for sst dev integration):
13
- * mesh db exec --secret=<arn> [--ssl=require] -- <command>
14
- * - Uses secret ARN directly, expects tunnel already running
15
- * - Ideal for sst.config.ts devCommand
16
- *
17
- * 3. Discovery mode (legacy, auto-detection):
18
- * mesh db exec [--stage=<stage>] -- <command>
19
- * - Auto-discovers tenant/env from filesystem and config files
20
- * - Can be fragile if project structure doesn't match expected patterns
21
- * - Starts tunnel if needed
22
- *
23
- * Examples:
24
- * # Explicit mode (recommended)
25
- * mesh db exec --tenant mesh --env dev --ssl=require -- npx prisma db push
26
- * mesh db exec -t mesh -e dev -- npx prisma migrate dev
27
- *
28
- * # Direct mode (in sst.config.ts)
29
- * mesh db exec --secret=arn:aws:secretsmanager:... --ssl=require -- pnpm dev
30
- *
31
- * # Discovery mode (legacy)
32
- * mesh db exec -- npx prisma db push
33
- * mesh db exec --stage=dev -- npx prisma migrate dev
34
- */
35
1
  export interface ExecOptions {
36
- /** Platform tenant for bastion lookup */
37
2
  tenant?: string;
38
- /** Platform environment for bastion lookup */
39
3
  env?: string;
40
- /** App name for credentials path */
41
4
  app?: string;
42
- /** Tenant for app credentials (if different from platform tenant) */
43
5
  appTenant?: string;
44
- /** Stage for app credentials */
45
6
  appStage?: string;
46
- /** Secret ARN for direct mode */
47
7
  secret?: string;
48
- /** SSL mode */
49
8
  ssl?: string;
50
- /** Local tunnel port */
51
9
  port?: string;
52
10
  }
53
11
  export declare function execCommand(commandArgs: string[], options: ExecOptions): Promise<void>;
54
- //# sourceMappingURL=exec.d.ts.map