@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,36 +1,45 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
3
6
|
exports.createWorkspaceContext = void 0;
|
|
4
7
|
const __1 = require("..");
|
|
5
8
|
const packageManager_1 = require("../pipeline/packageManager");
|
|
6
9
|
const utils_1 = require("../utils");
|
|
7
10
|
const lodash_1 = require("lodash");
|
|
8
|
-
async function createWorkspaceContext({
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
async function createWorkspaceContext({
|
|
12
|
+
env,
|
|
13
|
+
components,
|
|
14
|
+
workspaceName,
|
|
15
|
+
config,
|
|
16
|
+
pipelineType,
|
|
17
|
+
trigger
|
|
18
|
+
}) {
|
|
19
|
+
var _a, _b;
|
|
20
|
+
const workspaceConfigRaw = (_a = config.builds) === null || _a === void 0 ? void 0 : _a[workspaceName];
|
|
21
|
+
if (!workspaceConfigRaw) {
|
|
22
|
+
throw new Error(`Workspace ${workspaceName} not found in config`);
|
|
23
|
+
}
|
|
24
|
+
const defaults = __1.WORKSPACE_BUILD_TYPES[workspaceConfigRaw.type].defaults();
|
|
25
|
+
const workspaceConfig = (0, utils_1.mergeWithMergingArrays)(defaults, workspaceConfigRaw);
|
|
26
|
+
return {
|
|
27
|
+
name: workspaceName,
|
|
28
|
+
pipelineType,
|
|
29
|
+
trigger,
|
|
30
|
+
type: "workspace",
|
|
31
|
+
workspaceConfig,
|
|
32
|
+
env,
|
|
33
|
+
components,
|
|
34
|
+
fullConfig: config,
|
|
35
|
+
packageManagerInfo: await (0, packageManager_1.getPackageManagerInfoBase)(),
|
|
36
|
+
build: {
|
|
37
|
+
type: "workspace",
|
|
38
|
+
dir: (_b = workspaceConfig.dir) !== null && _b !== void 0 ? _b : ".",
|
|
39
|
+
getComponentDirs: mode => (0, lodash_1.uniq)(components.flatMap(c => c.build.getComponentDirs(mode))),
|
|
40
|
+
buildType: workspaceConfig.type,
|
|
41
|
+
config: workspaceConfig
|
|
13
42
|
}
|
|
14
|
-
|
|
15
|
-
const workspaceConfig = (0, utils_1.mergeWithMergingArrays)(defaults, workspaceConfigRaw);
|
|
16
|
-
return {
|
|
17
|
-
name: workspaceName,
|
|
18
|
-
pipelineType,
|
|
19
|
-
trigger,
|
|
20
|
-
type: "workspace",
|
|
21
|
-
workspaceConfig,
|
|
22
|
-
env,
|
|
23
|
-
components,
|
|
24
|
-
fullConfig: config,
|
|
25
|
-
packageManagerInfo: await (0, packageManager_1.getPackageManagerInfoBase)(),
|
|
26
|
-
build: {
|
|
27
|
-
type: "workspace",
|
|
28
|
-
dir: (_b = workspaceConfig.dir) !== null && _b !== void 0 ? _b : ".",
|
|
29
|
-
getComponentDirs: (mode) => (0, lodash_1.uniq)(components.flatMap((c) => c.build.getComponentDirs(mode))),
|
|
30
|
-
buildType: workspaceConfig.type,
|
|
31
|
-
config: workspaceConfig,
|
|
32
|
-
},
|
|
33
|
-
};
|
|
43
|
+
};
|
|
34
44
|
}
|
|
35
|
-
exports.createWorkspaceContext = createWorkspaceContext;
|
|
36
|
-
//# sourceMappingURL=createWorkspaceContext.js.map
|
|
45
|
+
exports.createWorkspaceContext = createWorkspaceContext;
|
|
@@ -2,5 +2,5 @@ import { BashExpression } from "../bash/BashExpression";
|
|
|
2
2
|
import type { EnvironmentContext } from "../types/environmentContext";
|
|
3
3
|
export declare const ALL_BUILD_VARIABLES: string[];
|
|
4
4
|
export declare const getBuildInfoVariables: (ctx: EnvironmentContext) => {
|
|
5
|
-
|
|
6
|
-
};
|
|
5
|
+
[k: string]: string | BashExpression;
|
|
6
|
+
};
|
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
3
6
|
exports.getBuildInfoVariables = exports.ALL_BUILD_VARIABLES = void 0;
|
|
4
7
|
const BashExpression_1 = require("../bash/BashExpression");
|
|
5
8
|
const bashExpressionPerPipelineType_1 = require("../bash/bashExpressionPerPipelineType");
|
|
6
9
|
const BUILD_VARIABLES = {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
BUILD_INFO_BUILD_ID: {
|
|
11
|
+
default: new BashExpression_1.BashExpression(`$(git describe --tags 2>/dev/null || git rev-parse HEAD)`)
|
|
12
|
+
},
|
|
13
|
+
BUILD_INFO_BUILD_TIME: {
|
|
14
|
+
default: "unknown-build-time",
|
|
15
|
+
gitlab: new BashExpression_1.BashExpression(`$CI_JOB_STARTED_AT`)
|
|
16
|
+
},
|
|
17
|
+
BUILD_INFO_CURRENT_VERSION: {
|
|
18
|
+
default: new BashExpression_1.BashExpression(
|
|
19
|
+
// because we do shallow fetch, we need to ask the origin
|
|
20
|
+
`$(tag=$(git ls-remote origin "refs/tags/v*[0-9]" 2>/dev/null | cut -f 2- | sort -V | tail -1 | sed 's/refs\\/tags\\/v//'); [ -z "$tag" ] && echo "0.0.0" || echo "$tag")`)
|
|
21
|
+
}
|
|
19
22
|
};
|
|
20
23
|
exports.ALL_BUILD_VARIABLES = Object.keys(BUILD_VARIABLES);
|
|
21
|
-
const getBuildInfoVariables =
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
]));
|
|
24
|
+
const getBuildInfoVariables = ctx => {
|
|
25
|
+
const {
|
|
26
|
+
pipelineType
|
|
27
|
+
} = ctx;
|
|
28
|
+
return Object.fromEntries(Object.entries(BUILD_VARIABLES).map(([key, value]) => [key, (0, bashExpressionPerPipelineType_1.getBashExpressionPerPipelineType)(value, pipelineType)]));
|
|
27
29
|
};
|
|
28
|
-
exports.getBuildInfoVariables = getBuildInfoVariables;
|
|
29
|
-
//# sourceMappingURL=getBuildInfoVariables.js.map
|
|
30
|
+
exports.getBuildInfoVariables = getBuildInfoVariables;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { Config, EnvConfigWithComponent } from "../types/config";
|
|
2
|
-
export declare const getEnvConfig: (config: Config, componentName: string, env: string) => EnvConfigWithComponent;
|
|
2
|
+
export declare const getEnvConfig: (config: Config, componentName: string, env: string) => EnvConfigWithComponent;
|
|
@@ -1,34 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
3
6
|
exports.getEnvConfig = void 0;
|
|
4
7
|
const lodash_1 = require("lodash");
|
|
5
8
|
const getEnvConfig = (config, componentName, env) => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
var _a, _b;
|
|
10
|
+
const defaultConfig = config.components[componentName];
|
|
11
|
+
if (!defaultConfig) {
|
|
12
|
+
throw new Error("unknown component " + componentName);
|
|
13
|
+
}
|
|
14
|
+
const envCustomizations = (_b = (_a = defaultConfig.env) === null || _a === void 0 ? void 0 : _a[env]) !== null && _b !== void 0 ? _b : {};
|
|
15
|
+
if (envCustomizations === false) {
|
|
16
|
+
// env is disabled, still return the default config
|
|
17
|
+
return defaultConfig;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* env config is merged with default. Arrays are not merged.
|
|
21
|
+
* you can customize this by providing a function that takes the default value as argument
|
|
22
|
+
*/
|
|
23
|
+
return (0, lodash_1.mergeWith)(
|
|
24
|
+
// mergeWith unfortunatly mutates the first object, so we need to clone it.
|
|
25
|
+
// Passing empty object also doesn't work for us, because that will mess with the customizer function (second argument isn't nessecary the customized value)
|
|
26
|
+
(0, lodash_1.cloneDeep)(defaultConfig), envCustomizations, (defaultValue, customValue, key, obj, source) => {
|
|
27
|
+
// check if custom value is a function (and default is not),
|
|
28
|
+
// we currently don't have config options, that are functions, but we might in the future (customJobs is an exception)
|
|
29
|
+
if (typeof customValue === "function" && typeof defaultValue !== "function") {
|
|
30
|
+
return customValue(defaultValue);
|
|
10
31
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
// env is disabled, still return the default config
|
|
14
|
-
return defaultConfig;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* env config is merged with default. Arrays are not merged.
|
|
18
|
-
* you can customize this by providing a function that takes the default value as argument
|
|
19
|
-
*/
|
|
20
|
-
return (0, lodash_1.mergeWith)(
|
|
21
|
-
// mergeWith unfortunatly mutates the first object, so we need to clone it.
|
|
22
|
-
// Passing empty object also doesn't work for us, because that will mess with the customizer function (second argument isn't nessecary the customized value)
|
|
23
|
-
(0, lodash_1.cloneDeep)(defaultConfig), envCustomizations, (defaultValue, customValue, key, obj, source) => {
|
|
24
|
-
// check if custom value is a function (and default is not),
|
|
25
|
-
// we currently don't have config options, that are functions, but we might in the future (customJobs is an exception)
|
|
26
|
-
if (typeof customValue === "function" &&
|
|
27
|
-
typeof defaultValue !== "function") {
|
|
28
|
-
return customValue(defaultValue);
|
|
29
|
-
}
|
|
30
|
-
return undefined;
|
|
31
|
-
});
|
|
32
|
+
return undefined;
|
|
33
|
+
});
|
|
32
34
|
};
|
|
33
|
-
exports.getEnvConfig = getEnvConfig;
|
|
34
|
-
//# sourceMappingURL=getEnvConfig.js.map
|
|
35
|
+
exports.getEnvConfig = getEnvConfig;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
3
6
|
exports.getEnvType = void 0;
|
|
4
7
|
const types_1 = require("../types");
|
|
5
8
|
const getEnvType = (env, envConfig) => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
throw new Error("unknown env type: " + env);
|
|
9
|
+
if (envConfig.type) return envConfig.type;
|
|
10
|
+
if ((0, types_1.isKnowEnvType)(env)) {
|
|
11
|
+
return env;
|
|
12
|
+
}
|
|
13
|
+
throw new Error("unknown env type: " + env);
|
|
12
14
|
};
|
|
13
|
-
exports.getEnvType = getEnvType;
|
|
14
|
-
//# sourceMappingURL=getEnvType.js.map
|
|
15
|
+
exports.getEnvType = getEnvType;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { CreateComponentContextContext } from "..";
|
|
2
2
|
import type { Environment } from "../types/context";
|
|
3
|
-
export declare const getEnvironment: (ctx: CreateComponentContextContext) => Promise<Environment>;
|
|
3
|
+
export declare const getEnvironment: (ctx: CreateComponentContextContext) => Promise<Environment>;
|
|
@@ -1,21 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
3
6
|
exports.getEnvironment = void 0;
|
|
4
7
|
const getEnvironmentContext_1 = require("./getEnvironmentContext");
|
|
5
8
|
const getEnvironmentVariables_1 = require("./getEnvironmentVariables");
|
|
6
|
-
const getEnvironment = async
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
9
|
+
const getEnvironment = async ctx => {
|
|
10
|
+
const {
|
|
11
|
+
env
|
|
12
|
+
} = ctx;
|
|
13
|
+
const variables = await (0, getEnvironmentVariables_1.getEnvironmentVariables)(ctx);
|
|
14
|
+
const envContext = (0, getEnvironmentContext_1.getEnvironmentContext)(ctx);
|
|
15
|
+
const envType = envContext.envType;
|
|
16
|
+
return {
|
|
17
|
+
envType,
|
|
18
|
+
fullName: envContext.fullName,
|
|
19
|
+
slugPrefix: envContext.environmentSlugPrefix,
|
|
20
|
+
reviewSlug: envContext.reviewSlug,
|
|
21
|
+
slug: envContext.environmentSlug,
|
|
22
|
+
...variables
|
|
23
|
+
};
|
|
19
24
|
};
|
|
20
|
-
exports.getEnvironment = getEnvironment;
|
|
21
|
-
//# sourceMappingURL=getEnvironment.js.map
|
|
25
|
+
exports.getEnvironment = getEnvironment;
|
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
import type { CreateComponentContextContext } from "..";
|
|
2
2
|
import type { EnvironmentContext } from "../types/environmentContext";
|
|
3
|
-
export declare const getEnvironmentContext: ({
|
|
3
|
+
export declare const getEnvironmentContext: ({
|
|
4
|
+
env,
|
|
5
|
+
componentName,
|
|
6
|
+
config,
|
|
7
|
+
pipelineType
|
|
8
|
+
}: CreateComponentContextContext) => EnvironmentContext;
|
|
@@ -1,37 +1,44 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
3
6
|
exports.getEnvironmentContext = void 0;
|
|
4
7
|
const BashExpression_1 = require("../bash/BashExpression");
|
|
5
8
|
const getEnvConfig_1 = require("./getEnvConfig");
|
|
6
9
|
const getEnvType_1 = require("./getEnvType");
|
|
7
10
|
const getReviewSlug_1 = require("./getReviewSlug");
|
|
8
11
|
const getEnvironmentSlugPrefix = (env, reviewSlug) => {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
if (reviewSlug) {
|
|
13
|
+
return (0, BashExpression_1.joinBashExpressions)([env, reviewSlug], "-");
|
|
14
|
+
}
|
|
15
|
+
return env;
|
|
13
16
|
};
|
|
14
|
-
const getEnvironmentContext = ({
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
17
|
+
const getEnvironmentContext = ({
|
|
18
|
+
env,
|
|
19
|
+
componentName,
|
|
20
|
+
config,
|
|
21
|
+
pipelineType
|
|
22
|
+
}) => {
|
|
23
|
+
const envConfigRaw = (0, getEnvConfig_1.getEnvConfig)(config, componentName, env);
|
|
24
|
+
const envType = (0, getEnvType_1.getEnvType)(env, envConfigRaw);
|
|
25
|
+
const reviewSlug = (0, getReviewSlug_1.getReviewSlug)(envConfigRaw, env, pipelineType);
|
|
26
|
+
const environmentSlugPrefix = getEnvironmentSlugPrefix(env, reviewSlug);
|
|
27
|
+
const environmentSlug = environmentSlugPrefix.concat(`-${componentName}`);
|
|
28
|
+
const fullName = (0, BashExpression_1.joinBashExpressions)([config.customerName, config.appName, environmentSlug], "-");
|
|
29
|
+
return {
|
|
30
|
+
envConfigRaw,
|
|
31
|
+
deployConfigRaw: envConfigRaw.deploy,
|
|
32
|
+
buildConfigRaw: envConfigRaw.build,
|
|
33
|
+
environmentSlugPrefix,
|
|
34
|
+
environmentSlug,
|
|
35
|
+
reviewSlug,
|
|
36
|
+
pipelineType,
|
|
37
|
+
fullName,
|
|
38
|
+
envType,
|
|
39
|
+
componentName,
|
|
40
|
+
env,
|
|
41
|
+
fullConfig: config
|
|
42
|
+
};
|
|
35
43
|
};
|
|
36
|
-
exports.getEnvironmentContext = getEnvironmentContext;
|
|
37
|
-
//# sourceMappingURL=getEnvironmentContext.js.map
|
|
44
|
+
exports.getEnvironmentContext = getEnvironmentContext;
|
|
@@ -3,24 +3,24 @@ import type { CreateComponentContextContext } from "..";
|
|
|
3
3
|
import type { StringOrBashExpression } from "../bash/BashExpression";
|
|
4
4
|
import type { EnvironmentContext } from "../types/environmentContext";
|
|
5
5
|
export type SecretEnvVar = {
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
key: string;
|
|
7
|
+
hidden?: boolean;
|
|
8
8
|
};
|
|
9
9
|
declare const getBasePredefinedVariables: (ctx: EnvironmentContext) => {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
ENV_SHORT: string;
|
|
11
|
+
APP_DIR: string;
|
|
12
|
+
ENV_TYPE: "stage" | "dev" | "review" | "prod" | "local";
|
|
13
13
|
};
|
|
14
14
|
type BasePredefinedVariables = ReturnType<typeof getBasePredefinedVariables>;
|
|
15
15
|
export type PredefinedVariables = BasePredefinedVariables & {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
HOSTNAME?: StringOrBashExpression;
|
|
17
|
+
ROOT_URL?: StringOrBashExpression;
|
|
18
|
+
HOSTNAME_INTERNAL?: StringOrBashExpression;
|
|
19
|
+
ROOT_URL_INTERNAL?: StringOrBashExpression;
|
|
20
20
|
};
|
|
21
21
|
export declare const getEnvironmentVariables: (ctx: CreateComponentContextContext, options?: {
|
|
22
|
-
|
|
22
|
+
shouldResolveReferences?: boolean;
|
|
23
23
|
}) => Promise<EnvironmentVariables>;
|
|
24
24
|
export declare const getSecretVarName: (env: string, componentName: string, key: string) => string;
|
|
25
25
|
export declare const getSecretVarNameForContext: (context: ComponentContext, key: string) => string;
|
|
26
|
-
export {};
|
|
26
|
+
export {};
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
3
6
|
exports.getSecretVarNameForContext = exports.getSecretVarName = exports.getEnvironmentVariables = void 0;
|
|
4
7
|
const deploy_1 = require("../deploy");
|
|
5
8
|
const BashExpression_1 = require("../bash/BashExpression");
|
|
@@ -10,106 +13,110 @@ const getBuildInfoVariables_1 = require("./getBuildInfoVariables");
|
|
|
10
13
|
const getEnvironmentContext_1 = require("./getEnvironmentContext");
|
|
11
14
|
const transformJobOnlyVars_1 = require("./transformJobOnlyVars");
|
|
12
15
|
const envVars_1 = require("./utils/envVars");
|
|
13
|
-
const getBasePredefinedVariables =
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
const getBasePredefinedVariables = ctx => {
|
|
17
|
+
return {
|
|
18
|
+
ENV_SHORT: ctx.env,
|
|
19
|
+
APP_DIR: ctx.envConfigRaw.dir,
|
|
20
|
+
ENV_TYPE: ctx.envType,
|
|
21
|
+
...(ctx.envType !== "local" ? (0, getBuildInfoVariables_1.getBuildInfoVariables)(ctx) : {})
|
|
22
|
+
};
|
|
20
23
|
};
|
|
21
24
|
const getEnvironmentVariables = async (ctx, options = {}) => {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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
|
-
const
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}),
|
|
76
|
-
]));
|
|
77
|
-
const publicEnvVars = ((_h = options.shouldResolveReferences) !== null && _h !== void 0 ? _h : true)
|
|
78
|
-
? await (0, resolveAllReferences_1.resolveAllReferences)(publicEnvVarsUnresolved, async (otherComponentName) => {
|
|
79
|
-
const { envVars: otherEnvVars } = await (0, exports.getEnvironmentVariables)({
|
|
80
|
-
...ctx,
|
|
81
|
-
componentName: otherComponentName,
|
|
82
|
-
}, {
|
|
83
|
-
shouldResolveReferences: false, // we already do this here with replaceAllReferences recursivly until re replaced all
|
|
84
|
-
});
|
|
85
|
-
return otherEnvVars;
|
|
86
|
-
})
|
|
87
|
-
: publicEnvVarsUnresolved;
|
|
88
|
-
const envVars = addIndexVar({
|
|
89
|
-
...predefinedVariables,
|
|
90
|
-
...secretEnvVars,
|
|
91
|
-
...publicEnvVars,
|
|
92
|
-
});
|
|
93
|
-
return {
|
|
94
|
-
envVars,
|
|
95
|
-
secretEnvVarKeys,
|
|
96
|
-
jobOnlyVars: {
|
|
97
|
-
build: await (0, transformJobOnlyVars_1.transformJobOnlyVars)(env, componentName, (buildConfigRaw &&
|
|
98
|
-
(0, types_1.isStandaloneBuildConfig)(buildConfigRaw) &&
|
|
99
|
-
buildConfigRaw.jobVars) ||
|
|
100
|
-
null),
|
|
101
|
-
deploy: await (0, transformJobOnlyVars_1.transformJobOnlyVars)(env, componentName, (deployConfigRaw && deployConfigRaw.jobVars) || null),
|
|
102
|
-
},
|
|
25
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
26
|
+
const environmentContext = (0, getEnvironmentContext_1.getEnvironmentContext)(ctx);
|
|
27
|
+
const {
|
|
28
|
+
config,
|
|
29
|
+
env,
|
|
30
|
+
componentName
|
|
31
|
+
} = ctx;
|
|
32
|
+
const {
|
|
33
|
+
envConfigRaw,
|
|
34
|
+
deployConfigRaw,
|
|
35
|
+
buildConfigRaw,
|
|
36
|
+
envType
|
|
37
|
+
} = environmentContext;
|
|
38
|
+
const basePredefinedVariables = getBasePredefinedVariables(environmentContext);
|
|
39
|
+
let predefinedVariables;
|
|
40
|
+
let host;
|
|
41
|
+
let url;
|
|
42
|
+
if (envType === "local") {
|
|
43
|
+
const devLocalConfig = envConfigRaw;
|
|
44
|
+
const port = devLocalConfig.port !== false ? (_a = devLocalConfig.port) !== null && _a !== void 0 ? _a : 3000 : null;
|
|
45
|
+
host = port ? "localhost:" + port.toString() : null;
|
|
46
|
+
url = host ? "http://" + host : null;
|
|
47
|
+
predefinedVariables = {
|
|
48
|
+
...basePredefinedVariables,
|
|
49
|
+
ENV_SHORT: "local",
|
|
50
|
+
...(url ? {
|
|
51
|
+
ROOT_URL: url
|
|
52
|
+
} : {}),
|
|
53
|
+
...(host ? {
|
|
54
|
+
HOSTNAME: host
|
|
55
|
+
} : {}),
|
|
56
|
+
...(host ? {
|
|
57
|
+
HOSTNAME_INTERNAL: host
|
|
58
|
+
} : {}),
|
|
59
|
+
...(host ? {
|
|
60
|
+
ROOT_URL_INTERNAL: "http://" + host
|
|
61
|
+
} : {}),
|
|
62
|
+
...(port ? {
|
|
63
|
+
PORT: port.toString()
|
|
64
|
+
} : {})
|
|
65
|
+
};
|
|
66
|
+
} else {
|
|
67
|
+
const additionalEnvVars = deployConfigRaw ? deploy_1.DEPLOY_TYPES[deployConfigRaw.type].getAdditionalEnvVars(environmentContext) : {};
|
|
68
|
+
const HOSTNAME_INTERNAL = (_b = additionalEnvVars.HOSTNAME_INTERNAL) !== null && _b !== void 0 ? _b : "unknown-host.example.com";
|
|
69
|
+
host = (_c = envConfigRaw === null || envConfigRaw === void 0 ? void 0 : envConfigRaw.host) !== null && _c !== void 0 ? _c : HOSTNAME_INTERNAL;
|
|
70
|
+
url = (0, BashExpression_1.joinBashExpressions)(["https://", host]);
|
|
71
|
+
predefinedVariables = {
|
|
72
|
+
...basePredefinedVariables,
|
|
73
|
+
HOSTNAME: host,
|
|
74
|
+
ROOT_URL: url,
|
|
75
|
+
HOSTNAME_INTERNAL,
|
|
76
|
+
ROOT_URL_INTERNAL: (0, BashExpression_1.joinBashExpressions)(["https://", HOSTNAME_INTERNAL]),
|
|
77
|
+
...additionalEnvVars
|
|
103
78
|
};
|
|
79
|
+
}
|
|
80
|
+
const publicEnvVarsRaw = (_e = (_d = envConfigRaw.vars) === null || _d === void 0 ? void 0 : _d.public) !== null && _e !== void 0 ? _e : {};
|
|
81
|
+
const additionalSecretKeys = deployConfigRaw ? deploy_1.DEPLOY_TYPES[deployConfigRaw.type].additionalSecretKeys(environmentContext) : [];
|
|
82
|
+
const secretEnvVarKeys = [...(0, envVars_1.stringListToSecreteEnvVarList)((_g = (_f = envConfigRaw.vars) === null || _f === void 0 ? void 0 : _f.secret) !== null && _g !== void 0 ? _g : []), ...additionalSecretKeys];
|
|
83
|
+
const secretEnvVars = (0, envVars_1.makeSecretEnvVarMapping)(env, componentName, secretEnvVarKeys);
|
|
84
|
+
const publicEnvVarsRawSanitized = (0, envVars_1.stringifyValues)(publicEnvVarsRaw);
|
|
85
|
+
const publicEnvVarsUnresolved = Object.fromEntries(Object.entries(publicEnvVarsRawSanitized).map(([key, value]) => [key, (0, VariableValueContainingReferences_1.createVariableValueContainingReferencesFromString)(value, {
|
|
86
|
+
componentName: ctx.componentName
|
|
87
|
+
})]));
|
|
88
|
+
const publicEnvVars = ((_h = options.shouldResolveReferences) !== null && _h !== void 0 ? _h : true) ? await (0, resolveAllReferences_1.resolveAllReferences)(publicEnvVarsUnresolved, async otherComponentName => {
|
|
89
|
+
const {
|
|
90
|
+
envVars: otherEnvVars
|
|
91
|
+
} = await (0, exports.getEnvironmentVariables)({
|
|
92
|
+
...ctx,
|
|
93
|
+
componentName: otherComponentName
|
|
94
|
+
}, {
|
|
95
|
+
shouldResolveReferences: false // we already do this here with replaceAllReferences recursivly until re replaced all
|
|
96
|
+
});
|
|
97
|
+
return otherEnvVars;
|
|
98
|
+
}) : publicEnvVarsUnresolved;
|
|
99
|
+
const envVars = addIndexVar({
|
|
100
|
+
...predefinedVariables,
|
|
101
|
+
...secretEnvVars,
|
|
102
|
+
...publicEnvVars
|
|
103
|
+
});
|
|
104
|
+
return {
|
|
105
|
+
envVars,
|
|
106
|
+
secretEnvVarKeys,
|
|
107
|
+
jobOnlyVars: {
|
|
108
|
+
build: await (0, transformJobOnlyVars_1.transformJobOnlyVars)(env, componentName, buildConfigRaw && (0, types_1.isStandaloneBuildConfig)(buildConfigRaw) && buildConfigRaw.jobVars || null),
|
|
109
|
+
deploy: await (0, transformJobOnlyVars_1.transformJobOnlyVars)(env, componentName, deployConfigRaw && deployConfigRaw.jobVars || null)
|
|
110
|
+
}
|
|
111
|
+
};
|
|
104
112
|
};
|
|
105
113
|
exports.getEnvironmentVariables = getEnvironmentVariables;
|
|
106
|
-
const sanitizeForEnVar =
|
|
114
|
+
const sanitizeForEnVar = s => s.replace(/-/g, "_");
|
|
107
115
|
const getSecretVarName = (env, componentName, key) => `CL_${sanitizeForEnVar(env)}_${sanitizeForEnVar(componentName)}_${key}`; // remove dash from component name
|
|
108
116
|
exports.getSecretVarName = getSecretVarName;
|
|
109
|
-
const addIndexVar =
|
|
110
|
-
|
|
111
|
-
|
|
117
|
+
const addIndexVar = vars => ({
|
|
118
|
+
...vars,
|
|
119
|
+
_ALL_ENV_VAR_KEYS: JSON.stringify(Object.keys(vars))
|
|
112
120
|
});
|
|
113
121
|
const getSecretVarNameForContext = (context, key) => (0, exports.getSecretVarName)(context.env, context.name, key);
|
|
114
|
-
exports.getSecretVarNameForContext = getSecretVarNameForContext;
|
|
115
|
-
//# sourceMappingURL=getEnvironmentVariables.js.map
|
|
122
|
+
exports.getSecretVarNameForContext = getSecretVarNameForContext;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { ComponentContext } from "../types";
|
|
2
2
|
export declare const getLabels: (context: ComponentContext) => {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
};
|
|
3
|
+
"customer-name": string;
|
|
4
|
+
"component-name": string;
|
|
5
|
+
"app-name": string;
|
|
6
|
+
"env-type": string;
|
|
7
|
+
"env-name": string;
|
|
8
|
+
"build-type": string;
|
|
9
|
+
};
|