@catladder/cli 0.0.0-next-e9e5af68 → 0.0.0-next-1c65899f
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/dist/bundles/catenv/index.js +6990 -6861
- package/dist/bundles/cli/index.js +10953 -10889
- package/dist/bundles/skills/catladder-cli/references/commands.md +37 -2
- package/dist/bundles/skills/catladder-pipelines/SKILL.md +6 -6
- package/dist/bundles/skills/catladder-secrets/SKILL.md +42 -9
- package/dist/cli/src/adapters/baseContext.d.ts +18 -18
- package/dist/cli/src/adapters/baseContext.js +34 -34
- package/dist/cli/src/adapters/nonInteractive.d.ts +2 -2
- package/dist/cli/src/adapters/nonInteractive.js +20 -22
- package/dist/cli/src/adapters/programmatic.d.ts +12 -12
- package/dist/cli/src/adapters/programmatic.js +46 -51
- package/dist/cli/src/adapters/terminal.d.ts +15 -15
- package/dist/cli/src/adapters/terminal.js +154 -176
- package/dist/cli/src/adapters/vaultManagerAccess.d.ts +1 -1
- package/dist/cli/src/adapters/vaultManagerAccess.js +11 -16
- package/dist/cli/src/apps/catenv/catenv.d.ts +4 -4
- package/dist/cli/src/apps/catenv/catenv.js +20 -20
- package/dist/cli/src/apps/catenv/printVariables.d.ts +1 -1
- package/dist/cli/src/apps/catenv/printVariables.js +30 -33
- package/dist/cli/src/apps/catenv/types.d.ts +4 -4
- package/dist/cli/src/apps/catenv/types.js +2 -4
- package/dist/cli/src/apps/catenv/utils.d.ts +6 -9
- package/dist/cli/src/apps/catenv/utils.js +21 -25
- package/dist/cli/src/apps/catenv/verboseBanner.d.ts +1 -1
- package/dist/cli/src/apps/catenv/verboseBanner.js +24 -20
- package/dist/cli/src/apps/catenv/writeDotEnvFiles.d.ts +1 -1
- package/dist/cli/src/apps/catenv/writeDotEnvFiles.js +22 -25
- package/dist/cli/src/apps/catenv/writeEnvDTs.d.ts +1 -1
- package/dist/cli/src/apps/catenv/writeEnvDTs.js +32 -31
- 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 +52 -56
- package/dist/cli/src/apps/cli/commands/project/doctor/DoctorReport.d.ts +13 -13
- package/dist/cli/src/apps/cli/commands/project/doctor/DoctorReport.js +50 -62
- package/dist/cli/src/apps/cli/commands/project/doctor/GcloudProjectInspector.d.ts +9 -9
- package/dist/cli/src/apps/cli/commands/project/doctor/GcloudProjectInspector.js +43 -44
- package/dist/cli/src/apps/cli/commands/project/doctor/checkCloudRun.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/project/doctor/checkCloudRun.js +75 -93
- package/dist/cli/src/apps/cli/commands/project/doctor/checkGithub.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/project/doctor/checkGithub.js +86 -78
- package/dist/cli/src/apps/cli/commands/project/doctor/checkGitlab.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/project/doctor/checkGitlab.js +58 -57
- package/dist/cli/src/apps/cli/commands/project/doctor/checkStore.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/project/doctor/checkStore.js +25 -30
- package/dist/cli/src/apps/cli/commands/project/doctor/index.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/project/doctor/index.js +24 -25
- package/dist/cli/src/apps/cli/commands/project/setup/ensureGcloudProjectNumbers.d.ts +1 -1
- package/dist/cli/src/apps/cli/commands/project/setup/ensureGcloudProjectNumbers.js +34 -45
- 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 +31 -27
- 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 +13 -15
- 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 +34 -43
- 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 +130 -137
- package/dist/cli/src/apps/cli/commands/project/setup/setupCloudRun.d.ts +3 -3
- package/dist/cli/src/apps/cli/commands/project/setup/setupCloudRun.js +49 -46
- 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 +13 -15
- 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 +69 -70
- 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 +7 -15
- 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 +16 -21
- 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 +22 -26
- 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 +30 -35
- package/dist/cli/src/apps/cli/utils/getGoogleAuthUserNumber.d.ts +1 -1
- package/dist/cli/src/apps/cli/utils/getGoogleAuthUserNumber.js +15 -17
- package/dist/cli/src/catci.d.ts +1 -1
- package/dist/cli/src/catci.js +63 -65
- package/dist/cli/src/catenv.d.ts +1 -1
- package/dist/cli/src/catenv.js +44 -31
- package/dist/cli/src/cli.d.ts +1 -1
- package/dist/cli/src/cli.js +185 -170
- package/dist/cli/src/commands/availability.d.ts +1 -1
- package/dist/cli/src/commands/availability.js +13 -16
- package/dist/cli/src/commands/cloudSQL/commandRestoreDb.d.ts +45 -45
- package/dist/cli/src/commands/cloudSQL/commandRestoreDb.js +92 -103
- package/dist/cli/src/commands/fun/commandDadjoke.d.ts +1 -1
- package/dist/cli/src/commands/fun/commandDadjoke.js +18 -24
- package/dist/cli/src/commands/fun/commandStarwars.d.ts +1 -1
- package/dist/cli/src/commands/fun/commandStarwars.js +12 -14
- package/dist/cli/src/commands/general/commandKubeCurrentContext.d.ts +1 -1
- package/dist/cli/src/commands/general/commandKubeCurrentContext.js +10 -12
- package/dist/cli/src/commands/general/commandKubeGetShell.d.ts +11 -11
- package/dist/cli/src/commands/general/commandKubeGetShell.js +26 -28
- package/dist/cli/src/commands/general/commandKubeListNamespaces.d.ts +1 -1
- package/dist/cli/src/commands/general/commandKubeListNamespaces.js +13 -15
- package/dist/cli/src/commands/general/commandKubeListPods.d.ts +6 -6
- package/dist/cli/src/commands/general/commandKubeListPods.js +19 -21
- package/dist/cli/src/commands/general/commandKubeListSecrets.d.ts +6 -6
- package/dist/cli/src/commands/general/commandKubeListSecrets.js +19 -21
- package/dist/cli/src/commands/general/commandKubePortForward.d.ts +19 -19
- package/dist/cli/src/commands/general/commandKubePortForward.js +29 -37
- package/dist/cli/src/commands/general/commandKubeStopPortforward.d.ts +6 -6
- package/dist/cli/src/commands/general/commandKubeStopPortforward.js +13 -19
- package/dist/cli/src/commands/index.d.ts +5 -1
- package/dist/cli/src/commands/index.js +52 -251
- package/dist/cli/src/commands/index.js.map +1 -1
- package/dist/cli/src/commands/mongodb/commandMongoDestroyMember.d.ts +15 -15
- package/dist/cli/src/commands/mongodb/commandMongoDestroyMember.js +76 -73
- package/dist/cli/src/commands/mongodb/commandMongoGetShell.d.ts +15 -15
- package/dist/cli/src/commands/mongodb/commandMongoGetShell.js +26 -28
- package/dist/cli/src/commands/mongodb/commandMongoPortForward.d.ts +20 -20
- package/dist/cli/src/commands/mongodb/commandMongoPortForward.js +45 -52
- package/dist/cli/src/commands/project/commandCloudSqlProxy.d.ts +12 -12
- package/dist/cli/src/commands/project/commandCloudSqlProxy.js +107 -110
- package/dist/cli/src/commands/project/commandConfigSecrets.d.ts +13 -8
- package/dist/cli/src/commands/project/commandConfigSecrets.js +71 -32
- package/dist/cli/src/commands/project/commandConfigSecrets.js.map +1 -1
- package/dist/cli/src/commands/project/commandDoctor.d.ts +7 -7
- package/dist/cli/src/commands/project/commandDoctor.js +18 -20
- package/dist/cli/src/commands/project/commandEnvVars.d.ts +7 -7
- package/dist/cli/src/commands/project/commandEnvVars.js +21 -26
- package/dist/cli/src/commands/project/commandGetMyTotalWorktime.d.ts +1 -1
- package/dist/cli/src/commands/project/commandGetMyTotalWorktime.js +12 -14
- package/dist/cli/src/commands/project/commandGitlabCi.d.ts +11 -11
- package/dist/cli/src/commands/project/commandGitlabCi.js +82 -91
- package/dist/cli/src/commands/project/commandOpenEnv.d.ts +7 -7
- package/dist/cli/src/commands/project/commandOpenEnv.js +24 -31
- package/dist/cli/src/commands/project/commandOpenGit.d.ts +1 -1
- package/dist/cli/src/commands/project/commandOpenGit.js +10 -12
- package/dist/cli/src/commands/project/commandOpenLogs.d.ts +7 -7
- package/dist/cli/src/commands/project/commandOpenLogs.js +34 -37
- package/dist/cli/src/commands/project/commandPortForward.d.ts +24 -24
- package/dist/cli/src/commands/project/commandPortForward.js +59 -78
- package/dist/cli/src/commands/project/commandProjectRestoreDb.d.ts +18 -18
- package/dist/cli/src/commands/project/commandProjectRestoreDb.js +156 -147
- package/dist/cli/src/commands/project/commandRenewToken.d.ts +1 -1
- package/dist/cli/src/commands/project/commandRenewToken.js +10 -12
- package/dist/cli/src/commands/project/commandSecretsClearBackups.d.ts +6 -6
- package/dist/cli/src/commands/project/commandSecretsClearBackups.js +17 -19
- package/dist/cli/src/commands/project/commandSecretsSyncGithub.d.ts +22 -22
- package/dist/cli/src/commands/project/commandSecretsSyncGithub.js +136 -144
- package/dist/cli/src/commands/project/commandSecurityEvaluate.d.ts +1 -1
- package/dist/cli/src/commands/project/commandSecurityEvaluate.js +17 -20
- package/dist/cli/src/commands/project/commandSetup.d.ts +7 -7
- package/dist/cli/src/commands/project/commandSetup.js +18 -20
- package/dist/cli/src/commands/project/k8s/commandDeletePods.d.ts +12 -12
- package/dist/cli/src/commands/project/k8s/commandDeletePods.js +38 -40
- package/dist/cli/src/commands/project/k8s/commandDeleteProject.d.ts +7 -7
- package/dist/cli/src/commands/project/k8s/commandDeleteProject.js +28 -35
- package/dist/cli/src/commands/project/k8s/commandGetShell.d.ts +12 -12
- package/dist/cli/src/commands/project/k8s/commandGetShell.js +31 -31
- package/dist/cli/src/commands/project/k8s/commandListPods.d.ts +7 -7
- package/dist/cli/src/commands/project/k8s/commandListPods.js +21 -23
- package/dist/cli/src/commands/project/k8s/commandNamespace.d.ts +7 -7
- package/dist/cli/src/commands/project/k8s/commandNamespace.js +19 -21
- package/dist/cli/src/commands/project/k8s/commandPauseProject.d.ts +7 -7
- package/dist/cli/src/commands/project/k8s/commandPauseProject.js +28 -35
- package/dist/cli/src/commands/project/k8s/commandTriggerCronjob.d.ts +22 -22
- package/dist/cli/src/commands/project/k8s/commandTriggerCronjob.js +67 -76
- package/dist/cli/src/commands/project/secrets/commandSecretsList.d.ts +24 -0
- package/dist/cli/src/commands/project/secrets/commandSecretsList.js +64 -0
- package/dist/cli/src/commands/project/secrets/commandSecretsList.js.map +1 -0
- package/dist/cli/src/commands/project/secrets/commandSecretsPull.d.ts +19 -0
- package/dist/cli/src/commands/project/secrets/commandSecretsPull.js +48 -0
- package/dist/cli/src/commands/project/secrets/commandSecretsPull.js.map +1 -0
- package/dist/cli/src/commands/project/secrets/commandSecretsPush.d.ts +19 -0
- package/dist/cli/src/commands/project/secrets/commandSecretsPush.js +74 -0
- package/dist/cli/src/commands/project/secrets/commandSecretsPush.js.map +1 -0
- package/dist/cli/src/commands/project/secrets/commandSecretsSet.d.ts +24 -0
- package/dist/cli/src/commands/project/secrets/commandSecretsSet.js +82 -0
- package/dist/cli/src/commands/project/secrets/commandSecretsSet.js.map +1 -0
- package/dist/cli/src/commands/project/secrets/document.d.ts +47 -0
- package/dist/cli/src/commands/project/secrets/document.js +180 -0
- package/dist/cli/src/commands/project/secrets/document.js.map +1 -0
- package/dist/cli/src/commands/project/secrets/parseKeysInput.d.ts +2 -0
- package/dist/cli/src/commands/project/secrets/parseKeysInput.js +10 -0
- package/dist/cli/src/commands/project/secrets/parseKeysInput.js.map +1 -0
- package/dist/cli/src/commands/project/secrets/scope.d.ts +35 -0
- package/dist/cli/src/commands/project/secrets/scope.js +113 -0
- package/dist/cli/src/commands/project/secrets/scope.js.map +1 -0
- package/dist/cli/src/commands/security/commandSecurityAuditCiJob.d.ts +26 -26
- package/dist/cli/src/commands/security/commandSecurityAuditCiJob.js +62 -73
- package/dist/cli/src/commands/security/commandSecurityAuditCreate.d.ts +21 -21
- package/dist/cli/src/commands/security/commandSecurityAuditCreate.js +47 -51
- package/dist/cli/src/commands/security/commandSecurityAuditEvaluate.d.ts +6 -6
- package/dist/cli/src/commands/security/commandSecurityAuditEvaluate.js +22 -29
- package/dist/cli/src/completion.d.ts +1 -1
- package/dist/cli/src/completion.js +130 -129
- package/dist/cli/src/config/getProjectConfig.d.ts +6 -8
- package/dist/cli/src/config/getProjectConfig.js +92 -94
- package/dist/cli/src/config/parseChoice.d.ts +3 -3
- package/dist/cli/src/config/parseChoice.js +6 -11
- package/dist/cli/src/core/defineCommand.d.ts +1 -1
- package/dist/cli/src/core/defineCommand.js +4 -6
- package/dist/cli/src/core/index.d.ts +3 -3
- package/dist/cli/src/core/index.js +9 -46
- package/dist/cli/src/core/registry.d.ts +1 -1
- package/dist/cli/src/core/registry.js +10 -12
- package/dist/cli/src/core/runner.d.ts +3 -3
- package/dist/cli/src/core/runner.js +8 -10
- package/dist/cli/src/core/types.d.ts +70 -70
- package/dist/cli/src/core/types.js +14 -15
- package/dist/cli/src/gcloud/artifactsRegistry.d.ts +3 -3
- package/dist/cli/src/gcloud/artifactsRegistry.js +11 -12
- package/dist/cli/src/gcloud/cloudRun/openCloudRunDashboards.d.ts +1 -1
- package/dist/cli/src/gcloud/cloudRun/openCloudRunDashboards.js +12 -19
- package/dist/cli/src/gcloud/cloudSql/copyDb.d.ts +9 -9
- package/dist/cli/src/gcloud/cloudSql/copyDb.js +20 -31
- package/dist/cli/src/gcloud/cloudSql/parseConnectionString.d.ts +1 -1
- package/dist/cli/src/gcloud/cloudSql/parseConnectionString.js +10 -12
- package/dist/cli/src/gcloud/cloudSql/startProxy.d.ts +4 -4
- package/dist/cli/src/gcloud/cloudSql/startProxy.js +39 -55
- package/dist/cli/src/gcloud/enableServices.d.ts +2 -2
- package/dist/cli/src/gcloud/enableServices.js +6 -8
- package/dist/cli/src/gcloud/getProjectNumber.d.ts +1 -1
- package/dist/cli/src/gcloud/getProjectNumber.js +10 -12
- package/dist/cli/src/gcloud/openDashboard.d.ts +1 -1
- package/dist/cli/src/gcloud/openDashboard.js +13 -17
- package/dist/cli/src/gcloud/serviceAccountNames.d.ts +11 -11
- package/dist/cli/src/gcloud/serviceAccountNames.js +27 -34
- package/dist/cli/src/gcloud/serviceAccounts.d.ts +6 -6
- package/dist/cli/src/gcloud/serviceAccounts.js +37 -46
- package/dist/cli/src/git/getGetMainBranch.d.ts +1 -1
- package/dist/cli/src/git/getGetMainBranch.js +5 -9
- package/dist/cli/src/git/gitConfig.d.ts +6 -11
- package/dist/cli/src/git/gitConfig.js +11 -17
- package/dist/cli/src/git/gitProjectInformation.d.ts +6 -6
- package/dist/cli/src/git/gitProjectInformation.js +20 -30
- package/dist/cli/src/git/index.d.ts +1 -1
- package/dist/cli/src/git/index.js +16 -23
- package/dist/cli/src/index.d.ts +1 -1
- package/dist/cli/src/index.js +2 -4
- package/dist/cli/src/k8sApi/index.d.ts +1 -1
- package/dist/cli/src/k8sApi/index.js +12 -14
- package/dist/cli/src/kubernetes/index.d.ts +1 -1
- package/dist/cli/src/kubernetes/index.js +17 -24
- package/dist/cli/src/kubernetes/openKubernetesDashboards.d.ts +1 -1
- package/dist/cli/src/kubernetes/openKubernetesDashboards.js +33 -35
- package/dist/cli/src/kubernetes/portForward.d.ts +1 -1
- package/dist/cli/src/kubernetes/portForward.js +5 -7
- package/dist/cli/src/packageInfos.d.ts +1 -1
- package/dist/cli/src/packageInfos.js +3 -5
- package/dist/cli/src/release/changesets.d.ts +4 -4
- package/dist/cli/src/release/changesets.js +68 -60
- package/dist/cli/src/release/changesetsReleaseJob.d.ts +1 -1
- package/dist/cli/src/release/changesetsReleaseJob.js +99 -99
- package/dist/cli/src/scripts/generateCliSkillReference.d.ts +1 -1
- package/dist/cli/src/scripts/generateCliSkillReference.js +85 -62
- package/dist/cli/src/security/auditDocument.d.ts +16 -16
- package/dist/cli/src/security/auditDocument.js +65 -54
- package/dist/cli/src/security/createSecurityAuditMergeRequest.d.ts +6 -11
- package/dist/cli/src/security/createSecurityAuditMergeRequest.js +43 -43
- package/dist/cli/src/security/evaluateSecurityAudit.d.ts +3 -5
- package/dist/cli/src/security/evaluateSecurityAudit.js +12 -16
- package/dist/cli/src/store/updateCatladderStore.d.ts +4 -4
- package/dist/cli/src/store/updateCatladderStore.js +12 -16
- package/dist/cli/src/types/types.d.ts +13 -13
- package/dist/cli/src/types/types.js +2 -4
- package/dist/cli/src/utils/boxWithAscii.d.ts +1 -1
- package/dist/cli/src/utils/boxWithAscii.js +10 -12
- package/dist/cli/src/utils/cluster.d.ts +1 -1
- package/dist/cli/src/utils/cluster.js +6 -8
- package/dist/cli/src/utils/concurrency.d.ts +1 -1
- package/dist/cli/src/utils/concurrency.js +13 -17
- package/dist/cli/src/utils/editAsFile.d.ts +1 -1
- package/dist/cli/src/utils/editAsFile.js +17 -25
- package/dist/cli/src/utils/files.d.ts +1 -1
- package/dist/cli/src/utils/files.js +12 -15
- package/dist/cli/src/utils/getEditor.d.ts +2 -2
- package/dist/cli/src/utils/getEditor.js +14 -20
- package/dist/cli/src/utils/github.d.ts +1 -1
- package/dist/cli/src/utils/github.js +60 -47
- package/dist/cli/src/utils/gitlab.d.ts +9 -9
- package/dist/cli/src/utils/gitlab.js +173 -189
- package/dist/cli/src/utils/log.d.ts +2 -2
- package/dist/cli/src/utils/log.js +16 -18
- package/dist/cli/src/utils/portForwards.d.ts +5 -5
- package/dist/cli/src/utils/portForwards.js +31 -32
- package/dist/cli/src/utils/preferences.d.ts +1 -1
- package/dist/cli/src/utils/preferences.js +36 -43
- package/dist/cli/src/utils/projects/index.d.ts +1 -1
- package/dist/cli/src/utils/projects/index.js +21 -24
- package/dist/cli/src/utils/promise.d.ts +1 -1
- package/dist/cli/src/utils/promise.js +6 -8
- package/dist/cli/src/utils/readStdin.d.ts +2 -0
- package/dist/cli/src/utils/readStdin.js +13 -0
- package/dist/cli/src/utils/readStdin.js.map +1 -0
- package/dist/cli/src/utils/shell.d.ts +1 -1
- package/dist/cli/src/utils/shell.js +19 -20
- package/dist/cli/src/vault/BitwardenVault.d.ts +20 -20
- package/dist/cli/src/vault/BitwardenVault.js +98 -84
- package/dist/cli/src/vault/GitlabVault.d.ts +4 -4
- package/dist/cli/src/vault/GitlabVault.js +13 -15
- package/dist/cli/src/vault/VaultManager.d.ts +32 -32
- package/dist/cli/src/vault/VaultManager.js +104 -98
- package/dist/cli/src/vault/bw.d.ts +3 -5
- package/dist/cli/src/vault/bw.js +54 -61
- package/dist/cli/src/vault/cache.d.ts +9 -9
- package/dist/cli/src/vault/cache.js +27 -33
- package/dist/cli/src/vault/index.d.ts +1 -1
- package/dist/cli/src/vault/index.js +18 -40
- package/dist/cli/src/vault/types.d.ts +16 -16
- package/dist/cli/src/vault/types.js +2 -4
- package/dist/pipeline/src/agentSkills/generateAgentSkills.d.ts +1 -1
- package/dist/pipeline/src/agentSkills/generateAgentSkills.js +47 -43
- package/dist/pipeline/src/agentSkills/index.d.ts +1 -1
- package/dist/pipeline/src/agentSkills/index.js +16 -23
- package/dist/pipeline/src/agentSkills/shippedSkills.d.ts +8 -8
- package/dist/pipeline/src/agentSkills/shippedSkills.js +38 -35
- package/dist/pipeline/src/agentSkills/types.d.ts +8 -8
- package/dist/pipeline/src/agentSkills/types.js +13 -14
- package/dist/pipeline/src/backends/github/GithubBackend.d.ts +9 -9
- package/dist/pipeline/src/backends/github/GithubBackend.js +253 -276
- package/dist/pipeline/src/backends/github/GithubBackend.js.map +1 -1
- package/dist/pipeline/src/backends/github/ciVariables.d.ts +1 -1
- package/dist/pipeline/src/backends/github/ciVariables.js +15 -17
- package/dist/pipeline/src/backends/github/createGithubJobs.d.ts +3 -3
- package/dist/pipeline/src/backends/github/createGithubJobs.js +316 -264
- package/dist/pipeline/src/backends/github/githubReleaseJobs.d.ts +3 -3
- package/dist/pipeline/src/backends/github/githubReleaseJobs.js +64 -71
- package/dist/pipeline/src/backends/github/index.d.ts +1 -1
- package/dist/pipeline/src/backends/github/index.js +16 -23
- package/dist/pipeline/src/backends/github/scriptFiles.d.ts +8 -8
- package/dist/pipeline/src/backends/github/scriptFiles.js +27 -29
- package/dist/pipeline/src/backends/github/scriptFunctions.d.ts +1 -1
- package/dist/pipeline/src/backends/github/scriptFunctions.js +10 -10
- package/dist/pipeline/src/backends/gitlab/GitlabBackend.d.ts +13 -13
- package/dist/pipeline/src/backends/gitlab/GitlabBackend.js +163 -178
- package/dist/pipeline/src/backends/gitlab/GitlabBackend.js.map +1 -1
- package/dist/pipeline/src/backends/gitlab/cache.d.ts +5 -5
- package/dist/pipeline/src/backends/gitlab/cache.js +24 -26
- package/dist/pipeline/src/backends/gitlab/ciVariables.d.ts +1 -1
- package/dist/pipeline/src/backends/gitlab/ciVariables.js +9 -11
- package/dist/pipeline/src/backends/gitlab/createGitlabJobs.d.ts +4 -4
- package/dist/pipeline/src/backends/gitlab/createGitlabJobs.js +277 -289
- package/dist/pipeline/src/backends/gitlab/createGitlabJobs.js.map +1 -1
- package/dist/pipeline/src/backends/gitlab/createGitlabPipeline.d.ts +2 -7
- package/dist/pipeline/src/backends/gitlab/createGitlabPipeline.js +66 -65
- package/dist/pipeline/src/backends/gitlab/createGitlabPipeline.js.map +1 -1
- package/dist/pipeline/src/backends/gitlab/getPipelineStages.d.ts +1 -1
- package/dist/pipeline/src/backends/gitlab/getPipelineStages.js +10 -8
- package/dist/pipeline/src/backends/gitlab/gitlabReleaseJobs.d.ts +34 -34
- package/dist/pipeline/src/backends/gitlab/gitlabReleaseJobs.js +55 -45
- package/dist/pipeline/src/backends/gitlab/index.d.ts +1 -1
- package/dist/pipeline/src/backends/gitlab/index.js +16 -23
- package/dist/pipeline/src/backends/gitlab/sortGitLabJobDefProps.d.ts +1 -1
- package/dist/pipeline/src/backends/gitlab/sortGitLabJobDefProps.js +40 -10
- package/dist/pipeline/src/backends/index.d.ts +1 -1
- package/dist/pipeline/src/backends/index.js +41 -56
- package/dist/pipeline/src/backends/types.d.ts +19 -19
- package/dist/pipeline/src/backends/types.js +2 -4
- package/dist/pipeline/src/bash/BashExpression.d.ts +18 -18
- package/dist/pipeline/src/bash/BashExpression.js +45 -44
- package/dist/pipeline/src/bash/bashEscape.d.ts +4 -6
- package/dist/pipeline/src/bash/bashEscape.js +77 -67
- package/dist/pipeline/src/bash/bashExpressionPerPipelineType.d.ts +5 -3
- package/dist/pipeline/src/bash/bashExpressionPerPipelineType.js +6 -7
- package/dist/pipeline/src/bash/bashYaml.d.ts +1 -1
- package/dist/pipeline/src/bash/bashYaml.js +46 -41
- package/dist/pipeline/src/bash/ciVariables.d.ts +2 -2
- package/dist/pipeline/src/bash/ciVariables.js +10 -12
- package/dist/pipeline/src/bash/getInjectVarsScript.d.ts +1 -1
- package/dist/pipeline/src/bash/getInjectVarsScript.js +14 -11
- package/dist/pipeline/src/bash/index.d.ts +1 -1
- package/dist/pipeline/src/bash/index.js +16 -23
- package/dist/pipeline/src/build/artifacts/createBuildJobArtifact.d.ts +1 -1
- package/dist/pipeline/src/build/artifacts/createBuildJobArtifact.js +49 -41
- package/dist/pipeline/src/build/base/constants.d.ts +4 -4
- package/dist/pipeline/src/build/base/constants.js +6 -8
- package/dist/pipeline/src/build/base/createAppBuildJob.d.ts +3 -3
- package/dist/pipeline/src/build/base/createAppBuildJob.js +53 -47
- package/dist/pipeline/src/build/base/createArtifactsConfig.d.ts +1 -1
- package/dist/pipeline/src/build/base/createArtifactsConfig.js +25 -16
- package/dist/pipeline/src/build/base/createBuildJobDefinition.d.ts +3 -3
- package/dist/pipeline/src/build/base/createBuildJobDefinition.js +22 -16
- package/dist/pipeline/src/build/base/index.d.ts +4 -4
- package/dist/pipeline/src/build/base/index.js +34 -15
- 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 +21 -19
- package/dist/pipeline/src/build/cache/createJobCache.d.ts +1 -1
- package/dist/pipeline/src/build/cache/createJobCache.js +55 -58
- package/dist/pipeline/src/build/cache/getAllCacheConfigsFromConfig.d.ts +1 -1
- package/dist/pipeline/src/build/cache/getAllCacheConfigsFromConfig.js +23 -16
- package/dist/pipeline/src/build/cache/transformLegacyJobCache.d.ts +1 -1
- package/dist/pipeline/src/build/cache/transformLegacyJobCache.js +12 -14
- 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 +8 -7
- package/dist/pipeline/src/build/custom/testJob.d.ts +2 -2
- package/dist/pipeline/src/build/custom/testJob.js +71 -67
- package/dist/pipeline/src/build/docker.d.ts +45 -51
- package/dist/pipeline/src/build/docker.js +139 -116
- package/dist/pipeline/src/build/index.d.ts +17 -13
- package/dist/pipeline/src/build/index.js +73 -80
- package/dist/pipeline/src/build/node/buildJob.d.ts +1 -1
- package/dist/pipeline/src/build/node/buildJob.js +45 -35
- package/dist/pipeline/src/build/node/cache.d.ts +1 -1
- package/dist/pipeline/src/build/node/cache.js +79 -52
- package/dist/pipeline/src/build/node/constants.d.ts +4 -4
- package/dist/pipeline/src/build/node/constants.js +6 -8
- package/dist/pipeline/src/build/node/index.d.ts +1 -1
- package/dist/pipeline/src/build/node/index.js +17 -13
- package/dist/pipeline/src/build/node/meteor.d.ts +1 -1
- package/dist/pipeline/src/build/node/meteor.js +59 -40
- package/dist/pipeline/src/build/node/testJob.d.ts +1 -1
- package/dist/pipeline/src/build/node/testJob.js +100 -75
- package/dist/pipeline/src/build/node/yarn.d.ts +2 -2
- package/dist/pipeline/src/build/node/yarn.js +51 -33
- package/dist/pipeline/src/build/rails/build.d.ts +1 -1
- package/dist/pipeline/src/build/rails/build.js +44 -37
- package/dist/pipeline/src/build/rails/index.d.ts +1 -1
- package/dist/pipeline/src/build/rails/index.js +8 -7
- package/dist/pipeline/src/build/rails/testJob.d.ts +1 -1
- package/dist/pipeline/src/build/rails/testJob.js +101 -71
- package/dist/pipeline/src/build/types.d.ts +324 -324
- package/dist/pipeline/src/build/types.js +10 -10
- package/dist/pipeline/src/catci/shippedCatci.d.ts +3 -3
- package/dist/pipeline/src/catci/shippedCatci.js +22 -21
- package/dist/pipeline/src/catenv/index.d.ts +3 -3
- package/dist/pipeline/src/catenv/index.js +8 -10
- package/dist/pipeline/src/config/configruedEnvs.d.ts +1 -1
- package/dist/pipeline/src/config/configruedEnvs.js +23 -18
- package/dist/pipeline/src/config/index.d.ts +1 -1
- package/dist/pipeline/src/config/index.js +16 -23
- package/dist/pipeline/src/config/readConfig.d.ts +4 -4
- package/dist/pipeline/src/config/readConfig.js +37 -42
- package/dist/pipeline/src/context/createAllComponentsContext.d.ts +4 -8
- package/dist/pipeline/src/context/createAllComponentsContext.js +16 -22
- package/dist/pipeline/src/context/createComponentContext.d.ts +6 -6
- package/dist/pipeline/src/context/createComponentContext.js +96 -87
- package/dist/pipeline/src/context/createWorkspaceContext.d.ts +8 -15
- package/dist/pipeline/src/context/createWorkspaceContext.js +28 -37
- package/dist/pipeline/src/context/getBuildInfoVariables.d.ts +2 -2
- package/dist/pipeline/src/context/getBuildInfoVariables.js +21 -22
- package/dist/pipeline/src/context/getEnvConfig.d.ts +1 -1
- package/dist/pipeline/src/context/getEnvConfig.js +28 -29
- package/dist/pipeline/src/context/getEnvType.d.ts +2 -2
- package/dist/pipeline/src/context/getEnvType.js +9 -10
- package/dist/pipeline/src/context/getEnvironment.d.ts +1 -1
- package/dist/pipeline/src/context/getEnvironment.js +16 -20
- package/dist/pipeline/src/context/getEnvironmentContext.d.ts +1 -6
- package/dist/pipeline/src/context/getEnvironmentContext.js +28 -35
- package/dist/pipeline/src/context/getEnvironmentVariables.d.ts +19 -19
- package/dist/pipeline/src/context/getEnvironmentVariables.js +95 -102
- package/dist/pipeline/src/context/getLabels.d.ts +7 -7
- package/dist/pipeline/src/context/getLabels.js +25 -26
- package/dist/pipeline/src/context/getReviewSlug.d.ts +1 -1
- package/dist/pipeline/src/context/getReviewSlug.js +12 -14
- package/dist/pipeline/src/context/index.d.ts +1 -1
- package/dist/pipeline/src/context/index.js +16 -23
- 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 +20 -26
- package/dist/pipeline/src/customImages/hash.d.ts +7 -7
- package/dist/pipeline/src/customImages/hash.js +53 -59
- package/dist/pipeline/src/customImages/jobImagesPlan.d.ts +44 -46
- package/dist/pipeline/src/customImages/jobImagesPlan.js +131 -145
- package/dist/pipeline/src/customImages/jobImagesPlan.js.map +1 -1
- package/dist/pipeline/src/customImages/shippedImages.d.ts +1 -10
- package/dist/pipeline/src/customImages/shippedImages.js +28 -38
- package/dist/pipeline/src/customImages/shippedImages.js.map +1 -1
- package/dist/pipeline/src/defaults/index.d.ts +1 -1
- package/dist/pipeline/src/defaults/index.js +4 -6
- package/dist/pipeline/src/deploy/base/deploy.d.ts +2 -2
- package/dist/pipeline/src/deploy/base/deploy.js +113 -92
- package/dist/pipeline/src/deploy/base/index.d.ts +4 -4
- package/dist/pipeline/src/deploy/base/index.js +10 -6
- package/dist/pipeline/src/deploy/base/rollback.d.ts +2 -2
- package/dist/pipeline/src/deploy/base/rollback.js +27 -31
- package/dist/pipeline/src/deploy/base/stop.d.ts +2 -2
- package/dist/pipeline/src/deploy/base/stop.js +26 -31
- package/dist/pipeline/src/deploy/base/variables.d.ts +4 -4
- package/dist/pipeline/src/deploy/base/variables.js +6 -8
- package/dist/pipeline/src/deploy/cloudRun/artifactsRegistry.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/artifactsRegistry.js +67 -55
- package/dist/pipeline/src/deploy/cloudRun/cleanup.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/cleanup.js +17 -16
- package/dist/pipeline/src/deploy/cloudRun/cloudRunRevisions.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/cloudRunRevisions.js +41 -44
- package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunJobs.d.ts +4 -4
- package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunJobs.js +63 -58
- package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunServices.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunServices.js +73 -63
- 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 +37 -35
- package/dist/pipeline/src/deploy/cloudRun/createJobs/constants.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/createJobs/constants.js +3 -5
- package/dist/pipeline/src/deploy/cloudRun/createJobs/execute/onDeploy.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/createJobs/execute/onDeploy.js +67 -57
- package/dist/pipeline/src/deploy/cloudRun/createJobs/execute/schedules.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/createJobs/execute/schedules.js +139 -130
- package/dist/pipeline/src/deploy/cloudRun/createJobs/getCloudRunDeployScripts.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/createJobs/getCloudRunDeployScripts.js +29 -10
- package/dist/pipeline/src/deploy/cloudRun/createJobs/getCloudRunStopScripts.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/createJobs/getCloudRunStopScripts.js +23 -9
- package/dist/pipeline/src/deploy/cloudRun/createJobs/healthCheck.d.ts +3 -3
- package/dist/pipeline/src/deploy/cloudRun/createJobs/healthCheck.js +39 -36
- package/dist/pipeline/src/deploy/cloudRun/createJobs/index.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/createJobs/index.js +37 -36
- package/dist/pipeline/src/deploy/cloudRun/createJobs/volumes.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/createJobs/volumes.js +13 -19
- package/dist/pipeline/src/deploy/cloudRun/index.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/index.js +100 -91
- package/dist/pipeline/src/deploy/cloudRun/utils/cloudRunExecutionUrl.d.ts +5 -9
- package/dist/pipeline/src/deploy/cloudRun/utils/cloudRunExecutionUrl.js +7 -13
- package/dist/pipeline/src/deploy/cloudRun/utils/createArgsString.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/utils/createArgsString.js +17 -13
- package/dist/pipeline/src/deploy/cloudRun/utils/database.d.ts +5 -5
- package/dist/pipeline/src/deploy/cloudRun/utils/database.js +82 -49
- 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 +9 -7
- package/dist/pipeline/src/deploy/cloudRun/utils/getServiceName.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/utils/getServiceName.js +5 -7
- package/dist/pipeline/src/deploy/cloudRun/utils/jobName.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/utils/jobName.js +3 -5
- package/dist/pipeline/src/deploy/cloudRun/utils/removeFirstLinesFromCommandOutput.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudRun/utils/removeFirstLinesFromCommandOutput.js +4 -6
- package/dist/pipeline/src/deploy/cloudSql/utils.d.ts +1 -1
- package/dist/pipeline/src/deploy/cloudSql/utils.js +9 -7
- package/dist/pipeline/src/deploy/custom/deployJob.d.ts +1 -1
- package/dist/pipeline/src/deploy/custom/deployJob.js +34 -30
- package/dist/pipeline/src/deploy/custom/index.d.ts +1 -1
- package/dist/pipeline/src/deploy/custom/index.js +7 -9
- package/dist/pipeline/src/deploy/dockerTag/deployJob.d.ts +1 -1
- package/dist/pipeline/src/deploy/dockerTag/deployJob.js +22 -18
- package/dist/pipeline/src/deploy/dockerTag/index.d.ts +1 -1
- package/dist/pipeline/src/deploy/dockerTag/index.js +7 -9
- package/dist/pipeline/src/deploy/index.d.ts +13 -11
- package/dist/pipeline/src/deploy/index.js +20 -27
- package/dist/pipeline/src/deploy/kubernetes/additionalSecretKeys.d.ts +3 -5
- package/dist/pipeline/src/deploy/kubernetes/additionalSecretKeys.js +19 -25
- package/dist/pipeline/src/deploy/kubernetes/cloudSql/index.d.ts +7 -7
- package/dist/pipeline/src/deploy/kubernetes/cloudSql/index.js +35 -36
- package/dist/pipeline/src/deploy/kubernetes/deployJob.d.ts +1 -1
- package/dist/pipeline/src/deploy/kubernetes/deployJob.js +61 -46
- package/dist/pipeline/src/deploy/kubernetes/index.d.ts +1 -1
- package/dist/pipeline/src/deploy/kubernetes/index.js +45 -54
- package/dist/pipeline/src/deploy/kubernetes/kubeEnv.d.ts +3 -3
- package/dist/pipeline/src/deploy/kubernetes/kubeEnv.js +34 -35
- package/dist/pipeline/src/deploy/kubernetes/kubeValues.d.ts +84 -84
- package/dist/pipeline/src/deploy/kubernetes/kubeValues.js +63 -70
- package/dist/pipeline/src/deploy/kubernetes/mongodb.d.ts +28 -28
- package/dist/pipeline/src/deploy/kubernetes/mongodb.js +93 -88
- package/dist/pipeline/src/deploy/types/base.d.ts +27 -27
- package/dist/pipeline/src/deploy/types/base.js +2 -4
- package/dist/pipeline/src/deploy/types/custom.d.ts +25 -25
- package/dist/pipeline/src/deploy/types/custom.js +2 -4
- package/dist/pipeline/src/deploy/types/dockerTag.d.ts +10 -10
- package/dist/pipeline/src/deploy/types/dockerTag.js +2 -4
- package/dist/pipeline/src/deploy/types/executeBase.d.ts +15 -15
- package/dist/pipeline/src/deploy/types/executeBase.js +2 -4
- package/dist/pipeline/src/deploy/types/googleCloudRun.d.ts +439 -439
- package/dist/pipeline/src/deploy/types/googleCloudRun.js +14 -16
- package/dist/pipeline/src/deploy/types/index.d.ts +6 -6
- package/dist/pipeline/src/deploy/types/index.js +21 -27
- package/dist/pipeline/src/deploy/types/kubernetes.d.ts +255 -255
- package/dist/pipeline/src/deploy/types/kubernetes.js +2 -4
- package/dist/pipeline/src/deploy/utils.d.ts +1 -1
- package/dist/pipeline/src/deploy/utils.js +21 -23
- package/dist/pipeline/src/globalScriptFunctions/index.d.ts +6 -6
- package/dist/pipeline/src/globalScriptFunctions/index.js +19 -21
- package/dist/pipeline/src/index.d.ts +1 -1
- package/dist/pipeline/src/index.js +16 -23
- package/dist/pipeline/src/pipeline/agent/createAgentContext.d.ts +19 -19
- package/dist/pipeline/src/pipeline/agent/createAgentContext.js +37 -41
- package/dist/pipeline/src/pipeline/agent/createAgentEventJob.d.ts +2 -2
- package/dist/pipeline/src/pipeline/agent/createAgentEventJob.js +27 -26
- package/dist/pipeline/src/pipeline/agent/createAgentReviewJob.d.ts +2 -2
- package/dist/pipeline/src/pipeline/agent/createAgentReviewJob.js +43 -35
- package/dist/pipeline/src/pipeline/agent/createJobsForAgentContext.d.ts +1 -1
- package/dist/pipeline/src/pipeline/agent/createJobsForAgentContext.js +5 -7
- package/dist/pipeline/src/pipeline/agent/prompts.d.ts +2 -2
- package/dist/pipeline/src/pipeline/agent/prompts.js +14 -32
- package/dist/pipeline/src/pipeline/agent/shared.d.ts +4 -6
- package/dist/pipeline/src/pipeline/agent/shared.js +34 -36
- package/dist/pipeline/src/pipeline/agent/utils.d.ts +1 -1
- package/dist/pipeline/src/pipeline/agent/utils.js +9 -11
- package/dist/pipeline/src/pipeline/createAllJobs.d.ts +13 -17
- package/dist/pipeline/src/pipeline/createAllJobs.js +44 -56
- package/dist/pipeline/src/pipeline/createJobsForComponent.d.ts +1 -1
- package/dist/pipeline/src/pipeline/createJobsForComponent.js +30 -27
- package/dist/pipeline/src/pipeline/createJobsForWorkspace.d.ts +1 -1
- package/dist/pipeline/src/pipeline/createJobsForWorkspace.js +6 -8
- package/dist/pipeline/src/pipeline/generatePipelineFiles.d.ts +1 -1
- package/dist/pipeline/src/pipeline/generatePipelineFiles.js +35 -45
- package/dist/pipeline/src/pipeline/index.d.ts +1 -1
- package/dist/pipeline/src/pipeline/index.js +16 -23
- package/dist/pipeline/src/pipeline/packageManager.d.ts +1 -1
- package/dist/pipeline/src/pipeline/packageManager.js +59 -47
- package/dist/pipeline/src/pipeline/resolveRequirements.d.ts +1 -1
- package/dist/pipeline/src/pipeline/resolveRequirements.js +63 -66
- package/dist/pipeline/src/release/index.d.ts +11 -11
- package/dist/pipeline/src/release/index.js +12 -17
- package/dist/pipeline/src/rules/index.d.ts +1 -1
- package/dist/pipeline/src/rules/index.js +15 -15
- package/dist/pipeline/src/runner/index.d.ts +5 -10
- package/dist/pipeline/src/runner/index.js +9 -14
- package/dist/pipeline/src/runner/index.js.map +1 -1
- package/dist/pipeline/src/store/index.d.ts +5 -5
- package/dist/pipeline/src/store/index.js +31 -31
- package/dist/pipeline/src/types/agent.d.ts +15 -15
- package/dist/pipeline/src/types/agent.js +2 -4
- package/dist/pipeline/src/types/config.d.ts +244 -248
- package/dist/pipeline/src/types/config.js +28 -24
- package/dist/pipeline/src/types/context.d.ts +104 -104
- package/dist/pipeline/src/types/context.js +7 -9
- package/dist/pipeline/src/types/environmentContext.d.ts +25 -25
- package/dist/pipeline/src/types/environmentContext.js +2 -4
- package/dist/pipeline/src/types/github-types.d.ts +41 -41
- package/dist/pipeline/src/types/github-types.js +2 -4
- package/dist/pipeline/src/types/gitlab-ci-yml.d.ts +497 -497
- package/dist/pipeline/src/types/gitlab-ci-yml.js +2 -4
- package/dist/pipeline/src/types/gitlab-types.d.ts +15 -15
- package/dist/pipeline/src/types/gitlab-types.js +2 -4
- package/dist/pipeline/src/types/hooks.d.ts +26 -26
- package/dist/pipeline/src/types/hooks.js +2 -4
- package/dist/pipeline/src/types/index.d.ts +1 -1
- package/dist/pipeline/src/types/index.js +16 -23
- package/dist/pipeline/src/types/jobDefinition.d.ts +3 -3
- package/dist/pipeline/src/types/jobDefinition.js +2 -4
- package/dist/pipeline/src/types/jobs.d.ts +172 -171
- package/dist/pipeline/src/types/jobs.js +28 -15
- package/dist/pipeline/src/types/pipeline.d.ts +1 -1
- package/dist/pipeline/src/types/pipeline.js +2 -4
- package/dist/pipeline/src/types/release.d.ts +11 -11
- package/dist/pipeline/src/types/release.js +2 -4
- package/dist/pipeline/src/types/utils.d.ts +3 -1
- package/dist/pipeline/src/types/utils.js +2 -4
- package/dist/pipeline/src/utils/gitlab.d.ts +7 -7
- package/dist/pipeline/src/utils/gitlab.js +15 -12
- package/dist/pipeline/src/utils/index.d.ts +1 -1
- package/dist/pipeline/src/utils/index.js +9 -12
- package/dist/pipeline/src/utils/jsonParse.d.ts +1 -1
- package/dist/pipeline/src/utils/jsonParse.js +10 -11
- package/dist/pipeline/src/utils/measureTime.d.ts +4 -4
- package/dist/pipeline/src/utils/measureTime.js +34 -39
- package/dist/pipeline/src/utils/removeUndefined.d.ts +1 -1
- package/dist/pipeline/src/utils/removeUndefined.js +4 -6
- package/dist/pipeline/src/utils/writeFiles.d.ts +16 -16
- package/dist/pipeline/src/utils/writeFiles.js +67 -61
- package/dist/pipeline/src/variables/VariableValue.d.ts +1 -1
- package/dist/pipeline/src/variables/VariableValue.js +2 -4
- package/dist/pipeline/src/variables/VariableValueContainingReferences.d.ts +12 -12
- package/dist/pipeline/src/variables/VariableValueContainingReferences.js +51 -45
- package/dist/pipeline/src/variables/resolveAllReferences.d.ts +1 -1
- package/dist/pipeline/src/variables/resolveAllReferences.js +18 -17
- package/dist/pipeline/src/variables/resolveAllReferencesOnce.d.ts +2 -2
- package/dist/pipeline/src/variables/resolveAllReferencesOnce.js +17 -14
- package/dist/pipeline/src/variables/resolveReferencesOnce.d.ts +3 -3
- package/dist/pipeline/src/variables/resolveReferencesOnce.js +16 -17
- package/dist/pipeline/src/verify/createVerifyJobs.d.ts +1 -1
- package/dist/pipeline/src/verify/createVerifyJobs.js +62 -55
- package/dist/pipeline/src/verify/index.d.ts +1 -1
- package/dist/pipeline/src/verify/index.js +16 -23
- package/dist/pipeline/src/verify/types.d.ts +11 -11
- package/dist/pipeline/src/verify/types.js +2 -4
- package/dist/skills/catladder-cli/references/commands.md +37 -2
- package/dist/skills/catladder-pipelines/SKILL.md +6 -6
- package/dist/skills/catladder-secrets/SKILL.md +42 -9
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -7
- package/src/commands/index.ts +4 -0
- package/src/commands/project/commandConfigSecrets.ts +76 -15
- package/src/commands/project/secrets/__tests__/document.test.ts +122 -0
- package/src/commands/project/secrets/commandSecretsList.ts +75 -0
- package/src/commands/project/secrets/commandSecretsPull.ts +55 -0
- package/src/commands/project/secrets/commandSecretsPush.ts +100 -0
- package/src/commands/project/secrets/commandSecretsSet.ts +102 -0
- package/src/commands/project/secrets/document.ts +269 -0
- package/src/commands/project/secrets/parseKeysInput.ts +8 -0
- package/src/commands/project/secrets/scope.ts +151 -0
- package/src/utils/readStdin.ts +8 -0
- package/babel-inline.json +0 -11
- package/dist/bundles/runner-images/semantic-release-central.Dockerfile +0 -36
- package/dist/cli/src/apps/cli/commands/project/commandConfigSecrets.d.ts +0 -2
- package/dist/cli/src/apps/cli/commands/project/commandConfigSecrets.js +0 -192
- package/dist/cli/src/apps/cli/commands/project/commandConfigSecrets.js.map +0 -1
- package/dist/pipeline/src/constants.d.ts +0 -2
- package/dist/pipeline/src/constants.js +0 -8
- package/dist/pipeline/src/constants.js.map +0 -1
- package/dist/runner-images/semantic-release-central.Dockerfile +0 -36
- package/src/apps/cli/commands/project/commandConfigSecrets.ts +0 -322
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.getUploadProviderIds = exports.makeGithubJob = exports.collectSecretKinds = exports.resolveGithubNeeds = exports.githubGlobalJobId = exports.githubJobId = void 0;
|
|
7
4
|
const lodash_es_1 = require("lodash-es");
|
|
8
5
|
const getInjectVarsScript_1 = require("../../bash/getInjectVarsScript");
|
|
@@ -17,172 +14,198 @@ const ciVariables_1 = require("./ciVariables");
|
|
|
17
14
|
* leak into github jobs (docker-in-docker daemon config, kubernetes
|
|
18
15
|
* executor resource requests, gitlab clone strategy)
|
|
19
16
|
*/
|
|
20
|
-
const GITLAB_ONLY_RUNNER_VARIABLES = new Set([
|
|
17
|
+
const GITLAB_ONLY_RUNNER_VARIABLES = new Set([
|
|
18
|
+
"DOCKER_HOST",
|
|
19
|
+
"DOCKER_TLS_CERTDIR",
|
|
20
|
+
"DOCKER_DRIVER",
|
|
21
|
+
"KUBERNETES_CPU_REQUEST",
|
|
22
|
+
"KUBERNETES_MEMORY_REQUEST",
|
|
23
|
+
"KUBERNETES_CPU_LIMIT",
|
|
24
|
+
"KUBERNETES_MEMORY_LIMIT",
|
|
25
|
+
"GIT_STRATEGY",
|
|
26
|
+
]);
|
|
21
27
|
/**
|
|
22
28
|
* github runs docker natively on its runners, gitlab needs a
|
|
23
29
|
* docker-in-docker service for it
|
|
24
30
|
*/
|
|
25
|
-
const isDindService = image => /(^|\/)docker:.*dind/.test(image);
|
|
26
|
-
const slug = value => {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
31
|
+
const isDindService = (image) => /(^|\/)docker:.*dind/.test(image);
|
|
32
|
+
const slug = (value) => {
|
|
33
|
+
const slugged = value
|
|
34
|
+
.toLowerCase()
|
|
35
|
+
.replace(/[^a-z0-9]+/g, "-")
|
|
36
|
+
.replace(/^-+|-+$/g, "");
|
|
37
|
+
// job ids must start with a letter or _
|
|
38
|
+
return /^[a-z_]/.test(slugged) ? slugged : `job-${slugged}`;
|
|
30
39
|
};
|
|
31
40
|
const githubJobId = (context, jobName) => slug(`${context.type === "workspace" ? "ws-" : ""}${context.name}-${jobName}-${context.env}`);
|
|
32
41
|
exports.githubJobId = githubJobId;
|
|
33
42
|
/** id of a job without component/workspace context (e.g. image builds) */
|
|
34
|
-
const githubGlobalJobId = jobName => slug(jobName);
|
|
43
|
+
const githubGlobalJobId = (jobName) => slug(jobName);
|
|
35
44
|
exports.githubGlobalJobId = githubGlobalJobId;
|
|
36
45
|
const githubJobName = (context, jobName) => `${context.name} ${jobName} | ${context.env}`;
|
|
37
46
|
const resolveNeed = (context, need, allJobs) => {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
47
|
+
var _a;
|
|
48
|
+
const env = context.env;
|
|
49
|
+
const findComponentJob = (componentName, jobName) => {
|
|
50
|
+
const provider = allJobs.components.find((c) => c.context.name === componentName && c.context.env === env);
|
|
51
|
+
const job = provider === null || provider === void 0 ? void 0 : provider.jobs.find((j) => j.name === jobName);
|
|
52
|
+
if (!provider || !job) {
|
|
53
|
+
throw new Error(`unknown job referenced: '${jobName}' from '${env}:${componentName}'`);
|
|
54
|
+
}
|
|
55
|
+
return (0, exports.githubJobId)(provider.context, jobName);
|
|
56
|
+
};
|
|
57
|
+
const findWorkspaceJob = (workspaceName, jobName) => {
|
|
58
|
+
const provider = allJobs.workspaces.find((w) => w.context.name === workspaceName && w.context.env === env);
|
|
59
|
+
const job = provider === null || provider === void 0 ? void 0 : provider.jobs.find((j) => j.name === jobName);
|
|
60
|
+
if (!provider || !job) {
|
|
61
|
+
throw new Error(`unknown job referenced: '${jobName}' from workspace '${env}:${workspaceName}'`);
|
|
62
|
+
}
|
|
63
|
+
return (0, exports.githubJobId)(provider.context, jobName);
|
|
64
|
+
};
|
|
65
|
+
if ((0, lodash_es_1.isObject)(need)) {
|
|
66
|
+
if ("global" in need && need.global) {
|
|
67
|
+
return { id: (0, exports.githubGlobalJobId)(need.job), artifacts: need.artifacts };
|
|
68
|
+
}
|
|
69
|
+
if ("workspaceName" in need && need.workspaceName) {
|
|
70
|
+
return {
|
|
71
|
+
id: findWorkspaceJob(need.workspaceName, need.job),
|
|
72
|
+
artifacts: need.artifacts,
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
return {
|
|
76
|
+
id: findComponentJob((_a = ("componentName" in need ? need.componentName : undefined)) !== null && _a !== void 0 ? _a : context.name, need.job),
|
|
77
|
+
artifacts: need.artifacts,
|
|
78
|
+
};
|
|
68
79
|
}
|
|
69
80
|
return {
|
|
70
|
-
|
|
71
|
-
|
|
81
|
+
id: context.type === "workspace"
|
|
82
|
+
? findWorkspaceJob(context.name, need)
|
|
83
|
+
: findComponentJob(context.name, need),
|
|
84
|
+
// plain string needs download artifacts by default (gitlab semantics)
|
|
85
|
+
artifacts: true,
|
|
72
86
|
};
|
|
73
|
-
}
|
|
74
|
-
return {
|
|
75
|
-
id: context.type === "workspace" ? findWorkspaceJob(context.name, need) : findComponentJob(context.name, need),
|
|
76
|
-
// plain string needs download artifacts by default (gitlab semantics)
|
|
77
|
-
artifacts: true
|
|
78
|
-
};
|
|
79
87
|
};
|
|
80
88
|
const resolveGithubNeeds = (context, job, allJobs, extraNeeds = []) => {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
89
|
+
var _a;
|
|
90
|
+
const resolved = [...extraNeeds, ...((_a = job.needs) !== null && _a !== void 0 ? _a : [])].map((need) => resolveNeed(context, need, allJobs));
|
|
91
|
+
// deduplicate by provider id, explicit entries win (they come last)
|
|
92
|
+
return [...new Map(resolved.map((n) => [n.id, n])).values()].sort((a, b) => a.id.localeCompare(b.id));
|
|
85
93
|
};
|
|
86
94
|
exports.resolveGithubNeeds = resolveGithubNeeds;
|
|
87
95
|
/** step id of a referenceable cache restore step (see `cacheId`) */
|
|
88
|
-
const cacheStepId = cacheId => `cache-${cacheId.replace(/[^a-zA-Z0-9_-]/g, "-")}`;
|
|
96
|
+
const cacheStepId = (cacheId) => `cache-${cacheId.replace(/[^a-zA-Z0-9_-]/g, "-")}`;
|
|
89
97
|
const createCacheSteps = (context, job) => {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
98
|
+
var _a, _b;
|
|
99
|
+
if (!((_a = job.caches) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
100
|
+
return [];
|
|
101
|
+
}
|
|
102
|
+
const lowered = (0, utils_1.ensureArray)((_b = (0, createJobCache_1.createJobCacheFromCacheConfigs)(context, job.caches)) !== null && _b !== void 0 ? _b : []);
|
|
103
|
+
// caches marked redundantOnExactHitOf skip their (expensive) restore
|
|
104
|
+
// when the referenced sibling cache hit its exact key — e.g. the yarn
|
|
105
|
+
// zip cache is never read when node_modules restored for the same
|
|
106
|
+
// lockfile. The referenced cache's step must come first (its
|
|
107
|
+
// `cache-hit` output drives the `if`), so providers are emitted
|
|
108
|
+
// before dependents; the reorder is github-only and does not affect
|
|
109
|
+
// the gitlab cache list.
|
|
110
|
+
const referencedIds = new Set(lowered
|
|
111
|
+
.map((cache) => cache.redundantOnExactHitOf)
|
|
112
|
+
.filter((id) => !!id));
|
|
113
|
+
const providedIds = new Set(lowered.map((cache) => cache.cacheId).filter((id) => !!id));
|
|
114
|
+
const ordered = [
|
|
115
|
+
...lowered.filter((cache) => !cache.redundantOnExactHitOf),
|
|
116
|
+
...lowered.filter((cache) => cache.redundantOnExactHitOf),
|
|
117
|
+
];
|
|
118
|
+
return ordered.map((cache) => {
|
|
119
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
120
|
+
const paths = (0, utils_1.ensureArray)((_a = cache.paths) !== null && _a !== void 0 ? _a : []);
|
|
121
|
+
const key = cache.key;
|
|
122
|
+
const { cacheKey, restoreKeyPrefix, label } = typeof key === "string" || key === undefined
|
|
123
|
+
? ((_b = cache.keyFiles) === null || _b === void 0 ? void 0 : _b.length)
|
|
124
|
+
? {
|
|
125
|
+
// content-keyed: an unchanged hash is an exact hit and the
|
|
126
|
+
// cache is never re-saved (no per-run copies, no races
|
|
127
|
+
// between parallel jobs saving the same key)
|
|
128
|
+
cacheKey: `${key !== null && key !== void 0 ? key : "cache"}-\${{ hashFiles(${cache.keyFiles
|
|
129
|
+
.map((f) => `'${f}'`)
|
|
130
|
+
.join(", ")}) }}`,
|
|
131
|
+
restoreKeyPrefix: `${key !== null && key !== void 0 ? key : "cache"}-`,
|
|
132
|
+
label: key !== null && key !== void 0 ? key : "cache",
|
|
133
|
+
}
|
|
134
|
+
: {
|
|
135
|
+
// unique key per run so the cache is re-saved, restored via prefix
|
|
136
|
+
cacheKey: `${key !== null && key !== void 0 ? key : "cache"}-\${{ github.run_id }}`,
|
|
137
|
+
restoreKeyPrefix: `${key !== null && key !== void 0 ? key : "cache"}-`,
|
|
138
|
+
label: key !== null && key !== void 0 ? key : "cache",
|
|
139
|
+
}
|
|
140
|
+
: {
|
|
141
|
+
cacheKey: `${(_c = key.prefix) !== null && _c !== void 0 ? _c : "files"}-\${{ hashFiles(${((_d = key.files) !== null && _d !== void 0 ? _d : [])
|
|
142
|
+
.map((f) => `'${f}'`)
|
|
143
|
+
.join(", ")}) }}`,
|
|
144
|
+
restoreKeyPrefix: `${(_e = key.prefix) !== null && _e !== void 0 ? _e : "files"}-`,
|
|
145
|
+
label: (_f = key.prefix) !== null && _f !== void 0 ? _f : ((_g = key.files) !== null && _g !== void 0 ? _g : []).join(","),
|
|
146
|
+
};
|
|
147
|
+
// the sibling-hit condition only applies when the referenced cache
|
|
148
|
+
// is actually part of this job — otherwise restore unconditionally
|
|
149
|
+
const skipCondition = cache.redundantOnExactHitOf &&
|
|
150
|
+
providedIds.has(cache.redundantOnExactHitOf)
|
|
151
|
+
? `\${{ steps.${cacheStepId(cache.redundantOnExactHitOf)}.outputs.cache-hit != 'true' }}`
|
|
152
|
+
: undefined;
|
|
153
|
+
return {
|
|
154
|
+
name: `Cache ${label}`,
|
|
155
|
+
// referenced caches carry an id so dependents can read cache-hit
|
|
156
|
+
...(cache.cacheId && referencedIds.has(cache.cacheId)
|
|
157
|
+
? { id: cacheStepId(cache.cacheId) }
|
|
158
|
+
: {}),
|
|
159
|
+
...(skipCondition ? { if: skipCondition } : {}),
|
|
160
|
+
// pull-only caches are restored but never saved
|
|
161
|
+
uses: cache.policy === "pull"
|
|
162
|
+
? "actions/cache/restore@v4"
|
|
163
|
+
: "actions/cache@v4",
|
|
164
|
+
with: {
|
|
165
|
+
path: paths.join("\n"),
|
|
166
|
+
key: cacheKey,
|
|
167
|
+
"restore-keys": restoreKeyPrefix,
|
|
168
|
+
},
|
|
169
|
+
};
|
|
170
|
+
});
|
|
151
171
|
};
|
|
152
172
|
/**
|
|
153
173
|
* how a vault-stored value reaches the job env: masked github secret,
|
|
154
174
|
* or plain (unmasked) github variable for non-sensitive values — those
|
|
155
175
|
* stay readable in logs and usable in environment urls
|
|
156
176
|
*/
|
|
157
|
-
const vaultValueExpression = (name, kinds) => kinds.get(name) === "variable"
|
|
177
|
+
const vaultValueExpression = (name, kinds) => kinds.get(name) === "variable"
|
|
178
|
+
? `\${{ vars.${name} }}`
|
|
179
|
+
: `\${{ secrets.${name} }}`;
|
|
158
180
|
/**
|
|
159
181
|
* the kind of every vault-stored var of all components, keyed by its
|
|
160
182
|
* CL_* name — the lookup for cross-component references
|
|
161
183
|
*/
|
|
162
|
-
const collectSecretKinds = allJobs => {
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
})
|
|
173
|
-
|
|
174
|
-
return kinds;
|
|
184
|
+
const collectSecretKinds = (allJobs) => {
|
|
185
|
+
const kinds = new Map();
|
|
186
|
+
allJobs.components.forEach(({ context }) => {
|
|
187
|
+
var _a, _b;
|
|
188
|
+
const entries = [
|
|
189
|
+
...context.environment.secretEnvVarKeys,
|
|
190
|
+
...((_a = context.environment.jobOnlyVars.build.secretEnvVarKeys) !== null && _a !== void 0 ? _a : []),
|
|
191
|
+
...((_b = context.environment.jobOnlyVars.deploy.secretEnvVarKeys) !== null && _b !== void 0 ? _b : []),
|
|
192
|
+
];
|
|
193
|
+
entries.forEach(({ key, kind }) => kinds.set((0, getEnvironmentVariables_1.getSecretVarName)(context.env, context.name, key), kind !== null && kind !== void 0 ? kind : "secret"));
|
|
194
|
+
});
|
|
195
|
+
return kinds;
|
|
175
196
|
};
|
|
176
197
|
exports.collectSecretKinds = collectSecretKinds;
|
|
177
198
|
const getSecretsEnv = (context, kinds) => {
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
return
|
|
185
|
-
|
|
199
|
+
var _a, _b;
|
|
200
|
+
const keys = [
|
|
201
|
+
...context.environment.secretEnvVarKeys,
|
|
202
|
+
...((_a = context.environment.jobOnlyVars.build.secretEnvVarKeys) !== null && _a !== void 0 ? _a : []),
|
|
203
|
+
...((_b = context.environment.jobOnlyVars.deploy.secretEnvVarKeys) !== null && _b !== void 0 ? _b : []),
|
|
204
|
+
];
|
|
205
|
+
return Object.fromEntries(keys.map(({ key }) => {
|
|
206
|
+
const name = (0, getEnvironmentVariables_1.getSecretVarName)(context.env, context.name, key);
|
|
207
|
+
return [name, vaultValueExpression(name, kinds)];
|
|
208
|
+
}));
|
|
186
209
|
};
|
|
187
210
|
/**
|
|
188
211
|
* every CL_* variable the job script reads must exist in the job env.
|
|
@@ -191,138 +214,167 @@ const getSecretsEnv = (context, kinds) => {
|
|
|
191
214
|
* that. Github jobs only see what is injected explicitly, so the
|
|
192
215
|
* script is scanned for the names it actually references.
|
|
193
216
|
*/
|
|
194
|
-
const getReferencedSecretsEnv = (script, kinds) => Object.fromEntries([...script.matchAll(/\$\{?(CL_[A-Za-z0-9_]+)\}?/g)]
|
|
217
|
+
const getReferencedSecretsEnv = (script, kinds) => Object.fromEntries([...script.matchAll(/\$\{?(CL_[A-Za-z0-9_]+)\}?/g)]
|
|
218
|
+
.map((match) => match[1])
|
|
219
|
+
.filter((name) => !(name in ciVariables_1.GITHUB_INJECTED_WORKFLOW_ENV))
|
|
220
|
+
.map((name) => [name, vaultValueExpression(name, kinds)]));
|
|
195
221
|
const makeGithubJob = (context, job, allJobs, uploadProviderIds, images, scripts, secretKinds = new Map()) => {
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
222
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
223
|
+
const id = (0, exports.githubJobId)(context, job.name);
|
|
224
|
+
const isComponent = context.type === "component";
|
|
225
|
+
const createsJobEnv = !!job.environment &&
|
|
226
|
+
isComponent &&
|
|
227
|
+
(!job.environment.action || job.environment.action === "start");
|
|
228
|
+
const skipCheckout = ((_a = job.runnerVariables) === null || _a === void 0 ? void 0 : _a.GIT_STRATEGY) === "none";
|
|
229
|
+
const resolved = images.resolve(job.image);
|
|
230
|
+
const needs = (0, exports.resolveGithubNeeds)(context, job, allJobs, resolved.need ? [resolved.need] : []);
|
|
231
|
+
const image = typeof resolved.image === "string"
|
|
232
|
+
? resolved.image
|
|
233
|
+
: Array.isArray(resolved.image)
|
|
234
|
+
? resolved.image[0]
|
|
235
|
+
: (_b = resolved.image) === null || _b === void 0 ? void 0 : _b.name;
|
|
236
|
+
const runScript = [
|
|
237
|
+
...(0, scriptFunctions_1.getGithubScriptFunctionDefinitions)(),
|
|
238
|
+
...(0, gitlab_1.collapseableSection)("injectvars", "Injecting variables")((0, getInjectVarsScript_1.getInjectVarsScript)((_c = job.variables) !== null && _c !== void 0 ? _c : {})),
|
|
239
|
+
...((_e = (_d = job.script) === null || _d === void 0 ? void 0 : _d.filter(utils_1.notNil)) !== null && _e !== void 0 ? _e : []),
|
|
240
|
+
...(createsJobEnv ? [`echo "url=$ROOT_URL" >> "$GITHUB_OUTPUT"`] : []),
|
|
241
|
+
].join("\n");
|
|
242
|
+
// scripts live in committed files to keep workflows under github's
|
|
243
|
+
// 512 KB limit. Two classes of jobs must keep their script inline:
|
|
244
|
+
// jobs without a checkout have no repo files, and `${{ }}` expressions
|
|
245
|
+
// are only interpolated inside the workflow file itself.
|
|
246
|
+
const run = skipCheckout || runScript.includes("${{")
|
|
247
|
+
? runScript
|
|
248
|
+
: scripts.add(id, runScript);
|
|
249
|
+
const artifactPaths = (_g = (_f = job.artifacts) === null || _f === void 0 ? void 0 : _f.paths) !== null && _g !== void 0 ? _g : [];
|
|
250
|
+
const declaredServices = ((_h = job.services) !== null && _h !== void 0 ? _h : []).map((service) => typeof service === "string" ? { name: service } : service);
|
|
251
|
+
// docker runs natively on github runners, so gitlab's docker-in-docker
|
|
252
|
+
// services are dropped. The job container stays: the runner mounts the
|
|
253
|
+
// host's docker socket into it, and images like docker-build carry the
|
|
254
|
+
// helper scripts (ensure*Dockerfile etc.) the job scripts rely on.
|
|
255
|
+
const services = Object.fromEntries(declaredServices
|
|
256
|
+
.filter((service) => !isDindService(service.name))
|
|
257
|
+
.map((service) => [
|
|
258
|
+
slug("alias" in service && service.alias ? service.alias : service.name),
|
|
259
|
+
{
|
|
260
|
+
image: service.name,
|
|
261
|
+
...("variables" in service && service.variables
|
|
262
|
+
? { env: service.variables }
|
|
263
|
+
: {}),
|
|
264
|
+
},
|
|
265
|
+
]));
|
|
266
|
+
const env = {
|
|
267
|
+
...Object.fromEntries(Object.entries((_j = job.runnerVariables) !== null && _j !== void 0 ? _j : {}).filter(([key]) => !GITLAB_ONLY_RUNNER_VARIABLES.has(key))),
|
|
268
|
+
...(isComponent ? getSecretsEnv(context, secretKinds) : {}),
|
|
269
|
+
...getReferencedSecretsEnv(runScript, secretKinds),
|
|
270
|
+
CL_JOB_IMAGE: image !== null && image !== void 0 ? image : "runner",
|
|
271
|
+
};
|
|
272
|
+
/**
|
|
273
|
+
* the github environment of the job — serving two purposes:
|
|
274
|
+
* deployment tracking on deploy jobs, and access to environment
|
|
275
|
+
* secrets (the repo-level cap of 100 secrets doesn't scale to
|
|
276
|
+
* multiple envs). Names are keyed by env NAME, never env type: an
|
|
277
|
+
* app can have several envs of the same type.
|
|
278
|
+
*
|
|
279
|
+
* - deploy jobs: `<env>-<component>` — static (unlike the former
|
|
280
|
+
* per-PR review names), so environment secrets can attach, and
|
|
281
|
+
* each component keeps its own deployment badge/url in the
|
|
282
|
+
* github ui. For review, PRs share the component's environment:
|
|
283
|
+
* a newer PR's deploy marks the previous one Inactive (the badge,
|
|
284
|
+
* not the app) — the price of a static name.
|
|
285
|
+
* - other jobs referencing secrets join the shared `<env>`
|
|
286
|
+
* environment — deliberately NOT the per-component one, whose
|
|
287
|
+
* Active deploy badge their deployment records would displace.
|
|
288
|
+
* NOTE: build-time and deploy-time vars are not differentiated
|
|
289
|
+
* yet, so this environment holds roughly ALL of the env's
|
|
290
|
+
* secrets (the build's dotenv references every component).
|
|
291
|
+
* - jobs without secret references get no environment
|
|
292
|
+
*/
|
|
293
|
+
const referencesSecrets = Object.values(env).some((value) => typeof value === "string" &&
|
|
294
|
+
(value.includes("${{ secrets.") || value.includes("${{ vars.")));
|
|
295
|
+
const githubEnvironment = job.environment && isComponent
|
|
296
|
+
? {
|
|
297
|
+
name: `${context.env}-${context.name}`,
|
|
298
|
+
...(createsJobEnv ? { url: "${{ steps.main.outputs.url }}" } : {}),
|
|
299
|
+
}
|
|
300
|
+
: referencesSecrets
|
|
301
|
+
? { name: context.env }
|
|
302
|
+
: undefined;
|
|
303
|
+
const githubJob = {
|
|
304
|
+
name: githubJobName(context, job.name),
|
|
305
|
+
"runs-on": "ubuntu-latest",
|
|
306
|
+
...(needs.length > 0 ? { needs: needs.map((n) => n.id) } : {}),
|
|
307
|
+
...(image
|
|
308
|
+
? {
|
|
309
|
+
container: {
|
|
310
|
+
image,
|
|
311
|
+
// private images in the repo's registry need credentials
|
|
312
|
+
...(resolved.fromRepoRegistry
|
|
313
|
+
? {
|
|
314
|
+
credentials: {
|
|
315
|
+
username: "${{ github.actor }}",
|
|
316
|
+
password: "${{ github.token }}",
|
|
317
|
+
},
|
|
318
|
+
}
|
|
319
|
+
: {}),
|
|
320
|
+
},
|
|
321
|
+
}
|
|
322
|
+
: {}),
|
|
323
|
+
...(Object.keys(services).length > 0 ? { services } : {}),
|
|
324
|
+
...(githubEnvironment ? { environment: githubEnvironment } : {}),
|
|
325
|
+
env,
|
|
326
|
+
steps: [
|
|
327
|
+
...(skipCheckout
|
|
328
|
+
? []
|
|
329
|
+
: [{ name: "Checkout", uses: "actions/checkout@v4" }]),
|
|
330
|
+
...createCacheSteps(context, job),
|
|
331
|
+
...needs
|
|
332
|
+
.filter((n) => n.artifacts)
|
|
333
|
+
.map((n) => ({
|
|
334
|
+
name: `Download artifacts from ${n.id}`,
|
|
335
|
+
uses: "actions/download-artifact@v4",
|
|
336
|
+
with: { name: n.id },
|
|
337
|
+
})),
|
|
338
|
+
{
|
|
339
|
+
name: job.name,
|
|
340
|
+
id: "main",
|
|
341
|
+
run,
|
|
342
|
+
shell: "bash",
|
|
343
|
+
},
|
|
344
|
+
...(uploadProviderIds.has(id) || artifactPaths.length > 0
|
|
345
|
+
? artifactPaths.length > 0
|
|
346
|
+
? [
|
|
347
|
+
{
|
|
348
|
+
name: "Upload artifacts",
|
|
349
|
+
uses: "actions/upload-artifact@v4",
|
|
350
|
+
with: {
|
|
351
|
+
name: id,
|
|
352
|
+
path: artifactPaths.join("\n"),
|
|
353
|
+
"if-no-files-found": "warn",
|
|
354
|
+
// gitlab artifacts include everything; upload-artifact
|
|
355
|
+
// silently drops hidden files by default — which is
|
|
356
|
+
// exactly where next.js builds live (.next)
|
|
357
|
+
"include-hidden-files": true,
|
|
358
|
+
},
|
|
359
|
+
},
|
|
360
|
+
]
|
|
361
|
+
: []
|
|
362
|
+
: []),
|
|
363
|
+
],
|
|
364
|
+
};
|
|
365
|
+
return [id, githubJob];
|
|
314
366
|
};
|
|
315
367
|
exports.makeGithubJob = makeGithubJob;
|
|
316
368
|
/**
|
|
317
369
|
* the ids of all jobs whose artifacts are consumed by other jobs
|
|
318
370
|
* (they need an upload step)
|
|
319
371
|
*/
|
|
320
|
-
const getUploadProviderIds = allJobs => {
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
return ids;
|
|
372
|
+
const getUploadProviderIds = (allJobs) => {
|
|
373
|
+
const ids = new Set();
|
|
374
|
+
[...allJobs.workspaces, ...allJobs.components].forEach(({ context, jobs }) => jobs.forEach((job) => (0, exports.resolveGithubNeeds)(context, job, allJobs)
|
|
375
|
+
.filter((n) => n.artifacts)
|
|
376
|
+
.forEach((n) => ids.add(n.id))));
|
|
377
|
+
return ids;
|
|
327
378
|
};
|
|
328
|
-
exports.getUploadProviderIds = getUploadProviderIds;
|
|
379
|
+
exports.getUploadProviderIds = getUploadProviderIds;
|
|
380
|
+
//# sourceMappingURL=createGithubJobs.js.map
|