@vendure/cloud 0.2.0 → 0.3.0

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 (552) hide show
  1. package/README.md +42 -7
  2. package/dist/cli/arguments.d.ts +5 -0
  3. package/dist/cli/arguments.d.ts.map +1 -0
  4. package/dist/cli/arguments.js +57 -0
  5. package/dist/cli/arguments.js.map +1 -0
  6. package/dist/cli/command.d.ts +26 -0
  7. package/dist/cli/command.d.ts.map +1 -0
  8. package/dist/cli/command.js +84 -0
  9. package/dist/cli/command.js.map +1 -0
  10. package/dist/cli/commands/deployment/arguments.d.ts +3 -0
  11. package/dist/cli/commands/deployment/arguments.d.ts.map +1 -0
  12. package/dist/cli/commands/deployment/arguments.js +13 -0
  13. package/dist/cli/commands/deployment/arguments.js.map +1 -0
  14. package/dist/cli/commands/deployment/build-logs.d.ts +3 -0
  15. package/dist/cli/commands/deployment/build-logs.d.ts.map +1 -0
  16. package/dist/cli/commands/deployment/build-logs.js +98 -0
  17. package/dist/cli/commands/deployment/build-logs.js.map +1 -0
  18. package/dist/cli/commands/deployment/deploy.d.ts +3 -0
  19. package/dist/cli/commands/deployment/deploy.d.ts.map +1 -0
  20. package/dist/cli/commands/deployment/deploy.js +306 -0
  21. package/dist/cli/commands/deployment/deploy.js.map +1 -0
  22. package/dist/cli/commands/deployment/index.d.ts +3 -0
  23. package/dist/cli/commands/deployment/index.d.ts.map +1 -0
  24. package/dist/cli/commands/deployment/index.js +177 -0
  25. package/dist/cli/commands/deployment/index.js.map +1 -0
  26. package/dist/cli/commands/deployment/list.d.ts +3 -0
  27. package/dist/cli/commands/deployment/list.d.ts.map +1 -0
  28. package/dist/cli/commands/deployment/list.js +77 -0
  29. package/dist/cli/commands/deployment/list.js.map +1 -0
  30. package/dist/cli/commands/deployment/logs.d.ts +3 -0
  31. package/dist/cli/commands/deployment/logs.d.ts.map +1 -0
  32. package/dist/cli/commands/deployment/logs.js +88 -0
  33. package/dist/cli/commands/deployment/logs.js.map +1 -0
  34. package/dist/cli/commands/deployment/options.d.ts +11 -0
  35. package/dist/cli/commands/deployment/options.d.ts.map +1 -0
  36. package/dist/cli/commands/deployment/options.js +37 -0
  37. package/dist/cli/commands/deployment/options.js.map +1 -0
  38. package/dist/cli/commands/deployment/plan-format.d.ts +8 -0
  39. package/dist/cli/commands/deployment/plan-format.d.ts.map +1 -0
  40. package/dist/cli/commands/deployment/plan-format.js +25 -0
  41. package/dist/cli/commands/deployment/plan-format.js.map +1 -0
  42. package/dist/cli/commands/deployment/plan.d.ts +3 -0
  43. package/dist/cli/commands/deployment/plan.d.ts.map +1 -0
  44. package/dist/cli/commands/deployment/plan.js +54 -0
  45. package/dist/cli/commands/deployment/plan.js.map +1 -0
  46. package/dist/cli/commands/deployment/rollback.d.ts +3 -0
  47. package/dist/cli/commands/deployment/rollback.d.ts.map +1 -0
  48. package/dist/cli/commands/deployment/rollback.js +97 -0
  49. package/dist/cli/commands/deployment/rollback.js.map +1 -0
  50. package/dist/cli/commands/deployment/shared.d.ts +5 -0
  51. package/dist/cli/commands/deployment/shared.d.ts.map +1 -0
  52. package/dist/cli/commands/deployment/shared.js +23 -0
  53. package/dist/cli/commands/deployment/shared.js.map +1 -0
  54. package/dist/cli/commands/deployment/show.d.ts +3 -0
  55. package/dist/cli/commands/deployment/show.d.ts.map +1 -0
  56. package/dist/cli/commands/deployment/show.js +71 -0
  57. package/dist/cli/commands/deployment/show.js.map +1 -0
  58. package/dist/cli/commands/deployment/source.d.ts +14 -0
  59. package/dist/cli/commands/deployment/source.d.ts.map +1 -0
  60. package/dist/cli/commands/deployment/source.js +19 -0
  61. package/dist/cli/commands/deployment/source.js.map +1 -0
  62. package/dist/cli/commands/deployment/status.d.ts +3 -0
  63. package/dist/cli/commands/deployment/status.d.ts.map +1 -0
  64. package/dist/cli/commands/deployment/status.js +59 -0
  65. package/dist/cli/commands/deployment/status.js.map +1 -0
  66. package/dist/cli/commands/deployment/teardown.d.ts +3 -0
  67. package/dist/cli/commands/deployment/teardown.d.ts.map +1 -0
  68. package/dist/cli/commands/deployment/teardown.js +178 -0
  69. package/dist/cli/commands/deployment/teardown.js.map +1 -0
  70. package/dist/cli/commands/identity-context/context.d.ts +3 -0
  71. package/dist/cli/commands/identity-context/context.d.ts.map +1 -0
  72. package/dist/cli/commands/identity-context/context.js +47 -0
  73. package/dist/cli/commands/identity-context/context.js.map +1 -0
  74. package/dist/cli/commands/identity-context/index.d.ts +2 -0
  75. package/dist/cli/commands/identity-context/index.d.ts.map +1 -0
  76. package/dist/cli/commands/identity-context/index.js +94 -0
  77. package/dist/cli/commands/identity-context/index.js.map +1 -0
  78. package/dist/cli/commands/identity-context/keys.d.ts +5 -0
  79. package/dist/cli/commands/identity-context/keys.d.ts.map +1 -0
  80. package/dist/cli/commands/identity-context/keys.js +52 -0
  81. package/dist/cli/commands/identity-context/keys.js.map +1 -0
  82. package/dist/cli/commands/identity-context/login.d.ts +2 -0
  83. package/dist/cli/commands/identity-context/login.d.ts.map +1 -0
  84. package/dist/cli/commands/identity-context/login.js +158 -0
  85. package/dist/cli/commands/identity-context/login.js.map +1 -0
  86. package/dist/cli/commands/identity-context/logout.d.ts +2 -0
  87. package/dist/cli/commands/identity-context/logout.d.ts.map +1 -0
  88. package/dist/cli/commands/identity-context/logout.js +12 -0
  89. package/dist/cli/commands/identity-context/logout.js.map +1 -0
  90. package/dist/cli/commands/identity-context/org-switch.d.ts +3 -0
  91. package/dist/cli/commands/identity-context/org-switch.d.ts.map +1 -0
  92. package/dist/cli/commands/identity-context/org-switch.js +71 -0
  93. package/dist/cli/commands/identity-context/org-switch.js.map +1 -0
  94. package/dist/cli/commands/identity-context/use.d.ts +3 -0
  95. package/dist/cli/commands/identity-context/use.d.ts.map +1 -0
  96. package/dist/cli/commands/identity-context/use.js +23 -0
  97. package/dist/cli/commands/identity-context/use.js.map +1 -0
  98. package/dist/cli/commands/identity-context/whoami.d.ts +3 -0
  99. package/dist/cli/commands/identity-context/whoami.d.ts.map +1 -0
  100. package/dist/cli/commands/identity-context/whoami.js +80 -0
  101. package/dist/cli/commands/identity-context/whoami.js.map +1 -0
  102. package/dist/cli/commands/index.d.ts +4 -0
  103. package/dist/cli/commands/index.d.ts.map +1 -0
  104. package/dist/cli/commands/index.js +67 -0
  105. package/dist/cli/commands/index.js.map +1 -0
  106. package/dist/cli/commands/project-config/config/build-fields.d.ts +4 -0
  107. package/dist/cli/commands/project-config/config/build-fields.d.ts.map +1 -0
  108. package/dist/cli/commands/project-config/config/build-fields.js +16 -0
  109. package/dist/cli/commands/project-config/config/build-fields.js.map +1 -0
  110. package/dist/cli/commands/project-config/config/build.d.ts +4 -0
  111. package/dist/cli/commands/project-config/config/build.d.ts.map +1 -0
  112. package/dist/cli/commands/project-config/config/build.js +46 -0
  113. package/dist/cli/commands/project-config/config/build.js.map +1 -0
  114. package/dist/cli/commands/project-config/config/desired-state.d.ts +4 -0
  115. package/dist/cli/commands/project-config/config/desired-state.d.ts.map +1 -0
  116. package/dist/cli/commands/project-config/config/desired-state.js +34 -0
  117. package/dist/cli/commands/project-config/config/desired-state.js.map +1 -0
  118. package/dist/cli/commands/project-config/config/index.d.ts +2 -0
  119. package/dist/cli/commands/project-config/config/index.d.ts.map +1 -0
  120. package/dist/cli/commands/project-config/config/index.js +177 -0
  121. package/dist/cli/commands/project-config/config/index.js.map +1 -0
  122. package/dist/cli/commands/project-config/config/runtime.d.ts +3 -0
  123. package/dist/cli/commands/project-config/config/runtime.d.ts.map +1 -0
  124. package/dist/cli/commands/project-config/config/runtime.js +38 -0
  125. package/dist/cli/commands/project-config/config/runtime.js.map +1 -0
  126. package/dist/cli/commands/project-config/config/search.d.ts +3 -0
  127. package/dist/cli/commands/project-config/config/search.d.ts.map +1 -0
  128. package/dist/cli/commands/project-config/config/search.js +54 -0
  129. package/dist/cli/commands/project-config/config/search.js.map +1 -0
  130. package/dist/cli/commands/project-config/config/set.d.ts +2 -0
  131. package/dist/cli/commands/project-config/config/set.d.ts.map +1 -0
  132. package/dist/cli/commands/project-config/config/set.js +14 -0
  133. package/dist/cli/commands/project-config/config/set.js.map +1 -0
  134. package/dist/cli/commands/project-config/config/show.d.ts +6 -0
  135. package/dist/cli/commands/project-config/config/show.d.ts.map +1 -0
  136. package/dist/cli/commands/project-config/config/show.js +33 -0
  137. package/dist/cli/commands/project-config/config/show.js.map +1 -0
  138. package/dist/cli/commands/project-config/env/add.d.ts +3 -0
  139. package/dist/cli/commands/project-config/env/add.d.ts.map +1 -0
  140. package/dist/cli/commands/project-config/env/add.js +22 -0
  141. package/dist/cli/commands/project-config/env/add.js.map +1 -0
  142. package/dist/cli/commands/project-config/env/get.d.ts +3 -0
  143. package/dist/cli/commands/project-config/env/get.d.ts.map +1 -0
  144. package/dist/cli/commands/project-config/env/get.js +12 -0
  145. package/dist/cli/commands/project-config/env/get.js.map +1 -0
  146. package/dist/cli/commands/project-config/env/import.d.ts +3 -0
  147. package/dist/cli/commands/project-config/env/import.d.ts.map +1 -0
  148. package/dist/cli/commands/project-config/env/import.js +45 -0
  149. package/dist/cli/commands/project-config/env/import.js.map +1 -0
  150. package/dist/cli/commands/project-config/env/index.d.ts +2 -0
  151. package/dist/cli/commands/project-config/env/index.d.ts.map +1 -0
  152. package/dist/cli/commands/project-config/env/index.js +103 -0
  153. package/dist/cli/commands/project-config/env/index.js.map +1 -0
  154. package/dist/cli/commands/project-config/env/list.d.ts +3 -0
  155. package/dist/cli/commands/project-config/env/list.d.ts.map +1 -0
  156. package/dist/cli/commands/project-config/env/list.js +25 -0
  157. package/dist/cli/commands/project-config/env/list.js.map +1 -0
  158. package/dist/cli/commands/project-config/env/metadata-options.d.ts +9 -0
  159. package/dist/cli/commands/project-config/env/metadata-options.d.ts.map +1 -0
  160. package/dist/cli/commands/project-config/env/metadata-options.js +32 -0
  161. package/dist/cli/commands/project-config/env/metadata-options.js.map +1 -0
  162. package/dist/cli/commands/project-config/env/pull.d.ts +3 -0
  163. package/dist/cli/commands/project-config/env/pull.d.ts.map +1 -0
  164. package/dist/cli/commands/project-config/env/pull.js +50 -0
  165. package/dist/cli/commands/project-config/env/pull.js.map +1 -0
  166. package/dist/cli/commands/project-config/env/read-value.d.ts +3 -0
  167. package/dist/cli/commands/project-config/env/read-value.d.ts.map +1 -0
  168. package/dist/cli/commands/project-config/env/read-value.js +20 -0
  169. package/dist/cli/commands/project-config/env/read-value.js.map +1 -0
  170. package/dist/cli/commands/project-config/env/rm.d.ts +3 -0
  171. package/dist/cli/commands/project-config/env/rm.d.ts.map +1 -0
  172. package/dist/cli/commands/project-config/env/rm.js +23 -0
  173. package/dist/cli/commands/project-config/env/rm.js.map +1 -0
  174. package/dist/cli/commands/project-config/env/run.d.ts +3 -0
  175. package/dist/cli/commands/project-config/env/run.d.ts.map +1 -0
  176. package/dist/cli/commands/project-config/env/run.js +28 -0
  177. package/dist/cli/commands/project-config/env/run.js.map +1 -0
  178. package/dist/cli/commands/project-config/env/update.d.ts +3 -0
  179. package/dist/cli/commands/project-config/env/update.d.ts.map +1 -0
  180. package/dist/cli/commands/project-config/env/update.js +32 -0
  181. package/dist/cli/commands/project-config/env/update.js.map +1 -0
  182. package/dist/cli/commands/project-config/environment/create.d.ts +3 -0
  183. package/dist/cli/commands/project-config/environment/create.d.ts.map +1 -0
  184. package/dist/cli/commands/project-config/environment/create.js +33 -0
  185. package/dist/cli/commands/project-config/environment/create.js.map +1 -0
  186. package/dist/cli/commands/project-config/environment/delete.d.ts +3 -0
  187. package/dist/cli/commands/project-config/environment/delete.d.ts.map +1 -0
  188. package/dist/cli/commands/project-config/environment/delete.js +42 -0
  189. package/dist/cli/commands/project-config/environment/delete.js.map +1 -0
  190. package/dist/cli/commands/project-config/environment/find.d.ts +7 -0
  191. package/dist/cli/commands/project-config/environment/find.d.ts.map +1 -0
  192. package/dist/cli/commands/project-config/environment/find.js +18 -0
  193. package/dist/cli/commands/project-config/environment/find.js.map +1 -0
  194. package/dist/cli/commands/project-config/environment/index.d.ts +2 -0
  195. package/dist/cli/commands/project-config/environment/index.d.ts.map +1 -0
  196. package/dist/cli/commands/project-config/environment/index.js +76 -0
  197. package/dist/cli/commands/project-config/environment/index.js.map +1 -0
  198. package/dist/cli/commands/project-config/environment/initial-superadmin.d.ts +3 -0
  199. package/dist/cli/commands/project-config/environment/initial-superadmin.d.ts.map +1 -0
  200. package/dist/cli/commands/project-config/environment/initial-superadmin.js +13 -0
  201. package/dist/cli/commands/project-config/environment/initial-superadmin.js.map +1 -0
  202. package/dist/cli/commands/project-config/environment/list.d.ts +3 -0
  203. package/dist/cli/commands/project-config/environment/list.d.ts.map +1 -0
  204. package/dist/cli/commands/project-config/environment/list.js +23 -0
  205. package/dist/cli/commands/project-config/environment/list.js.map +1 -0
  206. package/dist/cli/commands/project-config/environment/show.d.ts +3 -0
  207. package/dist/cli/commands/project-config/environment/show.d.ts.map +1 -0
  208. package/dist/cli/commands/project-config/environment/show.js +30 -0
  209. package/dist/cli/commands/project-config/environment/show.js.map +1 -0
  210. package/dist/cli/commands/project-config/environment/update.d.ts +3 -0
  211. package/dist/cli/commands/project-config/environment/update.d.ts.map +1 -0
  212. package/dist/cli/commands/project-config/environment/update.js +19 -0
  213. package/dist/cli/commands/project-config/environment/update.js.map +1 -0
  214. package/dist/cli/commands/project-config/index.d.ts +3 -0
  215. package/dist/cli/commands/project-config/index.d.ts.map +1 -0
  216. package/dist/cli/commands/project-config/index.js +27 -0
  217. package/dist/cli/commands/project-config/index.js.map +1 -0
  218. package/dist/cli/commands/project-config/init/build-detection.d.ts +11 -0
  219. package/dist/cli/commands/project-config/init/build-detection.d.ts.map +1 -0
  220. package/dist/cli/commands/project-config/init/build-detection.js +113 -0
  221. package/dist/cli/commands/project-config/init/build-detection.js.map +1 -0
  222. package/dist/cli/commands/project-config/init/index.d.ts +2 -0
  223. package/dist/cli/commands/project-config/init/index.d.ts.map +1 -0
  224. package/dist/cli/commands/project-config/init/index.js +48 -0
  225. package/dist/cli/commands/project-config/init/index.js.map +1 -0
  226. package/dist/cli/commands/project-config/init/init.d.ts +14 -0
  227. package/dist/cli/commands/project-config/init/init.d.ts.map +1 -0
  228. package/dist/cli/commands/project-config/init/init.js +367 -0
  229. package/dist/cli/commands/project-config/init/init.js.map +1 -0
  230. package/dist/cli/commands/project-config/options.d.ts +10 -0
  231. package/dist/cli/commands/project-config/options.d.ts.map +1 -0
  232. package/dist/cli/commands/project-config/options.js +80 -0
  233. package/dist/cli/commands/project-config/options.js.map +1 -0
  234. package/dist/cli/commands/project-config/project/create.d.ts +3 -0
  235. package/dist/cli/commands/project-config/project/create.d.ts.map +1 -0
  236. package/dist/cli/commands/project-config/project/create.js +20 -0
  237. package/dist/cli/commands/project-config/project/create.js.map +1 -0
  238. package/dist/cli/commands/project-config/project/delete.d.ts +3 -0
  239. package/dist/cli/commands/project-config/project/delete.d.ts.map +1 -0
  240. package/dist/cli/commands/project-config/project/delete.js +28 -0
  241. package/dist/cli/commands/project-config/project/delete.js.map +1 -0
  242. package/dist/cli/commands/project-config/project/index.d.ts +2 -0
  243. package/dist/cli/commands/project-config/project/index.d.ts.map +1 -0
  244. package/dist/cli/commands/project-config/project/index.js +88 -0
  245. package/dist/cli/commands/project-config/project/index.js.map +1 -0
  246. package/dist/cli/commands/project-config/project/link.d.ts +3 -0
  247. package/dist/cli/commands/project-config/project/link.d.ts.map +1 -0
  248. package/dist/cli/commands/project-config/project/link.js +45 -0
  249. package/dist/cli/commands/project-config/project/link.js.map +1 -0
  250. package/dist/cli/commands/project-config/project/list.d.ts +3 -0
  251. package/dist/cli/commands/project-config/project/list.d.ts.map +1 -0
  252. package/dist/cli/commands/project-config/project/list.js +15 -0
  253. package/dist/cli/commands/project-config/project/list.js.map +1 -0
  254. package/dist/cli/commands/project-config/project/show.d.ts +3 -0
  255. package/dist/cli/commands/project-config/project/show.d.ts.map +1 -0
  256. package/dist/cli/commands/project-config/project/show.js +33 -0
  257. package/dist/cli/commands/project-config/project/show.js.map +1 -0
  258. package/dist/cli/commands/project-config/project/unlink.d.ts +3 -0
  259. package/dist/cli/commands/project-config/project/unlink.d.ts.map +1 -0
  260. package/dist/cli/commands/project-config/project/unlink.js +21 -0
  261. package/dist/cli/commands/project-config/project/unlink.js.map +1 -0
  262. package/dist/cli/commands/project-config/project/update.d.ts +3 -0
  263. package/dist/cli/commands/project-config/project/update.d.ts.map +1 -0
  264. package/dist/cli/commands/project-config/project/update.js +18 -0
  265. package/dist/cli/commands/project-config/project/update.js.map +1 -0
  266. package/dist/cli/commands/project-config/source/connect.d.ts +15 -0
  267. package/dist/cli/commands/project-config/source/connect.d.ts.map +1 -0
  268. package/dist/cli/commands/project-config/source/connect.js +208 -0
  269. package/dist/cli/commands/project-config/source/connect.js.map +1 -0
  270. package/dist/cli/commands/project-config/source/disconnect.d.ts +3 -0
  271. package/dist/cli/commands/project-config/source/disconnect.d.ts.map +1 -0
  272. package/dist/cli/commands/project-config/source/disconnect.js +27 -0
  273. package/dist/cli/commands/project-config/source/disconnect.js.map +1 -0
  274. package/dist/cli/commands/project-config/source/index.d.ts +2 -0
  275. package/dist/cli/commands/project-config/source/index.d.ts.map +1 -0
  276. package/dist/cli/commands/project-config/source/index.js +74 -0
  277. package/dist/cli/commands/project-config/source/index.js.map +1 -0
  278. package/dist/cli/commands/project-config/source/map.d.ts +3 -0
  279. package/dist/cli/commands/project-config/source/map.d.ts.map +1 -0
  280. package/dist/cli/commands/project-config/source/map.js +93 -0
  281. package/dist/cli/commands/project-config/source/map.js.map +1 -0
  282. package/dist/cli/commands/project-config/source/repos.d.ts +3 -0
  283. package/dist/cli/commands/project-config/source/repos.d.ts.map +1 -0
  284. package/dist/cli/commands/project-config/source/repos.js +18 -0
  285. package/dist/cli/commands/project-config/source/repos.js.map +1 -0
  286. package/dist/cli/commands/project-config/source/status.d.ts +3 -0
  287. package/dist/cli/commands/project-config/source/status.d.ts.map +1 -0
  288. package/dist/cli/commands/project-config/source/status.js +72 -0
  289. package/dist/cli/commands/project-config/source/status.js.map +1 -0
  290. package/dist/cli/commands/runtime-data/backup.d.ts +5 -0
  291. package/dist/cli/commands/runtime-data/backup.d.ts.map +1 -0
  292. package/dist/cli/commands/runtime-data/backup.js +107 -0
  293. package/dist/cli/commands/runtime-data/backup.js.map +1 -0
  294. package/dist/cli/commands/runtime-data/index.d.ts +2 -0
  295. package/dist/cli/commands/runtime-data/index.d.ts.map +1 -0
  296. package/dist/cli/commands/runtime-data/index.js +206 -0
  297. package/dist/cli/commands/runtime-data/index.js.map +1 -0
  298. package/dist/cli/commands/runtime-data/resource.d.ts +11 -0
  299. package/dist/cli/commands/runtime-data/resource.d.ts.map +1 -0
  300. package/dist/cli/commands/runtime-data/resource.js +147 -0
  301. package/dist/cli/commands/runtime-data/resource.js.map +1 -0
  302. package/dist/cli/commands/runtime-data/restore.d.ts +3 -0
  303. package/dist/cli/commands/runtime-data/restore.d.ts.map +1 -0
  304. package/dist/cli/commands/runtime-data/restore.js +119 -0
  305. package/dist/cli/commands/runtime-data/restore.js.map +1 -0
  306. package/dist/cli/commands/runtime-data/seeds.d.ts +6 -0
  307. package/dist/cli/commands/runtime-data/seeds.d.ts.map +1 -0
  308. package/dist/cli/commands/runtime-data/seeds.js +213 -0
  309. package/dist/cli/commands/runtime-data/seeds.js.map +1 -0
  310. package/dist/cli/commands/runtime-data/tunnel.d.ts +16 -0
  311. package/dist/cli/commands/runtime-data/tunnel.d.ts.map +1 -0
  312. package/dist/cli/commands/runtime-data/tunnel.js +249 -0
  313. package/dist/cli/commands/runtime-data/tunnel.js.map +1 -0
  314. package/dist/cli/host-arguments.d.ts +7 -0
  315. package/dist/cli/host-arguments.d.ts.map +1 -0
  316. package/dist/cli/host-arguments.js +46 -0
  317. package/dist/cli/host-arguments.js.map +1 -0
  318. package/dist/cli/host-nodes.d.ts +30 -0
  319. package/dist/cli/host-nodes.d.ts.map +1 -0
  320. package/dist/cli/host-nodes.js +17 -0
  321. package/dist/cli/host-nodes.js.map +1 -0
  322. package/dist/cli/index.d.ts +29 -0
  323. package/dist/cli/index.d.ts.map +1 -0
  324. package/dist/cli/index.js +60 -0
  325. package/dist/cli/index.js.map +1 -0
  326. package/dist/cli/lib/api-client.d.ts +19 -0
  327. package/dist/cli/lib/api-client.d.ts.map +1 -0
  328. package/dist/cli/lib/api-client.js +111 -0
  329. package/dist/cli/lib/api-client.js.map +1 -0
  330. package/dist/cli/lib/auth.d.ts +132 -0
  331. package/dist/cli/lib/auth.d.ts.map +1 -0
  332. package/dist/cli/lib/auth.js +505 -0
  333. package/dist/cli/lib/auth.js.map +1 -0
  334. package/dist/cli/lib/config.d.ts +7 -0
  335. package/dist/cli/lib/config.d.ts.map +1 -0
  336. package/dist/cli/lib/config.js +11 -0
  337. package/dist/cli/lib/config.js.map +1 -0
  338. package/dist/cli/lib/context.d.ts +10 -0
  339. package/dist/cli/lib/context.d.ts.map +1 -0
  340. package/dist/cli/lib/context.js +42 -0
  341. package/dist/cli/lib/context.js.map +1 -0
  342. package/dist/cli/lib/contract/build-settings.d.ts +36 -0
  343. package/dist/cli/lib/contract/build-settings.d.ts.map +1 -0
  344. package/dist/cli/lib/contract/build-settings.js +73 -0
  345. package/dist/cli/lib/contract/build-settings.js.map +1 -0
  346. package/dist/cli/lib/contract/database.d.ts +47 -0
  347. package/dist/cli/lib/contract/database.d.ts.map +1 -0
  348. package/dist/cli/lib/contract/database.js +29 -0
  349. package/dist/cli/lib/contract/database.js.map +1 -0
  350. package/dist/cli/lib/contract/deployment-resource-labels.d.ts +11 -0
  351. package/dist/cli/lib/contract/deployment-resource-labels.d.ts.map +1 -0
  352. package/dist/cli/lib/contract/deployment-resource-labels.js +80 -0
  353. package/dist/cli/lib/contract/deployment-resource-labels.js.map +1 -0
  354. package/dist/cli/lib/contract/deployments.d.ts +128 -0
  355. package/dist/cli/lib/contract/deployments.d.ts.map +1 -0
  356. package/dist/cli/lib/contract/deployments.js +46 -0
  357. package/dist/cli/lib/contract/deployments.js.map +1 -0
  358. package/dist/cli/lib/contract/desired-state.d.ts +104 -0
  359. package/dist/cli/lib/contract/desired-state.d.ts.map +1 -0
  360. package/dist/cli/lib/contract/desired-state.js +171 -0
  361. package/dist/cli/lib/contract/desired-state.js.map +1 -0
  362. package/dist/cli/lib/contract/foreign-credentials.d.ts +49 -0
  363. package/dist/cli/lib/contract/foreign-credentials.d.ts.map +1 -0
  364. package/dist/cli/lib/contract/foreign-credentials.js +71 -0
  365. package/dist/cli/lib/contract/foreign-credentials.js.map +1 -0
  366. package/dist/cli/lib/contract/logs.d.ts +44 -0
  367. package/dist/cli/lib/contract/logs.d.ts.map +1 -0
  368. package/dist/cli/lib/contract/logs.js +66 -0
  369. package/dist/cli/lib/contract/logs.js.map +1 -0
  370. package/dist/cli/lib/contract/projects.d.ts +31 -0
  371. package/dist/cli/lib/contract/projects.d.ts.map +1 -0
  372. package/dist/cli/lib/contract/projects.js +9 -0
  373. package/dist/cli/lib/contract/projects.js.map +1 -0
  374. package/dist/cli/lib/contract/public-error-details.d.ts +4 -0
  375. package/dist/cli/lib/contract/public-error-details.d.ts.map +1 -0
  376. package/dist/cli/lib/contract/public-error-details.js +248 -0
  377. package/dist/cli/lib/contract/public-error-details.js.map +1 -0
  378. package/dist/cli/lib/contract/runtime-operations.d.ts +87 -0
  379. package/dist/cli/lib/contract/runtime-operations.d.ts.map +1 -0
  380. package/dist/cli/lib/contract/runtime-operations.js +67 -0
  381. package/dist/cli/lib/contract/runtime-operations.js.map +1 -0
  382. package/dist/cli/lib/contract/seeds.d.ts +31 -0
  383. package/dist/cli/lib/contract/seeds.d.ts.map +1 -0
  384. package/dist/cli/lib/contract/seeds.js +43 -0
  385. package/dist/cli/lib/contract/seeds.js.map +1 -0
  386. package/dist/cli/lib/contract/source-repository.d.ts +73 -0
  387. package/dist/cli/lib/contract/source-repository.d.ts.map +1 -0
  388. package/dist/cli/lib/contract/source-repository.js +31 -0
  389. package/dist/cli/lib/contract/source-repository.js.map +1 -0
  390. package/dist/cli/lib/contract/wire-types.d.ts +47 -0
  391. package/dist/cli/lib/contract/wire-types.d.ts.map +1 -0
  392. package/dist/cli/lib/contract/wire-types.js +13 -0
  393. package/dist/cli/lib/contract/wire-types.js.map +1 -0
  394. package/dist/cli/lib/contract/wire-values.d.ts +6 -0
  395. package/dist/cli/lib/contract/wire-values.d.ts.map +1 -0
  396. package/dist/cli/lib/contract/wire-values.js +21 -0
  397. package/dist/cli/lib/contract/wire-values.js.map +1 -0
  398. package/dist/cli/lib/dotenv.d.ts +2 -0
  399. package/dist/cli/lib/dotenv.d.ts.map +1 -0
  400. package/dist/cli/lib/dotenv.js +28 -0
  401. package/dist/cli/lib/dotenv.js.map +1 -0
  402. package/dist/cli/lib/env-file.d.ts +2 -0
  403. package/dist/cli/lib/env-file.d.ts.map +1 -0
  404. package/dist/cli/lib/env-file.js +26 -0
  405. package/dist/cli/lib/env-file.js.map +1 -0
  406. package/dist/cli/lib/env-preflight.d.ts +24 -0
  407. package/dist/cli/lib/env-preflight.d.ts.map +1 -0
  408. package/dist/cli/lib/env-preflight.js +265 -0
  409. package/dist/cli/lib/env-preflight.js.map +1 -0
  410. package/dist/cli/lib/error-output.d.ts +3 -0
  411. package/dist/cli/lib/error-output.d.ts.map +1 -0
  412. package/dist/cli/lib/error-output.js +2 -0
  413. package/dist/cli/lib/error-output.js.map +1 -0
  414. package/dist/cli/lib/errors.d.ts +37 -0
  415. package/dist/cli/lib/errors.d.ts.map +1 -0
  416. package/dist/cli/lib/errors.js +147 -0
  417. package/dist/cli/lib/errors.js.map +1 -0
  418. package/dist/cli/lib/file-lock.d.ts +23 -0
  419. package/dist/cli/lib/file-lock.d.ts.map +1 -0
  420. package/dist/cli/lib/file-lock.js +121 -0
  421. package/dist/cli/lib/file-lock.js.map +1 -0
  422. package/dist/cli/lib/format.d.ts +6 -0
  423. package/dist/cli/lib/format.d.ts.map +1 -0
  424. package/dist/cli/lib/format.js +44 -0
  425. package/dist/cli/lib/format.js.map +1 -0
  426. package/dist/cli/lib/id-prefix.d.ts +6 -0
  427. package/dist/cli/lib/id-prefix.d.ts.map +1 -0
  428. package/dist/cli/lib/id-prefix.js +18 -0
  429. package/dist/cli/lib/id-prefix.js.map +1 -0
  430. package/dist/cli/lib/invocation.d.ts +6 -0
  431. package/dist/cli/lib/invocation.d.ts.map +1 -0
  432. package/dist/cli/lib/invocation.js +34 -0
  433. package/dist/cli/lib/invocation.js.map +1 -0
  434. package/dist/cli/lib/log-stream.d.ts +7 -0
  435. package/dist/cli/lib/log-stream.d.ts.map +1 -0
  436. package/dist/cli/lib/log-stream.js +179 -0
  437. package/dist/cli/lib/log-stream.js.map +1 -0
  438. package/dist/cli/lib/logger.d.ts +5 -0
  439. package/dist/cli/lib/logger.d.ts.map +1 -0
  440. package/dist/cli/lib/logger.js +52 -0
  441. package/dist/cli/lib/logger.js.map +1 -0
  442. package/dist/cli/lib/open-browser.d.ts +2 -0
  443. package/dist/cli/lib/open-browser.d.ts.map +1 -0
  444. package/dist/cli/lib/open-browser.js +8 -0
  445. package/dist/cli/lib/open-browser.js.map +1 -0
  446. package/dist/cli/lib/organization.d.ts +3 -0
  447. package/dist/cli/lib/organization.d.ts.map +1 -0
  448. package/dist/cli/lib/organization.js +20 -0
  449. package/dist/cli/lib/organization.js.map +1 -0
  450. package/dist/cli/lib/project-link.d.ts +12 -0
  451. package/dist/cli/lib/project-link.d.ts.map +1 -0
  452. package/dist/cli/lib/project-link.js +69 -0
  453. package/dist/cli/lib/project-link.js.map +1 -0
  454. package/dist/cli/lib/resolve.d.ts +20 -0
  455. package/dist/cli/lib/resolve.d.ts.map +1 -0
  456. package/dist/cli/lib/resolve.js +88 -0
  457. package/dist/cli/lib/resolve.js.map +1 -0
  458. package/dist/cli/lib/sleep.d.ts +2 -0
  459. package/dist/cli/lib/sleep.d.ts.map +1 -0
  460. package/dist/cli/lib/sleep.js +4 -0
  461. package/dist/cli/lib/sleep.js.map +1 -0
  462. package/dist/cli/lib/slug.d.ts +3 -0
  463. package/dist/cli/lib/slug.d.ts.map +1 -0
  464. package/dist/cli/lib/slug.js +13 -0
  465. package/dist/cli/lib/slug.js.map +1 -0
  466. package/dist/cli/lib/source-repository-link.d.ts +5 -0
  467. package/dist/cli/lib/source-repository-link.d.ts.map +1 -0
  468. package/dist/cli/lib/source-repository-link.js +28 -0
  469. package/dist/cli/lib/source-repository-link.js.map +1 -0
  470. package/dist/cli/lib/types.d.ts +58 -0
  471. package/dist/cli/lib/types.d.ts.map +1 -0
  472. package/dist/cli/lib/types.js +10 -0
  473. package/dist/cli/lib/types.js.map +1 -0
  474. package/dist/cli/root-options.d.ts +14 -0
  475. package/dist/cli/root-options.d.ts.map +1 -0
  476. package/dist/cli/root-options.js +53 -0
  477. package/dist/cli/root-options.js.map +1 -0
  478. package/dist/cli-plugin.d.ts +22 -0
  479. package/dist/cli-plugin.d.ts.map +1 -0
  480. package/dist/cli-plugin.js +30 -0
  481. package/dist/cli-plugin.js.map +1 -0
  482. package/dist/cloud-config-module.d.ts +3 -0
  483. package/dist/cloud-config-module.d.ts.map +1 -0
  484. package/dist/cloud-config-module.js +16 -0
  485. package/dist/cloud-config-module.js.map +1 -0
  486. package/dist/dev/cli-host.d.ts +3 -0
  487. package/dist/dev/cli-host.d.ts.map +1 -0
  488. package/dist/dev/cli-host.js +72 -0
  489. package/dist/dev/cli-host.js.map +1 -0
  490. package/dist/dev/dev-command.d.ts +7 -0
  491. package/dist/dev/dev-command.d.ts.map +1 -0
  492. package/dist/dev/dev-command.js +122 -0
  493. package/dist/dev/dev-command.js.map +1 -0
  494. package/dist/dev/dev-config.d.ts +4 -0
  495. package/dist/dev/dev-config.d.ts.map +1 -0
  496. package/dist/dev/dev-config.js +28 -0
  497. package/dist/dev/dev-config.js.map +1 -0
  498. package/dist/dev/dev-migrate.d.ts +2 -0
  499. package/dist/dev/dev-migrate.d.ts.map +1 -0
  500. package/dist/dev/dev-migrate.js +17 -0
  501. package/dist/dev/dev-migrate.js.map +1 -0
  502. package/dist/dev/dev-process.d.ts +2 -0
  503. package/dist/dev/dev-process.d.ts.map +1 -0
  504. package/dist/dev/dev-process.js +14 -0
  505. package/dist/dev/dev-process.js.map +1 -0
  506. package/dist/dev/dev-server.d.ts +2 -0
  507. package/dist/dev/dev-server.d.ts.map +1 -0
  508. package/dist/dev/dev-server.js +15 -0
  509. package/dist/dev/dev-server.js.map +1 -0
  510. package/dist/dev/dev-worker.d.ts +2 -0
  511. package/dist/dev/dev-worker.d.ts.map +1 -0
  512. package/dist/dev/dev-worker.js +11 -0
  513. package/dist/dev/dev-worker.js.map +1 -0
  514. package/dist/dev/local-services.d.ts +23 -0
  515. package/dist/dev/local-services.d.ts.map +1 -0
  516. package/dist/dev/local-services.js +288 -0
  517. package/dist/dev/local-services.js.map +1 -0
  518. package/dist/dev/project-layout.d.ts +11 -0
  519. package/dist/dev/project-layout.d.ts.map +1 -0
  520. package/dist/dev/project-layout.js +89 -0
  521. package/dist/dev/project-layout.js.map +1 -0
  522. package/dist/entrypoint.js +3 -12
  523. package/dist/entrypoint.js.map +1 -1
  524. package/dist/index.d.ts +3 -1
  525. package/dist/index.d.ts.map +1 -1
  526. package/dist/index.js +3 -1
  527. package/dist/index.js.map +1 -1
  528. package/dist/local-asset-server.d.ts +4 -0
  529. package/dist/local-asset-server.d.ts.map +1 -0
  530. package/dist/local-asset-server.js +24 -0
  531. package/dist/local-asset-server.js.map +1 -0
  532. package/dist/local-cache-plugin.d.ts +5 -0
  533. package/dist/local-cache-plugin.d.ts.map +1 -0
  534. package/dist/local-cache-plugin.js +68 -0
  535. package/dist/local-cache-plugin.js.map +1 -0
  536. package/dist/local-cache.d.ts +17 -0
  537. package/dist/local-cache.d.ts.map +1 -0
  538. package/dist/local-cache.js +144 -0
  539. package/dist/local-cache.js.map +1 -0
  540. package/dist/local-dashboard-plugin.d.ts +9 -0
  541. package/dist/local-dashboard-plugin.d.ts.map +1 -0
  542. package/dist/local-dashboard-plugin.js +37 -0
  543. package/dist/local-dashboard-plugin.js.map +1 -0
  544. package/dist/local-database.d.ts +15 -0
  545. package/dist/local-database.d.ts.map +1 -0
  546. package/dist/local-database.js +64 -0
  547. package/dist/local-database.js.map +1 -0
  548. package/dist/local-runtime.d.ts +15 -2
  549. package/dist/local-runtime.d.ts.map +1 -1
  550. package/dist/local-runtime.js +145 -28
  551. package/dist/local-runtime.js.map +1 -1
  552. package/package.json +63 -7
@@ -0,0 +1,58 @@
1
+ import type { DeploymentApplicationSource, DeploymentSummary, EnvironmentSummaryResponse, ProtectedResource } from "./contract/wire-types.js";
2
+ export type { DeploymentApplicationSource, DeploymentSummary, DeploymentSummaryAction, DeploymentSummaryCleanup, DeploymentSummaryCleanupFailure, DeploymentSummaryResourceRef, IdentityEnvironmentType, ProtectedResource, RuntimeIntent, RuntimeState, VcEnvironmentType, } from "./contract/wire-types.js";
3
+ export interface Project {
4
+ id: string;
5
+ slug: string;
6
+ name: string;
7
+ }
8
+ export type Environment = EnvironmentSummaryResponse;
9
+ export interface Deployment {
10
+ id: string;
11
+ environmentId?: string;
12
+ status: string;
13
+ trigger: string;
14
+ commitHash: string | null;
15
+ commitMessage: string | null;
16
+ applicationSource?: DeploymentApplicationSource | null;
17
+ hasBuildStep?: boolean;
18
+ errorDetails: string | null;
19
+ statusMessage: string | null;
20
+ pollingTimeoutSeconds?: number;
21
+ protectedResources?: ProtectedResource[] | null;
22
+ summary?: DeploymentSummary | null;
23
+ startedAt: string | null;
24
+ completedAt: string | null;
25
+ createdAt: string;
26
+ triggeredBy?: {
27
+ id: string;
28
+ name: string | null;
29
+ } | null;
30
+ }
31
+ export interface RollbackTarget {
32
+ id: string;
33
+ status: string;
34
+ trigger: string;
35
+ commitHash: string | null;
36
+ commitMessage: string | null;
37
+ completedAt: string | null;
38
+ createdAt: string;
39
+ eligible: boolean;
40
+ unavailableReason: string | null;
41
+ }
42
+ export interface PaginatedDeployments {
43
+ items: Deployment[];
44
+ total: number;
45
+ limit: number;
46
+ offset: number;
47
+ }
48
+ export interface EnvVarSummary {
49
+ key: string;
50
+ source: "user" | "managed";
51
+ updatedAt?: string;
52
+ scope?: "runtime" | "build" | "both";
53
+ sensitive?: boolean;
54
+ }
55
+ export declare const TERMINAL_STATUSES: Set<string>;
56
+ export declare const FAILED_STATUSES: Set<string>;
57
+ export declare const SUCCESS_STATUSES: Set<string>;
58
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/cli/lib/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,2BAA2B,EAC3B,iBAAiB,EACjB,0BAA0B,EAC1B,iBAAiB,EAClB,MAAM,0BAA0B,CAAC;AAIlC,YAAY,EACV,2BAA2B,EAC3B,iBAAiB,EACjB,uBAAuB,EACvB,wBAAwB,EACxB,+BAA+B,EAC/B,4BAA4B,EAC5B,uBAAuB,EACvB,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,iBAAiB,GAClB,MAAM,0BAA0B,CAAC;AAElC,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,MAAM,WAAW,GAAG,0BAA0B,CAAC;AAErD,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,iBAAiB,CAAC,EAAE,2BAA2B,GAAG,IAAI,CAAC;IACvD,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,kBAAkB,CAAC,EAAE,iBAAiB,EAAE,GAAG,IAAI,CAAC;IAChD,OAAO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FAILED",
5
+ "DEGRADED",
6
+ "CANCELLED",
7
+ ]);
8
+ export const FAILED_STATUSES = new Set(["FAILED", "DEGRADED", "CANCELLED"]);
9
+ export const SUCCESS_STATUSES = new Set(["RUNNING", "SUCCEEDED"]);
10
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/cli/lib/types.ts"],"names":[],"mappings":"AA8EA,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAC;IACvC,SAAS;IACT,WAAW;IACX,QAAQ;IACR,UAAU;IACV,WAAW;CACZ,CAAC,CAAC;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC,CAAC,QAAQ,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC,CAAC;AAC5E,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAC,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { CloudCommandOption } from "./host-nodes.js";
2
+ export declare const CLOUD_ROOT_OPTIONS: CloudCommandOption[];
3
+ export interface GlobalOptions {
4
+ token?: string;
5
+ project?: string;
6
+ environment?: string;
7
+ json?: boolean;
8
+ }
9
+ export type CredentialOptions = Pick<GlobalOptions, "token">;
10
+ export declare function readGlobalOptions(input: {
11
+ inheritedOptions: Record<string, unknown>;
12
+ options: Record<string, unknown>;
13
+ }): GlobalOptions;
14
+ //# sourceMappingURL=root-options.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"root-options.d.ts","sourceRoot":"","sources":["../../src/cli/root-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAW1D,eAAO,MAAM,kBAAkB,EAAE,kBAAkB,EAsBlD,CAAC;AAGF,MAAM,WAAW,aAAa;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAKD,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;AAU7D,wBAAgB,iBAAiB,CAAC,KAAK,EAAE;IACvC,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC1C,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC,GAAG,aAAa,CAQhB"}
@@ -0,0 +1,53 @@
1
+ // The selectors every hosted Cloud command shares. They are declared once, as the plugin's
2
+ // `rootOptions`, and the host puts them on the root `vendure` program and passes their values down
3
+ // to every command it registers for this plugin. A command that needs one reads it from the
4
+ // context; declaring it again is what the host refuses for a group and what would shadow the root
5
+ // value for a leaf.
6
+ //
7
+ // `required: true` is about the value, not the option: it keeps the host emitting `--token <token>`
8
+ // rather than `--token [token]`, so `--token` with nothing after it stays the error it is under
9
+ // `vcloud` instead of quietly parsing as `true`.
10
+ export const CLOUD_ROOT_OPTIONS = [
11
+ {
12
+ long: "--token <token>",
13
+ description: "API token for authentication",
14
+ required: true,
15
+ },
16
+ {
17
+ short: "-p",
18
+ long: "--project <slug-or-id>",
19
+ description: "VC Project slug or ID",
20
+ required: true,
21
+ },
22
+ {
23
+ short: "-e",
24
+ long: "--environment <slug-or-id>",
25
+ description: "VC Environment slug or ID",
26
+ required: true,
27
+ },
28
+ {
29
+ long: "--json",
30
+ description: "Write stable JSON to stdout",
31
+ },
32
+ ];
33
+ // The one place the root option values are turned into a shape a command can rely on.
34
+ //
35
+ // Two sources, because the host has two. `inheritedOptions` carries the shared values from wherever
36
+ // on the command line they were given, and it holds only the ones that were actually supplied. A
37
+ // command's own parsed options carry a value when that command declares an option of the same name
38
+ // — which the host allows for a leaf, and fills from the shared value when the leaf did not receive
39
+ // its own. Reading the command's own value first and the inherited one second is therefore right
40
+ // in both layouts.
41
+ export function readGlobalOptions(input) {
42
+ const read = (key) => input.options[key] ?? input.inheritedOptions[key];
43
+ return {
44
+ token: readString(read("token")),
45
+ project: readString(read("project")),
46
+ environment: readString(read("environment")),
47
+ json: read("json") === true,
48
+ };
49
+ }
50
+ function readString(value) {
51
+ return typeof value === "string" ? value : undefined;
52
+ }
53
+ //# sourceMappingURL=root-options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"root-options.js","sourceRoot":"","sources":["../../src/cli/root-options.ts"],"names":[],"mappings":"AAEA,2FAA2F;AAC3F,mGAAmG;AACnG,4FAA4F;AAC5F,kGAAkG;AAClG,oBAAoB;AACpB,EAAE;AACF,oGAAoG;AACpG,gGAAgG;AAChG,iDAAiD;AACjD,MAAM,CAAC,MAAM,kBAAkB,GAAyB;IACtD;QACE,IAAI,EAAE,iBAAiB;QACvB,WAAW,EAAE,8BAA8B;QAC3C,QAAQ,EAAE,IAAI;KACf;IACD;QACE,KAAK,EAAE,IAAI;QACX,IAAI,EAAE,wBAAwB;QAC9B,WAAW,EAAE,uBAAuB;QACpC,QAAQ,EAAE,IAAI;KACf;IACD;QACE,KAAK,EAAE,IAAI;QACX,IAAI,EAAE,4BAA4B;QAClC,WAAW,EAAE,2BAA2B;QACxC,QAAQ,EAAE,IAAI;KACf;IACD;QACE,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,6BAA6B;KAC3C;CACF,CAAC;AAeF,sFAAsF;AACtF,EAAE;AACF,oGAAoG;AACpG,iGAAiG;AACjG,mGAAmG;AACnG,oGAAoG;AACpG,iGAAiG;AACjG,mBAAmB;AACnB,MAAM,UAAU,iBAAiB,CAAC,KAGjC;IACC,MAAM,IAAI,GAAG,CAAC,GAAW,EAAW,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;IACzF,OAAO;QACL,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAChC,OAAO,EAAE,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACpC,WAAW,EAAE,UAAU,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAC5C,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,IAAI;KAC5B,CAAC;AACJ,CAAC;AAED,SAAS,UAAU,CAAC,KAAc;IAChC,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AACvD,CAAC"}
@@ -0,0 +1,22 @@
1
+ import type { CloudCommandNode, CloudCommandOption } from "./cli/command.js";
2
+ import { type NextDevAction } from "./dev/dev-command.js";
3
+ interface CliPluginLike {
4
+ id: string;
5
+ commands: CloudCommandNode[];
6
+ rootOptions: CloudCommandOption[];
7
+ extendCommands: Array<{
8
+ command: string;
9
+ description?: string;
10
+ options?: Array<{
11
+ long: string;
12
+ description: string;
13
+ required?: boolean;
14
+ }>;
15
+ decorate?: (input: {
16
+ next: NextDevAction;
17
+ }) => NextDevAction;
18
+ }>;
19
+ }
20
+ declare const cloudCliPlugin: CliPluginLike;
21
+ export default cloudCliPlugin;
22
+ //# sourceMappingURL=cli-plugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-plugin.d.ts","sourceRoot":"","sources":["../src/cli-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAI7E,OAAO,EAAE,KAAK,aAAa,EAAe,MAAM,sBAAsB,CAAC;AAuBvE,UAAU,aAAa;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,gBAAgB,EAAE,CAAC;IAC7B,WAAW,EAAE,kBAAkB,EAAE,CAAC;IAClC,cAAc,EAAE,KAAK,CAAC;QACpB,OAAO,EAAE,MAAM,CAAC;QAChB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,OAAO,CAAC,EAAE,KAAK,CAAC;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,WAAW,EAAE,MAAM,CAAC;YAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;SAAE,CAAC,CAAC;QAC3E,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE;YAAE,IAAI,EAAE,aAAa,CAAA;SAAE,KAAK,aAAa,CAAC;KAC9D,CAAC,CAAC;CACJ;AAMD,QAAA,MAAM,cAAc,EAAE,aAwBrB,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -0,0 +1,30 @@
1
+ import { CLOUD_COMMANDS } from "./cli/commands/index.js";
2
+ import { CLOUD_ROOT_OPTIONS } from "./cli/root-options.js";
3
+ import { assertHostSupportsCommandExtensions } from "./dev/cli-host.js";
4
+ import { runCloudDev } from "./dev/dev-command.js";
5
+ // Checked as this file is loaded, rather than left to fail later. See `dev/cli-host.ts` for what
6
+ // this can and cannot conclude.
7
+ assertHostSupportsCommandExtensions();
8
+ const cloudCliPlugin = {
9
+ id: "@vendure/cloud",
10
+ commands: CLOUD_COMMANDS,
11
+ // The four selectors every hosted Cloud command shares. The host puts them on the root `vendure`
12
+ // program and passes their values down, so they are declared here and nowhere else. Registered
13
+ // alongside the commands rather than before them: a `--project` on `vendure --help` with no Cloud
14
+ // command behind it would be worse than no flag at all.
15
+ rootOptions: CLOUD_ROOT_OPTIONS,
16
+ extendCommands: [
17
+ {
18
+ command: "dev",
19
+ options: [
20
+ {
21
+ long: "--reset-local-data",
22
+ description: "Discard this project's local database before starting, so it is built from your migrations again",
23
+ },
24
+ ],
25
+ decorate: ({ next }) => (...args) => runCloudDev(args, next),
26
+ },
27
+ ],
28
+ };
29
+ export default cloudCliPlugin;
30
+ //# sourceMappingURL=cli-plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-plugin.js","sourceRoot":"","sources":["../src/cli-plugin.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,mCAAmC,EAAE,MAAM,mBAAmB,CAAC;AACxE,OAAO,EAAsB,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAmCvE,iGAAiG;AACjG,gCAAgC;AAChC,mCAAmC,EAAE,CAAC;AAEtC,MAAM,cAAc,GAAkB;IACpC,EAAE,EAAE,gBAAgB;IACpB,QAAQ,EAAE,cAAc;IACxB,iGAAiG;IACjG,+FAA+F;IAC/F,kGAAkG;IAClG,wDAAwD;IACxD,WAAW,EAAE,kBAAkB;IAC/B,cAAc,EAAE;QACd;YACE,OAAO,EAAE,KAAK;YACd,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,oBAAoB;oBAC1B,WAAW,EACT,kGAAkG;iBACrG;aACF;YACD,QAAQ,EACN,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CACb,CAAC,GAAG,IAAe,EAAE,EAAE,CACrB,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC;SAC5B;KACF;CACF,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type CloudConfigHandle } from "@vendure/cloud-config";
2
+ export declare function readCloudConfigHandle(loaded: unknown, source: string): CloudConfigHandle;
3
+ //# sourceMappingURL=cloud-config-module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cloud-config-module.d.ts","sourceRoot":"","sources":["../src/cloud-config-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,EAAuB,MAAM,uBAAuB,CAAC;AAMpF,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,iBAAiB,CAYxF"}
@@ -0,0 +1,16 @@
1
+ import { isCloudConfigHandle } from "@vendure/cloud-config";
2
+ // The standalone runner imports compiled JavaScript; `vendure dev` requires the project's
3
+ // TypeScript through the compiler hook its process was started with. They cannot share how the
4
+ // module is loaded, but they agree on what it has to export, and that agreement lives here.
5
+ export function readCloudConfigHandle(loaded, source) {
6
+ if (typeof loaded !== "object" || loaded === null) {
7
+ throw new Error(`Vendure Cloud: ${source} did not export a Cloud Config.`);
8
+ }
9
+ const exports = loaded;
10
+ const handle = exports.default ?? exports.config;
11
+ if (!isCloudConfigHandle(handle)) {
12
+ throw new Error(`Vendure Cloud: ${source} must export the result of defineCloudConfig() as default or config.`);
13
+ }
14
+ return handle;
15
+ }
16
+ //# sourceMappingURL=cloud-config-module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cloud-config-module.js","sourceRoot":"","sources":["../src/cloud-config-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0B,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEpF,0FAA0F;AAC1F,+FAA+F;AAC/F,4FAA4F;AAE5F,MAAM,UAAU,qBAAqB,CAAC,MAAe,EAAE,MAAc;IACnE,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,IAAI,EAAE,CAAC;QAClD,MAAM,IAAI,KAAK,CAAC,kBAAkB,MAAM,iCAAiC,CAAC,CAAC;IAC7E,CAAC;IACD,MAAM,OAAO,GAAG,MAAiC,CAAC;IAClD,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,IAAI,OAAO,CAAC,MAAM,CAAC;IACjD,IAAI,CAAC,mBAAmB,CAAC,MAAM,CAAC,EAAE,CAAC;QACjC,MAAM,IAAI,KAAK,CACb,kBAAkB,MAAM,sEAAsE,CAC/F,CAAC;IACJ,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare function readCommandOptions(args: readonly unknown[]): Record<string, unknown>;
2
+ export declare function assertHostSupportsCommandExtensions(): void;
3
+ //# sourceMappingURL=cli-host.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-host.d.ts","sourceRoot":"","sources":["../../src/dev/cli-host.ts"],"names":[],"mappings":"AAiBA,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,SAAS,OAAO,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAWpF;AAWD,wBAAgB,mCAAmC,IAAI,IAAI,CAQ1D"}
@@ -0,0 +1,72 @@
1
+ import { createRequire } from "node:module";
2
+ // Reading what the CLI host passed a command action, and saying so when the host is too old to
3
+ // call this package at all.
4
+ //
5
+ // Neither reads the host by name. `require("@vendure/cli")` answers with whichever copy sits
6
+ // nearest this package, which in a workspace is not always the copy that is running, and acting on
7
+ // the wrong one is worse than not looking. CLO-646 tracks removing the restatement this forces.
8
+ // Where the host puts each value, counting back from the end of the argument list. It appends its
9
+ // context after everything Commander supplies, so these offsets hold whatever positional arguments
10
+ // the command declares — and a command extension cannot add one, because the host refuses it for
11
+ // exactly this reason.
12
+ const CONTEXT_FROM_END = 1;
13
+ const COMMAND_FROM_END = 2;
14
+ const OPTIONS_FROM_END = 3;
15
+ export function readCommandOptions(args) {
16
+ const options = args[args.length - OPTIONS_FROM_END];
17
+ // Checked rather than assumed, because everything this extension does to the run is written onto
18
+ // this object. Reading the wrong one would leave the entry points unset and start the command
19
+ // against the customer entry points a Cloud application does not have.
20
+ if (!isPlainObject(options) || !looksLikeCommand(args) || !looksLikeContext(args)) {
21
+ throw new Error("Vendure Cloud: the `dev` command was called with arguments this version of @vendure/cloud does not recognise. Check that @vendure/cli and @vendure/cloud are compatible versions.");
22
+ }
23
+ return options;
24
+ }
25
+ // Best-effort, and it fails the plugin rather than the run. A host that predates command extensions
26
+ // loads this plugin, ignores the one thing it declares, and then runs Core's built-in `dev` — which
27
+ // looks for the entry points a Cloud application deliberately does not have and reports a missing
28
+ // `src/index.ts` as though the application were malformed. Throwing here turns that into a sentence
29
+ // about the version of the CLI, and the host keeps every built-in command working either way.
30
+ //
31
+ // When `@vendure/cli` cannot be resolved from here at all, nothing is claimed. That is a layout
32
+ // where the nearest copy is not the running one, and a check against the wrong copy could refuse a
33
+ // host that was going to work.
34
+ export function assertHostSupportsCommandExtensions() {
35
+ const host = resolveHost();
36
+ if (host === undefined)
37
+ return;
38
+ if (typeof host.readCommandOptions !== "function") {
39
+ throw new Error("Vendure Cloud: the installed @vendure/cli does not support CLI plugin command extensions, so `vendure dev` cannot start a Cloud application. Install @vendure/cli 3.8 or newer.");
40
+ }
41
+ }
42
+ function resolveHost() {
43
+ // The project first, because that is where the running host was started from, then this package,
44
+ // which is the customer layout where the two are installed side by side.
45
+ for (const base of [process.cwd(), import.meta.url]) {
46
+ try {
47
+ const loaded = createRequire(base === import.meta.url ? base : `${base}/package.json`)("@vendure/cli");
48
+ if (isPlainObject(loaded))
49
+ return loaded;
50
+ }
51
+ catch {
52
+ // Try the next base, and claim nothing if neither resolves.
53
+ }
54
+ }
55
+ return undefined;
56
+ }
57
+ function looksLikeCommand(args) {
58
+ const command = args[args.length - COMMAND_FROM_END];
59
+ return (typeof command === "object" &&
60
+ command !== null &&
61
+ typeof command.opts === "function");
62
+ }
63
+ function looksLikeContext(args) {
64
+ const context = args[args.length - CONTEXT_FROM_END];
65
+ return (typeof context === "object" &&
66
+ context !== null &&
67
+ Array.isArray(context.commandPath));
68
+ }
69
+ function isPlainObject(value) {
70
+ return typeof value === "object" && value !== null && !Array.isArray(value);
71
+ }
72
+ //# sourceMappingURL=cli-host.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-host.js","sourceRoot":"","sources":["../../src/dev/cli-host.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,+FAA+F;AAC/F,4BAA4B;AAC5B,EAAE;AACF,6FAA6F;AAC7F,mGAAmG;AACnG,gGAAgG;AAEhG,kGAAkG;AAClG,mGAAmG;AACnG,iGAAiG;AACjG,uBAAuB;AACvB,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAC3B,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAC3B,MAAM,gBAAgB,GAAG,CAAC,C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CAAC;IACH,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAS,gBAAgB,CAAC,IAAwB;IAChD,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,gBAAgB,CAAC,CAAC;IACrD,OAAO,CACL,OAAO,OAAO,KAAK,QAAQ;QAC3B,OAAO,KAAK,IAAI;QAChB,OAAQ,OAA8B,CAAC,IAAI,KAAK,UAAU,CAC3D,CAAC;AACJ,CAAC;AAED,SAAS,gBAAgB,CAAC,IAAwB;IAChD,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,gBAAgB,CAAC,CAAC;IACrD,OAAO,CACL,OAAO,OAAO,KAAK,QAAQ;QAC3B,OAAO,KAAK,IAAI;QAChB,KAAK,CAAC,OAAO,CAAE,OAAqC,CAAC,WAAW,CAAC,CAClE,CAAC;AACJ,CAAC;AAED,SAAS,aAAa,CAAC,KAAc;IACnC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { CloudCommandAction } from "../cli/host-nodes.js";
2
+ export type NextDevAction = CloudCommandAction;
3
+ export declare function runCloudDev(args: unknown[], next: NextDevAction): Promise<void | number>;
4
+ export declare class DevMigrationFailedError extends Error {
5
+ constructor();
6
+ }
7
+ //# sourceMappingURL=dev-command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dev-command.d.ts","sourceRoot":"","sources":["../../src/dev/dev-command.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAyB/D,MAAM,MAAM,aAAa,GAAG,kBAAkB,CAAC;AAE/C,wBAAsB,WAAW,CAC/B,IAAI,EAAE,OAAO,EAAE,EACf,IAAI,EAAE,aAAa,GAElB,OAAO,CAAC,IAAI,GAAG,MAAM,CAAC,CA8CxB;AAwCD,qBAAa,uBAAwB,SAAQ,KAAK;;CAOjD"}
@@ -0,0 +1,122 @@
1
+ import { spawn } from "node:child_process";
2
+ import { readFileSync } from "node:fs";
3
+ import { createRequire } from "node:module";
4
+ import { dirname, join, relative, resolve } from "node:path";
5
+ import { fileURLToPath } from "node:url";
6
+ import { LOCAL_CACHE_URL_VAR } from "../local-cache.js";
7
+ import { LOCAL_DATABASE_URL_VAR } from "../local-database.js";
8
+ import { assertLocalRuntimeAllowed } from "../local-runtime-guard.js";
9
+ import { readCommandOptions } from "./cli-host.js";
10
+ import { DEV_CONFIG_PATH_VAR } from "./dev-config.js";
11
+ import { provisionLocalServices } from "./local-services.js";
12
+ import { resolveCloudProjectLayout } from "./project-layout.js";
13
+ // What `@vendure/cloud` adds to the `dev` command.
14
+ //
15
+ // It wraps the composed command rather than replacing it, so Core still supervises the processes
16
+ // and any other plugin that wrapped `dev` still runs. Everything below happens before `next` and is
17
+ // undone after it: the two servers the application needs are started, the migration chain is run to
18
+ // completion, and the two entry points Core would have looked for in the customer's own repository
19
+ // are pointed at this package instead.
20
+ // The targets that run the application. Core's other target, `dashboard`, is a Vite process reading
21
+ // the customer's source and reaches neither the database nor the cache.
22
+ const DEV_TARGETS_NEEDING_SERVICES = new Set(["all", "server", "worker"]);
23
+ export async function runCloudDev(args, next) {
24
+ // ADR-0043's fail-closed rule, applied before anything is started. A process carrying managed
25
+ // configuration must not reach local substitutes, and refusing here means it never gets as far as
26
+ // creating a database for a store that is supposed to be running on the platform's own.
27
+ assertLocalRuntimeAllowed(process.env);
28
+ // Left as the map the host handed over, rather than annotated with a shape nothing checked. Only
29
+ // one value is read out of it, and it is compared against `true` rather than trusted to be a
30
+ // boolean; the other two are written, which is the point of holding it.
31
+ const options = readCommandOptions(args);
32
+ const target = typeof args[0] === "string" ? args[0] : "all";
33
+ // The Dashboard is a Vite process reading the customer's source. It needs no database and no
34
+ // cache, so `vendure dev dashboard` starts neither and works on a machine with no container
35
+ // runtime at all.
36
+ if (!DEV_TARGETS_NEEDING_SERVICES.has(target)) {
37
+ return next(...args);
38
+ }
39
+ const layout = resolveCloudProjectLayout(process.cwd());
40
+ process.env[DEV_CONFIG_PATH_VAR] = layout.configPath;
41
+ // Entry paths relative to the project directory, because that is what Core resolves them against
42
+ // — both when it checks that they exist and when it starts them. They point into this package
43
+ // rather than at anything the customer wrote, which is what makes an application with no entry
44
+ // point runnable.
45
+ const entryDir = dirname(fileURLToPath(import.meta.url));
46
+ options.serverEntry = relative(layout.projectDir, join(entryDir, "dev-server.js"));
47
+ options.workerEntry = relative(layout.projectDir, join(entryDir, "dev-worker.js"));
48
+ const services = await provisionLocalServices({
49
+ projectDir: layout.projectDir,
50
+ resetData: options.resetLocalData === true,
51
+ announce: (message) => process.stdout.write(`${message}\n`),
52
+ });
53
+ applyConnections(services);
54
+ try {
55
+ await runMigrations(layout.projectDir, join(entryDir, "dev-migrate.js"));
56
+ return await next(...args);
57
+ }
58
+ finally {
59
+ // Reached on an ordinary shutdown, on a signal, and on a failure in any supervised process.
60
+ // Core's supervisor stops its children and returns before this runs, so by here the only things
61
+ // still up are the two servers this command started.
62
+ await services.stop();
63
+ }
64
+ }
65
+ // Written onto this process's environment under the names `@vendure/cloud` already publishes for a
66
+ // supplied connection, so the supervised processes resolve them the same way a process started any
67
+ // other way resolves the ones a developer supplied.
68
+ function applyConnections(services) {
69
+ process.env[LOCAL_DATABASE_URL_VAR] = databaseUrl(services.database);
70
+ process.env[LOCAL_CACHE_URL_VAR] = cacheUrl(services.cache);
71
+ }
72
+ function databaseUrl(connection) {
73
+ const credentials = `${encodeURIComponent(connection.username)}:${encodeURIComponent(connection.password)}`;
74
+ return `postgres://${credentials}@${connection.host}:${connection.port}/${encodeURIComponent(connection.database)}`;
75
+ }
76
+ function cacheUrl(connection) {
77
+ return `valkey://${connection.host}:${connection.port}`;
78
+ }
79
+ // The migration chain, run to completion before the supervisor starts anything. This is the order a
80
+ // deploy uses, and locally it is also what makes the first run work at all: the database starts
81
+ // empty, and a worker that reached it before the schema existed would take the whole run down.
82
+ async function runMigrations(projectDir, migrateEntry) {
83
+ const exitCode = await new Promise((resolveExit, rejectExit) => {
84
+ const child = spawn(process.execPath, [resolveTsNodeBin(projectDir), migrateEntry], {
85
+ cwd: projectDir,
86
+ env: process.env,
87
+ stdio: "inherit",
88
+ });
89
+ child.once("error", rejectExit);
90
+ child.once("close", (code) => resolveExit(code ?? 1));
91
+ });
92
+ if (exitCode !== 0) {
93
+ // The migration process has already written why. Adding a second explanation here would put a
94
+ // sentence about the command in front of the one about the application.
95
+ throw new DevMigrationFailedError();
96
+ }
97
+ }
98
+ export class DevMigrationFailedError extends Error {
99
+ constructor() {
100
+ super("Vendure Cloud: the database migrations did not complete, so the application was not started. The error above is from the migration that stopped.");
101
+ this.name = "DevMigrationFailedError";
102
+ }
103
+ }
104
+ // Resolved from the project rather than from this package, so the migration runs under the same
105
+ // compiler the supervisor starts the server and the worker with.
106
+ function resolveTsNodeBin(projectDir) {
107
+ const require = createRequire(join(projectDir, "package.json"));
108
+ let packageJsonPath;
109
+ try {
110
+ packageJsonPath = require.resolve("ts-node/package.json");
111
+ }
112
+ catch (cause) {
113
+ throw new Error("Vendure Cloud: running a Vendure Cloud application locally requires ts-node. Install it as a development dependency.", { cause });
114
+ }
115
+ const packageJson = JSON.parse(readFileSync(packageJsonPath, "utf-8"));
116
+ const bin = typeof packageJson.bin === "string" ? packageJson.bin : packageJson.bin?.["ts-node"];
117
+ if (bin === undefined) {
118
+ throw new Error("Vendure Cloud: the installed ts-node does not provide a ts-node binary. Reinstall it as a development dependency.");
119
+ }
120
+ return resolve(dirname(packageJsonPath), bin);
121
+ }
122
+ //# sourceMappingURL=dev-command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dev-command.js","sourceRoot":"","sources":["../../src/dev/dev-command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3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E,GAAG,CAAC,CAAC;AAChD,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { CloudConfigHandle } from "@vendure/cloud-config";
2
+ export declare const DEV_CONFIG_PATH_VAR = "VENDURE_CLOUD_DEV_CONFIG";
3
+ export declare function loadDevCloudConfig(): CloudConfigHandle;
4
+ //# sourceMappingURL=dev-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dev-config.d.ts","sourceRoot":"","sources":["../../src/dev/dev-config.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAY/D,eAAO,MAAM,mBAAmB,6BAA6B,CAAC;AAE9D,wBAAgB,kBAAkB,IAAI,iBAAiB,CAkBtD"}
@@ -0,0 +1,28 @@
1
+ import { createRequire } from "node:module";
2
+ import { readCloudConfigHandle } from "../cloud-config-module.js";
3
+ // How the three processes `vendure dev` starts find the application they are running.
4
+ //
5
+ // The path is passed in rather than resolved again here. The command has already decided which file
6
+ // is the Cloud Config, and a process that worked it out for itself could reach a different answer
7
+ // in a repository holding more than one — so the command's answer is the only one.
8
+ // Set by the `dev` command on the environment the supervisor passes to its children. The database
9
+ // and cache connections travel the same way, under the names `@vendure/cloud` already publishes for
10
+ // them, so nothing here has to know how they were provisioned.
11
+ export const DEV_CONFIG_PATH_VAR = "VENDURE_CLOUD_DEV_CONFIG";
12
+ export function loadDevCloudConfig() {
13
+ const configPath = process.env[DEV_CONFIG_PATH_VAR];
14
+ if (configPath === undefined || configPath === "") {
15
+ throw new Error([
16
+ "Vendure Cloud: this entry point is started by `vendure dev` and was run some other way.",
17
+ " It expects the Cloud Config to have been chosen for it, and nothing chose one.",
18
+ " Run `vendure dev` from your project instead.",
19
+ "",
20
+ ].join("\n"));
21
+ }
22
+ // `require` rather than `import`, because this is how the file gets compiled. The supervisor
23
+ // starts these processes through the project's TypeScript compiler hook, which registers itself
24
+ // against the CommonJS loader — so a dynamic `import()` of the same path would bypass it and ask
25
+ // Node to run TypeScript it cannot read.
26
+ return readCloudConfigHandle(createRequire(import.meta.url)(configPath), configPath);
27
+ }
28
+ //# sourceMappingURL=dev-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dev-config.js","sourceRoot":"","sources":["../../src/dev/dev-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAElE,sFAAsF;AACtF,EAAE;AACF,oGAAoG;AACpG,kGAAkG;AAClG,mFAAmF;AAEnF,kGAAkG;AAClG,oGAAoG;AACpG,+DAA+D;AAC/D,MAAM,CAAC,MAAM,mBAAmB,GAAG,0BAA0B,CAAC;AAE9D,MAAM,UAAU,kBAAkB;IAChC,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;IACpD,IAAI,UAAU,KAAK,SAAS,IAAI,UAAU,KAAK,EAAE,EAAE,CAAC;QAClD,MAAM,IAAI,KAAK,CACb;YACE,yFAAyF;YACzF,kFAAkF;YAClF,gDAAgD;YAChD,EAAE;SACH,CAAC,IAAI,CAAC,IAAI,CAAC,CACb,CAAC;IACJ,CAAC;IAED,6FAA6F;IAC7F,gGAAgG;IAChG,iGAAiG;IACjG,yCAAyC;IACzC,OAAO,qBAAqB,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,UAAU,CAAC,EAAE,UAAU,CAAC,CAAC;AACvF,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=dev-migrate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dev-migrate.d.ts","sourceRoot":"","sources":["../../src/dev/dev-migrate.ts"],"names":[],"mappings":""}
@@ -0,0 +1,17 @@
1
+ import { runLocalMigrations } from "../local-runtime.js";
2
+ import { loadDevCloudConfig } from "./dev-config.js";
3
+ import { reportDevProcessFailure } from "./dev-process.js";
4
+ // The migration step `vendure dev` runs to completion before it starts the server and the worker.
5
+ //
6
+ // It is a process of its own for the same reason a deploy runs `migrate` as its own run mode: the
7
+ // schema has to be finished before anything serves against it. Running it inside the server instead
8
+ // would leave the worker racing a schema that is still being built, and on a first run that race is
9
+ // lost every time because the database starts empty.
10
+ async function main() {
11
+ // Silent, because this process exists only to prepare the database. The server and the worker
12
+ // each name their own substitutes as they start, which is where a developer reads what is
13
+ // running; a third copy of that list from a process that has already exited is noise.
14
+ await runLocalMigrations(loadDevCloudConfig(), { announce: () => undefined });
15
+ }
16
+ main().catch(reportDevProcessFailure);
17
+ //# sourceMappingURL=dev-migrate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dev-migrate.js","sourceRoot":"","sources":["../../src/dev/dev-migrate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAE3D,kGAAkG;AAClG,EAAE;AACF,kGAAkG;AAClG,oGAAoG;AACpG,oGAAoG;AACpG,qDAAqD;AAErD,KAAK,UAAU,IAAI;IACjB,8FAA8F;IAC9F,0FAA0F;IAC1F,sFAAsF;IACtF,MAAM,kBAAkB,CAAC,kBAAkB,EAAE,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,SAAS,EAAE,CAAC,CAAC;AAChF,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function reportDevProcessFailure(error: unknown): void;
2
+ //# sourceMappingURL=dev-process.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dev-process.d.ts","sourceRoot":"","sources":["../../src/dev/dev-process.ts"],"names":[],"mappings":"AASA,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAG5D"}
@@ -0,0 +1,14 @@
1
+ // What the three supervised entry points do with a failure.
2
+ //
3
+ // The message alone, and a non-zero exit code. Every error these processes raise is one this
4
+ // package wrote and addressed to a developer — a cache that refused a connection, an application
5
+ // with no migrations, managed configuration in a process that must not use substitutes — and a
6
+ // stack trace through the composer adds nothing a reader of those messages needs.
7
+ //
8
+ // The exit code is what the supervisor reads. Core stops the sibling processes when one of them
9
+ // exits non-zero, so this is also what takes the rest of the run down.
10
+ export function reportDevProcessFailure(error) {
11
+ process.stderr.write(`${error instanceof Error ? error.message : String(error)}\n`);
12
+ process.exitCode = 1;
13
+ }
14
+ //# sourceMappingURL=dev-process.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dev-process.js","sourceRoot":"","sources":["../../src/dev/dev-process.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,EAAE;AACF,6FAA6F;AAC7F,iGAAiG;AACjG,+FAA+F;AAC/F,kFAAkF;AAClF,EAAE;AACF,gGAAgG;AAChG,uEAAuE;AACvE,MAAM,UAAU,uBAAuB,CAAC,KAAc;IACpD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACpF,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;AACvB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=dev-server.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dev-server.d.ts","sourceRoot":"","sources":["../../src/dev/dev-server.ts"],"names":[],"mappings":""}
@@ -0,0 +1,15 @@
1
+ import { bootstrapLocalServer } from "../local-runtime.js";
2
+ import { loadDevCloudConfig } from "./dev-config.js";
3
+ import { reportDevProcessFailure } from "./dev-process.js";
4
+ // The server process `vendure dev` supervises, in place of the `src/index.ts` a self-hosted Vendure
5
+ // project writes. ADR-0043 takes the entry point out of the application, so there is no customer
6
+ // file for the supervisor to start and this stands in its place.
7
+ //
8
+ // It does not run migrations. `vendure dev` runs the migration chain to completion before it starts
9
+ // anything, which is the order a deploy uses, and is what keeps the worker from reaching a database
10
+ // whose schema the server has not finished building.
11
+ async function main() {
12
+ await bootstrapLocalServer(loadDevCloudConfig());
13
+ }
14
+ main().catch(reportDevProcessFailure);
15
+ //# sourceMappingURL=dev-server.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dev-server.js","sourceRoot":"","sources":["../../src/dev/dev-server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAE3D,oGAAoG;AACpG,iGAAiG;AACjG,iEAAiE;AACjE,EAAE;AACF,oGAAoG;AACpG,oGAAoG;AACpG,qDAAqD;AAErD,KAAK,UAAU,IAAI;IACjB,MAAM,oBAAoB,CAAC,kBAAkB,EAAE,CAAC,CAAC;AACnD,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=dev-worker.d.ts.map