@marinoscar/platform-cli 0.1.0-next.3 → 0.1.0-next.5
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 +88 -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
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,93 @@
|
|
|
1
1
|
# @marinoscar/platform-cli
|
|
2
2
|
|
|
3
|
+
## 0.1.0-next.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 522ed14: Test-only change: the deploy-checks registry test (`gives every non-passing check a remedy, across the whole registry`) now allows 30 s instead of vitest's default 5 s, because `database-reachable` makes a real TCP connection with its own 5 s timeout that the check context cannot fake, and a loaded CI runner could hit the limit. No runtime change; the six packages move together (fixed group) and this version is also the first release through trusted publishing.
|
|
8
|
+
- @marinoscar/platform-contract@0.1.0-next.5
|
|
9
|
+
- @marinoscar/platform-infra@0.1.0-next.5
|
|
10
|
+
|
|
11
|
+
## 0.1.0-next.4
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- a9c2216: Add `@marinoscar/platform-cli/android` (#746): the merged `android` command group (`androidCommand`: doctor with a printed `--fix` plan and `--dry-run`, keystore, version, build, publish with `--trust`, release, releases), the optional `androidDeployStep` (opted in with `<PREFIX>DEPLOY_ANDROID=1`) and `androidTuiScreen`. The engine's `ApiClient` accepts a `formData` request body.
|
|
16
|
+
- 8bf9606: Move the CLI into `@marinoscar/platform-cli`: `createCli({ identity, version, extraCommands, tuiScreens, deploySteps, nodeExecutors, envSpecFragments })` builds an app's CLI (the `init`, `login`, `api`, `config`, `node` and `deploy` commands, the TUI, the deploy pipeline and the worker engine) with the identity as configuration; add the `/commands`, `/tui`, `/deploy`, `/node`, `/api-client` and `/testing` entry points, the `registerTuiScreen`, `registerDeployStep` and `registerNodeExecutor` registries, the credential-hygiene check and the `cli` conformance suite. platform-infra: point its README examples at the reference app now that the CLI lives in a package.
|
|
17
|
+
- 3080222: `deploy install` provisions a dedicated, least-privilege application database role instead of running the API as the operator's login (#980). Row-level security is skipped for a superuser or a `BYPASSRLS` role, so an API that connected as the administrator the operator typed served every organization's rows to every other. Install's `environment` step now calls `ensureApplicationRole` (`engine/deploy/app-role.ts`, the one implementation, shared with update): a privileged login is used once, in memory, to create `<app>_app` (`LOGIN NOSUPERUSER NOBYPASSRLS CREATEDB CREATEROLE`, `createrole_self_grant = 'inherit, set'`) with a generated 32-byte password sent as a SCRAM-SHA-256 verifier on `psql`'s stdin (new `runPsqlScript`; `runCommand` gains `input`), and only the role is written to `.env` (0600). An existing database is re-owned with `ALTER ... OWNER TO` in one transaction (never `REASSIGN OWNED BY`), after a backup recommendation and consent. New required check `database-role-ordinary` gates `validate-environment`, the `ensure-database` re-verify and `deploy doctor`. New flags on `install` and `update`: `--app-db-user`, `--admin-user` (password only from `<PREFIX>DB_ADMIN_PASSWORD` or the answers key `DB_ADMIN_PASSWORD`, never a flag), `--skip-role-provisioning`, `--allow-superuser` (recorded in the deploy state as `allowSuperuser` with the `allowSuperuserLogin` it applies to), `--rotate-app-password`, `--provision-app-role`, `--transfer-ownership`, `--allow-reduced-role`, `--show-credentials`; the answers keys `DB_ADMIN_USER`, `DB_ADMIN_PASSWORD` and `APP_DB_USER` are removed from the answers and never reach `.env`. `deploy update` gains a `database-role` step (added to `UPDATE_STEP_IDS` between `environment-drift` and `ensure-database`) that warns on a superuser `POSTGRES_USER` and, with consent, migrates the deployment onto a dedicated role and restarts the API. An existing role is never taken over: if it exists and the recorded credentials do not open it, install refuses unless `--rotate-app-password` (or an interactive yes naming the role); the password is set last, after `.env` holds it, and `.env` is put back if the server refuses it. Behaviour change: an install whose entered login is privileged and that gives no consent (a non-interactive run without `--provision-app-role`, `--skip-role-provisioning` or `--allow-superuser`) now stops instead of deploying as the superuser. `.env.example` and the environment variable set are unchanged.
|
|
18
|
+
- fa3f5b9: Open the CLI and infra seams an app needs without editing a package (PP-14.22, #940).
|
|
19
|
+
|
|
20
|
+
Proxy (a production bug): an app SSE route worked through the app's own nginx but was buffered and cut at 60 s by the shared VPS host proxy, which knew only the platform's three streaming paths. `createCli({ proxy: { streamPaths } })` and `registerProxyStreamPath(path | { path, timeoutSeconds })` make `renderVhost` add one unbuffered, long-lived location per path with the directives of the platform's SSE locations (`ProxyTarget` gains `streamPaths` and `extraLocations`). Paths are validated before they reach the shared nginx config (a leading `/`, letters, digits and `. _ ~ / : @ + , = -`; a newline, `;`, quote, brace, `$`, `#` or space throws). A vhost for an app that declares none is byte-identical.
|
|
21
|
+
|
|
22
|
+
CLI: `registerEnvGroup` (the three platform groups register through it; `ENV_GROUPS` stays as the built-in list and `EnvGroup` widens to `string`), `registerEnvGenerator` (`GenerateKind` widens to `string`; a generator is a function whose value is checked against a safe character set, never a command) and `annotateEnvKey` (the app wins for `fixed` and `help` on a platform key; a secret cannot be fixed); `registerDeployCheck` (`allChecks()` is the built-ins plus the app's; `ALL_CHECKS` is unchanged); `registerDeployStep` takes exactly one of `after`, `before` and `replaces` plus `skipWhen`, and `DeployStepContext` gains read-only `env` and `answers` that withhold secret keys; `registerEdgeConfigFile`; `registerTuiScreenSection` for the node and deploy screens; `registerCliConformanceSuite` and a `deployRegistrations` suite. `createCli` gains `envGroups`, `envGenerators`, `envAnnotations`, `deployChecks`, `edgeConfigFiles`, `tuiSections` and `proxy`.
|
|
23
|
+
|
|
24
|
+
Migration notes for `@marinoscar/platform-cli`: in `runPlatformConformance`, `cli: false` now throws; pass `cli: { skip: 'reason' }` (an empty reason also throws). `DeployStepRegistration.step` and `.after` are optional (a registration reading `.step` needs a check; the registrations the package builds keep `step` defined). A hand-built `DeployStepContext` in a test needs `env` and `answers`: use `testDeployStepContext` from `/testing`.
|
|
25
|
+
|
|
26
|
+
Infra: the default CSP is composed from `$csp_*_extra` maps that include `app.d/csp/*.conf` (sources for `connect-src`, `img-src`, `media-src`, `font-src`, `style-src`, and whole extra directives); with no file the header is byte-identical, there is no `script-src` hook, and the `/api/docs` policy is not extended. `sync` creates `app.d/csp/` and two inert example files. `composeFilesForMode('test')` and `app.test.*` overlays, `registerComposeMode`, and `runInfraConformance({ appRoot })` at `@marinoscar/platform-infra/testing` (sync check, `docker compose config` per mode with the app's overlays, `nginx -t` over `app.d`; a missing tool is a passing case named with the reason). Run `npm run platform:infra:sync` to refresh `csp.conf` and `csp.dev.conf`.
|
|
27
|
+
|
|
28
|
+
- 8a0f3b9: Open the jobs and nodes vocabularies to an app (PP-14.19). Jobs: `registerRetentionPolicy` puts an app table on the nightly retention (the `retention` settings namespace is composed from the registry: schemas, defaults, merge and policy-by-policy read-compat; the platform's four keep their order and defaults, and the enqueue-only `RetentionPurgeTask` enqueues one purge per enabled policy whose handler is mounted); `registerJobReason` opens `jobs.reason`, with `reasonLabel` on the admin job row. Migration `0034_open_job_reason` turns `jobs.reason` from the `JobReason` enum into `TEXT`, keeping every stored value (apply it with `npm run db:sync`, then `prisma:migrate`; the table is rewritten under a short lock); `JobReason` becomes `BuiltinJobReason | (string & {})` and the contract's `reason` a pattern (`jobReasonSchema`), so the OpenAPI document shows a pattern where it showed an enum. Nodes: a heartbeat may carry `vitals.extra` (at most 16 numeric keys), `registerNodeVital` words them in the vitals dialog, which also lists the node's reported capabilities; relayed spans may be named `job.app.<name>` with attributes registered through `registerNodeSpanAttribute` (emitted as `job.app.<key>`), and a span that fails validation is now dropped and counted instead of failing its whole batch with a 400. CLI: `registerJobRequirement` and `registerProbedBinary` (with `versionArgs`) are exported from `@marinoscar/platform-cli/node` and used by the startup self-test and `node doctor`; `JobExecutor.vitals()` feeds `vitals.extra`. Back-compat: with only the built-ins nothing served changes; `JOB_REASONS` and `RETENTION_POLICY_KEYS` remain as deprecated aliases of `BUILTIN_JOB_REASONS` and `BUILTIN_RETENTION_POLICY_KEYS`. Upgrade the API before the nodes: an API that predates `vitals.extra` answers a heartbeat that carries it with a 400, and the CLI then stops sending vitals for the process.
|
|
29
|
+
- 74c4aff: Declare peer dependencies per slice (`packages/platform-slice-peers.json`, checked by `npm run check:slice-peers`) and make every peer that the universal slice does not need optional. `platform-api` now requires only what `core` needs (`@nestjs/common`, `@nestjs/core`, `@nestjs/swagger`, `@opentelemetry/api`, `@prisma/client`, `nestjs-zod`, `reflect-metadata`, `rxjs`, `zod`); `@nestjs/config`, `@nestjs/schedule`, `@nestjs/event-emitter`, `@nestjs/jwt`, `@nestjs/passport`, `passport`, `@nestjs/terminus` and `@prisma/client-runtime-utils` become optional peers an app installs for the slices that use them. `platform-web` requires only `@mui/material`, Emotion, `react` and `react-dom`; `@mui/icons-material`, `react-router-dom` and `zod` become optional. `platform-db` no longer lists `@prisma/client` (its seed takes the app's client structurally) and `prisma` becomes optional; `platform-cli`'s `react` becomes optional. An app that installed every peer needs no change; an app that imports only some slices can now install only their peers. The datatable no longer imports the undeclared transitive `@mui/utils`.
|
|
30
|
+
- 1171b1c: Complete the telemetry slice in all five packages. `@marinoscar/platform-api/telemetry/testing` gains the telemetry conformance suite (registered with `runPlatformConformance()` as `suites.telemetry`: metric groups, route permissions, read-only Doctor checks, no secrets in responses, the cron coverage and the boot without a store), the stub host ports, and the five activity and six coach fixture tables; `ConformanceCase.run` may be async and a slice may add a suite key by augmenting `PlatformConformanceSuiteOptions`. Every telemetry slice README now follows the Package documentation standard with a catalog that links a working example in the reference app.
|
|
31
|
+
|
|
32
|
+
### Patch Changes
|
|
33
|
+
|
|
34
|
+
- 1d8cbae: Add `@marinoscar/platform-api/host` (#867): `PlatformHostCoreModule.forRoot()` packages the API host core every slice assumed, moved from the reference app: the cross-replica event bus (`EVENT_BUS`, `in-process` or `postgres` by `EVENT_BUS_ADAPTER`, with its `core.event-bus` doctor check), the platform's `AppMetricsService` and app-metric declarations (`registerPlatformHostAppMetrics`), maintenance mode (`MaintenanceModeService`, `/api/admin/maintenance`, the `maintenance` settings namespace `MAINTENANCE_SYSTEM_SETTINGS`, the `maintenance.mode` doctor check and `MaintenanceGuard` as the only `APP_GUARD`), the `{ data }` envelope, the request log line, the exception filter and request ids; plus the OpenAPI document and `/api/docs` (`createOpenApiDocument`, `registerPlatformDocs`), and the `host` conformance suite (`@marinoscar/platform-api/host/testing`). `platform-cli`: a comment now names the packaged envelope interceptor.
|
|
35
|
+
- f6e319b: Documentation only: every slice README's Extension-point catalog links the new extension author guide (`docs/EXTENDING.md`); the email README no longer promises that a provider of `SmtpEmailProvider` in the app module replaces the transport (it does not reach the package's consumers; a transport registry is not supported yet); the AI READMEs say that a provider cannot be enabled from an app yet; the platform-db README documents `rlsPolicies` in `platform.lock` with the migration SQL for an app table protected by row-level security.
|
|
36
|
+
- 65d4522: Add the host About module and web slice: `@marinoscar/platform-api/host` now owns `GET /api/admin/about` (`AboutModule.forRoot({ apiVersion })`, `AboutService`, `readDeployInfo`, the `versions` support-bundle section; the database probe reads through `PLATFORM_PRISMA`), and `@marinoscar/platform-web/host/headless` and `/host/ui` own the About page, the admin Maintenance page, the public maintenance screen, the maintenance block store and recogniser and the `useAbout`, `useMaintenance` and `useMaintenanceBlock` hooks. The deploy-info fixture the CLI's tests read moved to `packages/platform-api/test/fixtures`.
|
|
37
|
+
- 6487697: Finish the identity slice move (#727): the reference app now imports identity only from `@marinoscar/platform-{api,web,contract}/identity`, so the web identity catalog's examples point at the app's real uses (`App.tsx`, and one example per data hook in `apps/web/src/identity/dataHookExamples.tsx`), the identity hook, page, guard and component suites the app kept run in `platform-web`'s own tests (with a `fakeIdentityApi` test helper), and comments naming the app's old identity paths point at the packages. No API change.
|
|
38
|
+
- Updated dependencies [a426fd8]
|
|
39
|
+
- Updated dependencies [b2df59a]
|
|
40
|
+
- Updated dependencies [823ec07]
|
|
41
|
+
- Updated dependencies [6a7af76]
|
|
42
|
+
- Updated dependencies [deeb8b5]
|
|
43
|
+
- Updated dependencies [a20f306]
|
|
44
|
+
- Updated dependencies [8bf9606]
|
|
45
|
+
- Updated dependencies [fa3f5b9]
|
|
46
|
+
- Updated dependencies [2be194f]
|
|
47
|
+
- Updated dependencies [0b9962b]
|
|
48
|
+
- Updated dependencies [606d231]
|
|
49
|
+
- Updated dependencies [0426848]
|
|
50
|
+
- Updated dependencies [077c0c0]
|
|
51
|
+
- Updated dependencies [fc11b22]
|
|
52
|
+
- Updated dependencies [685657b]
|
|
53
|
+
- Updated dependencies [5d0dd86]
|
|
54
|
+
- Updated dependencies [03eeaab]
|
|
55
|
+
- Updated dependencies [17d6ed1]
|
|
56
|
+
- Updated dependencies [f80189d]
|
|
57
|
+
- Updated dependencies [115705f]
|
|
58
|
+
- Updated dependencies [d1d1258]
|
|
59
|
+
- Updated dependencies [b46725d]
|
|
60
|
+
- Updated dependencies [f6e319b]
|
|
61
|
+
- Updated dependencies [fe73d7a]
|
|
62
|
+
- Updated dependencies [e6acb4b]
|
|
63
|
+
- Updated dependencies [2c4bf2c]
|
|
64
|
+
- Updated dependencies [c6f97da]
|
|
65
|
+
- Updated dependencies [6487697]
|
|
66
|
+
- Updated dependencies [a1f5999]
|
|
67
|
+
- Updated dependencies [e4ad7d5]
|
|
68
|
+
- Updated dependencies [94a63a2]
|
|
69
|
+
- Updated dependencies [b46d405]
|
|
70
|
+
- Updated dependencies [8a0f3b9]
|
|
71
|
+
- Updated dependencies [aeace4a]
|
|
72
|
+
- Updated dependencies [fce5417]
|
|
73
|
+
- Updated dependencies [48b275d]
|
|
74
|
+
- Updated dependencies [fe61ffe]
|
|
75
|
+
- Updated dependencies [b480c02]
|
|
76
|
+
- Updated dependencies [f994de1]
|
|
77
|
+
- Updated dependencies [346e661]
|
|
78
|
+
- Updated dependencies [9f4c147]
|
|
79
|
+
- Updated dependencies [d35900e]
|
|
80
|
+
- Updated dependencies [74c4aff]
|
|
81
|
+
- Updated dependencies [5e98e3d]
|
|
82
|
+
- Updated dependencies [5425626]
|
|
83
|
+
- Updated dependencies [175ddd3]
|
|
84
|
+
- Updated dependencies [1171b1c]
|
|
85
|
+
- Updated dependencies [2732024]
|
|
86
|
+
- Updated dependencies [39b5300]
|
|
87
|
+
- Updated dependencies [8246e10]
|
|
88
|
+
- @marinoscar/platform-contract@0.1.0-next.4
|
|
89
|
+
- @marinoscar/platform-infra@0.1.0-next.4
|
|
90
|
+
|
|
3
91
|
## 0.1.0-next.3
|
|
4
92
|
|
|
5
93
|
## 0.1.0-next.2
|
package/README.md
CHANGED
|
@@ -1,88 +1,183 @@
|
|
|
1
1
|
# @marinoscar/platform-cli
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The platform's command-line client, as a package an app composes rather than forks: the `init`, `login`, `api`, `config`, `node` and `deploy` commands, the ink TUI, the VPS deploy pipeline and the worker-node engine, built by one `createCli({ identity, version, ... })` call that the app's `src/cli.ts` makes. CLI layer; ESM with `sideEffects: false`; runs on Node 20 or later. Consumed by every app's own CLI binary (the reference app's is `appctl`, in `apps/cli`).
|
|
4
4
|
|
|
5
5
|
## Purpose and scope
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
`createCli` builds an app's CLI from its identity and the registries. The identity (executable name, display name, repository) is configuration: the config directory (`~/.<name>`), the env prefix (`<NAME>_`), the systemd unit (`<name>-node.service`) and every help text follow it, read at call time. Two strings never follow it, because live servers already have them: the deploy state file `.appctl-deploy.json` and the proxy sentinel `# Managed by appctl deploy`.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
An app extends the CLI through registries instead of editing it: commands, env-spec fragments, env groups, generators and annotations ([`/core`](src/core/README.md)), TUI screens and their sections ([`/tui`](src/tui/README.md)), deploy steps, checks, proxy stream paths and edge-config files ([`/deploy`](src/deploy/README.md)), node executors ([`/node`](src/node/README.md)) and conformance suites ([`/testing`](src/testing/README.md)).
|
|
10
|
+
|
|
11
|
+
The package does not own the app's binary name (npm reads the `bin` key before any code runs, so the app's `package.json` carries it), its product identity (`@app/shared` stays in the app; the identity arrives through `createCli`), or app-specific commands.
|
|
12
|
+
|
|
13
|
+
Subpath exports, each with its own README:
|
|
14
|
+
|
|
15
|
+
| Subpath | Contents | README |
|
|
16
|
+
|---|---|---|
|
|
17
|
+
| `@marinoscar/platform-cli` | `createCli`, `run`, the identity accessors, `EXIT` and `formatError` | this file |
|
|
18
|
+
| `/core` | `registerCliCommand`, `registerEnvSpecFragment`, `registerEnvGroup`, `registerEnvGenerator`, `annotateEnvKey` and the env-key metadata helpers | [core](src/core/README.md) |
|
|
19
|
+
| `/commands` | The six built-in command registrars and the error model | [commands](src/commands/README.md) |
|
|
20
|
+
| `/tui` | `registerTuiScreen`, `registerTuiScreenSection` and the built-in screen order | [tui](src/tui/README.md) |
|
|
21
|
+
| `/deploy` | `registerDeployStep`, `registerDeployCheck`, `registerProxyStreamPath`, `registerEdgeConfigFile`, the built-in step ids, `planDeploySteps`, `DeployHooks`, the env template helpers | [deploy](src/deploy/README.md) |
|
|
22
|
+
| `/node` | `JobExecutor`, `ExecutorRegistry`, `registerNodeExecutor` | [node](src/node/README.md) |
|
|
23
|
+
| `/api-client` | `ApiClient`, `resolveApiBaseUrl` and the API errors | [api-client](src/api-client/README.md) |
|
|
24
|
+
| `/telemetry` | The worker's span relay and the telemetry env-spec fragment | [telemetry](src/telemetry/README.md) |
|
|
25
|
+
| `/testing` | Identity and registry reset, `testDeployStepContext`, the credential-hygiene check, `runPlatformConformance`, `registerCliConformanceSuite` | [testing](src/testing/README.md) |
|
|
26
|
+
|
|
27
|
+
The implementation lives in one internal slice (`src/engine/`), which is not a subpath export: the entry points above re-export the parts they publish, and nothing may import a file inside it.
|
|
10
28
|
|
|
11
29
|
## Install and peer dependencies
|
|
12
30
|
|
|
13
31
|
```bash
|
|
14
|
-
npm install @marinoscar/platform-cli
|
|
32
|
+
npm install @marinoscar/platform-cli react
|
|
15
33
|
```
|
|
16
34
|
|
|
17
|
-
|
|
35
|
+
`commander`, `ink`, `ink-select-input`, `ink-spinner`, `ink-text-input` and `@marinoscar/platform-infra` are regular dependencies. The single-instance library the app must install itself (React 19 keeps one hooks dispatcher per copy, and ink renders through it):
|
|
18
36
|
|
|
19
37
|
| Package | Range |
|
|
20
38
|
|---|---|
|
|
21
|
-
| `
|
|
22
|
-
|
|
23
|
-
|
|
39
|
+
| `react` | `^19.2.8` (optional peer in the manifest, needed by the `engine` slice and so by every entry that renders or runs it; `ink` brings it in anyway) |
|
|
40
|
+
|
|
41
|
+
An app that writes its own TUI screen also depends on `ink` (`^7.1.1`), at the same version the package resolves.
|
|
24
42
|
|
|
25
43
|
## Quick start
|
|
26
44
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
| Subpath | Contents | README |
|
|
30
|
-
|---|---|---|
|
|
31
|
-
| `@marinoscar/platform-cli/core` | `registerCliCommand`, `registerEnvSpecFragment` and the env-key metadata helpers | [core](src/core/README.md) |
|
|
32
|
-
| `@marinoscar/platform-cli/telemetry` | The worker node's span relay and `telemetryEnvSpecFragment` | [telemetry](src/telemetry/README.md) |
|
|
45
|
+
The reference app's whole entry point ([`apps/cli/src/cli.ts`](../../apps/cli/src/cli.ts)), with its options in [`apps/cli/src/app.ts`](../../apps/cli/src/app.ts):
|
|
33
46
|
|
|
34
47
|
```ts
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
48
|
+
#!/usr/bin/env node
|
|
49
|
+
import { createCli, EXIT, exitCodeFor, formatError } from '@marinoscar/platform-cli';
|
|
50
|
+
|
|
51
|
+
import { APP_CLI_OPTIONS } from './app.js'; // { identity: CLI_IDENTITY, version: CLI_VERSION, extraCommands: [] }
|
|
52
|
+
|
|
53
|
+
async function main(): Promise<void> {
|
|
54
|
+
let cli: ReturnType<typeof createCli>;
|
|
55
|
+
try {
|
|
56
|
+
cli = createCli(APP_CLI_OPTIONS);
|
|
57
|
+
} catch (error) {
|
|
58
|
+
process.stderr.write(`${formatError(error)}\n`);
|
|
59
|
+
process.exitCode = exitCodeFor(error);
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
// Set exitCode and return; never process.exit(), which truncates piped output.
|
|
63
|
+
process.exitCode = await cli.run(process.argv.slice(2));
|
|
64
|
+
}
|
|
65
|
+
process.on('unhandledRejection', (reason) => {
|
|
66
|
+
process.stderr.write(`${formatError(reason)}\n`);
|
|
67
|
+
process.exitCode = EXIT.FAILURE;
|
|
68
|
+
});
|
|
69
|
+
void main();
|
|
38
70
|
```
|
|
39
71
|
|
|
72
|
+
`run` keeps the CLI's semantics: no arguments opens the TUI in a real terminal and is a usage error (help on stderr, `EXIT.USAGE`) anywhere else; `--help` and `--version` exit 0; `--version` prints `<app version> (platform <this package's version>)`.
|
|
73
|
+
|
|
40
74
|
## Configuration
|
|
41
75
|
|
|
42
|
-
|
|
76
|
+
`createCli(options)`:
|
|
77
|
+
|
|
78
|
+
| Option | Type | Default | Meaning |
|
|
79
|
+
|---|---|---|---|
|
|
80
|
+
| `identity` | `CliIdentity` | required | `name` (lowercase `[a-z0-9-]`, e.g. `appctl`), `displayName` (`Acme CLI`), `repoSlug` (`owner/repo`); optional `productName` (the systemd unit's Description; defaults to `displayName`), `configDirName` (defaults to `.<name>`), `envPrefix` (defaults to `toEnvPrefix(name)`, `APPCTL_`). Set once per process; a different second identity throws. |
|
|
81
|
+
| `version` | `string` | required | The app's own version (its `package.json`). |
|
|
82
|
+
| `extraCommands` | `CliCommandRegistration[]` | `[]` | Commands after the built-ins, in order. Same as `registerCliCommand`. |
|
|
83
|
+
| `tuiScreens` | `TuiScreenRegistration[]` | `[]` | Screens in the TUI menu. Same as `registerTuiScreen`. |
|
|
84
|
+
| `deploySteps` | `DeployStepRegistration[]` | `[]` | Steps inserted into `deploy install` / `update`. Same as `registerDeployStep`. |
|
|
85
|
+
| `nodeExecutors` | `JobExecutor[]` | `[]` | Executors for the app's node-eligible job types. Same as `registerNodeExecutor`. |
|
|
86
|
+
| `envSpecFragments` | `EnvSpecFragment[]` | `[]` | Metadata for the app's `.env.example` keys. Same as `registerEnvSpecFragment`. |
|
|
87
|
+
|
|
88
|
+
The options and the `register*` functions feed the same registries: string ids, a duplicate-id error, a deterministic order (built-ins first, then registration order), and frozen when `createCli` returns, so a late registration throws instead of going missing. A broken composition (a taken command name, TUI route, deploy step id, check id, env group or generator kind or executor type; a step anchored on an unknown step; an env key with two owners; an invalid stream path or edge-config path) throws at `createCli`. The newer options are `envGroups`, `envGenerators`, `envAnnotations`, `deployChecks`, `edgeConfigFiles`, `tuiSections` and `proxy: { streamPaths }`.
|
|
43
89
|
|
|
44
90
|
## Extension-point catalog
|
|
45
91
|
|
|
46
|
-
|
|
92
|
+
The extension ladder and a recipe per extension: [docs/EXTENDING.md](../../docs/EXTENDING.md).
|
|
93
|
+
|
|
94
|
+
| Name | Kind | Signature | When to use | Stability | Example |
|
|
95
|
+
|---|---|---|---|---|---|
|
|
96
|
+
| `CreateCliOptions` | option | `createCli(options: CreateCliOptions): CliInstance` | Build the app's CLI: its identity and version, plus its commands, TUI screens, deploy steps, node executors and env-spec fragments | experimental | [example](../../apps/cli/src/app.ts) |
|
|
97
|
+
|
|
98
|
+
The registries are catalogued by the entry point that exports them, each with a compiled, tested example in the reference app:
|
|
99
|
+
|
|
100
|
+
| Registry | Entry point | Example |
|
|
101
|
+
|---|---|---|
|
|
102
|
+
| `registerCliCommand` | [`/core`](src/core/README.md#extension-point-catalog) | [`hello.command.ts`](../../apps/cli/src/examples/hello.command.ts) |
|
|
103
|
+
| `registerEnvSpecFragment` | [`/core`](src/core/README.md#extension-point-catalog) | the platform's `telemetry` fragment |
|
|
104
|
+
| `registerEnvGroup` | [`/core`](src/core/README.md#extension-point-catalog) | [`coach.env-group.ts`](../../apps/cli/src/examples/coach.env-group.ts) |
|
|
105
|
+
| `registerEnvGenerator` | [`/core`](src/core/README.md#extension-point-catalog) | [`coach.env-generator.ts`](../../apps/cli/src/examples/coach.env-generator.ts) |
|
|
106
|
+
| `annotateEnvKey` | [`/core`](src/core/README.md#extension-point-catalog) | [`coach.env-annotation.ts`](../../apps/cli/src/examples/coach.env-annotation.ts) |
|
|
107
|
+
| `registerTuiScreen` | [`/tui`](src/tui/README.md#extension-point-catalog) | [`about.tui.ts`](../../apps/cli/src/examples/about.tui.ts) |
|
|
108
|
+
| `registerTuiScreenSection` | [`/tui`](src/tui/README.md#extension-point-catalog) | [`fleet-note.tui-section.tsx`](../../apps/cli/src/examples/fleet-note.tui-section.tsx) |
|
|
109
|
+
| `registerDeployStep` | [`/deploy`](src/deploy/README.md#extension-point-catalog) | [`announce.deploy-step.ts`](../../apps/cli/src/examples/announce.deploy-step.ts) |
|
|
110
|
+
| `registerDeployCheck` | [`/deploy`](src/deploy/README.md#extension-point-catalog) | [`coach.deploy-check.ts`](../../apps/cli/src/examples/coach.deploy-check.ts) |
|
|
111
|
+
| `registerProxyStreamPath` | [`/deploy`](src/deploy/README.md#extension-point-catalog) | [`coach.proxy-stream.ts`](../../apps/cli/src/examples/coach.proxy-stream.ts) |
|
|
112
|
+
| `registerEdgeConfigFile` | [`/deploy`](src/deploy/README.md#extension-point-catalog) | [`coach.edge-config.ts`](../../apps/cli/src/examples/coach.edge-config.ts) |
|
|
113
|
+
| `registerNodeExecutor` | [`/node`](src/node/README.md#extension-point-catalog) | [`echo.executor.ts`](../../apps/cli/src/examples/echo.executor.ts) |
|
|
114
|
+
| `runPlatformConformance` | [`/testing`](src/testing/README.md#extension-point-catalog) | [`conformance.test.ts`](../../apps/cli/src/conformance.test.ts) |
|
|
115
|
+
| `registerCliConformanceSuite` | [`/testing`](src/testing/README.md#extension-point-catalog) | [`coach.conformance-suite.ts`](../../apps/cli/src/examples/coach.conformance-suite.ts) |
|
|
116
|
+
|
|
117
|
+
The built-in deploy step ids, the env-spec fragment contract and the `/testing` helpers are listed in the [deploy](src/deploy/README.md#extension-point-catalog), [core](src/core/README.md#purpose-and-scope) and [testing](src/testing/README.md#extension-point-catalog) READMEs.
|
|
47
118
|
|
|
48
119
|
## Data
|
|
49
120
|
|
|
50
|
-
None. The CLI holds no data model; it calls the API.
|
|
121
|
+
None. The CLI holds no data model; it calls the API. On the user's machine it writes `~/.<name>/config.json` (server URL and token) and, for a worker, its state directory; on a server, the deploy state file and journals under the deployment root.
|
|
51
122
|
|
|
52
123
|
## Permissions and settings
|
|
53
124
|
|
|
54
|
-
None
|
|
125
|
+
None of its own. Every command acts with the permissions of the token `login` stored; the API enforces them.
|
|
55
126
|
|
|
56
127
|
## UI
|
|
57
128
|
|
|
58
|
-
None.
|
|
129
|
+
None in the web app. In a terminal: the ink TUI (`menu`, `login`, `invoke`, `status`, `node`, `deploy`, `logout`, plus the app's registered screens), opened only by a bare invocation in a real terminal (`<NAME>_NO_TUI` disables it).
|
|
59
130
|
|
|
60
131
|
## Infra
|
|
61
132
|
|
|
62
|
-
|
|
133
|
+
The deploy wizard and `init` read `infra/compose/.env.example`, which `platform-infra sync` composes from the env template fragments in this order: the platform base (`@marinoscar/platform-infra/env/base.env.example`), each enabled slice's, then the app's own `infra/compose/app.env.example`. Env-spec fragments (`/core`) annotate those keys and never add one. ⚠ A commented `# KEY=value` line in any fragment is read as a declared variable; the conformance suite fails on one. The worker image is the app's (`apps/cli/Dockerfile`), built from the app CLI with this package in its `deps` stage; its `<NAME>_*` variables are `workerEnv()`.
|
|
63
134
|
|
|
64
135
|
## Observability
|
|
65
136
|
|
|
66
|
-
|
|
137
|
+
A worker relays each job's phase spans to the API through the [telemetry](src/telemetry/README.md#observability) slice. The node writes a JSON log (`node logs`), and every deploy run writes a redacted human journal and a JSONL journal under `<deployRoot>/logs/`. Nothing goes to an OpenTelemetry exporter from the CLI itself.
|
|
67
138
|
|
|
68
139
|
## Security notes
|
|
69
140
|
|
|
70
|
-
|
|
141
|
+
- **Token storage.** `login` stores the token in `~/.<name>/config.json`, created with mode `0600` in a `0700` directory; `config` prints only a masked hint. The env variables `<NAME>_SERVER_URL` and `<NAME>_TOKEN` override the file per field.
|
|
142
|
+
- **The node credential rule (CLAUDE.md queue rule 3).** A job-scoped credential comes from `api.jobSecret(...)`, lives in memory for the job, and is never written to the config file or the state directory, never logged and never put in argv. `checkExecutorCredentialHygiene` (`/testing`) is the check, and the `cli` conformance suite runs it over every executor the worker would run, the app's included.
|
|
143
|
+
- **Fixed live-server literals.** `.appctl-deploy.json` and `# Managed by appctl deploy` are not derived from the identity: a renamed CLI must still read the state file and recognise the vhosts an earlier deploy wrote. Do not change them.
|
|
144
|
+
- Deploy steps report through `DeployHooks` only; an app step's command output reaches the hooks redacted by the run's journal.
|
|
71
145
|
|
|
72
146
|
## Conformance suite
|
|
73
147
|
|
|
74
|
-
|
|
148
|
+
`runPlatformConformance({ suites: { cli, deployRegistrations } })` from [`/testing`](src/testing/README.md#conformance-suite). A suite is run with its options or skipped with `{ skip: 'reason' }`; `false` or an empty reason throws. `deployRegistrations` checks that every env key names a registered group and generator, both deploy plans resolve, no edge-config file is listed twice and the vhost renders with the app's stream paths. `cli`: every env template fragment declares no commented `# KEY=value` line (beyond `PLATFORM_DOCUMENTED_OPTIONAL_KEYS` in the platform base), and every executor the worker would run passes the credential-hygiene check on a fake job holding a credential. The reference app runs it in [`apps/cli/src/conformance.test.ts`](../../apps/cli/src/conformance.test.ts).
|
|
75
149
|
|
|
76
150
|
## Upgrade notes
|
|
77
151
|
|
|
78
|
-
|
|
152
|
+
0.x: the CLI moved here from `apps/cli/src` (#715) with no change to any command's flags, output, exit codes or file formats (the `--help` of every command is pinned by `apps/cli/src/help-snapshot.test.ts`). What changes for an app that forked the CLI:
|
|
153
|
+
|
|
154
|
+
| Before (forked `apps/cli/src`) | After |
|
|
155
|
+
|---|---|
|
|
156
|
+
| `CLI_NAME`, `ENV_PREFIX`, `envVar`, `CONFIG_DIR_NAME` module constants | `createCli({ identity })`, then `cliName()`, `envPrefix()`, `envVar()`, `configDirName()` |
|
|
157
|
+
| `buildProgram()` with a fixed command list | `extraCommands` / `registerCliCommand` |
|
|
158
|
+
| `type Route` and `menu.tsx` edits | `tuiScreens` / `registerTuiScreen` |
|
|
159
|
+
| A step added to `install.ts` | `deploySteps` / `registerDeployStep` after a built-in step id |
|
|
160
|
+
| An executor added to `defaultExecutors()` | `nodeExecutors` / `registerNodeExecutor` |
|
|
161
|
+
| `CLI_VERSION` (the CLI package's) | `createCli({ version })`; `--version` also prints the platform's |
|
|
79
162
|
|
|
80
163
|
## Troubleshooting
|
|
81
164
|
|
|
82
|
-
|
|
165
|
+
| Symptom | Cause | Fix |
|
|
166
|
+
|---|---|---|
|
|
167
|
+
| `No CLI identity is set` | A module ran before `createCli` | Build the CLI first; in tests use `useTestCliIdentity` or `createCli` after `resetCliForTests()` |
|
|
168
|
+
| `The CLI identity is already set` | `createCli` (or `setCliIdentity`) ran twice with different identities | One identity per process; tests reset with `resetCliForTests()` |
|
|
169
|
+
| `... was registered after createCli built the CLI` | A `register*` call after `createCli` | Register before `createCli`, or pass the entry in its options |
|
|
170
|
+
| `Deploy step "x" after "y", which is not a step of the install pipeline` | The anchor (`after`, `before` or `replaces`) names no built-in or earlier app step, or one already replaced | Use an id from `INSTALL_STEP_IDS` / `UPDATE_STEP_IDS` |
|
|
171
|
+
| `Proxy path "..." contains a character that is not allowed in a vhost location` | A stream path has `;`, a quote, a brace, `$`, `#`, whitespace or a control character | Use letters, digits and `. _ ~ / : @ + , = -` after a leading `/` |
|
|
172
|
+
| `Env key "K" is in group "g", which this CLI does not know` | A fragment names an unregistered group | `registerEnvGroup` (before `createCli`) or fix the fragment |
|
|
173
|
+
| `suite "cli" is skipped without a reason` / `switched off with false` | An opt-out of a conformance suite with no reason | `cli: { skip: 'why this app does not run it' }` |
|
|
174
|
+
| `Node executor "t" duplicates a built-in executor` | The app registers `db.backup.run` or `example.checksum` | A job type has one executor; choose an app type |
|
|
83
175
|
|
|
84
176
|
## Links
|
|
85
177
|
|
|
86
|
-
- [Platform packages spec](../../docs/specs/platform-packages.md)
|
|
87
|
-
- [Package documentation standard and checks](../../docs/PACKAGES.md)
|
|
88
|
-
- [
|
|
178
|
+
- [Platform packages spec: worked examples, CLI](../../docs/specs/platform-packages.md#cli)
|
|
179
|
+
- [Package documentation standard and checks](../../docs/PACKAGES.md)
|
|
180
|
+
- [Reference CLI README: Extending the CLI from an app](../../apps/cli/README.md#extending-the-cli-from-an-app)
|
|
181
|
+
- [VPS deploy spec](../../docs/specs/vps-deploy.md) and [worker nodes spec](../../docs/specs/worker-nodes.md)
|
|
182
|
+
- TypeDoc API reference: `npm run docs:packages`, then `packages/platform-cli/docs-api/index.html`
|
|
183
|
+
- Slice READMEs: [core](src/core/README.md), [commands](src/commands/README.md), [tui](src/tui/README.md), [deploy](src/deploy/README.md), [node](src/node/README.md), [api-client](src/api-client/README.md), [telemetry](src/telemetry/README.md), [testing](src/testing/README.md)
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type ExecFn } from './exec.js';
|
|
2
|
+
import { type ApkMetadata } from './metadata.js';
|
|
3
|
+
import { type BuildServerUrl } from './server-url.js';
|
|
4
|
+
export interface BuildOptions {
|
|
5
|
+
/** The server the app is tied to; defaults to the stored login's server (#318). */
|
|
6
|
+
serverUrl?: string | undefined;
|
|
7
|
+
debug?: boolean | undefined;
|
|
8
|
+
/** Refuse to build from a checkout behind its remote (#315); by default that is a warning. */
|
|
9
|
+
requireUpToDate?: boolean | undefined;
|
|
10
|
+
}
|
|
11
|
+
export interface BuildContext {
|
|
12
|
+
exec?: ExecFn | undefined;
|
|
13
|
+
env?: NodeJS.ProcessEnv | undefined;
|
|
14
|
+
home?: string | undefined;
|
|
15
|
+
cwd?: string | undefined;
|
|
16
|
+
platform?: NodeJS.Platform | undefined;
|
|
17
|
+
log: (line: string) => void;
|
|
18
|
+
}
|
|
19
|
+
export interface BuildResult {
|
|
20
|
+
apkPath: string;
|
|
21
|
+
metadataPath: string;
|
|
22
|
+
metadata: ApkMetadata;
|
|
23
|
+
verified: boolean;
|
|
24
|
+
/** The server URL the APK was built for, and where it came from (#318). */
|
|
25
|
+
server: BuildServerUrl;
|
|
26
|
+
}
|
|
27
|
+
/** `Signer #1 certificate SHA-256 digest: <hex>` from `apksigner verify --print-certs`. */
|
|
28
|
+
export declare function parseApksignerSha256(output: string): string | undefined;
|
|
29
|
+
export declare function runBuild(options: BuildOptions, ctx: BuildContext): Promise<BuildResult>;
|
|
30
|
+
//# sourceMappingURL=build.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../../src/android/build.ts"],"names":[],"mappings":"AAKA,OAAO,EAAoC,KAAK,MAAM,EAAE,MAAM,WAAW,CAAC;AAI1E,OAAO,EAA0E,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAGzH,OAAO,EAA8D,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAOlH,MAAM,WAAW,YAAY;IAC3B,mFAAmF;IACnF,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC5B,8FAA8F;IAC9F,eAAe,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CACvC;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,GAAG,SAAS,CAAC;IACpC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC,QAAQ,GAAG,SAAS,CAAC;IACvC,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7B;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,WAAW,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;IAClB,2EAA2E;IAC3E,MAAM,EAAE,cAAc,CAAC;CACxB;AAED,2FAA2F;AAC3F,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAGvE;AAED,wBAAsB,QAAQ,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,EAAE,YAAY,GAAG,OAAO,CAAC,WAAW,CAAC,CA0H7F"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { copyFileSync, existsSync, mkdirSync } from 'node:fs';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import { cliName } from '../engine/index.js';
|
|
4
|
+
import { PreconditionError } from '../engine/index.js';
|
|
5
|
+
import { exec as defaultExec, execChecked } from './exec.js';
|
|
6
|
+
import { behindWarning, checkGitFreshness, describeFreshness } from './git-freshness.js';
|
|
7
|
+
import { builtApkPath, gradleArgs, gradlewPath, readApplicationId } from './gradle.js';
|
|
8
|
+
import { fingerprintToHex, readCertificateSha256, readSigningConfig, signingEnv } from './keystore.js';
|
|
9
|
+
import { apkFileName, buildMetadata, metadataPathFor, readGitSha, writeMetadata } from './metadata.js';
|
|
10
|
+
import { androidProjectDir, distDir, extraGradleArgs, requireRepoRoot, versionPropertiesPath } from './paths.js';
|
|
11
|
+
import { resolveSdk, sdkLayout } from './sdk.js';
|
|
12
|
+
import { builtForLine, NO_SERVER_URL_WARNING, resolveBuildServerUrl } from './server-url.js';
|
|
13
|
+
import { readVersion } from './version.js';
|
|
14
|
+
/** `Signer #1 certificate SHA-256 digest: <hex>` from `apksigner verify --print-certs`. */
|
|
15
|
+
export function parseApksignerSha256(output) {
|
|
16
|
+
const match = /Signer #1 certificate SHA-256 digest:\s*([0-9a-f]{64})/i.exec(output);
|
|
17
|
+
return match?.[1]?.toLowerCase();
|
|
18
|
+
}
|
|
19
|
+
export async function runBuild(options, ctx) {
|
|
20
|
+
const exec = ctx.exec ?? defaultExec;
|
|
21
|
+
const env = ctx.env ?? process.env;
|
|
22
|
+
const platform = ctx.platform ?? process.platform;
|
|
23
|
+
const paths = { env, ...(ctx.home !== undefined ? { home: ctx.home } : {}), ...(ctx.cwd !== undefined ? { cwd: ctx.cwd } : {}) };
|
|
24
|
+
const debug = options.debug === true;
|
|
25
|
+
const repoRoot = requireRepoRoot(paths);
|
|
26
|
+
const projectDir = androidProjectDir(repoRoot);
|
|
27
|
+
const version = readVersion(versionPropertiesPath(repoRoot));
|
|
28
|
+
if (!version.exists) {
|
|
29
|
+
ctx.log(`version.properties not found; building ${version.versionName} (${version.versionCode}).`);
|
|
30
|
+
}
|
|
31
|
+
const sdk = resolveSdk({ env, platform, ...(ctx.home !== undefined ? { home: ctx.home } : {}) });
|
|
32
|
+
if (!sdk.exists) {
|
|
33
|
+
throw new PreconditionError(`No Android SDK found. Run \`${cliName()} android doctor --fix\`.`);
|
|
34
|
+
}
|
|
35
|
+
const signing = readSigningConfig(paths);
|
|
36
|
+
if (!debug && signing === undefined) {
|
|
37
|
+
throw new PreconditionError(`No release keystore is configured. Run \`${cliName()} android keystore init\` (or \`keystore import <file>\`), or build with --debug.`);
|
|
38
|
+
}
|
|
39
|
+
const wrapper = gradlewPath(projectDir, platform);
|
|
40
|
+
if (!existsSync(wrapper))
|
|
41
|
+
throw new PreconditionError(`${wrapper} is missing.`);
|
|
42
|
+
// ⚠ Before Gradle, not after: a checkout behind its remote builds an APK
|
|
43
|
+
// without the commits it is missing (#315). A warning by default, an error
|
|
44
|
+
// with --require-up-to-date; never a pull.
|
|
45
|
+
const freshness = await checkGitFreshness(repoRoot, { exec, env });
|
|
46
|
+
const behind = behindWarning(freshness);
|
|
47
|
+
if (behind !== undefined) {
|
|
48
|
+
if (options.requireUpToDate === true) {
|
|
49
|
+
throw new PreconditionError(`${behind.replace(/^⚠ /, '')} (refusing to build: --require-up-to-date)`);
|
|
50
|
+
}
|
|
51
|
+
ctx.log(behind);
|
|
52
|
+
}
|
|
53
|
+
else if (freshness.state !== 'up_to_date' || freshness.fetchError !== undefined) {
|
|
54
|
+
ctx.log(`Note: ${describeFreshness(freshness)}.`);
|
|
55
|
+
}
|
|
56
|
+
// ⚠ The server decides which host the app claims links for, and so whether
|
|
57
|
+
// Chrome delegates Web Push to it (#318). Warned before Gradle, never fatal.
|
|
58
|
+
const server = resolveBuildServerUrl(options.serverUrl, { env, ...(ctx.home !== undefined ? { home: ctx.home } : {}) });
|
|
59
|
+
if (server.serverUrl === undefined)
|
|
60
|
+
ctx.log(NO_SERVER_URL_WARNING());
|
|
61
|
+
const childEnv = {
|
|
62
|
+
...env,
|
|
63
|
+
ANDROID_HOME: sdk.root,
|
|
64
|
+
ANDROID_SDK_ROOT: sdk.root,
|
|
65
|
+
...(debug || signing === undefined ? {} : signingEnv(signing)),
|
|
66
|
+
};
|
|
67
|
+
const args = gradleArgs({
|
|
68
|
+
debug,
|
|
69
|
+
versionName: version.versionName,
|
|
70
|
+
versionCode: version.versionCode,
|
|
71
|
+
serverUrl: server.serverUrl,
|
|
72
|
+
extra: extraGradleArgs(env),
|
|
73
|
+
});
|
|
74
|
+
ctx.log(`Building ${debug ? 'debug' : 'release'} ${version.versionName} (${version.versionCode}) with Gradle…`);
|
|
75
|
+
await execChecked(exec, wrapper, args, {
|
|
76
|
+
cwd: projectDir,
|
|
77
|
+
env: childEnv,
|
|
78
|
+
platform,
|
|
79
|
+
missingHint: 'Restore apps/android/gradlew from git (and make it executable).',
|
|
80
|
+
onLine: (line) => ctx.log(` ${line}`),
|
|
81
|
+
});
|
|
82
|
+
const output = builtApkPath(projectDir, debug);
|
|
83
|
+
if (!existsSync(output)) {
|
|
84
|
+
throw new PreconditionError(`Gradle finished but ${output} does not exist.`);
|
|
85
|
+
}
|
|
86
|
+
// The certificate the APK must carry: the configured keystore's, for release.
|
|
87
|
+
const expected = !debug && signing !== undefined
|
|
88
|
+
? fingerprintToHex(signing.certSha256 ?? (await readCertificateSha256(signing, { exec, env, platform })))
|
|
89
|
+
: undefined;
|
|
90
|
+
let actual;
|
|
91
|
+
const apksigner = sdkLayout(sdk.root, platform).apksigner;
|
|
92
|
+
if (existsSync(apksigner)) {
|
|
93
|
+
const verify = await execChecked(exec, apksigner, ['verify', '--print-certs', output], { env: childEnv, platform });
|
|
94
|
+
actual = parseApksignerSha256(verify.stdout);
|
|
95
|
+
if (expected !== undefined && actual !== undefined && actual !== expected) {
|
|
96
|
+
throw new PreconditionError(`The APK is signed by ${actual}, not by the configured keystore (${expected}). Was the release built unsigned or with another key?`);
|
|
97
|
+
}
|
|
98
|
+
ctx.log(`apksigner: signature verified${actual !== undefined ? ` (${actual})` : ''}.`);
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
ctx.log(`apksigner not found at ${apksigner}; skipping signature verification.`);
|
|
102
|
+
}
|
|
103
|
+
const signingSha256 = actual ?? expected;
|
|
104
|
+
if (signingSha256 === undefined) {
|
|
105
|
+
throw new PreconditionError('Could not determine the signing certificate. Install build-tools (`android doctor --fix`).');
|
|
106
|
+
}
|
|
107
|
+
const dist = distDir(repoRoot);
|
|
108
|
+
mkdirSync(dist, { recursive: true });
|
|
109
|
+
const name = apkFileName(version.versionName).replace(/\.apk$/, debug ? '-debug.apk' : '.apk');
|
|
110
|
+
const apkPath = join(dist, name);
|
|
111
|
+
copyFileSync(output, apkPath);
|
|
112
|
+
const metadata = await buildMetadata({
|
|
113
|
+
apkPath,
|
|
114
|
+
packageName: readApplicationId(projectDir),
|
|
115
|
+
versionName: version.versionName,
|
|
116
|
+
versionCode: version.versionCode,
|
|
117
|
+
signingSha256,
|
|
118
|
+
gitSha: await readGitSha(exec, repoRoot),
|
|
119
|
+
serverUrl: server.serverUrl ?? null,
|
|
120
|
+
});
|
|
121
|
+
const metadataPath = metadataPathFor(apkPath);
|
|
122
|
+
writeMetadata(metadataPath, metadata);
|
|
123
|
+
ctx.log(builtForLine(server));
|
|
124
|
+
return { apkPath, metadataPath, metadata, verified: actual !== undefined, server };
|
|
125
|
+
}
|
|
126
|
+
//# sourceMappingURL=build.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build.js","sourceRoot":"","sources":["../../src/android/build.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,IAAI,IAAI,WAAW,EAAE,WAAW,EAAe,MAAM,WAAW,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACzF,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACvF,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACvG,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,eAAe,EAAE,UAAU,EAAE,aAAa,EAAoB,MAAM,eAAe,CAAC;AACzH,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AACjH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,qBAAqB,EAAuB,MAAM,iBAAiB,CAAC;AA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,CAAC,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC;IAE9B,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,KAAK,SAAS,EAAE,MAAM,EAAE,CAAC;AACrF,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Command } from 'commander';
|
|
2
|
+
import { type ExecFn } from './exec.js';
|
|
3
|
+
export interface AndroidCommandContext {
|
|
4
|
+
stdout?: {
|
|
5
|
+
write(chunk: string): unknown;
|
|
6
|
+
} | undefined;
|
|
7
|
+
stderr?: {
|
|
8
|
+
write(chunk: string): unknown;
|
|
9
|
+
isTTY?: boolean;
|
|
10
|
+
} | undefined;
|
|
11
|
+
env?: NodeJS.ProcessEnv | undefined;
|
|
12
|
+
home?: string | undefined;
|
|
13
|
+
cwd?: string | undefined;
|
|
14
|
+
fetch?: typeof globalThis.fetch | undefined;
|
|
15
|
+
exec?: ExecFn | undefined;
|
|
16
|
+
}
|
|
17
|
+
/** Env names the keystore passwords are read from (the same names Gradle and CI use). */
|
|
18
|
+
export declare const STORE_PASSWORD_ENV = "ANDROID_KEYSTORE_PASSWORD";
|
|
19
|
+
export declare const KEY_PASSWORD_ENV = "ANDROID_KEY_PASSWORD";
|
|
20
|
+
export declare function registerAndroidCommand(program: Command, ctx?: AndroidCommandContext): Command;
|
|
21
|
+
//# sourceMappingURL=command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../src/android/command.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKzC,OAAO,EAAuB,KAAK,MAAM,EAAE,MAAM,WAAW,CAAC;AA4C7D,MAAM,WAAW,qBAAqB;IACpC,MAAM,CAAC,EAAE;QAAE,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,GAAG,SAAS,CAAC;IACvD,MAAM,CAAC,EAAE;QAAE,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,SAAS,CAAC;IACxE,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,GAAG,SAAS,CAAC;IACpC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,KAAK,CAAC,EAAE,OAAO,UAAU,CAAC,KAAK,GAAG,SAAS,CAAC;IAC5C,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3B;AAED,yFAAyF;AACzF,eAAO,MAAM,kBAAkB,8BAA8B,CAAC;AAC9D,eAAO,MAAM,gBAAgB,yBAAyB,CAAC;AAEvD,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,EAAE,qBAAqB,GAAG,OAAO,CA0T7F"}
|