@catladder/cli 3.46.1 → 3.46.2
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/babel-inline.json +11 -0
- package/dist/bundles/catenv/index.js +2 -2
- package/dist/bundles/cli/index.js +1 -1
- package/dist/cli/src/apps/catci/catci.d.ts +1 -1
- package/dist/cli/src/apps/catci/catci.js +23 -20
- package/dist/cli/src/apps/catci/commands/security/auditDocument.d.ts +16 -16
- package/dist/cli/src/apps/catci/commands/security/auditDocument.js +54 -65
- package/dist/cli/src/apps/catci/commands/security/commands.d.ts +1 -1
- package/dist/cli/src/apps/catci/commands/security/commands.js +91 -83
- package/dist/cli/src/apps/catci/commands/security/createSecurityAuditMergeRequest.d.ts +11 -6
- package/dist/cli/src/apps/catci/commands/security/createSecurityAuditMergeRequest.js +43 -43
- package/dist/cli/src/apps/catci/commands/security/evaluateSecurityAudit.d.ts +5 -3
- package/dist/cli/src/apps/catci/commands/security/evaluateSecurityAudit.js +16 -12
- package/dist/cli/src/apps/catenv/catenv.d.ts +2 -2
- package/dist/cli/src/apps/catenv/catenv.js +15 -18
- package/dist/cli/src/apps/catenv/printVariables.d.ts +1 -1
- package/dist/cli/src/apps/catenv/printVariables.js +42 -39
- 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 +9 -6
- package/dist/cli/src/apps/catenv/utils.js +25 -21
- package/dist/cli/src/apps/catenv/verboseBanner.d.ts +1 -1
- package/dist/cli/src/apps/catenv/verboseBanner.js +20 -24
- package/dist/cli/src/apps/catenv/writeDotEnvFiles.d.ts +1 -1
- package/dist/cli/src/apps/catenv/writeDotEnvFiles.js +25 -22
- package/dist/cli/src/apps/catenv/writeEnvDTs.d.ts +1 -1
- package/dist/cli/src/apps/catenv/writeEnvDTs.js +31 -32
- package/dist/cli/src/apps/cli/cli.d.ts +1 -1
- package/dist/cli/src/apps/cli/cli.js +23 -24
- package/dist/cli/src/apps/cli/commands/cloudSQL/commandRestoreDb.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/cloudSQL/commandRestoreDb.js +122 -103
- package/dist/cli/src/apps/cli/commands/cloudSQL/index.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/cloudSQL/index.js +11 -7
- package/dist/cli/src/apps/cli/commands/general/index.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/general/index.js +67 -62
- package/dist/cli/src/apps/cli/commands/general/namespaceAutoCompletion.d.ts +2 -2
- package/dist/cli/src/apps/cli/commands/general/namespaceAutoCompletion.js +9 -7
- package/dist/cli/src/apps/cli/commands/general/portForward.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/general/portForward.js +42 -35
- package/dist/cli/src/apps/cli/commands/mongodb/index.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/mongodb/index.js +13 -9
- package/dist/cli/src/apps/cli/commands/mongodb/projectMongoDestroyMember.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/mongodb/projectMongoDestroyMember.js +83 -81
- package/dist/cli/src/apps/cli/commands/mongodb/projectMongoGetShell.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/mongodb/projectMongoGetShell.js +31 -29
- package/dist/cli/src/apps/cli/commands/mongodb/projectMongoPortForward.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/mongodb/projectMongoPortForward.js +54 -47
- 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/cloudSql/commandProjectRestoreDb.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/project/cloudSql/commandProjectRestoreDb.js +140 -140
- package/dist/cli/src/apps/cli/commands/project/commandCloudSqlProxy.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/project/commandCloudSqlProxy.js +106 -107
- package/dist/cli/src/apps/cli/commands/project/commandConfigSecrets.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/project/commandConfigSecrets.js +109 -124
- package/dist/cli/src/apps/cli/commands/project/commandDeletePods.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/project/commandDeletePods.js +45 -38
- package/dist/cli/src/apps/cli/commands/project/commandDeleteProject.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/project/commandDeleteProject.js +28 -23
- package/dist/cli/src/apps/cli/commands/project/commandEnvVars.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/project/commandEnvVars.js +14 -10
- package/dist/cli/src/apps/cli/commands/project/commandGetMyTotalWorktime.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/project/commandGetMyTotalWorktime.js +9 -9
- package/dist/cli/src/apps/cli/commands/project/commandGetShell.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/project/commandGetShell.js +29 -26
- package/dist/cli/src/apps/cli/commands/project/commandGitlabCi.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/project/commandGitlabCi.js +71 -69
- package/dist/cli/src/apps/cli/commands/project/commandListPods.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/project/commandListPods.js +15 -12
- package/dist/cli/src/apps/cli/commands/project/commandNamespace.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/project/commandNamespace.js +9 -8
- package/dist/cli/src/apps/cli/commands/project/commandOpenEnv.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/project/commandOpenEnv.js +20 -14
- package/dist/cli/src/apps/cli/commands/project/commandOpenGit.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/project/commandOpenGit.js +7 -7
- package/dist/cli/src/apps/cli/commands/project/commandOpenLogs.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/project/commandOpenLogs.js +14 -10
- package/dist/cli/src/apps/cli/commands/project/commandPauseProject.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/project/commandPauseProject.js +28 -23
- package/dist/cli/src/apps/cli/commands/project/commandPortForward.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/project/commandPortForward.js +80 -63
- package/dist/cli/src/apps/cli/commands/project/commandRenewToken.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/project/commandRenewToken.js +7 -7
- package/dist/cli/src/apps/cli/commands/project/commandSecretsClearBackups.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/project/commandSecretsClearBackups.js +17 -16
- package/dist/cli/src/apps/cli/commands/project/commandSecurityEvaluate.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/project/commandSecurityEvaluate.js +16 -15
- package/dist/cli/src/apps/cli/commands/project/commandSetup.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/project/commandSetup.js +9 -8
- package/dist/cli/src/apps/cli/commands/project/commandTriggerCronjob.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/project/commandTriggerCronjob.js +51 -44
- package/dist/cli/src/apps/cli/commands/project/index.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/project/index.js +31 -27
- package/dist/cli/src/apps/cli/commands/project/setup/index.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/project/setup/index.js +25 -29
- package/dist/cli/src/apps/cli/commands/project/setup/logSection.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/project/setup/logSection.js +15 -13
- package/dist/cli/src/apps/cli/commands/project/setup/setupAccessTokens.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/project/setup/setupAccessTokens.js +40 -31
- package/dist/cli/src/apps/cli/commands/project/setup/setupAgents.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/project/setup/setupAgents.js +137 -130
- package/dist/cli/src/apps/cli/commands/project/setup/setupCloudRun.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/project/setup/setupCloudRun.js +42 -47
- package/dist/cli/src/apps/cli/commands/project/setup/setupContext.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/project/setup/setupContext.js +15 -13
- package/dist/cli/src/apps/cli/commands/project/setup/setupKubernetes.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/project/setup/setupKubernetes.js +70 -69
- package/dist/cli/src/apps/cli/commands/project/setup/setupTopic.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/project/setup/setupTopic.js +15 -7
- package/dist/cli/src/apps/cli/commands/project/utils/autocompletions.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/project/utils/autocompletions.js +21 -16
- package/dist/cli/src/apps/cli/commands/project/utils/ensureCluster.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/project/utils/ensureCluster.js +33 -27
- 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/commands/project/utils/showProjectBanner.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/project/utils/showProjectBanner.js +12 -10
- package/dist/cli/src/apps/cli/commands/theStuffThatReallyMatters/index.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/theStuffThatReallyMatters/index.js +31 -29
- package/dist/cli/src/apps/cli/utils/getGoogleAuthUserNumber.d.ts +1 -1
- package/dist/cli/src/apps/cli/utils/getGoogleAuthUserNumber.js +18 -14
- package/dist/cli/src/apps/cli/verify/index.d.ts +1 -1
- package/dist/cli/src/apps/cli/verify/index.js +13 -11
- package/dist/cli/src/catci.d.ts +1 -1
- package/dist/cli/src/catci.js +5 -3
- package/dist/cli/src/catenv.d.ts +1 -1
- package/dist/cli/src/catenv.js +20 -14
- package/dist/cli/src/cli.d.ts +1 -1
- package/dist/cli/src/cli.js +9 -5
- package/dist/cli/src/config/getProjectConfig.d.ts +8 -6
- package/dist/cli/src/config/getProjectConfig.js +93 -91
- package/dist/cli/src/config/parseChoice.d.ts +3 -3
- package/dist/cli/src/config/parseChoice.js +11 -6
- 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 +1 -1
- package/dist/cli/src/gcloud/cloudRun/openCloudRunDashboards.js +19 -12
- package/dist/cli/src/gcloud/cloudSql/copyDb.d.ts +9 -9
- package/dist/cli/src/gcloud/cloudSql/copyDb.js +27 -16
- package/dist/cli/src/gcloud/cloudSql/parseConnectionString.d.ts +1 -1
- package/dist/cli/src/gcloud/cloudSql/parseConnectionString.js +12 -10
- 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 +1 -1
- package/dist/cli/src/gcloud/openDashboard.js +17 -13
- package/dist/cli/src/gcloud/serviceAccounts.d.ts +6 -6
- package/dist/cli/src/gcloud/serviceAccounts.js +64 -58
- package/dist/cli/src/git/getGetMainBranch.d.ts +1 -1
- package/dist/cli/src/git/getGetMainBranch.js +9 -5
- package/dist/cli/src/git/gitConfig.d.ts +11 -6
- package/dist/cli/src/git/gitConfig.js +17 -11
- package/dist/cli/src/git/gitProjectInformation.d.ts +6 -6
- package/dist/cli/src/git/gitProjectInformation.js +30 -20
- package/dist/cli/src/git/index.d.ts +1 -1
- package/dist/cli/src/git/index.js +23 -16
- 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 +1 -1
- package/dist/cli/src/kubernetes/openKubernetesDashboards.js +35 -33
- 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 -3
- 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 +15 -12
- 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 +9 -9
- package/dist/cli/src/utils/gitlab.js +188 -166
- package/dist/cli/src/utils/log.d.ts +2 -2
- package/dist/cli/src/utils/log.js +18 -16
- 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.d.ts +1 -1
- package/dist/cli/src/utils/preferences.js +43 -36
- 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/bash/BashExpression.d.ts +18 -18
- package/dist/pipeline/src/bash/BashExpression.js +44 -45
- package/dist/pipeline/src/bash/bashEscape.d.ts +6 -4
- package/dist/pipeline/src/bash/bashEscape.js +63 -73
- 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/getInjectVarsScript.d.ts +1 -1
- package/dist/pipeline/src/bash/getInjectVarsScript.js +11 -14
- 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 +41 -50
- 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 +7 -1
- package/dist/pipeline/src/build/base/createAppBuildJob.js +37 -43
- 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/index.d.ts +4 -4
- package/dist/pipeline/src/build/base/index.js +15 -34
- 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 +19 -21
- package/dist/pipeline/src/build/cache/createJobCache.d.ts +1 -1
- package/dist/pipeline/src/build/cache/createJobCache.js +47 -49
- package/dist/pipeline/src/build/cache/getAllCacheConfigsFromConfig.d.ts +1 -1
- package/dist/pipeline/src/build/cache/getAllCacheConfigsFromConfig.js +16 -23
- 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 +1 -1
- package/dist/pipeline/src/build/custom/buildJob.js +16 -16
- package/dist/pipeline/src/build/custom/index.d.ts +1 -1
- package/dist/pipeline/src/build/custom/index.js +7 -5
- package/dist/pipeline/src/build/custom/testJob.d.ts +2 -2
- package/dist/pipeline/src/build/custom/testJob.js +67 -71
- package/dist/pipeline/src/build/docker.d.ts +49 -45
- package/dist/pipeline/src/build/docker.js +104 -129
- package/dist/pipeline/src/build/index.d.ts +13 -17
- package/dist/pipeline/src/build/index.js +80 -73
- package/dist/pipeline/src/build/node/buildJob.d.ts +1 -1
- package/dist/pipeline/src/build/node/buildJob.js +34 -37
- package/dist/pipeline/src/build/node/cache.d.ts +1 -1
- package/dist/pipeline/src/build/node/cache.js +34 -56
- 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 +1 -1
- package/dist/pipeline/src/build/node/index.js +11 -9
- package/dist/pipeline/src/build/node/meteor.d.ts +1 -1
- package/dist/pipeline/src/build/node/meteor.js +39 -54
- package/dist/pipeline/src/build/node/testJob.d.ts +1 -1
- package/dist/pipeline/src/build/node/testJob.js +71 -93
- package/dist/pipeline/src/build/node/yarn.d.ts +2 -2
- package/dist/pipeline/src/build/node/yarn.js +28 -47
- package/dist/pipeline/src/build/rails/build.d.ts +1 -1
- package/dist/pipeline/src/build/rails/build.js +37 -44
- package/dist/pipeline/src/build/rails/index.d.ts +1 -1
- package/dist/pipeline/src/build/rails/index.js +7 -5
- package/dist/pipeline/src/build/rails/testJob.d.ts +1 -1
- package/dist/pipeline/src/build/rails/testJob.js +71 -101
- package/dist/pipeline/src/build/types.d.ts +294 -294
- package/dist/pipeline/src/build/types.js +10 -10
- package/dist/pipeline/src/catenv/index.d.ts +3 -3
- package/dist/pipeline/src/catenv/index.js +10 -8
- 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 +34 -32
- 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 +87 -96
- package/dist/pipeline/src/context/createWorkspaceContext.d.ts +15 -8
- package/dist/pipeline/src/context/createWorkspaceContext.js +37 -28
- 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 +29 -28
- 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 -95
- package/dist/pipeline/src/context/getLabels.d.ts +7 -7
- package/dist/pipeline/src/context/getLabels.js +26 -25
- 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 +12 -12
- package/dist/pipeline/src/defaults/index.d.ts +1 -1
- package/dist/pipeline/src/defaults/index.js +6 -4
- package/dist/pipeline/src/deploy/base/deploy.d.ts +1 -1
- package/dist/pipeline/src/deploy/base/deploy.js +75 -100
- 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/rollback.d.ts +1 -1
- package/dist/pipeline/src/deploy/base/rollback.js +30 -26
- package/dist/pipeline/src/deploy/base/stop.d.ts +1 -1
- package/dist/pipeline/src/deploy/base/stop.js +30 -25
- 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 +16 -17
- 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 +4 -4
- package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunJobs.js +58 -63
- package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunServices.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunServices.js +63 -73
- package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunWorkerPools.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunWorkerPools.js +38 -38
- 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 +1 -1
- package/dist/pipeline/src/deploy/cloudRun/createJobs/execute/onDeploy.js +57 -67
- package/dist/pipeline/src/deploy/cloudRun/createJobs/execute/schedules.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/createJobs/execute/schedules.js +115 -118
- package/dist/pipeline/src/deploy/cloudRun/createJobs/getCloudRunDeployScripts.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/createJobs/getCloudRunDeployScripts.js +10 -32
- package/dist/pipeline/src/deploy/cloudRun/createJobs/getCloudRunStopScripts.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/createJobs/getCloudRunStopScripts.js +9 -23
- package/dist/pipeline/src/deploy/cloudRun/createJobs/healthCheck.d.ts +3 -3
- package/dist/pipeline/src/deploy/cloudRun/createJobs/healthCheck.js +36 -39
- 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/index.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/index.js +72 -76
- package/dist/pipeline/src/deploy/cloudRun/utils/cloudRunExecutionUrl.d.ts +9 -5
- package/dist/pipeline/src/deploy/cloudRun/utils/cloudRunExecutionUrl.js +13 -7
- package/dist/pipeline/src/deploy/cloudRun/utils/createArgsString.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/utils/createArgsString.js +13 -17
- package/dist/pipeline/src/deploy/cloudRun/utils/database.d.ts +5 -5
- package/dist/pipeline/src/deploy/cloudRun/utils/database.js +46 -79
- 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 +1 -1
- package/dist/pipeline/src/deploy/cloudRun/utils/getJobOrServiceArgs.js +7 -9
- package/dist/pipeline/src/deploy/cloudRun/utils/getServiceName.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/utils/getServiceName.js +6 -4
- package/dist/pipeline/src/deploy/cloudRun/utils/jobName.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/utils/jobName.js +5 -3
- 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 -34
- 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 -61
- 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 +84 -84
- package/dist/pipeline/src/deploy/kubernetes/kubeValues.js +70 -63
- package/dist/pipeline/src/deploy/kubernetes/mongodb.d.ts +28 -28
- package/dist/pipeline/src/deploy/kubernetes/mongodb.js +88 -93
- 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 +15 -15
- package/dist/pipeline/src/deploy/types/executeBase.js +4 -2
- package/dist/pipeline/src/deploy/types/googleCloudRun.d.ts +435 -435
- package/dist/pipeline/src/deploy/types/googleCloudRun.js +16 -14
- package/dist/pipeline/src/deploy/types/index.d.ts +6 -6
- package/dist/pipeline/src/deploy/types/index.js +27 -21
- package/dist/pipeline/src/deploy/types/kubernetes.d.ts +255 -255
- 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 +1 -1
- package/dist/pipeline/src/index.js +23 -16
- package/dist/pipeline/src/pipeline/agent/createAgentContext.d.ts +19 -19
- package/dist/pipeline/src/pipeline/agent/createAgentContext.js +41 -37
- package/dist/pipeline/src/pipeline/agent/createAgentEventJob.d.ts +1 -1
- package/dist/pipeline/src/pipeline/agent/createAgentEventJob.js +30 -31
- package/dist/pipeline/src/pipeline/agent/createAgentReviewJob.d.ts +1 -1
- package/dist/pipeline/src/pipeline/agent/createAgentReviewJob.js +36 -44
- package/dist/pipeline/src/pipeline/agent/createJobsForAgentContext.d.ts +1 -1
- package/dist/pipeline/src/pipeline/agent/createJobsForAgentContext.js +7 -5
- package/dist/pipeline/src/pipeline/agent/prompts.d.ts +2 -2
- package/dist/pipeline/src/pipeline/agent/prompts.js +32 -14
- package/dist/pipeline/src/pipeline/agent/shared.d.ts +5 -3
- package/dist/pipeline/src/pipeline/agent/shared.js +26 -24
- package/dist/pipeline/src/pipeline/agent/utils.d.ts +1 -1
- package/dist/pipeline/src/pipeline/agent/utils.js +11 -9
- package/dist/pipeline/src/pipeline/createAllJobs.d.ts +17 -13
- package/dist/pipeline/src/pipeline/createAllJobs.js +56 -44
- package/dist/pipeline/src/pipeline/createJobsForComponent.d.ts +1 -1
- package/dist/pipeline/src/pipeline/createJobsForComponent.js +28 -27
- package/dist/pipeline/src/pipeline/createJobsForWorkspace.d.ts +1 -1
- package/dist/pipeline/src/pipeline/createJobsForWorkspace.js +8 -6
- package/dist/pipeline/src/pipeline/createMainPipeline.d.ts +1 -1
- package/dist/pipeline/src/pipeline/createMainPipeline.js +85 -79
- package/dist/pipeline/src/pipeline/generatePipelineFiles.d.ts +1 -1
- package/dist/pipeline/src/pipeline/generatePipelineFiles.js +78 -58
- package/dist/pipeline/src/pipeline/getPipelineStages.d.ts +1 -1
- package/dist/pipeline/src/pipeline/getPipelineStages.js +8 -10
- package/dist/pipeline/src/pipeline/gitlab/cache.d.ts +5 -5
- package/dist/pipeline/src/pipeline/gitlab/cache.js +26 -24
- package/dist/pipeline/src/pipeline/gitlab/createGitlabJobs.d.ts +4 -4
- package/dist/pipeline/src/pipeline/gitlab/createGitlabJobs.js +228 -239
- package/dist/pipeline/src/pipeline/gitlab/createGitlabPipeline.d.ts +7 -2
- package/dist/pipeline/src/pipeline/gitlab/createGitlabPipeline.js +64 -59
- package/dist/pipeline/src/pipeline/gitlab/gitlabReleaseJobs.d.ts +34 -34
- package/dist/pipeline/src/pipeline/gitlab/gitlabReleaseJobs.js +37 -47
- package/dist/pipeline/src/pipeline/gitlab/sortGitLabJobDefProps.d.ts +1 -1
- package/dist/pipeline/src/pipeline/gitlab/sortGitLabJobDefProps.js +10 -40
- package/dist/pipeline/src/pipeline/index.d.ts +1 -1
- package/dist/pipeline/src/pipeline/index.js +23 -16
- package/dist/pipeline/src/pipeline/packageManager.d.ts +1 -1
- package/dist/pipeline/src/pipeline/packageManager.js +47 -59
- package/dist/pipeline/src/rules/index.d.ts +1 -1
- package/dist/pipeline/src/rules/index.js +15 -13
- package/dist/pipeline/src/runner/index.d.ts +1 -1
- package/dist/pipeline/src/runner/index.js +6 -4
- package/dist/pipeline/src/types/agent.d.ts +15 -15
- package/dist/pipeline/src/types/agent.js +4 -2
- package/dist/pipeline/src/types/config.d.ts +152 -154
- package/dist/pipeline/src/types/config.js +24 -28
- package/dist/pipeline/src/types/context.d.ts +104 -104
- package/dist/pipeline/src/types/context.js +9 -7
- 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 +15 -15
- package/dist/pipeline/src/types/gitlab-types.js +4 -2
- package/dist/pipeline/src/types/hooks.d.ts +26 -26
- package/dist/pipeline/src/types/hooks.js +4 -2
- package/dist/pipeline/src/types/index.d.ts +1 -1
- package/dist/pipeline/src/types/index.js +23 -16
- package/dist/pipeline/src/types/jobDefinition.d.ts +3 -3
- package/dist/pipeline/src/types/jobDefinition.js +4 -2
- package/dist/pipeline/src/types/jobs.d.ts +93 -93
- package/dist/pipeline/src/types/jobs.js +5 -12
- package/dist/pipeline/src/types/pipeline.d.ts +1 -1
- package/dist/pipeline/src/types/pipeline.js +4 -2
- package/dist/pipeline/src/types/release.d.ts +6 -6
- package/dist/pipeline/src/types/release.js +4 -2
- 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 +12 -9
- 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 +4 -4
- package/dist/pipeline/src/utils/measureTime.js +39 -34
- 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 +10 -10
- package/dist/pipeline/src/utils/writeFiles.js +53 -59
- 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/package.json +7 -2
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
3
6
|
exports.registerGlobalScriptFunction = exports.globalScriptFunctions = void 0;
|
|
4
7
|
class GlobalScriptFunction {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
constructor(name, script) {
|
|
9
|
+
this.name = name;
|
|
10
|
+
this.script = script;
|
|
11
|
+
}
|
|
12
|
+
toBashFunction() {
|
|
13
|
+
return `function ${this.name} () {
|
|
11
14
|
${this.script.trim()}
|
|
12
15
|
}`.trim();
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
}
|
|
17
|
+
invoke(...args) {
|
|
18
|
+
return `${this.name} ${args.join(" ")}`;
|
|
19
|
+
}
|
|
17
20
|
}
|
|
18
21
|
exports.globalScriptFunctions = new Map();
|
|
19
22
|
/**
|
|
@@ -21,12 +24,11 @@ exports.globalScriptFunctions = new Map();
|
|
|
21
24
|
* only use that in top-level scopes as it will attach the function to the global scope
|
|
22
25
|
*/
|
|
23
26
|
const registerGlobalScriptFunction = (name, script) => {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
if (exports.globalScriptFunctions.has(name)) {
|
|
28
|
+
throw new Error(`Global script function ${name} already exists`);
|
|
29
|
+
}
|
|
30
|
+
const scriptFunction = new GlobalScriptFunction(name, script);
|
|
31
|
+
exports.globalScriptFunctions.set(name, scriptFunction);
|
|
32
|
+
return scriptFunction;
|
|
30
33
|
};
|
|
31
|
-
exports.registerGlobalScriptFunction = registerGlobalScriptFunction;
|
|
32
|
-
//# sourceMappingURL=index.js.map
|
|
34
|
+
exports.registerGlobalScriptFunction = registerGlobalScriptFunction;
|
|
@@ -1,19 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
2
|
+
|
|
3
|
+
var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () {
|
|
10
|
+
return m[k];
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
Object.defineProperty(o, k2, desc);
|
|
15
|
+
} : function (o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
o[k2] = m[k];
|
|
18
|
+
});
|
|
19
|
+
var __exportStar = this && this.__exportStar || function (m, exports) {
|
|
20
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
21
|
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", {
|
|
22
|
+
Object.defineProperty(exports, "__esModule", {
|
|
23
|
+
value: true
|
|
24
|
+
});
|
|
17
25
|
__exportStar(require("./pipeline"), exports);
|
|
18
26
|
__exportStar(require("./types"), exports);
|
|
19
27
|
__exportStar(require("./rules"), exports);
|
|
@@ -26,5 +34,4 @@ __exportStar(require("./utils/writeFiles"), exports);
|
|
|
26
34
|
__exportStar(require("./utils/measureTime"), exports);
|
|
27
35
|
__exportStar(require("./variables/VariableValue"), exports);
|
|
28
36
|
__exportStar(require("./bash"), exports);
|
|
29
|
-
__exportStar(require("./catenv"), exports);
|
|
30
|
-
//# sourceMappingURL=index.js.map
|
|
37
|
+
__exportStar(require("./catenv"), exports);
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import type { Config } from "../../types";
|
|
2
2
|
export declare class AgentContext {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
3
|
+
private readonly agentName;
|
|
4
|
+
private readonly config;
|
|
5
|
+
constructor(agentName: string, config: Config);
|
|
6
|
+
readonly type = "agent";
|
|
7
|
+
get name(): string;
|
|
8
|
+
get agentConfig(): import("../../types").AgentConfig;
|
|
9
|
+
get agentUser(): {
|
|
10
|
+
username: string;
|
|
11
|
+
userId: string;
|
|
12
|
+
};
|
|
13
|
+
get reviews(): {
|
|
14
|
+
byUser: Record<string, {
|
|
15
|
+
automatic: boolean;
|
|
16
|
+
}> | "all-automatic";
|
|
17
|
+
};
|
|
18
|
+
get fullConfig(): Config;
|
|
19
19
|
}
|
|
20
20
|
export declare const createAgentContext: (ctx: {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}) => Promise<AgentContext>;
|
|
21
|
+
agentName: string;
|
|
22
|
+
config: Config;
|
|
23
|
+
}) => Promise<AgentContext>;
|
|
@@ -1,45 +1,49 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
3
6
|
exports.createAgentContext = exports.AgentContext = void 0;
|
|
4
7
|
class AgentContext {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
constructor(agentName, config) {
|
|
9
|
+
this.agentName = agentName;
|
|
10
|
+
this.config = config;
|
|
11
|
+
this.type = "agent";
|
|
12
|
+
}
|
|
13
|
+
get name() {
|
|
14
|
+
return this.agentName;
|
|
15
|
+
}
|
|
16
|
+
get agentConfig() {
|
|
17
|
+
var _a;
|
|
18
|
+
const agentConfig = (_a = this.config.agents) === null || _a === void 0 ? void 0 : _a[this.agentName];
|
|
19
|
+
if (!agentConfig) {
|
|
20
|
+
throw new Error(`Agent ${this.agentName} not found in config`);
|
|
9
21
|
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
22
|
+
return agentConfig;
|
|
23
|
+
}
|
|
24
|
+
get agentUser() {
|
|
25
|
+
var _a, _b, _c, _d;
|
|
26
|
+
return {
|
|
27
|
+
username: (_b = (_a = this.agentConfig.agentUser) === null || _a === void 0 ? void 0 : _a.username) !== null && _b !== void 0 ? _b : "agent.claude",
|
|
28
|
+
userId: (_d = (_c = this.agentConfig.agentUser) === null || _c === void 0 ? void 0 : _c.userId) !== null && _d !== void 0 ? _d : "$DEFAULT_AGENT_USER_ID"
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
get reviews() {
|
|
32
|
+
var _a, _b;
|
|
33
|
+
return {
|
|
34
|
+
byUser: (_b = (_a = this.agentConfig.reviews) === null || _a === void 0 ? void 0 : _a.byUser) !== null && _b !== void 0 ? _b : {
|
|
35
|
+
[this.agentUser.username]: {
|
|
36
|
+
automatic: true
|
|
18
37
|
}
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
userId: (_d = (_c = this.agentConfig.agentUser) === null || _c === void 0 ? void 0 : _c.userId) !== null && _d !== void 0 ? _d : "$DEFAULT_AGENT_USER_ID",
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
get reviews() {
|
|
29
|
-
var _a, _b;
|
|
30
|
-
return {
|
|
31
|
-
byUser: (_b = (_a = this.agentConfig.reviews) === null || _a === void 0 ? void 0 : _a.byUser) !== null && _b !== void 0 ? _b : {
|
|
32
|
-
[this.agentUser.username]: { automatic: true },
|
|
33
|
-
},
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
get fullConfig() {
|
|
37
|
-
return this.config;
|
|
38
|
-
}
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
get fullConfig() {
|
|
42
|
+
return this.config;
|
|
43
|
+
}
|
|
39
44
|
}
|
|
40
45
|
exports.AgentContext = AgentContext;
|
|
41
|
-
const createAgentContext = async
|
|
42
|
-
|
|
46
|
+
const createAgentContext = async ctx => {
|
|
47
|
+
return new AgentContext(ctx.agentName, ctx.config);
|
|
43
48
|
};
|
|
44
|
-
exports.createAgentContext = createAgentContext;
|
|
45
|
-
//# sourceMappingURL=createAgentContext.js.map
|
|
49
|
+
exports.createAgentContext = createAgentContext;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { AgentContext, CatladderJob } from "../../types";
|
|
2
|
-
export declare const createAgentEventJob: (context: AgentContext) => CatladderJob;
|
|
2
|
+
export declare const createAgentEventJob: (context: AgentContext) => CatladderJob;
|
|
@@ -1,37 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
3
6
|
exports.createAgentEventJob = void 0;
|
|
4
7
|
const prompts_1 = require("./prompts");
|
|
5
8
|
const shared_1 = require("./shared");
|
|
6
9
|
const utils_1 = require("./utils");
|
|
7
|
-
const createAgentEventJob =
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}),
|
|
33
|
-
],
|
|
34
|
-
};
|
|
10
|
+
const createAgentEventJob = context => {
|
|
11
|
+
const baseJob = (0, shared_1.createBaseAgentJob)(context);
|
|
12
|
+
// unfortunatly, we need to manage both, because the "@mention"-feature only works with the username
|
|
13
|
+
const agentUserId = (0, utils_1.getAgentUserId)(context);
|
|
14
|
+
const agentUserName = (0, utils_1.getAgentUserName)(context);
|
|
15
|
+
return {
|
|
16
|
+
interruptible: false,
|
|
17
|
+
// do not cancel this job if it is running. Otherwise a commit to main will cancel it
|
|
18
|
+
...baseJob,
|
|
19
|
+
variables: {
|
|
20
|
+
...baseJob.variables
|
|
21
|
+
},
|
|
22
|
+
name: context.name + "-agent-event",
|
|
23
|
+
rules: [{
|
|
24
|
+
if: `$CI_PIPELINE_SOURCE == "trigger" && ($ASSIGNEE_USER_ID == ${agentUserId} || $OBJECT_DESCRIPTION =~ /@${agentUserName}/)`,
|
|
25
|
+
when: "always"
|
|
26
|
+
}, {
|
|
27
|
+
when: "never"
|
|
28
|
+
}],
|
|
29
|
+
script: [...shared_1.baseSetupScript, ...(0, shared_1.callClaude)({
|
|
30
|
+
prompt: (0, prompts_1.getEventPrompt)({
|
|
31
|
+
agentUserName: agentUserName
|
|
32
|
+
})
|
|
33
|
+
})]
|
|
34
|
+
};
|
|
35
35
|
};
|
|
36
|
-
exports.createAgentEventJob = createAgentEventJob;
|
|
37
|
-
//# sourceMappingURL=createAgentEventJob.js.map
|
|
36
|
+
exports.createAgentEventJob = createAgentEventJob;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { AgentContext, CatladderJob } from "../../types";
|
|
2
|
-
export declare const createAgentReviewJob: (context: AgentContext) => CatladderJob;
|
|
2
|
+
export declare const createAgentReviewJob: (context: AgentContext) => CatladderJob;
|
|
@@ -1,51 +1,43 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
3
6
|
exports.createAgentReviewJob = void 0;
|
|
4
7
|
const rules_1 = require("../../rules");
|
|
5
8
|
const prompts_1 = require("./prompts");
|
|
6
9
|
const shared_1 = require("./shared");
|
|
7
10
|
const utils_1 = require("./utils");
|
|
8
|
-
const createAgentReviewJob =
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
],
|
|
40
|
-
script: [
|
|
41
|
-
...shared_1.baseSetupScript,
|
|
42
|
-
...(0, shared_1.callClaude)({
|
|
43
|
-
prompt: (0, prompts_1.getMergeRequestPrompt)({
|
|
44
|
-
agentUserName: agentUserName,
|
|
45
|
-
}),
|
|
46
|
-
}),
|
|
47
|
-
],
|
|
48
|
-
};
|
|
11
|
+
const createAgentReviewJob = context => {
|
|
12
|
+
const baseJob = (0, shared_1.createBaseAgentJob)(context);
|
|
13
|
+
const agentUserName = (0, utils_1.getAgentUserName)(context);
|
|
14
|
+
const rules = context.reviews.byUser === "all-automatic" ? [{
|
|
15
|
+
...rules_1.RULE_IS_MERGE_REQUEST,
|
|
16
|
+
when: "always"
|
|
17
|
+
}] : Object.entries(context.reviews.byUser).filter(([_, {
|
|
18
|
+
automatic
|
|
19
|
+
}]) => automatic).map(([username]) => ({
|
|
20
|
+
// GITLAB_USER_LOGIN is the username of the user who created the pipeline
|
|
21
|
+
if: `${rules_1.RULE_IS_MERGE_REQUEST.if} && $GITLAB_USER_LOGIN == "${username}"`,
|
|
22
|
+
when: "always"
|
|
23
|
+
}));
|
|
24
|
+
return {
|
|
25
|
+
...baseJob,
|
|
26
|
+
envMode: "jobPerEnv",
|
|
27
|
+
name: context.name + "-agent-review",
|
|
28
|
+
allow_failure: true,
|
|
29
|
+
// make it optional
|
|
30
|
+
rules: [...rules, {
|
|
31
|
+
...rules_1.RULE_IS_MERGE_REQUEST,
|
|
32
|
+
when: "manual"
|
|
33
|
+
}, {
|
|
34
|
+
when: "never"
|
|
35
|
+
}],
|
|
36
|
+
script: [...shared_1.baseSetupScript, ...(0, shared_1.callClaude)({
|
|
37
|
+
prompt: (0, prompts_1.getMergeRequestPrompt)({
|
|
38
|
+
agentUserName: agentUserName
|
|
39
|
+
})
|
|
40
|
+
})]
|
|
41
|
+
};
|
|
49
42
|
};
|
|
50
|
-
exports.createAgentReviewJob = createAgentReviewJob;
|
|
51
|
-
//# sourceMappingURL=createAgentReviewJob.js.map
|
|
43
|
+
exports.createAgentReviewJob = createAgentReviewJob;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { AgentContext } from "../../types";
|
|
2
|
-
export declare const createJobsForAgentContext: (context: AgentContext) => import("../../types").CatladderJob[];
|
|
2
|
+
export declare const createJobsForAgentContext: (context: AgentContext) => import("../../types").CatladderJob[];
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
3
6
|
exports.createJobsForAgentContext = void 0;
|
|
4
7
|
const createAgentEventJob_1 = require("./createAgentEventJob");
|
|
5
8
|
const createAgentReviewJob_1 = require("./createAgentReviewJob");
|
|
6
|
-
const createJobsForAgentContext =
|
|
7
|
-
|
|
9
|
+
const createJobsForAgentContext = context => {
|
|
10
|
+
return [(0, createAgentEventJob_1.createAgentEventJob)(context), (0, createAgentReviewJob_1.createAgentReviewJob)(context)];
|
|
8
11
|
};
|
|
9
|
-
exports.createJobsForAgentContext = createJobsForAgentContext;
|
|
10
|
-
//# sourceMappingURL=createJobsForAgentContext.js.map
|
|
12
|
+
exports.createJobsForAgentContext = createJobsForAgentContext;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
|
|
2
3
|
// prompts.ts — MCP-only, DRY, review-first-then-push, CI diagnosis (no retries),
|
|
3
4
|
// self-mention guard, conversations-aware (issues & MRs), inline replies, de-duplication.
|
|
4
5
|
// Review-on-demand: resolves MR pipeline and triggers manual "agent-review" when present.
|
|
5
6
|
// Single-runner guard: cancels running "agent-review" on the MR pipeline before acting.
|
|
6
7
|
// Stdout summaries included for both event and MR flows.
|
|
7
|
-
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
Object.defineProperty(exports, "__esModule", {
|
|
9
|
+
value: true
|
|
10
|
+
});
|
|
8
11
|
exports.getMergeRequestPrompt = exports.getEventPrompt = void 0;
|
|
9
12
|
/* ---------- Shared blocks ---------- */
|
|
10
13
|
const header = () => `
|
|
@@ -12,11 +15,15 @@ Project ID: $CI_PROJECT_ID
|
|
|
12
15
|
GitLab Host: $CI_SERVER_URL
|
|
13
16
|
Default Branch: $CI_DEFAULT_BRANCH
|
|
14
17
|
`;
|
|
15
|
-
const identity = ({
|
|
18
|
+
const identity = ({
|
|
19
|
+
agentUserName
|
|
20
|
+
}) => `
|
|
16
21
|
## Identity
|
|
17
22
|
- Your GitLab username is "${agentUserName}".
|
|
18
23
|
`;
|
|
19
|
-
const goldenRules = ({
|
|
24
|
+
const goldenRules = ({
|
|
25
|
+
agentUserName
|
|
26
|
+
}) => `
|
|
20
27
|
## Golden Rules
|
|
21
28
|
- Use the \`gitlab-mcp\` tool for ALL GitLab actions. Do not call any other APIs.
|
|
22
29
|
- If a needed \`gitlab-mcp\` capability is unavailable, post a short comment explaining the limitation and stop.
|
|
@@ -28,7 +35,9 @@ const goldenRules = ({ agentUserName }) => `
|
|
|
28
35
|
- Use ONE stable \`source_branch\` per run; do not regenerate its name later.
|
|
29
36
|
`;
|
|
30
37
|
/* ---------- Conversations + threading ---------- */
|
|
31
|
-
const conversationsIntake = ({
|
|
38
|
+
const conversationsIntake = ({
|
|
39
|
+
agentUserName
|
|
40
|
+
}) => `
|
|
32
41
|
## Conversations Intake & Threading (MANDATORY before acting)
|
|
33
42
|
Always load and reason about the current conversation to avoid duplicates and to respond in the right place.
|
|
34
43
|
|
|
@@ -41,7 +50,9 @@ Rules:
|
|
|
41
50
|
3) For MR code discussions: reply inline in the same discussion.
|
|
42
51
|
4) Always sanitize (see Self-mention Guard) before writing.
|
|
43
52
|
`;
|
|
44
|
-
const selfMentionGuard = ({
|
|
53
|
+
const selfMentionGuard = ({
|
|
54
|
+
agentUserName
|
|
55
|
+
}) => `
|
|
45
56
|
## Self-mention Guard
|
|
46
57
|
Before ANY write (comment/MR/issue/commit message):
|
|
47
58
|
- Remove all occurrences of "@${agentUserName}" (case-insensitive).
|
|
@@ -90,7 +101,9 @@ const mcpOnly = () => `
|
|
|
90
101
|
- play_pipeline_job({ projectId, jobId })
|
|
91
102
|
- cancel_pipeline_job({ projectId, jobId })
|
|
92
103
|
`;
|
|
93
|
-
const outputDiscipline = ({
|
|
104
|
+
const outputDiscipline = ({
|
|
105
|
+
agentUserName
|
|
106
|
+
}) => `
|
|
94
107
|
## Output Discipline
|
|
95
108
|
- Output only \`gitlab-mcp\` tool calls and plain-text summaries where requested.
|
|
96
109
|
- Keep comments concise and professional.
|
|
@@ -133,7 +146,9 @@ If the text asks for a review ("review", "please review", "PTAL", "needs review"
|
|
|
133
146
|
4) Else run Single-Runner Guard, then enter MR Review Mode.
|
|
134
147
|
`;
|
|
135
148
|
/* ---------- Event workflow ---------- */
|
|
136
|
-
const eventWorkflow = ({
|
|
149
|
+
const eventWorkflow = ({
|
|
150
|
+
agentUserName
|
|
151
|
+
}) => `
|
|
137
152
|
## Event Workflow
|
|
138
153
|
0) Conversations Intake first
|
|
139
154
|
1) Acknowledge with note (unless last actor is you)
|
|
@@ -169,7 +184,9 @@ Print a plain-text summary with:
|
|
|
169
184
|
- any limitations encountered (e.g., missing discussions tool)
|
|
170
185
|
`;
|
|
171
186
|
/* ---------- MR-specific ---------- */
|
|
172
|
-
const mrScope = ({
|
|
187
|
+
const mrScope = ({
|
|
188
|
+
agentUserName
|
|
189
|
+
}) => `
|
|
173
190
|
## MR Scope
|
|
174
191
|
- You are reviewing a single MR
|
|
175
192
|
- Never merge the MR yourself
|
|
@@ -206,21 +223,23 @@ const ciInspection = () => `
|
|
|
206
223
|
- Do not retry; only report diagnosis in a note
|
|
207
224
|
- If no mr_pipeline_id, note limitation
|
|
208
225
|
`;
|
|
209
|
-
const outputDisciplineMR = ({
|
|
226
|
+
const outputDisciplineMR = ({
|
|
227
|
+
agentUserName
|
|
228
|
+
}) => `
|
|
210
229
|
## Output Discipline (MR)
|
|
211
230
|
- Only gitlab-mcp calls + final summary
|
|
212
231
|
- Never merge MR
|
|
213
232
|
- Never mention "@${agentUserName}"
|
|
214
233
|
`;
|
|
215
234
|
/* ---------- MR Review Bundle ---------- */
|
|
216
|
-
const mrReviewBundle =
|
|
235
|
+
const mrReviewBundle = ctx => `
|
|
217
236
|
## MR Review Mode
|
|
218
237
|
${mrScope(ctx)}
|
|
219
238
|
${mrWorkflow()}
|
|
220
239
|
${ciInspection()}
|
|
221
240
|
`;
|
|
222
241
|
/* ---------- Public builders ---------- */
|
|
223
|
-
const getEventPrompt =
|
|
242
|
+
const getEventPrompt = ctx => `
|
|
224
243
|
You are a GitLab assistant bot. You receive ONE raw GitLab webhook JSON payload.
|
|
225
244
|
|
|
226
245
|
${header()}
|
|
@@ -244,7 +263,7 @@ ${mcpOnly()}
|
|
|
244
263
|
${outputDiscipline(ctx)}
|
|
245
264
|
`;
|
|
246
265
|
exports.getEventPrompt = getEventPrompt;
|
|
247
|
-
const getMergeRequestPrompt =
|
|
266
|
+
const getMergeRequestPrompt = ctx => `
|
|
248
267
|
You are a GitLab assistant bot reviewing and updating a single Merge Request (MR).
|
|
249
268
|
|
|
250
269
|
${header()}
|
|
@@ -264,5 +283,4 @@ ${commentGuidelines()}
|
|
|
264
283
|
${mcpOnly()}
|
|
265
284
|
${outputDisciplineMR(ctx)}
|
|
266
285
|
`;
|
|
267
|
-
exports.getMergeRequestPrompt = getMergeRequestPrompt;
|
|
268
|
-
//# sourceMappingURL=prompts.js.map
|
|
286
|
+
exports.getMergeRequestPrompt = getMergeRequestPrompt;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { AgentContext, CatladderJob } from "../../types";
|
|
2
2
|
export declare const createBaseAgentJob: (context: AgentContext) => Omit<CatladderJob, "name" | "rules" | "script" | "envMode">;
|
|
3
3
|
export declare const baseSetupScript: string[];
|
|
4
|
-
export declare const callClaude: ({
|
|
5
|
-
|
|
6
|
-
}
|
|
4
|
+
export declare const callClaude: ({
|
|
5
|
+
prompt
|
|
6
|
+
}: {
|
|
7
|
+
prompt: string;
|
|
8
|
+
}) => string[];
|
|
@@ -1,32 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
3
6
|
exports.callClaude = exports.baseSetupScript = exports.createBaseAgentJob = void 0;
|
|
4
7
|
const bashEscape_1 = require("../../bash/bashEscape");
|
|
5
8
|
const runner_1 = require("../../runner");
|
|
6
|
-
const createBaseAgentJob =
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
const createBaseAgentJob = context => ({
|
|
10
|
+
stage: "agents",
|
|
11
|
+
// image: "node:24-alpine3.21",
|
|
12
|
+
image: (0, runner_1.getRunnerImage)("agent-claude"),
|
|
13
|
+
variables: {
|
|
14
|
+
MAX_MCP_OUTPUT_TOKENS: "75000",
|
|
15
|
+
GITLAB_PERSONAL_ACCESS_TOKEN: "$AGENT_GITLAB_PERSONAL_ACCESS_TOKEN",
|
|
16
|
+
// TODO: we don't have global secret keys to configure yet
|
|
17
|
+
GITLAB_API_URL: "$CI_API_V4_URL"
|
|
18
|
+
}
|
|
15
19
|
});
|
|
16
20
|
exports.createBaseAgentJob = createBaseAgentJob;
|
|
17
21
|
exports.baseSetupScript = [
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
];
|
|
22
|
+
// these are done in the image already
|
|
23
|
+
// "apk update",
|
|
24
|
+
// "apk add --no-cache git curl bash",
|
|
25
|
+
//"npm install -g @anthropic-ai/claude-code",
|
|
26
|
+
"claude mcp add gitlab --env GITLAB_PERSONAL_ACCESS_TOKEN=$GITLAB_PERSONAL_ACCESS_TOKEN --env GITLAB_API_URL=$GITLAB_API_URL --env USE_PIPELINE='true' -- npx -y @zereight/mcp-gitlab"];
|
|
27
|
+
const callClaude = ({
|
|
28
|
+
prompt
|
|
29
|
+
}) => {
|
|
30
|
+
return [`export PROMPT="${(0, bashEscape_1.escapeNewlines)((0, bashEscape_1.escapeDoubleQuotes)((0, bashEscape_1.escapeBackTicks)(prompt)))}"`,
|
|
31
|
+
//'echo "$PROMPT"',
|
|
32
|
+
`claude -p "$PROMPT" --permission-mode acceptEdits --allowedTools "Bash Read(*) Edit(*) Write(*) mcp__gitlab" --verbose --debug`];
|
|
30
33
|
};
|
|
31
|
-
exports.callClaude = callClaude;
|
|
32
|
-
//# sourceMappingURL=shared.js.map
|
|
34
|
+
exports.callClaude = callClaude;
|