@catladder/cli 0.0.0-next-95928577 → 0.0.0-next-e7541a00
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/babel-inline.json +11 -0
- package/bin/catenv +0 -1
- package/bin/catladder +0 -1
- package/dist/bundles/catenv/index.js +46486 -34668
- package/dist/bundles/cli/index.js +215193 -196746
- 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 +6 -2
- package/dist/cli/src/apps/catenv/catenv.js +17 -15
- package/dist/cli/src/apps/catenv/catenv.js.map +1 -1
- package/dist/cli/src/apps/catenv/printVariables.d.ts +2 -2
- package/dist/cli/src/apps/catenv/printVariables.js +34 -38
- package/dist/cli/src/apps/catenv/printVariables.js.map +1 -1
- package/dist/cli/src/apps/catenv/types.d.ts +3 -3
- package/dist/cli/src/apps/catenv/types.js +4 -2
- package/dist/cli/src/apps/catenv/utils.d.ts +12 -5
- package/dist/cli/src/apps/catenv/utils.js +26 -20
- package/dist/cli/src/apps/catenv/utils.js.map +1 -1
- package/dist/cli/src/apps/catenv/verboseBanner.d.ts +1 -0
- package/dist/cli/src/apps/catenv/verboseBanner.js +26 -0
- package/dist/cli/src/apps/catenv/verboseBanner.js.map +1 -0
- package/dist/cli/src/apps/catenv/writeDotEnvFiles.d.ts +2 -2
- package/dist/cli/src/apps/catenv/writeDotEnvFiles.js +26 -24
- package/dist/cli/src/apps/catenv/writeDotEnvFiles.js.map +1 -1
- package/dist/cli/src/apps/catenv/writeEnvDTs.d.ts +2 -2
- package/dist/cli/src/apps/catenv/writeEnvDTs.js +32 -34
- package/dist/cli/src/apps/catenv/writeEnvDTs.js.map +1 -1
- package/dist/cli/src/apps/cli/commands/mongodb/utils/index.d.ts +6 -6
- package/dist/cli/src/apps/cli/commands/mongodb/utils/index.js +56 -52
- package/dist/cli/src/apps/cli/commands/project/commandConfigSecrets.d.ts +2 -5
- package/dist/cli/src/apps/cli/commands/project/commandConfigSecrets.js +98 -128
- 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 +26 -36
- 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 -0
- package/dist/cli/src/apps/cli/commands/project/setup/logSection.js +19 -0
- package/dist/cli/src/apps/cli/commands/project/setup/logSection.js.map +1 -0
- 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 +41 -38
- 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 -0
- package/dist/cli/src/apps/cli/commands/project/setup/setupAgents.js +164 -0
- package/dist/cli/src/apps/cli/commands/project/setup/setupAgents.js.map +1 -0
- 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 +42 -47
- 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 +10 -12
- 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 +70 -69
- 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 +15 -7
- package/dist/cli/src/apps/cli/commands/project/setup/setupTopic.js.map +1 -1
- package/dist/cli/src/apps/cli/commands/project/utils/autocompletions.d.ts +2 -1
- package/dist/cli/src/apps/cli/commands/project/utils/autocompletions.js +25 -12
- package/dist/cli/src/apps/cli/commands/project/utils/autocompletions.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 +35 -28
- package/dist/cli/src/apps/cli/commands/project/utils/ensureCluster.js.map +1 -1
- package/dist/cli/src/apps/cli/commands/project/utils/ensureNamespace.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/project/utils/ensureNamespace.js +35 -30
- package/dist/cli/src/apps/cli/utils/getGoogleAuthUserNumber.d.ts +2 -1
- package/dist/cli/src/apps/cli/utils/getGoogleAuthUserNumber.js +17 -15
- package/dist/cli/src/apps/cli/utils/getGoogleAuthUserNumber.js.map +1 -1
- package/dist/cli/src/catenv.d.ts +1 -1
- package/dist/cli/src/catenv.js +34 -12
- package/dist/cli/src/catenv.js.map +1 -1
- package/dist/cli/src/cli.d.ts +1 -1
- package/dist/cli/src/cli.js +223 -6
- package/dist/cli/src/cli.js.map +1 -1
- package/dist/cli/src/commands/availability.d.ts +5 -0
- package/dist/cli/src/commands/availability.js +26 -0
- package/dist/cli/src/commands/availability.js.map +1 -0
- 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 +38 -0
- package/dist/cli/src/commands/index.js +285 -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 +91 -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 +38 -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 +67 -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 +129 -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/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/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/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 +47 -0
- package/dist/cli/src/commands/project/commandOpenLogs.js.map +1 -0
- package/dist/cli/src/commands/project/commandPortForward.d.ts +25 -0
- package/dist/cli/src/commands/project/commandPortForward.js +97 -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 +161 -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/k8s/commandDeletePods.d.ts +13 -0
- package/dist/cli/src/commands/project/k8s/commandDeletePods.js +51 -0
- package/dist/cli/src/commands/project/k8s/commandDeletePods.js.map +1 -0
- package/dist/cli/src/commands/project/k8s/commandDeleteProject.d.ts +8 -0
- package/dist/cli/src/commands/project/k8s/commandDeleteProject.js +43 -0
- package/dist/cli/src/commands/project/k8s/commandDeleteProject.js.map +1 -0
- package/dist/cli/src/commands/project/k8s/commandGetShell.d.ts +13 -0
- package/dist/cli/src/commands/project/k8s/commandGetShell.js +43 -0
- package/dist/cli/src/commands/project/k8s/commandGetShell.js.map +1 -0
- package/dist/cli/src/commands/project/k8s/commandListPods.d.ts +8 -0
- package/dist/cli/src/commands/project/k8s/commandListPods.js +33 -0
- package/dist/cli/src/commands/project/k8s/commandListPods.js.map +1 -0
- package/dist/cli/src/commands/project/k8s/commandNamespace.d.ts +8 -0
- package/dist/cli/src/commands/project/k8s/commandNamespace.js +28 -0
- package/dist/cli/src/commands/project/k8s/commandNamespace.js.map +1 -0
- package/dist/cli/src/commands/project/k8s/commandPauseProject.d.ts +8 -0
- package/dist/cli/src/commands/project/k8s/commandPauseProject.js +43 -0
- package/dist/cli/src/commands/project/k8s/commandPauseProject.js.map +1 -0
- package/dist/cli/src/commands/project/k8s/commandTriggerCronjob.d.ts +25 -0
- package/dist/cli/src/commands/project/k8s/commandTriggerCronjob.js +97 -0
- package/dist/cli/src/commands/project/k8s/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 +12 -8
- package/dist/cli/src/config/getProjectConfig.js +89 -90
- package/dist/cli/src/config/getProjectConfig.js.map +1 -1
- package/dist/cli/src/config/parseChoice.d.ts +3 -3
- package/dist/cli/src/config/parseChoice.js +11 -6
- 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 +107 -0
- package/dist/cli/src/core/types.js +16 -0
- package/dist/cli/src/core/types.js.map +1 -0
- package/dist/cli/src/gcloud/artifactsRegistry.d.ts +3 -3
- package/dist/cli/src/gcloud/artifactsRegistry.js +12 -11
- package/dist/cli/src/gcloud/cloudRun/getCloudRunDomainSuffix.d.ts +1 -1
- package/dist/cli/src/gcloud/cloudRun/getCloudRunDomainSuffix.js +23 -22
- package/dist/cli/src/gcloud/cloudRun/openCloudRunDashboards.d.ts +2 -2
- package/dist/cli/src/gcloud/cloudRun/openCloudRunDashboards.js +19 -12
- package/dist/cli/src/gcloud/cloudRun/openCloudRunDashboards.js.map +1 -1
- package/dist/cli/src/gcloud/cloudSql/copyDb.d.ts +9 -9
- package/dist/cli/src/gcloud/cloudSql/copyDb.js +42 -26
- package/dist/cli/src/gcloud/cloudSql/copyDb.js.map +1 -1
- package/dist/cli/src/gcloud/cloudSql/parseConnectionString.d.ts +9 -0
- package/dist/cli/src/gcloud/cloudSql/parseConnectionString.js +24 -0
- package/dist/cli/src/gcloud/cloudSql/parseConnectionString.js.map +1 -0
- package/dist/cli/src/gcloud/cloudSql/startProxy.d.ts +4 -4
- package/dist/cli/src/gcloud/cloudSql/startProxy.js +55 -39
- package/dist/cli/src/gcloud/enableServices.d.ts +2 -2
- package/dist/cli/src/gcloud/enableServices.js +8 -6
- package/dist/cli/src/gcloud/openDashboard.d.ts +2 -2
- package/dist/cli/src/gcloud/openDashboard.js +17 -13
- package/dist/cli/src/gcloud/openDashboard.js.map +1 -1
- package/dist/cli/src/gcloud/serviceAccounts.d.ts +8 -8
- package/dist/cli/src/gcloud/serviceAccounts.js +64 -58
- package/dist/cli/src/gcloud/serviceAccounts.js.map +1 -1
- package/dist/cli/src/git/getGetMainBranch.d.ts +1 -0
- package/dist/cli/src/git/getGetMainBranch.js +14 -0
- package/dist/cli/src/git/getGetMainBranch.js.map +1 -0
- package/dist/cli/src/git/gitConfig.d.ts +14 -0
- package/dist/cli/src/git/gitConfig.js +22 -0
- package/dist/cli/src/git/gitConfig.js.map +1 -0
- package/dist/cli/src/git/gitProjectInformation.d.ts +16 -0
- package/dist/cli/src/git/gitProjectInformation.js +48 -0
- package/dist/cli/src/git/gitProjectInformation.js.map +1 -0
- package/dist/cli/src/git/index.d.ts +3 -0
- package/dist/cli/src/git/index.js +27 -0
- package/dist/cli/src/git/index.js.map +1 -0
- package/dist/cli/src/index.d.ts +1 -1
- package/dist/cli/src/index.js +4 -2
- package/dist/cli/src/k8sApi/index.d.ts +1 -1
- package/dist/cli/src/k8sApi/index.js +14 -12
- package/dist/cli/src/kubernetes/index.d.ts +1 -1
- package/dist/cli/src/kubernetes/index.js +24 -17
- package/dist/cli/src/kubernetes/openKubernetesDashboards.d.ts +3 -3
- package/dist/cli/src/kubernetes/openKubernetesDashboards.js +35 -33
- package/dist/cli/src/kubernetes/openKubernetesDashboards.js.map +1 -1
- package/dist/cli/src/kubernetes/portForward.d.ts +1 -1
- package/dist/cli/src/kubernetes/portForward.js +7 -5
- package/dist/cli/src/packageInfos.d.ts +1 -1
- package/dist/cli/src/packageInfos.js +5 -4
- package/dist/cli/src/packageInfos.js.map +1 -1
- package/dist/cli/src/security/auditDocument.d.ts +19 -0
- package/dist/cli/src/security/auditDocument.js +98 -0
- package/dist/cli/src/security/auditDocument.js.map +1 -0
- package/dist/cli/src/security/createSecurityAuditMergeRequest.d.ts +14 -0
- package/dist/cli/src/security/createSecurityAuditMergeRequest.js +52 -0
- package/dist/cli/src/security/createSecurityAuditMergeRequest.js.map +1 -0
- package/dist/cli/src/{apps/catci/commands/security → security}/evaluateSecurityAudit.d.ts +5 -3
- package/dist/cli/src/security/evaluateSecurityAudit.js +32 -0
- package/dist/cli/src/security/evaluateSecurityAudit.js.map +1 -0
- package/dist/cli/src/types/types.d.ts +13 -13
- package/dist/cli/src/types/types.js +4 -2
- package/dist/cli/src/utils/boxWithAscii.d.ts +1 -1
- package/dist/cli/src/utils/boxWithAscii.js +12 -10
- package/dist/cli/src/utils/cluster.d.ts +1 -1
- package/dist/cli/src/utils/cluster.js +8 -6
- package/dist/cli/src/utils/editAsFile.d.ts +1 -1
- package/dist/cli/src/utils/editAsFile.js +25 -17
- package/dist/cli/src/utils/files.d.ts +1 -1
- package/dist/cli/src/utils/files.js +16 -16
- package/dist/cli/src/utils/files.js.map +1 -1
- package/dist/cli/src/utils/getEditor.d.ts +2 -2
- package/dist/cli/src/utils/getEditor.js +20 -14
- package/dist/cli/src/utils/gitlab.d.ts +18 -18
- package/dist/cli/src/utils/gitlab.js +189 -170
- package/dist/cli/src/utils/gitlab.js.map +1 -1
- package/dist/cli/src/utils/log.d.ts +65 -1
- package/dist/cli/src/utils/log.js +67 -11
- package/dist/cli/src/utils/log.js.map +1 -1
- package/dist/cli/src/utils/portForwards.d.ts +5 -5
- package/dist/cli/src/utils/portForwards.js +32 -31
- package/dist/cli/src/utils/{preferences/index.d.ts → preferences.d.ts} +2 -1
- package/dist/cli/src/utils/preferences.js +65 -0
- package/dist/cli/src/utils/preferences.js.map +1 -0
- package/dist/cli/src/utils/projects/index.d.ts +1 -1
- package/dist/cli/src/utils/projects/index.js +24 -21
- package/dist/cli/src/utils/promise.d.ts +1 -1
- package/dist/cli/src/utils/promise.js +8 -6
- package/dist/cli/src/utils/shell.d.ts +1 -1
- package/dist/cli/src/utils/shell.js +20 -19
- package/dist/pipeline/src/backends/gitlab/GitlabBackend.d.ts +14 -0
- package/dist/pipeline/src/backends/gitlab/GitlabBackend.js +170 -0
- package/dist/pipeline/src/backends/gitlab/GitlabBackend.js.map +1 -0
- package/dist/pipeline/src/backends/gitlab/cache.d.ts +9 -0
- package/dist/pipeline/src/backends/gitlab/cache.js +38 -0
- package/dist/pipeline/src/backends/gitlab/cache.js.map +1 -0
- package/dist/pipeline/src/backends/gitlab/ciVariables.d.ts +6 -0
- package/dist/pipeline/src/backends/gitlab/ciVariables.js +17 -0
- package/dist/pipeline/src/backends/gitlab/ciVariables.js.map +1 -0
- package/dist/pipeline/src/backends/gitlab/createGitlabJobs.d.ts +13 -0
- package/dist/pipeline/src/backends/gitlab/createGitlabJobs.js +244 -0
- package/dist/pipeline/src/backends/gitlab/createGitlabJobs.js.map +1 -0
- package/dist/pipeline/src/backends/gitlab/createGitlabPipeline.d.ts +9 -0
- package/dist/pipeline/src/backends/gitlab/createGitlabPipeline.js +71 -0
- package/dist/pipeline/src/backends/gitlab/createGitlabPipeline.js.map +1 -0
- package/dist/pipeline/src/{pipeline → backends/gitlab}/getPipelineStages.d.ts +2 -2
- package/dist/pipeline/src/backends/gitlab/getPipelineStages.js +19 -0
- package/dist/pipeline/src/backends/gitlab/getPipelineStages.js.map +1 -0
- package/dist/pipeline/src/backends/gitlab/gitlabReleaseJobs.d.ts +36 -0
- package/dist/pipeline/src/backends/gitlab/gitlabReleaseJobs.js +43 -0
- package/dist/pipeline/src/backends/gitlab/gitlabReleaseJobs.js.map +1 -0
- package/dist/pipeline/src/backends/gitlab/index.d.ts +2 -0
- package/dist/pipeline/src/backends/gitlab/index.js +26 -0
- package/dist/pipeline/src/backends/gitlab/index.js.map +1 -0
- package/dist/pipeline/src/{pipeline → backends}/gitlab/sortGitLabJobDefProps.d.ts +1 -1
- package/dist/pipeline/src/backends/gitlab/sortGitLabJobDefProps.js +20 -0
- package/dist/pipeline/src/{pipeline → backends}/gitlab/sortGitLabJobDefProps.js.map +1 -1
- package/dist/pipeline/src/backends/index.d.ts +5 -0
- package/dist/pipeline/src/backends/index.js +39 -0
- package/dist/pipeline/src/backends/index.js.map +1 -0
- package/dist/pipeline/src/backends/types.d.ts +30 -0
- package/dist/pipeline/src/backends/types.js +5 -0
- package/dist/pipeline/src/backends/types.js.map +1 -0
- package/dist/pipeline/src/bash/BashExpression.d.ts +18 -18
- package/dist/pipeline/src/bash/BashExpression.js +44 -45
- package/dist/pipeline/src/bash/bashEscape.d.ts +10 -3
- package/dist/pipeline/src/bash/bashEscape.js +68 -72
- package/dist/pipeline/src/bash/bashEscape.js.map +1 -1
- package/dist/pipeline/src/bash/bashExpressionPerPipelineType.d.ts +3 -5
- package/dist/pipeline/src/bash/bashExpressionPerPipelineType.js +7 -6
- package/dist/pipeline/src/bash/bashYaml.d.ts +1 -1
- package/dist/pipeline/src/bash/bashYaml.js +41 -46
- package/dist/pipeline/src/bash/ciVariables.d.ts +16 -0
- package/dist/pipeline/src/bash/ciVariables.js +23 -0
- package/dist/pipeline/src/bash/ciVariables.js.map +1 -0
- package/dist/pipeline/src/bash/getInjectVarsScript.d.ts +1 -1
- package/dist/pipeline/src/bash/getInjectVarsScript.js +12 -15
- package/dist/pipeline/src/bash/getInjectVarsScript.js.map +1 -1
- package/dist/pipeline/src/bash/index.d.ts +1 -1
- package/dist/pipeline/src/bash/index.js +23 -16
- package/dist/pipeline/src/build/artifacts/createBuildJobArtifact.d.ts +1 -1
- package/dist/pipeline/src/build/artifacts/createBuildJobArtifact.js +47 -40
- package/dist/pipeline/src/build/artifacts/createBuildJobArtifact.js.map +1 -1
- package/dist/pipeline/src/build/base/constants.d.ts +4 -4
- package/dist/pipeline/src/build/base/constants.js +8 -6
- package/dist/pipeline/src/build/base/createAppBuildJob.d.ts +5 -2
- package/dist/pipeline/src/build/base/createAppBuildJob.js +52 -46
- package/dist/pipeline/src/build/base/createAppBuildJob.js.map +1 -1
- package/dist/pipeline/src/build/base/createArtifactsConfig.d.ts +1 -1
- package/dist/pipeline/src/build/base/createArtifactsConfig.js +16 -25
- package/dist/pipeline/src/build/base/createBuildJobDefinition.d.ts +3 -3
- package/dist/pipeline/src/build/base/createBuildJobDefinition.js +16 -22
- package/dist/pipeline/src/build/base/createBuildJobDefinition.js.map +1 -1
- package/dist/pipeline/src/build/base/index.d.ts +7 -8
- package/dist/pipeline/src/build/base/index.js +17 -39
- package/dist/pipeline/src/build/base/index.js.map +1 -1
- package/dist/pipeline/src/build/base/writeBuildInfo.d.ts +1 -1
- package/dist/pipeline/src/build/base/writeBuildInfo.js +7 -7
- package/dist/pipeline/src/build/base/writeDotEnv.d.ts +1 -1
- package/dist/pipeline/src/build/base/writeDotEnv.js +20 -22
- package/dist/pipeline/src/build/base/writeDotEnv.js.map +1 -1
- package/dist/pipeline/src/build/cache/createJobCache.d.ts +1 -4
- package/dist/pipeline/src/build/cache/createJobCache.js +47 -55
- package/dist/pipeline/src/build/cache/createJobCache.js.map +1 -1
- package/dist/pipeline/src/build/cache/getAllCacheConfigsFromConfig.d.ts +1 -1
- package/dist/pipeline/src/build/cache/getAllCacheConfigsFromConfig.js +16 -21
- package/dist/pipeline/src/build/cache/getAllCacheConfigsFromConfig.js.map +1 -1
- package/dist/pipeline/src/build/cache/transformLegacyJobCache.d.ts +1 -1
- package/dist/pipeline/src/build/cache/transformLegacyJobCache.js +14 -12
- package/dist/pipeline/src/build/custom/buildJob.d.ts +2 -2
- package/dist/pipeline/src/build/custom/buildJob.js +16 -16
- package/dist/pipeline/src/build/custom/buildJob.js.map +1 -1
- package/dist/pipeline/src/build/custom/index.d.ts +2 -2
- package/dist/pipeline/src/build/custom/index.js +7 -5
- package/dist/pipeline/src/build/custom/index.js.map +1 -1
- package/dist/pipeline/src/build/custom/testJob.d.ts +5 -5
- package/dist/pipeline/src/build/custom/testJob.js +69 -60
- package/dist/pipeline/src/build/custom/testJob.js.map +1 -1
- package/dist/pipeline/src/build/docker.d.ts +57 -49
- package/dist/pipeline/src/build/docker.js +132 -128
- package/dist/pipeline/src/build/docker.js.map +1 -1
- package/dist/pipeline/src/build/index.d.ts +14 -18
- package/dist/pipeline/src/build/index.js +80 -73
- package/dist/pipeline/src/build/index.js.map +1 -1
- package/dist/pipeline/src/build/node/buildJob.d.ts +6 -4
- package/dist/pipeline/src/build/node/buildJob.js +35 -37
- 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 +41 -48
- package/dist/pipeline/src/build/node/cache.js.map +1 -1
- package/dist/pipeline/src/build/node/constants.d.ts +4 -4
- package/dist/pipeline/src/build/node/constants.js +8 -6
- package/dist/pipeline/src/build/node/index.d.ts +4 -4
- package/dist/pipeline/src/build/node/index.js +13 -9
- package/dist/pipeline/src/build/node/index.js.map +1 -1
- package/dist/pipeline/src/build/node/meteor.d.ts +2 -2
- package/dist/pipeline/src/build/node/meteor.js +53 -45
- package/dist/pipeline/src/build/node/meteor.js.map +1 -1
- package/dist/pipeline/src/build/node/testJob.d.ts +2 -2
- package/dist/pipeline/src/build/node/testJob.js +72 -82
- package/dist/pipeline/src/build/node/testJob.js.map +1 -1
- package/dist/pipeline/src/build/node/yarn.d.ts +5 -4
- package/dist/pipeline/src/build/node/yarn.js +37 -39
- package/dist/pipeline/src/build/node/yarn.js.map +1 -1
- package/dist/pipeline/src/build/rails/build.d.ts +2 -2
- package/dist/pipeline/src/build/rails/build.js +37 -44
- package/dist/pipeline/src/build/rails/build.js.map +1 -1
- package/dist/pipeline/src/build/rails/index.d.ts +2 -2
- package/dist/pipeline/src/build/rails/index.js +8 -6
- package/dist/pipeline/src/build/rails/index.js.map +1 -1
- package/dist/pipeline/src/build/rails/{test.d.ts → testJob.d.ts} +2 -2
- package/dist/pipeline/src/build/rails/testJob.js +78 -0
- package/dist/pipeline/src/build/rails/testJob.js.map +1 -0
- package/dist/pipeline/src/build/types.d.ts +296 -259
- package/dist/pipeline/src/build/types.js +10 -10
- package/dist/pipeline/src/build/types.js.map +1 -1
- package/dist/pipeline/src/catenv/index.d.ts +7 -0
- package/dist/pipeline/src/catenv/index.js +14 -0
- package/dist/pipeline/src/catenv/index.js.map +1 -0
- package/dist/pipeline/src/config/configruedEnvs.d.ts +1 -1
- package/dist/pipeline/src/config/configruedEnvs.js +18 -23
- package/dist/pipeline/src/config/index.d.ts +1 -1
- package/dist/pipeline/src/config/index.js +23 -16
- package/dist/pipeline/src/config/readConfig.d.ts +4 -4
- package/dist/pipeline/src/config/readConfig.js +44 -27
- package/dist/pipeline/src/config/readConfig.js.map +1 -1
- package/dist/pipeline/src/constants.d.ts +1 -1
- package/dist/pipeline/src/constants.js +6 -5
- package/dist/pipeline/src/context/createAllComponentsContext.d.ts +8 -4
- package/dist/pipeline/src/context/createAllComponentsContext.js +22 -16
- package/dist/pipeline/src/context/createComponentContext.d.ts +6 -6
- package/dist/pipeline/src/context/createComponentContext.js +88 -86
- package/dist/pipeline/src/context/createComponentContext.js.map +1 -1
- package/dist/pipeline/src/context/createWorkspaceContext.d.ts +15 -8
- package/dist/pipeline/src/context/createWorkspaceContext.js +38 -29
- package/dist/pipeline/src/context/createWorkspaceContext.js.map +1 -1
- package/dist/pipeline/src/context/getBuildInfoVariables.d.ts +2 -2
- package/dist/pipeline/src/context/getBuildInfoVariables.js +22 -21
- package/dist/pipeline/src/context/getEnvConfig.d.ts +1 -1
- package/dist/pipeline/src/context/getEnvConfig.js +30 -14
- package/dist/pipeline/src/context/getEnvConfig.js.map +1 -1
- package/dist/pipeline/src/context/getEnvType.d.ts +2 -2
- package/dist/pipeline/src/context/getEnvType.js +10 -9
- package/dist/pipeline/src/context/getEnvironment.d.ts +1 -1
- package/dist/pipeline/src/context/getEnvironment.js +20 -16
- package/dist/pipeline/src/context/getEnvironmentContext.d.ts +6 -1
- package/dist/pipeline/src/context/getEnvironmentContext.js +35 -28
- package/dist/pipeline/src/context/getEnvironmentVariables.d.ts +11 -11
- package/dist/pipeline/src/context/getEnvironmentVariables.js +102 -101
- package/dist/pipeline/src/context/getEnvironmentVariables.js.map +1 -1
- package/dist/pipeline/src/context/getLabels.d.ts +7 -7
- package/dist/pipeline/src/context/getLabels.js +26 -23
- package/dist/pipeline/src/context/getLabels.js.map +1 -1
- package/dist/pipeline/src/context/getReviewSlug.d.ts +1 -1
- package/dist/pipeline/src/context/getReviewSlug.js +12 -10
- package/dist/pipeline/src/context/index.d.ts +1 -1
- package/dist/pipeline/src/context/index.js +23 -16
- package/dist/pipeline/src/context/transformJobOnlyVars.d.ts +3 -3
- package/dist/pipeline/src/context/transformJobOnlyVars.js +21 -21
- package/dist/pipeline/src/context/utils/envVars.d.ts +3 -3
- package/dist/pipeline/src/context/utils/envVars.js +13 -13
- package/dist/pipeline/src/context/utils/envVars.js.map +1 -1
- package/dist/pipeline/src/defaults/index.d.ts +1 -1
- package/dist/pipeline/src/defaults/index.js +6 -5
- package/dist/pipeline/src/defaults/index.js.map +1 -1
- package/dist/pipeline/src/deploy/base/deploy.d.ts +4 -2
- package/dist/pipeline/src/deploy/base/deploy.js +87 -96
- package/dist/pipeline/src/deploy/base/deploy.js.map +1 -1
- package/dist/pipeline/src/deploy/base/index.d.ts +4 -4
- package/dist/pipeline/src/deploy/base/index.js +6 -10
- package/dist/pipeline/src/deploy/base/index.js.map +1 -1
- package/dist/pipeline/src/deploy/base/rollback.d.ts +4 -2
- package/dist/pipeline/src/deploy/base/rollback.js +34 -28
- package/dist/pipeline/src/deploy/base/rollback.js.map +1 -1
- package/dist/pipeline/src/deploy/base/stop.d.ts +4 -2
- package/dist/pipeline/src/deploy/base/stop.js +35 -34
- package/dist/pipeline/src/deploy/base/stop.js.map +1 -1
- package/dist/pipeline/src/deploy/base/variables.d.ts +4 -4
- package/dist/pipeline/src/deploy/base/variables.js +8 -6
- package/dist/pipeline/src/deploy/cloudRun/artifactsRegistry.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/artifactsRegistry.js +55 -67
- package/dist/pipeline/src/deploy/cloudRun/cleanup.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/cleanup.js +17 -14
- package/dist/pipeline/src/deploy/cloudRun/cleanup.js.map +1 -1
- package/dist/pipeline/src/deploy/cloudRun/cloudRunRevisions.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/cloudRunRevisions.js +44 -41
- package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunJobs.d.ts +5 -3
- package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunJobs.js +63 -143
- package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunJobs.js.map +1 -1
- package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunServices.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunServices.js +66 -52
- package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunServices.js.map +1 -1
- package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunWorkerPools.d.ts +4 -0
- package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunWorkerPools.js +52 -0
- package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunWorkerPools.js.map +1 -0
- package/dist/pipeline/src/deploy/cloudRun/createJobs/common.d.ts +7 -7
- package/dist/pipeline/src/deploy/cloudRun/createJobs/common.js +33 -38
- package/dist/pipeline/src/deploy/cloudRun/createJobs/constants.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/createJobs/constants.js +5 -3
- package/dist/pipeline/src/deploy/cloudRun/createJobs/execute/onDeploy.d.ts +3 -0
- package/dist/pipeline/src/deploy/cloudRun/createJobs/execute/onDeploy.js +71 -0
- package/dist/pipeline/src/deploy/cloudRun/createJobs/execute/onDeploy.js.map +1 -0
- package/dist/pipeline/src/deploy/cloudRun/createJobs/execute/schedules.d.ts +3 -0
- package/dist/pipeline/src/deploy/cloudRun/createJobs/execute/schedules.js +133 -0
- package/dist/pipeline/src/deploy/cloudRun/createJobs/execute/schedules.js.map +1 -0
- package/dist/pipeline/src/deploy/cloudRun/createJobs/getCloudRunDeployScripts.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/createJobs/getCloudRunDeployScripts.js +14 -30
- package/dist/pipeline/src/deploy/cloudRun/createJobs/getCloudRunDeployScripts.js.map +1 -1
- package/dist/pipeline/src/deploy/cloudRun/createJobs/getCloudRunStopScripts.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/createJobs/getCloudRunStopScripts.js +12 -20
- package/dist/pipeline/src/deploy/cloudRun/createJobs/getCloudRunStopScripts.js.map +1 -1
- package/dist/pipeline/src/deploy/cloudRun/createJobs/healthCheck.d.ts +5 -0
- package/dist/pipeline/src/deploy/cloudRun/createJobs/healthCheck.js +48 -0
- package/dist/pipeline/src/deploy/cloudRun/createJobs/healthCheck.js.map +1 -0
- package/dist/pipeline/src/deploy/cloudRun/createJobs/index.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/createJobs/index.js +36 -37
- package/dist/pipeline/src/deploy/cloudRun/createJobs/volumes.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/createJobs/volumes.js +19 -13
- package/dist/pipeline/src/deploy/cloudRun/createJobs/volumes.js.map +1 -1
- package/dist/pipeline/src/deploy/cloudRun/index.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/index.js +75 -68
- package/dist/pipeline/src/deploy/cloudRun/index.js.map +1 -1
- package/dist/pipeline/src/deploy/cloudRun/utils/cloudRunExecutionUrl.d.ts +10 -0
- package/dist/pipeline/src/deploy/cloudRun/utils/cloudRunExecutionUrl.js +17 -0
- package/dist/pipeline/src/deploy/cloudRun/utils/cloudRunExecutionUrl.js.map +1 -0
- package/dist/pipeline/src/deploy/cloudRun/utils/createArgsString.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/utils/createArgsString.js +14 -18
- package/dist/pipeline/src/deploy/cloudRun/utils/createArgsString.js.map +1 -1
- package/dist/pipeline/src/deploy/cloudRun/utils/database.d.ts +21 -2
- package/dist/pipeline/src/deploy/cloudRun/utils/database.js +61 -45
- package/dist/pipeline/src/deploy/cloudRun/utils/database.js.map +1 -1
- package/dist/pipeline/src/deploy/cloudRun/utils/gcloudServiceAccountLoginCommands.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/utils/gcloudServiceAccountLoginCommands.js +6 -6
- package/dist/pipeline/src/deploy/cloudRun/utils/getJobOrServiceArgs.d.ts +2 -0
- package/dist/pipeline/src/deploy/cloudRun/utils/getJobOrServiceArgs.js +10 -0
- package/dist/pipeline/src/deploy/cloudRun/utils/getJobOrServiceArgs.js.map +1 -0
- package/dist/pipeline/src/deploy/cloudRun/utils/getServiceName.d.ts +4 -0
- package/dist/pipeline/src/deploy/cloudRun/utils/getServiceName.js +8 -4
- package/dist/pipeline/src/deploy/cloudRun/utils/getServiceName.js.map +1 -1
- package/dist/pipeline/src/deploy/cloudRun/utils/jobName.d.ts +5 -1
- package/dist/pipeline/src/deploy/cloudRun/utils/jobName.js +11 -3
- package/dist/pipeline/src/deploy/cloudRun/utils/jobName.js.map +1 -1
- package/dist/pipeline/src/deploy/cloudRun/utils/removeFirstLinesFromCommandOutput.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/utils/removeFirstLinesFromCommandOutput.js +6 -4
- package/dist/pipeline/src/deploy/cloudSql/utils.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudSql/utils.js +7 -9
- package/dist/pipeline/src/deploy/custom/deployJob.d.ts +1 -1
- package/dist/pipeline/src/deploy/custom/deployJob.js +30 -39
- package/dist/pipeline/src/deploy/custom/deployJob.js.map +1 -1
- package/dist/pipeline/src/deploy/custom/index.d.ts +1 -1
- package/dist/pipeline/src/deploy/custom/index.js +9 -7
- package/dist/pipeline/src/deploy/dockerTag/deployJob.d.ts +1 -1
- package/dist/pipeline/src/deploy/dockerTag/deployJob.js +18 -22
- package/dist/pipeline/src/deploy/dockerTag/index.d.ts +1 -1
- package/dist/pipeline/src/deploy/dockerTag/index.js +9 -7
- package/dist/pipeline/src/deploy/index.d.ts +6 -8
- package/dist/pipeline/src/deploy/index.js +27 -20
- package/dist/pipeline/src/deploy/kubernetes/additionalSecretKeys.d.ts +5 -3
- package/dist/pipeline/src/deploy/kubernetes/additionalSecretKeys.js +25 -19
- package/dist/pipeline/src/deploy/kubernetes/cloudSql/index.d.ts +7 -7
- package/dist/pipeline/src/deploy/kubernetes/cloudSql/index.js +36 -35
- package/dist/pipeline/src/deploy/kubernetes/deployJob.d.ts +1 -1
- package/dist/pipeline/src/deploy/kubernetes/deployJob.js +46 -67
- package/dist/pipeline/src/deploy/kubernetes/deployJob.js.map +1 -1
- package/dist/pipeline/src/deploy/kubernetes/index.d.ts +1 -1
- package/dist/pipeline/src/deploy/kubernetes/index.js +54 -45
- package/dist/pipeline/src/deploy/kubernetes/kubeEnv.d.ts +3 -3
- package/dist/pipeline/src/deploy/kubernetes/kubeEnv.js +35 -34
- package/dist/pipeline/src/deploy/kubernetes/kubeValues.d.ts +86 -85
- package/dist/pipeline/src/deploy/kubernetes/kubeValues.js +71 -62
- package/dist/pipeline/src/deploy/kubernetes/kubeValues.js.map +1 -1
- package/dist/pipeline/src/deploy/kubernetes/mongodb.d.ts +28 -24
- package/dist/pipeline/src/deploy/kubernetes/mongodb.js +89 -90
- package/dist/pipeline/src/deploy/kubernetes/mongodb.js.map +1 -1
- package/dist/pipeline/src/deploy/types/base.d.ts +27 -27
- package/dist/pipeline/src/deploy/types/base.js +4 -2
- package/dist/pipeline/src/deploy/types/custom.d.ts +25 -25
- package/dist/pipeline/src/deploy/types/custom.js +4 -2
- package/dist/pipeline/src/deploy/types/dockerTag.d.ts +10 -10
- package/dist/pipeline/src/deploy/types/dockerTag.js +4 -2
- package/dist/pipeline/src/deploy/types/executeBase.d.ts +24 -0
- package/dist/pipeline/src/deploy/types/executeBase.js +5 -0
- package/dist/pipeline/src/deploy/types/executeBase.js.map +1 -0
- package/dist/pipeline/src/deploy/types/googleCloudRun.d.ts +467 -208
- package/dist/pipeline/src/deploy/types/googleCloudRun.js +20 -2
- package/dist/pipeline/src/deploy/types/googleCloudRun.js.map +1 -1
- package/dist/pipeline/src/deploy/types/index.d.ts +9 -8
- package/dist/pipeline/src/deploy/types/index.js +29 -17
- package/dist/pipeline/src/deploy/types/index.js.map +1 -1
- package/dist/pipeline/src/deploy/types/kubernetes.d.ts +255 -254
- package/dist/pipeline/src/deploy/types/kubernetes.js +4 -2
- package/dist/pipeline/src/deploy/utils.d.ts +1 -1
- package/dist/pipeline/src/deploy/utils.js +23 -21
- package/dist/pipeline/src/globalScriptFunctions/index.d.ts +6 -6
- package/dist/pipeline/src/globalScriptFunctions/index.js +21 -19
- package/dist/pipeline/src/index.d.ts +3 -0
- package/dist/pipeline/src/index.js +25 -15
- package/dist/pipeline/src/index.js.map +1 -1
- package/dist/pipeline/src/pipeline/agent/createAgentContext.d.ts +23 -0
- package/dist/pipeline/src/pipeline/agent/createAgentContext.js +49 -0
- package/dist/pipeline/src/pipeline/agent/createAgentContext.js.map +1 -0
- package/dist/pipeline/src/pipeline/agent/createAgentEventJob.d.ts +5 -0
- package/dist/pipeline/src/pipeline/agent/createAgentEventJob.js +33 -0
- package/dist/pipeline/src/pipeline/agent/createAgentEventJob.js.map +1 -0
- package/dist/pipeline/src/pipeline/agent/createAgentReviewJob.d.ts +5 -0
- package/dist/pipeline/src/pipeline/agent/createAgentReviewJob.js +43 -0
- package/dist/pipeline/src/pipeline/agent/createAgentReviewJob.js.map +1 -0
- package/dist/pipeline/src/pipeline/agent/createJobsForAgentContext.d.ts +4 -0
- package/dist/pipeline/src/pipeline/agent/createJobsForAgentContext.js +12 -0
- package/dist/pipeline/src/pipeline/agent/createJobsForAgentContext.js.map +1 -0
- package/dist/pipeline/src/pipeline/agent/prompts.d.ts +6 -0
- package/dist/pipeline/src/pipeline/agent/prompts.js +286 -0
- package/dist/pipeline/src/pipeline/agent/prompts.js.map +1 -0
- package/dist/pipeline/src/pipeline/agent/shared.d.ts +11 -0
- package/dist/pipeline/src/pipeline/agent/shared.js +46 -0
- package/dist/pipeline/src/pipeline/agent/shared.js.map +1 -0
- package/dist/pipeline/src/pipeline/agent/utils.d.ts +3 -0
- package/dist/pipeline/src/pipeline/agent/utils.js +16 -0
- package/dist/pipeline/src/pipeline/agent/utils.js.map +1 -0
- package/dist/pipeline/src/pipeline/createAllJobs.d.ts +18 -10
- package/dist/pipeline/src/pipeline/createAllJobs.js +59 -37
- package/dist/pipeline/src/pipeline/createAllJobs.js.map +1 -1
- package/dist/pipeline/src/pipeline/createJobsForComponent.d.ts +2 -2
- package/dist/pipeline/src/pipeline/createJobsForComponent.js +28 -25
- 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 +8 -6
- package/dist/pipeline/src/pipeline/createJobsForWorkspace.js.map +1 -1
- package/dist/pipeline/src/pipeline/generatePipelineFiles.d.ts +8 -40
- package/dist/pipeline/src/pipeline/generatePipelineFiles.js +35 -50
- package/dist/pipeline/src/pipeline/generatePipelineFiles.js.map +1 -1
- package/dist/pipeline/src/pipeline/index.d.ts +1 -2
- package/dist/pipeline/src/pipeline/index.js +23 -17
- package/dist/pipeline/src/pipeline/index.js.map +1 -1
- package/dist/pipeline/src/pipeline/packageManager.d.ts +2 -1
- package/dist/pipeline/src/pipeline/packageManager.js +51 -58
- package/dist/pipeline/src/pipeline/packageManager.js.map +1 -1
- package/dist/pipeline/src/pipeline/resolveRequirements.d.ts +10 -0
- package/dist/pipeline/src/pipeline/resolveRequirements.js +98 -0
- package/dist/pipeline/src/pipeline/resolveRequirements.js.map +1 -0
- package/dist/pipeline/src/rules/index.d.ts +6 -4
- package/dist/pipeline/src/rules/index.js +26 -51
- package/dist/pipeline/src/rules/index.js.map +1 -1
- package/dist/pipeline/src/runner/index.d.ts +2 -2
- package/dist/pipeline/src/runner/index.js +6 -4
- package/dist/pipeline/src/runner/index.js.map +1 -1
- package/dist/pipeline/src/types/agent.d.ts +16 -0
- package/dist/pipeline/src/types/agent.js +5 -0
- package/dist/pipeline/src/types/agent.js.map +1 -0
- package/dist/pipeline/src/types/config.d.ts +161 -142
- package/dist/pipeline/src/types/config.js +24 -28
- package/dist/pipeline/src/types/config.js.map +1 -1
- package/dist/pipeline/src/types/context.d.ts +110 -108
- package/dist/pipeline/src/types/context.js +9 -7
- package/dist/pipeline/src/types/context.js.map +1 -1
- package/dist/pipeline/src/types/environmentContext.d.ts +25 -25
- package/dist/pipeline/src/types/environmentContext.js +4 -2
- package/dist/pipeline/src/types/gitlab-ci-yml.d.ts +497 -497
- package/dist/pipeline/src/types/gitlab-ci-yml.js +4 -2
- package/dist/pipeline/src/types/gitlab-types.d.ts +16 -13
- package/dist/pipeline/src/types/gitlab-types.js +4 -2
- package/dist/pipeline/src/types/hooks.d.ts +35 -0
- package/dist/pipeline/src/types/hooks.js +5 -0
- package/dist/pipeline/src/types/hooks.js.map +1 -0
- package/dist/pipeline/src/types/index.d.ts +2 -0
- package/dist/pipeline/src/types/index.js +24 -15
- package/dist/pipeline/src/types/index.js.map +1 -1
- package/dist/pipeline/src/types/jobDefinition.d.ts +7 -7
- package/dist/pipeline/src/types/jobDefinition.js +4 -2
- package/dist/pipeline/src/types/jobs.d.ts +200 -93
- package/dist/pipeline/src/types/jobs.js +28 -12
- package/dist/pipeline/src/types/jobs.js.map +1 -1
- package/dist/pipeline/src/types/pipeline.d.ts +1 -2
- package/dist/pipeline/src/types/pipeline.js +4 -2
- package/dist/pipeline/src/types/release.d.ts +7 -0
- package/dist/pipeline/src/types/release.js +5 -0
- package/dist/pipeline/src/types/release.js.map +1 -0
- package/dist/pipeline/src/types/utils.d.ts +1 -3
- package/dist/pipeline/src/types/utils.js +4 -2
- package/dist/pipeline/src/utils/gitlab.d.ts +2 -2
- package/dist/pipeline/src/utils/gitlab.js +12 -15
- package/dist/pipeline/src/utils/index.d.ts +1 -1
- package/dist/pipeline/src/utils/index.js +13 -10
- package/dist/pipeline/src/utils/index.js.map +1 -1
- package/dist/pipeline/src/utils/jsonParse.d.ts +1 -1
- package/dist/pipeline/src/utils/jsonParse.js +11 -10
- package/dist/pipeline/src/utils/measureTime.d.ts +6 -0
- package/dist/pipeline/src/utils/measureTime.js +47 -0
- package/dist/pipeline/src/utils/measureTime.js.map +1 -0
- package/dist/pipeline/src/utils/removeUndefined.d.ts +1 -1
- package/dist/pipeline/src/utils/removeUndefined.js +6 -4
- package/dist/pipeline/src/utils/writeFiles.d.ts +16 -6
- package/dist/pipeline/src/utils/writeFiles.js +55 -34
- package/dist/pipeline/src/utils/writeFiles.js.map +1 -1
- package/dist/pipeline/src/variables/VariableValue.d.ts +1 -1
- package/dist/pipeline/src/variables/VariableValue.js +4 -2
- package/dist/pipeline/src/variables/VariableValueContainingReferences.d.ts +12 -12
- package/dist/pipeline/src/variables/VariableValueContainingReferences.js +45 -51
- package/dist/pipeline/src/variables/resolveAllReferences.d.ts +1 -1
- package/dist/pipeline/src/variables/resolveAllReferences.js +17 -18
- package/dist/pipeline/src/variables/resolveAllReferencesOnce.d.ts +2 -2
- package/dist/pipeline/src/variables/resolveAllReferencesOnce.js +14 -17
- package/dist/pipeline/src/variables/resolveReferencesOnce.d.ts +3 -3
- package/dist/pipeline/src/variables/resolveReferencesOnce.js +17 -16
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +26 -21
- package/scripts/bundle +2 -4
- 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 +21 -7
- package/src/apps/catenv/printVariables.ts +10 -12
- package/src/apps/catenv/utils.ts +12 -3
- package/src/apps/catenv/verboseBanner.ts +33 -0
- package/src/apps/catenv/writeDotEnvFiles.ts +21 -8
- package/src/apps/catenv/writeEnvDTs.ts +15 -6
- package/src/apps/cli/commands/project/commandConfigSecrets.ts +9 -34
- package/src/apps/cli/commands/project/setup/index.ts +18 -21
- package/src/apps/cli/commands/project/setup/logSection.ts +22 -0
- package/src/apps/cli/commands/project/setup/setupAccessTokens.ts +7 -7
- package/src/apps/cli/commands/project/setup/setupAgents.ts +323 -0
- package/src/apps/cli/commands/project/setup/setupCloudRun.ts +2 -2
- package/src/apps/cli/commands/project/setup/setupContext.ts +16 -24
- 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/autocompletions.ts +9 -0
- package/src/apps/cli/commands/project/utils/ensureCluster.ts +19 -12
- package/src/apps/cli/utils/getGoogleAuthUserNumber.ts +5 -4
- package/src/catenv.ts +37 -13
- package/src/cli.ts +243 -2
- package/src/commands/availability.ts +22 -0
- 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 +135 -0
- package/src/commands/mongodb/commandMongoGetShell.ts +38 -0
- package/src/commands/mongodb/commandMongoPortForward.ts +58 -0
- package/src/commands/project/commandCloudSqlProxy.ts +191 -0
- package/src/commands/project/commandConfigSecrets.ts +31 -0
- package/src/commands/project/commandEnvVars.ts +24 -0
- package/src/commands/project/commandGetMyTotalWorktime.ts +14 -0
- package/src/commands/project/commandGitlabCi.ts +122 -0
- package/src/commands/project/commandOpenEnv.ts +27 -0
- package/src/commands/project/commandOpenGit.ts +12 -0
- package/src/commands/project/commandOpenLogs.ts +46 -0
- package/src/commands/project/commandPortForward.ts +76 -0
- package/src/commands/project/commandProjectRestoreDb.ts +203 -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/k8s/commandDeletePods.ts +55 -0
- package/src/commands/project/k8s/commandDeleteProject.ts +35 -0
- package/src/commands/project/k8s/commandGetShell.ts +41 -0
- package/src/commands/project/k8s/commandListPods.ts +32 -0
- package/src/commands/project/k8s/commandNamespace.ts +23 -0
- package/src/commands/project/k8s/commandPauseProject.ts +35 -0
- package/src/commands/project/k8s/commandTriggerCronjob.ts +101 -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 +34 -27
- 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 +145 -0
- package/src/gcloud/cloudRun/openCloudRunDashboards.ts +2 -2
- package/src/gcloud/cloudSql/copyDb.ts +19 -13
- package/src/gcloud/cloudSql/parseConnectionString.ts +28 -0
- package/src/gcloud/openDashboard.ts +3 -3
- package/src/gcloud/serviceAccounts.ts +3 -3
- package/src/git/getGetMainBranch.ts +5 -0
- package/src/git/gitConfig.ts +32 -0
- package/src/git/gitProjectInformation.ts +40 -0
- package/src/git/index.ts +3 -0
- package/src/kubernetes/openKubernetesDashboards.ts +3 -3
- package/src/packageInfos.ts +0 -1
- package/src/utils/files.ts +2 -3
- package/src/utils/gitlab.ts +60 -71
- package/src/utils/log.ts +108 -8
- package/src/utils/preferences.ts +60 -0
- package/bin/catci +0 -3
- package/bin/catci-dev +0 -3
- package/dist/bundles/catci/index.js +0 -71761
- package/dist/cli/src/apps/catci/catci.d.ts +0 -1
- package/dist/cli/src/apps/catci/catci.js +0 -30
- package/dist/cli/src/apps/catci/catci.js.map +0 -1
- package/dist/cli/src/apps/catci/commands/security/auditDocument.d.ts +0 -19
- package/dist/cli/src/apps/catci/commands/security/auditDocument.js +0 -109
- 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 -110
- package/dist/cli/src/apps/catci/commands/security/commands.js.map +0 -1
- package/dist/cli/src/apps/catci/commands/security/createSecurityAuditMergeRequest.d.ts +0 -9
- package/dist/cli/src/apps/catci/commands/security/createSecurityAuditMergeRequest.js +0 -52
- package/dist/cli/src/apps/catci/commands/security/createSecurityAuditMergeRequest.js.map +0 -1
- package/dist/cli/src/apps/catci/commands/security/evaluateSecurityAudit.js +0 -28
- 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 -39
- 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 -111
- 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 -10
- 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 -78
- 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 -11
- 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 -40
- 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 -14
- 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 -94
- 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 -36
- 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 -57
- 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 -126
- 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 -88
- 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 -47
- 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 -28
- 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 -13
- 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 -34
- 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 -86
- 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 -19
- package/dist/cli/src/apps/cli/commands/project/commandListPods.js.map +0 -1
- package/dist/cli/src/apps/cli/commands/project/commandMigrateHelm3.d.ts +0 -7
- package/dist/cli/src/apps/cli/commands/project/commandMigrateHelm3.js +0 -46
- package/dist/cli/src/apps/cli/commands/project/commandMigrateHelm3.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 -11
- package/dist/cli/src/apps/cli/commands/project/commandNamespace.js.map +0 -1
- package/dist/cli/src/apps/cli/commands/project/commandOpenCostDashboard.d.ts +0 -3
- package/dist/cli/src/apps/cli/commands/project/commandOpenCostDashboard.js +0 -22
- package/dist/cli/src/apps/cli/commands/project/commandOpenCostDashboard.js.map +0 -1
- package/dist/cli/src/apps/cli/commands/project/commandOpenDashboard.d.ts +0 -3
- package/dist/cli/src/apps/cli/commands/project/commandOpenDashboard.js +0 -22
- package/dist/cli/src/apps/cli/commands/project/commandOpenDashboard.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 -20
- 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/commandOpenGrafana.d.ts +0 -3
- package/dist/cli/src/apps/cli/commands/project/commandOpenGrafana.js +0 -22
- package/dist/cli/src/apps/cli/commands/project/commandOpenGrafana.js.map +0 -1
- package/dist/cli/src/apps/cli/commands/project/commandOpenGrafanaPod.d.ts +0 -3
- package/dist/cli/src/apps/cli/commands/project/commandOpenGrafanaPod.js +0 -35
- package/dist/cli/src/apps/cli/commands/project/commandOpenGrafanaPod.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 -14
- 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 -28
- 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 -80
- 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 -24
- 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 -19
- 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 -9
- 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 -56
- 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 -14
- 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 -35
- 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 -15
- 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 -5
- package/dist/cli/src/catci.js.map +0 -1
- package/dist/cli/src/config/constants.d.ts +0 -2
- package/dist/cli/src/config/constants.js +0 -6
- package/dist/cli/src/config/constants.js.map +0 -1
- package/dist/cli/src/utils/preferences/index.js +0 -38
- package/dist/cli/src/utils/preferences/index.js.map +0 -1
- package/dist/pipeline/src/build/rails/test.js +0 -88
- package/dist/pipeline/src/build/rails/test.js.map +0 -1
- package/dist/pipeline/src/build/sbom.d.ts +0 -5
- package/dist/pipeline/src/build/sbom.js +0 -42
- package/dist/pipeline/src/build/sbom.js.map +0 -1
- package/dist/pipeline/src/deploy/sbom.d.ts +0 -4
- package/dist/pipeline/src/deploy/sbom.js +0 -28
- package/dist/pipeline/src/deploy/sbom.js.map +0 -1
- package/dist/pipeline/src/pipeline/createChildPipeline.d.ts +0 -3
- package/dist/pipeline/src/pipeline/createChildPipeline.js +0 -30
- package/dist/pipeline/src/pipeline/createChildPipeline.js.map +0 -1
- package/dist/pipeline/src/pipeline/createMainPipeline.d.ts +0 -3
- package/dist/pipeline/src/pipeline/createMainPipeline.js +0 -76
- package/dist/pipeline/src/pipeline/createMainPipeline.js.map +0 -1
- package/dist/pipeline/src/pipeline/getPipelineStages.js +0 -21
- package/dist/pipeline/src/pipeline/getPipelineStages.js.map +0 -1
- package/dist/pipeline/src/pipeline/gitlab/createGitlabJobs.d.ts +0 -11
- package/dist/pipeline/src/pipeline/gitlab/createGitlabJobs.js +0 -262
- package/dist/pipeline/src/pipeline/gitlab/createGitlabJobs.js.map +0 -1
- package/dist/pipeline/src/pipeline/gitlab/createGitlabPipeline.d.ts +0 -4
- package/dist/pipeline/src/pipeline/gitlab/createGitlabPipeline.js +0 -25
- package/dist/pipeline/src/pipeline/gitlab/createGitlabPipeline.js.map +0 -1
- package/dist/pipeline/src/pipeline/gitlab/getPipelineTriggerForGitlabChildPipeline.d.ts +0 -1
- package/dist/pipeline/src/pipeline/gitlab/getPipelineTriggerForGitlabChildPipeline.js +0 -32
- package/dist/pipeline/src/pipeline/gitlab/getPipelineTriggerForGitlabChildPipeline.js.map +0 -1
- package/dist/pipeline/src/pipeline/gitlab/gitlabReleaseJobs.d.ts +0 -35
- package/dist/pipeline/src/pipeline/gitlab/gitlabReleaseJobs.js +0 -27
- package/dist/pipeline/src/pipeline/gitlab/gitlabReleaseJobs.js.map +0 -1
- package/dist/pipeline/src/pipeline/gitlab/sortGitLabJobDefProps.js +0 -50
- package/dist/pipeline/src/pipeline/yarn/yarnUtils.d.ts +0 -5
- package/dist/pipeline/src/pipeline/yarn/yarnUtils.js +0 -51
- package/dist/pipeline/src/pipeline/yarn/yarnUtils.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 -181
- package/src/apps/cli/commands/project/commandCloudSqlProxy.ts +0 -130
- 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/commandMigrateHelm3.ts +0 -63
- package/src/apps/cli/commands/project/commandNamespace.ts +0 -14
- package/src/apps/cli/commands/project/commandOpenCostDashboard.ts +0 -32
- package/src/apps/cli/commands/project/commandOpenDashboard.ts +0 -28
- 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/commandOpenGrafana.ts +0 -31
- package/src/apps/cli/commands/project/commandOpenGrafanaPod.ts +0 -43
- 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 -12
- package/src/apps/cli/commands/project/commandTriggerCronjob.ts +0 -62
- package/src/apps/cli/commands/project/index.ts +0 -61
- 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/src/config/constants.ts +0 -2
- package/src/utils/preferences/index.ts +0 -34
- /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,15 @@
|
|
|
1
|
+
import { defineCommand } from "../../core/defineCommand";
|
|
2
|
+
import { stopPortForward } from "../../utils/portForwards";
|
|
3
|
+
|
|
4
|
+
export const commandKubeStopPortforward = defineCommand({
|
|
5
|
+
name: "k8s stop-portforward",
|
|
6
|
+
description: "stop a running port forward",
|
|
7
|
+
group: "general",
|
|
8
|
+
inputs: {
|
|
9
|
+
name: { type: "string", message: "port forward name", positional: true },
|
|
10
|
+
},
|
|
11
|
+
execute: async (ctx) => {
|
|
12
|
+
const name = await ctx.get("name");
|
|
13
|
+
stopPortForward(name.trim());
|
|
14
|
+
},
|
|
15
|
+
});
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// General commands
|
|
2
|
+
export { commandKubeCurrentContext } from "./general/commandKubeCurrentContext";
|
|
3
|
+
export { commandKubeListNamespaces } from "./general/commandKubeListNamespaces";
|
|
4
|
+
export { commandKubeListSecrets } from "./general/commandKubeListSecrets";
|
|
5
|
+
export { commandKubeListPods } from "./general/commandKubeListPods";
|
|
6
|
+
export { commandKubeStopPortforward } from "./general/commandKubeStopPortforward";
|
|
7
|
+
export { commandKubeGetShell } from "./general/commandKubeGetShell";
|
|
8
|
+
export { commandKubePortForward } from "./general/commandKubePortForward";
|
|
9
|
+
|
|
10
|
+
// Project commands
|
|
11
|
+
export { commandEnvVars } from "./project/commandEnvVars";
|
|
12
|
+
export { commandPortForward } from "./project/commandPortForward";
|
|
13
|
+
export { commandOpenEnv } from "./project/commandOpenEnv";
|
|
14
|
+
export { commandOpenGit } from "./project/commandOpenGit";
|
|
15
|
+
export { commandCloudSqlProxy } from "./project/commandCloudSqlProxy";
|
|
16
|
+
export { commandConfigSecrets } from "./project/commandConfigSecrets";
|
|
17
|
+
export { commandSecretsClearBackups } from "./project/commandSecretsClearBackups";
|
|
18
|
+
export { commandOpenLogs } from "./project/commandOpenLogs";
|
|
19
|
+
export { commandTriggerCronjobGeneral } from "./project/k8s/commandTriggerCronjob";
|
|
20
|
+
export { commandRenewToken } from "./project/commandRenewToken";
|
|
21
|
+
export { commandGetMyTotalWorktime } from "./project/commandGetMyTotalWorktime";
|
|
22
|
+
export { commandSetup } from "./project/commandSetup";
|
|
23
|
+
export { commandCiJobOpen, commandCiJobLog } from "./project/commandGitlabCi";
|
|
24
|
+
export { commandProjectRestoreDb } from "./project/commandProjectRestoreDb";
|
|
25
|
+
export { commandSecurityEvaluate } from "./project/commandSecurityEvaluate";
|
|
26
|
+
|
|
27
|
+
// Project k8s commands
|
|
28
|
+
export { commandNamespace } from "./project/k8s/commandNamespace";
|
|
29
|
+
export { commandListPods } from "./project/k8s/commandListPods";
|
|
30
|
+
export { commandGetShell } from "./project/k8s/commandGetShell";
|
|
31
|
+
export { commandDeletePods } from "./project/k8s/commandDeletePods";
|
|
32
|
+
export { commandPauseProject } from "./project/k8s/commandPauseProject";
|
|
33
|
+
export { commandDeleteProject } from "./project/k8s/commandDeleteProject";
|
|
34
|
+
export { commandTriggerCronjobProject } from "./project/k8s/commandTriggerCronjob";
|
|
35
|
+
|
|
36
|
+
// MongoDB commands
|
|
37
|
+
export { commandMongoGetShell } from "./mongodb/commandMongoGetShell";
|
|
38
|
+
export { commandMongoPortForward } from "./mongodb/commandMongoPortForward";
|
|
39
|
+
export { commandMongoDestroyMember } from "./mongodb/commandMongoDestroyMember";
|
|
40
|
+
|
|
41
|
+
// CloudSQL commands
|
|
42
|
+
export { commandRestoreDb } from "./cloudSQL/commandRestoreDb";
|
|
43
|
+
|
|
44
|
+
// Security commands
|
|
45
|
+
export { commandSecurityAuditCiJob } from "./security/commandSecurityAuditCiJob";
|
|
46
|
+
export { commandSecurityAuditEvaluate } from "./security/commandSecurityAuditEvaluate";
|
|
47
|
+
export { commandSecurityAuditCreate } from "./security/commandSecurityAuditCreate";
|
|
48
|
+
|
|
49
|
+
// Fun commands
|
|
50
|
+
export { commandDadjoke } from "./fun/commandDadjoke";
|
|
51
|
+
export { commandStarwars } from "./fun/commandStarwars";
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { exec } from "child-process-promise";
|
|
2
|
+
import { defineCommand } from "../../core/defineCommand";
|
|
3
|
+
import { getProjectPvcs } from "../../kubernetes";
|
|
4
|
+
import { logError } from "../../utils/log";
|
|
5
|
+
import { getProjectNamespace } from "../../utils/projects";
|
|
6
|
+
import { ensureCluster } from "../../apps/cli/commands/project/utils/ensureCluster";
|
|
7
|
+
import { getMongoDbPodsWithReplInfo } from "../../apps/cli/commands/mongodb/utils";
|
|
8
|
+
import { envAndComponents } from "../../apps/cli/commands/project/utils/autocompletions";
|
|
9
|
+
import { hasDeployType } from "../availability";
|
|
10
|
+
|
|
11
|
+
const removeFinalizer = async (
|
|
12
|
+
namespace: string,
|
|
13
|
+
type: "pod" | "pv" | "pvc",
|
|
14
|
+
name: string,
|
|
15
|
+
) =>
|
|
16
|
+
exec(
|
|
17
|
+
`kubectl patch --namespace ${namespace} ${type} ${name} -p '{"metadata":{"finalizers":null}}'`,
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
const deleteResource = async (
|
|
21
|
+
namespace: string,
|
|
22
|
+
type: "pod" | "pv" | "pvc",
|
|
23
|
+
name: string,
|
|
24
|
+
) => exec(`kubectl delete --namespace ${namespace} ${type} ${name}`);
|
|
25
|
+
|
|
26
|
+
const removeFinalizerAndDelete = async (
|
|
27
|
+
namespace: string,
|
|
28
|
+
type: "pod" | "pv" | "pvc",
|
|
29
|
+
name: string,
|
|
30
|
+
) => {
|
|
31
|
+
return Promise.all([
|
|
32
|
+
removeFinalizer(namespace, type, name),
|
|
33
|
+
await deleteResource(namespace, type, name),
|
|
34
|
+
]);
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export const commandMongoDestroyMember = defineCommand({
|
|
38
|
+
name: "project mongo destroy-member",
|
|
39
|
+
description: "DESTROY a member of a replicaset in order to reinitialize it",
|
|
40
|
+
group: "mongodb",
|
|
41
|
+
isAvailable: hasDeployType("kubernetes"),
|
|
42
|
+
inputs: {
|
|
43
|
+
envComponent: {
|
|
44
|
+
type: "string",
|
|
45
|
+
message: "environment:component",
|
|
46
|
+
positional: true,
|
|
47
|
+
choices: async () => envAndComponents(),
|
|
48
|
+
},
|
|
49
|
+
podName: {
|
|
50
|
+
type: "string",
|
|
51
|
+
message: "Which pod? 🤔",
|
|
52
|
+
choices: async (ctx) => {
|
|
53
|
+
const envComponent = await ctx.get("envComponent");
|
|
54
|
+
const mongodbPods = await getMongoDbPodsWithReplInfo(envComponent);
|
|
55
|
+
const secondaries = mongodbPods.filter((pod: any) => !pod.isMaster);
|
|
56
|
+
return secondaries.map((p: any) => ({
|
|
57
|
+
name: `[ secondary ] ${p.podName}`,
|
|
58
|
+
value: p.podName,
|
|
59
|
+
}));
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
execute: async (ctx) => {
|
|
64
|
+
const envComponent = await ctx.get("envComponent");
|
|
65
|
+
await ensureCluster(ctx, envComponent);
|
|
66
|
+
ctx.log(
|
|
67
|
+
"this command tries to delete a (secondary) member of the replicaset, it's persistent volume claim (pvc) and the volume",
|
|
68
|
+
);
|
|
69
|
+
ctx.log("");
|
|
70
|
+
ctx.log(
|
|
71
|
+
"this is useful, if you update the stateful set with new volume configuration (different size or storage class)",
|
|
72
|
+
);
|
|
73
|
+
ctx.log("");
|
|
74
|
+
ctx.log(
|
|
75
|
+
"Kubernetes will usually recreate the missing member with the updated config and mongodb will start synchronizing the new member.",
|
|
76
|
+
);
|
|
77
|
+
ctx.log("");
|
|
78
|
+
ctx.log(
|
|
79
|
+
"This works without downtime, but should be done when load on the db is low. Also it has not been tested with large dbs (> 10gi)",
|
|
80
|
+
);
|
|
81
|
+
ctx.log("");
|
|
82
|
+
ctx.log(
|
|
83
|
+
"Deleting the volume and claim often stuck, just wait or cancel and restart.",
|
|
84
|
+
);
|
|
85
|
+
ctx.log("");
|
|
86
|
+
|
|
87
|
+
const understood = await ctx.confirm("DO YOU UNDERSTAND?");
|
|
88
|
+
if (!understood) {
|
|
89
|
+
throw new Error("abort");
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
const namespace = await getProjectNamespace(envComponent);
|
|
93
|
+
const pvcs = await getProjectPvcs(envComponent);
|
|
94
|
+
|
|
95
|
+
const podName = await ctx.get("podName");
|
|
96
|
+
|
|
97
|
+
const thePvc = pvcs.find(
|
|
98
|
+
(pvc: any) => pvc.metadata.name === `datadir-${podName}`,
|
|
99
|
+
);
|
|
100
|
+
if (!thePvc) {
|
|
101
|
+
logError(ctx, `sorry, no pvc found for ${podName}`);
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
const shouldContinue = await ctx.confirm(
|
|
106
|
+
"THIS WILL DESTROY THE POD, ITS VOLUME AND ALL ITS DATA 🙀🙀🙀!!! continue? 🤔",
|
|
107
|
+
);
|
|
108
|
+
if (!shouldContinue) {
|
|
109
|
+
throw new Error("abort");
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
ctx.log("destroying volume...");
|
|
113
|
+
try {
|
|
114
|
+
await removeFinalizerAndDelete(
|
|
115
|
+
namespace,
|
|
116
|
+
"pv",
|
|
117
|
+
(thePvc as any).spec.volumeName,
|
|
118
|
+
);
|
|
119
|
+
} catch (e: any) {
|
|
120
|
+
ctx.log(e.message);
|
|
121
|
+
}
|
|
122
|
+
ctx.log("destroying volume claim...");
|
|
123
|
+
try {
|
|
124
|
+
await removeFinalizerAndDelete(
|
|
125
|
+
namespace,
|
|
126
|
+
"pvc",
|
|
127
|
+
(thePvc as any).metadata.name,
|
|
128
|
+
);
|
|
129
|
+
} catch (e: any) {
|
|
130
|
+
ctx.log(e.message);
|
|
131
|
+
}
|
|
132
|
+
ctx.log("destroying pod...");
|
|
133
|
+
await removeFinalizerAndDelete(namespace, "pod", podName);
|
|
134
|
+
},
|
|
135
|
+
});
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { defineCommand } from "../../core/defineCommand";
|
|
2
|
+
|
|
3
|
+
import { getProjectNamespace } from "../../utils/projects";
|
|
4
|
+
import { ensureCluster } from "../../apps/cli/commands/project/utils/ensureCluster";
|
|
5
|
+
import {
|
|
6
|
+
getMongodbShell,
|
|
7
|
+
getProjectMongodbAllPodsSortedWithLabel,
|
|
8
|
+
} from "../../apps/cli/commands/mongodb/utils";
|
|
9
|
+
import { envAndComponents } from "../../apps/cli/commands/project/utils/autocompletions";
|
|
10
|
+
import { hasDeployType } from "../availability";
|
|
11
|
+
|
|
12
|
+
export const commandMongoGetShell = defineCommand({
|
|
13
|
+
name: "project mongo get-shell",
|
|
14
|
+
description: "get a shell to a mongodb in the environment",
|
|
15
|
+
group: "mongodb",
|
|
16
|
+
isAvailable: hasDeployType("kubernetes"),
|
|
17
|
+
inputs: {
|
|
18
|
+
envComponent: {
|
|
19
|
+
type: "string",
|
|
20
|
+
message: "environment:component",
|
|
21
|
+
positional: true,
|
|
22
|
+
choices: async () => envAndComponents(),
|
|
23
|
+
},
|
|
24
|
+
podName: {
|
|
25
|
+
type: "string",
|
|
26
|
+
message: "Which pod? 🤔",
|
|
27
|
+
choices: async (ctx) =>
|
|
28
|
+
getProjectMongodbAllPodsSortedWithLabel(await ctx.get("envComponent")),
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
execute: async (ctx) => {
|
|
32
|
+
const envComponent = await ctx.get("envComponent");
|
|
33
|
+
await ensureCluster(ctx, envComponent);
|
|
34
|
+
const namespace = await getProjectNamespace(envComponent);
|
|
35
|
+
const podName = await ctx.get("podName");
|
|
36
|
+
return getMongodbShell(namespace, podName);
|
|
37
|
+
},
|
|
38
|
+
});
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { defineCommand } from "../../core/defineCommand";
|
|
2
|
+
import { getEnvVarsResolved, parseChoice } from "../../config/getProjectConfig";
|
|
3
|
+
|
|
4
|
+
import { startKubePortForward } from "../../kubernetes/portForward";
|
|
5
|
+
import { getProjectNamespace } from "../../utils/projects";
|
|
6
|
+
import { ensureCluster } from "../../apps/cli/commands/project/utils/ensureCluster";
|
|
7
|
+
import { getProjectMongodbAllPodsSortedWithLabel } from "../../apps/cli/commands/mongodb/utils";
|
|
8
|
+
import clipboard from "clipboardy";
|
|
9
|
+
import { envAndComponents } from "../../apps/cli/commands/project/utils/autocompletions";
|
|
10
|
+
import { hasDeployType } from "../availability";
|
|
11
|
+
|
|
12
|
+
export const commandMongoPortForward = defineCommand({
|
|
13
|
+
name: "project mongo port-forward",
|
|
14
|
+
description: "port forward to a mongodb",
|
|
15
|
+
group: "mongodb",
|
|
16
|
+
isAvailable: hasDeployType("kubernetes"),
|
|
17
|
+
inputs: {
|
|
18
|
+
envComponent: {
|
|
19
|
+
type: "string",
|
|
20
|
+
message: "environment:component",
|
|
21
|
+
positional: true,
|
|
22
|
+
choices: async () => envAndComponents(),
|
|
23
|
+
},
|
|
24
|
+
podName: {
|
|
25
|
+
type: "string",
|
|
26
|
+
message: "Which pod? 🤔",
|
|
27
|
+
choices: async (ctx) =>
|
|
28
|
+
getProjectMongodbAllPodsSortedWithLabel(await ctx.get("envComponent")),
|
|
29
|
+
},
|
|
30
|
+
localPort: {
|
|
31
|
+
type: "number",
|
|
32
|
+
message: "Local port: ",
|
|
33
|
+
default: 30000,
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
execute: async (ctx) => {
|
|
37
|
+
const envComponent = await ctx.get("envComponent");
|
|
38
|
+
await ensureCluster(ctx, envComponent);
|
|
39
|
+
const namespace = await getProjectNamespace(envComponent);
|
|
40
|
+
const podName = await ctx.get("podName");
|
|
41
|
+
|
|
42
|
+
const localPort = await ctx.get("localPort");
|
|
43
|
+
const { env, componentName } = parseChoice(envComponent);
|
|
44
|
+
const envVars = await getEnvVarsResolved(ctx, env, componentName);
|
|
45
|
+
const MONGODB_ROOT_PASSWORD = envVars?.MONGODB_ROOT_PASSWORD;
|
|
46
|
+
const connectionUrl = `mongodb://root:${MONGODB_ROOT_PASSWORD}@localhost:${localPort}`;
|
|
47
|
+
clipboard.writeSync(connectionUrl);
|
|
48
|
+
ctx.log("");
|
|
49
|
+
ctx.log("username: root");
|
|
50
|
+
ctx.log(`password: ${MONGODB_ROOT_PASSWORD}`);
|
|
51
|
+
ctx.log(`connection string: ${connectionUrl}`);
|
|
52
|
+
ctx.log("");
|
|
53
|
+
ctx.log("👆 connection string has been copied to your clipboard!");
|
|
54
|
+
ctx.log("");
|
|
55
|
+
|
|
56
|
+
return startKubePortForward(podName, localPort, 27017, namespace);
|
|
57
|
+
},
|
|
58
|
+
});
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import type { ComponentContext } from "@catladder/pipeline";
|
|
2
|
+
import {
|
|
3
|
+
createKubernetesCloudsqlBaseValues,
|
|
4
|
+
getDeployConfigType,
|
|
5
|
+
isOfDeployType,
|
|
6
|
+
} from "@catladder/pipeline";
|
|
7
|
+
import clipboard from "clipboardy";
|
|
8
|
+
import { defineCommand } from "../../core/defineCommand";
|
|
9
|
+
import {
|
|
10
|
+
getEnvVarsResolved,
|
|
11
|
+
getPipelineContextByChoice,
|
|
12
|
+
parseChoice,
|
|
13
|
+
} from "../../config/getProjectConfig";
|
|
14
|
+
import {
|
|
15
|
+
ERROR_NOT_INSTALLED,
|
|
16
|
+
startCloudSqlProxyInCurrentShell,
|
|
17
|
+
} from "../../gcloud/cloudSql/startProxy";
|
|
18
|
+
import { logError, logLines, logWarning } from "../../utils/log";
|
|
19
|
+
import type { IO } from "../../core/types";
|
|
20
|
+
import { envAndComponents } from "../../apps/cli/commands/project/utils/autocompletions";
|
|
21
|
+
import { hasCloudSql } from "../availability";
|
|
22
|
+
|
|
23
|
+
type ProxyInfo = {
|
|
24
|
+
instanceName: string;
|
|
25
|
+
DB_NAME: string;
|
|
26
|
+
DB_PASSWORD: string;
|
|
27
|
+
DB_USER: string;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const getProxyInfoForKubernetes = async (
|
|
31
|
+
io: IO,
|
|
32
|
+
context: ComponentContext,
|
|
33
|
+
): Promise<ProxyInfo> => {
|
|
34
|
+
if (!isOfDeployType(context.deploy?.config, "kubernetes")) {
|
|
35
|
+
throw new Error("unsupported");
|
|
36
|
+
}
|
|
37
|
+
const envVars = await getEnvVarsResolved(io, context.env, context.name);
|
|
38
|
+
const cloudSqlValues = createKubernetesCloudsqlBaseValues(context);
|
|
39
|
+
const DB_PASSWORD = (
|
|
40
|
+
envVars?.DB_PASSWORD || envVars?.POSTGRESQL_PASSWORD
|
|
41
|
+
)?.toString();
|
|
42
|
+
const DB_NAME = cloudSqlValues.cloudsql.fullDbName.toString();
|
|
43
|
+
const instanceName = cloudSqlValues.cloudsql.instanceConnectionName;
|
|
44
|
+
return { instanceName, DB_PASSWORD, DB_NAME, DB_USER: "postgres" };
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
const getProxyInfoForCloudRun = async (
|
|
48
|
+
io: IO,
|
|
49
|
+
context: ComponentContext,
|
|
50
|
+
): Promise<ProxyInfo> => {
|
|
51
|
+
if (
|
|
52
|
+
!isOfDeployType(context.deploy?.config, "google-cloudrun") ||
|
|
53
|
+
!context.deploy?.config.cloudSql
|
|
54
|
+
) {
|
|
55
|
+
const deployType = getDeployConfigType(context.deploy?.config);
|
|
56
|
+
const errorMessage =
|
|
57
|
+
deployType === "google-cloudrun"
|
|
58
|
+
? `DeployConfig is missing the cloudSql property`
|
|
59
|
+
: `Unsupported DeployConfig type: ${deployType}`;
|
|
60
|
+
logError(io, errorMessage);
|
|
61
|
+
throw new Error(errorMessage);
|
|
62
|
+
}
|
|
63
|
+
const envVars = await getEnvVarsResolved(io, context.env, context.name);
|
|
64
|
+
return {
|
|
65
|
+
instanceName: context.deploy?.config.cloudSql.instanceConnectionName,
|
|
66
|
+
DB_PASSWORD: envVars?.DB_PASSWORD?.toString(),
|
|
67
|
+
DB_NAME: context.environment.envVars.DB_NAME.toString(),
|
|
68
|
+
DB_USER: envVars?.DB_USER?.toString(),
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
const getProxyInfo = async (io: IO, context: ComponentContext) => {
|
|
73
|
+
if (isOfDeployType(context.deploy?.config, "kubernetes")) {
|
|
74
|
+
return getProxyInfoForKubernetes(io, context);
|
|
75
|
+
} else if (isOfDeployType(context.deploy?.config, "google-cloudrun")) {
|
|
76
|
+
return getProxyInfoForCloudRun(io, context);
|
|
77
|
+
}
|
|
78
|
+
throw new Error(`unsupported environment: ${context.deploy?.config?.type}`);
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
const getDbUrl = (
|
|
82
|
+
{ DB_PASSWORD, DB_NAME, DB_USER }: ProxyInfo,
|
|
83
|
+
localPort: string,
|
|
84
|
+
additional: string = "",
|
|
85
|
+
) =>
|
|
86
|
+
`DATABASE_URL="postgresql://${DB_USER}:${DB_PASSWORD}@localhost:${localPort}/${DB_NAME}${additional}"`;
|
|
87
|
+
|
|
88
|
+
const getJdbcUrl = (
|
|
89
|
+
{ DB_PASSWORD, DB_NAME, DB_USER }: ProxyInfo,
|
|
90
|
+
localPort: string,
|
|
91
|
+
) =>
|
|
92
|
+
`DATABASE_JDBC_URL="jdbc:postgresql://localhost:${localPort}/${DB_NAME}?schema=public&user=${DB_USER}&password=${DB_PASSWORD}"`;
|
|
93
|
+
|
|
94
|
+
export const commandCloudSqlProxy = defineCommand({
|
|
95
|
+
name: "project cloudsql proxy",
|
|
96
|
+
description: "proxy to cloud sql db",
|
|
97
|
+
group: "project",
|
|
98
|
+
isAvailable: hasCloudSql(),
|
|
99
|
+
inputs: {
|
|
100
|
+
envComponent: {
|
|
101
|
+
type: "string",
|
|
102
|
+
message: "environment:component",
|
|
103
|
+
positional: true,
|
|
104
|
+
choices: async () => envAndComponents(),
|
|
105
|
+
},
|
|
106
|
+
localPort: {
|
|
107
|
+
type: "number",
|
|
108
|
+
message: "Local port: ",
|
|
109
|
+
default: 54320,
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
execute: async (ctx) => {
|
|
113
|
+
const envComponent = await ctx.get("envComponent");
|
|
114
|
+
const { env, componentName } = parseChoice(envComponent);
|
|
115
|
+
if (!componentName) {
|
|
116
|
+
logWarning(ctx, "need componentName");
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
const context = await getPipelineContextByChoice(env, componentName);
|
|
121
|
+
|
|
122
|
+
if (env === "review") {
|
|
123
|
+
logWarning(
|
|
124
|
+
ctx,
|
|
125
|
+
"connection string does not include mr information on review environments",
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
const localPort = await ctx.get("localPort");
|
|
130
|
+
|
|
131
|
+
const proxyInfo = await getProxyInfo(ctx, context);
|
|
132
|
+
|
|
133
|
+
const psqlEnvVars = {
|
|
134
|
+
PGPASSWORD: proxyInfo.DB_PASSWORD,
|
|
135
|
+
PGUSER: proxyInfo.DB_USER,
|
|
136
|
+
PGDATABASE: proxyInfo.DB_NAME,
|
|
137
|
+
PGHOST: "localhost",
|
|
138
|
+
PGPORT: localPort,
|
|
139
|
+
};
|
|
140
|
+
const lipbqEnvVarDeclarations = Object.entries(psqlEnvVars).map(
|
|
141
|
+
([key, value]) => `${key}="${value}"`,
|
|
142
|
+
);
|
|
143
|
+
const dbUrl = getDbUrl(proxyInfo, String(localPort));
|
|
144
|
+
const jdbcUrl = getJdbcUrl(proxyInfo, String(localPort));
|
|
145
|
+
|
|
146
|
+
clipboard.writeSync(
|
|
147
|
+
[
|
|
148
|
+
"",
|
|
149
|
+
"## CloudSQL proxy connection .env variables",
|
|
150
|
+
dbUrl,
|
|
151
|
+
jdbcUrl,
|
|
152
|
+
"## DATABASE_URL with schema=public parameter (e. g. Prisma requires this):",
|
|
153
|
+
`# ${getDbUrl(proxyInfo, String(localPort), `?schema=public`)}`,
|
|
154
|
+
"## Env variables for libpq (e.g. psql client https://www.postgresql.org/docs/current/libpq-envars.html#LIBPQ-ENVARS)",
|
|
155
|
+
...lipbqEnvVarDeclarations,
|
|
156
|
+
"",
|
|
157
|
+
].join("\n"),
|
|
158
|
+
);
|
|
159
|
+
|
|
160
|
+
logLines(
|
|
161
|
+
ctx,
|
|
162
|
+
null,
|
|
163
|
+
"Connection strings env variables DATABASE_URL and those for the 'psql' client (copied to your clipboard for .env file):",
|
|
164
|
+
dbUrl,
|
|
165
|
+
jdbcUrl,
|
|
166
|
+
...lipbqEnvVarDeclarations,
|
|
167
|
+
null,
|
|
168
|
+
"DATABASE_URL with schema=public parameter (e. g. Prisma requires this):",
|
|
169
|
+
getDbUrl(proxyInfo, String(localPort), `?schema=public`),
|
|
170
|
+
null,
|
|
171
|
+
);
|
|
172
|
+
|
|
173
|
+
try {
|
|
174
|
+
await startCloudSqlProxyInCurrentShell({
|
|
175
|
+
instanceName: proxyInfo.instanceName,
|
|
176
|
+
localPort,
|
|
177
|
+
});
|
|
178
|
+
} catch (error) {
|
|
179
|
+
if (!(error instanceof Error)) throw error;
|
|
180
|
+
if (error.message !== ERROR_NOT_INSTALLED) throw error;
|
|
181
|
+
logError(
|
|
182
|
+
ctx,
|
|
183
|
+
error.message,
|
|
184
|
+
null,
|
|
185
|
+
"Please install the Cloud SQL Auth Proxy from:",
|
|
186
|
+
`https://cloud.google.com/sql/docs/postgres/connect-auth-proxy#install`,
|
|
187
|
+
null,
|
|
188
|
+
);
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
});
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { defineCommand } from "../../core/defineCommand";
|
|
2
|
+
import { projectConfigSecrets } from "../../apps/cli/commands/project/commandConfigSecrets";
|
|
3
|
+
import { envAndComponents } from "../../apps/cli/commands/project/utils/autocompletions";
|
|
4
|
+
|
|
5
|
+
// This command delegates to the existing implementation which uses
|
|
6
|
+
// editAsFile (opens editor) and has retry loops with confirm prompts.
|
|
7
|
+
// Full migration to CommandIO would require reworking the editor flow,
|
|
8
|
+
// so for now we bridge it.
|
|
9
|
+
export const commandConfigSecrets = defineCommand({
|
|
10
|
+
name: "project config-secrets",
|
|
11
|
+
description: "setup/update secrets stored in pass",
|
|
12
|
+
group: "project",
|
|
13
|
+
inputs: {
|
|
14
|
+
envComponent: {
|
|
15
|
+
type: "string",
|
|
16
|
+
message: "environment:component",
|
|
17
|
+
positional: true,
|
|
18
|
+
required: false,
|
|
19
|
+
choices: async () => envAndComponents(),
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
execute: async (ctx) => {
|
|
23
|
+
const envComponent = await ctx.get("envComponent");
|
|
24
|
+
// Bridge: the existing implementation accepts CommandInstance-like
|
|
25
|
+
// objects for logging and prompting. Since it uses this.prompt()
|
|
26
|
+
// internally (not ctx.prompt), we pass ctx which satisfies the
|
|
27
|
+
// IO interface for logging. The interactive prompts inside
|
|
28
|
+
// projectConfigSecrets will need a deeper migration later.
|
|
29
|
+
await projectConfigSecrets(ctx, envComponent);
|
|
30
|
+
},
|
|
31
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { defineCommand } from "../../core/defineCommand";
|
|
2
|
+
import { getEnvVarsResolved, parseChoice } from "../../config/getProjectConfig";
|
|
3
|
+
import { envAndComponents } from "../../apps/cli/commands/project/utils/autocompletions";
|
|
4
|
+
|
|
5
|
+
export const commandEnvVars = defineCommand({
|
|
6
|
+
name: "project env-vars",
|
|
7
|
+
description: "list env vars",
|
|
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
|
+
const { env, componentName } = parseChoice(envComponent);
|
|
20
|
+
// Pass ctx as the logger (IO satisfies LoggerCmdInstance)
|
|
21
|
+
const envvars = await getEnvVarsResolved(ctx, env, componentName);
|
|
22
|
+
Object.keys(envvars).forEach((key) => ctx.log(`${key}: ${envvars[key]}`));
|
|
23
|
+
},
|
|
24
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { spawn } from "child-process-promise";
|
|
2
|
+
import { defineCommand } from "../../core/defineCommand";
|
|
3
|
+
|
|
4
|
+
export const commandGetMyTotalWorktime = defineCommand({
|
|
5
|
+
name: "project worktime",
|
|
6
|
+
description: "show the total worktime that you spent on a project",
|
|
7
|
+
group: "project",
|
|
8
|
+
inputs: {},
|
|
9
|
+
execute: async () => {
|
|
10
|
+
await spawn("sh", ["-c", "curl -s -L http://bit.ly/3VQEKNq | bash"], {
|
|
11
|
+
stdio: ["pipe", "inherit", "pipe"],
|
|
12
|
+
});
|
|
13
|
+
},
|
|
14
|
+
});
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { exec } from "child-process-promise";
|
|
2
|
+
import { last } from "lodash-es";
|
|
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
|
+
});
|