@flui-cloud/cli 0.0.1
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/LICENSE +661 -0
- package/README.md +124 -0
- package/bin/run +17 -0
- package/lib/cli/src/background/cluster-worker.d.ts +11 -0
- package/lib/cli/src/background/cluster-worker.js +90 -0
- package/lib/cli/src/cli-providers.module.d.ts +2 -0
- package/lib/cli/src/cli-providers.module.js +118 -0
- package/lib/cli/src/cli.module.d.ts +13 -0
- package/lib/cli/src/cli.module.js +80 -0
- package/lib/cli/src/commands/_diag-oidc.d.ts +6 -0
- package/lib/cli/src/commands/_diag-oidc.js +132 -0
- package/lib/cli/src/commands/app/backup/create.d.ts +20 -0
- package/lib/cli/src/commands/app/backup/create.js +128 -0
- package/lib/cli/src/commands/app/backup/delete.d.ts +19 -0
- package/lib/cli/src/commands/app/backup/delete.js +95 -0
- package/lib/cli/src/commands/app/build.d.ts +17 -0
- package/lib/cli/src/commands/app/build.js +133 -0
- package/lib/cli/src/commands/app/builds.d.ts +14 -0
- package/lib/cli/src/commands/app/builds.js +82 -0
- package/lib/cli/src/commands/app/crash.d.ts +16 -0
- package/lib/cli/src/commands/app/crash.js +106 -0
- package/lib/cli/src/commands/app/crashes.d.ts +15 -0
- package/lib/cli/src/commands/app/crashes.js +99 -0
- package/lib/cli/src/commands/app/delete.d.ts +16 -0
- package/lib/cli/src/commands/app/delete.js +149 -0
- package/lib/cli/src/commands/app/image/delete.d.ts +18 -0
- package/lib/cli/src/commands/app/image/delete.js +72 -0
- package/lib/cli/src/commands/app/init.d.ts +40 -0
- package/lib/cli/src/commands/app/init.js +436 -0
- package/lib/cli/src/commands/app/list.d.ts +11 -0
- package/lib/cli/src/commands/app/list.js +84 -0
- package/lib/cli/src/commands/app/logs.d.ts +18 -0
- package/lib/cli/src/commands/app/logs.js +121 -0
- package/lib/cli/src/commands/app/metrics.d.ts +17 -0
- package/lib/cli/src/commands/app/metrics.js +100 -0
- package/lib/cli/src/commands/app/redeploy.d.ts +14 -0
- package/lib/cli/src/commands/app/redeploy.js +60 -0
- package/lib/cli/src/commands/app/releases.d.ts +15 -0
- package/lib/cli/src/commands/app/releases.js +117 -0
- package/lib/cli/src/commands/app/restart.d.ts +12 -0
- package/lib/cli/src/commands/app/restart.js +44 -0
- package/lib/cli/src/commands/app/scale.d.ts +13 -0
- package/lib/cli/src/commands/app/scale.js +58 -0
- package/lib/cli/src/commands/app/snapshot/create.d.ts +14 -0
- package/lib/cli/src/commands/app/snapshot/create.js +85 -0
- package/lib/cli/src/commands/app/snapshot/delete.d.ts +14 -0
- package/lib/cli/src/commands/app/snapshot/delete.js +63 -0
- package/lib/cli/src/commands/app/snapshot/list.d.ts +11 -0
- package/lib/cli/src/commands/app/snapshot/list.js +82 -0
- package/lib/cli/src/commands/app/snapshot/restore.d.ts +15 -0
- package/lib/cli/src/commands/app/snapshot/restore.js +74 -0
- package/lib/cli/src/commands/app/snapshot/swap.d.ts +15 -0
- package/lib/cli/src/commands/app/snapshot/swap.js +68 -0
- package/lib/cli/src/commands/app/start.d.ts +12 -0
- package/lib/cli/src/commands/app/start.js +45 -0
- package/lib/cli/src/commands/app/status.d.ts +15 -0
- package/lib/cli/src/commands/app/status.js +108 -0
- package/lib/cli/src/commands/app/stop.d.ts +12 -0
- package/lib/cli/src/commands/app/stop.js +45 -0
- package/lib/cli/src/commands/app/versions.d.ts +14 -0
- package/lib/cli/src/commands/app/versions.js +80 -0
- package/lib/cli/src/commands/auth/generate-api-key.d.ts +12 -0
- package/lib/cli/src/commands/auth/generate-api-key.js +90 -0
- package/lib/cli/src/commands/auth/login.d.ts +11 -0
- package/lib/cli/src/commands/auth/login.js +296 -0
- package/lib/cli/src/commands/auth/reset-password.d.ts +15 -0
- package/lib/cli/src/commands/auth/reset-password.js +253 -0
- package/lib/cli/src/commands/backup/destination/create.d.ts +22 -0
- package/lib/cli/src/commands/backup/destination/create.js +102 -0
- package/lib/cli/src/commands/backup/destination/delete.d.ts +11 -0
- package/lib/cli/src/commands/backup/destination/delete.js +46 -0
- package/lib/cli/src/commands/backup/destination/list.d.ts +9 -0
- package/lib/cli/src/commands/backup/destination/list.js +42 -0
- package/lib/cli/src/commands/backup/destination/show.d.ts +11 -0
- package/lib/cli/src/commands/backup/destination/show.js +45 -0
- package/lib/cli/src/commands/backup/destination/test.d.ts +8 -0
- package/lib/cli/src/commands/backup/destination/test.js +39 -0
- package/lib/cli/src/commands/backup/job/list.d.ts +9 -0
- package/lib/cli/src/commands/backup/job/list.js +38 -0
- package/lib/cli/src/commands/backup/job/run.d.ts +8 -0
- package/lib/cli/src/commands/backup/job/run.js +32 -0
- package/lib/cli/src/commands/backup/job/show.d.ts +11 -0
- package/lib/cli/src/commands/backup/job/show.js +38 -0
- package/lib/cli/src/commands/backup/policy/create.d.ts +21 -0
- package/lib/cli/src/commands/backup/policy/create.js +97 -0
- package/lib/cli/src/commands/backup/policy/delete.d.ts +11 -0
- package/lib/cli/src/commands/backup/policy/delete.js +42 -0
- package/lib/cli/src/commands/backup/policy/list.d.ts +9 -0
- package/lib/cli/src/commands/backup/policy/list.js +40 -0
- package/lib/cli/src/commands/backup/policy/show.d.ts +11 -0
- package/lib/cli/src/commands/backup/policy/show.js +45 -0
- package/lib/cli/src/commands/backup/restore/create.d.ts +14 -0
- package/lib/cli/src/commands/backup/restore/create.js +68 -0
- package/lib/cli/src/commands/backup/restore/list.d.ts +8 -0
- package/lib/cli/src/commands/backup/restore/list.js +33 -0
- package/lib/cli/src/commands/backup/restore/preview.d.ts +9 -0
- package/lib/cli/src/commands/backup/restore/preview.js +29 -0
- package/lib/cli/src/commands/backup/restore/show.d.ts +11 -0
- package/lib/cli/src/commands/backup/restore/show.js +40 -0
- package/lib/cli/src/commands/catalog/validate.d.ts +14 -0
- package/lib/cli/src/commands/catalog/validate.js +155 -0
- package/lib/cli/src/commands/cluster/destroy.d.ts +15 -0
- package/lib/cli/src/commands/cluster/destroy.js +137 -0
- package/lib/cli/src/commands/config/get.d.ts +9 -0
- package/lib/cli/src/commands/config/get.js +47 -0
- package/lib/cli/src/commands/config/list.d.ts +15 -0
- package/lib/cli/src/commands/config/list.js +109 -0
- package/lib/cli/src/commands/config/remove.d.ts +12 -0
- package/lib/cli/src/commands/config/remove.js +92 -0
- package/lib/cli/src/commands/config/set.d.ts +15 -0
- package/lib/cli/src/commands/config/set.js +152 -0
- package/lib/cli/src/commands/config/show.d.ts +6 -0
- package/lib/cli/src/commands/config/show.js +15 -0
- package/lib/cli/src/commands/context/create.d.ts +12 -0
- package/lib/cli/src/commands/context/create.js +46 -0
- package/lib/cli/src/commands/context/delete.d.ts +12 -0
- package/lib/cli/src/commands/context/delete.js +53 -0
- package/lib/cli/src/commands/context/list.d.ts +6 -0
- package/lib/cli/src/commands/context/list.js +29 -0
- package/lib/cli/src/commands/context/show.d.ts +6 -0
- package/lib/cli/src/commands/context/show.js +12 -0
- package/lib/cli/src/commands/context/use.d.ts +9 -0
- package/lib/cli/src/commands/context/use.js +30 -0
- package/lib/cli/src/commands/deploy.d.ts +49 -0
- package/lib/cli/src/commands/deploy.js +542 -0
- package/lib/cli/src/commands/dev/creds.d.ts +19 -0
- package/lib/cli/src/commands/dev/creds.js +290 -0
- package/lib/cli/src/commands/dev/tunnel.d.ts +15 -0
- package/lib/cli/src/commands/dev/tunnel.js +268 -0
- package/lib/cli/src/commands/dns/cleanup.d.ts +11 -0
- package/lib/cli/src/commands/dns/cleanup.js +93 -0
- package/lib/cli/src/commands/env/capacity.d.ts +12 -0
- package/lib/cli/src/commands/env/capacity.js +177 -0
- package/lib/cli/src/commands/env/create.d.ts +21 -0
- package/lib/cli/src/commands/env/create.js +721 -0
- package/lib/cli/src/commands/env/credentials.d.ts +21 -0
- package/lib/cli/src/commands/env/credentials.js +435 -0
- package/lib/cli/src/commands/env/destroy.d.ts +9 -0
- package/lib/cli/src/commands/env/destroy.js +145 -0
- package/lib/cli/src/commands/env/diag-ca.d.ts +14 -0
- package/lib/cli/src/commands/env/diag-ca.js +192 -0
- package/lib/cli/src/commands/env/export-config.d.ts +39 -0
- package/lib/cli/src/commands/env/export-config.js +386 -0
- package/lib/cli/src/commands/env/force-ready.d.ts +10 -0
- package/lib/cli/src/commands/env/force-ready.js +222 -0
- package/lib/cli/src/commands/env/inspect.d.ts +12 -0
- package/lib/cli/src/commands/env/inspect.js +192 -0
- package/lib/cli/src/commands/env/kubectl.d.ts +9 -0
- package/lib/cli/src/commands/env/kubectl.js +33 -0
- package/lib/cli/src/commands/env/logs.d.ts +12 -0
- package/lib/cli/src/commands/env/logs.js +136 -0
- package/lib/cli/src/commands/env/orphan-volumes.d.ts +11 -0
- package/lib/cli/src/commands/env/orphan-volumes.js +153 -0
- package/lib/cli/src/commands/env/refresh-kubeconfig.d.ts +6 -0
- package/lib/cli/src/commands/env/refresh-kubeconfig.js +66 -0
- package/lib/cli/src/commands/env/repair-ssh-ca.d.ts +11 -0
- package/lib/cli/src/commands/env/repair-ssh-ca.js +137 -0
- package/lib/cli/src/commands/env/restart.d.ts +10 -0
- package/lib/cli/src/commands/env/restart.js +187 -0
- package/lib/cli/src/commands/env/scale-master.d.ts +11 -0
- package/lib/cli/src/commands/env/scale-master.js +160 -0
- package/lib/cli/src/commands/env/scale-node.d.ts +14 -0
- package/lib/cli/src/commands/env/scale-node.js +139 -0
- package/lib/cli/src/commands/env/status.d.ts +10 -0
- package/lib/cli/src/commands/env/status.js +182 -0
- package/lib/cli/src/commands/env/stop.d.ts +6 -0
- package/lib/cli/src/commands/env/stop.js +147 -0
- package/lib/cli/src/commands/env/storage-expand.d.ts +10 -0
- package/lib/cli/src/commands/env/storage-expand.js +124 -0
- package/lib/cli/src/commands/env/storage.d.ts +8 -0
- package/lib/cli/src/commands/env/storage.js +92 -0
- package/lib/cli/src/commands/env/sync.d.ts +17 -0
- package/lib/cli/src/commands/env/sync.js +225 -0
- package/lib/cli/src/commands/env/uncordon.d.ts +9 -0
- package/lib/cli/src/commands/env/uncordon.js +73 -0
- package/lib/cli/src/commands/env/update-firewall.d.ts +9 -0
- package/lib/cli/src/commands/env/update-firewall.js +185 -0
- package/lib/cli/src/commands/integration/connect.d.ts +13 -0
- package/lib/cli/src/commands/integration/connect.js +161 -0
- package/lib/cli/src/commands/integration/ghcr-pat/revoke.d.ts +9 -0
- package/lib/cli/src/commands/integration/ghcr-pat/revoke.js +61 -0
- package/lib/cli/src/commands/integration/ghcr-pat/set.d.ts +12 -0
- package/lib/cli/src/commands/integration/ghcr-pat/set.js +141 -0
- package/lib/cli/src/commands/integration/ghcr-pat/status.d.ts +6 -0
- package/lib/cli/src/commands/integration/ghcr-pat/status.js +69 -0
- package/lib/cli/src/commands/integration/installations.d.ts +6 -0
- package/lib/cli/src/commands/integration/installations.js +45 -0
- package/lib/cli/src/commands/integration/list.d.ts +8 -0
- package/lib/cli/src/commands/integration/list.js +67 -0
- package/lib/cli/src/commands/integration/remove-installation.d.ts +12 -0
- package/lib/cli/src/commands/integration/remove-installation.js +71 -0
- package/lib/cli/src/commands/integration/setup-github-app.d.ts +10 -0
- package/lib/cli/src/commands/integration/setup-github-app.js +162 -0
- package/lib/cli/src/commands/node/add.d.ts +11 -0
- package/lib/cli/src/commands/node/add.js +103 -0
- package/lib/cli/src/commands/node/list.d.ts +11 -0
- package/lib/cli/src/commands/node/list.js +83 -0
- package/lib/cli/src/commands/node/remove.d.ts +16 -0
- package/lib/cli/src/commands/node/remove.js +161 -0
- package/lib/cli/src/commands/reconcile.d.ts +19 -0
- package/lib/cli/src/commands/reconcile.js +171 -0
- package/lib/cli/src/commands/repo/connect.d.ts +12 -0
- package/lib/cli/src/commands/repo/connect.js +133 -0
- package/lib/cli/src/commands/repo/disconnect.d.ts +12 -0
- package/lib/cli/src/commands/repo/disconnect.js +73 -0
- package/lib/cli/src/commands/repo/list.d.ts +9 -0
- package/lib/cli/src/commands/repo/list.js +66 -0
- package/lib/cli/src/commands/server-types/list.d.ts +12 -0
- package/lib/cli/src/commands/server-types/list.js +205 -0
- package/lib/cli/src/commands/ssh.d.ts +9 -0
- package/lib/cli/src/commands/ssh.js +94 -0
- package/lib/cli/src/commands/standalone/install.d.ts +27 -0
- package/lib/cli/src/commands/standalone/install.js +330 -0
- package/lib/cli/src/commands/template/use.d.ts +16 -0
- package/lib/cli/src/commands/template/use.js +111 -0
- package/lib/cli/src/commands/update.d.ts +6 -0
- package/lib/cli/src/commands/update.js +87 -0
- package/lib/cli/src/config/bootstrap.config.d.ts +37 -0
- package/lib/cli/src/config/bootstrap.config.js +33 -0
- package/lib/cli/src/config/defaults.d.ts +46 -0
- package/lib/cli/src/config/defaults.js +79 -0
- package/lib/cli/src/config/key-router.d.ts +22 -0
- package/lib/cli/src/config/key-router.js +45 -0
- package/lib/cli/src/config/preferences-echo.d.ts +9 -0
- package/lib/cli/src/config/preferences-echo.js +61 -0
- package/lib/cli/src/config/preferences-resolver.d.ts +43 -0
- package/lib/cli/src/config/preferences-resolver.js +100 -0
- package/lib/cli/src/config/preferences-schema.d.ts +32 -0
- package/lib/cli/src/config/preferences-schema.js +53 -0
- package/lib/cli/src/hooks/command_not_found.d.ts +3 -0
- package/lib/cli/src/hooks/command_not_found.js +44 -0
- package/lib/cli/src/lib/api-client.d.ts +58 -0
- package/lib/cli/src/lib/api-client.js +162 -0
- package/lib/cli/src/lib/backup-client.d.ts +131 -0
- package/lib/cli/src/lib/backup-client.js +78 -0
- package/lib/cli/src/lib/browser-callback.d.ts +3 -0
- package/lib/cli/src/lib/browser-callback.js +83 -0
- package/lib/cli/src/lib/byos-precheck.d.ts +29 -0
- package/lib/cli/src/lib/byos-precheck.js +162 -0
- package/lib/cli/src/lib/ca-utils.d.ts +13 -0
- package/lib/cli/src/lib/ca-utils.js +72 -0
- package/lib/cli/src/lib/cli-credential-provider.service.d.ts +31 -0
- package/lib/cli/src/lib/cli-credential-provider.service.js +86 -0
- package/lib/cli/src/lib/config-storage.d.ts +128 -0
- package/lib/cli/src/lib/config-storage.js +349 -0
- package/lib/cli/src/lib/config.d.ts +23 -0
- package/lib/cli/src/lib/config.js +113 -0
- package/lib/cli/src/lib/context-banner.d.ts +12 -0
- package/lib/cli/src/lib/context-banner.js +25 -0
- package/lib/cli/src/lib/format-bytes.d.ts +1 -0
- package/lib/cli/src/lib/format-bytes.js +18 -0
- package/lib/cli/src/lib/framework-detector.d.ts +12 -0
- package/lib/cli/src/lib/framework-detector.js +216 -0
- package/lib/cli/src/lib/framework-postchecks.d.ts +11 -0
- package/lib/cli/src/lib/framework-postchecks.js +152 -0
- package/lib/cli/src/lib/nest-app.d.ts +17 -0
- package/lib/cli/src/lib/nest-app.js +69 -0
- package/lib/cli/src/lib/nip-base-domain.util.d.ts +8 -0
- package/lib/cli/src/lib/nip-base-domain.util.js +17 -0
- package/lib/cli/src/lib/profile-manager.d.ts +56 -0
- package/lib/cli/src/lib/profile-manager.js +207 -0
- package/lib/cli/src/lib/prompts.d.ts +67 -0
- package/lib/cli/src/lib/prompts.js +475 -0
- package/lib/cli/src/lib/provider-credential-schemas.d.ts +29 -0
- package/lib/cli/src/lib/provider-credential-schemas.js +48 -0
- package/lib/cli/src/lib/repositories/cli-cluster.repository.d.ts +56 -0
- package/lib/cli/src/lib/repositories/cli-cluster.repository.js +216 -0
- package/lib/cli/src/lib/repositories/cli-firewall.repository.d.ts +13 -0
- package/lib/cli/src/lib/repositories/cli-firewall.repository.js +147 -0
- package/lib/cli/src/lib/repositories/cli-node.repository.d.ts +26 -0
- package/lib/cli/src/lib/repositories/cli-node.repository.js +164 -0
- package/lib/cli/src/lib/repositories/cli-operation.repository.d.ts +57 -0
- package/lib/cli/src/lib/repositories/cli-operation.repository.js +226 -0
- package/lib/cli/src/lib/repositories/cli-vnet.repository.d.ts +22 -0
- package/lib/cli/src/lib/repositories/cli-vnet.repository.js +175 -0
- package/lib/cli/src/lib/repositories/index.d.ts +5 -0
- package/lib/cli/src/lib/repositories/index.js +21 -0
- package/lib/cli/src/lib/resolve-cluster.d.ts +16 -0
- package/lib/cli/src/lib/resolve-cluster.js +34 -0
- package/lib/cli/src/lib/scaleway-validator.d.ts +5 -0
- package/lib/cli/src/lib/scaleway-validator.js +87 -0
- package/lib/cli/src/lib/server-utils.d.ts +8 -0
- package/lib/cli/src/lib/server-utils.js +19 -0
- package/lib/cli/src/lib/services/cli-app.service.d.ts +294 -0
- package/lib/cli/src/lib/services/cli-app.service.js +162 -0
- package/lib/cli/src/lib/services/cli-node.service.d.ts +43 -0
- package/lib/cli/src/lib/services/cli-node.service.js +34 -0
- package/lib/cli/src/lib/services/provider-sync.service.d.ts +90 -0
- package/lib/cli/src/lib/services/provider-sync.service.js +178 -0
- package/lib/cli/src/lib/services/reconciliation.service.d.ts +40 -0
- package/lib/cli/src/lib/services/reconciliation.service.js +119 -0
- package/lib/cli/src/lib/services/vnet-provisioning.service.d.ts +37 -0
- package/lib/cli/src/lib/services/vnet-provisioning.service.js +164 -0
- package/lib/cli/src/lib/ssh-key.d.ts +23 -0
- package/lib/cli/src/lib/ssh-key.js +126 -0
- package/lib/cli/src/lib/template-fetcher.d.ts +25 -0
- package/lib/cli/src/lib/template-fetcher.js +48 -0
- package/lib/cli/src/lib/templates/firewall-rules.d.ts +8 -0
- package/lib/cli/src/lib/templates/firewall-rules.js +17 -0
- package/lib/cli/src/lib/typeorm-shim.d.ts +12 -0
- package/lib/cli/src/lib/typeorm-shim.js +17 -0
- package/lib/cli/src/lib/utils/env-file.d.ts +2 -0
- package/lib/cli/src/lib/utils/env-file.js +40 -0
- package/lib/cli/src/lib/utils/ip-detection.d.ts +27 -0
- package/lib/cli/src/lib/utils/ip-detection.js +144 -0
- package/lib/cli/src/modules/cli-infrastructure.module.d.ts +14 -0
- package/lib/cli/src/modules/cli-infrastructure.module.js +249 -0
- package/lib/cli/src/services/cli-ca.service.d.ts +62 -0
- package/lib/cli/src/services/cli-ca.service.js +281 -0
- package/lib/cli/src/services/cli-cluster-creator.service.d.ts +78 -0
- package/lib/cli/src/services/cli-cluster-creator.service.js +655 -0
- package/lib/cli/src/services/cli-clusters.service.d.ts +74 -0
- package/lib/cli/src/services/cli-clusters.service.js +762 -0
- package/lib/cli/src/services/cli-endpoint-resolver.service.d.ts +33 -0
- package/lib/cli/src/services/cli-endpoint-resolver.service.js +195 -0
- package/lib/cli/src/services/cli-k3s-script.service.d.ts +114 -0
- package/lib/cli/src/services/cli-k3s-script.service.js +288 -0
- package/lib/cli/src/services/cli-logger.service.d.ts +56 -0
- package/lib/cli/src/services/cli-logger.service.js +188 -0
- package/lib/cli/src/services/cli-observability-cluster.service.d.ts +128 -0
- package/lib/cli/src/services/cli-observability-cluster.service.js +525 -0
- package/lib/cli/src/services/cli-ssh.service.d.ts +90 -0
- package/lib/cli/src/services/cli-ssh.service.js +457 -0
- package/lib/cli/src/services/server-type-cache.service.d.ts +34 -0
- package/lib/cli/src/services/server-type-cache.service.js +156 -0
- package/lib/cli/src/services/server-type-validator.service.d.ts +80 -0
- package/lib/cli/src/services/server-type-validator.service.js +366 -0
- package/lib/cli/src/types/index.d.ts +41 -0
- package/lib/cli/src/types/index.js +2 -0
- package/lib/src/common/utils/project-root.util.d.ts +22 -0
- package/lib/src/common/utils/project-root.util.js +78 -0
- package/lib/src/modules/access/access.controller.d.ts +30 -0
- package/lib/src/modules/access/access.controller.js +336 -0
- package/lib/src/modules/access/access.module.d.ts +2 -0
- package/lib/src/modules/access/access.module.js +92 -0
- package/lib/src/modules/access/controllers/ca.controller.d.ts +22 -0
- package/lib/src/modules/access/controllers/ca.controller.js +242 -0
- package/lib/src/modules/access/dto/api-token.dto.d.ts +11 -0
- package/lib/src/modules/access/dto/api-token.dto.js +74 -0
- package/lib/src/modules/access/dto/bearer-token.dto.d.ts +7 -0
- package/lib/src/modules/access/dto/bearer-token.dto.js +36 -0
- package/lib/src/modules/access/dto/ca-public-key.dto.d.ts +7 -0
- package/lib/src/modules/access/dto/ca-public-key.dto.js +52 -0
- package/lib/src/modules/access/dto/create-api-token.dto.d.ts +7 -0
- package/lib/src/modules/access/dto/create-api-token.dto.js +64 -0
- package/lib/src/modules/access/dto/create-bearer-token.dto.d.ts +9 -0
- package/lib/src/modules/access/dto/create-bearer-token.dto.js +58 -0
- package/lib/src/modules/access/dto/create-ssh-key.dto.d.ts +7 -0
- package/lib/src/modules/access/dto/create-ssh-key.dto.js +61 -0
- package/lib/src/modules/access/dto/refresh-token.dto.d.ts +7 -0
- package/lib/src/modules/access/dto/refresh-token.dto.js +46 -0
- package/lib/src/modules/access/dto/register-ca.dto.d.ts +16 -0
- package/lib/src/modules/access/dto/register-ca.dto.js +111 -0
- package/lib/src/modules/access/dto/ssh-key.dto.d.ts +20 -0
- package/lib/src/modules/access/dto/ssh-key.dto.js +124 -0
- package/lib/src/modules/access/dto/update-ssh-key.dto.d.ts +7 -0
- package/lib/src/modules/access/dto/update-ssh-key.dto.js +73 -0
- package/lib/src/modules/access/entities/api-token.entity.d.ts +30 -0
- package/lib/src/modules/access/entities/api-token.entity.js +87 -0
- package/lib/src/modules/access/entities/ca-keypair.entity.d.ts +13 -0
- package/lib/src/modules/access/entities/ca-keypair.entity.js +63 -0
- package/lib/src/modules/access/entities/credentials.entity.d.ts +18 -0
- package/lib/src/modules/access/entities/credentials.entity.js +87 -0
- package/lib/src/modules/access/entities/ssh-key.entity.d.ts +15 -0
- package/lib/src/modules/access/entities/ssh-key.entity.js +81 -0
- package/lib/src/modules/access/enums/credential-purpose.enum.d.ts +4 -0
- package/lib/src/modules/access/enums/credential-purpose.enum.js +8 -0
- package/lib/src/modules/access/interfaces/access.repository.d.ts +11 -0
- package/lib/src/modules/access/interfaces/access.repository.js +2 -0
- package/lib/src/modules/access/interfaces/ssh-key.interface.d.ts +26 -0
- package/lib/src/modules/access/interfaces/ssh-key.interface.js +2 -0
- package/lib/src/modules/access/mapper/api-token.mapper.d.ts +6 -0
- package/lib/src/modules/access/mapper/api-token.mapper.js +21 -0
- package/lib/src/modules/access/mapper/ssh-key.mapper.d.ts +6 -0
- package/lib/src/modules/access/mapper/ssh-key.mapper.js +25 -0
- package/lib/src/modules/access/providers/contabo-ssh-provider.service.d.ts +13 -0
- package/lib/src/modules/access/providers/contabo-ssh-provider.service.js +40 -0
- package/lib/src/modules/access/providers/hetzner-ssh-provider.service.d.ts +17 -0
- package/lib/src/modules/access/providers/hetzner-ssh-provider.service.js +95 -0
- package/lib/src/modules/access/providers/interfaces/ssh-provider.interface.d.ts +8 -0
- package/lib/src/modules/access/providers/interfaces/ssh-provider.interface.js +3 -0
- package/lib/src/modules/access/providers/ssh-provider.factory.d.ts +13 -0
- package/lib/src/modules/access/providers/ssh-provider.factory.js +44 -0
- package/lib/src/modules/access/repositories/api-token.repository.d.ts +24 -0
- package/lib/src/modules/access/repositories/api-token.repository.js +99 -0
- package/lib/src/modules/access/repositories/default-access.repository.d.ts +16 -0
- package/lib/src/modules/access/repositories/default-access.repository.js +121 -0
- package/lib/src/modules/access/repositories/provider-credentials.repository.d.ts +17 -0
- package/lib/src/modules/access/repositories/provider-credentials.repository.js +106 -0
- package/lib/src/modules/access/services/access.service.d.ts +180 -0
- package/lib/src/modules/access/services/access.service.js +732 -0
- package/lib/src/modules/access/services/bearerToken.service.d.ts +15 -0
- package/lib/src/modules/access/services/bearerToken.service.js +107 -0
- package/lib/src/modules/access/services/ca-manager.service.d.ts +48 -0
- package/lib/src/modules/access/services/ca-manager.service.js +293 -0
- package/lib/src/modules/access/services/certificate-signer.service.d.ts +36 -0
- package/lib/src/modules/access/services/certificate-signer.service.js +155 -0
- package/lib/src/modules/access/services/key-storage.service.d.ts +17 -0
- package/lib/src/modules/access/services/key-storage.service.js +133 -0
- package/lib/src/modules/access/services/ssh-key-generator.service.d.ts +6 -0
- package/lib/src/modules/access/services/ssh-key-generator.service.js +51 -0
- package/lib/src/modules/app-builds/entities/app-build.entity.d.ts +38 -0
- package/lib/src/modules/app-builds/entities/app-build.entity.js +168 -0
- package/lib/src/modules/app-builds/enums/app-build-status.enum.d.ts +10 -0
- package/lib/src/modules/app-builds/enums/app-build-status.enum.js +14 -0
- package/lib/src/modules/app-builds/enums/build-provider.enum.d.ts +6 -0
- package/lib/src/modules/app-builds/enums/build-provider.enum.js +10 -0
- package/lib/src/modules/app-builds/services/build-job.service.d.ts +178 -0
- package/lib/src/modules/app-builds/services/build-job.service.js +1057 -0
- package/lib/src/modules/applications/entities/app-resource.entity.d.ts +24 -0
- package/lib/src/modules/applications/entities/app-resource.entity.js +117 -0
- package/lib/src/modules/applications/entities/app-revision.entity.d.ts +29 -0
- package/lib/src/modules/applications/entities/app-revision.entity.js +133 -0
- package/lib/src/modules/applications/entities/application.entity.d.ts +121 -0
- package/lib/src/modules/applications/entities/application.entity.js +279 -0
- package/lib/src/modules/applications/enums/app-event-type.enum.d.ts +24 -0
- package/lib/src/modules/applications/enums/app-event-type.enum.js +28 -0
- package/lib/src/modules/applications/enums/application-category.enum.d.ts +4 -0
- package/lib/src/modules/applications/enums/application-category.enum.js +8 -0
- package/lib/src/modules/applications/enums/application-exposure.enum.d.ts +4 -0
- package/lib/src/modules/applications/enums/application-exposure.enum.js +8 -0
- package/lib/src/modules/applications/enums/application-kind.enum.d.ts +6 -0
- package/lib/src/modules/applications/enums/application-kind.enum.js +10 -0
- package/lib/src/modules/applications/enums/application-resource-kind.enum.d.ts +17 -0
- package/lib/src/modules/applications/enums/application-resource-kind.enum.js +21 -0
- package/lib/src/modules/applications/enums/application-resource-status.enum.d.ts +8 -0
- package/lib/src/modules/applications/enums/application-resource-status.enum.js +12 -0
- package/lib/src/modules/applications/enums/application-source-type.enum.d.ts +6 -0
- package/lib/src/modules/applications/enums/application-source-type.enum.js +10 -0
- package/lib/src/modules/applications/enums/application-status.enum.d.ts +20 -0
- package/lib/src/modules/applications/enums/application-status.enum.js +24 -0
- package/lib/src/modules/applications/interfaces/source-config.interface.d.ts +132 -0
- package/lib/src/modules/applications/interfaces/source-config.interface.js +2 -0
- package/lib/src/modules/auth/decorators/admin.decorator.d.ts +2 -0
- package/lib/src/modules/auth/decorators/admin.decorator.js +7 -0
- package/lib/src/modules/auth/entities/user.entity.d.ts +19 -0
- package/lib/src/modules/auth/entities/user.entity.js +78 -0
- package/lib/src/modules/auth/guards/admin.guard.d.ts +7 -0
- package/lib/src/modules/auth/guards/admin.guard.js +50 -0
- package/lib/src/modules/auth/interfaces/authenticated-user.interface.d.ts +12 -0
- package/lib/src/modules/auth/interfaces/authenticated-user.interface.js +2 -0
- package/lib/src/modules/common/cache/cache.service.d.ts +77 -0
- package/lib/src/modules/common/cache/cache.service.js +232 -0
- package/lib/src/modules/common/cache/cache.tokens.d.ts +1 -0
- package/lib/src/modules/common/cache/cache.tokens.js +4 -0
- package/lib/src/modules/common/cache/enums/cache-category.enum.d.ts +33 -0
- package/lib/src/modules/common/cache/enums/cache-category.enum.js +42 -0
- package/lib/src/modules/common/common.module.d.ts +2 -0
- package/lib/src/modules/common/common.module.js +20 -0
- package/lib/src/modules/common/dto/async-operation-response.dto.d.ts +19 -0
- package/lib/src/modules/common/dto/async-operation-response.dto.js +65 -0
- package/lib/src/modules/common/dto/index.d.ts +1 -0
- package/lib/src/modules/common/dto/index.js +17 -0
- package/lib/src/modules/common/services/label.service.d.ts +70 -0
- package/lib/src/modules/common/services/label.service.js +128 -0
- package/lib/src/modules/dns/entities/app-endpoint.entity.d.ts +57 -0
- package/lib/src/modules/dns/entities/app-endpoint.entity.js +205 -0
- package/lib/src/modules/dns/entities/cluster-dns-zone.entity.d.ts +21 -0
- package/lib/src/modules/dns/entities/cluster-dns-zone.entity.js +88 -0
- package/lib/src/modules/dns/entities/dns-zone.entity.d.ts +12 -0
- package/lib/src/modules/dns/entities/dns-zone.entity.js +53 -0
- package/lib/src/modules/dns/entities/san-certificate.entity.d.ts +29 -0
- package/lib/src/modules/dns/entities/san-certificate.entity.js +132 -0
- package/lib/src/modules/dns/entities/wildcard-certificate.entity.d.ts +26 -0
- package/lib/src/modules/dns/entities/wildcard-certificate.entity.js +111 -0
- package/lib/src/modules/dns/enums/cert-challenge.enum.d.ts +4 -0
- package/lib/src/modules/dns/enums/cert-challenge.enum.js +8 -0
- package/lib/src/modules/dns/enums/endpoint-type.enum.d.ts +4 -0
- package/lib/src/modules/dns/enums/endpoint-type.enum.js +8 -0
- package/lib/src/modules/dns/enums/hostname-mode.enum.d.ts +4 -0
- package/lib/src/modules/dns/enums/hostname-mode.enum.js +8 -0
- package/lib/src/modules/dns/services/cluster-dns-cleanup.service.d.ts +12 -0
- package/lib/src/modules/dns/services/cluster-dns-cleanup.service.js +79 -0
- package/lib/src/modules/dns/utils/nip-hostname.util.d.ts +12 -0
- package/lib/src/modules/dns/utils/nip-hostname.util.js +27 -0
- package/lib/src/modules/dns/utils/nip-token.util.d.ts +2 -0
- package/lib/src/modules/dns/utils/nip-token.util.js +94 -0
- package/lib/src/modules/frameworks/framework-core/enums/build-stage.enum.d.ts +21 -0
- package/lib/src/modules/frameworks/framework-core/enums/build-stage.enum.js +29 -0
- package/lib/src/modules/frameworks/framework-core/enums/deploy-strategy.enum.d.ts +22 -0
- package/lib/src/modules/frameworks/framework-core/enums/deploy-strategy.enum.js +26 -0
- package/lib/src/modules/frameworks/framework-core/enums/framework-type.enum.d.ts +32 -0
- package/lib/src/modules/frameworks/framework-core/enums/framework-type.enum.js +47 -0
- package/lib/src/modules/grafana/services/grafana-config.service.d.ts +43 -0
- package/lib/src/modules/grafana/services/grafana-config.service.js +177 -0
- package/lib/src/modules/grafana/services/grafana-datasource.service.d.ts +70 -0
- package/lib/src/modules/grafana/services/grafana-datasource.service.js +333 -0
- package/lib/src/modules/infrastructure/clusters/clusters.service.d.ts +126 -0
- package/lib/src/modules/infrastructure/clusters/clusters.service.js +265 -0
- package/lib/src/modules/infrastructure/clusters/constants/storage-conventions.d.ts +60 -0
- package/lib/src/modules/infrastructure/clusters/constants/storage-conventions.js +64 -0
- package/lib/src/modules/infrastructure/clusters/dto/build-resources.dto.d.ts +19 -0
- package/lib/src/modules/infrastructure/clusters/dto/build-resources.dto.js +69 -0
- package/lib/src/modules/infrastructure/clusters/dto/cluster-capacity-plan.dto.d.ts +36 -0
- package/lib/src/modules/infrastructure/clusters/dto/cluster-capacity-plan.dto.js +149 -0
- package/lib/src/modules/infrastructure/clusters/dto/cluster-power-management.dto.d.ts +51 -0
- package/lib/src/modules/infrastructure/clusters/dto/cluster-power-management.dto.js +222 -0
- package/lib/src/modules/infrastructure/clusters/dto/cluster-response.dto.d.ts +42 -0
- package/lib/src/modules/infrastructure/clusters/dto/cluster-response.dto.js +238 -0
- package/lib/src/modules/infrastructure/clusters/dto/cluster-storage.dto.d.ts +35 -0
- package/lib/src/modules/infrastructure/clusters/dto/cluster-storage.dto.js +122 -0
- package/lib/src/modules/infrastructure/clusters/dto/create-cluster.dto.d.ts +43 -0
- package/lib/src/modules/infrastructure/clusters/dto/create-cluster.dto.js +334 -0
- package/lib/src/modules/infrastructure/clusters/dto/register-cluster.dto.d.ts +30 -0
- package/lib/src/modules/infrastructure/clusters/dto/register-cluster.dto.js +190 -0
- package/lib/src/modules/infrastructure/clusters/dto/resource-availability.dto.d.ts +15 -0
- package/lib/src/modules/infrastructure/clusters/dto/resource-availability.dto.js +91 -0
- package/lib/src/modules/infrastructure/clusters/entities/cluster-node.entity.d.ts +28 -0
- package/lib/src/modules/infrastructure/clusters/entities/cluster-node.entity.js +104 -0
- package/lib/src/modules/infrastructure/clusters/entities/cluster.entity.d.ts +64 -0
- package/lib/src/modules/infrastructure/clusters/entities/cluster.entity.js +199 -0
- package/lib/src/modules/infrastructure/clusters/entities/node-billable-interval.entity.d.ts +17 -0
- package/lib/src/modules/infrastructure/clusters/entities/node-billable-interval.entity.js +86 -0
- package/lib/src/modules/infrastructure/clusters/entities/volume-billable-interval.entity.d.ts +18 -0
- package/lib/src/modules/infrastructure/clusters/entities/volume-billable-interval.entity.js +79 -0
- package/lib/src/modules/infrastructure/clusters/services/billing-intervals.service.d.ts +48 -0
- package/lib/src/modules/infrastructure/clusters/services/billing-intervals.service.js +159 -0
- package/lib/src/modules/infrastructure/clusters/services/cluster-capacity.service.d.ts +23 -0
- package/lib/src/modules/infrastructure/clusters/services/cluster-capacity.service.js +198 -0
- package/lib/src/modules/infrastructure/clusters/services/cluster-creation.service.d.ts +25 -0
- package/lib/src/modules/infrastructure/clusters/services/cluster-creation.service.js +192 -0
- package/lib/src/modules/infrastructure/clusters/services/cluster-deletion.service.d.ts +36 -0
- package/lib/src/modules/infrastructure/clusters/services/cluster-deletion.service.js +159 -0
- package/lib/src/modules/infrastructure/clusters/services/cluster-firewall-integration.service.d.ts +25 -0
- package/lib/src/modules/infrastructure/clusters/services/cluster-firewall-integration.service.js +90 -0
- package/lib/src/modules/infrastructure/clusters/services/cluster-mapper.service.d.ts +15 -0
- package/lib/src/modules/infrastructure/clusters/services/cluster-mapper.service.js +63 -0
- package/lib/src/modules/infrastructure/clusters/services/cluster-node-scaling.service.d.ts +78 -0
- package/lib/src/modules/infrastructure/clusters/services/cluster-node-scaling.service.js +644 -0
- package/lib/src/modules/infrastructure/clusters/services/cluster-operations.service.d.ts +37 -0
- package/lib/src/modules/infrastructure/clusters/services/cluster-operations.service.js +244 -0
- package/lib/src/modules/infrastructure/clusters/services/cluster-power-management.service.d.ts +68 -0
- package/lib/src/modules/infrastructure/clusters/services/cluster-power-management.service.js +716 -0
- package/lib/src/modules/infrastructure/clusters/services/cluster-storage.service.d.ts +15 -0
- package/lib/src/modules/infrastructure/clusters/services/cluster-storage.service.js +179 -0
- package/lib/src/modules/infrastructure/clusters/services/cluster-validation.service.d.ts +29 -0
- package/lib/src/modules/infrastructure/clusters/services/cluster-validation.service.js +100 -0
- package/lib/src/modules/infrastructure/firewalls/dto/cluster-firewall.dto.d.ts +62 -0
- package/lib/src/modules/infrastructure/firewalls/dto/cluster-firewall.dto.js +252 -0
- package/lib/src/modules/infrastructure/firewalls/entities/cluster-firewall.entity.d.ts +20 -0
- package/lib/src/modules/infrastructure/firewalls/entities/cluster-firewall.entity.js +83 -0
- package/lib/src/modules/infrastructure/firewalls/services/firewall-desired-state.service.d.ts +73 -0
- package/lib/src/modules/infrastructure/firewalls/services/firewall-desired-state.service.js +329 -0
- package/lib/src/modules/infrastructure/firewalls/services/firewall-reconciliation.service.d.ts +43 -0
- package/lib/src/modules/infrastructure/firewalls/services/firewall-reconciliation.service.js +212 -0
- package/lib/src/modules/infrastructure/firewalls/templates/firewall-rules.template.d.ts +54 -0
- package/lib/src/modules/infrastructure/firewalls/templates/firewall-rules.template.js +167 -0
- package/lib/src/modules/infrastructure/operations/helpers/operation-steps.helper.d.ts +34 -0
- package/lib/src/modules/infrastructure/operations/helpers/operation-steps.helper.js +401 -0
- package/lib/src/modules/infrastructure/servers/dto/create-server.dto.d.ts +40 -0
- package/lib/src/modules/infrastructure/servers/dto/create-server.dto.js +157 -0
- package/lib/src/modules/infrastructure/servers/dto/delete-server.dto.d.ts +17 -0
- package/lib/src/modules/infrastructure/servers/dto/delete-server.dto.js +85 -0
- package/lib/src/modules/infrastructure/servers/dto/server-response.dto.d.ts +29 -0
- package/lib/src/modules/infrastructure/servers/dto/server-response.dto.js +147 -0
- package/lib/src/modules/infrastructure/servers/entities/infrastructure-operations.entity.d.ts +266 -0
- package/lib/src/modules/infrastructure/servers/entities/infrastructure-operations.entity.js +348 -0
- package/lib/src/modules/infrastructure/shared/enums/reconciliation-status.enum.d.ts +7 -0
- package/lib/src/modules/infrastructure/shared/enums/reconciliation-status.enum.js +11 -0
- package/lib/src/modules/infrastructure/shared/services/kubernetes.service.d.ts +304 -0
- package/lib/src/modules/infrastructure/shared/services/kubernetes.service.js +1164 -0
- package/lib/src/modules/infrastructure/shared/services/label.service.d.ts +97 -0
- package/lib/src/modules/infrastructure/shared/services/label.service.js +189 -0
- package/lib/src/modules/infrastructure/shared/shared-infrastructure.module.d.ts +2 -0
- package/lib/src/modules/infrastructure/shared/shared-infrastructure.module.js +24 -0
- package/lib/src/modules/infrastructure/vnets/entities/vnet-route.entity.d.ts +10 -0
- package/lib/src/modules/infrastructure/vnets/entities/vnet-route.entity.js +51 -0
- package/lib/src/modules/infrastructure/vnets/entities/vnet-subnet.entity.d.ts +20 -0
- package/lib/src/modules/infrastructure/vnets/entities/vnet-subnet.entity.js +77 -0
- package/lib/src/modules/infrastructure/vnets/entities/vnet.entity.d.ts +28 -0
- package/lib/src/modules/infrastructure/vnets/entities/vnet.entity.js +88 -0
- package/lib/src/modules/instances/entities/instance-status.enum.d.ts +12 -0
- package/lib/src/modules/instances/entities/instance-status.enum.js +16 -0
- package/lib/src/modules/instances/entities/instance-type.enum.d.ts +6 -0
- package/lib/src/modules/instances/entities/instance-type.enum.js +10 -0
- package/lib/src/modules/instances/entities/instance.entity.d.ts +41 -0
- package/lib/src/modules/instances/entities/instance.entity.js +126 -0
- package/lib/src/modules/management/dto/configure-provider.dto.d.ts +8 -0
- package/lib/src/modules/management/dto/configure-provider.dto.js +51 -0
- package/lib/src/modules/management/dto/credentials.dto.d.ts +15 -0
- package/lib/src/modules/management/dto/credentials.dto.js +114 -0
- package/lib/src/modules/management/dto/health-status.dto.d.ts +12 -0
- package/lib/src/modules/management/dto/health-status.dto.js +40 -0
- package/lib/src/modules/management/dto/node-size-option.dto.d.ts +37 -0
- package/lib/src/modules/management/dto/node-size-option.dto.js +178 -0
- package/lib/src/modules/management/dto/pricing-query.dto.d.ts +5 -0
- package/lib/src/modules/management/dto/pricing-query.dto.js +36 -0
- package/lib/src/modules/management/dto/pricing-response.dto.d.ts +21 -0
- package/lib/src/modules/management/dto/pricing-response.dto.js +80 -0
- package/lib/src/modules/management/dto/provider-configuration.dto.d.ts +23 -0
- package/lib/src/modules/management/dto/provider-configuration.dto.js +72 -0
- package/lib/src/modules/management/dto/provider-filters.dto.d.ts +7 -0
- package/lib/src/modules/management/dto/provider-filters.dto.js +45 -0
- package/lib/src/modules/management/dto/validation-result.dto.d.ts +16 -0
- package/lib/src/modules/management/dto/validation-result.dto.js +35 -0
- package/lib/src/modules/management/entities/credentials.entity.d.ts +21 -0
- package/lib/src/modules/management/entities/credentials.entity.js +10 -0
- package/lib/src/modules/management/entities/provider-capabilities.entity.d.ts +85 -0
- package/lib/src/modules/management/entities/provider-capabilities.entity.js +2 -0
- package/lib/src/modules/management/entities/provider-configuration.entity.d.ts +14 -0
- package/lib/src/modules/management/entities/provider-configuration.entity.js +65 -0
- package/lib/src/modules/management/entities/provider-definition.entity.d.ts +19 -0
- package/lib/src/modules/management/entities/provider-definition.entity.js +2 -0
- package/lib/src/modules/management/entities/provider-region.entity.d.ts +11 -0
- package/lib/src/modules/management/entities/provider-region.entity.js +2 -0
- package/lib/src/modules/management/entities/provider-status.enum.d.ts +8 -0
- package/lib/src/modules/management/entities/provider-status.enum.js +12 -0
- package/lib/src/modules/management/interfaces/provider-configuration.repository.interface.d.ts +17 -0
- package/lib/src/modules/management/interfaces/provider-configuration.repository.interface.js +2 -0
- package/lib/src/modules/management/repositories/provider-configuration.repository.d.ts +21 -0
- package/lib/src/modules/management/repositories/provider-configuration.repository.js +89 -0
- package/lib/src/modules/management/services/configuration-mode.service.d.ts +20 -0
- package/lib/src/modules/management/services/configuration-mode.service.js +54 -0
- package/lib/src/modules/management/services/management.service.d.ts +72 -0
- package/lib/src/modules/management/services/management.service.js +546 -0
- package/lib/src/modules/management/services/provider-definitions.service.d.ts +26 -0
- package/lib/src/modules/management/services/provider-definitions.service.js +133 -0
- package/lib/src/modules/providers/controllers/provider-firewalls.controller.d.ts +28 -0
- package/lib/src/modules/providers/controllers/provider-firewalls.controller.js +277 -0
- package/lib/src/modules/providers/core/factories/capabilities-provider.factory.d.ts +10 -0
- package/lib/src/modules/providers/core/factories/capabilities-provider.factory.js +39 -0
- package/lib/src/modules/providers/core/factories/certificate-provider.factory.d.ts +11 -0
- package/lib/src/modules/providers/core/factories/certificate-provider.factory.js +58 -0
- package/lib/src/modules/providers/core/factories/dns-provider.factory.d.ts +12 -0
- package/lib/src/modules/providers/core/factories/dns-provider.factory.js +65 -0
- package/lib/src/modules/providers/core/factories/firewall-provider.factory.d.ts +12 -0
- package/lib/src/modules/providers/core/factories/firewall-provider.factory.js +61 -0
- package/lib/src/modules/providers/core/factories/provider.factory.d.ts +9 -0
- package/lib/src/modules/providers/core/factories/provider.factory.js +47 -0
- package/lib/src/modules/providers/core/factories/vm-backup-provider.factory.d.ts +12 -0
- package/lib/src/modules/providers/core/factories/vm-backup-provider.factory.js +56 -0
- package/lib/src/modules/providers/core/factories/volume-export.factory.d.ts +12 -0
- package/lib/src/modules/providers/core/factories/volume-export.factory.js +56 -0
- package/lib/src/modules/providers/core/interfaces/certificate-provider.interface.d.ts +1 -0
- package/lib/src/modules/providers/core/interfaces/certificate-provider.interface.js +17 -0
- package/lib/src/modules/providers/core/interfaces/cloud-provider.interface.d.ts +1 -0
- package/lib/src/modules/providers/core/interfaces/cloud-provider.interface.js +17 -0
- package/lib/src/modules/providers/core/interfaces/dns-provider.interface.d.ts +1 -0
- package/lib/src/modules/providers/core/interfaces/dns-provider.interface.js +17 -0
- package/lib/src/modules/providers/core/interfaces/firewall-provider.interface.d.ts +1 -0
- package/lib/src/modules/providers/core/interfaces/firewall-provider.interface.js +17 -0
- package/lib/src/modules/providers/core/interfaces/provider-bootstrap-seeder.interface.d.ts +54 -0
- package/lib/src/modules/providers/core/interfaces/provider-bootstrap-seeder.interface.js +2 -0
- package/lib/src/modules/providers/core/tokens.d.ts +59 -0
- package/lib/src/modules/providers/core/tokens.js +19 -0
- package/lib/src/modules/providers/data/region-coordinates.d.ts +6 -0
- package/lib/src/modules/providers/data/region-coordinates.js +25 -0
- package/lib/src/modules/providers/dto/firewall.dto.d.ts +30 -0
- package/lib/src/modules/providers/dto/firewall.dto.js +105 -0
- package/lib/src/modules/providers/dto/node-size.dto.d.ts +46 -0
- package/lib/src/modules/providers/dto/node-size.dto.js +22 -0
- package/lib/src/modules/providers/dto/pricing.dto.d.ts +24 -0
- package/lib/src/modules/providers/dto/pricing.dto.js +19 -0
- package/lib/src/modules/providers/dto/provider-firewall-response.dto.d.ts +28 -0
- package/lib/src/modules/providers/dto/provider-firewall-response.dto.js +134 -0
- package/lib/src/modules/providers/enums/certificate-provider.enum.d.ts +4 -0
- package/lib/src/modules/providers/enums/certificate-provider.enum.js +8 -0
- package/lib/src/modules/providers/enums/cloud-provider.enum.d.ts +5 -0
- package/lib/src/modules/providers/enums/cloud-provider.enum.js +9 -0
- package/lib/src/modules/providers/enums/dns-provider.enum.d.ts +5 -0
- package/lib/src/modules/providers/enums/dns-provider.enum.js +9 -0
- package/lib/src/modules/providers/implementations/contabo/contabo-capabilities.service.d.ts +19 -0
- package/lib/src/modules/providers/implementations/contabo/contabo-capabilities.service.js +254 -0
- package/lib/src/modules/providers/implementations/contabo/contabo-provider.module.d.ts +10 -0
- package/lib/src/modules/providers/implementations/contabo/contabo-provider.module.js +72 -0
- package/lib/src/modules/providers/implementations/contabo/generated/api.d.ts +13374 -0
- package/lib/src/modules/providers/implementations/contabo/generated/api.js +11341 -0
- package/lib/src/modules/providers/implementations/contabo/generated/base.d.ts +66 -0
- package/lib/src/modules/providers/implementations/contabo/generated/base.js +66 -0
- package/lib/src/modules/providers/implementations/contabo/generated/common.d.ts +65 -0
- package/lib/src/modules/providers/implementations/contabo/generated/common.js +152 -0
- package/lib/src/modules/providers/implementations/contabo/generated/configuration.d.ts +91 -0
- package/lib/src/modules/providers/implementations/contabo/generated/configuration.js +50 -0
- package/lib/src/modules/providers/implementations/contabo/generated/index.d.ts +13 -0
- package/lib/src/modules/providers/implementations/contabo/generated/index.js +31 -0
- package/lib/src/modules/providers/implementations/hetzner/generated/api.d.ts +18419 -0
- package/lib/src/modules/providers/implementations/hetzner/generated/api.js +19133 -0
- package/lib/src/modules/providers/implementations/hetzner/generated/base.d.ts +66 -0
- package/lib/src/modules/providers/implementations/hetzner/generated/base.js +66 -0
- package/lib/src/modules/providers/implementations/hetzner/generated/common.d.ts +65 -0
- package/lib/src/modules/providers/implementations/hetzner/generated/common.js +152 -0
- package/lib/src/modules/providers/implementations/hetzner/generated/configuration.d.ts +91 -0
- package/lib/src/modules/providers/implementations/hetzner/generated/configuration.js +50 -0
- package/lib/src/modules/providers/implementations/hetzner/generated/index.d.ts +13 -0
- package/lib/src/modules/providers/implementations/hetzner/generated/index.js +31 -0
- package/lib/src/modules/providers/implementations/hetzner/hetzner-bootstrap-seeder.service.d.ts +19 -0
- package/lib/src/modules/providers/implementations/hetzner/hetzner-bootstrap-seeder.service.js +68 -0
- package/lib/src/modules/providers/implementations/hetzner/hetzner-capabilities.service.d.ts +29 -0
- package/lib/src/modules/providers/implementations/hetzner/hetzner-capabilities.service.js +392 -0
- package/lib/src/modules/providers/implementations/hetzner/hetzner-provider.module.d.ts +2 -0
- package/lib/src/modules/providers/implementations/hetzner/hetzner-provider.module.js +81 -0
- package/lib/src/modules/providers/implementations/hetzner/hetzner-volume-operations.service.d.ts +31 -0
- package/lib/src/modules/providers/implementations/hetzner/hetzner-volume-operations.service.js +312 -0
- package/lib/src/modules/providers/implementations/hetzner/object-storage/hetzner-object-storage-connection.controller.d.ts +18 -0
- package/lib/src/modules/providers/implementations/hetzner/object-storage/hetzner-object-storage-connection.controller.js +67 -0
- package/lib/src/modules/providers/implementations/hetzner/object-storage/hetzner-object-storage-connection.service.d.ts +24 -0
- package/lib/src/modules/providers/implementations/hetzner/object-storage/hetzner-object-storage-connection.service.js +107 -0
- package/lib/src/modules/providers/implementations/hetzner/object-storage/hetzner-object-storage.backend.d.ts +7 -0
- package/lib/src/modules/providers/implementations/hetzner/object-storage/hetzner-object-storage.backend.js +35 -0
- package/lib/src/modules/providers/implementations/hetzner/object-storage/hetzner-object-storage.module.d.ts +8 -0
- package/lib/src/modules/providers/implementations/hetzner/object-storage/hetzner-object-storage.module.js +60 -0
- package/lib/src/modules/providers/implementations/hetzner/object-storage/hetzner-object-storage.provisioner.d.ts +22 -0
- package/lib/src/modules/providers/implementations/hetzner/object-storage/hetzner-object-storage.provisioner.js +100 -0
- package/lib/src/modules/providers/implementations/hetzner/vm-backup/hetzner-vm-backup.service.d.ts +20 -0
- package/lib/src/modules/providers/implementations/hetzner/vm-backup/hetzner-vm-backup.service.js +118 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/baremetal/api.d.ts +4227 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/baremetal/api.js +3362 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/baremetal/base.d.ts +66 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/baremetal/base.js +66 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/baremetal/common.d.ts +65 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/baremetal/common.js +152 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/baremetal/configuration.d.ts +91 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/baremetal/configuration.js +50 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/baremetal/index.d.ts +13 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/baremetal/index.js +31 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/domain/api.d.ts +2486 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/domain/api.js +2424 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/domain/base.d.ts +66 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/domain/base.js +66 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/domain/common.d.ts +65 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/domain/common.js +152 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/domain/configuration.d.ts +91 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/domain/configuration.js +50 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/domain/index.d.ts +13 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/domain/index.js +31 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/iam/api.d.ts +6425 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/iam/api.js +6925 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/iam/base.d.ts +66 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/iam/base.js +66 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/iam/common.d.ts +65 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/iam/common.js +152 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/iam/configuration.d.ts +91 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/iam/configuration.js +50 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/iam/index.d.ts +13 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/iam/index.js +31 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/instances/api.d.ts +11187 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/instances/api.js +9264 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/instances/base.d.ts +66 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/instances/base.js +66 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/instances/common.d.ts +65 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/instances/common.js +152 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/instances/configuration.d.ts +91 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/instances/configuration.js +50 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/instances/index.d.ts +13 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/instances/index.js +31 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/private-network/api.d.ts +492 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/private-network/api.js +531 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/private-network/base.d.ts +66 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/private-network/base.js +66 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/private-network/common.d.ts +65 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/private-network/common.js +152 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/private-network/configuration.d.ts +91 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/private-network/configuration.js +50 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/private-network/index.d.ts +13 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/private-network/index.js +31 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/vpc/api.d.ts +2305 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/vpc/api.js +2443 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/vpc/base.d.ts +66 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/vpc/base.js +66 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/vpc/common.d.ts +65 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/vpc/common.js +152 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/vpc/configuration.d.ts +91 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/vpc/configuration.js +50 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/vpc/index.d.ts +13 -0
- package/lib/src/modules/providers/implementations/scaleway/generated/vpc/index.js +31 -0
- package/lib/src/modules/providers/implementations/scaleway/object-storage/scaleway-object-storage.backend.d.ts +8 -0
- package/lib/src/modules/providers/implementations/scaleway/object-storage/scaleway-object-storage.backend.js +49 -0
- package/lib/src/modules/providers/implementations/scaleway/object-storage/scaleway-object-storage.module.d.ts +9 -0
- package/lib/src/modules/providers/implementations/scaleway/object-storage/scaleway-object-storage.module.js +56 -0
- package/lib/src/modules/providers/implementations/scaleway/object-storage/scaleway-object-storage.provisioner.d.ts +27 -0
- package/lib/src/modules/providers/implementations/scaleway/object-storage/scaleway-object-storage.provisioner.js +120 -0
- package/lib/src/modules/providers/implementations/scaleway/scaleway-baremetal.adapter.d.ts +22 -0
- package/lib/src/modules/providers/implementations/scaleway/scaleway-baremetal.adapter.js +140 -0
- package/lib/src/modules/providers/implementations/scaleway/scaleway-bootstrap-seeder.service.d.ts +12 -0
- package/lib/src/modules/providers/implementations/scaleway/scaleway-bootstrap-seeder.service.js +65 -0
- package/lib/src/modules/providers/implementations/scaleway/scaleway-capabilities.service.d.ts +23 -0
- package/lib/src/modules/providers/implementations/scaleway/scaleway-capabilities.service.js +319 -0
- package/lib/src/modules/providers/implementations/scaleway/scaleway-dns.service.d.ts +24 -0
- package/lib/src/modules/providers/implementations/scaleway/scaleway-dns.service.js +189 -0
- package/lib/src/modules/providers/implementations/scaleway/scaleway-firewall.service.d.ts +43 -0
- package/lib/src/modules/providers/implementations/scaleway/scaleway-firewall.service.js +455 -0
- package/lib/src/modules/providers/implementations/scaleway/scaleway-iam.adapter.d.ts +32 -0
- package/lib/src/modules/providers/implementations/scaleway/scaleway-iam.adapter.js +108 -0
- package/lib/src/modules/providers/implementations/scaleway/scaleway-instances.adapter.d.ts +66 -0
- package/lib/src/modules/providers/implementations/scaleway/scaleway-instances.adapter.js +289 -0
- package/lib/src/modules/providers/implementations/scaleway/scaleway-provider.module.d.ts +17 -0
- package/lib/src/modules/providers/implementations/scaleway/scaleway-provider.module.js +122 -0
- package/lib/src/modules/providers/implementations/scaleway/scaleway-provider.service.d.ts +100 -0
- package/lib/src/modules/providers/implementations/scaleway/scaleway-provider.service.js +1395 -0
- package/lib/src/modules/providers/implementations/scaleway/scaleway-volume-operations.service.d.ts +24 -0
- package/lib/src/modules/providers/implementations/scaleway/scaleway-volume-operations.service.js +199 -0
- package/lib/src/modules/providers/implementations/scaleway/scaleway-vpc.adapter.d.ts +30 -0
- package/lib/src/modules/providers/implementations/scaleway/scaleway-vpc.adapter.js +180 -0
- package/lib/src/modules/providers/index.d.ts +17 -0
- package/lib/src/modules/providers/index.js +39 -0
- package/lib/src/modules/providers/interfaces/certificate-provider.interface.d.ts +38 -0
- package/lib/src/modules/providers/interfaces/certificate-provider.interface.js +11 -0
- package/lib/src/modules/providers/interfaces/cloud-provider.interface.d.ts +215 -0
- package/lib/src/modules/providers/interfaces/cloud-provider.interface.js +2 -0
- package/lib/src/modules/providers/interfaces/credential-provider.interface.d.ts +23 -0
- package/lib/src/modules/providers/interfaces/credential-provider.interface.js +2 -0
- package/lib/src/modules/providers/interfaces/dns-provider.interface.d.ts +55 -0
- package/lib/src/modules/providers/interfaces/dns-provider.interface.js +12 -0
- package/lib/src/modules/providers/interfaces/firewall-provider.interface.d.ts +47 -0
- package/lib/src/modules/providers/interfaces/firewall-provider.interface.js +2 -0
- package/lib/src/modules/providers/interfaces/network-provider.interface.d.ts +124 -0
- package/lib/src/modules/providers/interfaces/network-provider.interface.js +2 -0
- package/lib/src/modules/providers/interfaces/provider-capabilities.interface.d.ts +87 -0
- package/lib/src/modules/providers/interfaces/provider-capabilities.interface.js +2 -0
- package/lib/src/modules/providers/interfaces/vm-backup-provider.interface.d.ts +39 -0
- package/lib/src/modules/providers/interfaces/vm-backup-provider.interface.js +8 -0
- package/lib/src/modules/providers/interfaces/volume-export.interface.d.ts +162 -0
- package/lib/src/modules/providers/interfaces/volume-export.interface.js +21 -0
- package/lib/src/modules/providers/interfaces/volume-operations.interface.d.ts +149 -0
- package/lib/src/modules/providers/interfaces/volume-operations.interface.js +17 -0
- package/lib/src/modules/providers/mappers/node-size.mapper.d.ts +20 -0
- package/lib/src/modules/providers/mappers/node-size.mapper.js +75 -0
- package/lib/src/modules/providers/mappers/pricing.mapper.d.ts +14 -0
- package/lib/src/modules/providers/mappers/pricing.mapper.js +60 -0
- package/lib/src/modules/providers/provider-core.module.d.ts +13 -0
- package/lib/src/modules/providers/provider-core.module.js +59 -0
- package/lib/src/modules/providers/providers.module.d.ts +2 -0
- package/lib/src/modules/providers/providers.module.js +188 -0
- package/lib/src/modules/providers/services/acme-certificate.service.d.ts +38 -0
- package/lib/src/modules/providers/services/acme-certificate.service.js +144 -0
- package/lib/src/modules/providers/services/contabo-firewall.service.d.ts +11 -0
- package/lib/src/modules/providers/services/contabo-firewall.service.js +40 -0
- package/lib/src/modules/providers/services/contabo-provider.service.d.ts +48 -0
- package/lib/src/modules/providers/services/contabo-provider.service.js +194 -0
- package/lib/src/modules/providers/services/credential-provider.service.d.ts +17 -0
- package/lib/src/modules/providers/services/credential-provider.service.js +78 -0
- package/lib/src/modules/providers/services/dns-provider.factory.d.ts +5 -0
- package/lib/src/modules/providers/services/dns-provider.factory.js +9 -0
- package/lib/src/modules/providers/services/firewall-provider.factory.d.ts +5 -0
- package/lib/src/modules/providers/services/firewall-provider.factory.js +9 -0
- package/lib/src/modules/providers/services/hetzner-dns.service.d.ts +71 -0
- package/lib/src/modules/providers/services/hetzner-dns.service.js +565 -0
- package/lib/src/modules/providers/services/hetzner-firewall.service.d.ts +48 -0
- package/lib/src/modules/providers/services/hetzner-firewall.service.js +472 -0
- package/lib/src/modules/providers/services/hetzner-network.service.d.ts +84 -0
- package/lib/src/modules/providers/services/hetzner-network.service.js +408 -0
- package/lib/src/modules/providers/services/hetzner-provider.service.d.ts +213 -0
- package/lib/src/modules/providers/services/hetzner-provider.service.js +1159 -0
- package/lib/src/modules/providers/services/provider.factory.d.ts +5 -0
- package/lib/src/modules/providers/services/provider.factory.js +9 -0
- package/lib/src/modules/providers/services/volume-export.service.d.ts +50 -0
- package/lib/src/modules/providers/services/volume-export.service.js +650 -0
- package/lib/src/modules/shared/encryption/encryption.module.d.ts +2 -0
- package/lib/src/modules/shared/encryption/encryption.module.js +22 -0
- package/lib/src/modules/shared/encryption/services/encryption.service.d.ts +47 -0
- package/lib/src/modules/shared/encryption/services/encryption.service.js +199 -0
- package/lib/src/modules/storage/enums/storage-backend-provider.enum.d.ts +19 -0
- package/lib/src/modules/storage/enums/storage-backend-provider.enum.js +23 -0
- package/lib/src/modules/storage/factories/object-storage-provisioner.factory.d.ts +11 -0
- package/lib/src/modules/storage/factories/object-storage-provisioner.factory.js +48 -0
- package/lib/src/modules/storage/factories/storage-backend.factory.d.ts +12 -0
- package/lib/src/modules/storage/factories/storage-backend.factory.js +51 -0
- package/lib/src/modules/storage/implementations/generic-s3.backend.d.ts +23 -0
- package/lib/src/modules/storage/implementations/generic-s3.backend.js +172 -0
- package/lib/src/modules/storage/interfaces/backup-storage-backend.interface.d.ts +48 -0
- package/lib/src/modules/storage/interfaces/backup-storage-backend.interface.js +2 -0
- package/lib/src/modules/storage/interfaces/object-storage-provisioner.interface.d.ts +55 -0
- package/lib/src/modules/storage/interfaces/object-storage-provisioner.interface.js +9 -0
- package/lib/src/modules/storage/storage.module.d.ts +2 -0
- package/lib/src/modules/storage/storage.module.js +21 -0
- package/lib/src/modules/storage/tokens/object-storage-provisioner-registry.token.d.ts +12 -0
- package/lib/src/modules/storage/tokens/object-storage-provisioner-registry.token.js +8 -0
- package/lib/src/modules/storage/tokens/storage-backend-registry.token.d.ts +12 -0
- package/lib/src/modules/storage/tokens/storage-backend-registry.token.js +8 -0
- package/lib/src/modules/terminal/services/native-ssh-connection.service.d.ts +48 -0
- package/lib/src/modules/terminal/services/native-ssh-connection.service.js +282 -0
- package/oclif.manifest.json +5243 -0
- package/package.json +125 -0
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const core_1 = require("@oclif/core");
|
|
7
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
8
|
+
const ora_1 = __importDefault(require("ora"));
|
|
9
|
+
const cli_app_service_1 = require("../../../lib/services/cli-app.service");
|
|
10
|
+
const resolve_cluster_1 = require("../../../lib/resolve-cluster");
|
|
11
|
+
const format_bytes_1 = require("../../../lib/format-bytes");
|
|
12
|
+
class AppBackupCreate extends core_1.Command {
|
|
13
|
+
async run() {
|
|
14
|
+
const { args, flags } = await this.parse(AppBackupCreate);
|
|
15
|
+
let destination;
|
|
16
|
+
if (flags.bucket) {
|
|
17
|
+
if (!flags.endpoint) {
|
|
18
|
+
this.error('--endpoint is required when --bucket is set');
|
|
19
|
+
}
|
|
20
|
+
if (!flags['access-key'] || !flags['secret-key']) {
|
|
21
|
+
this.error('S3 credentials missing. Pass --access-key/--secret-key or set FLUI_S3_ACCESS_KEY/FLUI_S3_SECRET_KEY.');
|
|
22
|
+
}
|
|
23
|
+
destination = {
|
|
24
|
+
bucket: flags.bucket,
|
|
25
|
+
endpoint: flags.endpoint,
|
|
26
|
+
region: flags.region,
|
|
27
|
+
accessKeyId: flags['access-key'],
|
|
28
|
+
secretAccessKey: flags['secret-key'],
|
|
29
|
+
keyPrefix: flags['key-prefix'],
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
const target = destination
|
|
33
|
+
? `s3://${destination.bucket}`
|
|
34
|
+
: 'auto-provisioned bucket';
|
|
35
|
+
const spinner = (0, ora_1.default)(`Backing up "${args.name}" to ${target}...`).start();
|
|
36
|
+
try {
|
|
37
|
+
const { id: clusterId } = await (0, resolve_cluster_1.resolveCluster)(flags.cluster);
|
|
38
|
+
const service = await cli_app_service_1.CliAppService.create(clusterId);
|
|
39
|
+
const app = await service.getAppByName(args.name);
|
|
40
|
+
const backup = await service.createAppBackup(app.id, {
|
|
41
|
+
volumeName: flags.volume,
|
|
42
|
+
description: flags.description,
|
|
43
|
+
destination,
|
|
44
|
+
});
|
|
45
|
+
spinner.succeed(`Backup uploaded: ${backup.exportId}`);
|
|
46
|
+
console.log('');
|
|
47
|
+
console.log(` ${chalk_1.default.bold('Provider:')} ${backup.provider}`);
|
|
48
|
+
console.log(` ${chalk_1.default.bold('Namespace:')} ${backup.namespace}`);
|
|
49
|
+
console.log(` ${chalk_1.default.bold('Source:')} ${backup.sourcePvcName}`);
|
|
50
|
+
console.log(` ${chalk_1.default.bold('Source request:')} ${backup.sizeGb} GiB`);
|
|
51
|
+
const uploaded = backup.actualBytes === undefined
|
|
52
|
+
? 'unknown'
|
|
53
|
+
: (0, format_bytes_1.formatBytes)(backup.actualBytes);
|
|
54
|
+
console.log(` ${chalk_1.default.bold('Uploaded:')} ${uploaded}`);
|
|
55
|
+
console.log(` ${chalk_1.default.bold('Bucket:')} ${backup.destination.bucket}`);
|
|
56
|
+
console.log(` ${chalk_1.default.bold('Endpoint:')} ${backup.destination.endpoint}`);
|
|
57
|
+
console.log(` ${chalk_1.default.bold('Prefix:')} ${backup.exportId}`);
|
|
58
|
+
console.log(` ${chalk_1.default.bold('Created:')} ${backup.createdAt}`);
|
|
59
|
+
console.log('');
|
|
60
|
+
if (!destination) {
|
|
61
|
+
console.log(chalk_1.default.dim(` Bucket auto-provisioned by ${backup.provider} object storage.`));
|
|
62
|
+
}
|
|
63
|
+
console.log('');
|
|
64
|
+
}
|
|
65
|
+
catch (error) {
|
|
66
|
+
spinner.fail('Backup failed');
|
|
67
|
+
const msg = error.response?.data?.message ?? error.message ?? String(error);
|
|
68
|
+
console.log(chalk_1.default.red(`\n Error: ${msg}\n`));
|
|
69
|
+
this.exit(1);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
AppBackupCreate.description = 'Archive an application volume to S3-compatible object storage. ' +
|
|
74
|
+
'When --bucket is omitted the cluster provider auto-provisions one ' +
|
|
75
|
+
'(Scaleway: full-auto using your compute key; Hetzner: requires Object ' +
|
|
76
|
+
'Storage credentials connected). Otherwise pass an explicit endpoint + ' +
|
|
77
|
+
'--bucket and S3 credentials via flags or FLUI_S3_ACCESS_KEY/FLUI_S3_SECRET_KEY env.';
|
|
78
|
+
AppBackupCreate.examples = [
|
|
79
|
+
'<%= config.bin %> <%= command.id %> my-app',
|
|
80
|
+
'<%= config.bin %> <%= command.id %> my-app --description nightly',
|
|
81
|
+
'<%= config.bin %> <%= command.id %> my-app -b external-bucket -e https://s3.eu-central-1.amazonaws.com -r eu-central-1',
|
|
82
|
+
];
|
|
83
|
+
AppBackupCreate.args = {
|
|
84
|
+
name: core_1.Args.string({
|
|
85
|
+
description: 'Application name or slug',
|
|
86
|
+
required: true,
|
|
87
|
+
}),
|
|
88
|
+
};
|
|
89
|
+
AppBackupCreate.flags = {
|
|
90
|
+
cluster: core_1.Flags.string({
|
|
91
|
+
char: 'c',
|
|
92
|
+
description: 'Cluster name or ID (default: auto-detect)',
|
|
93
|
+
}),
|
|
94
|
+
volume: core_1.Flags.string({
|
|
95
|
+
char: 'v',
|
|
96
|
+
description: 'Volume (PVC) name when the app has multiple volumes. Required if more than one PVC exists.',
|
|
97
|
+
}),
|
|
98
|
+
description: core_1.Flags.string({
|
|
99
|
+
char: 'd',
|
|
100
|
+
description: 'Optional human-friendly tag appended to the key prefix',
|
|
101
|
+
}),
|
|
102
|
+
bucket: core_1.Flags.string({
|
|
103
|
+
char: 'b',
|
|
104
|
+
description: 'Destination S3 bucket name. Omit to auto-provision via the cluster provider.',
|
|
105
|
+
}),
|
|
106
|
+
endpoint: core_1.Flags.string({
|
|
107
|
+
char: 'e',
|
|
108
|
+
description: 'S3 endpoint URL (required when --bucket is set). Examples: ' +
|
|
109
|
+
'https://s3.fr-par.scw.cloud, https://s3.eu-central-1.amazonaws.com',
|
|
110
|
+
}),
|
|
111
|
+
region: core_1.Flags.string({
|
|
112
|
+
char: 'r',
|
|
113
|
+
description: 'S3 region',
|
|
114
|
+
default: 'auto',
|
|
115
|
+
}),
|
|
116
|
+
'access-key': core_1.Flags.string({
|
|
117
|
+
description: 'S3 access key. Defaults to FLUI_S3_ACCESS_KEY env var.',
|
|
118
|
+
env: 'FLUI_S3_ACCESS_KEY',
|
|
119
|
+
}),
|
|
120
|
+
'secret-key': core_1.Flags.string({
|
|
121
|
+
description: 'S3 secret key. Defaults to FLUI_S3_SECRET_KEY env var.',
|
|
122
|
+
env: 'FLUI_S3_SECRET_KEY',
|
|
123
|
+
}),
|
|
124
|
+
'key-prefix': core_1.Flags.string({
|
|
125
|
+
description: 'Override the destination key prefix (default: flui/<cluster>/<app>/<timestamp>/)',
|
|
126
|
+
}),
|
|
127
|
+
};
|
|
128
|
+
exports.default = AppBackupCreate;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Command } from '@oclif/core';
|
|
2
|
+
export default class AppBackupDelete extends Command {
|
|
3
|
+
static readonly description = "Delete an S3 backup of an application. Removes all objects under the export key prefix.";
|
|
4
|
+
static readonly examples: string[];
|
|
5
|
+
static readonly args: {
|
|
6
|
+
name: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
exportId: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
8
|
+
};
|
|
9
|
+
static readonly flags: {
|
|
10
|
+
cluster: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
|
+
bucket: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
12
|
+
endpoint: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
13
|
+
region: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
14
|
+
'access-key': import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
15
|
+
'secret-key': import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
16
|
+
force: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
17
|
+
};
|
|
18
|
+
run(): Promise<void>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const core_1 = require("@oclif/core");
|
|
7
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
8
|
+
const ora_1 = __importDefault(require("ora"));
|
|
9
|
+
const cli_app_service_1 = require("../../../lib/services/cli-app.service");
|
|
10
|
+
const resolve_cluster_1 = require("../../../lib/resolve-cluster");
|
|
11
|
+
const prompts_1 = require("../../../lib/prompts");
|
|
12
|
+
class AppBackupDelete extends core_1.Command {
|
|
13
|
+
async run() {
|
|
14
|
+
const { args, flags } = await this.parse(AppBackupDelete);
|
|
15
|
+
if (!flags['access-key'] || !flags['secret-key']) {
|
|
16
|
+
this.error('S3 credentials missing. Pass --access-key/--secret-key or set FLUI_S3_ACCESS_KEY/FLUI_S3_SECRET_KEY.');
|
|
17
|
+
}
|
|
18
|
+
if (!flags.force) {
|
|
19
|
+
const ok = await (0, prompts_1.confirmPrompt)(`Delete backup "${args.exportId}" from s3://${flags.bucket}?`);
|
|
20
|
+
if (!ok) {
|
|
21
|
+
console.log(chalk_1.default.dim(' Aborted.'));
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
const destination = {
|
|
26
|
+
bucket: flags.bucket,
|
|
27
|
+
endpoint: flags.endpoint,
|
|
28
|
+
region: flags.region,
|
|
29
|
+
accessKeyId: flags['access-key'],
|
|
30
|
+
secretAccessKey: flags['secret-key'],
|
|
31
|
+
};
|
|
32
|
+
const spinner = (0, ora_1.default)(`Deleting backup ${args.exportId}...`).start();
|
|
33
|
+
try {
|
|
34
|
+
const { id: clusterId } = await (0, resolve_cluster_1.resolveCluster)(flags.cluster);
|
|
35
|
+
const service = await cli_app_service_1.CliAppService.create(clusterId);
|
|
36
|
+
const app = await service.getAppByName(args.name);
|
|
37
|
+
await service.deleteAppBackup(app.id, args.exportId, destination);
|
|
38
|
+
spinner.succeed(`Deleted backup ${args.exportId}`);
|
|
39
|
+
}
|
|
40
|
+
catch (error) {
|
|
41
|
+
spinner.fail('Backup deletion failed');
|
|
42
|
+
const msg = error.response?.data?.message ?? error.message ?? String(error);
|
|
43
|
+
console.log(chalk_1.default.red(`\n Error: ${msg}\n`));
|
|
44
|
+
this.exit(1);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
AppBackupDelete.description = 'Delete an S3 backup of an application. Removes all objects under the export key prefix.';
|
|
49
|
+
AppBackupDelete.examples = [
|
|
50
|
+
'<%= config.bin %> <%= command.id %> my-app flui/<cluster>/<app>/20260510170000-abc123 -b my-bucket -e https://s3.fr-par.scw.cloud',
|
|
51
|
+
];
|
|
52
|
+
AppBackupDelete.args = {
|
|
53
|
+
name: core_1.Args.string({
|
|
54
|
+
description: 'Application name or slug',
|
|
55
|
+
required: true,
|
|
56
|
+
}),
|
|
57
|
+
exportId: core_1.Args.string({
|
|
58
|
+
description: 'Export id (S3 key prefix) returned by `flui app backup create`',
|
|
59
|
+
required: true,
|
|
60
|
+
}),
|
|
61
|
+
};
|
|
62
|
+
AppBackupDelete.flags = {
|
|
63
|
+
cluster: core_1.Flags.string({
|
|
64
|
+
char: 'c',
|
|
65
|
+
description: 'Cluster name or ID (default: auto-detect)',
|
|
66
|
+
}),
|
|
67
|
+
bucket: core_1.Flags.string({
|
|
68
|
+
char: 'b',
|
|
69
|
+
description: 'S3 bucket where the backup lives',
|
|
70
|
+
required: true,
|
|
71
|
+
}),
|
|
72
|
+
endpoint: core_1.Flags.string({
|
|
73
|
+
char: 'e',
|
|
74
|
+
description: 'S3 endpoint URL',
|
|
75
|
+
required: true,
|
|
76
|
+
}),
|
|
77
|
+
region: core_1.Flags.string({
|
|
78
|
+
char: 'r',
|
|
79
|
+
description: 'S3 region',
|
|
80
|
+
default: 'auto',
|
|
81
|
+
}),
|
|
82
|
+
'access-key': core_1.Flags.string({
|
|
83
|
+
description: 'S3 access key id (defaults to FLUI_S3_ACCESS_KEY env)',
|
|
84
|
+
env: 'FLUI_S3_ACCESS_KEY',
|
|
85
|
+
}),
|
|
86
|
+
'secret-key': core_1.Flags.string({
|
|
87
|
+
description: 'S3 secret access key (defaults to FLUI_S3_SECRET_KEY env)',
|
|
88
|
+
env: 'FLUI_S3_SECRET_KEY',
|
|
89
|
+
}),
|
|
90
|
+
force: core_1.Flags.boolean({
|
|
91
|
+
char: 'f',
|
|
92
|
+
description: 'Skip confirmation',
|
|
93
|
+
}),
|
|
94
|
+
};
|
|
95
|
+
exports.default = AppBackupDelete;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Command } from '@oclif/core';
|
|
2
|
+
export default class AppBuild extends Command {
|
|
3
|
+
static readonly description: string;
|
|
4
|
+
static readonly examples: string[];
|
|
5
|
+
static readonly args: {
|
|
6
|
+
name: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
static readonly flags: {
|
|
9
|
+
cluster: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
10
|
+
output: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
|
+
refresh: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
12
|
+
watch: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
13
|
+
interval: import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
14
|
+
};
|
|
15
|
+
run(): Promise<void>;
|
|
16
|
+
private printBuild;
|
|
17
|
+
}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const core_1 = require("@oclif/core");
|
|
7
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
8
|
+
const ora_1 = __importDefault(require("ora"));
|
|
9
|
+
const cli_app_service_1 = require("../../lib/services/cli-app.service");
|
|
10
|
+
const resolve_cluster_1 = require("../../lib/resolve-cluster");
|
|
11
|
+
const TERMINAL = new Set([
|
|
12
|
+
'COMPLETED',
|
|
13
|
+
'FAILED',
|
|
14
|
+
'CANCELLED',
|
|
15
|
+
]);
|
|
16
|
+
class AppBuild extends core_1.Command {
|
|
17
|
+
async run() {
|
|
18
|
+
const { args, flags } = await this.parse(AppBuild);
|
|
19
|
+
const spinner = (0, ora_1.default)(`Fetching latest build for "${args.name}"...`).start();
|
|
20
|
+
try {
|
|
21
|
+
const { id: clusterId } = await (0, resolve_cluster_1.resolveCluster)(flags.cluster);
|
|
22
|
+
const service = await cli_app_service_1.CliAppService.create(clusterId);
|
|
23
|
+
const app = await service.getAppByName(args.name);
|
|
24
|
+
let build = await service.getLatestBuild(app.id);
|
|
25
|
+
if (!build) {
|
|
26
|
+
spinner.stop();
|
|
27
|
+
console.log(chalk_1.default.yellow(`\n No builds found for ${app.name}.\n`));
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
if (flags.refresh) {
|
|
31
|
+
spinner.text = 'Refreshing from provider...';
|
|
32
|
+
build = await service.refreshBuild(build.id);
|
|
33
|
+
}
|
|
34
|
+
if (!flags.watch) {
|
|
35
|
+
spinner.stop();
|
|
36
|
+
if (flags.output === 'json') {
|
|
37
|
+
console.log(JSON.stringify(build, null, 2));
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
this.printBuild(app.name, build);
|
|
41
|
+
}
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
// Watch mode
|
|
45
|
+
while (!TERMINAL.has(build.status)) {
|
|
46
|
+
spinner.text = `Build ${build.status.toLowerCase()}... (${new Date().toLocaleTimeString()})`;
|
|
47
|
+
await sleep(flags.interval * 1000);
|
|
48
|
+
try {
|
|
49
|
+
build = await service.refreshBuild(build.id);
|
|
50
|
+
}
|
|
51
|
+
catch {
|
|
52
|
+
// Fallback to plain GET if refresh fails transiently
|
|
53
|
+
build = await service.getBuild(build.id);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
spinner.stop();
|
|
57
|
+
if (flags.output === 'json') {
|
|
58
|
+
console.log(JSON.stringify(build, null, 2));
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
this.printBuild(app.name, build);
|
|
62
|
+
}
|
|
63
|
+
if (build.status !== 'COMPLETED')
|
|
64
|
+
this.exit(1);
|
|
65
|
+
}
|
|
66
|
+
catch (error) {
|
|
67
|
+
spinner.fail('Failed to fetch build');
|
|
68
|
+
console.log(chalk_1.default.red(`\n Error: ${error.message}\n`));
|
|
69
|
+
this.exit(1);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
printBuild(appName, b) {
|
|
73
|
+
console.log(chalk_1.default.cyan(`\n Latest build — ${appName}\n`));
|
|
74
|
+
console.log(` ${chalk_1.default.bold('ID:')} ${b.id}`);
|
|
75
|
+
console.log(` ${chalk_1.default.bold('Status:')} ${colorStatus(b.status)}`);
|
|
76
|
+
console.log(` ${chalk_1.default.bold('Provider:')} ${b.provider}`);
|
|
77
|
+
console.log(` ${chalk_1.default.bold('Branch:')} ${b.branch}`);
|
|
78
|
+
if (b.commitSha)
|
|
79
|
+
console.log(` ${chalk_1.default.bold('Commit:')} ${b.commitSha.slice(0, 12)}`);
|
|
80
|
+
if (b.imageRef)
|
|
81
|
+
console.log(` ${chalk_1.default.bold('Image:')} ${b.imageRef}`);
|
|
82
|
+
if (b.externalUrl)
|
|
83
|
+
console.log(` ${chalk_1.default.bold('Run URL:')} ${chalk_1.default.dim(b.externalUrl)}`);
|
|
84
|
+
if (b.errorMessage)
|
|
85
|
+
console.log(` ${chalk_1.default.bold('Error:')} ${chalk_1.default.red(b.errorMessage)}`);
|
|
86
|
+
console.log('');
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
AppBuild.description = 'Inspect or refresh the latest build for an application. ' +
|
|
90
|
+
'Use --watch to follow the status until terminal.';
|
|
91
|
+
AppBuild.examples = [
|
|
92
|
+
'<%= config.bin %> <%= command.id %> my-api',
|
|
93
|
+
'<%= config.bin %> <%= command.id %> my-api --watch',
|
|
94
|
+
'<%= config.bin %> <%= command.id %> my-api --refresh',
|
|
95
|
+
];
|
|
96
|
+
AppBuild.args = {
|
|
97
|
+
name: core_1.Args.string({
|
|
98
|
+
description: 'Application name or slug',
|
|
99
|
+
required: true,
|
|
100
|
+
}),
|
|
101
|
+
};
|
|
102
|
+
AppBuild.flags = {
|
|
103
|
+
cluster: core_1.Flags.string({ char: 'c' }),
|
|
104
|
+
output: core_1.Flags.string({
|
|
105
|
+
char: 'o',
|
|
106
|
+
options: ['text', 'json'],
|
|
107
|
+
default: 'text',
|
|
108
|
+
}),
|
|
109
|
+
refresh: core_1.Flags.boolean({
|
|
110
|
+
description: 'Force the backend to re-poll GitHub Actions for the latest build now',
|
|
111
|
+
}),
|
|
112
|
+
watch: core_1.Flags.boolean({
|
|
113
|
+
char: 'w',
|
|
114
|
+
description: 'Poll until the latest build reaches a terminal status (COMPLETED / FAILED / CANCELLED)',
|
|
115
|
+
}),
|
|
116
|
+
interval: core_1.Flags.integer({
|
|
117
|
+
description: 'Polling interval in seconds (with --watch)',
|
|
118
|
+
default: 5,
|
|
119
|
+
}),
|
|
120
|
+
};
|
|
121
|
+
exports.default = AppBuild;
|
|
122
|
+
function colorStatus(s) {
|
|
123
|
+
if (s === 'COMPLETED')
|
|
124
|
+
return chalk_1.default.green(s);
|
|
125
|
+
if (s === 'FAILED' || s === 'CANCELLED')
|
|
126
|
+
return chalk_1.default.red(s);
|
|
127
|
+
if (s === 'PENDING')
|
|
128
|
+
return chalk_1.default.dim(s);
|
|
129
|
+
return chalk_1.default.blue(s);
|
|
130
|
+
}
|
|
131
|
+
function sleep(ms) {
|
|
132
|
+
return new Promise((r) => setTimeout(r, ms));
|
|
133
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Command } from '@oclif/core';
|
|
2
|
+
export default class AppBuilds extends Command {
|
|
3
|
+
static readonly description = "List recent builds for an application";
|
|
4
|
+
static readonly examples: string[];
|
|
5
|
+
static readonly args: {
|
|
6
|
+
name: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
static readonly flags: {
|
|
9
|
+
cluster: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
10
|
+
output: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
|
+
limit: import("@oclif/core/lib/interfaces").OptionFlag<number, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
12
|
+
};
|
|
13
|
+
run(): Promise<void>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const core_1 = require("@oclif/core");
|
|
7
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
8
|
+
const ora_1 = __importDefault(require("ora"));
|
|
9
|
+
const cli_app_service_1 = require("../../lib/services/cli-app.service");
|
|
10
|
+
const resolve_cluster_1 = require("../../lib/resolve-cluster");
|
|
11
|
+
class AppBuilds extends core_1.Command {
|
|
12
|
+
async run() {
|
|
13
|
+
const { args, flags } = await this.parse(AppBuilds);
|
|
14
|
+
const spinner = (0, ora_1.default)(`Fetching builds for "${args.name}"...`).start();
|
|
15
|
+
try {
|
|
16
|
+
const { id: clusterId } = await (0, resolve_cluster_1.resolveCluster)(flags.cluster);
|
|
17
|
+
const service = await cli_app_service_1.CliAppService.create(clusterId);
|
|
18
|
+
const app = await service.getAppByName(args.name);
|
|
19
|
+
const builds = (await service.listBuilds(app.id)).slice(0, flags.limit);
|
|
20
|
+
spinner.stop();
|
|
21
|
+
if (flags.output === 'json') {
|
|
22
|
+
console.log(JSON.stringify(builds, null, 2));
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
if (builds.length === 0) {
|
|
26
|
+
console.log(chalk_1.default.yellow(`\n No builds found for ${app.name}.\n`));
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
console.log(chalk_1.default.cyan(`\n Builds for ${app.name}\n`));
|
|
30
|
+
console.log(chalk_1.default.dim(` ${'STATUS'.padEnd(11)} ${'PROVIDER'.padEnd(16)} ${'BRANCH'.padEnd(14)} ${'COMMIT'.padEnd(10)} ${'STARTED'.padEnd(20)} URL`));
|
|
31
|
+
console.log(chalk_1.default.dim(' ' + '─'.repeat(100)));
|
|
32
|
+
for (const b of builds) {
|
|
33
|
+
const status = colorBuildStatus(b.status ?? 'PENDING').padEnd(20);
|
|
34
|
+
const provider = (b.provider ?? '-').padEnd(16);
|
|
35
|
+
const branch = (b.branch ?? '-').padEnd(14);
|
|
36
|
+
const commit = ((b.commitSha ?? '').slice(0, 7) || '-').padEnd(10);
|
|
37
|
+
const started = b.startedAt
|
|
38
|
+
? new Date(b.startedAt).toLocaleString().padEnd(20)
|
|
39
|
+
: chalk_1.default.dim('-'.padEnd(20));
|
|
40
|
+
const url = b.externalUrl ?? '';
|
|
41
|
+
console.log(` ${status} ${provider} ${branch} ${commit} ${started} ${chalk_1.default.dim(url)}`);
|
|
42
|
+
}
|
|
43
|
+
console.log('');
|
|
44
|
+
}
|
|
45
|
+
catch (error) {
|
|
46
|
+
spinner.fail('Failed to fetch builds');
|
|
47
|
+
console.log(chalk_1.default.red(`\n Error: ${error.message}\n`));
|
|
48
|
+
this.exit(1);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
AppBuilds.description = 'List recent builds for an application';
|
|
53
|
+
AppBuilds.examples = [
|
|
54
|
+
'<%= config.bin %> <%= command.id %> my-api',
|
|
55
|
+
'<%= config.bin %> <%= command.id %> my-api --output json',
|
|
56
|
+
'<%= config.bin %> <%= command.id %> my-api --limit 5',
|
|
57
|
+
];
|
|
58
|
+
AppBuilds.args = {
|
|
59
|
+
name: core_1.Args.string({
|
|
60
|
+
description: 'Application name or slug',
|
|
61
|
+
required: true,
|
|
62
|
+
}),
|
|
63
|
+
};
|
|
64
|
+
AppBuilds.flags = {
|
|
65
|
+
cluster: core_1.Flags.string({ char: 'c' }),
|
|
66
|
+
output: core_1.Flags.string({
|
|
67
|
+
char: 'o',
|
|
68
|
+
options: ['table', 'json'],
|
|
69
|
+
default: 'table',
|
|
70
|
+
}),
|
|
71
|
+
limit: core_1.Flags.integer({ char: 'n', default: 10 }),
|
|
72
|
+
};
|
|
73
|
+
exports.default = AppBuilds;
|
|
74
|
+
function colorBuildStatus(s) {
|
|
75
|
+
if (s === 'COMPLETED')
|
|
76
|
+
return chalk_1.default.green(s);
|
|
77
|
+
if (s === 'FAILED' || s === 'CANCELLED')
|
|
78
|
+
return chalk_1.default.red(s);
|
|
79
|
+
if (s === 'PENDING')
|
|
80
|
+
return chalk_1.default.dim(s);
|
|
81
|
+
return chalk_1.default.blue(s);
|
|
82
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Command } from '@oclif/core';
|
|
2
|
+
export default class AppCrash extends Command {
|
|
3
|
+
static readonly description = "Show a single crash diagnosis. Use --dismiss to mark it resolved.";
|
|
4
|
+
static readonly examples: string[];
|
|
5
|
+
static readonly args: {
|
|
6
|
+
name: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
id: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
8
|
+
};
|
|
9
|
+
static readonly flags: {
|
|
10
|
+
cluster: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
|
+
dismiss: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
12
|
+
output: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
13
|
+
};
|
|
14
|
+
run(): Promise<void>;
|
|
15
|
+
private colorSeverity;
|
|
16
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const core_1 = require("@oclif/core");
|
|
7
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
8
|
+
const ora_1 = __importDefault(require("ora"));
|
|
9
|
+
const cli_app_service_1 = require("../../lib/services/cli-app.service");
|
|
10
|
+
const resolve_cluster_1 = require("../../lib/resolve-cluster");
|
|
11
|
+
class AppCrash extends core_1.Command {
|
|
12
|
+
async run() {
|
|
13
|
+
const { args, flags } = await this.parse(AppCrash);
|
|
14
|
+
const verb = flags.dismiss ? 'Dismissing' : 'Fetching';
|
|
15
|
+
const spinner = (0, ora_1.default)(`${verb} crash ${args.id}...`).start();
|
|
16
|
+
try {
|
|
17
|
+
const { id: clusterId } = await (0, resolve_cluster_1.resolveCluster)(flags.cluster);
|
|
18
|
+
const service = await cli_app_service_1.CliAppService.create(clusterId);
|
|
19
|
+
const app = await service.getAppByName(args.name);
|
|
20
|
+
const d = flags.dismiss
|
|
21
|
+
? await service.dismissCrash(app.id, args.id)
|
|
22
|
+
: await service.getCrash(app.id, args.id);
|
|
23
|
+
spinner.stop();
|
|
24
|
+
if (flags.output === 'json') {
|
|
25
|
+
console.log(JSON.stringify(d, null, 2));
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
if (flags.dismiss) {
|
|
29
|
+
console.log(chalk_1.default.green(`\n ✔ Crash ${d.id} marked as resolved.\n`));
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
console.log(chalk_1.default.cyan(`\n Crash ${d.id}\n`));
|
|
33
|
+
console.log(` ${chalk_1.default.dim('title:')} ${d.title}`);
|
|
34
|
+
console.log(` ${chalk_1.default.dim('category:')} ${d.category}`);
|
|
35
|
+
console.log(` ${chalk_1.default.dim('severity:')} ${this.colorSeverity(d.severity)}`);
|
|
36
|
+
console.log(` ${chalk_1.default.dim('pod:')} ${d.podName}`);
|
|
37
|
+
if (d.containerName) {
|
|
38
|
+
console.log(` ${chalk_1.default.dim('container:')} ${d.containerName}`);
|
|
39
|
+
}
|
|
40
|
+
console.log(` ${chalk_1.default.dim('detected:')} ${new Date(d.createdAt).toLocaleString()}`);
|
|
41
|
+
console.log(` ${chalk_1.default.dim('resolved:')} ${d.resolvedAt ? new Date(d.resolvedAt).toLocaleString() : chalk_1.default.yellow('open')}`);
|
|
42
|
+
if (d.explanation) {
|
|
43
|
+
console.log(`\n ${chalk_1.default.bold('Reason')}`);
|
|
44
|
+
console.log(` ${d.explanation}`);
|
|
45
|
+
}
|
|
46
|
+
const action = d.suggestedAction;
|
|
47
|
+
if (action?.summary) {
|
|
48
|
+
console.log(`\n ${chalk_1.default.bold('Suggested action')}`);
|
|
49
|
+
console.log(` ${action.summary}`);
|
|
50
|
+
if (Array.isArray(action.steps)) {
|
|
51
|
+
for (const step of action.steps)
|
|
52
|
+
console.log(` • ${step}`);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
console.log('');
|
|
56
|
+
}
|
|
57
|
+
catch (error) {
|
|
58
|
+
spinner.fail(`${verb} failed`);
|
|
59
|
+
console.log(chalk_1.default.red(`\n Error: ${error.message}\n`));
|
|
60
|
+
this.exit(1);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
colorSeverity(severity) {
|
|
64
|
+
switch (severity) {
|
|
65
|
+
case 'critical':
|
|
66
|
+
return chalk_1.default.red(severity);
|
|
67
|
+
case 'warning':
|
|
68
|
+
return chalk_1.default.yellow(severity);
|
|
69
|
+
default:
|
|
70
|
+
return chalk_1.default.dim(severity);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
AppCrash.description = 'Show a single crash diagnosis. Use --dismiss to mark it resolved.';
|
|
75
|
+
AppCrash.examples = [
|
|
76
|
+
'<%= config.bin %> <%= command.id %> my-api 5d3f...',
|
|
77
|
+
'<%= config.bin %> <%= command.id %> my-api 5d3f... --dismiss',
|
|
78
|
+
'<%= config.bin %> <%= command.id %> my-api 5d3f... --output json',
|
|
79
|
+
];
|
|
80
|
+
AppCrash.args = {
|
|
81
|
+
name: core_1.Args.string({
|
|
82
|
+
description: 'Application name or slug',
|
|
83
|
+
required: true,
|
|
84
|
+
}),
|
|
85
|
+
id: core_1.Args.string({
|
|
86
|
+
description: 'Crash diagnosis ID',
|
|
87
|
+
required: true,
|
|
88
|
+
}),
|
|
89
|
+
};
|
|
90
|
+
AppCrash.flags = {
|
|
91
|
+
cluster: core_1.Flags.string({
|
|
92
|
+
char: 'c',
|
|
93
|
+
description: 'Cluster name or ID (default: auto-detect when only one cluster exists)',
|
|
94
|
+
}),
|
|
95
|
+
dismiss: core_1.Flags.boolean({
|
|
96
|
+
description: 'Mark this crash diagnosis as resolved',
|
|
97
|
+
default: false,
|
|
98
|
+
}),
|
|
99
|
+
output: core_1.Flags.string({
|
|
100
|
+
char: 'o',
|
|
101
|
+
description: 'Output format',
|
|
102
|
+
options: ['table', 'json'],
|
|
103
|
+
default: 'table',
|
|
104
|
+
}),
|
|
105
|
+
};
|
|
106
|
+
exports.default = AppCrash;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Command } from '@oclif/core';
|
|
2
|
+
export default class AppCrashes extends Command {
|
|
3
|
+
static readonly description = "Show recent crash diagnoses for an application";
|
|
4
|
+
static readonly examples: string[];
|
|
5
|
+
static readonly args: {
|
|
6
|
+
name: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
static readonly flags: {
|
|
9
|
+
cluster: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
10
|
+
output: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
|
+
};
|
|
12
|
+
run(): Promise<void>;
|
|
13
|
+
private printActiveDiagnosis;
|
|
14
|
+
private colorSeverity;
|
|
15
|
+
}
|