@marinoscar/platform-cli 0.1.0-next.3 → 0.1.0-next.4
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/CHANGELOG.md +80 -0
- package/README.md +126 -31
- package/dist/android/build.d.ts +30 -0
- package/dist/android/build.d.ts.map +1 -0
- package/dist/android/build.js +126 -0
- package/dist/android/build.js.map +1 -0
- package/dist/android/command.d.ts +21 -0
- package/dist/android/command.d.ts.map +1 -0
- package/dist/android/command.js +355 -0
- package/dist/android/command.js.map +1 -0
- package/dist/android/deploy-step.d.ts +85 -0
- package/dist/android/deploy-step.d.ts.map +1 -0
- package/dist/android/deploy-step.js +268 -0
- package/dist/android/deploy-step.js.map +1 -0
- package/dist/android/doctor.d.ts +47 -0
- package/dist/android/doctor.d.ts.map +1 -0
- package/dist/android/doctor.js +219 -0
- package/dist/android/doctor.js.map +1 -0
- package/dist/android/exec.d.ts +42 -0
- package/dist/android/exec.d.ts.map +1 -0
- package/dist/android/exec.js +103 -0
- package/dist/android/exec.js.map +1 -0
- package/dist/android/fix-plan.d.ts +44 -0
- package/dist/android/fix-plan.d.ts.map +1 -0
- package/dist/android/fix-plan.js +86 -0
- package/dist/android/fix-plan.js.map +1 -0
- package/dist/android/git-freshness.d.ts +34 -0
- package/dist/android/git-freshness.d.ts.map +1 -0
- package/dist/android/git-freshness.js +120 -0
- package/dist/android/git-freshness.js.map +1 -0
- package/dist/android/gradle.d.ts +32 -0
- package/dist/android/gradle.d.ts.map +1 -0
- package/dist/android/gradle.js +55 -0
- package/dist/android/gradle.js.map +1 -0
- package/dist/android/identity.d.ts +27 -0
- package/dist/android/identity.d.ts.map +1 -0
- package/dist/android/identity.js +60 -0
- package/dist/android/identity.js.map +1 -0
- package/dist/android/index.d.ts +7 -0
- package/dist/android/index.d.ts.map +1 -0
- package/dist/android/index.js +8 -0
- package/dist/android/index.js.map +1 -0
- package/dist/android/installer.d.ts +28 -0
- package/dist/android/installer.d.ts.map +1 -0
- package/dist/android/installer.js +96 -0
- package/dist/android/installer.js.map +1 -0
- package/dist/android/java.d.ts +26 -0
- package/dist/android/java.d.ts.map +1 -0
- package/dist/android/java.js +65 -0
- package/dist/android/java.js.map +1 -0
- package/dist/android/keystore.d.ts +54 -0
- package/dist/android/keystore.d.ts.map +1 -0
- package/dist/android/keystore.js +159 -0
- package/dist/android/keystore.js.map +1 -0
- package/dist/android/metadata.d.ts +39 -0
- package/dist/android/metadata.d.ts.map +1 -0
- package/dist/android/metadata.js +61 -0
- package/dist/android/metadata.js.map +1 -0
- package/dist/android/operations.d.ts +42 -0
- package/dist/android/operations.d.ts.map +1 -0
- package/dist/android/operations.js +59 -0
- package/dist/android/operations.js.map +1 -0
- package/dist/android/paths.d.ts +29 -0
- package/dist/android/paths.d.ts.map +1 -0
- package/dist/android/paths.js +97 -0
- package/dist/android/paths.js.map +1 -0
- package/dist/android/publish.d.ts +37 -0
- package/dist/android/publish.d.ts.map +1 -0
- package/dist/android/publish.js +119 -0
- package/dist/android/publish.js.map +1 -0
- package/dist/android/registrations.d.ts +92 -0
- package/dist/android/registrations.d.ts.map +1 -0
- package/dist/android/registrations.js +112 -0
- package/dist/android/registrations.js.map +1 -0
- package/dist/android/release-status.d.ts +73 -0
- package/dist/android/release-status.d.ts.map +1 -0
- package/dist/android/release-status.js +161 -0
- package/dist/android/release-status.js.map +1 -0
- package/dist/android/release.d.ts +33 -0
- package/dist/android/release.d.ts.map +1 -0
- package/dist/android/release.js +59 -0
- package/dist/android/release.js.map +1 -0
- package/dist/android/screen-layout.d.ts +26 -0
- package/dist/android/screen-layout.d.ts.map +1 -0
- package/dist/android/screen-layout.js +24 -0
- package/dist/android/screen-layout.js.map +1 -0
- package/dist/android/screen-model.d.ts +56 -0
- package/dist/android/screen-model.d.ts.map +1 -0
- package/dist/android/screen-model.js +207 -0
- package/dist/android/screen-model.js.map +1 -0
- package/dist/android/screen.d.ts +8 -0
- package/dist/android/screen.d.ts.map +1 -0
- package/dist/android/screen.js +395 -0
- package/dist/android/screen.js.map +1 -0
- package/dist/android/sdk.d.ts +48 -0
- package/dist/android/sdk.d.ts.map +1 -0
- package/dist/android/sdk.js +82 -0
- package/dist/android/sdk.js.map +1 -0
- package/dist/android/server-url.d.ts +19 -0
- package/dist/android/server-url.d.ts.map +1 -0
- package/dist/android/server-url.js +36 -0
- package/dist/android/server-url.js.map +1 -0
- package/dist/android/upload-progress.d.ts +3 -0
- package/dist/android/upload-progress.d.ts.map +1 -0
- package/dist/android/upload-progress.js +47 -0
- package/dist/android/upload-progress.js.map +1 -0
- package/dist/android/version.d.ts +47 -0
- package/dist/android/version.d.ts.map +1 -0
- package/dist/android/version.js +136 -0
- package/dist/android/version.js.map +1 -0
- package/dist/api-client/index.d.ts +3 -0
- package/dist/api-client/index.d.ts.map +1 -0
- package/dist/api-client/index.js +5 -0
- package/dist/api-client/index.js.map +1 -0
- package/dist/commands/index.d.ts +52 -0
- package/dist/commands/index.d.ts.map +1 -0
- package/dist/commands/index.js +63 -0
- package/dist/commands/index.js.map +1 -0
- package/dist/core/cli-registry.d.ts +41 -0
- package/dist/core/cli-registry.d.ts.map +1 -0
- package/dist/core/cli-registry.js +49 -0
- package/dist/core/cli-registry.js.map +1 -0
- package/dist/core/command-registry.d.ts +10 -0
- package/dist/core/command-registry.d.ts.map +1 -1
- package/dist/core/command-registry.js +17 -0
- package/dist/core/command-registry.js.map +1 -1
- package/dist/core/env-annotation-registry.d.ts +58 -0
- package/dist/core/env-annotation-registry.d.ts.map +1 -0
- package/dist/core/env-annotation-registry.js +80 -0
- package/dist/core/env-annotation-registry.js.map +1 -0
- package/dist/core/env-generator-registry.d.ts +59 -0
- package/dist/core/env-generator-registry.d.ts.map +1 -0
- package/dist/core/env-generator-registry.js +102 -0
- package/dist/core/env-generator-registry.js.map +1 -0
- package/dist/core/env-group-registry.d.ts +65 -0
- package/dist/core/env-group-registry.d.ts.map +1 -0
- package/dist/core/env-group-registry.js +77 -0
- package/dist/core/env-group-registry.js.map +1 -0
- package/dist/core/env-spec-registry.d.ts +16 -2
- package/dist/core/env-spec-registry.d.ts.map +1 -1
- package/dist/core/env-spec-registry.js +15 -0
- package/dist/core/env-spec-registry.js.map +1 -1
- package/dist/core/env-values.d.ts +3 -2
- package/dist/core/env-values.d.ts.map +1 -1
- package/dist/core/env-values.js +5 -3
- package/dist/core/env-values.js.map +1 -1
- package/dist/core/index.d.ts +10 -2
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +6 -2
- package/dist/core/index.js.map +1 -1
- package/dist/deploy/index.d.ts +3 -0
- package/dist/deploy/index.d.ts.map +1 -0
- package/dist/deploy/index.js +5 -0
- package/dist/deploy/index.js.map +1 -0
- package/dist/engine/api-client.d.ts +211 -0
- package/dist/engine/api-client.d.ts.map +1 -0
- package/dist/engine/api-client.js +350 -0
- package/dist/engine/api-client.js.map +1 -0
- package/dist/engine/browser.d.ts +18 -0
- package/dist/engine/browser.d.ts.map +1 -0
- package/dist/engine/browser.js +115 -0
- package/dist/engine/browser.js.map +1 -0
- package/dist/engine/builtin-registrations.d.ts +20 -0
- package/dist/engine/builtin-registrations.d.ts.map +1 -0
- package/dist/engine/builtin-registrations.js +86 -0
- package/dist/engine/builtin-registrations.js.map +1 -0
- package/dist/engine/commands/api.d.ts +88 -0
- package/dist/engine/commands/api.d.ts.map +1 -0
- package/dist/engine/commands/api.js +398 -0
- package/dist/engine/commands/api.js.map +1 -0
- package/dist/engine/commands/config.d.ts +5 -0
- package/dist/engine/commands/config.d.ts.map +1 -0
- package/dist/engine/commands/config.js +83 -0
- package/dist/engine/commands/config.js.map +1 -0
- package/dist/engine/commands/deploy.d.ts +243 -0
- package/dist/engine/commands/deploy.d.ts.map +1 -0
- package/dist/engine/commands/deploy.js +1159 -0
- package/dist/engine/commands/deploy.js.map +1 -0
- package/dist/engine/commands/init.d.ts +18 -0
- package/dist/engine/commands/init.d.ts.map +1 -0
- package/dist/engine/commands/init.js +50 -0
- package/dist/engine/commands/init.js.map +1 -0
- package/dist/engine/commands/login.d.ts +4 -0
- package/dist/engine/commands/login.d.ts.map +1 -0
- package/dist/engine/commands/login.js +205 -0
- package/dist/engine/commands/login.js.map +1 -0
- package/dist/engine/commands/node.d.ts +21 -0
- package/dist/engine/commands/node.d.ts.map +1 -0
- package/dist/engine/commands/node.js +436 -0
- package/dist/engine/commands/node.js.map +1 -0
- package/dist/engine/config.d.ts +246 -0
- package/dist/engine/config.d.ts.map +1 -0
- package/dist/engine/config.js +414 -0
- package/dist/engine/config.js.map +1 -0
- package/dist/engine/conformance.d.ts +187 -0
- package/dist/engine/conformance.d.ts.map +1 -0
- package/dist/engine/conformance.js +227 -0
- package/dist/engine/conformance.js.map +1 -0
- package/dist/engine/create-cli.d.ts +94 -0
- package/dist/engine/create-cli.d.ts.map +1 -0
- package/dist/engine/create-cli.js +60 -0
- package/dist/engine/create-cli.js.map +1 -0
- package/dist/engine/deploy/about.d.ts +12 -0
- package/dist/engine/deploy/about.d.ts.map +1 -0
- package/dist/engine/deploy/about.js +110 -0
- package/dist/engine/deploy/about.js.map +1 -0
- package/dist/engine/deploy/adopt.d.ts +21 -0
- package/dist/engine/deploy/adopt.d.ts.map +1 -0
- package/dist/engine/deploy/adopt.js +78 -0
- package/dist/engine/deploy/adopt.js.map +1 -0
- package/dist/engine/deploy/answers-file.d.ts +7 -0
- package/dist/engine/deploy/answers-file.d.ts.map +1 -0
- package/dist/engine/deploy/answers-file.js +49 -0
- package/dist/engine/deploy/answers-file.js.map +1 -0
- package/dist/engine/deploy/app-role.d.ts +278 -0
- package/dist/engine/deploy/app-role.d.ts.map +1 -0
- package/dist/engine/deploy/app-role.js +826 -0
- package/dist/engine/deploy/app-role.js.map +1 -0
- package/dist/engine/deploy/app-version.d.ts +47 -0
- package/dist/engine/deploy/app-version.d.ts.map +1 -0
- package/dist/engine/deploy/app-version.js +232 -0
- package/dist/engine/deploy/app-version.js.map +1 -0
- package/dist/engine/deploy/checks/database.d.ts +83 -0
- package/dist/engine/deploy/checks/database.d.ts.map +1 -0
- package/dist/engine/deploy/checks/database.js +455 -0
- package/dist/engine/deploy/checks/database.js.map +1 -0
- package/dist/engine/deploy/checks/dns.d.ts +3 -0
- package/dist/engine/deploy/checks/dns.d.ts.map +1 -0
- package/dist/engine/deploy/checks/dns.js +85 -0
- package/dist/engine/deploy/checks/dns.js.map +1 -0
- package/dist/engine/deploy/checks/host.d.ts +19 -0
- package/dist/engine/deploy/checks/host.d.ts.map +1 -0
- package/dist/engine/deploy/checks/host.js +530 -0
- package/dist/engine/deploy/checks/host.js.map +1 -0
- package/dist/engine/deploy/checks/index.d.ts +33 -0
- package/dist/engine/deploy/checks/index.d.ts.map +1 -0
- package/dist/engine/deploy/checks/index.js +67 -0
- package/dist/engine/deploy/checks/index.js.map +1 -0
- package/dist/engine/deploy/checks/registry.d.ts +102 -0
- package/dist/engine/deploy/checks/registry.d.ts.map +1 -0
- package/dist/engine/deploy/checks/registry.js +103 -0
- package/dist/engine/deploy/checks/registry.js.map +1 -0
- package/dist/engine/deploy/checks/source.d.ts +45 -0
- package/dist/engine/deploy/checks/source.d.ts.map +1 -0
- package/dist/engine/deploy/checks/source.js +175 -0
- package/dist/engine/deploy/checks/source.js.map +1 -0
- package/dist/engine/deploy/checks/tls.d.ts +87 -0
- package/dist/engine/deploy/checks/tls.d.ts.map +1 -0
- package/dist/engine/deploy/checks/tls.js +552 -0
- package/dist/engine/deploy/checks/tls.js.map +1 -0
- package/dist/engine/deploy/checks/types.d.ts +178 -0
- package/dist/engine/deploy/checks/types.d.ts.map +1 -0
- package/dist/engine/deploy/checks/types.js +199 -0
- package/dist/engine/deploy/checks/types.js.map +1 -0
- package/dist/engine/deploy/compose-files.d.ts +29 -0
- package/dist/engine/deploy/compose-files.d.ts.map +1 -0
- package/dist/engine/deploy/compose-files.js +118 -0
- package/dist/engine/deploy/compose-files.js.map +1 -0
- package/dist/engine/deploy/consent.d.ts +29 -0
- package/dist/engine/deploy/consent.d.ts.map +1 -0
- package/dist/engine/deploy/consent.js +35 -0
- package/dist/engine/deploy/consent.js.map +1 -0
- package/dist/engine/deploy/database-drop.d.ts +22 -0
- package/dist/engine/deploy/database-drop.d.ts.map +1 -0
- package/dist/engine/deploy/database-drop.js +135 -0
- package/dist/engine/deploy/database-drop.js.map +1 -0
- package/dist/engine/deploy/database.d.ts +116 -0
- package/dist/engine/deploy/database.d.ts.map +1 -0
- package/dist/engine/deploy/database.js +252 -0
- package/dist/engine/deploy/database.js.map +1 -0
- package/dist/engine/deploy/deploy-info.d.ts +48 -0
- package/dist/engine/deploy/deploy-info.d.ts.map +1 -0
- package/dist/engine/deploy/deploy-info.js +163 -0
- package/dist/engine/deploy/deploy-info.js.map +1 -0
- package/dist/engine/deploy/deployment-evidence.d.ts +38 -0
- package/dist/engine/deploy/deployment-evidence.d.ts.map +1 -0
- package/dist/engine/deploy/deployment-evidence.js +92 -0
- package/dist/engine/deploy/deployment-evidence.js.map +1 -0
- package/dist/engine/deploy/edge-config.d.ts +103 -0
- package/dist/engine/deploy/edge-config.d.ts.map +1 -0
- package/dist/engine/deploy/edge-config.js +170 -0
- package/dist/engine/deploy/edge-config.js.map +1 -0
- package/dist/engine/deploy/env-absence.d.ts +61 -0
- package/dist/engine/deploy/env-absence.d.ts.map +1 -0
- package/dist/engine/deploy/env-absence.js +33 -0
- package/dist/engine/deploy/env-absence.js.map +1 -0
- package/dist/engine/deploy/env-file.d.ts +14 -0
- package/dist/engine/deploy/env-file.d.ts.map +1 -0
- package/dist/engine/deploy/env-file.js +58 -0
- package/dist/engine/deploy/env-file.js.map +1 -0
- package/dist/engine/deploy/env-fragments.d.ts +29 -0
- package/dist/engine/deploy/env-fragments.d.ts.map +1 -0
- package/dist/engine/deploy/env-fragments.js +73 -0
- package/dist/engine/deploy/env-fragments.js.map +1 -0
- package/dist/engine/deploy/env-metadata.d.ts +73 -0
- package/dist/engine/deploy/env-metadata.d.ts.map +1 -0
- package/dist/engine/deploy/env-metadata.js +227 -0
- package/dist/engine/deploy/env-metadata.js.map +1 -0
- package/dist/engine/deploy/env-spec.d.ts +75 -0
- package/dist/engine/deploy/env-spec.d.ts.map +1 -0
- package/dist/engine/deploy/env-spec.js +239 -0
- package/dist/engine/deploy/env-spec.js.map +1 -0
- package/dist/engine/deploy/env-wizard.d.ts +56 -0
- package/dist/engine/deploy/env-wizard.d.ts.map +1 -0
- package/dist/engine/deploy/env-wizard.js +235 -0
- package/dist/engine/deploy/env-wizard.js.map +1 -0
- package/dist/engine/deploy/executor.d.ts +81 -0
- package/dist/engine/deploy/executor.d.ts.map +1 -0
- package/dist/engine/deploy/executor.js +247 -0
- package/dist/engine/deploy/executor.js.map +1 -0
- package/dist/engine/deploy/health.d.ts +146 -0
- package/dist/engine/deploy/health.d.ts.map +1 -0
- package/dist/engine/deploy/health.js +323 -0
- package/dist/engine/deploy/health.js.map +1 -0
- package/dist/engine/deploy/hooks.d.ts +66 -0
- package/dist/engine/deploy/hooks.d.ts.map +1 -0
- package/dist/engine/deploy/hooks.js +19 -0
- package/dist/engine/deploy/hooks.js.map +1 -0
- package/dist/engine/deploy/host-facts.d.ts +23 -0
- package/dist/engine/deploy/host-facts.d.ts.map +1 -0
- package/dist/engine/deploy/host-facts.js +67 -0
- package/dist/engine/deploy/host-facts.js.map +1 -0
- package/dist/engine/deploy/install.d.ts +233 -0
- package/dist/engine/deploy/install.d.ts.map +1 -0
- package/dist/engine/deploy/install.js +1304 -0
- package/dist/engine/deploy/install.js.map +1 -0
- package/dist/engine/deploy/inventory.d.ts +30 -0
- package/dist/engine/deploy/inventory.d.ts.map +1 -0
- package/dist/engine/deploy/inventory.js +122 -0
- package/dist/engine/deploy/inventory.js.map +1 -0
- package/dist/engine/deploy/journal.d.ts +77 -0
- package/dist/engine/deploy/journal.d.ts.map +1 -0
- package/dist/engine/deploy/journal.js +221 -0
- package/dist/engine/deploy/journal.js.map +1 -0
- package/dist/engine/deploy/layout.d.ts +77 -0
- package/dist/engine/deploy/layout.d.ts.map +1 -0
- package/dist/engine/deploy/layout.js +191 -0
- package/dist/engine/deploy/layout.js.map +1 -0
- package/dist/engine/deploy/oauth-check.d.ts +58 -0
- package/dist/engine/deploy/oauth-check.d.ts.map +1 -0
- package/dist/engine/deploy/oauth-check.js +213 -0
- package/dist/engine/deploy/oauth-check.js.map +1 -0
- package/dist/engine/deploy/proxy-bootstrap.d.ts +149 -0
- package/dist/engine/deploy/proxy-bootstrap.d.ts.map +1 -0
- package/dist/engine/deploy/proxy-bootstrap.js +416 -0
- package/dist/engine/deploy/proxy-bootstrap.js.map +1 -0
- package/dist/engine/deploy/proxy-streams.d.ts +110 -0
- package/dist/engine/deploy/proxy-streams.d.ts.map +1 -0
- package/dist/engine/deploy/proxy-streams.js +208 -0
- package/dist/engine/deploy/proxy-streams.js.map +1 -0
- package/dist/engine/deploy/proxy.d.ts +375 -0
- package/dist/engine/deploy/proxy.d.ts.map +1 -0
- package/dist/engine/deploy/proxy.js +758 -0
- package/dist/engine/deploy/proxy.js.map +1 -0
- package/dist/engine/deploy/renewal.d.ts +54 -0
- package/dist/engine/deploy/renewal.d.ts.map +1 -0
- package/dist/engine/deploy/renewal.js +169 -0
- package/dist/engine/deploy/renewal.js.map +1 -0
- package/dist/engine/deploy/repo.d.ts +101 -0
- package/dist/engine/deploy/repo.d.ts.map +1 -0
- package/dist/engine/deploy/repo.js +250 -0
- package/dist/engine/deploy/repo.js.map +1 -0
- package/dist/engine/deploy/run-record.d.ts +28 -0
- package/dist/engine/deploy/run-record.d.ts.map +1 -0
- package/dist/engine/deploy/run-record.js +44 -0
- package/dist/engine/deploy/run-record.js.map +1 -0
- package/dist/engine/deploy/state.d.ts +262 -0
- package/dist/engine/deploy/state.d.ts.map +1 -0
- package/dist/engine/deploy/state.js +163 -0
- package/dist/engine/deploy/state.js.map +1 -0
- package/dist/engine/deploy/steps/app-step-context.d.ts +24 -0
- package/dist/engine/deploy/steps/app-step-context.d.ts.map +1 -0
- package/dist/engine/deploy/steps/app-step-context.js +45 -0
- package/dist/engine/deploy/steps/app-step-context.js.map +1 -0
- package/dist/engine/deploy/steps/pipeline.d.ts +46 -0
- package/dist/engine/deploy/steps/pipeline.d.ts.map +1 -0
- package/dist/engine/deploy/steps/pipeline.js +73 -0
- package/dist/engine/deploy/steps/pipeline.js.map +1 -0
- package/dist/engine/deploy/steps/plan.d.ts +28 -0
- package/dist/engine/deploy/steps/plan.d.ts.map +1 -0
- package/dist/engine/deploy/steps/plan.js +32 -0
- package/dist/engine/deploy/steps/plan.js.map +1 -0
- package/dist/engine/deploy/steps/registry.d.ts +182 -0
- package/dist/engine/deploy/steps/registry.d.ts.map +1 -0
- package/dist/engine/deploy/steps/registry.js +212 -0
- package/dist/engine/deploy/steps/registry.js.map +1 -0
- package/dist/engine/deploy/steps/step-values.d.ts +28 -0
- package/dist/engine/deploy/steps/step-values.d.ts.map +1 -0
- package/dist/engine/deploy/steps/step-values.js +33 -0
- package/dist/engine/deploy/steps/step-values.js.map +1 -0
- package/dist/engine/deploy/testing/fake-postgres.d.ts +88 -0
- package/dist/engine/deploy/testing/fake-postgres.d.ts.map +1 -0
- package/dist/engine/deploy/testing/fake-postgres.js +236 -0
- package/dist/engine/deploy/testing/fake-postgres.js.map +1 -0
- package/dist/engine/deploy/testing/fake-vps.d.ts +147 -0
- package/dist/engine/deploy/testing/fake-vps.d.ts.map +1 -0
- package/dist/engine/deploy/testing/fake-vps.js +365 -0
- package/dist/engine/deploy/testing/fake-vps.js.map +1 -0
- package/dist/engine/deploy/uninstall.d.ts +87 -0
- package/dist/engine/deploy/uninstall.d.ts.map +1 -0
- package/dist/engine/deploy/uninstall.js +320 -0
- package/dist/engine/deploy/uninstall.js.map +1 -0
- package/dist/engine/deploy/update.d.ts +111 -0
- package/dist/engine/deploy/update.d.ts.map +1 -0
- package/dist/engine/deploy/update.js +1228 -0
- package/dist/engine/deploy/update.js.map +1 -0
- package/dist/engine/deploy/version-step.d.ts +65 -0
- package/dist/engine/deploy/version-step.d.ts.map +1 -0
- package/dist/engine/deploy/version-step.js +176 -0
- package/dist/engine/deploy/version-step.js.map +1 -0
- package/dist/engine/device-auth.d.ts +240 -0
- package/dist/engine/device-auth.d.ts.map +1 -0
- package/dist/engine/device-auth.js +442 -0
- package/dist/engine/device-auth.js.map +1 -0
- package/dist/engine/device-login.d.ts +126 -0
- package/dist/engine/device-login.d.ts.map +1 -0
- package/dist/engine/device-login.js +164 -0
- package/dist/engine/device-login.js.map +1 -0
- package/dist/engine/errors.d.ts +314 -0
- package/dist/engine/errors.d.ts.map +1 -0
- package/dist/engine/errors.js +561 -0
- package/dist/engine/errors.js.map +1 -0
- package/dist/engine/identity.d.ts +169 -0
- package/dist/engine/identity.d.ts.map +1 -0
- package/dist/engine/identity.js +227 -0
- package/dist/engine/identity.js.map +1 -0
- package/dist/engine/index.d.ts +104 -0
- package/dist/engine/index.d.ts.map +1 -0
- package/dist/engine/index.js +126 -0
- package/dist/engine/index.js.map +1 -0
- package/dist/engine/init/local-profile.d.ts +93 -0
- package/dist/engine/init/local-profile.d.ts.map +1 -0
- package/dist/engine/init/local-profile.js +295 -0
- package/dist/engine/init/local-profile.js.map +1 -0
- package/dist/engine/init/run-init.d.ts +41 -0
- package/dist/engine/init/run-init.d.ts.map +1 -0
- package/dist/engine/init/run-init.js +297 -0
- package/dist/engine/init/run-init.js.map +1 -0
- package/dist/engine/node/capabilities.d.ts +238 -0
- package/dist/engine/node/capabilities.d.ts.map +1 -0
- package/dist/engine/node/capabilities.js +316 -0
- package/dist/engine/node/capabilities.js.map +1 -0
- package/dist/engine/node/daemon.d.ts +63 -0
- package/dist/engine/node/daemon.d.ts.map +1 -0
- package/dist/engine/node/daemon.js +227 -0
- package/dist/engine/node/daemon.js.map +1 -0
- package/dist/engine/node/doctor.d.ts +58 -0
- package/dist/engine/node/doctor.d.ts.map +1 -0
- package/dist/engine/node/doctor.js +394 -0
- package/dist/engine/node/doctor.js.map +1 -0
- package/dist/engine/node/enrollment.d.ts +98 -0
- package/dist/engine/node/enrollment.d.ts.map +1 -0
- package/dist/engine/node/enrollment.js +189 -0
- package/dist/engine/node/enrollment.js.map +1 -0
- package/dist/engine/node/env-flags.d.ts +5 -0
- package/dist/engine/node/env-flags.d.ts.map +1 -0
- package/dist/engine/node/env-flags.js +22 -0
- package/dist/engine/node/env-flags.js.map +1 -0
- package/dist/engine/node/executors/credential-hygiene.d.ts +63 -0
- package/dist/engine/node/executors/credential-hygiene.d.ts.map +1 -0
- package/dist/engine/node/executors/credential-hygiene.js +189 -0
- package/dist/engine/node/executors/credential-hygiene.js.map +1 -0
- package/dist/engine/node/executors/db-backup-run.d.ts +73 -0
- package/dist/engine/node/executors/db-backup-run.d.ts.map +1 -0
- package/dist/engine/node/executors/db-backup-run.js +362 -0
- package/dist/engine/node/executors/db-backup-run.js.map +1 -0
- package/dist/engine/node/executors/example-checksum.d.ts +30 -0
- package/dist/engine/node/executors/example-checksum.d.ts.map +1 -0
- package/dist/engine/node/executors/example-checksum.js +56 -0
- package/dist/engine/node/executors/example-checksum.js.map +1 -0
- package/dist/engine/node/executors/index.d.ts +168 -0
- package/dist/engine/node/executors/index.d.ts.map +1 -0
- package/dist/engine/node/executors/index.js +44 -0
- package/dist/engine/node/executors/index.js.map +1 -0
- package/dist/engine/node/executors/registry.d.ts +38 -0
- package/dist/engine/node/executors/registry.d.ts.map +1 -0
- package/dist/engine/node/executors/registry.js +92 -0
- package/dist/engine/node/executors/registry.js.map +1 -0
- package/dist/engine/node/heap-snapshot.d.ts +37 -0
- package/dist/engine/node/heap-snapshot.d.ts.map +1 -0
- package/dist/engine/node/heap-snapshot.js +160 -0
- package/dist/engine/node/heap-snapshot.js.map +1 -0
- package/dist/engine/node/install-deps.d.ts +73 -0
- package/dist/engine/node/install-deps.d.ts.map +1 -0
- package/dist/engine/node/install-deps.js +150 -0
- package/dist/engine/node/install-deps.js.map +1 -0
- package/dist/engine/node/ipc-protocol.d.ts +67 -0
- package/dist/engine/node/ipc-protocol.d.ts.map +1 -0
- package/dist/engine/node/ipc-protocol.js +83 -0
- package/dist/engine/node/ipc-protocol.js.map +1 -0
- package/dist/engine/node/lifecycle.d.ts +103 -0
- package/dist/engine/node/lifecycle.d.ts.map +1 -0
- package/dist/engine/node/lifecycle.js +259 -0
- package/dist/engine/node/lifecycle.js.map +1 -0
- package/dist/engine/node/logger.d.ts +82 -0
- package/dist/engine/node/logger.d.ts.map +1 -0
- package/dist/engine/node/logger.js +241 -0
- package/dist/engine/node/logger.js.map +1 -0
- package/dist/engine/node/memory-watchdog.d.ts +78 -0
- package/dist/engine/node/memory-watchdog.d.ts.map +1 -0
- package/dist/engine/node/memory-watchdog.js +224 -0
- package/dist/engine/node/memory-watchdog.js.map +1 -0
- package/dist/engine/node/node-api.d.ts +391 -0
- package/dist/engine/node/node-api.d.ts.map +1 -0
- package/dist/engine/node/node-api.js +123 -0
- package/dist/engine/node/node-api.js.map +1 -0
- package/dist/engine/node/node-config.d.ts +128 -0
- package/dist/engine/node/node-config.d.ts.map +1 -0
- package/dist/engine/node/node-config.js +237 -0
- package/dist/engine/node/node-config.js.map +1 -0
- package/dist/engine/node/node-dashboard-source.d.ts +56 -0
- package/dist/engine/node/node-dashboard-source.d.ts.map +1 -0
- package/dist/engine/node/node-dashboard-source.js +213 -0
- package/dist/engine/node/node-dashboard-source.js.map +1 -0
- package/dist/engine/node/node-engine.d.ts +229 -0
- package/dist/engine/node/node-engine.d.ts.map +1 -0
- package/dist/engine/node/node-engine.js +723 -0
- package/dist/engine/node/node-engine.js.map +1 -0
- package/dist/engine/node/node-errors.d.ts +54 -0
- package/dist/engine/node/node-errors.d.ts.map +1 -0
- package/dist/engine/node/node-errors.js +71 -0
- package/dist/engine/node/node-errors.js.map +1 -0
- package/dist/engine/node/node-events.d.ts +132 -0
- package/dist/engine/node/node-events.d.ts.map +1 -0
- package/dist/engine/node/node-events.js +2 -0
- package/dist/engine/node/node-events.js.map +1 -0
- package/dist/engine/node/node-vitals.d.ts +123 -0
- package/dist/engine/node/node-vitals.d.ts.map +1 -0
- package/dist/engine/node/node-vitals.js +266 -0
- package/dist/engine/node/node-vitals.js.map +1 -0
- package/dist/engine/node/paths.d.ts +39 -0
- package/dist/engine/node/paths.d.ts.map +1 -0
- package/dist/engine/node/paths.js +60 -0
- package/dist/engine/node/paths.js.map +1 -0
- package/dist/engine/node/pg-dump.d.ts +126 -0
- package/dist/engine/node/pg-dump.d.ts.map +1 -0
- package/dist/engine/node/pg-dump.js +223 -0
- package/dist/engine/node/pg-dump.js.map +1 -0
- package/dist/engine/node/pidfile.d.ts +38 -0
- package/dist/engine/node/pidfile.d.ts.map +1 -0
- package/dist/engine/node/pidfile.js +156 -0
- package/dist/engine/node/pidfile.js.map +1 -0
- package/dist/engine/node/runtime-tuning.d.ts +65 -0
- package/dist/engine/node/runtime-tuning.d.ts.map +1 -0
- package/dist/engine/node/runtime-tuning.js +198 -0
- package/dist/engine/node/runtime-tuning.js.map +1 -0
- package/dist/engine/node/service.d.ts +39 -0
- package/dist/engine/node/service.d.ts.map +1 -0
- package/dist/engine/node/service.js +211 -0
- package/dist/engine/node/service.js.map +1 -0
- package/dist/engine/node/start.d.ts +62 -0
- package/dist/engine/node/start.d.ts.map +1 -0
- package/dist/engine/node/start.js +245 -0
- package/dist/engine/node/start.js.map +1 -0
- package/dist/engine/node/worker-env-table.d.ts +15 -0
- package/dist/engine/node/worker-env-table.d.ts.map +1 -0
- package/dist/engine/node/worker-env-table.js +97 -0
- package/dist/engine/node/worker-env-table.js.map +1 -0
- package/dist/engine/node/worker-env.d.ts +50 -0
- package/dist/engine/node/worker-env.d.ts.map +1 -0
- package/dist/engine/node/worker-env.js +101 -0
- package/dist/engine/node/worker-env.js.map +1 -0
- package/dist/engine/output.d.ts +97 -0
- package/dist/engine/output.d.ts.map +1 -0
- package/dist/engine/output.js +274 -0
- package/dist/engine/output.js.map +1 -0
- package/dist/engine/package-info.d.ts +7 -0
- package/dist/engine/package-info.d.ts.map +1 -0
- package/dist/engine/package-info.js +38 -0
- package/dist/engine/package-info.js.map +1 -0
- package/dist/engine/program.d.ts +50 -0
- package/dist/engine/program.d.ts.map +1 -0
- package/dist/engine/program.js +197 -0
- package/dist/engine/program.js.map +1 -0
- package/dist/engine/prompt.d.ts +69 -0
- package/dist/engine/prompt.d.ts.map +1 -0
- package/dist/engine/prompt.js +205 -0
- package/dist/engine/prompt.js.map +1 -0
- package/dist/engine/registries.d.ts +5 -0
- package/dist/engine/registries.d.ts.map +1 -0
- package/dist/engine/registries.js +52 -0
- package/dist/engine/registries.js.map +1 -0
- package/dist/engine/request-body.d.ts +31 -0
- package/dist/engine/request-body.d.ts.map +1 -0
- package/dist/engine/request-body.js +156 -0
- package/dist/engine/request-body.js.map +1 -0
- package/dist/engine/test-support.d.ts +50 -0
- package/dist/engine/test-support.d.ts.map +1 -0
- package/dist/engine/test-support.js +86 -0
- package/dist/engine/test-support.js.map +1 -0
- package/dist/engine/tui/app.d.ts +3 -0
- package/dist/engine/tui/app.d.ts.map +1 -0
- package/dist/engine/tui/app.js +100 -0
- package/dist/engine/tui/app.js.map +1 -0
- package/dist/engine/tui/builtin-screens.d.ts +6 -0
- package/dist/engine/tui/builtin-screens.d.ts.map +1 -0
- package/dist/engine/tui/builtin-screens.js +54 -0
- package/dist/engine/tui/builtin-screens.js.map +1 -0
- package/dist/engine/tui/index.d.ts +23 -0
- package/dist/engine/tui/index.d.ts.map +1 -0
- package/dist/engine/tui/index.js +71 -0
- package/dist/engine/tui/index.js.map +1 -0
- package/dist/engine/tui/layout.d.ts +132 -0
- package/dist/engine/tui/layout.d.ts.map +1 -0
- package/dist/engine/tui/layout.js +200 -0
- package/dist/engine/tui/layout.js.map +1 -0
- package/dist/engine/tui/routes.d.ts +5 -0
- package/dist/engine/tui/routes.d.ts.map +1 -0
- package/dist/engine/tui/routes.js +16 -0
- package/dist/engine/tui/routes.js.map +1 -0
- package/dist/engine/tui/screen-registry.d.ts +100 -0
- package/dist/engine/tui/screen-registry.d.ts.map +1 -0
- package/dist/engine/tui/screen-registry.js +96 -0
- package/dist/engine/tui/screen-registry.js.map +1 -0
- package/dist/engine/tui/screen-sections.d.ts +9 -0
- package/dist/engine/tui/screen-sections.d.ts.map +1 -0
- package/dist/engine/tui/screen-sections.js +45 -0
- package/dist/engine/tui/screen-sections.js.map +1 -0
- package/dist/engine/tui/screens/deploy/advanced-model.d.ts +69 -0
- package/dist/engine/tui/screens/deploy/advanced-model.d.ts.map +1 -0
- package/dist/engine/tui/screens/deploy/advanced-model.js +228 -0
- package/dist/engine/tui/screens/deploy/advanced-model.js.map +1 -0
- package/dist/engine/tui/screens/deploy/doctor-model.d.ts +37 -0
- package/dist/engine/tui/screens/deploy/doctor-model.d.ts.map +1 -0
- package/dist/engine/tui/screens/deploy/doctor-model.js +89 -0
- package/dist/engine/tui/screens/deploy/doctor-model.js.map +1 -0
- package/dist/engine/tui/screens/deploy/doctor.d.ts +8 -0
- package/dist/engine/tui/screens/deploy/doctor.d.ts.map +1 -0
- package/dist/engine/tui/screens/deploy/doctor.js +153 -0
- package/dist/engine/tui/screens/deploy/doctor.js.map +1 -0
- package/dist/engine/tui/screens/deploy/fields.d.ts +123 -0
- package/dist/engine/tui/screens/deploy/fields.d.ts.map +1 -0
- package/dist/engine/tui/screens/deploy/fields.js +202 -0
- package/dist/engine/tui/screens/deploy/fields.js.map +1 -0
- package/dist/engine/tui/screens/deploy/flags-model.d.ts +67 -0
- package/dist/engine/tui/screens/deploy/flags-model.d.ts.map +1 -0
- package/dist/engine/tui/screens/deploy/flags-model.js +302 -0
- package/dist/engine/tui/screens/deploy/flags-model.js.map +1 -0
- package/dist/engine/tui/screens/deploy/index.d.ts +6 -0
- package/dist/engine/tui/screens/deploy/index.d.ts.map +1 -0
- package/dist/engine/tui/screens/deploy/index.js +83 -0
- package/dist/engine/tui/screens/deploy/index.js.map +1 -0
- package/dist/engine/tui/screens/deploy/install-model.d.ts +159 -0
- package/dist/engine/tui/screens/deploy/install-model.d.ts.map +1 -0
- package/dist/engine/tui/screens/deploy/install-model.js +319 -0
- package/dist/engine/tui/screens/deploy/install-model.js.map +1 -0
- package/dist/engine/tui/screens/deploy/install.d.ts +8 -0
- package/dist/engine/tui/screens/deploy/install.d.ts.map +1 -0
- package/dist/engine/tui/screens/deploy/install.js +361 -0
- package/dist/engine/tui/screens/deploy/install.js.map +1 -0
- package/dist/engine/tui/screens/deploy/model.d.ts +49 -0
- package/dist/engine/tui/screens/deploy/model.d.ts.map +1 -0
- package/dist/engine/tui/screens/deploy/model.js +59 -0
- package/dist/engine/tui/screens/deploy/model.js.map +1 -0
- package/dist/engine/tui/screens/deploy/run-model.d.ts +58 -0
- package/dist/engine/tui/screens/deploy/run-model.d.ts.map +1 -0
- package/dist/engine/tui/screens/deploy/run-model.js +117 -0
- package/dist/engine/tui/screens/deploy/run-model.js.map +1 -0
- package/dist/engine/tui/screens/deploy/run.d.ts +75 -0
- package/dist/engine/tui/screens/deploy/run.d.ts.map +1 -0
- package/dist/engine/tui/screens/deploy/run.js +201 -0
- package/dist/engine/tui/screens/deploy/run.js.map +1 -0
- package/dist/engine/tui/screens/deploy/status.d.ts +17 -0
- package/dist/engine/tui/screens/deploy/status.d.ts.map +1 -0
- package/dist/engine/tui/screens/deploy/status.js +107 -0
- package/dist/engine/tui/screens/deploy/status.js.map +1 -0
- package/dist/engine/tui/screens/deploy/update.d.ts +41 -0
- package/dist/engine/tui/screens/deploy/update.d.ts.map +1 -0
- package/dist/engine/tui/screens/deploy/update.js +175 -0
- package/dist/engine/tui/screens/deploy/update.js.map +1 -0
- package/dist/engine/tui/screens/deploy.d.ts +12 -0
- package/dist/engine/tui/screens/deploy.d.ts.map +1 -0
- package/dist/engine/tui/screens/deploy.js +23 -0
- package/dist/engine/tui/screens/deploy.js.map +1 -0
- package/dist/engine/tui/screens/invoke.d.ts +6 -0
- package/dist/engine/tui/screens/invoke.d.ts.map +1 -0
- package/dist/engine/tui/screens/invoke.js +193 -0
- package/dist/engine/tui/screens/invoke.js.map +1 -0
- package/dist/engine/tui/screens/login.d.ts +6 -0
- package/dist/engine/tui/screens/login.d.ts.map +1 -0
- package/dist/engine/tui/screens/login.js +255 -0
- package/dist/engine/tui/screens/login.js.map +1 -0
- package/dist/engine/tui/screens/logout.d.ts +6 -0
- package/dist/engine/tui/screens/logout.d.ts.map +1 -0
- package/dist/engine/tui/screens/logout.js +142 -0
- package/dist/engine/tui/screens/logout.js.map +1 -0
- package/dist/engine/tui/screens/menu.d.ts +22 -0
- package/dist/engine/tui/screens/menu.d.ts.map +1 -0
- package/dist/engine/tui/screens/menu.js +84 -0
- package/dist/engine/tui/screens/menu.js.map +1 -0
- package/dist/engine/tui/screens/node.d.ts +6 -0
- package/dist/engine/tui/screens/node.d.ts.map +1 -0
- package/dist/engine/tui/screens/node.js +228 -0
- package/dist/engine/tui/screens/node.js.map +1 -0
- package/dist/engine/tui/screens/status.d.ts +6 -0
- package/dist/engine/tui/screens/status.d.ts.map +1 -0
- package/dist/engine/tui/screens/status.js +134 -0
- package/dist/engine/tui/screens/status.js.map +1 -0
- package/dist/engine/tui/scroll-box.d.ts +27 -0
- package/dist/engine/tui/scroll-box.d.ts.map +1 -0
- package/dist/engine/tui/scroll-box.js +52 -0
- package/dist/engine/tui/scroll-box.js.map +1 -0
- package/dist/engine/tui/section-registry.d.ts +65 -0
- package/dist/engine/tui/section-registry.d.ts.map +1 -0
- package/dist/engine/tui/section-registry.js +90 -0
- package/dist/engine/tui/section-registry.js.map +1 -0
- package/dist/engine/tui/terminal.d.ts +31 -0
- package/dist/engine/tui/terminal.d.ts.map +1 -0
- package/dist/engine/tui/terminal.js +142 -0
- package/dist/engine/tui/terminal.js.map +1 -0
- package/dist/engine/tui/tty.d.ts +49 -0
- package/dist/engine/tui/tty.d.ts.map +1 -0
- package/dist/engine/tui/tty.js +139 -0
- package/dist/engine/tui/tty.js.map +1 -0
- package/dist/index.d.ts +4 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/node/index.d.ts +3 -0
- package/dist/node/index.d.ts.map +1 -0
- package/dist/node/index.js +5 -0
- package/dist/node/index.js.map +1 -0
- package/dist/telemetry/index.d.ts +2 -1
- package/dist/telemetry/index.d.ts.map +1 -1
- package/dist/telemetry/index.js +1 -0
- package/dist/telemetry/index.js.map +1 -1
- package/dist/telemetry/node-span-relay.d.ts +1 -1
- package/dist/telemetry/node-span-relay.d.ts.map +1 -1
- package/dist/telemetry/node-span-relay.js +39 -6
- package/dist/telemetry/node-span-relay.js.map +1 -1
- package/dist/telemetry/node-span.d.ts +39 -7
- package/dist/telemetry/node-span.d.ts.map +1 -1
- package/dist/telemetry/node-span.js +19 -1
- package/dist/telemetry/node-span.js.map +1 -1
- package/dist/testing/index.d.ts +3 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +4 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/tui/index.d.ts +3 -0
- package/dist/tui/index.d.ts.map +1 -0
- package/dist/tui/index.js +5 -0
- package/dist/tui/index.js.map +1 -0
- package/package.json +43 -5
|
@@ -0,0 +1,561 @@
|
|
|
1
|
+
import { cliName } from './identity.js';
|
|
2
|
+
// =============================================================================
|
|
3
|
+
// CLI error model and exit codes (issue #140, epic #110)
|
|
4
|
+
// =============================================================================
|
|
5
|
+
//
|
|
6
|
+
// Two things have to come out of a failed request, and they are not the same
|
|
7
|
+
// thing:
|
|
8
|
+
//
|
|
9
|
+
// - A MESSAGE a person can act on. `403 Forbidden` tells you nothing; the
|
|
10
|
+
// server already computed the useful sentence ("Missing permission
|
|
11
|
+
// users:read") and put it in the body, so throwing it away and printing
|
|
12
|
+
// the status text is the single most common way a CLI becomes useless.
|
|
13
|
+
//
|
|
14
|
+
// - An EXIT CODE a script can branch on. `set -e` and every CI runner on
|
|
15
|
+
// earth look at nothing else. A CLI that prints a red error and exits 0
|
|
16
|
+
// turns a broken deploy into a green pipeline, and nobody finds out until
|
|
17
|
+
// much later.
|
|
18
|
+
//
|
|
19
|
+
// The distinction this file is built around is REACHED THE SERVER vs DID NOT.
|
|
20
|
+
// "The server said no" (ApiError) and "I could not reach the server"
|
|
21
|
+
// (NetworkError) need different words and different exit codes: the first
|
|
22
|
+
// means fix your request or your permissions, the second means fix your URL,
|
|
23
|
+
// your VPN, or the fact that the API is down. Collapsing them into one
|
|
24
|
+
// "request failed" is what sends people debugging their credentials when the
|
|
25
|
+
// real problem is a typo'd hostname.
|
|
26
|
+
// =============================================================================
|
|
27
|
+
/**
|
|
28
|
+
* Process exit codes.
|
|
29
|
+
*
|
|
30
|
+
* Small integers, deliberately: values 126, 127 and 128+n are claimed by the
|
|
31
|
+
* shell (not executable / not found / killed by signal n), so a CLI that picks
|
|
32
|
+
* its own codes up there produces output a script cannot tell apart from the
|
|
33
|
+
* shell's own failures. Everything here stays well below that.
|
|
34
|
+
*
|
|
35
|
+
* These are a PUBLIC CONTRACT the moment someone writes `if [ $? -eq 4 ]`.
|
|
36
|
+
* Add new codes; do not renumber existing ones.
|
|
37
|
+
*
|
|
38
|
+
* @stability stable
|
|
39
|
+
*/
|
|
40
|
+
export const EXIT = {
|
|
41
|
+
/** Success. */
|
|
42
|
+
OK: 0,
|
|
43
|
+
/** Anything unclassified — a bug in this CLI, most likely. */
|
|
44
|
+
FAILURE: 1,
|
|
45
|
+
/** The invocation itself was wrong: unknown command, missing argument. */
|
|
46
|
+
USAGE: 2,
|
|
47
|
+
/** The server was reached and answered with a non-2xx status. */
|
|
48
|
+
API: 3,
|
|
49
|
+
/** The server was never reached: DNS, refused, TLS, timeout. */
|
|
50
|
+
NETWORK: 4,
|
|
51
|
+
/**
|
|
52
|
+
* 401 specifically — no credential, or one that expired or was revoked.
|
|
53
|
+
*
|
|
54
|
+
* Split out from API because it is the one failure with a known remedy that
|
|
55
|
+
* a script can automate: re-run `login`. 403 deliberately stays API — a
|
|
56
|
+
* permission the account does not have is not fixed by logging in again,
|
|
57
|
+
* and telling someone to re-authenticate when their role is the problem
|
|
58
|
+
* sends them round a loop.
|
|
59
|
+
*/
|
|
60
|
+
AUTH: 5,
|
|
61
|
+
/**
|
|
62
|
+
* A prerequisite is not met, so nothing was attempted (#178, epic #168).
|
|
63
|
+
*
|
|
64
|
+
* SPLIT OUT FROM FAILURE because it is the one a script can act on:
|
|
65
|
+
* `appctl deploy doctor || provision-the-box` is the intended shape, and
|
|
66
|
+
* "this server is not ready" has to be distinguishable from "appctl itself
|
|
67
|
+
* broke". Additive, like every code above it - never renumber.
|
|
68
|
+
*/
|
|
69
|
+
PRECONDITION: 6,
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* Base for every error this CLI raises on purpose.
|
|
73
|
+
*
|
|
74
|
+
* The `exitCode` lives on the error rather than in a switch at the top level
|
|
75
|
+
* so that a new error type cannot be added without deciding what it does to
|
|
76
|
+
* the process — the compiler asks the question.
|
|
77
|
+
*
|
|
78
|
+
* @stability stable
|
|
79
|
+
*/
|
|
80
|
+
export class CliError extends Error {
|
|
81
|
+
constructor(message, options) {
|
|
82
|
+
// `cause` is passed through so a future `--verbose` can unwind the real
|
|
83
|
+
// underlying error. It must never be printed by default: an undici cause
|
|
84
|
+
// can carry the full request, headers included, and this CLI's requests
|
|
85
|
+
// carry a bearer token.
|
|
86
|
+
super(message, options);
|
|
87
|
+
// `new.target` is the SUBCLASS being constructed, so every error reports
|
|
88
|
+
// its own name without each one repeating `this.name = 'ApiError'`. The
|
|
89
|
+
// built-in default would say `Error` for all of them, which turns an
|
|
90
|
+
// `err.name` check in a caller into a silent no-op.
|
|
91
|
+
this.name = new.target.name;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* The invocation was malformed. Exists so #144 can reject a bad method/path.
|
|
96
|
+
*
|
|
97
|
+
* @stability stable
|
|
98
|
+
*/
|
|
99
|
+
export class UsageError extends CliError {
|
|
100
|
+
/** `EXIT.USAGE`. */
|
|
101
|
+
exitCode = EXIT.USAGE;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* There is no credential to use, so the request was never attempted (#143).
|
|
105
|
+
*
|
|
106
|
+
* EXIT.AUTH, the same code a 401 produces, ON PURPOSE: from a script's point
|
|
107
|
+
* of view "the stored token was revoked" and "there was never a stored token"
|
|
108
|
+
* have the identical remedy — run `login` — and a script that branches on the
|
|
109
|
+
* exit code should not have to know which of the two happened. What must
|
|
110
|
+
* differ is the MESSAGE, and that is the whole reason this class exists: the
|
|
111
|
+
* naive implementation sends `Authorization: Bearer undefined`, gets a 401,
|
|
112
|
+
* and tells the user their credentials were rejected. They were not; there
|
|
113
|
+
* were none. That misdirection sends people to revoke and re-issue tokens
|
|
114
|
+
* that were never the problem.
|
|
115
|
+
*
|
|
116
|
+
* @stability experimental
|
|
117
|
+
*/
|
|
118
|
+
export class AuthRequiredError extends CliError {
|
|
119
|
+
/** `EXIT.AUTH`. */
|
|
120
|
+
exitCode = EXIT.AUTH;
|
|
121
|
+
constructor(message = `Not logged in. Run \`${cliName()} login\` first.`) {
|
|
122
|
+
super(message);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* A required prerequisite failed, so the command did not proceed (#178).
|
|
127
|
+
*
|
|
128
|
+
* The message names what failed; the remedy belongs to the check that
|
|
129
|
+
* produced it and is rendered beside it, not folded in here.
|
|
130
|
+
*
|
|
131
|
+
* @stability experimental
|
|
132
|
+
*/
|
|
133
|
+
export class PreconditionError extends CliError {
|
|
134
|
+
/** `EXIT.PRECONDITION`. */
|
|
135
|
+
exitCode = EXIT.PRECONDITION;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* The config file exists but cannot be used (#143).
|
|
139
|
+
*
|
|
140
|
+
* NOT EXIT.AUTH: "your config is corrupt" is not fixed by logging in against
|
|
141
|
+
* whatever server the corrupt file names, and a script retrying `login` on
|
|
142
|
+
* an AUTH code would loop. FAILURE is honest — something is wrong that the
|
|
143
|
+
* CLI cannot resolve on its own — and the message always names the path so
|
|
144
|
+
* the fix (delete it, or fix the JSON) needs no further investigation.
|
|
145
|
+
*
|
|
146
|
+
* @stability experimental
|
|
147
|
+
*/
|
|
148
|
+
export class ConfigError extends CliError {
|
|
149
|
+
/** `EXIT.FAILURE`. */
|
|
150
|
+
exitCode = EXIT.FAILURE;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* The server responded, and the response was not a success.
|
|
154
|
+
*
|
|
155
|
+
* `message` is built as `<status>: <server message>` so that the default
|
|
156
|
+
* `console.error(err.message)` at the top level is already the useful line.
|
|
157
|
+
*
|
|
158
|
+
* @stability experimental
|
|
159
|
+
*/
|
|
160
|
+
export class ApiError extends CliError {
|
|
161
|
+
status;
|
|
162
|
+
serverMessage;
|
|
163
|
+
code;
|
|
164
|
+
details;
|
|
165
|
+
method;
|
|
166
|
+
url;
|
|
167
|
+
structured;
|
|
168
|
+
rawBody;
|
|
169
|
+
constructor(fields) {
|
|
170
|
+
super(`${fields.status}: ${fields.serverMessage}`);
|
|
171
|
+
this.status = fields.status;
|
|
172
|
+
this.serverMessage = fields.serverMessage;
|
|
173
|
+
this.code = fields.code;
|
|
174
|
+
this.details = fields.details;
|
|
175
|
+
this.method = fields.method;
|
|
176
|
+
this.url = fields.url;
|
|
177
|
+
this.structured = fields.structured;
|
|
178
|
+
this.rawBody = fields.rawBody;
|
|
179
|
+
}
|
|
180
|
+
/** `EXIT.AUTH` for a 401, `EXIT.API` otherwise. */
|
|
181
|
+
get exitCode() {
|
|
182
|
+
return this.status === 401 ? EXIT.AUTH : EXIT.API;
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Build an ApiError from a raw response body.
|
|
186
|
+
*
|
|
187
|
+
* TAKES THE BODY AS TEXT, NOT AS A RESPONSE TO `.json()`. That is the whole
|
|
188
|
+
* defence against the failure this issue calls out: calling `response.json()`
|
|
189
|
+
* on an nginx 502 page throws `SyntaxError: Unexpected token '<'`, which
|
|
190
|
+
* escapes as a completely unrelated error and buries the fact that the
|
|
191
|
+
* gateway is down. The caller reads `.text()` (which cannot throw on
|
|
192
|
+
* content) and hands the string here, so a non-JSON body is a case we handle
|
|
193
|
+
* rather than an exception we suffer.
|
|
194
|
+
*/
|
|
195
|
+
static fromBody(args) {
|
|
196
|
+
const extracted = extractServerMessage(args.rawBody, args.status, args.statusText);
|
|
197
|
+
return new ApiError({
|
|
198
|
+
status: args.status,
|
|
199
|
+
serverMessage: extracted.message,
|
|
200
|
+
code: extracted.code,
|
|
201
|
+
details: extracted.details,
|
|
202
|
+
method: args.method,
|
|
203
|
+
url: args.url,
|
|
204
|
+
structured: extracted.structured,
|
|
205
|
+
rawBody: args.rawBody,
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* The request never produced a response.
|
|
211
|
+
*
|
|
212
|
+
* Carries no status, because there is none — that absence is the point, and it
|
|
213
|
+
* is why this is a separate class rather than an ApiError with `status: 0`. A
|
|
214
|
+
* `status: 0` sentinel invites `if (err.status >= 500)` to quietly do the
|
|
215
|
+
* wrong thing.
|
|
216
|
+
*
|
|
217
|
+
* @stability experimental
|
|
218
|
+
*/
|
|
219
|
+
export class NetworkError extends CliError {
|
|
220
|
+
/** `EXIT.NETWORK`. */
|
|
221
|
+
exitCode = EXIT.NETWORK;
|
|
222
|
+
/** How the connection failed. */
|
|
223
|
+
kind;
|
|
224
|
+
/** The request method. */
|
|
225
|
+
method;
|
|
226
|
+
/** The request URL. Never contains the token. */
|
|
227
|
+
url;
|
|
228
|
+
constructor(fields) {
|
|
229
|
+
super(fields.message, fields.cause === undefined ? undefined : { cause: fields.cause });
|
|
230
|
+
this.kind = fields.kind;
|
|
231
|
+
this.method = fields.method;
|
|
232
|
+
this.url = fields.url;
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* Classify whatever `fetch` threw.
|
|
236
|
+
*
|
|
237
|
+
* Node's `fetch` rejects with a flat `TypeError: fetch failed` for every
|
|
238
|
+
* transport problem — DNS, refused, TLS, reset are all the same two words —
|
|
239
|
+
* and puts the real diagnosis in `.cause.code`. Printing the TypeError alone
|
|
240
|
+
* gives the user nothing; reading the cause turns it into "no such host" vs
|
|
241
|
+
* "connection refused", which are different problems with different fixes.
|
|
242
|
+
*/
|
|
243
|
+
static fromCause(args) {
|
|
244
|
+
const { cause, method, url } = args;
|
|
245
|
+
const origin = safeOrigin(url);
|
|
246
|
+
if (isAbortLike(cause)) {
|
|
247
|
+
// A timeout and a Ctrl-C look identical at this level (both surface as
|
|
248
|
+
// an AbortError), so the caller tells us which signal fired. Reporting a
|
|
249
|
+
// deliberate cancellation as "the server timed out" would send someone
|
|
250
|
+
// looking for a server problem that does not exist.
|
|
251
|
+
return args.callerAborted
|
|
252
|
+
? new NetworkError({ kind: 'aborted', method, url, message: 'Request cancelled.', cause })
|
|
253
|
+
: new NetworkError({
|
|
254
|
+
kind: 'timeout',
|
|
255
|
+
method,
|
|
256
|
+
url,
|
|
257
|
+
message: `Timed out after ${args.timeoutMs}ms waiting for ${origin}. The server may be slow, unreachable, or behind a proxy that is not responding.`,
|
|
258
|
+
cause,
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
const code = errorCode(cause);
|
|
262
|
+
switch (code) {
|
|
263
|
+
case 'ENOTFOUND':
|
|
264
|
+
case 'EAI_AGAIN':
|
|
265
|
+
return new NetworkError({
|
|
266
|
+
kind: 'dns',
|
|
267
|
+
method,
|
|
268
|
+
url,
|
|
269
|
+
message: `Could not resolve ${origin}. Check the server URL${code === 'EAI_AGAIN' ? ' and your DNS/network connection' : ''}.`,
|
|
270
|
+
cause,
|
|
271
|
+
});
|
|
272
|
+
case 'ECONNREFUSED':
|
|
273
|
+
return new NetworkError({
|
|
274
|
+
kind: 'refused',
|
|
275
|
+
method,
|
|
276
|
+
url,
|
|
277
|
+
message: `Connection refused by ${origin}. Nothing is listening on that host and port — is the server running?`,
|
|
278
|
+
cause,
|
|
279
|
+
});
|
|
280
|
+
case 'ECONNRESET':
|
|
281
|
+
case 'EPIPE':
|
|
282
|
+
return new NetworkError({
|
|
283
|
+
kind: 'reset',
|
|
284
|
+
method,
|
|
285
|
+
url,
|
|
286
|
+
message: `Connection to ${origin} was reset before a response arrived.`,
|
|
287
|
+
cause,
|
|
288
|
+
});
|
|
289
|
+
case 'ETIMEDOUT':
|
|
290
|
+
return new NetworkError({
|
|
291
|
+
kind: 'timeout',
|
|
292
|
+
method,
|
|
293
|
+
url,
|
|
294
|
+
message: `Connection to ${origin} timed out.`,
|
|
295
|
+
cause,
|
|
296
|
+
});
|
|
297
|
+
default:
|
|
298
|
+
break;
|
|
299
|
+
}
|
|
300
|
+
// TLS failures are their own family and their own fix (a self-signed cert
|
|
301
|
+
// on a dev box, a clock that is wrong, a missing CA). undici surfaces them
|
|
302
|
+
// with codes that vary by OpenSSL version, so match the family by prefix
|
|
303
|
+
// rather than enumerating values that will be wrong on the next release.
|
|
304
|
+
if (code && (code.startsWith('ERR_TLS') || code.startsWith('UNABLE_TO_') || code.startsWith('DEPTH_ZERO') || code.startsWith('SELF_SIGNED') || code.startsWith('CERT_'))) {
|
|
305
|
+
return new NetworkError({
|
|
306
|
+
kind: 'tls',
|
|
307
|
+
method,
|
|
308
|
+
url,
|
|
309
|
+
message: `TLS handshake with ${origin} failed (${code}). If this is a development server with a self-signed certificate, use http:// or install its CA.`,
|
|
310
|
+
cause,
|
|
311
|
+
});
|
|
312
|
+
}
|
|
313
|
+
// No recognisable code. This is not a dead end — Node's own message is
|
|
314
|
+
// often the whole diagnosis ("bad port" for a port on the blocked list,
|
|
315
|
+
// for instance, which has no code at all), and a bare "could not reach"
|
|
316
|
+
// would throw away the only sentence that explains why.
|
|
317
|
+
const detail = code ?? causeSummary(cause);
|
|
318
|
+
return new NetworkError({
|
|
319
|
+
kind: 'unknown',
|
|
320
|
+
method,
|
|
321
|
+
url,
|
|
322
|
+
message: `Could not reach ${origin}${detail ? ` (${detail})` : ''}.`,
|
|
323
|
+
cause,
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
/**
|
|
328
|
+
* Map any thrown value to an exit code.
|
|
329
|
+
*
|
|
330
|
+
* The `unknown` parameter is honest rather than defensive: JavaScript lets any
|
|
331
|
+
* value be thrown, and the top-level handler runs after user-supplied config,
|
|
332
|
+
* JSON parsing and third-party code have all had a turn.
|
|
333
|
+
*
|
|
334
|
+
* @stability stable
|
|
335
|
+
*/
|
|
336
|
+
export function exitCodeFor(error) {
|
|
337
|
+
if (error instanceof CliError)
|
|
338
|
+
return error.exitCode;
|
|
339
|
+
return EXIT.FAILURE;
|
|
340
|
+
}
|
|
341
|
+
/**
|
|
342
|
+
* The one line printed to stderr when a command fails.
|
|
343
|
+
*
|
|
344
|
+
* Prefixed with the binary name because this output usually arrives in the
|
|
345
|
+
* middle of a CI log next to a dozen other tools' output, and an unattributed
|
|
346
|
+
* "403: ..." belongs to nobody.
|
|
347
|
+
*
|
|
348
|
+
* NO STACK TRACE. A stack is noise for the person who mistyped a URL, and the
|
|
349
|
+
* `cause` chain behind a fetch failure can contain request details. #144 can
|
|
350
|
+
* add a `--verbose` that opts into it.
|
|
351
|
+
*
|
|
352
|
+
* @stability stable
|
|
353
|
+
*/
|
|
354
|
+
export function formatError(error) {
|
|
355
|
+
if (error instanceof CliError)
|
|
356
|
+
return `${cliName()}: ${error.message}`;
|
|
357
|
+
if (error instanceof Error)
|
|
358
|
+
return `${cliName()}: ${error.message}`;
|
|
359
|
+
return `${cliName()}: ${String(error)}`;
|
|
360
|
+
}
|
|
361
|
+
/**
|
|
362
|
+
* How much of an unparseable body to show. Long enough for an nginx page to
|
|
363
|
+
* name itself ("502 Bad Gateway ... nginx/1.25"), short enough that a stray
|
|
364
|
+
* 40KB HTML error page does not scroll the real command's output off screen.
|
|
365
|
+
*/
|
|
366
|
+
const SNIPPET_LIMIT = 200;
|
|
367
|
+
/**
|
|
368
|
+
* Pull a usable sentence out of an error body, whatever shape it turns out to
|
|
369
|
+
* have.
|
|
370
|
+
*
|
|
371
|
+
* The happy path is the API's own envelope from
|
|
372
|
+
* `HttpExceptionFilter` in `@marinoscar/platform-api/core`:
|
|
373
|
+
*
|
|
374
|
+
* \{ statusCode, code, message, details?, timestamp, path \}
|
|
375
|
+
*
|
|
376
|
+
* with two documented wrinkles:
|
|
377
|
+
*
|
|
378
|
+
* - `details` is ABSENT IN PRODUCTION for unhandled errors (the filter only
|
|
379
|
+
* attaches a stack when NODE_ENV !== 'production'), so nothing here may
|
|
380
|
+
* depend on it being present.
|
|
381
|
+
*
|
|
382
|
+
* - `message` is NOT ALWAYS A STRING. The filter copies it straight out of
|
|
383
|
+
* the HttpException response, and a validation failure (ValidationPipe /
|
|
384
|
+
* nestjs-zod) puts an ARRAY of messages there. Rendering that with string
|
|
385
|
+
* concatenation yields `400: [object Object]`, which is the exact failure
|
|
386
|
+
* mode this issue exists to prevent.
|
|
387
|
+
*
|
|
388
|
+
* Everything else — an HTML proxy page, an empty body, a JSON array, a plain
|
|
389
|
+
* string — falls back to a snippet, never to a throw.
|
|
390
|
+
*/
|
|
391
|
+
export function extractServerMessage(rawBody, status, statusText) {
|
|
392
|
+
const trimmed = rawBody.trim();
|
|
393
|
+
const fallbackMessage = statusText.trim() || `HTTP ${status}`;
|
|
394
|
+
if (trimmed.length === 0) {
|
|
395
|
+
return {
|
|
396
|
+
message: `${fallbackMessage} (the server sent no response body).`,
|
|
397
|
+
code: undefined,
|
|
398
|
+
details: undefined,
|
|
399
|
+
structured: false,
|
|
400
|
+
};
|
|
401
|
+
}
|
|
402
|
+
let parsed;
|
|
403
|
+
try {
|
|
404
|
+
parsed = JSON.parse(trimmed);
|
|
405
|
+
}
|
|
406
|
+
catch {
|
|
407
|
+
// Not JSON at all. Overwhelmingly this is a reverse proxy or load balancer
|
|
408
|
+
// answering instead of the API, which means the useful information is the
|
|
409
|
+
// page's own text and NOT anything about our request.
|
|
410
|
+
return {
|
|
411
|
+
message: `${fallbackMessage} — the server did not return JSON: ${snippet(trimmed)}`,
|
|
412
|
+
code: undefined,
|
|
413
|
+
details: undefined,
|
|
414
|
+
structured: false,
|
|
415
|
+
};
|
|
416
|
+
}
|
|
417
|
+
// A JSON string body (`"Something went wrong"`) is rare but legal, and the
|
|
418
|
+
// string is exactly the message we want.
|
|
419
|
+
if (typeof parsed === 'string' && parsed.trim().length > 0) {
|
|
420
|
+
return { message: parsed.trim(), code: undefined, details: undefined, structured: false };
|
|
421
|
+
}
|
|
422
|
+
if (parsed === null || typeof parsed !== 'object' || Array.isArray(parsed)) {
|
|
423
|
+
return {
|
|
424
|
+
message: `${fallbackMessage} — unexpected error body: ${snippet(trimmed)}`,
|
|
425
|
+
code: undefined,
|
|
426
|
+
details: undefined,
|
|
427
|
+
structured: false,
|
|
428
|
+
};
|
|
429
|
+
}
|
|
430
|
+
const body = parsed;
|
|
431
|
+
const message = normaliseMessage(body.message);
|
|
432
|
+
const code = typeof body.code === 'string' ? body.code : undefined;
|
|
433
|
+
if (message === undefined) {
|
|
434
|
+
// JSON object, but not our envelope — some other service's error shape.
|
|
435
|
+
// Keep whatever `code` it had (it may still be meaningful) and show the
|
|
436
|
+
// body, because guessing at its message field would be worse than showing
|
|
437
|
+
// it verbatim.
|
|
438
|
+
return {
|
|
439
|
+
message: `${fallbackMessage} — unexpected error body: ${snippet(trimmed)}`,
|
|
440
|
+
code,
|
|
441
|
+
details: undefined,
|
|
442
|
+
structured: false,
|
|
443
|
+
};
|
|
444
|
+
}
|
|
445
|
+
return { message, code, details: body.details, structured: true };
|
|
446
|
+
}
|
|
447
|
+
/**
|
|
448
|
+
* Accept the two `message` shapes the API can actually produce, reject the
|
|
449
|
+
* rest. Arrays are joined with `; ` rather than newlines so the error stays a
|
|
450
|
+
* single grep-able line in a CI log.
|
|
451
|
+
*/
|
|
452
|
+
function normaliseMessage(value) {
|
|
453
|
+
if (typeof value === 'string') {
|
|
454
|
+
const trimmed = value.trim();
|
|
455
|
+
return trimmed.length > 0 ? trimmed : undefined;
|
|
456
|
+
}
|
|
457
|
+
if (Array.isArray(value)) {
|
|
458
|
+
const parts = value.filter((v) => typeof v === 'string' && v.trim().length > 0);
|
|
459
|
+
return parts.length > 0 ? parts.join('; ') : undefined;
|
|
460
|
+
}
|
|
461
|
+
return undefined;
|
|
462
|
+
}
|
|
463
|
+
/**
|
|
464
|
+
* Collapse a body into one short readable line.
|
|
465
|
+
*
|
|
466
|
+
* The tag strip is FOR DISPLAY ONLY and is not, and must never be relied on
|
|
467
|
+
* as, sanitisation — its whole job is that
|
|
468
|
+
* `<html><head><title>502 Bad Gateway</title></head>` reads as `502 Bad Gateway` in a terminal instead of
|
|
469
|
+
* as forty characters of markup before the first real word.
|
|
470
|
+
*/
|
|
471
|
+
function snippet(body) {
|
|
472
|
+
const looksLikeHtml = /^\s*<(?:!doctype|html|head|body)/i.test(body);
|
|
473
|
+
const stripped = looksLikeHtml ? body.replace(/<[^>]*>/g, ' ') : body;
|
|
474
|
+
const collapsed = stripped.replace(/\s+/g, ' ').trim();
|
|
475
|
+
if (collapsed.length === 0)
|
|
476
|
+
return '(unreadable body)';
|
|
477
|
+
return collapsed.length > SNIPPET_LIMIT
|
|
478
|
+
? `${collapsed.slice(0, SNIPPET_LIMIT)}…`
|
|
479
|
+
: collapsed;
|
|
480
|
+
}
|
|
481
|
+
// -----------------------------------------------------------------------------
|
|
482
|
+
// Cause inspection helpers
|
|
483
|
+
// -----------------------------------------------------------------------------
|
|
484
|
+
/**
|
|
485
|
+
* Walk the `cause` chain looking for a syscall/OpenSSL error code.
|
|
486
|
+
*
|
|
487
|
+
* The chain matters: undici wraps the socket error, so the `code` is one or
|
|
488
|
+
* two levels down from what `fetch` rejects with. The depth cap stops a
|
|
489
|
+
* self-referential cause chain (which a badly-behaved library can construct)
|
|
490
|
+
* from spinning here forever.
|
|
491
|
+
*/
|
|
492
|
+
function errorCode(error) {
|
|
493
|
+
let current = error;
|
|
494
|
+
for (let depth = 0; depth < 5 && current !== null && typeof current === 'object'; depth += 1) {
|
|
495
|
+
const code = current.code;
|
|
496
|
+
if (typeof code === 'string')
|
|
497
|
+
return code;
|
|
498
|
+
// A dual-stack host (plain `localhost` resolves to both ::1 and 127.0.0.1)
|
|
499
|
+
// makes undici try every address and reject with an AggregateError. Node
|
|
500
|
+
// normally copies the shared code onto the aggregate, but when the
|
|
501
|
+
// attempts failed for DIFFERENT reasons it cannot, and the codes only
|
|
502
|
+
// exist on the children — so descend into the first one rather than
|
|
503
|
+
// reporting "unknown" for the most ordinary failure there is.
|
|
504
|
+
const errors = current.errors;
|
|
505
|
+
if (Array.isArray(errors) && errors.length > 0) {
|
|
506
|
+
const nested = errorCode(errors[0]);
|
|
507
|
+
if (nested !== undefined)
|
|
508
|
+
return nested;
|
|
509
|
+
}
|
|
510
|
+
current = current.cause;
|
|
511
|
+
}
|
|
512
|
+
return undefined;
|
|
513
|
+
}
|
|
514
|
+
/**
|
|
515
|
+
* The first non-empty message in the cause chain, for the case where no code
|
|
516
|
+
* was found.
|
|
517
|
+
*
|
|
518
|
+
* Safe to show: these are Node/undici transport messages ("connect
|
|
519
|
+
* ECONNREFUSED 127.0.0.1:45999", "bad port"), which carry a host and port and
|
|
520
|
+
* nothing else. An AggregateError's own message is empty, hence the skip.
|
|
521
|
+
*/
|
|
522
|
+
function causeSummary(error) {
|
|
523
|
+
let current = error;
|
|
524
|
+
for (let depth = 0; depth < 5 && current !== null && typeof current === 'object'; depth += 1) {
|
|
525
|
+
const message = current.message;
|
|
526
|
+
if (typeof message === 'string') {
|
|
527
|
+
const trimmed = message.trim();
|
|
528
|
+
// 'fetch failed' is undici's placeholder for every transport error and
|
|
529
|
+
// says nothing; keep walking past it.
|
|
530
|
+
if (trimmed.length > 0 && trimmed !== 'fetch failed')
|
|
531
|
+
return trimmed;
|
|
532
|
+
}
|
|
533
|
+
current = current.cause;
|
|
534
|
+
}
|
|
535
|
+
return undefined;
|
|
536
|
+
}
|
|
537
|
+
function isAbortLike(error) {
|
|
538
|
+
if (error === null || typeof error !== 'object')
|
|
539
|
+
return false;
|
|
540
|
+
const name = error.name;
|
|
541
|
+
const code = error.code;
|
|
542
|
+
return name === 'AbortError' || name === 'TimeoutError' || code === 'ABORT_ERR';
|
|
543
|
+
}
|
|
544
|
+
/**
|
|
545
|
+
* `https://host:3535` from a full request URL, for error messages.
|
|
546
|
+
*
|
|
547
|
+
* Only the origin, deliberately: a URL can carry query parameters, and this
|
|
548
|
+
* CLI will eventually put things like a device code in them. An error message
|
|
549
|
+
* ends up in scrollback, in screenshots and in bug reports, so it gets the
|
|
550
|
+
* host and nothing else. Falls back to the raw string if the URL is so
|
|
551
|
+
* malformed it will not parse — which is itself worth showing the user.
|
|
552
|
+
*/
|
|
553
|
+
function safeOrigin(url) {
|
|
554
|
+
try {
|
|
555
|
+
return new URL(url).origin;
|
|
556
|
+
}
|
|
557
|
+
catch {
|
|
558
|
+
return url;
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/engine/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,gFAAgF;AAChF,0DAA0D;AAC1D,gFAAgF;AAChF,EAAE;AACF,6EAA6E;AAC7E,SAAS;AACT,EAAE;AACF,4EAA4E;AAC5E,uEAAuE;AACvE,4EAA4E;AAC5E,2EAA2E;AAC3E,EAAE;AACF,2EAA2E;AAC3E,4EAA4E;AAC5E,8EAA8E;AAC9E,kBAAkB;AAClB,EAAE;AACF,8EAA8E;AAC9E,qEAAqE;AACrE,0EAA0E;AAC1E,6EAA6E;AAC7E,uEAAuE;AACvE,6EAA6E;AAC7E,qCAAqC;AACrC,gFAAgF;AAEhF;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB,eAAe;IACf,EAAE,EAAE,CAAC;IACL,8DAA8D;IAC9D,OAAO,EAAE,CAAC;IACV,0EAA0E;IAC1E,KAAK,EAAE,CAAC;IACR,iEAAiE;IACj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