@catladder/cli 3.48.0 ā 4.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/README.md +23 -5
- package/dist/bundles/catenv/index.js +3 -3
- package/dist/bundles/cli/index.js +34 -30
- package/dist/cli/src/adapters/baseContext.d.ts +22 -0
- package/dist/cli/src/adapters/baseContext.js +40 -0
- package/dist/cli/src/adapters/baseContext.js.map +1 -0
- package/dist/cli/src/adapters/programmatic.d.ts +26 -0
- package/dist/cli/src/adapters/programmatic.js +67 -0
- package/dist/cli/src/adapters/programmatic.js.map +1 -0
- package/dist/cli/src/adapters/terminal.d.ts +28 -0
- package/dist/cli/src/adapters/terminal.js +205 -0
- package/dist/cli/src/adapters/terminal.js.map +1 -0
- package/dist/cli/src/apps/catenv/catenv.d.ts +1 -0
- package/dist/cli/src/apps/catenv/catenv.js +1 -1
- package/dist/cli/src/apps/catenv/catenv.js.map +1 -1
- package/dist/cli/src/apps/catenv/printVariables.js +0 -10
- package/dist/cli/src/apps/catenv/printVariables.js.map +1 -1
- package/dist/cli/src/apps/cli/commands/project/commandConfigSecrets.d.ts +2 -5
- package/dist/cli/src/apps/cli/commands/project/commandConfigSecrets.js +6 -21
- package/dist/cli/src/apps/cli/commands/project/commandConfigSecrets.js.map +1 -1
- package/dist/cli/src/apps/cli/commands/project/setup/index.d.ts +2 -2
- package/dist/cli/src/apps/cli/commands/project/setup/index.js.map +1 -1
- package/dist/cli/src/apps/cli/commands/project/setup/logSection.d.ts +2 -2
- package/dist/cli/src/apps/cli/commands/project/setup/logSection.js.map +1 -1
- package/dist/cli/src/apps/cli/commands/project/setup/setupAccessTokens.d.ts +2 -2
- package/dist/cli/src/apps/cli/commands/project/setup/setupAccessTokens.js.map +1 -1
- package/dist/cli/src/apps/cli/commands/project/setup/setupAgents.d.ts +2 -2
- package/dist/cli/src/apps/cli/commands/project/setup/setupAgents.js.map +1 -1
- package/dist/cli/src/apps/cli/commands/project/setup/setupCloudRun.d.ts +2 -2
- package/dist/cli/src/apps/cli/commands/project/setup/setupCloudRun.js.map +1 -1
- package/dist/cli/src/apps/cli/commands/project/setup/setupContext.d.ts +2 -2
- package/dist/cli/src/apps/cli/commands/project/setup/setupContext.js.map +1 -1
- package/dist/cli/src/apps/cli/commands/project/setup/setupKubernetes.d.ts +2 -2
- package/dist/cli/src/apps/cli/commands/project/setup/setupKubernetes.js.map +1 -1
- package/dist/cli/src/apps/cli/commands/project/setup/setupTopic.d.ts +2 -2
- package/dist/cli/src/apps/cli/commands/project/setup/setupTopic.js.map +1 -1
- package/dist/cli/src/apps/cli/commands/project/utils/ensureCluster.d.ts +9 -1
- package/dist/cli/src/apps/cli/commands/project/utils/ensureCluster.js +15 -14
- package/dist/cli/src/apps/cli/commands/project/utils/ensureCluster.js.map +1 -1
- package/dist/cli/src/apps/cli/utils/getGoogleAuthUserNumber.d.ts +2 -1
- package/dist/cli/src/apps/cli/utils/getGoogleAuthUserNumber.js +4 -6
- package/dist/cli/src/apps/cli/utils/getGoogleAuthUserNumber.js.map +1 -1
- package/dist/cli/src/catenv.js +14 -16
- package/dist/cli/src/catenv.js.map +1 -1
- package/dist/cli/src/cli.js +186 -2
- package/dist/cli/src/cli.js.map +1 -1
- package/dist/cli/src/commands/cloudSQL/commandRestoreDb.d.ts +46 -0
- package/dist/cli/src/commands/cloudSQL/commandRestoreDb.js +111 -0
- package/dist/cli/src/commands/cloudSQL/commandRestoreDb.js.map +1 -0
- package/dist/cli/src/commands/fun/commandDadjoke.d.ts +1 -0
- package/dist/cli/src/commands/fun/commandDadjoke.js +30 -0
- package/dist/cli/src/commands/fun/commandDadjoke.js.map +1 -0
- package/dist/cli/src/commands/fun/commandStarwars.d.ts +1 -0
- package/dist/cli/src/commands/fun/commandStarwars.js +19 -0
- package/dist/cli/src/commands/fun/commandStarwars.js.map +1 -0
- package/dist/cli/src/commands/general/commandKubeCurrentContext.d.ts +1 -0
- package/dist/cli/src/commands/general/commandKubeCurrentContext.js +17 -0
- package/dist/cli/src/commands/general/commandKubeCurrentContext.js.map +1 -0
- package/dist/cli/src/commands/general/commandKubeGetShell.d.ts +12 -0
- package/dist/cli/src/commands/general/commandKubeGetShell.js +36 -0
- package/dist/cli/src/commands/general/commandKubeGetShell.js.map +1 -0
- package/dist/cli/src/commands/general/commandKubeListNamespaces.d.ts +1 -0
- package/dist/cli/src/commands/general/commandKubeListNamespaces.js +20 -0
- package/dist/cli/src/commands/general/commandKubeListNamespaces.js.map +1 -0
- package/dist/cli/src/commands/general/commandKubeListPods.d.ts +7 -0
- package/dist/cli/src/commands/general/commandKubeListPods.js +26 -0
- package/dist/cli/src/commands/general/commandKubeListPods.js.map +1 -0
- package/dist/cli/src/commands/general/commandKubeListSecrets.d.ts +7 -0
- package/dist/cli/src/commands/general/commandKubeListSecrets.js +26 -0
- package/dist/cli/src/commands/general/commandKubeListSecrets.js.map +1 -0
- package/dist/cli/src/commands/general/commandKubePortForward.d.ts +20 -0
- package/dist/cli/src/commands/general/commandKubePortForward.js +46 -0
- package/dist/cli/src/commands/general/commandKubePortForward.js.map +1 -0
- package/dist/cli/src/commands/general/commandKubeStopPortforward.d.ts +7 -0
- package/dist/cli/src/commands/general/commandKubeStopPortforward.js +24 -0
- package/dist/cli/src/commands/general/commandKubeStopPortforward.js.map +1 -0
- package/dist/cli/src/commands/index.d.ts +37 -0
- package/dist/cli/src/commands/index.js +283 -0
- package/dist/cli/src/commands/index.js.map +1 -0
- package/dist/cli/src/commands/mongodb/commandMongoDestroyMember.d.ts +16 -0
- package/dist/cli/src/commands/mongodb/commandMongoDestroyMember.js +89 -0
- package/dist/cli/src/commands/mongodb/commandMongoDestroyMember.js.map +1 -0
- package/dist/cli/src/commands/mongodb/commandMongoGetShell.d.ts +16 -0
- package/dist/cli/src/commands/mongodb/commandMongoGetShell.js +36 -0
- package/dist/cli/src/commands/mongodb/commandMongoGetShell.js.map +1 -0
- package/dist/cli/src/commands/mongodb/commandMongoPortForward.d.ts +21 -0
- package/dist/cli/src/commands/mongodb/commandMongoPortForward.js +65 -0
- package/dist/cli/src/commands/mongodb/commandMongoPortForward.js.map +1 -0
- package/dist/cli/src/commands/project/commandCloudSqlProxy.d.ts +13 -0
- package/dist/cli/src/commands/project/commandCloudSqlProxy.js +127 -0
- package/dist/cli/src/commands/project/commandCloudSqlProxy.js.map +1 -0
- package/dist/cli/src/commands/project/commandConfigSecrets.d.ts +9 -0
- package/dist/cli/src/commands/project/commandConfigSecrets.js +36 -0
- package/dist/cli/src/commands/project/commandConfigSecrets.js.map +1 -0
- package/dist/cli/src/commands/project/commandDeletePods.d.ts +13 -0
- package/dist/cli/src/commands/project/commandDeletePods.js +49 -0
- package/dist/cli/src/commands/project/commandDeletePods.js.map +1 -0
- package/dist/cli/src/commands/project/commandDeleteProject.d.ts +8 -0
- package/dist/cli/src/commands/project/commandDeleteProject.js +41 -0
- package/dist/cli/src/commands/project/commandDeleteProject.js.map +1 -0
- package/dist/cli/src/commands/project/commandEnvVars.d.ts +8 -0
- package/dist/cli/src/commands/project/commandEnvVars.js +32 -0
- package/dist/cli/src/commands/project/commandEnvVars.js.map +1 -0
- package/dist/cli/src/commands/project/commandGetMyTotalWorktime.d.ts +1 -0
- package/dist/cli/src/commands/project/commandGetMyTotalWorktime.js +19 -0
- package/dist/cli/src/commands/project/commandGetMyTotalWorktime.js.map +1 -0
- package/dist/cli/src/commands/project/commandGetShell.d.ts +13 -0
- package/dist/cli/src/commands/project/commandGetShell.js +41 -0
- package/dist/cli/src/commands/project/commandGetShell.js.map +1 -0
- package/dist/cli/src/commands/project/commandGitlabCi.d.ts +14 -0
- package/dist/cli/src/commands/project/commandGitlabCi.js +109 -0
- package/dist/cli/src/commands/project/commandGitlabCi.js.map +1 -0
- package/dist/cli/src/commands/project/commandListPods.d.ts +8 -0
- package/dist/cli/src/commands/project/commandListPods.js +31 -0
- package/dist/cli/src/commands/project/commandListPods.js.map +1 -0
- package/dist/cli/src/commands/project/commandNamespace.d.ts +8 -0
- package/dist/cli/src/commands/project/commandNamespace.js +26 -0
- package/dist/cli/src/commands/project/commandNamespace.js.map +1 -0
- package/dist/cli/src/commands/project/commandOpenEnv.d.ts +8 -0
- package/dist/cli/src/commands/project/commandOpenEnv.js +40 -0
- package/dist/cli/src/commands/project/commandOpenEnv.js.map +1 -0
- package/dist/cli/src/commands/project/commandOpenGit.d.ts +1 -0
- package/dist/cli/src/commands/project/commandOpenGit.js +17 -0
- package/dist/cli/src/commands/project/commandOpenGit.js.map +1 -0
- package/dist/cli/src/commands/project/commandOpenLogs.d.ts +8 -0
- package/dist/cli/src/commands/project/commandOpenLogs.js +32 -0
- package/dist/cli/src/commands/project/commandOpenLogs.js.map +1 -0
- package/dist/cli/src/commands/project/commandPauseProject.d.ts +8 -0
- package/dist/cli/src/commands/project/commandPauseProject.js +41 -0
- package/dist/cli/src/commands/project/commandPauseProject.js.map +1 -0
- package/dist/cli/src/commands/project/commandPortForward.d.ts +25 -0
- package/dist/cli/src/commands/project/commandPortForward.js +95 -0
- package/dist/cli/src/commands/project/commandPortForward.js.map +1 -0
- package/dist/cli/src/commands/project/commandProjectRestoreDb.d.ts +19 -0
- package/dist/cli/src/commands/project/commandProjectRestoreDb.js +159 -0
- package/dist/cli/src/commands/project/commandProjectRestoreDb.js.map +1 -0
- package/dist/cli/src/commands/project/commandRenewToken.d.ts +1 -0
- package/dist/cli/src/commands/project/commandRenewToken.js +17 -0
- package/dist/cli/src/commands/project/commandRenewToken.js.map +1 -0
- package/dist/cli/src/commands/project/commandSecretsClearBackups.d.ts +7 -0
- package/dist/cli/src/commands/project/commandSecretsClearBackups.js +24 -0
- package/dist/cli/src/commands/project/commandSecretsClearBackups.js.map +1 -0
- package/dist/cli/src/commands/project/commandSecurityEvaluate.d.ts +1 -0
- package/dist/cli/src/commands/project/commandSecurityEvaluate.js +26 -0
- package/dist/cli/src/commands/project/commandSecurityEvaluate.js.map +1 -0
- package/dist/cli/src/commands/project/commandSetup.d.ts +8 -0
- package/dist/cli/src/commands/project/commandSetup.js +25 -0
- package/dist/cli/src/commands/project/commandSetup.js.map +1 -0
- package/dist/cli/src/commands/project/commandTriggerCronjob.d.ts +25 -0
- package/dist/cli/src/commands/project/commandTriggerCronjob.js +95 -0
- package/dist/cli/src/commands/project/commandTriggerCronjob.js.map +1 -0
- package/dist/cli/src/commands/security/commandSecurityAuditCiJob.d.ts +27 -0
- package/dist/cli/src/commands/security/commandSecurityAuditCiJob.js +83 -0
- package/dist/cli/src/commands/security/commandSecurityAuditCiJob.js.map +1 -0
- package/dist/cli/src/commands/security/commandSecurityAuditCreate.d.ts +22 -0
- package/dist/cli/src/commands/security/commandSecurityAuditCreate.js +60 -0
- package/dist/cli/src/commands/security/commandSecurityAuditCreate.js.map +1 -0
- package/dist/cli/src/commands/security/commandSecurityAuditEvaluate.d.ts +7 -0
- package/dist/cli/src/commands/security/commandSecurityAuditEvaluate.js +35 -0
- package/dist/cli/src/commands/security/commandSecurityAuditEvaluate.js.map +1 -0
- package/dist/cli/src/completion.d.ts +24 -0
- package/dist/cli/src/completion.js +240 -0
- package/dist/cli/src/completion.js.map +1 -0
- package/dist/cli/src/config/getProjectConfig.d.ts +4 -4
- package/dist/cli/src/config/getProjectConfig.js +8 -8
- package/dist/cli/src/config/getProjectConfig.js.map +1 -1
- package/dist/cli/src/core/defineCommand.d.ts +27 -0
- package/dist/cli/src/core/defineCommand.js +35 -0
- package/dist/cli/src/core/defineCommand.js.map +1 -0
- package/dist/cli/src/core/index.d.ts +5 -0
- package/dist/cli/src/core/index.js +52 -0
- package/dist/cli/src/core/index.js.map +1 -0
- package/dist/cli/src/core/registry.d.ts +5 -0
- package/dist/cli/src/core/registry.js +26 -0
- package/dist/cli/src/core/registry.js.map +1 -0
- package/dist/cli/src/core/runner.d.ts +19 -0
- package/dist/cli/src/core/runner.js +29 -0
- package/dist/cli/src/core/runner.js.map +1 -0
- package/dist/cli/src/core/types.d.ts +105 -0
- package/dist/cli/src/core/types.js +17 -0
- package/dist/cli/src/core/types.js.map +1 -0
- package/dist/cli/src/gcloud/cloudRun/openCloudRunDashboards.d.ts +2 -2
- package/dist/cli/src/gcloud/cloudRun/openCloudRunDashboards.js.map +1 -1
- package/dist/cli/src/gcloud/openDashboard.d.ts +2 -2
- package/dist/cli/src/gcloud/openDashboard.js +1 -1
- package/dist/cli/src/gcloud/openDashboard.js.map +1 -1
- package/dist/cli/src/gcloud/serviceAccounts.d.ts +2 -2
- package/dist/cli/src/gcloud/serviceAccounts.js.map +1 -1
- package/dist/cli/src/kubernetes/openKubernetesDashboards.d.ts +3 -3
- package/dist/cli/src/kubernetes/openKubernetesDashboards.js.map +1 -1
- package/dist/cli/src/security/auditDocument.js.map +1 -0
- package/dist/cli/src/security/createSecurityAuditMergeRequest.js.map +1 -0
- package/dist/cli/src/security/evaluateSecurityAudit.js.map +1 -0
- package/dist/cli/src/utils/gitlab.d.ts +9 -9
- package/dist/cli/src/utils/gitlab.js +45 -54
- package/dist/cli/src/utils/gitlab.js.map +1 -1
- package/dist/cli/src/utils/log.d.ts +2 -2
- package/dist/pipeline/src/build/index.d.ts +2 -2
- package/dist/pipeline/src/build/index.js.map +1 -1
- package/dist/pipeline/src/build/node/buildJob.d.ts +3 -3
- package/dist/pipeline/src/build/node/buildJob.js +13 -12
- package/dist/pipeline/src/build/node/buildJob.js.map +1 -1
- package/dist/pipeline/src/build/node/cache.d.ts +3 -3
- package/dist/pipeline/src/build/node/cache.js +12 -9
- package/dist/pipeline/src/build/node/cache.js.map +1 -1
- package/dist/pipeline/src/build/node/index.d.ts +3 -3
- package/dist/pipeline/src/build/node/index.js +8 -6
- package/dist/pipeline/src/build/node/index.js.map +1 -1
- package/dist/pipeline/src/build/node/meteor.d.ts +1 -1
- package/dist/pipeline/src/build/node/meteor.js +8 -7
- package/dist/pipeline/src/build/node/meteor.js.map +1 -1
- package/dist/pipeline/src/build/node/testJob.d.ts +1 -1
- package/dist/pipeline/src/build/node/testJob.js +5 -5
- package/dist/pipeline/src/build/node/testJob.js.map +1 -1
- package/dist/pipeline/src/build/node/yarn.d.ts +2 -2
- package/dist/pipeline/src/build/node/yarn.js +10 -8
- package/dist/pipeline/src/build/node/yarn.js.map +1 -1
- package/dist/pipeline/src/build/types.d.ts +1 -1
- package/dist/pipeline/src/constants.js +1 -1
- package/dist/pipeline/src/context/createComponentContext.js +3 -3
- package/dist/pipeline/src/context/createComponentContext.js.map +1 -1
- package/dist/pipeline/src/context/createWorkspaceContext.js +1 -1
- package/dist/pipeline/src/context/createWorkspaceContext.js.map +1 -1
- package/dist/pipeline/src/context/getEnvironmentVariables.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/createJobs/getCloudRunDeployScripts.js.map +1 -1
- package/dist/pipeline/src/deploy/custom/deployJob.d.ts +1 -1
- package/dist/pipeline/src/deploy/custom/deployJob.js +2 -2
- package/dist/pipeline/src/deploy/custom/deployJob.js.map +1 -1
- package/dist/pipeline/src/deploy/index.d.ts +1 -1
- package/dist/pipeline/src/deploy/types/index.d.ts +2 -2
- package/dist/pipeline/src/pipeline/createAllJobs.js +4 -4
- package/dist/pipeline/src/pipeline/createAllJobs.js.map +1 -1
- package/dist/pipeline/src/pipeline/createJobsForComponent.d.ts +1 -1
- package/dist/pipeline/src/pipeline/createJobsForComponent.js +2 -3
- package/dist/pipeline/src/pipeline/createJobsForComponent.js.map +1 -1
- package/dist/pipeline/src/pipeline/createJobsForWorkspace.d.ts +1 -1
- package/dist/pipeline/src/pipeline/createJobsForWorkspace.js +2 -2
- package/dist/pipeline/src/pipeline/createJobsForWorkspace.js.map +1 -1
- package/dist/pipeline/src/types/config.d.ts +3 -3
- package/dist/pipeline/src/types/context.d.ts +3 -3
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -4
- package/scripts/bundle +0 -2
- package/src/adapters/baseContext.ts +68 -0
- package/src/adapters/programmatic.ts +88 -0
- package/src/adapters/terminal.ts +207 -0
- package/src/apps/catenv/catenv.ts +4 -2
- package/src/apps/catenv/printVariables.ts +0 -8
- package/src/apps/cli/commands/project/commandConfigSecrets.ts +8 -33
- package/src/apps/cli/commands/project/setup/index.ts +2 -2
- package/src/apps/cli/commands/project/setup/logSection.ts +2 -2
- package/src/apps/cli/commands/project/setup/setupAccessTokens.ts +2 -2
- package/src/apps/cli/commands/project/setup/setupAgents.ts +11 -11
- package/src/apps/cli/commands/project/setup/setupCloudRun.ts +2 -2
- package/src/apps/cli/commands/project/setup/setupContext.ts +2 -5
- package/src/apps/cli/commands/project/setup/setupKubernetes.ts +2 -2
- package/src/apps/cli/commands/project/setup/setupTopic.ts +2 -2
- package/src/apps/cli/commands/project/utils/ensureCluster.ts +19 -12
- package/src/apps/cli/utils/getGoogleAuthUserNumber.ts +5 -4
- package/src/catenv.ts +24 -18
- package/src/cli.ts +213 -2
- package/src/commands/cloudSQL/commandRestoreDb.ts +105 -0
- package/src/commands/fun/commandDadjoke.ts +18 -0
- package/src/commands/fun/commandStarwars.ts +14 -0
- package/src/commands/general/commandKubeCurrentContext.ts +12 -0
- package/src/commands/general/commandKubeGetShell.ts +32 -0
- package/src/commands/general/commandKubeListNamespaces.ts +15 -0
- package/src/commands/general/commandKubeListPods.ts +21 -0
- package/src/commands/general/commandKubeListSecrets.ts +21 -0
- package/src/commands/general/commandKubePortForward.ts +35 -0
- package/src/commands/general/commandKubeStopPortforward.ts +15 -0
- package/src/commands/index.ts +51 -0
- package/src/commands/mongodb/commandMongoDestroyMember.ts +133 -0
- package/src/commands/mongodb/commandMongoGetShell.ts +36 -0
- package/src/commands/mongodb/commandMongoPortForward.ts +56 -0
- package/src/commands/project/commandCloudSqlProxy.ts +189 -0
- package/src/commands/project/commandConfigSecrets.ts +31 -0
- package/src/commands/project/commandDeletePods.ts +53 -0
- package/src/commands/project/commandDeleteProject.ts +33 -0
- package/src/commands/project/commandEnvVars.ts +24 -0
- package/src/commands/project/commandGetMyTotalWorktime.ts +14 -0
- package/src/commands/project/commandGetShell.ts +39 -0
- package/src/commands/project/commandGitlabCi.ts +122 -0
- package/src/commands/project/commandListPods.ts +30 -0
- package/src/commands/project/commandNamespace.ts +21 -0
- package/src/commands/project/commandOpenEnv.ts +27 -0
- package/src/commands/project/commandOpenGit.ts +12 -0
- package/src/commands/project/commandOpenLogs.ts +27 -0
- package/src/commands/project/commandPauseProject.ts +33 -0
- package/src/commands/project/commandPortForward.ts +74 -0
- package/src/commands/project/commandProjectRestoreDb.ts +201 -0
- package/src/commands/project/commandRenewToken.ts +12 -0
- package/src/commands/project/commandSecretsClearBackups.ts +19 -0
- package/src/commands/project/commandSecurityEvaluate.ts +22 -0
- package/src/commands/project/commandSetup.ts +21 -0
- package/src/commands/project/commandTriggerCronjob.ts +99 -0
- package/src/commands/security/commandSecurityAuditCiJob.ts +91 -0
- package/src/commands/security/commandSecurityAuditCreate.ts +58 -0
- package/src/commands/security/commandSecurityAuditEvaluate.ts +30 -0
- package/src/completion.ts +272 -0
- package/src/config/getProjectConfig.ts +9 -9
- package/src/core/defineCommand.ts +32 -0
- package/src/core/index.ts +23 -0
- package/src/core/registry.ts +22 -0
- package/src/core/runner.ts +31 -0
- package/src/core/types.ts +142 -0
- package/src/gcloud/cloudRun/openCloudRunDashboards.ts +2 -2
- package/src/gcloud/openDashboard.ts +3 -3
- package/src/gcloud/serviceAccounts.ts +2 -2
- package/src/kubernetes/openKubernetesDashboards.ts +3 -3
- package/src/utils/gitlab.ts +46 -58
- package/src/utils/log.ts +2 -2
- package/bin/catci +0 -3
- package/bin/catci-dev +0 -3
- package/dist/bundles/catci/index.js +0 -41
- package/dist/cli/src/apps/catci/catci.d.ts +0 -1
- package/dist/cli/src/apps/catci/catci.js +0 -33
- package/dist/cli/src/apps/catci/catci.js.map +0 -1
- package/dist/cli/src/apps/catci/commands/security/auditDocument.js.map +0 -1
- package/dist/cli/src/apps/catci/commands/security/commands.d.ts +0 -2
- package/dist/cli/src/apps/catci/commands/security/commands.js +0 -118
- package/dist/cli/src/apps/catci/commands/security/commands.js.map +0 -1
- package/dist/cli/src/apps/catci/commands/security/createSecurityAuditMergeRequest.js.map +0 -1
- package/dist/cli/src/apps/catci/commands/security/evaluateSecurityAudit.js.map +0 -1
- package/dist/cli/src/apps/cli/cli.d.ts +0 -2
- package/dist/cli/src/apps/cli/cli.js +0 -38
- package/dist/cli/src/apps/cli/cli.js.map +0 -1
- package/dist/cli/src/apps/cli/commands/cloudSQL/commandRestoreDb.d.ts +0 -3
- package/dist/cli/src/apps/cli/commands/cloudSQL/commandRestoreDb.js +0 -130
- package/dist/cli/src/apps/cli/commands/cloudSQL/commandRestoreDb.js.map +0 -1
- package/dist/cli/src/apps/cli/commands/cloudSQL/index.d.ts +0 -3
- package/dist/cli/src/apps/cli/commands/cloudSQL/index.js +0 -14
- package/dist/cli/src/apps/cli/commands/cloudSQL/index.js.map +0 -1
- package/dist/cli/src/apps/cli/commands/general/index.d.ts +0 -4
- package/dist/cli/src/apps/cli/commands/general/index.js +0 -83
- package/dist/cli/src/apps/cli/commands/general/index.js.map +0 -1
- package/dist/cli/src/apps/cli/commands/general/namespaceAutoCompletion.d.ts +0 -3
- package/dist/cli/src/apps/cli/commands/general/namespaceAutoCompletion.js +0 -13
- package/dist/cli/src/apps/cli/commands/general/namespaceAutoCompletion.js.map +0 -1
- package/dist/cli/src/apps/cli/commands/general/portForward.d.ts +0 -3
- package/dist/cli/src/apps/cli/commands/general/portForward.js +0 -47
- package/dist/cli/src/apps/cli/commands/general/portForward.js.map +0 -1
- package/dist/cli/src/apps/cli/commands/mongodb/index.d.ts +0 -3
- package/dist/cli/src/apps/cli/commands/mongodb/index.js +0 -18
- package/dist/cli/src/apps/cli/commands/mongodb/index.js.map +0 -1
- package/dist/cli/src/apps/cli/commands/mongodb/projectMongoDestroyMember.d.ts +0 -3
- package/dist/cli/src/apps/cli/commands/mongodb/projectMongoDestroyMember.js +0 -96
- package/dist/cli/src/apps/cli/commands/mongodb/projectMongoDestroyMember.js.map +0 -1
- package/dist/cli/src/apps/cli/commands/mongodb/projectMongoGetShell.d.ts +0 -3
- package/dist/cli/src/apps/cli/commands/mongodb/projectMongoGetShell.js +0 -38
- package/dist/cli/src/apps/cli/commands/mongodb/projectMongoGetShell.js.map +0 -1
- package/dist/cli/src/apps/cli/commands/mongodb/projectMongoPortForward.d.ts +0 -3
- package/dist/cli/src/apps/cli/commands/mongodb/projectMongoPortForward.js +0 -64
- package/dist/cli/src/apps/cli/commands/mongodb/projectMongoPortForward.js.map +0 -1
- package/dist/cli/src/apps/cli/commands/project/cloudSql/commandProjectRestoreDb.d.ts +0 -3
- package/dist/cli/src/apps/cli/commands/project/cloudSql/commandProjectRestoreDb.js +0 -152
- package/dist/cli/src/apps/cli/commands/project/cloudSql/commandProjectRestoreDb.js.map +0 -1
- package/dist/cli/src/apps/cli/commands/project/commandCloudSqlProxy.d.ts +0 -3
- package/dist/cli/src/apps/cli/commands/project/commandCloudSqlProxy.js +0 -120
- package/dist/cli/src/apps/cli/commands/project/commandCloudSqlProxy.js.map +0 -1
- package/dist/cli/src/apps/cli/commands/project/commandDeletePods.d.ts +0 -3
- package/dist/cli/src/apps/cli/commands/project/commandDeletePods.js +0 -54
- package/dist/cli/src/apps/cli/commands/project/commandDeletePods.js.map +0 -1
- package/dist/cli/src/apps/cli/commands/project/commandDeleteProject.d.ts +0 -3
- package/dist/cli/src/apps/cli/commands/project/commandDeleteProject.js +0 -33
- package/dist/cli/src/apps/cli/commands/project/commandDeleteProject.js.map +0 -1
- package/dist/cli/src/apps/cli/commands/project/commandEnvVars.d.ts +0 -3
- package/dist/cli/src/apps/cli/commands/project/commandEnvVars.js +0 -17
- package/dist/cli/src/apps/cli/commands/project/commandEnvVars.js.map +0 -1
- package/dist/cli/src/apps/cli/commands/project/commandGetMyTotalWorktime.d.ts +0 -3
- package/dist/cli/src/apps/cli/commands/project/commandGetMyTotalWorktime.js +0 -11
- package/dist/cli/src/apps/cli/commands/project/commandGetMyTotalWorktime.js.map +0 -1
- package/dist/cli/src/apps/cli/commands/project/commandGetShell.d.ts +0 -3
- package/dist/cli/src/apps/cli/commands/project/commandGetShell.js +0 -37
- package/dist/cli/src/apps/cli/commands/project/commandGetShell.js.map +0 -1
- package/dist/cli/src/apps/cli/commands/project/commandGitlabCi.d.ts +0 -3
- package/dist/cli/src/apps/cli/commands/project/commandGitlabCi.js +0 -88
- package/dist/cli/src/apps/cli/commands/project/commandGitlabCi.js.map +0 -1
- package/dist/cli/src/apps/cli/commands/project/commandListPods.d.ts +0 -3
- package/dist/cli/src/apps/cli/commands/project/commandListPods.js +0 -22
- package/dist/cli/src/apps/cli/commands/project/commandListPods.js.map +0 -1
- package/dist/cli/src/apps/cli/commands/project/commandNamespace.d.ts +0 -3
- package/dist/cli/src/apps/cli/commands/project/commandNamespace.js +0 -12
- package/dist/cli/src/apps/cli/commands/project/commandNamespace.js.map +0 -1
- package/dist/cli/src/apps/cli/commands/project/commandOpenEnv.d.ts +0 -3
- package/dist/cli/src/apps/cli/commands/project/commandOpenEnv.js +0 -26
- package/dist/cli/src/apps/cli/commands/project/commandOpenEnv.js.map +0 -1
- package/dist/cli/src/apps/cli/commands/project/commandOpenGit.d.ts +0 -3
- package/dist/cli/src/apps/cli/commands/project/commandOpenGit.js +0 -9
- package/dist/cli/src/apps/cli/commands/project/commandOpenGit.js.map +0 -1
- package/dist/cli/src/apps/cli/commands/project/commandOpenLogs.d.ts +0 -3
- package/dist/cli/src/apps/cli/commands/project/commandOpenLogs.js +0 -18
- package/dist/cli/src/apps/cli/commands/project/commandOpenLogs.js.map +0 -1
- package/dist/cli/src/apps/cli/commands/project/commandPauseProject.d.ts +0 -3
- package/dist/cli/src/apps/cli/commands/project/commandPauseProject.js +0 -33
- package/dist/cli/src/apps/cli/commands/project/commandPauseProject.js.map +0 -1
- package/dist/cli/src/apps/cli/commands/project/commandPortForward.d.ts +0 -3
- package/dist/cli/src/apps/cli/commands/project/commandPortForward.js +0 -97
- package/dist/cli/src/apps/cli/commands/project/commandPortForward.js.map +0 -1
- package/dist/cli/src/apps/cli/commands/project/commandRenewToken.d.ts +0 -3
- package/dist/cli/src/apps/cli/commands/project/commandRenewToken.js +0 -9
- package/dist/cli/src/apps/cli/commands/project/commandRenewToken.js.map +0 -1
- package/dist/cli/src/apps/cli/commands/project/commandSecretsClearBackups.d.ts +0 -5
- package/dist/cli/src/apps/cli/commands/project/commandSecretsClearBackups.js +0 -25
- package/dist/cli/src/apps/cli/commands/project/commandSecretsClearBackups.js.map +0 -1
- package/dist/cli/src/apps/cli/commands/project/commandSecurityEvaluate.d.ts +0 -3
- package/dist/cli/src/apps/cli/commands/project/commandSecurityEvaluate.js +0 -20
- package/dist/cli/src/apps/cli/commands/project/commandSecurityEvaluate.js.map +0 -1
- package/dist/cli/src/apps/cli/commands/project/commandSetup.d.ts +0 -3
- package/dist/cli/src/apps/cli/commands/project/commandSetup.js +0 -12
- package/dist/cli/src/apps/cli/commands/project/commandSetup.js.map +0 -1
- package/dist/cli/src/apps/cli/commands/project/commandTriggerCronjob.d.ts +0 -3
- package/dist/cli/src/apps/cli/commands/project/commandTriggerCronjob.js +0 -63
- package/dist/cli/src/apps/cli/commands/project/commandTriggerCronjob.js.map +0 -1
- package/dist/cli/src/apps/cli/commands/project/index.d.ts +0 -3
- package/dist/cli/src/apps/cli/commands/project/index.js +0 -54
- package/dist/cli/src/apps/cli/commands/project/index.js.map +0 -1
- package/dist/cli/src/apps/cli/commands/project/utils/showProjectBanner.d.ts +0 -2
- package/dist/cli/src/apps/cli/commands/project/utils/showProjectBanner.js +0 -16
- package/dist/cli/src/apps/cli/commands/project/utils/showProjectBanner.js.map +0 -1
- package/dist/cli/src/apps/cli/commands/theStuffThatReallyMatters/index.d.ts +0 -3
- package/dist/cli/src/apps/cli/commands/theStuffThatReallyMatters/index.js +0 -37
- package/dist/cli/src/apps/cli/commands/theStuffThatReallyMatters/index.js.map +0 -1
- package/dist/cli/src/apps/cli/verify/index.d.ts +0 -2
- package/dist/cli/src/apps/cli/verify/index.js +0 -17
- package/dist/cli/src/apps/cli/verify/index.js.map +0 -1
- package/dist/cli/src/catci.d.ts +0 -1
- package/dist/cli/src/catci.js +0 -7
- package/dist/cli/src/catci.js.map +0 -1
- package/src/apps/catci/catci.ts +0 -26
- package/src/apps/catci/commands/security/commands.ts +0 -161
- package/src/apps/cli/cli.ts +0 -43
- package/src/apps/cli/commands/cloudSQL/commandRestoreDb.ts +0 -136
- package/src/apps/cli/commands/cloudSQL/index.ts +0 -7
- package/src/apps/cli/commands/general/index.ts +0 -90
- package/src/apps/cli/commands/general/namespaceAutoCompletion.ts +0 -7
- package/src/apps/cli/commands/general/portForward.ts +0 -48
- package/src/apps/cli/commands/mongodb/index.ts +0 -10
- package/src/apps/cli/commands/mongodb/projectMongoDestroyMember.ts +0 -132
- package/src/apps/cli/commands/mongodb/projectMongoGetShell.ts +0 -42
- package/src/apps/cli/commands/mongodb/projectMongoPortForward.ts +0 -64
- package/src/apps/cli/commands/project/cloudSql/commandProjectRestoreDb.ts +0 -206
- package/src/apps/cli/commands/project/commandCloudSqlProxy.ts +0 -194
- package/src/apps/cli/commands/project/commandDeletePods.ts +0 -48
- package/src/apps/cli/commands/project/commandDeleteProject.ts +0 -33
- package/src/apps/cli/commands/project/commandEnvVars.ts +0 -18
- package/src/apps/cli/commands/project/commandGetMyTotalWorktime.ts +0 -14
- package/src/apps/cli/commands/project/commandGetShell.ts +0 -36
- package/src/apps/cli/commands/project/commandGitlabCi.ts +0 -115
- package/src/apps/cli/commands/project/commandListPods.ts +0 -20
- package/src/apps/cli/commands/project/commandNamespace.ts +0 -14
- package/src/apps/cli/commands/project/commandOpenEnv.ts +0 -22
- package/src/apps/cli/commands/project/commandOpenGit.ts +0 -12
- package/src/apps/cli/commands/project/commandOpenLogs.ts +0 -21
- package/src/apps/cli/commands/project/commandPauseProject.ts +0 -33
- package/src/apps/cli/commands/project/commandPortForward.ts +0 -91
- package/src/apps/cli/commands/project/commandRenewToken.ts +0 -12
- package/src/apps/cli/commands/project/commandSecretsClearBackups.ts +0 -26
- package/src/apps/cli/commands/project/commandSecurityEvaluate.ts +0 -26
- package/src/apps/cli/commands/project/commandSetup.ts +0 -14
- package/src/apps/cli/commands/project/commandTriggerCronjob.ts +0 -62
- package/src/apps/cli/commands/project/index.ts +0 -56
- package/src/apps/cli/commands/project/utils/showProjectBanner.ts +0 -11
- package/src/apps/cli/commands/theStuffThatReallyMatters/index.ts +0 -32
- package/src/apps/cli/verify/index.ts +0 -14
- package/src/catci.ts +0 -3
- /package/dist/cli/src/{apps/catci/commands/security ā security}/auditDocument.d.ts +0 -0
- /package/dist/cli/src/{apps/catci/commands/security ā security}/auditDocument.js +0 -0
- /package/dist/cli/src/{apps/catci/commands/security ā security}/createSecurityAuditMergeRequest.d.ts +0 -0
- /package/dist/cli/src/{apps/catci/commands/security ā security}/createSecurityAuditMergeRequest.js +0 -0
- /package/dist/cli/src/{apps/catci/commands/security ā security}/evaluateSecurityAudit.d.ts +0 -0
- /package/dist/cli/src/{apps/catci/commands/security ā security}/evaluateSecurityAudit.js +0 -0
- /package/dist/cli/src/{apps/catci/commands/security ā security}/topics.json +0 -0
- /package/src/{apps/catci/commands/security ā security}/auditDocument.ts +0 -0
- /package/src/{apps/catci/commands/security ā security}/createSecurityAuditMergeRequest.ts +0 -0
- /package/src/{apps/catci/commands/security ā security}/evaluateSecurityAudit.ts +0 -0
- /package/src/{apps/catci/commands/security ā security}/topics.json +0 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { defineCommand } from "../../core/defineCommand";
|
|
2
|
+
import { getProjectPods } from "../../kubernetes";
|
|
3
|
+
|
|
4
|
+
import { getProjectNamespace } from "../../utils/projects";
|
|
5
|
+
import { getShell } from "../../utils/shell";
|
|
6
|
+
import { ensureCluster } from "../../apps/cli/commands/project/utils/ensureCluster";
|
|
7
|
+
import { envAndComponents } from "../../apps/cli/commands/project/utils/autocompletions";
|
|
8
|
+
|
|
9
|
+
export const commandGetShell = defineCommand({
|
|
10
|
+
name: "project get-shell",
|
|
11
|
+
description: "get a shell to a pod in the environment",
|
|
12
|
+
group: "project",
|
|
13
|
+
inputs: {
|
|
14
|
+
envComponent: {
|
|
15
|
+
type: "string",
|
|
16
|
+
message: "environment:component",
|
|
17
|
+
positional: true,
|
|
18
|
+
choices: async () => envAndComponents(),
|
|
19
|
+
},
|
|
20
|
+
podName: {
|
|
21
|
+
type: "string",
|
|
22
|
+
message: "Which pod? š¤",
|
|
23
|
+
choices: async (ctx) => {
|
|
24
|
+
const envComponent = await ctx.get("envComponent");
|
|
25
|
+
const pods = await getProjectPods(envComponent);
|
|
26
|
+
return pods
|
|
27
|
+
.filter((p: any) => p.status.phase == "Running")
|
|
28
|
+
.map((r: any) => r.metadata.name);
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
execute: async (ctx) => {
|
|
33
|
+
const envComponent = await ctx.get("envComponent");
|
|
34
|
+
await ensureCluster(ctx, envComponent);
|
|
35
|
+
const namespace = await getProjectNamespace(envComponent);
|
|
36
|
+
const podName = await ctx.get("podName");
|
|
37
|
+
return getShell(namespace, podName);
|
|
38
|
+
},
|
|
39
|
+
});
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { exec } from "child-process-promise";
|
|
2
|
+
import { last } from "lodash";
|
|
3
|
+
import open from "open";
|
|
4
|
+
import { defineCommand } from "../../core/defineCommand";
|
|
5
|
+
import {
|
|
6
|
+
doGitlabRequest,
|
|
7
|
+
getGitlabToken,
|
|
8
|
+
getProjectInfo,
|
|
9
|
+
} from "../../utils/gitlab";
|
|
10
|
+
|
|
11
|
+
const statusEmojiMap: any = {
|
|
12
|
+
failed: "š",
|
|
13
|
+
warning: "šæ",
|
|
14
|
+
pending: "šŗ",
|
|
15
|
+
running: "šā",
|
|
16
|
+
manual: "š¤",
|
|
17
|
+
scheduled: "šŗ",
|
|
18
|
+
canceled: "š½",
|
|
19
|
+
success: "š»",
|
|
20
|
+
skipped: "š¤",
|
|
21
|
+
created: "šŗ",
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const statusTxt = (status: any) =>
|
|
25
|
+
statusEmojiMap[status] ? `${statusEmojiMap[status]} ${status}` : status;
|
|
26
|
+
|
|
27
|
+
const getCurrentCommit = async () => {
|
|
28
|
+
const result = await exec("git rev-parse HEAD");
|
|
29
|
+
return result.stdout && result.stdout.replace(/\n$/, "");
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const delay = async (ms: any) =>
|
|
33
|
+
new Promise((resolve) => setTimeout(resolve, ms));
|
|
34
|
+
|
|
35
|
+
const getJobChoices = async (io: any) => {
|
|
36
|
+
const { id: projectId } = await getProjectInfo(io);
|
|
37
|
+
const jobs = await doGitlabRequest(io, `projects/${projectId}/jobs`);
|
|
38
|
+
const commitId = await getCurrentCommit();
|
|
39
|
+
|
|
40
|
+
const jobsToName = (jo: any[]) =>
|
|
41
|
+
jo.map(
|
|
42
|
+
(j: any) => `${j.ref}-${j.name}-${j.user.username}-${j.status}-${j.id}`,
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
const preferredJobs = jobs.filter((j: any) => j.commit.id === commitId);
|
|
46
|
+
const moreJobs = jobs.filter((j: any) => !preferredJobs.includes(j.ref));
|
|
47
|
+
return preferredJobs.length > 1
|
|
48
|
+
? [
|
|
49
|
+
...jobsToName(preferredJobs),
|
|
50
|
+
"========================================================",
|
|
51
|
+
...jobsToName(moreJobs),
|
|
52
|
+
]
|
|
53
|
+
: jobsToName([...preferredJobs, ...moreJobs]);
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
const findJobById = async (io: any, jobName: string) => {
|
|
57
|
+
const { id: projectId } = await getProjectInfo(io);
|
|
58
|
+
const jobs = await doGitlabRequest(io, `projects/${projectId}/jobs`);
|
|
59
|
+
const jobId = Number(last(jobName.split("-")));
|
|
60
|
+
return { job: jobs.find((j: any) => j.id === jobId), projectId };
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export const commandCiJobOpen = defineCommand({
|
|
64
|
+
name: "project ci job-open",
|
|
65
|
+
description: "Open a Job",
|
|
66
|
+
group: "project",
|
|
67
|
+
inputs: {
|
|
68
|
+
jobName: {
|
|
69
|
+
type: "string",
|
|
70
|
+
message: "Which job? š¤",
|
|
71
|
+
choices: async (ctx) => getJobChoices(ctx),
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
execute: async (ctx) => {
|
|
75
|
+
const jobName = await ctx.get("jobName");
|
|
76
|
+
const { job } = await findJobById(ctx, jobName);
|
|
77
|
+
open(job.web_url);
|
|
78
|
+
},
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
export const commandCiJobLog = defineCommand({
|
|
82
|
+
name: "project ci job-log",
|
|
83
|
+
description: "Show a job's log",
|
|
84
|
+
group: "project",
|
|
85
|
+
inputs: {
|
|
86
|
+
jobName: {
|
|
87
|
+
type: "string",
|
|
88
|
+
message: "Which job? š¤",
|
|
89
|
+
choices: async (ctx) => getJobChoices(ctx),
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
execute: async (ctx) => {
|
|
93
|
+
const jobName = await ctx.get("jobName");
|
|
94
|
+
const { job: selectedJob, projectId } = await findJobById(ctx, jobName);
|
|
95
|
+
const id = selectedJob.id;
|
|
96
|
+
|
|
97
|
+
let finished = false;
|
|
98
|
+
while (!finished) {
|
|
99
|
+
const trace = await exec(
|
|
100
|
+
`curl -s --header "PRIVATE-TOKEN: ${await getGitlabToken(
|
|
101
|
+
ctx,
|
|
102
|
+
)}" "https://git.panter.ch/api/v4/projects/${projectId}/jobs/${id}/trace"`,
|
|
103
|
+
);
|
|
104
|
+
|
|
105
|
+
const job = await doGitlabRequest(
|
|
106
|
+
ctx,
|
|
107
|
+
`projects/${projectId}/jobs/${id}`,
|
|
108
|
+
);
|
|
109
|
+
|
|
110
|
+
if (trace.stdout) {
|
|
111
|
+
ctx.log(trace.stdout);
|
|
112
|
+
} else {
|
|
113
|
+
ctx.log(`\n${statusTxt(job.status)}\n${job.web_url}\n`);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
finished = !!job.finished_at;
|
|
117
|
+
if (!finished) {
|
|
118
|
+
await delay(5000);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { stringify } from "yaml";
|
|
2
|
+
import { pick } from "lodash";
|
|
3
|
+
import { defineCommand } from "../../core/defineCommand";
|
|
4
|
+
import { getProjectPods } from "../../kubernetes";
|
|
5
|
+
import { ensureCluster } from "../../apps/cli/commands/project/utils/ensureCluster";
|
|
6
|
+
import { envAndComponents } from "../../apps/cli/commands/project/utils/autocompletions";
|
|
7
|
+
|
|
8
|
+
export const commandListPods = defineCommand({
|
|
9
|
+
name: "project list-pods",
|
|
10
|
+
description: "list pods of local project",
|
|
11
|
+
group: "project",
|
|
12
|
+
inputs: {
|
|
13
|
+
envComponent: {
|
|
14
|
+
type: "string",
|
|
15
|
+
message: "environment:component",
|
|
16
|
+
positional: true,
|
|
17
|
+
choices: async () => envAndComponents(),
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
execute: async (ctx) => {
|
|
21
|
+
const envComponent = await ctx.get("envComponent");
|
|
22
|
+
await ensureCluster(ctx, envComponent);
|
|
23
|
+
const pods = await getProjectPods(envComponent);
|
|
24
|
+
ctx.log(
|
|
25
|
+
stringify(
|
|
26
|
+
pods.map((p: any) => pick(p, ["metadata.name", "status.startTime"])),
|
|
27
|
+
),
|
|
28
|
+
);
|
|
29
|
+
},
|
|
30
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { defineCommand } from "../../core/defineCommand";
|
|
2
|
+
import { getProjectNamespace } from "../../utils/projects";
|
|
3
|
+
import { envAndComponents } from "../../apps/cli/commands/project/utils/autocompletions";
|
|
4
|
+
|
|
5
|
+
export const commandNamespace = defineCommand({
|
|
6
|
+
name: "project namespace",
|
|
7
|
+
description: "show namespace of local project",
|
|
8
|
+
group: "project",
|
|
9
|
+
inputs: {
|
|
10
|
+
envComponent: {
|
|
11
|
+
type: "string",
|
|
12
|
+
message: "environment:component",
|
|
13
|
+
positional: true,
|
|
14
|
+
choices: async () => envAndComponents(),
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
execute: async (ctx) => {
|
|
18
|
+
const envComponent = await ctx.get("envComponent");
|
|
19
|
+
ctx.log(await getProjectNamespace(envComponent));
|
|
20
|
+
},
|
|
21
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import open from "open";
|
|
2
|
+
import { defineCommand } from "../../core/defineCommand";
|
|
3
|
+
import { getEnvironment, parseChoice } from "../../config/getProjectConfig";
|
|
4
|
+
import { ensureCluster } from "../../apps/cli/commands/project/utils/ensureCluster";
|
|
5
|
+
import { envAndComponents } from "../../apps/cli/commands/project/utils/autocompletions";
|
|
6
|
+
|
|
7
|
+
export const commandOpenEnv = defineCommand({
|
|
8
|
+
name: "project open env",
|
|
9
|
+
description: "open the live environment",
|
|
10
|
+
group: "project",
|
|
11
|
+
inputs: {
|
|
12
|
+
envComponent: {
|
|
13
|
+
type: "string",
|
|
14
|
+
message: "environment:component",
|
|
15
|
+
positional: true,
|
|
16
|
+
choices: async () => envAndComponents(),
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
execute: async (ctx) => {
|
|
20
|
+
const envComponent = await ctx.get("envComponent");
|
|
21
|
+
const { env, componentName } = parseChoice(envComponent);
|
|
22
|
+
await ensureCluster(ctx, envComponent);
|
|
23
|
+
const environment = await getEnvironment(env, componentName);
|
|
24
|
+
const url = environment.envVars.ROOT_URL;
|
|
25
|
+
open(url.toString());
|
|
26
|
+
},
|
|
27
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { exec } from "child-process-promise";
|
|
2
|
+
import { defineCommand } from "../../core/defineCommand";
|
|
3
|
+
|
|
4
|
+
export const commandOpenGit = defineCommand({
|
|
5
|
+
name: "project open git",
|
|
6
|
+
description: "open the repo on gitlab / github in your browser",
|
|
7
|
+
group: "project",
|
|
8
|
+
inputs: {},
|
|
9
|
+
execute: async () => {
|
|
10
|
+
await exec("npx git-open");
|
|
11
|
+
},
|
|
12
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { defineCommand } from "../../core/defineCommand";
|
|
2
|
+
import {
|
|
3
|
+
getPipelineContextByChoice,
|
|
4
|
+
parseChoice,
|
|
5
|
+
} from "../../config/getProjectConfig";
|
|
6
|
+
import { openGoogleCloudLogs } from "../../kubernetes/openKubernetesDashboards";
|
|
7
|
+
import { envAndComponents } from "../../apps/cli/commands/project/utils/autocompletions";
|
|
8
|
+
|
|
9
|
+
export const commandOpenLogs = defineCommand({
|
|
10
|
+
name: "project open logs",
|
|
11
|
+
description: "open google cloud logs (stackdriver logs)",
|
|
12
|
+
group: "project",
|
|
13
|
+
inputs: {
|
|
14
|
+
envComponent: {
|
|
15
|
+
type: "string",
|
|
16
|
+
message: "environment:component",
|
|
17
|
+
positional: true,
|
|
18
|
+
choices: async () => envAndComponents(),
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
execute: async (ctx) => {
|
|
22
|
+
const envComponent = await ctx.get("envComponent");
|
|
23
|
+
const { env, componentName } = parseChoice(envComponent);
|
|
24
|
+
const context = await getPipelineContextByChoice(env, componentName);
|
|
25
|
+
await openGoogleCloudLogs(ctx, context);
|
|
26
|
+
},
|
|
27
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { exec } from "child-process-promise";
|
|
2
|
+
import { defineCommand } from "../../core/defineCommand";
|
|
3
|
+
import { getProjectNamespace } from "../../utils/projects";
|
|
4
|
+
import { envAndComponents } from "../../apps/cli/commands/project/utils/autocompletions";
|
|
5
|
+
|
|
6
|
+
export const commandPauseProject = defineCommand({
|
|
7
|
+
name: "project pause",
|
|
8
|
+
description: "halts all running pods (scales to 0)",
|
|
9
|
+
group: "project",
|
|
10
|
+
inputs: {
|
|
11
|
+
envComponent: {
|
|
12
|
+
type: "string",
|
|
13
|
+
message: "environment:component",
|
|
14
|
+
positional: true,
|
|
15
|
+
choices: async () => envAndComponents(),
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
execute: async (ctx) => {
|
|
19
|
+
const envComponent = await ctx.get("envComponent");
|
|
20
|
+
const namespace = await getProjectNamespace(envComponent);
|
|
21
|
+
const shouldContinue = await ctx.confirm(
|
|
22
|
+
"This will STOP all running pods. You will need to manually scale back up or re-deploy. Continue? š¤ ",
|
|
23
|
+
);
|
|
24
|
+
if (!shouldContinue) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
const fullCommand = `kubectl scale statefulset,deployment --all --replicas=0 --namespace=${namespace}`;
|
|
28
|
+
const { stdout } = await exec(fullCommand, {
|
|
29
|
+
env: { ...process.env, DEBUG: "" },
|
|
30
|
+
});
|
|
31
|
+
ctx.log(stdout);
|
|
32
|
+
},
|
|
33
|
+
});
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { defineCommand } from "../../core/defineCommand";
|
|
2
|
+
import { getProjectPodNames } from "../../kubernetes";
|
|
3
|
+
import { logError } from "../../utils/log";
|
|
4
|
+
import { startKubePortForward } from "../../kubernetes/portForward";
|
|
5
|
+
import { getProjectNamespace } from "../../utils/projects";
|
|
6
|
+
import { ensureCluster } from "../../apps/cli/commands/project/utils/ensureCluster";
|
|
7
|
+
import { parseChoice } from "../../config/parseChoice";
|
|
8
|
+
import { getPipelineContextByChoice } from "../../config/getProjectConfig";
|
|
9
|
+
import { isOfDeployType } from "@catladder/pipeline";
|
|
10
|
+
import { startPortForwardCommand } from "../../utils/portForwards";
|
|
11
|
+
import open from "open";
|
|
12
|
+
import { envAndComponents } from "../../apps/cli/commands/project/utils/autocompletions";
|
|
13
|
+
|
|
14
|
+
export const commandPortForward = defineCommand({
|
|
15
|
+
name: "project port-forward",
|
|
16
|
+
description: "start port-forwarding",
|
|
17
|
+
group: "project",
|
|
18
|
+
inputs: {
|
|
19
|
+
envComponent: {
|
|
20
|
+
type: "string",
|
|
21
|
+
message: "environment:component",
|
|
22
|
+
positional: true,
|
|
23
|
+
choices: async () => envAndComponents(),
|
|
24
|
+
},
|
|
25
|
+
podName: {
|
|
26
|
+
type: "string",
|
|
27
|
+
message: "Which pod? š¤",
|
|
28
|
+
choices: async (ctx) => getProjectPodNames(await ctx.get("envComponent")),
|
|
29
|
+
},
|
|
30
|
+
localPort: { type: "number", message: "Local port: " },
|
|
31
|
+
remotePort: { type: "number", message: "Remote port: " },
|
|
32
|
+
mr: { type: "number", message: "Which mr š¤ " },
|
|
33
|
+
},
|
|
34
|
+
execute: async (ctx) => {
|
|
35
|
+
const envComponent = await ctx.get("envComponent");
|
|
36
|
+
const { env, componentName } = parseChoice(envComponent);
|
|
37
|
+
const context = await getPipelineContextByChoice(env, componentName);
|
|
38
|
+
|
|
39
|
+
if (isOfDeployType(context.deploy?.config, "kubernetes")) {
|
|
40
|
+
await ensureCluster(ctx, envComponent);
|
|
41
|
+
const namespace = await getProjectNamespace(envComponent);
|
|
42
|
+
const podNames = await getProjectPodNames(envComponent);
|
|
43
|
+
if (podNames.length === 0) {
|
|
44
|
+
logError(ctx, "sorry, no pods found");
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
const podName = await ctx.get("podName");
|
|
48
|
+
const localPort = await ctx.get("localPort");
|
|
49
|
+
const remotePort = await ctx.get("remotePort");
|
|
50
|
+
return startKubePortForward(podName, localPort, remotePort, namespace);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
if (isOfDeployType(context.deploy?.config, "google-cloudrun")) {
|
|
54
|
+
if (!isOfDeployType(context.deploy?.config, "google-cloudrun")) {
|
|
55
|
+
throw new Error("not cloud run");
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const { fullName } = context.environment;
|
|
59
|
+
let serviceName: string = fullName.toString();
|
|
60
|
+
if (context.environment.envType === "review") {
|
|
61
|
+
const mr = await ctx.get("mr");
|
|
62
|
+
serviceName = serviceName
|
|
63
|
+
.toString()
|
|
64
|
+
.replace("-review-", "-review-mr" + mr + "-");
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const { projectId, region } = context.deploy.config;
|
|
68
|
+
const command = `gcloud beta run services proxy ${serviceName} --project ${projectId} --region ${region}`;
|
|
69
|
+
|
|
70
|
+
await startPortForwardCommand(`cloudRun/${serviceName}`, command);
|
|
71
|
+
open("http://localhost:8080");
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
});
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import { defineCommand } from "../../core/defineCommand";
|
|
2
|
+
import {
|
|
3
|
+
getAllPipelineContexts,
|
|
4
|
+
getEnvVarsResolved,
|
|
5
|
+
getPipelineContextByChoice,
|
|
6
|
+
} from "../../config/getProjectConfig";
|
|
7
|
+
import type { CloudSqlBackgroundProxy } from "../../gcloud/cloudSql/startProxy";
|
|
8
|
+
import { startCloudSqlProxyInBackground } from "../../gcloud/cloudSql/startProxy";
|
|
9
|
+
import { parseConnectionString } from "../../gcloud/cloudSql/parseConnectionString";
|
|
10
|
+
import { spawnCopyDb } from "../../gcloud/cloudSql/copyDb";
|
|
11
|
+
import type { ComponentContext } from "@catladder/pipeline";
|
|
12
|
+
import { isOfDeployType } from "@catladder/pipeline";
|
|
13
|
+
|
|
14
|
+
const hasCloudSql = (context: ComponentContext) => {
|
|
15
|
+
const deployConfig = context.deploy?.config;
|
|
16
|
+
if (isOfDeployType(deployConfig, "google-cloudrun")) {
|
|
17
|
+
return !!deployConfig.cloudSql;
|
|
18
|
+
}
|
|
19
|
+
if (isOfDeployType(deployConfig, "kubernetes")) {
|
|
20
|
+
return !!deployConfig.values?.cloudsql?.enabled;
|
|
21
|
+
}
|
|
22
|
+
return false;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export const commandProjectRestoreDb = defineCommand({
|
|
26
|
+
name: "project cloudsql restore-db",
|
|
27
|
+
description: "restores a project db from one source to another target",
|
|
28
|
+
group: "project",
|
|
29
|
+
inputs: {
|
|
30
|
+
source: {
|
|
31
|
+
type: "string",
|
|
32
|
+
message: "Source instance? š¤ ",
|
|
33
|
+
choices: async () => {
|
|
34
|
+
const allContexts = await getAllPipelineContexts(undefined, {
|
|
35
|
+
includeLocal: true,
|
|
36
|
+
});
|
|
37
|
+
const sortByEnv = (a: string, b: string) => {
|
|
38
|
+
const aLocal = a.startsWith("local:");
|
|
39
|
+
const bLocal = b.startsWith("local:");
|
|
40
|
+
if (aLocal !== bLocal) return aLocal ? 1 : -1;
|
|
41
|
+
return a.localeCompare(b);
|
|
42
|
+
};
|
|
43
|
+
return allContexts
|
|
44
|
+
.filter(hasCloudSql)
|
|
45
|
+
.map((c: any) => `${c.env}:${c.name}`)
|
|
46
|
+
.sort(sortByEnv);
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
target: {
|
|
50
|
+
type: "string",
|
|
51
|
+
message: "target env? š¤ ",
|
|
52
|
+
choices: async () => {
|
|
53
|
+
const allContexts = await getAllPipelineContexts(undefined, {
|
|
54
|
+
includeLocal: true,
|
|
55
|
+
});
|
|
56
|
+
const sortByEnv = (a: string, b: string) => {
|
|
57
|
+
const aLocal = a.startsWith("local:");
|
|
58
|
+
const bLocal = b.startsWith("local:");
|
|
59
|
+
if (aLocal !== bLocal) return aLocal ? 1 : -1;
|
|
60
|
+
return a.localeCompare(b);
|
|
61
|
+
};
|
|
62
|
+
return allContexts
|
|
63
|
+
.filter(hasCloudSql)
|
|
64
|
+
.map((c: any) => {
|
|
65
|
+
const value = `${c.env}:${c.name}`;
|
|
66
|
+
const isProd = c.environment.envType === "prod";
|
|
67
|
+
return {
|
|
68
|
+
name: isProd ? `ā ļø ${value}` : value,
|
|
69
|
+
value,
|
|
70
|
+
};
|
|
71
|
+
})
|
|
72
|
+
.sort((a: any, b: any) => sortByEnv(a.value, b.value));
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
confirmInstance: {
|
|
76
|
+
type: "string",
|
|
77
|
+
message: "confirm: ",
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
execute: async (ctx) => {
|
|
81
|
+
const source = await ctx.get("source");
|
|
82
|
+
|
|
83
|
+
const [sourceEnv, sourceComponent] = source.split(":");
|
|
84
|
+
const sourceContext = await getPipelineContextByChoice(
|
|
85
|
+
sourceEnv,
|
|
86
|
+
sourceComponent,
|
|
87
|
+
);
|
|
88
|
+
const sourceEnvVars = await getEnvVarsResolved(
|
|
89
|
+
ctx,
|
|
90
|
+
sourceContext.env,
|
|
91
|
+
sourceContext.name,
|
|
92
|
+
);
|
|
93
|
+
|
|
94
|
+
let sourceProxy: CloudSqlBackgroundProxy;
|
|
95
|
+
let sourceDbName: string;
|
|
96
|
+
let sourceUsername: string;
|
|
97
|
+
let sourcePassword: string;
|
|
98
|
+
let targetUsername: string;
|
|
99
|
+
let targetPassword: string;
|
|
100
|
+
let targetProxy: CloudSqlBackgroundProxy;
|
|
101
|
+
let sourcePort: number;
|
|
102
|
+
let targetPort: number;
|
|
103
|
+
let targetDbName: string;
|
|
104
|
+
|
|
105
|
+
const closeAll = () => {
|
|
106
|
+
sourceProxy?.stop();
|
|
107
|
+
targetProxy?.stop();
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
if (sourceEnv === "local") {
|
|
111
|
+
const parsersResult = parseConnectionString(
|
|
112
|
+
sourceEnvVars.DATABASE_URL.toString(),
|
|
113
|
+
);
|
|
114
|
+
sourcePort = parsersResult.hosts?.[0]?.port;
|
|
115
|
+
sourceUsername = parsersResult.username;
|
|
116
|
+
sourcePassword = parsersResult.password;
|
|
117
|
+
sourceDbName = parsersResult.endpoint;
|
|
118
|
+
} else {
|
|
119
|
+
sourcePort = 54399;
|
|
120
|
+
sourceProxy = await startCloudSqlProxyInBackground({
|
|
121
|
+
instanceName:
|
|
122
|
+
sourceEnvVars.CLOUD_SQL_INSTANCE_CONNECTION_NAME.toString(),
|
|
123
|
+
localPort: sourcePort,
|
|
124
|
+
});
|
|
125
|
+
sourceUsername = sourceEnvVars.DB_USER.toString();
|
|
126
|
+
sourcePassword = sourceEnvVars.DB_PASSWORD.toString();
|
|
127
|
+
sourceDbName = sourceEnvVars.DB_NAME?.toString();
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
const target = await ctx.get("target");
|
|
131
|
+
|
|
132
|
+
const [targetEnv, targetComponent] = target.split(":");
|
|
133
|
+
const targetContext = await getPipelineContextByChoice(
|
|
134
|
+
targetEnv,
|
|
135
|
+
targetComponent,
|
|
136
|
+
);
|
|
137
|
+
const targetEnvVars = await getEnvVarsResolved(
|
|
138
|
+
ctx,
|
|
139
|
+
targetContext.env,
|
|
140
|
+
targetContext.name,
|
|
141
|
+
);
|
|
142
|
+
|
|
143
|
+
if (targetEnv === "local") {
|
|
144
|
+
const parsersResult = parseConnectionString(
|
|
145
|
+
targetEnvVars.DATABASE_URL.toString(),
|
|
146
|
+
);
|
|
147
|
+
targetPort = parsersResult.hosts?.[0]?.port;
|
|
148
|
+
targetUsername = parsersResult.username;
|
|
149
|
+
targetPassword = parsersResult.password;
|
|
150
|
+
targetDbName = parsersResult.endpoint;
|
|
151
|
+
} else {
|
|
152
|
+
targetPort = 54499;
|
|
153
|
+
targetProxy = await startCloudSqlProxyInBackground({
|
|
154
|
+
instanceName:
|
|
155
|
+
targetEnvVars.CLOUD_SQL_INSTANCE_CONNECTION_NAME.toString(),
|
|
156
|
+
localPort: targetPort,
|
|
157
|
+
});
|
|
158
|
+
targetUsername = targetEnvVars.DB_USER.toString();
|
|
159
|
+
targetPassword = targetEnvVars.DB_PASSWORD.toString();
|
|
160
|
+
targetDbName = targetEnvVars.DB_NAME.toString();
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
const shouldContinue = await ctx.confirm(
|
|
164
|
+
`This will drop ${targetEnv}/${targetDbName} and replace it with ${sourceEnv}/${sourceDbName}. Continue? š¤ `,
|
|
165
|
+
);
|
|
166
|
+
if (!shouldContinue) {
|
|
167
|
+
ctx.log("abort");
|
|
168
|
+
closeAll();
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
if (targetContext.environment.envType === "prod") {
|
|
173
|
+
ctx.log(
|
|
174
|
+
`\nšØ You are overriding a production environment. Please type in ${targetEnvVars.CLOUD_SQL_INSTANCE_CONNECTION_NAME} to continue\n\n`,
|
|
175
|
+
);
|
|
176
|
+
const confirmInstance = await ctx.get("confirmInstance");
|
|
177
|
+
if (
|
|
178
|
+
confirmInstance !== targetEnvVars.CLOUD_SQL_INSTANCE_CONNECTION_NAME
|
|
179
|
+
) {
|
|
180
|
+
ctx.log("abort");
|
|
181
|
+
closeAll();
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
try {
|
|
187
|
+
await spawnCopyDb({
|
|
188
|
+
targetPassword,
|
|
189
|
+
targetPort,
|
|
190
|
+
targetUsername,
|
|
191
|
+
sourceUsername,
|
|
192
|
+
sourcePassword,
|
|
193
|
+
sourcePort,
|
|
194
|
+
sourceDbName,
|
|
195
|
+
targetDbName,
|
|
196
|
+
});
|
|
197
|
+
} finally {
|
|
198
|
+
closeAll();
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { defineCommand } from "../../core/defineCommand";
|
|
2
|
+
import { setupAccessTokens } from "../../apps/cli/commands/project/setup/setupAccessTokens";
|
|
3
|
+
|
|
4
|
+
export const commandRenewToken = defineCommand({
|
|
5
|
+
name: "project renew-token",
|
|
6
|
+
description: "Configures the project access token for semantic release.",
|
|
7
|
+
group: "project",
|
|
8
|
+
inputs: {},
|
|
9
|
+
execute: async (ctx) => {
|
|
10
|
+
await setupAccessTokens(ctx);
|
|
11
|
+
},
|
|
12
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { defineCommand } from "../../core/defineCommand";
|
|
2
|
+
import { clearBackups } from "../../utils/gitlab";
|
|
3
|
+
|
|
4
|
+
export const commandSecretsClearBackups = defineCommand({
|
|
5
|
+
name: "project secrets-clear-backups",
|
|
6
|
+
description: "clears all backups",
|
|
7
|
+
group: "project",
|
|
8
|
+
inputs: {
|
|
9
|
+
keep: {
|
|
10
|
+
type: "number",
|
|
11
|
+
message: "How many backups should we keep? š¤",
|
|
12
|
+
default: 1,
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
execute: async (ctx) => {
|
|
16
|
+
const keep = await ctx.get("keep");
|
|
17
|
+
await clearBackups(ctx, keep);
|
|
18
|
+
},
|
|
19
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { defineCommand } from "../../core/defineCommand";
|
|
2
|
+
import {
|
|
3
|
+
evaluateSecurityAudit,
|
|
4
|
+
makeSecurityAuditOverview,
|
|
5
|
+
} from "../../security/evaluateSecurityAudit";
|
|
6
|
+
import { getGitRoot } from "../../utils/projects";
|
|
7
|
+
|
|
8
|
+
export const commandSecurityEvaluate = defineCommand({
|
|
9
|
+
name: "project security-evaluate",
|
|
10
|
+
description: "evaluate project's security audit document",
|
|
11
|
+
group: "project",
|
|
12
|
+
inputs: {},
|
|
13
|
+
execute: async (ctx) => {
|
|
14
|
+
const gitRoot = await getGitRoot();
|
|
15
|
+
const result = await evaluateSecurityAudit({ path: gitRoot });
|
|
16
|
+
if (result.isErr()) {
|
|
17
|
+
ctx.log(`Could not evaluate security audit document: ${result.error}`);
|
|
18
|
+
} else {
|
|
19
|
+
ctx.log(makeSecurityAuditOverview(result.value));
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { defineCommand } from "../../core/defineCommand";
|
|
2
|
+
import { setupProject } from "../../apps/cli/commands/project/setup";
|
|
3
|
+
|
|
4
|
+
export const commandSetup = defineCommand({
|
|
5
|
+
name: "project setup",
|
|
6
|
+
description:
|
|
7
|
+
"Initializes all environments and creates required resources, service accounts, etc.",
|
|
8
|
+
group: "project",
|
|
9
|
+
inputs: {
|
|
10
|
+
component: {
|
|
11
|
+
type: "string",
|
|
12
|
+
message: "component name",
|
|
13
|
+
positional: true,
|
|
14
|
+
required: false,
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
execute: async (ctx) => {
|
|
18
|
+
const component = await ctx.get("component");
|
|
19
|
+
await setupProject(ctx, component);
|
|
20
|
+
},
|
|
21
|
+
});
|