@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.
- package/README.md +42 -7
- package/dist/cli/arguments.d.ts +5 -0
- package/dist/cli/arguments.d.ts.map +1 -0
- package/dist/cli/arguments.js +57 -0
- package/dist/cli/arguments.js.map +1 -0
- package/dist/cli/command.d.ts +26 -0
- package/dist/cli/command.d.ts.map +1 -0
- package/dist/cli/command.js +84 -0
- package/dist/cli/command.js.map +1 -0
- package/dist/cli/commands/deployment/arguments.d.ts +3 -0
- package/dist/cli/commands/deployment/arguments.d.ts.map +1 -0
- package/dist/cli/commands/deployment/arguments.js +13 -0
- package/dist/cli/commands/deployment/arguments.js.map +1 -0
- package/dist/cli/commands/deployment/build-logs.d.ts +3 -0
- package/dist/cli/commands/deployment/build-logs.d.ts.map +1 -0
- package/dist/cli/commands/deployment/build-logs.js +98 -0
- package/dist/cli/commands/deployment/build-logs.js.map +1 -0
- package/dist/cli/commands/deployment/deploy.d.ts +3 -0
- package/dist/cli/commands/deployment/deploy.d.ts.map +1 -0
- package/dist/cli/commands/deployment/deploy.js +306 -0
- package/dist/cli/commands/deployment/deploy.js.map +1 -0
- package/dist/cli/commands/deployment/index.d.ts +3 -0
- package/dist/cli/commands/deployment/index.d.ts.map +1 -0
- package/dist/cli/commands/deployment/index.js +177 -0
- package/dist/cli/commands/deployment/index.js.map +1 -0
- package/dist/cli/commands/deployment/list.d.ts +3 -0
- package/dist/cli/commands/deployment/list.d.ts.map +1 -0
- package/dist/cli/commands/deployment/list.js +77 -0
- package/dist/cli/commands/deployment/list.js.map +1 -0
- package/dist/cli/commands/deployment/logs.d.ts +3 -0
- package/dist/cli/commands/deployment/logs.d.ts.map +1 -0
- package/dist/cli/commands/deployment/logs.js +88 -0
- package/dist/cli/commands/deployment/logs.js.map +1 -0
- package/dist/cli/commands/deployment/options.d.ts +11 -0
- package/dist/cli/commands/deployment/options.d.ts.map +1 -0
- package/dist/cli/commands/deployment/options.js +37 -0
- package/dist/cli/commands/deployment/options.js.map +1 -0
- package/dist/cli/commands/deployment/plan-format.d.ts +8 -0
- package/dist/cli/commands/deployment/plan-format.d.ts.map +1 -0
- package/dist/cli/commands/deployment/plan-format.js +25 -0
- package/dist/cli/commands/deployment/plan-format.js.map +1 -0
- package/dist/cli/commands/deployment/plan.d.ts +3 -0
- package/dist/cli/commands/deployment/plan.d.ts.map +1 -0
- package/dist/cli/commands/deployment/plan.js +54 -0
- package/dist/cli/commands/deployment/plan.js.map +1 -0
- package/dist/cli/commands/deployment/rollback.d.ts +3 -0
- package/dist/cli/commands/deployment/rollback.d.ts.map +1 -0
- package/dist/cli/commands/deployment/rollback.js +97 -0
- package/dist/cli/commands/deployment/rollback.js.map +1 -0
- package/dist/cli/commands/deployment/shared.d.ts +5 -0
- package/dist/cli/commands/deployment/shared.d.ts.map +1 -0
- package/dist/cli/commands/deployment/shared.js +23 -0
- package/dist/cli/commands/deployment/shared.js.map +1 -0
- package/dist/cli/commands/deployment/show.d.ts +3 -0
- package/dist/cli/commands/deployment/show.d.ts.map +1 -0
- package/dist/cli/commands/deployment/show.js +71 -0
- package/dist/cli/commands/deployment/show.js.map +1 -0
- package/dist/cli/commands/deployment/source.d.ts +14 -0
- package/dist/cli/commands/deployment/source.d.ts.map +1 -0
- package/dist/cli/commands/deployment/source.js +19 -0
- package/dist/cli/commands/deployment/source.js.map +1 -0
- package/dist/cli/commands/deployment/status.d.ts +3 -0
- package/dist/cli/commands/deployment/status.d.ts.map +1 -0
- package/dist/cli/commands/deployment/status.js +59 -0
- package/dist/cli/commands/deployment/status.js.map +1 -0
- package/dist/cli/commands/deployment/teardown.d.ts +3 -0
- package/dist/cli/commands/deployment/teardown.d.ts.map +1 -0
- package/dist/cli/commands/deployment/teardown.js +178 -0
- package/dist/cli/commands/deployment/teardown.js.map +1 -0
- package/dist/cli/commands/identity-context/context.d.ts +3 -0
- package/dist/cli/commands/identity-context/context.d.ts.map +1 -0
- package/dist/cli/commands/identity-context/context.js +47 -0
- package/dist/cli/commands/identity-context/context.js.map +1 -0
- package/dist/cli/commands/identity-context/index.d.ts +2 -0
- package/dist/cli/commands/identity-context/index.d.ts.map +1 -0
- package/dist/cli/commands/identity-context/index.js +94 -0
- package/dist/cli/commands/identity-context/index.js.map +1 -0
- package/dist/cli/commands/identity-context/keys.d.ts +5 -0
- package/dist/cli/commands/identity-context/keys.d.ts.map +1 -0
- package/dist/cli/commands/identity-context/keys.js +52 -0
- package/dist/cli/commands/identity-context/keys.js.map +1 -0
- package/dist/cli/commands/identity-context/login.d.ts +2 -0
- package/dist/cli/commands/identity-context/login.d.ts.map +1 -0
- package/dist/cli/commands/identity-context/login.js +158 -0
- package/dist/cli/commands/identity-context/login.js.map +1 -0
- package/dist/cli/commands/identity-context/logout.d.ts +2 -0
- package/dist/cli/commands/identity-context/logout.d.ts.map +1 -0
- package/dist/cli/commands/identity-context/logout.js +12 -0
- package/dist/cli/commands/identity-context/logout.js.map +1 -0
- package/dist/cli/commands/identity-context/org-switch.d.ts +3 -0
- package/dist/cli/commands/identity-context/org-switch.d.ts.map +1 -0
- package/dist/cli/commands/identity-context/org-switch.js +71 -0
- package/dist/cli/commands/identity-context/org-switch.js.map +1 -0
- package/dist/cli/commands/identity-context/use.d.ts +3 -0
- package/dist/cli/commands/identity-context/use.d.ts.map +1 -0
- package/dist/cli/commands/identity-context/use.js +23 -0
- package/dist/cli/commands/identity-context/use.js.map +1 -0
- package/dist/cli/commands/identity-context/whoami.d.ts +3 -0
- package/dist/cli/commands/identity-context/whoami.d.ts.map +1 -0
- package/dist/cli/commands/identity-context/whoami.js +80 -0
- package/dist/cli/commands/identity-context/whoami.js.map +1 -0
- package/dist/cli/commands/index.d.ts +4 -0
- package/dist/cli/commands/index.d.ts.map +1 -0
- package/dist/cli/commands/index.js +67 -0
- package/dist/cli/commands/index.js.map +1 -0
- package/dist/cli/commands/project-config/config/build-fields.d.ts +4 -0
- package/dist/cli/commands/project-config/config/build-fields.d.ts.map +1 -0
- package/dist/cli/commands/project-config/config/build-fields.js +16 -0
- package/dist/cli/commands/project-config/config/build-fields.js.map +1 -0
- package/dist/cli/commands/project-config/config/build.d.ts +4 -0
- package/dist/cli/commands/project-config/config/build.d.ts.map +1 -0
- package/dist/cli/commands/project-config/config/build.js +46 -0
- package/dist/cli/commands/project-config/config/build.js.map +1 -0
- package/dist/cli/commands/project-config/config/desired-state.d.ts +4 -0
- package/dist/cli/commands/project-config/config/desired-state.d.ts.map +1 -0
- package/dist/cli/commands/project-config/config/desired-state.js +34 -0
- package/dist/cli/commands/project-config/config/desired-state.js.map +1 -0
- package/dist/cli/commands/project-config/config/index.d.ts +2 -0
- package/dist/cli/commands/project-config/config/index.d.ts.map +1 -0
- package/dist/cli/commands/project-config/config/index.js +177 -0
- package/dist/cli/commands/project-config/config/index.js.map +1 -0
- package/dist/cli/commands/project-config/config/runtime.d.ts +3 -0
- package/dist/cli/commands/project-config/config/runtime.d.ts.map +1 -0
- package/dist/cli/commands/project-config/config/runtime.js +38 -0
- package/dist/cli/commands/project-config/config/runtime.js.map +1 -0
- package/dist/cli/commands/project-config/config/search.d.ts +3 -0
- package/dist/cli/commands/project-config/config/search.d.ts.map +1 -0
- package/dist/cli/commands/project-config/config/search.js +54 -0
- package/dist/cli/commands/project-config/config/search.js.map +1 -0
- package/dist/cli/commands/project-config/config/set.d.ts +2 -0
- package/dist/cli/commands/project-config/config/set.d.ts.map +1 -0
- package/dist/cli/commands/project-config/config/set.js +14 -0
- package/dist/cli/commands/project-config/config/set.js.map +1 -0
- package/dist/cli/commands/project-config/config/show.d.ts +6 -0
- package/dist/cli/commands/project-config/config/show.d.ts.map +1 -0
- package/dist/cli/commands/project-config/config/show.js +33 -0
- package/dist/cli/commands/project-config/config/show.js.map +1 -0
- package/dist/cli/commands/project-config/env/add.d.ts +3 -0
- package/dist/cli/commands/project-config/env/add.d.ts.map +1 -0
- package/dist/cli/commands/project-config/env/add.js +22 -0
- package/dist/cli/commands/project-config/env/add.js.map +1 -0
- package/dist/cli/commands/project-config/env/get.d.ts +3 -0
- package/dist/cli/commands/project-config/env/get.d.ts.map +1 -0
- package/dist/cli/commands/project-config/env/get.js +12 -0
- package/dist/cli/commands/project-config/env/get.js.map +1 -0
- package/dist/cli/commands/project-config/env/import.d.ts +3 -0
- package/dist/cli/commands/project-config/env/import.d.ts.map +1 -0
- package/dist/cli/commands/project-config/env/import.js +45 -0
- package/dist/cli/commands/project-config/env/import.js.map +1 -0
- package/dist/cli/commands/project-config/env/index.d.ts +2 -0
- package/dist/cli/commands/project-config/env/index.d.ts.map +1 -0
- package/dist/cli/commands/project-config/env/index.js +103 -0
- package/dist/cli/commands/project-config/env/index.js.map +1 -0
- package/dist/cli/commands/project-config/env/list.d.ts +3 -0
- package/dist/cli/commands/project-config/env/list.d.ts.map +1 -0
- package/dist/cli/commands/project-config/env/list.js +25 -0
- package/dist/cli/commands/project-config/env/list.js.map +1 -0
- package/dist/cli/commands/project-config/env/metadata-options.d.ts +9 -0
- package/dist/cli/commands/project-config/env/metadata-options.d.ts.map +1 -0
- package/dist/cli/commands/project-config/env/metadata-options.js +32 -0
- package/dist/cli/commands/project-config/env/metadata-options.js.map +1 -0
- package/dist/cli/commands/project-config/env/pull.d.ts +3 -0
- package/dist/cli/commands/project-config/env/pull.d.ts.map +1 -0
- package/dist/cli/commands/project-config/env/pull.js +50 -0
- package/dist/cli/commands/project-config/env/pull.js.map +1 -0
- package/dist/cli/commands/project-config/env/read-value.d.ts +3 -0
- package/dist/cli/commands/project-config/env/read-value.d.ts.map +1 -0
- package/dist/cli/commands/project-config/env/read-value.js +20 -0
- package/dist/cli/commands/project-config/env/read-value.js.map +1 -0
- package/dist/cli/commands/project-config/env/rm.d.ts +3 -0
- package/dist/cli/commands/project-config/env/rm.d.ts.map +1 -0
- package/dist/cli/commands/project-config/env/rm.js +23 -0
- package/dist/cli/commands/project-config/env/rm.js.map +1 -0
- package/dist/cli/commands/project-config/env/run.d.ts +3 -0
- package/dist/cli/commands/project-config/env/run.d.ts.map +1 -0
- package/dist/cli/commands/project-config/env/run.js +28 -0
- package/dist/cli/commands/project-config/env/run.js.map +1 -0
- package/dist/cli/commands/project-config/env/update.d.ts +3 -0
- package/dist/cli/commands/project-config/env/update.d.ts.map +1 -0
- package/dist/cli/commands/project-config/env/update.js +32 -0
- package/dist/cli/commands/project-config/env/update.js.map +1 -0
- package/dist/cli/commands/project-config/environment/create.d.ts +3 -0
- package/dist/cli/commands/project-config/environment/create.d.ts.map +1 -0
- package/dist/cli/commands/project-config/environment/create.js +33 -0
- package/dist/cli/commands/project-config/environment/create.js.map +1 -0
- package/dist/cli/commands/project-config/environment/delete.d.ts +3 -0
- package/dist/cli/commands/project-config/environment/delete.d.ts.map +1 -0
- package/dist/cli/commands/project-config/environment/delete.js +42 -0
- package/dist/cli/commands/project-config/environment/delete.js.map +1 -0
- package/dist/cli/commands/project-config/environment/find.d.ts +7 -0
- package/dist/cli/commands/project-config/environment/find.d.ts.map +1 -0
- package/dist/cli/commands/project-config/environment/find.js +18 -0
- package/dist/cli/commands/project-config/environment/find.js.map +1 -0
- package/dist/cli/commands/project-config/environment/index.d.ts +2 -0
- package/dist/cli/commands/project-config/environment/index.d.ts.map +1 -0
- package/dist/cli/commands/project-config/environment/index.js +76 -0
- package/dist/cli/commands/project-config/environment/index.js.map +1 -0
- package/dist/cli/commands/project-config/environment/initial-superadmin.d.ts +3 -0
- package/dist/cli/commands/project-config/environment/initial-superadmin.d.ts.map +1 -0
- package/dist/cli/commands/project-config/environment/initial-superadmin.js +13 -0
- package/dist/cli/commands/project-config/environment/initial-superadmin.js.map +1 -0
- package/dist/cli/commands/project-config/environment/list.d.ts +3 -0
- package/dist/cli/commands/project-config/environment/list.d.ts.map +1 -0
- package/dist/cli/commands/project-config/environment/list.js +23 -0
- package/dist/cli/commands/project-config/environment/list.js.map +1 -0
- package/dist/cli/commands/project-config/environment/show.d.ts +3 -0
- package/dist/cli/commands/project-config/environment/show.d.ts.map +1 -0
- package/dist/cli/commands/project-config/environment/show.js +30 -0
- package/dist/cli/commands/project-config/environment/show.js.map +1 -0
- package/dist/cli/commands/project-config/environment/update.d.ts +3 -0
- package/dist/cli/commands/project-config/environment/update.d.ts.map +1 -0
- package/dist/cli/commands/project-config/environment/update.js +19 -0
- package/dist/cli/commands/project-config/environment/update.js.map +1 -0
- package/dist/cli/commands/project-config/index.d.ts +3 -0
- package/dist/cli/commands/project-config/index.d.ts.map +1 -0
- package/dist/cli/commands/project-config/index.js +27 -0
- package/dist/cli/commands/project-config/index.js.map +1 -0
- package/dist/cli/commands/project-config/init/build-detection.d.ts +11 -0
- package/dist/cli/commands/project-config/init/build-detection.d.ts.map +1 -0
- package/dist/cli/commands/project-config/init/build-detection.js +113 -0
- package/dist/cli/commands/project-config/init/build-detection.js.map +1 -0
- package/dist/cli/commands/project-config/init/index.d.ts +2 -0
- package/dist/cli/commands/project-config/init/index.d.ts.map +1 -0
- package/dist/cli/commands/project-config/init/index.js +48 -0
- package/dist/cli/commands/project-config/init/index.js.map +1 -0
- package/dist/cli/commands/project-config/init/init.d.ts +14 -0
- package/dist/cli/commands/project-config/init/init.d.ts.map +1 -0
- package/dist/cli/commands/project-config/init/init.js +367 -0
- package/dist/cli/commands/project-config/init/init.js.map +1 -0
- package/dist/cli/commands/project-config/options.d.ts +10 -0
- package/dist/cli/commands/project-config/options.d.ts.map +1 -0
- package/dist/cli/commands/project-config/options.js +80 -0
- package/dist/cli/commands/project-config/options.js.map +1 -0
- package/dist/cli/commands/project-config/project/create.d.ts +3 -0
- package/dist/cli/commands/project-config/project/create.d.ts.map +1 -0
- package/dist/cli/commands/project-config/project/create.js +20 -0
- package/dist/cli/commands/project-config/project/create.js.map +1 -0
- package/dist/cli/commands/project-config/project/delete.d.ts +3 -0
- package/dist/cli/commands/project-config/project/delete.d.ts.map +1 -0
- package/dist/cli/commands/project-config/project/delete.js +28 -0
- package/dist/cli/commands/project-config/project/delete.js.map +1 -0
- package/dist/cli/commands/project-config/project/index.d.ts +2 -0
- package/dist/cli/commands/project-config/project/index.d.ts.map +1 -0
- package/dist/cli/commands/project-config/project/index.js +88 -0
- package/dist/cli/commands/project-config/project/index.js.map +1 -0
- package/dist/cli/commands/project-config/project/link.d.ts +3 -0
- package/dist/cli/commands/project-config/project/link.d.ts.map +1 -0
- package/dist/cli/commands/project-config/project/link.js +45 -0
- package/dist/cli/commands/project-config/project/link.js.map +1 -0
- package/dist/cli/commands/project-config/project/list.d.ts +3 -0
- package/dist/cli/commands/project-config/project/list.d.ts.map +1 -0
- package/dist/cli/commands/project-config/project/list.js +15 -0
- package/dist/cli/commands/project-config/project/list.js.map +1 -0
- package/dist/cli/commands/project-config/project/show.d.ts +3 -0
- package/dist/cli/commands/project-config/project/show.d.ts.map +1 -0
- package/dist/cli/commands/project-config/project/show.js +33 -0
- package/dist/cli/commands/project-config/project/show.js.map +1 -0
- package/dist/cli/commands/project-config/project/unlink.d.ts +3 -0
- package/dist/cli/commands/project-config/project/unlink.d.ts.map +1 -0
- package/dist/cli/commands/project-config/project/unlink.js +21 -0
- package/dist/cli/commands/project-config/project/unlink.js.map +1 -0
- package/dist/cli/commands/project-config/project/update.d.ts +3 -0
- package/dist/cli/commands/project-config/project/update.d.ts.map +1 -0
- package/dist/cli/commands/project-config/project/update.js +18 -0
- package/dist/cli/commands/project-config/project/update.js.map +1 -0
- package/dist/cli/commands/project-config/source/connect.d.ts +15 -0
- package/dist/cli/commands/project-config/source/connect.d.ts.map +1 -0
- package/dist/cli/commands/project-config/source/connect.js +208 -0
- package/dist/cli/commands/project-config/source/connect.js.map +1 -0
- package/dist/cli/commands/project-config/source/disconnect.d.ts +3 -0
- package/dist/cli/commands/project-config/source/disconnect.d.ts.map +1 -0
- package/dist/cli/commands/project-config/source/disconnect.js +27 -0
- package/dist/cli/commands/project-config/source/disconnect.js.map +1 -0
- package/dist/cli/commands/project-config/source/index.d.ts +2 -0
- package/dist/cli/commands/project-config/source/index.d.ts.map +1 -0
- package/dist/cli/commands/project-config/source/index.js +74 -0
- package/dist/cli/commands/project-config/source/index.js.map +1 -0
- package/dist/cli/commands/project-config/source/map.d.ts +3 -0
- package/dist/cli/commands/project-config/source/map.d.ts.map +1 -0
- package/dist/cli/commands/project-config/source/map.js +93 -0
- package/dist/cli/commands/project-config/source/map.js.map +1 -0
- package/dist/cli/commands/project-config/source/repos.d.ts +3 -0
- package/dist/cli/commands/project-config/source/repos.d.ts.map +1 -0
- package/dist/cli/commands/project-config/source/repos.js +18 -0
- package/dist/cli/commands/project-config/source/repos.js.map +1 -0
- package/dist/cli/commands/project-config/source/status.d.ts +3 -0
- package/dist/cli/commands/project-config/source/status.d.ts.map +1 -0
- package/dist/cli/commands/project-config/source/status.js +72 -0
- package/dist/cli/commands/project-config/source/status.js.map +1 -0
- package/dist/cli/commands/runtime-data/backup.d.ts +5 -0
- package/dist/cli/commands/runtime-data/backup.d.ts.map +1 -0
- package/dist/cli/commands/runtime-data/backup.js +107 -0
- package/dist/cli/commands/runtime-data/backup.js.map +1 -0
- package/dist/cli/commands/runtime-data/index.d.ts +2 -0
- package/dist/cli/commands/runtime-data/index.d.ts.map +1 -0
- package/dist/cli/commands/runtime-data/index.js +206 -0
- package/dist/cli/commands/runtime-data/index.js.map +1 -0
- package/dist/cli/commands/runtime-data/resource.d.ts +11 -0
- package/dist/cli/commands/runtime-data/resource.d.ts.map +1 -0
- package/dist/cli/commands/runtime-data/resource.js +147 -0
- package/dist/cli/commands/runtime-data/resource.js.map +1 -0
- package/dist/cli/commands/runtime-data/restore.d.ts +3 -0
- package/dist/cli/commands/runtime-data/restore.d.ts.map +1 -0
- package/dist/cli/commands/runtime-data/restore.js +119 -0
- package/dist/cli/commands/runtime-data/restore.js.map +1 -0
- package/dist/cli/commands/runtime-data/seeds.d.ts +6 -0
- package/dist/cli/commands/runtime-data/seeds.d.ts.map +1 -0
- package/dist/cli/commands/runtime-data/seeds.js +213 -0
- package/dist/cli/commands/runtime-data/seeds.js.map +1 -0
- package/dist/cli/commands/runtime-data/tunnel.d.ts +16 -0
- package/dist/cli/commands/runtime-data/tunnel.d.ts.map +1 -0
- package/dist/cli/commands/runtime-data/tunnel.js +249 -0
- package/dist/cli/commands/runtime-data/tunnel.js.map +1 -0
- package/dist/cli/host-arguments.d.ts +7 -0
- package/dist/cli/host-arguments.d.ts.map +1 -0
- package/dist/cli/host-arguments.js +46 -0
- package/dist/cli/host-arguments.js.map +1 -0
- package/dist/cli/host-nodes.d.ts +30 -0
- package/dist/cli/host-nodes.d.ts.map +1 -0
- package/dist/cli/host-nodes.js +17 -0
- package/dist/cli/host-nodes.js.map +1 -0
- package/dist/cli/index.d.ts +29 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +60 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/lib/api-client.d.ts +19 -0
- package/dist/cli/lib/api-client.d.ts.map +1 -0
- package/dist/cli/lib/api-client.js +111 -0
- package/dist/cli/lib/api-client.js.map +1 -0
- package/dist/cli/lib/auth.d.ts +132 -0
- package/dist/cli/lib/auth.d.ts.map +1 -0
- package/dist/cli/lib/auth.js +505 -0
- package/dist/cli/lib/auth.js.map +1 -0
- package/dist/cli/lib/config.d.ts +7 -0
- package/dist/cli/lib/config.d.ts.map +1 -0
- package/dist/cli/lib/config.js +11 -0
- package/dist/cli/lib/config.js.map +1 -0
- package/dist/cli/lib/context.d.ts +10 -0
- package/dist/cli/lib/context.d.ts.map +1 -0
- package/dist/cli/lib/context.js +42 -0
- package/dist/cli/lib/context.js.map +1 -0
- package/dist/cli/lib/contract/build-settings.d.ts +36 -0
- package/dist/cli/lib/contract/build-settings.d.ts.map +1 -0
- package/dist/cli/lib/contract/build-settings.js +73 -0
- package/dist/cli/lib/contract/build-settings.js.map +1 -0
- package/dist/cli/lib/contract/database.d.ts +47 -0
- package/dist/cli/lib/contract/database.d.ts.map +1 -0
- package/dist/cli/lib/contract/database.js +29 -0
- package/dist/cli/lib/contract/database.js.map +1 -0
- package/dist/cli/lib/contract/deployment-resource-labels.d.ts +11 -0
- package/dist/cli/lib/contract/deployment-resource-labels.d.ts.map +1 -0
- package/dist/cli/lib/contract/deployment-resource-labels.js +80 -0
- package/dist/cli/lib/contract/deployment-resource-labels.js.map +1 -0
- package/dist/cli/lib/contract/deployments.d.ts +128 -0
- package/dist/cli/lib/contract/deployments.d.ts.map +1 -0
- package/dist/cli/lib/contract/deployments.js +46 -0
- package/dist/cli/lib/contract/deployments.js.map +1 -0
- package/dist/cli/lib/contract/desired-state.d.ts +104 -0
- package/dist/cli/lib/contract/desired-state.d.ts.map +1 -0
- package/dist/cli/lib/contract/desired-state.js +171 -0
- package/dist/cli/lib/contract/desired-state.js.map +1 -0
- package/dist/cli/lib/contract/foreign-credentials.d.ts +49 -0
- package/dist/cli/lib/contract/foreign-credentials.d.ts.map +1 -0
- package/dist/cli/lib/contract/foreign-credentials.js +71 -0
- package/dist/cli/lib/contract/foreign-credentials.js.map +1 -0
- package/dist/cli/lib/contract/logs.d.ts +44 -0
- package/dist/cli/lib/contract/logs.d.ts.map +1 -0
- package/dist/cli/lib/contract/logs.js +66 -0
- package/dist/cli/lib/contract/logs.js.map +1 -0
- package/dist/cli/lib/contract/projects.d.ts +31 -0
- package/dist/cli/lib/contract/projects.d.ts.map +1 -0
- package/dist/cli/lib/contract/projects.js +9 -0
- package/dist/cli/lib/contract/projects.js.map +1 -0
- package/dist/cli/lib/contract/public-error-details.d.ts +4 -0
- package/dist/cli/lib/contract/public-error-details.d.ts.map +1 -0
- package/dist/cli/lib/contract/public-error-details.js +248 -0
- package/dist/cli/lib/contract/public-error-details.js.map +1 -0
- package/dist/cli/lib/contract/runtime-operations.d.ts +87 -0
- package/dist/cli/lib/contract/runtime-operations.d.ts.map +1 -0
- package/dist/cli/lib/contract/runtime-operations.js +67 -0
- package/dist/cli/lib/contract/runtime-operations.js.map +1 -0
- package/dist/cli/lib/contract/seeds.d.ts +31 -0
- package/dist/cli/lib/contract/seeds.d.ts.map +1 -0
- package/dist/cli/lib/contract/seeds.js +43 -0
- package/dist/cli/lib/contract/seeds.js.map +1 -0
- package/dist/cli/lib/contract/source-repository.d.ts +73 -0
- package/dist/cli/lib/contract/source-repository.d.ts.map +1 -0
- package/dist/cli/lib/contract/source-repository.js +31 -0
- package/dist/cli/lib/contract/source-repository.js.map +1 -0
- package/dist/cli/lib/contract/wire-types.d.ts +47 -0
- package/dist/cli/lib/contract/wire-types.d.ts.map +1 -0
- package/dist/cli/lib/contract/wire-types.js +13 -0
- package/dist/cli/lib/contract/wire-types.js.map +1 -0
- package/dist/cli/lib/contract/wire-values.d.ts +6 -0
- package/dist/cli/lib/contract/wire-values.d.ts.map +1 -0
- package/dist/cli/lib/contract/wire-values.js +21 -0
- package/dist/cli/lib/contract/wire-values.js.map +1 -0
- package/dist/cli/lib/dotenv.d.ts +2 -0
- package/dist/cli/lib/dotenv.d.ts.map +1 -0
- package/dist/cli/lib/dotenv.js +28 -0
- package/dist/cli/lib/dotenv.js.map +1 -0
- package/dist/cli/lib/env-file.d.ts +2 -0
- package/dist/cli/lib/env-file.d.ts.map +1 -0
- package/dist/cli/lib/env-file.js +26 -0
- package/dist/cli/lib/env-file.js.map +1 -0
- package/dist/cli/lib/env-preflight.d.ts +24 -0
- package/dist/cli/lib/env-preflight.d.ts.map +1 -0
- package/dist/cli/lib/env-preflight.js +265 -0
- package/dist/cli/lib/env-preflight.js.map +1 -0
- package/dist/cli/lib/error-output.d.ts +3 -0
- package/dist/cli/lib/error-output.d.ts.map +1 -0
- package/dist/cli/lib/error-output.js +2 -0
- package/dist/cli/lib/error-output.js.map +1 -0
- package/dist/cli/lib/errors.d.ts +37 -0
- package/dist/cli/lib/errors.d.ts.map +1 -0
- package/dist/cli/lib/errors.js +147 -0
- package/dist/cli/lib/errors.js.map +1 -0
- package/dist/cli/lib/file-lock.d.ts +23 -0
- package/dist/cli/lib/file-lock.d.ts.map +1 -0
- package/dist/cli/lib/file-lock.js +121 -0
- package/dist/cli/lib/file-lock.js.map +1 -0
- package/dist/cli/lib/format.d.ts +6 -0
- package/dist/cli/lib/format.d.ts.map +1 -0
- package/dist/cli/lib/format.js +44 -0
- package/dist/cli/lib/format.js.map +1 -0
- package/dist/cli/lib/id-prefix.d.ts +6 -0
- package/dist/cli/lib/id-prefix.d.ts.map +1 -0
- package/dist/cli/lib/id-prefix.js +18 -0
- package/dist/cli/lib/id-prefix.js.map +1 -0
- package/dist/cli/lib/invocation.d.ts +6 -0
- package/dist/cli/lib/invocation.d.ts.map +1 -0
- package/dist/cli/lib/invocation.js +34 -0
- package/dist/cli/lib/invocation.js.map +1 -0
- package/dist/cli/lib/log-stream.d.ts +7 -0
- package/dist/cli/lib/log-stream.d.ts.map +1 -0
- package/dist/cli/lib/log-stream.js +179 -0
- package/dist/cli/lib/log-stream.js.map +1 -0
- package/dist/cli/lib/logger.d.ts +5 -0
- package/dist/cli/lib/logger.d.ts.map +1 -0
- package/dist/cli/lib/logger.js +52 -0
- package/dist/cli/lib/logger.js.map +1 -0
- package/dist/cli/lib/open-browser.d.ts +2 -0
- package/dist/cli/lib/open-browser.d.ts.map +1 -0
- package/dist/cli/lib/open-browser.js +8 -0
- package/dist/cli/lib/open-browser.js.map +1 -0
- package/dist/cli/lib/organization.d.ts +3 -0
- package/dist/cli/lib/organization.d.ts.map +1 -0
- package/dist/cli/lib/organization.js +20 -0
- package/dist/cli/lib/organization.js.map +1 -0
- package/dist/cli/lib/project-link.d.ts +12 -0
- package/dist/cli/lib/project-link.d.ts.map +1 -0
- package/dist/cli/lib/project-link.js +69 -0
- package/dist/cli/lib/project-link.js.map +1 -0
- package/dist/cli/lib/resolve.d.ts +20 -0
- package/dist/cli/lib/resolve.d.ts.map +1 -0
- package/dist/cli/lib/resolve.js +88 -0
- package/dist/cli/lib/resolve.js.map +1 -0
- package/dist/cli/lib/sleep.d.ts +2 -0
- package/dist/cli/lib/sleep.d.ts.map +1 -0
- package/dist/cli/lib/sleep.js +4 -0
- package/dist/cli/lib/sleep.js.map +1 -0
- package/dist/cli/lib/slug.d.ts +3 -0
- package/dist/cli/lib/slug.d.ts.map +1 -0
- package/dist/cli/lib/slug.js +13 -0
- package/dist/cli/lib/slug.js.map +1 -0
- package/dist/cli/lib/source-repository-link.d.ts +5 -0
- package/dist/cli/lib/source-repository-link.d.ts.map +1 -0
- package/dist/cli/lib/source-repository-link.js +28 -0
- package/dist/cli/lib/source-repository-link.js.map +1 -0
- package/dist/cli/lib/types.d.ts +58 -0
- package/dist/cli/lib/types.d.ts.map +1 -0
- package/dist/cli/lib/types.js +10 -0
- package/dist/cli/lib/types.js.map +1 -0
- package/dist/cli/root-options.d.ts +14 -0
- package/dist/cli/root-options.d.ts.map +1 -0
- package/dist/cli/root-options.js +53 -0
- package/dist/cli/root-options.js.map +1 -0
- package/dist/cli-plugin.d.ts +22 -0
- package/dist/cli-plugin.d.ts.map +1 -0
- package/dist/cli-plugin.js +30 -0
- package/dist/cli-plugin.js.map +1 -0
- package/dist/cloud-config-module.d.ts +3 -0
- package/dist/cloud-config-module.d.ts.map +1 -0
- package/dist/cloud-config-module.js +16 -0
- package/dist/cloud-config-module.js.map +1 -0
- package/dist/dev/cli-host.d.ts +3 -0
- package/dist/dev/cli-host.d.ts.map +1 -0
- package/dist/dev/cli-host.js +72 -0
- package/dist/dev/cli-host.js.map +1 -0
- package/dist/dev/dev-command.d.ts +7 -0
- package/dist/dev/dev-command.d.ts.map +1 -0
- package/dist/dev/dev-command.js +122 -0
- package/dist/dev/dev-command.js.map +1 -0
- package/dist/dev/dev-config.d.ts +4 -0
- package/dist/dev/dev-config.d.ts.map +1 -0
- package/dist/dev/dev-config.js +28 -0
- package/dist/dev/dev-config.js.map +1 -0
- package/dist/dev/dev-migrate.d.ts +2 -0
- package/dist/dev/dev-migrate.d.ts.map +1 -0
- package/dist/dev/dev-migrate.js +17 -0
- package/dist/dev/dev-migrate.js.map +1 -0
- package/dist/dev/dev-process.d.ts +2 -0
- package/dist/dev/dev-process.d.ts.map +1 -0
- package/dist/dev/dev-process.js +14 -0
- package/dist/dev/dev-process.js.map +1 -0
- package/dist/dev/dev-server.d.ts +2 -0
- package/dist/dev/dev-server.d.ts.map +1 -0
- package/dist/dev/dev-server.js +15 -0
- package/dist/dev/dev-server.js.map +1 -0
- package/dist/dev/dev-worker.d.ts +2 -0
- package/dist/dev/dev-worker.d.ts.map +1 -0
- package/dist/dev/dev-worker.js +11 -0
- package/dist/dev/dev-worker.js.map +1 -0
- package/dist/dev/local-services.d.ts +23 -0
- package/dist/dev/local-services.d.ts.map +1 -0
- package/dist/dev/local-services.js +288 -0
- package/dist/dev/local-services.js.map +1 -0
- package/dist/dev/project-layout.d.ts +11 -0
- package/dist/dev/project-layout.d.ts.map +1 -0
- package/dist/dev/project-layout.js +89 -0
- package/dist/dev/project-layout.js.map +1 -0
- package/dist/entrypoint.js +3 -12
- package/dist/entrypoint.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/local-asset-server.d.ts +4 -0
- package/dist/local-asset-server.d.ts.map +1 -0
- package/dist/local-asset-server.js +24 -0
- package/dist/local-asset-server.js.map +1 -0
- package/dist/local-cache-plugin.d.ts +5 -0
- package/dist/local-cache-plugin.d.ts.map +1 -0
- package/dist/local-cache-plugin.js +68 -0
- package/dist/local-cache-plugin.js.map +1 -0
- package/dist/local-cache.d.ts +17 -0
- package/dist/local-cache.d.ts.map +1 -0
- package/dist/local-cache.js +144 -0
- package/dist/local-cache.js.map +1 -0
- package/dist/local-dashboard-plugin.d.ts +9 -0
- package/dist/local-dashboard-plugin.d.ts.map +1 -0
- package/dist/local-dashboard-plugin.js +37 -0
- package/dist/local-dashboard-plugin.js.map +1 -0
- package/dist/local-database.d.ts +15 -0
- package/dist/local-database.d.ts.map +1 -0
- package/dist/local-database.js +64 -0
- package/dist/local-database.js.map +1 -0
- package/dist/local-runtime.d.ts +15 -2
- package/dist/local-runtime.d.ts.map +1 -1
- package/dist/local-runtime.js +145 -28
- package/dist/local-runtime.js.map +1 -1
- package/package.json +63 -7
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
// Mirrors the read half of `@vendure-cloud/api-types`'s `public-error-details.ts`. See ./README.md
|
|
2
|
+
// for why this package cannot import it, and `test/cli-contract-parity.test.ts` for what keeps the
|
|
3
|
+
// two answering the same.
|
|
4
|
+
//
|
|
5
|
+
// The write half stays where it is. `trustedPublicErrorDetails`, `providerPublicErrorDetails` and
|
|
6
|
+
// `statusTokenPublicErrorDetails` are how the control plane records an error, and nothing in the
|
|
7
|
+
// CLI records one.
|
|
8
|
+
//
|
|
9
|
+
// The `PublicErrorDetails` brand is not mirrored either. It marks a value as safe to persist and
|
|
10
|
+
// return, which is a claim only the writer can make; here these strings are display output. Two
|
|
11
|
+
// separately declared brands would also be distinct types that never unify, which is worse than
|
|
12
|
+
// not having one.
|
|
13
|
+
import { formatDeploymentResourceLabel, } from "./deployment-resource-labels.js";
|
|
14
|
+
// Signatures of raw infrastructure-provider prose: a versioned provider API
|
|
15
|
+
// path, a retired provider's name, or its API host.
|
|
16
|
+
//
|
|
17
|
+
// Denylist, not vocabulary — same rule as KNOWN_RESOURCE_KINDS below. Nothing
|
|
18
|
+
// emits the retired vendor token any more, but `formatUserFacingErrorDetails`
|
|
19
|
+
// runs on READ over every persisted `errorDetails` row, and rows written before
|
|
20
|
+
// the execution backend was removed (CLO-294) still contain it. Dropping the
|
|
21
|
+
// alternative would echo those rows verbatim instead of describing them.
|
|
22
|
+
// Detection is internal; the scrubbed OUTPUT never names a provider.
|
|
23
|
+
const PROVIDER_DETAIL_RE = /\/v\d+\/(?:teams|projects|orgs|accounts)\/|\bNorthflank\b|https?:\/\/api\.northflank\.com/i;
|
|
24
|
+
const SAFE_PROVIDER_MESSAGES = [
|
|
25
|
+
/^(?:volume )?(?:is )?(?:still )?(?:attached|in use)\.?$/i,
|
|
26
|
+
/^(?:service|resource) (?:failed(?: permanently)?|not found|in use)\.?$/i,
|
|
27
|
+
/^(?:job|request) failed\.?$/i,
|
|
28
|
+
/^(?:name )?already exists\.?$/i,
|
|
29
|
+
/^project-level quota exceeded\.?$/i,
|
|
30
|
+
];
|
|
31
|
+
// Denylist, not vocabulary: a kind listed here is recognised so the line is
|
|
32
|
+
// relabelled instead of echoed. Retired kinds stay in the set on purpose —
|
|
33
|
+
// dropping one only lets an old stored error line through unscrubbed.
|
|
34
|
+
const KNOWN_RESOURCE_KINDS = new Set([
|
|
35
|
+
"Addon",
|
|
36
|
+
"Condition",
|
|
37
|
+
"DeploymentService",
|
|
38
|
+
"EnvVar",
|
|
39
|
+
"JobRun",
|
|
40
|
+
"ManualJob",
|
|
41
|
+
"Project",
|
|
42
|
+
"SecretGroup",
|
|
43
|
+
"Subdomain",
|
|
44
|
+
"Template",
|
|
45
|
+
"TemplateArguments",
|
|
46
|
+
"Volume",
|
|
47
|
+
"Workflow",
|
|
48
|
+
]);
|
|
49
|
+
// Only unambiguous generated refs belong here. Common words such as
|
|
50
|
+
// "database" and "server" may be ordinary application-error prefixes.
|
|
51
|
+
const KNOWN_RESOURCE_REF_LABELS = {
|
|
52
|
+
migrationRun: "Migration job",
|
|
53
|
+
searchSecrets: "Search",
|
|
54
|
+
searchVolume: "Search data",
|
|
55
|
+
userSecrets: "Environment variables",
|
|
56
|
+
};
|
|
57
|
+
export function formatUserFacingErrorDetails(error, context) {
|
|
58
|
+
const details = error
|
|
59
|
+
.split(/\r?\n/)
|
|
60
|
+
.map((line) => formatUserFacingErrorLine(line, context))
|
|
61
|
+
.join("\n");
|
|
62
|
+
return details || "Operation failed";
|
|
63
|
+
}
|
|
64
|
+
export function formatInlineUserFacingErrorReason(error, context) {
|
|
65
|
+
return formatUserFacingErrorDetails(error, context).replace(/\s*\n\s*/g, "; ");
|
|
66
|
+
}
|
|
67
|
+
function formatUserFacingErrorLine(rawLine, context) {
|
|
68
|
+
const line = rawLine.trim();
|
|
69
|
+
if (!line)
|
|
70
|
+
return rawLine;
|
|
71
|
+
// The vendor alternative is the shape the removed teardown path actually
|
|
72
|
+
// persisted; the neutral one is what a replacement backend would write.
|
|
73
|
+
if (/^Timed out waiting for deleted (?:Northflank|provider) resources to disappear\b/i.test(line)) {
|
|
74
|
+
return "Timed out waiting for deleted resources to disappear.";
|
|
75
|
+
}
|
|
76
|
+
const rollout = formatDeploymentRolloutLine(line);
|
|
77
|
+
if (rollout)
|
|
78
|
+
return rollout;
|
|
79
|
+
const resourceFailure = formatResourceFailure(line, context);
|
|
80
|
+
if (resourceFailure)
|
|
81
|
+
return resourceFailure;
|
|
82
|
+
const refFailure = formatResourceRefFailure(line, context);
|
|
83
|
+
if (refFailure)
|
|
84
|
+
return refFailure;
|
|
85
|
+
return formatErrorMessage(line, context);
|
|
86
|
+
}
|
|
87
|
+
function formatResourceFailure(line, context) {
|
|
88
|
+
if (!context)
|
|
89
|
+
return null;
|
|
90
|
+
const match = line.match(/^([A-Za-z][A-Za-z0-9]*)(?:\s+([^:]+)|:([^:]+)):\s*(.*)$/);
|
|
91
|
+
if (!match)
|
|
92
|
+
return null;
|
|
93
|
+
const kind = match[1];
|
|
94
|
+
const name = match[2] ?? match[3];
|
|
95
|
+
if (!kind || !name || !KNOWN_RESOURCE_KINDS.has(kind))
|
|
96
|
+
return null;
|
|
97
|
+
const label = formatDeploymentResourceLabel({ kind, name }, context) ?? "Resource";
|
|
98
|
+
return `${label}: ${formatErrorMessage(match[4] ?? "failed", context)}`;
|
|
99
|
+
}
|
|
100
|
+
function formatResourceRefFailure(line, context) {
|
|
101
|
+
const match = line.match(/^([A-Za-z][A-Za-z0-9_-]*):\s*(.*)$/);
|
|
102
|
+
if (!match)
|
|
103
|
+
return null;
|
|
104
|
+
const ref = match[1];
|
|
105
|
+
if (!ref)
|
|
106
|
+
return null;
|
|
107
|
+
const label = labelForResourceRef(ref);
|
|
108
|
+
if (!label)
|
|
109
|
+
return null;
|
|
110
|
+
return `${label}: ${formatErrorMessage(match[2] ?? "failed", context)}`;
|
|
111
|
+
}
|
|
112
|
+
function labelForResourceRef(ref) {
|
|
113
|
+
if (ref in KNOWN_RESOURCE_REF_LABELS)
|
|
114
|
+
return KNOWN_RESOURCE_REF_LABELS[ref] ?? null;
|
|
115
|
+
if (ref.startsWith("dep-"))
|
|
116
|
+
return `Service ${ref.slice("dep-".length)}`;
|
|
117
|
+
if (ref.startsWith("domain-"))
|
|
118
|
+
return "Domain routing";
|
|
119
|
+
if (ref.startsWith("secrets-")) {
|
|
120
|
+
return `Environment variables for ${ref.slice("secrets-".length)}`;
|
|
121
|
+
}
|
|
122
|
+
return null;
|
|
123
|
+
}
|
|
124
|
+
// Rollout vocabulary from the removed orchestrator. Same denylist reasoning as
|
|
125
|
+
// KNOWN_RESOURCE_KINDS and PROVIDER_DETAIL_RE: nothing writes these lines any
|
|
126
|
+
// more, but they are already stored in `deployments` and `teardowns`, and
|
|
127
|
+
// `formatUserFacingErrorDetails` runs on READ. Without the branch the prose
|
|
128
|
+
// matches no scrubber and is echoed verbatim, third-party noun included.
|
|
129
|
+
function formatDeploymentRolloutLine(line) {
|
|
130
|
+
if (/^Template run exceeded timeout\b/i.test(line)) {
|
|
131
|
+
return "Deployment rollout timed out; cleanup was requested.";
|
|
132
|
+
}
|
|
133
|
+
if (/^Template run\b/i.test(line))
|
|
134
|
+
return "Deployment rollout failed";
|
|
135
|
+
return null;
|
|
136
|
+
}
|
|
137
|
+
function formatErrorMessage(message, context) {
|
|
138
|
+
// `NF: ` is a prefix only the removed writer produced, so this branch is dead
|
|
139
|
+
// for anything written from now on — but it keeps every already-persisted row
|
|
140
|
+
// on the default-deny path instead of echoing arbitrary provider prose.
|
|
141
|
+
const withoutPrefix = message.replace(/^NF:\s*/i, "").trim();
|
|
142
|
+
if (withoutPrefix !== message.trim())
|
|
143
|
+
return scrubProviderMessage(withoutPrefix, context);
|
|
144
|
+
if (PROVIDER_DETAIL_RE.test(message) || containsStructuredError(message)) {
|
|
145
|
+
const providerMessage = extractProviderBodyMessage(message);
|
|
146
|
+
if (!providerMessage)
|
|
147
|
+
return "Provider request failed";
|
|
148
|
+
return scrubProviderMessage(providerMessage, context);
|
|
149
|
+
}
|
|
150
|
+
return scrubGeneratedResourceNames(message.trim(), context);
|
|
151
|
+
}
|
|
152
|
+
function containsStructuredError(message) {
|
|
153
|
+
const start = message.indexOf("{");
|
|
154
|
+
const end = message.lastIndexOf("}");
|
|
155
|
+
if (start === -1 || end <= start)
|
|
156
|
+
return false;
|
|
157
|
+
try {
|
|
158
|
+
const value = JSON.parse(message.slice(start, end + 1));
|
|
159
|
+
return value !== null && typeof value === "object";
|
|
160
|
+
}
|
|
161
|
+
catch {
|
|
162
|
+
return false;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
function extractProviderBodyMessage(message) {
|
|
166
|
+
const start = message.indexOf("{");
|
|
167
|
+
const end = message.lastIndexOf("}");
|
|
168
|
+
if (start !== -1) {
|
|
169
|
+
try {
|
|
170
|
+
if (end > start) {
|
|
171
|
+
return findNestedErrorMessage(JSON.parse(message.slice(start, end + 1)));
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
catch {
|
|
175
|
+
// Fall through to the narrow malformed-body extractor.
|
|
176
|
+
}
|
|
177
|
+
const malformed = message.slice(start);
|
|
178
|
+
const match = malformed.match(/"(?:message|error)"\s*:\s*("(?:\\.|[^"\\])*")/);
|
|
179
|
+
if (match?.[1]) {
|
|
180
|
+
try {
|
|
181
|
+
return JSON.parse(match[1]);
|
|
182
|
+
}
|
|
183
|
+
catch {
|
|
184
|
+
return null;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
return null;
|
|
189
|
+
}
|
|
190
|
+
function findNestedErrorMessage(value) {
|
|
191
|
+
if (typeof value === "string")
|
|
192
|
+
return value;
|
|
193
|
+
if (!value || typeof value !== "object")
|
|
194
|
+
return null;
|
|
195
|
+
if (Array.isArray(value)) {
|
|
196
|
+
for (const item of value) {
|
|
197
|
+
const message = findNestedErrorMessage(item);
|
|
198
|
+
if (message)
|
|
199
|
+
return message;
|
|
200
|
+
}
|
|
201
|
+
return null;
|
|
202
|
+
}
|
|
203
|
+
const record = value;
|
|
204
|
+
for (const key of ["message", "error", "detail", "data"]) {
|
|
205
|
+
const message = findNestedErrorMessage(record[key]);
|
|
206
|
+
if (message)
|
|
207
|
+
return message;
|
|
208
|
+
}
|
|
209
|
+
return null;
|
|
210
|
+
}
|
|
211
|
+
// Default-deny. Provider prose is untrusted: unless it matches one of the
|
|
212
|
+
// short, id-free phrases we have vetted, it is described rather than echoed.
|
|
213
|
+
function scrubProviderMessage(message, context) {
|
|
214
|
+
// Retired rollout shapes, kept for the same reason as formatDeploymentRolloutLine:
|
|
215
|
+
// these reach here nested inside a stored provider body or behind the `NF:`
|
|
216
|
+
// prefix, where the line-level branch above never sees them.
|
|
217
|
+
//
|
|
218
|
+
// One retired shape was deliberately NOT kept: the removed template engine's
|
|
219
|
+
// `Payload validation failed after resolving inputs. "deployment.external.imagePath"
|
|
220
|
+
// is required.`, which used to render as "required container image is missing".
|
|
221
|
+
// It is not a denylist branch — nothing leaks without it, the message falls
|
|
222
|
+
// through to the default-deny below and reads "Provider request failed" — and
|
|
223
|
+
// the advice it carried ("push an image") is not actionable while there is no
|
|
224
|
+
// build backend to produce one (CLO-347). A stored row from before the
|
|
225
|
+
// decommission gets the generic wording rather than an instruction the
|
|
226
|
+
// customer cannot follow. Restore the branch with the build pipeline.
|
|
227
|
+
if (/^template cleanup failed\.?$/i.test(message))
|
|
228
|
+
return "cleanup failed";
|
|
229
|
+
if (/\btemplate run\b.*\b(?:failed|failure|error|timed out)\b/i.test(message)) {
|
|
230
|
+
return "Deployment rollout failed";
|
|
231
|
+
}
|
|
232
|
+
const scrubbed = scrubGeneratedResourceNames(message, context);
|
|
233
|
+
if (SAFE_PROVIDER_MESSAGES.some((pattern) => pattern.test(scrubbed)))
|
|
234
|
+
return scrubbed;
|
|
235
|
+
return "Provider request failed";
|
|
236
|
+
}
|
|
237
|
+
function scrubGeneratedResourceNames(message, context) {
|
|
238
|
+
if (!context)
|
|
239
|
+
return message;
|
|
240
|
+
const projectEnvironmentId = `${context.projectSlug}-${context.environmentSlug}`;
|
|
241
|
+
return message
|
|
242
|
+
.replace(new RegExp(`${escapeRegExp(projectEnvironmentId)}-[A-Za-z0-9_.-]+`, "g"), "resource")
|
|
243
|
+
.replace(new RegExp(`\\b${escapeRegExp(projectEnvironmentId)}\\b`, "g"), "environment");
|
|
244
|
+
}
|
|
245
|
+
function escapeRegExp(value) {
|
|
246
|
+
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
247
|
+
}
|
|
248
|
+
//# sourceMappingURL=public-error-details.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public-error-details.js","sourceRoot":"","sources":["../../../../src/cli/lib/contract/public-error-details.ts"],"names":[],"mappings":"AAAA,mGAAmG;AACnG,mGAAmG;AACnG,0BAA0B;AAC1B,EAAE;AACF,kGAAkG;AAClG,iGAAiG;AACjG,mBAAmB;AACnB,EAAE;AACF,iGAAiG;AACjG,gGAAgG;AAChG,gGAAgG;AAChG,kBAAkB;AAElB,OAAO,EAEL,6BAA6B,GAC9B,MAAM,iCAAiC,CAAC;AAEzC,4EAA4E;AAC5E,oDAAoD;AACpD,EAAE;AACF,8EAA8E;AAC9E,8EAA8E;AAC9E,gFAAgF;AAChF,6EAA6E;AAC7E,yEAAyE;AACzE,qEAAqE;AACrE,MAAM,kBAAkB,GACtB,4FAA4F,CAAC;AAC/F,MAAM,sBAAsB,GAAG;IAC7B,0DAA0D;IAC1D,yEAAyE;IACzE,8BAA8B;IAC9B,gCAAgC;IAChC,oCAAoC;CACrC,CAAC;AAEF,4EAA4E;AAC5E,2EAA2E;AAC3E,sEAAsE;AACtE,MAAM,oBAAoB,GAAG,IAAI,GAAG,CAAC;IACnC,OAAO;IACP,WAAW;IACX,mBAAmB;IACnB,QAAQ;IACR,QAAQ;IACR,WAAW;IACX,SAAS;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,CAAC,CAAC;AACtD,CAAC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import type { RuntimeIntent, RuntimeState } from "./wire-types.js";
|
|
2
|
+
export declare const RuntimeOperationAction: {
|
|
3
|
+
readonly STOP: "STOP";
|
|
4
|
+
readonly START: "START";
|
|
5
|
+
readonly RESTART: "RESTART";
|
|
6
|
+
};
|
|
7
|
+
export type RuntimeOperationAction = (typeof RuntimeOperationAction)[keyof typeof RuntimeOperationAction];
|
|
8
|
+
export declare const RuntimeOperationStatus: {
|
|
9
|
+
readonly QUEUED: "QUEUED";
|
|
10
|
+
readonly RUNNING: "RUNNING";
|
|
11
|
+
readonly SUCCEEDED: "SUCCEEDED";
|
|
12
|
+
readonly PARTIAL: "PARTIAL";
|
|
13
|
+
readonly FAILED: "FAILED";
|
|
14
|
+
};
|
|
15
|
+
export type RuntimeOperationStatus = (typeof RuntimeOperationStatus)[keyof typeof RuntimeOperationStatus];
|
|
16
|
+
export declare const RUNTIME_SERVICE_STATES: readonly ["NOT_PROVISIONED", "STARTED", "STOPPED", "UNKNOWN"];
|
|
17
|
+
export type RuntimeServiceState = (typeof RUNTIME_SERVICE_STATES)[number];
|
|
18
|
+
export declare const RUNTIME_ACTIVITIES: readonly ["AWAKE", "ASLEEP"];
|
|
19
|
+
export type RuntimeActivity = (typeof RUNTIME_ACTIVITIES)[number];
|
|
20
|
+
export declare const RUNTIME_SERVICE_RESULT_OUTCOMES: readonly ["IN_PROGRESS", "SUCCEEDED", "NO_CHANGE", "FAILED"];
|
|
21
|
+
export type RuntimeServiceResultOutcome = (typeof RUNTIME_SERVICE_RESULT_OUTCOMES)[number];
|
|
22
|
+
export declare const TERMINAL_RUNTIME_OPERATION_STATUSES: readonly ["SUCCEEDED", "PARTIAL", "FAILED"];
|
|
23
|
+
export declare function isTerminalRuntimeOperationStatus(status: string): boolean;
|
|
24
|
+
export declare const RUNTIME_OPERATION_INTERRUPTED_REASON = "Resource operation was interrupted with an unknown outcome.";
|
|
25
|
+
export declare const RUNTIME_OPERATION_TIMEOUT_MS: number;
|
|
26
|
+
export declare const RUNTIME_SERVICE_KEYS: readonly ["server", "worker"];
|
|
27
|
+
export type RuntimeServiceKey = (typeof RUNTIME_SERVICE_KEYS)[number];
|
|
28
|
+
export declare const RUNTIME_RESOURCE_KEYS: readonly ["server", "worker", "database", "redis"];
|
|
29
|
+
export type RuntimeResourceKey = (typeof RUNTIME_RESOURCE_KEYS)[number];
|
|
30
|
+
export interface RuntimeResourceResult {
|
|
31
|
+
resource: RuntimeResourceKey;
|
|
32
|
+
service?: RuntimeServiceKey;
|
|
33
|
+
outcome: RuntimeServiceResultOutcome;
|
|
34
|
+
state: RuntimeServiceState;
|
|
35
|
+
errorDetails: string | null;
|
|
36
|
+
}
|
|
37
|
+
export interface RuntimeServiceResult extends Omit<RuntimeResourceResult, "resource" | "service"> {
|
|
38
|
+
service: RuntimeServiceKey;
|
|
39
|
+
}
|
|
40
|
+
export declare function runtimeResultResource(result: RuntimeResourceResult): RuntimeResourceKey | null;
|
|
41
|
+
export interface RuntimeOperationResponse {
|
|
42
|
+
id: string;
|
|
43
|
+
environmentId: string;
|
|
44
|
+
action: RuntimeOperationAction;
|
|
45
|
+
status: RuntimeOperationStatus;
|
|
46
|
+
runtimeIntent: RuntimeIntent | null;
|
|
47
|
+
runtimeState: RuntimeState;
|
|
48
|
+
results: RuntimeResourceResult[] | null;
|
|
49
|
+
errorDetails: string | null;
|
|
50
|
+
startedAt: string | null;
|
|
51
|
+
completedAt: string | null;
|
|
52
|
+
createdAt: string;
|
|
53
|
+
}
|
|
54
|
+
export interface CreateRuntimeOperationRequest {
|
|
55
|
+
action: RuntimeOperationAction;
|
|
56
|
+
resources?: RuntimeResourceKey[];
|
|
57
|
+
}
|
|
58
|
+
export interface RuntimeServiceStatus {
|
|
59
|
+
service: RuntimeServiceKey;
|
|
60
|
+
state: RuntimeServiceState;
|
|
61
|
+
health: string | null;
|
|
62
|
+
}
|
|
63
|
+
export interface RuntimeResource {
|
|
64
|
+
name: RuntimeResourceKey;
|
|
65
|
+
category: "SERVICE" | "DATASTORE";
|
|
66
|
+
type: "server" | "worker" | "postgresql" | "redis";
|
|
67
|
+
runtimeState: RuntimeServiceState;
|
|
68
|
+
health: "HEALTHY" | "DEGRADED" | "UNKNOWN" | null;
|
|
69
|
+
activity: RuntimeActivity | null;
|
|
70
|
+
stateReason: string | null;
|
|
71
|
+
observedAt: string | null;
|
|
72
|
+
supportedActions: RuntimeOperationAction[];
|
|
73
|
+
configuration: {
|
|
74
|
+
version?: string;
|
|
75
|
+
replicas?: number;
|
|
76
|
+
storageGb?: number;
|
|
77
|
+
region?: string;
|
|
78
|
+
};
|
|
79
|
+
lastOperation: {
|
|
80
|
+
id: string;
|
|
81
|
+
action: RuntimeOperationAction;
|
|
82
|
+
status: RuntimeOperationStatus;
|
|
83
|
+
outcome: RuntimeServiceResultOutcome;
|
|
84
|
+
completedAt: string | null;
|
|
85
|
+
} | null;
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=runtime-operations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-operations.d.ts","sourceRoot":"","sources":["../../../../src/cli/lib/contract/runtime-operations.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEnE,eAAO,MAAM,sBAAsB;;;;CAIzB,CAAC;AACX,MAAM,MAAM,sBAAsB,GAChC,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,OAAO,sBAAsB,CAAC,CAAC;AAEvE,eAAO,MAAM,sBAAsB;;;;;;CAMzB,CAAC;AACX,MAAM,MAAM,sBAAsB,GAChC,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,OAAO,sBAAsB,CAAC,CAAC;AAEvE,eAAO,MAAM,sBAAsB,+DAAgE,CAAC;AACpG,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,sBAAsB,CAAC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AAE,MAAM,CAAC;QACX,MAAM,EAAE,sBAAsB,CAAC;QAC/B,MAAM,EAAE,sBAAsB,CAAC;QAC/B,OAAO,EAAE,2BAA2B,CAAC;QACrC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;KAC5B,GAAG,IAAI,CAAC;CACV"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
// Mirrors the half of `@vendure-cloud/api-types`'s `runtime-operations.ts` that the hosted runtime
|
|
2
|
+
// commands read. See ./README.md for why this package cannot import it, including as types.
|
|
3
|
+
//
|
|
4
|
+
// `test/cli-contract-drift.test.ts` compares these declarations with the originals as text, and
|
|
5
|
+
// `test/cli-contract-parity.test.ts` runs the values and guards against the real ones.
|
|
6
|
+
//
|
|
7
|
+
// The three vocabularies the CLI only needs as a set of members — service state, activity and
|
|
8
|
+
// service result outcome — are written as a `const` array plus a derived type rather than as the
|
|
9
|
+
// original's `const` object, so the parity suite has something to hold up against the real one at
|
|
10
|
+
// runtime. `RuntimeOperationAction` and `RuntimeOperationStatus` keep the object form because call
|
|
11
|
+
// sites read their members by name.
|
|
12
|
+
//
|
|
13
|
+
// The write half is not here. Nothing in the CLI records a runtime operation; it starts one and
|
|
14
|
+
// reads what came back.
|
|
15
|
+
export const RuntimeOperationAction = {
|
|
16
|
+
STOP: "STOP",
|
|
17
|
+
START: "START",
|
|
18
|
+
RESTART: "RESTART",
|
|
19
|
+
};
|
|
20
|
+
export const RuntimeOperationStatus = {
|
|
21
|
+
QUEUED: "QUEUED",
|
|
22
|
+
RUNNING: "RUNNING",
|
|
23
|
+
SUCCEEDED: "SUCCEEDED",
|
|
24
|
+
PARTIAL: "PARTIAL",
|
|
25
|
+
FAILED: "FAILED",
|
|
26
|
+
};
|
|
27
|
+
export const RUNTIME_SERVICE_STATES = ["NOT_PROVISIONED", "STARTED", "STOPPED", "UNKNOWN"];
|
|
28
|
+
// Whether a started runtime service has a task running at this instant, as a dimension of its own
|
|
29
|
+
// rather than a fifth `RuntimeState` value (ADR-0029). It is meaningful only while VC Runtime State
|
|
30
|
+
// is `STARTED`.
|
|
31
|
+
export const RUNTIME_ACTIVITIES = ["AWAKE", "ASLEEP"];
|
|
32
|
+
export const RUNTIME_SERVICE_RESULT_OUTCOMES = [
|
|
33
|
+
"IN_PROGRESS",
|
|
34
|
+
"SUCCEEDED",
|
|
35
|
+
"NO_CHANGE",
|
|
36
|
+
"FAILED",
|
|
37
|
+
];
|
|
38
|
+
// Statuses after which an operation never changes again. Shared because every
|
|
39
|
+
// consumer that follows an operation has to know when to stop following it, and
|
|
40
|
+
// a hand-kept copy silently keeps polling forever when a status is added.
|
|
41
|
+
export const TERMINAL_RUNTIME_OPERATION_STATUSES = [
|
|
42
|
+
RuntimeOperationStatus.SUCCEEDED,
|
|
43
|
+
RuntimeOperationStatus.PARTIAL,
|
|
44
|
+
RuntimeOperationStatus.FAILED,
|
|
45
|
+
];
|
|
46
|
+
export function isTerminalRuntimeOperationStatus(status) {
|
|
47
|
+
return TERMINAL_RUNTIME_OPERATION_STATUSES.includes(status);
|
|
48
|
+
}
|
|
49
|
+
// A resource whose operation died between the pre-flight checkpoint and the
|
|
50
|
+
// provider's answer. The distinction matters: it is not a failed restart, it is a
|
|
51
|
+
// restart with no known result, so no surface may report it as either.
|
|
52
|
+
export const RUNTIME_OPERATION_INTERRUPTED_REASON = "Resource operation was interrupted with an unknown outcome.";
|
|
53
|
+
// How long a client follows an operation before handing it back to the user. The
|
|
54
|
+
// server allows five minutes per resource, so anything shorter abandons work that
|
|
55
|
+
// is still legitimately running.
|
|
56
|
+
export const RUNTIME_OPERATION_TIMEOUT_MS = 15 * 60_000;
|
|
57
|
+
export const RUNTIME_SERVICE_KEYS = ["server", "worker"];
|
|
58
|
+
export const RUNTIME_RESOURCE_KEYS = ["server", "worker", "database", "redis"];
|
|
59
|
+
export function runtimeResultResource(result) {
|
|
60
|
+
if (RUNTIME_RESOURCE_KEYS.some((key) => key === result.resource))
|
|
61
|
+
return result.resource;
|
|
62
|
+
if (result.service && RUNTIME_SERVICE_KEYS.some((key) => key === result.service)) {
|
|
63
|
+
return result.service;
|
|
64
|
+
}
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=runtime-operations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-operations.js","sourceRoot":"","sources":["../../../../src/cli/lib/contract/runtime-operations.ts"],"names":[],"mappings":"AAAA,mGAAmG;AACnG,4FAA4F;AAC5F,EAAE;AACF,gGAAgG;AAChG,uFAAuF;AACvF,EAAE;AACF,8FAA8F;AAC9F,iGAAiG;AACjG,kGAAkG;AAClG,mGAAmG;AACnG,oCAAoC;AACpC,EAAE;AACF,gGAAgG;AAChG,wBAAwB;AAIxB,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;IACd,OAAO,EAAE,SAAS;CACV,CAAC;AAIX,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;IAClB,SAAS,EAAE,WAAW;IACtB,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;CACR,CAAC;AAIX,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,iBAAiB,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,CAAU,CAAC;AAGpG,kGAAkG;AAClG,oGAAoG;AACpG,gBAAgB;AAChB,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,OAAO,EAAE,QAAQ,CAAU,CAAC;AAG/D,MAAM,CAAC,MAAM,+BAA+B,GAAG;IAC7C,aAAa;IACb,WAAW;IACX,WAAW;IACX,QAAQ;CACA,CAAC;AAGX,8EAA8E;AAC9E,gFAAgF;AAChF,0EAA0E;AAC1E,MAAM,CAAC,MAAM,mCAAmC,GAAG;IACjD,sBAAsB,CAAC,SAAS;IAChC,sBAAsB,CAAC,OAAO;IAC9B,sBAAsB,CAAC,MAAM;CACrB,CAAC;AAEX,MAAM,UAAU,gCAAgC,CAAC,MAAc;IAC7D,OAAQ,mCAAyD,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AACrF,CAAC;AAED,4EAA4E;AAC5E,kFAAkF;AAClF,uEAAuE;AACvE,MAAM,CAAC,MAAM,oCAAoC,GAC/C,6DAA6D,CAAC;AAEhE,iFAAiF;AACjF,kFAAkF;AAClF,iCAAiC;AACjC,MAAM,CAAC,MAAM,4BAA4B,GAAG,EAAE,GAAG,MAAM,CAAC;AAExD,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAU,CAAC;AAGlE,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,CAAU,CAAC;AAexF,MAAM,UAAU,qBAAqB,CAAC,MAA6B;IACjE,IAAI,qBAAqB,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,KAAK,MAAM,CAAC,QAAQ,CAAC;QAAE,OAAO,MAAM,CAAC,QAAQ,CAAC;IACzF,IAAI,MAAM,CAAC,OAAO,IAAI,oBAAoB,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,KAAK,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC;QACjF,OAAO,MAAM,CAAC,OAAO,CAAC;IACxB,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const SEED_CONTENT_TYPE = "application/gzip";
|
|
3
|
+
export declare const SEED_UPLOAD_PRECONDITION_HEADER = "if-none-match";
|
|
4
|
+
export declare const SEED_UPLOAD_PRECONDITION_VALUE = "*";
|
|
5
|
+
export interface StoredSeed {
|
|
6
|
+
name: string;
|
|
7
|
+
sizeBytes: number;
|
|
8
|
+
updatedAt: string;
|
|
9
|
+
}
|
|
10
|
+
export interface SeedUploadTicket {
|
|
11
|
+
name: string;
|
|
12
|
+
uploadUrl: string;
|
|
13
|
+
}
|
|
14
|
+
export interface SeedApplyResult {
|
|
15
|
+
operationId: string;
|
|
16
|
+
}
|
|
17
|
+
export declare const SEED_APPLY_STATUSES: readonly ["pending", "success", "failure"];
|
|
18
|
+
export type SeedApplyStatusValue = (typeof SEED_APPLY_STATUSES)[number];
|
|
19
|
+
export interface SeedApplyStatus {
|
|
20
|
+
operationId: string;
|
|
21
|
+
status: SeedApplyStatusValue;
|
|
22
|
+
errorDetails?: string | null;
|
|
23
|
+
}
|
|
24
|
+
export interface SeedDeletionResult {
|
|
25
|
+
name: string;
|
|
26
|
+
deleted: true;
|
|
27
|
+
}
|
|
28
|
+
export declare const VC_IDENTIFIER_PATTERN: RegExp;
|
|
29
|
+
export declare const seedArtifactRefSchema: z.ZodString;
|
|
30
|
+
export declare function isValidSeedName(value: string): boolean;
|
|
31
|
+
//# sourceMappingURL=seeds.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"seeds.d.ts","sourceRoot":"","sources":["../../../../src/cli/lib/contract/seeds.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,iBAAiB,qBAAqB,CAAC;AAMpD,eAAO,MAAM,+BAA+B,kBAAkB,CAAC;AAC/D,eAAO,MAAM,8BAA8B,MAAM,CAAC;AAElD,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAKD,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;CACnB;AAKD,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,mBAAmB,4CAA6C,CAAC;AAC9E,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;AAExE,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,oBAAoB,CAAC;IAG7B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,IAAI,CAAC;CACf;AAKD,eAAO,MAAM,qBAAqB,QAA+B,CAAC;AAElE,eAAO,MAAM,qBAAqB,aAK2D,CAAC;AAQ9F,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAGtD"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// Mirrors the named-seed wire contract: the constants and shapes from `@vendure-cloud/api-types`'s
|
|
2
|
+
// `index.ts`, and the seed-name rule from `@vendure-cloud/environment-state`. See ./README.md for
|
|
3
|
+
// why this package cannot import either, including as types.
|
|
4
|
+
//
|
|
5
|
+
// `SeedApplyStatus.errorDetails` is typed `string` where the original carries the
|
|
6
|
+
// `PublicErrorDetails` brand, for the reason ./README.md gives.
|
|
7
|
+
//
|
|
8
|
+
// This file imports `zod`, so a command reaches it from inside its `run` through `await import(...)`
|
|
9
|
+
// rather than from the module that declares the command tree. `test/cli-published-surface.test.ts`
|
|
10
|
+
// fails if loading the CLI plugin reaches `zod`.
|
|
11
|
+
import { z } from "zod";
|
|
12
|
+
// Seed artifacts are gzipped plain-SQL. This MIME type is a wire contract, not
|
|
13
|
+
// display copy: the presigned upload URL is signed with it, and the client's PUT
|
|
14
|
+
// must send the exact same Content-Type or the signed request is rejected.
|
|
15
|
+
export const SEED_CONTENT_TYPE = "application/gzip";
|
|
16
|
+
// The presigned upload URL is create-only — signed with a conditional-write header
|
|
17
|
+
// so an upload never silently replaces an existing seed. The client PUT must echo
|
|
18
|
+
// this exact header and value; an already-existing object is rejected by storage
|
|
19
|
+
// with HTTP 412, which is what `seed push` renders as a name already taken.
|
|
20
|
+
export const SEED_UPLOAD_PRECONDITION_HEADER = "if-none-match";
|
|
21
|
+
export const SEED_UPLOAD_PRECONDITION_VALUE = "*";
|
|
22
|
+
export const SEED_APPLY_STATUSES = ["pending", "success", "failure"];
|
|
23
|
+
// The shared "lowercase, hyphen-separated identifier" shape. Named for the shape,
|
|
24
|
+
// not one use, so it can back regions, env slugs and seed refs without any of them
|
|
25
|
+
// pretending to be a region.
|
|
26
|
+
export const VC_IDENTIFIER_PATTERN = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
|
|
27
|
+
export const seedArtifactRefSchema = z
|
|
28
|
+
.string()
|
|
29
|
+
.trim()
|
|
30
|
+
.min(1)
|
|
31
|
+
.max(63)
|
|
32
|
+
.regex(VC_IDENTIFIER_PATTERN, "Seed ref must be a lowercase, hyphen-separated identifier.");
|
|
33
|
+
// A seed name is exactly a seed artifact ref (the two are the same identifier);
|
|
34
|
+
// the on-demand seed CLI (CLO-219) validates `push`/`rm`/`apply` names against this.
|
|
35
|
+
// The schema `.trim()`s, so a padded value like " x " would parse successfully to a
|
|
36
|
+
// different string than was passed in — the object key would then not match the
|
|
37
|
+
// name the caller thinks they used. Require the value to already be canonical
|
|
38
|
+
// (parse succeeds AND produced no change) so validation and the value used agree.
|
|
39
|
+
export function isValidSeedName(value) {
|
|
40
|
+
const parsed = seedArtifactRefSchema.safeParse(value);
|
|
41
|
+
return parsed.success && parsed.data === value;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=seeds.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"seeds.js","sourceRoot":"","sources":["../../../../src/cli/lib/contract/seeds.ts"],"names":[],"mappings":"AAAA,mGAAmG;AACnG,kGAAkG;AAClG,6DAA6D;AAC7D,EAAE;AACF,kFAAkF;AAClF,gEAAgE;AAChE,EAAE;AACF,qGAAqG;AACrG,mGAAmG;AACnG,iDAAiD;AAEjD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,+EAA+E;AAC/E,iFAAiF;AACjF,2EAA2E;AAC3E,MAAM,CAAC,MAAM,iBAAiB,GAAG,kBAAkB,CAAC;AAEpD,mFAAmF;AACnF,kFAAkF;AAClF,iFAAiF;AACjF,4EAA4E;AAC5E,MAAM,CAAC,MAAM,+BAA+B,GAAG,eAAe,CAAC;AAC/D,MAAM,CAAC,MAAM,8BAA8B,GAAG,GAAG,CAAC;AAuBlD,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,CAAU,CAAC;AAgB9E,kFAAkF;AAClF,mFAAmF;AACnF,6BAA6B;AAC7B,MAAM,CAAC,MAAM,qBAAqB,GAAG,4BAA4B,CAAC;AAElE,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC;KACnC,MAAM,EAAE;KACR,IAAI,EAAE;KACN,GAAG,CAAC,CAAC,CAAC;KACN,GAAG,CAAC,EAAE,CAAC;KACP,KAAK,CAAC,qBAAqB,EAAE,4DAA4D,CAAC,CAAC;AAE9F,gFAAgF;AAChF,qFAAqF;AACrF,oFAAoF;AACpF,gFAAgF;AAChF,8EAA8E;AAC9E,kFAAkF;AAClF,MAAM,UAAU,eAAe,CAAC,KAAa;IAC3C,MAAM,MAAM,GAAG,qBAAqB,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IACtD,OAAO,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,IAAI,KAAK,KAAK,CAAC;AACjD,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
export declare const SOURCE_REPOSITORY_LINK_STATUSES: readonly ["ACTIVE", "DISCONNECTED"];
|
|
2
|
+
export type SourceRepositoryLinkStatus = (typeof SOURCE_REPOSITORY_LINK_STATUSES)[number];
|
|
3
|
+
export declare const SOURCE_BRANCH_MAPPING_STATUSES: readonly ["ACTIVE", "INACTIVE"];
|
|
4
|
+
export type SourceBranchMappingStatus = (typeof SOURCE_BRANCH_MAPPING_STATUSES)[number];
|
|
5
|
+
export declare const SOURCE_TRIGGER_STATUSES: readonly ["SUCCESS", "FAILED", "QUEUED"];
|
|
6
|
+
export type SourceTriggerStatus = (typeof SOURCE_TRIGGER_STATUSES)[number];
|
|
7
|
+
export declare const SOURCE_TRIGGER_REASONS: readonly ["PUSH", "ACTIVE_DEPLOYMENT", "DISCONNECTED", "PRE_DEPLOY_FAILED", "GITHUB_UNAVAILABLE", "DEPLOYMENT_CREATED"];
|
|
8
|
+
export type SourceTriggerReason = (typeof SOURCE_TRIGGER_REASONS)[number];
|
|
9
|
+
export declare const SOURCE_DISCONNECT_REASONS: readonly ["REPOSITORY_ACCESS_REMOVED", "REPOSITORY_DELETED", "INSTALLATION_DELETED", "INSTALLATION_REMOVED"];
|
|
10
|
+
export type SourceDisconnectReason = (typeof SOURCE_DISCONNECT_REASONS)[number];
|
|
11
|
+
export interface SourceRepositorySummary {
|
|
12
|
+
githubRepositoryId: string;
|
|
13
|
+
owner: string;
|
|
14
|
+
name: string;
|
|
15
|
+
fullName: string;
|
|
16
|
+
defaultBranch: string;
|
|
17
|
+
cloneUrl: string;
|
|
18
|
+
vcsInstallationId: string;
|
|
19
|
+
}
|
|
20
|
+
export interface SourceRepositoryLinkDetails {
|
|
21
|
+
id: string;
|
|
22
|
+
projectId: string;
|
|
23
|
+
organizationId: string;
|
|
24
|
+
vcsInstallationId: string;
|
|
25
|
+
githubRepositoryId: string;
|
|
26
|
+
owner: string;
|
|
27
|
+
name: string;
|
|
28
|
+
defaultBranch: string;
|
|
29
|
+
cloneUrl: string;
|
|
30
|
+
status: SourceRepositoryLinkStatus;
|
|
31
|
+
disconnectedReason: SourceDisconnectReason | null;
|
|
32
|
+
disconnectedAt: string | null;
|
|
33
|
+
createdAt: string;
|
|
34
|
+
updatedAt: string;
|
|
35
|
+
}
|
|
36
|
+
export interface SourceBranchMappingDetails {
|
|
37
|
+
id: string;
|
|
38
|
+
environmentId: string;
|
|
39
|
+
organizationId: string;
|
|
40
|
+
sourceRepositoryLinkId: string;
|
|
41
|
+
branch: string;
|
|
42
|
+
status: SourceBranchMappingStatus;
|
|
43
|
+
lastTriggerStatus: SourceTriggerStatus | null;
|
|
44
|
+
lastTriggerReason: SourceTriggerReason | null;
|
|
45
|
+
lastTriggerError: string | null;
|
|
46
|
+
lastTriggerCommitSha: string | null;
|
|
47
|
+
lastTriggerAt: string | null;
|
|
48
|
+
lastTriggeredDeploymentId: string | null;
|
|
49
|
+
desiredCommitSha: string | null;
|
|
50
|
+
desiredCommitMessage: string | null;
|
|
51
|
+
desiredCommitAt: string | null;
|
|
52
|
+
createdAt: string;
|
|
53
|
+
updatedAt: string;
|
|
54
|
+
}
|
|
55
|
+
export interface ManualSourceTriggerResult {
|
|
56
|
+
deploymentId: string;
|
|
57
|
+
}
|
|
58
|
+
export declare const VCS_LINK_SESSION_STATUSES: readonly ["PENDING", "COMPLETED", "EXPIRED"];
|
|
59
|
+
export type VcsLinkSessionStatusValue = (typeof VCS_LINK_SESSION_STATUSES)[number];
|
|
60
|
+
export interface VcsInstallationSummary {
|
|
61
|
+
id: string;
|
|
62
|
+
githubAccountLogin: string;
|
|
63
|
+
githubAccountType: string;
|
|
64
|
+
}
|
|
65
|
+
export interface VcsLinkSessionResponse {
|
|
66
|
+
sessionId: string;
|
|
67
|
+
installUrl: string;
|
|
68
|
+
}
|
|
69
|
+
export interface VcsLinkSessionStatus {
|
|
70
|
+
status: VcsLinkSessionStatusValue;
|
|
71
|
+
installation?: VcsInstallationSummary | null;
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=source-repository.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"source-repository.d.ts","sourceRoot":"","sources":["../../../../src/cli/lib/contract/source-repository.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,+BAA+B,qCAAsC,CAAC;AACnF,MAAM,MAAM,0BAA0B,GAAG,CAAC,OAAO,+BAA+B,CAA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C9C"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// Mirrors the Source Repository Link, branch mapping and repository-install shapes from
|
|
2
|
+
// `@vendure-cloud/api-types`'s `index.ts`. See ./README.md for why this package cannot import them,
|
|
3
|
+
// including as types.
|
|
4
|
+
//
|
|
5
|
+
// Two command families read this file: `deploy` and `deploy --source` render a branch mapping and
|
|
6
|
+
// the result of a manual trigger, and the `source` and `init` flows read the whole install
|
|
7
|
+
// conversation. It holds the read side only — the request bodies stay in `@vendure-cloud/api-types`
|
|
8
|
+
// with the control plane that validates them.
|
|
9
|
+
//
|
|
10
|
+
// Each vocabulary is a `const` array plus a derived type where the original is a bare union, so a
|
|
11
|
+
// call site can enumerate the members and `test/cli-contract-parity.test.ts` can hold the derived
|
|
12
|
+
// type up against the real one.
|
|
13
|
+
export const SOURCE_REPOSITORY_LINK_STATUSES = ["ACTIVE", "DISCONNECTED"];
|
|
14
|
+
export const SOURCE_BRANCH_MAPPING_STATUSES = ["ACTIVE", "INACTIVE"];
|
|
15
|
+
export const SOURCE_TRIGGER_STATUSES = ["SUCCESS", "FAILED", "QUEUED"];
|
|
16
|
+
export const SOURCE_TRIGGER_REASONS = [
|
|
17
|
+
"PUSH",
|
|
18
|
+
"ACTIVE_DEPLOYMENT",
|
|
19
|
+
"DISCONNECTED",
|
|
20
|
+
"PRE_DEPLOY_FAILED",
|
|
21
|
+
"GITHUB_UNAVAILABLE",
|
|
22
|
+
"DEPLOYMENT_CREATED",
|
|
23
|
+
];
|
|
24
|
+
export const SOURCE_DISCONNECT_REASONS = [
|
|
25
|
+
"REPOSITORY_ACCESS_REMOVED",
|
|
26
|
+
"REPOSITORY_DELETED",
|
|
27
|
+
"INSTALLATION_DELETED",
|
|
28
|
+
"INSTALLATION_REMOVED",
|
|
29
|
+
];
|
|
30
|
+
export const VCS_LINK_SESSION_STATUSES = ["PENDING", "COMPLETED", "EXPIRED"];
|
|
31
|
+
//# sourceMappingURL=source-repository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"source-repository.js","sourceRoot":"","sources":["../../../../src/cli/lib/contract/source-repository.ts"],"names":[],"mappings":"AAAA,wFAAwF;AACxF,oGAAoG;AACpG,sBAAsB;AACtB,EAAE;AACF,kGAAkG;AAClG,2FAA2F;AAC3F,oGAAoG;AACpG,8CAA8C;AAC9C,EAAE;AACF,kGAAkG;AAClG,kGAAkG;AAClG,gCAAgC;AAEhC,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,QAAQ,EAAE,cAAc,CAAU,CAAC;AAGnF,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,QAAQ,EAAE,UAAU,CAAU,CAAC;AAG9E,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,SAAS,EAAE,QAAQ,EAAE,QAAQ,CAAU,CAAC;AAGhF,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,MAAM;IACN,mBAAmB;IACnB,cAAc;IACd,mBAAmB;IACnB,oBAAoB;IACpB,oBAAoB;CACZ,CAAC;AAGX,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,2BAA2B;IAC3B,oBAAoB;IACpB,sBAAsB;IACtB,sBAAsB;CACd,CAAC;AAsDX,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,SAAS,EAAE,WAAW,EAAE,SAAS,CAAU,CAAC"}
|