@mesh-tech/mesh-cli 0.20.2 → 0.20.3

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 (435) hide show
  1. package/dist/bin/mesh.d.ts +0 -12
  2. package/dist/bin/mesh.js +12 -12
  3. package/dist/bin/mesh.js.map +0 -1
  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.map +0 -1
  99. package/dist/src/commands/tenant.d.ts +0 -31
  100. package/dist/src/commands/tenant.js +0 -55
  101. package/dist/src/commands/tunnel/index.d.ts +0 -40
  102. package/dist/src/commands/tunnel/index.js +0 -141
  103. package/dist/src/commands/vcs/clone.d.ts +0 -1
  104. package/dist/src/commands/vcs/clone.js +0 -4
  105. package/dist/src/commands/vcs/common.d.ts +0 -32
  106. package/dist/src/commands/vcs/common.js +0 -41
  107. package/dist/src/commands/vcs/drafts.d.ts +0 -1
  108. package/dist/src/commands/vcs/drafts.js +0 -1
  109. package/dist/src/commands/vcs/get.d.ts +0 -1
  110. package/dist/src/commands/vcs/get.js +0 -11
  111. package/dist/src/commands/vcs/index.d.ts +0 -1
  112. package/dist/src/commands/vcs/index.js +0 -1
  113. package/dist/src/commands/vcs/propose.d.ts +0 -26
  114. package/dist/src/commands/vcs/propose.js +3 -34
  115. package/dist/src/commands/vcs/review.d.ts +0 -1
  116. package/dist/src/commands/vcs/review.js +0 -1
  117. package/dist/src/commands/vcs/rm.d.ts +0 -11
  118. package/dist/src/commands/vcs/rm.js +0 -14
  119. package/dist/src/commands/vcs-enrich.d.ts +0 -12
  120. package/dist/src/commands/vcs-enrich.js +0 -12
  121. package/dist/src/commands/vpn/index.d.ts +0 -17
  122. package/dist/src/commands/vpn/index.js +0 -102
  123. package/dist/src/commands/vpn/tunnel.d.ts +0 -9
  124. package/dist/src/commands/vpn/tunnel.js +0 -37
  125. package/dist/src/commands/workflow.d.ts +0 -22
  126. package/dist/src/commands/workflow.js +0 -80
  127. package/dist/src/docs/assemble.d.ts +0 -117
  128. package/dist/src/docs/assemble.js +0 -142
  129. package/dist/src/docs/cli-reference.d.ts +0 -58
  130. package/dist/src/docs/cli-reference.js +0 -77
  131. package/dist/src/docs/discover.d.ts +0 -40
  132. package/dist/src/docs/discover.js +2 -60
  133. package/dist/src/docs/portal.d.ts +0 -44
  134. package/dist/src/docs/portal.js +0 -49
  135. package/dist/src/docs/registry-docs.d.ts +0 -29
  136. package/dist/src/docs/registry-docs.js +0 -40
  137. package/dist/src/docs/schema.d.ts +0 -36
  138. package/dist/src/docs/schema.js +0 -52
  139. package/dist/src/docs/serve.d.ts +0 -18
  140. package/dist/src/docs/serve.js +2 -30
  141. package/dist/src/docs/start.d.ts +0 -42
  142. package/dist/src/docs/start.js +0 -70
  143. package/dist/src/eval/agent-eval.d.mts +0 -12
  144. package/dist/src/eval/agent-eval.mjs +0 -22
  145. package/dist/src/index.d.ts +0 -6
  146. package/dist/src/index.js.map +0 -1
  147. package/dist/src/program.d.ts +0 -20
  148. package/dist/src/program.js +0 -24
  149. package/dist/src/utils/auth-preflight.d.ts +0 -137
  150. package/dist/src/utils/auth-preflight.js +0 -149
  151. package/dist/src/utils/aws-auth.d.ts +0 -163
  152. package/dist/src/utils/aws-auth.js +3 -232
  153. package/dist/src/utils/bastion.d.ts +0 -27
  154. package/dist/src/utils/bastion.js +0 -28
  155. package/dist/src/utils/build-info.d.ts +0 -22
  156. package/dist/src/utils/build-info.js +0 -27
  157. package/dist/src/utils/cache-home.d.ts +0 -23
  158. package/dist/src/utils/cache-home.js +0 -25
  159. package/dist/src/utils/capture-history.d.ts +0 -54
  160. package/dist/src/utils/capture-history.js +1 -55
  161. package/dist/src/utils/context.d.ts +0 -23
  162. package/dist/src/utils/context.js +0 -43
  163. package/dist/src/utils/credentials.d.ts +0 -38
  164. package/dist/src/utils/credentials.js +0 -39
  165. package/dist/src/utils/deploy-preflight.d.ts +0 -38
  166. package/dist/src/utils/deploy-preflight.js +1 -71
  167. package/dist/src/utils/errors.d.ts +0 -53
  168. package/dist/src/utils/errors.js +0 -49
  169. package/dist/src/utils/first-party-contexts.d.ts +0 -38
  170. package/dist/src/utils/first-party-contexts.js +0 -44
  171. package/dist/src/utils/index.d.ts +0 -4
  172. package/dist/src/utils/index.js +0 -4
  173. package/dist/src/utils/kubeconfig.d.ts +0 -40
  174. package/dist/src/utils/kubeconfig.js +0 -44
  175. package/dist/src/utils/log.d.ts +0 -20
  176. package/dist/src/utils/log.js +0 -20
  177. package/dist/src/utils/mesh-json.d.ts +0 -46
  178. package/dist/src/utils/mesh-json.js +0 -39
  179. package/dist/src/utils/pid.d.ts +0 -42
  180. package/dist/src/utils/pid.js +0 -48
  181. package/dist/src/utils/pulumi-run.d.ts +0 -14
  182. package/dist/src/utils/pulumi-run.js +0 -42
  183. package/dist/src/utils/pulumi.d.ts +0 -34
  184. package/dist/src/utils/pulumi.js +0 -38
  185. package/dist/src/utils/reachability.d.ts +0 -27
  186. package/dist/src/utils/reachability.js +0 -40
  187. package/dist/src/utils/recover-conversation.d.ts +0 -110
  188. package/dist/src/utils/recover-conversation.js +0 -108
  189. package/dist/src/utils/registry-broker.d.ts +5 -84
  190. package/dist/src/utils/registry-broker.js +0 -62
  191. package/dist/src/utils/registry-identity.d.ts +0 -149
  192. package/dist/src/utils/registry-identity.js +0 -143
  193. package/dist/src/utils/scaffold-versions.d.ts +0 -41
  194. package/dist/src/utils/scaffold-versions.js +0 -42
  195. package/dist/src/utils/socks-forward.d.ts +0 -24
  196. package/dist/src/utils/socks-forward.js +2 -25
  197. package/dist/src/utils/stack-flag.d.ts +0 -13
  198. package/dist/src/utils/stack-flag.js +0 -21
  199. package/dist/src/utils/tailscale-targets.d.ts +0 -37
  200. package/dist/src/utils/tailscale-targets.js +0 -33
  201. package/dist/src/utils/tailscale.d.ts +0 -177
  202. package/dist/src/utils/tailscale.js +6 -337
  203. package/dist/src/utils/temporal-auth.d.ts +0 -41
  204. package/dist/src/utils/temporal-auth.js +0 -52
  205. package/dist/src/utils/temporal-codec.d.ts +0 -89
  206. package/dist/src/utils/temporal-codec.js.map +0 -1
  207. package/dist/src/utils/tunnel-ownership.d.ts +0 -79
  208. package/dist/src/utils/tunnel-ownership.js +0 -74
  209. package/dist/src/utils/vpn-join.d.ts +0 -16
  210. package/dist/src/utils/vpn-join.js +0 -17
  211. package/dist/src/utils/vpn.d.ts +0 -42
  212. package/dist/src/utils/vpn.js +0 -52
  213. package/dist/src/utils/workflow-fingerprint.d.ts +0 -39
  214. package/dist/src/utils/workflow-fingerprint.js +1 -63
  215. package/dist/src/utils/worktree-identity.d.ts +0 -62
  216. package/dist/src/utils/worktree-identity.js +0 -88
  217. package/package.json +1 -1
  218. package/skills/core/SKILL.md +9 -10
  219. package/templates/api-auth/api/src/index.ts.hbs +1 -1
  220. package/templates/api-auth/api/src/spicedb-http-provider.ts.hbs +2 -2
  221. package/templates/api-role-gating/api/src/authn.ts.hbs +2 -2
  222. package/templates/api-role-gating/index.ts.hbs +1 -1
  223. package/templates/api-role-gating/skills/develop/SKILL.md.hbs +1 -1
  224. package/templates/platform-repo/core/Pulumi.{{tenant}}-{{env}}.yaml.hbs +2 -2
  225. package/templates/platform-repo/platform/index.ts +1 -1
  226. package/dist/bin/mesh.d.ts.map +0 -1
  227. package/dist/src/commands/agent-api-client.d.ts.map +0 -1
  228. package/dist/src/commands/agent-api-client.js.map +0 -1
  229. package/dist/src/commands/app-check.d.ts.map +0 -1
  230. package/dist/src/commands/app-check.js.map +0 -1
  231. package/dist/src/commands/artifacts.d.ts.map +0 -1
  232. package/dist/src/commands/artifacts.js.map +0 -1
  233. package/dist/src/commands/cluster.d.ts.map +0 -1
  234. package/dist/src/commands/cluster.js.map +0 -1
  235. package/dist/src/commands/conversations.d.ts.map +0 -1
  236. package/dist/src/commands/conversations.js.map +0 -1
  237. package/dist/src/commands/create-app.d.ts.map +0 -1
  238. package/dist/src/commands/create-app.js.map +0 -1
  239. package/dist/src/commands/db/connect.d.ts.map +0 -1
  240. package/dist/src/commands/db/connect.js.map +0 -1
  241. package/dist/src/commands/db/credentials.d.ts.map +0 -1
  242. package/dist/src/commands/db/credentials.js.map +0 -1
  243. package/dist/src/commands/db/env.d.ts.map +0 -1
  244. package/dist/src/commands/db/env.js.map +0 -1
  245. package/dist/src/commands/db/exec.d.ts.map +0 -1
  246. package/dist/src/commands/db/exec.js.map +0 -1
  247. package/dist/src/commands/db/index.d.ts.map +0 -1
  248. package/dist/src/commands/db/index.js.map +0 -1
  249. package/dist/src/commands/db/psql.d.ts.map +0 -1
  250. package/dist/src/commands/db/psql.js.map +0 -1
  251. package/dist/src/commands/deploy.d.ts.map +0 -1
  252. package/dist/src/commands/deploy.js.map +0 -1
  253. package/dist/src/commands/dev-doctor.d.ts.map +0 -1
  254. package/dist/src/commands/dev-doctor.js.map +0 -1
  255. package/dist/src/commands/dev-launch.d.ts.map +0 -1
  256. package/dist/src/commands/dev-launch.js.map +0 -1
  257. package/dist/src/commands/dev-token-server.d.ts.map +0 -1
  258. package/dist/src/commands/dev-token-server.js.map +0 -1
  259. package/dist/src/commands/dev.d.ts.map +0 -1
  260. package/dist/src/commands/dev.js.map +0 -1
  261. package/dist/src/commands/docs.d.ts.map +0 -1
  262. package/dist/src/commands/docs.js.map +0 -1
  263. package/dist/src/commands/hub/index.d.ts.map +0 -1
  264. package/dist/src/commands/hub/index.js.map +0 -1
  265. package/dist/src/commands/init/wizard.d.ts.map +0 -1
  266. package/dist/src/commands/init/wizard.js.map +0 -1
  267. package/dist/src/commands/init.d.ts.map +0 -1
  268. package/dist/src/commands/init.js.map +0 -1
  269. package/dist/src/commands/install-shim.d.ts.map +0 -1
  270. package/dist/src/commands/install-shim.js.map +0 -1
  271. package/dist/src/commands/local/auth-provision.d.ts.map +0 -1
  272. package/dist/src/commands/local/auth-provision.js.map +0 -1
  273. package/dist/src/commands/local/dev-local.d.ts.map +0 -1
  274. package/dist/src/commands/local/dev-local.js.map +0 -1
  275. package/dist/src/commands/local/docker-runner.d.ts.map +0 -1
  276. package/dist/src/commands/local/docker-runner.js.map +0 -1
  277. package/dist/src/commands/local/helpers.d.ts.map +0 -1
  278. package/dist/src/commands/local/helpers.js.map +0 -1
  279. package/dist/src/commands/local/hub-local.d.ts.map +0 -1
  280. package/dist/src/commands/local/hub-local.js.map +0 -1
  281. package/dist/src/commands/local/index.d.ts.map +0 -1
  282. package/dist/src/commands/local/index.js.map +0 -1
  283. package/dist/src/commands/local/mocks.d.ts.map +0 -1
  284. package/dist/src/commands/local/mocks.js.map +0 -1
  285. package/dist/src/commands/local/seed-hub-catalog.d.ts.map +0 -1
  286. package/dist/src/commands/local/seed-hub-catalog.js.map +0 -1
  287. package/dist/src/commands/local/seed-zitadel.d.ts.map +0 -1
  288. package/dist/src/commands/local/seed-zitadel.js.map +0 -1
  289. package/dist/src/commands/local/seed.d.ts.map +0 -1
  290. package/dist/src/commands/local/seed.js.map +0 -1
  291. package/dist/src/commands/local/stack.d.ts.map +0 -1
  292. package/dist/src/commands/local/stack.js.map +0 -1
  293. package/dist/src/commands/login.d.ts.map +0 -1
  294. package/dist/src/commands/login.js.map +0 -1
  295. package/dist/src/commands/peer-addressing.d.ts.map +0 -1
  296. package/dist/src/commands/peer-addressing.js.map +0 -1
  297. package/dist/src/commands/port-ownership.d.ts.map +0 -1
  298. package/dist/src/commands/port-ownership.js.map +0 -1
  299. package/dist/src/commands/registry-publish.d.ts.map +0 -1
  300. package/dist/src/commands/registry-publish.js.map +0 -1
  301. package/dist/src/commands/registry.d.ts.map +0 -1
  302. package/dist/src/commands/registry.js.map +0 -1
  303. package/dist/src/commands/secrets/exec.d.ts.map +0 -1
  304. package/dist/src/commands/secrets/exec.js.map +0 -1
  305. package/dist/src/commands/secrets/index.d.ts.map +0 -1
  306. package/dist/src/commands/secrets/index.js.map +0 -1
  307. package/dist/src/commands/secrets/migrate-config.d.ts.map +0 -1
  308. package/dist/src/commands/secrets/migrate-config.js.map +0 -1
  309. package/dist/src/commands/secrets/reindex.d.ts.map +0 -1
  310. package/dist/src/commands/secrets/reindex.js.map +0 -1
  311. package/dist/src/commands/secrets/set.d.ts.map +0 -1
  312. package/dist/src/commands/secrets/set.js.map +0 -1
  313. package/dist/src/commands/site.d.ts.map +0 -1
  314. package/dist/src/commands/site.js.map +0 -1
  315. package/dist/src/commands/skills.d.ts.map +0 -1
  316. package/dist/src/commands/skills.js.map +0 -1
  317. package/dist/src/commands/stack.d.ts.map +0 -1
  318. package/dist/src/commands/stack.js.map +0 -1
  319. package/dist/src/commands/temporal.d.ts.map +0 -1
  320. package/dist/src/commands/tenant.d.ts.map +0 -1
  321. package/dist/src/commands/tenant.js.map +0 -1
  322. package/dist/src/commands/tunnel/index.d.ts.map +0 -1
  323. package/dist/src/commands/tunnel/index.js.map +0 -1
  324. package/dist/src/commands/vcs/clone.d.ts.map +0 -1
  325. package/dist/src/commands/vcs/clone.js.map +0 -1
  326. package/dist/src/commands/vcs/common.d.ts.map +0 -1
  327. package/dist/src/commands/vcs/common.js.map +0 -1
  328. package/dist/src/commands/vcs/drafts.d.ts.map +0 -1
  329. package/dist/src/commands/vcs/drafts.js.map +0 -1
  330. package/dist/src/commands/vcs/get.d.ts.map +0 -1
  331. package/dist/src/commands/vcs/get.js.map +0 -1
  332. package/dist/src/commands/vcs/index.d.ts.map +0 -1
  333. package/dist/src/commands/vcs/index.js.map +0 -1
  334. package/dist/src/commands/vcs/propose.d.ts.map +0 -1
  335. package/dist/src/commands/vcs/propose.js.map +0 -1
  336. package/dist/src/commands/vcs/review.d.ts.map +0 -1
  337. package/dist/src/commands/vcs/review.js.map +0 -1
  338. package/dist/src/commands/vcs/rm.d.ts.map +0 -1
  339. package/dist/src/commands/vcs/rm.js.map +0 -1
  340. package/dist/src/commands/vcs-enrich.d.ts.map +0 -1
  341. package/dist/src/commands/vcs-enrich.js.map +0 -1
  342. package/dist/src/commands/vpn/index.d.ts.map +0 -1
  343. package/dist/src/commands/vpn/index.js.map +0 -1
  344. package/dist/src/commands/vpn/tunnel.d.ts.map +0 -1
  345. package/dist/src/commands/vpn/tunnel.js.map +0 -1
  346. package/dist/src/commands/workflow.d.ts.map +0 -1
  347. package/dist/src/commands/workflow.js.map +0 -1
  348. package/dist/src/docs/assemble.d.ts.map +0 -1
  349. package/dist/src/docs/assemble.js.map +0 -1
  350. package/dist/src/docs/cli-reference.d.ts.map +0 -1
  351. package/dist/src/docs/cli-reference.js.map +0 -1
  352. package/dist/src/docs/discover.d.ts.map +0 -1
  353. package/dist/src/docs/discover.js.map +0 -1
  354. package/dist/src/docs/portal.d.ts.map +0 -1
  355. package/dist/src/docs/portal.js.map +0 -1
  356. package/dist/src/docs/registry-docs.d.ts.map +0 -1
  357. package/dist/src/docs/registry-docs.js.map +0 -1
  358. package/dist/src/docs/schema.d.ts.map +0 -1
  359. package/dist/src/docs/schema.js.map +0 -1
  360. package/dist/src/docs/serve.d.ts.map +0 -1
  361. package/dist/src/docs/serve.js.map +0 -1
  362. package/dist/src/docs/start.d.ts.map +0 -1
  363. package/dist/src/docs/start.js.map +0 -1
  364. package/dist/src/eval/agent-eval.d.mts.map +0 -1
  365. package/dist/src/eval/agent-eval.mjs.map +0 -1
  366. package/dist/src/index.d.ts.map +0 -1
  367. package/dist/src/program.d.ts.map +0 -1
  368. package/dist/src/program.js.map +0 -1
  369. package/dist/src/utils/auth-preflight.d.ts.map +0 -1
  370. package/dist/src/utils/auth-preflight.js.map +0 -1
  371. package/dist/src/utils/aws-auth.d.ts.map +0 -1
  372. package/dist/src/utils/aws-auth.js.map +0 -1
  373. package/dist/src/utils/bastion.d.ts.map +0 -1
  374. package/dist/src/utils/bastion.js.map +0 -1
  375. package/dist/src/utils/build-info.d.ts.map +0 -1
  376. package/dist/src/utils/build-info.js.map +0 -1
  377. package/dist/src/utils/cache-home.d.ts.map +0 -1
  378. package/dist/src/utils/cache-home.js.map +0 -1
  379. package/dist/src/utils/capture-history.d.ts.map +0 -1
  380. package/dist/src/utils/capture-history.js.map +0 -1
  381. package/dist/src/utils/context.d.ts.map +0 -1
  382. package/dist/src/utils/context.js.map +0 -1
  383. package/dist/src/utils/credentials.d.ts.map +0 -1
  384. package/dist/src/utils/credentials.js.map +0 -1
  385. package/dist/src/utils/deploy-preflight.d.ts.map +0 -1
  386. package/dist/src/utils/deploy-preflight.js.map +0 -1
  387. package/dist/src/utils/errors.d.ts.map +0 -1
  388. package/dist/src/utils/errors.js.map +0 -1
  389. package/dist/src/utils/first-party-contexts.d.ts.map +0 -1
  390. package/dist/src/utils/first-party-contexts.js.map +0 -1
  391. package/dist/src/utils/index.d.ts.map +0 -1
  392. package/dist/src/utils/index.js.map +0 -1
  393. package/dist/src/utils/kubeconfig.d.ts.map +0 -1
  394. package/dist/src/utils/kubeconfig.js.map +0 -1
  395. package/dist/src/utils/log.d.ts.map +0 -1
  396. package/dist/src/utils/log.js.map +0 -1
  397. package/dist/src/utils/mesh-json.d.ts.map +0 -1
  398. package/dist/src/utils/mesh-json.js.map +0 -1
  399. package/dist/src/utils/pid.d.ts.map +0 -1
  400. package/dist/src/utils/pid.js.map +0 -1
  401. package/dist/src/utils/pulumi-run.d.ts.map +0 -1
  402. package/dist/src/utils/pulumi-run.js.map +0 -1
  403. package/dist/src/utils/pulumi.d.ts.map +0 -1
  404. package/dist/src/utils/pulumi.js.map +0 -1
  405. package/dist/src/utils/reachability.d.ts.map +0 -1
  406. package/dist/src/utils/reachability.js.map +0 -1
  407. package/dist/src/utils/recover-conversation.d.ts.map +0 -1
  408. package/dist/src/utils/recover-conversation.js.map +0 -1
  409. package/dist/src/utils/registry-broker.d.ts.map +0 -1
  410. package/dist/src/utils/registry-broker.js.map +0 -1
  411. package/dist/src/utils/registry-identity.d.ts.map +0 -1
  412. package/dist/src/utils/registry-identity.js.map +0 -1
  413. package/dist/src/utils/scaffold-versions.d.ts.map +0 -1
  414. package/dist/src/utils/scaffold-versions.js.map +0 -1
  415. package/dist/src/utils/socks-forward.d.ts.map +0 -1
  416. package/dist/src/utils/socks-forward.js.map +0 -1
  417. package/dist/src/utils/stack-flag.d.ts.map +0 -1
  418. package/dist/src/utils/stack-flag.js.map +0 -1
  419. package/dist/src/utils/tailscale-targets.d.ts.map +0 -1
  420. package/dist/src/utils/tailscale-targets.js.map +0 -1
  421. package/dist/src/utils/tailscale.d.ts.map +0 -1
  422. package/dist/src/utils/tailscale.js.map +0 -1
  423. package/dist/src/utils/temporal-auth.d.ts.map +0 -1
  424. package/dist/src/utils/temporal-auth.js.map +0 -1
  425. package/dist/src/utils/temporal-codec.d.ts.map +0 -1
  426. package/dist/src/utils/tunnel-ownership.d.ts.map +0 -1
  427. package/dist/src/utils/tunnel-ownership.js.map +0 -1
  428. package/dist/src/utils/vpn-join.d.ts.map +0 -1
  429. package/dist/src/utils/vpn-join.js.map +0 -1
  430. package/dist/src/utils/vpn.d.ts.map +0 -1
  431. package/dist/src/utils/vpn.js.map +0 -1
  432. package/dist/src/utils/workflow-fingerprint.d.ts.map +0 -1
  433. package/dist/src/utils/workflow-fingerprint.js.map +0 -1
  434. package/dist/src/utils/worktree-identity.d.ts.map +0 -1
  435. package/dist/src/utils/worktree-identity.js.map +0 -1
@@ -1,23 +1,3 @@
1
- /**
2
- * Docker runner for `mesh dev --local` (design §5.3, AC C2).
3
- *
4
- * The tmux runner stays the default on dev machines; `--runner docker` is
5
- * for environments where tmux isn't sensible — CI (the golden-path
6
- * workflow), headless agents, non-macOS boxes. It renders the SAME
7
- * synthesized DevOutput into a docker compose project:
8
- *
9
- * - one service per DevOutput service, `node:22-bookworm`, the app
10
- * bind-mounted at /workspace, `pnpm dev` in the service dir
11
- * - `network_mode: host` — services reach the `mesh start` platform on
12
- * localhost exactly like the tmux runner (Linux/CI semantics; on macOS
13
- * Docker Desktop host networking must be enabled, and host-installed
14
- * node_modules are platform-specific — tmux is the right runner there)
15
- * - per-service env files carrying the identical env contract
16
- * - logs ship through the same OTLP shipper (mounted from the CLI)
17
- *
18
- * Parity: `mesh dev --status|--kill|logs|restart` map to
19
- * `docker compose ps|down|logs|restart` via the session state's runner.
20
- */
21
1
  interface RunnerService {
22
2
  src: string;
23
3
  port: number;
@@ -26,7 +6,6 @@ interface RunnerService {
26
6
  value: string;
27
7
  }>;
28
8
  }
29
- /** Write the compose project for a dev session; returns the compose file path. */
30
9
  export declare function writeDevCompose(sessionName: string, appRoot: string, services: Record<string, RunnerService>): string;
31
10
  export declare function dockerDevUp(sessionName: string): void;
32
11
  export declare function dockerDevDown(sessionName: string): void;
@@ -34,4 +13,3 @@ export declare function dockerDevPs(sessionName: string): string;
34
13
  export declare function dockerDevLogs(sessionName: string, service: string, tail: number): string;
35
14
  export declare function dockerDevRestart(sessionName: string, service: string): void;
36
15
  export {};
37
- //# sourceMappingURL=docker-runner.d.ts.map
@@ -1,45 +1,21 @@
1
- /**
2
- * Docker runner for `mesh dev --local` (design §5.3, AC C2).
3
- *
4
- * The tmux runner stays the default on dev machines; `--runner docker` is
5
- * for environments where tmux isn't sensible — CI (the golden-path
6
- * workflow), headless agents, non-macOS boxes. It renders the SAME
7
- * synthesized DevOutput into a docker compose project:
8
- *
9
- * - one service per DevOutput service, `node:22-bookworm`, the app
10
- * bind-mounted at /workspace, `pnpm dev` in the service dir
11
- * - `network_mode: host` — services reach the `mesh start` platform on
12
- * localhost exactly like the tmux runner (Linux/CI semantics; on macOS
13
- * Docker Desktop host networking must be enabled, and host-installed
14
- * node_modules are platform-specific — tmux is the right runner there)
15
- * - per-service env files carrying the identical env contract
16
- * - logs ship through the same OTLP shipper (mounted from the CLI)
17
- *
18
- * Parity: `mesh dev --status|--kill|logs|restart` map to
19
- * `docker compose ps|down|logs|restart` via the session state's runner.
20
- */
21
1
  import { execFileSync } from "child_process";
22
2
  import * as fs from "fs";
23
3
  import * as path from "path";
24
4
  import { logShipperPath } from "./dev-local.js";
25
5
  import { meshCacheDir } from "../../utils/cache-home.js";
26
- // Digest-pinned so dev-runner containers are reproducible (matches the
27
- // pinning of the stack's third-party images).
28
6
  const DEV_RUNNER_IMAGE = "node:22-bookworm@sha256:5647be709086c696ff32edaaf1c70cd26d1da6ab2b39c32f3c7b4c4a31957e37";
29
7
  function sessionDir(sessionName) {
30
8
  return meshCacheDir("mesh-local", "dev", sessionName);
31
9
  }
32
- /** docker env-file format: KEY=VALUE, no quoting, single-line values only. */
33
10
  function renderDockerEnvFile(env) {
34
11
  const lines = [];
35
12
  for (const [key, entry] of Object.entries(env)) {
36
13
  if (entry.value.includes("\n"))
37
- continue; // multi-line values unsupported by env_file
14
+ continue;
38
15
  lines.push(`${key}=${entry.value}`);
39
16
  }
40
17
  return lines.join("\n") + "\n";
41
18
  }
42
- /** Write the compose project for a dev session; returns the compose file path. */
43
19
  export function writeDevCompose(sessionName, appRoot, services) {
44
20
  const dir = sessionDir(sessionName);
45
21
  const shipper = logShipperPath();
@@ -55,15 +31,7 @@ export function writeDevCompose(sessionName, appRoot, services) {
55
31
  const ship = env.OTEL_RESOURCE_ATTRIBUTES
56
32
  ? ` 2>&1 | NODE_OPTIONS= node /mesh-assets/log-shipper.mjs`
57
33
  : "";
58
- blocks.push(` ${name}:`, ` image: ${DEV_RUNNER_IMAGE}`, ` network_mode: host`, ` working_dir: ${workdir}`, ` volumes:`, ` - '${appRoot}:/workspace'`, ` - '${path.dirname(shipper)}:/mesh-assets:ro'`, ` environment:`,
59
- // node_modules is the HOST's bind-mounted install — pnpm inside the
60
- // container must never "verify" it and try a purge/reinstall (pnpm
61
- // ≥10.9's verify-deps-before-run prompts and dies headless; worse, a
62
- // purge would clobber the host install).
63
- ` CI: 'true'`, ` npm_config_verify_deps_before_run: 'false'`, ` env_file:`, ` - './${name}.env'`,
64
- // pipefail: the container's exit code must be the SERVICE's, not the
65
- // log-shipper's — otherwise a crashed service reports success (CI).
66
- ` command: ["bash", "-lc", "set -o pipefail; corepack enable >/dev/null 2>&1; { ${service.command.join(" ")}; }${ship}"]`, ` restart: unless-stopped`);
34
+ blocks.push(` ${name}:`, ` image: ${DEV_RUNNER_IMAGE}`, ` network_mode: host`, ` working_dir: ${workdir}`, ` volumes:`, ` - '${appRoot}:/workspace'`, ` - '${path.dirname(shipper)}:/mesh-assets:ro'`, ` environment:`, ` CI: 'true'`, ` npm_config_verify_deps_before_run: 'false'`, ` env_file:`, ` - './${name}.env'`, ` command: ["bash", "-lc", "set -o pipefail; corepack enable >/dev/null 2>&1; { ${service.command.join(" ")}; }${ship}"]`, ` restart: unless-stopped`);
67
35
  }
68
36
  const composePath = path.join(dir, "compose.yml");
69
37
  fs.writeFileSync(composePath, blocks.join("\n") + "\n");
@@ -99,4 +67,3 @@ export function dockerDevRestart(sessionName, service) {
99
67
  stdio: ["ignore", "inherit", "inherit"],
100
68
  });
101
69
  }
102
- //# sourceMappingURL=docker-runner.js.map
@@ -1,22 +1,8 @@
1
- /**
2
- * Small shared helpers for the local-platform commands — extracted from the
3
- * copies that had grown in auth-provision/mocks (secret upsert) and
4
- * dev-local/stack (TCP probe).
5
- */
6
- /** The subset of SecretsManagerClient upsertLocalSecret depends on. */
7
1
  export interface SecretsSender {
8
2
  send(command: unknown): Promise<unknown>;
9
3
  }
10
- /**
11
- * Create-or-update a Secrets Manager secret in the local AWS fabric
12
- * (ministack). Create first; on ResourceExistsException, put a new value.
13
- * `client` is injectable for tests; defaults to a client against the local
14
- * fabric.
15
- */
16
4
  export declare function upsertLocalSecret(secretId: string, value: Record<string, string>, client?: SecretsSender): Promise<void>;
17
- /** True when a TCP connect to host:port succeeds within timeoutMs. */
18
5
  export declare function probeTcp(port: number, opts?: {
19
6
  host?: string;
20
7
  timeoutMs?: number;
21
8
  }): Promise<boolean>;
22
- //# sourceMappingURL=helpers.d.ts.map
@@ -1,16 +1,5 @@
1
- /**
2
- * Small shared helpers for the local-platform commands — extracted from the
3
- * copies that had grown in auth-provision/mocks (secret upsert) and
4
- * dev-local/stack (TCP probe).
5
- */
6
1
  import * as net from "net";
7
2
  import { LOCAL_AWS_CONFIG } from "./seed.js";
8
- /**
9
- * Create-or-update a Secrets Manager secret in the local AWS fabric
10
- * (ministack). Create first; on ResourceExistsException, put a new value.
11
- * `client` is injectable for tests; defaults to a client against the local
12
- * fabric.
13
- */
14
3
  export async function upsertLocalSecret(secretId, value, client) {
15
4
  const { SecretsManagerClient, CreateSecretCommand, PutSecretValueCommand } = await import("@aws-sdk/client-secrets-manager");
16
5
  const sm = client ?? new SecretsManagerClient(LOCAL_AWS_CONFIG);
@@ -27,7 +16,6 @@ export async function upsertLocalSecret(secretId, value, client) {
27
16
  }
28
17
  }
29
18
  }
30
- /** True when a TCP connect to host:port succeeds within timeoutMs. */
31
19
  export function probeTcp(port, opts = {}) {
32
20
  const { host = "127.0.0.1", timeoutMs = 2000 } = opts;
33
21
  return new Promise((resolve) => {
@@ -43,4 +31,3 @@ export function probeTcp(port, opts = {}) {
43
31
  });
44
32
  });
45
33
  }
46
- //# sourceMappingURL=helpers.js.map
@@ -1,28 +1,7 @@
1
- /**
2
- * Local Hub image builder (`mesh start --with-hub`) — the interim path
3
- * until the hub pipeline publishes pullable container images (design §11).
4
- *
5
- * Resolves the published @mesh-tech/hub tarball with the user's registry
6
- * auth (mesh registry login), extracts it, and docker-builds two images
7
- * from the prebuilt dists it ships (api/dist → mesh-local-hub-api,
8
- * ui/build → mesh-local-hub-ui). The CodeArtifact token enters the build
9
- * as a BuildKit secret and never lands in a layer. Idempotent: images are
10
- * keyed by the package version and rebuilt only when missing.
11
- */
12
1
  import { type RegistryTokenState } from "../../utils/auth-preflight.js";
13
2
  export declare const HUB_IMAGES: readonly ["mesh-local-hub-api", "mesh-local-hub-ui"];
14
- /**
15
- * Build the Hub's oauth2-proxy image (hosted sidecar + loopback issuer
16
- * forward). Public base images only — no registry auth involved.
17
- */
18
3
  export declare function ensureHubAuthImage(): void;
19
- /** Registry auth present? (Needed only to BUILD hub images, not to run them.) */
20
4
  export declare function hasRegistryAuth(): boolean;
21
- /**
22
- * Newest hub version whose images already exist locally — lets `mesh start`
23
- * include the Hub by default with no network and no registry auth. Returns
24
- * undefined when no built images are present.
25
- */
26
5
  export declare function localHubVersion(): string | undefined;
27
6
  export type WithHubPlan = {
28
7
  action: "refresh";
@@ -35,90 +14,15 @@ export type WithHubPlan = {
35
14
  message: string;
36
15
  remediation: string;
37
16
  };
38
- /**
39
- * Pure: decide what `mesh start --with-hub` does given the registry probe
40
- * and any already-built local images. Only a *refresh* needs the registry —
41
- * already-built images run without it, so an expired/missing token degrades
42
- * to those (with the fixing command) instead of hard-failing a path that
43
- * works offline (MESH-2479).
44
- */
45
17
  export declare function planWithHubRefresh(probeState: RegistryTokenState, builtVersion: string | undefined): WithHubPlan;
46
- /**
47
- * Ensure the two local hub images exist; build them from the tarball when
48
- * missing. Returns the hub version (used as the compose image tag).
49
- */
50
18
  export declare function ensureHubImages(): Promise<string>;
51
- /** Where the packed Hub ships its compiled authz catalog (`compile-authz.ts`). */
52
19
  export declare const HUB_COMPILED_AUTHZ_REL = "api/dist/authz/compiled.json";
53
- /** The compiled catalog artifact: `{ zed, metadata }`, the shape `SpiceDBSchema` takes. */
54
20
  export type HubCompiledAuthz = {
55
21
  zed: string;
56
22
  metadata: Record<string, unknown>;
57
23
  };
58
- /**
59
- * The cached tarball a local image version was built from, or null for a
60
- * from-source build (`<version>-src`), which never has one.
61
- *
62
- * @example
63
- * ```typescript
64
- * tarballNameForImageVersion("2.2.0-r2"); // => "mesh-tech-hub-2.2.0.tgz"
65
- * tarballNameForImageVersion("2.2.0-src"); // => null
66
- * ```
67
- */
68
24
  export declare function tarballNameForImageVersion(version: string): string | null;
69
- /**
70
- * Read the compiled authz catalog of the Hub whose images `mesh start` runs.
71
- *
72
- * The staged build context (`context-<version>/`) carries it after a build; when
73
- * the images already existed nothing was staged, so the one file is extracted
74
- * from the cached tarball on demand. Returns null for a Hub that ships no
75
- * catalog (published before 2.1.0) — the caller says so and moves on.
76
- */
77
25
  export declare function readHubCompiledAuthz(version: string): HubCompiledAuthz | null;
78
- /**
79
- * The workspace's default pnpm catalog, as `{ dependency: range }`.
80
- *
81
- * Nested manifests inside the packed Hub (`api/package.json`, `ui/package.json`)
82
- * reference shared versions as `catalog:`. pnpm resolves that on publish for the
83
- * package's OWN manifest only — the nested ones ship the literal `catalog:`, and
84
- * `npm install` inside the image rejects it with `EUNSUPPORTEDPROTOCOL`.
85
- */
86
26
  export declare function readWorkspaceCatalog(repoRoot: string): Record<string, string>;
87
- /**
88
- * Make an extracted Hub tarball installable by plain `npm` inside the image.
89
- *
90
- * Two rewrites, both on the NESTED manifests the Dockerfiles copy:
91
- *
92
- * - `catalog:` → the range the workspace catalog pins.
93
- * - `workspace:*` dependencies are DROPPED. Every deployed Hub entrypoint is
94
- * bundled by `esm-bundle`, so no `@mesh-tech/*`
95
- * or `@libs/*` import survives into `api/dist` / `ui/build` — installing them
96
- * would fetch PUBLISHED copies that nothing imports, and for a package being
97
- * changed in this checkout that published copy is precisely the wrong code.
98
- * - `devDependencies` are DROPPED wholesale. Both Dockerfiles install with
99
- * `--omit=dev`, so nothing in the image ever needs them — but npm still
100
- * resolves them into the ideal tree before omitting, and the Hub's dev set
101
- * (vitest, tsx, the React Router toolchain) trips a peer-conflict crash in
102
- * the image's npm 10 (`Cannot read properties of null (reading 'edgesOut')`
103
- * in arborist's `#loadPeerSet`) that fails the build before a single layer
104
- * is written. Reproduced on the normalized `api/package.json` alone; the
105
- * same manifest installs clean without the block.
106
- *
107
- * Returns the manifests it touched, for the caller to log.
108
- */
109
27
  export declare function normalizeHubManifests(contextDir: string, catalog: Record<string, string>): string[];
110
- /**
111
- * Build the local Hub images from THIS checkout instead of the registry.
112
- *
113
- * `mesh start`'s Hub normally comes from the published `@mesh-tech/hub` tarball,
114
- * which makes it the one environment where a Hub change cannot be exercised
115
- * before it ships. This packs `apps/hub` exactly as a release would — same
116
- * `files` allowlist, same Dockerfiles — so the containerized Hub, its auth proxy
117
- * and its login flow all stay identical; only the code inside changes.
118
- *
119
- * Images are tagged `<version>-src` so they can never be mistaken for, or reused
120
- * as, a published build, and are rebuilt every call: the whole point is to pick
121
- * up working-tree changes.
122
- */
123
28
  export declare function buildHubImagesFromSource(repoRoot: string): Promise<string>;
124
- //# sourceMappingURL=hub-local.d.ts.map
@@ -1,14 +1,3 @@
1
- /**
2
- * Local Hub image builder (`mesh start --with-hub`) — the interim path
3
- * until the hub pipeline publishes pullable container images (design §11).
4
- *
5
- * Resolves the published @mesh-tech/hub tarball with the user's registry
6
- * auth (mesh registry login), extracts it, and docker-builds two images
7
- * from the prebuilt dists it ships (api/dist → mesh-local-hub-api,
8
- * ui/build → mesh-local-hub-ui). The CodeArtifact token enters the build
9
- * as a BuildKit secret and never lands in a layer. Idempotent: images are
10
- * keyed by the package version and rebuilt only when missing.
11
- */
12
1
  import { execFile, execFileSync } from "child_process";
13
2
  import * as fs from "fs";
14
3
  import * as os from "os";
@@ -22,8 +11,6 @@ import { meshCacheDir } from "../../utils/cache-home.js";
22
11
  const execFileAsync = promisify(execFile);
23
12
  const HUB_PACKAGE = "@mesh-tech/hub";
24
13
  export const HUB_IMAGES = ["mesh-local-hub-api", "mesh-local-hub-ui"];
25
- /** Bump when stack/hub/Dockerfile.* change — forces a rebuild of images
26
- * already cached for the same published hub version. */
27
14
  const LOCAL_IMAGE_REV = "r2";
28
15
  function cacheDir() {
29
16
  return meshCacheDir("hub-local");
@@ -44,12 +31,7 @@ function imageExists(tag) {
44
31
  return false;
45
32
  }
46
33
  }
47
- /** Tag referenced by docker-compose.hub.yml — bump alongside Dockerfile.auth. */
48
34
  const HUB_AUTH_IMAGE = "mesh-local-hub-auth:v7.7.1-r1";
49
- /**
50
- * Build the Hub's oauth2-proxy image (hosted sidecar + loopback issuer
51
- * forward). Public base images only — no registry auth involved.
52
- */
53
35
  export function ensureHubAuthImage() {
54
36
  if (imageExists(HUB_AUTH_IMAGE))
55
37
  return;
@@ -58,16 +40,10 @@ export function ensureHubAuthImage() {
58
40
  execFileSync("docker", ["build", "-f", path.join(hubStackDir, "Dockerfile.auth"), "-t", HUB_AUTH_IMAGE, hubStackDir], { stdio: ["ignore", "inherit", "inherit"], env: { ...process.env, DOCKER_BUILDKIT: "1" } });
59
41
  logSuccess(`Built ${HUB_AUTH_IMAGE}`);
60
42
  }
61
- /** Registry auth present? (Needed only to BUILD hub images, not to run them.) */
62
43
  export function hasRegistryAuth() {
63
44
  const p = path.join(os.homedir(), ".npmrc");
64
45
  return fs.existsSync(p) && fs.readFileSync(p, "utf-8").includes("codeartifact");
65
46
  }
66
- /**
67
- * Newest hub version whose images already exist locally — lets `mesh start`
68
- * include the Hub by default with no network and no registry auth. Returns
69
- * undefined when no built images are present.
70
- */
71
47
  export function localHubVersion() {
72
48
  const versions = HUB_IMAGES.map((name) => {
73
49
  try {
@@ -84,13 +60,8 @@ export function localHubVersion() {
84
60
  const shared = versions[0].filter((v) => v.endsWith(`-${LOCAL_IMAGE_REV}`) && versions.every((list) => list.includes(v)));
85
61
  if (shared.length === 0)
86
62
  return undefined;
87
- // Highest semver wins (numeric-aware compare handles the -rN suffix).
88
63
  return shared.sort((a, b) => a.localeCompare(b, undefined, { numeric: true })).at(-1);
89
64
  }
90
- /** `npm pack` the published hub tarball into the cache; returns its path +
91
- * version. Falls back to the newest cached tarball when the registry is
92
- * unreachable (offline / expired token). Async so the heartbeat can fill
93
- * silence during the fetch — a first run's slowest, quietest step. */
94
65
  async function fetchTarball() {
95
66
  const dir = cacheDir();
96
67
  logInfo(`Resolving ${HUB_PACKAGE} from the registry…`);
@@ -108,8 +79,6 @@ async function fetchTarball() {
108
79
  .sort((a, b) => a.localeCompare(b, undefined, { numeric: true }))
109
80
  .at(-1);
110
81
  if (!cached) {
111
- // Map npm's E401 ("try npm login") to the Mesh fix — npm login can
112
- // never mint a CodeArtifact token (MESH-2479).
113
82
  if (authFailure) {
114
83
  throw new MeshCliError(`The registry rejected the ${HUB_PACKAGE} tarball fetch (E401 Unauthorized) — your CodeArtifact token is expired or invalid. (npm's "try npm login" advice does not apply to this registry.)`, { remediation: { command: REGISTRY_LOGIN_FIX }, cause: err });
115
84
  }
@@ -128,13 +97,6 @@ async function fetchTarball() {
128
97
  heartbeat.stop();
129
98
  }
130
99
  }
131
- /**
132
- * Pure: decide what `mesh start --with-hub` does given the registry probe
133
- * and any already-built local images. Only a *refresh* needs the registry —
134
- * already-built images run without it, so an expired/missing token degrades
135
- * to those (with the fixing command) instead of hard-failing a path that
136
- * works offline (MESH-2479).
137
- */
138
100
  export function planWithHubRefresh(probeState, builtVersion) {
139
101
  if (probeState !== "expired" && probeState !== "missing")
140
102
  return { action: "refresh" };
@@ -154,10 +116,6 @@ export function planWithHubRefresh(probeState, builtVersion) {
154
116
  remediation: REGISTRY_LOGIN_FIX,
155
117
  };
156
118
  }
157
- /**
158
- * Ensure the two local hub images exist; build them from the tarball when
159
- * missing. Returns the hub version (used as the compose image tag).
160
- */
161
119
  export async function ensureHubImages() {
162
120
  const npmrc = npmrcPath();
163
121
  const { tarball, version: packageVersion } = await fetchTarball();
@@ -193,32 +151,12 @@ export async function ensureHubImages() {
193
151
  }
194
152
  return version;
195
153
  }
196
- // ── the Hub's compiled authz catalog ─────────────────────────────────────────
197
- /** Where the packed Hub ships its compiled authz catalog (`compile-authz.ts`). */
198
154
  export const HUB_COMPILED_AUTHZ_REL = "api/dist/authz/compiled.json";
199
- /**
200
- * The cached tarball a local image version was built from, or null for a
201
- * from-source build (`<version>-src`), which never has one.
202
- *
203
- * @example
204
- * ```typescript
205
- * tarballNameForImageVersion("2.2.0-r2"); // => "mesh-tech-hub-2.2.0.tgz"
206
- * tarballNameForImageVersion("2.2.0-src"); // => null
207
- * ```
208
- */
209
155
  export function tarballNameForImageVersion(version) {
210
156
  if (version.endsWith("-src"))
211
157
  return null;
212
158
  return `mesh-tech-hub-${version.replace(/-r\d+$/, "")}.tgz`;
213
159
  }
214
- /**
215
- * Read the compiled authz catalog of the Hub whose images `mesh start` runs.
216
- *
217
- * The staged build context (`context-<version>/`) carries it after a build; when
218
- * the images already existed nothing was staged, so the one file is extracted
219
- * from the cached tarball on demand. Returns null for a Hub that ships no
220
- * catalog (published before 2.1.0) — the caller says so and moves on.
221
- */
222
160
  export function readHubCompiledAuthz(version) {
223
161
  const context = path.join(cacheDir(), `context-${version}`);
224
162
  const file = path.join(context, HUB_COMPILED_AUTHZ_REL);
@@ -241,15 +179,6 @@ export function readHubCompiledAuthz(version) {
241
179
  return null;
242
180
  return { zed: parsed.zed, metadata: parsed.metadata };
243
181
  }
244
- // ── from-source build (`mesh start --hub-from-source`) ──────────────────────
245
- /**
246
- * The workspace's default pnpm catalog, as `{ dependency: range }`.
247
- *
248
- * Nested manifests inside the packed Hub (`api/package.json`, `ui/package.json`)
249
- * reference shared versions as `catalog:`. pnpm resolves that on publish for the
250
- * package's OWN manifest only — the nested ones ship the literal `catalog:`, and
251
- * `npm install` inside the image rejects it with `EUNSUPPORTEDPROTOCOL`.
252
- */
253
182
  export function readWorkspaceCatalog(repoRoot) {
254
183
  const text = fs.readFileSync(path.join(repoRoot, "pnpm-workspace.yaml"), "utf-8");
255
184
  const marker = "\ncatalog:\n";
@@ -258,7 +187,6 @@ export function readWorkspaceCatalog(repoRoot) {
258
187
  return {};
259
188
  const catalog = {};
260
189
  for (const line of text.slice(at + marker.length).split("\n")) {
261
- // The block ends at the first line that is neither indented nor blank.
262
190
  if (line.trim() !== "" && !/^\s/.test(line))
263
191
  break;
264
192
  const m = /^\s+"?([^":\s]+)"?:\s*"?([^"\s#]+)"?/.exec(line);
@@ -267,28 +195,6 @@ export function readWorkspaceCatalog(repoRoot) {
267
195
  }
268
196
  return catalog;
269
197
  }
270
- /**
271
- * Make an extracted Hub tarball installable by plain `npm` inside the image.
272
- *
273
- * Two rewrites, both on the NESTED manifests the Dockerfiles copy:
274
- *
275
- * - `catalog:` → the range the workspace catalog pins.
276
- * - `workspace:*` dependencies are DROPPED. Every deployed Hub entrypoint is
277
- * bundled by `esm-bundle`, so no `@mesh-tech/*`
278
- * or `@libs/*` import survives into `api/dist` / `ui/build` — installing them
279
- * would fetch PUBLISHED copies that nothing imports, and for a package being
280
- * changed in this checkout that published copy is precisely the wrong code.
281
- * - `devDependencies` are DROPPED wholesale. Both Dockerfiles install with
282
- * `--omit=dev`, so nothing in the image ever needs them — but npm still
283
- * resolves them into the ideal tree before omitting, and the Hub's dev set
284
- * (vitest, tsx, the React Router toolchain) trips a peer-conflict crash in
285
- * the image's npm 10 (`Cannot read properties of null (reading 'edgesOut')`
286
- * in arborist's `#loadPeerSet`) that fails the build before a single layer
287
- * is written. Reproduced on the normalized `api/package.json` alone; the
288
- * same manifest installs clean without the block.
289
- *
290
- * Returns the manifests it touched, for the caller to log.
291
- */
292
198
  export function normalizeHubManifests(contextDir, catalog) {
293
199
  const DEP_FIELDS = ["dependencies", "optionalDependencies", "peerDependencies"];
294
200
  const touched = [];
@@ -333,19 +239,6 @@ export function normalizeHubManifests(contextDir, catalog) {
333
239
  }
334
240
  return touched;
335
241
  }
336
- /**
337
- * Build the local Hub images from THIS checkout instead of the registry.
338
- *
339
- * `mesh start`'s Hub normally comes from the published `@mesh-tech/hub` tarball,
340
- * which makes it the one environment where a Hub change cannot be exercised
341
- * before it ships. This packs `apps/hub` exactly as a release would — same
342
- * `files` allowlist, same Dockerfiles — so the containerized Hub, its auth proxy
343
- * and its login flow all stay identical; only the code inside changes.
344
- *
345
- * Images are tagged `<version>-src` so they can never be mistaken for, or reused
346
- * as, a published build, and are rebuilt every call: the whole point is to pick
347
- * up working-tree changes.
348
- */
349
242
  export async function buildHubImagesFromSource(repoRoot) {
350
243
  const hubDir = path.join(repoRoot, "apps", "hub");
351
244
  if (!fs.existsSync(path.join(hubDir, "package.json"))) {
@@ -365,9 +258,6 @@ export async function buildHubImagesFromSource(repoRoot) {
365
258
  const context = path.join(cacheDir(), `context-${version}`);
366
259
  fs.rmSync(context, { recursive: true, force: true });
367
260
  fs.mkdirSync(context, { recursive: true });
368
- // `pnpm pack` applies the package's own `files` allowlist, so the context is
369
- // byte-for-byte what a release would ship — not a hand-assembled copy that
370
- // could omit something the published path includes.
371
261
  await execFileAsync("pnpm", ["pack", "--pack-destination", context], { cwd: hubDir, maxBuffer: 64 * 1024 * 1024 });
372
262
  const tarball = fs.readdirSync(context).find((f) => f.endsWith(".tgz"));
373
263
  if (!tarball)
@@ -390,4 +280,3 @@ export async function buildHubImagesFromSource(repoRoot) {
390
280
  }
391
281
  return version;
392
282
  }
393
- //# sourceMappingURL=hub-local.js.map
@@ -1,18 +1,5 @@
1
- /**
2
- * mesh start / stop / status — the full-local Mesh platform.
3
- *
4
- * mesh start [--no-seed] Bring up the local platform (docker compose) and
5
- * seed tenant `local` / env `dev` on first boot.
6
- * mesh stop [--destroy] Stop the stack; --destroy also removes volumes
7
- * (resets databases and seeds).
8
- * mesh status [--json] Per-service health, endpoints, and ports.
9
- *
10
- * Everything here works with zero AWS credentials, zero VPN, and zero Pulumi
11
- * state — Docker is the only prerequisite.
12
- */
13
1
  import { Command } from "commander";
14
2
  import { type ServiceStatus, type StackEndpoint } from "./stack.js";
15
- /** Injectable seams so tests can drive the wait loop without Docker. */
16
3
  export interface WaitForStackIo {
17
4
  probe: (endpoint: StackEndpoint) => Promise<boolean>;
18
5
  services: () => ServiceStatus[];
@@ -20,4 +7,3 @@ export interface WaitForStackIo {
20
7
  }
21
8
  export declare function waitForStack(io?: WaitForStackIo): Promise<void>;
22
9
  export declare function registerLocalCommands(program: Command): void;
23
- //# sourceMappingURL=index.d.ts.map