@vendure/cloud 0.3.2 → 0.4.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 (257) hide show
  1. package/README.md +6 -1
  2. package/dist/cli/commands/deployment/build-logs.js +2 -9
  3. package/dist/cli/commands/deployment/build-logs.js.map +1 -1
  4. package/dist/cli/commands/deployment/deploy.d.ts.map +1 -1
  5. package/dist/cli/commands/deployment/deploy.js +34 -64
  6. package/dist/cli/commands/deployment/deploy.js.map +1 -1
  7. package/dist/cli/commands/deployment/index.d.ts.map +1 -1
  8. package/dist/cli/commands/deployment/index.js +52 -27
  9. package/dist/cli/commands/deployment/index.js.map +1 -1
  10. package/dist/cli/commands/deployment/log-export.d.ts +13 -0
  11. package/dist/cli/commands/deployment/log-export.d.ts.map +1 -0
  12. package/dist/cli/commands/deployment/log-export.js +133 -0
  13. package/dist/cli/commands/deployment/log-export.js.map +1 -0
  14. package/dist/cli/commands/deployment/log-query-output.d.ts +13 -0
  15. package/dist/cli/commands/deployment/log-query-output.d.ts.map +1 -0
  16. package/dist/cli/commands/deployment/log-query-output.js +106 -0
  17. package/dist/cli/commands/deployment/log-query-output.js.map +1 -0
  18. package/dist/cli/commands/deployment/logs.d.ts +1 -0
  19. package/dist/cli/commands/deployment/logs.d.ts.map +1 -1
  20. package/dist/cli/commands/deployment/logs.js +347 -69
  21. package/dist/cli/commands/deployment/logs.js.map +1 -1
  22. package/dist/cli/commands/deployment/options.d.ts +2 -6
  23. package/dist/cli/commands/deployment/options.d.ts.map +1 -1
  24. package/dist/cli/commands/deployment/options.js +21 -9
  25. package/dist/cli/commands/deployment/options.js.map +1 -1
  26. package/dist/cli/commands/deployment/plan.d.ts +1 -1
  27. package/dist/cli/commands/deployment/plan.d.ts.map +1 -1
  28. package/dist/cli/commands/deployment/plan.js +4 -6
  29. package/dist/cli/commands/deployment/plan.js.map +1 -1
  30. package/dist/cli/commands/deployment/recovery.d.ts +9 -0
  31. package/dist/cli/commands/deployment/recovery.d.ts.map +1 -0
  32. package/dist/cli/commands/deployment/recovery.js +86 -0
  33. package/dist/cli/commands/deployment/recovery.js.map +1 -0
  34. package/dist/cli/commands/deployment/rollback.d.ts.map +1 -1
  35. package/dist/cli/commands/deployment/rollback.js +8 -3
  36. package/dist/cli/commands/deployment/rollback.js.map +1 -1
  37. package/dist/cli/commands/deployment/show.d.ts.map +1 -1
  38. package/dist/cli/commands/deployment/show.js +16 -5
  39. package/dist/cli/commands/deployment/show.js.map +1 -1
  40. package/dist/cli/commands/deployment/source.d.ts +1 -12
  41. package/dist/cli/commands/deployment/source.d.ts.map +1 -1
  42. package/dist/cli/commands/deployment/source.js +5 -13
  43. package/dist/cli/commands/deployment/source.js.map +1 -1
  44. package/dist/cli/commands/deployment/status.d.ts.map +1 -1
  45. package/dist/cli/commands/deployment/status.js +22 -20
  46. package/dist/cli/commands/deployment/status.js.map +1 -1
  47. package/dist/cli/commands/deployment/teardown.d.ts.map +1 -1
  48. package/dist/cli/commands/deployment/teardown.js +12 -1
  49. package/dist/cli/commands/deployment/teardown.js.map +1 -1
  50. package/dist/cli/commands/identity-context/keys.d.ts.map +1 -1
  51. package/dist/cli/commands/identity-context/keys.js +6 -5
  52. package/dist/cli/commands/identity-context/keys.js.map +1 -1
  53. package/dist/cli/commands/identity-context/login.d.ts.map +1 -1
  54. package/dist/cli/commands/identity-context/login.js +2 -2
  55. package/dist/cli/commands/identity-context/login.js.map +1 -1
  56. package/dist/cli/commands/identity-context/logout.d.ts.map +1 -1
  57. package/dist/cli/commands/identity-context/logout.js +3 -4
  58. package/dist/cli/commands/identity-context/logout.js.map +1 -1
  59. package/dist/cli/commands/identity-context/org-switch.d.ts.map +1 -1
  60. package/dist/cli/commands/identity-context/org-switch.js +19 -7
  61. package/dist/cli/commands/identity-context/org-switch.js.map +1 -1
  62. package/dist/cli/commands/identity-context/use.d.ts.map +1 -1
  63. package/dist/cli/commands/identity-context/use.js +2 -3
  64. package/dist/cli/commands/identity-context/use.js.map +1 -1
  65. package/dist/cli/commands/identity-context/whoami.d.ts.map +1 -1
  66. package/dist/cli/commands/identity-context/whoami.js +33 -12
  67. package/dist/cli/commands/identity-context/whoami.js.map +1 -1
  68. package/dist/cli/commands/index.d.ts.map +1 -1
  69. package/dist/cli/commands/index.js +0 -1
  70. package/dist/cli/commands/index.js.map +1 -1
  71. package/dist/cli/commands/project-config/config/desired-state.d.ts +1 -1
  72. package/dist/cli/commands/project-config/config/desired-state.d.ts.map +1 -1
  73. package/dist/cli/commands/project-config/config/desired-state.js +4 -3
  74. package/dist/cli/commands/project-config/config/desired-state.js.map +1 -1
  75. package/dist/cli/commands/project-config/config/email/domain.d.ts +5 -0
  76. package/dist/cli/commands/project-config/config/email/domain.d.ts.map +1 -0
  77. package/dist/cli/commands/project-config/config/email/domain.js +80 -0
  78. package/dist/cli/commands/project-config/config/email/domain.js.map +1 -0
  79. package/dist/cli/commands/project-config/config/email/events.d.ts +4 -0
  80. package/dist/cli/commands/project-config/config/email/events.d.ts.map +1 -0
  81. package/dist/cli/commands/project-config/config/email/events.js +55 -0
  82. package/dist/cli/commands/project-config/config/email/events.js.map +1 -0
  83. package/dist/cli/commands/project-config/config/email/index.d.ts +2 -0
  84. package/dist/cli/commands/project-config/config/email/index.d.ts.map +1 -0
  85. package/dist/cli/commands/project-config/config/email/index.js +108 -0
  86. package/dist/cli/commands/project-config/config/email/index.js.map +1 -0
  87. package/dist/cli/commands/project-config/config/email/test-sending.d.ts +4 -0
  88. package/dist/cli/commands/project-config/config/email/test-sending.d.ts.map +1 -0
  89. package/dist/cli/commands/project-config/config/email/test-sending.js +68 -0
  90. package/dist/cli/commands/project-config/config/email/test-sending.js.map +1 -0
  91. package/dist/cli/commands/project-config/config/index.d.ts.map +1 -1
  92. package/dist/cli/commands/project-config/config/index.js +12 -7
  93. package/dist/cli/commands/project-config/config/index.js.map +1 -1
  94. package/dist/cli/commands/project-config/config/runtime.d.ts +2 -1
  95. package/dist/cli/commands/project-config/config/runtime.d.ts.map +1 -1
  96. package/dist/cli/commands/project-config/config/runtime.js +43 -29
  97. package/dist/cli/commands/project-config/config/runtime.js.map +1 -1
  98. package/dist/cli/commands/project-config/env/index.d.ts.map +1 -1
  99. package/dist/cli/commands/project-config/env/index.js +8 -2
  100. package/dist/cli/commands/project-config/env/index.js.map +1 -1
  101. package/dist/cli/commands/project-config/environment/index.d.ts.map +1 -1
  102. package/dist/cli/commands/project-config/environment/index.js +15 -1
  103. package/dist/cli/commands/project-config/environment/index.js.map +1 -1
  104. package/dist/cli/commands/project-config/environment/regions.d.ts +6 -0
  105. package/dist/cli/commands/project-config/environment/regions.d.ts.map +1 -0
  106. package/dist/cli/commands/project-config/environment/regions.js +22 -0
  107. package/dist/cli/commands/project-config/environment/regions.js.map +1 -0
  108. package/dist/cli/commands/project-config/init/init.d.ts.map +1 -1
  109. package/dist/cli/commands/project-config/init/init.js +28 -5
  110. package/dist/cli/commands/project-config/init/init.js.map +1 -1
  111. package/dist/cli/commands/project-config/project/list.d.ts.map +1 -1
  112. package/dist/cli/commands/project-config/project/list.js +8 -1
  113. package/dist/cli/commands/project-config/project/list.js.map +1 -1
  114. package/dist/cli/commands/project-config/project/show.d.ts.map +1 -1
  115. package/dist/cli/commands/project-config/project/show.js +12 -0
  116. package/dist/cli/commands/project-config/project/show.js.map +1 -1
  117. package/dist/cli/commands/project-config/project/subscription-state.d.ts +5 -0
  118. package/dist/cli/commands/project-config/project/subscription-state.d.ts.map +1 -0
  119. package/dist/cli/commands/project-config/project/subscription-state.js +57 -0
  120. package/dist/cli/commands/project-config/project/subscription-state.js.map +1 -0
  121. package/dist/cli/commands/project-config/source/connect.d.ts.map +1 -1
  122. package/dist/cli/commands/project-config/source/connect.js +5 -5
  123. package/dist/cli/commands/project-config/source/connect.js.map +1 -1
  124. package/dist/cli/commands/project-config/source/map.d.ts.map +1 -1
  125. package/dist/cli/commands/project-config/source/map.js +4 -4
  126. package/dist/cli/commands/project-config/source/map.js.map +1 -1
  127. package/dist/cli/commands/project-config/source/status.d.ts.map +1 -1
  128. package/dist/cli/commands/project-config/source/status.js +71 -17
  129. package/dist/cli/commands/project-config/source/status.js.map +1 -1
  130. package/dist/cli/commands/runtime-data/backup.d.ts +1 -0
  131. package/dist/cli/commands/runtime-data/backup.d.ts.map +1 -1
  132. package/dist/cli/commands/runtime-data/backup.js +36 -0
  133. package/dist/cli/commands/runtime-data/backup.js.map +1 -1
  134. package/dist/cli/commands/runtime-data/index.d.ts +1 -0
  135. package/dist/cli/commands/runtime-data/index.d.ts.map +1 -1
  136. package/dist/cli/commands/runtime-data/index.js +26 -4
  137. package/dist/cli/commands/runtime-data/index.js.map +1 -1
  138. package/dist/cli/commands/runtime-data/restore.d.ts.map +1 -1
  139. package/dist/cli/commands/runtime-data/restore.js +33 -5
  140. package/dist/cli/commands/runtime-data/restore.js.map +1 -1
  141. package/dist/cli/index.d.ts +13 -3
  142. package/dist/cli/index.d.ts.map +1 -1
  143. package/dist/cli/index.js +12 -2
  144. package/dist/cli/index.js.map +1 -1
  145. package/dist/cli/lib/auth.d.ts +21 -2
  146. package/dist/cli/lib/auth.d.ts.map +1 -1
  147. package/dist/cli/lib/auth.js +22 -2
  148. package/dist/cli/lib/auth.js.map +1 -1
  149. package/dist/cli/lib/commit.d.ts +4 -0
  150. package/dist/cli/lib/commit.d.ts.map +1 -0
  151. package/dist/cli/lib/commit.js +22 -0
  152. package/dist/cli/lib/commit.js.map +1 -0
  153. package/dist/cli/lib/console-credential.d.ts +55 -0
  154. package/dist/cli/lib/console-credential.d.ts.map +1 -0
  155. package/dist/cli/lib/console-credential.js +164 -0
  156. package/dist/cli/lib/console-credential.js.map +1 -0
  157. package/dist/cli/lib/console-origins.d.ts +30 -0
  158. package/dist/cli/lib/console-origins.d.ts.map +1 -0
  159. package/dist/cli/lib/console-origins.js +87 -0
  160. package/dist/cli/lib/console-origins.js.map +1 -0
  161. package/dist/cli/lib/console-pairing.d.ts +15 -0
  162. package/dist/cli/lib/console-pairing.d.ts.map +1 -0
  163. package/dist/cli/lib/console-pairing.js +70 -0
  164. package/dist/cli/lib/console-pairing.js.map +1 -0
  165. package/dist/cli/lib/console-session-lock.d.ts +39 -0
  166. package/dist/cli/lib/console-session-lock.d.ts.map +1 -0
  167. package/dist/cli/lib/console-session-lock.js +235 -0
  168. package/dist/cli/lib/console-session-lock.js.map +1 -0
  169. package/dist/cli/lib/console-session.d.ts +47 -0
  170. package/dist/cli/lib/console-session.d.ts.map +1 -0
  171. package/dist/cli/lib/console-session.js +235 -0
  172. package/dist/cli/lib/console-session.js.map +1 -0
  173. package/dist/cli/lib/contract/backup-schedule-reasons.d.ts +4 -0
  174. package/dist/cli/lib/contract/backup-schedule-reasons.d.ts.map +1 -0
  175. package/dist/cli/lib/contract/backup-schedule-reasons.js +17 -0
  176. package/dist/cli/lib/contract/backup-schedule-reasons.js.map +1 -0
  177. package/dist/cli/lib/contract/build-settings.d.ts +1 -1
  178. package/dist/cli/lib/contract/database.d.ts +19 -0
  179. package/dist/cli/lib/contract/database.d.ts.map +1 -1
  180. package/dist/cli/lib/contract/database.js.map +1 -1
  181. package/dist/cli/lib/contract/deployments.d.ts +13 -0
  182. package/dist/cli/lib/contract/deployments.d.ts.map +1 -1
  183. package/dist/cli/lib/contract/deployments.js +38 -0
  184. package/dist/cli/lib/contract/deployments.js.map +1 -1
  185. package/dist/cli/lib/contract/desired-state.d.ts +3 -5
  186. package/dist/cli/lib/contract/desired-state.d.ts.map +1 -1
  187. package/dist/cli/lib/contract/desired-state.js +42 -28
  188. package/dist/cli/lib/contract/desired-state.js.map +1 -1
  189. package/dist/cli/lib/contract/foreign-credentials.d.ts +6 -4
  190. package/dist/cli/lib/contract/foreign-credentials.d.ts.map +1 -1
  191. package/dist/cli/lib/contract/foreign-credentials.js +7 -5
  192. package/dist/cli/lib/contract/foreign-credentials.js.map +1 -1
  193. package/dist/cli/lib/contract/logs.d.ts +120 -0
  194. package/dist/cli/lib/contract/logs.d.ts.map +1 -1
  195. package/dist/cli/lib/contract/logs.js +106 -1
  196. package/dist/cli/lib/contract/logs.js.map +1 -1
  197. package/dist/cli/lib/contract/managed-email.d.ts +57 -0
  198. package/dist/cli/lib/contract/managed-email.d.ts.map +1 -0
  199. package/dist/cli/lib/contract/managed-email.js +21 -0
  200. package/dist/cli/lib/contract/managed-email.js.map +1 -0
  201. package/dist/cli/lib/contract/projects.d.ts +6 -0
  202. package/dist/cli/lib/contract/projects.d.ts.map +1 -1
  203. package/dist/cli/lib/contract/regions.d.ts +11 -0
  204. package/dist/cli/lib/contract/regions.d.ts.map +1 -0
  205. package/dist/cli/lib/contract/regions.js +7 -0
  206. package/dist/cli/lib/contract/regions.js.map +1 -0
  207. package/dist/cli/lib/contract/runtime-operations.d.ts +0 -1
  208. package/dist/cli/lib/contract/runtime-operations.d.ts.map +1 -1
  209. package/dist/cli/lib/contract/source-disconnect-reasons.d.ts +4 -0
  210. package/dist/cli/lib/contract/source-disconnect-reasons.d.ts.map +1 -0
  211. package/dist/cli/lib/contract/source-disconnect-reasons.js +31 -0
  212. package/dist/cli/lib/contract/source-disconnect-reasons.js.map +1 -0
  213. package/dist/cli/lib/contract/source-repository.d.ts +1 -1
  214. package/dist/cli/lib/contract/source-repository.d.ts.map +1 -1
  215. package/dist/cli/lib/contract/source-repository.js +1 -0
  216. package/dist/cli/lib/contract/source-repository.js.map +1 -1
  217. package/dist/cli/lib/errors.d.ts +30 -0
  218. package/dist/cli/lib/errors.d.ts.map +1 -1
  219. package/dist/cli/lib/errors.js +46 -0
  220. package/dist/cli/lib/errors.js.map +1 -1
  221. package/dist/cli/lib/platform-address.d.ts +3 -0
  222. package/dist/cli/lib/platform-address.d.ts.map +1 -0
  223. package/dist/cli/lib/platform-address.js +7 -0
  224. package/dist/cli/lib/platform-address.js.map +1 -0
  225. package/dist/cli/lib/resolve.d.ts +1 -0
  226. package/dist/cli/lib/resolve.d.ts.map +1 -1
  227. package/dist/cli/lib/resolve.js +26 -3
  228. package/dist/cli/lib/resolve.js.map +1 -1
  229. package/dist/cli/lib/terminal-output.d.ts +8 -0
  230. package/dist/cli/lib/terminal-output.d.ts.map +1 -0
  231. package/dist/cli/lib/terminal-output.js +52 -0
  232. package/dist/cli/lib/terminal-output.js.map +1 -0
  233. package/dist/dev/dashboard-vite-config.d.ts +1 -0
  234. package/dist/dev/dashboard-vite-config.d.ts.map +1 -1
  235. package/dist/dev/dashboard-vite-config.js +26 -3
  236. package/dist/dev/dashboard-vite-config.js.map +1 -1
  237. package/dist/dev/dev-command.d.ts.map +1 -1
  238. package/dist/dev/dev-command.js +21 -1
  239. package/dist/dev/dev-command.js.map +1 -1
  240. package/dist/dev/dev-migrate.js +2 -0
  241. package/dist/dev/dev-migrate.js.map +1 -1
  242. package/dist/dev/dev-server.js +3 -0
  243. package/dist/dev/dev-server.js.map +1 -1
  244. package/dist/dev/dev-worker.js +2 -1
  245. package/dist/dev/dev-worker.js.map +1 -1
  246. package/dist/local-core.d.ts +2 -0
  247. package/dist/local-core.d.ts.map +1 -0
  248. package/dist/local-core.js +15 -0
  249. package/dist/local-core.js.map +1 -0
  250. package/dist/local-durable-execution-plugin.d.ts +3 -0
  251. package/dist/local-durable-execution-plugin.d.ts.map +1 -0
  252. package/dist/local-durable-execution-plugin.js +33 -0
  253. package/dist/local-durable-execution-plugin.js.map +1 -0
  254. package/dist/local-runtime.d.ts.map +1 -1
  255. package/dist/local-runtime.js +7 -0
  256. package/dist/local-runtime.js.map +1 -1
  257. package/package.json +6 -6
@@ -58,6 +58,18 @@ export interface TeardownStatusDetails {
58
58
  export interface DeploymentIdPrefixMatchesResponse {
59
59
  matches: string[];
60
60
  }
61
+ export declare const DEPLOYMENT_FAILURE_STAGES: readonly ["BUILD_PREPARATION", "BUILD", "BUILD_HANDOFF", "DEPLOYMENT_PREPARATION", "INFRASTRUCTURE", "DATABASE_PROVISIONING", "MIGRATION", "RUNTIME_START"];
62
+ export type DeploymentFailureStage = (typeof DEPLOYMENT_FAILURE_STAGES)[number];
63
+ export declare const DEPLOYMENT_RECOVERY_ACTIONS: readonly ["DEPLOY_AGAIN", "FIX_SOURCE_AND_DEPLOY", "FIX_MIGRATION_AND_DEPLOY", "ROLLBACK", "CONTACT_SUPPORT", "INSPECT_ENVIRONMENT"];
64
+ export type DeploymentRecoveryAction = (typeof DEPLOYMENT_RECOVERY_ACTIONS)[number];
65
+ export type DeploymentRecovery = {
66
+ stage: DeploymentFailureStage | null;
67
+ stageLabel: string | null;
68
+ stageUnavailableReason: string | null;
69
+ nextAction: DeploymentRecoveryAction;
70
+ summary: string;
71
+ nextActionMessage: string;
72
+ };
61
73
  export declare const ENVIRONMENT_STATUS_RESOURCE_CATEGORIES: readonly ["DATASTORE", "SERVICE"];
62
74
  export type EnvironmentStatusResourceCategory = (typeof ENVIRONMENT_STATUS_RESOURCE_CATEGORIES)[number];
63
75
  export type EnvironmentStatusResource = {
@@ -70,6 +82,7 @@ export declare const EnvironmentActiveWorkKind: {
70
82
  readonly RUNTIME_OPERATION: "RUNTIME_OPERATION";
71
83
  readonly SEED_APPLY: "SEED_APPLY";
72
84
  readonly DATABASE_RESTORE: "DATABASE_RESTORE";
85
+ readonly RELOCATION: "RELOCATION";
73
86
  };
74
87
  export type EnvironmentActiveWorkKind = (typeof EnvironmentActiveWorkKind)[keyof typeof EnvironmentActiveWorkKind];
75
88
  export type EnvironmentActiveWork = {
@@ -1 +1 @@
1
- {"version":3,"file":"deployments.d.ts","sourceRoot":"","sources":["../../../../src/cli/lib/contract/deployments.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACpF,OAAO,KAAK,EAAE,0BAA0B,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/F,eAAO,MAAM,2BAA2B,sDAAuD,CAAC;AAEhG,MAAM,MAAM,wBAAwB,GAAG,CAAC,OA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ING", "SUCCEEDED", "FAILED", "TIMED_OUT"];
29
+ // Mirrors the deployment-recovery contract from `@vendure-cloud/api-types`, which carries all of
30
+ // its reasoning. These declarations must stay character-identical to it; `cli-contract-drift.test.ts`
31
+ // enforces that, and deliberately strips comments — so a copy of the reasoning here would be
32
+ // unenforced and would drift.
33
+ export const DEPLOYMENT_FAILURE_STAGES = [
34
+ "BUILD_PREPARATION",
35
+ "BUILD",
36
+ "BUILD_HANDOFF",
37
+ "DEPLOYMENT_PREPARATION",
38
+ "INFRASTRUCTURE",
39
+ "DATABASE_PROVISIONING",
40
+ "MIGRATION",
41
+ "RUNTIME_START",
42
+ ];
43
+ // The one thing to do next about a failed VC Deployment. One action rather than a list, because a
44
+ // customer reading two suggestions has to choose between them with less information than the
45
+ // platform already has.
46
+ //
47
+ // The action is not a pure function of the stage. A rollback needs an earlier release to roll back
48
+ // to, so a first deploy that fails at its rollout is answered differently from a later one.
49
+ //
50
+ // `INSPECT_ENVIRONMENT` is the answer when the stage is not known, and it is deliberately the
51
+ // weakest. Every other action asserts something about what is running, and asserting that wrongly
52
+ // sends a customer to roll back an environment that never changed.
53
+ export const DEPLOYMENT_RECOVERY_ACTIONS = [
54
+ "DEPLOY_AGAIN",
55
+ "FIX_SOURCE_AND_DEPLOY",
56
+ "FIX_MIGRATION_AND_DEPLOY",
57
+ "ROLLBACK",
58
+ "CONTACT_SUPPORT",
59
+ "INSPECT_ENVIRONMENT",
60
+ ];
29
61
  export const ENVIRONMENT_STATUS_RESOURCE_CATEGORIES = ["DATASTORE", "SERVICE"];
30
62
  // Environment-scoped work that serializes against everything else touching the
31
63
  // same VC Environment. Deploys, teardowns and runtime operations all take the
@@ -42,5 +74,11 @@ export const EnvironmentActiveWorkKind = {
42
74
  // everything above for the same reason a seed apply does — and with itself, which is the case
43
75
  // that made the guard durable rather than a same-request check (CLO-499).
44
76
  DATABASE_RESTORE: "DATABASE_RESTORE",
77
+ // A VC Relocation moves the environment's authoritative placement, so it holds the slot against
78
+ // everything above — and for days rather than minutes, because preparation, the wait for the
79
+ // maintenance window, the cutover and the seven-day retirement are one lease (CLO-719, ADR-0031).
80
+ // A customer told their deploy is queued behind a runtime operation when it is really queued
81
+ // behind scheduled maintenance has been told the wrong thing about how long to wait.
82
+ RELOCATION: "RELOCATION",
45
83
  };
46
84
  //# sourceMappingURL=deployments.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"deployments.js","sourceRoot":"","sources":["../../../../src/cli/lib/contract/deployments.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,oGAAoG;AACpG,+DAA+D;AAC/D,EAAE;AACF,iGAAiG;AACjG,gGAAgG;AAChG,2CAA2C;AAC3C,EAAE;AACF,2FAA2F;AAC3F,yFAAyF;AACzF,oGAAoG;AACpG,oEAAoE;AAMpE,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,CAAU,CAAC;AAIhG,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,CAAU,CAAC;AA6CvF,gGAAgG;AAChG,8FAA8F;AAC9F,EAAE;AACF,8FAA8F;AAC9F,gGAAgG;AAChG,mGAAmG;AACnG,oGAAoG;AACpG,kGAAkG;AAClG,sFAAsF;AACtF,MAAM,UAAU,wBAAwB,CAAC,IAExC;IACC,OAAO,OAAO,IAAI,CAAC,wBAAwB,KAAK,QAAQ,CAAC;AAC3D,CAAC;AAED,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,UAAU,EAAE,gBAAgB,CAAU,CAAC;AAGtE,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,CAAU,CAAC;AA2BpG,MAAM,CAAC,MAAM,sCAAsC,GAAG,CAAC,WAAW,EAAE,SAAS,CAAU,CAAC;AASxF,+EAA+E;AAC/E,8EAA8E;AAC9E,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C9B,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,mBAAmB;IACnB,OAAO;IACP,eAAe;IACf,wBAAwB;IACxB,gBAAgB;IAChB,uBAAuB;IACvB,WAAW;IACX,eAAe;CACP,CAAC;AAIX,kGAAkG;AAClG,6FAA6F;AAC7F,wBAAwB;AACxB,EAAE;AACF,mGAAmG;AACnG,4FAA4F;AAC5F,EAAE;AACF,8FAA8F;AAC9F,kGAAkG;AAClG,mEAAmE;AACnE,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,cAAc;IACd,uBAAuB;IACvB,0BAA0B;IAC1B,UAAU;IACV,iBAAiB;IACjB,qBAAqB;CACb,CAAC;AAsBX,MAAM,CAAC,MAAM,sCAAsC,GAAG,CAAC,WAAW,EAAE,SAAS,CAAU,CAAC;AASxF,+EAA+E;AAC/E,8EAA8E;AAC9E,mDAAmD;AACnD,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,UAAU,EAAE,YAAY;IACxB,QAAQ,EAAE,UAAU;IACpB,iBAAiB,EAAE,mBAAmB;IACtC,gGAAgG;IAChG,iGAAiG;IACjG,sCAAsC;IACtC,UAAU,EAAE,YAAY;IACxB,6FAA6F;IAC7F,8FAA8F;IAC9F,0EAA0E;IAC1E,gBAAgB,EAAE,kBAAkB;IACpC,gGAAgG;IAChG,6FAA6F;IAC7F,kGAAkG;IAClG,6FAA6F;IAC7F,qFAAqF;IACrF,UAAU,EAAE,YAAY;CAChB,CAAC"}
@@ -41,7 +41,9 @@ export declare const ASSETS_NOT_CONFIGURABLE_MESSAGE = "Asset storage is not con
41
41
  export declare 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.";
42
42
  export declare 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.";
43
43
  export declare 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.";
44
- export declare 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.";
44
+ export declare const RUNTIME_PLAN_NOT_CONFIGURABLE_MESSAGE = "Runtime service sizing is not configurable. Remove the plan field: Vendure Cloud sizes the server and the worker, and support can raise the size if you need more.";
45
+ export declare const RUNTIME_REPLICAS_NOT_CONFIGURABLE_MESSAGE = "Replica counts are not configurable. Remove the replicas field: Vendure Cloud scales the server and the worker automatically within platform limits, and support can raise those limits if you need more.";
46
+ export declare const RUNTIME_WORKER_NOT_CONFIGURABLE_MESSAGE = "The worker is not configurable. Remove the worker section: Vendure Cloud sizes and scales the worker, and the port and health check path belong to the server alone.";
45
47
  export declare const environmentDesiredStateSchema: z.ZodPipe<z.ZodUnknown, z.ZodObject<{
46
48
  schemaVersion: z.ZodLiteral<1>;
47
49
  environment: z.ZodObject<{
@@ -57,13 +59,9 @@ export declare const environmentDesiredStateSchema: z.ZodPipe<z.ZodUnknown, z.Zo
57
59
  }, z.core.$strict>;
58
60
  runtime: z.ZodObject<{
59
61
  server: z.ZodObject<{
60
- replicas: z.ZodNumber;
61
62
  port: z.ZodDefault<z.ZodNumber>;
62
63
  healthCheckPath: z.ZodDefault<z.ZodString>;
63
64
  }, z.core.$strict>;
64
- worker: z.ZodObject<{
65
- replicas: z.ZodNumber;
66
- }, z.core.$strict>;
67
65
  }, z.core.$strict>;
68
66
  search: z.ZodDiscriminatedUnion<[z.ZodObject<{
69
67
  managedService: z.ZodLiteral<"none">;
@@ -1 +1 @@
1
- {"version":3,"file":"desired-state.d.ts","sourceRoot":"","sources":["../../../../src/cli/lib/contract/desired-state.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,4BA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  "vc-compute-2000-40",
48
48
  ];
49
49
  export const vcAddonPlanSchema = z.enum(VC_ADDON_PLANS);
50
- const runtimeReplicasSchema = z.number().int().min(1).max(20);
51
50
  const addonReplicasSchema = z.number().int().min(1).max(10);
52
51
  const storageGbSchema = z.number().int().min(1).max(1000);
53
52
  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
53
  // Where the server listens and how the load balancer decides it is alive.
67
54
  //
68
55
  // On the server alone, because the worker has no listener and nothing routes to it. Both carry a
@@ -70,13 +57,13 @@ const serviceSchema = z
70
57
  // never sets them gets what the managed build produces.
71
58
  //
72
59
  // 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.
60
+ // the platform did not build: a VC Deployment recorded before the managed build owned every image,
61
+ // and the rollback that replays one. A platform-wide constant would mean a target group that never
62
+ // turns healthy, reported as a failed deploy with nothing naming the port as the cause.
76
63
  export const DEFAULT_SERVER_PORT = 3000;
77
64
  export const DEFAULT_SERVER_HEALTH_CHECK_PATH = "/health";
78
- const serverServiceSchema = serviceSchema
79
- .extend({
65
+ const serverServiceSchema = z
66
+ .object({
80
67
  port: z.number().int().min(1).max(65535).default(DEFAULT_SERVER_PORT),
81
68
  // Rooted, because the load balancer sends it as a path and a relative one is refused at apply
82
69
  // time by AWS rather than here.
@@ -103,18 +90,32 @@ export const DATABASE_NOT_CONFIGURABLE_MESSAGE = "The database is not configurab
103
90
  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
91
  // Per-service compute plans left with ADR-0036 and CLO-569: Vendure Cloud sizes a VC Environment's
105
92
  // 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.";
93
+ // size to pick.
94
+ 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, and support can raise the size if you need more.";
95
+ // Replica counts left with CLO-572: Vendure Cloud scales a VC Environment's server and its worker
96
+ // between platform-owned bounds, so a fixed count is neither used nor honoured.
97
+ //
98
+ // The sentence names autoscaling rather than only refusing the field, because a customer who set a
99
+ // count did so to handle load and needs to know that the thing they wanted still happens.
100
+ export const RUNTIME_REPLICAS_NOT_CONFIGURABLE_MESSAGE = "Replica counts are not configurable. Remove the replicas field: Vendure Cloud scales the server and the worker automatically within platform limits, and support can raise those limits if you need more.";
101
+ // The whole worker section went with it, because the count was all it held.
102
+ export const RUNTIME_WORKER_NOT_CONFIGURABLE_MESSAGE = "The worker is not configurable. Remove the worker section: Vendure Cloud sizes and scales the worker, and the port and health check path belong to the server alone.";
108
103
  const REMOVED_FIELD_MESSAGES = {
109
104
  assets: ASSETS_NOT_CONFIGURABLE_MESSAGE,
110
105
  cache: CACHE_NOT_CONFIGURABLE_MESSAGE,
111
106
  database: DATABASE_NOT_CONFIGURABLE_MESSAGE,
112
107
  jobQueue: JOB_QUEUE_NOT_CONFIGURABLE_MESSAGE,
113
108
  };
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.
109
+ // The runtime services whose `plan` and `replicas` are gone. Checked one level down rather than
110
+ // through the strict object above, for the same reason the four top-level sections are: a strict
111
+ // object reports an unrecognized key, which reads as a misspelling rather than as a field the
112
+ // platform took over.
117
113
  const REMOVED_RUNTIME_SERVICES = ["server", "worker"];
114
+ // The fields those services no longer carry, each with the sentence that says where it went.
115
+ const REMOVED_RUNTIME_SERVICE_FIELDS = {
116
+ plan: RUNTIME_PLAN_NOT_CONFIGURABLE_MESSAGE,
117
+ replicas: RUNTIME_REPLICAS_NOT_CONFIGURABLE_MESSAGE,
118
+ };
118
119
  const removedFieldsSchema = z.unknown().superRefine((value, ctx) => {
119
120
  if (typeof value !== "object" || value === null)
120
121
  return;
@@ -130,12 +131,19 @@ const removedFieldsSchema = z.unknown().superRefine((value, ctx) => {
130
131
  const service = runtime[key];
131
132
  if (typeof service !== "object" || service === null)
132
133
  continue;
133
- if (!("plan" in service))
134
- continue;
134
+ for (const [field, message] of Object.entries(REMOVED_RUNTIME_SERVICE_FIELDS)) {
135
+ if (!(field in service))
136
+ continue;
137
+ ctx.addIssue({ code: "custom", path: ["runtime", key, field], message });
138
+ }
139
+ }
140
+ // The section itself, reported after its fields so that a document written against the previous
141
+ // shape is told about the count it set before it is told the section holding it has gone.
142
+ if ("worker" in runtime) {
135
143
  ctx.addIssue({
136
144
  code: "custom",
137
- path: ["runtime", key, "plan"],
138
- message: RUNTIME_PLAN_NOT_CONFIGURABLE_MESSAGE,
145
+ path: ["runtime", "worker"],
146
+ message: RUNTIME_WORKER_NOT_CONFIGURABLE_MESSAGE,
139
147
  });
140
148
  }
141
149
  });
@@ -148,10 +156,16 @@ const environmentDesiredStateObjectSchema = z
148
156
  region: vcRegionSchema,
149
157
  })
150
158
  .strict(),
159
+ // The server alone. Both of its fields describe where an application listens, which is the
160
+ // only thing about a runtime service left for a customer to say: how large each task is and how
161
+ // many of them run are both the platform's (CLO-569, CLO-572).
162
+ //
163
+ // There is no `worker` key, because everything that was ever in one has gone. A section holding
164
+ // nothing would still have to be written into every document and would mean nothing when it
165
+ // was.
151
166
  runtime: z
152
167
  .object({
153
168
  server: serverServiceSchema,
154
- worker: serviceSchema,
155
169
  })
156
170
  .strict(),
157
171
  search: z.discriminatedUnion("managedService", [
@@ -1 +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,MAAM,cAAc,GAAG;IAC5B,eAAe;IACf,eAAe;IACf,kBAAkB;IAClB,kBAAkB;IAClB,kBAAkB;IAClB,gBAAgB;IAChB,kBAAkB;IAClB,kBAAkB;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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"}
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,K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@ -22,10 +22,12 @@
22
22
  * halves of the user-scoped Console CLI Session in
23
23
  * `~/.vendure/console-credentials.json`.
24
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.
25
+ * `vcli_` is refused as an API key only. A Console session presented as
26
+ * `Authorization: Bearer` is resolved by the control plane against Console's
27
+ * introspection route (CLO-641), which is the one place that can check it, and
28
+ * only on a deployment configured to reach a Console. Presenting it through
29
+ * `--token`, `VENDURE_CLOUD_TOKEN` or `x-api-key` is still a mistake, because
30
+ * none of those paths reaches that check.
29
31
  */
30
32
  export declare const ENVIRONMENT_CREDENTIAL_PREFIX = "vce_";
31
33
  export declare const CONSOLE_SESSION_TOKEN_PREFIX = "vcli_";
@@ -1 +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"}
1
+ {"version":3,"file":"foreign-credentials.d.ts","sourceRoot":"","sources":["../../../../src/cli/lib/contract/foreign-credentials.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;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"}
@@ -26,10 +26,12 @@
26
26
  * halves of the user-scoped Console CLI Session in
27
27
  * `~/.vendure/console-credentials.json`.
28
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.
29
+ * `vcli_` is refused as an API key only. A Console session presented as
30
+ * `Authorization: Bearer` is resolved by the control plane against Console's
31
+ * introspection route (CLO-641), which is the one place that can check it, and
32
+ * only on a deployment configured to reach a Console. Presenting it through
33
+ * `--token`, `VENDURE_CLOUD_TOKEN` or `x-api-key` is still a mistake, because
34
+ * none of those paths reaches that check.
33
35
  */
34
36
  export const ENVIRONMENT_CREDENTIAL_PREFIX = "vce_";
35
37
  export const CONSOLE_SESSION_TOKEN_PREFIX = "vcli_";
@@ -46,7 +48,7 @@ const PREFIXES = [
46
48
  ];
47
49
  const REFUSALS = {
48
50
  [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`.",
51
+ [ForeignCredential.CONSOLE_SESSION]: "A Vendure Console session is not a Vendure Cloud API key. Vendure Cloud reads your Console session from `~/.vendure/console-credentials.json` on its own. Use a Vendure Cloud API key here, or run `vcloud login`.",
50
52
  [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
53
  };
52
54
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"foreign-credentials.js","sourceRoot":"","sources":["../../../../src/cli/lib/contract/foreign-credentials.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,0FAA0F;AAC1F,gGAAgG;AAChG,8DAA8D;AAE9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,MAAM,CAAC,MAAM,6BAA6B,GAAG,MAAM,CAAC;AACpD,MAAM,CAAC,MAAM,4BAA4B,GAAG,OAAO,CAAC;AACpD,MAAM,CAAC,MAAM,4BAA4B,GAAG,OAAO,CAAC;AAEpD,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,WAAW,EAAE,aAAa;IAC1B,eAAe,EAAE,gBAAgB;IACjC,eAAe,EAAE,gBAAgB;CACzB,CAAC;AAGX,MAAM,QAAQ,GAAwD;IACpE,CAAC,6BAA6B,EAAE,iBAAiB,CAAC,WAAW,CAAC;IAC9D,CAAC,4BAA4B,EAAE,iBAAiB,CAAC,eAAe,CAAC;IACjE,CAAC,4BAA4B,EAAE,iBAAiB,CAAC,eAAe,CAAC;CAClE,CAAC;AAEF,MAAM,QAAQ,GAAsC;IAClD,CAAC,iBAAiB,CAAC,WAAW,CAAC,EAC7B,4KAA4K;IAC9K,CAAC,iBAAiB,CAAC,eAAe,CAAC,EACjC,4GAA4G;IAC9G,CAAC,iBAAiB,CAAC,eAAe,CAAC,EACjC,gIAAgI;CACnI,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,UAAU,yBAAyB,CAAC,KAAa;IACrD,KAAK,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BAAyB,CAAC,KAAa;IACrD,KAAK,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,QAAQ,EAAE,CAAC;QACtC,IAAI,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;YAC7B,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,0EAA0E;AAC1E,MAAM,UAAU,wBAAwB,CAAC,IAAuB;IAC9D,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC;AACxB,CAAC"}
@@ -41,4 +41,124 @@ export declare function isLogEntry(value: unknown): value is {
41
41
  export declare function isLogStreamErrorFrame(value: unknown): value is LogStreamErrorFrame;
42
42
  export declare function isLogStreamReconnectFrame(value: unknown): value is LogStreamReconnectFrame;
43
43
  export declare function isLogStreamTerminalFrame(value: unknown): value is LogStreamTerminalFrame;
44
+ export declare const LOG_SOURCES: readonly ["migration", "server", "worker"];
45
+ export type LogSource = (typeof LOG_SOURCES)[number];
46
+ export declare function isLogSource(value: string): value is LogSource;
47
+ export declare const LOG_SEVERITIES: readonly ["debug", "verbose", "info", "warn", "error"];
48
+ export type LogSeverity = (typeof LOG_SEVERITIES)[number];
49
+ export declare function isLogSeverity(value: string): value is LogSeverity;
50
+ export declare function classifyLogSeverity(value: string | null | undefined): LogSeverity | null;
51
+ export declare function structuredLogLevel(message: string): string | null;
52
+ export declare function logSeverityRank(severity: LogSeverity): number;
53
+ export declare function passesMinimumSeverity(severity: LogSeverity | null, minimum: LogSeverity | null): boolean;
54
+ export declare const LOG_QUERY_RESULT_STATES: readonly ["AVAILABLE", "RUNNING", "NO_LOGS", "NO_MATCHES", "PARTIAL", "WINDOW_TOO_WIDE", "OUTSIDE_SEARCHABLE_WINDOW", "RETENTION_EXCEEDED", "INVALID_QUERY", "RATE_LIMITED", "UNAVAILABLE"];
55
+ export type LogQueryResultState = (typeof LOG_QUERY_RESULT_STATES)[number];
56
+ export declare const LOG_QUERY_TRUNCATION_REASONS: readonly ["SCAN_INCOMPLETE", "PAGE_LIMIT", "EXPORT_LIMIT"];
57
+ export type LogQueryTruncationReason = (typeof LOG_QUERY_TRUNCATION_REASONS)[number];
58
+ export declare const LOG_QUERY_DEPLOYMENT_CORRELATIONS: readonly ["TIME_WINDOW", "TASK_IDENTITY"];
59
+ export type LogQueryDeploymentCorrelation = (typeof LOG_QUERY_DEPLOYMENT_CORRELATIONS)[number];
60
+ export declare const LOG_QUERY_FILTERS: readonly ["TIME", "SOURCE", "DEPLOYMENT", "INCLUDE_TEXT", "EXCLUDE_TEXT", "MINIMUM_SEVERITY"];
61
+ export type LogQueryFilter = (typeof LOG_QUERY_FILTERS)[number];
62
+ export interface LogQueryEvent {
63
+ id: string;
64
+ timestamp: string;
65
+ receivedAt: string;
66
+ source: LogSource;
67
+ stream: string;
68
+ message: string;
69
+ severity: LogSeverity | null;
70
+ messageTruncated: boolean;
71
+ }
72
+ export interface LogRetention {
73
+ retentionDays: number;
74
+ searchableFrom: string;
75
+ oldestEventObserved: string | null;
76
+ }
77
+ export interface CreateLogQueryRequest {
78
+ environmentIds: string[];
79
+ sources: LogSource[];
80
+ from?: string;
81
+ to?: string;
82
+ deploymentId?: string;
83
+ include?: string;
84
+ exclude?: string;
85
+ minimumSeverity?: LogSeverity;
86
+ pageSize?: number;
87
+ }
88
+ export interface NormalizedLogQuery {
89
+ environmentIds: string[];
90
+ sources: LogSource[];
91
+ from: string;
92
+ to: string;
93
+ windowClamped: boolean;
94
+ deploymentId: string | null;
95
+ deploymentCorrelation: LogQueryDeploymentCorrelation | null;
96
+ include: string | null;
97
+ exclude: string | null;
98
+ minimumSeverity: LogSeverity | null;
99
+ pageSize: number;
100
+ }
101
+ export interface LogQueryResults {
102
+ state: LogQueryResultState;
103
+ truncationReason: LogQueryTruncationReason | null;
104
+ events: LogQueryEvent[];
105
+ nextCursor: string | null;
106
+ retention: LogRetention;
107
+ retryAfterSeconds: number | null;
108
+ errorDetails: string | null;
109
+ }
110
+ export interface LogQuery {
111
+ id: string;
112
+ projectId: string;
113
+ createdAt: string;
114
+ capabilityVersion: string;
115
+ query: NormalizedLogQuery;
116
+ results: LogQueryResults;
117
+ }
118
+ export declare const LOG_EXPORT_FORMATS: readonly ["JSONL", "TEXT"];
119
+ export type LogExportFormat = (typeof LOG_EXPORT_FORMATS)[number];
120
+ export declare const LOG_EXPORT_STATES: readonly ["PENDING", "READY", "EXPIRED", "FAILED"];
121
+ export type LogExportState = (typeof LOG_EXPORT_STATES)[number];
122
+ export interface CreateLogExportRequest {
123
+ format?: LogExportFormat;
124
+ }
125
+ export interface LogExportDownload {
126
+ url: string;
127
+ expiresAt: string;
128
+ }
129
+ export interface LogExport {
130
+ id: string;
131
+ queryId: string;
132
+ projectId: string;
133
+ format: LogExportFormat;
134
+ state: LogExportState;
135
+ createdAt: string;
136
+ expiresAt: string;
137
+ recordCount: number | null;
138
+ sizeBytes: number | null;
139
+ truncationReason: LogQueryTruncationReason | null;
140
+ download: LogExportDownload | null;
141
+ errorDetails: string | null;
142
+ }
143
+ export interface LogSourceCapability {
144
+ source: LogSource;
145
+ maxQueryWindowSeconds: number;
146
+ searchableWindowSeconds: number;
147
+ retentionDays: number;
148
+ filters: LogQueryFilter[];
149
+ minPageSizeLines: number;
150
+ maxPageSizeLines: number;
151
+ maxPageSizeBytes: number;
152
+ maxMessageBytes: number;
153
+ maxExportBytes: number;
154
+ exportFormats: LogExportFormat[];
155
+ exportExpirySeconds: number;
156
+ asynchronousQueries: boolean;
157
+ }
158
+ export interface LogCapabilities {
159
+ capabilityVersion: string;
160
+ maxEnvironmentsPerQuery: number;
161
+ maxSourcesPerQuery: number;
162
+ sources: LogSourceCapability[];
163
+ }
44
164
  //# sourceMappingURL=logs.d.ts.map
@@ -1 +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,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,CAAC;CAChC"}
@@ -1,7 +1,9 @@
1
1
  // Mirrors the environment log and build log wire contract from `@vendure-cloud/api-types`'s
2
2
  // `index.ts`. See ./README.md for why this package cannot import it, including as types.
3
3
  //
4
- // `GET /environments/{id}/logs` returns `LogEntry[]`. `GET /environments/{id}/logs/stream`
4
+ // `GET /environments/{id}/logs` returns `LogEntry[]`. Nothing in this package calls it since
5
+ // CLO-891: `logs` reads the Project-scoped query below, and only the stream route is still read
6
+ // from here. `GET /environments/{id}/logs/stream`
5
7
  // (`?service=<LogService>&lines=<history replay count>`) is SSE: it replays recent history, then
6
8
  // tails; each frame's data is a JSON `LogEntry`. Handler-level failures cannot use an HTTP status,
7
9
  // because SSE commits the 200 before the handler runs, so they arrive as a single
@@ -63,4 +65,107 @@ export function isLogStreamTerminalFrame(value) {
63
65
  candidate !== null &&
64
66
  candidate.reason === "BUILD_STEP_FINISHED");
65
67
  }
68
+ // Project-scoped log query and export (CLO-733). The routes are
69
+ // `POST /projects/{projectId}/log-queries`, `GET .../log-queries/{queryId}`,
70
+ // `GET .../log-queries/{queryId}/results?cursor=`, `POST .../log-queries/{queryId}/export`,
71
+ // `GET /projects/{projectId}/log-exports/{exportId}`,
72
+ // `GET /projects/{projectId}/log-exports/{exportId}/download` and
73
+ // `GET /projects/{projectId}/log-capabilities`.
74
+ //
75
+ // An export is created and then re-read until it reports `READY`; the download route is what
76
+ // `LogExportDownload.url` names, so redeeming one carries the caller's own credential.
77
+ //
78
+ // A cursor is opaque and composed by the server: this package neither reads one nor builds one. An
79
+ // event's identity is the provider's own event id, carried as `LogQueryEvent.id`, and is what a
80
+ // resumed read de-duplicates on.
81
+ //
82
+ // `CLOSED_BETA_LOG_CAPABILITIES` is deliberately not mirrored. The bounds a caller is held to are
83
+ // read from the capability resource over the wire, so the CLI has no copy of them to go stale.
84
+ export const LOG_SOURCES = ["migration", ...LOG_SERVICES];
85
+ export function isLogSource(value) {
86
+ return LOG_SOURCES.includes(value);
87
+ }
88
+ export const LOG_SEVERITIES = ["debug", "verbose", "info", "warn", "error"];
89
+ const LOG_SEVERITY_ALIASES = new Map([
90
+ ["warning", "warn"],
91
+ ["fatal", "error"],
92
+ ]);
93
+ export function isLogSeverity(value) {
94
+ return LOG_SEVERITIES.includes(value);
95
+ }
96
+ export function classifyLogSeverity(value) {
97
+ if (value === null || value === undefined)
98
+ return null;
99
+ const normalized = value.trim().toLowerCase();
100
+ if (isLogSeverity(normalized))
101
+ return normalized;
102
+ return LOG_SEVERITY_ALIASES.get(normalized) ?? null;
103
+ }
104
+ // The level a structured line declares, or null for a line this contract does not read one from.
105
+ // The eligibility rule is the schema observed on the wire: a JSON object with a non-blank string
106
+ // `message`. Returns the word the producer wrote rather than a severity, because a renderer wants
107
+ // the first and a threshold wants `classifyLogSeverity` over it.
108
+ export function structuredLogLevel(message) {
109
+ const trimmed = message.trim();
110
+ if (!trimmed.startsWith("{") || !trimmed.endsWith("}"))
111
+ return null;
112
+ let parsed;
113
+ try {
114
+ parsed = JSON.parse(trimmed);
115
+ }
116
+ catch {
117
+ return null;
118
+ }
119
+ if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed))
120
+ return null;
121
+ const fields = { ...parsed };
122
+ if (typeof fields.message !== "string" || fields.message.trim() === "")
123
+ return null;
124
+ if (typeof fields.level !== "string" || fields.level.trim() === "")
125
+ return null;
126
+ return fields.level;
127
+ }
128
+ export function logSeverityRank(severity) {
129
+ return LOG_SEVERITIES.indexOf(severity);
130
+ }
131
+ // An unclassified line passes every threshold, including the most severe one. The server applies
132
+ // this function to compose a page and a client applies it to render one, so both sides answer the
133
+ // same way about a line whose level nothing could parse.
134
+ export function passesMinimumSeverity(severity, minimum) {
135
+ if (minimum === null || severity === null)
136
+ return true;
137
+ return logSeverityRank(severity) >= logSeverityRank(minimum);
138
+ }
139
+ export const LOG_QUERY_RESULT_STATES = [
140
+ "AVAILABLE",
141
+ "RUNNING",
142
+ "NO_LOGS",
143
+ "NO_MATCHES",
144
+ "PARTIAL",
145
+ "WINDOW_TOO_WIDE",
146
+ "OUTSIDE_SEARCHABLE_WINDOW",
147
+ "RETENTION_EXCEEDED",
148
+ "INVALID_QUERY",
149
+ "RATE_LIMITED",
150
+ "UNAVAILABLE",
151
+ ];
152
+ export const LOG_QUERY_TRUNCATION_REASONS = [
153
+ "SCAN_INCOMPLETE",
154
+ "PAGE_LIMIT",
155
+ "EXPORT_LIMIT",
156
+ ];
157
+ export const LOG_QUERY_DEPLOYMENT_CORRELATIONS = ["TIME_WINDOW", "TASK_IDENTITY"];
158
+ // Include and exclude are one term each, matched as a case-sensitive literal substring of the line,
159
+ // with the exclusion winning where both match. Minimum severity keeps every classified line at or
160
+ // above the named severity and every line the contract cannot classify.
161
+ export const LOG_QUERY_FILTERS = [
162
+ "TIME",
163
+ "SOURCE",
164
+ "DEPLOYMENT",
165
+ "INCLUDE_TEXT",
166
+ "EXCLUDE_TEXT",
167
+ "MINIMUM_SEVERITY",
168
+ ];
169
+ export const LOG_EXPORT_FORMATS = ["JSONL", "TEXT"];
170
+ export const LOG_EXPORT_STATES = ["PENDING", "READY", "EXPIRED", "FAILED"];
66
171
  //# sourceMappingURL=logs.js.map