@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,171 @@
1
+ // Mirrors the VC Environment Desired State schema from `@vendure-cloud/environment-state`, and the
2
+ // response `@vendure-cloud/api-types` wraps it in. See ./README.md for why this package cannot
3
+ // import either, including as types.
4
+ //
5
+ // The whole schema is mirrored rather than only the types, because one of the two call sites is not
6
+ // validation: `config <section> set` parses the document it is about to send and reads the PATCH
7
+ // body out of the result, so the server defaults `serverServiceSchema` materializes — the port and
8
+ // the health check path — are part of what the CLI sends. Dropping the parse would change the
9
+ // request, and the bounds and the removed-field messages are asserted on the error path as well.
10
+ // CLO-685 records that decision.
11
+ //
12
+ // `VC_ENVIRONMENT_TYPES` is the runtime half of the `VcEnvironmentType` that `wire-types.ts`
13
+ // declares; `test/cli-contract-parity.test.ts` asserts the two describe the same members, so the
14
+ // mirror still has one answer for the set.
15
+ //
16
+ // This file imports `zod`, so a command reaches it from inside its `run` through `await import(...)`
17
+ // rather than from the module that declares the command tree. `test/cli-published-surface.test.ts`
18
+ // fails if loading the CLI plugin reaches `zod`.
19
+ import { z } from "zod";
20
+ export const DESIRED_STATE_SCHEMA_VERSION = 1;
21
+ export const VC_REGIONS = ["eu-west-1"];
22
+ export const vcRegionSchema = z.string().trim().pipe(z.enum(VC_REGIONS));
23
+ export const VC_ENVIRONMENT_TYPES = ["dev", "uat", "staging", "production"];
24
+ export const vcEnvironmentTypeSchema = z.enum(VC_ENVIRONMENT_TYPES);
25
+ // The plans an addon may run on. The original derives this list by slicing its plan catalog at a
26
+ // named minimum; the catalog itself has no reader here, so the mirror declares the result and the
27
+ // parity suite compares it with the real list at runtime.
28
+ export const VC_ADDON_PLANS = [
29
+ "vc-compute-20",
30
+ "vc-compute-50",
31
+ "vc-compute-100-1",
32
+ "vc-compute-100-2",
33
+ "vc-compute-100-4",
34
+ "vc-compute-200",
35
+ "vc-compute-200-4",
36
+ "vc-compute-200-8",
37
+ "vc-compute-200-16",
38
+ "vc-compute-400",
39
+ "vc-compute-400-16",
40
+ "vc-compute-800-8",
41
+ "vc-compute-800-16",
42
+ "vc-compute-800-24",
43
+ "vc-compute-800-32",
44
+ "vc-compute-800-40",
45
+ "vc-compute-1200-24",
46
+ "vc-compute-1600-32",
47
+ "vc-compute-2000-40",
48
+ ];
49
+ export const vcAddonPlanSchema = z.enum(VC_ADDON_PLANS);
50
+ const runtimeReplicasSchema = z.number().int().min(1).max(20);
51
+ const addonReplicasSchema = z.number().int().min(1).max(10);
52
+ const storageGbSchema = z.number().int().min(1).max(1000);
53
+ const typesenseStorageGbSchema = storageGbSchema.min(6);
54
+ // How many tasks a runtime service runs, and nothing about how large each one is. The task shape is
55
+ // the platform's, resolved from the VC Environment's type and its platform-managed capacity class
56
+ // (CLO-569), and no longer named in this document.
57
+ //
58
+ // `replicas` is the temporary half of that split. It stays customer-configurable because the
59
+ // platform has no autoscaling yet and because stop and start restore a service to the count
60
+ // recorded here (CLO-495). CLO-572 replaces it with platform-owned bounds and removes the field.
61
+ const serviceSchema = z
62
+ .object({
63
+ replicas: runtimeReplicasSchema,
64
+ })
65
+ .strict();
66
+ // Where the server listens and how the load balancer decides it is alive.
67
+ //
68
+ // On the server alone, because the worker has no listener and nothing routes to it. Both carry a
69
+ // default, so a VC Environment created before these existed parses unchanged and a customer who
70
+ // never sets them gets what the managed build produces.
71
+ //
72
+ // They are here rather than fixed in the control plane because a VC Environment may run an image
73
+ // the platform did not build — `deploy --server-image` is a supported path — and that image
74
+ // listens where it listens. A platform-wide constant would mean a target group that never turns
75
+ // healthy, reported as a failed deploy with nothing naming the port as the cause.
76
+ export const DEFAULT_SERVER_PORT = 3000;
77
+ export const DEFAULT_SERVER_HEALTH_CHECK_PATH = "/health";
78
+ const serverServiceSchema = serviceSchema
79
+ .extend({
80
+ port: z.number().int().min(1).max(65535).default(DEFAULT_SERVER_PORT),
81
+ // Rooted, because the load balancer sends it as a path and a relative one is refused at apply
82
+ // time by AWS rather than here.
83
+ healthCheckPath: z.string().startsWith("/").default(DEFAULT_SERVER_HEALTH_CHECK_PATH),
84
+ })
85
+ .strict();
86
+ // A field keeps arriving for a while after it leaves Desired State. A stored document carries the
87
+ // key, and so does a request from a CLI built before the field went. The strict object below
88
+ // reports both of those as an unrecognized key, which reads as a misspelling rather than as a field
89
+ // that was removed. Each removed field therefore gets its own check here, which names the field and
90
+ // says why it is gone.
91
+ // Asset storage left with ADR-0051: a VC Environment's assets live in a bucket the platform creates
92
+ // and destroys with the environment, so there is nothing to choose.
93
+ export const ASSETS_NOT_CONFIGURABLE_MESSAGE = "Asset storage is not configurable. Remove the assets section: Vendure Cloud gives every VC Environment its own asset storage and serves it.";
94
+ // The cache left with ADR-0026: the platform gives each VC Environment its own cache and injects
95
+ // the cache strategy that uses it, so there is nothing to choose.
96
+ export const CACHE_NOT_CONFIGURABLE_MESSAGE = "The cache is not configurable. Remove the cache section: Vendure Cloud gives every VC Environment its own cache and configures Vendure to use it.";
97
+ // The database left with ADR-0020 and ADR-0040: every VC Environment gets its own PostgreSQL
98
+ // database on the shared Aurora Serverless cluster its Cell owns. The cluster scales itself, so
99
+ // there is one engine and no per-environment size.
100
+ export const DATABASE_NOT_CONFIGURABLE_MESSAGE = "The database is not configurable. Remove the database section: Vendure Cloud gives every VC Environment its own PostgreSQL database and scales it.";
101
+ // The job queue left with ADR-0022: every VC Environment gets its own queue and the platform
102
+ // supplies the strategy that reads and writes it, so there is nothing to choose.
103
+ export const JOB_QUEUE_NOT_CONFIGURABLE_MESSAGE = "The job queue is not configurable. Remove the jobQueue section: Vendure Cloud gives every VC Environment its own job queue and configures Vendure to use it.";
104
+ // Per-service compute plans left with ADR-0036 and CLO-569: Vendure Cloud sizes a VC Environment's
105
+ // server and worker from its type and its platform-managed capacity class, so there is no compute
106
+ // size to pick. Replicas are unaffected and stay in the document.
107
+ export const RUNTIME_PLAN_NOT_CONFIGURABLE_MESSAGE = "Runtime service sizing is not configurable. Remove the plan field: Vendure Cloud sizes the server and the worker. Replicas are still yours to set, and support can raise the size if you need more.";
108
+ const REMOVED_FIELD_MESSAGES = {
109
+ assets: ASSETS_NOT_CONFIGURABLE_MESSAGE,
110
+ cache: CACHE_NOT_CONFIGURABLE_MESSAGE,
111
+ database: DATABASE_NOT_CONFIGURABLE_MESSAGE,
112
+ jobQueue: JOB_QUEUE_NOT_CONFIGURABLE_MESSAGE,
113
+ };
114
+ // The runtime services whose `plan` is gone. Checked one level down rather than through the strict
115
+ // object above, for the same reason the four top-level sections are: a strict object reports an
116
+ // unrecognized key, which reads as a misspelling rather than as a field the platform took over.
117
+ const REMOVED_RUNTIME_SERVICES = ["server", "worker"];
118
+ const removedFieldsSchema = z.unknown().superRefine((value, ctx) => {
119
+ if (typeof value !== "object" || value === null)
120
+ return;
121
+ for (const [field, message] of Object.entries(REMOVED_FIELD_MESSAGES)) {
122
+ if (!(field in value))
123
+ continue;
124
+ ctx.addIssue({ code: "custom", path: [field], message });
125
+ }
126
+ const runtime = value.runtime;
127
+ if (typeof runtime !== "object" || runtime === null)
128
+ return;
129
+ for (const key of REMOVED_RUNTIME_SERVICES) {
130
+ const service = runtime[key];
131
+ if (typeof service !== "object" || service === null)
132
+ continue;
133
+ if (!("plan" in service))
134
+ continue;
135
+ ctx.addIssue({
136
+ code: "custom",
137
+ path: ["runtime", key, "plan"],
138
+ message: RUNTIME_PLAN_NOT_CONFIGURABLE_MESSAGE,
139
+ });
140
+ }
141
+ });
142
+ const environmentDesiredStateObjectSchema = z
143
+ .object({
144
+ schemaVersion: z.literal(DESIRED_STATE_SCHEMA_VERSION),
145
+ environment: z
146
+ .object({
147
+ type: vcEnvironmentTypeSchema,
148
+ region: vcRegionSchema,
149
+ })
150
+ .strict(),
151
+ runtime: z
152
+ .object({
153
+ server: serverServiceSchema,
154
+ worker: serviceSchema,
155
+ })
156
+ .strict(),
157
+ search: z.discriminatedUnion("managedService", [
158
+ z.object({ managedService: z.literal("none") }).strict(),
159
+ z
160
+ .object({
161
+ managedService: z.literal("typesense"),
162
+ plan: vcAddonPlanSchema,
163
+ replicas: addonReplicasSchema,
164
+ storageGb: typesenseStorageGbSchema,
165
+ })
166
+ .strict(),
167
+ ]),
168
+ })
169
+ .strict();
170
+ export const environmentDesiredStateSchema = removedFieldsSchema.pipe(environmentDesiredStateObjectSchema);
171
+ //# sourceMappingURL=desired-state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"desired-state.js","sourceRoot":"","sources":["../../../../src/cli/lib/contract/desired-state.ts"],"names":[],"mappings":"AAAA,mGAAmG;AACnG,+FAA+F;AAC/F,qCAAqC;AACrC,EAAE;AACF,oGAAoG;AACpG,iGAAiG;AACjG,mGAAmG;AACnG,8FAA8F;AAC9F,iGAAiG;AACjG,iCAAiC;AACjC,EAAE;AACF,6FAA6F;AAC7F,iGAAiG;AACjG,2CAA2C;AAC3C,EAAE;AACF,qGAAqG;AACrG,mGAAmG;AACnG,iDAAiD;AAEjD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC;AAC9C,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,WAAW,CAAU,CAAC;AAEjD,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;AAEzE,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,YAAY,CAAU,CAAC;AACrF,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;AAEpE,iGAAiG;AACjG,kGAAkG;AAClG,0DAA0D;AAC1D,MAAM,CAAC,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E,cAAc;KACvB,CAAC;SACD,MAAM,EAAE;IACX,OAAO,EAAE,CAAC;SACP,MAAM,CAAC;QACN,MAAM,EAAE,mBAAmB;QAC3B,MAAM,EAAE,aAAa;KACtB,CAAC;SACD,MAAM,EAAE;IACX,MAAM,EAAE,CAAC,CAAC,kBAAkB,CAAC,gBAAgB,EAAE;QAC7C,CAAC,CAAC,MAAM,CAAC,EAAE,cAAc,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE;QACxD,CAAC;aACE,MAAM,CAAC;YACN,cAAc,EAAE,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC;YACtC,IAAI,EAAE,iBAAiB;YACvB,QAAQ,EAAE,mBAAmB;YAC7B,SAAS,EAAE,wBAAwB;SACpC,CAAC;aACD,MAAM,EAAE;KACZ,CAAC;CACH,CAAC;KACD,MAAM,EAAE,CAAC;AAEZ,MAAM,CAAC,MAAM,6BAA6B,GAAG,mBAAmB,CAAC,IAAI,CACnE,mCAAmC,CACpC,CAAC"}
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Credentials that other Vendure products issue, and that a Vendure Cloud
3
+ * management request must never authenticate with.
4
+ *
5
+ * Two call sites read this file, and they are the two places a customer's
6
+ * credential is taken in: `resolveCredential` in the CLI, which refuses the
7
+ * value before it leaves the machine, and `AuthGuard` in the control plane,
8
+ * which refuses it again for every caller that is not this CLI. Restating
9
+ * either the prefixes or the refusal at one of those places would let them
10
+ * drift, and a drifted denylist is one that has a hole in it.
11
+ *
12
+ * `AdminGuard` and `StaffAuthGuard` also take a bearer token and are
13
+ * deliberately not covered. The token they verify is a staff session this
14
+ * platform issued and signs, checked locally against our own key, so a value
15
+ * from another Vendure product is refused there on its own and is never handed
16
+ * to anyone. The property this file protects — that a first-party credential
17
+ * is not forwarded to a third party — has nothing to reach on those routes.
18
+ *
19
+ * `vce_` is the project-scoped Environment Credential that Vendure Platform
20
+ * writes to `<projectRoot>/.vendure/credentials.json` and injects into a
21
+ * running Vendure process. `vcli_` and `vclr_` are the access and refresh
22
+ * halves of the user-scoped Console CLI Session in
23
+ * `~/.vendure/console-credentials.json`.
24
+ *
25
+ * Refusing `vcli_` is not the final answer for it — CLO-641 makes the Console
26
+ * session usable through a server-side exchange with Console. Until that
27
+ * exists, a Console session presented here is a credential Cloud cannot check,
28
+ * and the boundary says so rather than forwarding it.
29
+ */
30
+ export declare const ENVIRONMENT_CREDENTIAL_PREFIX = "vce_";
31
+ export declare const CONSOLE_SESSION_TOKEN_PREFIX = "vcli_";
32
+ export declare const CONSOLE_REFRESH_TOKEN_PREFIX = "vclr_";
33
+ export declare const ForeignCredential: {
34
+ readonly ENVIRONMENT: "environment";
35
+ readonly CONSOLE_SESSION: "consoleSession";
36
+ readonly CONSOLE_REFRESH: "consoleRefresh";
37
+ };
38
+ export type ForeignCredential = (typeof ForeignCredential)[keyof typeof ForeignCredential];
39
+ /**
40
+ * Which foreign credential this value is, or null when it is none of them.
41
+ *
42
+ * A denylist, not a shape check. Anything that is not recognised here is left
43
+ * alone and validated as it always was, so a legitimate credential can never be
44
+ * turned away by this function.
45
+ */
46
+ export declare function classifyForeignCredential(value: string): ForeignCredential | null;
47
+ /** What the caller is told. One wording, so the CLI and the API agree. */
48
+ export declare function foreignCredentialRefusal(kind: ForeignCredential): string;
49
+ //# sourceMappingURL=foreign-credentials.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"foreign-credentials.d.ts","sourceRoot":"","sources":["../../../../src/cli/lib/contract/foreign-credentials.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,eAAO,MAAM,6BAA6B,SAAS,CAAC;AACpD,eAAO,MAAM,4BAA4B,UAAU,CAAC;AACpD,eAAO,MAAM,4BAA4B,UAAU,CAAC;AAEpD,eAAO,MAAM,iBAAiB;;;;CAIpB,CAAC;AACX,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAC;AAiB3F;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,GAAG,iBAAiB,GAAG,IAAI,CAOjF;AAED,0EAA0E;AAC1E,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,iBAAiB,GAAG,MAAM,CAExE"}
@@ -0,0 +1,71 @@
1
+ // Mirrors `@vendure-cloud/api-types`'s `foreign-credentials.ts`. See ./README.md for why this
2
+ // package cannot import it, and `test/cli-contract-parity.test.ts` for what keeps the two
3
+ // answering the same. The refusal wording is shared with the control plane's `AuthGuard`, so it
4
+ // is reproduced exactly rather than reworded for this caller.
5
+ /**
6
+ * Credentials that other Vendure products issue, and that a Vendure Cloud
7
+ * management request must never authenticate with.
8
+ *
9
+ * Two call sites read this file, and they are the two places a customer's
10
+ * credential is taken in: `resolveCredential` in the CLI, which refuses the
11
+ * value before it leaves the machine, and `AuthGuard` in the control plane,
12
+ * which refuses it again for every caller that is not this CLI. Restating
13
+ * either the prefixes or the refusal at one of those places would let them
14
+ * drift, and a drifted denylist is one that has a hole in it.
15
+ *
16
+ * `AdminGuard` and `StaffAuthGuard` also take a bearer token and are
17
+ * deliberately not covered. The token they verify is a staff session this
18
+ * platform issued and signs, checked locally against our own key, so a value
19
+ * from another Vendure product is refused there on its own and is never handed
20
+ * to anyone. The property this file protects — that a first-party credential
21
+ * is not forwarded to a third party — has nothing to reach on those routes.
22
+ *
23
+ * `vce_` is the project-scoped Environment Credential that Vendure Platform
24
+ * writes to `<projectRoot>/.vendure/credentials.json` and injects into a
25
+ * running Vendure process. `vcli_` and `vclr_` are the access and refresh
26
+ * halves of the user-scoped Console CLI Session in
27
+ * `~/.vendure/console-credentials.json`.
28
+ *
29
+ * Refusing `vcli_` is not the final answer for it — CLO-641 makes the Console
30
+ * session usable through a server-side exchange with Console. Until that
31
+ * exists, a Console session presented here is a credential Cloud cannot check,
32
+ * and the boundary says so rather than forwarding it.
33
+ */
34
+ export const ENVIRONMENT_CREDENTIAL_PREFIX = "vce_";
35
+ export const CONSOLE_SESSION_TOKEN_PREFIX = "vcli_";
36
+ export const CONSOLE_REFRESH_TOKEN_PREFIX = "vclr_";
37
+ export const ForeignCredential = {
38
+ ENVIRONMENT: "environment",
39
+ CONSOLE_SESSION: "consoleSession",
40
+ CONSOLE_REFRESH: "consoleRefresh",
41
+ };
42
+ const PREFIXES = [
43
+ [ENVIRONMENT_CREDENTIAL_PREFIX, ForeignCredential.ENVIRONMENT],
44
+ [CONSOLE_SESSION_TOKEN_PREFIX, ForeignCredential.CONSOLE_SESSION],
45
+ [CONSOLE_REFRESH_TOKEN_PREFIX, ForeignCredential.CONSOLE_REFRESH],
46
+ ];
47
+ const REFUSALS = {
48
+ [ForeignCredential.ENVIRONMENT]: "A Vendure project environment credential cannot manage Vendure Cloud. It authenticates one environment of one project. Use a Vendure Cloud API key, or run `vcloud login`.",
49
+ [ForeignCredential.CONSOLE_SESSION]: "A Vendure Console session cannot manage Vendure Cloud. Use a Vendure Cloud API key, or run `vcloud login`.",
50
+ [ForeignCredential.CONSOLE_REFRESH]: "A Vendure Console refresh token is not a credential Vendure Cloud accepts. Use a Vendure Cloud API key, or run `vcloud login`.",
51
+ };
52
+ /**
53
+ * Which foreign credential this value is, or null when it is none of them.
54
+ *
55
+ * A denylist, not a shape check. Anything that is not recognised here is left
56
+ * alone and validated as it always was, so a legitimate credential can never be
57
+ * turned away by this function.
58
+ */
59
+ export function classifyForeignCredential(value) {
60
+ for (const [prefix, kind] of PREFIXES) {
61
+ if (value.startsWith(prefix)) {
62
+ return kind;
63
+ }
64
+ }
65
+ return null;
66
+ }
67
+ /** What the caller is told. One wording, so the CLI and the API agree. */
68
+ export function foreignCredentialRefusal(kind) {
69
+ return REFUSALS[kind];
70
+ }
71
+ //# sourceMappingURL=foreign-credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"foreign-credentials.js","sourceRoot":"","sources":["../../../../src/cli/lib/contract/foreign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VICES: readonly ["server", "worker"];
2
+ export type LogService = (typeof LOG_SERVICES)[number];
3
+ export declare function isLogService(value: string): value is LogService;
4
+ export interface LogEntry {
5
+ id: string;
6
+ timestamp: string;
7
+ message: string;
8
+ receivedAt?: string;
9
+ resumeCursor?: string;
10
+ }
11
+ export interface LogStreamErrorFrame {
12
+ streamError: {
13
+ statusCode: number;
14
+ message: string;
15
+ };
16
+ }
17
+ export interface LogStreamReconnectFrame {
18
+ streamReconnect: {
19
+ reason: "LIFETIME_EXPIRED";
20
+ };
21
+ }
22
+ export interface LogStreamTerminalFrame {
23
+ streamTerminal: {
24
+ reason: "BUILD_STEP_FINISHED";
25
+ };
26
+ }
27
+ export declare const BUILD_LOG_AVAILABILITY: readonly ["AVAILABLE", "NOT_STARTED", "NO_BUILD_STEP", "NO_OUTPUT", "EXPIRED"];
28
+ export type BuildLogAvailability = (typeof BUILD_LOG_AVAILABILITY)[number];
29
+ export interface BuildLogPage {
30
+ status: BuildLogAvailability;
31
+ items: LogEntry[];
32
+ nextCursor: string | null;
33
+ }
34
+ export declare function isLogEntry(value: unknown): value is {
35
+ id?: string;
36
+ timestamp?: string;
37
+ message: string;
38
+ receivedAt?: string;
39
+ resumeCursor?: string;
40
+ };
41
+ export declare function isLogStreamErrorFrame(value: unknown): value is LogStreamErrorFrame;
42
+ export declare function isLogStreamReconnectFrame(value: unknown): value is LogStreamReconnectFrame;
43
+ export declare function isLogStreamTerminalFrame(value: unknown): value is LogStreamTerminalFrame;
44
+ //# sourceMappingURL=logs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logs.d.ts","sourceRoot":"","sources":["../../../../src/cli/lib/contract/logs.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,YAAY,+BAAgC,CAAC;AAC1D,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AAEvD,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,U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GAAG,KAAK,IAAI,sBAAsB,CAQxF"}
@@ -0,0 +1,66 @@
1
+ // Mirrors the environment log and build log wire contract from `@vendure-cloud/api-types`'s
2
+ // `index.ts`. See ./README.md for why this package cannot import it, including as types.
3
+ //
4
+ // `GET /environments/{id}/logs` returns `LogEntry[]`. `GET /environments/{id}/logs/stream`
5
+ // (`?service=<LogService>&lines=<history replay count>`) is SSE: it replays recent history, then
6
+ // tails; each frame's data is a JSON `LogEntry`. Handler-level failures cannot use an HTTP status,
7
+ // because SSE commits the 200 before the handler runs, so they arrive as a single
8
+ // `LogStreamErrorFrame` followed by a clean close — consumers gate on it the way they would gate on
9
+ // the status. Keepalives are frames with empty data and SSE parsers drop them.
10
+ export const LOG_SERVICES = ["server", "worker"];
11
+ export function isLogService(value) {
12
+ return LOG_SERVICES.includes(value);
13
+ }
14
+ // NO_OUTPUT and EXPIRED are the same absence seen from two distances. A build can fail before it
15
+ // has a log stream at all — a role or an image the build service cannot use fails it in its queued
16
+ // phase, with no container and nothing written — and reporting that as EXPIRED tells a customer
17
+ // their log aged out on a build that ran minutes ago. The reason for such a failure is on the VC
18
+ // Deployment's own status message rather than in a log.
19
+ export const BUILD_LOG_AVAILABILITY = [
20
+ "AVAILABLE",
21
+ "NOT_STARTED",
22
+ "NO_BUILD_STEP",
23
+ "NO_OUTPUT",
24
+ "EXPIRED",
25
+ ];
26
+ // Runtime guards for stream consumers: each SSE frame is untrusted until
27
+ // shape-checked — a drifted producer must never render garbage as log lines.
28
+ // The guard deliberately accepts older producers without `id`/`timestamp`;
29
+ // consumers can degrade display while the current producer contract remains
30
+ // the stricter LogEntry interface above.
31
+ export function isLogEntry(value) {
32
+ if (typeof value !== "object" || value === null)
33
+ return false;
34
+ const candidate = value;
35
+ return (typeof candidate.message === "string" &&
36
+ (candidate.id === undefined || typeof candidate.id === "string") &&
37
+ (candidate.timestamp === undefined || typeof candidate.timestamp === "string") &&
38
+ (candidate.receivedAt === undefined || typeof candidate.receivedAt === "string") &&
39
+ (candidate.resumeCursor === undefined || typeof candidate.resumeCursor === "string"));
40
+ }
41
+ export function isLogStreamErrorFrame(value) {
42
+ if (typeof value !== "object" || value === null || !("streamError" in value))
43
+ return false;
44
+ const candidate = value.streamError;
45
+ return (typeof candidate === "object" &&
46
+ candidate !== null &&
47
+ typeof candidate.statusCode === "number" &&
48
+ typeof candidate.message === "string");
49
+ }
50
+ export function isLogStreamReconnectFrame(value) {
51
+ if (typeof value !== "object" || value === null || !("streamReconnect" in value))
52
+ return false;
53
+ const candidate = value.streamReconnect;
54
+ return (typeof candidate === "object" &&
55
+ candidate !== null &&
56
+ candidate.reason === "LIFETIME_EXPIRED");
57
+ }
58
+ export function isLogStreamTerminalFrame(value) {
59
+ if (typeof value !== "object" || value === null || !("streamTerminal" in value))
60
+ return false;
61
+ const candidate = value.streamTerminal;
62
+ return (typeof candidate === "object" &&
63
+ candidate !== null &&
64
+ candidate.reason === "BUILD_STEP_FINISHED");
65
+ }
66
+ //# sourceMappingURL=logs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logs.js","sourceRoot":"","sources":["../../../../src/cli/lib/contract/logs.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,yFAAyF;AACzF,EAAE;AACF,2FAA2F;AAC3F,iGAAiG;AACjG,mGAAmG;AACnG,kFAAkF;AAClF,oGAAoG;AACpG,+EAA+E;AAE/E,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAU,CAAC;AAG1D,MAAM,UAAU,YAAY,CAAC,KAAa;IACxC,OAAQ,YAAkC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAC7D,CAAC;AA6BD,iGAAiG;AACjG,mGAAmG;AACnG,gGAAgG;AAChG,iGAAiG;AACjG,wDAAwD;AACxD,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,WAAW;IACX,aAAa;IACb,eAAe;IACf,WAAW;IACX,SAAS;CACD,CAAC;AASX,yEAAyE;AACzE,6EA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AM,SAAS,GAAI,KAAsC,CAAC,eAAe,CAAC;IAC1E,OAAO,CACL,OAAO,SAAS,KAAK,QAAQ;QAC7B,SAAS,KAAK,IAAI;QACjB,SAAkC,CAAC,MAAM,KAAK,kBAAkB,CAClE,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,wBAAwB,CAAC,KAAc;IACrD,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,CAAC,gBAAgB,IAAI,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IAC9F,MAAM,SAAS,GAAI,KAAqC,CAAC,cAAc,CAAC;IACxE,OAAO,CACL,OAAO,SAAS,KAAK,QAAQ;QAC7B,SAAS,KAAK,IAAI;QACjB,SAAkC,CAAC,MAAM,KAAK,qBAAqB,CACrE,CAAC;AACJ,CAAC"}
@@ -0,0 +1,31 @@
1
+ import type { IdentityEnvironmentType, RuntimeIntent, RuntimeState, VcEnvironmentType } from "./wire-types.js";
2
+ export interface ProjectResponse {
3
+ id: string;
4
+ name: string;
5
+ slug: string;
6
+ organizationId: string;
7
+ githubRepoUrl: string | null;
8
+ createdAt: string;
9
+ updatedAt: string;
10
+ }
11
+ export interface ProjectEnvironmentSummaryResponse {
12
+ id: string;
13
+ name: string;
14
+ slug: string;
15
+ type: IdentityEnvironmentType;
16
+ desiredStateType: VcEnvironmentType;
17
+ status: string | null;
18
+ runtimeHealth: string;
19
+ runtimeIntent: RuntimeIntent | null;
20
+ runtimeState: RuntimeState;
21
+ lastDeployedAt: string | null;
22
+ }
23
+ export interface ProjectDetailsResponse extends ProjectResponse {
24
+ envs: ProjectEnvironmentSummaryResponse[];
25
+ }
26
+ export interface ResourceDeletionResponse {
27
+ deleted: true;
28
+ id: string;
29
+ slug: string;
30
+ }
31
+ //# sourceMappingURL=projects.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"projects.d.ts","sourceRoot":"","sources":["../../../../src/cli/lib/contract/projects.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACV,uBAAuB,EACvB,aAAa,EACb,YAAY,EACZ,iBAAiB,EAClB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,iCAAiC;IAChD,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,uBAAuB,CAAC;IAC9B,gBAAgB,EAAE,iBAAiB,CAAC;IACpC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,aAAa,GAAG,IAAI,CAAC;IACpC,YAAY,EAAE,YAAY,CAAC;IAC3B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AAED,MAAM,WAAW,sBAAuB,SAAQ,eAAe;IAC7D,IAAI,EAAE,iCAAiC,EAAE,CAAC;CAC3C;AAED,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,IAAI,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd"}
@@ -0,0 +1,9 @@
1
+ // Mirrors the VC Project response shapes from `@vendure-cloud/api-types`'s `index.ts`, and the
2
+ // answer both delete commands read. See ./README.md for why this package cannot import them,
3
+ // including as types.
4
+ //
5
+ // `ResourceDeletionResponse` is one shape shared by two families: deleting a VC Project and
6
+ // deleting a VC Environment are answered the same way. It is declared here once rather than in both
7
+ // areas, so the two families cannot end up describing that answer differently.
8
+ export {};
9
+ //# sourceMappingURL=projects.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"projects.js","sourceRoot":"","sources":["../../../../src/cli/lib/contract/projects.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAC/F,6FAA6F;AAC7F,sBAAsB;AACtB,EAAE;AACF,4FAA4F;AAC5F,oGAAoG;AACpG,+EAA+E"}
@@ -0,0 +1,4 @@
1
+ import { type DeploymentResourceLabelContext } from "./deployment-resource-labels.js";
2
+ export declare function formatUserFacingErrorDetails(error: string, context?: DeploymentResourceLabelContext): string;
3
+ export declare function formatInlineUserFacingErrorReason(error: string, context?: DeploymentResourceLabelContext): string;
4
+ //# sourceMappingURL=public-error-details.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public-error-details.d.ts","sourceRoot":"","sources":["../../../../src/cli/lib/contract/public-error-details.ts"],"names":[],"mappings":"AAaA,OAAO,EACL,KAAK,8BAA8B,EAEpC,MAAM,iCAAiC,CAAC;AAiDzC,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,8BAA8B,GACvC,MAAM,CAMR;AAED,wBAAgB,iCAAiC,CAC/C,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,8BAA8B,GACvC,MAAM,CAER"}